!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}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)}({"+9ZR":function(t,e,n){"use strict";(function(t){function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}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)}}function i(t,e,n){return e&&r(t.prototype,e),n&&r(t,n),t}function o(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function a(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){o(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function l(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&&c(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t,e){return(c=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function d(t,e){return!e||"object"!=typeof e&&"function"!=typeof e?h(t):e}function p(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 Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=u(t);if(e){var i=u(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d(this,n)}}function f(t,e,n){return(f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=u(t)););return t}(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(n):i.value}})(t,e,n||t)}function m(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;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||null==a.return||a.return()}finally{if(i)throw o}}return n}(t,e)||v(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 g(t){return function(t){if(Array.isArray(t))return y(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||v(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 v(t,e){if(t){if("string"==typeof t)return y(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)?y(t,e):void 0}}function y(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 _={el:document,name:"scroll",offset:[0,0],repeat:!1,smooth:!1,initPosition:{x:0,y:0},direction:"vertical",gestureDirection:"vertical",reloadOnContextChange:!1,lerp:.1,class:"is-inview",scrollbarContainer:!1,scrollbarClass:"c-scrollbar",scrollingClass:"has-scroll-scrolling",draggingClass:"has-scroll-dragging",smoothClass:"has-scroll-smooth",initClass:"has-scroll-init",getSpeed:!1,getDirection:!1,scrollFromAnywhere:!1,multiplier:1,firefoxMultiplier:50,touchMultiplier:2,resetNativeScroll:!0,tablet:{smooth:!1,direction:"vertical",gestureDirection:"vertical",breakpoint:1024},smartphone:{smooth:!1,direction:"vertical",gestureDirection:"vertical"}},b=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),Object.assign(this,_,e),this.smartphone=_.smartphone,e.smartphone&&Object.assign(this.smartphone,e.smartphone),this.tablet=_.tablet,e.tablet&&Object.assign(this.tablet,e.tablet),this.namespace="locomotive",this.html=document.documentElement,this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.els={},this.currentElements={},this.listeners={},this.hasScrollTicking=!1,this.hasCallEventSet=!1,this.checkScroll=this.checkScroll.bind(this),this.checkResize=this.checkResize.bind(this),this.checkEvent=this.checkEvent.bind(this),this.instance={scroll:{x:0,y:0},limit:{x:this.html.offsetWidth,y:this.html.offsetHeight},currentElements:this.currentElements},this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",this.isMobile&&(this.direction=this[this.context].direction),"horizontal"===this.direction?this.directionAxis="x":this.directionAxis="y",this.getDirection&&(this.instance.direction=null),this.getDirection&&(this.instance.speed=0),this.html.classList.add(this.initClass),window.addEventListener("resize",this.checkResize,!1)}return i(t,[{key:"init",value:function(){this.initEvents()}},{key:"checkScroll",value:function(){this.dispatchScroll()}},{key:"checkResize",value:function(){var t=this;this.resizeTick||(this.resizeTick=!0,requestAnimationFrame((function(){t.resize(),t.resizeTick=!1})))}},{key:"resize",value:function(){}},{key:"checkContext",value:function(){if(this.reloadOnContextChange){this.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||this.windowWidth<this.tablet.breakpoint,this.isTablet=this.isMobile&&this.windowWidth>=this.tablet.breakpoint;var t=this.context;if(this.isMobile?this.isTablet?this.context="tablet":this.context="smartphone":this.context="desktop",t!=this.context)("desktop"==t?this.smooth:this[t].smooth)!=("desktop"==this.context?this.smooth:this[this.context].smooth)&&window.location.reload()}}},{key:"initEvents",value:function(){var t=this;this.scrollToEls=this.el.querySelectorAll("[data-".concat(this.name,"-to]")),this.setScrollTo=this.setScrollTo.bind(this),this.scrollToEls.forEach((function(e){e.addEventListener("click",t.setScrollTo,!1)}))}},{key:"setScrollTo",value:function(t){t.preventDefault(),this.scrollTo(t.currentTarget.getAttribute("data-".concat(this.name,"-href"))||t.currentTarget.getAttribute("href"),{offset:t.currentTarget.getAttribute("data-".concat(this.name,"-offset"))})}},{key:"addElements",value:function(){}},{key:"detectElements",value:function(t){var e=this,n=this.instance.scroll.y,r=n+this.windowHeight,i=this.instance.scroll.x,o=i+this.windowWidth;Object.entries(this.els).forEach((function(s){var a=m(s,2),l=a[0],u=a[1];if(!u||u.inView&&!t||("horizontal"===e.direction?o>=u.left&&i<u.right&&e.setInView(u,l):r>=u.top&&n<u.bottom&&e.setInView(u,l)),u&&u.inView)if("horizontal"===e.direction){var c=u.right-u.left;u.progress=(e.instance.scroll.x-(u.left-e.windowWidth))/(c+e.windowWidth),(o<u.left||i>u.right)&&e.setOutOfView(u,l)}else{var h=u.bottom-u.top;u.progress=(e.instance.scroll.y-(u.top-e.windowHeight))/(h+e.windowHeight),(r<u.top||n>u.bottom)&&e.setOutOfView(u,l)}})),this.hasScrollTicking=!1}},{key:"setInView",value:function(t,e){this.els[e].inView=!0,t.el.classList.add(t.class),this.currentElements[e]=t,t.call&&this.hasCallEventSet&&(this.dispatchCall(t,"enter"),t.repeat||(this.els[e].call=!1))}},{key:"setOutOfView",value:function(t,e){var n=this;this.els[e].inView=!1,Object.keys(this.currentElements).forEach((function(t){t===e&&delete n.currentElements[t]})),t.call&&this.hasCallEventSet&&this.dispatchCall(t,"exit"),t.repeat&&t.el.classList.remove(t.class)}},{key:"dispatchCall",value:function(t,e){this.callWay=e,this.callValue=t.call.split(",").map((function(t){return t.trim()})),this.callObj=t,1==this.callValue.length&&(this.callValue=this.callValue[0]);var n=new Event(this.namespace+"call");this.el.dispatchEvent(n)}},{key:"dispatchScroll",value:function(){var t=new Event(this.namespace+"scroll");this.el.dispatchEvent(t)}},{key:"setEvents",value:function(t,e){this.listeners[t]||(this.listeners[t]=[]);var n=this.listeners[t];n.push(e),1===n.length&&this.el.addEventListener(this.namespace+t,this.checkEvent,!1),"call"===t&&(this.hasCallEventSet=!0,this.detectElements(!0))}},{key:"unsetEvents",value:function(t,e){if(this.listeners[t]){var n=this.listeners[t],r=n.indexOf(e);r<0||(n.splice(r,1),0===n.index&&this.el.removeEventListener(this.namespace+t,this.checkEvent,!1))}}},{key:"checkEvent",value:function(t){var e=this,n=t.type.replace(this.namespace,""),r=this.listeners[n];r&&0!==r.length&&r.forEach((function(t){switch(n){case"scroll":return t(e.instance);case"call":return t(e.callValue,e.callWay,e.callObj);default:return t()}}))}},{key:"startScroll",value:function(){}},{key:"stopScroll",value:function(){}},{key:"setScroll",value:function(t,e){this.instance.scroll={x:0,y:0}}},{key:"destroy",value:function(){var t=this;window.removeEventListener("resize",this.checkResize,!1),Object.keys(this.listeners).forEach((function(e){t.el.removeEventListener(t.namespace+e,t.checkEvent,!1)})),this.listeners={},this.scrollToEls.forEach((function(e){e.removeEventListener("click",t.setScrollTo,!1)})),this.html.classList.remove(this.initClass)}}]),t}(),x="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function w(t,e){return t(e={exports:{}},e.exports),e.exports}var E=w((function(t,e){t.exports={polyfill:function(){var t=window,e=document;if(!("scrollBehavior"in e.documentElement.style)||!0===t.__forceSmoothScrollPolyfill__){var n,r=t.HTMLElement||t.Element,i={scroll:t.scroll||t.scrollTo,scrollBy:t.scrollBy,elementScroll:r.prototype.scroll||a,scrollIntoView:r.prototype.scrollIntoView},o=t.performance&&t.performance.now?t.performance.now.bind(t.performance):Date.now,s=(n=t.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);t.scroll=t.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?f.call(t,e.body,void 0!==arguments[0].left?~~arguments[0].left:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:t.scrollY||t.pageYOffset):i.scroll.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:t.scrollX||t.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:t.scrollY||t.pageYOffset))},t.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?i.scrollBy.call(t,void 0!==arguments[0].left?arguments[0].left:"object"!=typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):f.call(t,e.body,~~arguments[0].left+(t.scrollX||t.pageXOffset),~~arguments[0].top+(t.scrollY||t.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var t=arguments[0].left,e=arguments[0].top;f.call(this,this,void 0===t?this.scrollLeft:~~t,void 0===e?this.scrollTop:~~e)}else{if("number"==typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!=typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):i.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=d(this),r=n.getBoundingClientRect(),o=this.getBoundingClientRect();n!==e.body?(f.call(this,n,n.scrollLeft+o.left-r.left,n.scrollTop+o.top-r.top),"fixed"!==t.getComputedStyle(n).position&&t.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):t.scrollBy({left:o.left,top:o.top,behavior:"smooth"})}else i.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function a(t,e){this.scrollLeft=t,this.scrollTop=e}function l(t){if(null===t||"object"!=typeof t||void 0===t.behavior||"auto"===t.behavior||"instant"===t.behavior)return!0;if("object"==typeof t&&"smooth"===t.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+t.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(t,e){return"Y"===e?t.clientHeight+s<t.scrollHeight:"X"===e?t.clientWidth+s<t.scrollWidth:void 0}function c(e,n){var r=t.getComputedStyle(e,null)["overflow"+n];return"auto"===r||"scroll"===r}function h(t){var e=u(t,"Y")&&c(t,"Y"),n=u(t,"X")&&c(t,"X");return e||n}function d(t){for(;t!==e.body&&!1===h(t);)t=t.parentNode||t.host;return t}function p(e){var n,r,i,s,a=(o()-e.startTime)/468;s=a=a>1?1:a,n=.5*(1-Math.cos(Math.PI*s)),r=e.startX+(e.x-e.startX)*n,i=e.startY+(e.y-e.startY)*n,e.method.call(e.scrollable,r,i),r===e.x&&i===e.y||t.requestAnimationFrame(p.bind(t,e))}function f(n,r,s){var l,u,c,h,d=o();n===e.body?(l=t,u=t.scrollX||t.pageXOffset,c=t.scrollY||t.pageYOffset,h=i.scroll):(l=n,u=n.scrollLeft,c=n.scrollTop,h=a),p({scrollable:l,method:h,startTime:d,startX:u,startY:c,x:r,y:s})}}}})),T=(E.polyfill,function(t){l(r,t);var e=p(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),(t=e.call(this,i)).resetNativeScroll&&(history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0)),window.addEventListener("scroll",t.checkScroll,!1),void 0===window.smoothscrollPolyfill&&(window.smoothscrollPolyfill=E,window.smoothscrollPolyfill.polyfill()),t}return i(r,[{key:"init",value:function(){this.instance.scroll.y=window.pageYOffset,this.addElements(),this.detectElements(),f(u(r.prototype),"init",this).call(this)}},{key:"checkScroll",value:function(){var t=this;f(u(r.prototype),"checkScroll",this).call(this),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.instance.scroll.y=window.pageYOffset,Object.entries(this.els).length&&(this.hasScrollTicking||(requestAnimationFrame((function(){t.detectElements()})),this.hasScrollTicking=!0))}},{key:"addDirection",value:function(){window.pageYOffset>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):window.pageYOffset<this.instance.scroll.y&&"up"!==this.instance.direction&&(this.instance.direction="up")}},{key:"addSpeed",value:function(){window.pageYOffset!=this.instance.scroll.y?this.instance.speed=(window.pageYOffset-this.instance.scroll.y)/Math.max(1,Date.now()-this.speedTs):this.instance.speed=0}},{key:"resize",value:function(){Object.entries(this.els).length&&(this.windowHeight=window.innerHeight,this.updateElements())}},{key:"addElements",value:function(){var t=this;this.els={},this.el.querySelectorAll("[data-"+this.name+"]").forEach((function(e,n){e.getBoundingClientRect();var r,i,o,s=e.dataset[t.name+"Class"]||t.class,a="string"==typeof e.dataset[t.name+"Id"]?e.dataset[t.name+"Id"]:n,l="string"==typeof e.dataset[t.name+"Offset"]?e.dataset[t.name+"Offset"].split(","):t.offset,u=e.dataset[t.name+"Repeat"],c=e.dataset[t.name+"Call"],h=e.dataset[t.name+"Target"],d=(o=void 0!==h?document.querySelector("".concat(h)):e).getBoundingClientRect();r=d.top+t.instance.scroll.y,i=d.left+t.instance.scroll.x;var p=r+o.offsetHeight,f=i+o.offsetWidth;u="false"!=u&&(null!=u||t.repeat);var m=t.getRelativeOffset(l),g={el:e,targetEl:o,id:a,class:s,top:r+=m[0],bottom:p-=m[1],left:i,right:f,offset:l,progress:0,repeat:u,inView:!1,call:c};t.els[a]=g,e.classList.contains(s)&&t.setInView(t.els[a],a)}))}},{key:"updateElements",value:function(){var t=this;Object.entries(this.els).forEach((function(e){var n=m(e,2),r=n[0],i=n[1],o=i.targetEl.getBoundingClientRect().top+t.instance.scroll.y,s=o+i.targetEl.offsetHeight,a=t.getRelativeOffset(i.offset);t.els[r].top=o+a[0],t.els[r].bottom=s-a[1]})),this.hasScrollTicking=!1}},{key:"getRelativeOffset",value:function(t){var e=[0,0];if(t)for(var n=0;n<t.length;n++)"string"==typeof t[n]?t[n].includes("%")?e[n]=parseInt(t[n].replace("%","")*this.windowHeight/100):e[n]=parseInt(t[n]):e[n]=t[n];return e}},{key:"scrollTo",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=parseInt(e.offset)||0,r=!!e.callback&&e.callback;if("string"==typeof t){if("top"===t)t=this.html;else if("bottom"===t)t=this.html.offsetHeight-window.innerHeight;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");n="number"!=typeof t?t.getBoundingClientRect().top+n+this.instance.scroll.y:t+n;var i=function(){return parseInt(window.pageYOffset)===parseInt(n)};if(r){if(i())return void r();var o=function t(){i()&&(window.removeEventListener("scroll",t),r())};window.addEventListener("scroll",o)}window.scrollTo({top:n,behavior:0===e.duration?"auto":"smooth"})}},{key:"update",value:function(){this.addElements(),this.detectElements()}},{key:"destroy",value:function(){f(u(r.prototype),"destroy",this).call(this),window.removeEventListener("scroll",this.checkScroll,!1)}}]),r}(b)),S=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,M=Object.prototype.propertyIsEnumerable;function D(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}var C=function(){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={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,r,i=D(t),o=1;o<arguments.length;o++){for(var s in n=Object(arguments[o]))A.call(n,s)&&(i[s]=n[s]);if(S){r=S(n);for(var a=0;a<r.length;a++)M.call(n,r[a])&&(i[r[a]]=n[r[a]])}}return i};function R(){}R.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}};var O=R,P=w((function(t,e){(function(){(null!==e?e:this).Lethargy=function(){function t(t,e,n,r){this.stability=null!=t?Math.abs(t):8,this.sensitivity=null!=e?1+Math.abs(e):100,this.tolerance=null!=n?1+Math.abs(n):1.1,this.delay=null!=r?r:150,this.lastUpDeltas=function(){var t,e,n;for(n=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)n.push(null);return n}.call(this),this.lastDownDeltas=function(){var t,e,n;for(n=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)n.push(null);return n}.call(this),this.deltasTimestamp=function(){var t,e,n;for(n=[],t=1,e=2*this.stability;1<=e?t<=e:t>=e;1<=e?t++:t--)n.push(null);return n}.call(this)}return t.prototype.check=function(t){var e;return null!=(t=t.originalEvent||t).wheelDelta?e=t.wheelDelta:null!=t.deltaY?e=-40*t.deltaY:null==t.detail&&0!==t.detail||(e=-40*t.detail),this.deltasTimestamp.push(Date.now()),this.deltasTimestamp.shift(),e>0?(this.lastUpDeltas.push(e),this.lastUpDeltas.shift(),this.isInertia(1)):(this.lastDownDeltas.push(e),this.lastDownDeltas.shift(),this.isInertia(-1))},t.prototype.isInertia=function(t){var e,n,r,i,o,s,a;return null===(e=-1===t?this.lastDownDeltas:this.lastUpDeltas)[0]?t:!(this.deltasTimestamp[2*this.stability-2]+this.delay>Date.now()&&e[0]===e[2*this.stability-1])&&(r=e.slice(0,this.stability),n=e.slice(this.stability,2*this.stability),a=r.reduce((function(t,e){return t+e})),o=n.reduce((function(t,e){return t+e})),s=a/r.length,i=o/n.length,Math.abs(s)<Math.abs(i*this.tolerance)&&this.sensitivity<Math.abs(i)&&t)},t.prototype.showLastUpDeltas=function(){return this.lastUpDeltas},t.prototype.showLastDownDeltas=function(){return this.lastDownDeltas},t}()}).call(x)})),I={hasWheelEvent:"onwheel"in document,hasMouseWheelEvent:"onmousewheel"in document,hasTouch:"ontouchstart"in window||window.TouchEvent||window.DocumentTouch&&document instanceof DocumentTouch,hasTouchWin:navigator.msMaxTouchPoints&&navigator.msMaxTouchPoints>1,hasPointer:!!window.navigator.msPointerEnabled,hasKeyDown:"onkeydown"in document,isFirefox:navigator.userAgent.indexOf("Firefox")>-1},L=Object.prototype.toString,N=Object.prototype.hasOwnProperty;function F(t,e){return function(){return t.apply(e,arguments)}}var k=P.Lethargy,U="virtualscroll",B=X,G=37,z=38,H=39,j=40,V=32;function X(t){!function(t){if(!t)return console.warn("bindAll requires at least one argument.");var e=Array.prototype.slice.call(arguments,1);if(0===e.length)for(var n in t)N.call(t,n)&&"function"==typeof t[n]&&"[object Function]"==L.call(t[n])&&e.push(n);for(var r=0;r<e.length;r++){var i=e[r];t[i]=F(t[i],t)}}(this,"_onWheel","_onMouseWheel","_onTouchStart","_onTouchMove","_onKeyDown"),this.el=window,t&&t.el&&(this.el=t.el,delete t.el),this.options=C({mouseMultiplier:1,touchMultiplier:2,firefoxMultiplier:15,keyStep:120,preventTouch:!1,unpreventTouchClass:"vs-touchmove-allowed",limitInertia:!1,useKeyboard:!0,useTouch:!0},t),this.options.limitInertia&&(this._lethargy=new k),this._emitter=new O,this._event={y:0,x:0,deltaX:0,deltaY:0},this.touchStartX=null,this.touchStartY=null,this.bodyTouchAction=null,void 0!==this.options.passive&&(this.listenerOptions={passive:this.options.passive})}function W(t,e,n){return(1-n)*t+n*e}function Y(t){var e={};if(window.getComputedStyle){var n=getComputedStyle(t),r=n.transform||n.webkitTransform||n.mozTransform,i=r.match(/^matrix3d\((.+)\)$/);return i?(e.x=i?parseFloat(i[1].split(", ")[12]):0,e.y=i?parseFloat(i[1].split(", ")[13]):0):(i=r.match(/^matrix\((.+)\)$/),e.x=i?parseFloat(i[1].split(", ")[4]):0,e.y=i?parseFloat(i[1].split(", ")[5]):0),e}}function q(t){for(var e=[];t&&t!==document;t=t.parentNode)e.push(t);return e}X.prototype._notify=function(t){var e=this._event;e.x+=e.deltaX,e.y+=e.deltaY,this._emitter.emit(U,{x:e.x,y:e.y,deltaX:e.deltaX,deltaY:e.deltaY,originalEvent:t})},X.prototype._onWheel=function(t){var e=this.options;if(!this._lethargy||!1!==this._lethargy.check(t)){var n=this._event;n.deltaX=t.wheelDeltaX||-1*t.deltaX,n.deltaY=t.wheelDeltaY||-1*t.deltaY,I.isFirefox&&1==t.deltaMode&&(n.deltaX*=e.firefoxMultiplier,n.deltaY*=e.firefoxMultiplier),n.deltaX*=e.mouseMultiplier,n.deltaY*=e.mouseMultiplier,this._notify(t)}},X.prototype._onMouseWheel=function(t){if(!this.options.limitInertia||!1!==this._lethargy.check(t)){var e=this._event;e.deltaX=t.wheelDeltaX?t.wheelDeltaX:0,e.deltaY=t.wheelDeltaY?t.wheelDeltaY:t.wheelDelta,this._notify(t)}},X.prototype._onTouchStart=function(t){var e=t.targetTouches?t.targetTouches[0]:t;this.touchStartX=e.pageX,this.touchStartY=e.pageY},X.prototype._onTouchMove=function(t){var e=this.options;e.preventTouch&&!t.target.classList.contains(e.unpreventTouchClass)&&t.preventDefault();var n=this._event,r=t.targetTouches?t.targetTouches[0]:t;n.deltaX=(r.pageX-this.touchStartX)*e.touchMultiplier,n.deltaY=(r.pageY-this.touchStartY)*e.touchMultiplier,this.touchStartX=r.pageX,this.touchStartY=r.pageY,this._notify(t)},X.prototype._onKeyDown=function(t){var e=this._event;e.deltaX=e.deltaY=0;var n=window.innerHeight-40;switch(t.keyCode){case G:case z:e.deltaY=this.options.keyStep;break;case H:case j:e.deltaY=-this.options.keyStep;break;case t.shiftKey:e.deltaY=n;break;case V:e.deltaY=-n;break;default:return}this._notify(t)},X.prototype._bind=function(){I.hasWheelEvent&&this.el.addEventListener("wheel",this._onWheel,this.listenerOptions),I.hasMouseWheelEvent&&this.el.addEventListener("mousewheel",this._onMouseWheel,this.listenerOptions),I.hasTouch&&this.options.useTouch&&(this.el.addEventListener("touchstart",this._onTouchStart,this.listenerOptions),this.el.addEventListener("touchmove",this._onTouchMove,this.listenerOptions)),I.hasPointer&&I.hasTouchWin&&(this.bodyTouchAction=document.body.style.msTouchAction,document.body.style.msTouchAction="none",this.el.addEventListener("MSPointerDown",this._onTouchStart,!0),this.el.addEventListener("MSPointerMove",this._onTouchMove,!0)),I.hasKeyDown&&this.options.useKeyboard&&document.addEventListener("keydown",this._onKeyDown)},X.prototype._unbind=function(){I.hasWheelEvent&&this.el.removeEventListener("wheel",this._onWheel),I.hasMouseWheelEvent&&this.el.removeEventListener("mousewheel",this._onMouseWheel),I.hasTouch&&(this.el.removeEventListener("touchstart",this._onTouchStart),this.el.removeEventListener("touchmove",this._onTouchMove)),I.hasPointer&&I.hasTouchWin&&(document.body.style.msTouchAction=this.bodyTouchAction,this.el.removeEventListener("MSPointerDown",this._onTouchStart,!0),this.el.removeEventListener("MSPointerMove",this._onTouchMove,!0)),I.hasKeyDown&&this.options.useKeyboard&&document.removeEventListener("keydown",this._onKeyDown)},X.prototype.on=function(t,e){this._emitter.on(U,t,e);var n=this._emitter.e;n&&n[U]&&1===n[U].length&&this._bind()},X.prototype.off=function(t,e){this._emitter.off(U,t,e);var n=this._emitter.e;(!n[U]||n[U].length<=0)&&this._unbind()},X.prototype.reset=function(){var t=this._event;t.x=0,t.y=0},X.prototype.destroy=function(){this._emitter.off(),this._unbind()};var $="function"==typeof Float32Array;function K(t,e){return 1-3*e+3*t}function Z(t,e){return 3*e-6*t}function J(t){return 3*t}function Q(t,e,n){return((K(e,n)*t+Z(e,n))*t+J(e))*t}function tt(t,e,n){return 3*K(e,n)*t*t+2*Z(e,n)*t+J(e)}function et(t){return t}var nt=function(t,e,n,r){if(!(0<=t&&t<=1&&0<=n&&n<=1))throw new Error("bezier x values must be in [0, 1] range");if(t===e&&n===r)return et;for(var i=$?new Float32Array(11):new Array(11),o=0;o<11;++o)i[o]=Q(.1*o,t,n);function s(e){for(var r=0,o=1;10!==o&&i[o]<=e;++o)r+=.1;--o;var s=r+.1*((e-i[o])/(i[o+1]-i[o])),a=tt(s,t,n);return a>=.001?function(t,e,n,r){for(var i=0;i<4;++i){var o=tt(e,n,r);if(0===o)return e;e-=(Q(e,n,r)-t)/o}return e}(e,s,t,n):0===a?s:function(t,e,n,r,i){var o,s,a=0;do{(o=Q(s=e+(n-e)/2,r,i)-t)>0?n=s:e=s}while(Math.abs(o)>1e-7&&++a<10);return s}(e,r,r+.1,t,n)}return function(t){return 0===t?0:1===t?1:Q(s(t),e,r)}},rt=38,it=40,ot=32,st=9,at=33,lt=34,ut=36,ct=35,ht=function(t){l(r,t);var e=p(r);function r(){var t,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return n(this,r),history.scrollRestoration&&(history.scrollRestoration="manual"),window.scrollTo(0,0),(t=e.call(this,i)).inertia&&(t.lerp=.1*t.inertia),t.isScrolling=!1,t.isDraggingScrollbar=!1,t.isTicking=!1,t.hasScrollTicking=!1,t.parallaxElements={},t.stop=!1,t.scrollbarContainer=i.scrollbarContainer,t.checkKey=t.checkKey.bind(h(t)),window.addEventListener("keydown",t.checkKey,!1),t}return i(r,[{key:"init",value:function(){var t=this;this.html.classList.add(this.smoothClass),this.html.setAttribute("data-".concat(this.name,"-direction"),this.direction),this.instance=a({delta:{x:this.initPosition.x,y:this.initPosition.y},scroll:{x:this.initPosition.x,y:this.initPosition.y}},this.instance),this.vs=new B({el:this.scrollFromAnywhere?document:this.el,mouseMultiplier:navigator.platform.indexOf("Win")>-1?1:.4,firefoxMultiplier:this.firefoxMultiplier,touchMultiplier:this.touchMultiplier,useKeyboard:!1,passive:!0}),this.vs.on((function(e){t.stop||t.isDraggingScrollbar||requestAnimationFrame((function(){t.updateDelta(e),t.isScrolling||t.startScrolling()}))})),this.setScrollLimit(),this.initScrollBar(),this.addSections(),this.addElements(),this.checkScroll(!0),this.transformElements(!0,!0),f(u(r.prototype),"init",this).call(this)}},{key:"setScrollLimit",value:function(){if(this.instance.limit.y=this.el.offsetHeight-this.windowHeight,"horizontal"===this.direction){for(var t=0,e=this.el.children,n=0;n<e.length;n++)t+=e[n].offsetWidth;this.instance.limit.x=t-this.windowWidth}}},{key:"startScrolling",value:function(){this.startScrollTs=Date.now(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}},{key:"stopScrolling",value:function(){cancelAnimationFrame(this.checkScrollRaf),this.startScrollTs=void 0,this.scrollToRaf&&(cancelAnimationFrame(this.scrollToRaf),this.scrollToRaf=null),this.isScrolling=!1,this.instance.scroll.y=Math.round(this.instance.scroll.y),this.html.classList.remove(this.scrollingClass)}},{key:"checkKey",value:function(t){var e=this;if(this.stop)t.keyCode==st&&requestAnimationFrame((function(){e.html.scrollTop=0,document.body.scrollTop=0,e.html.scrollLeft=0,document.body.scrollLeft=0}));else{switch(t.keyCode){case st:requestAnimationFrame((function(){e.html.scrollTop=0,document.body.scrollTop=0,e.html.scrollLeft=0,document.body.scrollLeft=0,e.scrollTo(document.activeElement,{offset:-window.innerHeight/2})}));break;case rt:this.isActiveElementScrollSensitive()&&(this.instance.delta[this.directionAxis]-=240);break;case it:this.isActiveElementScrollSensitive()&&(this.instance.delta[this.directionAxis]+=240);break;case at:this.instance.delta[this.directionAxis]-=window.innerHeight;break;case lt:this.instance.delta[this.directionAxis]+=window.innerHeight;break;case ut:this.instance.delta[this.directionAxis]-=this.instance.limit[this.directionAxis];break;case ct:this.instance.delta[this.directionAxis]+=this.instance.limit[this.directionAxis];break;case ot:this.isActiveElementScrollSensitive()&&(t.shiftKey?this.instance.delta[this.directionAxis]-=window.innerHeight:this.instance.delta[this.directionAxis]+=window.innerHeight);break;default:return}this.instance.delta[this.directionAxis]<0&&(this.instance.delta[this.directionAxis]=0),this.instance.delta[this.directionAxis]>this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis]),this.stopScrolling(),this.isScrolling=!0,this.checkScroll(),this.html.classList.add(this.scrollingClass)}}},{key:"isActiveElementScrollSensitive",value:function(){return!(document.activeElement instanceof HTMLInputElement||document.activeElement instanceof HTMLTextAreaElement||document.activeElement instanceof HTMLButtonElement||document.activeElement instanceof HTMLSelectElement)}},{key:"checkScroll",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||this.isScrolling||this.isDraggingScrollbar){this.hasScrollTicking||(this.checkScrollRaf=requestAnimationFrame((function(){return t.checkScroll()})),this.hasScrollTicking=!0),this.updateScroll();var n=Math.abs(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis]),i=Date.now()-this.startScrollTs;if(!this.animatingScroll&&i>100&&(n<.5&&0!=this.instance.delta[this.directionAxis]||n<.5&&0==this.instance.delta[this.directionAxis])&&this.stopScrolling(),Object.entries(this.sections).forEach((function(n){var r=m(n,2),i=(r[0],r[1]);i.persistent||t.instance.scroll[t.directionAxis]>i.offset[t.directionAxis]&&t.instance.scroll[t.directionAxis]<i.limit[t.directionAxis]?("horizontal"===t.direction?t.transform(i.el,-t.instance.scroll[t.directionAxis],0):t.transform(i.el,0,-t.instance.scroll[t.directionAxis]),i.inView||(i.inView=!0,i.el.style.opacity=1,i.el.style.pointerEvents="all",i.el.setAttribute("data-".concat(t.name,"-section-inview"),""))):((i.inView||e)&&(i.inView=!1,i.el.style.opacity=0,i.el.style.pointerEvents="none",i.el.removeAttribute("data-".concat(t.name,"-section-inview"))),t.transform(i.el,0,0))})),this.getDirection&&this.addDirection(),this.getSpeed&&(this.addSpeed(),this.speedTs=Date.now()),this.detectElements(),this.transformElements(),this.hasScrollbar){var o=this.instance.scroll[this.directionAxis]/this.instance.limit[this.directionAxis]*this.scrollBarLimit[this.directionAxis];"horizontal"===this.direction?this.transform(this.scrollbarThumb,o,0):this.transform(this.scrollbarThumb,0,o)}f(u(r.prototype),"checkScroll",this).call(this),this.hasScrollTicking=!1}}},{key:"resize",value:function(){this.windowHeight=window.innerHeight,this.windowWidth=window.innerWidth,this.checkContext(),this.windowMiddle={x:this.windowWidth/2,y:this.windowHeight/2},this.update()}},{key:"updateDelta",value:function(t){var e,n=this[this.context]&&this[this.context].gestureDirection?this[this.context].gestureDirection:this.gestureDirection;e="both"===n?t.deltaX+t.deltaY:"vertical"===n?t.deltaY:"horizontal"===n?t.deltaX:t.deltaY,this.instance.delta[this.directionAxis]-=e*this.multiplier,this.instance.delta[this.directionAxis]<0&&(this.instance.delta[this.directionAxis]=0),this.instance.delta[this.directionAxis]>this.instance.limit[this.directionAxis]&&(this.instance.delta[this.directionAxis]=this.instance.limit[this.directionAxis])}},{key:"updateScroll",value:function(t){this.isScrolling||this.isDraggingScrollbar?this.instance.scroll[this.directionAxis]=W(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis],this.lerp):this.instance.scroll[this.directionAxis]>this.instance.limit[this.directionAxis]?this.setScroll(this.instance.scroll[this.directionAxis],this.instance.limit[this.directionAxis]):this.instance.scroll.y<0?this.setScroll(this.instance.scroll[this.directionAxis],0):this.setScroll(this.instance.scroll[this.directionAxis],this.instance.delta[this.directionAxis])}},{key:"addDirection",value:function(){this.instance.delta.y>this.instance.scroll.y?"down"!==this.instance.direction&&(this.instance.direction="down"):this.instance.delta.y<this.instance.scroll.y&&"up"!==this.instance.direction&&(this.instance.direction="up"),this.instance.delta.x>this.instance.scroll.x?"right"!==this.instance.direction&&(this.instance.direction="right"):this.instance.delta.x<this.instance.scroll.x&&"left"!==this.instance.direction&&(this.instance.direction="left")}},{key:"addSpeed",value:function(){this.instance.delta[this.directionAxis]!=this.instance.scroll[this.directionAxis]?this.instance.speed=(this.instance.delta[this.directionAxis]-this.instance.scroll[this.directionAxis])/Math.max(1,Date.now()-this.speedTs):this.instance.speed=0}},{key:"initScrollBar",value:function(){if(this.scrollbar=document.createElement("span"),this.scrollbarThumb=document.createElement("span"),this.scrollbar.classList.add("".concat(this.scrollbarClass)),this.scrollbarThumb.classList.add("".concat(this.scrollbarClass,"_thumb")),this.scrollbar.append(this.scrollbarThumb),this.scrollbarContainer?this.scrollbarContainer.append(this.scrollbar):document.body.append(this.scrollbar),this.getScrollBar=this.getScrollBar.bind(this),this.releaseScrollBar=this.releaseScrollBar.bind(this),this.moveScrollBar=this.moveScrollBar.bind(this),this.scrollbarThumb.addEventListener("mousedown",this.getScrollBar),window.addEventListener("mouseup",this.releaseScrollBar),window.addEventListener("mousemove",this.moveScrollBar),this.hasScrollbar=!1,"horizontal"==this.direction){if(this.instance.limit.x+this.windowWidth<=this.windowWidth)return}else if(this.instance.limit.y+this.windowHeight<=this.windowHeight)return;this.hasScrollbar=!0,this.scrollbarBCR=this.scrollbar.getBoundingClientRect(),this.scrollbarHeight=this.scrollbarBCR.height,this.scrollbarWidth=this.scrollbarBCR.width,"horizontal"===this.direction?this.scrollbarThumb.style.width="".concat(this.scrollbarWidth*this.scrollbarWidth/(this.instance.limit.x+this.scrollbarWidth),"px"):this.scrollbarThumb.style.height="".concat(this.scrollbarHeight*this.scrollbarHeight/(this.instance.limit.y+this.scrollbarHeight),"px"),this.scrollbarThumbBCR=this.scrollbarThumb.getBoundingClientRect(),this.scrollBarLimit={x:this.scrollbarWidth-this.scrollbarThumbBCR.width,y:this.scrollbarHeight-this.scrollbarThumbBCR.height}}},{key:"reinitScrollBar",value:function(){if(this.hasScrollbar=!1,"horizontal"==this.direction){if(this.instance.limit.x+this.windowWidth<=this.windowWidth)return}else if(this.instance.limit.y+this.windowHeight<=this.windowHeight)return;this.hasScrollbar=!0,this.scrollbarBCR=this.scrollbar.getBoundingClientRect(),this.scrollbarHeight=this.scrollbarBCR.height,this.scrollbarWidth=this.scrollbarBCR.width,"horizontal"===this.direction?this.scrollbarThumb.style.width="".concat(this.scrollbarWidth*this.scrollbarWidth/(this.instance.limit.x+this.scrollbarWidth),"px"):this.scrollbarThumb.style.height="".concat(this.scrollbarHeight*this.scrollbarHeight/(this.instance.limit.y+this.scrollbarHeight),"px"),this.scrollbarThumbBCR=this.scrollbarThumb.getBoundingClientRect(),this.scrollBarLimit={x:this.scrollbarWidth-this.scrollbarThumbBCR.width,y:this.scrollbarHeight-this.scrollbarThumbBCR.height}}},{key:"destroyScrollBar",value:function(){this.scrollbarThumb.removeEventListener("mousedown",this.getScrollBar),window.removeEventListener("mouseup",this.releaseScrollBar),window.removeEventListener("mousemove",this.moveScrollBar),this.scrollbar.remove()}},{key:"getScrollBar",value:function(t){this.isDraggingScrollbar=!0,this.checkScroll(),this.html.classList.remove(this.scrollingClass),this.html.classList.add(this.draggingClass)}},{key:"releaseScrollBar",value:function(t){this.isDraggingScrollbar=!1,this.isScrolling&&this.html.classList.add(this.scrollingClass),this.html.classList.remove(this.draggingClass)}},{key:"moveScrollBar",value:function(t){var e=this;this.isDraggingScrollbar&&requestAnimationFrame((function(){var n=100*(t.clientX-e.scrollbarBCR.left)/e.scrollbarWidth*e.instance.limit.x/100,r=100*(t.clientY-e.scrollbarBCR.top)/e.scrollbarHeight*e.instance.limit.y/100;r>0&&r<e.instance.limit.y&&(e.instance.delta.y=r),n>0&&n<e.instance.limit.x&&(e.instance.delta.x=n)}))}},{key:"addElements",value:function(){var t=this;this.els={},this.parallaxElements={},this.el.querySelectorAll("[data-".concat(this.name,"]")).forEach((function(e,n){var r,i,o,s=q(e),a=Object.entries(t.sections).map((function(t){var e=m(t,2);e[0];return e[1]})).find((function(t){return s.includes(t.el)})),l=e.dataset[t.name+"Class"]||t.class,u="string"==typeof e.dataset[t.name+"Id"]?e.dataset[t.name+"Id"]:"el"+n,c=e.dataset[t.name+"Repeat"],h=e.dataset[t.name+"Call"],d=e.dataset[t.name+"Position"],p=e.dataset[t.name+"Delay"],f=e.dataset[t.name+"Direction"],g="string"==typeof e.dataset[t.name+"Sticky"],v=!!e.dataset[t.name+"Speed"]&&parseFloat(e.dataset[t.name+"Speed"])/10,y="string"==typeof e.dataset[t.name+"Offset"]?e.dataset[t.name+"Offset"].split(","):t.offset,_=e.dataset[t.name+"Target"],b=(o=void 0!==_?document.querySelector("".concat(_)):e).getBoundingClientRect();null===a||a.inView?(r=b.top+t.instance.scroll.y-Y(o).y,i=b.left+t.instance.scroll.x-Y(o).x):(r=b.top-Y(a.el).y-Y(o).y,i=b.left-Y(a.el).x-Y(o).x);var x=r+o.offsetHeight,w=i+o.offsetWidth,E={x:(w-i)/2+i,y:(x-r)/2+r};if(g){var T=e.getBoundingClientRect(),S=T.top,A=T.left,M={x:A-i,y:S-r};r+=window.innerHeight,i+=window.innerWidth,x=S+o.offsetHeight-e.offsetHeight-M[t.directionAxis],E={x:((w=A+o.offsetWidth-e.offsetWidth-M[t.directionAxis])-i)/2+i,y:(x-r)/2+r}}c="false"!=c&&(null!=c||t.repeat);var D=[0,0];if(y)if("horizontal"===t.direction){for(var C=0;C<y.length;C++)"string"==typeof y[C]?y[C].includes("%")?D[C]=parseInt(y[C].replace("%","")*t.windowWidth/100):D[C]=parseInt(y[C]):D[C]=y[C];i+=D[0],w-=D[1]}else{for(C=0;C<y.length;C++)"string"==typeof y[C]?y[C].includes("%")?D[C]=parseInt(y[C].replace("%","")*t.windowHeight/100):D[C]=parseInt(y[C]):D[C]=y[C];r+=D[0],x-=D[1]}var R={el:e,id:u,class:l,section:a,top:r,middle:E,bottom:x,left:i,right:w,offset:y,progress:0,repeat:c,inView:!1,call:h,speed:v,delay:p,position:d,target:o,direction:f,sticky:g};t.els[u]=R,e.classList.contains(l)&&t.setInView(t.els[u],u),(!1!==v||g)&&(t.parallaxElements[u]=R)}))}},{key:"addSections",value:function(){var t=this;this.sections={};var e=this.el.querySelectorAll("[data-".concat(this.name,"-section]"));0===e.length&&(e=[this.el]),e.forEach((function(e,n){var r="string"==typeof e.dataset[t.name+"Id"]?e.dataset[t.name+"Id"]:"section"+n,i=e.getBoundingClientRect(),o={x:i.left-1.5*window.innerWidth-Y(e).x,y:i.top-1.5*window.innerHeight-Y(e).y},s={x:o.x+i.width+2*window.innerWidth,y:o.y+i.height+2*window.innerHeight},a="string"==typeof e.dataset[t.name+"Persistent"];e.setAttribute("data-scroll-section-id",r);var l={el:e,offset:o,limit:s,inView:!1,persistent:a,id:r};t.sections[r]=l}))}},{key:"transform",value:function(t,e,n,r){var i;if(r){var o=Y(t),s=W(o.x,e,r),a=W(o.y,n,r);i="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0,".concat(s,",").concat(a,",0,1)")}else i="matrix3d(1,0,0.00,0,0.00,1,0.00,0,0,0,1,0,".concat(e,",").concat(n,",0,1)");t.style.webkitTransform=i,t.style.msTransform=i,t.style.transform=i}},{key:"transformElements",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.instance.scroll.x+this.windowWidth,i=this.instance.scroll.y+this.windowHeight,o={x:this.instance.scroll.x+this.windowMiddle.x,y:this.instance.scroll.y+this.windowMiddle.y};Object.entries(this.parallaxElements).forEach((function(s){var a=m(s,2),l=(a[0],a[1]),u=!1;if(t&&(u=0),l.inView||n)switch(l.position){case"top":u=e.instance.scroll[e.directionAxis]*-l.speed;break;case"elementTop":u=(i-l.top)*-l.speed;break;case"bottom":u=(e.instance.limit[e.directionAxis]-i+e.windowHeight)*l.speed;break;case"left":u=e.instance.scroll[e.directionAxis]*-l.speed;break;case"elementLeft":u=(r-l.left)*-l.speed;break;case"right":u=(e.instance.limit[e.directionAxis]-r+e.windowHeight)*l.speed;break;default:u=(o[e.directionAxis]-l.middle[e.directionAxis])*-l.speed}l.sticky&&(u=l.inView?"horizontal"===e.direction?e.instance.scroll.x-l.left+window.innerWidth:e.instance.scroll.y-l.top+window.innerHeight:"horizontal"===e.direction?e.instance.scroll.x<l.left-window.innerWidth&&e.instance.scroll.x<l.left-window.innerWidth/2?0:e.instance.scroll.x>l.right&&e.instance.scroll.x>l.right+100&&l.right-l.left+window.innerWidth:e.instance.scroll.y<l.top-window.innerHeight&&e.instance.scroll.y<l.top-window.innerHeight/2?0:e.instance.scroll.y>l.bottom&&e.instance.scroll.y>l.bottom+100&&l.bottom-l.top+window.innerHeight),!1!==u&&("horizontal"===l.direction||"horizontal"===e.direction&&"vertical"!==l.direction?e.transform(l.el,u,0,!t&&l.delay):e.transform(l.el,0,u,!t&&l.delay))}))}},{key:"scrollTo",value:function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=parseInt(n.offset)||0,i=isNaN(parseInt(n.duration))?1e3:parseInt(n.duration),o=n.easing||[.25,0,.35,1],s=!!n.disableLerp,a=!!n.callback&&n.callback;if(o=nt.apply(void 0,g(o)),"string"==typeof t){if("top"===t)t=0;else if("bottom"===t)t=this.instance.limit.y;else if("left"===t)t=0;else if("right"===t)t=this.instance.limit.x;else if(!(t=document.querySelector(t)))return}else if("number"==typeof t)t=parseInt(t);else if(!t||!t.tagName)return void console.warn("`target` parameter is not valid");if("number"!=typeof t){var l=q(t).includes(this.el);if(!l)return;var u=t.getBoundingClientRect(),c=u.top,h=u.left,d=q(t),p=d.find((function(t){return Object.entries(e.sections).map((function(t){var e=m(t,2);e[0];return e[1]})).find((function(e){return e.el==t}))})),f=0;f=p?Y(p)[this.directionAxis]:-this.instance.scroll[this.directionAxis],r="horizontal"===this.direction?h+r-f:c+r-f}else r=t+r;var v=parseFloat(this.instance.delta[this.directionAxis]),y=Math.max(0,Math.min(r,this.instance.limit[this.directionAxis])),_=y-v,b=function(t){s?"horizontal"===e.direction?e.setScroll(v+_*t,e.instance.delta.y):e.setScroll(e.instance.delta.x,v+_*t):e.instance.delta[e.directionAxis]=v+_*t};this.animatingScroll=!0,this.stopScrolling(),this.startScrolling();var x=Date.now(),w=function t(){var n=(Date.now()-x)/i;n>1?(b(1),e.animatingScroll=!1,0==i&&e.update(),a&&a()):(e.scrollToRaf=requestAnimationFrame(t),b(o(n)))};w()}},{key:"update",value:function(){this.setScrollLimit(),this.addSections(),this.addElements(),this.detectElements(),this.updateScroll(),this.transformElements(!0),this.reinitScrollBar(),this.checkScroll(!0)}},{key:"startScroll",value:function(){this.stop=!1}},{key:"stopScroll",value:function(){this.stop=!0}},{key:"setScroll",value:function(t,e){this.instance=a(a({},this.instance),{},{scroll:{x:t,y:e},delta:{x:t,y:e},speed:0})}},{key:"destroy",value:function(){f(u(r.prototype),"destroy",this).call(this),this.stopScrolling(),this.html.classList.remove(this.smoothClass),this.vs.destroy(),this.destroyScrollBar(),window.removeEventListener("keydown",this.checkKey,!1)}}]),r}(b),dt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n(this,t),this.options=e,Object.assign(this,_,e),this.smartphone=_.smartphone,e.smartphone&&Object.assign(this.smartphone,e.smartphone),this.tablet=_.tablet,e.tablet&&Object.assign(this.tablet,e.tablet),this.smooth||"horizontal"!=this.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible"),this.tablet.smooth||"horizontal"!=this.tablet.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (tablet)"),this.smartphone.smooth||"horizontal"!=this.smartphone.direction||console.warn("🚨 `smooth:false` & `horizontal` direction are not yet compatible (smartphone)"),this.init()}return i(t,[{key:"init",value:function(){if(this.options.isMobile=/Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)||"MacIntel"===navigator.platform&&navigator.maxTouchPoints>1||window.innerWidth<this.tablet.breakpoint,this.options.isTablet=this.options.isMobile&&window.innerWidth>=this.tablet.breakpoint,this.smooth&&!this.options.isMobile||this.tablet.smooth&&this.options.isTablet||this.smartphone.smooth&&this.options.isMobile&&!this.options.isTablet?this.scroll=new ht(this.options):this.scroll=new T(this.options),this.scroll.init(),window.location.hash){var t=window.location.hash.slice(1,window.location.hash.length),e=document.getElementById(t);e&&this.scroll.scrollTo(e)}}},{key:"update",value:function(){this.scroll.update()}},{key:"start",value:function(){this.scroll.startScroll()}},{key:"stop",value:function(){this.scroll.stopScroll()}},{key:"scrollTo",value:function(t,e){this.scroll.scrollTo(t,e)}},{key:"setScroll",value:function(t,e){this.scroll.setScroll(t,e)}},{key:"on",value:function(t,e){this.scroll.setEvents(t,e)}},{key:"off",value:function(t,e){this.scroll.unsetEvents(t,e)}},{key:"destroy",value:function(){this.scroll.destroy()}}]),t}();e.a=dt}).call(this,n("yLpj"))},"+Nns":function(t,e,n){"use strict";e.a=function(t){return new this((function(e,n){if(!t||void 0===t.length)return n(new TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var i=r.length;function o(t,n){if(n&&("object"==typeof n||"function"==typeof n)){var s=n.then;if("function"==typeof s)return void s.call(n,(function(e){o(t,e)}),(function(n){r[t]={status:"rejected",reason:n},0==--i&&e(r)}))}r[t]={status:"fulfilled",value:n},0==--i&&e(r)}for(var s=0;s<r.length;s++)o(s,r[s])}))}},"/pFH":function(t,e,n){"use strict";e.a=function(t){var e=this.constructor;return this.then((function(n){return e.resolve(t()).then((function(){return n}))}),(function(n){return e.resolve(t()).then((function(){return e.reject(n)}))}))}},0:function(t,e,n){n("ng4s"),n("NlKh"),n("TG6t"),t.exports=n("6ufr")},"0Ake":function(t,e,n){"use strict";var r=n("AM7I"),i=n("eZIG"),o=n("ZLCw")(),s=n("Kqna"),a=r("%TypeError%"),l=r("%Math.floor%");t.exports=function(t,e){if("function"!=typeof t)throw new a("`fn` is not a function");if("number"!=typeof e||e<0||e>4294967295||l(e)!==e)throw new a("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,u=!0;if("length"in t&&s){var c=s(t,"length");c&&!c.configurable&&(r=!1),c&&!c.writable&&(u=!1)}return(r||u||!n)&&(o?i(t,"length",e,!0,!0):i(t,"length",e)),t}},"0jNN":function(t,e,n){"use strict";var r=n("sxOR"),i=Object.prototype.hasOwnProperty,o=Array.isArray,s=function(){for(var t=[],e=0;e<256;++e)t.push("%"+((e<16?"0":"")+e.toString(16)).toUpperCase());return t}(),a=function(t,e){for(var n=e&&e.plainObjects?Object.create(null):{},r=0;r<t.length;++r)void 0!==t[r]&&(n[r]=t[r]);return n};t.exports={arrayToObject:a,assign:function(t,e){return Object.keys(e).reduce((function(t,n){return t[n]=e[n],t}),t)},combine:function(t,e){return[].concat(t,e)},compact:function(t){for(var e=[{obj:{o:t},prop:"o"}],n=[],r=0;r<e.length;++r)for(var i=e[r],s=i.obj[i.prop],a=Object.keys(s),l=0;l<a.length;++l){var u=a[l],c=s[u];"object"==typeof c&&null!==c&&-1===n.indexOf(c)&&(e.push({obj:s,prop:u}),n.push(c))}return function(t){for(;t.length>1;){var e=t.pop(),n=e.obj[e.prop];if(o(n)){for(var r=[],i=0;i<n.length;++i)void 0!==n[i]&&r.push(n[i]);e.obj[e.prop]=r}}}(e),t},decode:function(t,e,n){var r=t.replace(/\+/g," ");if("iso-8859-1"===n)return r.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(r)}catch(t){return r}},encode:function(t,e,n,i,o){if(0===t.length)return t;var a=t;if("symbol"==typeof t?a=Symbol.prototype.toString.call(t):"string"!=typeof t&&(a=String(t)),"iso-8859-1"===n)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(t){return"%26%23"+parseInt(t.slice(2),16)+"%3B"}));for(var l="",u=0;u<a.length;++u){var c=a.charCodeAt(u);45===c||46===c||95===c||126===c||c>=48&&c<=57||c>=65&&c<=90||c>=97&&c<=122||o===r.RFC1738&&(40===c||41===c)?l+=a.charAt(u):c<128?l+=s[c]:c<2048?l+=s[192|c>>6]+s[128|63&c]:c<55296||c>=57344?l+=s[224|c>>12]+s[128|c>>6&63]+s[128|63&c]:(u+=1,c=65536+((1023&c)<<10|1023&a.charCodeAt(u)),l+=s[240|c>>18]+s[128|c>>12&63]+s[128|c>>6&63]+s[128|63&c])}return l},isBuffer:function(t){return!(!t||"object"!=typeof t)&&!!(t.constructor&&t.constructor.isBuffer&&t.constructor.isBuffer(t))},isRegExp:function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},maybeMap:function(t,e){if(o(t)){for(var n=[],r=0;r<t.length;r+=1)n.push(e(t[r]));return n}return e(t)},merge:function t(e,n,r){if(!n)return e;if("object"!=typeof n){if(o(e))e.push(n);else{if(!e||"object"!=typeof e)return[e,n];(r&&(r.plainObjects||r.allowPrototypes)||!i.call(Object.prototype,n))&&(e[n]=!0)}return e}if(!e||"object"!=typeof e)return[e].concat(n);var s=e;return o(e)&&!o(n)&&(s=a(e,r)),o(e)&&o(n)?(n.forEach((function(n,o){if(i.call(e,o)){var s=e[o];s&&"object"==typeof s&&n&&"object"==typeof n?e[o]=t(s,n,r):e.push(n)}else e[o]=n})),e):Object.keys(n).reduce((function(e,o){var s=n[o];return i.call(e,o)?e[o]=t(e[o],s,r):e[o]=s,e}),s)}}},1:function(t,e){},"6ufr":function(t,e){},"8oxB":function(t,e){var n,r,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function a(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(t){r=s}}();var l,u=[],c=!1,h=-1;function d(){c&&l&&(c=!1,l.length?u=l.concat(u):h=-1,u.length&&p())}function p(){if(!c){var t=a(d);c=!0;for(var e=u.length;e;){for(l=u,u=[];++h<e;)l&&l[h].run();h=-1,e=u.length}l=null,c=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function f(t,e){this.fun=t,this.array=e}function m(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new f(t,e)),1!==u.length||c||a(p)},f.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=m,i.addListener=m,i.once=m,i.off=m,i.removeListener=m,i.removeAllListeners=m,i.emit=m,i.prependListener=m,i.prependOnceListener=m,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var i,o=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},AM7I:function(t,e,n){"use strict";var r=SyntaxError,i=Function,o=TypeError,s=function(t){try{return i('"use strict"; return ('+t+").constructor;")()}catch(t){}},a=Object.getOwnPropertyDescriptor;if(a)try{a({},"")}catch(t){a=null}var l=function(){throw new o},u=a?function(){try{return l}catch(t){try{return a(arguments,"callee").get}catch(t){return l}}}():l,c=n("UVaH")(),h=n("CjYj")(),d=Object.getPrototypeOf||(h?function(t){return t.__proto__}:null),p={},f="undefined"!=typeof Uint8Array&&d?d(Uint8Array):void 0,m={"%AggregateError%":"undefined"==typeof AggregateError?void 0:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?void 0:ArrayBuffer,"%ArrayIteratorPrototype%":c&&d?d([][Symbol.iterator]()):void 0,"%AsyncFromSyncIteratorPrototype%":void 0,"%AsyncFunction%":p,"%AsyncGenerator%":p,"%AsyncGeneratorFunction%":p,"%AsyncIteratorPrototype%":p,"%Atomics%":"undefined"==typeof Atomics?void 0:Atomics,"%BigInt%":"undefined"==typeof BigInt?void 0:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?void 0:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?void 0:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?void 0:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?void 0:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?void 0:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?void 0:FinalizationRegistry,"%Function%":i,"%GeneratorFunction%":p,"%Int8Array%":"undefined"==typeof Int8Array?void 0:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?void 0:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?void 0:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":c&&d?d(d([][Symbol.iterator]())):void 0,"%JSON%":"object"==typeof JSON?JSON:void 0,"%Map%":"undefined"==typeof Map?void 0:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&c&&d?d((new Map)[Symbol.iterator]()):void 0,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?void 0:Promise,"%Proxy%":"undefined"==typeof Proxy?void 0:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?void 0:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?void 0:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&c&&d?d((new Set)[Symbol.iterator]()):void 0,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?void 0:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":c&&d?d(""[Symbol.iterator]()):void 0,"%Symbol%":c?Symbol:void 0,"%SyntaxError%":r,"%ThrowTypeError%":u,"%TypedArray%":f,"%TypeError%":o,"%Uint8Array%":"undefined"==typeof Uint8Array?void 0:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?void 0:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?void 0:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?void 0:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?void 0:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?void 0:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?void 0:WeakSet};if(d)try{null.error}catch(t){var g=d(d(t));m["%Error.prototype%"]=g}var v={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},y=n("D3zA"),_=n("lnE3"),b=y.call(Function.call,Array.prototype.concat),x=y.call(Function.apply,Array.prototype.splice),w=y.call(Function.call,String.prototype.replace),E=y.call(Function.call,String.prototype.slice),T=y.call(Function.call,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,A=/\\(\\)?/g,M=function(t){var e=E(t,0,1),n=E(t,-1);if("%"===e&&"%"!==n)throw new r("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==e)throw new r("invalid intrinsic syntax, expected opening `%`");var i=[];return w(t,S,(function(t,e,n,r){i[i.length]=n?w(r,A,"$1"):e||t})),i},D=function(t,e){var n,i=t;if(_(v,i)&&(i="%"+(n=v[i])[0]+"%"),_(m,i)){var a=m[i];if(a===p&&(a=function t(e){var n;if("%AsyncFunction%"===e)n=s("async function () {}");else if("%GeneratorFunction%"===e)n=s("function* () {}");else if("%AsyncGeneratorFunction%"===e)n=s("async function* () {}");else if("%AsyncGenerator%"===e){var r=t("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===e){var i=t("%AsyncGenerator%");i&&d&&(n=d(i.prototype))}return m[e]=n,n}(i)),void 0===a&&!e)throw new o("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:n,name:i,value:a}}throw new r("intrinsic "+t+" does not exist!")};t.exports=function(t,e){if("string"!=typeof t||0===t.length)throw new o("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof e)throw new o('"allowMissing" argument must be a boolean');if(null===T(/^%?[^%]*%?$/,t))throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=M(t),i=n.length>0?n[0]:"",s=D("%"+i+"%",e),l=s.name,u=s.value,c=!1,h=s.alias;h&&(i=h[0],x(n,b([0,1],h)));for(var d=1,p=!0;d<n.length;d+=1){var f=n[d],g=E(f,0,1),v=E(f,-1);if(('"'===g||"'"===g||"`"===g||'"'===v||"'"===v||"`"===v)&&g!==v)throw new r("property names with quotes must have matching quotes");if("constructor"!==f&&p||(c=!0),_(m,l="%"+(i+="."+f)+"%"))u=m[l];else if(null!=u){if(!(f in u)){if(!e)throw new o("base intrinsic for "+t+" exists, but the property is not available.");return}if(a&&d+1>=n.length){var y=a(u,f);u=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:u[f]}else p=_(u,f),u=u[f];p&&!c&&(m[l]=u)}}return u}},AxL3:function(t,e){var n=!("undefined"==typeof window||!window.document||!window.document.createElement);t.exports=n},"B/eG":function(t,e,n){"use strict";(function(t){var r=n("/pFH"),i=n("+Nns"),o=n("oh6g"),s=setTimeout;function a(t){return Boolean(t&&void 0!==t.length)}function l(){}function u(t){if(!(this instanceof u))throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],m(t,this)}function c(t,e){for(;3===t._state;)t=t._value;0!==t._state?(t._handled=!0,u._immediateFn((function(){var n=1===t._state?e.onFulfilled:e.onRejected;if(null!==n){var r;try{r=n(t._value)}catch(t){return void d(e.promise,t)}h(e.promise,r)}else(1===t._state?h:d)(e.promise,t._value)}))):t._deferreds.push(e)}function h(t,e){try{if(e===t)throw new TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof u)return t._state=3,t._value=e,void p(t);if("function"==typeof n)return void m((r=n,i=e,function(){r.apply(i,arguments)}),t)}t._state=1,t._value=e,p(t)}catch(e){d(t,e)}var r,i}function d(t,e){t._state=2,t._value=e,p(t)}function p(t){2===t._state&&0===t._deferreds.length&&u._immediateFn((function(){t._handled||u._unhandledRejectionFn(t._value)}));for(var e=0,n=t._deferreds.length;e<n;e++)c(t,t._deferreds[e]);t._deferreds=null}function f(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function m(t,e){var n=!1;try{t((function(t){n||(n=!0,h(e,t))}),(function(t){n||(n=!0,d(e,t))}))}catch(t){if(n)return;n=!0,d(e,t)}}u.prototype.catch=function(t){return this.then(null,t)},u.prototype.then=function(t,e){var n=new this.constructor(l);return c(this,new f(t,e,n)),n},u.prototype.finally=r.a,u.all=function(t){return new u((function(e,n){if(!a(t))return n(new TypeError("Promise.all accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return e([]);var i=r.length;function o(t,s){try{if(s&&("object"==typeof s||"function"==typeof s)){var a=s.then;if("function"==typeof a)return void a.call(s,(function(e){o(t,e)}),n)}r[t]=s,0==--i&&e(r)}catch(t){n(t)}}for(var s=0;s<r.length;s++)o(s,r[s])}))},u.any=o.a,u.allSettled=i.a,u.resolve=function(t){return t&&"object"==typeof t&&t.constructor===u?t:new u((function(e){e(t)}))},u.reject=function(t){return new u((function(e,n){n(t)}))},u.race=function(t){return new u((function(e,n){if(!a(t))return n(new TypeError("Promise.race accepts an array"));for(var r=0,i=t.length;r<i;r++)u.resolve(t[r]).then(e,n)}))},u._immediateFn="function"==typeof t&&function(e){t(e)}||function(t){s(t,0)},u._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},e.a=u}).call(this,n("URgk").setImmediate)},CjYj:function(t,e,n){"use strict";var r={foo:{}},i=Object;t.exports=function(){return{__proto__:r}.foo===r.foo&&!({__proto__:null}instanceof i)}},CxY0:function(t,e,n){"use strict";var r=n("GYWy");function i(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}var o=/^([a-z0-9.+-]+:)/i,s=/:[0-9]*$/,a=/^(\/\/?(?!\/)[^?\s]*)(\?[^\s]*)?$/,l=["{","}","|","\\","^","`"].concat(["<",">",'"',"`"," ","\r","\n","\t"]),u=["'"].concat(l),c=["%","/","?",";","#"].concat(u),h=["/","?","#"],d=/^[+a-z0-9A-Z_-]{0,63}$/,p=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,f={javascript:!0,"javascript:":!0},m={javascript:!0,"javascript:":!0},g={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},v=n("Qyje");function y(t,e,n){if(t&&"object"==typeof t&&t instanceof i)return t;var r=new i;return r.parse(t,e,n),r}i.prototype.parse=function(t,e,n){if("string"!=typeof t)throw new TypeError("Parameter 'url' must be a string, not "+typeof t);var i=t.indexOf("?"),s=-1!==i&&i<t.indexOf("#")?"?":"#",l=t.split(s);l[0]=l[0].replace(/\\/g,"/");var y=t=l.join(s);if(y=y.trim(),!n&&1===t.split("#").length){var _=a.exec(y);if(_)return this.path=y,this.href=y,this.pathname=_[1],_[2]?(this.search=_[2],this.query=e?v.parse(this.search.substr(1)):this.search.substr(1)):e&&(this.search="",this.query={}),this}var b=o.exec(y);if(b){var x=(b=b[0]).toLowerCase();this.protocol=x,y=y.substr(b.length)}if(n||b||y.match(/^\/\/[^@/]+@[^@/]+/)){var w="//"===y.substr(0,2);!w||b&&m[b]||(y=y.substr(2),this.slashes=!0)}if(!m[b]&&(w||b&&!g[b])){for(var E,T,S=-1,A=0;A<h.length;A++){-1!==(M=y.indexOf(h[A]))&&(-1===S||M<S)&&(S=M)}-1!==(T=-1===S?y.lastIndexOf("@"):y.lastIndexOf("@",S))&&(E=y.slice(0,T),y=y.slice(T+1),this.auth=decodeURIComponent(E)),S=-1;for(A=0;A<c.length;A++){var M;-1!==(M=y.indexOf(c[A]))&&(-1===S||M<S)&&(S=M)}-1===S&&(S=y.length),this.host=y.slice(0,S),y=y.slice(S),this.parseHost(),this.hostname=this.hostname||"";var D="["===this.hostname[0]&&"]"===this.hostname[this.hostname.length-1];if(!D)for(var C=this.hostname.split(/\./),R=(A=0,C.length);A<R;A++){var O=C[A];if(O&&!O.match(d)){for(var P="",I=0,L=O.length;I<L;I++)O.charCodeAt(I)>127?P+="x":P+=O[I];if(!P.match(d)){var N=C.slice(0,A),F=C.slice(A+1),k=O.match(p);k&&(N.push(k[1]),F.unshift(k[2])),F.length&&(y="/"+F.join(".")+y),this.hostname=N.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),D||(this.hostname=r.toASCII(this.hostname));var U=this.port?":"+this.port:"",B=this.hostname||"";this.host=B+U,this.href+=this.host,D&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),"/"!==y[0]&&(y="/"+y))}if(!f[x])for(A=0,R=u.length;A<R;A++){var G=u[A];if(-1!==y.indexOf(G)){var z=encodeURIComponent(G);z===G&&(z=escape(G)),y=y.split(G).join(z)}}var H=y.indexOf("#");-1!==H&&(this.hash=y.substr(H),y=y.slice(0,H));var j=y.indexOf("?");if(-1!==j?(this.search=y.substr(j),this.query=y.substr(j+1),e&&(this.query=v.parse(this.query)),y=y.slice(0,j)):e&&(this.search="",this.query={}),y&&(this.pathname=y),g[x]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){U=this.pathname||"";var V=this.search||"";this.path=U+V}return this.href=this.format(),this},i.prototype.format=function(){var t=this.auth||"";t&&(t=(t=encodeURIComponent(t)).replace(/%3A/i,":"),t+="@");var e=this.protocol||"",n=this.pathname||"",r=this.hash||"",i=!1,o="";this.host?i=t+this.host:this.hostname&&(i=t+(-1===this.hostname.indexOf(":")?this.hostname:"["+this.hostname+"]"),this.port&&(i+=":"+this.port)),this.query&&"object"==typeof this.query&&Object.keys(this.query).length&&(o=v.stringify(this.query,{arrayFormat:"repeat",addQueryPrefix:!1}));var s=this.search||o&&"?"+o||"";return e&&":"!==e.substr(-1)&&(e+=":"),this.slashes||(!e||g[e])&&!1!==i?(i="//"+(i||""),n&&"/"!==n.charAt(0)&&(n="/"+n)):i||(i=""),r&&"#"!==r.charAt(0)&&(r="#"+r),s&&"?"!==s.charAt(0)&&(s="?"+s),e+i+(n=n.replace(/[?#]/g,(function(t){return encodeURIComponent(t)})))+(s=s.replace("#","%23"))+r},i.prototype.resolve=function(t){return this.resolveObject(y(t,!1,!0)).format()},i.prototype.resolveObject=function(t){if("string"==typeof t){var e=new i;e.parse(t,!1,!0),t=e}for(var n=new i,r=Object.keys(this),o=0;o<r.length;o++){var s=r[o];n[s]=this[s]}if(n.hash=t.hash,""===t.href)return n.href=n.format(),n;if(t.slashes&&!t.protocol){for(var a=Object.keys(t),l=0;l<a.length;l++){var u=a[l];"protocol"!==u&&(n[u]=t[u])}return g[n.protocol]&&n.hostname&&!n.pathname&&(n.pathname="/",n.path=n.pathname),n.href=n.format(),n}if(t.protocol&&t.protocol!==n.protocol){if(!g[t.protocol]){for(var c=Object.keys(t),h=0;h<c.length;h++){var d=c[h];n[d]=t[d]}return n.href=n.format(),n}if(n.protocol=t.protocol,t.host||m[t.protocol])n.pathname=t.pathname;else{for(var p=(t.pathname||"").split("/");p.length&&!(t.host=p.shift()););t.host||(t.host=""),t.hostname||(t.hostname=""),""!==p[0]&&p.unshift(""),p.length<2&&p.unshift(""),n.pathname=p.join("/")}if(n.search=t.search,n.query=t.query,n.host=t.host||"",n.auth=t.auth,n.hostname=t.hostname||t.host,n.port=t.port,n.pathname||n.search){var f=n.pathname||"",v=n.search||"";n.path=f+v}return n.slashes=n.slashes||t.slashes,n.href=n.format(),n}var y=n.pathname&&"/"===n.pathname.charAt(0),_=t.host||t.pathname&&"/"===t.pathname.charAt(0),b=_||y||n.host&&t.pathname,x=b,w=n.pathname&&n.pathname.split("/")||[],E=(p=t.pathname&&t.pathname.split("/")||[],n.protocol&&!g[n.protocol]);if(E&&(n.hostname="",n.port=null,n.host&&(""===w[0]?w[0]=n.host:w.unshift(n.host)),n.host="",t.protocol&&(t.hostname=null,t.port=null,t.host&&(""===p[0]?p[0]=t.host:p.unshift(t.host)),t.host=null),b=b&&(""===p[0]||""===w[0])),_)n.host=t.host||""===t.host?t.host:n.host,n.hostname=t.hostname||""===t.hostname?t.hostname:n.hostname,n.search=t.search,n.query=t.query,w=p;else if(p.length)w||(w=[]),w.pop(),w=w.concat(p),n.search=t.search,n.query=t.query;else if(null!=t.search){if(E)n.host=w.shift(),n.hostname=n.host,(D=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=D.shift(),n.hostname=D.shift(),n.host=n.hostname);return n.search=t.search,n.query=t.query,null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.href=n.format(),n}if(!w.length)return n.pathname=null,n.search?n.path="/"+n.search:n.path=null,n.href=n.format(),n;for(var T=w.slice(-1)[0],S=(n.host||t.host||w.length>1)&&("."===T||".."===T)||""===T,A=0,M=w.length;M>=0;M--)"."===(T=w[M])?w.splice(M,1):".."===T?(w.splice(M,1),A++):A&&(w.splice(M,1),A--);if(!b&&!x)for(;A--;A)w.unshift("..");!b||""===w[0]||w[0]&&"/"===w[0].charAt(0)||w.unshift(""),S&&"/"!==w.join("/").substr(-1)&&w.push("");var D,C=""===w[0]||w[0]&&"/"===w[0].charAt(0);E&&(n.hostname=C?"":w.length?w.shift():"",n.host=n.hostname,(D=!!(n.host&&n.host.indexOf("@")>0)&&n.host.split("@"))&&(n.auth=D.shift(),n.hostname=D.shift(),n.host=n.hostname));return(b=b||n.host&&w.length)&&!C&&w.unshift(""),w.length>0?n.pathname=w.join("/"):(n.pathname=null,n.path=null),null===n.pathname&&null===n.search||(n.path=(n.pathname?n.pathname:"")+(n.search?n.search:"")),n.auth=t.auth||n.auth,n.slashes=n.slashes||t.slashes,n.href=n.format(),n},i.prototype.parseHost=function(){var t=this.host,e=s.exec(t);e&&(":"!==(e=e[0])&&(this.port=e.substr(1)),t=t.substr(0,t.length-e.length)),t&&(this.hostname=t)},e.parse=y,e.resolve=function(t,e){return y(t,!1,!0).resolve(e)},e.resolveObject=function(t,e){return t?y(t,!1,!0).resolveObject(e):e},e.format=function(t){return"string"==typeof t&&(t=y(t)),t instanceof i?t.format():i.prototype.format.call(t)},e.Url=i},D3zA:function(t,e,n){"use strict";var r=n("aI7X");t.exports=Function.prototype.bind||r},EVdn:function(t,e,n){var r;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(n,i){"use strict";var o=[],s=Object.getPrototypeOf,a=o.slice,l=o.flat?function(t){return o.flat.call(t)}:function(t){return o.concat.apply([],t)},u=o.push,c=o.indexOf,h={},d=h.toString,p=h.hasOwnProperty,f=p.toString,m=f.call(Object),g={},v=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},y=function(t){return null!=t&&t===t.window},_=n.document,b={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i,o=(n=n||_).createElement("script");if(o.text=t,e)for(r in b)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?h[d.call(t)]||"object":typeof t}var E=/HTML$/i,T=function(t,e){return new T.fn.init(t,e)};function S(t){var e=!!t&&"length"in t&&t.length,n=w(t);return!v(t)&&!y(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function A(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}T.fn=T.prototype={jquery:"3.7.1",constructor:T,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=T.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return T.each(this,t)},map:function(t){return this.pushStack(T.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(T.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(T.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:o.sort,splice:o.splice},T.extend=T.fn.extend=function(){var t,e,n,r,i,o,s=arguments[0]||{},a=1,l=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||v(s)||(s={}),a===l&&(s=this,a--);a<l;a++)if(null!=(t=arguments[a]))for(e in t)r=t[e],"__proto__"!==e&&s!==r&&(u&&r&&(T.isPlainObject(r)||(i=Array.isArray(r)))?(n=s[e],o=i&&!Array.isArray(n)?[]:i||T.isPlainObject(n)?n:{},i=!1,s[e]=T.extend(u,o,r)):void 0!==r&&(s[e]=r));return s},T.extend({expando:"jQuery"+("3.7.1"+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==d.call(t))&&(!(e=s(t))||"function"==typeof(n=p.call(e,"constructor")&&e.constructor)&&f.call(n)===m)},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(S(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},text:function(t){var e,n="",r=0,i=t.nodeType;if(!i)for(;e=t[r++];)n+=T.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(S(Object(t))?T.merge(n,"string"==typeof t?[t]:t):u.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:c.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!E.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,o=t.length,s=!n;i<o;i++)!e(t[i],i)!==s&&r.push(t[i]);return r},map:function(t,e,n){var r,i,o=0,s=[];if(S(t))for(r=t.length;o<r;o++)null!=(i=e(t[o],o,n))&&s.push(i);else for(o in t)null!=(i=e(t[o],o,n))&&s.push(i);return l(s)},guid:1,support:g}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=o[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){h["[object "+e+"]"]=e.toLowerCase()}));var M=o.pop,D=o.sort,C=o.splice,R="[\\x20\\t\\r\\n\\f]",O=new RegExp("^"+R+"+|((?:^|[^\\\\])(?:\\\\.)*)"+R+"+$","g");T.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var P=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function I(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}T.escapeSelector=function(t){return(t+"").replace(P,I)};var L=_,N=u;!function(){var t,e,r,i,s,l,u,h,d,f,m=N,v=T.expando,y=0,_=0,b=tt(),x=tt(),w=tt(),E=tt(),S=function(t,e){return t===e&&(s=!0),0},P="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",I="(?:\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",F="\\["+R+"*("+I+")(?:"+R+"*([*^$|!~]?=)"+R+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+R+"*\\]",k=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+F+")*)|.*)\\)|)",U=new RegExp(R+"+","g"),B=new RegExp("^"+R+"*,"+R+"*"),G=new RegExp("^"+R+"*([>+~]|"+R+")"+R+"*"),z=new RegExp(R+"|>"),H=new RegExp(k),j=new RegExp("^"+I+"$"),V={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+k),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+R+"*(even|odd|(([+-]|)(\\d*)n|)"+R+"*(?:([+-]|)"+R+"*(\\d+)|))"+R+"*\\)|)","i"),bool:new RegExp("^(?:"+P+")$","i"),needsContext:new RegExp("^"+R+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+R+"*((?:-\\d)?\\d*)"+R+"*\\)|)(?=[^-]|$)","i")},X=/^(?:input|select|textarea|button)$/i,W=/^h\d$/i,Y=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,q=/[+~]/,$=new RegExp("\\\\[\\da-fA-F]{1,6}"+R+"?|\\\\([^\\r\\n\\f])","g"),K=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Z=function(){lt()},J=dt((function(t){return!0===t.disabled&&A(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(o=a.call(L.childNodes),L.childNodes),o[L.childNodes.length].nodeType}catch(t){m={apply:function(t,e){N.apply(t,a.call(e))},call:function(t){N.apply(t,a.call(arguments,1))}}}function Q(t,e,n,r){var i,o,s,a,u,c,p,f=e&&e.ownerDocument,y=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==y&&9!==y&&11!==y)return n;if(!r&&(lt(e),e=e||l,h)){if(11!==y&&(u=Y.exec(t)))if(i=u[1]){if(9===y){if(!(s=e.getElementById(i)))return n;if(s.id===i)return m.call(n,s),n}else if(f&&(s=f.getElementById(i))&&Q.contains(e,s)&&s.id===i)return m.call(n,s),n}else{if(u[2])return m.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(i)),n}if(!(E[t+" "]||d&&d.test(t))){if(p=t,f=e,1===y&&(z.test(t)||G.test(t))){for((f=q.test(t)&&at(e.parentNode)||e)==e&&g.scope||((a=e.getAttribute("id"))?a=T.escapeSelector(a):e.setAttribute("id",a=v)),o=(c=ct(t)).length;o--;)c[o]=(a?"#"+a:":scope")+" "+ht(c[o]);p=c.join(",")}try{return m.apply(n,f.querySelectorAll(p)),n}catch(e){E(t,!0)}finally{a===v&&e.removeAttribute("id")}}}return yt(t.replace(O,"$1"),e,n,r)}function tt(){var t=[];return function n(r,i){return t.push(r+" ")>e.cacheLength&&delete n[t.shift()],n[r+" "]=i}}function et(t){return t[v]=!0,t}function nt(t){var e=l.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function rt(t){return function(e){return A(e,"input")&&e.type===t}}function it(t){return function(e){return(A(e,"input")||A(e,"button"))&&e.type===t}}function ot(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&J(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function st(t){return et((function(e){return e=+e,et((function(n,r){for(var i,o=t([],n.length,e),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function lt(t){var n,r=t?t.ownerDocument||t:L;return r!=l&&9===r.nodeType&&r.documentElement?(u=(l=r).documentElement,h=!T.isXMLDoc(l),f=u.matches||u.webkitMatchesSelector||u.msMatchesSelector,u.msMatchesSelector&&L!=l&&(n=l.defaultView)&&n.top!==n&&n.addEventListener("unload",Z),g.getById=nt((function(t){return u.appendChild(t).id=T.expando,!l.getElementsByName||!l.getElementsByName(T.expando).length})),g.disconnectedMatch=nt((function(t){return f.call(t,"*")})),g.scope=nt((function(){return l.querySelectorAll(":scope")})),g.cssHas=nt((function(){try{return l.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),g.getById?(e.filter.ID=function(t){var e=t.replace($,K);return function(t){return t.getAttribute("id")===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&h){var n=e.getElementById(t);return n?[n]:[]}}):(e.filter.ID=function(t){var e=t.replace($,K);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&h){var n,r,i,o=e.getElementById(t);if(o){if((n=o.getAttributeNode("id"))&&n.value===t)return[o];for(i=e.getElementsByName(t),r=0;o=i[r++];)if((n=o.getAttributeNode("id"))&&n.value===t)return[o]}return[]}}),e.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},e.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&h)return e.getElementsByClassName(t)},d=[],nt((function(t){var e;u.appendChild(t).innerHTML="<a id='"+v+"' href='' disabled='disabled'></a><select id='"+v+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||d.push("\\["+R+"*(?:value|"+P+")"),t.querySelectorAll("[id~="+v+"-]").length||d.push("~="),t.querySelectorAll("a#"+v+"+*").length||d.push(".#.+[+~]"),t.querySelectorAll(":checked").length||d.push(":checked"),(e=l.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),u.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(e=l.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||d.push("\\["+R+"*name"+R+"*="+R+"*(?:''|\"\")")})),g.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),S=function(t,e){if(t===e)return s=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!g.sortDetached&&e.compareDocumentPosition(t)===n?t===l||t.ownerDocument==L&&Q.contains(L,t)?-1:e===l||e.ownerDocument==L&&Q.contains(L,e)?1:i?c.call(i,t)-c.call(i,e):0:4&n?-1:1)},l):l}for(t in Q.matches=function(t,e){return Q(t,null,null,e)},Q.matchesSelector=function(t,e){if(lt(t),h&&!E[e+" "]&&(!d||!d.test(e)))try{var n=f.call(t,e);if(n||g.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){E(e,!0)}return Q(e,l,null,[t]).length>0},Q.contains=function(t,e){return(t.ownerDocument||t)!=l&&lt(t),T.contains(t,e)},Q.attr=function(t,n){(t.ownerDocument||t)!=l&&lt(t);var r=e.attrHandle[n.toLowerCase()],i=r&&p.call(e.attrHandle,n.toLowerCase())?r(t,n,!h):void 0;return void 0!==i?i:t.getAttribute(n)},Q.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},T.uniqueSort=function(t){var e,n=[],r=0,o=0;if(s=!g.sortStable,i=!g.sortStable&&a.call(t,0),D.call(t,S),s){for(;e=t[o++];)e===t[o]&&(r=n.push(o));for(;r--;)C.call(t,n[r],1)}return i=null,t},T.fn.uniqueSort=function(){return this.pushStack(T.uniqueSort(a.apply(this)))},(e=T.expr={cacheLength:50,createPseudo:et,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace($,K),t[3]=(t[3]||t[4]||t[5]||"").replace($,K),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Q.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Q.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return V.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&H.test(n)&&(e=ct(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace($,K).toLowerCase();return"*"===t?function(){return!0}:function(t){return A(t,e)}},CLASS:function(t){var e=b[t+" "];return e||(e=new RegExp("(^|"+R+")"+t+"("+R+"|$)"))&&b(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=Q.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(U," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,l){var u,c,h,d,p,f=o!==s?"nextSibling":"previousSibling",m=e.parentNode,g=a&&e.nodeName.toLowerCase(),_=!l&&!a,b=!1;if(m){if(o){for(;f;){for(h=e;h=h[f];)if(a?A(h,g):1===h.nodeType)return!1;p=f="only"===t&&!p&&"nextSibling"}return!0}if(p=[s?m.firstChild:m.lastChild],s&&_){for(b=(d=(u=(c=m[v]||(m[v]={}))[t]||[])[0]===y&&u[1])&&u[2],h=d&&m.childNodes[d];h=++d&&h&&h[f]||(b=d=0)||p.pop();)if(1===h.nodeType&&++b&&h===e){c[t]=[y,d,b];break}}else if(_&&(b=d=(u=(c=e[v]||(e[v]={}))[t]||[])[0]===y&&u[1]),!1===b)for(;(h=++d&&h&&h[f]||(b=d=0)||p.pop())&&(!(a?A(h,g):1===h.nodeType)||!++b||(_&&((c=h[v]||(h[v]={}))[t]=[y,b]),h!==e)););return(b-=i)===r||b%r==0&&b/r>=0}}},PSEUDO:function(t,n){var r,i=e.pseudos[t]||e.setFilters[t.toLowerCase()]||Q.error("unsupported pseudo: "+t);return i[v]?i(n):i.length>1?(r=[t,t,"",n],e.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,e){for(var r,o=i(t,n),s=o.length;s--;)t[r=c.call(t,o[s])]=!(e[r]=o[s])})):function(t){return i(t,0,r)}):i}},pseudos:{not:et((function(t){var e=[],n=[],r=vt(t.replace(O,"$1"));return r[v]?et((function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))})):function(t,i,o){return e[0]=t,r(e,null,o,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Q(t,e).length>0}})),contains:et((function(t){return t=t.replace($,K),function(e){return(e.textContent||T.text(e)).indexOf(t)>-1}})),lang:et((function(t){return j.test(t||"")||Q.error("unsupported lang: "+t),t=t.replace($,K).toLowerCase(),function(e){var n;do{if(n=h?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=n.location&&n.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===u},focus:function(t){return t===function(){try{return l.activeElement}catch(t){}}()&&l.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:ot(!1),disabled:ot(!0),checked:function(t){return A(t,"input")&&!!t.checked||A(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!e.pseudos.empty(t)},header:function(t){return W.test(t.nodeName)},input:function(t){return X.test(t.nodeName)},button:function(t){return A(t,"input")&&"button"===t.type||A(t,"button")},text:function(t){var e;return A(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:st((function(){return[0]})),last:st((function(t,e){return[e-1]})),eq:st((function(t,e,n){return[n<0?n+e:n]})),even:st((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:st((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:st((function(t,e,n){var r;for(r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:st((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}}).pseudos.nth=e.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})e.pseudos[t]=rt(t);for(t in{submit:!0,reset:!0})e.pseudos[t]=it(t);function ut(){}function ct(t,n){var r,i,o,s,a,l,u,c=x[t+" "];if(c)return n?0:c.slice(0);for(a=t,l=[],u=e.preFilter;a;){for(s in r&&!(i=B.exec(a))||(i&&(a=a.slice(i[0].length)||a),l.push(o=[])),r=!1,(i=G.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(O," ")}),a=a.slice(r.length)),e.filter)!(i=V[s].exec(a))||u[s]&&!(i=u[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?Q.error(t):x(t,l).slice(0)}function ht(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function dt(t,e,n){var r=e.dir,i=e.next,o=i||r,s=n&&"parentNode"===o,a=_++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||s)return t(e,n,i);return!1}:function(e,n,l){var u,c,h=[y,a];if(l){for(;e=e[r];)if((1===e.nodeType||s)&&t(e,n,l))return!0}else for(;e=e[r];)if(1===e.nodeType||s)if(c=e[v]||(e[v]={}),i&&A(e,i))e=e[r]||e;else{if((u=c[o])&&u[0]===y&&u[1]===a)return h[2]=u[2];if(c[o]=h,h[2]=t(e,n,l))return!0}return!1}}function pt(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function ft(t,e,n,r,i){for(var o,s=[],a=0,l=t.length,u=null!=e;a<l;a++)(o=t[a])&&(n&&!n(o,r,i)||(s.push(o),u&&e.push(a)));return s}function mt(t,e,n,r,i,o){return r&&!r[v]&&(r=mt(r)),i&&!i[v]&&(i=mt(i,o)),et((function(o,s,a,l){var u,h,d,p,f=[],g=[],v=s.length,y=o||function(t,e,n){for(var r=0,i=e.length;r<i;r++)Q(t,e[r],n);return n}(e||"*",a.nodeType?[a]:a,[]),_=!t||!o&&e?y:ft(y,f,t,a,l);if(n?n(_,p=i||(o?t:v||r)?[]:s,a,l):p=_,r)for(u=ft(p,g),r(u,[],a,l),h=u.length;h--;)(d=u[h])&&(p[g[h]]=!(_[g[h]]=d));if(o){if(i||t){if(i){for(u=[],h=p.length;h--;)(d=p[h])&&u.push(_[h]=d);i(null,p=[],u,l)}for(h=p.length;h--;)(d=p[h])&&(u=i?c.call(o,d):f[h])>-1&&(o[u]=!(s[u]=d))}}else p=ft(p===s?p.splice(v,p.length):p),i?i(null,s,p,l):m.apply(s,p)}))}function gt(t){for(var n,i,o,s=t.length,a=e.relative[t[0].type],l=a||e.relative[" "],u=a?1:0,h=dt((function(t){return t===n}),l,!0),d=dt((function(t){return c.call(n,t)>-1}),l,!0),p=[function(t,e,i){var o=!a&&(i||e!=r)||((n=e).nodeType?h(t,e,i):d(t,e,i));return n=null,o}];u<s;u++)if(i=e.relative[t[u].type])p=[dt(pt(p),i)];else{if((i=e.filter[t[u].type].apply(null,t[u].matches))[v]){for(o=++u;o<s&&!e.relative[t[o].type];o++);return mt(u>1&&pt(p),u>1&&ht(t.slice(0,u-1).concat({value:" "===t[u-2].type?"*":""})).replace(O,"$1"),i,u<o&&gt(t.slice(u,o)),o<s&&gt(t=t.slice(o)),o<s&&ht(t))}p.push(i)}return pt(p)}function vt(t,n){var i,o=[],s=[],a=w[t+" "];if(!a){for(n||(n=ct(t)),i=n.length;i--;)(a=gt(n[i]))[v]?o.push(a):s.push(a);(a=w(t,function(t,n){var i=n.length>0,o=t.length>0,s=function(s,a,u,c,d){var p,f,g,v=0,_="0",b=s&&[],x=[],w=r,E=s||o&&e.find.TAG("*",d),S=y+=null==w?1:Math.random()||.1,A=E.length;for(d&&(r=a==l||a||d);_!==A&&null!=(p=E[_]);_++){if(o&&p){for(f=0,a||p.ownerDocument==l||(lt(p),u=!h);g=t[f++];)if(g(p,a||l,u)){m.call(c,p);break}d&&(y=S)}i&&((p=!g&&p)&&v--,s&&b.push(p))}if(v+=_,i&&_!==v){for(f=0;g=n[f++];)g(b,x,a,u);if(s){if(v>0)for(;_--;)b[_]||x[_]||(x[_]=M.call(c));x=ft(x)}m.apply(c,x),d&&!s&&x.length>0&&v+n.length>1&&T.uniqueSort(c)}return d&&(y=S,r=w),b};return i?et(s):s}(s,o))).selector=t}return a}function yt(t,n,r,i){var o,s,a,l,u,c="function"==typeof t&&t,d=!i&&ct(t=c.selector||t);if(r=r||[],1===d.length){if((s=d[0]=d[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===n.nodeType&&h&&e.relative[s[1].type]){if(!(n=(e.find.ID(a.matches[0].replace($,K),n)||[])[0]))return r;c&&(n=n.parentNode),t=t.slice(s.shift().value.length)}for(o=V.needsContext.test(t)?0:s.length;o--&&(a=s[o],!e.relative[l=a.type]);)if((u=e.find[l])&&(i=u(a.matches[0].replace($,K),q.test(s[0].type)&&at(n.parentNode)||n))){if(s.splice(o,1),!(t=i.length&&ht(s)))return m.apply(r,i),r;break}}return(c||vt(t,d))(i,n,!h,r,!n||q.test(t)&&at(n.parentNode)||n),r}ut.prototype=e.filters=e.pseudos,e.setFilters=new ut,g.sortStable=v.split("").sort(S).join("")===v,lt(),g.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(l.createElement("fieldset"))})),T.find=Q,T.expr[":"]=T.expr.pseudos,T.unique=T.uniqueSort,Q.compile=vt,Q.select=yt,Q.setDocument=lt,Q.tokenize=ct,Q.escape=T.escapeSelector,Q.getText=T.text,Q.isXML=T.isXMLDoc,Q.selectors=T.expr,Q.support=T.support,Q.uniqueSort=T.uniqueSort}();var F=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&T(t).is(n))break;r.push(t)}return r},k=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},U=T.expr.match.needsContext,B=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function G(t,e,n){return v(e)?T.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?T.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?T.grep(t,(function(t){return c.call(e,t)>-1!==n})):T.filter(e,t,n)}T.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?T.find.matchesSelector(r,t)?[r]:[]:T.find.matches(t,T.grep(e,(function(t){return 1===t.nodeType})))},T.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(T(t).filter((function(){for(e=0;e<r;e++)if(T.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)T.find(t,i[e],n);return r>1?T.uniqueSort(n):n},filter:function(t){return this.pushStack(G(this,t||[],!1))},not:function(t){return this.pushStack(G(this,t||[],!0))},is:function(t){return!!G(this,"string"==typeof t&&U.test(t)?T(t):t||[],!1).length}});var z,H=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(T.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||z,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:H.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof T?e[0]:e,T.merge(this,T.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:_,!0)),B.test(r[1])&&T.isPlainObject(e))for(r in e)v(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=_.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):v(t)?void 0!==n.ready?n.ready(t):t(T):T.makeArray(t,this)}).prototype=T.fn,z=T(_);var j=/^(?:parents|prev(?:Until|All))/,V={children:!0,contents:!0,next:!0,prev:!0};function X(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}T.fn.extend({has:function(t){var e=T(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(T.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,o=[],s="string"!=typeof t&&T(t);if(!U.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&T.find.matchesSelector(n,t))){o.push(n);break}return this.pushStack(o.length>1?T.uniqueSort(o):o)},index:function(t){return t?"string"==typeof t?c.call(T(t),this[0]):c.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),T.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return F(t,"parentNode")},parentsUntil:function(t,e,n){return F(t,"parentNode",n)},next:function(t){return X(t,"nextSibling")},prev:function(t){return X(t,"previousSibling")},nextAll:function(t){return F(t,"nextSibling")},prevAll:function(t){return F(t,"previousSibling")},nextUntil:function(t,e,n){return F(t,"nextSibling",n)},prevUntil:function(t,e,n){return F(t,"previousSibling",n)},siblings:function(t){return k((t.parentNode||{}).firstChild,t)},children:function(t){return k(t.firstChild)},contents:function(t){return null!=t.contentDocument&&s(t.contentDocument)?t.contentDocument:(A(t,"template")&&(t=t.content||t),T.merge([],t.childNodes))}},(function(t,e){T.fn[t]=function(n,r){var i=T.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=T.filter(r,i)),this.length>1&&(V[t]||T.uniqueSort(i),j.test(t)&&i.reverse()),this.pushStack(i)}}));var W=/[^\x20\t\r\n\f]+/g;function Y(t){return t}function q(t){throw t}function $(t,e,n,r){var i;try{t&&v(i=t.promise)?i.call(t).done(e).fail(n):t&&v(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}T.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return T.each(t.match(W)||[],(function(t,n){e[n]=!0})),e}(t):T.extend({},t);var e,n,r,i,o=[],s=[],a=-1,l=function(){for(i=i||t.once,r=e=!0;s.length;a=-1)for(n=s.shift();++a<o.length;)!1===o[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=o.length,n=!1);t.memory||(n=!1),e=!1,i&&(o=n?[]:"")},u={add:function(){return o&&(n&&!e&&(a=o.length-1,s.push(n)),function e(n){T.each(n,(function(n,r){v(r)?t.unique&&u.has(r)||o.push(r):r&&r.length&&"string"!==w(r)&&e(r)}))}(arguments),n&&!e&&l()),this},remove:function(){return T.each(arguments,(function(t,e){for(var n;(n=T.inArray(e,o,n))>-1;)o.splice(n,1),n<=a&&a--})),this},has:function(t){return t?T.inArray(t,o)>-1:o.length>0},empty:function(){return o&&(o=[]),this},disable:function(){return i=s=[],o=n="",this},disabled:function(){return!o},lock:function(){return i=s=[],n||e||(o=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],s.push(n),e||l()),this},fire:function(){return u.fireWith(this,arguments),this},fired:function(){return!!r}};return u},T.extend({Deferred:function(t){var e=[["notify","progress",T.Callbacks("memory"),T.Callbacks("memory"),2],["resolve","done",T.Callbacks("once memory"),T.Callbacks("once memory"),0,"resolved"],["reject","fail",T.Callbacks("once memory"),T.Callbacks("once memory"),1,"rejected"]],r="pending",i={state:function(){return r},always:function(){return o.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return T.Deferred((function(n){T.each(e,(function(e,r){var i=v(t[r[4]])&&t[r[4]];o[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&v(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,r,i){var o=0;function s(t,e,r,i){return function(){var a=this,l=arguments,u=function(){var n,u;if(!(t<o)){if((n=r.apply(a,l))===e.promise())throw new TypeError("Thenable self-resolution");u=n&&("object"==typeof n||"function"==typeof n)&&n.then,v(u)?i?u.call(n,s(o,e,Y,i),s(o,e,q,i)):(o++,u.call(n,s(o,e,Y,i),s(o,e,q,i),s(o,e,Y,e.notifyWith))):(r!==Y&&(a=void 0,l=[n]),(i||e.resolveWith)(a,l))}},c=i?u:function(){try{u()}catch(n){T.Deferred.exceptionHook&&T.Deferred.exceptionHook(n,c.error),t+1>=o&&(r!==q&&(a=void 0,l=[n]),e.rejectWith(a,l))}};t?c():(T.Deferred.getErrorHook?c.error=T.Deferred.getErrorHook():T.Deferred.getStackHook&&(c.error=T.Deferred.getStackHook()),n.setTimeout(c))}}return T.Deferred((function(n){e[0][3].add(s(0,n,v(i)?i:Y,n.notifyWith)),e[1][3].add(s(0,n,v(t)?t:Y)),e[2][3].add(s(0,n,v(r)?r:q))})).promise()},promise:function(t){return null!=t?T.extend(t,i):i}},o={};return T.each(e,(function(t,n){var s=n[2],a=n[5];i[n[1]]=s.add,a&&s.add((function(){r=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),s.add(n[3].fire),o[n[0]]=function(){return o[n[0]+"With"](this===o?void 0:this,arguments),this},o[n[0]+"With"]=s.fireWith})),i.promise(o),t&&t.call(o,o),o},when:function(t){var e=arguments.length,n=e,r=Array(n),i=a.call(arguments),o=T.Deferred(),s=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?a.call(arguments):n,--e||o.resolveWith(r,i)}};if(e<=1&&($(t,o.done(s(n)).resolve,o.reject,!e),"pending"===o.state()||v(i[n]&&i[n].then)))return o.then();for(;n--;)$(i[n],s(n),o.reject);return o.promise()}});var K=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;T.Deferred.exceptionHook=function(t,e){n.console&&n.console.warn&&t&&K.test(t.name)&&n.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},T.readyException=function(t){n.setTimeout((function(){throw t}))};var Z=T.Deferred();function J(){_.removeEventListener("DOMContentLoaded",J),n.removeEventListener("load",J),T.ready()}T.fn.ready=function(t){return Z.then(t).catch((function(t){T.readyException(t)})),this},T.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--T.readyWait:T.isReady)||(T.isReady=!0,!0!==t&&--T.readyWait>0||Z.resolveWith(_,[T]))}}),T.ready.then=Z.then,"complete"===_.readyState||"loading"!==_.readyState&&!_.documentElement.doScroll?n.setTimeout(T.ready):(_.addEventListener("DOMContentLoaded",J),n.addEventListener("load",J));var Q=function(t,e,n,r,i,o,s){var a=0,l=t.length,u=null==n;if("object"===w(n))for(a in i=!0,n)Q(t,e,a,n[a],!0,o,s);else if(void 0!==r&&(i=!0,v(r)||(s=!0),u&&(s?(e.call(t,r),e=null):(u=e,e=function(t,e,n){return u.call(T(t),n)})),e))for(;a<l;a++)e(t[a],n,s?r:r.call(t[a],a,e(t[a],n)));return i?t:u?e.call(t):l?e(t[0],n):o},tt=/^-ms-/,et=/-([a-z])/g;function nt(t,e){return e.toUpperCase()}function rt(t){return t.replace(tt,"ms-").replace(et,nt)}var it=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function ot(){this.expando=T.expando+ot.uid++}ot.uid=1,ot.prototype={cache:function(t){var e=t[this.expando];return e||(e={},it(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[rt(e)]=n;else for(r in e)i[rt(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][rt(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(rt):(e=rt(e))in r?[e]:e.match(W)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||T.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!T.isEmptyObject(e)}};var st=new ot,at=new ot,lt=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ut=/[A-Z]/g;function ct(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(ut,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:lt.test(t)?JSON.parse(t):t)}(n)}catch(t){}at.set(t,e,n)}else n=void 0;return n}T.extend({hasData:function(t){return at.hasData(t)||st.hasData(t)},data:function(t,e,n){return at.access(t,e,n)},removeData:function(t,e){at.remove(t,e)},_data:function(t,e,n){return st.access(t,e,n)},_removeData:function(t,e){st.remove(t,e)}}),T.fn.extend({data:function(t,e){var n,r,i,o=this[0],s=o&&o.attributes;if(void 0===t){if(this.length&&(i=at.get(o),1===o.nodeType&&!st.get(o,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(r=s[n].name).indexOf("data-")&&(r=rt(r.slice(5)),ct(o,r,i[r]));st.set(o,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){at.set(this,t)})):Q(this,(function(e){var n;if(o&&void 0===e)return void 0!==(n=at.get(o,t))||void 0!==(n=ct(o,t))?n:void 0;this.each((function(){at.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){at.remove(this,t)}))}}),T.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=st.get(t,e),n&&(!r||Array.isArray(n)?r=st.access(t,e,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=T.queue(t,e),r=n.length,i=n.shift(),o=T._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,(function(){T.dequeue(t,e)}),o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return st.get(t,n)||st.access(t,n,{empty:T.Callbacks("once memory").add((function(){st.remove(t,[e+"queue",n])}))})}}),T.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?T.queue(this[0],t):void 0===e?this:this.each((function(){var n=T.queue(this,t,e);T._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&T.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){T.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=T.Deferred(),o=this,s=this.length,a=function(){--r||i.resolveWith(o,[o])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";s--;)(n=st.get(o[s],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(e)}});var ht=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,dt=new RegExp("^(?:([+-])=|)("+ht+")([a-z%]*)$","i"),pt=["Top","Right","Bottom","Left"],ft=_.documentElement,mt=function(t){return T.contains(t.ownerDocument,t)},gt={composed:!0};ft.getRootNode&&(mt=function(t){return T.contains(t.ownerDocument,t)||t.getRootNode(gt)===t.ownerDocument});var vt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&mt(t)&&"none"===T.css(t,"display")};function yt(t,e,n,r){var i,o,s=20,a=r?function(){return r.cur()}:function(){return T.css(t,e,"")},l=a(),u=n&&n[3]||(T.cssNumber[e]?"":"px"),c=t.nodeType&&(T.cssNumber[e]||"px"!==u&&+l)&&dt.exec(T.css(t,e));if(c&&c[3]!==u){for(l/=2,u=u||c[3],c=+l||1;s--;)T.style(t,e,c+u),(1-o)*(1-(o=a()/l||.5))<=0&&(s=0),c/=o;c*=2,T.style(t,e,c+u),n=n||[]}return n&&(c=+c||+l||0,i=n[1]?c+(n[1]+1)*n[2]:+n[2],r&&(r.unit=u,r.start=c,r.end=i)),i}var _t={};function bt(t){var e,n=t.ownerDocument,r=t.nodeName,i=_t[r];return i||(e=n.body.appendChild(n.createElement(r)),i=T.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),_t[r]=i,i)}function xt(t,e){for(var n,r,i=[],o=0,s=t.length;o<s;o++)(r=t[o]).style&&(n=r.style.display,e?("none"===n&&(i[o]=st.get(r,"display")||null,i[o]||(r.style.display="")),""===r.style.display&&vt(r)&&(i[o]=bt(r))):"none"!==n&&(i[o]="none",st.set(r,"display",n)));for(o=0;o<s;o++)null!=i[o]&&(t[o].style.display=i[o]);return t}T.fn.extend({show:function(){return xt(this,!0)},hide:function(){return xt(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){vt(this)?T(this).show():T(this).hide()}))}});var wt,Et,Tt=/^(?:checkbox|radio)$/i,St=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,At=/^$|^module$|\/(?:java|ecma)script/i;wt=_.createDocumentFragment().appendChild(_.createElement("div")),(Et=_.createElement("input")).setAttribute("type","radio"),Et.setAttribute("checked","checked"),Et.setAttribute("name","t"),wt.appendChild(Et),g.checkClone=wt.cloneNode(!0).cloneNode(!0).lastChild.checked,wt.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!wt.cloneNode(!0).lastChild.defaultValue,wt.innerHTML="<option></option>",g.option=!!wt.lastChild;var Mt={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Dt(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&A(t,e)?T.merge([t],n):n}function Ct(t,e){for(var n=0,r=t.length;n<r;n++)st.set(t[n],"globalEval",!e||st.get(e[n],"globalEval"))}Mt.tbody=Mt.tfoot=Mt.colgroup=Mt.caption=Mt.thead,Mt.th=Mt.td,g.option||(Mt.optgroup=Mt.option=[1,"<select multiple='multiple'>","</select>"]);var Rt=/<|&#?\w+;/;function Ot(t,e,n,r,i){for(var o,s,a,l,u,c,h=e.createDocumentFragment(),d=[],p=0,f=t.length;p<f;p++)if((o=t[p])||0===o)if("object"===w(o))T.merge(d,o.nodeType?[o]:o);else if(Rt.test(o)){for(s=s||h.appendChild(e.createElement("div")),a=(St.exec(o)||["",""])[1].toLowerCase(),l=Mt[a]||Mt._default,s.innerHTML=l[1]+T.htmlPrefilter(o)+l[2],c=l[0];c--;)s=s.lastChild;T.merge(d,s.childNodes),(s=h.firstChild).textContent=""}else d.push(e.createTextNode(o));for(h.textContent="",p=0;o=d[p++];)if(r&&T.inArray(o,r)>-1)i&&i.push(o);else if(u=mt(o),s=Dt(h.appendChild(o),"script"),u&&Ct(s),n)for(c=0;o=s[c++];)At.test(o.type||"")&&n.push(o);return h}var Pt=/^([^.]*)(?:\.(.+)|)/;function It(){return!0}function Lt(){return!1}function Nt(t,e,n,r,i,o){var s,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)Nt(t,a,n,r,e[a],o);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Lt;else if(!i)return t;return 1===o&&(s=i,(i=function(t){return T().off(t),s.apply(this,arguments)}).guid=s.guid||(s.guid=T.guid++)),t.each((function(){T.event.add(this,e,i,r,n)}))}function Ft(t,e,n){n?(st.set(t,e,!1),T.event.add(t,e,{namespace:!1,handler:function(t){var n,r=st.get(this,e);if(1&t.isTrigger&&this[e]){if(r)(T.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=a.call(arguments),st.set(this,e,r),this[e](),n=st.get(this,e),st.set(this,e,!1),r!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else r&&(st.set(this,e,T.event.trigger(r[0],r.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=It)}})):void 0===st.get(t,e)&&T.event.add(t,e,It)}T.event={global:{},add:function(t,e,n,r,i){var o,s,a,l,u,c,h,d,p,f,m,g=st.get(t);if(it(t))for(n.handler&&(n=(o=n).handler,i=o.selector),i&&T.find.matchesSelector(ft,i),n.guid||(n.guid=T.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),u=(e=(e||"").match(W)||[""]).length;u--;)p=m=(a=Pt.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),p&&(h=T.event.special[p]||{},p=(i?h.delegateType:h.bindType)||p,h=T.event.special[p]||{},c=T.extend({type:p,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:f.join(".")},o),(d=l[p])||((d=l[p]=[]).delegateCount=0,h.setup&&!1!==h.setup.call(t,r,f,s)||t.addEventListener&&t.addEventListener(p,s)),h.add&&(h.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,c):d.push(c),T.event.global[p]=!0)},remove:function(t,e,n,r,i){var o,s,a,l,u,c,h,d,p,f,m,g=st.hasData(t)&&st.get(t);if(g&&(l=g.events)){for(u=(e=(e||"").match(W)||[""]).length;u--;)if(p=m=(a=Pt.exec(e[u])||[])[1],f=(a[2]||"").split(".").sort(),p){for(h=T.event.special[p]||{},d=l[p=(r?h.delegateType:h.bindType)||p]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=d.length;o--;)c=d[o],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(d.splice(o,1),c.selector&&d.delegateCount--,h.remove&&h.remove.call(t,c));s&&!d.length&&(h.teardown&&!1!==h.teardown.call(t,f,g.handle)||T.removeEvent(t,p,g.handle),delete l[p])}else for(p in l)T.event.remove(t,p+e[u],n,r,!0);T.isEmptyObject(l)&&st.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,o,s,a=new Array(arguments.length),l=T.event.fix(t),u=(st.get(this,"events")||Object.create(null))[l.type]||[],c=T.event.special[l.type]||{};for(a[0]=l,e=1;e<arguments.length;e++)a[e]=arguments[e];if(l.delegateTarget=this,!c.preDispatch||!1!==c.preDispatch.call(this,l)){for(s=T.event.handlers.call(this,l,u),e=0;(i=s[e++])&&!l.isPropagationStopped();)for(l.currentTarget=i.elem,n=0;(o=i.handlers[n++])&&!l.isImmediatePropagationStopped();)l.rnamespace&&!1!==o.namespace&&!l.rnamespace.test(o.namespace)||(l.handleObj=o,l.data=o.data,void 0!==(r=((T.event.special[o.origType]||{}).handle||o.handler).apply(i.elem,a))&&!1===(l.result=r)&&(l.preventDefault(),l.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,l),l.result}},handlers:function(t,e){var n,r,i,o,s,a=[],l=e.delegateCount,u=t.target;if(l&&u.nodeType&&!("click"===t.type&&t.button>=1))for(;u!==this;u=u.parentNode||this)if(1===u.nodeType&&("click"!==t.type||!0!==u.disabled)){for(o=[],s={},n=0;n<l;n++)void 0===s[i=(r=e[n]).selector+" "]&&(s[i]=r.needsContext?T(i,this).index(u)>-1:T.find(i,this,null,[u]).length),s[i]&&o.push(r);o.length&&a.push({elem:u,handlers:o})}return u=this,l<e.length&&a.push({elem:u,handlers:e.slice(l)}),a},addProp:function(t,e){Object.defineProperty(T.Event.prototype,t,{enumerable:!0,configurable:!0,get:v(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[T.expando]?t:new T.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Tt.test(e.type)&&e.click&&A(e,"input")&&Ft(e,"click",!0),!1},trigger:function(t){var e=this||t;return Tt.test(e.type)&&e.click&&A(e,"input")&&Ft(e,"click"),!0},_default:function(t){var e=t.target;return Tt.test(e.type)&&e.click&&A(e,"input")&&st.get(e,"click")||A(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},T.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},T.Event=function(t,e){if(!(this instanceof T.Event))return new T.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?It:Lt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&T.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:Lt,isPropagationStopped:Lt,isImmediatePropagationStopped:Lt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=It,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=It,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=It,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},T.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},T.event.addProp),T.each({focus:"focusin",blur:"focusout"},(function(t,e){function n(t){if(_.documentMode){var n=st.get(this,"handle"),r=T.event.fix(t);r.type="focusin"===t.type?"focus":"blur",r.isSimulated=!0,n(t),r.target===r.currentTarget&&n(r)}else T.event.simulate(e,t.target,T.event.fix(t))}T.event.special[t]={setup:function(){var r;if(Ft(this,t,!0),!_.documentMode)return!1;(r=st.get(this,e))||this.addEventListener(e,n),st.set(this,e,(r||0)+1)},trigger:function(){return Ft(this,t),!0},teardown:function(){var t;if(!_.documentMode)return!1;(t=st.get(this,e)-1)?st.set(this,e,t):(this.removeEventListener(e,n),st.remove(this,e))},_default:function(e){return st.get(e.target,t)},delegateType:e},T.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=_.documentMode?this:r,o=st.get(i,e);o||(_.documentMode?this.addEventListener(e,n):r.addEventListener(t,n,!0)),st.set(i,e,(o||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=_.documentMode?this:r,o=st.get(i,e)-1;o?st.set(i,e,o):(_.documentMode?this.removeEventListener(e,n):r.removeEventListener(t,n,!0),st.remove(i,e))}}})),T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){T.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return i&&(i===r||T.contains(r,i))||(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}})),T.fn.extend({on:function(t,e,n,r){return Nt(this,t,e,n,r)},one:function(t,e,n,r){return Nt(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,T(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Lt),this.each((function(){T.event.remove(this,t,n,e)}))}});var kt=/<script|<style|<link/i,Ut=/checked\s*(?:[^=]|=\s*.checked.)/i,Bt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function Gt(t,e){return A(t,"table")&&A(11!==e.nodeType?e:e.firstChild,"tr")&&T(t).children("tbody")[0]||t}function zt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Ht(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function jt(t,e){var n,r,i,o,s,a;if(1===e.nodeType){if(st.hasData(t)&&(a=st.get(t).events))for(i in st.remove(e,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)T.event.add(e,i,a[i][n]);at.hasData(t)&&(o=at.access(t),s=T.extend({},o),at.set(e,s))}}function Vt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Tt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Xt(t,e,n,r){e=l(e);var i,o,s,a,u,c,h=0,d=t.length,p=d-1,f=e[0],m=v(f);if(m||d>1&&"string"==typeof f&&!g.checkClone&&Ut.test(f))return t.each((function(i){var o=t.eq(i);m&&(e[0]=f.call(this,i,o.html())),Xt(o,e,n,r)}));if(d&&(o=(i=Ot(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=o),o||r)){for(a=(s=T.map(Dt(i,"script"),zt)).length;h<d;h++)u=i,h!==p&&(u=T.clone(u,!0,!0),a&&T.merge(s,Dt(u,"script"))),n.call(t[h],u,h);if(a)for(c=s[s.length-1].ownerDocument,T.map(s,Ht),h=0;h<a;h++)u=s[h],At.test(u.type||"")&&!st.access(u,"globalEval")&&T.contains(c,u)&&(u.src&&"module"!==(u.type||"").toLowerCase()?T._evalUrl&&!u.noModule&&T._evalUrl(u.src,{nonce:u.nonce||u.getAttribute("nonce")},c):x(u.textContent.replace(Bt,""),u,c))}return t}function Wt(t,e,n){for(var r,i=e?T.filter(e,t):t,o=0;null!=(r=i[o]);o++)n||1!==r.nodeType||T.cleanData(Dt(r)),r.parentNode&&(n&&mt(r)&&Ct(Dt(r,"script")),r.parentNode.removeChild(r));return t}T.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,o,s,a=t.cloneNode(!0),l=mt(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||T.isXMLDoc(t)))for(s=Dt(a),r=0,i=(o=Dt(t)).length;r<i;r++)Vt(o[r],s[r]);if(e)if(n)for(o=o||Dt(t),s=s||Dt(a),r=0,i=o.length;r<i;r++)jt(o[r],s[r]);else jt(t,a);return(s=Dt(a,"script")).length>0&&Ct(s,!l&&Dt(t,"script")),a},cleanData:function(t){for(var e,n,r,i=T.event.special,o=0;void 0!==(n=t[o]);o++)if(it(n)){if(e=n[st.expando]){if(e.events)for(r in e.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,e.handle);n[st.expando]=void 0}n[at.expando]&&(n[at.expando]=void 0)}}}),T.fn.extend({detach:function(t){return Wt(this,t,!0)},remove:function(t){return Wt(this,t)},text:function(t){return Q(this,(function(t){return void 0===t?T.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Xt(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Gt(this,t).appendChild(t)}))},prepend:function(){return Xt(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=Gt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Xt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Xt(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(T.cleanData(Dt(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return T.clone(this,t,e)}))},html:function(t){return Q(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!kt.test(t)&&!Mt[(St.exec(t)||["",""])[1].toLowerCase()]){t=T.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(T.cleanData(Dt(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Xt(this,arguments,(function(e){var n=this.parentNode;T.inArray(this,t)<0&&(T.cleanData(Dt(this)),n&&n.replaceChild(e,this))}),t)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){T.fn[t]=function(t){for(var n,r=[],i=T(t),o=i.length-1,s=0;s<=o;s++)n=s===o?this:this.clone(!0),T(i[s])[e](n),u.apply(r,n.get());return this.pushStack(r)}}));var Yt=new RegExp("^("+ht+")(?!px)[a-z%]+$","i"),qt=/^--/,$t=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=n),e.getComputedStyle(t)},Kt=function(t,e,n){var r,i,o={};for(i in e)o[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=o[i];return r},Zt=new RegExp(pt.join("|"),"i");function Jt(t,e,n){var r,i,o,s,a=qt.test(e),l=t.style;return(n=n||$t(t))&&(s=n.getPropertyValue(e)||n[e],a&&s&&(s=s.replace(O,"$1")||void 0),""!==s||mt(t)||(s=T.style(t,e)),!g.pixelBoxStyles()&&Yt.test(s)&&Zt.test(e)&&(r=l.width,i=l.minWidth,o=l.maxWidth,l.minWidth=l.maxWidth=l.width=s,s=n.width,l.width=r,l.minWidth=i,l.maxWidth=o)),void 0!==s?s+"":s}function Qt(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(c){u.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",c.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",ft.appendChild(u).appendChild(c);var t=n.getComputedStyle(c);r="1%"!==t.top,l=12===e(t.marginLeft),c.style.right="60%",s=36===e(t.right),i=36===e(t.width),c.style.position="absolute",o=12===e(c.offsetWidth/3),ft.removeChild(u),c=null}}function e(t){return Math.round(parseFloat(t))}var r,i,o,s,a,l,u=_.createElement("div"),c=_.createElement("div");c.style&&(c.style.backgroundClip="content-box",c.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===c.style.backgroundClip,T.extend(g,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),s},pixelPosition:function(){return t(),r},reliableMarginLeft:function(){return t(),l},scrollboxSize:function(){return t(),o},reliableTrDimensions:function(){var t,e,r,i;return null==a&&(t=_.createElement("table"),e=_.createElement("tr"),r=_.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="box-sizing:content-box;border:1px solid",e.style.height="1px",r.style.height="9px",r.style.display="block",ft.appendChild(t).appendChild(e).appendChild(r),i=n.getComputedStyle(e),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,ft.removeChild(t)),a}}))}();var te=["Webkit","Moz","ms"],ee=_.createElement("div").style,ne={};function re(t){var e=T.cssProps[t]||ne[t];return e||(t in ee?t:ne[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=te.length;n--;)if((t=te[n]+e)in ee)return t}(t)||t)}var ie=/^(none|table(?!-c[ea]).+)/,oe={position:"absolute",visibility:"hidden",display:"block"},se={letterSpacing:"0",fontWeight:"400"};function ae(t,e,n){var r=dt.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function le(t,e,n,r,i,o){var s="width"===e?1:0,a=0,l=0,u=0;if(n===(r?"border":"content"))return 0;for(;s<4;s+=2)"margin"===n&&(u+=T.css(t,n+pt[s],!0,i)),r?("content"===n&&(l-=T.css(t,"padding"+pt[s],!0,i)),"margin"!==n&&(l-=T.css(t,"border"+pt[s]+"Width",!0,i))):(l+=T.css(t,"padding"+pt[s],!0,i),"padding"!==n?l+=T.css(t,"border"+pt[s]+"Width",!0,i):a+=T.css(t,"border"+pt[s]+"Width",!0,i));return!r&&o>=0&&(l+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-o-l-a-.5))||0),l+u}function ue(t,e,n){var r=$t(t),i=(!g.boxSizingReliable()||n)&&"border-box"===T.css(t,"boxSizing",!1,r),o=i,s=Jt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Yt.test(s)){if(!n)return s;s="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&A(t,"tr")||"auto"===s||!parseFloat(s)&&"inline"===T.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===T.css(t,"boxSizing",!1,r),(o=a in t)&&(s=t[a])),(s=parseFloat(s)||0)+le(t,e,n||(i?"border":"content"),o,r,s)+"px"}function ce(t,e,n,r,i){return new ce.prototype.init(t,e,n,r,i)}T.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Jt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,o,s,a=rt(e),l=qt.test(e),u=t.style;if(l||(e=re(a)),s=T.cssHooks[e]||T.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(i=s.get(t,!1,r))?i:u[e];"string"===(o=typeof n)&&(i=dt.exec(n))&&i[1]&&(n=yt(t,e,i),o="number"),null!=n&&n==n&&("number"!==o||l||(n+=i&&i[3]||(T.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(u[e]="inherit"),s&&"set"in s&&void 0===(n=s.set(t,n,r))||(l?u.setProperty(e,n):u[e]=n))}},css:function(t,e,n,r){var i,o,s,a=rt(e);return qt.test(e)||(e=re(a)),(s=T.cssHooks[e]||T.cssHooks[a])&&"get"in s&&(i=s.get(t,!0,n)),void 0===i&&(i=Jt(t,e,r)),"normal"===i&&e in se&&(i=se[e]),""===n||n?(o=parseFloat(i),!0===n||isFinite(o)?o||0:i):i}}),T.each(["height","width"],(function(t,e){T.cssHooks[e]={get:function(t,n,r){if(n)return!ie.test(T.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?ue(t,e,r):Kt(t,oe,(function(){return ue(t,e,r)}))},set:function(t,n,r){var i,o=$t(t),s=!g.scrollboxSize()&&"absolute"===o.position,a=(s||r)&&"border-box"===T.css(t,"boxSizing",!1,o),l=r?le(t,e,r,a,o):0;return a&&s&&(l-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(o[e])-le(t,e,"border",!1,o)-.5)),l&&(i=dt.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=T.css(t,e)),ae(0,n,l)}}})),T.cssHooks.marginLeft=Qt(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Jt(t,"marginLeft"))||t.getBoundingClientRect().left-Kt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),T.each({margin:"",padding:"",border:"Width"},(function(t,e){T.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+pt[r]+e]=o[r]||o[r-2]||o[0];return i}},"margin"!==t&&(T.cssHooks[t+e].set=ae)})),T.fn.extend({css:function(t,e){return Q(this,(function(t,e,n){var r,i,o={},s=0;if(Array.isArray(e)){for(r=$t(t),i=e.length;s<i;s++)o[e[s]]=T.css(t,e[s],!1,r);return o}return void 0!==n?T.style(t,e,n):T.css(t,e)}),t,e,arguments.length>1)}}),T.Tween=ce,ce.prototype={constructor:ce,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||T.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(T.cssNumber[n]?"":"px")},cur:function(){var t=ce.propHooks[this.prop];return t&&t.get?t.get(this):ce.propHooks._default.get(this)},run:function(t){var e,n=ce.propHooks[this.prop];return this.options.duration?this.pos=e=T.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):ce.propHooks._default.set(this),this}},ce.prototype.init.prototype=ce.prototype,ce.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=T.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){T.fx.step[t.prop]?T.fx.step[t.prop](t):1!==t.elem.nodeType||!T.cssHooks[t.prop]&&null==t.elem.style[re(t.prop)]?t.elem[t.prop]=t.now:T.style(t.elem,t.prop,t.now+t.unit)}}},ce.propHooks.scrollTop=ce.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},T.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},T.fx=ce.prototype.init,T.fx.step={};var he,de,pe=/^(?:toggle|show|hide)$/,fe=/queueHooks$/;function me(){de&&(!1===_.hidden&&n.requestAnimationFrame?n.requestAnimationFrame(me):n.setTimeout(me,T.fx.interval),T.fx.tick())}function ge(){return n.setTimeout((function(){he=void 0})),he=Date.now()}function ve(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=pt[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function ye(t,e,n){for(var r,i=(_e.tweeners[e]||[]).concat(_e.tweeners["*"]),o=0,s=i.length;o<s;o++)if(r=i[o].call(n,e,t))return r}function _e(t,e,n){var r,i,o=0,s=_e.prefilters.length,a=T.Deferred().always((function(){delete l.elem})),l=function(){if(i)return!1;for(var e=he||ge(),n=Math.max(0,u.startTime+u.duration-e),r=1-(n/u.duration||0),o=0,s=u.tweens.length;o<s;o++)u.tweens[o].run(r);return a.notifyWith(t,[u,r,n]),r<1&&s?n:(s||a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u]),!1)},u=a.promise({elem:t,props:T.extend({},e),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},n),originalProperties:e,originalOptions:n,startTime:he||ge(),duration:n.duration,tweens:[],createTween:function(e,n){var r=T.Tween(t,u.opts,e,n,u.opts.specialEasing[e]||u.opts.easing);return u.tweens.push(r),r},stop:function(e){var n=0,r=e?u.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)u.tweens[n].run(1);return e?(a.notifyWith(t,[u,1,0]),a.resolveWith(t,[u,e])):a.rejectWith(t,[u,e]),this}}),c=u.props;for(!function(t,e){var n,r,i,o,s;for(n in t)if(i=e[r=rt(n)],o=t[n],Array.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),(s=T.cssHooks[r])&&"expand"in s)for(n in o=s.expand(o),delete t[r],o)n in t||(t[n]=o[n],e[n]=i);else e[r]=i}(c,u.opts.specialEasing);o<s;o++)if(r=_e.prefilters[o].call(u,t,c,u.opts))return v(r.stop)&&(T._queueHooks(u.elem,u.opts.queue).stop=r.stop.bind(r)),r;return T.map(c,ye,u),v(u.opts.start)&&u.opts.start.call(t,u),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always),T.fx.timer(T.extend(l,{elem:t,anim:u,queue:u.opts.queue})),u}T.Animation=T.extend(_e,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return yt(n.elem,t,dt.exec(e),n),n}]},tweener:function(t,e){v(t)?(e=t,t=["*"]):t=t.match(W);for(var n,r=0,i=t.length;r<i;r++)n=t[r],_e.tweeners[n]=_e.tweeners[n]||[],_e.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,o,s,a,l,u,c,h="width"in e||"height"in e,d=this,p={},f=t.style,m=t.nodeType&&vt(t),g=st.get(t,"fxshow");for(r in n.queue||(null==(s=T._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,a=s.empty.fire,s.empty.fire=function(){s.unqueued||a()}),s.unqueued++,d.always((function(){d.always((function(){s.unqueued--,T.queue(t,"fx").length||s.empty.fire()}))}))),e)if(i=e[r],pe.test(i)){if(delete e[r],o=o||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}p[r]=g&&g[r]||T.style(t,r)}if((l=!T.isEmptyObject(e))||!T.isEmptyObject(p))for(r in h&&1===t.nodeType&&(n.overflow=[f.overflow,f.overflowX,f.overflowY],null==(u=g&&g.display)&&(u=st.get(t,"display")),"none"===(c=T.css(t,"display"))&&(u?c=u:(xt([t],!0),u=t.style.display||u,c=T.css(t,"display"),xt([t]))),("inline"===c||"inline-block"===c&&null!=u)&&"none"===T.css(t,"float")&&(l||(d.done((function(){f.display=u})),null==u&&(c=f.display,u="none"===c?"":c)),f.display="inline-block")),n.overflow&&(f.overflow="hidden",d.always((function(){f.overflow=n.overflow[0],f.overflowX=n.overflow[1],f.overflowY=n.overflow[2]}))),l=!1,p)l||(g?"hidden"in g&&(m=g.hidden):g=st.access(t,"fxshow",{display:u}),o&&(g.hidden=!m),m&&xt([t],!0),d.done((function(){for(r in m||xt([t]),st.remove(t,"fxshow"),p)T.style(t,r,p[r])}))),l=ye(m?g[r]:0,r,d),r in g||(g[r]=l.start,m&&(l.end=l.start,l.start=0))}],prefilter:function(t,e){e?_e.prefilters.unshift(t):_e.prefilters.push(t)}}),T.speed=function(t,e,n){var r=t&&"object"==typeof t?T.extend({},t):{complete:n||!n&&e||v(t)&&t,duration:t,easing:n&&e||e&&!v(e)&&e};return T.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in T.fx.speeds?r.duration=T.fx.speeds[r.duration]:r.duration=T.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){v(r.old)&&r.old.call(this),r.queue&&T.dequeue(this,r.queue)},r},T.fn.extend({fadeTo:function(t,e,n,r){return this.filter(vt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=T.isEmptyObject(t),o=T.speed(e,n,r),s=function(){var e=_e(this,T.extend({},t),o);(i||st.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||!1===o.queue?this.each(s):this.queue(o.queue,s)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",o=T.timers,s=st.get(this);if(i)s[i]&&s[i].stop&&r(s[i]);else for(i in s)s[i]&&s[i].stop&&fe.test(i)&&r(s[i]);for(i=o.length;i--;)o[i].elem!==this||null!=t&&o[i].queue!==t||(o[i].anim.stop(n),e=!1,o.splice(i,1));!e&&n||T.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=st.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=T.timers,s=r?r.length:0;for(n.finish=!0,T.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;e<s;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),T.each(["toggle","show","hide"],(function(t,e){var n=T.fn[e];T.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(ve(e,!0),t,r,i)}})),T.each({slideDown:ve("show"),slideUp:ve("hide"),slideToggle:ve("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){T.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),T.timers=[],T.fx.tick=function(){var t,e=0,n=T.timers;for(he=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||T.fx.stop(),he=void 0},T.fx.timer=function(t){T.timers.push(t),T.fx.start()},T.fx.interval=13,T.fx.start=function(){de||(de=!0,me())},T.fx.stop=function(){de=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(t,e){return t=T.fx&&T.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,r){var i=n.setTimeout(e,t);r.stop=function(){n.clearTimeout(i)}}))},function(){var t=_.createElement("input"),e=_.createElement("select").appendChild(_.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=_.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var be,xe=T.expr.attrHandle;T.fn.extend({attr:function(t,e){return Q(this,T.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){T.removeAttr(this,t)}))}}),T.extend({attr:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return void 0===t.getAttribute?T.prop(t,e,n):(1===o&&T.isXMLDoc(t)||(i=T.attrHooks[e.toLowerCase()]||(T.expr.match.bool.test(e)?be:void 0)),void 0!==n?null===n?void T.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=T.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&A(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(W);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),be={set:function(t,e,n){return!1===e?T.removeAttr(t,n):t.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=xe[e]||T.find.attr;xe[e]=function(t,e,r){var i,o,s=e.toLowerCase();return r||(o=xe[s],xe[s]=i,i=null!=n(t,e,r)?s:null,xe[s]=o),i}}));var we=/^(?:input|select|textarea|button)$/i,Ee=/^(?:a|area)$/i;function Te(t){return(t.match(W)||[]).join(" ")}function Se(t){return t.getAttribute&&t.getAttribute("class")||""}function Ae(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(W)||[]}T.fn.extend({prop:function(t,e){return Q(this,T.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[T.propFix[t]||t]}))}}),T.extend({prop:function(t,e,n){var r,i,o=t.nodeType;if(3!==o&&8!==o&&2!==o)return 1===o&&T.isXMLDoc(t)||(e=T.propFix[e]||e,i=T.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=T.find.attr(t,"tabindex");return e?parseInt(e,10):we.test(t.nodeName)||Ee.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(T.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){T.propFix[this.toLowerCase()]=this})),T.fn.extend({addClass:function(t){var e,n,r,i,o,s;return v(t)?this.each((function(e){T(this).addClass(t.call(this,e,Se(this)))})):(e=Ae(t)).length?this.each((function(){if(r=Se(this),n=1===this.nodeType&&" "+Te(r)+" "){for(o=0;o<e.length;o++)i=e[o],n.indexOf(" "+i+" ")<0&&(n+=i+" ");s=Te(n),r!==s&&this.setAttribute("class",s)}})):this},removeClass:function(t){var e,n,r,i,o,s;return v(t)?this.each((function(e){T(this).removeClass(t.call(this,e,Se(this)))})):arguments.length?(e=Ae(t)).length?this.each((function(){if(r=Se(this),n=1===this.nodeType&&" "+Te(r)+" "){for(o=0;o<e.length;o++)for(i=e[o];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");s=Te(n),r!==s&&this.setAttribute("class",s)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,o,s=typeof t,a="string"===s||Array.isArray(t);return v(t)?this.each((function(n){T(this).toggleClass(t.call(this,n,Se(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Ae(t),this.each((function(){if(a)for(o=T(this),i=0;i<n.length;i++)r=n[i],o.hasClass(r)?o.removeClass(r):o.addClass(r);else void 0!==t&&"boolean"!==s||((r=Se(this))&&st.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":st.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+Te(Se(n))+" ").indexOf(e)>-1)return!0;return!1}});var Me=/\r/g;T.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=v(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,T(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=T.map(i,(function(t){return null==t?"":t+""}))),(e=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=T.valHooks[i.type]||T.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Me,""):null==n?"":n:void 0}}),T.extend({valHooks:{option:{get:function(t){var e=T.find.attr(t,"value");return null!=e?e:Te(T.text(t))}},select:{get:function(t){var e,n,r,i=t.options,o=t.selectedIndex,s="select-one"===t.type,a=s?null:[],l=s?o+1:i.length;for(r=o<0?l:s?o:0;r<l;r++)if(((n=i[r]).selected||r===o)&&!n.disabled&&(!n.parentNode.disabled||!A(n.parentNode,"optgroup"))){if(e=T(n).val(),s)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,o=T.makeArray(e),s=i.length;s--;)((r=i[s]).selected=T.inArray(T.valHooks.option.get(r),o)>-1)&&(n=!0);return n||(t.selectedIndex=-1),o}}}}),T.each(["radio","checkbox"],(function(){T.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=T.inArray(T(t).val(),e)>-1}},g.checkOn||(T.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var De=n.location,Ce={guid:Date.now()},Re=/\?/;T.parseXML=function(t){var e,r;if(!t||"string"!=typeof t)return null;try{e=(new n.DOMParser).parseFromString(t,"text/xml")}catch(t){}return r=e&&e.getElementsByTagName("parsererror")[0],e&&!r||T.error("Invalid XML: "+(r?T.map(r.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var Oe=/^(?:focusinfocus|focusoutblur)$/,Pe=function(t){t.stopPropagation()};T.extend(T.event,{trigger:function(t,e,r,i){var o,s,a,l,u,c,h,d,f=[r||_],m=p.call(t,"type")?t.type:t,g=p.call(t,"namespace")?t.namespace.split("."):[];if(s=d=a=r=r||_,3!==r.nodeType&&8!==r.nodeType&&!Oe.test(m+T.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),u=m.indexOf(":")<0&&"on"+m,(t=t[T.expando]?t:new T.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=r),e=null==e?[t]:T.makeArray(e,[t]),h=T.event.special[m]||{},i||!h.trigger||!1!==h.trigger.apply(r,e))){if(!i&&!h.noBubble&&!y(r)){for(l=h.delegateType||m,Oe.test(l+m)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(r.ownerDocument||_)&&f.push(a.defaultView||a.parentWindow||n)}for(o=0;(s=f[o++])&&!t.isPropagationStopped();)d=s,t.type=o>1?l:h.bindType||m,(c=(st.get(s,"events")||Object.create(null))[t.type]&&st.get(s,"handle"))&&c.apply(s,e),(c=u&&s[u])&&c.apply&&it(s)&&(t.result=c.apply(s,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||h._default&&!1!==h._default.apply(f.pop(),e)||!it(r)||u&&v(r[m])&&!y(r)&&((a=r[u])&&(r[u]=null),T.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,Pe),r[m](),t.isPropagationStopped()&&d.removeEventListener(m,Pe),T.event.triggered=void 0,a&&(r[u]=a)),t.result}},simulate:function(t,e,n){var r=T.extend(new T.Event,n,{type:t,isSimulated:!0});T.event.trigger(r,null,e)}}),T.fn.extend({trigger:function(t,e){return this.each((function(){T.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return T.event.trigger(t,e,n,!0)}});var Ie=/\[\]$/,Le=/\r?\n/g,Ne=/^(?:submit|button|image|reset|file)$/i,Fe=/^(?:input|select|textarea|keygen)/i;function ke(t,e,n,r){var i;if(Array.isArray(e))T.each(e,(function(e,i){n||Ie.test(t)?r(t,i):ke(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==w(e))r(t,e);else for(i in e)ke(t+"["+i+"]",e[i],n,r)}T.param=function(t,e){var n,r=[],i=function(t,e){var n=v(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!T.isPlainObject(t))T.each(t,(function(){i(this.name,this.value)}));else for(n in t)ke(n,t[n],e,i);return r.join("&")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=T.prop(this,"elements");return t?T.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!T(this).is(":disabled")&&Fe.test(this.nodeName)&&!Ne.test(t)&&(this.checked||!Tt.test(t))})).map((function(t,e){var n=T(this).val();return null==n?null:Array.isArray(n)?T.map(n,(function(t){return{name:e.name,value:t.replace(Le,"\r\n")}})):{name:e.name,value:n.replace(Le,"\r\n")}})).get()}});var Ue=/%20/g,Be=/#.*$/,Ge=/([?&])_=[^&]*/,ze=/^(.*?):[ \t]*([^\r\n]*)$/gm,He=/^(?:GET|HEAD)$/,je=/^\/\//,Ve={},Xe={},We="*/".concat("*"),Ye=_.createElement("a");function qe(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(W)||[];if(v(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function $e(t,e,n,r){var i={},o=t===Xe;function s(a){var l;return i[a]=!0,T.each(t[a]||[],(function(t,a){var u=a(e,n,r);return"string"!=typeof u||o||i[u]?o?!(l=u):void 0:(e.dataTypes.unshift(u),s(u),!1)})),l}return s(e.dataTypes[0])||!i["*"]&&s("*")}function Ke(t,e){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&T.extend(!0,t,r),t}Ye.href=De.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:De.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(De.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":We,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Ke(Ke(t,T.ajaxSettings),e):Ke(T.ajaxSettings,t)},ajaxPrefilter:qe(Ve),ajaxTransport:qe(Xe),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var r,i,o,s,a,l,u,c,h,d,p=T.ajaxSetup({},e),f=p.context||p,m=p.context&&(f.nodeType||f.jquery)?T(f):T.event,g=T.Deferred(),v=T.Callbacks("once memory"),y=p.statusCode||{},b={},x={},w="canceled",E={readyState:0,getResponseHeader:function(t){var e;if(u){if(!s)for(s={};e=ze.exec(o);)s[e[1].toLowerCase()+" "]=(s[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=s[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return u?o:null},setRequestHeader:function(t,e){return null==u&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,b[t]=e),this},overrideMimeType:function(t){return null==u&&(p.mimeType=t),this},statusCode:function(t){var e;if(t)if(u)E.always(t[E.status]);else for(e in t)y[e]=[y[e],t[e]];return this},abort:function(t){var e=t||w;return r&&r.abort(e),S(0,e),this}};if(g.promise(E),p.url=((t||p.url||De.href)+"").replace(je,De.protocol+"//"),p.type=e.method||e.type||p.method||p.type,p.dataTypes=(p.dataType||"*").toLowerCase().match(W)||[""],null==p.crossDomain){l=_.createElement("a");try{l.href=p.url,l.href=l.href,p.crossDomain=Ye.protocol+"//"+Ye.host!=l.protocol+"//"+l.host}catch(t){p.crossDomain=!0}}if(p.data&&p.processData&&"string"!=typeof p.data&&(p.data=T.param(p.data,p.traditional)),$e(Ve,p,e,E),u)return E;for(h in(c=T.event&&p.global)&&0==T.active++&&T.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!He.test(p.type),i=p.url.replace(Be,""),p.hasContent?p.data&&p.processData&&0===(p.contentType||"").indexOf("application/x-www-form-urlencoded")&&(p.data=p.data.replace(Ue,"+")):(d=p.url.slice(i.length),p.data&&(p.processData||"string"==typeof p.data)&&(i+=(Re.test(i)?"&":"?")+p.data,delete p.data),!1===p.cache&&(i=i.replace(Ge,"$1"),d=(Re.test(i)?"&":"?")+"_="+Ce.guid+++d),p.url=i+d),p.ifModified&&(T.lastModified[i]&&E.setRequestHeader("If-Modified-Since",T.lastModified[i]),T.etag[i]&&E.setRequestHeader("If-None-Match",T.etag[i])),(p.data&&p.hasContent&&!1!==p.contentType||e.contentType)&&E.setRequestHeader("Content-Type",p.contentType),E.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+We+"; q=0.01":""):p.accepts["*"]),p.headers)E.setRequestHeader(h,p.headers[h]);if(p.beforeSend&&(!1===p.beforeSend.call(f,E,p)||u))return E.abort();if(w="abort",v.add(p.complete),E.done(p.success),E.fail(p.error),r=$e(Xe,p,e,E)){if(E.readyState=1,c&&m.trigger("ajaxSend",[E,p]),u)return E;p.async&&p.timeout>0&&(a=n.setTimeout((function(){E.abort("timeout")}),p.timeout));try{u=!1,r.send(b,S)}catch(t){if(u)throw t;S(-1,t)}}else S(-1,"No Transport");function S(t,e,s,l){var h,d,_,b,x,w=e;u||(u=!0,a&&n.clearTimeout(a),r=void 0,o=l||"",E.readyState=t>0?4:0,h=t>=200&&t<300||304===t,s&&(b=function(t,e,n){for(var r,i,o,s,a=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){l.unshift(i);break}if(l[0]in n)o=l[0];else{for(i in n){if(!l[0]||t.converters[i+" "+l[0]]){o=i;break}s||(s=i)}o=o||s}if(o)return o!==l[0]&&l.unshift(o),n[o]}(p,E,s)),!h&&T.inArray("script",p.dataTypes)>-1&&T.inArray("json",p.dataTypes)<0&&(p.converters["text script"]=function(){}),b=function(t,e,n,r){var i,o,s,a,l,u={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)u[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!l&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),l=o,o=c.shift())if("*"===o)o=l;else if("*"!==l&&l!==o){if(!(s=u[l+" "+o]||u["* "+o]))for(i in u)if((a=i.split(" "))[1]===o&&(s=u[l+" "+a[0]]||u["* "+a[0]])){!0===s?s=u[i]:!0!==u[i]&&(o=a[0],c.unshift(a[1]));break}if(!0!==s)if(s&&t.throws)e=s(e);else try{e=s(e)}catch(t){return{state:"parsererror",error:s?t:"No conversion from "+l+" to "+o}}}return{state:"success",data:e}}(p,b,E,h),h?(p.ifModified&&((x=E.getResponseHeader("Last-Modified"))&&(T.lastModified[i]=x),(x=E.getResponseHeader("etag"))&&(T.etag[i]=x)),204===t||"HEAD"===p.type?w="nocontent":304===t?w="notmodified":(w=b.state,d=b.data,h=!(_=b.error))):(_=w,!t&&w||(w="error",t<0&&(t=0))),E.status=t,E.statusText=(e||w)+"",h?g.resolveWith(f,[d,w,E]):g.rejectWith(f,[E,w,_]),E.statusCode(y),y=void 0,c&&m.trigger(h?"ajaxSuccess":"ajaxError",[E,p,h?d:_]),v.fireWith(f,[E,w]),c&&(m.trigger("ajaxComplete",[E,p]),--T.active||T.event.trigger("ajaxStop")))}return E},getJSON:function(t,e,n){return T.get(t,e,n,"json")},getScript:function(t,e){return T.get(t,void 0,e,"script")}}),T.each(["get","post"],(function(t,e){T[e]=function(t,n,r,i){return v(n)&&(i=i||r,r=n,n=void 0),T.ajax(T.extend({url:t,type:e,dataType:i,data:n,success:r},T.isPlainObject(t)&&t))}})),T.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),T._evalUrl=function(t,e,n){return T.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){T.globalEval(t,e,n)}})},T.fn.extend({wrapAll:function(t){var e;return this[0]&&(v(t)&&(t=t.call(this[0])),e=T(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return v(t)?this.each((function(e){T(this).wrapInner(t.call(this,e))})):this.each((function(){var e=T(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=v(t);return this.each((function(n){T(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){T(this).replaceWith(this.childNodes)})),this}}),T.expr.pseudos.hidden=function(t){return!T.expr.pseudos.visible(t)},T.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},T.ajaxSettings.xhr=function(){try{return new n.XMLHttpRequest}catch(t){}};var Ze={0:200,1223:204},Je=T.ajaxSettings.xhr();g.cors=!!Je&&"withCredentials"in Je,g.ajax=Je=!!Je,T.ajaxTransport((function(t){var e,r;if(g.cors||Je&&!t.crossDomain)return{send:function(i,o){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];for(s in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(s,i[s]);e=function(t){return function(){e&&(e=r=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?o(0,"error"):o(a.status,a.statusText):o(Ze[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),r=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=r:a.onreadystatechange=function(){4===a.readyState&&n.setTimeout((function(){e&&r()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),T.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return T.globalEval(t),t}}}),T.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),T.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=T("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),_.head.appendChild(e[0])},abort:function(){n&&n()}}}));var Qe,tn=[],en=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=tn.pop()||T.expando+"_"+Ce.guid++;return this[t]=!0,t}}),T.ajaxPrefilter("json jsonp",(function(t,e,r){var i,o,s,a=!1!==t.jsonp&&(en.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&en.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=v(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(en,"$1"+i):!1!==t.jsonp&&(t.url+=(Re.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return s||T.error(i+" was not called"),s[0]},t.dataTypes[0]="json",o=n[i],n[i]=function(){s=arguments},r.always((function(){void 0===o?T(n).removeProp(i):n[i]=o,t[i]&&(t.jsonpCallback=e.jsonpCallback,tn.push(i)),s&&v(o)&&o(s[0]),s=o=void 0})),"script"})),g.createHTMLDocument=((Qe=_.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===Qe.childNodes.length),T.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((r=(e=_.implementation.createHTMLDocument("")).createElement("base")).href=_.location.href,e.head.appendChild(r)):e=_),o=!n&&[],(i=B.exec(t))?[e.createElement(i[1])]:(i=Ot([t],e,o),o&&o.length&&T(o).remove(),T.merge([],i.childNodes)));var r,i,o},T.fn.load=function(t,e,n){var r,i,o,s=this,a=t.indexOf(" ");return a>-1&&(r=Te(t.slice(a)),t=t.slice(0,a)),v(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),s.length>0&&T.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){o=arguments,s.html(r?T("<div>").append(T.parseHTML(t)).find(r):t)})).always(n&&function(t,e){s.each((function(){n.apply(this,o||[t.responseText,e,t])}))}),this},T.expr.pseudos.animated=function(t){return T.grep(T.timers,(function(e){return t===e.elem})).length},T.offset={setOffset:function(t,e,n){var r,i,o,s,a,l,u=T.css(t,"position"),c=T(t),h={};"static"===u&&(t.style.position="relative"),a=c.offset(),o=T.css(t,"top"),l=T.css(t,"left"),("absolute"===u||"fixed"===u)&&(o+l).indexOf("auto")>-1?(s=(r=c.position()).top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(l)||0),v(e)&&(e=e.call(t,n,T.extend({},a))),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+i),"using"in e?e.using.call(t,h):c.css(h)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){T.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===T.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===T.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=T(t).offset()).top+=T.css(t,"borderTopWidth",!0),i.left+=T.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-T.css(r,"marginTop",!0),left:e.left-i.left-T.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===T.css(t,"position");)t=t.offsetParent;return t||ft}))}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;T.fn[t]=function(r){return Q(this,(function(t,r,i){var o;if(y(t)?o=t:9===t.nodeType&&(o=t.defaultView),void 0===i)return o?o[e]:t[r];o?o.scrollTo(n?o.pageXOffset:i,n?i:o.pageYOffset):t[r]=i}),t,r,arguments.length)}})),T.each(["top","left"],(function(t,e){T.cssHooks[e]=Qt(g.pixelPosition,(function(t,n){if(n)return n=Jt(t,e),Yt.test(n)?T(t).position()[e]+"px":n}))})),T.each({Height:"height",Width:"width"},(function(t,e){T.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){T.fn[r]=function(i,o){var s=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===o?"margin":"border");return Q(this,(function(e,n,i){var o;return y(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(o=e.documentElement,Math.max(e.body["scroll"+t],o["scroll"+t],e.body["offset"+t],o["offset"+t],o["client"+t])):void 0===i?T.css(e,n,a):T.style(e,n,i,a)}),e,s?i:void 0,s)}}))})),T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){T.fn[e]=function(t){return this.on(e,t)}})),T.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),T.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){T.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var nn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;T.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),v(t))return r=a.call(arguments,2),(i=function(){return t.apply(e||this,r.concat(a.call(arguments)))}).guid=t.guid=t.guid||T.guid++,i},T.holdReady=function(t){t?T.readyWait++:T.ready(!0)},T.isArray=Array.isArray,T.parseJSON=JSON.parse,T.nodeName=A,T.isFunction=v,T.isWindow=y,T.camelCase=rt,T.type=w,T.now=Date.now,T.isNumeric=function(t){var e=T.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},T.trim=function(t){return null==t?"":(t+"").replace(nn,"$1")},void 0===(r=function(){return T}.apply(e,[]))||(t.exports=r);var rn=n.jQuery,on=n.$;return T.noConflict=function(t){return n.$===T&&(n.$=on),t&&n.jQuery===T&&(n.jQuery=rn),T},void 0===i&&(n.jQuery=n.$=T),T}))},FpZJ:function(t,e,n){"use strict";t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var t={},e=Symbol("test"),n=Object(e);if("string"==typeof e)return!1;if("[object Symbol]"!==Object.prototype.toString.call(e))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(e in t[e]=42,t)return!1;if("function"==typeof Object.keys&&0!==Object.keys(t).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(t).length)return!1;var r=Object.getOwnPropertySymbols(t);if(1!==r.length||r[0]!==e)return!1;if(!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(t,e);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},GYWy:function(t,e,n){(function(t,r){var i;!function(o){e&&e.nodeType,t&&t.nodeType;var s="object"==typeof r&&r;s.global!==s&&s.window!==s&&s.self;var a,l=2147483647,u=/^xn--/,c=/[^\x20-\x7E]/,h=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},p=Math.floor,f=String.fromCharCode;function m(t){throw new RangeError(d[t])}function g(t,e){for(var n=t.length,r=[];n--;)r[n]=e(t[n]);return r}function v(t,e){var n=t.split("@"),r="";return n.length>1&&(r=n[0]+"@",t=n[1]),r+g((t=t.replace(h,".")).split("."),e).join(".")}function y(t){for(var e,n,r=[],i=0,o=t.length;i<o;)(e=t.charCodeAt(i++))>=55296&&e<=56319&&i<o?56320==(64512&(n=t.charCodeAt(i++)))?r.push(((1023&e)<<10)+(1023&n)+65536):(r.push(e),i--):r.push(e);return r}function _(t){return g(t,(function(t){var e="";return t>65535&&(e+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=f(t)})).join("")}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function x(t,e,n){var r=0;for(t=n?p(t/700):t>>1,t+=p(t/e);t>455;r+=36)t=p(t/35);return p(r+36*t/(t+38))}function w(t){var e,n,r,i,o,s,a,u,c,h,d,f=[],g=t.length,v=0,y=128,b=72;for((n=t.lastIndexOf("-"))<0&&(n=0),r=0;r<n;++r)t.charCodeAt(r)>=128&&m("not-basic"),f.push(t.charCodeAt(r));for(i=n>0?n+1:0;i<g;){for(o=v,s=1,a=36;i>=g&&m("invalid-input"),((u=(d=t.charCodeAt(i++))-48<10?d-22:d-65<26?d-65:d-97<26?d-97:36)>=36||u>p((l-v)/s))&&m("overflow"),v+=u*s,!(u<(c=a<=b?1:a>=b+26?26:a-b));a+=36)s>p(l/(h=36-c))&&m("overflow"),s*=h;b=x(v-o,e=f.length+1,0==o),p(v/e)>l-y&&m("overflow"),y+=p(v/e),v%=e,f.splice(v++,0,y)}return _(f)}function E(t){var e,n,r,i,o,s,a,u,c,h,d,g,v,_,w,E=[];for(g=(t=y(t)).length,e=128,n=0,o=72,s=0;s<g;++s)(d=t[s])<128&&E.push(f(d));for(r=i=E.length,i&&E.push("-");r<g;){for(a=l,s=0;s<g;++s)(d=t[s])>=e&&d<a&&(a=d);for(a-e>p((l-n)/(v=r+1))&&m("overflow"),n+=(a-e)*v,e=a,s=0;s<g;++s)if((d=t[s])<e&&++n>l&&m("overflow"),d==e){for(u=n,c=36;!(u<(h=c<=o?1:c>=o+26?26:c-o));c+=36)w=u-h,_=36-h,E.push(f(b(h+w%_,0))),u=p(w/_);E.push(f(b(u,0))),o=x(n,v,r==i),n=0,++r}++n,++e}return E.join("")}a={version:"1.4.1",ucs2:{decode:y,encode:_},decode:w,encode:E,toASCII:function(t){return v(t,(function(t){return c.test(t)?"xn--"+E(t):t}))},toUnicode:function(t){return v(t,(function(t){return u.test(t)?w(t.slice(4).toLowerCase()):t}))}},void 0===(i=function(){return a}.call(e,n,e,t))||(t.exports=i)}()}).call(this,n("YuTi")(t),n("yLpj"))},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var i=(s=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),o=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(o).concat([i]).join("\n")}var s;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var s=t[i];"number"==typeof s[0]&&r[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),e.push(s))}},e}},JxQ3:function(t,e,n){(function(e){var r="function"==typeof Map&&Map.prototype,i=Object.getOwnPropertyDescriptor&&r?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,o=r&&i&&"function"==typeof i.get?i.get:null,s=r&&Map.prototype.forEach,a="function"==typeof Set&&Set.prototype,l=Object.getOwnPropertyDescriptor&&a?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,u=a&&l&&"function"==typeof l.get?l.get:null,c=a&&Set.prototype.forEach,h="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,d="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,p="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,f=Boolean.prototype.valueOf,m=Object.prototype.toString,g=Function.prototype.toString,v=String.prototype.match,y=String.prototype.slice,_=String.prototype.replace,b=String.prototype.toUpperCase,x=String.prototype.toLowerCase,w=RegExp.prototype.test,E=Array.prototype.concat,T=Array.prototype.join,S=Array.prototype.slice,A=Math.floor,M="function"==typeof BigInt?BigInt.prototype.valueOf:null,D=Object.getOwnPropertySymbols,C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,R="function"==typeof Symbol&&"object"==typeof Symbol.iterator,O="function"==typeof Symbol&&Symbol.toStringTag&&(typeof Symbol.toStringTag===R||"symbol")?Symbol.toStringTag:null,P=Object.prototype.propertyIsEnumerable,I=("function"==typeof Reflect?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(t){return t.__proto__}:null);function L(t,e){if(t===1/0||t===-1/0||t!=t||t&&t>-1e3&&t<1e3||w.call(/e/,e))return e;var n=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof t){var r=t<0?-A(-t):A(t);if(r!==t){var i=String(r),o=y.call(e,i.length+1);return _.call(i,n,"$&_")+"."+_.call(_.call(o,/([0-9]{3})/g,"$&_"),/_$/,"")}}return _.call(e,n,"$&_")}var N=n(1),F=N.custom,k=H(F)?F:null;function U(t,e,n){var r="double"===(n.quoteStyle||e)?'"':"'";return r+t+r}function B(t){return _.call(String(t),/"/g,"&quot;")}function G(t){return!("[object Array]"!==X(t)||O&&"object"==typeof t&&O in t)}function z(t){return!("[object RegExp]"!==X(t)||O&&"object"==typeof t&&O in t)}function H(t){if(R)return t&&"object"==typeof t&&t instanceof Symbol;if("symbol"==typeof t)return!0;if(!t||"object"!=typeof t||!C)return!1;try{return C.call(t),!0}catch(t){}return!1}t.exports=function t(n,r,i,a){var l=r||{};if(V(l,"quoteStyle")&&"single"!==l.quoteStyle&&"double"!==l.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(V(l,"maxStringLength")&&("number"==typeof l.maxStringLength?l.maxStringLength<0&&l.maxStringLength!==1/0:null!==l.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var m=!V(l,"customInspect")||l.customInspect;if("boolean"!=typeof m&&"symbol"!==m)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(V(l,"indent")&&null!==l.indent&&"\t"!==l.indent&&!(parseInt(l.indent,10)===l.indent&&l.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(V(l,"numericSeparator")&&"boolean"!=typeof l.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var b=l.numericSeparator;if(void 0===n)return"undefined";if(null===n)return"null";if("boolean"==typeof n)return n?"true":"false";if("string"==typeof n)return function t(e,n){if(e.length>n.maxStringLength){var r=e.length-n.maxStringLength,i="... "+r+" more character"+(r>1?"s":"");return t(y.call(e,0,n.maxStringLength),n)+i}return U(_.call(_.call(e,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,Y),"single",n)}(n,l);if("number"==typeof n){if(0===n)return 1/0/n>0?"0":"-0";var w=String(n);return b?L(n,w):w}if("bigint"==typeof n){var A=String(n)+"n";return b?L(n,A):A}var D=void 0===l.depth?5:l.depth;if(void 0===i&&(i=0),i>=D&&D>0&&"object"==typeof n)return G(n)?"[Array]":"[Object]";var F=function(t,e){var n;if("\t"===t.indent)n="\t";else{if(!("number"==typeof t.indent&&t.indent>0))return null;n=T.call(Array(t.indent+1)," ")}return{base:n,prev:T.call(Array(e+1),n)}}(l,i);if(void 0===a)a=[];else if(W(a,n)>=0)return"[Circular]";function j(e,n,r){if(n&&(a=S.call(a)).push(n),r){var o={depth:l.depth};return V(l,"quoteStyle")&&(o.quoteStyle=l.quoteStyle),t(e,o,i+1,a)}return t(e,l,i+1,a)}if("function"==typeof n&&!z(n)){var Q=function(t){if(t.name)return t.name;var e=v.call(g.call(t),/^function\s*([\w$]+)/);if(e)return e[1];return null}(n),tt=J(n,j);return"[Function"+(Q?": "+Q:" (anonymous)")+"]"+(tt.length>0?" { "+T.call(tt,", ")+" }":"")}if(H(n)){var et=R?_.call(String(n),/^(Symbol\(.*\))_[^)]*$/,"$1"):C.call(n);return"object"!=typeof n||R?et:q(et)}if(function(t){if(!t||"object"!=typeof t)return!1;if("undefined"!=typeof HTMLElement&&t instanceof HTMLElement)return!0;return"string"==typeof t.nodeName&&"function"==typeof t.getAttribute}(n)){for(var nt="<"+x.call(String(n.nodeName)),rt=n.attributes||[],it=0;it<rt.length;it++)nt+=" "+rt[it].name+"="+U(B(rt[it].value),"double",l);return nt+=">",n.childNodes&&n.childNodes.length&&(nt+="..."),nt+="</"+x.call(String(n.nodeName))+">"}if(G(n)){if(0===n.length)return"[]";var ot=J(n,j);return F&&!function(t){for(var e=0;e<t.length;e++)if(W(t[e],"\n")>=0)return!1;return!0}(ot)?"["+Z(ot,F)+"]":"[ "+T.call(ot,", ")+" ]"}if(function(t){return!("[object Error]"!==X(t)||O&&"object"==typeof t&&O in t)}(n)){var st=J(n,j);return"cause"in Error.prototype||!("cause"in n)||P.call(n,"cause")?0===st.length?"["+String(n)+"]":"{ ["+String(n)+"] "+T.call(st,", ")+" }":"{ ["+String(n)+"] "+T.call(E.call("[cause]: "+j(n.cause),st),", ")+" }"}if("object"==typeof n&&m){if(k&&"function"==typeof n[k]&&N)return N(n,{depth:D-i});if("symbol"!==m&&"function"==typeof n.inspect)return n.inspect()}if(function(t){if(!o||!t||"object"!=typeof t)return!1;try{o.call(t);try{u.call(t)}catch(t){return!0}return t instanceof Map}catch(t){}return!1}(n)){var at=[];return s&&s.call(n,(function(t,e){at.push(j(e,n,!0)+" => "+j(t,n))})),K("Map",o.call(n),at,F)}if(function(t){if(!u||!t||"object"!=typeof t)return!1;try{u.call(t);try{o.call(t)}catch(t){return!0}return t instanceof Set}catch(t){}return!1}(n)){var lt=[];return c&&c.call(n,(function(t){lt.push(j(t,n))})),K("Set",u.call(n),lt,F)}if(function(t){if(!h||!t||"object"!=typeof t)return!1;try{h.call(t,h);try{d.call(t,d)}catch(t){return!0}return t instanceof WeakMap}catch(t){}return!1}(n))return $("WeakMap");if(function(t){if(!d||!t||"object"!=typeof t)return!1;try{d.call(t,d);try{h.call(t,h)}catch(t){return!0}return t instanceof WeakSet}catch(t){}return!1}(n))return $("WeakSet");if(function(t){if(!p||!t||"object"!=typeof t)return!1;try{return p.call(t),!0}catch(t){}return!1}(n))return $("WeakRef");if(function(t){return!("[object Number]"!==X(t)||O&&"object"==typeof t&&O in t)}(n))return q(j(Number(n)));if(function(t){if(!t||"object"!=typeof t||!M)return!1;try{return M.call(t),!0}catch(t){}return!1}(n))return q(j(M.call(n)));if(function(t){return!("[object Boolean]"!==X(t)||O&&"object"==typeof t&&O in t)}(n))return q(f.call(n));if(function(t){return!("[object String]"!==X(t)||O&&"object"==typeof t&&O in t)}(n))return q(j(String(n)));if("undefined"!=typeof window&&n===window)return"{ [object Window] }";if(n===e)return"{ [object globalThis] }";if(!function(t){return!("[object Date]"!==X(t)||O&&"object"==typeof t&&O in t)}(n)&&!z(n)){var ut=J(n,j),ct=I?I(n)===Object.prototype:n instanceof Object||n.constructor===Object,ht=n instanceof Object?"":"null prototype",dt=!ct&&O&&Object(n)===n&&O in n?y.call(X(n),8,-1):ht?"Object":"",pt=(ct||"function"!=typeof n.constructor?"":n.constructor.name?n.constructor.name+" ":"")+(dt||ht?"["+T.call(E.call([],dt||[],ht||[]),": ")+"] ":"");return 0===ut.length?pt+"{}":F?pt+"{"+Z(ut,F)+"}":pt+"{ "+T.call(ut,", ")+" }"}return String(n)};var j=Object.prototype.hasOwnProperty||function(t){return t in this};function V(t,e){return j.call(t,e)}function X(t){return m.call(t)}function W(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1}function Y(t){var e=t.charCodeAt(0),n={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return n?"\\"+n:"\\x"+(e<16?"0":"")+b.call(e.toString(16))}function q(t){return"Object("+t+")"}function $(t){return t+" { ? }"}function K(t,e,n,r){return t+" ("+e+") {"+(r?Z(n,r):T.call(n,", "))+"}"}function Z(t,e){if(0===t.length)return"";var n="\n"+e.prev+e.base;return n+T.call(t,","+n)+"\n"+e.prev}function J(t,e){var n=G(t),r=[];if(n){r.length=t.length;for(var i=0;i<t.length;i++)r[i]=V(t,i)?e(t[i],t):""}var o,s="function"==typeof D?D(t):[];if(R){o={};for(var a=0;a<s.length;a++)o["$"+s[a]]=s[a]}for(var l in t)V(t,l)&&(n&&String(Number(l))===l&&l<t.length||R&&o["$"+l]instanceof Symbol||(w.call(/[^\w$]/,l)?r.push(e(l,t)+": "+e(t[l],t)):r.push(l+": "+e(t[l],t))));if("function"==typeof D)for(var u=0;u<s.length;u++)P.call(t,s[u])&&r.push("["+e(s[u])+"]: "+e(t[s[u]],t));return r}}).call(this,n("yLpj"))},Kqna:function(t,e,n){"use strict";var r=n("AM7I")("%Object.getOwnPropertyDescriptor%",!0);if(r)try{r([],"length")}catch(t){r=null}t.exports=r},LvDl:function(t,e,n){(function(t,r){var i;(function(){var o="Expected a function",s="__lodash_placeholder__",a=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],l="[object Arguments]",u="[object Array]",c="[object Boolean]",h="[object Date]",d="[object Error]",p="[object Function]",f="[object GeneratorFunction]",m="[object Map]",g="[object Number]",v="[object Object]",y="[object RegExp]",_="[object Set]",b="[object String]",x="[object Symbol]",w="[object WeakMap]",E="[object ArrayBuffer]",T="[object DataView]",S="[object Float32Array]",A="[object Float64Array]",M="[object Int8Array]",D="[object Int16Array]",C="[object Int32Array]",R="[object Uint8Array]",O="[object Uint16Array]",P="[object Uint32Array]",I=/\b__p \+= '';/g,L=/\b(__p \+=) '' \+/g,N=/(__e\(.*?\)|\b__t\)) \+\n'';/g,F=/&(?:amp|lt|gt|quot|#39);/g,k=/[&<>"']/g,U=RegExp(F.source),B=RegExp(k.source),G=/<%-([\s\S]+?)%>/g,z=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,j=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,V=/^\w*$/,X=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,W=/[\\^$.*+?()[\]{}|]/g,Y=RegExp(W.source),q=/^\s+/,$=/\s/,K=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Z=/\{\n\/\* \[wrapped with (.+)\] \*/,J=/,? & /,Q=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,tt=/[()=,{}\[\]\/\s]/,et=/\\(\\)?/g,nt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,rt=/\w*$/,it=/^[-+]0x[0-9a-f]+$/i,ot=/^0b[01]+$/i,st=/^\[object .+?Constructor\]$/,at=/^0o[0-7]+$/i,lt=/^(?:0|[1-9]\d*)$/,ut=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,ct=/($^)/,ht=/['\n\r\u2028\u2029\\]/g,dt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",pt="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",ft="[\\ud800-\\udfff]",mt="["+pt+"]",gt="["+dt+"]",vt="\\d+",yt="[\\u2700-\\u27bf]",_t="[a-z\\xdf-\\xf6\\xf8-\\xff]",bt="[^\\ud800-\\udfff"+pt+vt+"\\u2700-\\u27bfa-z\\xdf-\\xf6\\xf8-\\xffA-Z\\xc0-\\xd6\\xd8-\\xde]",xt="\\ud83c[\\udffb-\\udfff]",wt="[^\\ud800-\\udfff]",Et="(?:\\ud83c[\\udde6-\\uddff]){2}",Tt="[\\ud800-\\udbff][\\udc00-\\udfff]",St="[A-Z\\xc0-\\xd6\\xd8-\\xde]",At="(?:"+_t+"|"+bt+")",Mt="(?:"+St+"|"+bt+")",Dt="(?:"+gt+"|"+xt+")"+"?",Ct="[\\ufe0e\\ufe0f]?"+Dt+("(?:\\u200d(?:"+[wt,Et,Tt].join("|")+")[\\ufe0e\\ufe0f]?"+Dt+")*"),Rt="(?:"+[yt,Et,Tt].join("|")+")"+Ct,Ot="(?:"+[wt+gt+"?",gt,Et,Tt,ft].join("|")+")",Pt=RegExp("['’]","g"),It=RegExp(gt,"g"),Lt=RegExp(xt+"(?="+xt+")|"+Ot+Ct,"g"),Nt=RegExp([St+"?"+_t+"+(?:['’](?:d|ll|m|re|s|t|ve))?(?="+[mt,St,"$"].join("|")+")",Mt+"+(?:['’](?:D|LL|M|RE|S|T|VE))?(?="+[mt,St+At,"$"].join("|")+")",St+"?"+At+"+(?:['’](?:d|ll|m|re|s|t|ve))?",St+"+(?:['’](?:D|LL|M|RE|S|T|VE))?","\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vt,Rt].join("|"),"g"),Ft=RegExp("[\\u200d\\ud800-\\udfff"+dt+"\\ufe0e\\ufe0f]"),kt=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ut=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],Bt=-1,Gt={};Gt[S]=Gt[A]=Gt[M]=Gt[D]=Gt[C]=Gt[R]=Gt["[object Uint8ClampedArray]"]=Gt[O]=Gt[P]=!0,Gt[l]=Gt[u]=Gt[E]=Gt[c]=Gt[T]=Gt[h]=Gt[d]=Gt[p]=Gt[m]=Gt[g]=Gt[v]=Gt[y]=Gt[_]=Gt[b]=Gt[w]=!1;var zt={};zt[l]=zt[u]=zt[E]=zt[T]=zt[c]=zt[h]=zt[S]=zt[A]=zt[M]=zt[D]=zt[C]=zt[m]=zt[g]=zt[v]=zt[y]=zt[_]=zt[b]=zt[x]=zt[R]=zt["[object Uint8ClampedArray]"]=zt[O]=zt[P]=!0,zt[d]=zt[p]=zt[w]=!1;var Ht={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jt=parseFloat,Vt=parseInt,Xt="object"==typeof t&&t&&t.Object===Object&&t,Wt="object"==typeof self&&self&&self.Object===Object&&self,Yt=Xt||Wt||Function("return this")(),qt=e&&!e.nodeType&&e,$t=qt&&"object"==typeof r&&r&&!r.nodeType&&r,Kt=$t&&$t.exports===qt,Zt=Kt&&Xt.process,Jt=function(){try{var t=$t&&$t.require&&$t.require("util").types;return t||Zt&&Zt.binding&&Zt.binding("util")}catch(t){}}(),Qt=Jt&&Jt.isArrayBuffer,te=Jt&&Jt.isDate,ee=Jt&&Jt.isMap,ne=Jt&&Jt.isRegExp,re=Jt&&Jt.isSet,ie=Jt&&Jt.isTypedArray;function oe(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function se(t,e,n,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];e(r,s,n(s),t)}return r}function ae(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function le(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function ue(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function ce(t,e){for(var n=-1,r=null==t?0:t.length,i=0,o=[];++n<r;){var s=t[n];e(s,n,t)&&(o[i++]=s)}return o}function he(t,e){return!!(null==t?0:t.length)&&xe(t,e,0)>-1}function de(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}function pe(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}function fe(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}function me(t,e,n,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(n=t[++i]);++i<o;)n=e(n,t[i],i,t);return n}function ge(t,e,n,r){var i=null==t?0:t.length;for(r&&i&&(n=t[--i]);i--;)n=e(n,t[i],i,t);return n}function ve(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var ye=Se("length");function _e(t,e,n){var r;return n(t,(function(t,n,i){if(e(t,n,i))return r=n,!1})),r}function be(t,e,n,r){for(var i=t.length,o=n+(r?1:-1);r?o--:++o<i;)if(e(t[o],o,t))return o;return-1}function xe(t,e,n){return e==e?function(t,e,n){var r=n-1,i=t.length;for(;++r<i;)if(t[r]===e)return r;return-1}(t,e,n):be(t,Ee,n)}function we(t,e,n,r){for(var i=n-1,o=t.length;++i<o;)if(r(t[i],e))return i;return-1}function Ee(t){return t!=t}function Te(t,e){var n=null==t?0:t.length;return n?De(t,e)/n:NaN}function Se(t){return function(e){return null==e?void 0:e[t]}}function Ae(t){return function(e){return null==t?void 0:t[e]}}function Me(t,e,n,r,i){return i(t,(function(t,i,o){n=r?(r=!1,t):e(n,t,i,o)})),n}function De(t,e){for(var n,r=-1,i=t.length;++r<i;){var o=e(t[r]);void 0!==o&&(n=void 0===n?o:n+o)}return n}function Ce(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Re(t){return t?t.slice(0,qe(t)+1).replace(q,""):t}function Oe(t){return function(e){return t(e)}}function Pe(t,e){return pe(e,(function(e){return t[e]}))}function Ie(t,e){return t.has(e)}function Le(t,e){for(var n=-1,r=t.length;++n<r&&xe(e,t[n],0)>-1;);return n}function Ne(t,e){for(var n=t.length;n--&&xe(e,t[n],0)>-1;);return n}function Fe(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var ke=Ae({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","Ĳ":"IJ","ĳ":"ij","Œ":"Oe","œ":"oe","ŉ":"'n","ſ":"s"}),Ue=Ae({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function Be(t){return"\\"+Ht[t]}function Ge(t){return Ft.test(t)}function ze(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function He(t,e){return function(n){return t(e(n))}}function je(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var a=t[n];a!==e&&a!==s||(t[n]=s,o[i++]=n)}return o}function Ve(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function Xe(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function We(t){return Ge(t)?function(t){var e=Lt.lastIndex=0;for(;Lt.test(t);)++e;return e}(t):ye(t)}function Ye(t){return Ge(t)?function(t){return t.match(Lt)||[]}(t):function(t){return t.split("")}(t)}function qe(t){for(var e=t.length;e--&&$.test(t.charAt(e)););return e}var $e=Ae({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var Ke=function t(e){var n,r=(e=null==e?Yt:Ke.defaults(Yt.Object(),e,Ke.pick(Yt,Ut))).Array,i=e.Date,$=e.Error,dt=e.Function,pt=e.Math,ft=e.Object,mt=e.RegExp,gt=e.String,vt=e.TypeError,yt=r.prototype,_t=dt.prototype,bt=ft.prototype,xt=e["__core-js_shared__"],wt=_t.toString,Et=bt.hasOwnProperty,Tt=0,St=(n=/[^.]+$/.exec(xt&&xt.keys&&xt.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",At=bt.toString,Mt=wt.call(ft),Dt=Yt._,Ct=mt("^"+wt.call(Et).replace(W,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Rt=Kt?e.Buffer:void 0,Ot=e.Symbol,Lt=e.Uint8Array,Ft=Rt?Rt.allocUnsafe:void 0,Ht=He(ft.getPrototypeOf,ft),Xt=ft.create,Wt=bt.propertyIsEnumerable,qt=yt.splice,$t=Ot?Ot.isConcatSpreadable:void 0,Zt=Ot?Ot.iterator:void 0,Jt=Ot?Ot.toStringTag:void 0,ye=function(){try{var t=to(ft,"defineProperty");return t({},"",{}),t}catch(t){}}(),Ae=e.clearTimeout!==Yt.clearTimeout&&e.clearTimeout,Ze=i&&i.now!==Yt.Date.now&&i.now,Je=e.setTimeout!==Yt.setTimeout&&e.setTimeout,Qe=pt.ceil,tn=pt.floor,en=ft.getOwnPropertySymbols,nn=Rt?Rt.isBuffer:void 0,rn=e.isFinite,on=yt.join,sn=He(ft.keys,ft),an=pt.max,ln=pt.min,un=i.now,cn=e.parseInt,hn=pt.random,dn=yt.reverse,pn=to(e,"DataView"),fn=to(e,"Map"),mn=to(e,"Promise"),gn=to(e,"Set"),vn=to(e,"WeakMap"),yn=to(ft,"create"),_n=vn&&new vn,bn={},xn=Do(pn),wn=Do(fn),En=Do(mn),Tn=Do(gn),Sn=Do(vn),An=Ot?Ot.prototype:void 0,Mn=An?An.valueOf:void 0,Dn=An?An.toString:void 0;function Cn(t){if(Xs(t)&&!Ls(t)&&!(t instanceof In)){if(t instanceof Pn)return t;if(Et.call(t,"__wrapped__"))return Co(t)}return new Pn(t)}var Rn=function(){function t(){}return function(e){if(!Vs(e))return{};if(Xt)return Xt(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function On(){}function Pn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=void 0}function In(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}function Ln(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Nn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Fn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function kn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Fn;++e<n;)this.add(t[e])}function Un(t){var e=this.__data__=new Nn(t);this.size=e.size}function Bn(t,e){var n=Ls(t),r=!n&&Is(t),i=!n&&!r&&Us(t),o=!n&&!r&&!i&&Qs(t),s=n||r||i||o,a=s?Ce(t.length,gt):[],l=a.length;for(var u in t)!e&&!Et.call(t,u)||s&&("length"==u||i&&("offset"==u||"parent"==u)||o&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||ao(u,l))||a.push(u);return a}function Gn(t){var e=t.length;return e?t[kr(0,e-1)]:void 0}function zn(t,e){return So(yi(t),Kn(e,0,t.length))}function Hn(t){return So(yi(t))}function jn(t,e,n){(void 0!==n&&!Rs(t[e],n)||void 0===n&&!(e in t))&&qn(t,e,n)}function Vn(t,e,n){var r=t[e];Et.call(t,e)&&Rs(r,n)&&(void 0!==n||e in t)||qn(t,e,n)}function Xn(t,e){for(var n=t.length;n--;)if(Rs(t[n][0],e))return n;return-1}function Wn(t,e,n,r){return er(t,(function(t,i,o){e(r,t,n(t),o)})),r}function Yn(t,e){return t&&_i(e,xa(e),t)}function qn(t,e,n){"__proto__"==e&&ye?ye(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function $n(t,e){for(var n=-1,i=e.length,o=r(i),s=null==t;++n<i;)o[n]=s?void 0:ga(t,e[n]);return o}function Kn(t,e,n){return t==t&&(void 0!==n&&(t=t<=n?t:n),void 0!==e&&(t=t>=e?t:e)),t}function Zn(t,e,n,r,i,o){var s,a=1&e,u=2&e,d=4&e;if(n&&(s=i?n(t,r,i,o):n(t)),void 0!==s)return s;if(!Vs(t))return t;var w=Ls(t);if(w){if(s=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Et.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!a)return yi(t,s)}else{var I=ro(t),L=I==p||I==f;if(Us(t))return di(t,a);if(I==v||I==l||L&&!i){if(s=u||L?{}:oo(t),!a)return u?function(t,e){return _i(t,no(t),e)}(t,function(t,e){return t&&_i(e,wa(e),t)}(s,t)):function(t,e){return _i(t,eo(t),e)}(t,Yn(s,t))}else{if(!zt[I])return i?t:{};s=function(t,e,n){var r=t.constructor;switch(e){case E:return pi(t);case c:case h:return new r(+t);case T:return function(t,e){var n=e?pi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case S:case A:case M:case D:case C:case R:case"[object Uint8ClampedArray]":case O:case P:return fi(t,n);case m:return new r;case g:case b:return new r(t);case y:return function(t){var e=new t.constructor(t.source,rt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case _:return new r;case x:return i=t,Mn?ft(Mn.call(i)):{}}var i}(t,I,a)}}o||(o=new Un);var N=o.get(t);if(N)return N;o.set(t,s),Ks(t)?t.forEach((function(r){s.add(Zn(r,e,n,r,t,o))})):Ws(t)&&t.forEach((function(r,i){s.set(i,Zn(r,e,n,i,t,o))}));var F=w?void 0:(d?u?Yi:Wi:u?wa:xa)(t);return ae(F||t,(function(r,i){F&&(r=t[i=r]),Vn(s,i,Zn(r,e,n,i,t,o))})),s}function Jn(t,e,n){var r=n.length;if(null==t)return!r;for(t=ft(t);r--;){var i=n[r],o=e[i],s=t[i];if(void 0===s&&!(i in t)||!o(s))return!1}return!0}function Qn(t,e,n){if("function"!=typeof t)throw new vt(o);return xo((function(){t.apply(void 0,n)}),e)}function tr(t,e,n,r){var i=-1,o=he,s=!0,a=t.length,l=[],u=e.length;if(!a)return l;n&&(e=pe(e,Oe(n))),r?(o=de,s=!1):e.length>=200&&(o=Ie,s=!1,e=new kn(e));t:for(;++i<a;){var c=t[i],h=null==n?c:n(c);if(c=r||0!==c?c:0,s&&h==h){for(var d=u;d--;)if(e[d]===h)continue t;l.push(c)}else o(e,h,r)||l.push(c)}return l}Cn.templateSettings={escape:G,evaluate:z,interpolate:H,variable:"",imports:{_:Cn}},Cn.prototype=On.prototype,Cn.prototype.constructor=Cn,Pn.prototype=Rn(On.prototype),Pn.prototype.constructor=Pn,In.prototype=Rn(On.prototype),In.prototype.constructor=In,Ln.prototype.clear=function(){this.__data__=yn?yn(null):{},this.size=0},Ln.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},Ln.prototype.get=function(t){var e=this.__data__;if(yn){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return Et.call(e,t)?e[t]:void 0},Ln.prototype.has=function(t){var e=this.__data__;return yn?void 0!==e[t]:Et.call(e,t)},Ln.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=yn&&void 0===e?"__lodash_hash_undefined__":e,this},Nn.prototype.clear=function(){this.__data__=[],this.size=0},Nn.prototype.delete=function(t){var e=this.__data__,n=Xn(e,t);return!(n<0)&&(n==e.length-1?e.pop():qt.call(e,n,1),--this.size,!0)},Nn.prototype.get=function(t){var e=this.__data__,n=Xn(e,t);return n<0?void 0:e[n][1]},Nn.prototype.has=function(t){return Xn(this.__data__,t)>-1},Nn.prototype.set=function(t,e){var n=this.__data__,r=Xn(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Fn.prototype.clear=function(){this.size=0,this.__data__={hash:new Ln,map:new(fn||Nn),string:new Ln}},Fn.prototype.delete=function(t){var e=Ji(this,t).delete(t);return this.size-=e?1:0,e},Fn.prototype.get=function(t){return Ji(this,t).get(t)},Fn.prototype.has=function(t){return Ji(this,t).has(t)},Fn.prototype.set=function(t,e){var n=Ji(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},kn.prototype.add=kn.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},kn.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.clear=function(){this.__data__=new Nn,this.size=0},Un.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Un.prototype.get=function(t){return this.__data__.get(t)},Un.prototype.has=function(t){return this.__data__.has(t)},Un.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Nn){var r=n.__data__;if(!fn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Fn(r)}return n.set(t,e),this.size=n.size,this};var er=wi(ur),nr=wi(cr,!0);function rr(t,e){var n=!0;return er(t,(function(t,r,i){return n=!!e(t,r,i)})),n}function ir(t,e,n){for(var r=-1,i=t.length;++r<i;){var o=t[r],s=e(o);if(null!=s&&(void 0===a?s==s&&!Js(s):n(s,a)))var a=s,l=o}return l}function or(t,e){var n=[];return er(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}function sr(t,e,n,r,i){var o=-1,s=t.length;for(n||(n=so),i||(i=[]);++o<s;){var a=t[o];e>0&&n(a)?e>1?sr(a,e-1,n,r,i):fe(i,a):r||(i[i.length]=a)}return i}var ar=Ei(),lr=Ei(!0);function ur(t,e){return t&&ar(t,e,xa)}function cr(t,e){return t&&lr(t,e,xa)}function hr(t,e){return ce(e,(function(e){return zs(t[e])}))}function dr(t,e){for(var n=0,r=(e=li(e,t)).length;null!=t&&n<r;)t=t[Mo(e[n++])];return n&&n==r?t:void 0}function pr(t,e,n){var r=e(t);return Ls(t)?r:fe(r,n(t))}function fr(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Jt&&Jt in ft(t)?function(t){var e=Et.call(t,Jt),n=t[Jt];try{t[Jt]=void 0;var r=!0}catch(t){}var i=At.call(t);r&&(e?t[Jt]=n:delete t[Jt]);return i}(t):function(t){return At.call(t)}(t)}function mr(t,e){return t>e}function gr(t,e){return null!=t&&Et.call(t,e)}function vr(t,e){return null!=t&&e in ft(t)}function yr(t,e,n){for(var i=n?de:he,o=t[0].length,s=t.length,a=s,l=r(s),u=1/0,c=[];a--;){var h=t[a];a&&e&&(h=pe(h,Oe(e))),u=ln(h.length,u),l[a]=!n&&(e||o>=120&&h.length>=120)?new kn(a&&h):void 0}h=t[0];var d=-1,p=l[0];t:for(;++d<o&&c.length<u;){var f=h[d],m=e?e(f):f;if(f=n||0!==f?f:0,!(p?Ie(p,m):i(c,m,n))){for(a=s;--a;){var g=l[a];if(!(g?Ie(g,m):i(t[a],m,n)))continue t}p&&p.push(m),c.push(f)}}return c}function _r(t,e,n){var r=null==(t=vo(t,e=li(e,t)))?t:t[Mo(Go(e))];return null==r?void 0:oe(r,t,n)}function br(t){return Xs(t)&&fr(t)==l}function xr(t,e,n,r,i){return t===e||(null==t||null==e||!Xs(t)&&!Xs(e)?t!=t&&e!=e:function(t,e,n,r,i,o){var s=Ls(t),a=Ls(e),p=s?u:ro(t),f=a?u:ro(e),w=(p=p==l?v:p)==v,S=(f=f==l?v:f)==v,A=p==f;if(A&&Us(t)){if(!Us(e))return!1;s=!0,w=!1}if(A&&!w)return o||(o=new Un),s||Qs(t)?Vi(t,e,n,r,i,o):function(t,e,n,r,i,o,s){switch(n){case T:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case E:return!(t.byteLength!=e.byteLength||!o(new Lt(t),new Lt(e)));case c:case h:case g:return Rs(+t,+e);case d:return t.name==e.name&&t.message==e.message;case y:case b:return t==e+"";case m:var a=ze;case _:var l=1&r;if(a||(a=Ve),t.size!=e.size&&!l)return!1;var u=s.get(t);if(u)return u==e;r|=2,s.set(t,e);var p=Vi(a(t),a(e),r,i,o,s);return s.delete(t),p;case x:if(Mn)return Mn.call(t)==Mn.call(e)}return!1}(t,e,p,n,r,i,o);if(!(1&n)){var M=w&&Et.call(t,"__wrapped__"),D=S&&Et.call(e,"__wrapped__");if(M||D){var C=M?t.value():t,R=D?e.value():e;return o||(o=new Un),i(C,R,n,r,o)}}if(!A)return!1;return o||(o=new Un),function(t,e,n,r,i,o){var s=1&n,a=Wi(t),l=a.length,u=Wi(e).length;if(l!=u&&!s)return!1;var c=l;for(;c--;){var h=a[c];if(!(s?h in e:Et.call(e,h)))return!1}var d=o.get(t),p=o.get(e);if(d&&p)return d==e&&p==t;var f=!0;o.set(t,e),o.set(e,t);var m=s;for(;++c<l;){h=a[c];var g=t[h],v=e[h];if(r)var y=s?r(v,g,h,e,t,o):r(g,v,h,t,e,o);if(!(void 0===y?g===v||i(g,v,n,r,o):y)){f=!1;break}m||(m="constructor"==h)}if(f&&!m){var _=t.constructor,b=e.constructor;_==b||!("constructor"in t)||!("constructor"in e)||"function"==typeof _&&_ instanceof _&&"function"==typeof b&&b instanceof b||(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,r,i,o)}(t,e,n,r,xr,i))}function wr(t,e,n,r){var i=n.length,o=i,s=!r;if(null==t)return!o;for(t=ft(t);i--;){var a=n[i];if(s&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++i<o;){var l=(a=n[i])[0],u=t[l],c=a[1];if(s&&a[2]){if(void 0===u&&!(l in t))return!1}else{var h=new Un;if(r)var d=r(u,c,l,t,e,h);if(!(void 0===d?xr(c,u,3,r,h):d))return!1}}return!0}function Er(t){return!(!Vs(t)||(e=t,St&&St in e))&&(zs(t)?Ct:st).test(Do(t));var e}function Tr(t){return"function"==typeof t?t:null==t?Ya:"object"==typeof t?Ls(t)?Rr(t[0],t[1]):Cr(t):nl(t)}function Sr(t){if(!po(t))return sn(t);var e=[];for(var n in ft(t))Et.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Ar(t){if(!Vs(t))return function(t){var e=[];if(null!=t)for(var n in ft(t))e.push(n);return e}(t);var e=po(t),n=[];for(var r in t)("constructor"!=r||!e&&Et.call(t,r))&&n.push(r);return n}function Mr(t,e){return t<e}function Dr(t,e){var n=-1,i=Fs(t)?r(t.length):[];return er(t,(function(t,r,o){i[++n]=e(t,r,o)})),i}function Cr(t){var e=Qi(t);return 1==e.length&&e[0][2]?mo(e[0][0],e[0][1]):function(n){return n===t||wr(n,t,e)}}function Rr(t,e){return uo(t)&&fo(e)?mo(Mo(t),e):function(n){var r=ga(n,t);return void 0===r&&r===e?va(n,t):xr(e,r,3)}}function Or(t,e,n,r,i){t!==e&&ar(e,(function(o,s){if(i||(i=new Un),Vs(o))!function(t,e,n,r,i,o,s){var a=_o(t,n),l=_o(e,n),u=s.get(l);if(u)return void jn(t,n,u);var c=o?o(a,l,n+"",t,e,s):void 0,h=void 0===c;if(h){var d=Ls(l),p=!d&&Us(l),f=!d&&!p&&Qs(l);c=l,d||p||f?Ls(a)?c=a:ks(a)?c=yi(a):p?(h=!1,c=di(l,!0)):f?(h=!1,c=fi(l,!0)):c=[]:qs(l)||Is(l)?(c=a,Is(a)?c=aa(a):Vs(a)&&!zs(a)||(c=oo(l))):h=!1}h&&(s.set(l,c),i(c,l,r,o,s),s.delete(l));jn(t,n,c)}(t,e,s,n,Or,r,i);else{var a=r?r(_o(t,s),o,s+"",t,e,i):void 0;void 0===a&&(a=o),jn(t,s,a)}}),wa)}function Pr(t,e){var n=t.length;if(n)return ao(e+=e<0?n:0,n)?t[e]:void 0}function Ir(t,e,n){e=e.length?pe(e,(function(t){return Ls(t)?function(e){return dr(e,1===t.length?t[0]:t)}:t})):[Ya];var r=-1;return e=pe(e,Oe(Zi())),function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(Dr(t,(function(t,n,i){return{criteria:pe(e,(function(e){return e(t)})),index:++r,value:t}})),(function(t,e){return function(t,e,n){var r=-1,i=t.criteria,o=e.criteria,s=i.length,a=n.length;for(;++r<s;){var l=mi(i[r],o[r]);if(l){if(r>=a)return l;var u=n[r];return l*("desc"==u?-1:1)}}return t.index-e.index}(t,e,n)}))}function Lr(t,e,n){for(var r=-1,i=e.length,o={};++r<i;){var s=e[r],a=dr(t,s);n(a,s)&&Hr(o,li(s,t),a)}return o}function Nr(t,e,n,r){var i=r?we:xe,o=-1,s=e.length,a=t;for(t===e&&(e=yi(e)),n&&(a=pe(t,Oe(n)));++o<s;)for(var l=0,u=e[o],c=n?n(u):u;(l=i(a,c,l,r))>-1;)a!==t&&qt.call(a,l,1),qt.call(t,l,1);return t}function Fr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var i=e[n];if(n==r||i!==o){var o=i;ao(i)?qt.call(t,i,1):ti(t,i)}}return t}function kr(t,e){return t+tn(hn()*(e-t+1))}function Ur(t,e){var n="";if(!t||e<1||e>9007199254740991)return n;do{e%2&&(n+=t),(e=tn(e/2))&&(t+=t)}while(e);return n}function Br(t,e){return wo(go(t,e,Ya),t+"")}function Gr(t){return Gn(Ra(t))}function zr(t,e){var n=Ra(t);return So(n,Kn(e,0,n.length))}function Hr(t,e,n,r){if(!Vs(t))return t;for(var i=-1,o=(e=li(e,t)).length,s=o-1,a=t;null!=a&&++i<o;){var l=Mo(e[i]),u=n;if("__proto__"===l||"constructor"===l||"prototype"===l)return t;if(i!=s){var c=a[l];void 0===(u=r?r(c,l,a):void 0)&&(u=Vs(c)?c:ao(e[i+1])?[]:{})}Vn(a,l,u),a=a[l]}return t}var jr=_n?function(t,e){return _n.set(t,e),t}:Ya,Vr=ye?function(t,e){return ye(t,"toString",{configurable:!0,enumerable:!1,value:Va(e),writable:!0})}:Ya;function Xr(t){return So(Ra(t))}function Wr(t,e,n){var i=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var s=r(o);++i<o;)s[i]=t[i+e];return s}function Yr(t,e){var n;return er(t,(function(t,r,i){return!(n=e(t,r,i))})),!!n}function qr(t,e,n){var r=0,i=null==t?r:t.length;if("number"==typeof e&&e==e&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=t[o];null!==s&&!Js(s)&&(n?s<=e:s<e)?r=o+1:i=o}return i}return $r(t,e,Ya,n)}function $r(t,e,n,r){var i=0,o=null==t?0:t.length;if(0===o)return 0;for(var s=(e=n(e))!=e,a=null===e,l=Js(e),u=void 0===e;i<o;){var c=tn((i+o)/2),h=n(t[c]),d=void 0!==h,p=null===h,f=h==h,m=Js(h);if(s)var g=r||f;else g=u?f&&(r||d):a?f&&d&&(r||!p):l?f&&d&&!p&&(r||!m):!p&&!m&&(r?h<=e:h<e);g?i=c+1:o=c}return ln(o,4294967294)}function Kr(t,e){for(var n=-1,r=t.length,i=0,o=[];++n<r;){var s=t[n],a=e?e(s):s;if(!n||!Rs(a,l)){var l=a;o[i++]=0===s?0:s}}return o}function Zr(t){return"number"==typeof t?t:Js(t)?NaN:+t}function Jr(t){if("string"==typeof t)return t;if(Ls(t))return pe(t,Jr)+"";if(Js(t))return Dn?Dn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Qr(t,e,n){var r=-1,i=he,o=t.length,s=!0,a=[],l=a;if(n)s=!1,i=de;else if(o>=200){var u=e?null:Ui(t);if(u)return Ve(u);s=!1,i=Ie,l=new kn}else l=e?[]:a;t:for(;++r<o;){var c=t[r],h=e?e(c):c;if(c=n||0!==c?c:0,s&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue t;e&&l.push(h),a.push(c)}else i(l,h,n)||(l!==a&&l.push(h),a.push(c))}return a}function ti(t,e){return null==(t=vo(t,e=li(e,t)))||delete t[Mo(Go(e))]}function ei(t,e,n,r){return Hr(t,e,n(dr(t,e)),r)}function ni(t,e,n,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&e(t[o],o,t););return n?Wr(t,r?0:o,r?o+1:i):Wr(t,r?o+1:0,r?i:o)}function ri(t,e){var n=t;return n instanceof In&&(n=n.value()),me(e,(function(t,e){return e.func.apply(e.thisArg,fe([t],e.args))}),n)}function ii(t,e,n){var i=t.length;if(i<2)return i?Qr(t[0]):[];for(var o=-1,s=r(i);++o<i;)for(var a=t[o],l=-1;++l<i;)l!=o&&(s[o]=tr(s[o]||a,t[l],e,n));return Qr(sr(s,1),e,n)}function oi(t,e,n){for(var r=-1,i=t.length,o=e.length,s={};++r<i;){var a=r<o?e[r]:void 0;n(s,t[r],a)}return s}function si(t){return ks(t)?t:[]}function ai(t){return"function"==typeof t?t:Ya}function li(t,e){return Ls(t)?t:uo(t,e)?[t]:Ao(la(t))}var ui=Br;function ci(t,e,n){var r=t.length;return n=void 0===n?r:n,!e&&n>=r?t:Wr(t,e,n)}var hi=Ae||function(t){return Yt.clearTimeout(t)};function di(t,e){if(e)return t.slice();var n=t.length,r=Ft?Ft(n):new t.constructor(n);return t.copy(r),r}function pi(t){var e=new t.constructor(t.byteLength);return new Lt(e).set(new Lt(t)),e}function fi(t,e){var n=e?pi(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function mi(t,e){if(t!==e){var n=void 0!==t,r=null===t,i=t==t,o=Js(t),s=void 0!==e,a=null===e,l=e==e,u=Js(e);if(!a&&!u&&!o&&t>e||o&&s&&l&&!a&&!u||r&&s&&l||!n&&l||!i)return 1;if(!r&&!o&&!u&&t<e||u&&n&&i&&!r&&!o||a&&n&&i||!s&&i||!l)return-1}return 0}function gi(t,e,n,i){for(var o=-1,s=t.length,a=n.length,l=-1,u=e.length,c=an(s-a,0),h=r(u+c),d=!i;++l<u;)h[l]=e[l];for(;++o<a;)(d||o<s)&&(h[n[o]]=t[o]);for(;c--;)h[l++]=t[o++];return h}function vi(t,e,n,i){for(var o=-1,s=t.length,a=-1,l=n.length,u=-1,c=e.length,h=an(s-l,0),d=r(h+c),p=!i;++o<h;)d[o]=t[o];for(var f=o;++u<c;)d[f+u]=e[u];for(;++a<l;)(p||o<s)&&(d[f+n[a]]=t[o++]);return d}function yi(t,e){var n=-1,i=t.length;for(e||(e=r(i));++n<i;)e[n]=t[n];return e}function _i(t,e,n,r){var i=!n;n||(n={});for(var o=-1,s=e.length;++o<s;){var a=e[o],l=r?r(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?qn(n,a,l):Vn(n,a,l)}return n}function bi(t,e){return function(n,r){var i=Ls(n)?se:Wn,o=e?e():{};return i(n,t,Zi(r,2),o)}}function xi(t){return Br((function(e,n){var r=-1,i=n.length,o=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(i--,o):void 0,s&&lo(n[0],n[1],s)&&(o=i<3?void 0:o,i=1),e=ft(e);++r<i;){var a=n[r];a&&t(e,a,r,o)}return e}))}function wi(t,e){return function(n,r){if(null==n)return n;if(!Fs(n))return t(n,r);for(var i=n.length,o=e?i:-1,s=ft(n);(e?o--:++o<i)&&!1!==r(s[o],o,s););return n}}function Ei(t){return function(e,n,r){for(var i=-1,o=ft(e),s=r(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(o[l],l,o))break}return e}}function Ti(t){return function(e){var n=Ge(e=la(e))?Ye(e):void 0,r=n?n[0]:e.charAt(0),i=n?ci(n,1).join(""):e.slice(1);return r[t]()+i}}function Si(t){return function(e){return me(za(Ia(e).replace(Pt,"")),t,"")}}function Ai(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Rn(t.prototype),r=t.apply(n,e);return Vs(r)?r:n}}function Mi(t){return function(e,n,r){var i=ft(e);if(!Fs(e)){var o=Zi(n,3);e=xa(e),n=function(t){return o(i[t],t,i)}}var s=t(e,n,r);return s>-1?i[o?e[s]:s]:void 0}}function Di(t){return Xi((function(e){var n=e.length,r=n,i=Pn.prototype.thru;for(t&&e.reverse();r--;){var s=e[r];if("function"!=typeof s)throw new vt(o);if(i&&!a&&"wrapper"==$i(s))var a=new Pn([],!0)}for(r=a?r:n;++r<n;){var l=$i(s=e[r]),u="wrapper"==l?qi(s):void 0;a=u&&co(u[0])&&424==u[1]&&!u[4].length&&1==u[9]?a[$i(u[0])].apply(a,u[3]):1==s.length&&co(s)?a[l]():a.thru(s)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Ls(r))return a.plant(r).value();for(var i=0,o=n?e[i].apply(this,t):r;++i<n;)o=e[i].call(this,o);return o}}))}function Ci(t,e,n,i,o,s,a,l,u,c){var h=128&e,d=1&e,p=2&e,f=24&e,m=512&e,g=p?void 0:Ai(t);return function v(){for(var y=arguments.length,_=r(y),b=y;b--;)_[b]=arguments[b];if(f)var x=Ki(v),w=Fe(_,x);if(i&&(_=gi(_,i,o,f)),s&&(_=vi(_,s,a,f)),y-=w,f&&y<c){var E=je(_,x);return Fi(t,e,Ci,v.placeholder,n,_,E,l,u,c-y)}var T=d?n:this,S=p?T[t]:t;return y=_.length,l?_=yo(_,l):m&&y>1&&_.reverse(),h&&u<y&&(_.length=u),this&&this!==Yt&&this instanceof v&&(S=g||Ai(S)),S.apply(T,_)}}function Ri(t,e){return function(n,r){return function(t,e,n,r){return ur(t,(function(t,i,o){e(r,n(t),i,o)})),r}(n,t,e(r),{})}}function Oi(t,e){return function(n,r){var i;if(void 0===n&&void 0===r)return e;if(void 0!==n&&(i=n),void 0!==r){if(void 0===i)return r;"string"==typeof n||"string"==typeof r?(n=Jr(n),r=Jr(r)):(n=Zr(n),r=Zr(r)),i=t(n,r)}return i}}function Pi(t){return Xi((function(e){return e=pe(e,Oe(Zi())),Br((function(n){var r=this;return t(e,(function(t){return oe(t,r,n)}))}))}))}function Ii(t,e){var n=(e=void 0===e?" ":Jr(e)).length;if(n<2)return n?Ur(e,t):e;var r=Ur(e,Qe(t/We(e)));return Ge(e)?ci(Ye(r),0,t).join(""):r.slice(0,t)}function Li(t){return function(e,n,i){return i&&"number"!=typeof i&&lo(e,n,i)&&(n=i=void 0),e=ra(e),void 0===n?(n=e,e=0):n=ra(n),function(t,e,n,i){for(var o=-1,s=an(Qe((e-t)/(n||1)),0),a=r(s);s--;)a[i?s:++o]=t,t+=n;return a}(e,n,i=void 0===i?e<n?1:-1:ra(i),t)}}function Ni(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=sa(e),n=sa(n)),t(e,n)}}function Fi(t,e,n,r,i,o,s,a,l,u){var c=8&e;e|=c?32:64,4&(e&=~(c?64:32))||(e&=-4);var h=[t,e,i,c?o:void 0,c?s:void 0,c?void 0:o,c?void 0:s,a,l,u],d=n.apply(void 0,h);return co(t)&&bo(d,h),d.placeholder=r,Eo(d,t,e)}function ki(t){var e=pt[t];return function(t,n){if(t=sa(t),(n=null==n?0:ln(ia(n),292))&&rn(t)){var r=(la(t)+"e").split("e");return+((r=(la(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Ui=gn&&1/Ve(new gn([,-0]))[1]==1/0?function(t){return new gn(t)}:Ja;function Bi(t){return function(e){var n=ro(e);return n==m?ze(e):n==_?Xe(e):function(t,e){return pe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function Gi(t,e,n,i,a,l,u,c){var h=2&e;if(!h&&"function"!=typeof t)throw new vt(o);var d=i?i.length:0;if(d||(e&=-97,i=a=void 0),u=void 0===u?u:an(ia(u),0),c=void 0===c?c:ia(c),d-=a?a.length:0,64&e){var p=i,f=a;i=a=void 0}var m=h?void 0:qi(t),g=[t,e,n,i,a,p,f,l,u,c];if(m&&function(t,e){var n=t[1],r=e[1],i=n|r,o=i<131,a=128==r&&8==n||128==r&&256==n&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!o&&!a)return t;1&r&&(t[2]=e[2],i|=1&n?0:4);var l=e[3];if(l){var u=t[3];t[3]=u?gi(u,l,e[4]):l,t[4]=u?je(t[3],s):e[4]}(l=e[5])&&(u=t[5],t[5]=u?vi(u,l,e[6]):l,t[6]=u?je(t[5],s):e[6]);(l=e[7])&&(t[7]=l);128&r&&(t[8]=null==t[8]?e[8]:ln(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=i}(g,m),t=g[0],e=g[1],n=g[2],i=g[3],a=g[4],!(c=g[9]=void 0===g[9]?h?0:t.length:an(g[9]-d,0))&&24&e&&(e&=-25),e&&1!=e)v=8==e||16==e?function(t,e,n){var i=Ai(t);return function o(){for(var s=arguments.length,a=r(s),l=s,u=Ki(o);l--;)a[l]=arguments[l];var c=s<3&&a[0]!==u&&a[s-1]!==u?[]:je(a,u);if((s-=c.length)<n)return Fi(t,e,Ci,o.placeholder,void 0,a,c,void 0,void 0,n-s);var h=this&&this!==Yt&&this instanceof o?i:t;return oe(h,this,a)}}(t,e,c):32!=e&&33!=e||a.length?Ci.apply(void 0,g):function(t,e,n,i){var o=1&e,s=Ai(t);return function e(){for(var a=-1,l=arguments.length,u=-1,c=i.length,h=r(c+l),d=this&&this!==Yt&&this instanceof e?s:t;++u<c;)h[u]=i[u];for(;l--;)h[u++]=arguments[++a];return oe(d,o?n:this,h)}}(t,e,n,i);else var v=function(t,e,n){var r=1&e,i=Ai(t);return function e(){var o=this&&this!==Yt&&this instanceof e?i:t;return o.apply(r?n:this,arguments)}}(t,e,n);return Eo((m?jr:bo)(v,g),t,e)}function zi(t,e,n,r){return void 0===t||Rs(t,bt[n])&&!Et.call(r,n)?e:t}function Hi(t,e,n,r,i,o){return Vs(t)&&Vs(e)&&(o.set(e,t),Or(t,e,void 0,Hi,o),o.delete(e)),t}function ji(t){return qs(t)?void 0:t}function Vi(t,e,n,r,i,o){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var u=o.get(t),c=o.get(e);if(u&&c)return u==e&&c==t;var h=-1,d=!0,p=2&n?new kn:void 0;for(o.set(t,e),o.set(e,t);++h<a;){var f=t[h],m=e[h];if(r)var g=s?r(m,f,h,e,t,o):r(f,m,h,t,e,o);if(void 0!==g){if(g)continue;d=!1;break}if(p){if(!ve(e,(function(t,e){if(!Ie(p,e)&&(f===t||i(f,t,n,r,o)))return p.push(e)}))){d=!1;break}}else if(f!==m&&!i(f,m,n,r,o)){d=!1;break}}return o.delete(t),o.delete(e),d}function Xi(t){return wo(go(t,void 0,No),t+"")}function Wi(t){return pr(t,xa,eo)}function Yi(t){return pr(t,wa,no)}var qi=_n?function(t){return _n.get(t)}:Ja;function $i(t){for(var e=t.name+"",n=bn[e],r=Et.call(bn,e)?n.length:0;r--;){var i=n[r],o=i.func;if(null==o||o==t)return i.name}return e}function Ki(t){return(Et.call(Cn,"placeholder")?Cn:t).placeholder}function Zi(){var t=Cn.iteratee||qa;return t=t===qa?Tr:t,arguments.length?t(arguments[0],arguments[1]):t}function Ji(t,e){var n,r,i=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof e?"string":"hash"]:i.map}function Qi(t){for(var e=xa(t),n=e.length;n--;){var r=e[n],i=t[r];e[n]=[r,i,fo(i)]}return e}function to(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return Er(n)?n:void 0}var eo=en?function(t){return null==t?[]:(t=ft(t),ce(en(t),(function(e){return Wt.call(t,e)})))}:ol,no=en?function(t){for(var e=[];t;)fe(e,eo(t)),t=Ht(t);return e}:ol,ro=fr;function io(t,e,n){for(var r=-1,i=(e=li(e,t)).length,o=!1;++r<i;){var s=Mo(e[r]);if(!(o=null!=t&&n(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&js(i)&&ao(s,i)&&(Ls(t)||Is(t))}function oo(t){return"function"!=typeof t.constructor||po(t)?{}:Rn(Ht(t))}function so(t){return Ls(t)||Is(t)||!!($t&&t&&t[$t])}function ao(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&lt.test(t))&&t>-1&&t%1==0&&t<e}function lo(t,e,n){if(!Vs(n))return!1;var r=typeof e;return!!("number"==r?Fs(n)&&ao(e,n.length):"string"==r&&e in n)&&Rs(n[e],t)}function uo(t,e){if(Ls(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!Js(t))||(V.test(t)||!j.test(t)||null!=e&&t in ft(e))}function co(t){var e=$i(t),n=Cn[e];if("function"!=typeof n||!(e in In.prototype))return!1;if(t===n)return!0;var r=qi(n);return!!r&&t===r[0]}(pn&&ro(new pn(new ArrayBuffer(1)))!=T||fn&&ro(new fn)!=m||mn&&"[object Promise]"!=ro(mn.resolve())||gn&&ro(new gn)!=_||vn&&ro(new vn)!=w)&&(ro=function(t){var e=fr(t),n=e==v?t.constructor:void 0,r=n?Do(n):"";if(r)switch(r){case xn:return T;case wn:return m;case En:return"[object Promise]";case Tn:return _;case Sn:return w}return e});var ho=xt?zs:sl;function po(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||bt)}function fo(t){return t==t&&!Vs(t)}function mo(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in ft(n)))}}function go(t,e,n){return e=an(void 0===e?t.length-1:e,0),function(){for(var i=arguments,o=-1,s=an(i.length-e,0),a=r(s);++o<s;)a[o]=i[e+o];o=-1;for(var l=r(e+1);++o<e;)l[o]=i[o];return l[e]=n(a),oe(t,this,l)}}function vo(t,e){return e.length<2?t:dr(t,Wr(e,0,-1))}function yo(t,e){for(var n=t.length,r=ln(e.length,n),i=yi(t);r--;){var o=e[r];t[r]=ao(o,n)?i[o]:void 0}return t}function _o(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var bo=To(jr),xo=Je||function(t,e){return Yt.setTimeout(t,e)},wo=To(Vr);function Eo(t,e,n){var r=e+"";return wo(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(K,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return ae(a,(function(n){var r="_."+n[0];e&n[1]&&!he(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(Z);return e?e[1].split(J):[]}(r),n)))}function To(t){var e=0,n=0;return function(){var r=un(),i=16-(r-n);if(n=r,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function So(t,e){var n=-1,r=t.length,i=r-1;for(e=void 0===e?r:e;++n<e;){var o=kr(n,i),s=t[o];t[o]=t[n],t[n]=s}return t.length=e,t}var Ao=function(t){var e=Ts(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(X,(function(t,n,r,i){e.push(r?i.replace(et,"$1"):n||t)})),e}));function Mo(t){if("string"==typeof t||Js(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function Do(t){if(null!=t){try{return wt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function Co(t){if(t instanceof In)return t.clone();var e=new Pn(t.__wrapped__,t.__chain__);return e.__actions__=yi(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Ro=Br((function(t,e){return ks(t)?tr(t,sr(e,1,ks,!0)):[]})),Oo=Br((function(t,e){var n=Go(e);return ks(n)&&(n=void 0),ks(t)?tr(t,sr(e,1,ks,!0),Zi(n,2)):[]})),Po=Br((function(t,e){var n=Go(e);return ks(n)&&(n=void 0),ks(t)?tr(t,sr(e,1,ks,!0),void 0,n):[]}));function Io(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=an(r+i,0)),be(t,Zi(e,3),i)}function Lo(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r-1;return void 0!==n&&(i=ia(n),i=n<0?an(r+i,0):ln(i,r-1)),be(t,Zi(e,3),i,!0)}function No(t){return(null==t?0:t.length)?sr(t,1):[]}function Fo(t){return t&&t.length?t[0]:void 0}var ko=Br((function(t){var e=pe(t,si);return e.length&&e[0]===t[0]?yr(e):[]})),Uo=Br((function(t){var e=Go(t),n=pe(t,si);return e===Go(n)?e=void 0:n.pop(),n.length&&n[0]===t[0]?yr(n,Zi(e,2)):[]})),Bo=Br((function(t){var e=Go(t),n=pe(t,si);return(e="function"==typeof e?e:void 0)&&n.pop(),n.length&&n[0]===t[0]?yr(n,void 0,e):[]}));function Go(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var zo=Br(Ho);function Ho(t,e){return t&&t.length&&e&&e.length?Nr(t,e):t}var jo=Xi((function(t,e){var n=null==t?0:t.length,r=$n(t,e);return Fr(t,pe(e,(function(t){return ao(t,n)?+t:t})).sort(mi)),r}));function Vo(t){return null==t?t:dn.call(t)}var Xo=Br((function(t){return Qr(sr(t,1,ks,!0))})),Wo=Br((function(t){var e=Go(t);return ks(e)&&(e=void 0),Qr(sr(t,1,ks,!0),Zi(e,2))})),Yo=Br((function(t){var e=Go(t);return e="function"==typeof e?e:void 0,Qr(sr(t,1,ks,!0),void 0,e)}));function qo(t){if(!t||!t.length)return[];var e=0;return t=ce(t,(function(t){if(ks(t))return e=an(t.length,e),!0})),Ce(e,(function(e){return pe(t,Se(e))}))}function $o(t,e){if(!t||!t.length)return[];var n=qo(t);return null==e?n:pe(n,(function(t){return oe(e,void 0,t)}))}var Ko=Br((function(t,e){return ks(t)?tr(t,e):[]})),Zo=Br((function(t){return ii(ce(t,ks))})),Jo=Br((function(t){var e=Go(t);return ks(e)&&(e=void 0),ii(ce(t,ks),Zi(e,2))})),Qo=Br((function(t){var e=Go(t);return e="function"==typeof e?e:void 0,ii(ce(t,ks),void 0,e)})),ts=Br(qo);var es=Br((function(t){var e=t.length,n=e>1?t[e-1]:void 0;return n="function"==typeof n?(t.pop(),n):void 0,$o(t,n)}));function ns(t){var e=Cn(t);return e.__chain__=!0,e}function rs(t,e){return e(t)}var is=Xi((function(t){var e=t.length,n=e?t[0]:0,r=this.__wrapped__,i=function(e){return $n(e,t)};return!(e>1||this.__actions__.length)&&r instanceof In&&ao(n)?((r=r.slice(n,+n+(e?1:0))).__actions__.push({func:rs,args:[i],thisArg:void 0}),new Pn(r,this.__chain__).thru((function(t){return e&&!t.length&&t.push(void 0),t}))):this.thru(i)}));var os=bi((function(t,e,n){Et.call(t,n)?++t[n]:qn(t,n,1)}));var ss=Mi(Io),as=Mi(Lo);function ls(t,e){return(Ls(t)?ae:er)(t,Zi(e,3))}function us(t,e){return(Ls(t)?le:nr)(t,Zi(e,3))}var cs=bi((function(t,e,n){Et.call(t,n)?t[n].push(e):qn(t,n,[e])}));var hs=Br((function(t,e,n){var i=-1,o="function"==typeof e,s=Fs(t)?r(t.length):[];return er(t,(function(t){s[++i]=o?oe(e,t,n):_r(t,e,n)})),s})),ds=bi((function(t,e,n){qn(t,n,e)}));function ps(t,e){return(Ls(t)?pe:Dr)(t,Zi(e,3))}var fs=bi((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var ms=Br((function(t,e){if(null==t)return[];var n=e.length;return n>1&&lo(t,e[0],e[1])?e=[]:n>2&&lo(e[0],e[1],e[2])&&(e=[e[0]]),Ir(t,sr(e,1),[])})),gs=Ze||function(){return Yt.Date.now()};function vs(t,e,n){return e=n?void 0:e,Gi(t,128,void 0,void 0,void 0,void 0,e=t&&null==e?t.length:e)}function ys(t,e){var n;if("function"!=typeof e)throw new vt(o);return t=ia(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=void 0),n}}var _s=Br((function(t,e,n){var r=1;if(n.length){var i=je(n,Ki(_s));r|=32}return Gi(t,r,e,n,i)})),bs=Br((function(t,e,n){var r=3;if(n.length){var i=je(n,Ki(bs));r|=32}return Gi(e,r,t,n,i)}));function xs(t,e,n){var r,i,s,a,l,u,c=0,h=!1,d=!1,p=!0;if("function"!=typeof t)throw new vt(o);function f(e){var n=r,o=i;return r=i=void 0,c=e,a=t.apply(o,n)}function m(t){return c=t,l=xo(v,e),h?f(t):a}function g(t){var n=t-u;return void 0===u||n>=e||n<0||d&&t-c>=s}function v(){var t=gs();if(g(t))return y(t);l=xo(v,function(t){var n=e-(t-u);return d?ln(n,s-(t-c)):n}(t))}function y(t){return l=void 0,p&&r?f(t):(r=i=void 0,a)}function _(){var t=gs(),n=g(t);if(r=arguments,i=this,u=t,n){if(void 0===l)return m(u);if(d)return hi(l),l=xo(v,e),f(u)}return void 0===l&&(l=xo(v,e)),a}return e=sa(e)||0,Vs(n)&&(h=!!n.leading,s=(d="maxWait"in n)?an(sa(n.maxWait)||0,e):s,p="trailing"in n?!!n.trailing:p),_.cancel=function(){void 0!==l&&hi(l),c=0,r=u=i=l=void 0},_.flush=function(){return void 0===l?a:y(gs())},_}var ws=Br((function(t,e){return Qn(t,1,e)})),Es=Br((function(t,e,n){return Qn(t,sa(e)||0,n)}));function Ts(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new vt(o);var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=n.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return n.cache=o.set(i,s)||o,s};return n.cache=new(Ts.Cache||Fn),n}function Ss(t){if("function"!=typeof t)throw new vt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Ts.Cache=Fn;var As=ui((function(t,e){var n=(e=1==e.length&&Ls(e[0])?pe(e[0],Oe(Zi())):pe(sr(e,1),Oe(Zi()))).length;return Br((function(r){for(var i=-1,o=ln(r.length,n);++i<o;)r[i]=e[i].call(this,r[i]);return oe(t,this,r)}))})),Ms=Br((function(t,e){return Gi(t,32,void 0,e,je(e,Ki(Ms)))})),Ds=Br((function(t,e){return Gi(t,64,void 0,e,je(e,Ki(Ds)))})),Cs=Xi((function(t,e){return Gi(t,256,void 0,void 0,void 0,e)}));function Rs(t,e){return t===e||t!=t&&e!=e}var Os=Ni(mr),Ps=Ni((function(t,e){return t>=e})),Is=br(function(){return arguments}())?br:function(t){return Xs(t)&&Et.call(t,"callee")&&!Wt.call(t,"callee")},Ls=r.isArray,Ns=Qt?Oe(Qt):function(t){return Xs(t)&&fr(t)==E};function Fs(t){return null!=t&&js(t.length)&&!zs(t)}function ks(t){return Xs(t)&&Fs(t)}var Us=nn||sl,Bs=te?Oe(te):function(t){return Xs(t)&&fr(t)==h};function Gs(t){if(!Xs(t))return!1;var e=fr(t);return e==d||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!qs(t)}function zs(t){if(!Vs(t))return!1;var e=fr(t);return e==p||e==f||"[object AsyncFunction]"==e||"[object Proxy]"==e}function Hs(t){return"number"==typeof t&&t==ia(t)}function js(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Vs(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Xs(t){return null!=t&&"object"==typeof t}var Ws=ee?Oe(ee):function(t){return Xs(t)&&ro(t)==m};function Ys(t){return"number"==typeof t||Xs(t)&&fr(t)==g}function qs(t){if(!Xs(t)||fr(t)!=v)return!1;var e=Ht(t);if(null===e)return!0;var n=Et.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&wt.call(n)==Mt}var $s=ne?Oe(ne):function(t){return Xs(t)&&fr(t)==y};var Ks=re?Oe(re):function(t){return Xs(t)&&ro(t)==_};function Zs(t){return"string"==typeof t||!Ls(t)&&Xs(t)&&fr(t)==b}function Js(t){return"symbol"==typeof t||Xs(t)&&fr(t)==x}var Qs=ie?Oe(ie):function(t){return Xs(t)&&js(t.length)&&!!Gt[fr(t)]};var ta=Ni(Mr),ea=Ni((function(t,e){return t<=e}));function na(t){if(!t)return[];if(Fs(t))return Zs(t)?Ye(t):yi(t);if(Zt&&t[Zt])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[Zt]());var e=ro(t);return(e==m?ze:e==_?Ve:Ra)(t)}function ra(t){return t?(t=sa(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ia(t){var e=ra(t),n=e%1;return e==e?n?e-n:e:0}function oa(t){return t?Kn(ia(t),0,4294967295):0}function sa(t){if("number"==typeof t)return t;if(Js(t))return NaN;if(Vs(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Vs(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Re(t);var n=ot.test(t);return n||at.test(t)?Vt(t.slice(2),n?2:8):it.test(t)?NaN:+t}function aa(t){return _i(t,wa(t))}function la(t){return null==t?"":Jr(t)}var ua=xi((function(t,e){if(po(e)||Fs(e))_i(e,xa(e),t);else for(var n in e)Et.call(e,n)&&Vn(t,n,e[n])})),ca=xi((function(t,e){_i(e,wa(e),t)})),ha=xi((function(t,e,n,r){_i(e,wa(e),t,r)})),da=xi((function(t,e,n,r){_i(e,xa(e),t,r)})),pa=Xi($n);var fa=Br((function(t,e){t=ft(t);var n=-1,r=e.length,i=r>2?e[2]:void 0;for(i&&lo(e[0],e[1],i)&&(r=1);++n<r;)for(var o=e[n],s=wa(o),a=-1,l=s.length;++a<l;){var u=s[a],c=t[u];(void 0===c||Rs(c,bt[u])&&!Et.call(t,u))&&(t[u]=o[u])}return t})),ma=Br((function(t){return t.push(void 0,Hi),oe(Ta,void 0,t)}));function ga(t,e,n){var r=null==t?void 0:dr(t,e);return void 0===r?n:r}function va(t,e){return null!=t&&io(t,e,vr)}var ya=Ri((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=At.call(e)),t[e]=n}),Va(Ya)),_a=Ri((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=At.call(e)),Et.call(t,e)?t[e].push(n):t[e]=[n]}),Zi),ba=Br(_r);function xa(t){return Fs(t)?Bn(t):Sr(t)}function wa(t){return Fs(t)?Bn(t,!0):Ar(t)}var Ea=xi((function(t,e,n){Or(t,e,n)})),Ta=xi((function(t,e,n,r){Or(t,e,n,r)})),Sa=Xi((function(t,e){var n={};if(null==t)return n;var r=!1;e=pe(e,(function(e){return e=li(e,t),r||(r=e.length>1),e})),_i(t,Yi(t),n),r&&(n=Zn(n,7,ji));for(var i=e.length;i--;)ti(n,e[i]);return n}));var Aa=Xi((function(t,e){return null==t?{}:function(t,e){return Lr(t,e,(function(e,n){return va(t,n)}))}(t,e)}));function Ma(t,e){if(null==t)return{};var n=pe(Yi(t),(function(t){return[t]}));return e=Zi(e),Lr(t,n,(function(t,n){return e(t,n[0])}))}var Da=Bi(xa),Ca=Bi(wa);function Ra(t){return null==t?[]:Pe(t,xa(t))}var Oa=Si((function(t,e,n){return e=e.toLowerCase(),t+(n?Pa(e):e)}));function Pa(t){return Ga(la(t).toLowerCase())}function Ia(t){return(t=la(t))&&t.replace(ut,ke).replace(It,"")}var La=Si((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Na=Si((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Fa=Ti("toLowerCase");var ka=Si((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ua=Si((function(t,e,n){return t+(n?" ":"")+Ga(e)}));var Ba=Si((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Ga=Ti("toUpperCase");function za(t,e,n){return t=la(t),void 0===(e=n?void 0:e)?function(t){return kt.test(t)}(t)?function(t){return t.match(Nt)||[]}(t):function(t){return t.match(Q)||[]}(t):t.match(e)||[]}var Ha=Br((function(t,e){try{return oe(t,void 0,e)}catch(t){return Gs(t)?t:new $(t)}})),ja=Xi((function(t,e){return ae(e,(function(e){e=Mo(e),qn(t,e,_s(t[e],t))})),t}));function Va(t){return function(){return t}}var Xa=Di(),Wa=Di(!0);function Ya(t){return t}function qa(t){return Tr("function"==typeof t?t:Zn(t,1))}var $a=Br((function(t,e){return function(n){return _r(n,t,e)}})),Ka=Br((function(t,e){return function(n){return _r(t,n,e)}}));function Za(t,e,n){var r=xa(e),i=hr(e,r);null!=n||Vs(e)&&(i.length||!r.length)||(n=e,e=t,t=this,i=hr(e,xa(e)));var o=!(Vs(n)&&"chain"in n&&!n.chain),s=zs(t);return ae(i,(function(n){var r=e[n];t[n]=r,s&&(t.prototype[n]=function(){var e=this.__chain__;if(o||e){var n=t(this.__wrapped__),i=n.__actions__=yi(this.__actions__);return i.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,fe([this.value()],arguments))})})),t}function Ja(){}var Qa=Pi(pe),tl=Pi(ue),el=Pi(ve);function nl(t){return uo(t)?Se(Mo(t)):function(t){return function(e){return dr(e,t)}}(t)}var rl=Li(),il=Li(!0);function ol(){return[]}function sl(){return!1}var al=Oi((function(t,e){return t+e}),0),ll=ki("ceil"),ul=Oi((function(t,e){return t/e}),1),cl=ki("floor");var hl,dl=Oi((function(t,e){return t*e}),1),pl=ki("round"),fl=Oi((function(t,e){return t-e}),0);return Cn.after=function(t,e){if("function"!=typeof e)throw new vt(o);return t=ia(t),function(){if(--t<1)return e.apply(this,arguments)}},Cn.ary=vs,Cn.assign=ua,Cn.assignIn=ca,Cn.assignInWith=ha,Cn.assignWith=da,Cn.at=pa,Cn.before=ys,Cn.bind=_s,Cn.bindAll=ja,Cn.bindKey=bs,Cn.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Ls(t)?t:[t]},Cn.chain=ns,Cn.chunk=function(t,e,n){e=(n?lo(t,e,n):void 0===e)?1:an(ia(e),0);var i=null==t?0:t.length;if(!i||e<1)return[];for(var o=0,s=0,a=r(Qe(i/e));o<i;)a[s++]=Wr(t,o,o+=e);return a},Cn.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,i=[];++e<n;){var o=t[e];o&&(i[r++]=o)}return i},Cn.concat=function(){var t=arguments.length;if(!t)return[];for(var e=r(t-1),n=arguments[0],i=t;i--;)e[i-1]=arguments[i];return fe(Ls(n)?yi(n):[n],sr(e,1))},Cn.cond=function(t){var e=null==t?0:t.length,n=Zi();return t=e?pe(t,(function(t){if("function"!=typeof t[1])throw new vt(o);return[n(t[0]),t[1]]})):[],Br((function(n){for(var r=-1;++r<e;){var i=t[r];if(oe(i[0],this,n))return oe(i[1],this,n)}}))},Cn.conforms=function(t){return function(t){var e=xa(t);return function(n){return Jn(n,t,e)}}(Zn(t,1))},Cn.constant=Va,Cn.countBy=os,Cn.create=function(t,e){var n=Rn(t);return null==e?n:Yn(n,e)},Cn.curry=function t(e,n,r){var i=Gi(e,8,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Cn.curryRight=function t(e,n,r){var i=Gi(e,16,void 0,void 0,void 0,void 0,void 0,n=r?void 0:n);return i.placeholder=t.placeholder,i},Cn.debounce=xs,Cn.defaults=fa,Cn.defaultsDeep=ma,Cn.defer=ws,Cn.delay=Es,Cn.difference=Ro,Cn.differenceBy=Oo,Cn.differenceWith=Po,Cn.drop=function(t,e,n){var r=null==t?0:t.length;return r?Wr(t,(e=n||void 0===e?1:ia(e))<0?0:e,r):[]},Cn.dropRight=function(t,e,n){var r=null==t?0:t.length;return r?Wr(t,0,(e=r-(e=n||void 0===e?1:ia(e)))<0?0:e):[]},Cn.dropRightWhile=function(t,e){return t&&t.length?ni(t,Zi(e,3),!0,!0):[]},Cn.dropWhile=function(t,e){return t&&t.length?ni(t,Zi(e,3),!0):[]},Cn.fill=function(t,e,n,r){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&lo(t,e,n)&&(n=0,r=i),function(t,e,n,r){var i=t.length;for((n=ia(n))<0&&(n=-n>i?0:i+n),(r=void 0===r||r>i?i:ia(r))<0&&(r+=i),r=n>r?0:oa(r);n<r;)t[n++]=e;return t}(t,e,n,r)):[]},Cn.filter=function(t,e){return(Ls(t)?ce:or)(t,Zi(e,3))},Cn.flatMap=function(t,e){return sr(ps(t,e),1)},Cn.flatMapDeep=function(t,e){return sr(ps(t,e),1/0)},Cn.flatMapDepth=function(t,e,n){return n=void 0===n?1:ia(n),sr(ps(t,e),n)},Cn.flatten=No,Cn.flattenDeep=function(t){return(null==t?0:t.length)?sr(t,1/0):[]},Cn.flattenDepth=function(t,e){return(null==t?0:t.length)?sr(t,e=void 0===e?1:ia(e)):[]},Cn.flip=function(t){return Gi(t,512)},Cn.flow=Xa,Cn.flowRight=Wa,Cn.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var i=t[e];r[i[0]]=i[1]}return r},Cn.functions=function(t){return null==t?[]:hr(t,xa(t))},Cn.functionsIn=function(t){return null==t?[]:hr(t,wa(t))},Cn.groupBy=cs,Cn.initial=function(t){return(null==t?0:t.length)?Wr(t,0,-1):[]},Cn.intersection=ko,Cn.intersectionBy=Uo,Cn.intersectionWith=Bo,Cn.invert=ya,Cn.invertBy=_a,Cn.invokeMap=hs,Cn.iteratee=qa,Cn.keyBy=ds,Cn.keys=xa,Cn.keysIn=wa,Cn.map=ps,Cn.mapKeys=function(t,e){var n={};return e=Zi(e,3),ur(t,(function(t,r,i){qn(n,e(t,r,i),t)})),n},Cn.mapValues=function(t,e){var n={};return e=Zi(e,3),ur(t,(function(t,r,i){qn(n,r,e(t,r,i))})),n},Cn.matches=function(t){return Cr(Zn(t,1))},Cn.matchesProperty=function(t,e){return Rr(t,Zn(e,1))},Cn.memoize=Ts,Cn.merge=Ea,Cn.mergeWith=Ta,Cn.method=$a,Cn.methodOf=Ka,Cn.mixin=Za,Cn.negate=Ss,Cn.nthArg=function(t){return t=ia(t),Br((function(e){return Pr(e,t)}))},Cn.omit=Sa,Cn.omitBy=function(t,e){return Ma(t,Ss(Zi(e)))},Cn.once=function(t){return ys(2,t)},Cn.orderBy=function(t,e,n,r){return null==t?[]:(Ls(e)||(e=null==e?[]:[e]),Ls(n=r?void 0:n)||(n=null==n?[]:[n]),Ir(t,e,n))},Cn.over=Qa,Cn.overArgs=As,Cn.overEvery=tl,Cn.overSome=el,Cn.partial=Ms,Cn.partialRight=Ds,Cn.partition=fs,Cn.pick=Aa,Cn.pickBy=Ma,Cn.property=nl,Cn.propertyOf=function(t){return function(e){return null==t?void 0:dr(t,e)}},Cn.pull=zo,Cn.pullAll=Ho,Cn.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Nr(t,e,Zi(n,2)):t},Cn.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Nr(t,e,void 0,n):t},Cn.pullAt=jo,Cn.range=rl,Cn.rangeRight=il,Cn.rearg=Cs,Cn.reject=function(t,e){return(Ls(t)?ce:or)(t,Ss(Zi(e,3)))},Cn.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,i=[],o=t.length;for(e=Zi(e,3);++r<o;){var s=t[r];e(s,r,t)&&(n.push(s),i.push(r))}return Fr(t,i),n},Cn.rest=function(t,e){if("function"!=typeof t)throw new vt(o);return Br(t,e=void 0===e?e:ia(e))},Cn.reverse=Vo,Cn.sampleSize=function(t,e,n){return e=(n?lo(t,e,n):void 0===e)?1:ia(e),(Ls(t)?zn:zr)(t,e)},Cn.set=function(t,e,n){return null==t?t:Hr(t,e,n)},Cn.setWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:Hr(t,e,n,r)},Cn.shuffle=function(t){return(Ls(t)?Hn:Xr)(t)},Cn.slice=function(t,e,n){var r=null==t?0:t.length;return r?(n&&"number"!=typeof n&&lo(t,e,n)?(e=0,n=r):(e=null==e?0:ia(e),n=void 0===n?r:ia(n)),Wr(t,e,n)):[]},Cn.sortBy=ms,Cn.sortedUniq=function(t){return t&&t.length?Kr(t):[]},Cn.sortedUniqBy=function(t,e){return t&&t.length?Kr(t,Zi(e,2)):[]},Cn.split=function(t,e,n){return n&&"number"!=typeof n&&lo(t,e,n)&&(e=n=void 0),(n=void 0===n?4294967295:n>>>0)?(t=la(t))&&("string"==typeof e||null!=e&&!$s(e))&&!(e=Jr(e))&&Ge(t)?ci(Ye(t),0,n):t.split(e,n):[]},Cn.spread=function(t,e){if("function"!=typeof t)throw new vt(o);return e=null==e?0:an(ia(e),0),Br((function(n){var r=n[e],i=ci(n,0,e);return r&&fe(i,r),oe(t,this,i)}))},Cn.tail=function(t){var e=null==t?0:t.length;return e?Wr(t,1,e):[]},Cn.take=function(t,e,n){return t&&t.length?Wr(t,0,(e=n||void 0===e?1:ia(e))<0?0:e):[]},Cn.takeRight=function(t,e,n){var r=null==t?0:t.length;return r?Wr(t,(e=r-(e=n||void 0===e?1:ia(e)))<0?0:e,r):[]},Cn.takeRightWhile=function(t,e){return t&&t.length?ni(t,Zi(e,3),!1,!0):[]},Cn.takeWhile=function(t,e){return t&&t.length?ni(t,Zi(e,3)):[]},Cn.tap=function(t,e){return e(t),t},Cn.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new vt(o);return Vs(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),xs(t,e,{leading:r,maxWait:e,trailing:i})},Cn.thru=rs,Cn.toArray=na,Cn.toPairs=Da,Cn.toPairsIn=Ca,Cn.toPath=function(t){return Ls(t)?pe(t,Mo):Js(t)?[t]:yi(Ao(la(t)))},Cn.toPlainObject=aa,Cn.transform=function(t,e,n){var r=Ls(t),i=r||Us(t)||Qs(t);if(e=Zi(e,4),null==n){var o=t&&t.constructor;n=i?r?new o:[]:Vs(t)&&zs(o)?Rn(Ht(t)):{}}return(i?ae:ur)(t,(function(t,r,i){return e(n,t,r,i)})),n},Cn.unary=function(t){return vs(t,1)},Cn.union=Xo,Cn.unionBy=Wo,Cn.unionWith=Yo,Cn.uniq=function(t){return t&&t.length?Qr(t):[]},Cn.uniqBy=function(t,e){return t&&t.length?Qr(t,Zi(e,2)):[]},Cn.uniqWith=function(t,e){return e="function"==typeof e?e:void 0,t&&t.length?Qr(t,void 0,e):[]},Cn.unset=function(t,e){return null==t||ti(t,e)},Cn.unzip=qo,Cn.unzipWith=$o,Cn.update=function(t,e,n){return null==t?t:ei(t,e,ai(n))},Cn.updateWith=function(t,e,n,r){return r="function"==typeof r?r:void 0,null==t?t:ei(t,e,ai(n),r)},Cn.values=Ra,Cn.valuesIn=function(t){return null==t?[]:Pe(t,wa(t))},Cn.without=Ko,Cn.words=za,Cn.wrap=function(t,e){return Ms(ai(e),t)},Cn.xor=Zo,Cn.xorBy=Jo,Cn.xorWith=Qo,Cn.zip=ts,Cn.zipObject=function(t,e){return oi(t||[],e||[],Vn)},Cn.zipObjectDeep=function(t,e){return oi(t||[],e||[],Hr)},Cn.zipWith=es,Cn.entries=Da,Cn.entriesIn=Ca,Cn.extend=ca,Cn.extendWith=ha,Za(Cn,Cn),Cn.add=al,Cn.attempt=Ha,Cn.camelCase=Oa,Cn.capitalize=Pa,Cn.ceil=ll,Cn.clamp=function(t,e,n){return void 0===n&&(n=e,e=void 0),void 0!==n&&(n=(n=sa(n))==n?n:0),void 0!==e&&(e=(e=sa(e))==e?e:0),Kn(sa(t),e,n)},Cn.clone=function(t){return Zn(t,4)},Cn.cloneDeep=function(t){return Zn(t,5)},Cn.cloneDeepWith=function(t,e){return Zn(t,5,e="function"==typeof e?e:void 0)},Cn.cloneWith=function(t,e){return Zn(t,4,e="function"==typeof e?e:void 0)},Cn.conformsTo=function(t,e){return null==e||Jn(t,e,xa(e))},Cn.deburr=Ia,Cn.defaultTo=function(t,e){return null==t||t!=t?e:t},Cn.divide=ul,Cn.endsWith=function(t,e,n){t=la(t),e=Jr(e);var r=t.length,i=n=void 0===n?r:Kn(ia(n),0,r);return(n-=e.length)>=0&&t.slice(n,i)==e},Cn.eq=Rs,Cn.escape=function(t){return(t=la(t))&&B.test(t)?t.replace(k,Ue):t},Cn.escapeRegExp=function(t){return(t=la(t))&&Y.test(t)?t.replace(W,"\\$&"):t},Cn.every=function(t,e,n){var r=Ls(t)?ue:rr;return n&&lo(t,e,n)&&(e=void 0),r(t,Zi(e,3))},Cn.find=ss,Cn.findIndex=Io,Cn.findKey=function(t,e){return _e(t,Zi(e,3),ur)},Cn.findLast=as,Cn.findLastIndex=Lo,Cn.findLastKey=function(t,e){return _e(t,Zi(e,3),cr)},Cn.floor=cl,Cn.forEach=ls,Cn.forEachRight=us,Cn.forIn=function(t,e){return null==t?t:ar(t,Zi(e,3),wa)},Cn.forInRight=function(t,e){return null==t?t:lr(t,Zi(e,3),wa)},Cn.forOwn=function(t,e){return t&&ur(t,Zi(e,3))},Cn.forOwnRight=function(t,e){return t&&cr(t,Zi(e,3))},Cn.get=ga,Cn.gt=Os,Cn.gte=Ps,Cn.has=function(t,e){return null!=t&&io(t,e,gr)},Cn.hasIn=va,Cn.head=Fo,Cn.identity=Ya,Cn.includes=function(t,e,n,r){t=Fs(t)?t:Ra(t),n=n&&!r?ia(n):0;var i=t.length;return n<0&&(n=an(i+n,0)),Zs(t)?n<=i&&t.indexOf(e,n)>-1:!!i&&xe(t,e,n)>-1},Cn.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=null==n?0:ia(n);return i<0&&(i=an(r+i,0)),xe(t,e,i)},Cn.inRange=function(t,e,n){return e=ra(e),void 0===n?(n=e,e=0):n=ra(n),function(t,e,n){return t>=ln(e,n)&&t<an(e,n)}(t=sa(t),e,n)},Cn.invoke=ba,Cn.isArguments=Is,Cn.isArray=Ls,Cn.isArrayBuffer=Ns,Cn.isArrayLike=Fs,Cn.isArrayLikeObject=ks,Cn.isBoolean=function(t){return!0===t||!1===t||Xs(t)&&fr(t)==c},Cn.isBuffer=Us,Cn.isDate=Bs,Cn.isElement=function(t){return Xs(t)&&1===t.nodeType&&!qs(t)},Cn.isEmpty=function(t){if(null==t)return!0;if(Fs(t)&&(Ls(t)||"string"==typeof t||"function"==typeof t.splice||Us(t)||Qs(t)||Is(t)))return!t.length;var e=ro(t);if(e==m||e==_)return!t.size;if(po(t))return!Sr(t).length;for(var n in t)if(Et.call(t,n))return!1;return!0},Cn.isEqual=function(t,e){return xr(t,e)},Cn.isEqualWith=function(t,e,n){var r=(n="function"==typeof n?n:void 0)?n(t,e):void 0;return void 0===r?xr(t,e,void 0,n):!!r},Cn.isError=Gs,Cn.isFinite=function(t){return"number"==typeof t&&rn(t)},Cn.isFunction=zs,Cn.isInteger=Hs,Cn.isLength=js,Cn.isMap=Ws,Cn.isMatch=function(t,e){return t===e||wr(t,e,Qi(e))},Cn.isMatchWith=function(t,e,n){return n="function"==typeof n?n:void 0,wr(t,e,Qi(e),n)},Cn.isNaN=function(t){return Ys(t)&&t!=+t},Cn.isNative=function(t){if(ho(t))throw new $("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Er(t)},Cn.isNil=function(t){return null==t},Cn.isNull=function(t){return null===t},Cn.isNumber=Ys,Cn.isObject=Vs,Cn.isObjectLike=Xs,Cn.isPlainObject=qs,Cn.isRegExp=$s,Cn.isSafeInteger=function(t){return Hs(t)&&t>=-9007199254740991&&t<=9007199254740991},Cn.isSet=Ks,Cn.isString=Zs,Cn.isSymbol=Js,Cn.isTypedArray=Qs,Cn.isUndefined=function(t){return void 0===t},Cn.isWeakMap=function(t){return Xs(t)&&ro(t)==w},Cn.isWeakSet=function(t){return Xs(t)&&"[object WeakSet]"==fr(t)},Cn.join=function(t,e){return null==t?"":on.call(t,e)},Cn.kebabCase=La,Cn.last=Go,Cn.lastIndexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var i=r;return void 0!==n&&(i=(i=ia(n))<0?an(r+i,0):ln(i,r-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):be(t,Ee,i,!0)},Cn.lowerCase=Na,Cn.lowerFirst=Fa,Cn.lt=ta,Cn.lte=ea,Cn.max=function(t){return t&&t.length?ir(t,Ya,mr):void 0},Cn.maxBy=function(t,e){return t&&t.length?ir(t,Zi(e,2),mr):void 0},Cn.mean=function(t){return Te(t,Ya)},Cn.meanBy=function(t,e){return Te(t,Zi(e,2))},Cn.min=function(t){return t&&t.length?ir(t,Ya,Mr):void 0},Cn.minBy=function(t,e){return t&&t.length?ir(t,Zi(e,2),Mr):void 0},Cn.stubArray=ol,Cn.stubFalse=sl,Cn.stubObject=function(){return{}},Cn.stubString=function(){return""},Cn.stubTrue=function(){return!0},Cn.multiply=dl,Cn.nth=function(t,e){return t&&t.length?Pr(t,ia(e)):void 0},Cn.noConflict=function(){return Yt._===this&&(Yt._=Dt),this},Cn.noop=Ja,Cn.now=gs,Cn.pad=function(t,e,n){t=la(t);var r=(e=ia(e))?We(t):0;if(!e||r>=e)return t;var i=(e-r)/2;return Ii(tn(i),n)+t+Ii(Qe(i),n)},Cn.padEnd=function(t,e,n){t=la(t);var r=(e=ia(e))?We(t):0;return e&&r<e?t+Ii(e-r,n):t},Cn.padStart=function(t,e,n){t=la(t);var r=(e=ia(e))?We(t):0;return e&&r<e?Ii(e-r,n)+t:t},Cn.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),cn(la(t).replace(q,""),e||0)},Cn.random=function(t,e,n){if(n&&"boolean"!=typeof n&&lo(t,e,n)&&(e=n=void 0),void 0===n&&("boolean"==typeof e?(n=e,e=void 0):"boolean"==typeof t&&(n=t,t=void 0)),void 0===t&&void 0===e?(t=0,e=1):(t=ra(t),void 0===e?(e=t,t=0):e=ra(e)),t>e){var r=t;t=e,e=r}if(n||t%1||e%1){var i=hn();return ln(t+i*(e-t+jt("1e-"+((i+"").length-1))),e)}return kr(t,e)},Cn.reduce=function(t,e,n){var r=Ls(t)?me:Me,i=arguments.length<3;return r(t,Zi(e,4),n,i,er)},Cn.reduceRight=function(t,e,n){var r=Ls(t)?ge:Me,i=arguments.length<3;return r(t,Zi(e,4),n,i,nr)},Cn.repeat=function(t,e,n){return e=(n?lo(t,e,n):void 0===e)?1:ia(e),Ur(la(t),e)},Cn.replace=function(){var t=arguments,e=la(t[0]);return t.length<3?e:e.replace(t[1],t[2])},Cn.result=function(t,e,n){var r=-1,i=(e=li(e,t)).length;for(i||(i=1,t=void 0);++r<i;){var o=null==t?void 0:t[Mo(e[r])];void 0===o&&(r=i,o=n),t=zs(o)?o.call(t):o}return t},Cn.round=pl,Cn.runInContext=t,Cn.sample=function(t){return(Ls(t)?Gn:Gr)(t)},Cn.size=function(t){if(null==t)return 0;if(Fs(t))return Zs(t)?We(t):t.length;var e=ro(t);return e==m||e==_?t.size:Sr(t).length},Cn.snakeCase=ka,Cn.some=function(t,e,n){var r=Ls(t)?ve:Yr;return n&&lo(t,e,n)&&(e=void 0),r(t,Zi(e,3))},Cn.sortedIndex=function(t,e){return qr(t,e)},Cn.sortedIndexBy=function(t,e,n){return $r(t,e,Zi(n,2))},Cn.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=qr(t,e);if(r<n&&Rs(t[r],e))return r}return-1},Cn.sortedLastIndex=function(t,e){return qr(t,e,!0)},Cn.sortedLastIndexBy=function(t,e,n){return $r(t,e,Zi(n,2),!0)},Cn.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=qr(t,e,!0)-1;if(Rs(t[n],e))return n}return-1},Cn.startCase=Ua,Cn.startsWith=function(t,e,n){return t=la(t),n=null==n?0:Kn(ia(n),0,t.length),e=Jr(e),t.slice(n,n+e.length)==e},Cn.subtract=fl,Cn.sum=function(t){return t&&t.length?De(t,Ya):0},Cn.sumBy=function(t,e){return t&&t.length?De(t,Zi(e,2)):0},Cn.template=function(t,e,n){var r=Cn.templateSettings;n&&lo(t,e,n)&&(e=void 0),t=la(t),e=ha({},e,r,zi);var i,o,s=ha({},e.imports,r.imports,zi),a=xa(s),l=Pe(s,a),u=0,c=e.interpolate||ct,h="__p += '",d=mt((e.escape||ct).source+"|"+c.source+"|"+(c===H?nt:ct).source+"|"+(e.evaluate||ct).source+"|$","g"),p="//# sourceURL="+(Et.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Bt+"]")+"\n";t.replace(d,(function(e,n,r,s,a,l){return r||(r=s),h+=t.slice(u,l).replace(ht,Be),n&&(i=!0,h+="' +\n__e("+n+") +\n'"),a&&(o=!0,h+="';\n"+a+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),u=l+e.length,e})),h+="';\n";var f=Et.call(e,"variable")&&e.variable;if(f){if(tt.test(f))throw new $("Invalid `variable` option passed into `_.template`")}else h="with (obj) {\n"+h+"\n}\n";h=(o?h.replace(I,""):h).replace(L,"$1").replace(N,"$1;"),h="function("+(f||"obj")+") {\n"+(f?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var m=Ha((function(){return dt(a,p+"return "+h).apply(void 0,l)}));if(m.source=h,Gs(m))throw m;return m},Cn.times=function(t,e){if((t=ia(t))<1||t>9007199254740991)return[];var n=4294967295,r=ln(t,4294967295);t-=4294967295;for(var i=Ce(r,e=Zi(e));++n<t;)e(n);return i},Cn.toFinite=ra,Cn.toInteger=ia,Cn.toLength=oa,Cn.toLower=function(t){return la(t).toLowerCase()},Cn.toNumber=sa,Cn.toSafeInteger=function(t){return t?Kn(ia(t),-9007199254740991,9007199254740991):0===t?t:0},Cn.toString=la,Cn.toUpper=function(t){return la(t).toUpperCase()},Cn.trim=function(t,e,n){if((t=la(t))&&(n||void 0===e))return Re(t);if(!t||!(e=Jr(e)))return t;var r=Ye(t),i=Ye(e);return ci(r,Le(r,i),Ne(r,i)+1).join("")},Cn.trimEnd=function(t,e,n){if((t=la(t))&&(n||void 0===e))return t.slice(0,qe(t)+1);if(!t||!(e=Jr(e)))return t;var r=Ye(t);return ci(r,0,Ne(r,Ye(e))+1).join("")},Cn.trimStart=function(t,e,n){if((t=la(t))&&(n||void 0===e))return t.replace(q,"");if(!t||!(e=Jr(e)))return t;var r=Ye(t);return ci(r,Le(r,Ye(e))).join("")},Cn.truncate=function(t,e){var n=30,r="...";if(Vs(e)){var i="separator"in e?e.separator:i;n="length"in e?ia(e.length):n,r="omission"in e?Jr(e.omission):r}var o=(t=la(t)).length;if(Ge(t)){var s=Ye(t);o=s.length}if(n>=o)return t;var a=n-We(r);if(a<1)return r;var l=s?ci(s,0,a).join(""):t.slice(0,a);if(void 0===i)return l+r;if(s&&(a+=l.length-a),$s(i)){if(t.slice(a).search(i)){var u,c=l;for(i.global||(i=mt(i.source,la(rt.exec(i))+"g")),i.lastIndex=0;u=i.exec(c);)var h=u.index;l=l.slice(0,void 0===h?a:h)}}else if(t.indexOf(Jr(i),a)!=a){var d=l.lastIndexOf(i);d>-1&&(l=l.slice(0,d))}return l+r},Cn.unescape=function(t){return(t=la(t))&&U.test(t)?t.replace(F,$e):t},Cn.uniqueId=function(t){var e=++Tt;return la(t)+e},Cn.upperCase=Ba,Cn.upperFirst=Ga,Cn.each=ls,Cn.eachRight=us,Cn.first=Fo,Za(Cn,(hl={},ur(Cn,(function(t,e){Et.call(Cn.prototype,e)||(hl[e]=t)})),hl),{chain:!1}),Cn.VERSION="4.17.21",ae(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Cn[t].placeholder=Cn})),ae(["drop","take"],(function(t,e){In.prototype[t]=function(n){n=void 0===n?1:an(ia(n),0);var r=this.__filtered__&&!e?new In(this):this.clone();return r.__filtered__?r.__takeCount__=ln(n,r.__takeCount__):r.__views__.push({size:ln(n,4294967295),type:t+(r.__dir__<0?"Right":"")}),r},In.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),ae(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;In.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:Zi(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),ae(["head","last"],(function(t,e){var n="take"+(e?"Right":"");In.prototype[t]=function(){return this[n](1).value()[0]}})),ae(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");In.prototype[t]=function(){return this.__filtered__?new In(this):this[n](1)}})),In.prototype.compact=function(){return this.filter(Ya)},In.prototype.find=function(t){return this.filter(t).head()},In.prototype.findLast=function(t){return this.reverse().find(t)},In.prototype.invokeMap=Br((function(t,e){return"function"==typeof t?new In(this):this.map((function(n){return _r(n,t,e)}))})),In.prototype.reject=function(t){return this.filter(Ss(Zi(t)))},In.prototype.slice=function(t,e){t=ia(t);var n=this;return n.__filtered__&&(t>0||e<0)?new In(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),void 0!==e&&(n=(e=ia(e))<0?n.dropRight(-e):n.take(e-t)),n)},In.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},In.prototype.toArray=function(){return this.take(4294967295)},ur(In.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=Cn[r?"take"+("last"==e?"Right":""):e],o=r||/^find/.test(e);i&&(Cn.prototype[e]=function(){var e=this.__wrapped__,s=r?[1]:arguments,a=e instanceof In,l=s[0],u=a||Ls(e),c=function(t){var e=i.apply(Cn,fe([t],s));return r&&h?e[0]:e};u&&n&&"function"==typeof l&&1!=l.length&&(a=u=!1);var h=this.__chain__,d=!!this.__actions__.length,p=o&&!h,f=a&&!d;if(!o&&u){e=f?e:new In(this);var m=t.apply(e,s);return m.__actions__.push({func:rs,args:[c],thisArg:void 0}),new Pn(m,h)}return p&&f?t.apply(this,s):(m=this.thru(c),p?r?m.value()[0]:m.value():m)})})),ae(["pop","push","shift","sort","splice","unshift"],(function(t){var e=yt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Cn.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return e.apply(Ls(i)?i:[],t)}return this[n]((function(n){return e.apply(Ls(n)?n:[],t)}))}})),ur(In.prototype,(function(t,e){var n=Cn[e];if(n){var r=n.name+"";Et.call(bn,r)||(bn[r]=[]),bn[r].push({name:e,func:n})}})),bn[Ci(void 0,2).name]=[{name:"wrapper",func:void 0}],In.prototype.clone=function(){var t=new In(this.__wrapped__);return t.__actions__=yi(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=yi(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=yi(this.__views__),t},In.prototype.reverse=function(){if(this.__filtered__){var t=new In(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},In.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=Ls(t),r=e<0,i=n?t.length:0,o=function(t,e,n){var r=-1,i=n.length;for(;++r<i;){var o=n[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":e-=s;break;case"take":e=ln(e,t+s);break;case"takeRight":t=an(t,e-s)}}return{start:t,end:e}}(0,i,this.__views__),s=o.start,a=o.end,l=a-s,u=r?a:s-1,c=this.__iteratees__,h=c.length,d=0,p=ln(l,this.__takeCount__);if(!n||!r&&i==l&&p==l)return ri(t,this.__actions__);var f=[];t:for(;l--&&d<p;){for(var m=-1,g=t[u+=e];++m<h;){var v=c[m],y=v.iteratee,_=v.type,b=y(g);if(2==_)g=b;else if(!b){if(1==_)continue t;break t}}f[d++]=g}return f},Cn.prototype.at=is,Cn.prototype.chain=function(){return ns(this)},Cn.prototype.commit=function(){return new Pn(this.value(),this.__chain__)},Cn.prototype.next=function(){void 0===this.__values__&&(this.__values__=na(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?void 0:this.__values__[this.__index__++]}},Cn.prototype.plant=function(t){for(var e,n=this;n instanceof On;){var r=Co(n);r.__index__=0,r.__values__=void 0,e?i.__wrapped__=r:e=r;var i=r;n=n.__wrapped__}return i.__wrapped__=t,e},Cn.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof In){var e=t;return this.__actions__.length&&(e=new In(this)),(e=e.reverse()).__actions__.push({func:rs,args:[Vo],thisArg:void 0}),new Pn(e,this.__chain__)}return this.thru(Vo)},Cn.prototype.toJSON=Cn.prototype.valueOf=Cn.prototype.value=function(){return ri(this.__wrapped__,this.__actions__)},Cn.prototype.first=Cn.prototype.head,Zt&&(Cn.prototype[Zt]=function(){return this}),Cn}();Yt._=Ke,void 0===(i=function(){return Ke}.call(e,n,e,r))||(r.exports=i)}).call(this)}).call(this,n("yLpj"),n("YuTi")(t))},MgzW:function(t,e,n){"use strict";var r=Object.getOwnPropertySymbols,i=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)}t.exports=function(){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={},n=0;n<10;n++)e["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(t){r[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var n,a,l=s(t),u=1;u<arguments.length;u++){for(var c in n=Object(arguments[u]))i.call(n,c)&&(l[c]=n[c]);if(r){a=r(n);for(var h=0;h<a.length;h++)o.call(n,a[h])&&(l[a[h]]=n[a[h]])}}return l}},NlKh:function(t,e){},Ofh6:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,'/*! locomotive-scroll v4.1.3 | MIT License | https://github.com/locomotivemtl/locomotive-scroll */\nhtml.has-scroll-smooth {\n  overflow: hidden; }\n\nhtml.has-scroll-dragging {\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  user-select: none; }\n\n.has-scroll-smooth body {\n  overflow: hidden; }\n\n.has-scroll-smooth [data-scroll-container] {\n  min-height: 100vh; }\n\n[data-scroll-direction="horizontal"] [data-scroll-container] {\n  height: 100vh;\n  display: inline-block;\n  white-space: nowrap; }\n\n[data-scroll-direction="horizontal"] [data-scroll-section] {\n  display: inline-block;\n  vertical-align: top;\n  white-space: nowrap;\n  height: 100%; }\n\n.c-scrollbar {\n  position: absolute;\n  right: 0;\n  top: 0;\n  width: 11px;\n  height: 100%;\n  transform-origin: center right;\n  transition: transform 0.3s, opacity 0.3s;\n  opacity: 0; }\n  .c-scrollbar:hover {\n    transform: scaleX(1.45); }\n  .c-scrollbar:hover, .has-scroll-scrolling .c-scrollbar, .has-scroll-dragging .c-scrollbar {\n    opacity: 1; }\n  [data-scroll-direction="horizontal"] .c-scrollbar {\n    width: 100%;\n    height: 10px;\n    top: auto;\n    bottom: 0;\n    transform: scaleY(1); }\n    [data-scroll-direction="horizontal"] .c-scrollbar:hover {\n      transform: scaleY(1.3); }\n\n.c-scrollbar_thumb {\n  position: absolute;\n  top: 0;\n  right: 0;\n  background-color: black;\n  opacity: 0.5;\n  width: 7px;\n  border-radius: 10px;\n  margin: 2px;\n  cursor: grab; }\n  .has-scroll-dragging .c-scrollbar_thumb {\n    cursor: grabbing; }\n  [data-scroll-direction="horizontal"] .c-scrollbar_thumb {\n    right: auto;\n    bottom: 0; }\n',""])},PMrG:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"/**\n * Swiper 9.4.1\n * Most modern mobile touch slider and framework with hardware accelerated transitions\n * https://swiperjs.com\n *\n * Copyright 2014-2023 Vladimir Kharlampidi\n *\n * Released under the MIT License\n *\n * Released on: June 13, 2023\n */\n\n/* FONT_START */\n@font-face {\n  font-family: 'swiper-icons';\n  src: url('data:application/font-woff;charset=utf-8;base64, d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA');\n  font-weight: 400;\n  font-style: normal;\n}\n/* FONT_END */\n:root {\n  --swiper-theme-color: #007aff;\n  /*\n  --swiper-preloader-color: var(--swiper-theme-color);\n  --swiper-wrapper-transition-timing-function: initial;\n  */\n}\n.swiper,\nswiper-container {\n  margin-left: auto;\n  margin-right: auto;\n  position: relative;\n  overflow: hidden;\n  list-style: none;\n  padding: 0;\n  /* Fix of Webkit flickering */\n  z-index: 1;\n  display: block;\n}\n.swiper-vertical > .swiper-wrapper {\n  flex-direction: column;\n}\n.swiper-wrapper {\n  position: relative;\n  width: 100%;\n  height: 100%;\n  z-index: 1;\n  display: flex;\n  transition-property: transform;\n  transition-timing-function: var(--swiper-wrapper-transition-timing-function, initial);\n  box-sizing: content-box;\n}\n.swiper-android .swiper-slide,\n.swiper-wrapper {\n  transform: translate3d(0px, 0, 0);\n}\n.swiper-horizontal {\n  touch-action: pan-y;\n}\n.swiper-vertical {\n  touch-action: pan-x;\n}\n.swiper-slide,\nswiper-slide {\n  flex-shrink: 0;\n  width: 100%;\n  height: 100%;\n  position: relative;\n  transition-property: transform;\n  display: block;\n}\n.swiper-slide-invisible-blank {\n  visibility: hidden;\n}\n/* Auto Height */\n.swiper-autoheight,\n.swiper-autoheight .swiper-slide {\n  height: auto;\n}\n.swiper-autoheight .swiper-wrapper {\n  align-items: flex-start;\n  transition-property: transform, height;\n}\n.swiper-backface-hidden .swiper-slide {\n  transform: translateZ(0);\n  backface-visibility: hidden;\n}\n/* 3D Effects */\n.swiper-3d.swiper-css-mode .swiper-wrapper {\n  perspective: 1200px;\n}\n.swiper-3d .swiper-wrapper {\n  transform-style: preserve-3d;\n}\n.swiper-3d {\n  perspective: 1200px;\n}\n.swiper-3d .swiper-slide,\n.swiper-3d .swiper-slide-shadow,\n.swiper-3d .swiper-slide-shadow-left,\n.swiper-3d .swiper-slide-shadow-right,\n.swiper-3d .swiper-slide-shadow-top,\n.swiper-3d .swiper-slide-shadow-bottom,\n.swiper-3d .swiper-cube-shadow {\n  transform-style: preserve-3d;\n}\n.swiper-3d .swiper-slide-shadow,\n.swiper-3d .swiper-slide-shadow-left,\n.swiper-3d .swiper-slide-shadow-right,\n.swiper-3d .swiper-slide-shadow-top,\n.swiper-3d .swiper-slide-shadow-bottom {\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n  z-index: 10;\n}\n.swiper-3d .swiper-slide-shadow {\n  background: rgba(0, 0, 0, 0.15);\n}\n.swiper-3d .swiper-slide-shadow-left {\n  background-image: linear-gradient(to left, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-3d .swiper-slide-shadow-right {\n  background-image: linear-gradient(to right, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-3d .swiper-slide-shadow-top {\n  background-image: linear-gradient(to top, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n.swiper-3d .swiper-slide-shadow-bottom {\n  background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0));\n}\n/* CSS Mode */\n.swiper-css-mode > .swiper-wrapper {\n  overflow: auto;\n  scrollbar-width: none;\n  /* For Firefox */\n  -ms-overflow-style: none;\n  /* For Internet Explorer and Edge */\n}\n.swiper-css-mode > .swiper-wrapper::-webkit-scrollbar {\n  display: none;\n}\n.swiper-css-mode > .swiper-wrapper > .swiper-slide {\n  scroll-snap-align: start start;\n}\n.swiper-horizontal.swiper-css-mode > .swiper-wrapper {\n  scroll-snap-type: x mandatory;\n}\n.swiper-vertical.swiper-css-mode > .swiper-wrapper {\n  scroll-snap-type: y mandatory;\n}\n.swiper-css-mode.swiper-free-mode > .swiper-wrapper {\n  scroll-snap-type: none;\n}\n.swiper-css-mode.swiper-free-mode > .swiper-wrapper > .swiper-slide {\n  scroll-snap-align: none;\n}\n.swiper-centered > .swiper-wrapper::before {\n  content: '';\n  flex-shrink: 0;\n  order: 9999;\n}\n.swiper-centered > .swiper-wrapper > .swiper-slide {\n  scroll-snap-align: center center;\n  scroll-snap-stop: always;\n}\n.swiper-centered.swiper-horizontal > .swiper-wrapper > .swiper-slide:first-child {\n  margin-inline-start: var(--swiper-centered-offset-before);\n}\n.swiper-centered.swiper-horizontal > .swiper-wrapper::before {\n  height: 100%;\n  min-height: 1px;\n  width: var(--swiper-centered-offset-after);\n}\n.swiper-centered.swiper-vertical > .swiper-wrapper > .swiper-slide:first-child {\n  margin-block-start: var(--swiper-centered-offset-before);\n}\n.swiper-centered.swiper-vertical > .swiper-wrapper::before {\n  width: 100%;\n  min-width: 1px;\n  height: var(--swiper-centered-offset-after);\n}\n.swiper-lazy-preloader {\n  width: 42px;\n  height: 42px;\n  position: absolute;\n  left: 50%;\n  top: 50%;\n  margin-left: -21px;\n  margin-top: -21px;\n  z-index: 10;\n  transform-origin: 50%;\n  box-sizing: border-box;\n  border: 4px solid var(--swiper-preloader-color, var(--swiper-theme-color));\n  border-radius: 50%;\n  border-top-color: transparent;\n}\n.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,\nswiper-container:not(.swiper-watch-progress) .swiper-lazy-preloader,\n.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader {\n  animation: swiper-preloader-spin 1s infinite linear;\n}\n.swiper-lazy-preloader-white {\n  --swiper-preloader-color: #fff;\n}\n.swiper-lazy-preloader-black {\n  --swiper-preloader-color: #000;\n}\n@keyframes swiper-preloader-spin {\n  0% {\n    transform: rotate(0deg);\n  }\n  100% {\n    transform: rotate(360deg);\n  }\n}\n.swiper-virtual .swiper-slide {\n  -webkit-backface-visibility: hidden;\n  transform: translateZ(0);\n}\n.swiper-virtual.swiper-css-mode .swiper-wrapper::after {\n  content: '';\n  position: absolute;\n  left: 0;\n  top: 0;\n  pointer-events: none;\n}\n.swiper-virtual.swiper-css-mode.swiper-horizontal .swiper-wrapper::after {\n  height: 1px;\n  width: var(--swiper-virtual-size);\n}\n.swiper-virtual.swiper-css-mode.swiper-vertical .swiper-wrapper::after {\n  width: 1px;\n  height: var(--swiper-virtual-size);\n}\n:root {\n  --swiper-navigation-size: 44px;\n  /*\n  --swiper-navigation-top-offset: 50%;\n  --swiper-navigation-sides-offset: 10px;\n  --swiper-navigation-color: var(--swiper-theme-color);\n  */\n}\n.swiper-button-prev,\n.swiper-button-next {\n  position: absolute;\n  top: var(--swiper-navigation-top-offset, 50%);\n  width: calc(var(--swiper-navigation-size) / 44 * 27);\n  height: var(--swiper-navigation-size);\n  margin-top: calc(0px - (var(--swiper-navigation-size) / 2));\n  z-index: 10;\n  cursor: pointer;\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  color: var(--swiper-navigation-color, var(--swiper-theme-color));\n}\n.swiper-button-prev.swiper-button-disabled,\n.swiper-button-next.swiper-button-disabled {\n  opacity: 0.35;\n  cursor: auto;\n  pointer-events: none;\n}\n.swiper-button-prev.swiper-button-hidden,\n.swiper-button-next.swiper-button-hidden {\n  opacity: 0;\n  cursor: auto;\n  pointer-events: none;\n}\n.swiper-navigation-disabled .swiper-button-prev,\n.swiper-navigation-disabled .swiper-button-next {\n  display: none !important;\n}\n.swiper-button-prev:after,\n.swiper-button-next:after {\n  font-family: swiper-icons;\n  font-size: var(--swiper-navigation-size);\n  text-transform: none !important;\n  letter-spacing: 0;\n  font-variant: initial;\n  line-height: 1;\n}\n.swiper-button-prev,\n.swiper-rtl .swiper-button-next {\n  left: var(--swiper-navigation-sides-offset, 10px);\n  right: auto;\n}\n.swiper-button-prev:after,\n.swiper-rtl .swiper-button-next:after {\n  content: 'prev';\n}\n.swiper-button-next,\n.swiper-rtl .swiper-button-prev {\n  right: var(--swiper-navigation-sides-offset, 10px);\n  left: auto;\n}\n.swiper-button-next:after,\n.swiper-rtl .swiper-button-prev:after {\n  content: 'next';\n}\n.swiper-button-lock {\n  display: none;\n}\n:root {\n  /*\n  --swiper-pagination-color: var(--swiper-theme-color);\n  --swiper-pagination-left: auto;\n  --swiper-pagination-right: 8px;\n  --swiper-pagination-bottom: 8px;\n  --swiper-pagination-top: auto;\n  --swiper-pagination-fraction-color: inherit;\n  --swiper-pagination-progressbar-bg-color: rgba(0,0,0,0.25);\n  --swiper-pagination-progressbar-size: 4px;\n  --swiper-pagination-bullet-size: 8px;\n  --swiper-pagination-bullet-width: 8px;\n  --swiper-pagination-bullet-height: 8px;\n  --swiper-pagination-bullet-border-radius: 50%;\n  --swiper-pagination-bullet-inactive-color: #000;\n  --swiper-pagination-bullet-inactive-opacity: 0.2;\n  --swiper-pagination-bullet-opacity: 1;\n  --swiper-pagination-bullet-horizontal-gap: 4px;\n  --swiper-pagination-bullet-vertical-gap: 6px;\n  */\n}\n.swiper-pagination {\n  position: absolute;\n  text-align: center;\n  transition: 300ms opacity;\n  transform: translate3d(0, 0, 0);\n  z-index: 10;\n}\n.swiper-pagination.swiper-pagination-hidden {\n  opacity: 0;\n}\n.swiper-pagination-disabled > .swiper-pagination,\n.swiper-pagination.swiper-pagination-disabled {\n  display: none !important;\n}\n/* Common Styles */\n.swiper-pagination-fraction,\n.swiper-pagination-custom,\n.swiper-horizontal > .swiper-pagination-bullets,\n.swiper-pagination-bullets.swiper-pagination-horizontal {\n  bottom: var(--swiper-pagination-bottom, 8px);\n  top: var(--swiper-pagination-top, auto);\n  left: 0;\n  width: 100%;\n}\n/* Bullets */\n.swiper-pagination-bullets-dynamic {\n  overflow: hidden;\n  font-size: 0;\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n  transform: scale(0.33);\n  position: relative;\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active {\n  transform: scale(1);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main {\n  transform: scale(1);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev {\n  transform: scale(0.66);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev {\n  transform: scale(0.33);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next {\n  transform: scale(0.66);\n}\n.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next {\n  transform: scale(0.33);\n}\n.swiper-pagination-bullet {\n  width: var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));\n  height: var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));\n  display: inline-block;\n  border-radius: var(--swiper-pagination-bullet-border-radius, 50%);\n  background: var(--swiper-pagination-bullet-inactive-color, #000);\n  opacity: var(--swiper-pagination-bullet-inactive-opacity, 0.2);\n}\nbutton.swiper-pagination-bullet {\n  border: none;\n  margin: 0;\n  padding: 0;\n  box-shadow: none;\n  -webkit-appearance: none;\n          -moz-appearance: none;\n       appearance: none;\n}\n.swiper-pagination-clickable .swiper-pagination-bullet {\n  cursor: pointer;\n}\n.swiper-pagination-bullet:only-child {\n  display: none !important;\n}\n.swiper-pagination-bullet-active {\n  opacity: var(--swiper-pagination-bullet-opacity, 1);\n  background: var(--swiper-pagination-color, var(--swiper-theme-color));\n}\n.swiper-vertical > .swiper-pagination-bullets,\n.swiper-pagination-vertical.swiper-pagination-bullets {\n  right: var(--swiper-pagination-right, 8px);\n  left: var(--swiper-pagination-left, auto);\n  top: 50%;\n  transform: translate3d(0px, -50%, 0);\n}\n.swiper-vertical > .swiper-pagination-bullets .swiper-pagination-bullet,\n.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet {\n  margin: var(--swiper-pagination-bullet-vertical-gap, 6px) 0;\n  display: block;\n}\n.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,\n.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n  top: 50%;\n  transform: translateY(-50%);\n  width: 8px;\n}\n.swiper-vertical > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,\n.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n  display: inline-block;\n  transition: 200ms transform, 200ms top;\n}\n.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,\n.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {\n  margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);\n}\n.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic,\n.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic {\n  left: 50%;\n  transform: translateX(-50%);\n  white-space: nowrap;\n}\n.swiper-horizontal > .swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,\n.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n  transition: 200ms transform, 200ms left;\n}\n.swiper-horizontal.swiper-rtl > .swiper-pagination-bullets-dynamic .swiper-pagination-bullet,\n:host(.swiper-horizontal.swiper-rtl) .swiper-pagination-bullets-dynamic .swiper-pagination-bullet {\n  transition: 200ms transform, 200ms right;\n}\n/* Fraction */\n.swiper-pagination-fraction {\n  color: var(--swiper-pagination-fraction-color, inherit);\n}\n/* Progress */\n.swiper-pagination-progressbar {\n  background: var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, 0.25));\n  position: absolute;\n  /*ADD_HOST*/\n}\n.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n  background: var(--swiper-pagination-color, var(--swiper-theme-color));\n  position: absolute;\n  left: 0;\n  top: 0;\n  width: 100%;\n  height: 100%;\n  transform: scale(0);\n  transform-origin: left top;\n}\n.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill {\n  transform-origin: right top;\n}\n.swiper-horizontal > .swiper-pagination-progressbar,\n.swiper-pagination-progressbar.swiper-pagination-horizontal,\n.swiper-vertical > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,\n.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite {\n  width: 100%;\n  height: var(--swiper-pagination-progressbar-size, 4px);\n  left: 0;\n  top: 0;\n}\n.swiper-vertical > .swiper-pagination-progressbar,\n.swiper-pagination-progressbar.swiper-pagination-vertical,\n.swiper-horizontal > .swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,\n.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite {\n  width: var(--swiper-pagination-progressbar-size, 4px);\n  height: 100%;\n  left: 0;\n  top: 0;\n}\n.swiper-pagination-lock {\n  display: none;\n}\n:root {\n  /*\n  --swiper-scrollbar-border-radius: 10px;\n  --swiper-scrollbar-top: auto;\n  --swiper-scrollbar-bottom: 4px;\n  --swiper-scrollbar-left: auto;\n  --swiper-scrollbar-right: 4px;\n  --swiper-scrollbar-sides-offset: 1%;\n  --swiper-scrollbar-bg-color: rgba(0, 0, 0, 0.1);\n  --swiper-scrollbar-drag-bg-color: rgba(0, 0, 0, 0.5);\n  --swiper-scrollbar-size: 4px;\n  */\n}\n.swiper-scrollbar {\n  border-radius: var(--swiper-scrollbar-border-radius, 10px);\n  position: relative;\n  -ms-touch-action: none;\n  background: var(--swiper-scrollbar-bg-color, rgba(0, 0, 0, 0.1));\n}\n.swiper-scrollbar-disabled > .swiper-scrollbar,\n.swiper-scrollbar.swiper-scrollbar-disabled {\n  display: none !important;\n}\n.swiper-horizontal > .swiper-scrollbar,\n.swiper-scrollbar.swiper-scrollbar-horizontal {\n  position: absolute;\n  left: var(--swiper-scrollbar-sides-offset, 1%);\n  bottom: var(--swiper-scrollbar-bottom, 4px);\n  top: var(--swiper-scrollbar-top, auto);\n  z-index: 50;\n  height: var(--swiper-scrollbar-size, 4px);\n  width: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%));\n}\n.swiper-vertical > .swiper-scrollbar,\n.swiper-scrollbar.swiper-scrollbar-vertical {\n  position: absolute;\n  left: var(--swiper-scrollbar-left, auto);\n  right: var(--swiper-scrollbar-right, 4px);\n  top: var(--swiper-scrollbar-sides-offset, 1%);\n  z-index: 50;\n  width: var(--swiper-scrollbar-size, 4px);\n  height: calc(100% - 2 * var(--swiper-scrollbar-sides-offset, 1%));\n}\n.swiper-scrollbar-drag {\n  height: 100%;\n  width: 100%;\n  position: relative;\n  background: var(--swiper-scrollbar-drag-bg-color, rgba(0, 0, 0, 0.5));\n  border-radius: var(--swiper-scrollbar-border-radius, 10px);\n  left: 0;\n  top: 0;\n}\n.swiper-scrollbar-cursor-drag {\n  cursor: move;\n}\n.swiper-scrollbar-lock {\n  display: none;\n}\n.swiper-zoom-container {\n  width: 100%;\n  height: 100%;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  text-align: center;\n}\n.swiper-zoom-container > img,\n.swiper-zoom-container > svg,\n.swiper-zoom-container > canvas {\n  max-width: 100%;\n  max-height: 100%;\n  -o-object-fit: contain;\n     object-fit: contain;\n}\n.swiper-slide-zoomed {\n  cursor: move;\n  touch-action: none;\n}\n/* a11y */\n.swiper .swiper-notification,\nswiper-container .swiper-notification {\n  position: absolute;\n  left: 0;\n  top: 0;\n  pointer-events: none;\n  opacity: 0;\n  z-index: -1000;\n}\n.swiper-free-mode > .swiper-wrapper {\n  transition-timing-function: ease-out;\n  margin: 0 auto;\n}\n.swiper-grid > .swiper-wrapper {\n  flex-wrap: wrap;\n}\n.swiper-grid-column > .swiper-wrapper {\n  flex-wrap: wrap;\n  flex-direction: column;\n}\n.swiper-fade.swiper-free-mode .swiper-slide {\n  transition-timing-function: ease-out;\n}\n.swiper-fade .swiper-slide {\n  pointer-events: none;\n  transition-property: opacity;\n}\n.swiper-fade .swiper-slide .swiper-slide {\n  pointer-events: none;\n}\n.swiper-fade .swiper-slide-active,\n.swiper-fade .swiper-slide-active .swiper-slide-active {\n  pointer-events: auto;\n}\n.swiper-cube {\n  overflow: visible;\n}\n.swiper-cube .swiper-slide {\n  pointer-events: none;\n  backface-visibility: hidden;\n  z-index: 1;\n  visibility: hidden;\n  transform-origin: 0 0;\n  width: 100%;\n  height: 100%;\n}\n.swiper-cube .swiper-slide .swiper-slide {\n  pointer-events: none;\n}\n.swiper-cube.swiper-rtl .swiper-slide {\n  transform-origin: 100% 0;\n}\n.swiper-cube .swiper-slide-active,\n.swiper-cube .swiper-slide-active .swiper-slide-active {\n  pointer-events: auto;\n}\n.swiper-cube .swiper-slide-active,\n.swiper-cube .swiper-slide-next,\n.swiper-cube .swiper-slide-prev,\n.swiper-cube .swiper-slide-next + .swiper-slide {\n  pointer-events: auto;\n  visibility: visible;\n}\n.swiper-cube .swiper-slide-shadow-top,\n.swiper-cube .swiper-slide-shadow-bottom,\n.swiper-cube .swiper-slide-shadow-left,\n.swiper-cube .swiper-slide-shadow-right {\n  z-index: 0;\n  backface-visibility: hidden;\n}\n.swiper-cube .swiper-cube-shadow {\n  position: absolute;\n  left: 0;\n  bottom: 0px;\n  width: 100%;\n  height: 100%;\n  opacity: 0.6;\n  z-index: 0;\n}\n.swiper-cube .swiper-cube-shadow:before {\n  content: '';\n  background: #000;\n  position: absolute;\n  left: 0;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  filter: blur(50px);\n}\n.swiper-flip {\n  overflow: visible;\n}\n.swiper-flip .swiper-slide {\n  pointer-events: none;\n  backface-visibility: hidden;\n  z-index: 1;\n}\n.swiper-flip .swiper-slide .swiper-slide {\n  pointer-events: none;\n}\n.swiper-flip .swiper-slide-active,\n.swiper-flip .swiper-slide-active .swiper-slide-active {\n  pointer-events: auto;\n}\n.swiper-flip .swiper-slide-shadow-top,\n.swiper-flip .swiper-slide-shadow-bottom,\n.swiper-flip .swiper-slide-shadow-left,\n.swiper-flip .swiper-slide-shadow-right {\n  z-index: 0;\n  backface-visibility: hidden;\n}\n.swiper-creative .swiper-slide {\n  backface-visibility: hidden;\n  overflow: hidden;\n  transition-property: transform, opacity, height;\n}\n.swiper-cards {\n  overflow: visible;\n}\n.swiper-cards .swiper-slide {\n  transform-origin: center bottom;\n  backface-visibility: hidden;\n  overflow: hidden;\n}\n",""])},PrET:function(t,e,n){"use strict";var r=n("D3zA"),i=n("AM7I"),o=n("0Ake"),s=i("%TypeError%"),a=i("%Function.prototype.apply%"),l=i("%Function.prototype.call%"),u=i("%Reflect.apply%",!0)||r.call(l,a),c=i("%Object.defineProperty%",!0),h=i("%Math.max%");if(c)try{c({},"a",{value:1})}catch(t){c=null}t.exports=function(t){if("function"!=typeof t)throw new s("a function is required");var e=u(r,l,arguments);return o(e,1+h(0,t.length-(arguments.length-1)),!0)};var d=function(){return u(r,a,arguments)};c?c(t.exports,"apply",{value:d}):t.exports.apply=d},QSc6:function(t,e,n){"use strict";var r=n("VAJa"),i=n("0jNN"),o=n("sxOR"),s=Object.prototype.hasOwnProperty,a={brackets:function(t){return t+"[]"},comma:"comma",indices:function(t,e){return t+"["+e+"]"},repeat:function(t){return t}},l=Array.isArray,u=Array.prototype.push,c=function(t,e){u.apply(t,l(e)?e:[e])},h=Date.prototype.toISOString,d=o.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:i.encode,encodeValuesOnly:!1,format:d,formatter:o.formatters[d],indices:!1,serializeDate:function(t){return h.call(t)},skipNulls:!1,strictNullHandling:!1},f={},m=function t(e,n,o,s,a,u,h,d,m,g,v,y,_,b,x,w){for(var E,T=e,S=w,A=0,M=!1;void 0!==(S=S.get(f))&&!M;){var D=S.get(e);if(A+=1,void 0!==D){if(D===A)throw new RangeError("Cyclic object value");M=!0}void 0===S.get(f)&&(A=0)}if("function"==typeof d?T=d(n,T):T instanceof Date?T=v(T):"comma"===o&&l(T)&&(T=i.maybeMap(T,(function(t){return t instanceof Date?v(t):t}))),null===T){if(a)return h&&!b?h(n,p.encoder,x,"key",y):n;T=""}if("string"==typeof(E=T)||"number"==typeof E||"boolean"==typeof E||"symbol"==typeof E||"bigint"==typeof E||i.isBuffer(T))return h?[_(b?n:h(n,p.encoder,x,"key",y))+"="+_(h(T,p.encoder,x,"value",y))]:[_(n)+"="+_(String(T))];var C,R=[];if(void 0===T)return R;if("comma"===o&&l(T))b&&h&&(T=i.maybeMap(T,h)),C=[{value:T.length>0?T.join(",")||null:void 0}];else if(l(d))C=d;else{var O=Object.keys(T);C=m?O.sort(m):O}for(var P=s&&l(T)&&1===T.length?n+"[]":n,I=0;I<C.length;++I){var L=C[I],N="object"==typeof L&&void 0!==L.value?L.value:T[L];if(!u||null!==N){var F=l(T)?"function"==typeof o?o(P,L):P:P+(g?"."+L:"["+L+"]");w.set(e,A);var k=r();k.set(f,w),c(R,t(N,F,o,s,a,u,"comma"===o&&b&&l(T)?null:h,d,m,g,v,y,_,b,x,k))}}return R};t.exports=function(t,e){var n,i=t,u=function(t){if(!t)return p;if(null!==t.encoder&&void 0!==t.encoder&&"function"!=typeof t.encoder)throw new TypeError("Encoder has to be a function.");var e=t.charset||p.charset;if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var n=o.default;if(void 0!==t.format){if(!s.call(o.formatters,t.format))throw new TypeError("Unknown format option provided.");n=t.format}var r=o.formatters[n],i=p.filter;return("function"==typeof t.filter||l(t.filter))&&(i=t.filter),{addQueryPrefix:"boolean"==typeof t.addQueryPrefix?t.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===t.allowDots?p.allowDots:!!t.allowDots,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:p.charsetSentinel,delimiter:void 0===t.delimiter?p.delimiter:t.delimiter,encode:"boolean"==typeof t.encode?t.encode:p.encode,encoder:"function"==typeof t.encoder?t.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof t.encodeValuesOnly?t.encodeValuesOnly:p.encodeValuesOnly,filter:i,format:n,formatter:r,serializeDate:"function"==typeof t.serializeDate?t.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof t.skipNulls?t.skipNulls:p.skipNulls,sort:"function"==typeof t.sort?t.sort:null,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:p.strictNullHandling}}(e);"function"==typeof u.filter?i=(0,u.filter)("",i):l(u.filter)&&(n=u.filter);var h,d=[];if("object"!=typeof i||null===i)return"";h=e&&e.arrayFormat in a?e.arrayFormat:e&&"indices"in e?e.indices?"indices":"repeat":"indices";var f=a[h];if(e&&"commaRoundTrip"in e&&"boolean"!=typeof e.commaRoundTrip)throw new TypeError("`commaRoundTrip` must be a boolean, or absent");var g="comma"===f&&e&&e.commaRoundTrip;n||(n=Object.keys(i)),u.sort&&n.sort(u.sort);for(var v=r(),y=0;y<n.length;++y){var _=n[y];u.skipNulls&&null===i[_]||c(d,m(i[_],_,f,g,u.strictNullHandling,u.skipNulls,u.encode?u.encoder:null,u.filter,u.sort,u.allowDots,u.serializeDate,u.format,u.formatter,u.encodeValuesOnly,u.charset,v))}var b=d.join(u.delimiter),x=!0===u.addQueryPrefix?"?":"";return u.charsetSentinel&&("iso-8859-1"===u.charset?x+="utf8=%26%2310003%3B&":x+="utf8=%E2%9C%93&"),b.length>0?x+b:""}},Qyje:function(t,e,n){"use strict";var r=n("QSc6"),i=n("nmq7"),o=n("sxOR");t.exports={formats:o,parse:i,stringify:r}},Svdd:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"[data-simplebar] {\n  position: relative;\n  flex-direction: column;\n  flex-wrap: wrap;\n  justify-content: flex-start;\n  align-content: flex-start;\n  align-items: flex-start;\n}\n\n.simplebar-wrapper {\n  overflow: hidden;\n  width: inherit;\n  height: inherit;\n  max-width: inherit;\n  max-height: inherit;\n}\n\n.simplebar-mask {\n  direction: inherit;\n  position: absolute;\n  overflow: hidden;\n  padding: 0;\n  margin: 0;\n  left: 0;\n  top: 0;\n  bottom: 0;\n  right: 0;\n  width: auto !important;\n  height: auto !important;\n  z-index: 0;\n}\n\n.simplebar-offset {\n  direction: inherit !important;\n  box-sizing: inherit !important;\n  resize: none !important;\n  position: absolute;\n  top: 0;\n  left: 0;\n  bottom: 0;\n  right: 0;\n  padding: 0;\n  margin: 0;\n  -webkit-overflow-scrolling: touch;\n}\n\n.simplebar-content-wrapper {\n  direction: inherit;\n  box-sizing: border-box !important;\n  position: relative;\n  display: block;\n  height: 100%; /* Required for horizontal native scrollbar to not appear if parent is taller than natural height */\n  width: auto;\n  max-width: 100%; /* Not required for horizontal scroll to trigger */\n  max-height: 100%; /* Needed for vertical scroll to trigger */\n  overflow: auto;\n  scrollbar-width: none;\n  -ms-overflow-style: none;\n}\n\n.simplebar-content-wrapper::-webkit-scrollbar,\n.simplebar-hide-scrollbar::-webkit-scrollbar {\n  display: none;\n  width: 0;\n  height: 0;\n}\n\n.simplebar-content:before,\n.simplebar-content:after {\n  content: ' ';\n  display: table;\n}\n\n.simplebar-placeholder {\n  max-height: 100%;\n  max-width: 100%;\n  width: 100%;\n  pointer-events: none;\n}\n\n.simplebar-height-auto-observer-wrapper {\n  box-sizing: inherit !important;\n  height: 100%;\n  width: 100%;\n  max-width: 1px;\n  position: relative;\n  float: left;\n  max-height: 1px;\n  overflow: hidden;\n  z-index: -1;\n  padding: 0;\n  margin: 0;\n  pointer-events: none;\n  flex-grow: inherit;\n  flex-shrink: 0;\n  flex-basis: 0;\n}\n\n.simplebar-height-auto-observer {\n  box-sizing: inherit;\n  display: block;\n  opacity: 0;\n  position: absolute;\n  top: 0;\n  left: 0;\n  height: 1000%;\n  width: 1000%;\n  min-height: 1px;\n  min-width: 1px;\n  overflow: hidden;\n  pointer-events: none;\n  z-index: -1;\n}\n\n.simplebar-track {\n  z-index: 1;\n  position: absolute;\n  right: 0;\n  bottom: 0;\n  pointer-events: none;\n  overflow: hidden;\n}\n\n[data-simplebar].simplebar-dragging {\n  pointer-events: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  user-select: none;\n}\n\n[data-simplebar].simplebar-dragging .simplebar-content {\n  pointer-events: none;\n  -webkit-touch-callout: none;\n  -webkit-user-select: none;\n  -moz-user-select: none;\n  user-select: none;\n}\n\n[data-simplebar].simplebar-dragging .simplebar-track {\n  pointer-events: all;\n}\n\n.simplebar-scrollbar {\n  position: absolute;\n  left: 0;\n  right: 0;\n  min-height: 10px;\n}\n\n.simplebar-scrollbar:before {\n  position: absolute;\n  content: '';\n  background: black;\n  border-radius: 7px;\n  left: 2px;\n  right: 2px;\n  opacity: 0;\n  transition: opacity 0.2s 0.5s linear;\n}\n\n.simplebar-scrollbar.simplebar-visible:before {\n  opacity: 0.5;\n  transition-delay: 0s;\n  transition-duration: 0s;\n}\n\n.simplebar-track.simplebar-vertical {\n  top: 0;\n  width: 11px;\n}\n\n.simplebar-scrollbar:before {\n  top: 2px;\n  bottom: 2px;\n  left: 2px;\n  right: 2px;\n}\n\n.simplebar-track.simplebar-horizontal {\n  left: 0;\n  height: 11px;\n}\n\n.simplebar-track.simplebar-horizontal .simplebar-scrollbar {\n  right: auto;\n  left: 0;\n  top: 0;\n  bottom: 0;\n  min-height: 0;\n  min-width: 10px;\n  width: auto;\n}\n\n/* Rtl support */\n[data-simplebar-direction='rtl'] .simplebar-track.simplebar-vertical {\n  right: auto;\n  left: 0;\n}\n\n.simplebar-dummy-scrollbar-size {\n  direction: rtl;\n  position: fixed;\n  opacity: 0;\n  visibility: hidden;\n  height: 500px;\n  width: 500px;\n  overflow-y: hidden;\n  overflow-x: scroll;\n  -ms-overflow-style: scrollbar !important;\n}\n\n.simplebar-dummy-scrollbar-size > div {\n  width: 200%;\n  height: 200%;\n  margin: 10px 0;\n}\n\n.simplebar-hide-scrollbar {\n  position: fixed;\n  left: 0;\n  visibility: hidden;\n  overflow-y: scroll;\n  scrollbar-width: none;\n  -ms-overflow-style: none;\n}\n",""])},TG6t:function(t,e){},URgk:function(t,e,n){(function(t){var r=void 0!==t&&t||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(t,e){this._id=t,this._clearFn=e}e.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},e.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},e.clearTimeout=e.clearInterval=function(t){t&&t.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},e.enroll=function(t,e){clearTimeout(t._idleTimeoutId),t._idleTimeout=e},e.unenroll=function(t){clearTimeout(t._idleTimeoutId),t._idleTimeout=-1},e._unrefActive=e.active=function(t){clearTimeout(t._idleTimeoutId);var e=t._idleTimeout;e>=0&&(t._idleTimeoutId=setTimeout((function(){t._onTimeout&&t._onTimeout()}),e))},n("YBdB"),e.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==t&&t.setImmediate||this&&this.setImmediate,e.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==t&&t.clearImmediate||this&&this.clearImmediate}).call(this,n("yLpj"))},UVaH:function(t,e,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,i=n("FpZJ");t.exports=function(){return"function"==typeof r&&("function"==typeof Symbol&&("symbol"==typeof r("foo")&&("symbol"==typeof Symbol("bar")&&i())))}},VAJa:function(t,e,n){"use strict";var r=n("AM7I"),i=n("VF6F"),o=n("JxQ3"),s=r("%TypeError%"),a=r("%WeakMap%",!0),l=r("%Map%",!0),u=i("WeakMap.prototype.get",!0),c=i("WeakMap.prototype.set",!0),h=i("WeakMap.prototype.has",!0),d=i("Map.prototype.get",!0),p=i("Map.prototype.set",!0),f=i("Map.prototype.has",!0),m=function(t,e){for(var n,r=t;null!==(n=r.next);r=n)if(n.key===e)return r.next=n.next,n.next=t.next,t.next=n,n};t.exports=function(){var t,e,n,r={assert:function(t){if(!r.has(t))throw new s("Side channel does not contain "+o(t))},get:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(t)return u(t,r)}else if(l){if(e)return d(e,r)}else if(n)return function(t,e){var n=m(t,e);return n&&n.value}(n,r)},has:function(r){if(a&&r&&("object"==typeof r||"function"==typeof r)){if(t)return h(t,r)}else if(l){if(e)return f(e,r)}else if(n)return function(t,e){return!!m(t,e)}(n,r);return!1},set:function(r,i){a&&r&&("object"==typeof r||"function"==typeof r)?(t||(t=new a),c(t,r,i)):l?(e||(e=new l),p(e,r,i)):(n||(n={key:{},next:null}),function(t,e,n){var r=m(t,e);r?r.value=n:t.next={key:e,next:t.next,value:n}}(n,r,i))}};return r}},VF6F:function(t,e,n){"use strict";var r=n("AM7I"),i=n("PrET"),o=i(r("String.prototype.indexOf"));t.exports=function(t,e){var n=r(t,!!e);return"function"==typeof n&&o(t,".prototype.")>-1?i(n):n}},VmRL:function(t,e,n){"use strict";function r(t,e,n){n=n||2;var r,o,a,l,u,c,p,f=e&&e.length,g=f?e[0]*n:t.length,v=i(t,0,g,n,!0),y=[];if(!v||v.next===v.prev)return y;if(f&&(v=function(t,e,n,r){var o,s,a,l,u,c=[];for(o=0,s=e.length;o<s;o++)a=e[o]*r,l=o<s-1?e[o+1]*r:t.length,(u=i(t,a,l,r,!1))===u.next&&(u.steiner=!0),c.push(m(u));for(c.sort(h),o=0;o<c.length;o++)n=d(c[o],n);return n}(t,e,v,n)),t.length>80*n){r=a=t[0],o=l=t[1];for(var _=n;_<g;_+=n)(u=t[_])<r&&(r=u),(c=t[_+1])<o&&(o=c),u>a&&(a=u),c>l&&(l=c);p=0!==(p=Math.max(a-r,l-o))?32767/p:0}return s(v,y,n,r,o,p,0),y}function i(t,e,n,r,i){var o,s;if(i===D(t,e,n,r)>0)for(o=e;o<n;o+=r)s=S(o,t[o],t[o+1],s);else for(o=n-r;o>=e;o-=r)s=S(o,t[o],t[o+1],s);return s&&_(s,s.next)&&(A(s),s=s.next),s}function o(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!_(r,r.next)&&0!==y(r.prev,r,r.next))r=r.next;else{if(A(r),(r=e=r.prev)===r.next)break;n=!0}}while(n||r!==e);return e}function s(t,e,n,r,i,h,d){if(t){!d&&h&&function(t,e,n,r){var i=t;do{0===i.z&&(i.z=f(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,s,a,l,u=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,r=n,a=0,e=0;e<u&&(a++,r=r.nextZ);e++);for(l=u;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(s>1)}(i)}(t,r,i,h);for(var p,m,g=t;t.prev!==t.next;)if(p=t.prev,m=t.next,h?l(t,r,i,h):a(t))e.push(p.i/n|0),e.push(t.i/n|0),e.push(m.i/n|0),A(t),t=m.next,g=m.next;else if((t=m)===g){d?1===d?s(t=u(o(t),e,n),e,n,r,i,h,2):2===d&&c(t,e,n,r,i,h):s(o(t),e,n,r,i,h,1);break}}}function a(t){var e=t.prev,n=t,r=t.next;if(y(e,n,r)>=0)return!1;for(var i=e.x,o=n.x,s=r.x,a=e.y,l=n.y,u=r.y,c=i<o?i<s?i:s:o<s?o:s,h=a<l?a<u?a:u:l<u?l:u,d=i>o?i>s?i:s:o>s?o:s,p=a>l?a>u?a:u:l>u?l:u,f=r.next;f!==e;){if(f.x>=c&&f.x<=d&&f.y>=h&&f.y<=p&&g(i,a,o,l,s,u,f.x,f.y)&&y(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function l(t,e,n,r){var i=t.prev,o=t,s=t.next;if(y(i,o,s)>=0)return!1;for(var a=i.x,l=o.x,u=s.x,c=i.y,h=o.y,d=s.y,p=a<l?a<u?a:u:l<u?l:u,m=c<h?c<d?c:d:h<d?h:d,v=a>l?a>u?a:u:l>u?l:u,_=c>h?c>d?c:d:h>d?h:d,b=f(p,m,e,n,r),x=f(v,_,e,n,r),w=t.prevZ,E=t.nextZ;w&&w.z>=b&&E&&E.z<=x;){if(w.x>=p&&w.x<=v&&w.y>=m&&w.y<=_&&w!==i&&w!==s&&g(a,c,l,h,u,d,w.x,w.y)&&y(w.prev,w,w.next)>=0)return!1;if(w=w.prevZ,E.x>=p&&E.x<=v&&E.y>=m&&E.y<=_&&E!==i&&E!==s&&g(a,c,l,h,u,d,E.x,E.y)&&y(E.prev,E,E.next)>=0)return!1;E=E.nextZ}for(;w&&w.z>=b;){if(w.x>=p&&w.x<=v&&w.y>=m&&w.y<=_&&w!==i&&w!==s&&g(a,c,l,h,u,d,w.x,w.y)&&y(w.prev,w,w.next)>=0)return!1;w=w.prevZ}for(;E&&E.z<=x;){if(E.x>=p&&E.x<=v&&E.y>=m&&E.y<=_&&E!==i&&E!==s&&g(a,c,l,h,u,d,E.x,E.y)&&y(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function u(t,e,n){var r=t;do{var i=r.prev,s=r.next.next;!_(i,s)&&b(i,r,r.next,s)&&E(i,s)&&E(s,i)&&(e.push(i.i/n|0),e.push(r.i/n|0),e.push(s.i/n|0),A(r),A(r.next),r=t=s),r=r.next}while(r!==t);return o(r)}function c(t,e,n,r,i,a){var l=t;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&v(l,u)){var c=T(l,u);return l=o(l,l.next),c=o(c,c.next),s(l,e,n,r,i,a,0),void s(c,e,n,r,i,a,0)}u=u.next}l=l.next}while(l!==t)}function h(t,e){return t.x-e.x}function d(t,e){var n=function(t,e){var n,r=e,i=t.x,o=t.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>s&&(s=a,n=r.x<r.next.x?r:r.next,a===i))return n}r=r.next}while(r!==e);if(!n)return null;var l,u=n,c=n.x,h=n.y,d=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&g(o<h?i:s,o,c,h,o<h?s:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),E(r,t)&&(l<d||l===d&&(r.x>n.x||r.x===n.x&&p(n,r)))&&(n=r,d=l)),r=r.next}while(r!==u);return n}(t,e);if(!n)return e;var r=T(n,t);return o(r,r.next),o(n,n.next)}function p(t,e){return y(t.prev,t,e.prev)<0&&y(e.next,t,t.next)<0}function f(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function m(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function g(t,e,n,r,i,o,s,a){return(i-s)*(e-a)>=(t-s)*(o-a)&&(t-s)*(r-a)>=(n-s)*(e-a)&&(n-s)*(o-a)>=(i-s)*(r-a)}function v(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(E(t,e)&&E(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(y(t.prev,t,e.prev)||y(t,e.prev,e))||_(t,e)&&y(t.prev,t,t.next)>0&&y(e.prev,e,e.next)>0)}function y(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function _(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){var i=w(y(t,e,n)),o=w(y(t,e,r)),s=w(y(n,r,t)),a=w(y(n,r,e));return i!==o&&s!==a||(!(0!==i||!x(t,n,e))||(!(0!==o||!x(t,r,e))||(!(0!==s||!x(n,t,r))||!(0!==a||!x(n,e,r)))))}function x(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function w(t){return t>0?1:t<0?-1:0}function E(t,e){return y(t.prev,t,t.next)<0?y(t,e,t.next)>=0&&y(t,t.prev,e)>=0:y(t,e,t.prev)<0||y(t,t.next,e)<0}function T(t,e){var n=new M(t.i,t.x,t.y),r=new M(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function S(t,e,n,r){var i=new M(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function A(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function M(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function D(t,e,n,r){for(var i=0,o=e,s=n-r;o<n;o+=r)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}t.exports=r,t.exports.default=r,r.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,s=Math.abs(D(t,0,o,n));if(i)for(var a=0,l=e.length;a<l;a++){var u=e[a]*n,c=a<l-1?e[a+1]*n:t.length;s-=Math.abs(D(t,u,c,n))}var h=0;for(a=0;a<r.length;a+=3){var d=r[a]*n,p=r[a+1]*n,f=r[a+2]*n;h+=Math.abs((t[d]-t[f])*(t[p+1]-t[d+1])-(t[d]-t[p])*(t[f+1]-t[d+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},r.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[i][o][s]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n}},YBdB:function(t,e,n){(function(t,e){!function(t,n){"use strict";if(!t.setImmediate){var r,i,o,s,a,l=1,u={},c=!1,h=t.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(t);d=d&&d.setTimeout?d:t,"[object process]"==={}.toString.call(t.process)?r=function(t){e.nextTick((function(){f(t)}))}:!function(){if(t.postMessage&&!t.importScripts){var e=!0,n=t.onmessage;return t.onmessage=function(){e=!1},t.postMessage("","*"),t.onmessage=n,e}}()?t.MessageChannel?((o=new MessageChannel).port1.onmessage=function(t){f(t.data)},r=function(t){o.port2.postMessage(t)}):h&&"onreadystatechange"in h.createElement("script")?(i=h.documentElement,r=function(t){var e=h.createElement("script");e.onreadystatechange=function(){f(t),e.onreadystatechange=null,i.removeChild(e),e=null},i.appendChild(e)}):r=function(t){setTimeout(f,0,t)}:(s="setImmediate$"+Math.random()+"$",a=function(e){e.source===t&&"string"==typeof e.data&&0===e.data.indexOf(s)&&f(+e.data.slice(s.length))},t.addEventListener?t.addEventListener("message",a,!1):t.attachEvent("onmessage",a),r=function(e){t.postMessage(s+e,"*")}),d.setImmediate=function(t){"function"!=typeof t&&(t=new Function(""+t));for(var e=new Array(arguments.length-1),n=0;n<e.length;n++)e[n]=arguments[n+1];var i={callback:t,args:e};return u[l]=i,r(l),l++},d.clearImmediate=p}function p(t){delete u[t]}function f(t){if(c)setTimeout(f,0,t);else{var e=u[t];if(e){c=!0;try{!function(t){var e=t.callback,n=t.args;switch(n.length){case 0:e();break;case 1:e(n[0]);break;case 2:e(n[0],n[1]);break;case 3:e(n[0],n[1],n[2]);break;default:e.apply(void 0,n)}}(e)}finally{p(t),c=!1}}}}}("undefined"==typeof self?void 0===t?this:t:self)}).call(this,n("yLpj"),n("8oxB"))},YuTi:function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},ZLCw:function(t,e,n){"use strict";var r=n("AM7I")("%Object.defineProperty%",!0),i=function(){if(r)try{return r({},"a",{value:1}),!0}catch(t){return!1}return!1};i.hasArrayLengthDefineBug=function(){if(!i())return null;try{return 1!==r([],"length",{value:1}).length}catch(t){return!0}},t.exports=i},"aET+":function(t,e,n){var r,i,o={},s=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),a=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var r=a.call(this,t,n);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(t){r=null}e[t]=r}return e[t]}}(),u=null,c=0,h=[],d=n("9tPo");function p(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=o[r.id];if(i){i.refs++;for(var s=0;s<i.parts.length;s++)i.parts[s](r.parts[s]);for(;s<r.parts.length;s++)i.parts.push(_(r.parts[s],e))}else{var a=[];for(s=0;s<r.parts.length;s++)a.push(_(r.parts[s],e));o[r.id]={id:r.id,refs:1,parts:a}}}}function f(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],s=e.base?o[0]+e.base:o[0],a={css:o[1],media:o[2],sourceMap:o[3]};r[s]?r[s].parts.push(a):n.push(r[s]={id:s,parts:[a]})}return n}function m(t,e){var n=l(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=h[h.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),h.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=l(t.insertAt.before,n);n.insertBefore(e,i)}}function g(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=h.indexOf(t);e>=0&&h.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return y(e,t.attrs),m(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function _(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var s=c++;n=u||(u=v(e)),r=w.bind(null,n,s,!1),i=w.bind(null,n,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),m(t,e),e}(e),r=T.bind(null,n,e),i=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=v(e),r=E.bind(null,n),i=function(){g(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return p(n,e),function(t){for(var r=[],i=0;i<n.length;i++){var s=n[i];(a=o[s.id]).refs--,r.push(a)}t&&p(f(t,e),e);for(i=0;i<r.length;i++){var a;if(0===(a=r[i]).refs){for(var l=0;l<a.parts.length;l++)a.parts[l]();delete o[a.id]}}}};var b,x=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function w(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=x(e,i);else{var o=document.createTextNode(i),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(o,s[e]):t.appendChild(o)}}function E(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}function T(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=d(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var s=new Blob([r],{type:"text/css"}),a=t.href;t.href=URL.createObjectURL(s),a&&URL.revokeObjectURL(a)}},aI7X:function(t,e,n){"use strict";var r="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,o=Math.max,s=function(t,e){for(var n=[],r=0;r<t.length;r+=1)n[r]=t[r];for(var i=0;i<e.length;i+=1)n[i+t.length]=e[i];return n},a=function(t,e){for(var n=[],r=e||0,i=0;r<t.length;r+=1,i+=1)n[i]=t[r];return n},l=function(t,e){for(var n="",r=0;r<t.length;r+=1)n+=t[r],r+1<t.length&&(n+=e);return n};t.exports=function(t){var e=this;if("function"!=typeof e||"[object Function]"!==i.apply(e))throw new TypeError(r+e);for(var n,u=a(arguments,1),c=function(){if(this instanceof n){var r=e.apply(this,s(u,arguments));return Object(r)===r?r:this}return e.apply(t,s(u,arguments))},h=o(0,e.length-u.length),d=[],p=0;p<h;p++)d[p]="$"+p;if(n=Function("binder","return function ("+l(d,",")+"){ return binder.apply(this,arguments); }")(c),e.prototype){var f=function(){};f.prototype=e.prototype,n.prototype=new f,f.prototype=null}return n}},eZIG:function(t,e,n){"use strict";var r=n("ZLCw")(),i=n("AM7I"),o=r&&i("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch(t){o=!1}var s=i("%SyntaxError%"),a=i("%TypeError%"),l=n("Kqna");t.exports=function(t,e,n){if(!t||"object"!=typeof t&&"function"!=typeof t)throw new a("`obj` must be an object or a function`");if("string"!=typeof e&&"symbol"!=typeof e)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,c=arguments.length>6&&arguments[6],h=!!l&&l(t,e);if(o)o(t,e,{configurable:null===u&&h?h.configurable:!u,enumerable:null===r&&h?h.enumerable:!r,value:n,writable:null===i&&h?h.writable:!i});else{if(!c&&(r||i||u))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");t[e]=n}}},gZXI:function(t,e,n){var r=n("Svdd");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,i);r.locals&&(t.exports=r.locals)},"iEc/":function(t,e,n){t.exports=function(t,e){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var r=n(e),i=function(){return(i=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},o=null,s=null;function a(){if(null===o){if("undefined"==typeof document)return o=0;var t=document.body,e=document.createElement("div");e.classList.add("simplebar-hide-scrollbar"),t.appendChild(e);var n=e.getBoundingClientRect().right;t.removeChild(e),o=n}return o}function l(t){return t&&t.ownerDocument&&t.ownerDocument.defaultView?t.ownerDocument.defaultView:window}function u(t){return t&&t.ownerDocument?t.ownerDocument:document}r.default&&window.addEventListener("resize",(function(){s!==window.devicePixelRatio&&(s=window.devicePixelRatio,o=null)}));var c=function(t){return Array.prototype.reduce.call(t,(function(t,e){var n=e.name.match(/data-simplebar-(.+)/);if(n){var r=n[1].replace(/\W+(.)/g,(function(t,e){return e.toUpperCase()}));switch(e.value){case"true":t[r]=!0;break;case"false":t[r]=!1;break;case void 0:t[r]=!0;break;default:t[r]=e.value}}return t}),{})};function h(t,e){var n;t&&(n=t.classList).add.apply(n,e.split(" "))}function d(t,e){t&&e.split(" ").forEach((function(e){t.classList.remove(e)}))}function p(t){return".".concat(t.split(" ").join("."))}var f=Object.freeze({__proto__:null,getElementWindow:l,getElementDocument:u,getOptions:c,addClasses:h,removeClasses:d,classNamesToQuery:p}),m=l,g=u,v=c,y=h,_=d,b=p;return function(){function e(n,r){void 0===r&&(r={});var o=this;if(this.removePreventClickId=null,this.minScrollbarWidth=20,this.stopScrollDelay=175,this.isScrolling=!1,this.isMouseEntering=!1,this.scrollXTicking=!1,this.scrollYTicking=!1,this.wrapperEl=null,this.contentWrapperEl=null,this.contentEl=null,this.offsetEl=null,this.maskEl=null,this.placeholderEl=null,this.heightAutoObserverWrapperEl=null,this.heightAutoObserverEl=null,this.rtlHelpers=null,this.scrollbarWidth=0,this.resizeObserver=null,this.mutationObserver=null,this.elStyles=null,this.isRtl=null,this.mouseX=0,this.mouseY=0,this.onMouseMove=function(){},this.onWindowResize=function(){},this.onStopScrolling=function(){},this.onMouseEntered=function(){},this.onScroll=function(){var t=m(o.el);o.scrollXTicking||(t.requestAnimationFrame(o.scrollX),o.scrollXTicking=!0),o.scrollYTicking||(t.requestAnimationFrame(o.scrollY),o.scrollYTicking=!0),o.isScrolling||(o.isScrolling=!0,y(o.el,o.classNames.scrolling)),o.showScrollbar("x"),o.showScrollbar("y"),o.onStopScrolling()},this.scrollX=function(){o.axis.x.isOverflowing&&o.positionScrollbar("x"),o.scrollXTicking=!1},this.scrollY=function(){o.axis.y.isOverflowing&&o.positionScrollbar("y"),o.scrollYTicking=!1},this._onStopScrolling=function(){_(o.el,o.classNames.scrolling),o.options.autoHide&&(o.hideScrollbar("x"),o.hideScrollbar("y")),o.isScrolling=!1},this.onMouseEnter=function(){o.isMouseEntering||(y(o.el,o.classNames.mouseEntered),o.showScrollbar("x"),o.showScrollbar("y"),o.isMouseEntering=!0),o.onMouseEntered()},this._onMouseEntered=function(){_(o.el,o.classNames.mouseEntered),o.options.autoHide&&(o.hideScrollbar("x"),o.hideScrollbar("y")),o.isMouseEntering=!1},this._onMouseMove=function(t){o.mouseX=t.clientX,o.mouseY=t.clientY,(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseMoveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseMoveForAxis("y")},this.onMouseLeave=function(){o.onMouseMove.cancel(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseLeaveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseLeaveForAxis("y"),o.mouseX=-1,o.mouseY=-1},this._onWindowResize=function(){o.scrollbarWidth=o.getScrollbarWidth(),o.hideNativeScrollbar()},this.onPointerEvent=function(t){var e,n;o.axis.x.track.el&&o.axis.y.track.el&&o.axis.x.scrollbar.el&&o.axis.y.scrollbar.el&&(o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&(e=o.isWithinBounds(o.axis.x.track.rect)),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&(n=o.isWithinBounds(o.axis.y.track.rect)),(e||n)&&(t.stopPropagation(),"pointerdown"===t.type&&"touch"!==t.pointerType&&(e&&(o.axis.x.scrollbar.rect=o.axis.x.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.x.scrollbar.rect)?o.onDragStart(t,"x"):o.onTrackClick(t,"x")),n&&(o.axis.y.scrollbar.rect=o.axis.y.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.scrollbar.rect)?o.onDragStart(t,"y"):o.onTrackClick(t,"y")))))},this.drag=function(t){var n,r,i,s,a,l,u,c,h,d,p;if(o.draggedAxis&&o.contentWrapperEl){var f=o.axis[o.draggedAxis].track,m=null!==(r=null===(n=f.rect)||void 0===n?void 0:n[o.axis[o.draggedAxis].sizeAttr])&&void 0!==r?r:0,g=o.axis[o.draggedAxis].scrollbar,v=null!==(s=null===(i=o.contentWrapperEl)||void 0===i?void 0:i[o.axis[o.draggedAxis].scrollSizeAttr])&&void 0!==s?s:0,y=parseInt(null!==(l=null===(a=o.elStyles)||void 0===a?void 0:a[o.axis[o.draggedAxis].sizeAttr])&&void 0!==l?l:"0px",10);t.preventDefault(),t.stopPropagation();var _=("y"===o.draggedAxis?t.pageY:t.pageX)-(null!==(c=null===(u=f.rect)||void 0===u?void 0:u[o.axis[o.draggedAxis].offsetAttr])&&void 0!==c?c:0)-o.axis[o.draggedAxis].dragOffset,b=(_="x"===o.draggedAxis&&o.isRtl?(null!==(d=null===(h=f.rect)||void 0===h?void 0:h[o.axis[o.draggedAxis].sizeAttr])&&void 0!==d?d:0)-g.size-_:_)/(m-g.size)*(v-y);"x"===o.draggedAxis&&o.isRtl&&(b=(null===(p=e.getRtlHelpers())||void 0===p?void 0:p.isScrollingToNegative)?-b:b),o.contentWrapperEl[o.axis[o.draggedAxis].scrollOffsetAttr]=b}},this.onEndDrag=function(t){var e=g(o.el),n=m(o.el);t.preventDefault(),t.stopPropagation(),_(o.el,o.classNames.dragging),e.removeEventListener("mousemove",o.drag,!0),e.removeEventListener("mouseup",o.onEndDrag,!0),o.removePreventClickId=n.setTimeout((function(){e.removeEventListener("click",o.preventClick,!0),e.removeEventListener("dblclick",o.preventClick,!0),o.removePreventClickId=null}))},this.preventClick=function(t){t.preventDefault(),t.stopPropagation()},this.el=n,this.options=i(i({},e.defaultOptions),r),this.classNames=i(i({},e.defaultOptions.classNames),r.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,forceVisible:!1,track:{size:null,el:null,rect:null,isVisible:!1},scrollbar:{size:null,el:null,rect:null,isVisible:!1}}},"object"!=typeof this.el||!this.el.nodeName)throw new Error("Argument passed to SimpleBar must be an HTML element instead of ".concat(this.el));this.onMouseMove=t.throttle(this._onMouseMove,64),this.onWindowResize=t.debounce(this._onWindowResize,64,{leading:!0}),this.onStopScrolling=t.debounce(this._onStopScrolling,this.stopScrollDelay),this.onMouseEntered=t.debounce(this._onMouseEntered,this.stopScrollDelay),this.init()}return e.getRtlHelpers=function(){if(e.rtlHelpers)return e.rtlHelpers;var t=document.createElement("div");t.innerHTML='<div class="simplebar-dummy-scrollbar-size"><div></div></div>';var n=t.firstElementChild,r=null==n?void 0:n.firstElementChild;if(!r)return null;document.body.appendChild(n),n.scrollLeft=0;var i=e.getOffset(n),o=e.getOffset(r);n.scrollLeft=-999;var s=e.getOffset(r);return document.body.removeChild(n),e.rtlHelpers={isScrollOriginAtZero:i.left!==o.left,isScrollingToNegative:o.left!==s.left},e.rtlHelpers},e.prototype.getScrollbarWidth=function(){try{return this.contentWrapperEl&&"none"===getComputedStyle(this.contentWrapperEl,"::-webkit-scrollbar").display||"scrollbarWidth"in document.documentElement.style||"-ms-overflow-style"in document.documentElement.style?0:a()}catch(t){return a()}},e.getOffset=function(t){var e=t.getBoundingClientRect(),n=g(t),r=m(t);return{top:e.top+(r.pageYOffset||n.documentElement.scrollTop),left:e.left+(r.pageXOffset||n.documentElement.scrollLeft)}},e.prototype.init=function(){r.default&&(this.initDOM(),this.rtlHelpers=e.getRtlHelpers(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.prototype.initDOM=function(){var t,e;this.wrapperEl=this.el.querySelector(b(this.classNames.wrapper)),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector(b(this.classNames.contentWrapper)),this.contentEl=this.options.contentNode||this.el.querySelector(b(this.classNames.contentEl)),this.offsetEl=this.el.querySelector(b(this.classNames.offset)),this.maskEl=this.el.querySelector(b(this.classNames.mask)),this.placeholderEl=this.findChild(this.wrapperEl,b(this.classNames.placeholder)),this.heightAutoObserverWrapperEl=this.el.querySelector(b(this.classNames.heightAutoObserverWrapperEl)),this.heightAutoObserverEl=this.el.querySelector(b(this.classNames.heightAutoObserverEl)),this.axis.x.track.el=this.findChild(this.el,"".concat(b(this.classNames.track)).concat(b(this.classNames.horizontal))),this.axis.y.track.el=this.findChild(this.el,"".concat(b(this.classNames.track)).concat(b(this.classNames.vertical))),this.axis.x.scrollbar.el=(null===(t=this.axis.x.track.el)||void 0===t?void 0:t.querySelector(b(this.classNames.scrollbar)))||null,this.axis.y.scrollbar.el=(null===(e=this.axis.y.track.el)||void 0===e?void 0:e.querySelector(b(this.classNames.scrollbar)))||null,this.options.autoHide||(y(this.axis.x.scrollbar.el,this.classNames.visible),y(this.axis.y.scrollbar.el,this.classNames.visible))},e.prototype.initListeners=function(){var t,e=this,n=m(this.el);if(this.el.addEventListener("mouseenter",this.onMouseEnter),this.el.addEventListener("pointerdown",this.onPointerEvent,!0),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),null===(t=this.contentWrapperEl)||void 0===t||t.addEventListener("scroll",this.onScroll),n.addEventListener("resize",this.onWindowResize),this.contentEl){if(window.ResizeObserver){var r=!1,i=n.ResizeObserver||ResizeObserver;this.resizeObserver=new i((function(){r&&n.requestAnimationFrame((function(){e.recalculate()}))})),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),n.requestAnimationFrame((function(){r=!0}))}this.mutationObserver=new n.MutationObserver((function(){n.requestAnimationFrame((function(){e.recalculate()}))})),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})}},e.prototype.recalculate=function(){if(this.heightAutoObserverEl&&this.contentEl&&this.contentWrapperEl&&this.wrapperEl&&this.placeholderEl){var t=m(this.el);this.elStyles=t.getComputedStyle(this.el),this.isRtl="rtl"===this.elStyles.direction;var e=this.contentEl.offsetWidth,n=this.heightAutoObserverEl.offsetHeight<=1,r=this.heightAutoObserverEl.offsetWidth<=1||e>0,i=this.contentWrapperEl.offsetWidth,o=this.elStyles.overflowX,s=this.elStyles.overflowY;this.contentEl.style.padding="".concat(this.elStyles.paddingTop," ").concat(this.elStyles.paddingRight," ").concat(this.elStyles.paddingBottom," ").concat(this.elStyles.paddingLeft),this.wrapperEl.style.margin="-".concat(this.elStyles.paddingTop," -").concat(this.elStyles.paddingRight," -").concat(this.elStyles.paddingBottom," -").concat(this.elStyles.paddingLeft);var a=this.contentEl.scrollHeight,l=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=n?"auto":"100%",this.placeholderEl.style.width=r?"".concat(e||l,"px"):"auto",this.placeholderEl.style.height="".concat(a,"px");var u=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=0!==e&&l>e,this.axis.y.isOverflowing=a>u,this.axis.x.isOverflowing="hidden"!==o&&this.axis.x.isOverflowing,this.axis.y.isOverflowing="hidden"!==s&&this.axis.y.isOverflowing,this.axis.x.forceVisible="x"===this.options.forceVisible||!0===this.options.forceVisible,this.axis.y.forceVisible="y"===this.options.forceVisible||!0===this.options.forceVisible,this.hideNativeScrollbar();var c=this.axis.x.isOverflowing?this.scrollbarWidth:0,h=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&l>i-h,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&a>u-c,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el&&(this.axis.x.scrollbar.el.style.width="".concat(this.axis.x.scrollbar.size,"px")),this.axis.y.scrollbar.el&&(this.axis.y.scrollbar.el.style.height="".concat(this.axis.y.scrollbar.size,"px")),this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")}},e.prototype.getScrollbarSize=function(t){var e,n;if(void 0===t&&(t="y"),!this.axis[t].isOverflowing||!this.contentEl)return 0;var r,i=this.contentEl[this.axis[t].scrollSizeAttr],o=null!==(n=null===(e=this.axis[t].track.el)||void 0===e?void 0:e[this.axis[t].offsetSizeAttr])&&void 0!==n?n:0,s=o/i;return r=Math.max(~~(s*o),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(r=Math.min(r,this.options.scrollbarMaxSize)),r},e.prototype.positionScrollbar=function(t){var n,r,i;void 0===t&&(t="y");var o=this.axis[t].scrollbar;if(this.axis[t].isOverflowing&&this.contentWrapperEl&&o.el&&this.elStyles){var s=this.contentWrapperEl[this.axis[t].scrollSizeAttr],a=(null===(n=this.axis[t].track.el)||void 0===n?void 0:n[this.axis[t].offsetSizeAttr])||0,l=parseInt(this.elStyles[this.axis[t].sizeAttr],10),u=this.contentWrapperEl[this.axis[t].scrollOffsetAttr];u="x"===t&&this.isRtl&&(null===(r=e.getRtlHelpers())||void 0===r?void 0:r.isScrollOriginAtZero)?-u:u,"x"===t&&this.isRtl&&(u=(null===(i=e.getRtlHelpers())||void 0===i?void 0:i.isScrollingToNegative)?u:-u);var c=u/(s-l),h=~~((a-o.size)*c);h="x"===t&&this.isRtl?-h+(a-o.size):h,o.el.style.transform="x"===t?"translate3d(".concat(h,"px, 0, 0)"):"translate3d(0, ".concat(h,"px, 0)")}},e.prototype.toggleTrackVisibility=function(t){void 0===t&&(t="y");var e=this.axis[t].track.el,n=this.axis[t].scrollbar.el;e&&n&&this.contentWrapperEl&&(this.axis[t].isOverflowing||this.axis[t].forceVisible?(e.style.visibility="visible",this.contentWrapperEl.style[this.axis[t].overflowAttr]="scroll",this.el.classList.add("".concat(this.classNames.scrollable,"-").concat(t))):(e.style.visibility="hidden",this.contentWrapperEl.style[this.axis[t].overflowAttr]="hidden",this.el.classList.remove("".concat(this.classNames.scrollable,"-").concat(t))),this.axis[t].isOverflowing?n.style.display="block":n.style.display="none")},e.prototype.showScrollbar=function(t){void 0===t&&(t="y"),this.axis[t].isOverflowing&&!this.axis[t].scrollbar.isVisible&&(y(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!0)},e.prototype.hideScrollbar=function(t){void 0===t&&(t="y"),this.axis[t].isOverflowing&&this.axis[t].scrollbar.isVisible&&(_(this.axis[t].scrollbar.el,this.classNames.visible),this.axis[t].scrollbar.isVisible=!1)},e.prototype.hideNativeScrollbar=function(){this.offsetEl&&(this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px",this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-".concat(this.scrollbarWidth,"px"):"0px")},e.prototype.onMouseMoveForAxis=function(t){void 0===t&&(t="y");var e=this.axis[t];e.track.el&&e.scrollbar.el&&(e.track.rect=e.track.el.getBoundingClientRect(),e.scrollbar.rect=e.scrollbar.el.getBoundingClientRect(),this.isWithinBounds(e.track.rect)?(this.showScrollbar(t),y(e.track.el,this.classNames.hover),this.isWithinBounds(e.scrollbar.rect)?y(e.scrollbar.el,this.classNames.hover):_(e.scrollbar.el,this.classNames.hover)):(_(e.track.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)))},e.prototype.onMouseLeaveForAxis=function(t){void 0===t&&(t="y"),_(this.axis[t].track.el,this.classNames.hover),_(this.axis[t].scrollbar.el,this.classNames.hover),this.options.autoHide&&this.hideScrollbar(t)},e.prototype.onDragStart=function(t,e){var n;void 0===e&&(e="y");var r=g(this.el),i=m(this.el),o=this.axis[e].scrollbar,s="y"===e?t.pageY:t.pageX;this.axis[e].dragOffset=s-((null===(n=o.rect)||void 0===n?void 0:n[this.axis[e].offsetAttr])||0),this.draggedAxis=e,y(this.el,this.classNames.dragging),r.addEventListener("mousemove",this.drag,!0),r.addEventListener("mouseup",this.onEndDrag,!0),null===this.removePreventClickId?(r.addEventListener("click",this.preventClick,!0),r.addEventListener("dblclick",this.preventClick,!0)):(i.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.prototype.onTrackClick=function(t,e){var n,r,i,o,s=this;void 0===e&&(e="y");var a=this.axis[e];if(this.options.clickOnTrack&&a.scrollbar.el&&this.contentWrapperEl){t.preventDefault();var l=m(this.el);this.axis[e].scrollbar.rect=a.scrollbar.el.getBoundingClientRect();var u=null!==(r=null===(n=this.axis[e].scrollbar.rect)||void 0===n?void 0:n[this.axis[e].offsetAttr])&&void 0!==r?r:0,c=parseInt(null!==(o=null===(i=this.elStyles)||void 0===i?void 0:i[this.axis[e].sizeAttr])&&void 0!==o?o:"0px",10),h=this.contentWrapperEl[this.axis[e].scrollOffsetAttr],d=("y"===e?this.mouseY-u:this.mouseX-u)<0?-1:1,p=-1===d?h-c:h+c,f=function(){s.contentWrapperEl&&(-1===d?h>p&&(h-=40,s.contentWrapperEl[s.axis[e].scrollOffsetAttr]=h,l.requestAnimationFrame(f)):h<p&&(h+=40,s.contentWrapperEl[s.axis[e].scrollOffsetAttr]=h,l.requestAnimationFrame(f)))};f()}},e.prototype.getContentElement=function(){return this.contentEl},e.prototype.getScrollElement=function(){return this.contentWrapperEl},e.prototype.removeListeners=function(){var t=m(this.el);this.el.removeEventListener("mouseenter",this.onMouseEnter),this.el.removeEventListener("pointerdown",this.onPointerEvent,!0),this.el.removeEventListener("mousemove",this.onMouseMove),this.el.removeEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl&&this.contentWrapperEl.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onWindowResize),this.mutationObserver&&this.mutationObserver.disconnect(),this.resizeObserver&&this.resizeObserver.disconnect(),this.onMouseMove.cancel(),this.onWindowResize.cancel(),this.onStopScrolling.cancel(),this.onMouseEntered.cancel()},e.prototype.unMount=function(){this.removeListeners()},e.prototype.isWithinBounds=function(t){return this.mouseX>=t.left&&this.mouseX<=t.left+t.width&&this.mouseY>=t.top&&this.mouseY<=t.top+t.height},e.prototype.findChild=function(t,e){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector;return Array.prototype.filter.call(t.children,(function(t){return n.call(t,e)}))[0]},e.rtlHelpers=null,e.defaultOptions={forceVisible:!1,clickOnTrack:!0,scrollbarMinSize:25,scrollbarMaxSize:0,ariaLabel:"scrollable content",classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging",scrolling:"simplebar-scrolling",scrollable:"simplebar-scrollable",mouseEntered:"simplebar-mouse-entered"},scrollableNode:null,contentNode:null,autoHide:!0},e.getOptions=v,e.helpers=f,e}()}(n("LvDl"),n("AxL3"))},lnE3:function(t,e,n){"use strict";var r=Function.prototype.call,i=Object.prototype.hasOwnProperty,o=n("D3zA");t.exports=o.call(r,i)},ng4s:function(t,e,n){"use strict";n.r(e);var r=n("EVdn"),i=n.n(r);window.$=window.jQuery=i.a;var o=n("uvZ8"),s=n.n(o),a=n("yt1c"),l=n.n(a),u=n("yrm9"),c=n.n(u),h=n("z/o8");function d(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)}}var p,f,m,g,v,y,_,b,x,w,E,T,S,A=function(){return p||"undefined"!=typeof window&&(p=window.gsap)&&p.registerPlugin&&p},M=1,D=[],C=[],R=[],O=Date.now,P=function(t,e){return e},I=function(t,e){return~R.indexOf(t)&&R[R.indexOf(t)+1][e]},L=function(t){return!!~w.indexOf(t)},N=function(t,e,n,r,i){return t.addEventListener(e,n,{passive:!r,capture:!!i})},F=function(t,e,n,r){return t.removeEventListener(e,n,!!r)},k=function(){return E&&E.isPressed||C.cache++},U=function(t,e){var n=function n(r){if(r||0===r){M&&(m.history.scrollRestoration="manual");var i=E&&E.isPressed;r=n.v=Math.round(r)||(E&&E.iOS?1:0),t(r),n.cacheID=C.cache,i&&P("ss",r)}else(e||C.cache!==n.cacheID||P("ref"))&&(n.cacheID=C.cache,n.v=t());return n.v+n.offset};return n.offset=0,t&&n},B={s:"scrollLeft",p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:U((function(t){return arguments.length?m.scrollTo(t,G.sc()):m.pageXOffset||g.scrollLeft||v.scrollLeft||y.scrollLeft||0}))},G={s:"scrollTop",p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:B,sc:U((function(t){return arguments.length?m.scrollTo(B.sc(),t):m.pageYOffset||g.scrollTop||v.scrollTop||y.scrollTop||0}))},z=function(t,e){return(e&&e._ctx&&e._ctx.selector||p.utils.toArray)(t)[0]||("string"==typeof t&&!1!==p.config().nullTargetWarn?console.warn("Element not found:",t):null)},H=function(t,e){var n=e.s,r=e.sc;L(t)&&(t=g.scrollingElement||v);var i=C.indexOf(t),o=r===G.sc?1:2;!~i&&(i=C.push(t)-1),C[i+o]||N(t,"scroll",k);var s=C[i+o],a=s||(C[i+o]=U(I(t,n),!0)||(L(t)?r:U((function(e){return arguments.length?t[n]=e:t[n]}))));return a.target=t,s||(a.smooth="smooth"===p.getProperty(t,"scrollBehavior")),a},j=function(t,e,n){var r=t,i=t,o=O(),s=o,a=e||50,l=Math.max(500,3*a),u=function(t,e){var l=O();e||l-o>a?(i=r,r=t,s=o,o=l):n?r+=t:r=i+(t-i)/(l-s)*(o-s)};return{update:u,reset:function(){i=r=n?0:r,s=o=0},getVelocity:function(t){var e=s,a=i,c=O();return(t||0===t)&&t!==r&&u(t),o===s||c-s>l?0:(r+(n?a:-a))/((n?c:o)-e)*1e3}}},V=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},X=function(t){var e=Math.max.apply(Math,t),n=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(n)?e:n},W=function(){(x=p.core.globals().ScrollTrigger)&&x.core&&function(){var t=x.core,e=t.bridge||{},n=t._scrollers,r=t._proxies;n.push.apply(n,C),r.push.apply(r,R),C=n,R=r,P=function(t,n){return e[t](n)}}()},Y=function(t){return p=t||A(),!f&&p&&"undefined"!=typeof document&&document.body&&(m=window,g=document,v=g.documentElement,y=g.body,w=[m,g,v,y],p.utils.clamp,S=p.core.context||function(){},b="onpointerenter"in y?"pointer":"mouse",_=q.isTouch=m.matchMedia&&m.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in m||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,T=q.eventTypes=("ontouchstart"in v?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in v?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return M=0}),500),W(),f=1),f};B.op=G,C.cache=0;var q=function(){function t(t){this.init(t)}var e,n,r;return t.prototype.init=function(t){f||Y(p)||console.warn("Please gsap.registerPlugin(Observer)"),x||W();var e=t.tolerance,n=t.dragMinimum,r=t.type,i=t.target,o=t.lineHeight,s=t.debounce,a=t.preventDefault,l=t.onStop,u=t.onStopDelay,c=t.ignore,h=t.wheelSpeed,d=t.event,w=t.onDragStart,A=t.onDragEnd,M=t.onDrag,C=t.onPress,R=t.onRelease,P=t.onRight,I=t.onLeft,U=t.onUp,q=t.onDown,$=t.onChangeX,K=t.onChangeY,Z=t.onChange,J=t.onToggleX,Q=t.onToggleY,tt=t.onHover,et=t.onHoverEnd,nt=t.onMove,rt=t.ignoreCheck,it=t.isNormalizer,ot=t.onGestureStart,st=t.onGestureEnd,at=t.onWheel,lt=t.onEnable,ut=t.onDisable,ct=t.onClick,ht=t.scrollSpeed,dt=t.capture,pt=t.allowClicks,ft=t.lockAxis,mt=t.onLockAxis;this.target=i=z(i)||v,this.vars=t,c&&(c=p.utils.toArray(c)),e=e||1e-9,n=n||0,h=h||1,ht=ht||1,r=r||"wheel,touch,pointer",s=!1!==s,o||(o=parseFloat(m.getComputedStyle(y).lineHeight)||22);var gt,vt,yt,_t,bt,xt,wt,Et=this,Tt=0,St=0,At=H(i,B),Mt=H(i,G),Dt=At(),Ct=Mt(),Rt=~r.indexOf("touch")&&!~r.indexOf("pointer")&&"pointerdown"===T[0],Ot=L(i),Pt=i.ownerDocument||g,It=[0,0,0],Lt=[0,0,0],Nt=0,Ft=function(){return Nt=O()},kt=function(t,e){return(Et.event=t)&&c&&~c.indexOf(t.target)||e&&Rt&&"touch"!==t.pointerType||rt&&rt(t,e)},Ut=function(){var t=Et.deltaX=X(It),n=Et.deltaY=X(Lt),r=Math.abs(t)>=e,i=Math.abs(n)>=e;Z&&(r||i)&&Z(Et,t,n,It,Lt),r&&(P&&Et.deltaX>0&&P(Et),I&&Et.deltaX<0&&I(Et),$&&$(Et),J&&Et.deltaX<0!=Tt<0&&J(Et),Tt=Et.deltaX,It[0]=It[1]=It[2]=0),i&&(q&&Et.deltaY>0&&q(Et),U&&Et.deltaY<0&&U(Et),K&&K(Et),Q&&Et.deltaY<0!=St<0&&Q(Et),St=Et.deltaY,Lt[0]=Lt[1]=Lt[2]=0),(_t||yt)&&(nt&&nt(Et),yt&&(M(Et),yt=!1),_t=!1),xt&&!(xt=!1)&&mt&&mt(Et),bt&&(at(Et),bt=!1),gt=0},Bt=function(t,e,n){It[n]+=t,Lt[n]+=e,Et._vx.update(t),Et._vy.update(e),s?gt||(gt=requestAnimationFrame(Ut)):Ut()},Gt=function(t,e){ft&&!wt&&(Et.axis=wt=Math.abs(t)>Math.abs(e)?"x":"y",xt=!0),"y"!==wt&&(It[2]+=t,Et._vx.update(t,!0)),"x"!==wt&&(Lt[2]+=e,Et._vy.update(e,!0)),s?gt||(gt=requestAnimationFrame(Ut)):Ut()},zt=function(t){if(!kt(t,1)){var e=(t=V(t,a)).clientX,r=t.clientY,i=e-Et.x,o=r-Et.y,s=Et.isDragging;Et.x=e,Et.y=r,(s||Math.abs(Et.startX-e)>=n||Math.abs(Et.startY-r)>=n)&&(M&&(yt=!0),s||(Et.isDragging=!0),Gt(i,o),s||w&&w(Et))}},Ht=Et.onPress=function(t){kt(t,1)||t&&t.button||(Et.axis=wt=null,vt.pause(),Et.isPressed=!0,t=V(t),Tt=St=0,Et.startX=Et.x=t.clientX,Et.startY=Et.y=t.clientY,Et._vx.reset(),Et._vy.reset(),N(it?i:Pt,T[1],zt,a,!0),Et.deltaX=Et.deltaY=0,C&&C(Et))},jt=Et.onRelease=function(t){if(!kt(t,1)){F(it?i:Pt,T[1],zt,!0);var e=!isNaN(Et.y-Et.startY),n=Et.isDragging,r=n&&(Math.abs(Et.x-Et.startX)>3||Math.abs(Et.y-Et.startY)>3),o=V(t);!r&&e&&(Et._vx.reset(),Et._vy.reset(),a&&pt&&p.delayedCall(.08,(function(){if(O()-Nt>300&&!t.defaultPrevented)if(t.target.click)t.target.click();else if(Pt.createEvent){var e=Pt.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,m,1,o.screenX,o.screenY,o.clientX,o.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(e)}}))),Et.isDragging=Et.isGesturing=Et.isPressed=!1,l&&n&&!it&&vt.restart(!0),A&&n&&A(Et),R&&R(Et,r)}},Vt=function(t){return t.touches&&t.touches.length>1&&(Et.isGesturing=!0)&&ot(t,Et.isDragging)},Xt=function(){return(Et.isGesturing=!1)||st(Et)},Wt=function(t){if(!kt(t)){var e=At(),n=Mt();Bt((e-Dt)*ht,(n-Ct)*ht,1),Dt=e,Ct=n,l&&vt.restart(!0)}},Yt=function(t){if(!kt(t)){t=V(t,a),at&&(bt=!0);var e=(1===t.deltaMode?o:2===t.deltaMode?m.innerHeight:1)*h;Bt(t.deltaX*e,t.deltaY*e,0),l&&!it&&vt.restart(!0)}},qt=function(t){if(!kt(t)){var e=t.clientX,n=t.clientY,r=e-Et.x,i=n-Et.y;Et.x=e,Et.y=n,_t=!0,l&&vt.restart(!0),(r||i)&&Gt(r,i)}},$t=function(t){Et.event=t,tt(Et)},Kt=function(t){Et.event=t,et(Et)},Zt=function(t){return kt(t)||V(t,a)&&ct(Et)};vt=Et._dc=p.delayedCall(u||.25,(function(){Et._vx.reset(),Et._vy.reset(),vt.pause(),l&&l(Et)})).pause(),Et.deltaX=Et.deltaY=0,Et._vx=j(0,50,!0),Et._vy=j(0,50,!0),Et.scrollX=At,Et.scrollY=Mt,Et.isDragging=Et.isGesturing=Et.isPressed=!1,S(this),Et.enable=function(t){return Et.isEnabled||(N(Ot?Pt:i,"scroll",k),r.indexOf("scroll")>=0&&N(Ot?Pt:i,"scroll",Wt,a,dt),r.indexOf("wheel")>=0&&N(i,"wheel",Yt,a,dt),(r.indexOf("touch")>=0&&_||r.indexOf("pointer")>=0)&&(N(i,T[0],Ht,a,dt),N(Pt,T[2],jt),N(Pt,T[3],jt),pt&&N(i,"click",Ft,!1,!0),ct&&N(i,"click",Zt),ot&&N(Pt,"gesturestart",Vt),st&&N(Pt,"gestureend",Xt),tt&&N(i,b+"enter",$t),et&&N(i,b+"leave",Kt),nt&&N(i,b+"move",qt)),Et.isEnabled=!0,t&&t.type&&Ht(t),lt&&lt(Et)),Et},Et.disable=function(){Et.isEnabled&&(D.filter((function(t){return t!==Et&&L(t.target)})).length||F(Ot?Pt:i,"scroll",k),Et.isPressed&&(Et._vx.reset(),Et._vy.reset(),F(it?i:Pt,T[1],zt,!0)),F(Ot?Pt:i,"scroll",Wt,dt),F(i,"wheel",Yt,dt),F(i,T[0],Ht,dt),F(Pt,T[2],jt),F(Pt,T[3],jt),F(i,"click",Ft,!0),F(i,"click",Zt),F(Pt,"gesturestart",Vt),F(Pt,"gestureend",Xt),F(i,b+"enter",$t),F(i,b+"leave",Kt),F(i,b+"move",qt),Et.isEnabled=Et.isPressed=Et.isDragging=!1,ut&&ut(Et))},Et.kill=Et.revert=function(){Et.disable();var t=D.indexOf(Et);t>=0&&D.splice(t,1),E===Et&&(E=0)},D.push(Et),it&&L(i)&&(E=Et),Et.enable(d)},e=t,(n=[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}])&&d(e.prototype,n),r&&d(e,r),t}();q.version="3.12.3",q.create=function(t){return new q(t)},q.register=Y,q.getAll=function(){return D.slice()},q.getById=function(t){return D.filter((function(e){return e.vars.id===t}))[0]},A()&&p.registerPlugin(q);var K,Z,J,Q,tt,et,nt,rt,it,ot,st,at,lt,ut,ct,ht,dt,pt,ft,mt,gt,vt,yt,_t,bt,xt,wt,Et,Tt,St,At,Mt,Dt,Ct,Rt,Ot,Pt,It,Lt=1,Nt=Date.now,Ft=Nt(),kt=0,Ut=0,Bt=function(t,e,n){var r=Jt(t)&&("clamp("===t.substr(0,6)||t.indexOf("max")>-1);return n["_"+e+"Clamp"]=r,r?t.substr(6,t.length-7):t},Gt=function(t,e){return!e||Jt(t)&&"clamp("===t.substr(0,6)?t:"clamp("+t+")"},zt=function(){return ut=1},Ht=function(){return ut=0},jt=function(t){return t},Vt=function(t){return Math.round(1e5*t)/1e5||0},Xt=function(){return"undefined"!=typeof window},Wt=function(){return K||Xt()&&(K=window.gsap)&&K.registerPlugin&&K},Yt=function(t){return!!~nt.indexOf(t)},qt=function(t){return("Height"===t?At:J["inner"+t])||tt["client"+t]||et["client"+t]},$t=function(t){return I(t,"getBoundingClientRect")||(Yt(t)?function(){return Ke.width=J.innerWidth,Ke.height=At,Ke}:function(){return ue(t)})},Kt=function(t,e){var n=e.s,r=e.d2,i=e.d,o=e.a;return Math.max(0,(n="scroll"+r)&&(o=I(t,n))?o()-$t(t)()[i]:Yt(t)?(tt[n]||et[n])-qt(r):t[n]-t["offset"+r])},Zt=function(t,e){for(var n=0;n<ft.length;n+=3)(!e||~e.indexOf(ft[n+1]))&&t(ft[n],ft[n+1],ft[n+2])},Jt=function(t){return"string"==typeof t},Qt=function(t){return"function"==typeof t},te=function(t){return"number"==typeof t},ee=function(t){return"object"==typeof t},ne=function(t,e,n){return t&&t.progress(e?0:1)&&n&&t.pause()},re=function(t,e){if(t.enabled){var n=t._ctx?t._ctx.add((function(){return e(t)})):e(t);n&&n.totalTime&&(t.callbackAnimation=n)}},ie=Math.abs,oe="padding",se="px",ae=function(t){return J.getComputedStyle(t)},le=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},ue=function(t,e){var n=e&&"matrix(1, 0, 0, 1, 0, 0)"!==ae(t)[ct]&&K.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),r=t.getBoundingClientRect();return n&&n.progress(0).kill(),r},ce=function(t,e){var n=e.d2;return t["offset"+n]||t["client"+n]||0},he=function(t){var e,n=[],r=t.labels,i=t.duration();for(e in r)n.push(r[e]/i);return n},de=function(t){var e=K.utils.snap(t),n=Array.isArray(t)&&t.slice(0).sort((function(t,e){return t-e}));return n?function(t,r,i){var o;if(void 0===i&&(i=.001),!r)return e(t);if(r>0){for(t-=i,o=0;o<n.length;o++)if(n[o]>=t)return n[o];return n[o-1]}for(o=n.length,t+=i;o--;)if(n[o]<=t)return n[o];return n[0]}:function(n,r,i){void 0===i&&(i=.001);var o=e(n);return!r||Math.abs(o-n)<i||o-n<0==r<0?o:e(r<0?n-t:n+t)}},pe=function(t,e,n,r){return n.split(",").forEach((function(n){return t(e,n,r)}))},fe=function(t,e,n,r,i){return t.addEventListener(e,n,{passive:!r,capture:!!i})},me=function(t,e,n,r){return t.removeEventListener(e,n,!!r)},ge=function(t,e,n){(n=n&&n.wheelHandler)&&(t(e,"wheel",n),t(e,"touchmove",n))},ve={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},ye={toggleActions:"play",anticipatePin:0},_e={top:0,left:0,center:.5,bottom:1,right:1},be=function(t,e){if(Jt(t)){var n=t.indexOf("="),r=~n?+(t.charAt(n-1)+1)*parseFloat(t.substr(n+1)):0;~n&&(t.indexOf("%")>n&&(r*=e/100),t=t.substr(0,n-1)),t=r+(t in _e?_e[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},xe=function(t,e,n,r,i,o,s,a){var l=i.startColor,u=i.endColor,c=i.fontSize,h=i.indent,d=i.fontWeight,p=Q.createElement("div"),f=Yt(n)||"fixed"===I(n,"pinType"),m=-1!==t.indexOf("scroller"),g=f?et:n,v=-1!==t.indexOf("start"),y=v?l:u,_="border-color:"+y+";font-size:"+c+";color:"+y+";font-weight:"+d+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return _+="position:"+((m||a)&&f?"fixed;":"absolute;"),(m||a||!f)&&(_+=(r===G?"right":"bottom")+":"+(o+parseFloat(h))+"px;"),s&&(_+="box-sizing:border-box;text-align:left;width:"+s.offsetWidth+"px;"),p._isStart=v,p.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),p.style.cssText=_,p.innerText=e||0===e?t+"-"+e:t,g.children[0]?g.insertBefore(p,g.children[0]):g.appendChild(p),p._offset=p["offset"+r.op.d2],we(p,0,r,v),p},we=function(t,e,n,r){var i={display:"block"},o=n[r?"os2":"p2"],s=n[r?"p2":"os2"];t._isFlipped=r,i[n.a+"Percent"]=r?-100:0,i[n.a]=r?"1px":0,i["border"+o+"Width"]=1,i["border"+s+"Width"]=0,i[n.p]=e+"px",K.set(t,i)},Ee=[],Te={},Se=function(){return Nt()-kt>34&&(Rt||(Rt=requestAnimationFrame(je)))},Ae=function(){(!yt||!yt.isPressed||yt.startX>et.clientWidth)&&(C.cache++,yt?Rt||(Rt=requestAnimationFrame(je)):je(),kt||Pe("scrollStart"),kt=Nt())},Me=function(){xt=J.innerWidth,bt=J.innerHeight},De=function(){C.cache++,!lt&&!vt&&!Q.fullscreenElement&&!Q.webkitFullscreenElement&&(!_t||xt!==J.innerWidth||Math.abs(J.innerHeight-bt)>.25*J.innerHeight)&&rt.restart(!0)},Ce={},Re=[],Oe=function t(){return me(rn,"scrollEnd",t)||Ge(!0)},Pe=function(t){return Ce[t]&&Ce[t].map((function(t){return t()}))||Re},Ie=[],Le=function(t){for(var e=0;e<Ie.length;e+=5)(!t||Ie[e+4]&&Ie[e+4].query===t)&&(Ie[e].style.cssText=Ie[e+1],Ie[e].getBBox&&Ie[e].setAttribute("transform",Ie[e+2]||""),Ie[e+3].uncache=1)},Ne=function(t,e){var n;for(ht=0;ht<Ee.length;ht++)!(n=Ee[ht])||e&&n._ctx!==e||(t?n.kill(1):n.revert(!0,!0));Mt=!0,e&&Le(e),e||Pe("revert")},Fe=function(t,e){C.cache++,(e||!Ot)&&C.forEach((function(t){return Qt(t)&&t.cacheID++&&(t.rec=0)})),Jt(t)&&(J.history.scrollRestoration=Tt=t)},ke=0,Ue=function(){et.appendChild(St),At=!yt&&St.offsetHeight||J.innerHeight,et.removeChild(St)},Be=function(t){return it(".gsap-marker-start, .gsap-marker-end, .gsap-marker-scroller-start, .gsap-marker-scroller-end").forEach((function(e){return e.style.display=t?"none":"block"}))},Ge=function(t,e){if(!kt||t){Ue(),Ot=rn.isRefreshing=!0,C.forEach((function(t){return Qt(t)&&++t.cacheID&&(t.rec=t())}));var n=Pe("refreshInit");mt&&rn.sort(),e||Ne(),C.forEach((function(t){Qt(t)&&(t.smooth&&(t.target.style.scrollBehavior="auto"),t(0))})),Ee.slice(0).forEach((function(t){return t.refresh()})),Mt=!1,Ee.forEach((function(t){if(t._subPinOffset&&t.pin){var e=t.vars.horizontal?"offsetWidth":"offsetHeight",n=t.pin[e];t.revert(!0,1),t.adjustPinSpacing(t.pin[e]-n),t.refresh()}})),Dt=1,Be(!0),Ee.forEach((function(t){var e=Kt(t.scroller,t._dir),n="max"===t.vars.end||t._endClamp&&t.end>e,r=t._startClamp&&t.start>=e;(n||r)&&t.setPositions(r?e-1:t.start,n?Math.max(r?e:t.start+1,e):t.end,!0)})),Be(!1),Dt=0,n.forEach((function(t){return t&&t.render&&t.render(-1)})),C.forEach((function(t){Qt(t)&&(t.smooth&&requestAnimationFrame((function(){return t.target.style.scrollBehavior="smooth"})),t.rec&&t(t.rec))})),Fe(Tt,1),rt.pause(),ke++,Ot=2,je(2),Ee.forEach((function(t){return Qt(t.vars.onRefresh)&&t.vars.onRefresh(t)})),Ot=rn.isRefreshing=!1,Pe("refresh")}else fe(rn,"scrollEnd",Oe)},ze=0,He=1,je=function(t){if(2===t||!Ot&&!Mt){rn.isUpdating=!0,It&&It.update(0);var e=Ee.length,n=Nt(),r=n-Ft>=50,i=e&&Ee[0].scroll();if(He=ze>i?-1:1,Ot||(ze=i),r&&(kt&&!ut&&n-kt>200&&(kt=0,Pe("scrollEnd")),st=Ft,Ft=n),He<0){for(ht=e;ht-- >0;)Ee[ht]&&Ee[ht].update(0,r);He=1}else for(ht=0;ht<e;ht++)Ee[ht]&&Ee[ht].update(0,r);rn.isUpdating=!1}Rt=0},Ve=["left","top","bottom","right","marginBottom","marginRight","marginTop","marginLeft","display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Xe=Ve.concat(["width","height","boxSizing","maxWidth","maxHeight","position","margin",oe,oe+"Top",oe+"Right",oe+"Bottom",oe+"Left"]),We=function(t,e,n,r){if(!t._gsap.swappedIn){for(var i,o=Ve.length,s=e.style,a=t.style;o--;)s[i=Ve[o]]=n[i];s.position="absolute"===n.position?"absolute":"relative","inline"===n.display&&(s.display="inline-block"),a.bottom=a.right="auto",s.flexBasis=n.flexBasis||"auto",s.overflow="visible",s.boxSizing="border-box",s.width=ce(t,B)+se,s.height=ce(t,G)+se,s[oe]=a.margin=a.top=a.left="0",qe(r),a.width=a.maxWidth=n.width,a.height=a.maxHeight=n.height,a[oe]=n[oe],t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},Ye=/([A-Z])/g,qe=function(t){if(t){var e,n,r=t.t.style,i=t.length,o=0;for((t.t._gsap||K.core.getCache(t.t)).uncache=1;o<i;o+=2)n=t[o+1],e=t[o],n?r[e]=n:r[e]&&r.removeProperty(e.replace(Ye,"-$1").toLowerCase())}},$e=function(t){for(var e=Xe.length,n=t.style,r=[],i=0;i<e;i++)r.push(Xe[i],n[Xe[i]]);return r.t=t,r},Ke={left:0,top:0},Ze=function(t,e,n,r,i,o,s,a,l,u,c,h,d,p){Qt(t)&&(t=t(a)),Jt(t)&&"max"===t.substr(0,3)&&(t=h+("="===t.charAt(4)?be("0"+t.substr(3),n):0));var f,m,g,v=d?d.time():0;if(d&&d.seek(0),isNaN(t)||(t=+t),te(t))d&&(t=K.utils.mapRange(d.scrollTrigger.start,d.scrollTrigger.end,0,h,t)),s&&we(s,n,r,!0);else{Qt(e)&&(e=e(a));var y,_,b,x,w=(t||"0").split(" ");g=z(e,a)||et,(y=ue(g)||{})&&(y.left||y.top)||"none"!==ae(g).display||(x=g.style.display,g.style.display="block",y=ue(g),x?g.style.display=x:g.style.removeProperty("display")),_=be(w[0],y[r.d]),b=be(w[1]||"0",n),t=y[r.p]-l[r.p]-u+_+i-b,s&&we(s,b,r,n-b<20||s._isStart&&b>20),n-=n-b}if(p&&(a[p]=t||-.001,t<0&&(t=0)),o){var E=t+n,T=o._isStart;f="scroll"+r.d2,we(o,E,r,T&&E>20||!T&&(c?Math.max(et[f],tt[f]):o.parentNode[f])<=E+1),c&&(l=ue(s),c&&(o.style[r.op.p]=l[r.op.p]-r.op.m-o._offset+se))}return d&&g&&(f=ue(g),d.seek(h),m=ue(g),d._caScrollDist=f[r.p]-m[r.p],t=t/d._caScrollDist*h),d&&d.seek(v),d?t:Math.round(t)},Je=/(webkit|moz|length|cssText|inset)/i,Qe=function(t,e,n,r){if(t.parentNode!==e){var i,o,s=t.style;if(e===et){for(i in t._stOrig=s.cssText,o=ae(t))+i||Je.test(i)||!o[i]||"string"!=typeof s[i]||"0"===i||(s[i]=o[i]);s.top=n,s.left=r}else s.cssText=t._stOrig;K.core.getCache(t).uncache=1,e.appendChild(t)}},tn=function(t,e,n){var r=e,i=r;return function(e){var o=Math.round(t());return o!==r&&o!==i&&Math.abs(o-r)>3&&Math.abs(o-i)>3&&(e=o,n&&n()),i=r,r=e,e}},en=function(t,e,n){var r={};r[e.p]="+="+n,K.set(t,r)},nn=function(t,e){var n=H(t,e),r="_scroll"+e.p2,i=function e(i,o,s,a,l){var u=e.tween,c=o.onComplete,h={};s=s||n();var d=tn(n,s,(function(){u.kill(),e.tween=0}));return l=a&&l||0,a=a||i-s,u&&u.kill(),o[r]=i,o.modifiers=h,h[r]=function(){return d(s+a*u.ratio+l*u.ratio*u.ratio)},o.onUpdate=function(){C.cache++,e.tween&&je()},o.onComplete=function(){e.tween=0,c&&c.call(u)},u=e.tween=K.to(t,o)};return t[r]=n,n.wheelHandler=function(){return i.tween&&i.tween.kill()&&(i.tween=0)},fe(t,"wheel",n.wheelHandler),rn.isTouch&&fe(t,"touchmove",n.wheelHandler),i},rn=function(){function t(e,n){Z||t.register(K)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),Et(this),this.init(e,n)}return t.prototype.init=function(e,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),Ut){var r,i,o,s,a,l,u,c,h,d,p,f,m,g,v,y,_,b,x,w,E,T,S,A,M,D,O,P,L,N,F,k,U,j,V,X,W,Y,q,$,Z,nt,rt=e=le(Jt(e)||te(e)||e.nodeType?{trigger:e}:e,ye),at=rt.onUpdate,ct=rt.toggleClass,dt=rt.id,pt=rt.onToggle,ft=rt.onRefresh,vt=rt.scrub,yt=rt.trigger,_t=rt.pin,bt=rt.pinSpacing,xt=rt.invalidateOnRefresh,wt=rt.anticipatePin,Et=rt.onScrubComplete,Tt=rt.onSnapComplete,St=rt.once,At=rt.snap,Mt=rt.pinReparent,Rt=rt.pinSpacer,Ft=rt.containerAnimation,zt=rt.fastScrollEnd,Ht=rt.preventOverlaps,Xt=e.horizontal||e.containerAnimation&&!1!==e.horizontal?B:G,Wt=!vt&&0!==vt,Zt=z(e.scroller||J),pe=K.core.getCache(Zt),ge=Yt(Zt),_e="fixed"===("pinType"in e?e.pinType:I(Zt,"pinType")||ge&&"fixed"),we=[e.onEnter,e.onLeave,e.onEnterBack,e.onLeaveBack],Se=Wt&&e.toggleActions.split(" "),Me="markers"in e?e.markers:ye.markers,Ce=ge?0:parseFloat(ae(Zt)["border"+Xt.p2+"Width"])||0,Re=this,Pe=e.onRefreshInit&&function(){return e.onRefreshInit(Re)},Ie=function(t,e,n){var r=n.d,i=n.d2,o=n.a;return(o=I(t,"getBoundingClientRect"))?function(){return o()[r]}:function(){return(e?qt(i):t["client"+i])||0}}(Zt,ge,Xt),Le=function(t,e){return!e||~R.indexOf(t)?$t(t):function(){return Ke}}(Zt,ge),Ne=0,Fe=0,Ue=0,Be=H(Zt,Xt);if(Re._startClamp=Re._endClamp=!1,Re._dir=Xt,wt*=45,Re.scroller=Zt,Re.scroll=Ft?Ft.time.bind(Ft):Be,s=Be(),Re.vars=e,n=n||e.animation,"refreshPriority"in e&&(mt=1,-9999===e.refreshPriority&&(It=Re)),pe.tweenScroll=pe.tweenScroll||{top:nn(Zt,G),left:nn(Zt,B)},Re.tweenTo=r=pe.tweenScroll[Xt.p],Re.scrubDuration=function(t){(U=te(t)&&t)?k?k.duration(t):k=K.to(n,{ease:"expo",totalProgress:"+=0",duration:U,paused:!0,onComplete:function(){return Et&&Et(Re)}}):(k&&k.progress(1).kill(),k=0)},n&&(n.vars.lazy=!1,n._initted&&!Re.isReverted||!1!==n.vars.immediateRender&&!1!==e.immediateRender&&n.duration()&&n.render(0,!0,!0),Re.animation=n.pause(),n.scrollTrigger=Re,Re.scrubDuration(vt),N=0,dt||(dt=n.vars.id)),At&&(ee(At)&&!At.push||(At={snapTo:At}),"scrollBehavior"in et.style&&K.set(ge?[et,tt]:Zt,{scrollBehavior:"auto"}),C.forEach((function(t){return Qt(t)&&t.target===(ge?Q.scrollingElement||tt:Zt)&&(t.smooth=!1)})),o=Qt(At.snapTo)?At.snapTo:"labels"===At.snapTo?function(t){return function(e){return K.utils.snap(he(t),e)}}(n):"labelsDirectional"===At.snapTo?($=n,function(t,e){return de(he($))(t,e.direction)}):!1!==At.directional?function(t,e){return de(At.snapTo)(t,Nt()-Fe<500?0:e.direction)}:K.utils.snap(At.snapTo),j=At.duration||{min:.1,max:2},j=ee(j)?ot(j.min,j.max):ot(j,j),V=K.delayedCall(At.delay||U/2||.1,(function(){var t=Be(),e=Nt()-Fe<500,i=r.tween;if(!(e||Math.abs(Re.getVelocity())<10)||i||ut||Ne===t)Re.isActive&&Ne!==t&&V.restart(!0);else{var s=(t-l)/g,a=n&&!Wt?n.totalProgress():s,c=e?0:(a-F)/(Nt()-st)*1e3||0,h=K.utils.clamp(-s,1-s,ie(c/2)*c/.185),d=s+(!1===At.inertia?0:h),p=ot(0,1,o(d,Re)),f=Math.round(l+p*g),m=At,v=m.onStart,y=m.onInterrupt,_=m.onComplete;if(t<=u&&t>=l&&f!==t){if(i&&!i._initted&&i.data<=ie(f-t))return;!1===At.inertia&&(h=p-s),r(f,{duration:j(ie(.185*Math.max(ie(d-a),ie(p-a))/c/.05||0)),ease:At.ease||"power3",data:ie(f-t),onInterrupt:function(){return V.restart(!0)&&y&&y(Re)},onComplete:function(){Re.update(),Ne=Be(),k&&n&&n.progress(p),N=F=n&&!Wt?n.totalProgress():Re.progress,Tt&&Tt(Re),_&&_(Re)}},t,h*g,f-t-h*g),v&&v(Re,r.tween)}}})).pause()),dt&&(Te[dt]=Re),(q=(yt=Re.trigger=z(yt||!0!==_t&&_t))&&yt._gsap&&yt._gsap.stRevert)&&(q=q(Re)),_t=!0===_t?yt:z(_t),Jt(ct)&&(ct={targets:yt,className:ct}),_t&&(!1===bt||"margin"===bt||(bt=!(!bt&&_t.parentNode&&_t.parentNode.style&&"flex"===ae(_t.parentNode).display)&&oe),Re.pin=_t,(i=K.core.getCache(_t)).spacer?v=i.pinState:(Rt&&((Rt=z(Rt))&&!Rt.nodeType&&(Rt=Rt.current||Rt.nativeElement),i.spacerIsNative=!!Rt,Rt&&(i.spacerState=$e(Rt))),i.spacer=b=Rt||Q.createElement("div"),b.classList.add("pin-spacer"),dt&&b.classList.add("pin-spacer-"+dt),i.pinState=v=$e(_t)),!1!==e.force3D&&K.set(_t,{force3D:!0}),Re.spacer=b=i.spacer,L=ae(_t),A=L[bt+Xt.os2],w=K.getProperty(_t),E=K.quickSetter(_t,Xt.a,se),We(_t,b,L),_=$e(_t)),Me){f=ee(Me)?le(Me,ve):ve,d=xe("scroller-start",dt,Zt,Xt,f,0),p=xe("scroller-end",dt,Zt,Xt,f,0,d),x=d["offset"+Xt.op.d2];var ze=z(I(Zt,"content")||Zt);c=this.markerStart=xe("start",dt,ze,Xt,f,x,0,Ft),h=this.markerEnd=xe("end",dt,ze,Xt,f,x,0,Ft),Ft&&(Y=K.quickSetter([c,h],Xt.a,se)),_e||R.length&&!0===I(Zt,"fixedMarkers")||(nt=ae(Z=ge?et:Zt).position,Z.style.position="absolute"===nt||"fixed"===nt?nt:"relative",K.set([d,p],{force3D:!0}),D=K.quickSetter(d,Xt.a,se),P=K.quickSetter(p,Xt.a,se))}if(Ft){var je=Ft.vars.onUpdate,Ve=Ft.vars.onUpdateParams;Ft.eventCallback("onUpdate",(function(){Re.update(0,0,1),je&&je.apply(Ft,Ve||[])}))}if(Re.previous=function(){return Ee[Ee.indexOf(Re)-1]},Re.next=function(){return Ee[Ee.indexOf(Re)+1]},Re.revert=function(t,e){if(!e)return Re.kill(!0);var r=!1!==t||!Re.enabled,i=lt;r!==Re.isReverted&&(r&&(X=Math.max(Be(),Re.scroll.rec||0),Ue=Re.progress,W=n&&n.progress()),c&&[c,h,d,p].forEach((function(t){return t.style.display=r?"none":"block"})),r&&(lt=Re,Re.update(r)),!_t||Mt&&Re.isActive||(r?function(t,e,n){qe(n);var r=t._gsap;if(r.spacerIsNative)qe(r.spacerState);else if(t._gsap.swappedIn){var i=e.parentNode;i&&(i.insertBefore(t,e),i.removeChild(e))}t._gsap.swappedIn=!1}(_t,b,v):We(_t,b,ae(_t),M)),r||Re.update(r),lt=i,Re.isReverted=r)},Re.refresh=function(i,o,f,x){if(!lt&&Re.enabled||o)if(_t&&i&&kt)fe(t,"scrollEnd",Oe);else{!Ot&&Pe&&Pe(Re),lt=Re,r.tween&&!f&&(r.tween.kill(),r.tween=0),k&&k.pause(),xt&&n&&n.revert({kill:!1}).invalidate(),Re.isReverted||Re.revert(!0,!0),Re._subPinOffset=!1;var E,A,D,C,R,P,I,L,N,F,U,j,Y,q=Ie(),$=Le(),Z=Ft?Ft.duration():Kt(Zt,Xt),J=g<=.01,nt=0,rt=x||0,it=ee(f)?f.end:e.end,ot=e.endTrigger||yt,st=ee(f)?f.start:e.start||(0!==e.start&&yt?_t?"0 0":"0 100%":0),at=Re.pinnedContainer=e.pinnedContainer&&z(e.pinnedContainer,Re),ut=yt&&Math.max(0,Ee.indexOf(Re))||0,ct=ut;for(Me&&ee(f)&&(j=K.getProperty(d,Xt.p),Y=K.getProperty(p,Xt.p));ct--;)(P=Ee[ct]).end||P.refresh(0,1)||(lt=Re),!(I=P.pin)||I!==yt&&I!==_t&&I!==at||P.isReverted||(F||(F=[]),F.unshift(P),P.revert(!0,!0)),P!==Ee[ct]&&(ut--,ct--);for(Qt(st)&&(st=st(Re)),st=Bt(st,"start",Re),l=Ze(st,yt,q,Xt,Be(),c,d,Re,$,Ce,_e,Z,Ft,Re._startClamp&&"_startClamp")||(_t?-.001:0),Qt(it)&&(it=it(Re)),Jt(it)&&!it.indexOf("+=")&&(~it.indexOf(" ")?it=(Jt(st)?st.split(" ")[0]:"")+it:(nt=be(it.substr(2),q),it=Jt(st)?st:(Ft?K.utils.mapRange(0,Ft.duration(),Ft.scrollTrigger.start,Ft.scrollTrigger.end,l):l)+nt,ot=yt)),it=Bt(it,"end",Re),u=Math.max(l,Ze(it||(ot?"100% 0":Z),ot,q,Xt,Be()+nt,h,p,Re,$,Ce,_e,Z,Ft,Re._endClamp&&"_endClamp"))||-.001,nt=0,ct=ut;ct--;)(I=(P=Ee[ct]).pin)&&P.start-P._pinPush<=l&&!Ft&&P.end>0&&(E=P.end-(Re._startClamp?Math.max(0,P.start):P.start),(I===yt&&P.start-P._pinPush<l||I===at)&&isNaN(st)&&(nt+=E*(1-P.progress)),I===_t&&(rt+=E));if(l+=nt,u+=nt,Re._startClamp&&(Re._startClamp+=nt),Re._endClamp&&!Ot&&(Re._endClamp=u||-.001,u=Math.min(u,Kt(Zt,Xt))),g=u-l||(l-=.01)&&.001,J&&(Ue=K.utils.clamp(0,1,K.utils.normalize(l,u,X))),Re._pinPush=rt,c&&nt&&((E={})[Xt.a]="+="+nt,at&&(E[Xt.p]="-="+Be()),K.set([c,h],E)),!_t||Dt&&Re.end>=Kt(Zt,Xt)){if(yt&&Be()&&!Ft)for(A=yt.parentNode;A&&A!==et;)A._pinOffset&&(l-=A._pinOffset,u-=A._pinOffset),A=A.parentNode}else E=ae(_t),C=Xt===G,D=Be(),T=parseFloat(w(Xt.a))+rt,!Z&&u>1&&(U={style:U=(ge?Q.scrollingElement||tt:Zt).style,value:U["overflow"+Xt.a.toUpperCase()]},ge&&"scroll"!==ae(et)["overflow"+Xt.a.toUpperCase()]&&(U.style["overflow"+Xt.a.toUpperCase()]="scroll")),We(_t,b,E),_=$e(_t),A=ue(_t,!0),L=_e&&H(Zt,C?B:G)(),bt&&((M=[bt+Xt.os2,g+rt+se]).t=b,(ct=bt===oe?ce(_t,Xt)+g+rt:0)&&(M.push(Xt.d,ct+se),"auto"!==b.style.flexBasis&&(b.style.flexBasis=ct+se)),qe(M),at&&Ee.forEach((function(t){t.pin===at&&!1!==t.vars.pinSpacing&&(t._subPinOffset=!0)})),_e&&Be(X)),_e&&((R={top:A.top+(C?D-l:L)+se,left:A.left+(C?L:D-l)+se,boxSizing:"border-box",position:"fixed"}).width=R.maxWidth=Math.ceil(A.width)+se,R.height=R.maxHeight=Math.ceil(A.height)+se,R.margin=R.marginTop=R.marginRight=R.marginBottom=R.marginLeft="0",R[oe]=E[oe],R[oe+"Top"]=E[oe+"Top"],R[oe+"Right"]=E[oe+"Right"],R[oe+"Bottom"]=E[oe+"Bottom"],R[oe+"Left"]=E[oe+"Left"],y=function(t,e,n){for(var r,i=[],o=t.length,s=n?8:0;s<o;s+=2)r=t[s],i.push(r,r in e?e[r]:t[s+1]);return i.t=t.t,i}(v,R,Mt),Ot&&Be(0)),n?(N=n._initted,gt(1),n.render(n.duration(),!0,!0),S=w(Xt.a)-T+g+rt,O=Math.abs(g-S)>1,_e&&O&&y.splice(y.length-2,2),n.render(0,!0,!0),N||n.invalidate(!0),n.parent||n.totalTime(n.totalTime()),gt(0)):S=g,U&&(U.value?U.style["overflow"+Xt.a.toUpperCase()]=U.value:U.style.removeProperty("overflow-"+Xt.a));F&&F.forEach((function(t){return t.revert(!1,!0)})),Re.start=l,Re.end=u,s=a=Ot?X:Be(),Ft||Ot||(s<X&&Be(X),Re.scroll.rec=0),Re.revert(!1,!0),Fe=Nt(),V&&(Ne=-1,V.restart(!0)),lt=0,n&&Wt&&(n._initted||W)&&n.progress()!==W&&n.progress(W||0,!0).render(n.time(),!0,!0),(J||Ue!==Re.progress||Ft)&&(n&&!Wt&&n.totalProgress(Ft&&l<-.001&&!Ue?K.utils.normalize(l,u,0):Ue,!0),Re.progress=J||(s-l)/g===Ue?0:Ue),_t&&bt&&(b._pinOffset=Math.round(Re.progress*S)),k&&k.invalidate(),isNaN(j)||(j-=K.getProperty(d,Xt.p),Y-=K.getProperty(p,Xt.p),en(d,Xt,j),en(c,Xt,j-(x||0)),en(p,Xt,Y),en(h,Xt,Y-(x||0))),J&&!Ot&&Re.update(),!ft||Ot||m||(m=!0,ft(Re),m=!1)}},Re.getVelocity=function(){return(Be()-a)/(Nt()-st)*1e3||0},Re.endAnimation=function(){ne(Re.callbackAnimation),n&&(k?k.progress(1):n.paused()?Wt||ne(n,Re.direction<0,1):ne(n,n.reversed()))},Re.labelToScroll=function(t){return n&&n.labels&&(l||Re.refresh()||l)+n.labels[t]/n.duration()*g||0},Re.getTrailing=function(t){var e=Ee.indexOf(Re),n=Re.direction>0?Ee.slice(0,e).reverse():Ee.slice(e+1);return(Jt(t)?n.filter((function(e){return e.vars.preventOverlaps===t})):n).filter((function(t){return Re.direction>0?t.end<=l:t.start>=u}))},Re.update=function(t,e,i){if(!Ft||i||t){var o,c,h,p,f,m,v,x=!0===Ot?X:Re.scroll(),w=t?0:(x-l)/g,M=w<0?0:w>1?1:w||0,C=Re.progress;if(e&&(a=s,s=Ft?Be():x,At&&(F=N,N=n&&!Wt?n.totalProgress():M)),wt&&!M&&_t&&!lt&&!Lt&&kt&&l<x+(x-a)/(Nt()-st)*wt&&(M=1e-4),M!==C&&Re.enabled){if(p=(f=(o=Re.isActive=!!M&&M<1)!==(!!C&&C<1))||!!M!=!!C,Re.direction=M>C?1:-1,Re.progress=M,p&&!lt&&(c=M&&!C?0:1===M?1:1===C?2:3,Wt&&(h=!f&&"none"!==Se[c+1]&&Se[c+1]||Se[c],v=n&&("complete"===h||"reset"===h||h in n))),Ht&&(f||v)&&(v||vt||!n)&&(Qt(Ht)?Ht(Re):Re.getTrailing(Ht).forEach((function(t){return t.endAnimation()}))),Wt||(!k||lt||Lt?n&&n.totalProgress(M,!(!lt||!Fe&&!t)):(k._dp._time-k._start!==k._time&&k.render(k._dp._time-k._start),k.resetTo?k.resetTo("totalProgress",M,n._tTime/n._tDur):(k.vars.totalProgress=M,k.invalidate().restart()))),_t)if(t&&bt&&(b.style[bt+Xt.os2]=A),_e){if(p){if(m=!t&&M>C&&u+1>x&&x+1>=Kt(Zt,Xt),Mt)if(t||!o&&!m)Qe(_t,b);else{var R=ue(_t,!0),I=x-l;Qe(_t,et,R.top+(Xt===G?I:0)+se,R.left+(Xt===G?0:I)+se)}qe(o||m?y:_),O&&M<1&&o||E(T+(1!==M||m?0:S))}}else E(Vt(T+S*M));At&&!r.tween&&!lt&&!Lt&&V.restart(!0),ct&&(f||St&&M&&(M<1||!Ct))&&it(ct.targets).forEach((function(t){return t.classList[o||St?"add":"remove"](ct.className)})),at&&!Wt&&!t&&at(Re),p&&!lt?(Wt&&(v&&("complete"===h?n.pause().totalProgress(1):"reset"===h?n.restart(!0).pause():"restart"===h?n.restart(!0):n[h]()),at&&at(Re)),!f&&Ct||(pt&&f&&re(Re,pt),we[c]&&re(Re,we[c]),St&&(1===M?Re.kill(!1,1):we[c]=0),f||we[c=1===M?1:3]&&re(Re,we[c])),zt&&!o&&Math.abs(Re.getVelocity())>(te(zt)?zt:2500)&&(ne(Re.callbackAnimation),k?k.progress(1):ne(n,"reverse"===h?1:!M,1))):Wt&&at&&!lt&&at(Re)}if(P){var L=Ft?x/Ft.duration()*(Ft._caScrollDist||0):x;D(L+(d._isFlipped?1:0)),P(L)}Y&&Y(-x/Ft.duration()*(Ft._caScrollDist||0))}},Re.enable=function(e,n){Re.enabled||(Re.enabled=!0,fe(Zt,"resize",De),ge||fe(Zt,"scroll",Ae),Pe&&fe(t,"refreshInit",Pe),!1!==e&&(Re.progress=Ue=0,s=a=Ne=Be()),!1!==n&&Re.refresh())},Re.getTween=function(t){return t&&r?r.tween:k},Re.setPositions=function(t,e,n,r){if(Ft){var i=Ft.scrollTrigger,o=Ft.duration(),s=i.end-i.start;t=i.start+s*t/o,e=i.start+s*e/o}Re.refresh(!1,!1,{start:Gt(t,n&&!!Re._startClamp),end:Gt(e,n&&!!Re._endClamp)},r),Re.update()},Re.adjustPinSpacing=function(t){if(M&&t){var e=M.indexOf(Xt.d)+1;M[e]=parseFloat(M[e])+t+se,M[1]=parseFloat(M[1])+t+se,qe(M)}},Re.disable=function(e,n){if(Re.enabled&&(!1!==e&&Re.revert(!0,!0),Re.enabled=Re.isActive=!1,n||k&&k.pause(),X=0,i&&(i.uncache=1),Pe&&me(t,"refreshInit",Pe),V&&(V.pause(),r.tween&&r.tween.kill()&&(r.tween=0)),!ge)){for(var o=Ee.length;o--;)if(Ee[o].scroller===Zt&&Ee[o]!==Re)return;me(Zt,"resize",De),ge||me(Zt,"scroll",Ae)}},Re.kill=function(t,r){Re.disable(t,r),k&&!r&&k.kill(),dt&&delete Te[dt];var o=Ee.indexOf(Re);o>=0&&Ee.splice(o,1),o===ht&&He>0&&ht--,o=0,Ee.forEach((function(t){return t.scroller===Re.scroller&&(o=1)})),o||Ot||(Re.scroll.rec=0),n&&(n.scrollTrigger=null,t&&n.revert({kill:!1}),r||n.kill()),c&&[c,h,d,p].forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),It===Re&&(It=0),_t&&(i&&(i.uncache=1),o=0,Ee.forEach((function(t){return t.pin===_t&&o++})),o||(i.spacer=0)),e.onKill&&e.onKill(Re)},Ee.push(Re),Re.enable(!1,!1),q&&q(Re),n&&n.add&&!g){var Xe=Re.update;Re.update=function(){Re.update=Xe,l||u||Re.refresh()},K.delayedCall(.01,Re.update),g=.01,l=u=0}else Re.refresh();_t&&function(){if(Pt!==ke){var t=Pt=ke;requestAnimationFrame((function(){return t===ke&&Ge(!0)}))}}()}else this.update=this.refresh=this.kill=jt},t.register=function(e){return Z||(K=e||Wt(),Xt()&&window.document&&t.enable(),Z=Ut),Z},t.defaults=function(t){if(t)for(var e in t)ye[e]=t[e];return ye},t.disable=function(t,e){Ut=0,Ee.forEach((function(n){return n[e?"kill":"disable"](t)})),me(J,"wheel",Ae),me(Q,"scroll",Ae),clearInterval(at),me(Q,"touchcancel",jt),me(et,"touchstart",jt),pe(me,Q,"pointerdown,touchstart,mousedown",zt),pe(me,Q,"pointerup,touchend,mouseup",Ht),rt.kill(),Zt(me);for(var n=0;n<C.length;n+=3)ge(me,C[n],C[n+1]),ge(me,C[n],C[n+2])},t.enable=function(){if(J=window,Q=document,tt=Q.documentElement,et=Q.body,K&&(it=K.utils.toArray,ot=K.utils.clamp,Et=K.core.context||jt,gt=K.core.suppressOverwrites||jt,Tt=J.history.scrollRestoration||"auto",ze=J.pageYOffset,K.core.globals("ScrollTrigger",t),et)){Ut=1,(St=document.createElement("div")).style.height="100vh",St.style.position="absolute",Ue(),function t(){return Ut&&requestAnimationFrame(t)}(),q.register(K),t.isTouch=q.isTouch,wt=q.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),fe(J,"wheel",Ae),nt=[J,Q,tt,et],K.matchMedia?(t.matchMedia=function(t){var e,n=K.matchMedia();for(e in t)n.add(e,t[e]);return n},K.addEventListener("matchMediaInit",(function(){return Ne()})),K.addEventListener("matchMediaRevert",(function(){return Le()})),K.addEventListener("matchMedia",(function(){Ge(0,1),Pe("matchMedia")})),K.matchMedia("(orientation: portrait)",(function(){return Me(),Me}))):console.warn("Requires GSAP 3.11.0 or later"),Me(),fe(Q,"scroll",Ae);var e,n,r=et.style,i=r.borderTopStyle,o=K.core.Animation.prototype;for(o.revert||Object.defineProperty(o,"revert",{value:function(){return this.time(-.01,!0)}}),r.borderTopStyle="solid",e=ue(et),G.m=Math.round(e.top+G.sc())||0,B.m=Math.round(e.left+B.sc())||0,i?r.borderTopStyle=i:r.removeProperty("border-top-style"),at=setInterval(Se,250),K.delayedCall(.5,(function(){return Lt=0})),fe(Q,"touchcancel",jt),fe(et,"touchstart",jt),pe(fe,Q,"pointerdown,touchstart,mousedown",zt),pe(fe,Q,"pointerup,touchend,mouseup",Ht),ct=K.utils.checkPrefix("transform"),Xe.push(ct),Z=Nt(),rt=K.delayedCall(.2,Ge).pause(),ft=[Q,"visibilitychange",function(){var t=J.innerWidth,e=J.innerHeight;Q.hidden?(dt=t,pt=e):dt===t&&pt===e||De()},Q,"DOMContentLoaded",Ge,J,"load",Ge,J,"resize",De],Zt(fe),Ee.forEach((function(t){return t.enable(0,1)})),n=0;n<C.length;n+=3)ge(me,C[n],C[n+1]),ge(me,C[n],C[n+2])}},t.config=function(e){"limitCallbacks"in e&&(Ct=!!e.limitCallbacks);var n=e.syncInterval;n&&clearInterval(at)||(at=n)&&setInterval(Se,n),"ignoreMobileResize"in e&&(_t=1===t.isTouch&&e.ignoreMobileResize),"autoRefreshEvents"in e&&(Zt(me)||Zt(fe,e.autoRefreshEvents||"none"),vt=-1===(e.autoRefreshEvents+"").indexOf("resize"))},t.scrollerProxy=function(t,e){var n=z(t),r=C.indexOf(n),i=Yt(n);~r&&C.splice(r,i?6:2),e&&(i?R.unshift(J,e,et,e,tt,e):R.unshift(n,e))},t.clearMatchMedia=function(t){Ee.forEach((function(e){return e._ctx&&e._ctx.query===t&&e._ctx.kill(!0,!0)}))},t.isInViewport=function(t,e,n){var r=(Jt(t)?z(t):t).getBoundingClientRect(),i=r[n?"width":"height"]*e||0;return n?r.right-i>0&&r.left+i<J.innerWidth:r.bottom-i>0&&r.top+i<J.innerHeight},t.positionInViewport=function(t,e,n){Jt(t)&&(t=z(t));var r=t.getBoundingClientRect(),i=r[n?"width":"height"],o=null==e?i/2:e in _e?_e[e]*i:~e.indexOf("%")?parseFloat(e)*i/100:parseFloat(e)||0;return n?(r.left+o)/J.innerWidth:(r.top+o)/J.innerHeight},t.killAll=function(t){if(Ee.slice(0).forEach((function(t){return"ScrollSmoother"!==t.vars.id&&t.kill()})),!0!==t){var e=Ce.killAll||[];Ce={},e.forEach((function(t){return t()}))}},t}();rn.version="3.12.3",rn.saveStyles=function(t){return t?it(t).forEach((function(t){if(t&&t.style){var e=Ie.indexOf(t);e>=0&&Ie.splice(e,5),Ie.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),K.core.getCache(t),Et())}})):Ie},rn.revert=function(t,e){return Ne(!t,e)},rn.create=function(t,e){return new rn(t,e)},rn.refresh=function(t){return t?De():(Z||rn.register())&&Ge(!0)},rn.update=function(t){return++C.cache&&je(!0===t?2:0)},rn.clearScrollMemory=Fe,rn.maxScroll=function(t,e){return Kt(t,e?B:G)},rn.getScrollFunc=function(t,e){return H(z(t),e?B:G)},rn.getById=function(t){return Te[t]},rn.getAll=function(){return Ee.filter((function(t){return"ScrollSmoother"!==t.vars.id}))},rn.isScrolling=function(){return!!kt},rn.snapDirectional=de,rn.addEventListener=function(t,e){var n=Ce[t]||(Ce[t]=[]);~n.indexOf(e)||n.push(e)},rn.removeEventListener=function(t,e){var n=Ce[t],r=n&&n.indexOf(e);r>=0&&n.splice(r,1)},rn.batch=function(t,e){var n,r=[],i={},o=e.interval||.016,s=e.batchMax||1e9,a=function(t,e){var n=[],r=[],i=K.delayedCall(o,(function(){e(n,r),n=[],r=[]})).pause();return function(t){n.length||i.restart(!0),n.push(t.trigger),r.push(t),s<=n.length&&i.progress(1)}};for(n in e)i[n]="on"===n.substr(0,2)&&Qt(e[n])&&"onRefreshInit"!==n?a(0,e[n]):e[n];return Qt(s)&&(s=s(),fe(rn,"refresh",(function(){return s=e.batchMax()}))),it(t).forEach((function(t){var e={};for(n in i)e[n]=i[n];e.trigger=t,r.push(rn.create(e))})),r};var on,sn=function(t,e,n,r){return e>r?t(r):e<0&&t(0),n>r?(r-e)/(n-e):n<0?e/(e-n):1},an=function t(e,n){!0===n?e.style.removeProperty("touch-action"):e.style.touchAction=!0===n?"auto":n?"pan-"+n+(q.isTouch?" pinch-zoom":""):"none",e===tt&&t(et,n)},ln={auto:1,scroll:1},un=function(t){var e,n=t.event,r=t.target,i=t.axis,o=(n.changedTouches?n.changedTouches[0]:n).target,s=o._gsap||K.core.getCache(o),a=Nt();if(!s._isScrollT||a-s._isScrollT>2e3){for(;o&&o!==et&&(o.scrollHeight<=o.clientHeight&&o.scrollWidth<=o.clientWidth||!ln[(e=ae(o)).overflowY]&&!ln[e.overflowX]);)o=o.parentNode;s._isScroll=o&&o!==r&&!Yt(o)&&(ln[(e=ae(o)).overflowY]||ln[e.overflowX]),s._isScrollT=a}(s._isScroll||"x"===i)&&(n.stopPropagation(),n._gsapAllow=!0)},cn=function(t,e,n,r){return q.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:r=r&&un,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return n&&fe(Q,q.eventTypes[0],dn,!1,!0)},onDisable:function(){return me(Q,q.eventTypes[0],dn,!0)}})},hn=/(input|label|select|textarea)/i,dn=function(t){var e=hn.test(t.target.tagName);(e||on)&&(t._gsapAllow=!0,on=e)},pn=function(t){ee(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e,n,r,i,o,s,a,l,u=t,c=u.normalizeScrollX,h=u.momentum,d=u.allowNestedScroll,p=u.onRelease,f=z(t.target)||tt,m=K.core.globals().ScrollSmoother,g=m&&m.get(),v=wt&&(t.content&&z(t.content)||g&&!1!==t.content&&!g.smooth()&&g.content()),y=H(f,G),_=H(f,B),b=1,x=(q.isTouch&&J.visualViewport?J.visualViewport.scale*J.visualViewport.width:J.outerWidth)/J.innerWidth,w=0,E=Qt(h)?function(){return h(e)}:function(){return h||2.8},T=cn(f,t.type,!0,d),S=function(){return i=!1},A=jt,M=jt,D=function(){n=Kt(f,G),M=ot(wt?1:0,n),c&&(A=ot(0,Kt(f,B))),r=ke},R=function(){v._gsap.y=Vt(parseFloat(v._gsap.y)+y.offset)+"px",v.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(v._gsap.y)+", 0, 1)",y.offset=y.cacheID=0},O=function(){D(),o.isActive()&&o.vars.scrollY>n&&(y()>n?o.progress(1)&&y(n):o.resetTo("scrollY",n))};return v&&K.set(v,{y:"+=0"}),t.ignoreCheck=function(t){return wt&&"touchmove"===t.type&&function(){if(i){requestAnimationFrame(S);var t=Vt(e.deltaY/2),n=M(y.v-t);if(v&&n!==y.v+y.offset){y.offset=n-y.v;var r=Vt((parseFloat(v&&v._gsap.y)||0)-y.offset);v.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+r+", 0, 1)",v._gsap.y=r+"px",y.cacheID=C.cache,je()}return!0}y.offset&&R(),i=!0}()||b>1.05&&"touchstart"!==t.type||e.isGesturing||t.touches&&t.touches.length>1},t.onPress=function(){i=!1;var t=b;b=Vt((J.visualViewport&&J.visualViewport.scale||1)/x),o.pause(),t!==b&&an(f,b>1.01||!c&&"x"),s=_(),a=y(),D(),r=ke},t.onRelease=t.onGestureStart=function(t,e){if(y.offset&&R(),e){C.cache++;var r,i,s=E();c&&(i=(r=_())+.05*s*-t.velocityX/.227,s*=sn(_,r,i,Kt(f,B)),o.vars.scrollX=A(i)),i=(r=y())+.05*s*-t.velocityY/.227,s*=sn(y,r,i,Kt(f,G)),o.vars.scrollY=M(i),o.invalidate().duration(s).play(.01),(wt&&o.vars.scrollY>=n||r>=n-1)&&K.to({},{onUpdate:O,duration:s})}else l.restart(!0);p&&p(t)},t.onWheel=function(){o._ts&&o.pause(),Nt()-w>1e3&&(r=0,w=Nt())},t.onChange=function(t,e,n,i,o){if(ke!==r&&D(),e&&c&&_(A(i[2]===e?s+(t.startX-t.x):_()+e-i[1])),n){y.offset&&R();var l=o[2]===n,u=l?a+t.startY-t.y:y()+n-o[1],h=M(u);l&&u!==h&&(a+=h-u),y(h)}(n||e)&&je()},t.onEnable=function(){an(f,!c&&"x"),rn.addEventListener("refresh",O),fe(J,"resize",O),y.smooth&&(y.target.style.scrollBehavior="auto",y.smooth=_.smooth=!1),T.enable()},t.onDisable=function(){an(f,!0),me(J,"resize",O),rn.removeEventListener("refresh",O),T.kill()},t.lockAxis=!1!==t.lockAxis,(e=new q(t)).iOS=wt,wt&&!y()&&y(1),wt&&K.ticker.add(jt),l=e._dc,o=K.to(e,{ease:"power4",paused:!0,scrollX:c?"+=0.1":"+=0",scrollY:"+=0.1",modifiers:{scrollY:tn(y,y(),(function(){return o.pause()}))},onUpdate:je,onComplete:l.vars.onComplete}),e};rn.sort=function(t){return Ee.sort(t||function(t,e){return-1e6*(t.vars.refreshPriority||0)+t.start-(e.start+-1e6*(e.vars.refreshPriority||0))})},rn.observe=function(t){return new q(t)},rn.normalizeScroll=function(t){if(void 0===t)return yt;if(!0===t&&yt)return yt.enable();if(!1===t)return yt&&yt.kill(),void(yt=t);var e=t instanceof q?t:pn(t);return yt&&yt.target===e.target&&yt.kill(),Yt(e.target)&&(yt=e),e},rn.core={_getVelocityProp:j,_inputObserver:cn,_scrollers:C,_proxies:R,bridge:{ss:function(){kt||Pe("scrollStart"),kt=Nt()},ref:function(){return lt}}},Wt()&&K.registerPlugin(rn);var fn=n("+9ZR");n("t9wJ"),n("gZXI");function mn(){mn=function(){return e};var t,e={},n=Object.prototype,r=n.hasOwnProperty,i=Object.defineProperty||function(t,e,n){t[e]=n.value},o="function"==typeof Symbol?Symbol:{},s=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{u({},"")}catch(t){u=function(t,e,n){return t[e]=n}}function c(t,e,n,r){var o=e&&e.prototype instanceof g?e:g,s=Object.create(o.prototype),a=new C(r||[]);return i(s,"_invoke",{value:S(t,n,a)}),s}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=c;var d="suspendedStart",p="executing",f="completed",m={};function g(){}function v(){}function y(){}var _={};u(_,s,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(R([])));x&&x!==n&&r.call(x,s)&&(_=x);var w=y.prototype=g.prototype=Object.create(_);function E(t){["next","throw","return"].forEach((function(e){u(t,e,(function(t){return this._invoke(e,t)}))}))}function T(t,e){function n(i,o,s,a){var l=h(t[i],t,o);if("throw"!==l.type){var u=l.arg,c=u.value;return c&&"object"==vn(c)&&r.call(c,"__await")?e.resolve(c.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(c).then((function(t){u.value=t,s(u)}),(function(t){return n("throw",t,s,a)}))}a(l.arg)}var o;i(this,"_invoke",{value:function(t,r){function i(){return new e((function(e,i){n(t,r,e,i)}))}return o=o?o.then(i,i):i()}})}function S(e,n,r){var i=d;return function(o,s){if(i===p)throw new Error("Generator is already running");if(i===f){if("throw"===o)throw s;return{value:t,done:!0}}for(r.method=o,r.arg=s;;){var a=r.delegate;if(a){var l=A(a,r);if(l){if(l===m)continue;return l}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===d)throw i=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=p;var u=h(e,n,r);if("normal"===u.type){if(i=r.done?f:"suspendedYield",u.arg===m)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(i=f,r.method="throw",r.arg=u.arg)}}}function A(e,n){var r=n.method,i=e.iterator[r];if(i===t)return n.delegate=null,"throw"===r&&e.iterator.return&&(n.method="return",n.arg=t,A(e,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),m;var o=h(i,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,m;var s=o.arg;return s?s.done?(n[e.resultName]=s.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,m):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,m)}function M(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function D(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(M,this),this.reset(!0)}function R(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i<e.length;)if(r.call(e,i))return n.value=e[i],n.done=!1,n;return n.value=t,n.done=!0,n};return o.next=o}}throw new TypeError(vn(e)+" is not iterable")}return v.prototype=y,i(w,"constructor",{value:y,configurable:!0}),i(y,"constructor",{value:v,configurable:!0}),v.displayName=u(y,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===v||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,y):(t.__proto__=y,u(t,l,"GeneratorFunction")),t.prototype=Object.create(w),t},e.awrap=function(t){return{__await:t}},E(T.prototype),u(T.prototype,a,(function(){return this})),e.AsyncIterator=T,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var s=new T(c(t,n,r,i),o);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},E(w),u(w,l,"Generator"),u(w,s,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},e.values=R,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(D),!e)for(var n in this)"t"===n.charAt(0)&&r.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function i(r,i){return a.type="throw",a.arg=e,n.next=r,i&&(n.method="next",n.arg=t),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var s=this.tryEntries[o],a=s.completion;if("root"===s.tryLoc)return i("end");if(s.tryLoc<=this.prev){var l=r.call(s,"catchLoc"),u=r.call(s,"finallyLoc");if(l&&u){if(this.prev<s.catchLoc)return i(s.catchLoc,!0);if(this.prev<s.finallyLoc)return i(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return i(s.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return i(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),D(n),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;D(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),m}},e}function gn(t,e,n,r,i,o,s){try{var a=t[o](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(r,i)}function vn(t){return(vn="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 yn(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,_n(r.key),r)}}function _n(t){var e=function(t,e){if("object"!=vn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=vn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vn(e)?e:String(e)}h.b.registerPlugin(rn);var bn,xn,wn,En=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"[data-accordion-trigger]",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"[data-accordion]",n=document.querySelectorAll(t);Array.from(n).forEach((function(t){return t.classList.remove("hover")})),n.forEach((function(t){"mouseenter focusin".split(" ").forEach((function(n){t.addEventListener(n,(function(){var n;null===(n=t.closest(e))||void 0===n||n.classList.add("hover")}))})),"mouseout focusout".split(" ").forEach((function(n){t.addEventListener(n,(function(){var n;null===(n=t.closest(e))||void 0===n||n.classList.remove("hover")}))}))}))},Tn=function(){var t=$("[data-accordion] [data-more]")[0];null==t||t.classList.add("active"),$("[data-more]").next().hide(),$("[data-more].active").next().show()},Sn=function(t){return new Promise((function(e,n){var r=t.next.container.querySelectorAll("[data-script]");try{window.featuredSequences=JSON.parse(t.next.container.querySelector("#featuredSequences").text)}catch(t){window.featuredSequences=null}void 0!==window.featuredSequences&&null!=window.featuredSequences||r.forEach((function(t){if(!t.src){var e=t.cloneNode(!0);document.createElement("script").innerHTML=e.innerHTML}t.remove()}));for(var i=window.featuredSequences[Math.floor(Math.random()*window.featuredSequences.length)],o=$(".banner-type-2 .banner-text"),s=["229","209","344"],a=["yellow","blue","red"],l=["1","3.2","5.2"],u=[i.vertical_image_1,i.vertical_image_2,i.horizontal_image],c=0;c<u.length;c++)o.before('<div data-content-parallax data-speed="1" data-scroll data-scroll-speed="'.concat(l[c],'"><div class="img-banner img-0').concat(c+1,'"  data-home-slideIn>\n            <div class="wrapper"  data-sequence="1" >\n                <div data-select-effect class="').concat(a[c],'-gradient" >\n                    <img src="').concat(u[c].url,'" alt="').concat(u[c].alt,'" width="').concat(s[c],'">\n                </div>\n                </div>\n                </div>\n            </div>'));e(i)}))},An=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),"object"===vn(e)&&e.length>0&&this.init(e)}var e,n,r,i,o;return e=t,n=[{key:"init",value:function(t){var e=this;t.forEach((function(t){t.querySelectorAll("img").forEach((function(t){"string"==typeof t.src&&t.src.length>0&&!t.src.endsWith(".svg")&&e.removeBackground(t.src).then((function(e){t.src=e}))}))}))}},{key:"removeBackground",value:(i=mn().mark((function t(e){var n,r,i,o,s,a,l,u,c,h;return mn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n={red:255,green:255,blue:255},r=10,(i=new Image).src=e,t.next=6,new Promise((function(t){i.addEventListener("load",t)}));case 6:for((o=document.createElement("canvas")).width=i.naturalWidth,o.height=i.naturalHeight,(s=o.getContext("2d")).drawImage(i,0,0),a=s.getImageData(0,0,o.width,o.height),l=0;l<a.data.length;l+=4)u=a.data[l],c=a.data[l+1],h=a.data[l+2],Math.abs(u-n.red)<r&&Math.abs(c-n.green)<r&&Math.abs(h-n.blue)<r&&(a.data[l+3]=0);return s.putImageData(a,0,0),t.abrupt("return",o.toDataURL("image/png"));case 15:case"end":return t.stop()}}),t)})),o=function(){var t=this,e=arguments;return new Promise((function(n,r){var o=i.apply(t,e);function s(t){gn(o,n,r,s,a,"next",t)}function a(t){gn(o,n,r,s,a,"throw",t)}s(void 0)}))},function(t){return o.apply(this,arguments)})}],r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance=null}}],n&&yn(e.prototype,n),r&&yn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();bn=An,wn=null,(xn=_n(xn="instance"))in bn?Object.defineProperty(bn,xn,{value:wn,enumerable:!0,configurable:!0,writable:!0}):bn[xn]=wn;var Mn=function(t){var e=window.filterScrollPosition||0,n=document.querySelector("body");n.style.removeProperty("overflow"),n.style.removeProperty("position"),n.style.removeProperty("top"),n.style.removeProperty("width"),window.scrollTo(0,e),void 0!==window.scroller&&window.scroller.start(),setTimeout((function(){t&&t()}),0)},Dn=function(){var t=window.location.hostname;$("a").each((function(){var e=$(this);(function(e){var n=e.hostname;return n===t||n.includes("lsvp.com")})(this)||e.attr("target","_blank")})),$("a:contains(http)").addClass("a-break")},Cn=function(){function t(t,e){/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)?window.open(t,e):window.open(t,"","width=550,height=400,resizable=yes,scrollbars=yes,top=200,left=200")}$(document).ready((function(){var e=window.location.href;$(".tw").on("click",(function(n){n.preventDefault();var r=$(this).attr("data-handles"),i=r?"by ".concat(r," via @lightspeedvp"):"by @lightspeedvp";t("https://twitter.com/intent/tweet?text="+encodeURIComponent(e+" "+i),"_blank")})),$(".fb").on("click",(function(n){n.preventDefault(),t("https://www.facebook.com/sharer/sharer.php?u="+e,"_blank")})),$(".li").on("click",(function(n){n.preventDefault(),t("https://www.linkedin.com/sharing/share-offsite/?url="+e,"_blank")})),$(".share-link").on("click",(function(t){t.preventDefault(),function(t,e){var n=document.createElement("input");n.setAttribute("value",t),e.appendChild(n),n.select();var r=document.execCommand("copy");e.removeChild(n)}(e,t.currentTarget)}))}))},Rn=n("AxL3"),On=n("iEc/"),Pn=function(t,e){return(Pn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};var In=On.helpers,Ln=In.getOptions,Nn=In.addClasses,Fn=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,n)||this;return e.instances.set(n[0],i),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Pn(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),(function(t){"init"===t.getAttribute("data-simplebar")||e.instances.has(t)||new e(t,Ln(t.attributes))}))},e.removeObserver=function(){var t;null===(t=e.globalObserver)||void 0===t||t.disconnect()},e.prototype.initDOM=function(){var t,e,n,r=this;if(!Array.prototype.filter.call(this.el.children,(function(t){return t.classList.contains(r.classNames.wrapper)})).length){for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),Nn(this.wrapperEl,this.classNames.wrapper),Nn(this.contentWrapperEl,this.classNames.contentWrapper),Nn(this.offsetEl,this.classNames.offset),Nn(this.maskEl,this.classNames.mask),Nn(this.contentEl,this.classNames.contentEl),Nn(this.placeholderEl,this.classNames.placeholder),Nn(this.heightAutoObserverWrapperEl,this.classNames.heightAutoObserverWrapperEl),Nn(this.heightAutoObserverEl,this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl),null===(t=this.contentWrapperEl)||void 0===t||t.setAttribute("tabindex","0"),null===(e=this.contentWrapperEl)||void 0===e||e.setAttribute("role","region"),null===(n=this.contentWrapperEl)||void 0===n||n.setAttribute("aria-label",this.options.ariaLabel)}if(!this.axis.x.track.el||!this.axis.y.track.el){var i=document.createElement("div"),o=document.createElement("div");Nn(i,this.classNames.track),Nn(o,this.classNames.scrollbar),i.appendChild(o),this.axis.x.track.el=i.cloneNode(!0),Nn(this.axis.x.track.el,this.classNames.horizontal),this.axis.y.track.el=i.cloneNode(!0),Nn(this.axis.y.track.el,this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}On.prototype.initDOM.call(this),this.el.setAttribute("data-simplebar","init")},e.prototype.unMount=function(){On.prototype.unMount.call(this),e.instances.delete(this.el)},e.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),"undefined"!=typeof MutationObserver&&(this.globalObserver=new MutationObserver(e.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))},e.handleMutations=function(t){t.forEach((function(t){t.addedNodes.forEach((function(t){1===t.nodeType&&(t.hasAttribute("data-simplebar")?!e.instances.has(t)&&document.documentElement.contains(t)&&new e(t,Ln(t.attributes)):t.querySelectorAll("[data-simplebar]").forEach((function(t){"init"!==t.getAttribute("data-simplebar")&&!e.instances.has(t)&&document.documentElement.contains(t)&&new e(t,Ln(t.attributes))})))})),t.removedNodes.forEach((function(t){1===t.nodeType&&("init"===t.getAttribute("data-simplebar")?e.instances.has(t)&&!document.documentElement.contains(t)&&e.instances.get(t).unMount():Array.prototype.forEach.call(t.querySelectorAll('[data-simplebar="init"]'),(function(t){e.instances.has(t)&&!document.documentElement.contains(t)&&e.instances.get(t).unMount()})))}))}))},e.instances=new WeakMap,e}(On);function kn(t){return(kn="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 Un(t){return function(t){if(Array.isArray(t))return Bn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Bn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Bn(t,e)}(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 Bn(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 Gn(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,zn(r.key),r)}}function zn(t){var e=function(t,e){if("object"!=kn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==kn(e)?e:String(e)}Rn&&Fn.initHtmlApi();var Hn=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.accordionArray=[],this.options=Object.assign({},t.defaultOptions,e),this.accordion=this.options.container.querySelectorAll(this.options.element),this.setup(),this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){t.instance||(t.instance=new t(e))}},{key:"defaultOptions",get:function(){return{element:null,trigger:"[data-accordion-trigger]",content:"[data-accordion-content]",container:document}}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"setup",value:function(){var t=this;this.accordion.forEach((function(e){var n=Un(e.querySelectorAll(t.options.trigger));t.accordionArray=n.map((function(t,e){return{trigger:t,content:t.nextElementSibling,index:e,background:t.getAttribute("data-accordion-background"),lastHeight:t.nextElementSibling.scrollHeight,height:t.nextElementSibling.scrollHeight,isActive:0===e,animation:h.b.timeline({paused:!0,reversed:!0,defaults:{duration:.3,ease:"power4.out",transformOrigin:"center top"}}).fromTo(t.nextElementSibling,{height:"100%",overflow:"hidden",padding:"40px 0 20px 0"},{height:0,padding:0,duration:.3,overflow:"hidden"})}}))}))}},{key:"init",value:function(){var t=this;this.accordionArray.forEach((function(e,n){t.toggleAccordion(e),e.trigger.addEventListener("click",(function(n){n.preventDefault(),t.toggleAccordion(e,t.getScrollPosition),t.scrollToAnimation(e.trigger),e.background&&t.backgroundAnimation(e.background)}))}))}},{key:"scrollToAnimation",value:function(t){void 0!==window.scroller?window.scroller.scrollTo(t,{offset:-1*document.querySelector("header").offsetHeight,duration:1e3}):h.b.to(window,{scrollTo:{y:t,offsetY:document.querySelector("header").offsetHeight},duration:1,ease:"power4.inOut"})}},{key:"toggleAccordion",value:function(t,e){t.isActive?(t.animation.reverse().eventCallback("onReverseComplete",(function(){h.b.timeline().set(t.content.querySelectorAll("[data-stagger-slide-up]"),{alpha:0,y:50}).to(t.content.querySelectorAll("[data-stagger-slide-up]"),{alpha:1,duration:1,y:0,ease:"power4.out",transformOrigin:"center top",stagger:.1})})),t.isActive=!1,t.trigger.classList.add("active")):(t.animation.play(0).eventCallback("onComplete",(function(){h.b.set(t.content.querySelectorAll("[data-stagger-slide-up]"),{alpha:0,y:50})})),t.isActive=!0,t.trigger.classList.remove("active"))}},{key:"getScrollPosition",get:function(){return window.pageYOffset||document.documentElement.scrollTop}},{key:"toggleScrolling",value:function(){var t=this;return{enabled:!0,events:"scroll,wheel,touchmove,pointermove".split(","),prevent:function(t){console.log(t),t.preventDefault()},disable:function(){t.toggleScrolling().enabled&&(t.toggleScrolling().enabled=!1,window.addEventListener("scroll",h.b.ticker.tick,{passive:!0}),t.toggleScrolling().events.forEach((function(e,n){document.querySelector("#smooth-wrapper").addEventListener(e,t.toggleScrolling().prevent,{passive:!1})})))},enable:function(){t.toggleScrolling().enabled||(t.toggleScrolling().enabled=!0,window.removeEventListener("scroll",h.b.ticker.tick),t.toggleScrolling().events.forEach((function(e,n){return(n?document:window).removeEventListener(e,t.toggleScrolling().prevent)})))}}}},{key:"lockScroll",value:function(t){t.preventDefault()}},{key:"beforeDestroy",value:function(){this.accordion=null,this.accordionArray=null}},{key:"backgroundAnimation",value:function(t){var e,n=document.getElementById("bg-main");(e=n.classList).remove.apply(e,Un(n.classList)),n.classList.add("bg-transition",t)}}])&&Gn(e.prototype,n),r&&Gn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jn(t){return(jn="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 Vn(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,Wn(r.key),r)}}function Xn(t,e,n){return(e=Wn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Wn(t){var e=function(t,e){if("object"!=jn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=jn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jn(e)?e:String(e)}!function(t,e,n){(e=zn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(Hn,"instance",null);var Yn=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),Xn(this,"loadMore",(function(t,e,r,i,o){var s=t.sectors,a=t.search,l=t.nonce,u=$(".filter-wrap").data("page-id"),c=$(".stories-section").data("template");$.ajax({type:"post",dataType:"json",url:wp_ajax.ajaxurl,data:{action:"load_more_stories",pageId:u,nonce:l,sectors:s,search:a,slug:e,page:r,template:c},success:function(t){setTimeout((function(){var n=$(".row-"+e);n.append(t.html),t.is_last?$("[data-slug='".concat(e,"']")).hide():($("[data-slug='".concat(e,"']")).html("Dive deeper"),$("[data-slug='".concat(e,"']")).data("page",r));var o=$(".page-stories, .page-india-stories").find(".col:not(.fade-in)");h.a.set(o,{alpha:0}),h.a.set(n.parent(),{height:"100%"});h.a.to(window,{scrollTo:{y:i},duration:0,ease:"power4.inOut"}),setTimeout((function(){h.a.timeline({onStart:function(){o.hasClass("fade-in")||o.addClass("fade-in")}}).to(o,{y:50,alpha:0,duration:1,delay:.2}).to(o,{y:0,alpha:1,duration:1,ease:"power4.out",stagger:.1},"-=0.5")}),0)}),0),void 0!==n.smoother&&n.smoother.refresh(),$(o).removeClass("disable-click")},error:function(t){console.log(JSON.stringify(t)),$(o).removeClass("disable-click")}})})),Xn(this,"filterCount",(function(){["sector"].forEach((function(t){var e=$("#".concat(t,"-filter input:checked")),n=e.length,r=[];e.each((function(t,e){r.push($(e).val())})),r.includes("all")&&(n-=1),n>0?$("#".concat(t,"-filter .filter-count")).html("(".concat(n,")")):$("#".concat(t,"-filter .filter-count")).html("")}));var t=$(".filter-wrap input:checked:not(.filter-all)").length;t?($(".filter-opener .filter-count").html("(".concat(t,")")),window.innerWidth>768&&$("#reset-filters").fadeIn()):($("#reset-filters").fadeOut(),$(".filter-opener .filter-count").html(""))})),Xn(this,"resetFilters",(function(){$(".filter-wrap input:checked").prop("checked",!1),$(".filter-all").prop("checked",!0),$("#search").val(""),$("form.search").removeClass("filled"),n.previousSearch=""})),Xn(this,"searchAutocomplete",(function(){void 0!==window.storiesAutocomplete&&$(".page-stories, .page-india-stories").find("#search").autocomplete({source:window.storiesAutocomplete,appendTo:$(".page-stories, .page-india-stories").find(".filter-wrap .inner .search")[0],minLength:1,autoFocus:!1,open:function(t){$(t.target).next(".ui-autocomplete").addClass("is-active"),n.isSimpleBar||n.initSimplebar()},select:function(t,e){$(t.target).removeClass("active"),$(t.target).next(".ui-autocomplete").removeClass("is-active")},close:function(){n.destroySimpleBar()}})})),this.options=Object.assign({},this.defaultOptions,e),this.isEnabled=!0,this.simpleBar,this.isSimpleBar=!1,this.applied=!1,this.accordion=Hn,this.mm=h.a.matchMedia(),this.init(),this.previousSearch=""}var e,n,r;return e=t,(n=[{key:"defaultOptions",get:function(){return{container:document}}},{key:"init",value:function(){this.Filters(),this.filterCount(),this.searchAutocomplete(),this.initTransition(),this.createAccordion()}},{key:"createAccordion",value:function(){this.accordion.create({speed:.5,element:"[data-accordion]",container:this.options.container})}},{key:"destroyAccodion",value:function(){this.accordion.destroy()}},{key:"initTransition",value:function(){$(".page-stories, .page-india-stories").find(".news-feed-grid .col").addClass("fade-in")}},{key:"updateURL",value:function(t){var e=new URLSearchParams(location.search);t.length?e.set("sector",t.join(",")):e.delete("sector");var n="".concat(location.pathname,"?").concat(e.toString());history.pushState({},"",n),window.barba.history.add(n,"stories")}},{key:"Filters",value:function(){var t=this;$(".page-stories, .page-india-stories").find(".filter-wrap :checkbox").on("change",(function(e){"all"===$(e.target).val()?($(e.target).closest("ul").find("li input").prop("checked",!1),$(e.target).prop("checked",!0)):($(e.target).parents("ul").find(".filter-all").prop("checked",!1),$(e.target).closest("ul").find("li input:not(.filter-all)").is(":checked")||$(e.target).closest("ul").find(".filter-all").prop("checked",!0)),t.getResults(t.getFilters()),t.filterCount()})),$(".page-stories, .page-india-stories").find("#reset-filters").on("click",(function(){t.resetFilters(),t.filterCount(),t.getResults(t.getFilters())})),$(".page-stories, .page-india-stories").find("#reset-filters-mobile").on("click",(function(){t.resetFilters(),t.filterCount(),t.getResults(t.getFilters())})),$(document).on("click",".page-stories .ui-menu-item-wrapper, .page-india-stories .ui-menu-item-wrapper",(function(e){t.applied=!0,t.previousSearch=$(e.target).text(),t.getResults(t.getFilters())})),$(document).on("submit",".page-stories form.search, .page-india-stories form.search",(function(e){e.preventDefault(),t.applied=!0,t.previousSearch=$(e.target).find("input").val(),t.getResults(t.getFilters())})),$(document).on("click",".load-more-stories:not(.disable-click)",(function(e){$(e.target).addClass("disable-click");var n=$(e.target).data("slug"),r=$(e.target).data("page"),i=t.getScrollPosition();$(e.target).html('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="16px" height="16px" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid">\n      <circle cx="12" cy="12" fill="none" stroke="#ffffff" stroke-width="2" r="8" stroke-dasharray="18.84955592153876 8.283185307179586">\n      <animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 12 12;360 12 12" keyTimes="0;1"/>\n      </circle>\n      </svg>'),setTimeout((function(){t.loadMore(t.getFilters(),n,parseInt(r)+1,i,e.target)}),200)})),$(".page-stories, .page-india-stories").find(".filter-wrap #search").on("keyup",(function(e){!$(".filter-wrap #search").val()&&t.applied&&(t.previousSearch="",t.getResults(t.getFilters()),t.applied=!1),$("#search").val()?$("form.search").addClass("filled"):$("form.search").removeClass("filled")})),$(".page-stories, .page-india-stories").find(".reset-field").on("click",(function(e){$("#search").val(""),$("form.search").removeClass("filled"),t.applied&&(t.previousSearch="",t.getResults(t.getFilters()),t.applied=!1)}))}},{key:"getFilters",value:function(){var t=[];$("#sector-filter input:checked").each((function(e,n){t.push($(n).val())}));var e=this.previousSearch,n=$("#story-filters-nonce").val();return{sectors:t,search:e,nonce:n}}},{key:"getResults",value:function(t){var e=this,n=t.sectors,r=t.search,i=t.nonce,o=$(".filter-wrap").data("page-id"),s=$(".stories-section").data("template");$("#smooth-wrapper").after('<div class="loading"></div>'),this.destroyAccodion(),setTimeout((function(){$.ajax({type:"post",dataType:"json",url:wp_ajax.ajaxurl,data:{action:"stories_filters",pageId:o,nonce:i,sectors:n,search:r,template:s},success:function(t){var r="\n"!==t.html?t.html:'<div class="no-result">No results</div>';t.html&&($(".section-portfolio .accordion").html(r),Tn(),En(),$(".loading").remove()),e.updateURL(n),e.createAccordion();var i=$(".page-stories, .page-india-stories").find(".col:not(.fade-in)").parent();setTimeout((function(){var t=$(".page-stories, .page-india-stories").find(".col:not(.fade-in)");h.a.set(t,{alpha:0}),h.a.set(i.parent(),{height:"100%"}),h.a.timeline({onStart:function(){t.hasClass("fade-in")||t.addClass("fade-in")}}).to(t,{y:50,alpha:0,duration:1,delay:.2}).to(t,{y:0,alpha:1,duration:1,ease:"power4.out",stagger:.1},"-=0.5")}),0),e.mm.add("(max-width: 991px)",(function(){setTimeout((function(){window.scrollTo(0,$(".page-stories, .page-india-stories").find(".section-portfolio").offset().top-document.querySelector(".header").offsetHeight)}),500)})),e.mm.add("(min-width: 992px)",(function(){setTimeout((function(){window.scroller.scrollTo(e.options.container.querySelector(".section-portfolio"),{duration:100,offset:-1*document.querySelector(".header").offsetHeight})}),100)}))},error:function(t){console.log(JSON.stringify(t))}})}),200)}},{key:"initSimplebar",value:function(){this.isSimpleBar=!0,this.SimpleBar=new Fn(document.querySelector(".ui-autocomplete"))}},{key:"destroySimpleBar",value:function(){this.isSimpleBar&&(this.isSimpleBar=!1,this.SimpleBar.unMount())}},{key:"getScrollPosition",value:function(){return window.pageYOffset||document.documentElement.scrollTop}},{key:"destroyAutoComplete",value:function(){$(".page-stories #search, .page-india-stories #search").autocomplete("destroy"),void 0!==window.storiesAutocomplete&&(window.storiesAutocomplete=void 0)}},{key:"destroy",value:function(){this.destroyAutoComplete(),this.destroySimpleBar(),this.destroyAccodion()}}])&&Vn(e.prototype,n),r&&Vn(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qn(t){return(qn="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){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,Zn(r.key),r)}}function Kn(t,e,n){return(e=Zn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Zn(t){var e=function(t,e){if("object"!=qn(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=qn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==qn(e)?e:String(e)}var Jn=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),Kn(this,"loadMore",(function(t,e,r,i){var o=t.locations,s=t.sectors,a=t.expertise,l=t.search,u=t.nonce;$.ajax({type:"post",dataType:"json",url:wp_ajax.ajaxurl,data:{action:"load_more_team_members",nonce:u,locations:o,sectors:s,expertise:a,search:l,slug:e,page:r},success:function(t){setTimeout((function(){var o=$(".row-"+e);o.append(t.html),t.is_last&&$("[data-slug='".concat(e,"']")).hide(),$("[data-slug='".concat(e,"']")).html("Dive deeper"),$("[data-slug='".concat(e,"']")).data("page",r);var s=$(n.container).find(".row-grid .col:not(.fade-in)");h.a.set(s,{alpha:0}),h.a.set(o.parent(),{height:"100%"});h.a.to(window,{scrollTo:{y:i},duration:0,ease:"power4.inOut"}),setTimeout((function(){h.a.timeline({onComplete:function(){s.hasClass("fade-in")||s.addClass("fade-in")}}).to(s,{y:50,alpha:0,duration:1,delay:.2}).to(s,{y:0,alpha:1,duration:1,ease:"power4.out",stagger:.1},"-=0.5")}),0)}),0)},error:function(t){console.log(JSON.stringify(t))}})})),Kn(this,"filterCount",(function(){["location","expertise","sector"].forEach((function(t){var e=$(n.container).find("#".concat(t,"-filter input:checked")),r=e.length,i=[];e.each((function(t,e){i.push($(e).val())})),(i.includes("all")||0===i.length)&&(r-=1),r>0?$(n.container).find("#".concat(t,"-filter .filter-count")).html("(".concat(r,")")):$(n.container).find("#".concat(t,"-filter .filter-count")).html("")}));var t=$(".filter-wrap input:checked:not(.filter-all)").length;t?($(n.container).find(".filter-opener .filter-count").html("(".concat(t,")")),window.innerWidth>768&&$(n.container).find("#reset-filters").fadeIn()):($(n.container).find("#reset-filters").fadeOut(),$(n.container).find(".filter-opener .filter-count").html(""))})),Kn(this,"resetFilters",(function(){$(".filter-wrap input:checked").prop("checked",!1),$(".filter-wrap input.filter-all").prop("checked",!0)})),Kn(this,"searchAutocomplete",(function(){n.searchContainer=$("[data-filter-wrap-team] #search")[0];var t=$("[data-filter-wrap-team] .inner .search")[0];void 0!==window.teamsAutocomplete&&$(n.searchContainer).autocomplete({source:window.teamsAutocomplete,appendTo:t,minLength:1,autoFocus:!1,open:function(t){$(t.target).next(".ui-autocomplete").addClass("is-active"),n.isSimpleBar||n.initSimplebar()},select:function(t,e){$(t.target).removeClass("active"),$(t.target).next(".ui-autocomplete").removeClass("is-active")},close:function(){n.destroySimpleBar()}})})),Kn(this,"enableAutocomplete",(function(){$(n.searchContainer).autocomplete("enable")})),this.options=Object.assign({},this.defaultOptions,e),this.container=this.options.container,this.isEnabled=!0,this.simpleBar,this.isSimpleBar=!1,this.applied=!1,this.accordion=Hn,this.mm=h.a.matchMedia(),this.init(),this.previousSearch=""}var e,n,r;return e=t,r=[{key:"create",value:function(e){return null===t.instance&&(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"defaultOptions",get:function(){return{container:document}}},{key:"init",value:function(){var t=this;this.Filters(),this.filterCount(),setTimeout((function(){t.searchAutocomplete()}),200),this.initTransition(),this.createAccordion()}},{key:"createAccordion",value:function(){this.accordion.create({speed:.5,element:"[data-accordion]",container:this.options.container})}},{key:"destroyAccodion",value:function(){this.accordion.destroy()}},{key:"initTransition",value:function(){$(this.container).find(".row-grid .col").addClass("fade-in")}},{key:"updateURL",value:function(t,e,n){var r=new URLSearchParams(location.search);t.length?r.set("expertise",t.join(",")):r.delete("expertise"),e.length?r.set("location",e.join(",")):r.delete("location"),n.length?r.set("sector",n.join(",")):r.delete("sector");var i="".concat(location.pathname,"?").concat(r.toString());history.pushState({},"",i),window.barba.history.add(i,"team")}},{key:"Filters",value:function(){var t=this;$(".filter-wrap :checkbox").on("change",(function(e){"all"===$(e.target).val()?($(e.target).closest("ul").find("li input").prop("checked",!1),$(e.target).prop("checked",!0)):($(e.target).closest("ul").find(".filter-all").prop("checked",!1),$(e.target).closest("ul").find("li input:not(.filter-all)").is(":checked")||$(e.target).closest("ul").find(".filter-all").prop("checked",!0)),t.getResults(t.getFilters()),t.filterCount()})),$(this.container).find("#reset-filters").on("click",(function(){t.resetFilters(),t.filterCount(),t.getResults(t.getFilters())})),$(".filter-wrap #reset-filters-mobile").on("click",(function(){$(".filter-wrap #search").val(""),setTimeout((function(){t.resetFilters(),t.filterCount(),t.getResults(t.getFilters())}),0)})),$("body").on("click",".ui-menu-item-wrapper",(function(e){t.applied=!0,t.resetFilters(),t.filterCount(),t.previousSearch=$(e.target).text(),t.getResults(t.getFilters())})),$("body").on("submit","form.search",(function(e){e.preventDefault(),t.applied=!0,t.resetFilters(),t.filterCount(),t.previousSearch=$(e.target).find("input").val(),t.getResults(t.getFilters())})),$(this.container).on("click",".load-more-members",(function(e){var n=$(e.target).data("slug"),r=$(e.target).data("page"),i=t.getScrollPosition();$(e.target).html('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="16px" height="16px" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid">\n                <circle cx="12" cy="12" fill="none" stroke="#ffffff" stroke-width="2" r="8" stroke-dasharray="18.84955592153876 8.283185307179586">\n                <animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 12 12;360 12 12" keyTimes="0;1"/>\n                </circle>\n            </svg>'),setTimeout((function(){t.loadMore(t.getFilters(),n,parseInt(r)+1,i)}),200)})),$(".filter-wrap #search").on("keyup",(function(e){!$(".filter-wrap #search").val()&&t.applied&&(t.previousSearch="",t.getResults(t.getFilters()),t.applied=!1),$("#search").val()?$("form.search").addClass("filled"):$("form.search").removeClass("filled")})),$(".page-lightspeed-team, .page-press-kit").find(".reset-field").on("click",(function(e){$("#search").val(""),$("form.search").removeClass("filled"),t.applied&&(t.previousSearch="",t.getResults(t.getFilters()),t.applied=!1)}))}},{key:"getFilters",value:function(){var t=[],e=[],n=[],r=[];$("#location-filter input:checked").each((function(e,n){t.push($(n).val())})),$("#sector-filter input:checked").each((function(t,n){e.push($(n).val())})),$("#expertise-filter input:checked").each((function(t,e){n.push($(e).val())})),r=(r=$("#blocked_locations")).length&&JSON.parse(r.text())||[];var i=this.previousSearch,o=$("#member-filters-nonce").val();return{locations:t,sectors:e,expertise:n,search:i,nonce:o,blocked_locations:r}}},{key:"getResults",value:function(t){var e=this,n=t.locations,r=t.sectors,i=t.expertise,o=t.search,s=t.nonce,a=t.blocked_locations;$("#smooth-wrapper").after('<div class="loading"></div>'),this.destroyAccodion();var l=$(".section-team-list").data("page-id");setTimeout((function(){$.ajax({type:"post",dataType:"json",url:wp_ajax.ajaxurl,data:{action:"team_member_filters",nonce:s,locations:n,sectors:r,expertise:i,search:o,blocked_locations:a,pageId:l},success:function(t){var o="\n"!==t.html?t.html:'<div class="no-result">No results</div>';t.html&&($(e.container).find(".section-portfolio .accordion").html(o),Tn(),En(),$(".loading").remove()),e.updateURL(i,n,r),e.createAccordion();var s=$(e.container).find(".row-grid .col:not(.fade-in)"),a=s.parent(),l=1,u=1,c="-=0.5";window.innerWidth<1200&&(l=0,u=.1,c="-=0.1"),h.a.set(s,{alpha:0}),h.a.set(a.parent(),{height:"100%"}),setTimeout((function(){h.a.timeline({onStart:function(){s.hasClass("fade-in")||s.addClass("fade-in")}}).to(s,{y:50,alpha:0,duration:u,delay:.2}).to(s,{y:0,alpha:1,duration:1,ease:"power4.out",stagger:.1*l},c)}),0),e.mm.add("(max-width: 991px)",(function(){setTimeout((function(){window.scrollTo(0,$(e.container).find(".section-team-list").offset().top-document.querySelector(".header").offsetHeight)}),500)})),e.mm.add("(min-width: 992px)",(function(){setTimeout((function(){window.scroller.scrollTo(e.options.container.querySelector(".section-team-list"),{duration:100,offset:-1*document.querySelector(".header").offsetHeight})}),100)}))},error:function(t){console.log(JSON.stringify(t))}})}),200)}},{key:"initSimplebar",value:function(){this.isSimpleBar=!0,this.SimpleBar=new Fn($("[data-filter-wrap-team] .ui-autocomplete")[0])}},{key:"destroySimpleBar",value:function(){this.isSimpleBar&&(this.isSimpleBar=!1,this.SimpleBar.unMount())}},{key:"getScrollPosition",value:function(){return window.pageYOffset||document.documentElement.scrollTop}},{key:"destroyAutoComplete",value:function(){$(this.searchContainer).autocomplete("destroy"),void 0!==window.teamsAutocomplete&&(window.teamsAutocomplete=void 0)}},{key:"beforeDestroy",value:function(){this.destroyAutoComplete(),this.destroySimpleBar(),this.destroyAccodion()}}])&&$n(e.prototype,n),r&&$n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();Kn(Jn,"instance",null);var Qn=Jn;function tr(t){return(tr="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 er(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,nr(r.key),r)}}function nr(t){var e=function(t,e){if("object"!=tr(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=tr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==tr(e)?e:String(e)}var rr=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(){return t.instance||(t.instance=this),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance=null)}}],(n=[{key:"init",value:function(){$("[data-width-mb]").each((function(){var t=$(this),e=$(t).attr("width"),n=$(t).data("width-mb"),r=function(){$(window).width()<768?$(t).attr("width",n):$(t).attr("width",e)};r(),$(window).on("resize orientationchange",r)}))}},{key:"beforeDestroy",value:function(){$(window).off("resize orientationchange")}}])&&er(e.prototype,n),r&&er(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=nr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(rr,"instance",null);var ir=rr;function or(t){return(or="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 sr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ar(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?sr(Object(n),!0).forEach((function(e){ur(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):sr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function lr(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,cr(r.key),r)}}function ur(t,e,n){return(e=cr(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function cr(t){var e=function(t,e){if("object"!=or(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=or(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==or(e)?e:String(e)}h.a.registerPlugin(rn);var hr=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),ur(this,"getFilters",(function(){var t=[],e=[],r=[];$("#location-filter input:checked").each((function(e,n){t.push($(n).val())})),$("#stage-filter input:checked").each((function(t,n){e.push($(n).val())})),$("#sector-filter input:checked").each((function(t,e){r.push($(e).val())}));var i=n.previousSearch,o=$("#post-filters-nonce").val(),s=$(".filter").data("spotlight-list");return{locations:t,stages:e,sectors:r,search:i,nonce:o,spotlight:s}})),ur(this,"loadMore",(function(t,e,n,r){var i=t.locations,o=t.stages,s=t.sectors,a=t.search,l=t.nonce;$.ajax({type:"post",dataType:"json",url:wp_ajax.ajaxurl,data:{action:"load_more_founders",nonce:l,locations:i,stages:o,sectors:s,search:a,slug:e,page:n},success:function(t){setTimeout((function(){var r=$(".row-"+e);r.append(t.html),t.is_last&&$("[data-slug='".concat(e,"']")).hide(),$("[data-slug='".concat(e,"']")).html("Dive deeper"),$("[data-slug='".concat(e,"']")).data("page",n);var i=$("#section-companies .col:not(.fade-in)");h.a.set(i,{alpha:0}),h.a.set(r.parent(),{height:"100%"});setTimeout((function(){h.a.timeline({onComplete:function(){i.hasClass("fade-in")||i.addClass("fade-in")}}).to(i,{y:50,alpha:0,duration:1,delay:.2}).to(i,{y:0,alpha:1,duration:1,ease:"power4.out",stagger:.1},"-=0.5"),ir.create()}),0)}),0)},error:function(t){console.log(JSON.stringify(t))}})})),ur(this,"filterCount",(function(){var t=$(".filter-wrap input:checked").length;["location","stage","sector","length"].forEach((function(e){var n=$("#".concat(e,"-filter input:checked")),r=n.length,i=[];n.each((function(t,e){i.push($(e).val())})),i.includes("all")&&(r-=1,t-=1),r>0?$("#".concat(e,"-filter .filter-count")).html("(".concat(r,")")):($("#".concat(e,"-filter .filter-count")).html(""),$("#".concat(e,"-filter input.filter-all")).prop("checked",!0))})),t||$(".filter-wrap #search").val().length?(t=t?"(".concat(t,")"):"",$("#section-companies .filter-opener .filter-count").html(t),$("#section-companies #reset-filters .filter-count").text(t),window.innerWidth>767&&$("#reset-filters").fadeIn()):($("#section-companies #reset-filters").fadeOut(),$("#section-companies .filter-opener .filter-count").html(""))})),ur(this,"resetFilters",(function(){$(".filter-wrap input:checked").prop("checked",!1),$("#section-companies #search").prop("value",""),window.updateLocoAndScrollTrigger(),n.onScrollActions(),$("form.search").removeClass("filled"),n.previousSearch=""})),ur(this,"searchAutocomplete",(function(){n.searchContainerCompanies=$("#search")[0],void 0!==window.companiesAutocomplete&&$(n.searchContainerCompanies).autocomplete({source:window.companiesAutocomplete,appendTo:$(".filter-wrap .inner .search")[0],minLength:1,autoFocus:!1,open:function(t){$(t.target).next(".ui-autocomplete").addClass("is-active"),n.isSimpleBar||n.initSimplebar()},select:function(t,e){$(t.target).removeClass("active"),$(t.target).next(".ui-autocomplete").removeClass("is-active")},close:function(){n.destroySimpleBar()}})})),ur(this,"enableAutocomplete",(function(){$("#search").autocomplete("enable")})),this.options=Object.assign({},this.defaultOptions,e),this.isEnabled=!0,this.lastScrollPosition=0,this.simpleBar,this.isSimpleBar=!1,this.applied=!!$("#search").val(),this.AjaxLoadOnScroll=this.ajaxLoadOnScroll.bind(this),this.stickyFilters=this.stickyFilters.bind(this),this.mm=h.a.matchMedia(),this.onResize=this.onResize.bind(this),this.init(),this.previousSearch=$("#search").val(),setTimeout((function(){window.scroller.update()}),1e3)}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(e){t.instance&&(t.instance.beforeDestroy(e),t.instance=null)}}],(n=[{key:"defaultOptions",get:function(){return{container:document}}},{key:"init",value:function(){var t=this;this.htmlEl=document.documentElement,this.bodyEl=document.body,this.headerFilter=document.querySelector("#section-companies .filter-heading"),this.wrapper=document.querySelector(".companies-wrapper"),this.header=document.querySelector(".header"),this.Filters(),this.onResize(),setTimeout((function(){t.searchAutocomplete()}),300),this.initTransition(),this.onScrollActions(),this.initStickyFilters(),this.initResize(),this.showCompany(),this.identifyFounder()}},{key:"initTransition",value:function(){$("#section-companies .row-grid .col").addClass("fade-in")}},{key:"updateURL",value:function(t,e,n,r){var i=new URLSearchParams(location.search);t.length?i.set("location",t.join(",")):i.delete("location"),e.length?i.set("stage",e.join(",")):i.delete("stage"),n.length?i.set("sector",n.join(",")):i.delete("sector"),r.length?i.set("search",r):i.delete("search");var o="".concat(location.pathname,"?").concat(i.toString());history.pushState({},"",o),window.barba.history.add(o,"companies")}},{key:"Filters",value:function(){var t=this;$(".filter-wrap :checkbox").on("change",(function(e){"all"===$(e.target).val()?($(e.target).closest("ul").find("li input").prop("checked",!1),$(e.target).prop("checked",!0)):($(e.target).parents("ul").find(".filter-all").prop("checked",!1),$(e.target).closest("ul").find("li input:not(.filter-all)").is(":checked")||$(e.target).closest("ul").find(".filter-all").prop("checked",!0)),t.filterCount(),t.getResults(t.getFilters())})),$(document).ready((function(){$("body").hasClass("page-companies-india")&&(t.filterCount(),t.getResults(t.getFilters(),!1))})),$("#reset-filters").on("click",(function(){t.resetFilters(),t.filterCount(),t.getResults(t.getFilters(),!0)})),$("#reset-filters-mobile").on("click",(function(){t.resetFilters(),t.filterCount(),t.getResults(t.getFilters(),!0)})),$(document).on("click",".ui-menu-item-wrapper",(function(e){t.applied=!0,t.previousSearch=$(e.target).text(),t.getResults(t.getFilters(),!0),t.filterCount()})),$(document).on("submit","form.search",(function(e){e.preventDefault(),t.applied=!0,t.previousSearch=$(e.target).find("input").val(),t.getResults(t.getFilters(),!0),t.filterCount()})),$(document).on("click",".load-more-companies",(function(e){var n=$(e.target).data("slug"),r=$(e.target).data("page"),i=t.getScrollPosition();$(e.target).html('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="16px" height="16px" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid">\n                <circle cx="12" cy="12" fill="none" stroke="#ffffff" stroke-width="2" r="8" stroke-dasharray="18.84955592153876 8.283185307179586">\n                <animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 12 12;360 12 12" keyTimes="0;1"/>\n                </circle>\n            </svg>'),setTimeout((function(){t.loadMore(t.getFilters(),n,parseInt(r)+1,i,t.previousSearch)}),200)})),$(".filter-wrap #search").on("keyup",(function(e){!$(".filter-wrap #search").val()&&t.applied&&(t.previousSearch="",t.getResults(t.getFilters(),!0),t.filterCount(),t.applied=!1),$("#search").val()?$("form.search").addClass("filled"):$("form.search").removeClass("filled")})),$(".page-companies, .page-companies-india").find(".reset-field").on("click",(function(e){new URLSearchParams(location.search),$("#search").val(""),$("form.search").removeClass("filled"),t.applied&&(t.previousSearch="",t.getResults(t.getFilters(),!0),t.applied=!1)}))}},{key:"getResults",value:function(t,e){var n=this,r=t.locations,i=t.stages,o=t.sectors,s=t.search,a=t.nonce,l=t.spotlight;$("#smooth-wrapper").after('<div class="loading"></div>');var u=o.length>0&&!o.includes("all")?o.join(", "):"";$("#section-companies .section-spotlight-companies .current_sector_filters").text(u);var c={nonce:a,locations:r,stages:i,sectors:o,search:s,spotlight:l},h=$(".filter-heading").data("prefilled-location");h&&h.length>0&&0===c.locations.length&&(c.locations=[h]),this.ajaxLoadCompanies(c,(function(t){$("#section-companies #all-companies-list ul").length>0&&("string"==typeof t.html_all&&t.html_all.length>5?($("#section-companies #all-companies-list").attr("data-paged",1),$("#section-companies #all-companies-list").attr("data-is-loading",""),$("#section-companies #all-companies-list ul").html(t.html_all)):$("#section-companies #all-companies-list ul").html('<div class="no-result">No results</div>')),$("#section-companies #spotlight-companies-list ul").length>0&&("string"==typeof t.html_spotlight&&t.html_spotlight.length>5?($("#section-companies #spotlight-companies-list ul").html(t.html_spotlight),$("#section-companies #spotlight-companies-list").removeClass("hide")):($("#section-companies #spotlight-companies-list ul").html('<div class="no-result">No results</div>'),$("#section-companies #spotlight-companies-list").addClass("hide")))}),(function(){Tn(),En(),$(".loading").remove(),e&&(n.mm.add("(max-width: 991px)",(function(){Mn(),setTimeout((function(){window.scroller?window.scroller.scrollTo($("#section-companies .section-portfolio-heading")[0],{duration:100,offset:-n.headerHeight}):window.scrollTo(0,$("#section-companies .section-portfolio-heading").offset().top-n.headerHeight)}),500)})),n.mm.add("(min-width: 992px)",(function(){setTimeout((function(){window.scroller.scrollTo($("#section-companies .section-portfolio-heading")[0],{duration:100,offset:-n.headerHeight})}),0)}))),window.updateLocoAndScrollTrigger(),n.animationListCompany()})),this.updateURL(r,i,o,s)}},{key:"initSimplebar",value:function(){this.isSimpleBar=!0,this.SimpleBar=new Fn($(".ui-autocomplete")[0])}},{key:"destroySimpleBar",value:function(){this.isSimpleBar&&(this.isSimpleBar=!1,this.SimpleBar.unMount())}},{key:"getScrollPosition",value:function(){return window.pageYOffset||document.documentElement.scrollTop}},{key:"destroyAutoComplete",value:function(){$("#search").autocomplete("destroy"),void 0!==window.companiesAutocomplete&&(window.companiesAutocomplete=void 0)}},{key:"beforeDestroy",value:function(t){this.destroyAutoComplete(),this.destroySimpleBar(),this.AjaxLoadOnScroll=null,this.headerFilter=null,this.wrapper=null,this.boundWrapper=null,this.headerHeight=null,this.header=null,this.lastScrollPosition=null,this.initStickyFilters=null,this.isSimpleBar=null,this.SimpleBar=null,window.removeEventListener("resize",this.onResize)}},{key:"ajaxLoadCompanies",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;this.getFilters();var r=ar(ar({},t),{action:"founders_filters"});$.ajax({type:"post",dataType:"json",url:wp_ajax.ajaxurl,data:r,success:function(t){e(t)},error:function(t){console.log(JSON.stringify(t))},complete:function(){n()}})}},{key:"initResize",value:function(){window.addEventListener("resize",this.onResize)}},{key:"onResize",value:function(){this.headerHeight=this.header.offsetHeight,this.isSmoothScroll=this.htmlEl.classList.contains("has-scroll-smooth"),this.isMobile=window.matchMedia("(max-width: 767px)").matches}},{key:"onScrollActions",value:function(){var t=this;window.scroller.on("scroll",this.AjaxLoadOnScroll),window.scroller.on("call",(function(e,n){t.isSmoothScroll&&"companiesFilter"===e&&document.body.classList["enter"===n?"add":"remove"]("is-filter-sticky")}))}},{key:"ajaxLoadOnScroll",value:function(){var t=this,e=this.options.container.querySelector("#all-companies-list");if(null!==e){var n=e.querySelector("ul.companies-list"),r=e.dataset.isLoading,i=parseInt(e.dataset.paged)+1,o=e.offsetTop+(e.offsetHeight-3*window.outerHeight);if(window.scroller.scroll.instance.scroll.y>o&&!r){var s=this.getFilters();e.dataset.isLoading="loading",e.dataset.paged=i,this.ajaxLoadCompanies(ar(ar({},s),{paged:i}),(function(r){"string"==typeof r.html_all&&r.html_all.length>5&&($(n).append(r.html_all),window.setTimeout((function(){e.dataset.isLoading="",window.updateLocoAndScrollTrigger(),t.animationListCompany()}),200))}),(function(){}))}}}},{key:"animationListCompany",value:function(){this.options.container.querySelectorAll(".ready-appear-list").forEach((function(t){var e=h.a.to(t,{scrollTrigger:{trigger:t,start:"top 110%",end:"bottom 90%",scroller:"[data-scroll-container]",markers:!1},y:0,autoAlpha:1,duration:.75,ease:"circ.out",delay:.1,clearProps:"autoAlpha",onStart:function(e){t.classList.add("list-animated"),t.classList.remove("ready-appear-list")},onComplete:function(t){e.scrollTrigger.kill(),e.kill(),e=null}})}))}},{key:"stickyFilters",value:function(){if(null!==this.headerFilter){this.boundWrapper=this.wrapper.getBoundingClientRect().top+window.scroller.scroll.instance.scroll.y-this.headerHeight;var t=window.scroller.scroll.instance.scroll.y;this.isSmoothScroll||this.stickyFilterTouchPin(t),this.stickyFiltersHandler(t),this.lastScrollPosition=t}}},{key:"stickyFilterTouchPin",value:function(t){t>this.boundWrapper?(this.headerFilter.classList.add("sticky"),this.headerFilter.style.top=this.headerHeight-1+"px",this.wrapper.style.paddingTop=this.headerFilter.offsetHeight+"px",this.bodyEl.classList.add("is-filter-sticky")):(this.headerFilter.classList.remove("sticky"),this.headerFilter.style.top="",this.wrapper.style.paddingTop="",this.bodyEl.classList.remove("is-filter-sticky"),this.headerFilter.classList.remove("active"),this.headerFilter.classList.remove("removed"))}},{key:"stickyFiltersHandler",value:function(t){if(t>this.boundWrapper+100){var e=t-this.lastScrollPosition;e>1?(this.headerFilter.classList.remove("active"),this.headerFilter.classList.add("removed"),this.isMobile||this.closeTheDropdownFilter()):e<-1&&(this.headerFilter.classList.add("active"),this.headerFilter.classList.remove("removed"),this.isMobile||this.closeTheDropdownFilter())}else this.headerFilter.classList.remove("active"),this.headerFilter.classList.remove("removed")}},{key:"initStickyFilters",value:function(){window.scroller.on("scroll",this.stickyFilters)}},{key:"closeTheDropdownFilter",value:function(){this.options.container.querySelectorAll("[data-more]").forEach((function(t){t.classList.contains("active")&&(t.classList.remove("active"),$(t).next().stop().slideToggle(200))}))}},{key:"showCompany",value:function(){if(document.querySelector(".page-companies-india")){var t=document.querySelectorAll(".page-companies-india [data-appear-list]");Array.from(t).slice(0,5).forEach((function(t){t.removeAttribute("data-appear-list")}))}}},{key:"identifyFounder",value:function(){document.querySelectorAll("[data-company-id]").forEach((function(t){t.addEventListener("click",(function(e){t.hasAttribute("data-spotlight-founders-list")?sessionStorage.setItem("founder","true"):sessionStorage.setItem("founder","false")}))}))}}])&&lr(e.prototype,n),r&&lr(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();ur(hr,"instance",null);var dr=hr;function pr(t){return null!==t&&"object"==typeof t&&"constructor"in t&&t.constructor===Object}function fr(t={},e={}){Object.keys(e).forEach(n=>{void 0===t[n]?t[n]=e[n]:pr(e[n])&&pr(t[n])&&Object.keys(e[n]).length>0&&fr(t[n],e[n])})}const mr={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 gr(){const t="undefined"!=typeof document?document:{};return fr(t,mr),t}const vr={document:mr,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 yr(){const t="undefined"!=typeof window?window:{};return fr(t,vr),t}function _r(t,e=0){return setTimeout(t,e)}function br(){return Date.now()}function xr(t,e="x"){const n=yr();let r,i,o;const s=function(t){const e=yr();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=s.transform||s.webkitTransform,i.split(",").length>6&&(i=i.split(", ").map(t=>t.replace(",",".")).join(", ")),o=new n.WebKitCSSMatrix("none"===i?"":i)):(o=s.MozTransform||s.OTransform||s.MsTransform||s.msTransform||s.transform||s.getPropertyValue("transform").replace("translate(","matrix(1, 0, 0, 1,"),r=o.toString().split(",")),"x"===e&&(i=n.WebKitCSSMatrix?o.m41:16===r.length?parseFloat(r[12]):parseFloat(r[4])),"y"===e&&(i=n.WebKitCSSMatrix?o.m42:16===r.length?parseFloat(r[13]):parseFloat(r[5])),i||0}function wr(t){return"object"==typeof t&&null!==t&&t.constructor&&"Object"===Object.prototype.toString.call(t).slice(8,-1)}function Er(...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&&(wr(e[r])&&wr(o[r])?o[r].__swiper__?e[r]=o[r]:Er(e[r],o[r]):!wr(e[r])&&wr(o[r])?(e[r]={},o[r].__swiper__?e[r]=o[r]:Er(e[r],o[r])):e[r]=o[r])}}}var r;return e}function Tr(t,e,n){t.style.setProperty(e,n)}function Sr({swiper:t,targetPosition:e,side:n}){const r=yr(),i=-t.translate;let o,s=null;const a=t.params.speed;t.wrapperEl.style.scrollSnapType="none",r.cancelAnimationFrame(t.cssModeFrameID);const l=e>i?"next":"prev",u=(t,e)=>"next"===l&&t>=e||"prev"===l&&t<=e,c=()=>{o=(new Date).getTime(),null===s&&(s=o);const l=Math.max(Math.min((o-s)/a,1),0),h=.5-Math.cos(l*Math.PI)/2;let d=i+h*(e-i);if(u(d,e)&&(d=e),t.wrapperEl.scrollTo({[n]:d}),u(d,e))return t.wrapperEl.style.overflow="hidden",t.wrapperEl.style.scrollSnapType="",setTimeout(()=>{t.wrapperEl.style.overflow="",t.wrapperEl.scrollTo({[n]:d})}),void r.cancelAnimationFrame(t.cssModeFrameID);t.cssModeFrameID=r.requestAnimationFrame(c)};c()}function Ar(t,e=""){return[...t.children].filter(t=>t.matches(e))}function Mr(t,e=[]){const n=document.createElement(t);return n.classList.add(...Array.isArray(e)?e:[e]),n}function Dr(t){const e=yr(),n=gr(),r=t.getBoundingClientRect(),i=n.body,o=t.clientTop||i.clientTop||0,s=t.clientLeft||i.clientLeft||0,a=t===e?e.scrollY:t.scrollTop,l=t===e?e.scrollX:t.scrollLeft;return{top:r.top+a-o,left:r.left+l-s}}function Cr(t,e){return yr().getComputedStyle(t,null).getPropertyValue(e)}function Rr(t){let e,n=t;if(n){for(e=0;null!==(n=n.previousSibling);)1===n.nodeType&&(e+=1);return e}}function Or(t,e){const n=[];let r=t.parentElement;for(;r;)e?r.matches(e)&&n.push(r):n.push(r),r=r.parentElement;return n}function Pr(t,e){e&&t.addEventListener("transitionend",(function n(r){r.target===t&&(e.call(t,r),t.removeEventListener("transitionend",n))}))}function Ir(t,e,n){const r=yr();return n?t["width"===e?"offsetWidth":"offsetHeight"]+parseFloat(r.getComputedStyle(t,null).getPropertyValue("width"===e?"margin-right":"margin-top"))+parseFloat(r.getComputedStyle(t,null).getPropertyValue("width"===e?"margin-left":"margin-bottom")):t.offsetWidth}let Lr,Nr,Fr;function kr(){return Lr||(Lr=function(){const t=yr(),e=gr();return{smoothScroll:e.documentElement&&e.documentElement.style&&"scrollBehavior"in e.documentElement.style,touch:!!("ontouchstart"in t||t.DocumentTouch&&e instanceof t.DocumentTouch)}}()),Lr}function Ur(t={}){return Nr||(Nr=function({userAgent:t}={}){const e=kr(),n=yr(),r=n.navigator.platform,i=t||n.navigator.userAgent,o={ios:!1,android:!1},s=n.screen.width,a=n.screen.height,l=i.match(/(Android);?[\s\/]+([\d.]+)?/);let u=i.match(/(iPad).*OS\s([\d_]+)/);const c=i.match(/(iPod)(.*OS\s([\d_]+))?/),h=!u&&i.match(/(iPhone\sOS|iOS)\s([\d_]+)/),d="Win32"===r;let p="MacIntel"===r;return!u&&p&&e.touch&&["1024x1366","1366x1024","834x1194","1194x834","834x1112","1112x834","768x1024","1024x768","820x1180","1180x820","810x1080","1080x810"].indexOf(`${s}x${a}`)>=0&&(u=i.match(/(Version)\/([\d.]+)/),u||(u=[0,1,"13_0_0"]),p=!1),l&&!d&&(o.os="android",o.android=!0),(u||h||c)&&(o.os="ios",o.ios=!0),o}(t)),Nr}function Br(){return Fr||(Fr=function(){const t=yr();let e=!1;function n(){const e=t.navigator.userAgent.toLowerCase();return e.indexOf("safari")>=0&&e.indexOf("chrome")<0&&e.indexOf("android")<0}if(n()){const n=String(t.navigator.userAgent);if(n.includes("Version/")){const[t,r]=n.split("Version/")[1].split(" ")[0].split(".").map(t=>Number(t));e=t<16||16===t&&r<2}}return{isSafari:e||n(),needPerspectiveFix:e,isWebView:/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/i.test(t.navigator.userAgent)}}()),Fr}const Gr=(t,e)=>{if(!t||t.destroyed||!t.params)return;const n=e.closest(t.isElement?"swiper-slide":"."+t.params.slideClass);if(n){const e=n.querySelector("."+t.params.lazyPreloaderClass);e&&e.remove()}},zr=(t,e)=>{if(!t.slides[e])return;const n=t.slides[e].querySelector('[loading="lazy"]');n&&n.removeAttribute("loading")},Hr=t=>{if(!t||t.destroyed||!t.params)return;let e=t.params.lazyPreloadPrevNext;const n=t.slides.length;if(!n||!e||e<0)return;e=Math.min(e,n);const r="auto"===t.params.slidesPerView?t.slidesPerViewDynamic():Math.ceil(t.params.slidesPerView),i=t.activeIndex;if(t.params.grid&&t.params.grid.rows>1){const n=i,o=[n-e];return o.push(...Array.from({length:e}).map((t,e)=>n+r+e)),void t.slides.forEach((e,n)=>{o.includes(e.column)&&zr(t,n)})}const o=i+r-1;if(t.params.rewind||t.params.loop)for(let r=i-e;r<=o+e;r+=1){const e=(r%n+n)%n;(e<i||e>o)&&zr(t,e)}else for(let r=Math.max(i-e,0);r<=Math.min(o+e,n-1);r+=1)r!==i&&(r>o||r<i)&&zr(t,r)};function jr({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 Vr(t){const e=this,n=gr(),r=yr(),i=e.touchEventsData;i.evCache.push(t);const{params:o,touches:s,enabled:a}=e;if(!a)return;if(!o.simulateTouch&&"mouse"===t.pointerType)return;if(e.animating&&o.preventInteractionOnTransition)return;!e.animating&&o.cssMode&&o.loop&&e.loopFix();let l=t;l.originalEvent&&(l=l.originalEvent);let u=l.target;if("wrapper"===o.touchEventsTarget&&!e.wrapperEl.contains(u))return;if("which"in l&&3===l.which)return;if("button"in l&&l.button>0)return;if(i.isTouched&&i.isMoved)return;const c=!!o.noSwipingClass&&""!==o.noSwipingClass,h=t.composedPath?t.composedPath():t.path;c&&l.target&&l.target.shadowRoot&&h&&(u=h[0]);const d=o.noSwipingSelector?o.noSwipingSelector:"."+o.noSwipingClass,p=!(!l.target||!l.target.shadowRoot);if(o.noSwiping&&(p?function(t,e=this){return function e(n){if(!n||n===gr()||n===yr())return null;n.assignedSlot&&(n=n.assignedSlot);const r=n.closest(t);return r||n.getRootNode?r||e(n.getRootNode().host):null}(e)}(d,u):u.closest(d)))return void(e.allowClick=!0);if(o.swipeHandler&&!u.closest(o.swipeHandler))return;s.currentX=l.pageX,s.currentY=l.pageY;const f=s.currentX,m=s.currentY,g=o.edgeSwipeDetection||o.iOSEdgeSwipeDetection,v=o.edgeSwipeThreshold||o.iOSEdgeSwipeThreshold;if(g&&(f<=v||f>=r.innerWidth-v)){if("prevent"!==g)return;t.preventDefault()}Object.assign(i,{isTouched:!0,isMoved:!1,allowTouchCallbacks:!0,isScrolling:void 0,startMoving:void 0}),s.startX=f,s.startY=m,i.touchStartTime=br(),e.allowClick=!0,e.updateSize(),e.swipeDirection=void 0,o.threshold>0&&(i.allowThresholdMove=!1);let y=!0;u.matches(i.focusableElements)&&(y=!1,"SELECT"===u.nodeName&&(i.isTouched=!1)),n.activeElement&&n.activeElement.matches(i.focusableElements)&&n.activeElement!==u&&n.activeElement.blur();const _=y&&e.allowTouchMove&&o.touchStartPreventDefault;!o.touchStartForcePreventDefault&&!_||u.isContentEditable||l.preventDefault(),o.freeMode&&o.freeMode.enabled&&e.freeMode&&e.animating&&!o.cssMode&&e.freeMode.onTouchStart(),e.emit("touchStart",l)}function Xr(t){const e=gr(),n=this,r=n.touchEventsData,{params:i,touches:o,rtlTranslate:s,enabled:a}=n;if(!a)return;if(!i.simulateTouch&&"mouse"===t.pointerType)return;let l=t;if(l.originalEvent&&(l=l.originalEvent),!r.isTouched)return void(r.startMoving&&r.isScrolling&&n.emit("touchMoveOpposite",l));const u=r.evCache.findIndex(t=>t.pointerId===l.pointerId);u>=0&&(r.evCache[u]=l);const c=r.evCache.length>1?r.evCache[0]:l,h=c.pageX,d=c.pageY;if(l.preventedByNestedSwiper)return o.startX=h,void(o.startY=d);if(!n.allowTouchMove)return l.target.matches(r.focusableElements)||(n.allowClick=!1),void(r.isTouched&&(Object.assign(o,{startX:h,startY:d,prevX:n.touches.currentX,prevY:n.touches.currentY,currentX:h,currentY:d}),r.touchStartTime=br()));if(i.touchReleaseOnEdges&&!i.loop)if(n.isVertical()){if(d<o.startY&&n.translate<=n.maxTranslate()||d>o.startY&&n.translate>=n.minTranslate())return r.isTouched=!1,void(r.isMoved=!1)}else if(h<o.startX&&n.translate<=n.maxTranslate()||h>o.startX&&n.translate>=n.minTranslate())return;if(e.activeElement&&l.target===e.activeElement&&l.target.matches(r.focusableElements))return r.isMoved=!0,void(n.allowClick=!1);if(r.allowTouchCallbacks&&n.emit("touchMove",l),l.targetTouches&&l.targetTouches.length>1)return;o.currentX=h,o.currentY=d;const p=o.currentX-o.startX,f=o.currentY-o.startY;if(n.params.threshold&&Math.sqrt(p**2+f**2)<n.params.threshold)return;if(void 0===r.isScrolling){let t;n.isHorizontal()&&o.currentY===o.startY||n.isVertical()&&o.currentX===o.startX?r.isScrolling=!1:p*p+f*f>=25&&(t=180*Math.atan2(Math.abs(f),Math.abs(p))/Math.PI,r.isScrolling=n.isHorizontal()?t>i.touchAngle:90-t>i.touchAngle)}if(r.isScrolling&&n.emit("touchMoveOpposite",l),void 0===r.startMoving&&(o.currentX===o.startX&&o.currentY===o.startY||(r.startMoving=!0)),r.isScrolling||n.zoom&&n.params.zoom&&n.params.zoom.enabled&&r.evCache.length>1)return void(r.isTouched=!1);if(!r.startMoving)return;n.allowClick=!1,!i.cssMode&&l.cancelable&&l.preventDefault(),i.touchMoveStopPropagation&&!i.nested&&l.stopPropagation();let m=n.isHorizontal()?p:f,g=n.isHorizontal()?o.currentX-o.previousX:o.currentY-o.previousY;i.oneWayMovement&&(m=Math.abs(m)*(s?1:-1),g=Math.abs(g)*(s?1:-1)),o.diff=m,m*=i.touchRatio,s&&(m=-m,g=-g);const v=n.touchesDirection;n.swipeDirection=m>0?"prev":"next",n.touchesDirection=g>0?"prev":"next";const y=n.params.loop&&!i.cssMode;if(!r.isMoved){if(y&&n.loopFix({direction:n.swipeDirection}),r.startTranslate=n.getTranslate(),n.setTransition(0),n.animating){const t=new window.CustomEvent("transitionend",{bubbles:!0,cancelable:!0});n.wrapperEl.dispatchEvent(t)}r.allowMomentumBounce=!1,!i.grabCursor||!0!==n.allowSlideNext&&!0!==n.allowSlidePrev||n.setGrabCursor(!0),n.emit("sliderFirstMove",l)}let _;r.isMoved&&v!==n.touchesDirection&&y&&Math.abs(m)>=1&&(n.loopFix({direction:n.swipeDirection,setTranslate:!0}),_=!0),n.emit("sliderMove",l),r.isMoved=!0,r.currentTranslate=m+r.startTranslate;let b=!0,x=i.resistanceRatio;if(i.touchReleaseOnEdges&&(x=0),m>0?(y&&!_&&r.currentTranslate>(i.centeredSlides?n.minTranslate()-n.size/2:n.minTranslate())&&n.loopFix({direction:"prev",setTranslate:!0,activeSlideIndex:0}),r.currentTranslate>n.minTranslate()&&(b=!1,i.resistance&&(r.currentTranslate=n.minTranslate()-1+(-n.minTranslate()+r.startTranslate+m)**x))):m<0&&(y&&!_&&r.currentTranslate<(i.centeredSlides?n.maxTranslate()+n.size/2:n.maxTranslate())&&n.loopFix({direction:"next",setTranslate:!0,activeSlideIndex:n.slides.length-("auto"===i.slidesPerView?n.slidesPerViewDynamic():Math.ceil(parseFloat(i.slidesPerView,10)))}),r.currentTranslate<n.maxTranslate()&&(b=!1,i.resistance&&(r.currentTranslate=n.maxTranslate()+1-(n.maxTranslate()-r.startTranslate-m)**x))),b&&(l.preventedByNestedSwiper=!0),!n.allowSlideNext&&"next"===n.swipeDirection&&r.currentTranslate<r.startTranslate&&(r.currentTranslate=r.startTranslate),!n.allowSlidePrev&&"prev"===n.swipeDirection&&r.currentTranslate>r.startTranslate&&(r.currentTranslate=r.startTranslate),n.allowSlidePrev||n.allowSlideNext||(r.currentTranslate=r.startTranslate),i.threshold>0){if(!(Math.abs(m)>i.threshold||r.allowThresholdMove))return void(r.currentTranslate=r.startTranslate);if(!r.allowThresholdMove)return r.allowThresholdMove=!0,o.startX=o.currentX,o.startY=o.currentY,r.currentTranslate=r.startTranslate,void(o.diff=n.isHorizontal()?o.currentX-o.startX:o.currentY-o.startY)}i.followFinger&&!i.cssMode&&((i.freeMode&&i.freeMode.enabled&&n.freeMode||i.watchSlidesProgress)&&(n.updateActiveIndex(),n.updateSlidesClasses()),i.freeMode&&i.freeMode.enabled&&n.freeMode&&n.freeMode.onTouchMove(),n.updateProgress(r.currentTranslate),n.setTranslate(r.currentTranslate))}function Wr(t){const e=this,n=e.touchEventsData,r=n.evCache.findIndex(e=>e.pointerId===t.pointerId);if(r>=0&&n.evCache.splice(r,1),["pointercancel","pointerout","pointerleave"].includes(t.type)){if(!("pointercancel"===t.type&&(e.browser.isSafari||e.browser.isWebView)))return}const{params:i,touches:o,rtlTranslate:s,slidesGrid:a,enabled:l}=e;if(!l)return;if(!i.simulateTouch&&"mouse"===t.pointerType)return;let u=t;if(u.originalEvent&&(u=u.originalEvent),n.allowTouchCallbacks&&e.emit("touchEnd",u),n.allowTouchCallbacks=!1,!n.isTouched)return n.isMoved&&i.grabCursor&&e.setGrabCursor(!1),n.isMoved=!1,void(n.startMoving=!1);i.grabCursor&&n.isMoved&&n.isTouched&&(!0===e.allowSlideNext||!0===e.allowSlidePrev)&&e.setGrabCursor(!1);const c=br(),h=c-n.touchStartTime;if(e.allowClick){const t=u.path||u.composedPath&&u.composedPath();e.updateClickedSlide(t&&t[0]||u.target),e.emit("tap click",u),h<300&&c-n.lastClickTime<300&&e.emit("doubleTap doubleClick",u)}if(n.lastClickTime=br(),_r(()=>{e.destroyed||(e.allowClick=!0)}),!n.isTouched||!n.isMoved||!e.swipeDirection||0===o.diff||n.currentTranslate===n.startTranslate)return n.isTouched=!1,n.isMoved=!1,void(n.startMoving=!1);let d;if(n.isTouched=!1,n.isMoved=!1,n.startMoving=!1,d=i.followFinger?s?e.translate:-e.translate:-n.currentTranslate,i.cssMode)return;if(i.freeMode&&i.freeMode.enabled)return void e.freeMode.onTouchEnd({currentPos:d});let p=0,f=e.slidesSizesGrid[0];for(let t=0;t<a.length;t+=t<i.slidesPerGroupSkip?1:i.slidesPerGroup){const e=t<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;void 0!==a[t+e]?d>=a[t]&&d<a[t+e]&&(p=t,f=a[t+e]-a[t]):d>=a[t]&&(p=t,f=a[a.length-1]-a[a.length-2])}let m=null,g=null;i.rewind&&(e.isBeginning?g=i.virtual&&i.virtual.enabled&&e.virtual?e.virtual.slides.length-1:e.slides.length-1:e.isEnd&&(m=0));const v=(d-a[p])/f,y=p<i.slidesPerGroupSkip-1?1:i.slidesPerGroup;if(h>i.longSwipesMs){if(!i.longSwipes)return void e.slideTo(e.activeIndex);"next"===e.swipeDirection&&(v>=i.longSwipesRatio?e.slideTo(i.rewind&&e.isEnd?m:p+y):e.slideTo(p)),"prev"===e.swipeDirection&&(v>1-i.longSwipesRatio?e.slideTo(p+y):null!==g&&v<0&&Math.abs(v)>i.longSwipesRatio?e.slideTo(g):e.slideTo(p))}else{if(!i.shortSwipes)return void e.slideTo(e.activeIndex);e.navigation&&(u.target===e.navigation.nextEl||u.target===e.navigation.prevEl)?u.target===e.navigation.nextEl?e.slideTo(p+y):e.slideTo(p):("next"===e.swipeDirection&&e.slideTo(null!==m?m:p+y),"prev"===e.swipeDirection&&e.slideTo(null!==g?g:p))}}function Yr(){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,s=t.virtual&&t.params.virtual.enabled;t.allowSlideNext=!0,t.allowSlidePrev=!0,t.updateSize(),t.updateSlides(),t.updateSlidesClasses();const a=s&&e.loop;!("auto"===e.slidesPerView||e.slidesPerView>1)||!t.isEnd||t.isBeginning||t.params.centeredSlides||a?t.params.loop&&!s?t.slideToLoop(t.realIndex,0,!1,!0):t.slideTo(t.activeIndex,0,!1,!0):t.slideTo(t.slides.length-1,0,!1,!0),t.autoplay&&t.autoplay.running&&t.autoplay.paused&&(clearTimeout(t.autoplay.resizeTimeout),t.autoplay.resizeTimeout=setTimeout(()=>{t.autoplay&&t.autoplay.running&&t.autoplay.paused&&t.autoplay.resume()},500)),t.allowSlidePrev=i,t.allowSlideNext=r,t.params.watchOverflow&&o!==t.snapGrid&&t.checkOverflow()}function qr(t){const e=this;e.enabled&&(e.allowClick||(e.params.preventClicks&&t.preventDefault(),e.params.preventClicksPropagation&&e.animating&&(t.stopPropagation(),t.stopImmediatePropagation())))}function $r(){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)}function Kr(t){Gr(this,t.target),this.params.cssMode||"auto"!==this.params.slidesPerView&&!this.params.autoHeight||this.update()}let Zr=!1;function Jr(){}const Qr=(t,e)=>{const n=gr(),{params:r,el:i,wrapperEl:o,device:s}=t,a=!!r.nested,l="on"===e?"addEventListener":"removeEventListener",u=e;i[l]("pointerdown",t.onTouchStart,{passive:!1}),n[l]("pointermove",t.onTouchMove,{passive:!1,capture:a}),n[l]("pointerup",t.onTouchEnd,{passive:!0}),n[l]("pointercancel",t.onTouchEnd,{passive:!0}),n[l]("pointerout",t.onTouchEnd,{passive:!0}),n[l]("pointerleave",t.onTouchEnd,{passive:!0}),(r.preventClicks||r.preventClicksPropagation)&&i[l]("click",t.onClick,!0),r.cssMode&&o[l]("scroll",t.onScroll),r.updateOnWindowResize?t[u](s.ios||s.android?"resize orientationchange observerUpdate":"resize observerUpdate",Yr,!0):t[u]("observerUpdate",Yr,!0),i[l]("load",t.onLoad,{capture:!0})};const ti=(t,e)=>t.grid&&e.grid&&e.grid.rows>1;var ei={init:!0,direction:"horizontal",oneWayMovement:!1,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:5,touchMoveStopPropagation:!1,touchStartPreventDefault:!0,touchStartForcePreventDefault:!1,touchReleaseOnEdges:!1,uniqueNavElements:!0,resistance:!0,resistanceRatio:.85,watchSlidesProgress:!1,grabCursor:!1,preventClicks:!0,preventClicksPropagation:!0,slideToClickedSlide:!1,loop:!1,loopedSlides:null,loopPreventsSliding:!0,rewind:!1,allowSlidePrev:!0,allowSlideNext:!0,swipeHandler:null,noSwiping:!0,noSwipingClass:"swiper-no-swiping",noSwipingSelector:null,passiveListeners:!0,maxBackfaceHiddenSlides:10,containerModifierClass:"swiper-",slideClass:"swiper-slide",slideActiveClass:"swiper-slide-active",slideVisibleClass:"swiper-slide-visible",slideNextClass:"swiper-slide-next",slidePrevClass:"swiper-slide-prev",wrapperClass:"swiper-wrapper",lazyPreloaderClass:"swiper-lazy-preloader",lazyPreloadPrevNext:0,runCallbacksOnInit:!0,_emitClasses:!1};function ni(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}),Er(e,n)):Er(e,n)):Er(e,n)}}const ri={eventsEmitter:{on(t,e,n){const r=this;if(!r.eventsListeners||r.destroyed)return r;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(!r.eventsListeners||r.destroyed)return r;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(!n.eventsListeners||n.destroyed)return n;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.eventsListeners||e.destroyed)return e;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||n.destroyed?n: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||e.destroyed)return e;if(!e.eventsListeners)return e;let n,r,i;"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);return(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.clientWidth,n=void 0!==t.params.height&&null!==t.params.height?t.params.height:r.clientHeight,0===e&&t.isHorizontal()||0===n&&t.isVertical()||(e=e-parseInt(Cr(r,"padding-left")||0,10)-parseInt(Cr(r,"padding-right")||0,10),n=n-parseInt(Cr(r,"padding-top")||0,10)-parseInt(Cr(r,"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,slidesEl:o,size:s,rtlTranslate:a,wrongRTL:l}=t,u=t.virtual&&r.virtual.enabled,c=u?t.virtual.slides.length:t.slides.length,h=Ar(o,`.${t.params.slideClass}, swiper-slide`),d=u?t.virtual.slides.length:h.length;let p=[];const f=[],m=[];let g=r.slidesOffsetBefore;"function"==typeof g&&(g=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,x=-g,w=0,E=0;if(void 0===s)return;"string"==typeof b&&b.indexOf("%")>=0?b=parseFloat(b.replace("%",""))/100*s:"string"==typeof b&&(b=parseFloat(b)),t.virtualSize=-b,h.forEach(t=>{a?t.style.marginLeft="":t.style.marginRight="",t.style.marginBottom="",t.style.marginTop=""}),r.centeredSlides&&r.cssMode&&(Tr(i,"--swiper-centered-offset-before",""),Tr(i,"--swiper-centered-offset-after",""));const T=r.grid&&r.grid.rows>1&&t.grid;let S;T&&t.grid.initSlides(d);const A="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){let o;if(S=0,h[i]&&(o=h[i]),T&&t.grid.updateSlide(i,o,d,e),!h[i]||"none"!==Cr(o,"display")){if("auto"===r.slidesPerView){A&&(h[i].style[e("width")]="");const s=getComputedStyle(o),a=o.style.transform,l=o.style.webkitTransform;if(a&&(o.style.transform="none"),l&&(o.style.webkitTransform="none"),r.roundLengths)S=t.isHorizontal()?Ir(o,"width",!0):Ir(o,"height",!0);else{const t=n(s,"width"),e=n(s,"padding-left"),r=n(s,"padding-right"),i=n(s,"margin-left"),a=n(s,"margin-right"),l=s.getPropertyValue("box-sizing");if(l&&"border-box"===l)S=t+i+a;else{const{clientWidth:n,offsetWidth:s}=o;S=t+e+r+i+a+(s-n)}}a&&(o.style.transform=a),l&&(o.style.webkitTransform=l),r.roundLengths&&(S=Math.floor(S))}else S=(s-(r.slidesPerView-1)*b)/r.slidesPerView,r.roundLengths&&(S=Math.floor(S)),h[i]&&(h[i].style[e("width")]=S+"px");h[i]&&(h[i].swiperSlideSize=S),m.push(S),r.centeredSlides?(x=x+S/2+w/2+b,0===w&&0!==i&&(x=x-s/2-b),0===i&&(x=x-s/2-b),Math.abs(x)<.001&&(x=0),r.roundLengths&&(x=Math.floor(x)),E%r.slidesPerGroup==0&&p.push(x),f.push(x)):(r.roundLengths&&(x=Math.floor(x)),(E-Math.min(t.params.slidesPerGroupSkip,E))%t.params.slidesPerGroup==0&&p.push(x),f.push(x),x=x+S+b),t.virtualSize+=S+b,w=S,E+=1}}if(t.virtualSize=Math.max(t.virtualSize,s)+v,a&&l&&("slide"===r.effect||"coverflow"===r.effect)&&(i.style.width=t.virtualSize+b+"px"),r.setWrapperSize&&(i.style[e("width")]=t.virtualSize+b+"px"),T&&t.grid.updateWrapperSize(S,p,e),!r.centeredSlides){const e=[];for(let n=0;n<p.length;n+=1){let i=p[n];r.roundLengths&&(i=Math.floor(i)),p[n]<=t.virtualSize-s&&e.push(i)}p=e,Math.floor(t.virtualSize-s)-Math.floor(p[p.length-1])>1&&p.push(t.virtualSize-s)}if(u&&r.loop){const e=m[0]+b;if(r.slidesPerGroup>1){const n=Math.ceil((t.virtual.slidesBefore+t.virtual.slidesAfter)/r.slidesPerGroup),i=e*r.slidesPerGroup;for(let t=0;t<n;t+=1)p.push(p[p.length-1]+i)}for(let n=0;n<t.virtual.slidesBefore+t.virtual.slidesAfter;n+=1)1===r.slidesPerGroup&&p.push(p[p.length-1]+e),f.push(f[f.length-1]+e),t.virtualSize+=e}if(0===p.length&&(p=[0]),0!==b){const n=t.isHorizontal()&&a?"marginLeft":e("marginRight");h.filter((t,e)=>!(r.cssMode&&!r.loop)||e!==h.length-1).forEach(t=>{t.style[n]=b+"px"})}if(r.centeredSlides&&r.centeredSlidesBounds){let t=0;m.forEach(e=>{t+=e+(b||0)}),t-=b;const e=t-s;p=p.map(t=>t<=0?-g:t>e?e+v:t)}if(r.centerInsufficientSlides){let t=0;if(m.forEach(e=>{t+=e+(b||0)}),t-=b,t<s){const e=(s-t)/2;p.forEach((t,n)=>{p[n]=t-e}),f.forEach((t,n)=>{f[n]=t+e})}}if(Object.assign(t,{slides:h,snapGrid:p,slidesGrid:f,slidesSizesGrid:m}),r.centeredSlides&&r.cssMode&&!r.centeredSlidesBounds){Tr(i,"--swiper-centered-offset-before",-p[0]+"px"),Tr(i,"--swiper-centered-offset-after",t.size/2-m[m.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)}if(d!==c&&t.emit("slidesLengthChange"),p.length!==y&&(t.params.watchOverflow&&t.checkOverflow(),t.emit("snapGridLengthChange")),f.length!==_&&t.emit("slidesGridLengthChange"),r.watchSlidesProgress&&t.updateSlidesOffset(),!(u||r.cssMode||"slide"!==r.effect&&"fade"!==r.effect)){const e=r.containerModifierClass+"backface-hidden",n=t.el.classList.contains(e);d<=r.maxBackfaceHiddenSlides?n||t.el.classList.add(e):n&&t.el.classList.remove(e)}},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[e.getSlideIndexByData(t)]:e.slides[t];if("auto"!==e.params.slidesPerView&&e.params.slidesPerView>1)if(e.params.centeredSlides)(e.visibleSlides||[]).forEach(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||0===o)&&(e.wrapperEl.style.height=o+"px")},updateSlidesOffset:function(){const t=this,e=t.slides,n=t.isElement?t.isHorizontal()?t.wrapperEl.offsetLeft:t.wrapperEl.offsetTop:0;for(let r=0;r<e.length;r+=1)e[r].swiperSlideOffset=(t.isHorizontal()?e[r].offsetLeft:e[r].offsetTop)-n-t.cssOverflowAdjustment()},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.forEach(t=>{t.classList.remove(n.slideVisibleClass)}),e.visibleSlidesIndexes=[],e.visibleSlides=[];let a=n.spaceBetween;"string"==typeof a&&a.indexOf("%")>=0?a=parseFloat(a.replace("%",""))/100*e.size:"string"==typeof a&&(a=parseFloat(a));for(let t=0;t<r.length;t+=1){const l=r[t];let u=l.swiperSlideOffset;n.cssMode&&n.centeredSlides&&(u-=r[0].swiperSlideOffset);const c=(s+(n.centeredSlides?e.minTranslate():0)-u)/(l.swiperSlideSize+a),h=(s-o[0]+(n.centeredSlides?e.minTranslate():0)-u)/(l.swiperSlideSize+a),d=-(s-u),p=d+e.slidesSizesGrid[t];(d>=0&&d<e.size-1||p>1&&p<=e.size||d<=0&&p>=e.size)&&(e.visibleSlides.push(l),e.visibleSlidesIndexes.push(t),r[t].classList.add(n.slideVisibleClass)),l.progress=i?-c:c,l.originalProgress=i?-h:h}},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,progressLoop:a}=e;const l=o,u=s;if(0===r)i=0,o=!0,s=!0;else{i=(t-e.minTranslate())/r;const n=Math.abs(t-e.minTranslate())<1,a=Math.abs(t-e.maxTranslate())<1;o=n||i<=0,s=a||i>=1,n&&(i=0),a&&(i=1)}if(n.loop){const n=e.getSlideIndexByData(0),r=e.getSlideIndexByData(e.slides.length-1),i=e.slidesGrid[n],o=e.slidesGrid[r],s=e.slidesGrid[e.slidesGrid.length-1],l=Math.abs(t);a=l>=i?(l-i)/s:(l+s-o)/s,a>1&&(a-=1)}Object.assign(e,{progress:i,progressLoop:a,isBeginning:o,isEnd:s}),(n.watchSlidesProgress||n.centeredSlides&&n.autoHeight)&&e.updateSlidesProgress(t),o&&!l&&e.emit("reachBeginning toEdge"),s&&!u&&e.emit("reachEnd toEdge"),(l&&!o||u&&!s)&&e.emit("fromEdge"),e.emit("progress",i)},updateSlidesClasses:function(){const t=this,{slides:e,params:n,slidesEl:r,activeIndex:i}=t,o=t.virtual&&n.virtual.enabled,s=t=>Ar(r,`.${n.slideClass}${t}, swiper-slide${t}`)[0];let a;if(e.forEach(t=>{t.classList.remove(n.slideActiveClass,n.slideNextClass,n.slidePrevClass)}),o)if(n.loop){let e=i-t.virtual.slidesBefore;e<0&&(e=t.virtual.slides.length+e),e>=t.virtual.slides.length&&(e-=t.virtual.slides.length),a=s(`[data-swiper-slide-index="${e}"]`)}else a=s(`[data-swiper-slide-index="${i}"]`);else a=e[i];if(a){a.classList.add(n.slideActiveClass);let t=function(t,e){const n=[];for(;t.nextElementSibling;){const r=t.nextElementSibling;e?r.matches(e)&&n.push(r):n.push(r),t=r}return n}(a,`.${n.slideClass}, swiper-slide`)[0];n.loop&&!t&&(t=e[0]),t&&t.classList.add(n.slideNextClass);let r=function(t,e){const n=[];for(;t.previousElementSibling;){const r=t.previousElementSibling;e?r.matches(e)&&n.push(r):n.push(r),t=r}return n}(a,`.${n.slideClass}, swiper-slide`)[0];n.loop&&0===!r&&(r=e[e.length-1]),r&&r.classList.add(n.slidePrevClass)}t.emitSlidesClasses()},updateActiveIndex:function(t){const e=this,n=e.rtlTranslate?e.translate:-e.translate,{snapGrid:r,params:i,activeIndex:o,realIndex:s,snapIndex:a}=e;let l,u=t;const c=t=>{let n=t-e.virtual.slidesBefore;return n<0&&(n=e.virtual.slides.length+n),n>=e.virtual.slides.length&&(n-=e.virtual.slides.length),n};if(void 0===u&&(u=function(t){const{slidesGrid:e,params:n}=t,r=t.rtlTranslate?t.translate:-t.translate;let i;for(let t=0;t<e.length;t+=1)void 0!==e[t+1]?r>=e[t]&&r<e[t+1]-(e[t+1]-e[t])/2?i=t:r>=e[t]&&r<e[t+1]&&(i=t+1):r>=e[t]&&(i=t);return n.normalizeSlideIndex&&(i<0||void 0===i)&&(i=0),i}(e)),r.indexOf(n)>=0)l=r.indexOf(n);else{const t=Math.min(i.slidesPerGroupSkip,u);l=t+Math.floor((u-t)/i.slidesPerGroup)}if(l>=r.length&&(l=r.length-1),u===o)return l!==a&&(e.snapIndex=l,e.emit("snapIndexChange")),void(e.params.loop&&e.virtual&&e.params.virtual.enabled&&(e.realIndex=c(u)));let h;h=e.virtual&&i.virtual.enabled&&i.loop?c(u):e.slides[u]?parseInt(e.slides[u].getAttribute("data-swiper-slide-index")||u,10):u,Object.assign(e,{previousSnapIndex:a,snapIndex:l,previousRealIndex:s,realIndex:h,previousIndex:o,activeIndex:u}),e.initialized&&Hr(e),e.emit("activeIndexChange"),e.emit("snapIndexChange"),s!==h&&e.emit("realIndexChange"),(e.initialized||e.params.runCallbacksOnInit)&&e.emit("slideChange")},updateClickedSlide:function(t){const e=this,n=e.params,r=t.closest(`.${n.slideClass}, swiper-slide`);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(r.getAttribute("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=xr(i,t);return o+=this.cssOverflowAdjustment(),n&&(o=-o),o||0},setTranslate:function(t,e){const n=this,{rtlTranslate:r,params:i,wrapperEl:o,progress:s}=n;let a,l=0,u=0;n.isHorizontal()?l=r?-t:t:u=t,i.roundLengths&&(l=Math.floor(l),u=Math.floor(u)),n.previousTranslate=n.translate,n.translate=n.isHorizontal()?l:u,i.cssMode?o[n.isHorizontal()?"scrollLeft":"scrollTop"]=n.isHorizontal()?-l:-u:i.virtualTranslate||(n.isHorizontal()?l-=n.cssOverflowAdjustment():u-=n.cssOverflowAdjustment(),o.style.transform=`translate3d(${l}px, ${u}px, 0px)`);const c=n.maxTranslate()-n.minTranslate();a=0===c?0:(t-n.minTranslate())/c,a!==s&&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 Sr({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.removeEventListener("transitionend",o.onTranslateToWrapperTransitionEnd),o.onTranslateToWrapperTransitionEnd=null,delete o.onTranslateToWrapperTransitionEnd,n&&o.emit("transitionEnd"))}),o.wrapperEl.addEventListener("transitionend",o.onTranslateToWrapperTransitionEnd))),!0}},transition:{setTransition:function(t,e){const n=this;n.params.cssMode||(n.wrapperEl.style.transitionDuration=t+"ms"),n.emit("setTransition",t,e)},transitionStart:function(t=!0,e){const n=this,{params:r}=n;r.cssMode||(r.autoHeight&&n.updateAutoHeight(),jr({swiper:n,runCallbacks:t,direction:e,step:"Start"}))},transitionEnd:function(t=!0,e){const{params:n}=this;this.animating=!1,n.cssMode||(this.setTransition(0),jr({swiper:this,runCallbacks:t,direction:e,step:"End"}))}},slide:{slideTo:function(t=0,e=this.params.speed,n=!0,r,i){"string"==typeof t&&(t=parseInt(t,10));const o=this;let s=t;s<0&&(s=0);const{params:a,snapGrid:l,slidesGrid:u,previousIndex:c,activeIndex:h,rtlTranslate:d,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);const v=-l[g];if(a.normalizeSlideIndex)for(let t=0;t<u.length;t+=1){const e=-Math.floor(100*v),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!==h){if(!o.allowSlideNext&&(d?v>o.translate&&v>o.minTranslate():v<o.translate&&v<o.minTranslate()))return!1;if(!o.allowSlidePrev&&v>o.translate&&v>o.maxTranslate()&&(h||0)!==s)return!1}let y;if(s!==(c||0)&&n&&o.emit("beforeSlideChangeStart"),o.updateProgress(v),y=s>h?"next":s<h?"prev":"reset",d&&-v===o.translate||!d&&v===o.translate)return o.updateActiveIndex(s),a.autoHeight&&o.updateAutoHeight(),o.updateSlidesClasses(),"slide"!==a.effect&&o.setTranslate(v),"reset"!==y&&(o.transitionStart(n,y),o.transitionEnd(n,y)),!1;if(a.cssMode){const t=o.isHorizontal(),n=d?v:-v;if(0===e){const e=o.virtual&&o.params.virtual.enabled;e&&(o.wrapperEl.style.scrollSnapType="none",o._immediateVirtual=!0),e&&!o._cssModeVirtualInitialSet&&o.params.initialSlide>0?(o._cssModeVirtualInitialSet=!0,requestAnimationFrame(()=>{p[t?"scrollLeft":"scrollTop"]=n})):p[t?"scrollLeft":"scrollTop"]=n,e&&requestAnimationFrame(()=>{o.wrapperEl.style.scrollSnapType="",o._immediateVirtual=!1})}else{if(!o.support.smoothScroll)return Sr({swiper:o,targetPosition:n,side:t?"left":"top"}),!0;p.scrollTo({[t?"left":"top"]:n,behavior:"smooth"})}return!0}return o.setTransition(e),o.setTranslate(v),o.updateActiveIndex(s),o.updateSlidesClasses(),o.emit("beforeTransitionStart",e,r),o.transitionStart(n,y),0===e?o.transitionEnd(n,y):o.animating||(o.animating=!0,o.onSlideToWrapperTransitionEnd||(o.onSlideToWrapperTransitionEnd=function(t){o&&!o.destroyed&&t.target===this&&(o.wrapperEl.removeEventListener("transitionend",o.onSlideToWrapperTransitionEnd),o.onSlideToWrapperTransitionEnd=null,delete o.onSlideToWrapperTransitionEnd,o.transitionEnd(n,y))}),o.wrapperEl.addEventListener("transitionend",o.onSlideToWrapperTransitionEnd)),!0},slideToLoop:function(t=0,e=this.params.speed,n=!0,r){if("string"==typeof t){t=parseInt(t,10)}const i=this;let o=t;return i.params.loop&&(i.virtual&&i.params.virtual.enabled?o+=i.virtual.slidesBefore:o=i.getSlideIndexByData(o)),i.slideTo(o,e,n,r)},slideNext:function(t=this.params.speed,e=!0,n){const r=this,{enabled:i,params:o,animating:s}=r;if(!i)return r;let a=o.slidesPerGroup;"auto"===o.slidesPerView&&1===o.slidesPerGroup&&o.slidesPerGroupAuto&&(a=Math.max(r.slidesPerViewDynamic("current",!0),1));const l=r.activeIndex<o.slidesPerGroupSkip?1:a,u=r.virtual&&o.virtual.enabled;if(o.loop){if(s&&!u&&o.loopPreventsSliding)return!1;r.loopFix({direction:"next"}),r._clientLeft=r.wrapperEl.clientLeft}return o.rewind&&r.isEnd?r.slideTo(0,t,e,n):r.slideTo(r.activeIndex+l,t,e,n)},slidePrev:function(t=this.params.speed,e=!0,n){const r=this,{params:i,snapGrid:o,slidesGrid:s,rtlTranslate:a,enabled:l,animating:u}=r;if(!l)return r;const c=r.virtual&&i.virtual.enabled;if(i.loop){if(u&&!c&&i.loopPreventsSliding)return!1;r.loopFix({direction:"prev"}),r._clientLeft=r.wrapperEl.clientLeft}function h(t){return t<0?-Math.floor(Math.abs(t)):Math.floor(t)}const d=h(a?r.translate:-r.translate),p=o.map(t=>h(t));let f=o[p.indexOf(d)-1];if(void 0===f&&i.cssMode){let t;o.forEach((e,n)=>{d>=e&&(t=n)}),void 0!==t&&(f=o[t>0?t-1:t])}let m=0;if(void 0!==f&&(m=s.indexOf(f),m<0&&(m=r.activeIndex-1),"auto"===i.slidesPerView&&1===i.slidesPerGroup&&i.slidesPerGroupAuto&&(m=m-r.slidesPerViewDynamic("previous",!0)+1,m=Math.max(m,0))),i.rewind&&r.isBeginning){const i=r.params.virtual&&r.params.virtual.enabled&&r.virtual?r.virtual.slides.length-1:r.slides.length-1;return r.slideTo(i,t,e,n)}return r.slideTo(m,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,slidesEl:n}=t,r="auto"===e.slidesPerView?t.slidesPerViewDynamic():e.slidesPerView;let i,o=t.clickedIndex;const s=t.isElement?"swiper-slide":"."+e.slideClass;if(e.loop){if(t.animating)return;i=parseInt(t.clickedSlide.getAttribute("data-swiper-slide-index"),10),e.centeredSlides?o<t.loopedSlides-r/2||o>t.slides.length-t.loopedSlides+r/2?(t.loopFix(),o=t.getSlideIndex(Ar(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),_r(()=>{t.slideTo(o)})):t.slideTo(o):o>t.slides.length-r?(t.loopFix(),o=t.getSlideIndex(Ar(n,`${s}[data-swiper-slide-index="${i}"]`)[0]),_r(()=>{t.slideTo(o)})):t.slideTo(o)}else t.slideTo(o)}},loop:{loopCreate:function(t){const{params:e,slidesEl:n}=this;if(!e.loop||this.virtual&&this.params.virtual.enabled)return;Ar(n,`.${e.slideClass}, swiper-slide`).forEach((t,e)=>{t.setAttribute("data-swiper-slide-index",e)}),this.loopFix({slideRealIndex:t,direction:e.centeredSlides?void 0:"next"})},loopFix:function({slideRealIndex:t,slideTo:e=!0,direction:n,setTranslate:r,activeSlideIndex:i,byController:o,byMousewheel:s}={}){const a=this;if(!a.params.loop)return;a.emit("beforeLoopFix");const{slides:l,allowSlidePrev:u,allowSlideNext:c,slidesEl:h,params:d}=a;if(a.allowSlidePrev=!0,a.allowSlideNext=!0,a.virtual&&d.virtual.enabled)return e&&(d.centeredSlides||0!==a.snapIndex?d.centeredSlides&&a.snapIndex<d.slidesPerView?a.slideTo(a.virtual.slides.length+a.snapIndex,0,!1,!0):a.snapIndex===a.snapGrid.length-1&&a.slideTo(a.virtual.slidesBefore,0,!1,!0):a.slideTo(a.virtual.slides.length,0,!1,!0)),a.allowSlidePrev=u,a.allowSlideNext=c,void a.emit("loopFix");const p="auto"===d.slidesPerView?a.slidesPerViewDynamic():Math.ceil(parseFloat(d.slidesPerView,10));let f=d.loopedSlides||p;f%d.slidesPerGroup!=0&&(f+=d.slidesPerGroup-f%d.slidesPerGroup),a.loopedSlides=f;const m=[],g=[];let v=a.activeIndex;void 0===i?i=a.getSlideIndex(a.slides.filter(t=>t.classList.contains(d.slideActiveClass))[0]):v=i;const y="next"===n||!n,_="prev"===n||!n;let b=0,x=0;if(i<f){b=Math.max(f-i,d.slidesPerGroup);for(let t=0;t<f-i;t+=1){const e=t-Math.floor(t/l.length)*l.length;m.push(l.length-e-1)}}else if(i>a.slides.length-2*f){x=Math.max(i-(a.slides.length-2*f),d.slidesPerGroup);for(let t=0;t<x;t+=1){const e=t-Math.floor(t/l.length)*l.length;g.push(e)}}if(_&&m.forEach(t=>{a.slides[t].swiperLoopMoveDOM=!0,h.prepend(a.slides[t]),a.slides[t].swiperLoopMoveDOM=!1}),y&&g.forEach(t=>{a.slides[t].swiperLoopMoveDOM=!0,h.append(a.slides[t]),a.slides[t].swiperLoopMoveDOM=!1}),a.recalcSlides(),"auto"===d.slidesPerView&&a.updateSlides(),d.watchSlidesProgress&&a.updateSlidesOffset(),e)if(m.length>0&&_)if(void 0===t){const t=a.slidesGrid[v],e=a.slidesGrid[v+b]-t;s?a.setTranslate(a.translate-e):(a.slideTo(v+b,0,!1,!0),r&&(a.touches[a.isHorizontal()?"startX":"startY"]+=e))}else r&&a.slideToLoop(t,0,!1,!0);else if(g.length>0&&y)if(void 0===t){const t=a.slidesGrid[v],e=a.slidesGrid[v-x]-t;s?a.setTranslate(a.translate-e):(a.slideTo(v-x,0,!1,!0),r&&(a.touches[a.isHorizontal()?"startX":"startY"]+=e))}else a.slideToLoop(t,0,!1,!0);if(a.allowSlidePrev=u,a.allowSlideNext=c,a.controller&&a.controller.control&&!o){const e={slideRealIndex:t,slideTo:!1,direction:n,setTranslate:r,activeSlideIndex:i,byController:!0};Array.isArray(a.controller.control)?a.controller.control.forEach(t=>{!t.destroyed&&t.params.loop&&t.loopFix(e)}):a.controller.control instanceof a.constructor&&a.controller.control.params.loop&&a.controller.control.loopFix(e)}a.emit("loopFix")},loopDestroy:function(){const{params:t,slidesEl:e}=this;if(!t.loop||this.virtual&&this.params.virtual.enabled)return;this.recalcSlides();const n=[];this.slides.forEach(t=>{const e=void 0===t.swiperSlideIndex?1*t.getAttribute("data-swiper-slide-index"):t.swiperSlideIndex;n[e]=t}),this.slides.forEach(t=>{t.removeAttribute("data-swiper-slide-index")}),n.forEach(t=>{e.append(t)}),this.recalcSlides(),this.slideTo(this.realIndex,0)}},grabCursor:{setGrabCursor:function(t){const e=this;if(!e.params.simulateTouch||e.params.watchOverflow&&e.isLocked||e.params.cssMode)return;const n="container"===e.params.touchEventsTarget?e.el:e.wrapperEl;e.isElement&&(e.__preventObserver__=!0),n.style.cursor="move",n.style.cursor=t?"grabbing":"grab",e.isElement&&requestAnimationFrame(()=>{e.__preventObserver__=!1})},unsetGrabCursor:function(){const t=this;t.params.watchOverflow&&t.isLocked||t.params.cssMode||(t.isElement&&(t.__preventObserver__=!0),t["container"===t.params.touchEventsTarget?"el":"wrapperEl"].style.cursor="",t.isElement&&requestAnimationFrame(()=>{t.__preventObserver__=!1}))}},events:{attachEvents:function(){const t=this,e=gr(),{params:n}=t;t.onTouchStart=Vr.bind(t),t.onTouchMove=Xr.bind(t),t.onTouchEnd=Wr.bind(t),n.cssMode&&(t.onScroll=$r.bind(t)),t.onClick=qr.bind(t),t.onLoad=Kr.bind(t),Zr||(e.addEventListener("touchstart",Jr),Zr=!0),Qr(t,"on")},detachEvents:function(){Qr(this,"off")}},breakpoints:{setBreakpoint:function(){const t=this,{realIndex:e,initialized:n,params:r,el:i}=t,o=r.breakpoints;if(!o||o&&0===Object.keys(o).length)return;const s=t.getBreakpoint(o,t.params.breakpointsBase,t.el);if(!s||t.currentBreakpoint===s)return;const a=(s in o?o[s]:void 0)||t.originalParams,l=ti(t,r),u=ti(t,a),c=r.enabled;l&&!u?(i.classList.remove(r.containerModifierClass+"grid",r.containerModifierClass+"grid-column"),t.emitContainerClasses()):!l&&u&&(i.classList.add(r.containerModifierClass+"grid"),(a.grid.fill&&"column"===a.grid.fill||!a.grid.fill&&"column"===r.grid.fill)&&i.classList.add(r.containerModifierClass+"grid-column"),t.emitContainerClasses()),["navigation","pagination","scrollbar"].forEach(e=>{if(void 0===a[e])return;const n=r[e]&&r[e].enabled,i=a[e]&&a[e].enabled;n&&!i&&t[e].disable(),!n&&i&&t[e].enable()});const h=a.direction&&a.direction!==r.direction,d=r.loop&&(a.slidesPerView!==r.slidesPerView||h);h&&n&&t.changeDirection(),Er(t.params,a);const p=t.params.enabled;Object.assign(t,{allowTouchMove:t.params.allowTouchMove,allowSlideNext:t.params.allowSlideNext,allowSlidePrev:t.params.allowSlidePrev}),c&&!p?t.disable():!c&&p&&t.enable(),t.currentBreakpoint=s,t.emit("_beforeBreakpoint",a),d&&n&&(t.loopDestroy(),t.loopCreate(e),t.updateSlides()),t.emit("breakpoint",a)},getBreakpoint:function(t,e="window",n){if(!t||"container"===e&&!n)return;let r=!1;const i=yr(),o="window"===e?i.innerHeight:n.clientHeight,s=Object.keys(t).map(t=>{if("string"==typeof t&&0===t.indexOf("@")){const e=parseFloat(t.substr(1));return{value:o*e,point:t}}return{value:t,point:t}});s.sort((t,e)=>parseInt(t.value,10)-parseInt(e.value,10));for(let t=0;t<s.length;t+=1){const{point:o,value:a}=s[t];"window"===e?i.matchMedia(`(min-width: ${a}px)`).matches&&(r=o):a<=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{classNames:t,params:e,rtl:n,el:r,device:i}=this,o=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",e.direction,{"free-mode":this.params.freeMode&&e.freeMode.enabled},{autoheight:e.autoHeight},{rtl:n},{grid:e.grid&&e.grid.rows>1},{"grid-column":e.grid&&e.grid.rows>1&&"column"===e.grid.fill},{android:i.android},{ios:i.ios},{"css-mode":e.cssMode},{centered:e.cssMode&&e.centeredSlides},{"watch-progress":e.watchSlidesProgress}],e.containerModifierClass);t.push(...o),r.classList.add(...t),this.emitContainerClasses()},removeClasses:function(){const{el:t,classNames:e}=this;t.classList.remove(...e),this.emitContainerClasses()}}},ii={};class oi{constructor(...t){let e,n;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=Er({},n),e&&!n.el&&(n.el=e);const r=gr();if(n.el&&"string"==typeof n.el&&r.querySelectorAll(n.el).length>1){const t=[];return r.querySelectorAll(n.el).forEach(e=>{const r=Er({},n,{el:e});t.push(new oi(r))}),t}const i=this;i.__swiper__=!0,i.support=kr(),i.device=Ur({userAgent:n.userAgent}),i.browser=Br(),i.eventsListeners={},i.eventsAnyListeners=[],i.modules=[...i.__modules__],n.modules&&Array.isArray(n.modules)&&i.modules.push(...n.modules);const o={};i.modules.forEach(t=>{t({params:n,swiper:i,extendParams:ni(n,o),on:i.on.bind(i),once:i.once.bind(i),off:i.off.bind(i),emit:i.emit.bind(i)})});const s=Er({},ei,o);return i.params=Er({},s,ii,n),i.originalParams=Er({},i.params),i.passedParams=Er({},n),i.params&&i.params.on&&Object.keys(i.params.on).forEach(t=>{i.on(t,i.params.on[t])}),i.params&&i.params.onAny&&i.onAny(i.params.onAny),Object.assign(i,{enabled:i.params.enabled,el:e,classNames:[],slides:[],slidesGrid:[],snapGrid:[],slidesSizesGrid:[],isHorizontal:()=>"horizontal"===i.params.direction,isVertical:()=>"vertical"===i.params.direction,activeIndex:0,realIndex:0,isBeginning:!0,isEnd:!1,translate:0,previousTranslate:0,progress:0,velocity:0,animating:!1,cssOverflowAdjustment(){return Math.trunc(this.translate/2**23)*2**23},allowSlideNext:i.params.allowSlideNext,allowSlidePrev:i.params.allowSlidePrev,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:i.params.focusableElements,lastClickTime:0,clickTimeout:void 0,velocities:[],allowMomentumBounce:void 0,startMoving:void 0,evCache:[]},allowClick:!0,allowTouchMove:i.params.allowTouchMove,touches:{startX:0,startY:0,currentX:0,currentY:0,diff:0},imagesToLoad:[],imagesLoaded:0}),i.emit("_swiper"),i.params.init&&i.init(),i}getSlideIndex(t){const{slidesEl:e,params:n}=this,r=Rr(Ar(e,`.${n.slideClass}, swiper-slide`)[0]);return Rr(t)-r}getSlideIndexByData(t){return this.getSlideIndex(this.slides.filter(e=>1*e.getAttribute("data-swiper-slide-index")===t)[0])}recalcSlides(){const{slidesEl:t,params:e}=this;this.slides=Ar(t,`.${e.slideClass}, swiper-slide`)}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){t=Math.min(Math.max(t,0),1);const n=this.minTranslate(),r=(this.maxTranslate()-n)*t+n;this.translateTo(r,void 0===e?0:e),this.updateActiveIndex(),this.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 e.destroyed?"":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.forEach(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]?r[a].swiperSlideSize:0;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;if(n.breakpoints&&t.setBreakpoint(),[...t.el.querySelectorAll('[loading="lazy"]')].forEach(e=>{e.complete&&Gr(t,e)}),t.updateSize(),t.updateSlides(),t.updateProgress(),t.updateSlidesClasses(),n.freeMode&&n.freeMode.enabled&&!n.cssMode)r(),n.autoHeight&&t.updateAutoHeight();else{if(("auto"===n.slidesPerView||n.slidesPerView>1)&&t.isEnd&&!n.centeredSlides){const e=t.virtual&&n.virtual.enabled?t.virtual.slides:t.slides;i=t.slideTo(e.length-1,0,!1,!0)}else i=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.classList.remove(`${n.params.containerModifierClass}${r}`),n.el.classList.add(`${n.params.containerModifierClass}${t}`),n.emitContainerClasses(),n.params.direction=t,n.slides.forEach(e=>{"vertical"===t?e.style.width="":e.style.height=""}),n.emit("changeDirection"),e&&n.update()),n}changeLanguageDirection(t){const e=this;e.rtl&&"rtl"===t||!e.rtl&&"ltr"===t||(e.rtl="rtl"===t,e.rtlTranslate="horizontal"===e.params.direction&&e.rtl,e.rtl?(e.el.classList.add(e.params.containerModifierClass+"rtl"),e.el.dir="rtl"):(e.el.classList.remove(e.params.containerModifierClass+"rtl"),e.el.dir="ltr"),e.update())}mount(t){const e=this;if(e.mounted)return!0;let n=t||e.params.el;if("string"==typeof n&&(n=document.querySelector(n)),!n)return!1;n.swiper=e,n.shadowEl&&(e.isElement=!0);const r=()=>"."+(e.params.wrapperClass||"").trim().split(" ").join(".");let i=(()=>{if(n&&n.shadowRoot&&n.shadowRoot.querySelector){return n.shadowRoot.querySelector(r())}return Ar(n,r())[0]})();return!i&&e.params.createElements&&(i=Mr("div",e.params.wrapperClass),n.append(i),Ar(n,"."+e.params.slideClass).forEach(t=>{i.append(t)})),Object.assign(e,{el:n,wrapperEl:i,slidesEl:e.isElement?n:i,mounted:!0,rtl:"rtl"===n.dir.toLowerCase()||"rtl"===Cr(n,"direction"),rtlTranslate:"horizontal"===e.params.direction&&("rtl"===n.dir.toLowerCase()||"rtl"===Cr(n,"direction")),wrongRTL:"-webkit-box"===Cr(i,"display")}),!0}init(t){const e=this;if(e.initialized)return e;return!1===e.mount(t)||(e.emit("beforeInit"),e.params.breakpoints&&e.setBreakpoint(),e.addClasses(),e.updateSize(),e.updateSlides(),e.params.watchOverflow&&e.checkOverflow(),e.params.grabCursor&&e.enabled&&e.setGrabCursor(),e.params.loop&&e.virtual&&e.params.virtual.enabled?e.slideTo(e.params.initialSlide+e.virtual.slidesBefore,0,e.params.runCallbacksOnInit,!1,!0):e.slideTo(e.params.initialSlide,0,e.params.runCallbacksOnInit,!1,!0),e.params.loop&&e.loopCreate(),e.attachEvents(),[...e.el.querySelectorAll('[loading="lazy"]')].forEach(t=>{t.complete?Gr(e,t):t.addEventListener("load",t=>{Gr(e,t.target)})}),Hr(e),e.initialized=!0,Hr(e),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.removeAttribute("style"),o.removeAttribute("style"),s&&s.length&&s.forEach(t=>{t.classList.remove(r.slideVisibleClass,r.slideActiveClass,r.slideNextClass,r.slidePrevClass),t.removeAttribute("style"),t.removeAttribute("data-swiper-slide-index")})),n.emit("destroy"),Object.keys(n.eventsListeners).forEach(t=>{n.off(t)}),!1!==t&&(n.el.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){Er(ii,t)}static get extendedDefaults(){return ii}static get defaults(){return ei}static installModule(t){oi.prototype.__modules__||(oi.prototype.__modules__=[]);const e=oi.prototype.__modules__;"function"==typeof t&&e.indexOf(t)<0&&e.push(t)}static use(t){return Array.isArray(t)?(t.forEach(t=>oi.installModule(t)),oi):(oi.installModule(t),oi)}}Object.keys(ri).forEach(t=>{Object.keys(ri[t]).forEach(e=>{oi.prototype[e]=ri[t][e]})}),oi.use([function({swiper:t,on:e,emit:n}){const r=yr();let i=null,o=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=>{o=r.requestAnimationFrame(()=>{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",()=>{o&&r.cancelAnimationFrame(o),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=[],o=yr(),s=(e,n={})=>{const s=new(o.MutationObserver||o.WebkitMutationObserver)(e=>{if(t.__preventObserver__)return;if(1===e.length)return void r("observerUpdate",e[0]);const n=function(){r("observerUpdate",e[0])};o.requestAnimationFrame?o.requestAnimationFrame(n):o.setTimeout(n,0)});s.observe(e,{attributes:void 0===n.attributes||n.attributes,childList:void 0===n.childList||n.childList,characterData:void 0===n.characterData||n.characterData}),i.push(s)};e({observer:!1,observeParents:!1,observeSlideChildren:!1}),n("init",()=>{if(t.params.observer){if(t.params.observeParents){const e=Or(t.el);for(let t=0;t<e.length;t+=1)s(e[t])}s(t.el,{childList:t.params.observeSlideChildren}),s(t.wrapperEl,{attributes:!1})}}),n("destroy",()=>{i.forEach(t=>{t.disconnect()}),i.splice(0,i.length)})}]);var si=oi;function ai({swiper:t,extendParams:e,on:n,emit:r}){const i=yr();let o;e({mousewheel:{enabled:!1,releaseOnEdges:!1,invert:!1,forceToAxis:!1,sensitivity:1,eventsTarget:"container",thresholdDelta:null,thresholdTime:null,noMousewheelClass:"swiper-no-mousewheel"}}),t.mousewheel={enabled:!1};let s,a=br();const l=[];function u(){t.enabled&&(t.mouseEntered=!0)}function c(){t.enabled&&(t.mouseEntered=!1)}function h(e){return!(t.params.mousewheel.thresholdDelta&&e.delta<t.params.mousewheel.thresholdDelta)&&(!(t.params.mousewheel.thresholdTime&&br()-a<t.params.mousewheel.thresholdTime)&&(e.delta>=6&&br()-a<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)),a=(new i.Date).getTime(),!1)))}function d(e){let n=e,i=!0;if(!t.enabled)return;if(e.target.closest("."+t.params.mousewheel.noMousewheelClass))return;const a=t.params.mousewheel;t.params.cssMode&&n.preventDefault();let u=t.el;"container"!==t.params.mousewheel.eventsTarget&&(u=document.querySelector(t.params.mousewheel.eventsTarget));const c=u&&u.contains(n.target);if(!t.mouseEntered&&!c&&!a.releaseOnEdges)return!0;n.originalEvent&&(n=n.originalEvent);let d=0;const p=t.rtlTranslate?-1:1,f=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(a.forceToAxis)if(t.isHorizontal()){if(!(Math.abs(f.pixelX)>Math.abs(f.pixelY)))return!0;d=-f.pixelX*p}else{if(!(Math.abs(f.pixelY)>Math.abs(f.pixelX)))return!0;d=-f.pixelY}else d=Math.abs(f.pixelX)>Math.abs(f.pixelY)?-f.pixelX*p:-f.pixelY;if(0===d)return!0;a.invert&&(d=-d);let m=t.getTranslate()+d*a.sensitivity;if(m>=t.minTranslate()&&(m=t.minTranslate()),m<=t.maxTranslate()&&(m=t.maxTranslate()),i=!!t.params.loop||!(m===t.minTranslate()||m===t.maxTranslate()),i&&t.params.nested&&n.stopPropagation(),t.params.freeMode&&t.params.freeMode.enabled){const e={time:br(),delta:Math.abs(d),direction:Math.sign(d)},i=s&&e.time<s.time+500&&e.delta<=s.delta&&e.direction===s.direction;if(!i){s=void 0;let u=t.getTranslate()+d*a.sensitivity;const c=t.isBeginning,h=t.isEnd;if(u>=t.minTranslate()&&(u=t.minTranslate()),u<=t.maxTranslate()&&(u=t.maxTranslate()),t.setTransition(0),t.setTranslate(u),t.updateProgress(),t.updateActiveIndex(),t.updateSlidesClasses(),(!c&&t.isBeginning||!h&&t.isEnd)&&t.updateSlidesClasses(),t.params.loop&&t.loopFix({direction:e.direction<0?"next":"prev",byMousewheel:!0}),t.params.freeMode.sticky){clearTimeout(o),o=void 0,l.length>=15&&l.shift();const n=l.length?l[l.length-1]:void 0,r=l[0];if(l.push(e),n&&(e.delta>n.delta||e.direction!==n.direction))l.splice(0);else if(l.length>=15&&e.time-r.time<500&&r.delta-e.delta>=1&&e.delta<=6){const n=d>0?.8:.2;s=e,l.splice(0),o=_r(()=>{t.slideToClosest(t.params.speed,!0,void 0,n)},0)}o||(o=_r(()=>{s=e,l.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(),u===t.minTranslate()||u===t.maxTranslate())return!0}}else{const n={time:br(),delta:Math.abs(d),direction:Math.sign(d),raw:e};l.length>=2&&l.shift();const r=l.length?l[l.length-1]:void 0;if(l.push(n),r?(n.direction!==r.direction||n.delta>r.delta||n.time>r.time+150)&&h(n):h(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 p(e){let n=t.el;"container"!==t.params.mousewheel.eventsTarget&&(n=document.querySelector(t.params.mousewheel.eventsTarget)),n[e]("mouseenter",u),n[e]("mouseleave",c),n[e]("wheel",d)}function f(){return t.params.cssMode?(t.wrapperEl.removeEventListener("wheel",d),!0):!t.mousewheel.enabled&&(p("addEventListener"),t.mousewheel.enabled=!0,!0)}function m(){return t.params.cssMode?(t.wrapperEl.addEventListener(event,d),!0):!!t.mousewheel.enabled&&(p("removeEventListener"),t.mousewheel.enabled=!1,!0)}n("init",()=>{!t.params.mousewheel.enabled&&t.params.cssMode&&m(),t.params.mousewheel.enabled&&f()}),n("destroy",()=>{t.params.cssMode&&f(),t.mousewheel.enabled&&m()}),Object.assign(t.mousewheel,{enable:f,disable:m})}function li(t,e,n,r){return t.params.createElements&&Object.keys(r).forEach(i=>{if(!n[i]&&!0===n.auto){let o=Ar(t.el,"."+r[i])[0];o||(o=Mr("div",r[i]),o.className=r[i],t.el.append(o)),n[i]=o,e[i]=o}}),n}function ui({swiper:t,extendParams:e,on:n,emit:r}){e({navigation:{nextEl:null,prevEl:null,hideOnClick:!1,disabledClass:"swiper-button-disabled",hiddenClass:"swiper-button-hidden",lockClass:"swiper-button-lock",navigationDisabledClass:"swiper-navigation-disabled"}}),t.navigation={nextEl:null,prevEl:null};const i=t=>(Array.isArray(t)||(t=[t].filter(t=>!!t)),t);function o(e){let n;return e&&"string"==typeof e&&t.isElement&&(n=t.el.shadowRoot.querySelector(e),n)?n:(e&&("string"==typeof e&&(n=[...document.querySelectorAll(e)]),t.params.uniqueNavElements&&"string"==typeof e&&n.length>1&&1===t.el.querySelectorAll(e).length&&(n=t.el.querySelector(e))),e&&!n?e:n)}function s(e,n){const r=t.params.navigation;(e=i(e)).forEach(e=>{e&&(e.classList[n?"add":"remove"](...r.disabledClass.split(" ")),"BUTTON"===e.tagName&&(e.disabled=n),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](r.lockClass))})}function a(){const{nextEl:e,prevEl:n}=t.navigation;if(t.params.loop)return s(n,!1),void s(e,!1);s(n,t.isBeginning&&!t.params.rewind),s(e,t.isEnd&&!t.params.rewind)}function l(e){e.preventDefault(),(!t.isBeginning||t.params.loop||t.params.rewind)&&(t.slidePrev(),r("navigationPrev"))}function u(e){e.preventDefault(),(!t.isEnd||t.params.loop||t.params.rewind)&&(t.slideNext(),r("navigationNext"))}function c(){const e=t.params.navigation;if(t.params.navigation=li(t,t.originalParams.navigation,t.params.navigation,{nextEl:"swiper-button-next",prevEl:"swiper-button-prev"}),!e.nextEl&&!e.prevEl)return;let n=o(e.nextEl),r=o(e.prevEl);Object.assign(t.navigation,{nextEl:n,prevEl:r}),n=i(n),r=i(r);const s=(n,r)=>{n&&n.addEventListener("click","next"===r?u:l),!t.enabled&&n&&n.classList.add(...e.lockClass.split(" "))};n.forEach(t=>s(t,"next")),r.forEach(t=>s(t,"prev"))}function h(){let{nextEl:e,prevEl:n}=t.navigation;e=i(e),n=i(n);const r=(e,n)=>{e.removeEventListener("click","next"===n?u:l),e.classList.remove(...t.params.navigation.disabledClass.split(" "))};e.forEach(t=>r(t,"next")),n.forEach(t=>r(t,"prev"))}n("init",()=>{!1===t.params.navigation.enabled?d():(c(),a())}),n("toEdge fromEdge lock unlock",()=>{a()}),n("destroy",()=>{h()}),n("enable disable",()=>{let{nextEl:e,prevEl:n}=t.navigation;e=i(e),n=i(n),[...e,...n].filter(t=>!!t).forEach(e=>e.classList[t.enabled?"remove":"add"](t.params.navigation.lockClass))}),n("click",(e,n)=>{let{nextEl:o,prevEl:s}=t.navigation;o=i(o),s=i(s);const a=n.target;if(t.params.navigation.hideOnClick&&!s.includes(a)&&!o.includes(a)){if(t.pagination&&t.params.pagination&&t.params.pagination.clickable&&(t.pagination.el===a||t.pagination.el.contains(a)))return;let e;o.length?e=o[0].classList.contains(t.params.navigation.hiddenClass):s.length&&(e=s[0].classList.contains(t.params.navigation.hiddenClass)),r(!0===e?"navigationShow":"navigationHide"),[...o,...s].filter(t=>!!t).forEach(e=>e.classList.toggle(t.params.navigation.hiddenClass))}});const d=()=>{t.el.classList.add(...t.params.navigation.navigationDisabledClass.split(" ")),h()};Object.assign(t.navigation,{enable:()=>{t.el.classList.remove(...t.params.navigation.navigationDisabledClass.split(" ")),c(),a()},disable:d,update:a,init:c,destroy:h})}function ci(t=""){return"."+t.trim().replace(/([\.:!+\/])/g,"\\$1").replace(/ /g,".")}function hi({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",paginationDisabledClass:i+"-disabled"}}),t.pagination={el:null,bullets:[]};let s=0;const a=t=>(Array.isArray(t)||(t=[t].filter(t=>!!t)),t);function l(){return!t.params.pagination.el||!t.pagination.el||Array.isArray(t.pagination.el)&&0===t.pagination.el.length}function u(e,n){const{bulletActiveClass:r}=t.params.pagination;e&&(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&(e.classList.add(`${r}-${n}`),(e=e[("prev"===n?"previous":"next")+"ElementSibling"])&&e.classList.add(`${r}-${n}-${n}`))}function c(e){const n=e.target.closest(ci(t.params.pagination.bulletClass));if(!n)return;e.preventDefault();const r=Rr(n)*t.params.slidesPerGroup;if(t.params.loop){if(t.realIndex===r)return;const e=t.getSlideIndexByData(r),n=t.getSlideIndexByData(t.realIndex);e>t.slides.length-t.loopedSlides&&t.loopFix({direction:e>n?"next":"prev",activeSlideIndex:e,slideTo:!1}),t.slideToLoop(r)}else t.slideTo(r)}function h(){const e=t.rtl,n=t.params.pagination;if(l())return;let i,c,h=t.pagination.el;h=a(h);const d=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length,p=t.params.loop?Math.ceil(d/t.params.slidesPerGroup):t.snapGrid.length;if(t.params.loop?(c=t.previousRealIndex||0,i=t.params.slidesPerGroup>1?Math.floor(t.realIndex/t.params.slidesPerGroup):t.realIndex):void 0!==t.snapIndex?(i=t.snapIndex,c=t.previousSnapIndex):(c=t.previousIndex||0,i=t.activeIndex||0),"bullets"===n.type&&t.pagination.bullets&&t.pagination.bullets.length>0){const r=t.pagination.bullets;let a,l,d;if(n.dynamicBullets&&(o=Ir(r[0],t.isHorizontal()?"width":"height",!0),h.forEach(e=>{e.style[t.isHorizontal()?"width":"height"]=o*(n.dynamicMainBullets+4)+"px"}),n.dynamicMainBullets>1&&void 0!==c&&(s+=i-(c||0),s>n.dynamicMainBullets-1?s=n.dynamicMainBullets-1:s<0&&(s=0)),a=Math.max(i-s,0),l=a+(Math.min(r.length,n.dynamicMainBullets)-1),d=(l+a)/2),r.forEach(t=>{const e=[...["","-next","-next-next","-prev","-prev-prev","-main"].map(t=>`${n.bulletActiveClass}${t}`)].map(t=>"string"==typeof t&&t.includes(" ")?t.split(" "):t).flat();t.classList.remove(...e)}),h.length>1)r.forEach(e=>{const r=Rr(e);r===i?e.classList.add(...n.bulletActiveClass.split(" ")):t.isElement&&e.setAttribute("part","bullet"),n.dynamicBullets&&(r>=a&&r<=l&&e.classList.add(...(n.bulletActiveClass+"-main").split(" ")),r===a&&u(e,"prev"),r===l&&u(e,"next"))});else{const e=r[i];if(e&&e.classList.add(...n.bulletActiveClass.split(" ")),t.isElement&&r.forEach((t,e)=>{t.setAttribute("part",e===i?"bullet-active":"bullet")}),n.dynamicBullets){const t=r[a],e=r[l];for(let t=a;t<=l;t+=1)r[t]&&r[t].classList.add(...(n.bulletActiveClass+"-main").split(" "));u(t,"prev"),u(e,"next")}}if(n.dynamicBullets){const i=Math.min(r.length,n.dynamicMainBullets+4),s=(o*i-o)/2-d*o,a=e?"right":"left";r.forEach(e=>{e.style[t.isHorizontal()?a:"top"]=s+"px"})}}h.forEach((e,o)=>{if("fraction"===n.type&&(e.querySelectorAll(ci(n.currentClass)).forEach(t=>{t.textContent=n.formatFractionCurrent(i+1)}),e.querySelectorAll(ci(n.totalClass)).forEach(t=>{t.textContent=n.formatFractionTotal(p)})),"progressbar"===n.type){let r;r=n.progressbarOpposite?t.isHorizontal()?"vertical":"horizontal":t.isHorizontal()?"horizontal":"vertical";const o=(i+1)/p;let s=1,a=1;"horizontal"===r?s=o:a=o,e.querySelectorAll(ci(n.progressbarFillClass)).forEach(e=>{e.style.transform=`translate3d(0,0,0) scaleX(${s}) scaleY(${a})`,e.style.transitionDuration=t.params.speed+"ms"})}"custom"===n.type&&n.renderCustom?(e.innerHTML=n.renderCustom(t,i+1,p),0===o&&r("paginationRender",e)):(0===o&&r("paginationRender",e),r("paginationUpdate",e)),t.params.watchOverflow&&t.enabled&&e.classList[t.isLocked?"add":"remove"](n.lockClass)})}function d(){const e=t.params.pagination;if(l())return;const n=t.virtual&&t.params.virtual.enabled?t.virtual.slides.length:t.slides.length;let i=t.pagination.el;i=a(i);let o="";if("bullets"===e.type){let r=t.params.loop?Math.ceil(n/t.params.slidesPerGroup):t.snapGrid.length;t.params.freeMode&&t.params.freeMode.enabled&&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} ${t.isElement?'part="bullet"':""} class="${e.bulletClass}"></${e.bulletElement}>`}"fraction"===e.type&&(o=e.renderFraction?e.renderFraction.call(t,e.currentClass,e.totalClass):`<span class="${e.currentClass}"></span> / <span class="${e.totalClass}"></span>`),"progressbar"===e.type&&(o=e.renderProgressbar?e.renderProgressbar.call(t,e.progressbarFillClass):`<span class="${e.progressbarFillClass}"></span>`),t.pagination.bullets=[],i.forEach(n=>{"custom"!==e.type&&(n.innerHTML=o||""),"bullets"===e.type&&t.pagination.bullets.push(...n.querySelectorAll(ci(e.bulletClass)))}),"custom"!==e.type&&r("paginationRender",i[0])}function p(){t.params.pagination=li(t,t.originalParams.pagination,t.params.pagination,{el:"swiper-pagination"});const e=t.params.pagination;if(!e.el)return;let n;"string"==typeof e.el&&t.isElement&&(n=t.el.shadowRoot.querySelector(e.el)),n||"string"!=typeof e.el||(n=[...document.querySelectorAll(e.el)]),n||(n=e.el),n&&0!==n.length&&(t.params.uniqueNavElements&&"string"==typeof e.el&&Array.isArray(n)&&n.length>1&&(n=[...t.el.querySelectorAll(e.el)],n.length>1&&(n=n.filter(e=>Or(e,".swiper")[0]===t.el)[0])),Array.isArray(n)&&1===n.length&&(n=n[0]),Object.assign(t.pagination,{el:n}),n=a(n),n.forEach(n=>{"bullets"===e.type&&e.clickable&&n.classList.add(e.clickableClass),n.classList.add(e.modifierClass+e.type),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass),"bullets"===e.type&&e.dynamicBullets&&(n.classList.add(`${e.modifierClass}${e.type}-dynamic`),s=0,e.dynamicMainBullets<1&&(e.dynamicMainBullets=1)),"progressbar"===e.type&&e.progressbarOpposite&&n.classList.add(e.progressbarOppositeClass),e.clickable&&n.addEventListener("click",c),t.enabled||n.classList.add(e.lockClass)}))}function f(){const e=t.params.pagination;if(l())return;let n=t.pagination.el;n&&(n=a(n),n.forEach(n=>{n.classList.remove(e.hiddenClass),n.classList.remove(e.modifierClass+e.type),n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),e.clickable&&n.removeEventListener("click",c)})),t.pagination.bullets&&t.pagination.bullets.forEach(t=>t.classList.remove(...e.bulletActiveClass.split(" ")))}n("changeDirection",()=>{if(!t.pagination||!t.pagination.el)return;const e=t.params.pagination;let{el:n}=t.pagination;n=a(n),n.forEach(n=>{n.classList.remove(e.horizontalClass,e.verticalClass),n.classList.add(t.isHorizontal()?e.horizontalClass:e.verticalClass)})}),n("init",()=>{!1===t.params.pagination.enabled?m():(p(),d(),h())}),n("activeIndexChange",()=>{void 0===t.snapIndex&&h()}),n("snapIndexChange",()=>{h()}),n("snapGridLengthChange",()=>{d(),h()}),n("destroy",()=>{f()}),n("enable disable",()=>{let{el:e}=t.pagination;e&&(e=a(e),e.forEach(e=>e.classList[t.enabled?"remove":"add"](t.params.pagination.lockClass)))}),n("lock unlock",()=>{h()}),n("click",(e,n)=>{const i=n.target;let{el:o}=t.pagination;if(Array.isArray(o)||(o=[o].filter(t=>!!t)),t.params.pagination.el&&t.params.pagination.hideOnClick&&o&&o.length>0&&!i.classList.contains(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[0].classList.contains(t.params.pagination.hiddenClass);r(!0===e?"paginationShow":"paginationHide"),o.forEach(e=>e.classList.toggle(t.params.pagination.hiddenClass))}});const m=()=>{t.el.classList.add(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=a(e),e.forEach(e=>e.classList.add(t.params.pagination.paginationDisabledClass))),f()};Object.assign(t.pagination,{enable:()=>{t.el.classList.remove(t.params.pagination.paginationDisabledClass);let{el:e}=t.pagination;e&&(e=a(e),e.forEach(e=>e.classList.remove(t.params.pagination.paginationDisabledClass))),p(),d(),h()},disable:m,render:d,update:h,init:p,destroy:f})}function di({swiper:t,extendParams:e,on:n,emit:r}){const i=gr();let o,s,a,l,u=!1,c=null,h=null;function d(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e,rtlTranslate:n}=t,{dragEl:r,el:i}=e,o=t.params.scrollbar,l=t.params.loop?t.progressLoop:t.progress;let u=s,h=(a-s)*l;n?(h=-h,h>0?(u=s-h,h=0):-h+s>a&&(u=a+h)):h<0?(u=s+h,h=0):h+s>a&&(u=a-h),t.isHorizontal()?(r.style.transform=`translate3d(${h}px, 0, 0)`,r.style.width=u+"px"):(r.style.transform=`translate3d(0px, ${h}px, 0)`,r.style.height=u+"px"),o.hide&&(clearTimeout(c),i.style.opacity=1,c=setTimeout(()=>{i.style.opacity=0,i.style.transitionDuration="400ms"},1e3))}function p(){if(!t.params.scrollbar.el||!t.scrollbar.el)return;const{scrollbar:e}=t,{dragEl:n,el:r}=e;n.style.width="",n.style.height="",a=t.isHorizontal()?r.offsetWidth:r.offsetHeight,l=t.size/(t.virtualSize+t.params.slidesOffsetBefore-(t.params.centeredSlides?t.snapGrid[0]:0)),s="auto"===t.params.scrollbar.dragSize?a*l:parseInt(t.params.scrollbar.dragSize,10),t.isHorizontal()?n.style.width=s+"px":n.style.height=s+"px",r.style.display=l>=1?"none":"",t.params.scrollbar.hide&&(r.style.opacity=0),t.params.watchOverflow&&t.enabled&&e.el.classList[t.isLocked?"add":"remove"](t.params.scrollbar.lockClass)}function f(e){return t.isHorizontal()?e.clientX:e.clientY}function m(e){const{scrollbar:n,rtlTranslate:r}=t,{el:i}=n;let l;l=(f(e)-Dr(i)[t.isHorizontal()?"left":"top"]-(null!==o?o:s/2))/(a-s),l=Math.max(Math.min(l,1),0),r&&(l=1-l);const u=t.minTranslate()+(t.maxTranslate()-t.minTranslate())*l;t.updateProgress(u),t.setTranslate(u),t.updateActiveIndex(),t.updateSlidesClasses()}function g(e){const n=t.params.scrollbar,{scrollbar:i,wrapperEl:s}=t,{el:a,dragEl:l}=i;u=!0,o=e.target===l?f(e)-e.target.getBoundingClientRect()[t.isHorizontal()?"left":"top"]:null,e.preventDefault(),e.stopPropagation(),s.style.transitionDuration="100ms",l.style.transitionDuration="100ms",m(e),clearTimeout(h),a.style.transitionDuration="0ms",n.hide&&(a.style.opacity=1),t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="none"),r("scrollbarDragStart",e)}function v(e){const{scrollbar:n,wrapperEl:i}=t,{el:o,dragEl:s}=n;u&&(e.preventDefault?e.preventDefault():e.returnValue=!1,m(e),i.style.transitionDuration="0ms",o.style.transitionDuration="0ms",s.style.transitionDuration="0ms",r("scrollbarDragMove",e))}function y(e){const n=t.params.scrollbar,{scrollbar:i,wrapperEl:o}=t,{el:s}=i;u&&(u=!1,t.params.cssMode&&(t.wrapperEl.style["scroll-snap-type"]="",o.style.transitionDuration=""),n.hide&&(clearTimeout(h),h=_r(()=>{s.style.opacity=0,s.style.transitionDuration="400ms"},1e3)),r("scrollbarDragEnd",e),n.snapOnRelease&&t.slideToClosest())}function _(e){const{scrollbar:n,params:r}=t,o=n.el;if(!o)return;const s=o,a=!!r.passiveListeners&&{passive:!1,capture:!1},l=!!r.passiveListeners&&{passive:!0,capture:!1};if(!s)return;const u="on"===e?"addEventListener":"removeEventListener";s[u]("pointerdown",g,a),i[u]("pointermove",v,a),i[u]("pointerup",y,l)}function b(){const{scrollbar:e,el:n}=t;t.params.scrollbar=li(t,t.originalParams.scrollbar,t.params.scrollbar,{el:"swiper-scrollbar"});const r=t.params.scrollbar;if(!r.el)return;let o,s;"string"==typeof r.el&&t.isElement&&(o=t.el.shadowRoot.querySelector(r.el)),o||"string"!=typeof r.el?o||(o=r.el):o=i.querySelectorAll(r.el),t.params.uniqueNavElements&&"string"==typeof r.el&&o.length>1&&1===n.querySelectorAll(r.el).length&&(o=n.querySelector(r.el)),o.length>0&&(o=o[0]),o.classList.add(t.isHorizontal()?r.horizontalClass:r.verticalClass),o&&(s=o.querySelector("."+t.params.scrollbar.dragClass),s||(s=Mr("div",t.params.scrollbar.dragClass),o.append(s))),Object.assign(e,{el:o,dragEl:s}),r.draggable&&t.params.scrollbar.el&&t.scrollbar.el&&_("on"),o&&o.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)}function x(){const e=t.params.scrollbar,n=t.scrollbar.el;n&&n.classList.remove(t.isHorizontal()?e.horizontalClass:e.verticalClass),t.params.scrollbar.el&&t.scrollbar.el&&_("off")}e({scrollbar:{el:null,dragSize:"auto",hide:!1,draggable:!1,snapOnRelease:!0,lockClass:"swiper-scrollbar-lock",dragClass:"swiper-scrollbar-drag",scrollbarDisabledClass:"swiper-scrollbar-disabled",horizontalClass:"swiper-scrollbar-horizontal",verticalClass:"swiper-scrollbar-vertical"}}),t.scrollbar={el:null,dragEl:null},n("init",()=>{!1===t.params.scrollbar.enabled?w():(b(),p(),d())}),n("update resize observerUpdate lock unlock",()=>{p()}),n("setTranslate",()=>{d()}),n("setTransition",(e,n)=>{!function(e){t.params.scrollbar.el&&t.scrollbar.el&&(t.scrollbar.dragEl.style.transitionDuration=e+"ms")}(n)}),n("enable disable",()=>{const{el:e}=t.scrollbar;e&&e.classList[t.enabled?"remove":"add"](t.params.scrollbar.lockClass)}),n("destroy",()=>{x()});const w=()=>{t.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&&t.scrollbar.el.classList.add(t.params.scrollbar.scrollbarDisabledClass),x()};Object.assign(t.scrollbar,{enable:()=>{t.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),t.scrollbar.el&&t.scrollbar.el.classList.remove(t.params.scrollbar.scrollbarDisabledClass),b(),p(),d()},disable:w,updateSize:p,setTranslate:d,init:b,destroy:x})}function pi({swiper:t,extendParams:e,on:n,emit:r,params:i}){let o,s;t.autoplay={running:!1,paused:!1,timeLeft:0},e({autoplay:{enabled:!1,delay:3e3,waitForTransition:!0,disableOnInteraction:!0,stopOnLastSlide:!1,reverseDirection:!1,pauseOnMouseEnter:!1}});let a,l,u,c,h,d,p,f=i&&i.autoplay?i.autoplay.delay:3e3,m=i&&i.autoplay?i.autoplay.delay:3e3,g=(new Date).getTime;function v(e){t&&!t.destroyed&&t.wrapperEl&&e.target===t.wrapperEl&&(t.wrapperEl.removeEventListener("transitionend",v),E())}const y=()=>{if(t.destroyed||!t.autoplay.running)return;t.autoplay.paused?l=!0:l&&(m=a,l=!1);const e=t.autoplay.paused?a:g+m-(new Date).getTime();t.autoplay.timeLeft=e,r("autoplayTimeLeft",e,e/f),s=requestAnimationFrame(()=>{y()})},_=e=>{if(t.destroyed||!t.autoplay.running)return;cancelAnimationFrame(s),y();let n=void 0===e?t.params.autoplay.delay:e;f=t.params.autoplay.delay,m=t.params.autoplay.delay;const i=(()=>{let e;if(e=t.virtual&&t.params.virtual.enabled?t.slides.filter(t=>t.classList.contains("swiper-slide-active"))[0]:t.slides[t.activeIndex],!e)return;return parseInt(e.getAttribute("data-swiper-autoplay"),10)})();!Number.isNaN(i)&&i>0&&void 0===e&&(n=i,f=i,m=i),a=n;const l=t.params.speed,u=()=>{t&&!t.destroyed&&(t.params.autoplay.reverseDirection?!t.isBeginning||t.params.loop||t.params.rewind?(t.slidePrev(l,!0,!0),r("autoplay")):t.params.autoplay.stopOnLastSlide||(t.slideTo(t.slides.length-1,l,!0,!0),r("autoplay")):!t.isEnd||t.params.loop||t.params.rewind?(t.slideNext(l,!0,!0),r("autoplay")):t.params.autoplay.stopOnLastSlide||(t.slideTo(0,l,!0,!0),r("autoplay")),t.params.cssMode&&(g=(new Date).getTime(),requestAnimationFrame(()=>{_()})))};return n>0?(clearTimeout(o),o=setTimeout(()=>{u()},n)):requestAnimationFrame(()=>{u()}),n},b=()=>{t.autoplay.running=!0,_(),r("autoplayStart")},x=()=>{t.autoplay.running=!1,clearTimeout(o),cancelAnimationFrame(s),r("autoplayStop")},w=(e,n)=>{if(t.destroyed||!t.autoplay.running)return;clearTimeout(o),e||(p=!0);const i=()=>{r("autoplayPause"),t.params.autoplay.waitForTransition?t.wrapperEl.addEventListener("transitionend",v):E()};if(t.autoplay.paused=!0,n)return d&&(a=t.params.autoplay.delay),d=!1,void i();const s=a||t.params.autoplay.delay;a=s-((new Date).getTime()-g),t.isEnd&&a<0&&!t.params.loop||(a<0&&(a=0),i())},E=()=>{t.isEnd&&a<0&&!t.params.loop||t.destroyed||!t.autoplay.running||(g=(new Date).getTime(),p?(p=!1,_(a)):_(),t.autoplay.paused=!1,r("autoplayResume"))},T=()=>{if(t.destroyed||!t.autoplay.running)return;const e=gr();"hidden"===e.visibilityState&&(p=!0,w(!0)),"visible"===e.visibilityState&&E()},S=t=>{"mouse"===t.pointerType&&(p=!0,w(!0))},A=e=>{"mouse"===e.pointerType&&t.autoplay.paused&&E()};n("init",()=>{t.params.autoplay.enabled&&(t.params.autoplay.pauseOnMouseEnter&&(t.el.addEventListener("pointerenter",S),t.el.addEventListener("pointerleave",A)),gr().addEventListener("visibilitychange",T),g=(new Date).getTime(),b())}),n("destroy",()=>{t.el.removeEventListener("pointerenter",S),t.el.removeEventListener("pointerleave",A),gr().removeEventListener("visibilitychange",T),t.autoplay.running&&x()}),n("beforeTransitionStart",(e,n,r)=>{!t.destroyed&&t.autoplay.running&&(r||!t.params.autoplay.disableOnInteraction?w(!0,!0):x())}),n("sliderFirstMove",()=>{!t.destroyed&&t.autoplay.running&&(t.params.autoplay.disableOnInteraction?x():(u=!0,c=!1,p=!1,h=setTimeout(()=>{p=!0,c=!0,w(!0)},200)))}),n("touchEnd",()=>{if(!t.destroyed&&t.autoplay.running&&u){if(clearTimeout(h),clearTimeout(o),t.params.autoplay.disableOnInteraction)return c=!1,void(u=!1);c&&t.params.cssMode&&E(),c=!1,u=!1}}),n("slideChange",()=>{!t.destroyed&&t.autoplay.running&&(d=!0)}),Object.assign(t.autoplay,{start:b,stop:x,pause:w,resume:E})}n("u+OR");function fi(t){return(fi="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 mi(t){return function(t){if(Array.isArray(t))return gi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return gi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gi(t,e)}(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 gi(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 vi(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,yi(r.key),r)}}function yi(t){var e=function(t,e){if("object"!=fi(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=fi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fi(e)?e:String(e)}si.use([ui,hi,pi,di,ai,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||e.destroyed)return;const n=e.clickedIndex,r=e.clickedSlide;if(r&&r.classList.contains(t.params.thumbs.slideThumbActiveClass))return;if(null==n)return;let i;i=e.params.loop?parseInt(e.clickedSlide.getAttribute("data-swiper-slide-index"),10):n,t.params.loop?t.slideToLoop(i):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}),t.thumbs.swiper.update();else if(wr(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.classList.add(t.params.thumbs.thumbsContainerClass),t.thumbs.swiper.on("tap",o),!0}function a(e){const n=t.thumbs.swiper;if(!n||n.destroyed)return;const r="auto"===n.params.slidesPerView?n.slidesPerViewDynamic():n.params.slidesPerView;let i=1;const o=t.params.thumbs.slideThumbActiveClass;if(t.params.slidesPerView>1&&!t.params.centeredSlides&&(i=t.params.slidesPerView),t.params.thumbs.multipleActiveThumbs||(i=1),i=Math.floor(i),n.slides.forEach(t=>t.classList.remove(o)),n.params.loop||n.params.virtual&&n.params.virtual.enabled)for(let e=0;e<i;e+=1)Ar(n.slidesEl,`[data-swiper-slide-index="${t.realIndex+e}"]`).forEach(t=>{t.classList.add(o)});else for(let e=0;e<i;e+=1)n.slides[t.realIndex+e]&&n.slides[t.realIndex+e].classList.add(o);const s=t.params.thumbs.autoScrollOffset,a=s&&!n.params.loop;if(t.realIndex!==n.realIndex||a){const i=n.activeIndex;let o,l;if(n.params.loop){const e=n.slides.filter(e=>e.getAttribute("data-swiper-slide-index")===""+t.realIndex)[0];o=n.slides.indexOf(e),l=t.activeIndex>t.previousIndex?"next":"prev"}else o=t.realIndex,l=o>t.previousIndex?"next":"prev";a&&(o+="next"===l?s:-1*s),n.visibleSlidesIndexes&&n.visibleSlidesIndexes.indexOf(o)<0&&(n.params.centeredSlides?o=o>i?o-Math.floor(r/2)+1:o+Math.floor(r/2)-1:o>i&&n.params.slidesPerGroup,n.slideTo(o,e?0:void 0))}}t.thumbs={swiper:null},n("beforeInit",()=>{const{thumbs:e}=t.params;if(e&&e.swiper)if("string"==typeof e.swiper||e.swiper instanceof HTMLElement){const n=gr(),r=()=>{const r="string"==typeof e.swiper?n.querySelector(e.swiper):e.swiper;if(r&&r.swiper)e.swiper=r.swiper,s(),a(!0);else if(r){const n=i=>{e.swiper=i.detail[0],r.removeEventListener("init",n),s(),a(!0),e.swiper.update(),t.update()};r.addEventListener("init",n)}return r},i=()=>{if(t.destroyed)return;r()||requestAnimationFrame(i)};requestAnimationFrame(i)}else s(),a(!0)}),n("slideChange update resize observerUpdate",()=>{a()}),n("setTransition",(e,n)=>{const r=t.thumbs.swiper;r&&!r.destroyed&&r.setTransition(n)}),n("beforeDestroy",()=>{const e=t.thumbs.swiper;e&&!e.destroyed&&i&&e.destroy()}),Object.assign(t.thumbs,{init:s,update: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",()=>{if("undefined"!=typeof window&&("string"==typeof t.params.controller.control||t.params.controller.control instanceof HTMLElement)){const e=document.querySelector(t.params.controller.control);if(e&&e.swiper)t.controller.control=e.swiper;else if(e){const n=r=>{t.controller.control=r.detail[0],t.update(),e.removeEventListener("init",n)};e.addEventListener("init",n)}}else 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.control.destroyed&&t.controller.setTranslate(n,r)}),n("setTransition",(e,n,r)=>{t.controller.control&&!t.controller.control.destroyed&&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){if(e.destroyed)return;const n=t.rtlTranslate?-t.translate:t.translate;"slide"===t.params.controller.by&&(!function(e){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()),!Number.isNaN(o)&&Number.isFinite(o)||(o=1),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.destroyed||(n.setTransition(e,t),0!==e&&(n.transitionStart(),n.params.autoHeight&&_r(()=>{n.updateAutoHeight()}),Pr(n.wrapperEl,()=>{i&&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}){let n,r,i;e({grid:{rows:1,fill:"column"}});const o=()=>{let e=t.params.spaceBetween;return"string"==typeof e&&e.indexOf("%")>=0?e=parseFloat(e.replace("%",""))/100*t.size:"string"==typeof e&&(e=parseFloat(e)),e};t.grid={initSlides:e=>{const{slidesPerView:o}=t.params,{rows:s,fill:a}=t.params.grid;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)),r=n/s},updateSlide:(e,s,a,l)=>{const{slidesPerGroup:u}=t.params,c=o(),{rows:h,fill:d}=t.params.grid;let p,f,m;if("row"===d&&u>1){const t=Math.floor(e/(u*h)),r=e-h*u*t,i=0===t?u:Math.min(Math.ceil((a-t*h*u)/h),u);m=Math.floor(r/i),f=r-m*i+t*u,p=f+m*n/h,s.style.order=p}else"column"===d?(f=Math.floor(e/h),m=e-f*h,(f>i||f===i&&m===h-1)&&(m+=1,m>=h&&(m=0,f+=1))):(m=Math.floor(e/r),f=e-m*r);s.row=m,s.column=f,s.style[l("margin-top")]=0!==m?c&&c+"px":""},updateWrapperSize:(e,r,i)=>{const{centeredSlides:s,roundLengths:a}=t.params,l=o(),{rows:u}=t.params.grid;if(t.virtualSize=(e+l)*n,t.virtualSize=Math.ceil(t.virtualSize/u)-l,t.wrapperEl.style[i("width")]=t.virtualSize+l+"px",s){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.splice(0,r.length),r.push(...e)}}}}]);var _i=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.mySwiper=null,this.init(),this.mobileSwiper()}var e,n,r;return e=t,r=[{key:"create",value:function(e){null===t.instance&&e&&(t.instance=new t(e))}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"init",value:function(){var t=this;this.el.querySelectorAll(".swiper-twitter").length&&(this.twiterSlides=new si(".swiper-twitter",{slidesPerView:1.1,draggable:!0,mousewheel:!0,spaceBetween:24,loop:!0,pagination:{el:".section-updates .swiper-pagination",type:"custom",renderCustom:function(t,e,n){return("0"+e).slice(-2)+"/"+("0"+n).slice(-2)}},navigation:{nextEl:".section-updates .swiper-button-next",prevEl:".section-updates .swiper-button-prev"},breakpoints:{768:{slidesPerView:2,spaceBetween:33},1280:{slidesPerView:3,spaceBetween:56}}})),this.el.querySelectorAll(".swiper-news").length&&(this.newsSlides=new si(".swiper-news",{slidesPerView:1.1,spaceBetween:33,loop:!0,pagination:{el:".section-newsfeed .swiper-pagination",type:"custom",renderCustom:function(t,e,n){return("0"+e).slice(-2)+"/"+("0"+n).slice(-2)}},navigation:{nextEl:".section-newsfeed .swiper-button-next",prevEl:".section-newsfeed .swiper-button-prev"},breakpoints:{767:{slidesPerView:2.1,spaceBetween:20},1024:{slidesPerView:3.1,spaceBetween:20}}}),!0===window.matchMedia("(min-width:768px)").matches&&this.newsSlides.slides.length>4&&this.newsSlides.el.classList.add("slider-init")),this.el.querySelectorAll(".swiper-blog").length&&(this.blogSlides=new si(".swiper-blog",{slidesPerView:2,spaceBetween:16,centeredSlides:!1,loop:!0,breakpoints:{768:{slidesPerView:1,spaceBetween:16},1024:{slidesPerView:2},1280:{slidesPerView:2}}})),this.el.querySelectorAll(".quote-slider").length&&(this.quoteSlides=new si(".quote-slider",{slidesPerView:1,loop:!0,autoplay:!0,pagination:{el:".swiper-pagination",type:"bullets",clickable:"true"}}));var e=this.el.querySelectorAll(".cs-builder-slider");e.length&&(this.quoteSlides=new si(".cs-builder-slider",{slidesPerView:1,autoplay:{delay:7e3},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}}),new IntersectionObserver((function(e,n){e.forEach((function(e){e.isIntersecting?t.quoteSlides.autoplay.start():t.quoteSlides.autoplay.stop()}))}),{root:null,threshold:.5}).observe(e[0]),this.el.querySelectorAll(".cs-opp-boxes .box").forEach((function(e,n){e.addEventListener("click",(function(e){e.preventDefault(),setTimeout((function(){t.quoteSlides.slideTo(n)}),175)}))})));var n,r,i=this.el.querySelectorAll(".pagination-slider");if(i.length)if(i[0].classList.contains("single-video"))var o=function(t){var e=1e3*(parseInt(t.slides[t.activeIndex].dataset.displayDuration)||1)-s;t.activeIndex+1===t.slides.length?setTimeout((function(){var e=document.querySelector(".idp-slider.single-video iframe");e.setAttribute("src",e.getAttribute("src")),t.slideTo(0)}),e):setTimeout((function(){t.slideNext()}),e)},s=300,a=new si(".pagination-slider",{slidesPerView:1,centeredSlides:!0,roundLengths:!0,speed:s,loop:!1,allowTouchMove:!1,breakpoints:{768:{direction:"vertical",slidesPerView:5}},on:{afterInit:function(){o(this)},slideChangeTransitionEnd:function(){o(this)}}});else{a=new si(".pagination-slider",{slidesPerView:1,centeredSlides:!0,roundLengths:!0,autoplay:{delay:5e3,disableOnInteraction:!1},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination",type:"fraction",formatFractionCurrent:function(t){return("0"+t).slice(-2)},formatFractionTotal:function(t){return("0"+t).slice(-2)},renderFraction:function(t,e){return'<span class="'+t+'"></span>/<span class="'+e+'"></span>'}},breakpoints:{768:{direction:"vertical",slidesPerView:5}}}),this.imageSlides=new si(".image-slider",{slidesPerView:1,loop:!0,allowTouchMove:!1,on:{transitionEnd:function(){var t=$(".swiper-slide-active"),e=t.data("caption"),n=t.data("url");$(".img-caption").text(e),n?$(".img-caption").attr("href",n):$(".img-caption").removeAttr("href")}}}),a.on("slideChangeTransitionEnd",(function(){var e=$(".pagination-slider .swiper-slide-active").data("swiper-slide-index");t.imageSlides.slideTo(e)}));var l=new si(".pagination-slider-modal",{slidesPerView:1,centeredSlides:!0,roundLengths:!0,navigation:{nextEl:".swiper-button-next-modal",prevEl:".swiper-button-prev-modal"},pagination:{el:".swiper-pagination-modal",type:"fraction",formatFractionCurrent:function(t){return("0"+t).slice(-2)},formatFractionTotal:function(t){return("0"+t).slice(-2)},renderFraction:function(t,e){return'<span class="'+t+'"></span>/<span class="'+e+'"></span>'}},breakpoints:{768:{slidesPerView:5}}}),u=new si(".image-slider-modal",{slidesPerView:1,centeredSlides:!0,allowTouchMove:!1,on:{transitionEnd:function(){var t=$(".image-slider-modal .swiper-slide-active"),e=t.data("caption"),n=t.data("url");console.log(n),$(".img-caption-modal").text(e),n?$(".img-caption-modal").attr("href",n):$(".img-caption-modal").removeAttr("href")}}}),c=$(".progress-bar");$("[data-modal]").on("click",(function(){var t=$(this).closest(".swiper-slide-active").data("swiper-slide-index");u.slideTo(t),l.slideTo(t);var e=u.slides[u.activeIndex].querySelector("iframe");if(e){var n=e.getAttribute("data-href");$(e).attr("src",n)}a.autoplay.stop(),$(c).removeClass("progress-bar")})),$(".modal .close").click((function(t){t.preventDefault(),a.autoplay.start(),$(c).addClass("progress-bar")})),$("html").on("click touchstart pointerdown MSPointerDown",(function(t){a.autoplay.start(),$(c).addClass("progress-bar")})),l.on("slideChange",(function(){var t=$(".swiper-button-next-modal.swiper-button-disabled"),e=l.slides.length;l.activeIndex===e-1&&t.on("click",(function(){t.hasClass("swiper-button-disabled")?l.slideTo(0):t.off("click")})),u.slideTo(l.activeIndex)})),u.on("slideChange",(function(){!function(){var t=document.querySelectorAll("video"),e=document.querySelectorAll("iframe");t.forEach((function(t){t.paused||t.pause()})),e.forEach((function(t){t.removeAttribute("src")}))}();var t=u.slides[u.activeIndex],e=t.querySelector("video"),n=t.querySelector("iframe");if(n){var r=n.getAttribute("data-href");$(n).attr("src",r)}e&&e.play()}))}this.el.querySelectorAll(".partner-slider").length&&(this.partnerSlides=new si(".partner-slider",{slidesPerView:1,spaceBetween:26,loop:!0,watchSlidesProgress:!0,autoplay:{delay:4e3,disableOnInteraction:!0},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination-fraction",type:"custom",renderCustom:function(t,e,n){return'<span class="current">'+(e>=10?"":"0")+e+'</span>/<span class="total">'+(n>=10?"":"0")+n+"</span>"}},breakpoints:{768:{slidesPerView:2},1024:{slidesPerView:3},1280:{slidesPerView:4}}})),this.el.querySelectorAll(".nl-post-slider").length&&(this.partnerSlides=new si(".nl-post-slider",{slidesPerView:1,roundLengths:!0,spaceBetween:48,loop:!0,watchSlidesProgress:!0,autoplay:{delay:6e3,disableOnInteraction:!0},breakpoints:{768:{slidesPerView:1.5,spaceBetween:33},920:{slidesPerView:2,spaceBetween:33},1280:{centeredSlides:!0,slidesPerView:2.2,spaceBetween:56}},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination-fraction",type:"custom",renderCustom:function(t,e,n){var r,i=null===(r=t.slides[e-1])||void 0===r||null===(r=r.querySelector(".eyebrow-label"))||void 0===r?void 0:r.textContent.trim();return i&&function(t,e){var n=e.el.previousElementSibling;if(null!=n&&n.classList.contains("post-slider-navigation")){var r=mi(n.children);r.forEach((function(t){return t.classList.remove("item-active")})),r.forEach((function(e){e.textContent.trim()===t&&e.classList.add("item-active")}))}}(i,t),'<span class="current">'+(e>=10?"":"0")+e+'</span>/<span class="total">'+(n>=10?"":"0")+n+"</span>"}},on:{slideChange:function(t){var e,n=null===(e=t.slides[t.activeIndex].querySelector(".eyebrow-label"))||void 0===e?void 0:e.textContent.trim(),r=t.el.previousElementSibling;null!=r&&r.classList.contains("post-slider-navigation")&&n&&mi(r.children).forEach((function(t){t.classList.remove("item-active"),t.textContent.trim()===n&&t.classList.add("item-active")}))}}}),new IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting?t.partnerSlides.autoplay.start():t.partnerSlides.autoplay.stop()}))}),{root:null,threshold:.1}).observe(document.querySelector(".nl-post-slider")),null===(n=this.partnerSlides)||void 0===n||n.forEach((function(t){var e=t.el.previousElementSibling;if(null!=e&&e.classList.contains("post-slider-navigation")){var n=mi(e.children);n.forEach((function(e,r){e.addEventListener("click",(function(r){var i=e.textContent.trim();n.forEach((function(t){return t.classList.remove("item-active")})),e.classList.add("item-active"),t.slides.forEach((function(e,n){var r;(null===(r=e.querySelector(".eyebrow-label"))||void 0===r?void 0:r.textContent.trim())===i&&t.slideToLoop(n)}))}))}))}}))),this.el.querySelectorAll(".img-card-slider").length&&(this.partnerSlides=new si(".img-card-slider",{slidesPerView:"auto",centeredSlides:!0,spaceBetween:43,loop:!1,watchSlidesProgress:!0,autoplay:{delay:4e3,disableOnInteraction:!0},breakpoints:{480:{centeredSlides:!1}}})),$(".partner-details-slider").length&&(r=new si(".partner-details-slider",{slidesPerView:1,centeredSlides:!0,spaceBetween:40,loop:!0,watchSlidesProgress:!0,navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},pagination:{el:".swiper-pagination-fraction",type:"custom",renderCustom:function(t,e,n){return'<span class="current">'+(e>=10?"":"0")+e+'</span>/<span class="total">'+(n>=10?"":"0")+n+"</span>"}}}),$("a[data-slide]").on("click",(function(t){t.preventDefault();var e=parseInt($(this).attr("data-slide"));r&&!isNaN(e)&&setTimeout((function(){r.slideToLoop(e,10,(function(){setTimeout((function(){var t=r.getTranslate();r.setTranslate(t,.1,(function(){r.setTranslate(t)}))}),10)}))}),20)}))),this.el.querySelectorAll(".swiper-stories#specialists-swiper").length&&this.el.querySelectorAll(".swiper-stories#specialists-swiper").forEach((function(t){var e,n=window.matchMedia("(max-width:767px)"),r=function(){return n.matches?(void 0!==e&&e.destroy(!0,!0),$(t).children().removeClass("swiper-wrapper").addClass("cio-slider"),void $(t).find(".swiper-slide").removeClass("swiper-slide")):($(t).children().addClass("swiper-wrapper").removeClass("cio-slider").children().addClass("swiper-slide"),void(e=new si(t,{slidesPerView:1.001,loop:!0,pagination:{el:".swiper-pagination",type:"custom",renderCustom:function(t,e,n){return("0"+e).slice(-2)+"/"+("0"+n).slice(-2)}},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"}})))};n.addListener(r),r()})),$(".swiper-slide").find("h2, p").addClass("swiper-no-swiping");var h=this.el.querySelectorAll(".swiper-gallery-section"),d=this.el.querySelectorAll(".swiper-gallery-section .swiper-slide").length;h.length&&(this.gallerySlides=new si(".swiper-gallery",{slidesPerView:1.12,spaceBetween:40,loop:!1,pagination:{el:".swiper-gallery-section .swiper-pagination",type:"custom",renderCustom:function(t,e,n){var r=d,i=Math.ceil(r/1);return("0"+(e<=i?e:e%i||i)).slice(-2)+"/"+"0".concat(i).slice(-2)}},navigation:{nextEl:".swiper-gallery-section .swiper-button-next",prevEl:".swiper-gallery-section .swiper-button-prev"},breakpoints:{1024:{slidesPerView:1,spaceBetween:70},1180:{spaceBetween:90},1280:{spaceBetween:135}}})),this.el.querySelectorAll(".events-overview-slider").length&&(this.quoteSlides=new si(".events-overview-slider",{slidesPerView:"auto",spaceBetween:10,loop:!0,autoplay:!1,speed:1e3,pagination:{el:".swiper-pagination",type:"custom",renderCustom:function(t,e,n){return("0"+e).slice(-2)+"/"+("0"+n).slice(-2)}},navigation:{nextEl:".swiper-button-next",prevEl:".swiper-button-prev"},breakpoints:{768:{slidesPerView:1},769:{slidesPerView:"auto"}}})),this.mobileSwiper("[data-mobile-swiper]",{loop:!1,slidesPerView:1,spaceBetween:24,centeredSlides:!0,pagination:{el:".swiper-pagination",clickable:!0}}),this.mobileSwiper(".judge-list-slider",{loop:!1,slidesPerView:1,grid:{rows:3,fill:"row"},navigation:{nextEl:".judge-list-slider .swiper-button-next",prevEl:".judge-list-slider .swiper-button-prev"}})}},{key:"mobileSwiper",value:function(t,e){var n=this,r=window.matchMedia("(min-width:768px)");document.querySelectorAll(t).length&&(this.breakpointChecker=function(){if(!0!==r.matches)return!1===r.matches?($(n.el).find(t).addClass("swiper-mobile").find(".row").addClass("swiper-wrapper").children().addClass("swiper-slide"),n.enableSwiper()):void 0;void 0!==n.mySwiper&&null!==n.mySwiper&&(n.mySwiper.length>1?(n.mySwiper.forEach((function(t){t.destroy(!0,!0)})),n.checkDestroySwiper(n.mySwiper)):n.checkDestroySwiper([n.mySwiper]),$(n.el).find(t).each((function(){$(this).removeClass("swiper-mobile").find(".row").removeClass("swiper-wrapper").children().removeClass("swiper-slide")})))},this.enableSwiper=function(){n.mySwiper=new si(t,e)},this.breakpointChecker(),r.addEventListener("change",(function(){n.breakpointChecker()})))}},{key:"destroyMobile",value:function(){this.checkDestroySwiper([this.mySwiper])}},{key:"checkDestroySwiper",value:function(t){t.forEach((function(t){null!=t&&(t.destroy(!0,!0),t=null)}))}},{key:"destroySwipers",value:function(){this.checkDestroySwiper([this.twiterSlides,this.newsSlides,this.blogSlides,this.spotlightSlides,this.gallerySlides])}},{key:"beforeDestroy",value:function(){this.destroySwipers(),this.destroyMobile()}}])&&vi(e.prototype,n),r&&vi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=yi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(_i,"instance",null);var bi=_i,xi=function(t,e,n){return(1-n)*t+n*e};function wi(t){return(wi="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 Ei(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,Ti(r.key),r)}}function Ti(t){var e=function(t,e){if("object"!=wi(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=wi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==wi(e)?e:String(e)}si.use([ui,hi,pi,di,ai]);var Si=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=Object.assign({},this.defaultOptions,e),this.el=this.options.selector,this.speed=parseFloat(this.options.selector.getAttribute("data-speed-slide")),this.totalSlides=this.options.selector.querySelectorAll(".swiper-slide").length,this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){null===t.instance&&(t.instance=new t(e))}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"defaultOptions",get:function(){return{selector:null,next:null,prev:null,pagination:null,container:document,speed:700,slidesPerView:1.001}}},{key:"init",value:function(){var t=this;this.spotlightSotriesSwiper=new si(this.el,{slidesPerView:this.options.slidesPerView,loop:!0,speed:this.options.speed,setWrapperSize:!0,roundLengths:!0,grabCursor:!0,watchSlidesProgress:!0,mousewheel:!1,observeParents:!0,observer:!0,observeSlideChildren:!0,resizeObserver:!0,loopedSlides:3,pagination:{el:this.options.pagination,type:"custom",renderCustom:function(e,n,r){var i=t.totalSlides,o=t.options.slidesPerView,s=Math.ceil(i/o);return("0"+(n<=s?n:n%s||s)).slice(-2)+"/"+"0".concat(s).slice(-2)}},navigation:{nextEl:this.options.next,prevEl:this.options.prev},on:{beforeInit:function(t){if(0!=t.el.querySelectorAll(".swiper-slide").length)for(var e=0;e<1;e++)t.el.querySelectorAll(".swiper-slide").forEach((function(e){var n=e.cloneNode(!0);t.el.querySelectorAll(".swiper-wrapper")[0].appendChild(n)}))},init:function(){},slideChange:function(){},progress:function(t,e){for(var n=0;n<t.slides.length;n+=1){var r=t.slides[n].firstElementChild,i=t.slides[n].progress,o=Math.abs(i),s=0,a=1;i>-.1&&i<.1?(s=0,a=1):i<=-1?(s=10,a=1):i>.99?(s=10,a=0):i<-.1&&i>-1?(s=xi(0,10,o),a=1):i>.1&&i<1?s=xi(10,0,o):i>.8&&i<1&&(a=xi(1,0,o)),s>0?h.a.set(r,{filter:"blur(".concat(s,"px)")}):h.a.set(r,{filter:"none"}),h.a.set(r,{alpha:a})}},setTransition:function(t,e){for(var n=0;n<t.slides.length;n+=1)t.slides[n].firstElementChild.style.transitionDuration="".concat(e,"ms")}}})}},{key:"breakpoints",get:function(){var t={"(min-width: 1024px) and (max-width: 1279.98px)":"desktop","(min-width: 768px) and (max-width: 1023.98px)":"tablet","(max-width: 767.98px)":"phone","(min-width: 1280px) and (max-width: 1920px)":"widescreen","(min-width: 1921px)":"uhd"};for(var e in t)if(window.matchMedia(e).matches)return t[e];return null}},{key:"beforeDestroy",value:function(){this.spotlightSotriesSwiper.destroy(),this.el=null}}])&&Ei(e.prototype,n),r&&Ei(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=Ti(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(Si,"instance",null);var Ai,Mi,Di,Ci,Ri,Oi,Pi,Ii,Li=function(){return"undefined"!=typeof window},Ni=function(){return Ai||Li()&&(Ai=window.gsap)&&Ai.registerPlugin&&Ai},Fi=function(t){return"string"==typeof t},ki=function(t){return"function"==typeof t},Ui=function(t,e){var n="x"===e?"Width":"Height",r="scroll"+n,i="client"+n;return t===Di||t===Ci||t===Ri?Math.max(Ci[r],Ri[r])-(Di["inner"+n]||Ci[i]||Ri[i]):t[r]-t["offset"+n]},Bi=function(t,e){var n="scroll"+("x"===e?"Left":"Top");return t===Di&&(null!=t.pageXOffset?n="page"+e.toUpperCase()+"Offset":t=null!=Ci[n]?Ci:Ri),function(){return t[n]}},Gi=function(t,e){if(!(t=Oi(t)[0])||!t.getBoundingClientRect)return console.warn("scrollTo target doesn't exist. Using 0")||{x:0,y:0};var n=t.getBoundingClientRect(),r=!e||e===Di||e===Ri,i=r?{top:Ci.clientTop-(Di.pageYOffset||Ci.scrollTop||Ri.scrollTop||0),left:Ci.clientLeft-(Di.pageXOffset||Ci.scrollLeft||Ri.scrollLeft||0)}:e.getBoundingClientRect(),o={x:n.left-i.left,y:n.top-i.top};return!r&&e&&(o.x+=Bi(e,"x")(),o.y+=Bi(e,"y")()),o},zi=function(t,e,n,r,i){return isNaN(t)||"object"==typeof t?Fi(t)&&"="===t.charAt(1)?parseFloat(t.substr(2))*("-"===t.charAt(0)?-1:1)+r-i:"max"===t?Ui(e,n)-i:Math.min(Ui(e,n),Gi(t,e)[n]-i):parseFloat(t)-i},Hi=function(){Ai=Ni(),Li()&&Ai&&"undefined"!=typeof document&&document.body&&(Di=window,Ri=document.body,Ci=document.documentElement,Oi=Ai.utils.toArray,Ai.config({autoKillThreshold:7}),Pi=Ai.config(),Mi=1)},ji={version:"3.12.3",name:"scrollTo",rawVars:1,register:function(t){Ai=t,Hi()},init:function(t,e,n,r,i){Mi||Hi();var o=Ai.getProperty(t,"scrollSnapType");this.isWin=t===Di,this.target=t,this.tween=n,e=function(t,e,n,r){if(ki(t)&&(t=t(e,n,r)),"object"!=typeof t)return Fi(t)&&"max"!==t&&"="!==t.charAt(1)?{x:t,y:t}:{y:t};if(t.nodeType)return{y:t,x:t};var i,o={};for(i in t)o[i]="onAutoKill"!==i&&ki(t[i])?t[i](e,n,r):t[i];return o}(e,r,t,i),this.vars=e,this.autoKill=!!e.autoKill,this.getX=Bi(t,"x"),this.getY=Bi(t,"y"),this.x=this.xPrev=this.getX(),this.y=this.yPrev=this.getY(),Ii||(Ii=Ai.core.globals().ScrollTrigger),"smooth"===Ai.getProperty(t,"scrollBehavior")&&Ai.set(t,{scrollBehavior:"auto"}),o&&"none"!==o&&(this.snap=1,this.snapInline=t.style.scrollSnapType,t.style.scrollSnapType="none"),null!=e.x?(this.add(this,"x",this.x,zi(e.x,t,"x",this.x,e.offsetX||0),r,i),this._props.push("scrollTo_x")):this.skipX=1,null!=e.y?(this.add(this,"y",this.y,zi(e.y,t,"y",this.y,e.offsetY||0),r,i),this._props.push("scrollTo_y")):this.skipY=1},render:function(t,e){for(var n,r,i,o,s,a=e._pt,l=e.target,u=e.tween,c=e.autoKill,h=e.xPrev,d=e.yPrev,p=e.isWin,f=e.snap,m=e.snapInline;a;)a.r(t,a.d),a=a._next;n=p||!e.skipX?e.getX():h,i=(r=p||!e.skipY?e.getY():d)-d,o=n-h,s=Pi.autoKillThreshold,e.x<0&&(e.x=0),e.y<0&&(e.y=0),c&&(!e.skipX&&(o>s||o<-s)&&n<Ui(l,"x")&&(e.skipX=1),!e.skipY&&(i>s||i<-s)&&r<Ui(l,"y")&&(e.skipY=1),e.skipX&&e.skipY&&(u.kill(),e.vars.onAutoKill&&e.vars.onAutoKill.apply(u,e.vars.onAutoKillParams||[]))),p?Di.scrollTo(e.skipX?n:e.x,e.skipY?r:e.y):(e.skipY||(l.scrollTop=e.y),e.skipX||(l.scrollLeft=e.x)),!f||1!==t&&0!==t||(r=l.scrollTop,n=l.scrollLeft,m?l.style.scrollSnapType=m:l.style.removeProperty("scroll-snap-type"),l.scrollTop=r+1,l.scrollLeft=n+1,l.scrollTop=r,l.scrollLeft=n),e.xPrev=e.x,e.yPrev=e.y,Ii&&Ii.update()},kill:function(t){var e="scrollTo"===t;(e||"scrollTo_x"===t)&&(this.skipX=1),(e||"scrollTo_y"===t)&&(this.skipY=1)}};function Vi(t){return(Vi="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 Xi(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,Wi(r.key),r)}}function Wi(t){var e=function(t,e){if("object"!=Vi(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Vi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Vi(e)?e:String(e)}ji.max=Ui,ji.getOffset=Gi,ji.buildGetter=Bi,Ni()&&Ai.registerPlugin(ji),h.b.registerPlugin(ji);var Yi=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){null===t.instance&&e&&(t.instance=new t(e))}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"init",value:function(){this.bannerSlideIn=this.el.querySelectorAll("[data-home-slideIn]"),this.initFirstTransitionAnimation()}},{key:"initFirstTransitionAnimation",value:function(){var t=this,e=h.b.utils.toArray(this.bannerSlideIn),n=document.querySelectorAll(".banner-text span"),r=document.querySelectorAll(".banner-text-bottom span");window.scroller.stop(),h.b.set(e,{alpha:0,y:window.screen.height}),this.animationHomeBanner=h.b.timeline({delay:.5,onComplete:function(){t.bannerSlideIn.forEach((function(t){t.parentNode.style.willChange="auto"}))}}).from(n,{duration:1.2,y:75,autoAlpha:0,stagger:.15,ease:"circ.out",clearProps:!0}).to(e,{duration:.9,alpha:1,y:0,stagger:.2,rotationZ:.01,force3D:!0,ease:"circ.out",clearProps:!0,lazy:!1,overwrite:"auto",immediateRender:!1},"-=1").from(r,{duration:1,y:200,alpha:0,stagger:.15,ease:"circ.out",clearProps:!0},"-=1"),setTimeout((function(){window.scroller.start()}),1e3*this.animationHomeBanner.totalDuration())}},{key:"beforeDestroy",value:function(){this.el=null,this.animationHomeBanner.kill()}}])&&Xi(e.prototype,n),r&&Xi(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=Wi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(Yi,"instance",null);var qi=Yi;function $i(t){return($i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Ki(t){return function(t){if(Array.isArray(t))return Zi(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Zi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Zi(t,e)}(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 Zi(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 Ji(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,Qi(r.key),r)}}function Qi(t){var e=function(t,e){if("object"!=$i(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=$i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==$i(e)?e:String(e)}var to=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.active=!0,this.tabs=e,this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){null===t.instance&&e.length&&(t.instance=new t(e))}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"init",value:function(){var t=this;this.tabs.forEach((function(e){e.addEventListener("click",(function(n){n.preventDefault(),t.active&&t.openTab(e)})),e.classList.contains("active")&&t.openTab(e)}))}},{key:"openTab",value:function(t){var e=this;if(t.classList.contains("active"))return!1;var n=t.dataset.tabFeed,r=Ki(t.closest(".tab-nav").querySelectorAll("[data-tab-feed]")).filter((function(e){return e!==t})),i=[],o=[],s=null,a=null,l=null;if(this.active=!1,r.forEach((function(t){if(t.classList.contains("active")){s=t;var e=t.dataset.tabFeed;(a=document.getElementById("".concat(e)))&&a.querySelectorAll(".card-container").forEach((function(t){i.push(t)}))}})),(l=document.getElementById("".concat(n)))&&l.querySelectorAll(".card-container").forEach((function(t){o.push(t)})),a&&l){s.classList.remove("active"),t.classList.add("active");var u=h.a.timeline({onComplete:function(){e.active=!0}});i.length>0&&u.to(i,{duration:.3,y:-30,opacity:0,stagger:.1,ease:"power3.inOut"}),u.add((function(){a.classList.remove("active"),l.classList.add("active")})),o.length>0&&u.from(o,{duration:.5,y:50,opacity:0,stagger:.1,ease:"power3.inOut"}),u.set(i,{y:0,opacity:1})}var c=$("#header").outerHeight();setTimeout((function(){h.a.to(window,{duration:.2,scrollTo:{y:t.closest(".news-feed"),offsetY:c}})}),20)}},{key:"beforeDestroy",value:function(){var t=this;this.tabs.forEach((function(e){e.removeEventListener("click",(function(){t.openTab(e)}))})),this.tabs=null}}])&&Ji(e.prototype,n),r&&Ji(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=Qi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(to,"instance",null);var eo=to;function no(t){return(no="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 ro(t){return function(t){if(Array.isArray(t))return io(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return io(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return io(t,e)}(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 io(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 oo(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,so(r.key),r)}}function so(t){var e=function(t,e){if("object"!=no(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=no(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==no(e)?e:String(e)}var ao,lo,uo,co,ho,po,fo,mo,go,vo,yo,_o,bo,xo,wo,Eo=function(){return"undefined"!=typeof window},To=function(){return ao||Eo()&&(ao=window.gsap)&&ao.registerPlugin&&ao},So=(Date.now,function(t){var e=co.querySelector(".ScrollSmoother-wrapper");return e||((e=co.createElement("div")).classList.add("ScrollSmoother-wrapper"),t.parentNode.insertBefore(e,t),e.appendChild(t)),e}),Ao=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),lo||t.register(ao)||console.warn("Please gsap.registerPlugin(ScrollSmoother)"),e=this.vars=e||{},vo&&vo.kill(),vo=this,xo(this);var r,i,o,s,a,l,u,c,h,d,p,f,m,g,v,y=e,_=y.smoothTouch,b=y.onUpdate,x=y.onStop,w=y.smooth,E=y.onFocusIn,T=y.normalizeScroll,S=y.wholePixels,A=this,M=e.effectsPrefix||"",D=go.getScrollFunc(uo),C=1===go.isTouch?!0===_?.8:parseFloat(_)||0:0===w||!1===w?0:parseFloat(w)||.8,R=C&&+e.speed||1,O=0,P=0,I=1,L=_o(0),N=function(){return L.update(-O)},F={y:0},k=function(){return r.style.overflow="visible"},U=function(t){t.update();var e=t.getTween();e&&(e.pause(),e._time=e._dur,e._tTime=e._tDur),g=!1,t.animation.progress(t.progress,!0)},B=function(e,n){(e!==O&&!d||n)&&(S&&(e=Math.round(e)),C&&(r.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+e+", 0, 1)",r._gsap.y=e+"px"),P=e-O,O=e,go.isUpdating||t.isRefreshing||go.update())},G=function(t){return arguments.length?(t<0&&(t=0),F.y=-t,g=!0,d?O=-t:B(-t),go.isRefreshing?s.update():D(t/R),this):-O},z="undefined"!=typeof ResizeObserver&&!1!==e.autoResize&&new ResizeObserver((function(){if(!go.isRefreshing){var t=go.maxScroll(i);t<-O&&G(t),wo.restart(!0)}})),H=function(t){i.scrollTop=0,t.target.contains&&t.target.contains(i)||E&&!1===E(n,t)||(go.isInViewport(t.target)||t.target===v||n.scrollTo(t.target,!1,"center center"),v=t.target)},j=function(t,e){var n,r,i,o;a.forEach((function(e){n=e.pins,o=e.markers,t.forEach((function(t){e.trigger&&t.trigger&&e!==t&&(t.trigger===e.trigger||t.pinnedContainer===e.trigger||e.trigger.contains(t.trigger))&&(r=t.start,i=(r-e.start-e.offset)/e.ratio-(r-e.start),n.forEach((function(t){return i-=t.distance/e.ratio-t.distance})),t.setPositions(r+i,t.end+i),t.markerStart&&o.push(ao.quickSetter([t.markerStart,t.markerEnd],"y","px")),t.pin&&t.end>0&&(i=t.end-t.start,n.push({start:t.start,end:t.end,distance:i,trig:t}),e.setPositions(e.start,e.end+i),e.vars.onRefresh(e)))}))}))},V=function(){k(),requestAnimationFrame(k),a&&(a.forEach((function(t){var e=t.start,n=t.auto?Math.min(go.maxScroll(t.scroller),t.end):e+(t.end-e)/t.ratio,r=(n-t.end)/2;e-=r,n-=r,t.offset=r||1e-4,t.pins.length=0,t.setPositions(Math.min(e,n),Math.max(e,n)),t.vars.onRefresh(t)})),j(go.sort())),L.reset()},X=function(){return go.addEventListener("refresh",V)},W=function(){return a&&a.forEach((function(t){return t.vars.onRefresh(t)}))},Y=function(){return a&&a.forEach((function(t){return t.vars.onRefreshInit(t)})),W},q=function(t,e,n,r){return function(){var i="function"==typeof e?e(n,r):e;return i||0===i||(i=r.getAttribute("data-"+M+t)||("speed"===t?1:0)),r.setAttribute("data-"+M+t,i),"auto"===i?i:parseFloat(i)}},$=function(t,e,n,r,o){o=("function"==typeof o?o(r,t):o)||0;var s,l,u,c,h,d,p=q("speed",e,r,t),f=q("lag",n,r,t),m=ao.getProperty(t,"y"),g=t._gsap,v=function(){e=p(),n=f(),s=parseFloat(e)||1,h=(u="auto"===e)?0:.5,c&&c.kill(),c=n&&ao.to(t,{ease:yo,overwrite:!1,y:"+=0",duration:n}),l&&(l.ratio=s,l.autoSpeed=u)},y=function(){g.y=m+"px",g.renderTransform(1),v()},_=[],b=[],x=0,w=function(e){if(u){y();var n=function(t,e){var n,r,i=t.parentNode||ho,o=t.getBoundingClientRect(),s=i.getBoundingClientRect(),a=s.top-o.top,l=s.bottom-o.bottom,u=(Math.abs(a)>Math.abs(l)?a:l)/(1-e),c=-u*e;return u>0&&(r=.5===(n=s.height/(uo.innerHeight+s.height))?2*s.height:2*Math.min(s.height,-u*n/(2*n-1))*(e||1),c+=e?-r*e:-r/2,u+=r),{change:u,offset:c}}(t,mo(0,1,-e.start/(e.end-e.start)));x=n.change,d=n.offset}else x=(e.end-e.start)*(1-s),d=0;_.forEach((function(t){return x-=t.distance*(1-s)})),e.vars.onUpdate(e),c&&c.progress(1)};return v(),(1!==s||u||c)&&(w(l=go.create({trigger:u?t.parentNode:t,start:"top bottom+="+o,end:"bottom top-="+o,scroller:i,scrub:!0,refreshPriority:-999,onRefreshInit:y,onRefresh:w,onKill:function(t){var e=a.indexOf(t);e>=0&&a.splice(e,1),y()},onUpdate:function(t){var e,n,r,i=m+x*(t.progress-h),o=_.length,s=0;if(t.offset){if(o){for(n=-O,r=t.end;o--;){if((e=_[o]).trig.isActive||n>=e.start&&n<=e.end)return void(c&&(e.trig.progress+=e.trig.direction<0?.001:-.001,e.trig.update(0,0,1),c.resetTo("y",parseFloat(g.y),-P,!0),I&&c.progress(1)));n>e.end&&(s+=e.distance),r-=e.distance}i=m+s+x*((ao.utils.clamp(t.start,t.end,n)-t.start-s)/(r-t.start)-h)}i=function(t){return Math.round(1e5*t)/1e5||0}(i+d),b.length&&!u&&b.forEach((function(t){return t(i-s)})),c?(c.resetTo("y",i,-P,!0),I&&c.progress(1)):(g.y=i+"px",g.renderTransform(1))}}})),ao.core.getCache(l.trigger).stRevert=Y,l.startY=m,l.pins=_,l.markers=b,l.ratio=s,l.autoSpeed=u,t.style.willChange="transform"),l};function K(){return o=r.clientHeight,r.style.overflow="visible",po.style.height=uo.innerHeight+(o-uo.innerHeight)/R+"px",o-uo.innerHeight}X(),go.addEventListener("killAll",X),ao.delayedCall(.5,(function(){return I=0})),this.scrollTop=G,this.scrollTo=function(t,e,r){var i=ao.utils.clamp(0,go.maxScroll(uo),isNaN(t)?n.offset(t,r):+t);e?d?ao.to(n,{duration:C,scrollTop:i,overwrite:"auto",ease:yo}):D(i):G(i)},this.offset=function(t,e){var n,r=(t=fo(t)[0]).style.cssText,i=go.create({trigger:t,start:e||"top top"});return a&&j([i]),n=i.start/R,i.kill(!1),t.style.cssText=r,ao.core.getCache(t).uncache=1,n},this.content=function(t){if(arguments.length){var e=fo(t||"#smooth-content")[0]||console.warn("ScrollSmoother needs a valid content element.")||po.children[0];return e!==r&&(h=(r=e).getAttribute("style")||"",z&&z.observe(r),ao.set(r,{overflow:"visible",width:"100%",boxSizing:"border-box",y:"+=0"}),C||ao.set(r,{clearProps:"transform"})),this}return r},this.wrapper=function(t){return arguments.length?(i=fo(t||"#smooth-wrapper")[0]||So(r),c=i.getAttribute("style")||"",K(),ao.set(i,C?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):i},this.effects=function(t,e){var n;if(a||(a=[]),!t)return a.slice(0);(t=fo(t)).forEach((function(t){for(var e=a.length;e--;)a[e].trigger===t&&a[e].kill()}));var r,i,o=e=e||{},s=o.speed,l=o.lag,u=o.effectsPadding,c=[];for(r=0;r<t.length;r++)(i=$(t[r],s,l,r,u))&&c.push(i);return(n=a).push.apply(n,c),c},this.sections=function(t,e){var n;if(l||(l=[]),!t)return l.slice(0);var r=fo(t).map((function(t){return go.create({trigger:t,start:"top 120%",end:"bottom -20%",onToggle:function(e){t.style.opacity=e.isActive?"1":"0",t.style.pointerEvents=e.isActive?"all":"none"}})}));return e&&e.add?(n=l).push.apply(n,ro(r)):l=r.slice(0),r},this.content(e.content),this.wrapper(e.wrapper),this.render=function(t){return B(t||0===t?t:O)},this.getVelocity=function(){return L.getVelocity(-O)},go.scrollerProxy(i,{scrollTop:G,scrollHeight:function(){return K()&&po.scrollHeight},fixedMarkers:!1!==e.fixedMarkers&&!!C,content:r,getBoundingClientRect:function(){return{top:0,left:0,width:uo.innerWidth,height:uo.innerHeight}}}),go.defaults({scroller:i});var Z=go.getAll().filter((function(t){return t.scroller===uo||t.scroller===i}));Z.forEach((function(t){return t.revert(!0,!0)})),s=go.create({animation:ao.fromTo(F,{y:0},{y:function(){return-K()},immediateRender:!1,ease:"none",data:"ScrollSmoother",duration:100,onUpdate:function(){if(this._dur){var t=g;t&&(U(s),F.y=O),B(F.y,t),N(),b&&!d&&b(A)}}}),onRefreshInit:function(e){if(t.isRefreshing=!0,a){var n=go.getAll().filter((function(t){return!!t.pin}));a.forEach((function(t){t.vars.pinnedContainer||n.forEach((function(e){if(e.pin.contains(t.trigger)){var n=t.vars;n.pinnedContainer=e.pin,t.vars=null,t.init(n,t.animation)}}))}))}var r=e.getTween();m=r&&r._end>r._dp._time,f=O,F.y=0,C&&(1===go.isTouch&&(i.style.position="absolute"),i.scrollTop=0,1===go.isTouch&&(i.style.position="fixed"))},onRefresh:function(e){e.animation.invalidate(),e.setPositions(e.start,K()/R),m||U(e),F.y=-D()*R,B(F.y),I||e.animation.progress(ao.utils.clamp(0,1,f/R/-e.end)),m&&(e.progress-=.001,e.update()),t.isRefreshing=!1},id:"ScrollSmoother",scroller:uo,invalidateOnRefresh:!0,start:0,refreshPriority:-9999,end:function(){return K()/R},onScrubComplete:function(){L.reset(),x&&x(n)},scrub:C||!0}),this.smooth=function(t){return arguments.length&&(R=(C=t||0)&&+e.speed||1,s.scrubDuration(t)),s.getTween()?s.getTween().duration():0},s.getTween()&&(s.getTween().vars.ease=e.ease||yo),this.scrollTrigger=s,e.effects&&this.effects(!0===e.effects?"[data-"+M+"speed], [data-"+M+"lag]":e.effects,{effectsPadding:e.effectsPadding}),e.sections&&this.sections(!0===e.sections?"[data-section]":e.sections),Z.forEach((function(t){t.vars.scroller=i,t.revert(!1,!0),t.init(t.vars,t.animation)})),this.paused=function(t,e){return arguments.length?(!!d!==t&&(t?(s.getTween()&&s.getTween().pause(),D(-O/R),L.reset(),(p=go.normalizeScroll())&&p.disable(),(d=go.observe({preventDefault:!0,type:"wheel,touch,scroll",debounce:!1,allowClicks:!0,onChangeY:function(){return G(-O)}})).nested=bo(ho,"wheel,touch,scroll",!0,!1!==e)):(d.nested.kill(),d.kill(),d=0,p&&p.enable(),s.progress=(-O/R-s.start)/(s.end-s.start),U(s))),this):!!d},this.kill=this.revert=function(){n.paused(!1),U(s),s.kill();for(var t=(a||[]).concat(l||[]),e=t.length;e--;)t[e].kill();go.scrollerProxy(i),go.removeEventListener("killAll",X),go.removeEventListener("refresh",V),i.style.cssText=c,r.style.cssText=h;var o=go.defaults({});o&&o.scroller===i&&go.defaults({scroller:uo}),n.normalizer&&go.normalizeScroll(!1),clearInterval(u),vo=null,z&&z.disconnect(),po.style.removeProperty("height"),uo.removeEventListener("focusin",H)},this.refresh=function(t,e){return s.refresh(t,e)},T&&(this.normalizer=go.normalizeScroll(!0===T?{debounce:!0,content:!C&&r}:T)),go.config(e),"overscrollBehavior"in uo.getComputedStyle(po)&&ao.set([po,ho],{overscrollBehavior:"none"}),"scrollBehavior"in uo.getComputedStyle(po)&&ao.set([po,ho],{scrollBehavior:"auto"}),uo.addEventListener("focusin",H),u=setInterval(N,250),"loading"===co.readyState||requestAnimationFrame((function(){return go.refresh()}))}var e,n,r;return e=t,r=[{key:"register",value:function(e){return lo||(ao=e||To(),Eo()&&window.document&&(uo=window,co=document,ho=co.documentElement,po=co.body),ao&&(fo=ao.utils.toArray,mo=ao.utils.clamp,yo=ao.parseEase("expo"),xo=ao.core.context||function(){},wo=ao.delayedCall(.2,(function(){return go.isRefreshing||vo&&vo.refresh()})).pause(),go=ao.core.globals().ScrollTrigger,ao.core.globals("ScrollSmoother",t),po&&go&&([uo,co,ho,po],_o=go.core._getVelocityProp,bo=go.core._inputObserver,t.refresh=go.refresh,lo=1))),lo}}],(n=[{key:"progress",get:function(){return this.scrollTrigger?this.scrollTrigger.animation._time/100:0}}])&&oo(e.prototype,n),r&&oo(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();Ao.version="3.11.5",Ao.create=function(t){return vo&&t&&vo.content()===fo(t.content)[0]?vo:new Ao(t)},Ao.get=function(){return vo},To()&&ao.registerPlugin(Ao);var Mo=/([\uD800-\uDBFF][\uDC00-\uDFFF](?:[\u200D\uFE0F][\uD800-\uDBFF][\uDC00-\uDFFF]){2,}|\uD83D\uDC69(?:\u200D(?:(?:\uD83D\uDC69\u200D)?\uD83D\uDC67|(?:\uD83D\uDC69\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D(?:\uD83D\uDC69\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]\uFE0F|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC6F\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3C-\uDD3E\uDDD6-\uDDDF])\u200D[\u2640\u2642]\uFE0F|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F\u200D[\u2640\u2642]|(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642])\uFE0F|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\uD83D\uDC69\u200D[\u2695\u2696\u2708]|\uD83D\uDC68(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708]))\uFE0F|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83D\uDC69\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|\uD83D\uDC68(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66\u200D\uD83D\uDC66|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92])|(?:\uD83C[\uDFFB-\uDFFF])\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]))|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDD1-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\u200D(?:(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC67|(?:(?:\uD83D[\uDC68\uDC69])\u200D)?\uD83D\uDC66)|\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC69\uDC6E\uDC70-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD18-\uDD1C\uDD1E\uDD1F\uDD26\uDD30-\uDD39\uDD3D\uDD3E\uDDD1-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])?|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDEEB\uDEEC\uDEF4-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u2660\u2663\u2665\u2666\u2668\u267B\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEF8]|\uD83E[\uDD10-\uDD3A\uDD3C-\uDD3E\uDD40-\uDD45\uDD47-\uDD4C\uDD50-\uDD6B\uDD80-\uDD97\uDDC0\uDDD0-\uDDE6])\uFE0F)/;function Do(t){return(Do="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 Co(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,Ro(r.key),r)}}function Ro(t){var e=function(t,e){if("object"!=Do(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Do(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Do(e)?e:String(e)}var Oo,Po,Io,Lo,No,Fo,ko=/(?:\r|\n|\t\t)/g,Uo=/(?:\s\s+)/g,Bo=function(t){Oo=document,Po=window,(Lo=Lo||t||Po.gsap||console.warn("Please gsap.registerPlugin(SplitText)"))&&(Fo=Lo.utils.toArray,No=Lo.core.context||function(){},Io=1)},Go=function(t){return Po.getComputedStyle(t)},zo=function(t){return"absolute"===t.position||!0===t.absolute},Ho=function(t,e){for(var n,r=e.length;--r>-1;)if(n=e[r],t.substr(0,n.length)===n)return n.length},jo=" style='position:relative;display:inline-block;'",Vo=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0,n=~t.indexOf("++"),r=1;return n&&(t=t.split("++").join("")),function(){return"<"+e+jo+(t?" class='"+t+(n?r++:"")+"'>":">")}},Xo=function t(e,n,r){var i=e.nodeType;if(1===i||9===i||11===i)for(e=e.firstChild;e;e=e.nextSibling)t(e,n,r);else 3!==i&&4!==i||(e.nodeValue=e.nodeValue.split(n).join(r))},Wo=function(t,e){for(var n=e.length;--n>-1;)t.push(e[n])},Yo=function(t,e,n){for(var r;t&&t!==e;){if(r=t._next||t.nextSibling)return r.textContent.charAt(0)===n;t=t.parentNode||t._parent}},qo=function t(e){var n,r,i=Fo(e.childNodes),o=i.length;for(n=0;n<o;n++)(r=i[n])._isSplit?t(r):n&&r.previousSibling&&3===r.previousSibling.nodeType?(r.previousSibling.nodeValue+=3===r.nodeType?r.nodeValue:r.firstChild.nodeValue,e.removeChild(r)):3!==r.nodeType&&(e.insertBefore(r.firstChild,r),e.removeChild(r))},$o=function(t,e){return parseFloat(e[t])||0},Ko=function(t,e,n,r,i,o,s){var a,l,u,c,h,d,p,f,m,g,v,y,_=Go(t),b=$o("paddingLeft",_),x=-999,w=$o("borderBottomWidth",_)+$o("borderTopWidth",_),E=$o("borderLeftWidth",_)+$o("borderRightWidth",_),T=$o("paddingTop",_)+$o("paddingBottom",_),S=$o("paddingLeft",_)+$o("paddingRight",_),A=$o("fontSize",_)*(e.lineThreshold||.2),M=_.textAlign,D=[],C=[],R=[],O=e.wordDelimiter||" ",P=e.tag?e.tag:e.span?"span":"div",I=e.type||e.split||"chars,words,lines",L=i&&~I.indexOf("lines")?[]:null,N=~I.indexOf("words"),F=~I.indexOf("chars"),k=zo(e),U=e.linesClass,B=~(U||"").indexOf("++"),G=[],z="flex"===_.display,H=t.style.display;for(B&&(U=U.split("++").join("")),z&&(t.style.display="block"),u=(l=t.getElementsByTagName("*")).length,h=[],a=0;a<u;a++)h[a]=l[a];if(L||k)for(a=0;a<u;a++)((d=(c=h[a]).parentNode===t)||k||F&&!N)&&(y=c.offsetTop,L&&d&&Math.abs(y-x)>A&&("BR"!==c.nodeName||0===a)&&(p=[],L.push(p),x=y),k&&(c._x=c.offsetLeft,c._y=y,c._w=c.offsetWidth,c._h=c.offsetHeight),L&&((c._isSplit&&d||!F&&d||N&&d||!N&&c.parentNode.parentNode===t&&!c.parentNode._isSplit)&&(p.push(c),c._x-=b,Yo(c,t,O)&&(c._wordEnd=!0)),"BR"===c.nodeName&&(c.nextSibling&&"BR"===c.nextSibling.nodeName||0===a)&&L.push([])));for(a=0;a<u;a++)if(d=(c=h[a]).parentNode===t,"BR"!==c.nodeName)if(k&&(m=c.style,N||d||(c._x+=c.parentNode._x,c._y+=c.parentNode._y),m.left=c._x+"px",m.top=c._y+"px",m.position="absolute",m.display="block",m.width=c._w+1+"px",m.height=c._h+"px"),!N&&F)if(c._isSplit)for(c._next=l=c.nextSibling,c.parentNode.appendChild(c);l&&3===l.nodeType&&" "===l.textContent;)c._next=l.nextSibling,c.parentNode.appendChild(l),l=l.nextSibling;else c.parentNode._isSplit?(c._parent=c.parentNode,!c.previousSibling&&c.firstChild&&(c.firstChild._isFirst=!0),c.nextSibling&&" "===c.nextSibling.textContent&&!c.nextSibling.nextSibling&&G.push(c.nextSibling),c._next=c.nextSibling&&c.nextSibling._isFirst?null:c.nextSibling,c.parentNode.removeChild(c),h.splice(a--,1),u--):d||(y=!c.nextSibling&&Yo(c.parentNode,t,O),c.parentNode._parent&&c.parentNode._parent.appendChild(c),y&&c.parentNode.appendChild(Oo.createTextNode(" ")),"span"===P&&(c.style.display="inline"),D.push(c));else c.parentNode._isSplit&&!c._isSplit&&""!==c.innerHTML?C.push(c):F&&!c._isSplit&&("span"===P&&(c.style.display="inline"),D.push(c));else L||k?(c.parentNode&&c.parentNode.removeChild(c),h.splice(a--,1),u--):N||t.appendChild(c);for(a=G.length;--a>-1;)G[a].parentNode.removeChild(G[a]);if(L){for(k&&(g=Oo.createElement(P),t.appendChild(g),v=g.offsetWidth+"px",y=g.offsetParent===t?0:t.offsetLeft,t.removeChild(g)),m=t.style.cssText,t.style.cssText="display:none;";t.firstChild;)t.removeChild(t.firstChild);for(f=" "===O&&(!k||!N&&!F),a=0;a<L.length;a++){for(p=L[a],(g=Oo.createElement(P)).style.cssText="display:block;text-align:"+M+";position:"+(k?"absolute;":"relative;"),U&&(g.className=U+(B?a+1:"")),R.push(g),u=p.length,l=0;l<u;l++)"BR"!==p[l].nodeName&&(c=p[l],g.appendChild(c),f&&c._wordEnd&&g.appendChild(Oo.createTextNode(" ")),k&&(0===l&&(g.style.top=c._y+"px",g.style.left=b+y+"px"),c.style.top="0px",y&&(c.style.left=c._x-y+"px")));0===u?g.innerHTML="&nbsp;":N||F||(qo(g),Xo(g,String.fromCharCode(160)," ")),k&&(g.style.width=v,g.style.height=c._h+"px"),t.appendChild(g)}t.style.cssText=m}k&&(s>t.clientHeight&&(t.style.height=s-T+"px",t.clientHeight<s&&(t.style.height=s+w+"px")),o>t.clientWidth&&(t.style.width=o-S+"px",t.clientWidth<o&&(t.style.width=o+E+"px"))),z&&(H?t.style.display=H:t.style.removeProperty("display")),Wo(n,D),N&&Wo(r,C),Wo(i,R)},Zo=function(t,e,n,r){var i,o,s,a,l,u,c,h,d=e.tag?e.tag:e.span?"span":"div",p=~(e.type||e.split||"chars,words,lines").indexOf("chars"),f=zo(e),m=e.wordDelimiter||" ",g=" "!==m?"":f?"&#173; ":" ",v="</"+d+">",y=1,_=e.specialChars?"function"==typeof e.specialChars?e.specialChars:Ho:null,b=Oo.createElement("div"),x=t.parentNode;for(x.insertBefore(b,t),b.textContent=t.nodeValue,x.removeChild(t),c=-1!==(i=function t(e){var n=e.nodeType,r="";if(1===n||9===n||11===n){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)r+=t(e)}else if(3===n||4===n)return e.nodeValue;return r}(t=b)).indexOf("<"),!1!==e.reduceWhiteSpace&&(i=i.replace(Uo," ").replace(ko,"")),c&&(i=i.split("<").join("{{LT}}")),l=i.length,o=(" "===i.charAt(0)?g:"")+n(),s=0;s<l;s++)if(u=i.charAt(s),_&&(h=_(i.substr(s),e.specialChars)))u=i.substr(s,h||1),o+=p&&" "!==u?r()+u+"</"+d+">":u,s+=h-1;else if(u===m&&i.charAt(s-1)!==m&&s){for(o+=y?v:"",y=0;i.charAt(s+1)===m;)o+=g,s++;s===l-1?o+=g:")"!==i.charAt(s+1)&&(o+=g+n(),y=1)}else"{"===u&&"{{LT}}"===i.substr(s,6)?(o+=p?r()+"{{LT}}</"+d+">":"{{LT}}",s+=5):u.charCodeAt(0)>=55296&&u.charCodeAt(0)<=56319||i.charCodeAt(s+1)>=65024&&i.charCodeAt(s+1)<=65039?(a=((i.substr(s,12).split(Mo)||[])[1]||"").length||2,o+=p&&" "!==u?r()+i.substr(s,a)+"</"+d+">":i.substr(s,a),s+=a-1):o+=p&&" "!==u?r()+u+"</"+d+">":u;t.outerHTML=o+(y?v:""),c&&Xo(x,"{{LT}}","<")},Jo=function t(e,n,r,i){var o,s,a=Fo(e.childNodes),l=a.length,u=zo(n);if(3!==e.nodeType||l>1){for(n.absolute=!1,o=0;o<l;o++)(s=a[o])._next=s._isFirst=s._parent=s._wordEnd=null,(3!==s.nodeType||/\S+/.test(s.nodeValue))&&(u&&3!==s.nodeType&&"inline"===Go(s).display&&(s.style.display="inline-block",s.style.position="relative"),s._isSplit=!0,t(s,n,r,i));return n.absolute=u,void(e._isSplit=!0)}Zo(e,n,r,i)},Qo=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),Io||Bo(),this.elements=Fo(e),this.chars=[],this.words=[],this.lines=[],this._originals=[],this.vars=n||{},No(this),this.split(n)}var e,n,r;return e=t,r=[{key:"create",value:function(e,n){return new t(e,n)}}],(n=[{key:"split",value:function(t){this.isSplit&&this.revert(),this.vars=t=t||this.vars,this._originals.length=this.chars.length=this.words.length=this.lines.length=0;for(var e,n,r,i=this.elements.length,o=t.tag?t.tag:t.span?"span":"div",s=Vo(t.wordsClass,o),a=Vo(t.charsClass,o);--i>-1;)r=this.elements[i],this._originals[i]=r.innerHTML,e=r.clientHeight,n=r.clientWidth,Jo(r,t,s,a),Ko(r,t,this.chars,this.words,this.lines,n,e);return this.chars.reverse(),this.words.reverse(),this.lines.reverse(),this.isSplit=!0,this}},{key:"revert",value:function(){var t=this._originals;if(!t)throw"revert() call wasn't scoped properly.";return this.elements.forEach((function(e,n){return e.innerHTML=t[n]})),this.chars=[],this.words=[],this.lines=[],this.isSplit=!1,this}}])&&Co(e.prototype,n),r&&Co(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ts(t){return(ts="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 es(t){return function(t){if(Array.isArray(t))return ns(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return ns(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ns(t,e)}(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 ns(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 rs(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,is(r.key),r)}}function is(t){var e=function(t,e){if("object"!=ts(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ts(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ts(e)?e:String(e)}Qo.version="3.11.5",Qo.register=Bo,h.b.registerPlugin(rn,Ao,Qo);var os=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=Object.assign({},this.defaultOptions,e),this.options.container.querySelectorAll("[data-split-text-animate]").length>0&&this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){return null===t.instance&&(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(e){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"defaultOptions",get:function(){return{selector:null,container:document}}},{key:"init",value:function(){this.options.container.querySelectorAll("[data-split-text-animate]").length>0&&(this.initSplitText(),this.initResizeSplitText())}},{key:"initSplitText",value:function(){var t=this;this.splitTextEls=es(this.options.container.querySelectorAll("[data-split-text-animate]")),this.splitTextArray=[],this.splitTextEls.forEach((function(e){var n=new Qo(e,{type:"lines"}),r=n.lines,i=e.hasAttribute("data-appear-reverse")?"play none none reverse":"play none none none";t.splitTextArray.push(n);var o=h.b.timeline({scrollTrigger:{trigger:e,start:"top 90%",end:"bottom 10%",scroller:"[data-scroll-container]",markers:!1,toggleActions:i},onComplete:function(){n.revert(),t.splitTextEls.forEach((function(t){t.style.willChange="auto"})),t.splitTextEls.forEach((function(t){t.style.willChange="auto"}))}});o.from(r,{y:40,opacity:0,duration:1,stagger:{amount:.5,ease:"circ.out"}});var s=e.parentNode.querySelectorAll("[data-split-text-animate-next]");s.length>0&&o.from(s,{y:40,opacity:0,duration:.8,ease:"circ.out",clearProps:"all"},.1*r.length)}))}},{key:"initResizeSplitText",value:function(){var t,e=this,n=!1,r=window.innerWidth;window.addEventListener("resize",(function(i){window.innerWidth!==r&&(r=window.innerWidth,t=new Date,!1===n&&(n=!0,null!==e.splitTextArray&&(e.splitTextArray.length>0&&e.splitTextArray.forEach((function(t){t.revert()})),setTimeout(e.checkResizeFinish,200))))})),this.checkResizeFinish=function(){new Date-t<200?setTimeout(e.checkResizeFinish,200):(n=!1,e.initSplitText())}}},{key:"beforeDestroy",value:function(){null!==this.splitTextEls&&(rn.getAll().forEach((function(t){t.kill(!0)})),this.splitTextEls=null,this.checkResizeFinish=null,this.splitTextArray=null)}}])&&rs(e.prototype,n),r&&rs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=is(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(os,"instance",null);var ss=os;var as=function(t){var e=$(".signup-form #email");e.parent().addClass("invalid"),e.parent().removeClass("success"),e.val(""),e.attr("placeholder",t)};function ls(t){return(ls="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 us(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function cs(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?us(Object(n),!0).forEach((function(e){ds(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):us(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function hs(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,ps(r.key),r)}}function ds(t,e,n){return(e=ps(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ps(t){var e=function(t,e){if("object"!=ls(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ls(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ls(e)?e:String(e)}h.b.registerPlugin(rn,ji);var fs=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.options=cs(cs({},this.defaultOptions),e),this.options.initialHeight=this.options.trigger.offsetHeight,this.options.currentHeight=this.options.trigger.offsetHeight;var r=h.b.matchMedia();r.add("(min-width: 1080px)",(function(){n.initObserver()})),r.add("(max-width: 1079px)",(function(){t.destroy()}))}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(this.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"defaultOptions",get:function(){return{selector:null,trigger:null,initialHeight:0,currentHeight:0}}},{key:"init",value:function(){var t=this;this.timeline=rn.create({trigger:this.options.trigger,start:"top +=".concat(document.querySelector(".header").offsetHeight,"}}"),end:function(){return"+=".concat(t.options.currentHeight-t.options.initialHeight,"}")},pin:!0,pinSpacing:!1,markers:!1})}},{key:"beforeDestroy",value:function(){var t=this;h.b.to(window,{duration:.1,scrollTo:".section-spotlight",onComplete:function(){t.timeline.kill()}})}},{key:"initObserver",value:function(){var t=this;new ResizeObserver((function(){t.options.currentHeight<t.options.trigger.offsetHeight&&(t.options.currentHeight=t.options.trigger.offsetHeight,rn.refresh(),t.init())})).observe(this.options.trigger)}}])&&hs(e.prototype,n),r&&hs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ms(t){return(ms="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 gs(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,vs(r.key),r)}}function vs(t){var e=function(t,e){if("object"!=ms(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ms(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ms(e)?e:String(e)}ds(fs,"instance",null);var ys=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.activeEl=null,this.timeoutId=null,this.item=e.querySelectorAll("[data-hover]"),this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"init",value:function(){var t=this;this.item.length&&(this.activeEl=this.item[0],this.activeEl.classList.add("active"),this.item.forEach((function(e){e.addEventListener("mouseenter",(function(){if(clearTimeout(t.timeoutId),e!==t.activeEl){t.activeEl.classList.remove("active"),t.activeEl=e,t.activeEl.classList.add("active");var n=t.activeEl.getAttribute("data-hover"),r=document.getElementById(n);t.timeoutId=setTimeout((function(){var e=t.activeEl.children[0].getAttribute("src");r.setAttribute("src",e),r.style.opacity=0,r.onload=function(){r.style.opacity=1}}),400)}}))})))}},{key:"beforeDestroy",value:function(){this.item.forEach((function(t){t.removeEventListener("mouseenter")}))}}])&&gs(e.prototype,n),r&&gs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=vs(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(ys,"instance",null);var _s=ys,bs=function(){var t=function(t){var e=$("#founder-spotlight-nonce").val();$.ajax({type:"post",dataType:"json",url:wp_ajax.ajaxurl,data:{action:"founders_spotlight",page:t,nonce:e},success:function(t){$(".spotlight-list").html(t.html),t.is_last?($(".bg-load-spotlights").hide(),$(".bg-hide-spotlights").show()):($(".bg-load-spotlights").show(),$(".bg-hide-spotlights").hide()),_s.create(),$(".bg-load-spotlights").html("Load More")},error:function(t){console.log(t)}})};$(".bg-load-spotlights").on("click",(function(){fs.create({selector:document.querySelector("[data-sticky-scroll"),trigger:document.querySelector("[data-sticky-scroll-trigger]")});var e=$(".bg-load-spotlights").data("page");e+=1,$(".bg-load-spotlights").data("page",e),$(".bg-load-spotlights").html('<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" style="margin: auto; background: none; display: block; shape-rendering: auto;" width="16px" height="16px" viewBox="0 0 24 24" preserveAspectRatio="xMidYMid">\n      <circle cx="12" cy="12" fill="none" stroke="#ffffff" stroke-width="2" r="8" stroke-dasharray="18.84955592153876 8.283185307179586">\n      <animateTransform attributeName="transform" type="rotate" repeatCount="indefinite" dur="1s" values="0 12 12;360 12 12" keyTimes="0;1"/>\n      </circle>\n    </svg>'),t(e)})),$(".bg-hide-spotlights").on("click",(function(){fs.destroy(),setTimeout((function(){$(".bg-load-spotlights").data("page",1),t(1)}),300)}))};function xs(t){return(xs="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 ws(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,Es(r.key),r)}}function Es(t){var e=function(t,e){if("object"!=xs(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=xs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==xs(e)?e:String(e)}si.use([hi]);var Ts=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.options=Object.assign({},t.defaultOptions,e);var r=this;this.resize(),this.initEvents(),this.firstMove=!0,this.speed=parseFloat(this.options.selector.getAttribute("data-speed-slide")),this.slider=new si(this.options.selector,{slidesPerView:1.098,spaceBetween:33,slidesPerGroup:1,loop:!0,setWrapperSize:!0,roundLengths:!0,grabCursor:!0,watchSlidesProgress:!0,loopPreventsSlide:!0,mousewheel:!1,speed:this.options.mobileSpeed||r.speed,loopFillGroupWithBlank:!0,pagination:{el:this.options.pagination,type:"custom",renderCustom:function(t,e,n){var i=parseInt(t.el.dataset.foundersCount),o=r.getSlidesPerGroup(t),s=Math.ceil(i/o);return("0"+(e<=s?e:e%s||s)).slice(-2)+"/"+"0".concat(s).slice(-2)}},navigation:{nextEl:this.options.next,prevEl:this.options.prev},breakpoints:this.options.breakpoints||{768:{slidesPerView:2,spaceBetween:64,slidesPerGroup:2,speed:r.speed},1024:{slidesPerView:2,spaceBetween:64,slidesPerGroup:2,speed:r.speed},1280:{slidesPerView:5,spaceBetween:116,slidesPerGroup:3,speed:r.speed}},on:{beforeInit:function(t){if(0!=t.el.querySelectorAll(".swiper-slide").length&&t.slides.length<3)for(var e=0;e<2;e++)t.el.querySelectorAll(".swiper-slide").forEach((function(e){var n=e.cloneNode(!0);t.el.querySelectorAll(".swiper-wrapper")[0].appendChild(n)}))},init:function(t){var e=r.speed/1e3,i=2*r.speed/1e3;if(r.handleClickBlurImage(t),"home"==n.options.namespace||"home-india"==n.options.namespace||"focus-area"==n.options.namespace)switch(r.breakpoint){case"desktop":h.a.set(n.options.selector,{x:-115}),h.a.to(n.options.selector,{x:0,duration:e,delay:i,onComplete:function(){n.firstMove=!1}});break;case"tablet":h.a.set(n.options.selector,{x:-72}),h.a.to(n.options.selector,{x:0,duration:e,delay:i,onComplete:function(){n.firstMove=!1}})}},progress:function(t,e){for(var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:n.options.unblurAmount,o=0;o<t.slides.length;o+=1){var s=t.slides[o].firstElementChild,a=t.slides[o].progress,l=Math.abs(a),u=0;switch(r.breakpoint){case"uhd":a<=-1&&a>=-i?u=0:a>=0||a<=-(i+1)?u=10:a>=-(i+1)&&a<-i?u=xi(0,10,(l-i)/1):a>-1&&a<0&&(u=xi(10,0,l));break;case"widescreen":l>=.7&&l<=i?u=0:l>=i+1||l<=0?u=10:l>=i&&l<i+1?u=xi(0,10,(l-i)/.5):l>0&&l<.7&&(u=xi(10,0,l/.7));break;case"desktop":"home"==n.options.namespace||"home-india"==n.options.namespace||"focus-area"==n.options.namespace?a<=0&&a>=-1?u=0:a>=.5||a<=-1.5?u=10:a>0&&a<.5?u=xi(0,10,a/.5):a>-1.5&&a<-1&&(u=xi(10,0,(a+1.5)/.5)):a<=-1&&a>=-3?u=0:a>=0||a<=-4?u=10:a>=-4&&a<-3?u=xi(0,10,(l-3)/1):a>-1&&a<0&&(u=xi(10,0,l));break;case"tablet":"home"==n.options.namespace||"home-india"==n.options.namespace||"focus-area"==n.options.namespace?a<=0&&a>=-1?u=0:a>=.5||a<=-1.5?u=10:a>0&&a<.5?u=xi(0,10,a/.5):a>-1.5&&a<-1&&(u=xi(10,0,(a+1.5)/.5)):a<=-1&&a>=-2?u=0:a>=0||a<=-3?u=10:a>=-3&&a<-2?u=xi(0,10,(l-2)/1):a>-1&&a<0&&(u=xi(10,0,l));break;case"phone":a<.25&&a>-.25?u=0:a>=.75||a<=-.75?u=10:a>=.25&&a<.75?u=xi(0,10,(a-.25)/.5):a>-.75&&a<-.25&&(u=xi(10,0,(a+.75)/.5));break;default:u=0}u>0?(s.style.filter="blur(".concat(Math.floor(u),"px)"),s.parentElement.classList.remove("swiper-enable-link"),s.parentElement.classList.add("swiper-disable-link"),s.classList.remove("swiper-enable-link"),s.classList.add("swiper-disable-link")):(s.style.filter="none",s.parentElement.classList.contains("swiper-slide-duplicate")?(s.parentElement.classList.remove("swiper-enable-link"),s.parentElement.classList.add("swiper-disable-link"),s.classList.remove("swiper-enable-link"),s.classList.add("swiper-disable-link")):(s.parentElement.classList.add("swiper-enable-link"),s.parentElement.classList.remove("swiper-disable-link"),s.classList.add("swiper-enable-link"),s.classList.remove("swiper-disable-link")))}},setTransition:function(t,e){for(var n=0;n<t.slides.length;n+=1){t.slides[n].firstElementChild.style.transitionDuration="".concat(e,"ms")}},slideChange:function(t){n.handleClickBlurImage(t)},fromEdge:function(t){t.isBeginning&&t.slideNext(),t.isEnd&&t.slidePrev()}}}),this.slider.on("sliderFirstMove",(function(){switch(r.breakpoint){case"desktop":case"tablet":n.firstMove&&(n.firstMove=!1,h.a.to(n.options.selector,{x:0,duration:r.speed/1e3}))}}))}var e,n,r;return e=t,r=[{key:"create",value:function(e){if(null===t.instance)return e&&(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}},{key:"defaultOptions",get:function(){return{selector:null,container:document,next:"",prev:"",pagination:".swiper-pagination",unblurAmount:3,namespace:"home"}}}],(n=[{key:"getSlidesPerGroup",value:function(t){var e=t.params.breakpoints,n=Object.keys(e).filter((function(t){var e="(min-width: "+t+"px)";if(window.matchMedia(e).matches)return t})),r=!!n.length&&n[n.length-1];return r?e[r].slidesPerGroup:1}},{key:"handleClickBlurImage",value:function(t){var e="",n="",r=[];e=t.slides[t.activeIndex+1],n=t.slides[t.activeIndex];var i=t.slides;switch(this.breakpoint){case"uhd":case"widescreen":n=t.slides[t.activeIndex+3];break;case"desktop":case"tablet":e=t.slides[t.activeIndex],n=t.slides[t.activeIndex+1];break;case"phone":e=t.slides[t.activeIndex-1]}r=this.getAllSiblings(e,"prev"),this.getAllSiblings(n,"next").forEach((function(t){t.classList.remove("slide-blur-prev"),t.firstElementChild.classList.remove("slide-blur-prev"),t.classList.add("slide-blur-next"),t.firstElementChild.classList.add("slide-blur-next")})),r.forEach((function(t){t.classList.remove("slide-blur-next"),t.classList.add("slide-blur-prev"),t.firstElementChild.classList.remove("slide-blur-next"),t.firstElementChild.classList.add("slide-blur-prev")})),setTimeout((function(){i.forEach((function(e){$(e.firstElementChild).off("click"),e.matches(".slide-blur-prev.swiper-disable-link")&&$(e.firstElementChild).off().on("click",(function(e){e.preventDefault(),t.slidePrev()})),e.matches(".slide-blur-next.swiper-disable-link")&&$(e.firstElementChild).off().on("click",(function(e){e.preventDefault(),t.slideNext()}))}))}),100)}},{key:"getAllSiblings",value:function(t,e){for(var n=[],r=t;r;)switch(r!==t&&r.nodeType===Node.ELEMENT_NODE&&n.push(r),e){case"prev":case"previous":r=r.previousElementSibling||r.previousSibling;break;case"next":r=r.nextElementSibling||r.nextSibling}return n}},{key:"getBreakpoint",value:function(){var t={"(min-width: 1024px) and (max-width: 1279.98px)":"desktop","(min-width: 768px) and (max-width: 1023.98px)":"tablet","(max-width: 767.98px)":"phone","(min-width: 1280px) and (max-width: 1920px)":"widescreen","(min-width: 1921px)":"uhd"};for(var e in t)if(window.matchMedia(e).matches)return t[e];return null}},{key:"initEvents",value:function(){var t,e,n,r;this.onResize=(t=this.resize.bind(this),e=100,function(){var i=arguments;n=n||this,clearTimeout(r),r=setTimeout((function(){r=null,t.apply(n,i)}),e)}),window.addEventListener("resize",this.onResize)}},{key:"resizeHandler",value:function(){var t=this.getBreakpoint();this.breakpoint!==t&&(this.breakpoint=t,this.slider&&this.slider.update())}},{key:"resize",value:function(){var t=window.innerWidth;this.width!==t&&(this.width=t,this.resizeHandler())}},{key:"beforeDestroy",value:function(){this.slider.destroy(),window.removeEventListener("resize",this.onResize),this.breakpoint=null,this.width=null,this.slider=null}}])&&ws(e.prototype,n),r&&ws(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=Es(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(Ts,"instance",null);var Ss=Ts;function As(t){return(As="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 Ms(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,Ds(r.key),r)}}function Ds(t){var e=function(t,e){if("object"!=As(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=As(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==As(e)?e:String(e)}h.b.registerPlugin(rn);var Cs=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=Object.assign({},t.defaultOptions,e),this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}},{key:"getDefaultOptions",value:function(){return{container:null,selector:null}}}],(n=[{key:"init",value:function(){this.initScrollAnimations()}},{key:"initScrollAnimations",value:function(){this.options.selector.length>0&&(this.horizontalTl=this.options.selector.map((function(t){for(var e=t.querySelectorAll("span"),n=h.b.timeline({scrollTrigger:{trigger:t,start:"top bottom",end:"bottom top",scrub:!0,scroller:"[data-scroll-container]",markers:!1}}),r=0;r<e.length;r++){var i=r%2==0?"+=".concat(window.innerWidth/3):"-=".concat(window.innerWidth/3);n.to(e[r],{x:i,ease:"power1.out"},0)}return n})))}},{key:"beforeDestroy",value:function(){null!==this.horizontalTl&&(rn.getAll().forEach((function(t){t.kill()})),this.horizontalTl=null)}}])&&Ms(e.prototype,n),r&&Ms(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=Ds(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(Cs,"instance",null);var Rs=Cs;function Os(t){return(Os="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 Ps(t){return function(t){if(Array.isArray(t))return Is(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return Is(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Is(t,e)}(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 Is(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 Ls(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,Ns(r.key),r)}}function Ns(t){var e=function(t,e){if("object"!=Os(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Os(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Os(e)?e:String(e)}h.b.registerPlugin(rn);var Fs=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=Object.assign({},t.defaultOptions,e),this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}},{key:"getDefaultOptions",value:function(){return{container:null,selector:null}}}],(n=[{key:"init",value:function(){var t=this;this.initAppearBlocks(),this.initAppearSequence(),setTimeout((function(){t.initApperList()}),300)}},{key:"initAppearBlocks",value:function(){this.appearBlocks=Ps(this.options.container.querySelectorAll("[data-appear-block]")),(this.appearBlocks.length>0||null!==this.appearBlocks)&&this.appearBlocks.forEach((function(t){var e=t.dataset.appearBlock,n=t.hasAttribute("data-appear-reverse")?"play none none reverse":"play none none none",r=t.dataset.appearDelay||0,i=h.b.from(t,{scrollTrigger:{trigger:t,start:"top 80%",end:"bottom 20%",scroller:"[data-scroll-container]",markers:!1,toggleActions:n},y:"fadein"!==e?100:0,autoAlpha:0,duration:1,ease:"power1.out",delay:r,clearProps:"all",onComplete:function(e){i.scrollTrigger.kill(),i.kill(),i=null,t.style.willChange="auto"}})}))}},{key:"initAppearSequence",value:function(){var t=this;this.appearSequenced=Ps(this.options.container.querySelectorAll("[data-appear-sequenced]")),(this.appearSequenced.length>0||null!==this.appearSequenced)&&this.appearSequenced.forEach((function(e){var n=e.dataset.appearDelay||0,r=e.dataset.appearStagger||.1,i=e.hasAttribute("data-appear-reverse")?"play none none reverse":"play none none none",o=e.querySelectorAll("[data-appear-item]");if(!o.length&&"all"===e.dataset.appearSequenced&&e.children.length>0&&(o=Ps(e.children)),t.button=e.querySelectorAll(".btn-hold"),o.length){var s=h.b.timeline({scrollTrigger:{trigger:e,start:"top 90%",end:"bottom 10%",scroller:"[data-scroll-container]",markers:!1,toggleActions:i},onComplete:function(t){s.scrollTrigger.kill(),s.kill(),s=null,e.style.willChange="auto",o.forEach((function(t){t.style.willChange="auto"}))}}).from(o,{y:200,opacity:0,duration:.8,ease:"power1.out",delay:n,stagger:r,clearProps:"all",overwrite:!0});t.button.length>0&&s.from(t.button,{y:50,alpha:0})}}))}},{key:"initApperList",value:function(){var t=window.innerWidth<768;this.appearList=Ps(this.options.container.querySelectorAll("[data-appear-list]:not(.list-animated)")),this.appearList.length>0&&this.appearList.forEach((function(e){var n=e.dataset.appearDelay||.1;if(e.hasAttribute("data-disable-mobile")&&t)return e.style.willChange="auto",e.style.opacity=1,e.style.transform="translateY(0)",void(e.style.visibility="visible");var r=h.b.to(e,{scrollTrigger:{trigger:e,start:"0% 97%",end:"100% 3%",scroller:"[data-scroll-container]",markers:!1},y:0,autoAlpha:1,duration:t?.35:.75,ease:t?"power1.out":"circ.out",delay:n,onStart:function(t){e.classList.add("list-animated")},onComplete:function(t){r.scrollTrigger.kill(),r.kill(),r=null,e.style.willChange="auto"}})}))}},{key:"beforeDestroy",value:function(){this.appearBlocks.length>0&&(this.appearBlocks=null,this.appearSequenced=null,this.button=null,this.appearList=null)}}])&&Ls(e.prototype,n),r&&Ls(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=Ns(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(Fs,"instance",null);var ks=Fs;function Us(t){return(Us="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 Bs(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,Gs(r.key),r)}}function Gs(t){var e=function(t,e){if("object"!=Us(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Us(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Us(e)?e:String(e)}var zs=function(){function t(e,n){var r=this;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),t.instance?t.instance:(this.playBtn=e,this.videoModal=n,this.closeBtn=document.querySelector(".modal-close-btn"),this.iframeHtml=document.querySelector("#video-modal iframe"),this.modalContent=document.querySelector(".modal-content"),this.body=document.body,this.videoModalParent=this.videoModal.parentNode,this.videoModalParent.removeChild(this.videoModal),setTimeout((function(){r.body.appendChild(r.videoModal)}),100),this.iframeHtml?(this.iframeHtml.style="",this.iframeHtml.remove(),this.playClick=this.playClick.bind(this),this.closeClick=this.closeClick.bind(this),this.documentClick=this.documentClick.bind(this),void this.init()):null)}var e,n,r;return e=t,r=[{key:"create",value:function(e){var n=e.querySelector(".play-btn"),r=document.querySelector("#video-modal");return n&&r?(t.instance||(t.instance=new t(n,r)),t.instance):null}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"init",value:function(){this.playBtn.addEventListener("click",this.playClick),this.closeBtn&&this.closeBtn.addEventListener("click",this.closeClick),document.addEventListener("click",this.documentClick)}},{key:"playClick",value:function(){var t=this;this.modalContent.append(this.iframeHtml),setTimeout((function(){t.body.classList.add("modal-active")}),100),this.videoModal.style.display="flex",this.playBtn.style.display="none"}},{key:"closeClick",value:function(){this.hideModal(),this.playBtn.style.display="block"}},{key:"documentClick",value:function(t){this.body.classList.contains("modal-active")&&!t.target.closest("iframe")&&(this.hideModal(),this.playBtn.style.display="block")}},{key:"hideModal",value:function(){this.body.classList.remove("modal-active"),this.videoModal.style.display="none",this.iframeHtml&&this.iframeHtml.remove()}},{key:"beforeDestroy",value:function(){this.playBtn.removeEventListener("click",this.playClick),this.closeBtn&&this.closeBtn.removeEventListener("click",this.closeClick),document.removeEventListener("click",this.documentClick),this.body.removeChild(this.videoModal)}}])&&Bs(e.prototype,n),r&&Bs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Hs(t){return(Hs="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 js(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,Vs(r.key),r)}}function Vs(t){var e=function(t,e){if("object"!=Hs(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Hs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Hs(e)?e:String(e)}!function(t,e,n){(e=Gs(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(zs,"instance",null);var Xs=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.playBtn=e,this.videoModal=n,this.closeBtn=this.videoModal.querySelector(".modal-close-btn"),this.iframe=this.videoModal.querySelector("iframe"),this.modalContent=this.videoModal.querySelector(".modal-content"),this.body=document.body,this.playClick=this.playClick.bind(this),this.closeClick=this.closeClick.bind(this),this.documentClick=this.documentClick.bind(this),this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){if(null===t.instances&&e){var n=document.querySelector("#video-modal-carousel"),r=e.querySelectorAll(".play-btn-carousel");t.instances=[],r.length&&n&&r.forEach((function(e){t.instances.push(new t(e,n))}))}}},{key:"destroy",value:function(){t.instances&&(t.instances.forEach((function(t){t.beforeDestroy()})),t.instances=null)}}],(n=[{key:"init",value:function(){this.playBtn.addEventListener("click",this.playClick),this.closeBtn&&this.closeBtn.addEventListener("click",this.closeClick),document.addEventListener("click",this.documentClick)}},{key:"playClick",value:function(t){var e=this,n=this.playBtn.getAttribute("data-vimeo");if(n){var r="".concat(n,"?autoplay=1&muted=1");this.iframe.src=r,this.modalContent.appendChild(this.iframe),setTimeout((function(){e.body.classList.add("modal-active")}),100),this.videoModal.style.display="flex"}}},{key:"closeClick",value:function(){this.hideModal()}},{key:"documentClick",value:function(t){this.body.classList.contains("modal-active")&&!t.target.closest("iframe")&&this.hideModal()}},{key:"hideModal",value:function(){this.body.classList.remove("modal-active"),this.videoModal.style.display="none",this.iframe&&this.iframe.remove()}},{key:"beforeDestroy",value:function(){this.playBtn.removeEventListener("click",this.playClick),this.closeBtn&&this.closeBtn.removeEventListener("click",this.closeClick),document.removeEventListener("click",this.documentClick)}}])&&js(e.prototype,n),r&&js(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ws(t){return(Ws="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 Ys(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,qs(r.key),r)}}function qs(t){var e=function(t,e){if("object"!=Ws(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ws(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ws(e)?e:String(e)}!function(t,e,n){(e=Vs(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(Xs,"instances",null);var $s=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.options=Object.assign(this.defaultOptions,e),this.mm=h.b.matchMedia(),this.selector=this.options.container.querySelector(".ui-menu"),this.mm.add("(min-width: 768px)",(function(){n.init()})),this.mm.add("(max-width: 76px)",(function(){t.destroy()}))}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"defaultOptions",get:function(){return{container:document.querySelector(".ui-menu")}}},{key:"start",value:function(){window.scroller.start()}},{key:"stop",value:function(){window.scroller.stop()}},{key:"init",value:function(){var t=this;this.selector&&(this.selector.addEventListener("mouseenter",(function(){t.stop()})),this.selector.addEventListener("mouseleave",(function(){t.start()})))}},{key:"beforeDestroy",value:function(){this.selector&&(this.selector=null,this.mm=null)}}])&&Ys(e.prototype,n),r&&Ys(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ks(t){return(Ks="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 Zs(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,Js(r.key),r)}}function Js(t){var e=function(t,e){if("object"!=Ks(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Ks(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Ks(e)?e:String(e)}!function(t,e,n){(e=qs(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}($s,"instance",null);var Qs=function(){function t(e){var n,r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=Object.assign({},this.defaultOptions,e),this.filterOpener=this.options.selector.querySelector(".filter-opener"),this.filterDrop=null===(n=this.filterOpener)||void 0===n?void 0:n.nextElementSibling,this.breakpoint=window.matchMedia("(min-width:768px)"),this.filterDiv=null===(r=this.filterOpener)||void 0===r?void 0:r.parentNode,this.mobileFilter=document.querySelector(".filter-wrap"),this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"defaultOptions",get:function(){return{selector:null}}},{key:"init",value:function(){this.initFilterSwitch()}},{key:"initFilterSwitch",value:function(){var t=this;if(this.filterOpener){this.filterOpener.addEventListener("click",(function(t){var e;t.preventDefault(),(e=function(){document.body.classList.add("filter--active")})&&e(),setTimeout((function(){var t=document.querySelector("body");window.scroller.stop(),window.filterScrollPosition=window.pageYOffset,t.style.overflow="hidden",t.style.position="fixed",t.style.top="-".concat(window.filterScrollPosition,"px"),t.style.width="100%"}),0)}));var e=function(){t.breakpoint.matches?t.filterDiv.insertBefore(t.filterDrop,t.filterOpener):document.body.append(t.filterDrop)};this.breakpoint.addListener(e),e()}}},{key:"beforeDestroy",value:function(){this.mobileFilter&&this.mobileFilter.remove()}}])&&Zs(e.prototype,n),r&&Zs(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ta(t){return(ta="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 ea(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,na(r.key),r)}}function na(t){var e=function(t,e){if("object"!=ta(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ta(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ta(e)?e:String(e)}!function(t,e,n){(e=Js(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(Qs,"instance",null);var ra=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.navopener=document.querySelector(".nav-opener"),this.navwrap=document.querySelector(".nav-wrap"),this.navout="nav-out",this.navactive="nav-active",this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(){return t.instance||(t.instance=new t),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"init",value:function(){this.initCloseMenu()}},{key:"initCloseMenu",value:function(){var t=this;$("#smooth-wrapper").on("click touchstart pointerdown MSPointerDown",(function(e){var n=$(e.target);n.closest(t.navopener).length||n.closest(t.navwrap).length||$("body").hasClass("nav-active")&&($("body").toggleClass(t.navactive),$("body").addClass(t.navout),setTimeout((function(){$("body").removeClass(t.navout)}),1001))}))}},{key:"beforeDestroy",value:function(){$("html").off("click touchstart pointerdown MSPointerDown")}}])&&ea(e.prototype,n),r&&ea(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ia(t){return(ia="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 oa(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,sa(r.key),r)}}function sa(t){var e=function(t,e){if("object"!=ia(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ia(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ia(e)?e:String(e)}!function(t,e,n){(e=na(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(ra,"instance",null);var aa=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.isScrollingUp=!1,this.isScrollingDown=!1,this.speed=.35,this.ease="power1.out",this.navHeader=document.querySelector(".header-focus"),this.lastScrollPosition=0,this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(){return t.instance||(t.instance=new t),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"init",value:function(){this.navHeader&&this.initHeaderFocusArea()}},{key:"initHeaderFocusArea",value:function(){window.scroller.on("scroll",this.hideShowHeader.bind(this))}},{key:"hideShowHeader",value:function(){var t=window.scroller.scroll.instance.scroll.y;if(t>this.navHeader.offsetHeight){var e=t-this.lastScrollPosition;e>1&&!this.isScrollingDown?(h.a.to(this.navHeader,{y:-this.navHeader.offsetHeight,duration:this.speed,ease:this.ease}),this.isScrollingDown=!0,this.isScrollingUp=!1):e<-1&&!this.isScrollingUp&&(h.a.to(this.navHeader,{y:0,duration:this.speed,ease:this.ease}),this.isScrollingDown=!1,this.isScrollingUp=!0),this.lastScrollPosition=t}}},{key:"beforeDestroy",value:function(){this.navHeader=null,this.isScrollingUp=null,this.isScrollingDown=null,this.hideShowHeader=null,this.initHeaderFocusArea=null}}])&&oa(e.prototype,n),r&&oa(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function la(t){return(la="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 ua(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,ca(r.key),r)}}function ca(t){var e=function(t,e){if("object"!=la(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=la(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==la(e)?e:String(e)}!function(t,e,n){(e=sa(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(aa,"instance",null),h.b.registerPlugin(rn);var ha=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.charts=document.querySelectorAll("[data-chart-graph]"),this.charts.length&&this.init()}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"init",value:function(){var t=this;this.charts.forEach((function(e){t.initChart(e)}))}},{key:"initChart",value:function(t){switch(t.dataset.chartGraph){case"line":this.initLineChart(t);break;case"bar":this.initBarChart(t);break;case"bar-double":this.initBarDoubleChart(t);break;case"counters":this.initCountersChart(t);break;default:console.error("Chart type not found")}}},{key:"initLineChart",value:function(t){var e=t.querySelectorAll(".w-line");if(e.length){e.forEach((function(t){var e=t.getTotalLength();t.style.strokeDasharray=e,t.style.strokeDashoffset=e,t.dataset.length=e}));var n=h.b.timeline({scrollTrigger:{trigger:t,start:"top 90%",end:"bottom 10%",scroller:"[data-scroll-container]",once:!0},onComplete:function(t){n.scrollTrigger&&n.scrollTrigger.kill(),n&&n.kill(),n=null}}).to(e,{strokeDashoffset:0,duration:2,ease:"power1.out",stagger:.15})}}},{key:"initBarChart",value:function(t){var e=t.dataset.digits||0,n=Math.pow(10,e),r=t.querySelectorAll(".w-bar");if(r.length){r.forEach((function(t){t.style.height=0,t.dataset.value&&(t.innerhtml="<span>0%</span")}));var i=h.b.timeline({scrollTrigger:{trigger:t,start:"top 90%",end:"bottom 10%",scroller:"[data-scroll-container]",once:!0},onComplete:function(t){i.scrollTrigger&&i.scrollTrigger.kill(),i&&i.kill(),i=null}}).to(r,{height:function(t,e){var n=e.dataset.bar;return"".concat(n,"%")},onUpdate:function(){var t=i.progress();r.forEach((function(e){var r=e.dataset.value;if(r){var i=Math.round(r*t*n)/n;e.innerHTML="<span>".concat(i,"%</span>")}}))},duration:2,ease:"power1.out",stagger:.15})}}},{key:"initBarDoubleChart",value:function(t){var e=t.dataset.digits||0,n=Math.pow(10,e),r=t.dataset.postfix||"",i=t.querySelectorAll(".w-bar"),o=t.querySelectorAll(".w-bar--0"),s=t.querySelectorAll(".w-bar--1");if(i.length){i.forEach((function(t){t.style.height=0,t.dataset.value&&(t.innerhtml="<span>0".concat(r,"</span"))}));var a=h.b.timeline({scrollTrigger:{trigger:t,start:"top 90%",end:"bottom 10%",scroller:"[data-scroll-container]",once:!0},onComplete:function(t){a.scrollTrigger&&a.scrollTrigger.kill(),a&&a.kill(),a=null}}).to(o,{height:function(t,e){var n=e.dataset.bar;return"".concat(n,"%")},onUpdate:function(){var t=a.progress();o.forEach((function(e){var i=e.dataset.value;if(i){var o=Math.round(i*t*n)/n;e.innerHTML="<span>".concat(o).concat(r,"</span>")}}))},duration:2,ease:"power1.out",stagger:.15}).to(s,{height:function(t,e){var n=e.dataset.bar;return"".concat(n,"%")},onUpdate:function(){var t=a.progress();s.forEach((function(e){var i=e.dataset.value;if(i){var o=Math.round(i*t*n)/n;e.innerHTML="<span>".concat(o).concat(r,"</span>")}}))},duration:2,ease:"power1.out",stagger:.15},.7)}}},{key:"initCountersChart",value:function(t){var e=t.querySelectorAll(".w-counter");if(e.length){var n=t.dataset.digits||0,r=Math.pow(10,n);e.forEach((function(t){var e=t.dataset.value,n=t.dataset.postfix||"";e&&(t.innerHTML="<span>0".concat(n,"</span>"))}));var i=h.b.timeline({scrollTrigger:{trigger:t,start:"top 90%",end:"bottom 10%",scroller:"[data-scroll-container]",once:!0},onComplete:function(t){i.scrollTrigger&&i.scrollTrigger.kill(),i&&i.kill(),i=null}}).to(e,{onUpdate:function(){var t=i.progress();e.forEach((function(e){var n=e.dataset.value,i=e.dataset.postfix||"";if(n){var o=Math.round(n*t*r)/r;e.innerHTML="<span>".concat(o).concat(i,"</span>")}}))},duration:2,ease:"power1.out",stagger:.25})}}},{key:"beforeDestroy",value:function(){this.charts=null}}])&&ua(e.prototype,n),r&&ua(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=ca(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(ha,"instance",null);var da=ha,pa=n("B/eG"),fa=n("MgzW"),ma=n.n(fa);self.Promise||(self.Promise=pa.a),Object.assign||(Object.assign=ma.a);if(Date.now&&Date.prototype.getTime||(Date.now=function(){return(new Date).getTime()}),!self.performance||!self.performance.now){var ga=Date.now();self.performance||(self.performance={}),self.performance.now=function(){return Date.now()-ga}}for(var va=Date.now(),ya=["ms","moz","webkit","o"],_a=0;_a<ya.length&&!self.requestAnimationFrame;++_a){var ba=ya[_a];self.requestAnimationFrame=self[ba+"RequestAnimationFrame"],self.cancelAnimationFrame=self[ba+"CancelAnimationFrame"]||self[ba+"CancelRequestAnimationFrame"]}self.requestAnimationFrame||(self.requestAnimationFrame=function(t){if("function"!=typeof t)throw new TypeError(t+"is not a function");var e=Date.now(),n=16+va-e;return n<0&&(n=0),va=e,self.setTimeout((function(){va=Date.now(),t(performance.now())}),n)}),self.cancelAnimationFrame||(self.cancelAnimationFrame=function(t){return clearTimeout(t)}),Math.sign||(Math.sign=function(t){return 0===(t=Number(t))||isNaN(t)?t:t>0?1:-1}),Number.isInteger||(Number.isInteger=function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t}),self.ArrayBuffer||(self.ArrayBuffer=Array),self.Float32Array||(self.Float32Array=Array),self.Uint32Array||(self.Uint32Array=Array),self.Uint16Array||(self.Uint16Array=Array),self.Uint8Array||(self.Uint8Array=Array),self.Int32Array||(self.Int32Array=Array);var xa=/iPhone/i,wa=/iPod/i,Ea=/iPad/i,Ta=/\biOS-universal(?:.+)Mac\b/i,Sa=/\bAndroid(?:.+)Mobile\b/i,Aa=/Android/i,Ma=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Da=/Silk/i,Ca=/Windows Phone/i,Ra=/\bWindows(?:.+)ARM\b/i,Oa=/BlackBerry/i,Pa=/BB10/i,Ia=/Opera Mini/i,La=/\b(CriOS|Chrome)(?:.+)Mobile/i,Na=/Mobile(?:.+)Firefox\b/i,Fa=function(t){return void 0!==t&&"MacIntel"===t.platform&&"number"==typeof t.maxTouchPoints&&t.maxTouchPoints>1&&"undefined"==typeof MSStream};var ka,Ua,Ba,Ga,za,Ha,ja,Va,Xa,Wa,Ya,qa,$a,Ka,Za,Ja,Qa,tl,el,nl=function(t){var e={userAgent:"",platform:"",maxTouchPoints:0};t||"undefined"==typeof navigator?"string"==typeof t?e.userAgent=t:t&&t.userAgent&&(e={userAgent:t.userAgent,platform:t.platform,maxTouchPoints:t.maxTouchPoints||0}):e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0};var n=e.userAgent,r=n.split("[FBAN");void 0!==r[1]&&(n=r[0]),void 0!==(r=n.split("Twitter"))[1]&&(n=r[0]);var i=function(t){return function(e){return e.test(t)}}(n),o={apple:{phone:i(xa)&&!i(Ca),ipod:i(wa),tablet:!i(xa)&&(i(Ea)||Fa(e))&&!i(Ca),universal:i(Ta),device:(i(xa)||i(wa)||i(Ea)||i(Ta)||Fa(e))&&!i(Ca)},amazon:{phone:i(Ma),tablet:!i(Ma)&&i(Da),device:i(Ma)||i(Da)},android:{phone:!i(Ca)&&i(Ma)||!i(Ca)&&i(Sa),tablet:!i(Ca)&&!i(Ma)&&!i(Sa)&&(i(Da)||i(Aa)),device:!i(Ca)&&(i(Ma)||i(Da)||i(Sa)||i(Aa))||i(/\bokhttp\b/i)},windows:{phone:i(Ca),tablet:i(Ra),device:i(Ca)||i(Ra)},other:{blackberry:i(Oa),blackberry10:i(Pa),opera:i(Ia),firefox:i(Na),chrome:i(La),device:i(Oa)||i(Pa)||i(Ia)||i(Na)||i(La)},any:!1,phone:!1,tablet:!1};return o.any=o.apple.device||o.android.device||o.windows.device||o.other.device,o.phone=o.apple.phone||o.android.phone||o.windows.phone,o.tablet=o.apple.tablet||o.android.tablet||o.windows.tablet,o}(self.navigator);!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(ka||(ka={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(Ua||(Ua={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(Ba||(Ba={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(Ga||(Ga={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(za||(za={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(Ha||(Ha={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(ja||(ja={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(Va||(Va={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(Xa||(Xa={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(Wa||(Wa={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(Ya||(Ya={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(qa||(qa={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}($a||($a={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(Ka||(Ka={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(Za||(Za={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(Ja||(Ja={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(Qa||(Qa={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(tl||(tl={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(el||(el={}));var rl,il,ol,sl,al,ll,ul,cl,hl,dl,pl,fl,ml,gl,vl,yl,_l,bl,xl,wl={MIPMAP_TEXTURES:qa.POW2,ANISOTROPIC_LEVEL:0,RESOLUTION:1,FILTER_RESOLUTION:1,FILTER_MULTISAMPLE:tl.NONE,SPRITE_MAX_TEXTURES:function(t){var e=!0;if(nl.tablet||nl.phone){var n;if(nl.apple.device)if(n=navigator.userAgent.match(/OS (\d+)_(\d+)?/))parseInt(n[1],10)<11&&(e=!1);if(nl.android.device)if(n=navigator.userAgent.match(/Android\s([0-9.]*)/))parseInt(n[1],10)<7&&(e=!1)}return e?t:4}(32),SPRITE_BATCH_SIZE:4096,RENDER_OPTIONS:{view:null,antialias:!1,autoDensity:!1,backgroundColor:0,backgroundAlpha:1,useContextAlpha:!0,clearBeforeRender:!0,preserveDrawingBuffer:!1,width:800,height:600,legacy:!1},GC_MODE:Za.AUTO,GC_MAX_IDLE:3600,GC_MAX_CHECK_COUNT:600,WRAP_MODE:Ya.CLAMP,SCALE_MODE:Wa.LINEAR,PRECISION_VERTEX:Ja.HIGH,PRECISION_FRAGMENT:nl.apple.device?Ja.HIGH:Ja.MEDIUM,CAN_UPLOAD_SAME_BUFFER:!nl.apple.device,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1},El=n("uhBA"),Tl=n.n(El),Sl=n("VmRL"),Al=n.n(Sl),Ml=n("CxY0");!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(rl||(rl={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(il||(il={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(ol||(ol={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(sl||(sl={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(al||(al={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(ll||(ll={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(ul||(ul={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(cl||(cl={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(hl||(hl={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(dl||(dl={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(pl||(pl={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(fl||(fl={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(ml||(ml={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(gl||(gl={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(vl||(vl={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(yl||(yl={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(_l||(_l={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(bl||(bl={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(xl||(xl={}));var Dl={parse:Ml.parse,format:Ml.format,resolve:Ml.resolve};wl.RETINA_PREFIX=/@([0-9\.]+)x/,wl.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var Cl,Rl=!1;var Ol={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function Pl(t,e){return void 0===e&&(e=[]),e[0]=(t>>16&255)/255,e[1]=(t>>8&255)/255,e[2]=(255&t)/255,e}function Il(t){var e=t.toString(16);return"#"+(e="000000".substr(0,6-e.length)+e)}function Ll(t){return"string"==typeof t&&"#"===(t=Ol[t.toLowerCase()]||t)[0]&&(t=t.substr(1)),parseInt(t,16)}var Nl=function(){for(var t=[],e=[],n=0;n<32;n++)t[n]=n,e[n]=n;t[sl.NORMAL_NPM]=sl.NORMAL,t[sl.ADD_NPM]=sl.ADD,t[sl.SCREEN_NPM]=sl.SCREEN,e[sl.NORMAL]=sl.NORMAL_NPM,e[sl.ADD]=sl.ADD_NPM,e[sl.SCREEN]=sl.SCREEN_NPM;var r=[];return r.push(e),r.push(t),r}();function Fl(t,e){return Nl[e?1:0][t]}function kl(t,e){if(1===e)return(255*e<<24)+t;if(0===e)return 0;var n=t>>16&255,r=t>>8&255,i=255&t;return(255*e<<24)+((n=n*e+.5|0)<<16)+((r=r*e+.5|0)<<8)+(i=i*e+.5|0)}function Ul(t,e,n,r){return(n=n||new Float32Array(4))[0]=(t>>16&255)/255,n[1]=(t>>8&255)/255,n[2]=(255&t)/255,(r||void 0===r)&&(n[0]*=e,n[1]*=e,n[2]*=e),n[3]=e,n}function Bl(t){if(4===t.BYTES_PER_ELEMENT)return t instanceof Float32Array?"Float32Array":t instanceof Uint32Array?"Uint32Array":"Int32Array";if(2===t.BYTES_PER_ELEMENT){if(t instanceof Uint16Array)return"Uint16Array"}else if(1===t.BYTES_PER_ELEMENT&&t instanceof Uint8Array)return"Uint8Array";return null}Float32Array,Uint32Array,Int32Array,Uint8Array;function Gl(t){return t+=0===t?1:0,--t,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,(t|=t>>>16)+1}function zl(t){return!(t&t-1||!t)}function Hl(t){var e=(t>65535?1:0)<<4,n=((t>>>=e)>255?1:0)<<3;return e|=n,e|=n=((t>>>=n)>15?1:0)<<2,(e|=n=((t>>>=n)>3?1:0)<<1)|(t>>>=n)>>1}function jl(t,e,n){var r,i=t.length;if(!(e>=i||0===n)){var o=i-(n=e+n>i?i-e:n);for(r=e;r<o;++r)t[r]=t[r+n];t.length=o}}function Vl(t){return 0===t?0:t<0?-1:1}var Xl=0;function Wl(){return++Xl}var Yl={};function ql(t,e,n){if(void 0===n&&(n=3),!Yl[e]){var r=(new Error).stack;void 0===r?console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t):(r=r.split("\n").splice(n).join("\n"),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",e+"\nDeprecated since v"+t),console.warn(r),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",e+"\nDeprecated since v"+t),console.warn(r))),Yl[e]=!0}}var $l={},Kl=Object.create(null),Zl=Object.create(null);var Jl=function(){function t(t,e,n){this.canvas=document.createElement("canvas"),this.context=this.canvas.getContext("2d"),this.resolution=n||wl.RESOLUTION,this.resize(t,e)}return t.prototype.clear=function(){this.context.setTransform(1,0,0,1,0,0),this.context.clearRect(0,0,this.canvas.width,this.canvas.height)},t.prototype.resize=function(t,e){this.canvas.width=Math.round(t*this.resolution),this.canvas.height=Math.round(e*this.resolution)},t.prototype.destroy=function(){this.context=null,this.canvas=null},Object.defineProperty(t.prototype,"width",{get:function(){return this.canvas.width},set:function(t){this.canvas.width=Math.round(t)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.canvas.height},set:function(t){this.canvas.height=Math.round(t)},enumerable:!1,configurable:!0}),t}();var Ql;function tu(t,e){var n=wl.RETINA_PREFIX.exec(t);return n?parseFloat(n[1]):void 0!==e?e:1}var eu,nu=2*Math.PI,ru=180/Math.PI,iu=Math.PI/180;!function(t){t[t.POLY=0]="POLY",t[t.RECT=1]="RECT",t[t.CIRC=2]="CIRC",t[t.ELIP=3]="ELIP",t[t.RREC=4]="RREC"}(eu||(eu={}));var ou=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=Number(t),this.y=Number(e),this.width=Number(n),this.height=Number(r),this.type=eu.RECT}return Object.defineProperty(t.prototype,"left",{get:function(){return this.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"right",{get:function(){return this.x+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"top",{get:function(){return this.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return this.y+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t,"EMPTY",{get:function(){return new t(0,0,0,0)},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.copyFrom=function(t){return this.x=t.x,this.y=t.y,this.width=t.width,this.height=t.height,this},t.prototype.copyTo=function(t){return t.x=this.x,t.y=this.y,t.width=this.width,t.height=this.height,t},t.prototype.contains=function(t,e){return!(this.width<=0||this.height<=0)&&(t>=this.x&&t<this.x+this.width&&e>=this.y&&e<this.y+this.height)},t.prototype.pad=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x-=t,this.y-=e,this.width+=2*t,this.height+=2*e,this},t.prototype.fit=function(t){var e=Math.max(this.x,t.x),n=Math.min(this.x+this.width,t.x+t.width),r=Math.max(this.y,t.y),i=Math.min(this.y+this.height,t.y+t.height);return this.x=e,this.width=Math.max(n-e,0),this.y=r,this.height=Math.max(i-r,0),this},t.prototype.ceil=function(t,e){void 0===t&&(t=1),void 0===e&&(e=.001);var n=Math.ceil((this.x+this.width-e)*t)/t,r=Math.ceil((this.y+this.height-e)*t)/t;return this.x=Math.floor((this.x+e)*t)/t,this.y=Math.floor((this.y+e)*t)/t,this.width=n-this.x,this.height=r-this.y,this},t.prototype.enlarge=function(t){var e=Math.min(this.x,t.x),n=Math.max(this.x+this.width,t.x+t.width),r=Math.min(this.y,t.y),i=Math.max(this.y+this.height,t.y+t.height);return this.x=e,this.width=n-e,this.y=r,this.height=i-r,this},t.prototype.toString=function(){return"[@pixi/math:Rectangle x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},t}(),su=function(){function t(t,e,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),this.x=t,this.y=e,this.radius=n,this.type=eu.CIRC}return t.prototype.clone=function(){return new t(this.x,this.y,this.radius)},t.prototype.contains=function(t,e){if(this.radius<=0)return!1;var n=this.radius*this.radius,r=this.x-t,i=this.y-e;return(r*=r)+(i*=i)<=n},t.prototype.getBounds=function(){return new ou(this.x-this.radius,this.y-this.radius,2*this.radius,2*this.radius)},t.prototype.toString=function(){return"[@pixi/math:Circle x="+this.x+" y="+this.y+" radius="+this.radius+"]"},t}(),au=function(){function t(t,e,n,r){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),this.x=t,this.y=e,this.width=n,this.height=r,this.type=eu.ELIP}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;var n=(t-this.x)/this.width,r=(e-this.y)/this.height;return(n*=n)+(r*=r)<=1},t.prototype.getBounds=function(){return new ou(this.x-this.width,this.y-this.height,this.width,this.height)},t.prototype.toString=function(){return"[@pixi/math:Ellipse x="+this.x+" y="+this.y+" width="+this.width+" height="+this.height+"]"},t}(),lu=function(){function t(){for(var t=arguments,e=[],n=0;n<arguments.length;n++)e[n]=t[n];var r=Array.isArray(e[0])?e[0]:e;if("number"!=typeof r[0]){for(var i=[],o=0,s=r.length;o<s;o++)i.push(r[o].x,r[o].y);r=i}this.points=r,this.type=eu.POLY,this.closeStroke=!0}return t.prototype.clone=function(){var e=new t(this.points.slice());return e.closeStroke=this.closeStroke,e},t.prototype.contains=function(t,e){for(var n=!1,r=this.points.length/2,i=0,o=r-1;i<r;o=i++){var s=this.points[2*i],a=this.points[2*i+1],l=this.points[2*o],u=this.points[2*o+1];a>e!=u>e&&t<(e-a)/(u-a)*(l-s)+s&&(n=!n)}return n},t.prototype.toString=function(){return"[@pixi/math:PolygoncloseStroke="+this.closeStroke+"points="+this.points.reduce((function(t,e){return t+", "+e}),"")+"]"},t}(),uu=function(){function t(t,e,n,r,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=0),void 0===i&&(i=20),this.x=t,this.y=e,this.width=n,this.height=r,this.radius=i,this.type=eu.RREC}return t.prototype.clone=function(){return new t(this.x,this.y,this.width,this.height,this.radius)},t.prototype.contains=function(t,e){if(this.width<=0||this.height<=0)return!1;if(t>=this.x&&t<=this.x+this.width&&e>=this.y&&e<=this.y+this.height){if(e>=this.y+this.radius&&e<=this.y+this.height-this.radius||t>=this.x+this.radius&&t<=this.x+this.width-this.radius)return!0;var n=t-(this.x+this.radius),r=e-(this.y+this.radius),i=this.radius*this.radius;if(n*n+r*r<=i)return!0;if((n=t-(this.x+this.width-this.radius))*n+r*r<=i)return!0;if(n*n+(r=e-(this.y+this.height-this.radius))*r<=i)return!0;if((n=t-(this.x+this.radius))*n+r*r<=i)return!0}return!1},t.prototype.toString=function(){return"[@pixi/math:RoundedRectangle x="+this.x+" y="+this.y+"width="+this.width+" height="+this.height+" radius="+this.radius+"]"},t}(),cu=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=0,this.y=0,this.x=t,this.y=e}return t.prototype.clone=function(){return new t(this.x,this.y)},t.prototype.copyFrom=function(t){return this.set(t.x,t.y),this},t.prototype.copyTo=function(t){return t.set(this.x,this.y),t},t.prototype.equals=function(t){return t.x===this.x&&t.y===this.y},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this},t.prototype.toString=function(){return"[@pixi/math:Point x="+this.x+" y="+this.y+"]"},t}(),hu=function(){function t(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0),this._x=n,this._y=r,this.cb=t,this.scope=e}return t.prototype.clone=function(e,n){return void 0===e&&(e=this.cb),void 0===n&&(n=this.scope),new t(e,n,this._x,this._y)},t.prototype.set=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this._x===t&&this._y===e||(this._x=t,this._y=e,this.cb.call(this.scope)),this},t.prototype.copyFrom=function(t){return this._x===t.x&&this._y===t.y||(this._x=t.x,this._y=t.y,this.cb.call(this.scope)),this},t.prototype.copyTo=function(t){return t.set(this._x,this._y),t},t.prototype.equals=function(t){return t.x===this._x&&t.y===this._y},t.prototype.toString=function(){return"[@pixi/math:ObservablePoint x=0 y=0 scope="+this.scope+"]"},Object.defineProperty(t.prototype,"x",{get:function(){return this._x},set:function(t){this._x!==t&&(this._x=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"y",{get:function(){return this._y},set:function(t){this._y!==t&&(this._y=t,this.cb.call(this.scope))},enumerable:!1,configurable:!0}),t}(),du=function(){function t(t,e,n,r,i,o){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),this.array=null,this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o}return t.prototype.fromArray=function(t){this.a=t[0],this.b=t[1],this.c=t[3],this.d=t[4],this.tx=t[2],this.ty=t[5]},t.prototype.set=function(t,e,n,r,i,o){return this.a=t,this.b=e,this.c=n,this.d=r,this.tx=i,this.ty=o,this},t.prototype.toArray=function(t,e){this.array||(this.array=new Float32Array(9));var n=e||this.array;return t?(n[0]=this.a,n[1]=this.b,n[2]=0,n[3]=this.c,n[4]=this.d,n[5]=0,n[6]=this.tx,n[7]=this.ty,n[8]=1):(n[0]=this.a,n[1]=this.c,n[2]=this.tx,n[3]=this.b,n[4]=this.d,n[5]=this.ty,n[6]=0,n[7]=0,n[8]=1),n},t.prototype.apply=function(t,e){e=e||new cu;var n=t.x,r=t.y;return e.x=this.a*n+this.c*r+this.tx,e.y=this.b*n+this.d*r+this.ty,e},t.prototype.applyInverse=function(t,e){e=e||new cu;var n=1/(this.a*this.d+this.c*-this.b),r=t.x,i=t.y;return e.x=this.d*n*r+-this.c*n*i+(this.ty*this.c-this.tx*this.d)*n,e.y=this.a*n*i+-this.b*n*r+(-this.ty*this.a+this.tx*this.b)*n,e},t.prototype.translate=function(t,e){return this.tx+=t,this.ty+=e,this},t.prototype.scale=function(t,e){return this.a*=t,this.d*=e,this.c*=t,this.b*=e,this.tx*=t,this.ty*=e,this},t.prototype.rotate=function(t){var e=Math.cos(t),n=Math.sin(t),r=this.a,i=this.c,o=this.tx;return this.a=r*e-this.b*n,this.b=r*n+this.b*e,this.c=i*e-this.d*n,this.d=i*n+this.d*e,this.tx=o*e-this.ty*n,this.ty=o*n+this.ty*e,this},t.prototype.append=function(t){var e=this.a,n=this.b,r=this.c,i=this.d;return this.a=t.a*e+t.b*r,this.b=t.a*n+t.b*i,this.c=t.c*e+t.d*r,this.d=t.c*n+t.d*i,this.tx=t.tx*e+t.ty*r+this.tx,this.ty=t.tx*n+t.ty*i+this.ty,this},t.prototype.setTransform=function(t,e,n,r,i,o,s,a,l){return this.a=Math.cos(s+l)*i,this.b=Math.sin(s+l)*i,this.c=-Math.sin(s-a)*o,this.d=Math.cos(s-a)*o,this.tx=t-(n*this.a+r*this.c),this.ty=e-(n*this.b+r*this.d),this},t.prototype.prepend=function(t){var e=this.tx;if(1!==t.a||0!==t.b||0!==t.c||1!==t.d){var n=this.a,r=this.c;this.a=n*t.a+this.b*t.c,this.b=n*t.b+this.b*t.d,this.c=r*t.a+this.d*t.c,this.d=r*t.b+this.d*t.d}return this.tx=e*t.a+this.ty*t.c+t.tx,this.ty=e*t.b+this.ty*t.d+t.ty,this},t.prototype.decompose=function(t){var e=this.a,n=this.b,r=this.c,i=this.d,o=t.pivot,s=-Math.atan2(-r,i),a=Math.atan2(n,e),l=Math.abs(s+a);return l<1e-5||Math.abs(nu-l)<1e-5?(t.rotation=a,t.skew.x=t.skew.y=0):(t.rotation=0,t.skew.x=s,t.skew.y=a),t.scale.x=Math.sqrt(e*e+n*n),t.scale.y=Math.sqrt(r*r+i*i),t.position.x=this.tx+(o.x*e+o.y*r),t.position.y=this.ty+(o.x*n+o.y*i),t},t.prototype.invert=function(){var t=this.a,e=this.b,n=this.c,r=this.d,i=this.tx,o=t*r-e*n;return this.a=r/o,this.b=-e/o,this.c=-n/o,this.d=t/o,this.tx=(n*this.ty-r*i)/o,this.ty=-(t*this.ty-e*i)/o,this},t.prototype.identity=function(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this},t.prototype.clone=function(){var e=new t;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e},t.prototype.copyTo=function(t){return t.a=this.a,t.b=this.b,t.c=this.c,t.d=this.d,t.tx=this.tx,t.ty=this.ty,t},t.prototype.copyFrom=function(t){return this.a=t.a,this.b=t.b,this.c=t.c,this.d=t.d,this.tx=t.tx,this.ty=t.ty,this},t.prototype.toString=function(){return"[@pixi/math:Matrix a="+this.a+" b="+this.b+" c="+this.c+" d="+this.d+" tx="+this.tx+" ty="+this.ty+"]"},Object.defineProperty(t,"IDENTITY",{get:function(){return new t},enumerable:!1,configurable:!0}),Object.defineProperty(t,"TEMP_MATRIX",{get:function(){return new t},enumerable:!1,configurable:!0}),t}(),pu=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],fu=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],mu=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],gu=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],vu=[],yu=[],_u=Math.sign;!function(){for(var t=0;t<16;t++){var e=[];vu.push(e);for(var n=0;n<16;n++)for(var r=_u(pu[t]*pu[n]+mu[t]*fu[n]),i=_u(fu[t]*pu[n]+gu[t]*fu[n]),o=_u(pu[t]*mu[n]+mu[t]*gu[n]),s=_u(fu[t]*mu[n]+gu[t]*gu[n]),a=0;a<16;a++)if(pu[a]===r&&fu[a]===i&&mu[a]===o&&gu[a]===s){e.push(a);break}}for(t=0;t<16;t++){var l=new du;l.set(pu[t],fu[t],mu[t],gu[t],0,0),yu.push(l)}}();var bu={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:function(t){return pu[t]},uY:function(t){return fu[t]},vX:function(t){return mu[t]},vY:function(t){return gu[t]},inv:function(t){return 8&t?15&t:7&-t},add:function(t,e){return vu[t][e]},sub:function(t,e){return vu[t][bu.inv(e)]},rotate180:function(t){return 4^t},isVertical:function(t){return 2==(3&t)},byDirection:function(t,e){return 2*Math.abs(t)<=Math.abs(e)?e>=0?bu.S:bu.N:2*Math.abs(e)<=Math.abs(t)?t>0?bu.E:bu.W:e>0?t>0?bu.SE:bu.SW:t>0?bu.NE:bu.NW},matrixAppendRotationInv:function(t,e,n,r){void 0===n&&(n=0),void 0===r&&(r=0);var i=yu[bu.inv(e)];i.tx=n,i.ty=r,t.append(i)}},xu=function(){function t(){this.worldTransform=new du,this.localTransform=new du,this.position=new hu(this.onChange,this,0,0),this.scale=new hu(this.onChange,this,1,1),this.pivot=new hu(this.onChange,this,0,0),this.skew=new hu(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}return t.prototype.onChange=function(){this._localID++},t.prototype.updateSkew=function(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++},t.prototype.toString=function(){return"[@pixi/math:Transform position=("+this.position.x+", "+this.position.y+") rotation="+this.rotation+" scale=("+this.scale.x+", "+this.scale.y+") skew=("+this.skew.x+", "+this.skew.y+") ]"},t.prototype.updateLocalTransform=function(){var t=this.localTransform;this._localID!==this._currentLocalID&&(t.a=this._cx*this.scale.x,t.b=this._sx*this.scale.x,t.c=this._cy*this.scale.y,t.d=this._sy*this.scale.y,t.tx=this.position.x-(this.pivot.x*t.a+this.pivot.y*t.c),t.ty=this.position.y-(this.pivot.x*t.b+this.pivot.y*t.d),this._currentLocalID=this._localID,this._parentID=-1)},t.prototype.updateTransform=function(t){var e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==t._worldID){var n=t.worldTransform,r=this.worldTransform;r.a=e.a*n.a+e.b*n.c,r.b=e.a*n.b+e.b*n.d,r.c=e.c*n.a+e.d*n.c,r.d=e.c*n.b+e.d*n.d,r.tx=e.tx*n.a+e.ty*n.c+n.tx,r.ty=e.tx*n.b+e.ty*n.d+n.ty,this._parentID=t._worldID,this._worldID++}},t.prototype.setFromMatrix=function(t){t.decompose(this),this._localID++},Object.defineProperty(t.prototype,"rotation",{get:function(){return this._rotation},set:function(t){this._rotation!==t&&(this._rotation=t,this.updateSkew())},enumerable:!1,configurable:!0}),t.IDENTITY=new t,t}();wl.SORTABLE_CHILDREN=!1;var wu=function(){function t(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}return t.prototype.isEmpty=function(){return this.minX>this.maxX||this.minY>this.maxY},t.prototype.clear=function(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0},t.prototype.getRectangle=function(t){return this.minX>this.maxX||this.minY>this.maxY?ou.EMPTY:((t=t||new ou(0,0,1,1)).x=this.minX,t.y=this.minY,t.width=this.maxX-this.minX,t.height=this.maxY-this.minY,t)},t.prototype.addPoint=function(t){this.minX=Math.min(this.minX,t.x),this.maxX=Math.max(this.maxX,t.x),this.minY=Math.min(this.minY,t.y),this.maxY=Math.max(this.maxY,t.y)},t.prototype.addPointMatrix=function(t,e){var n=t.a,r=t.b,i=t.c,o=t.d,s=t.tx,a=t.ty,l=n*e.x+i*e.y+s,u=r*e.x+o*e.y+a;this.minX=Math.min(this.minX,l),this.maxX=Math.max(this.maxX,l),this.minY=Math.min(this.minY,u),this.maxY=Math.max(this.maxY,u)},t.prototype.addQuad=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY,o=t[0],s=t[1];e=o<e?o:e,n=s<n?s:n,r=o>r?o:r,i=s>i?s:i,e=(o=t[2])<e?o:e,n=(s=t[3])<n?s:n,r=o>r?o:r,i=s>i?s:i,e=(o=t[4])<e?o:e,n=(s=t[5])<n?s:n,r=o>r?o:r,i=s>i?s:i,e=(o=t[6])<e?o:e,n=(s=t[7])<n?s:n,r=o>r?o:r,i=s>i?s:i,this.minX=e,this.minY=n,this.maxX=r,this.maxY=i},t.prototype.addFrame=function(t,e,n,r,i){this.addFrameMatrix(t.worldTransform,e,n,r,i)},t.prototype.addFrameMatrix=function(t,e,n,r,i){var o=t.a,s=t.b,a=t.c,l=t.d,u=t.tx,c=t.ty,h=this.minX,d=this.minY,p=this.maxX,f=this.maxY,m=o*e+a*n+u,g=s*e+l*n+c;h=m<h?m:h,d=g<d?g:d,p=m>p?m:p,f=g>f?g:f,h=(m=o*r+a*n+u)<h?m:h,d=(g=s*r+l*n+c)<d?g:d,p=m>p?m:p,f=g>f?g:f,h=(m=o*e+a*i+u)<h?m:h,d=(g=s*e+l*i+c)<d?g:d,p=m>p?m:p,f=g>f?g:f,h=(m=o*r+a*i+u)<h?m:h,d=(g=s*r+l*i+c)<d?g:d,p=m>p?m:p,f=g>f?g:f,this.minX=h,this.minY=d,this.maxX=p,this.maxY=f},t.prototype.addVertexData=function(t,e,n){for(var r=this.minX,i=this.minY,o=this.maxX,s=this.maxY,a=e;a<n;a+=2){var l=t[a],u=t[a+1];r=l<r?l:r,i=u<i?u:i,o=l>o?l:o,s=u>s?u:s}this.minX=r,this.minY=i,this.maxX=o,this.maxY=s},t.prototype.addVertices=function(t,e,n,r){this.addVerticesMatrix(t.worldTransform,e,n,r)},t.prototype.addVerticesMatrix=function(t,e,n,r,i,o){void 0===i&&(i=0),void 0===o&&(o=i);for(var s=t.a,a=t.b,l=t.c,u=t.d,c=t.tx,h=t.ty,d=this.minX,p=this.minY,f=this.maxX,m=this.maxY,g=n;g<r;g+=2){var v=e[g],y=e[g+1],_=s*v+l*y+c,b=u*y+a*v+h;d=Math.min(d,_-i),f=Math.max(f,_+i),p=Math.min(p,b-o),m=Math.max(m,b+o)}this.minX=d,this.minY=p,this.maxX=f,this.maxY=m},t.prototype.addBounds=function(t){var e=this.minX,n=this.minY,r=this.maxX,i=this.maxY;this.minX=t.minX<e?t.minX:e,this.minY=t.minY<n?t.minY:n,this.maxX=t.maxX>r?t.maxX:r,this.maxY=t.maxY>i?t.maxY:i},t.prototype.addBoundsMask=function(t,e){var n=t.minX>e.minX?t.minX:e.minX,r=t.minY>e.minY?t.minY:e.minY,i=t.maxX<e.maxX?t.maxX:e.maxX,o=t.maxY<e.maxY?t.maxY:e.maxY;if(n<=i&&r<=o){var s=this.minX,a=this.minY,l=this.maxX,u=this.maxY;this.minX=n<s?n:s,this.minY=r<a?r:a,this.maxX=i>l?i:l,this.maxY=o>u?o:u}},t.prototype.addBoundsMatrix=function(t,e){this.addFrameMatrix(e,t.minX,t.minY,t.maxX,t.maxY)},t.prototype.addBoundsArea=function(t,e){var n=t.minX>e.x?t.minX:e.x,r=t.minY>e.y?t.minY:e.y,i=t.maxX<e.x+e.width?t.maxX:e.x+e.width,o=t.maxY<e.y+e.height?t.maxY:e.y+e.height;if(n<=i&&r<=o){var s=this.minX,a=this.minY,l=this.maxX,u=this.maxY;this.minX=n<s?n:s,this.minY=r<a?r:a,this.maxX=i>l?i:l,this.maxY=o>u?o:u}},t.prototype.pad=function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.isEmpty()||(this.minX-=t,this.maxX+=t,this.minY-=e,this.maxY+=e)},t.prototype.addFramePad=function(t,e,n,r,i,o){t-=i,e-=o,n+=i,r+=o,this.minX=this.minX<t?this.minX:t,this.maxX=this.maxX>n?this.maxX:n,this.minY=this.minY<e?this.minY:e,this.maxY=this.maxY>r?this.maxY:r},t}(),Eu=function(t,e){return(Eu=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])})(t,e)};function Tu(t,e){function n(){this.constructor=t}Eu(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Su=function(t){function e(){var e=t.call(this)||this;return e.tempDisplayObjectParent=null,e.transform=new xu,e.alpha=1,e.visible=!0,e.renderable=!0,e.parent=null,e.worldAlpha=1,e._lastSortedIndex=0,e._zIndex=0,e.filterArea=null,e.filters=null,e._enabledFilters=null,e._bounds=new wu,e._localBounds=null,e._boundsID=0,e._boundsRect=null,e._localBoundsRect=null,e._mask=null,e._destroyed=!1,e.isSprite=!1,e.isMask=!1,e}return Tu(e,t),e.mixin=function(t){for(var n=Object.keys(t),r=0;r<n.length;++r){var i=n[r];Object.defineProperty(e.prototype,i,Object.getOwnPropertyDescriptor(t,i))}},Object.defineProperty(e.prototype,"destroyed",{get:function(){return this._destroyed},enumerable:!1,configurable:!0}),e.prototype._recursivePostUpdateTransform=function(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)},e.prototype.updateTransform=function(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha},e.prototype.getBounds=function(t,e){return t||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),e||(this._boundsRect||(this._boundsRect=new ou),e=this._boundsRect),this._bounds.getRectangle(e)},e.prototype.getLocalBounds=function(t){t||(this._localBoundsRect||(this._localBoundsRect=new ou),t=this._localBoundsRect),this._localBounds||(this._localBounds=new wu);var e=this.transform,n=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;var r=this._bounds,i=this._boundsID;this._bounds=this._localBounds;var o=this.getBounds(!1,t);return this.parent=n,this.transform=e,this._bounds=r,this._bounds.updateID+=this._boundsID-i,o},e.prototype.toGlobal=function(t,e,n){return void 0===n&&(n=!1),n||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(t,e)},e.prototype.toLocal=function(t,e,n,r){return e&&(t=e.toGlobal(t,n,r)),r||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(t,n)},e.prototype.setParent=function(t){if(!t||!t.addChild)throw new Error("setParent: Argument must be a Container");return t.addChild(this),t},e.prototype.setTransform=function(t,e,n,r,i,o,s,a,l){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=1),void 0===i&&(i=0),void 0===o&&(o=0),void 0===s&&(s=0),void 0===a&&(a=0),void 0===l&&(l=0),this.position.x=t,this.position.y=e,this.scale.x=n||1,this.scale.y=r||1,this.rotation=i,this.skew.x=o,this.skew.y=s,this.pivot.x=a,this.pivot.y=l,this},e.prototype.destroy=function(t){this.parent&&this.parent.removeChild(this),this.emit("destroyed"),this.removeAllListeners(),this.transform=null,this.parent=null,this._bounds=null,this._mask=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.interactive=!1,this.interactiveChildren=!1,this._destroyed=!0},Object.defineProperty(e.prototype,"_tempDisplayObjectParent",{get:function(){return null===this.tempDisplayObjectParent&&(this.tempDisplayObjectParent=new Au),this.tempDisplayObjectParent},enumerable:!1,configurable:!0}),e.prototype.enableTempParent=function(){var t=this.parent;return this.parent=this._tempDisplayObjectParent,t},e.prototype.disableTempParent=function(t){this.parent=t},Object.defineProperty(e.prototype,"x",{get:function(){return this.position.x},set:function(t){this.transform.position.x=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"y",{get:function(){return this.position.y},set:function(t){this.transform.position.y=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldTransform",{get:function(){return this.transform.worldTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"localTransform",{get:function(){return this.transform.localTransform},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"position",{get:function(){return this.transform.position},set:function(t){this.transform.position.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this.transform.scale},set:function(t){this.transform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pivot",{get:function(){return this.transform.pivot},set:function(t){this.transform.pivot.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"skew",{get:function(){return this.transform.skew},set:function(t){this.transform.skew.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotation",{get:function(){return this.transform.rotation},set:function(t){this.transform.rotation=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"angle",{get:function(){return this.transform.rotation*ru},set:function(t){this.transform.rotation=t*iu},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zIndex",{get:function(){return this._zIndex},set:function(t){this._zIndex=t,this.parent&&(this.parent.sortDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"worldVisible",{get:function(){var t=this;do{if(!t.visible)return!1;t=t.parent}while(t);return!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mask",{get:function(){return this._mask},set:function(t){var e;this._mask&&((e=this._mask.maskObject||this._mask).renderable=!0,e.isMask=!1);(this._mask=t,this._mask)&&((e=this._mask.maskObject||this._mask).renderable=!1,e.isMask=!0)},enumerable:!1,configurable:!0}),e}(Tl.a),Au=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.sortDirty=null,e}return Tu(e,t),e}(Su);function Mu(t,e){return t.zIndex===e.zIndex?t._lastSortedIndex-e._lastSortedIndex:t.zIndex-e.zIndex}Su.prototype.displayObjectUpdateTransform=Su.prototype.updateTransform;var Du=function(t){function e(){var e=t.call(this)||this;return e.children=[],e.sortableChildren=wl.SORTABLE_CHILDREN,e.sortDirty=!1,e}return Tu(e,t),e.prototype.onChildrenChange=function(t){},e.prototype.addChild=function(){for(var t=arguments,e=[],n=0;n<arguments.length;n++)e[n]=t[n];if(e.length>1)for(var r=0;r<e.length;r++)this.addChild(e[r]);else{var i=e[0];i.parent&&i.parent.removeChild(i),i.parent=this,this.sortDirty=!0,i.transform._parentID=-1,this.children.push(i),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",i,this,this.children.length-1),i.emit("added",this)}return e[0]},e.prototype.addChildAt=function(t,e){if(e<0||e>this.children.length)throw new Error(t+"addChildAt: The index "+e+" supplied is out of bounds "+this.children.length);return t.parent&&t.parent.removeChild(t),t.parent=this,this.sortDirty=!0,t.transform._parentID=-1,this.children.splice(e,0,t),this._boundsID++,this.onChildrenChange(e),t.emit("added",this),this.emit("childAdded",t,this,e),t},e.prototype.swapChildren=function(t,e){if(t!==e){var n=this.getChildIndex(t),r=this.getChildIndex(e);this.children[n]=e,this.children[r]=t,this.onChildrenChange(n<r?n:r)}},e.prototype.getChildIndex=function(t){var e=this.children.indexOf(t);if(-1===e)throw new Error("The supplied DisplayObject must be a child of the caller");return e},e.prototype.setChildIndex=function(t,e){if(e<0||e>=this.children.length)throw new Error("The index "+e+" supplied is out of bounds "+this.children.length);var n=this.getChildIndex(t);jl(this.children,n,1),this.children.splice(e,0,t),this.onChildrenChange(e)},e.prototype.getChildAt=function(t){if(t<0||t>=this.children.length)throw new Error("getChildAt: Index ("+t+") does not exist.");return this.children[t]},e.prototype.removeChild=function(){for(var t=arguments,e=[],n=0;n<arguments.length;n++)e[n]=t[n];if(e.length>1)for(var r=0;r<e.length;r++)this.removeChild(e[r]);else{var i=e[0],o=this.children.indexOf(i);if(-1===o)return null;i.parent=null,i.transform._parentID=-1,jl(this.children,o,1),this._boundsID++,this.onChildrenChange(o),i.emit("removed",this),this.emit("childRemoved",i,this,o)}return e[0]},e.prototype.removeChildAt=function(t){var e=this.getChildAt(t);return e.parent=null,e.transform._parentID=-1,jl(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t),e},e.prototype.removeChildren=function(t,e){void 0===t&&(t=0),void 0===e&&(e=this.children.length);var n,r=t,i=e-r;if(i>0&&i<=e){n=this.children.splice(r,i);for(var o=0;o<n.length;++o)n[o].parent=null,n[o].transform&&(n[o].transform._parentID=-1);this._boundsID++,this.onChildrenChange(t);for(o=0;o<n.length;++o)n[o].emit("removed",this),this.emit("childRemoved",n[o],this,o);return n}if(0===i&&0===this.children.length)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")},e.prototype.sortChildren=function(){for(var t=!1,e=0,n=this.children.length;e<n;++e){var r=this.children[e];r._lastSortedIndex=e,t||0===r.zIndex||(t=!0)}t&&this.children.length>1&&this.children.sort(Mu),this.sortDirty=!1},e.prototype.updateTransform=function(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(var t=0,e=this.children.length;t<e;++t){var n=this.children[t];n.visible&&n.updateTransform()}},e.prototype.calculateBounds=function(){this._bounds.clear(),this._calculateBounds();for(var t=0;t<this.children.length;t++){var e=this.children[t];if(e.visible&&e.renderable)if(e.calculateBounds(),e._mask){var n=e._mask.maskObject||e._mask;n.calculateBounds(),this._bounds.addBoundsMask(e._bounds,n._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID},e.prototype.getLocalBounds=function(e,n){void 0===n&&(n=!1);var r=t.prototype.getLocalBounds.call(this,e);if(!n)for(var i=0,o=this.children.length;i<o;++i){var s=this.children[i];s.visible&&s.updateTransform()}return r},e.prototype._calculateBounds=function(){},e.prototype.render=function(t){if(this.visible&&!(this.worldAlpha<=0)&&this.renderable)if(this._mask||this.filters&&this.filters.length)this.renderAdvanced(t);else{this._render(t);for(var e=0,n=this.children.length;e<n;++e)this.children[e].render(t)}},e.prototype.renderAdvanced=function(t){t.batch.flush();var e=this.filters,n=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(var r=0;r<e.length;r++)e[r].enabled&&this._enabledFilters.push(e[r]);this._enabledFilters.length&&t.filter.push(this,this._enabledFilters)}n&&t.mask.push(this,this._mask),this._render(t);r=0;for(var i=this.children.length;r<i;r++)this.children[r].render(t);t.batch.flush(),n&&t.mask.pop(this),e&&this._enabledFilters&&this._enabledFilters.length&&t.filter.pop()},e.prototype._render=function(t){},e.prototype.destroy=function(e){t.prototype.destroy.call(this),this.sortDirty=!1;var n="boolean"==typeof e?e:e&&e.children,r=this.removeChildren(0,this.children.length);if(n)for(var i=0;i<r.length;++i)r[i].destroy(e)},Object.defineProperty(e.prototype,"width",{get:function(){return this.scale.x*this.getLocalBounds().width},set:function(t){var e=this.getLocalBounds().width;this.scale.x=0!==e?t/e:1,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.scale.y*this.getLocalBounds().height},set:function(t){var e=this.getLocalBounds().height;this.scale.y=0!==e?t/e:1,this._height=t},enumerable:!1,configurable:!0}),e}(Su);Du.prototype.containerUpdateTransform=Du.prototype.updateTransform;Su.mixin({accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1});var Cu,Ru=function(){function t(t){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(nl.tablet||nl.phone)&&this.createTouchHook();var e=document.createElement("div");e.style.width="100px",e.style.height="100px",e.style.position="absolute",e.style.top="0px",e.style.left="0px",e.style.zIndex=2..toString(),this.div=e,this.renderer=t,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),self.addEventListener("keydown",this._onKeyDown,!1)}return Object.defineProperty(t.prototype,"isActive",{get:function(){return this._isActive},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isMobileAccessibility",{get:function(){return this._isMobileAccessibility},enumerable:!1,configurable:!0}),t.prototype.createTouchHook=function(){var t=this,e=document.createElement("button");e.style.width="1px",e.style.height="1px",e.style.position="absolute",e.style.top="-1000px",e.style.left="-1000px",e.style.zIndex=2..toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",(function(){t._isMobileAccessibility=!0,t.activate(),t.destroyTouchHook()})),document.body.appendChild(e),this._hookDiv=e},t.prototype.destroyTouchHook=function(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)},t.prototype.activate=function(){var t;this._isActive||(this._isActive=!0,self.document.addEventListener("mousemove",this._onMouseMove,!0),self.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),null===(t=this.renderer.view.parentNode)||void 0===t||t.appendChild(this.div))},t.prototype.deactivate=function(){var t;this._isActive&&!this._isMobileAccessibility&&(this._isActive=!1,self.document.removeEventListener("mousemove",this._onMouseMove,!0),self.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),null===(t=this.div.parentNode)||void 0===t||t.removeChild(this.div))},t.prototype.updateAccessibleObjects=function(t){if(t.visible&&t.accessibleChildren){t.accessible&&t.interactive&&(t._accessibleActive||this.addChild(t),t.renderId=this.renderId);for(var e=t.children,n=0;n<e.length;n++)this.updateAccessibleObjects(e[n])}},t.prototype.update=function(){var t=performance.now();if(!(nl.android.device&&t<this.androidUpdateCount)&&(this.androidUpdateCount=t+this.androidUpdateFrequency,this.renderer.renderingToScreen)){this.renderer._lastObjectRendered&&this.updateAccessibleObjects(this.renderer._lastObjectRendered);var e=this.renderer.view.getBoundingClientRect(),n=e.left,r=e.top,i=e.width,o=e.height,s=this.renderer,a=s.width,l=s.height,u=s.resolution,c=i/a*u,h=o/l*u,d=this.div;d.style.left=n+"px",d.style.top=r+"px",d.style.width=a+"px",d.style.height=l+"px";for(var p=0;p<this.children.length;p++){var f=this.children[p];if(f.renderId!==this.renderId)f._accessibleActive=!1,jl(this.children,p,1),this.div.removeChild(f._accessibleDiv),this.pool.push(f._accessibleDiv),f._accessibleDiv=null,p--;else{d=f._accessibleDiv;var m=f.hitArea,g=f.worldTransform;f.hitArea?(d.style.left=(g.tx+m.x*g.a)*c+"px",d.style.top=(g.ty+m.y*g.d)*h+"px",d.style.width=m.width*g.a*c+"px",d.style.height=m.height*g.d*h+"px"):(m=f.getBounds(),this.capHitArea(m),d.style.left=m.x*c+"px",d.style.top=m.y*h+"px",d.style.width=m.width*c+"px",d.style.height=m.height*h+"px",d.title!==f.accessibleTitle&&null!==f.accessibleTitle&&(d.title=f.accessibleTitle),d.getAttribute("aria-label")!==f.accessibleHint&&null!==f.accessibleHint&&d.setAttribute("aria-label",f.accessibleHint)),f.accessibleTitle===d.title&&f.tabIndex===d.tabIndex||(d.title=f.accessibleTitle,d.tabIndex=f.tabIndex,this.debug&&this.updateDebugHTML(d))}}this.renderId++}},t.prototype.updateDebugHTML=function(t){t.innerHTML="type: "+t.type+"</br> title : "+t.title+"</br> tabIndex: "+t.tabIndex},t.prototype.capHitArea=function(t){t.x<0&&(t.width+=t.x,t.x=0),t.y<0&&(t.height+=t.y,t.y=0);var e=this.renderer,n=e.width,r=e.height;t.x+t.width>n&&(t.width=n-t.x),t.y+t.height>r&&(t.height=r-t.y)},t.prototype.addChild=function(t){var e=this.pool.pop();e||((e=document.createElement("button")).style.width="100px",e.style.height="100px",e.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",e.style.position="absolute",e.style.zIndex=2..toString(),e.style.borderStyle="none",navigator.userAgent.toLowerCase().indexOf("chrome")>-1?e.setAttribute("aria-live","off"):e.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?e.setAttribute("aria-relevant","additions"):e.setAttribute("aria-relevant","text"),e.addEventListener("click",this._onClick.bind(this)),e.addEventListener("focus",this._onFocus.bind(this)),e.addEventListener("focusout",this._onFocusOut.bind(this))),e.style.pointerEvents=t.accessiblePointerEvents,e.type=t.accessibleType,t.accessibleTitle&&null!==t.accessibleTitle?e.title=t.accessibleTitle:t.accessibleHint&&null!==t.accessibleHint||(e.title="displayObject "+t.tabIndex),t.accessibleHint&&null!==t.accessibleHint&&e.setAttribute("aria-label",t.accessibleHint),this.debug&&this.updateDebugHTML(e),t._accessibleActive=!0,t._accessibleDiv=e,e.displayObject=t,this.children.push(t),this.div.appendChild(t._accessibleDiv),t._accessibleDiv.tabIndex=t.tabIndex},t.prototype._onClick=function(t){var e=this.renderer.plugins.interaction,n=t.target.displayObject,r=e.eventData;e.dispatchEvent(n,"click",r),e.dispatchEvent(n,"pointertap",r),e.dispatchEvent(n,"tap",r)},t.prototype._onFocus=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","assertive");var e=this.renderer.plugins.interaction,n=t.target.displayObject,r=e.eventData;e.dispatchEvent(n,"mouseover",r)},t.prototype._onFocusOut=function(t){t.target.getAttribute("aria-live")||t.target.setAttribute("aria-live","polite");var e=this.renderer.plugins.interaction,n=t.target.displayObject,r=e.eventData;e.dispatchEvent(n,"mouseout",r)},t.prototype._onKeyDown=function(t){9===t.keyCode&&this.activate()},t.prototype._onMouseMove=function(t){0===t.movementX&&0===t.movementY||this.deactivate()},t.prototype.destroy=function(){this.destroyTouchHook(),this.div=null,self.document.removeEventListener("mousemove",this._onMouseMove,!0),self.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null},t}();wl.TARGET_FPMS=.06,function(t){t[t.INTERACTION=50]="INTERACTION",t[t.HIGH=25]="HIGH",t[t.NORMAL=0]="NORMAL",t[t.LOW=-25]="LOW",t[t.UTILITY=-50]="UTILITY"}(Cu||(Cu={}));var Ou=function(){function t(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=0),void 0===r&&(r=!1),this.next=null,this.previous=null,this._destroyed=!1,this.fn=t,this.context=e,this.priority=n,this.once=r}return t.prototype.match=function(t,e){return void 0===e&&(e=null),this.fn===t&&this.context===e},t.prototype.emit=function(t){this.fn&&(this.context?this.fn.call(this.context,t):this.fn(t));var e=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),e},t.prototype.connect=function(t){this.previous=t,t.next&&(t.next.previous=this),this.next=t.next,t.next=this},t.prototype.destroy=function(t){void 0===t&&(t=!1),this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);var e=this.next;return this.next=t?null:e,this.previous=null,e},t}(),Pu=function(){function t(){var t=this;this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new Ou(null,null,1/0),this.deltaMS=1/wl.TARGET_FPMS,this.elapsedMS=1/wl.TARGET_FPMS,this._tick=function(e){t._requestId=null,t.started&&(t.update(e),t.started&&null===t._requestId&&t._head.next&&(t._requestId=requestAnimationFrame(t._tick)))}}return t.prototype._requestIfNeeded=function(){null===this._requestId&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))},t.prototype._cancelIfNeeded=function(){null!==this._requestId&&(cancelAnimationFrame(this._requestId),this._requestId=null)},t.prototype._startIfPossible=function(){this.started?this._requestIfNeeded():this.autoStart&&this.start()},t.prototype.add=function(t,e,n){return void 0===n&&(n=Cu.NORMAL),this._addListener(new Ou(t,e,n))},t.prototype.addOnce=function(t,e,n){return void 0===n&&(n=Cu.NORMAL),this._addListener(new Ou(t,e,n,!0))},t.prototype._addListener=function(t){var e=this._head.next,n=this._head;if(e){for(;e;){if(t.priority>e.priority){t.connect(n);break}n=e,e=e.next}t.previous||t.connect(n)}else t.connect(n);return this._startIfPossible(),this},t.prototype.remove=function(t,e){for(var n=this._head.next;n;)n=n.match(t,e)?n.destroy():n.next;return this._head.next||this._cancelIfNeeded(),this},Object.defineProperty(t.prototype,"count",{get:function(){if(!this._head)return 0;for(var t=0,e=this._head;e=e.next;)t++;return t},enumerable:!1,configurable:!0}),t.prototype.start=function(){this.started||(this.started=!0,this._requestIfNeeded())},t.prototype.stop=function(){this.started&&(this.started=!1,this._cancelIfNeeded())},t.prototype.destroy=function(){if(!this._protected){this.stop();for(var t=this._head.next;t;)t=t.destroy(!0);this._head.destroy(),this._head=null}},t.prototype.update=function(t){var e;if(void 0===t&&(t=performance.now()),t>this.lastTime){if((e=this.elapsedMS=t-this.lastTime)>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){var n=t-this._lastFrame|0;if(n<this._minElapsedMS)return;this._lastFrame=t-n%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*wl.TARGET_FPMS;for(var r=this._head,i=r.next;i;)i=i.emit(this.deltaTime);r.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=t},Object.defineProperty(t.prototype,"FPS",{get:function(){return 1e3/this.elapsedMS},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minFPS",{get:function(){return 1e3/this._maxElapsedMS},set:function(t){var e=Math.min(this.maxFPS,t),n=Math.min(Math.max(0,e)/1e3,wl.TARGET_FPMS);this._maxElapsedMS=1/n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxFPS",{get:function(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0},set:function(t){if(0===t)this._minElapsedMS=0;else{var e=Math.max(this.minFPS,t);this._minElapsedMS=1/(e/1e3)}},enumerable:!1,configurable:!0}),Object.defineProperty(t,"shared",{get:function(){if(!t._shared){var e=t._shared=new t;e.autoStart=!0,e._protected=!0}return t._shared},enumerable:!1,configurable:!0}),Object.defineProperty(t,"system",{get:function(){if(!t._system){var e=t._system=new t;e.autoStart=!0,e._protected=!0}return t._system},enumerable:!1,configurable:!0}),t}(),Iu=function(){function t(){}return t.init=function(t){var e=this;t=Object.assign({autoStart:!0,sharedTicker:!1},t),Object.defineProperty(this,"ticker",{set:function(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,Cu.LOW)},get:function(){return this._ticker}}),this.stop=function(){e._ticker.stop()},this.start=function(){e._ticker.start()},this._ticker=null,this.ticker=t.sharedTicker?Pu.shared:new Pu,t.autoStart&&this.start()},t.destroy=function(){if(this._ticker){var t=this._ticker;this.ticker=null,t.destroy()}},t}(),Lu=function(){function t(){this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0,this.global=new cu,this.target=null,this.originalEvent=null,this.identifier=null,this.isPrimary=!1,this.button=0,this.buttons=0,this.width=0,this.height=0,this.tiltX=0,this.tiltY=0,this.pointerType=null,this.pressure=0,this.rotationAngle=0,this.twist=0,this.tangentialPressure=0}return Object.defineProperty(t.prototype,"pointerId",{get:function(){return this.identifier},enumerable:!1,configurable:!0}),t.prototype.getLocalPosition=function(t,e,n){return t.worldTransform.applyInverse(n||this.global,e)},t.prototype.copyEvent=function(t){"isPrimary"in t&&t.isPrimary&&(this.isPrimary=!0),this.button="button"in t&&t.button;var e="buttons"in t&&t.buttons;this.buttons=Number.isInteger(e)?e:"which"in t&&t.which,this.width="width"in t&&t.width,this.height="height"in t&&t.height,this.tiltX="tiltX"in t&&t.tiltX,this.tiltY="tiltY"in t&&t.tiltY,this.pointerType="pointerType"in t&&t.pointerType,this.pressure="pressure"in t&&t.pressure,this.rotationAngle="rotationAngle"in t&&t.rotationAngle,this.twist="twist"in t&&t.twist||0,this.tangentialPressure="tangentialPressure"in t&&t.tangentialPressure||0},t.prototype.reset=function(){this.isPrimary=!1},t}(),Nu=function(t,e){return(Nu=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])})(t,e)};var Fu=function(){function t(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.target=null,this.currentTarget=null,this.type=null,this.data=null}return t.prototype.stopPropagation=function(){this.stopped=!0,this.stopPropagationHint=!0,this.stopsPropagatingAt=this.currentTarget},t.prototype.reset=function(){this.stopped=!1,this.stopsPropagatingAt=null,this.stopPropagationHint=!1,this.currentTarget=null,this.target=null},t}(),ku=function(){function t(e){this._pointerId=e,this._flags=t.FLAGS.NONE}return t.prototype._doSet=function(t,e){this._flags=e?this._flags|t:this._flags&~t},Object.defineProperty(t.prototype,"pointerId",{get:function(){return this._pointerId},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"flags",{get:function(){return this._flags},set:function(t){this._flags=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"none",{get:function(){return this._flags===t.FLAGS.NONE},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"over",{get:function(){return 0!=(this._flags&t.FLAGS.OVER)},set:function(e){this._doSet(t.FLAGS.OVER,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"rightDown",{get:function(){return 0!=(this._flags&t.FLAGS.RIGHT_DOWN)},set:function(e){this._doSet(t.FLAGS.RIGHT_DOWN,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leftDown",{get:function(){return 0!=(this._flags&t.FLAGS.LEFT_DOWN)},set:function(e){this._doSet(t.FLAGS.LEFT_DOWN,e)},enumerable:!1,configurable:!0}),t.FLAGS=Object.freeze({NONE:0,OVER:1,LEFT_DOWN:2,RIGHT_DOWN:4}),t}(),Uu=function(){function t(){this._tempPoint=new cu}return t.prototype.recursiveFindHit=function(t,e,n,r,i){if(!e||!e.visible)return!1;var o=t.data.global,s=!1,a=i=e.interactive||i,l=!0;if(e.hitArea?(r&&(e.worldTransform.applyInverse(o,this._tempPoint),e.hitArea.contains(this._tempPoint.x,this._tempPoint.y)?s=!0:(r=!1,l=!1)),a=!1):e._mask&&r&&(e._mask.containsPoint&&e._mask.containsPoint(o)||(r=!1)),l&&e.interactiveChildren&&e.children)for(var u=e.children,c=u.length-1;c>=0;c--){var h=u[c],d=this.recursiveFindHit(t,h,n,r,a);if(d){if(!h.parent)continue;a=!1,d&&(t.target&&(r=!1),s=!0)}}return i&&(r&&!t.target&&!e.hitArea&&e.containsPoint&&e.containsPoint(o)&&(s=!0),e.interactive&&(s&&!t.target&&(t.target=e),n&&n(t,e,!!s))),s},t.prototype.findHit=function(t,e,n,r){this.recursiveFindHit(t,e,n,r,!1)},t}(),Bu={interactive:!1,interactiveChildren:!0,hitArea:null,get buttonMode(){return"pointer"===this.cursor},set buttonMode(t){t?this.cursor="pointer":"pointer"===this.cursor&&(this.cursor=null)},cursor:null,get trackedPointers(){return void 0===this._trackedPointers&&(this._trackedPointers={}),this._trackedPointers},_trackedPointers:void 0};Su.mixin(Bu);var Gu={target:null,data:{global:null}},zu=function(t){function e(e,n){var r=t.call(this)||this;return n=n||{},r.renderer=e,r.autoPreventDefault=void 0===n.autoPreventDefault||n.autoPreventDefault,r.interactionFrequency=n.interactionFrequency||10,r.mouse=new Lu,r.mouse.identifier=1,r.mouse.global.set(-999999),r.activeInteractionData={},r.activeInteractionData[1]=r.mouse,r.interactionDataPool=[],r.eventData=new Fu,r.interactionDOMElement=null,r.moveWhenInside=!1,r.eventsAdded=!1,r.tickerAdded=!1,r.mouseOverRenderer=!("PointerEvent"in self),r.supportsTouchEvents="ontouchstart"in self,r.supportsPointerEvents=!!self.PointerEvent,r.onPointerUp=r.onPointerUp.bind(r),r.processPointerUp=r.processPointerUp.bind(r),r.onPointerCancel=r.onPointerCancel.bind(r),r.processPointerCancel=r.processPointerCancel.bind(r),r.onPointerDown=r.onPointerDown.bind(r),r.processPointerDown=r.processPointerDown.bind(r),r.onPointerMove=r.onPointerMove.bind(r),r.processPointerMove=r.processPointerMove.bind(r),r.onPointerOut=r.onPointerOut.bind(r),r.processPointerOverOut=r.processPointerOverOut.bind(r),r.onPointerOver=r.onPointerOver.bind(r),r.cursorStyles={default:"inherit",pointer:"pointer"},r.currentCursorMode=null,r.cursor=null,r.resolution=1,r.delayedEvents=[],r.search=new Uu,r._tempDisplayObject=new Au,r._eventListenerOptions={capture:!0,passive:!1},r._useSystemTicker=void 0===n.useSystemTicker||n.useSystemTicker,r.setTargetElement(r.renderer.view,r.renderer.resolution),r}return function(t,e){function n(){this.constructor=t}Nu(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"useSystemTicker",{get:function(){return this._useSystemTicker},set:function(t){this._useSystemTicker=t,t?this.addTickerListener():this.removeTickerListener()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"lastObjectRendered",{get:function(){return this.renderer._lastObjectRendered||this._tempDisplayObject},enumerable:!1,configurable:!0}),e.prototype.hitTest=function(t,e){return Gu.target=null,Gu.data.global=t,e||(e=this.lastObjectRendered),this.processInteractive(Gu,e,null,!0),Gu.target},e.prototype.setTargetElement=function(t,e){void 0===e&&(e=1),this.removeTickerListener(),this.removeEvents(),this.interactionDOMElement=t,this.resolution=e,this.addEvents(),this.addTickerListener()},e.prototype.addTickerListener=function(){!this.tickerAdded&&this.interactionDOMElement&&this._useSystemTicker&&(Pu.system.add(this.tickerUpdate,this,Cu.INTERACTION),this.tickerAdded=!0)},e.prototype.removeTickerListener=function(){this.tickerAdded&&(Pu.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)},e.prototype.addEvents=function(){if(!this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;self.navigator.msPointerEnabled?(t.msContentZooming="none",t.msTouchAction="none"):this.supportsPointerEvents&&(t.touchAction="none"),this.supportsPointerEvents?(self.document.addEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),self.addEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),self.addEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(self.document.addEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.addEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),self.addEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.addEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.addEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.eventsAdded=!0}},e.prototype.removeEvents=function(){if(this.eventsAdded&&this.interactionDOMElement){var t=this.interactionDOMElement.style;self.navigator.msPointerEnabled?(t.msContentZooming="",t.msTouchAction=""):this.supportsPointerEvents&&(t.touchAction=""),this.supportsPointerEvents?(self.document.removeEventListener("pointermove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerdown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerleave",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("pointerover",this.onPointerOver,this._eventListenerOptions),self.removeEventListener("pointercancel",this.onPointerCancel,this._eventListenerOptions),self.removeEventListener("pointerup",this.onPointerUp,this._eventListenerOptions)):(self.document.removeEventListener("mousemove",this.onPointerMove,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mousedown",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseout",this.onPointerOut,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("mouseover",this.onPointerOver,this._eventListenerOptions),self.removeEventListener("mouseup",this.onPointerUp,this._eventListenerOptions)),this.supportsTouchEvents&&(this.interactionDOMElement.removeEventListener("touchstart",this.onPointerDown,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchcancel",this.onPointerCancel,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchend",this.onPointerUp,this._eventListenerOptions),this.interactionDOMElement.removeEventListener("touchmove",this.onPointerMove,this._eventListenerOptions)),this.interactionDOMElement=null,this.eventsAdded=!1}},e.prototype.tickerUpdate=function(t){this._deltaTime+=t,this._deltaTime<this.interactionFrequency||(this._deltaTime=0,this.update())},e.prototype.update=function(){if(this.interactionDOMElement)if(this._didMove)this._didMove=!1;else{for(var t in this.cursor=null,this.activeInteractionData)if(this.activeInteractionData.hasOwnProperty(t)){var e=this.activeInteractionData[t];if(e.originalEvent&&"touch"!==e.pointerType){var n=this.configureInteractionEventForDOMEvent(this.eventData,e.originalEvent,e);this.processInteractive(n,this.lastObjectRendered,this.processPointerOverOut,!0)}}this.setCursorMode(this.cursor)}},e.prototype.setCursorMode=function(t){t=t||"default";var e=!0;if(self.OffscreenCanvas&&this.interactionDOMElement instanceof OffscreenCanvas&&(e=!1),this.currentCursorMode!==t){this.currentCursorMode=t;var n=this.cursorStyles[t];if(n)switch(typeof n){case"string":e&&(this.interactionDOMElement.style.cursor=n);break;case"function":n(t);break;case"object":e&&Object.assign(this.interactionDOMElement.style,n)}else e&&"string"==typeof t&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,t)&&(this.interactionDOMElement.style.cursor=t)}},e.prototype.dispatchEvent=function(t,e,n){n.stopPropagationHint&&t!==n.stopsPropagatingAt||(n.currentTarget=t,n.type=e,t.emit(e,n),t[e]&&t[e](n))},e.prototype.delayDispatchEvent=function(t,e,n){this.delayedEvents.push({displayObject:t,eventString:e,eventData:n})},e.prototype.mapPositionToPoint=function(t,e,n){var r;r=this.interactionDOMElement.parentElement?this.interactionDOMElement.getBoundingClientRect():{x:0,y:0,width:this.interactionDOMElement.width,height:this.interactionDOMElement.height,left:0,top:0};var i=1/this.resolution;t.x=(e-r.left)*(this.interactionDOMElement.width/r.width)*i,t.y=(n-r.top)*(this.interactionDOMElement.height/r.height)*i},e.prototype.processInteractive=function(t,e,n,r){var i=this.search.findHit(t,e,n,r),o=this.delayedEvents;if(!o.length)return i;t.stopPropagationHint=!1;var s=o.length;this.delayedEvents=[];for(var a=0;a<s;a++){var l=o[a],u=l.displayObject,c=l.eventString,h=l.eventData;h.stopsPropagatingAt===u&&(h.stopPropagationHint=!0),this.dispatchEvent(u,c,h)}return i},e.prototype.onPointerDown=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);if(this.autoPreventDefault&&e[0].isNormalized)(t.cancelable||!("cancelable"in t))&&t.preventDefault();for(var n=e.length,r=0;r<n;r++){var i=e[r],o=this.getInteractionDataForPointerId(i),s=this.configureInteractionEventForDOMEvent(this.eventData,i,o);if(s.data.originalEvent=t,this.processInteractive(s,this.lastObjectRendered,this.processPointerDown,!0),this.emit("pointerdown",s),"touch"===i.pointerType)this.emit("touchstart",s);else if("mouse"===i.pointerType||"pen"===i.pointerType){var a=2===i.button;this.emit(a?"rightdown":"mousedown",this.eventData)}}}},e.prototype.processPointerDown=function(t,e,n){var r=t.data,i=t.data.identifier;if(n)if(e.trackedPointers[i]||(e.trackedPointers[i]=new ku(i)),this.dispatchEvent(e,"pointerdown",t),"touch"===r.pointerType)this.dispatchEvent(e,"touchstart",t);else if("mouse"===r.pointerType||"pen"===r.pointerType){var o=2===r.button;o?e.trackedPointers[i].rightDown=!0:e.trackedPointers[i].leftDown=!0,this.dispatchEvent(e,o?"rightdown":"mousedown",t)}},e.prototype.onPointerComplete=function(t,e,n){for(var r=this.normalizeToPointerData(t),i=r.length,o=t.target!==this.interactionDOMElement?"outside":"",s=0;s<i;s++){var a=r[s],l=this.getInteractionDataForPointerId(a),u=this.configureInteractionEventForDOMEvent(this.eventData,a,l);if(u.data.originalEvent=t,this.processInteractive(u,this.lastObjectRendered,n,e||!o),this.emit(e?"pointercancel":"pointerup"+o,u),"mouse"===a.pointerType||"pen"===a.pointerType){var c=2===a.button;this.emit(c?"rightup"+o:"mouseup"+o,u)}else"touch"===a.pointerType&&(this.emit(e?"touchcancel":"touchend"+o,u),this.releaseInteractionDataForPointerId(a.pointerId))}},e.prototype.onPointerCancel=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!0,this.processPointerCancel)},e.prototype.processPointerCancel=function(t,e){var n=t.data,r=t.data.identifier;void 0!==e.trackedPointers[r]&&(delete e.trackedPointers[r],this.dispatchEvent(e,"pointercancel",t),"touch"===n.pointerType&&this.dispatchEvent(e,"touchcancel",t))},e.prototype.onPointerUp=function(t){this.supportsTouchEvents&&"touch"===t.pointerType||this.onPointerComplete(t,!1,this.processPointerUp)},e.prototype.processPointerUp=function(t,e,n){var r=t.data,i=t.data.identifier,o=e.trackedPointers[i],s="touch"===r.pointerType,a="mouse"===r.pointerType||"pen"===r.pointerType,l=!1;if(a){var u=2===r.button,c=ku.FLAGS,h=u?c.RIGHT_DOWN:c.LEFT_DOWN,d=void 0!==o&&o.flags&h;n?(this.dispatchEvent(e,u?"rightup":"mouseup",t),d&&(this.dispatchEvent(e,u?"rightclick":"click",t),l=!0)):d&&this.dispatchEvent(e,u?"rightupoutside":"mouseupoutside",t),o&&(u?o.rightDown=!1:o.leftDown=!1)}n?(this.dispatchEvent(e,"pointerup",t),s&&this.dispatchEvent(e,"touchend",t),o&&(a&&!l||this.dispatchEvent(e,"pointertap",t),s&&(this.dispatchEvent(e,"tap",t),o.over=!1))):o&&(this.dispatchEvent(e,"pointerupoutside",t),s&&this.dispatchEvent(e,"touchendoutside",t)),o&&o.none&&delete e.trackedPointers[i]},e.prototype.onPointerMove=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t);"mouse"!==e[0].pointerType&&"pen"!==e[0].pointerType||(this._didMove=!0,this.cursor=null);for(var n=e.length,r=0;r<n;r++){var i=e[r],o=this.getInteractionDataForPointerId(i),s=this.configureInteractionEventForDOMEvent(this.eventData,i,o);s.data.originalEvent=t,this.processInteractive(s,this.lastObjectRendered,this.processPointerMove,!0),this.emit("pointermove",s),"touch"===i.pointerType&&this.emit("touchmove",s),"mouse"!==i.pointerType&&"pen"!==i.pointerType||this.emit("mousemove",s)}"mouse"===e[0].pointerType&&this.setCursorMode(this.cursor)}},e.prototype.processPointerMove=function(t,e,n){var r=t.data,i="touch"===r.pointerType,o="mouse"===r.pointerType||"pen"===r.pointerType;o&&this.processPointerOverOut(t,e,n),this.moveWhenInside&&!n||(this.dispatchEvent(e,"pointermove",t),i&&this.dispatchEvent(e,"touchmove",t),o&&this.dispatchEvent(e,"mousemove",t))},e.prototype.onPointerOut=function(t){if(!this.supportsTouchEvents||"touch"!==t.pointerType){var e=this.normalizeToPointerData(t)[0];"mouse"===e.pointerType&&(this.mouseOverRenderer=!1,this.setCursorMode(null));var n=this.getInteractionDataForPointerId(e),r=this.configureInteractionEventForDOMEvent(this.eventData,e,n);r.data.originalEvent=e,this.processInteractive(r,this.lastObjectRendered,this.processPointerOverOut,!1),this.emit("pointerout",r),"mouse"===e.pointerType||"pen"===e.pointerType?this.emit("mouseout",r):this.releaseInteractionDataForPointerId(n.identifier)}},e.prototype.processPointerOverOut=function(t,e,n){var r=t.data,i=t.data.identifier,o="mouse"===r.pointerType||"pen"===r.pointerType,s=e.trackedPointers[i];n&&!s&&(s=e.trackedPointers[i]=new ku(i)),void 0!==s&&(n&&this.mouseOverRenderer?(s.over||(s.over=!0,this.delayDispatchEvent(e,"pointerover",t),o&&this.delayDispatchEvent(e,"mouseover",t)),o&&null===this.cursor&&(this.cursor=e.cursor)):s.over&&(s.over=!1,this.dispatchEvent(e,"pointerout",this.eventData),o&&this.dispatchEvent(e,"mouseout",t),s.none&&delete e.trackedPointers[i]))},e.prototype.onPointerOver=function(t){var e=this.normalizeToPointerData(t)[0],n=this.getInteractionDataForPointerId(e),r=this.configureInteractionEventForDOMEvent(this.eventData,e,n);r.data.originalEvent=e,"mouse"===e.pointerType&&(this.mouseOverRenderer=!0),this.emit("pointerover",r),"mouse"!==e.pointerType&&"pen"!==e.pointerType||this.emit("mouseover",r)},e.prototype.getInteractionDataForPointerId=function(t){var e,n=t.pointerId;return 1===n||"mouse"===t.pointerType?e=this.mouse:this.activeInteractionData[n]?e=this.activeInteractionData[n]:((e=this.interactionDataPool.pop()||new Lu).identifier=n,this.activeInteractionData[n]=e),e.copyEvent(t),e},e.prototype.releaseInteractionDataForPointerId=function(t){var e=this.activeInteractionData[t];e&&(delete this.activeInteractionData[t],e.reset(),this.interactionDataPool.push(e))},e.prototype.configureInteractionEventForDOMEvent=function(t,e,n){return t.data=n,this.mapPositionToPoint(n.global,e.clientX,e.clientY),"touch"===e.pointerType&&(e.globalX=n.global.x,e.globalY=n.global.y),n.originalEvent=e,t.reset(),t},e.prototype.normalizeToPointerData=function(t){var e=[];if(this.supportsTouchEvents&&t instanceof TouchEvent)for(var n=0,r=t.changedTouches.length;n<r;n++){var i=t.changedTouches[n];void 0===i.button&&(i.button=t.touches.length?1:0),void 0===i.buttons&&(i.buttons=t.touches.length?1:0),void 0===i.isPrimary&&(i.isPrimary=1===t.touches.length&&"touchstart"===t.type),void 0===i.width&&(i.width=i.radiusX||1),void 0===i.height&&(i.height=i.radiusY||1),void 0===i.tiltX&&(i.tiltX=0),void 0===i.tiltY&&(i.tiltY=0),void 0===i.pointerType&&(i.pointerType="touch"),void 0===i.pointerId&&(i.pointerId=i.identifier||0),void 0===i.pressure&&(i.pressure=i.force||.5),void 0===i.twist&&(i.twist=0),void 0===i.tangentialPressure&&(i.tangentialPressure=0),void 0===i.layerX&&(i.layerX=i.offsetX=i.clientX),void 0===i.layerY&&(i.layerY=i.offsetY=i.clientY),i.isNormalized=!0,e.push(i)}else if(self.MouseEvent&&(!(t instanceof MouseEvent)||this.supportsPointerEvents&&t instanceof self.PointerEvent))e.push(t);else{var o=t;void 0===o.isPrimary&&(o.isPrimary=!0),void 0===o.width&&(o.width=1),void 0===o.height&&(o.height=1),void 0===o.tiltX&&(o.tiltX=0),void 0===o.tiltY&&(o.tiltY=0),void 0===o.pointerType&&(o.pointerType="mouse"),void 0===o.pointerId&&(o.pointerId=1),void 0===o.pressure&&(o.pressure=.5),void 0===o.twist&&(o.twist=0),void 0===o.tangentialPressure&&(o.tangentialPressure=0),o.isNormalized=!0,e.push(o)}return e},e.prototype.destroy=function(){this.removeEvents(),this.removeTickerListener(),this.removeAllListeners(),this.renderer=null,this.mouse=null,this.eventData=null,this.interactionDOMElement=null,this.onPointerDown=null,this.processPointerDown=null,this.onPointerUp=null,this.processPointerUp=null,this.onPointerCancel=null,this.processPointerCancel=null,this.onPointerMove=null,this.processPointerMove=null,this.onPointerOut=null,this.processPointerOverOut=null,this.onPointerOver=null,this.search=null},e}(Tl.a),Hu=function(){function t(t){this.items=[],this._name=t,this._aliasCount=0}return t.prototype.emit=function(t,e,n,r,i,o,s,a){if(arguments.length>8)throw new Error("max arguments reached");var l=this,u=l.name,c=l.items;this._aliasCount++;for(var h=0,d=c.length;h<d;h++)c[h][u](t,e,n,r,i,o,s,a);return c===this.items&&this._aliasCount--,this},t.prototype.ensureNonAliasedItems=function(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))},t.prototype.add=function(t){return t[this._name]&&(this.ensureNonAliasedItems(),this.remove(t),this.items.push(t)),this},t.prototype.remove=function(t){var e=this.items.indexOf(t);return-1!==e&&(this.ensureNonAliasedItems(),this.items.splice(e,1)),this},t.prototype.contains=function(t){return-1!==this.items.indexOf(t)},t.prototype.removeAll=function(){return this.ensureNonAliasedItems(),this.items.length=0,this},t.prototype.destroy=function(){this.removeAll(),this.items=null,this._name=null},Object.defineProperty(t.prototype,"empty",{get:function(){return 0===this.items.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t}();Object.defineProperties(Hu.prototype,{dispatch:{value:Hu.prototype.emit},run:{value:Hu.prototype.emit}}),wl.PREFER_ENV=nl.any?rl.WEBGL:rl.WEBGL2,wl.STRICT_TEXTURE_CACHE=!1;var ju=[];function Vu(t,e){if(!t)return null;var n="";if("string"==typeof t){var r=/\.(\w{3,4})(?:$|\?|#)/i.exec(t);r&&(n=r[1].toLowerCase())}for(var i=ju.length-1;i>=0;--i){var o=ju[i];if(o.test&&o.test(t,n))return new o(t,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var Xu=function(t,e){return(Xu=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])})(t,e)};function Wu(t,e){function n(){this.constructor=t}Xu(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Yu=function(){return(Yu=Object.assign||function(t){for(var e,n=arguments,r=1,i=arguments.length;r<i;r++)for(var o in e=n[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};var qu=function(){function t(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this._width=t,this._height=e,this.destroyed=!1,this.internal=!1,this.onResize=new Hu("setRealSize"),this.onUpdate=new Hu("update"),this.onError=new Hu("onError")}return t.prototype.bind=function(t){this.onResize.add(t),this.onUpdate.add(t),this.onError.add(t),(this._width||this._height)&&this.onResize.emit(this._width,this._height)},t.prototype.unbind=function(t){this.onResize.remove(t),this.onUpdate.remove(t),this.onError.remove(t)},t.prototype.resize=function(t,e){t===this._width&&e===this._height||(this._width=t,this._height=e,this.onResize.emit(t,e))},Object.defineProperty(t.prototype,"valid",{get:function(){return!!this._width&&!!this._height},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.destroyed||this.onUpdate.emit()},t.prototype.load=function(){return Promise.resolve(this)},Object.defineProperty(t.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this._height},enumerable:!1,configurable:!0}),t.prototype.style=function(t,e,n){return!1},t.prototype.dispose=function(){},t.prototype.destroy=function(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)},t.test=function(t,e){return!1},t}(),$u=function(t){function e(e,n){var r=this,i=n||{},o=i.width,s=i.height;if(!o||!s)throw new Error("BufferResource width or height invalid");return(r=t.call(this,o,s)||this).data=e,r}return Wu(e,t),e.prototype.upload=function(t,e,n){var r=t.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===ml.UNPACK);var i=e.realWidth,o=e.realHeight;return n.width===i&&n.height===o?r.texSubImage2D(e.target,0,0,0,i,o,e.format,n.type,this.data):(n.width=i,n.height=o,r.texImage2D(e.target,0,n.internalFormat,i,o,0,e.format,n.type,this.data)),!0},e.prototype.dispose=function(){this.data=null},e.test=function(t){return t instanceof Float32Array||t instanceof Uint8Array||t instanceof Uint32Array},e}(qu),Ku={scaleMode:dl.NEAREST,format:ll.RGBA,alphaMode:ml.NPM},Zu=function(t){function e(e,n){void 0===e&&(e=null),void 0===n&&(n=null);var r=t.call(this)||this,i=(n=n||{}).alphaMode,o=n.mipmap,s=n.anisotropicLevel,a=n.scaleMode,l=n.width,u=n.height,c=n.wrapMode,h=n.format,d=n.type,p=n.target,f=n.resolution,m=n.resourceOptions;return!e||e instanceof qu||((e=Vu(e,m)).internal=!0),r.resolution=f||wl.RESOLUTION,r.width=Math.round((l||0)*r.resolution)/r.resolution,r.height=Math.round((u||0)*r.resolution)/r.resolution,r._mipmap=void 0!==o?o:wl.MIPMAP_TEXTURES,r.anisotropicLevel=void 0!==s?s:wl.ANISOTROPIC_LEVEL,r._wrapMode=c||wl.WRAP_MODE,r._scaleMode=void 0!==a?a:wl.SCALE_MODE,r.format=h||ll.RGBA,r.type=d||cl.UNSIGNED_BYTE,r.target=p||ul.TEXTURE_2D,r.alphaMode=void 0!==i?i:ml.UNPACK,r.uid=Wl(),r.touched=0,r.isPowerOfTwo=!1,r._refreshPOT(),r._glTextures={},r.dirtyId=0,r.dirtyStyleId=0,r.cacheId=null,r.valid=l>0&&u>0,r.textureCacheIds=[],r.destroyed=!1,r.resource=null,r._batchEnabled=0,r._batchLocation=0,r.parentTextureArray=null,r.setResource(e),r}return Wu(e,t),Object.defineProperty(e.prototype,"realWidth",{get:function(){return Math.round(this.width*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"realHeight",{get:function(){return Math.round(this.height*this.resolution)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"mipmap",{get:function(){return this._mipmap},set:function(t){this._mipmap!==t&&(this._mipmap=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scaleMode",{get:function(){return this._scaleMode},set:function(t){this._scaleMode!==t&&(this._scaleMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"wrapMode",{get:function(){return this._wrapMode},set:function(t){this._wrapMode!==t&&(this._wrapMode=t,this.dirtyStyleId++)},enumerable:!1,configurable:!0}),e.prototype.setStyle=function(t,e){var n;return void 0!==t&&t!==this.scaleMode&&(this.scaleMode=t,n=!0),void 0!==e&&e!==this.mipmap&&(this.mipmap=e,n=!0),n&&this.dirtyStyleId++,this},e.prototype.setSize=function(t,e,n){return n=n||this.resolution,this.setRealSize(t*n,e*n,n)},e.prototype.setRealSize=function(t,e,n){return this.resolution=n||this.resolution,this.width=Math.round(t)/this.resolution,this.height=Math.round(e)/this.resolution,this._refreshPOT(),this.update(),this},e.prototype._refreshPOT=function(){this.isPowerOfTwo=zl(this.realWidth)&&zl(this.realHeight)},e.prototype.setResolution=function(t){var e=this.resolution;return e===t||(this.resolution=t,this.valid&&(this.width=Math.round(this.width*e)/t,this.height=Math.round(this.height*e)/t,this.emit("update",this)),this._refreshPOT()),this},e.prototype.setResource=function(t){if(this.resource===t)return this;if(this.resource)throw new Error("Resource can be set only once");return t.bind(this),this.resource=t,this},e.prototype.update=function(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))},e.prototype.onError=function(t){this.emit("error",this,t)},e.prototype.destroy=function(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete Zl[this.cacheId],delete Kl[this.cacheId],this.cacheId=null),this.dispose(),e.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0},e.prototype.dispose=function(){this.emit("dispose",this)},e.prototype.castToBaseTexture=function(){return this},e.from=function(t,n,r){void 0===r&&(r=wl.STRICT_TEXTURE_CACHE);var i="string"==typeof t,o=null;if(i)o=t;else{if(!t._pixiId){var s=n&&n.pixiIdPrefix||"pixiid";t._pixiId=s+"_"+Wl()}o=t._pixiId}var a=Zl[o];if(i&&r&&!a)throw new Error('The cacheId "'+o+'" does not exist in BaseTextureCache.');return a||((a=new e(t,n)).cacheId=o,e.addToCache(a,o)),a},e.fromBuffer=function(t,n,r,i){t=t||new Float32Array(n*r*4);var o=new $u(t,{width:n,height:r}),s=t instanceof Float32Array?cl.FLOAT:cl.UNSIGNED_BYTE;return new e(o,Object.assign(Ku,i||{width:n,height:r,type:s}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),Zl[e]&&console.warn("BaseTexture added to the cache with an id ["+e+"] that already had an entry"),Zl[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=Zl[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete Zl[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r<t.textureCacheIds.length;++r)delete Zl[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null},e._globalBatch=0,e}(Tl.a),Ju=function(t){function e(e,n){var r=this,i=n||{},o=i.width,s=i.height;(r=t.call(this,o,s)||this).items=[],r.itemDirtyIds=[];for(var a=0;a<e;a++){var l=new Zu;r.items.push(l),r.itemDirtyIds.push(-2)}return r.length=e,r._load=null,r.baseTexture=null,r}return Wu(e,t),e.prototype.initFromArray=function(t,e){for(var n=0;n<this.length;n++)t[n]&&(t[n].castToBaseTexture?this.addBaseTextureAt(t[n].castToBaseTexture(),n):t[n]instanceof qu?this.addResourceAt(t[n],n):this.addResourceAt(Vu(t[n],e),n))},e.prototype.dispose=function(){for(var t=0,e=this.length;t<e;t++)this.items[t].destroy();this.items=null,this.itemDirtyIds=null,this._load=null},e.prototype.addResourceAt=function(t,e){if(!this.items[e])throw new Error("Index "+e+" is out of bounds");return t.valid&&!this.valid&&this.resize(t.width,t.height),this.items[e].setResource(t),this},e.prototype.bind=function(e){if(null!==this.baseTexture)throw new Error("Only one base texture per TextureArray is allowed");t.prototype.bind.call(this,e);for(var n=0;n<this.length;n++)this.items[n].parentTextureArray=e,this.items[n].on("update",e.update,e)},e.prototype.unbind=function(e){t.prototype.unbind.call(this,e);for(var n=0;n<this.length;n++)this.items[n].parentTextureArray=null,this.items[n].off("update",e.update,e)},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.items.map((function(t){return t.resource})).filter((function(t){return t})).map((function(t){return t.load()}));return this._load=Promise.all(e).then((function(){var e=t.items[0],n=e.realWidth,r=e.realHeight;return t.resize(n,r),Promise.resolve(t)})),this._load},e}(qu),Qu=function(t){function e(e,n){var r,i,o=this,s=n||{},a=s.width,l=s.height;return Array.isArray(e)?(r=e,i=e.length):i=e,o=t.call(this,i,{width:a,height:l})||this,r&&o.initFromArray(r,n),o}return Wu(e,t),e.prototype.addBaseTextureAt=function(t,e){if(!t.resource)throw new Error("ArrayResource does not support RenderTexture");return this.addResourceAt(t.resource,e),this},e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=ul.TEXTURE_2D_ARRAY},e.prototype.upload=function(t,e,n){var r=this.length,i=this.itemDirtyIds,o=this.items,s=t.gl;n.dirtyId<0&&s.texImage3D(s.TEXTURE_2D_ARRAY,0,n.internalFormat,this._width,this._height,r,0,e.format,n.type,null);for(var a=0;a<r;a++){var l=o[a];i[a]<l.dirtyId&&(i[a]=l.dirtyId,l.valid&&s.texSubImage3D(s.TEXTURE_2D_ARRAY,0,0,0,a,l.resource.width,l.resource.height,1,e.format,n.type,l.resource.source))}return!0},e}(Ju),tc=function(t){function e(e){var n=this,r=e,i=r.naturalWidth||r.videoWidth||r.width,o=r.naturalHeight||r.videoHeight||r.height;return(n=t.call(this,i,o)||this).source=e,n.noSubImage=!1,n}return Wu(e,t),e.crossOrigin=function(t,e,n){void 0===n&&0!==e.indexOf("data:")?t.crossOrigin=function(t,e){if(void 0===e&&(e=self.location),0===t.indexOf("data:"))return"";e=e||self.location,Ql||(Ql=document.createElement("a")),Ql.href=t;var n=Dl.parse(Ql.href),r=!n.port&&""===e.port||n.port===e.port;return n.hostname===e.hostname&&r&&n.protocol===e.protocol?"":"anonymous"}(e):!1!==n&&(t.crossOrigin="string"==typeof n?n:"anonymous")},e.prototype.upload=function(t,e,n,r){var i=t.gl,o=e.realWidth,s=e.realHeight;return r=r||this.source,i.pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===ml.UNPACK),this.noSubImage||e.target!==i.TEXTURE_2D||n.width!==o||n.height!==s?(n.width=o,n.height=s,i.texImage2D(e.target,0,n.internalFormat,e.format,n.type,r)):i.texSubImage2D(i.TEXTURE_2D,0,0,0,e.format,n.type,r),!0},e.prototype.update=function(){if(!this.destroyed){var e=this.source,n=e.naturalWidth||e.videoWidth||e.width,r=e.naturalHeight||e.videoHeight||e.height;this.resize(n,r),t.prototype.update.call(this)}},e.prototype.dispose=function(){this.source=null},e}(qu),ec=function(t){function e(e){return t.call(this,e)||this}return Wu(e,t),e.test=function(t){var e=self.OffscreenCanvas;return!!(e&&t instanceof e)||self.HTMLCanvasElement&&t instanceof HTMLCanvasElement},e}(tc),nc=function(t){function e(n,r){var i=this,o=r||{},s=o.width,a=o.height,l=o.autoLoad,u=o.linkBaseTexture;if(n&&n.length!==e.SIDES)throw new Error("Invalid length. Got "+n.length+", expected 6");i=t.call(this,6,{width:s,height:a})||this;for(var c=0;c<e.SIDES;c++)i.items[c].target=ul.TEXTURE_CUBE_MAP_POSITIVE_X+c;return i.linkBaseTexture=!1!==u,n&&i.initFromArray(n,r),!1!==l&&i.load(),i}return Wu(e,t),e.prototype.bind=function(e){t.prototype.bind.call(this,e),e.target=ul.TEXTURE_CUBE_MAP},e.prototype.addBaseTextureAt=function(t,e,n){if(void 0===n&&(n=this.linkBaseTexture),!this.items[e])throw new Error("Index "+e+" is out of bounds");if(!this.linkBaseTexture||t.parentTextureArray||Object.keys(t._glTextures).length>0){if(!t.resource)throw new Error("CubeResource does not support copying of renderTexture.");this.addResourceAt(t.resource,e)}else t.target=ul.TEXTURE_CUBE_MAP_POSITIVE_X+e,t.parentTextureArray=this.baseTexture,this.items[e]=t;return t.valid&&!this.valid&&this.resize(t.realWidth,t.realHeight),this.items[e]=t,this},e.prototype.upload=function(t,n,r){for(var i=this.itemDirtyIds,o=0;o<e.SIDES;o++){var s=this.items[o];i[o]<s.dirtyId&&(s.valid&&s.resource?(s.resource.upload(t,s,r),i[o]=s.dirtyId):i[o]<-1&&(t.gl.texImage2D(s.target,0,r.internalFormat,n.realWidth,n.realHeight,0,n.format,r.type,null),i[o]=-1))}return!0},e.test=function(t){return Array.isArray(t)&&t.length===e.SIDES},e.SIDES=6,e}(Ju),rc=function(t){function e(e,n){var r=this;if(n=n||{},!(e instanceof HTMLImageElement)){var i=new Image;tc.crossOrigin(i,e,n.crossorigin),i.src=e,e=i}return r=t.call(this,e)||this,!e.complete&&r._width&&r._height&&(r._width=0,r._height=0),r.url=e.src,r._process=null,r.preserveBitmap=!1,r.createBitmap=(void 0!==n.createBitmap?n.createBitmap:wl.CREATE_IMAGE_BITMAP)&&!!self.createImageBitmap,r.alphaMode="number"==typeof n.alphaMode?n.alphaMode:null,r.bitmap=null,r._load=null,!1!==n.autoLoad&&r.load(),r}return Wu(e,t),e.prototype.load=function(t){var e=this;return this._load||(void 0!==t&&(this.createBitmap=t),this._load=new Promise((function(t,n){var r=e.source;e.url=r.src;var i=function(){e.destroyed||(r.onload=null,r.onerror=null,e.resize(r.width,r.height),e._load=null,e.createBitmap?t(e.process()):t(e))};r.complete&&r.src?i():(r.onload=i,r.onerror=function(t){n(t),e.onError.emit(t)})}))),this._load},e.prototype.process=function(){var t=this,e=this.source;if(null!==this._process)return this._process;if(null!==this.bitmap||!self.createImageBitmap)return Promise.resolve(this);var n=self.createImageBitmap,r=!e.crossOrigin||"anonymous"===e.crossOrigin;return this._process=fetch(e.src,{mode:r?"cors":"no-cors"}).then((function(t){return t.blob()})).then((function(r){return n(r,0,0,e.width,e.height,{premultiplyAlpha:t.alphaMode===ml.UNPACK?"premultiply":"none"})})).then((function(e){return t.destroyed?Promise.reject():(t.bitmap=e,t.update(),t._process=null,Promise.resolve(t))})),this._process},e.prototype.upload=function(e,n,r){if("number"==typeof this.alphaMode&&(n.alphaMode=this.alphaMode),!this.createBitmap)return t.prototype.upload.call(this,e,n,r);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(t.prototype.upload.call(this,e,n,r,this.bitmap),!this.preserveBitmap){var i=!0,o=n._glTextures;for(var s in o){var a=o[s];if(a!==r&&a.dirtyId!==n.dirtyId){i=!1;break}}i&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0},e.prototype.dispose=function(){this.source.onload=null,this.source.onerror=null,t.prototype.dispose.call(this),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null},e.test=function(t){return"string"==typeof t||t instanceof HTMLImageElement},e}(tc),ic=function(t){function e(e,n){var r=this;return n=n||{},(r=t.call(this,document.createElement("canvas"))||this)._width=0,r._height=0,r.svg=e,r.scale=n.scale||1,r._overrideWidth=n.width,r._overrideHeight=n.height,r._resolve=null,r._crossorigin=n.crossorigin,r._load=null,!1!==n.autoLoad&&r.load(),r}return Wu(e,t),e.prototype.load=function(){var t=this;return this._load||(this._load=new Promise((function(e){if(t._resolve=function(){t.resize(t.source.width,t.source.height),e(t)},/^\<svg/.test(t.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");t.svg="data:image/svg+xml;base64,"+btoa(unescape(encodeURIComponent(t.svg)))}t._loadSvg()}))),this._load},e.prototype._loadSvg=function(){var t=this,e=new Image;tc.crossOrigin(e,this.svg,this._crossorigin),e.src=this.svg,e.onerror=function(n){t._resolve&&(e.onerror=null,t.onError.emit(n))},e.onload=function(){if(t._resolve){var n=e.width,r=e.height;if(!n||!r)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");var i=n*t.scale,o=r*t.scale;(t._overrideWidth||t._overrideHeight)&&(i=t._overrideWidth||t._overrideHeight/r*n,o=t._overrideHeight||t._overrideWidth/n*r),i=Math.round(i),o=Math.round(o);var s=t.source;s.width=i,s.height=o,s._pixiId="canvas_"+Wl(),s.getContext("2d").drawImage(e,0,0,n,r,0,0,i,o),t._resolve(),t._resolve=null}}},e.getSize=function(t){var n=e.SVG_SIZE.exec(t),r={};return n&&(r[n[1]]=Math.round(parseFloat(n[3])),r[n[5]]=Math.round(parseFloat(n[7]))),r},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._resolve=null,this._crossorigin=null},e.test=function(t,n){return"svg"===n||"string"==typeof t&&/^data:image\/svg\+xml(;(charset=utf8|utf8))?;base64/.test(t)||"string"==typeof t&&e.SVG_XML.test(t)},e.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m,e.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i,e}(tc),oc=function(t){function e(n,r){var i=this;if(r=r||{},!(n instanceof HTMLVideoElement)){var o=document.createElement("video");o.setAttribute("preload","auto"),o.setAttribute("webkit-playsinline",""),o.setAttribute("playsinline",""),"string"==typeof n&&(n=[n]);var s=n[0].src||n[0];tc.crossOrigin(o,s,r.crossorigin);for(var a=0;a<n.length;++a){var l=document.createElement("source"),u=n[a],c=u.src,h=u.mime,d=(c=c||n[a]).split("?").shift().toLowerCase(),p=d.substr(d.lastIndexOf(".")+1);h=h||e.MIME_TYPES[p]||"video/"+p,l.src=c,l.type=h,o.appendChild(l)}n=o}return(i=t.call(this,n)||this).noSubImage=!0,i._autoUpdate=!0,i._isConnectedToTicker=!1,i._updateFPS=r.updateFPS||0,i._msToNextUpdate=0,i.autoPlay=!1!==r.autoPlay,i._load=null,i._resolve=null,i._onCanPlay=i._onCanPlay.bind(i),i._onError=i._onError.bind(i),!1!==r.autoLoad&&i.load(),i}return Wu(e,t),e.prototype.update=function(e){if(!this.destroyed){var n=Pu.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-n),(!this._updateFPS||this._msToNextUpdate<=0)&&(t.prototype.update.call(this),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}},e.prototype.load=function(){var t=this;if(this._load)return this._load;var e=this.source;return(e.readyState===e.HAVE_ENOUGH_DATA||e.readyState===e.HAVE_FUTURE_DATA)&&e.width&&e.height&&(e.complete=!0),e.addEventListener("play",this._onPlayStart.bind(this)),e.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(e.addEventListener("canplay",this._onCanPlay),e.addEventListener("canplaythrough",this._onCanPlay),e.addEventListener("error",this._onError,!0)),this._load=new Promise((function(n){t.valid?n(t):(t._resolve=n,e.load())})),this._load},e.prototype._onError=function(t){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(t)},e.prototype._isSourcePlaying=function(){var t=this.source;return t.currentTime>0&&!1===t.paused&&!1===t.ended&&t.readyState>2},e.prototype._isSourceReady=function(){var t=this.source;return 3===t.readyState||4===t.readyState},e.prototype._onPlayStart=function(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(Pu.shared.add(this.update,this),this._isConnectedToTicker=!0)},e.prototype._onPlayStop=function(){this._isConnectedToTicker&&(Pu.shared.remove(this.update,this),this._isConnectedToTicker=!1)},e.prototype._onCanPlay=function(){var t=this.source;t.removeEventListener("canplay",this._onCanPlay),t.removeEventListener("canplaythrough",this._onCanPlay);var e=this.valid;this.resize(t.videoWidth,t.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&t.play()},e.prototype.dispose=function(){this._isConnectedToTicker&&(Pu.shared.remove(this.update,this),this._isConnectedToTicker=!1);var e=this.source;e&&(e.removeEventListener("error",this._onError,!0),e.pause(),e.src="",e.load()),t.prototype.dispose.call(this)},Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(Pu.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(Pu.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"updateFPS",{get:function(){return this._updateFPS},set:function(t){t!==this._updateFPS&&(this._updateFPS=t)},enumerable:!1,configurable:!0}),e.test=function(t,n){return self.HTMLVideoElement&&t instanceof HTMLVideoElement||e.TYPES.indexOf(n)>-1},e.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"],e.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"},e}(tc),sc=function(t){function e(e){return t.call(this,e)||this}return Wu(e,t),e.test=function(t){return!!self.createImageBitmap&&t instanceof ImageBitmap},e}(tc);ju.push(rc,sc,ec,oc,ic,$u,nc,Qu);var ac={__proto__:null,Resource:qu,BaseImageResource:tc,INSTALLED:ju,autoDetectResource:Vu,AbstractMultiResource:Ju,ArrayResource:Qu,BufferResource:$u,CanvasResource:ec,CubeResource:nc,ImageResource:rc,SVGResource:ic,VideoResource:oc,ImageBitmapResource:sc},lc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return Wu(e,t),e.prototype.upload=function(t,e,n){var r=t.gl;r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.alphaMode===ml.UNPACK);var i=e.realWidth,o=e.realHeight;return n.width===i&&n.height===o?r.texSubImage2D(e.target,0,0,0,i,o,e.format,n.type,this.data):(n.width=i,n.height=o,r.texImage2D(e.target,0,n.internalFormat,i,o,0,e.format,n.type,this.data)),!0},e}($u),uc=function(){function t(t,e){this.width=Math.round(t||100),this.height=Math.round(e||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Hu("disposeFramebuffer"),this.multisample=bl.NONE}return Object.defineProperty(t.prototype,"colorTexture",{get:function(){return this.colorTextures[0]},enumerable:!1,configurable:!0}),t.prototype.addColorTexture=function(t,e){return void 0===t&&(t=0),this.colorTextures[t]=e||new Zu(null,{scaleMode:dl.NEAREST,resolution:1,mipmap:fl.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.addDepthTexture=function(t){return this.depthTexture=t||new Zu(new lc(null,{width:this.width,height:this.height}),{scaleMode:dl.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:fl.OFF,format:ll.DEPTH_COMPONENT,type:cl.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableDepth=function(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.enableStencil=function(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this},t.prototype.resize=function(t,e){if(t=Math.round(t),e=Math.round(e),t!==this.width||e!==this.height){this.width=t,this.height=e,this.dirtyId++,this.dirtySize++;for(var n=0;n<this.colorTextures.length;n++){var r=this.colorTextures[n],i=r.resolution;r.setSize(t/i,e/i)}if(this.depthTexture){i=this.depthTexture.resolution;this.depthTexture.setSize(t/i,e/i)}}},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroyDepthTexture=function(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)},t}(),cc=function(t){function e(e){var n=this;if("number"==typeof e){var r=arguments[0],i=arguments[1],o=arguments[2],s=arguments[3];e={width:r,height:i,scaleMode:o,resolution:s}}return e.width=e.width||100,e.height=e.height||100,e.multisample=void 0!==e.multisample?e.multisample:bl.NONE,(n=t.call(this,null,e)||this).mipmap=fl.OFF,n.valid=!0,n.clearColor=[0,0,0,0],n.framebuffer=new uc(n.realWidth,n.realHeight).addColorTexture(0,n),n.framebuffer.multisample=e.multisample,n.maskStack=[],n.filterStack=[{}],n}return Wu(e,t),e.prototype.resize=function(t,e){this.framebuffer.resize(t*this.resolution,e*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)},e.prototype.dispose=function(){this.framebuffer.dispose(),t.prototype.dispose.call(this)},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.framebuffer.destroyDepthTexture(),this.framebuffer=null},e}(Zu),hc=function(){function t(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}return t.prototype.set=function(t,e,n){var r=e.width,i=e.height;if(n){var o=t.width/2/r,s=t.height/2/i,a=t.x/r+o,l=t.y/i+s;n=bu.add(n,bu.NW),this.x0=a+o*bu.uX(n),this.y0=l+s*bu.uY(n),n=bu.add(n,2),this.x1=a+o*bu.uX(n),this.y1=l+s*bu.uY(n),n=bu.add(n,2),this.x2=a+o*bu.uX(n),this.y2=l+s*bu.uY(n),n=bu.add(n,2),this.x3=a+o*bu.uX(n),this.y3=l+s*bu.uY(n)}else this.x0=t.x/r,this.y0=t.y/i,this.x1=(t.x+t.width)/r,this.y1=t.y/i,this.x2=(t.x+t.width)/r,this.y2=(t.y+t.height)/i,this.x3=t.x/r,this.y3=(t.y+t.height)/i;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3},t.prototype.toString=function(){return"[@pixi/core:TextureUvs x0="+this.x0+" y0="+this.y0+" x1="+this.x1+" y1="+this.y1+" x2="+this.x2+" y2="+this.y2+" x3="+this.x3+" y3="+this.y3+"]"},t}(),dc=new hc,pc=function(t){function e(n,r,i,o,s,a){var l=t.call(this)||this;if(l.noFrame=!1,r||(l.noFrame=!0,r=new ou(0,0,1,1)),n instanceof e&&(n=n.baseTexture),l.baseTexture=n,l._frame=r,l.trim=o,l.valid=!1,l._uvs=dc,l.uvMatrix=null,l.orig=i||r,l._rotate=Number(s||0),!0===s)l._rotate=2;else if(l._rotate%2!=0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");return l.defaultAnchor=a?new cu(a.x,a.y):new cu(0,0),l._updateID=0,l.textureCacheIds=[],n.valid?l.noFrame?n.valid&&l.onBaseTextureUpdated(n):l.frame=r:n.once("loaded",l.onBaseTextureUpdated,l),l.noFrame&&n.on("update",l.onBaseTextureUpdated,l),l}return Wu(e,t),e.prototype.update=function(){this.baseTexture.resource&&this.baseTexture.resource.update()},e.prototype.onBaseTextureUpdated=function(t){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=t.width,this._frame.height=t.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)},e.prototype.destroy=function(t){if(this.baseTexture){if(t){var n=this.baseTexture.resource;n&&n.url&&Kl[n.url]&&e.removeFromCache(n.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,e.removeFromCache(this),this.textureCacheIds=null},e.prototype.clone=function(){var t=this._frame.clone(),n=this._frame===this.orig?t:this.orig.clone(),r=new e(this.baseTexture,!this.noFrame&&t,n,this.trim&&this.trim.clone(),this.rotate,this.defaultAnchor);return this.noFrame&&(r._frame=t),r},e.prototype.updateUvs=function(){this._uvs===dc&&(this._uvs=new hc),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++},e.from=function(t,n,r){void 0===n&&(n={}),void 0===r&&(r=wl.STRICT_TEXTURE_CACHE);var i="string"==typeof t,o=null;if(i)o=t;else{if(!t._pixiId){var s=n&&n.pixiIdPrefix||"pixiid";t._pixiId=s+"_"+Wl()}o=t._pixiId}var a=Kl[o];if(i&&r&&!a)throw new Error('The cacheId "'+o+'" does not exist in TextureCache.');return a||(n.resolution||(n.resolution=tu(t)),(a=new e(new Zu(t,n))).baseTexture.cacheId=o,Zu.addToCache(a.baseTexture,o),e.addToCache(a,o)),a},e.fromURL=function(t,n){var r=Object.assign({autoLoad:!1},null==n?void 0:n.resourceOptions),i=e.from(t,Object.assign({resourceOptions:r},n),!1),o=i.baseTexture.resource;return i.baseTexture.valid?Promise.resolve(i):o.load().then((function(){return Promise.resolve(i)}))},e.fromBuffer=function(t,n,r,i){return new e(Zu.fromBuffer(t,n,r,i))},e.fromLoader=function(t,n,r,i){var o=new Zu(t,Object.assign({scaleMode:wl.SCALE_MODE,resolution:tu(n)},i)),s=o.resource;s instanceof rc&&(s.url=n);var a=new e(o);return r||(r=n),Zu.addToCache(a.baseTexture,r),e.addToCache(a,r),r!==n&&(Zu.addToCache(a.baseTexture,n),e.addToCache(a,n)),a.baseTexture.valid?Promise.resolve(a):new Promise((function(t){a.baseTexture.once("loaded",(function(){return t(a)}))}))},e.addToCache=function(t,e){e&&(-1===t.textureCacheIds.indexOf(e)&&t.textureCacheIds.push(e),Kl[e]&&console.warn("Texture added to the cache with an id ["+e+"] that already had an entry"),Kl[e]=t)},e.removeFromCache=function(t){if("string"==typeof t){var e=Kl[t];if(e){var n=e.textureCacheIds.indexOf(t);return n>-1&&e.textureCacheIds.splice(n,1),delete Kl[t],e}}else if(t&&t.textureCacheIds){for(var r=0;r<t.textureCacheIds.length;++r)Kl[t.textureCacheIds[r]]===t&&delete Kl[t.textureCacheIds[r]];return t.textureCacheIds.length=0,t}return null},Object.defineProperty(e.prototype,"resolution",{get:function(){return this.baseTexture.resolution},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frame",{get:function(){return this._frame},set:function(t){this._frame=t,this.noFrame=!1;var e=t.x,n=t.y,r=t.width,i=t.height,o=e+r>this.baseTexture.width,s=n+i>this.baseTexture.height;if(o||s){var a=o&&s?"and":"or",l="X: "+e+" + "+r+" = "+(e+r)+" > "+this.baseTexture.width,u="Y: "+n+" + "+i+" = "+(n+i)+" > "+this.baseTexture.height;throw new Error("Texture Error: frame does not fit inside the base Texture dimensions: "+l+" "+a+" "+u)}this.valid=r&&i&&this.baseTexture.valid,this.trim||this.rotate||(this.orig=t),this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rotate",{get:function(){return this._rotate},set:function(t){this._rotate=t,this.valid&&this.updateUvs()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return this.orig.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.orig.height},enumerable:!1,configurable:!0}),e.prototype.castToBaseTexture=function(){return this.baseTexture},e}(Tl.a);function fc(t){t.destroy=function(){},t.on=function(){},t.once=function(){},t.emit=function(){}}pc.EMPTY=new pc(new Zu),fc(pc.EMPTY),fc(pc.EMPTY.baseTexture),pc.WHITE=function(){var t=document.createElement("canvas");t.width=16,t.height=16;var e=t.getContext("2d");return e.fillStyle="white",e.fillRect(0,0,16,16),new pc(new Zu(new ec(t)))}(),fc(pc.WHITE),fc(pc.WHITE.baseTexture);var mc=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.valid=!0,r.filterFrame=null,r.filterPoolKey=null,r.updateUvs(),r}return Wu(e,t),Object.defineProperty(e.prototype,"framebuffer",{get:function(){return this.baseTexture.framebuffer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"multisample",{get:function(){return this.framebuffer.multisample},set:function(t){this.framebuffer.multisample=t},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e,n){void 0===n&&(n=!0);var r=this.baseTexture.resolution,i=Math.round(t*r)/r,o=Math.round(e*r)/r;this.valid=i>0&&o>0,this._frame.width=this.orig.width=i,this._frame.height=this.orig.height=o,n&&this.baseTexture.resize(i,o),this.updateUvs()},e.prototype.setResolution=function(t){var e=this.baseTexture;e.resolution!==t&&(e.setResolution(t),this.resize(e.width,e.height,!1))},e.create=function(t){for(var n=arguments,r=[],i=1;i<arguments.length;i++)r[i-1]=n[i];return"number"==typeof t&&(ql("6.0.0","Arguments (width, height, scaleMode, resolution) have been deprecated."),t={width:t,height:r[0],scaleMode:r[1],resolution:r[2]}),new e(new cc(t))},e}(pc),gc=function(){function t(t){this.texturePool={},this.textureOptions=t||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}return t.prototype.createTexture=function(t,e,n){void 0===n&&(n=bl.NONE);var r=new cc(Object.assign({width:t,height:e,resolution:1,multisample:n},this.textureOptions));return new mc(r)},t.prototype.getOptimalTexture=function(t,e,n,r){var i;void 0===n&&(n=1),void 0===r&&(r=bl.NONE),t=Math.ceil(t*n),e=Math.ceil(e*n),this.enableFullScreen&&t===this._pixelsWidth&&e===this._pixelsHeight?i=r>1?-r:-1:(i=((65535&(t=Gl(t)))<<16|65535&(e=Gl(e)))>>>0,r>1&&(i+=4294967296*r)),this.texturePool[i]||(this.texturePool[i]=[]);var o=this.texturePool[i].pop();return o||(o=this.createTexture(t,e,r)),o.filterPoolKey=i,o.setResolution(n),o},t.prototype.getFilterTexture=function(t,e,n){var r=this.getOptimalTexture(t.width,t.height,e||t.resolution,n||bl.NONE);return r.filterFrame=t.filterFrame,r},t.prototype.returnTexture=function(t){var e=t.filterPoolKey;t.filterFrame=null,this.texturePool[e].push(t)},t.prototype.returnFilterTexture=function(t){this.returnTexture(t)},t.prototype.clear=function(t){if(t=!1!==t)for(var e in this.texturePool){var n=this.texturePool[e];if(n)for(var r=0;r<n.length;r++)n[r].destroy(!0)}this.texturePool={}},t.prototype.setScreenSize=function(t){if(t.width!==this._pixelsWidth||t.height!==this._pixelsHeight){for(var e in this.enableFullScreen=t.width>0&&t.height>0,this.texturePool)if(Number(e)<0){var n=this.texturePool[e];if(n)for(var r=0;r<n.length;r++)n[r].destroy(!0);this.texturePool[e]=[]}this._pixelsWidth=t.width,this._pixelsHeight=t.height}},t.SCREEN_KEY=-1,t}(),vc=function(){function t(t,e,n,r,i,o,s){void 0===e&&(e=0),void 0===n&&(n=!1),void 0===r&&(r=cl.FLOAT),this.buffer=t,this.size=e,this.normalized=n,this.type=r,this.stride=i,this.start=o,this.instance=s}return t.prototype.destroy=function(){this.buffer=null},t.from=function(e,n,r,i,o){return new t(e,n,r,i,o)},t}(),yc=0,_c=function(){function t(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=!1),this.data=t||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=n,this.static=e,this.id=yc++,this.disposeRunner=new Hu("disposeBuffer")}return t.prototype.update=function(t){t instanceof Array&&(t=new Float32Array(t)),this.data=t||this.data,this._updateID++},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.data=null},Object.defineProperty(t.prototype,"index",{get:function(){return this.type===xl.ELEMENT_ARRAY_BUFFER},set:function(t){this.type=t?xl.ELEMENT_ARRAY_BUFFER:xl.ARRAY_BUFFER},enumerable:!1,configurable:!0}),t.from=function(e){return e instanceof Array&&(e=new Float32Array(e)),new t(e)},t}(),bc={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array};var xc={5126:4,5123:2,5121:1},wc=0,Ec={Float32Array:Float32Array,Uint32Array:Uint32Array,Int32Array:Int32Array,Uint8Array:Uint8Array,Uint16Array:Uint16Array},Tc=function(){function t(t,e){void 0===t&&(t=[]),void 0===e&&(e={}),this.buffers=t,this.indexBuffer=null,this.attributes=e,this.glVertexArrayObjects={},this.id=wc++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new Hu("disposeGeometry"),this.refCount=0}return t.prototype.addAttribute=function(t,e,n,r,i,o,s,a){if(void 0===n&&(n=0),void 0===r&&(r=!1),void 0===a&&(a=!1),!e)throw new Error("You must pass a buffer when creating an attribute");e instanceof _c||(e instanceof Array&&(e=new Float32Array(e)),e=new _c(e));var l=t.split("|");if(l.length>1){for(var u=0;u<l.length;u++)this.addAttribute(l[u],e,n,r,i);return this}var c=this.buffers.indexOf(e);return-1===c&&(this.buffers.push(e),c=this.buffers.length-1),this.attributes[t]=new vc(c,n,r,i,o,s,a),this.instanced=this.instanced||a,this},t.prototype.getAttribute=function(t){return this.attributes[t]},t.prototype.getBuffer=function(t){return this.buffers[this.getAttribute(t).buffer]},t.prototype.addIndex=function(t){return t instanceof _c||(t instanceof Array&&(t=new Uint16Array(t)),t=new _c(t)),t.type=xl.ELEMENT_ARRAY_BUFFER,this.indexBuffer=t,-1===this.buffers.indexOf(t)&&this.buffers.push(t),this},t.prototype.getIndex=function(){return this.indexBuffer},t.prototype.interleave=function(){if(1===this.buffers.length||2===this.buffers.length&&this.indexBuffer)return this;var t,e=[],n=[],r=new _c;for(t in this.attributes){var i=this.attributes[t],o=this.buffers[i.buffer];e.push(o.data),n.push(i.size*xc[i.type]/4),i.buffer=0}for(r.data=function(t,e){for(var n=0,r=0,i={},o=0;o<t.length;o++)r+=e[o],n+=t[o].length;var s=new ArrayBuffer(4*n),a=null,l=0;for(o=0;o<t.length;o++){var u=e[o],c=t[o],h=Bl(c);i[h]||(i[h]=new bc[h](s)),a=i[h];for(var d=0;d<c.length;d++){a[(d/u|0)*r+l+d%u]=c[d]}l+=u}return new Float32Array(s)}(e,n),t=0;t<this.buffers.length;t++)this.buffers[t]!==this.indexBuffer&&this.buffers[t].destroy();return this.buffers=[r],this.indexBuffer&&this.buffers.push(this.indexBuffer),this},t.prototype.getSize=function(){for(var t in this.attributes){var e=this.attributes[t];return this.buffers[e.buffer].data.length/(e.stride/4||e.size)}return 0},t.prototype.dispose=function(){this.disposeRunner.emit(this,!1)},t.prototype.destroy=function(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null},t.prototype.clone=function(){for(var e=new t,n=0;n<this.buffers.length;n++)e.buffers[n]=new _c(this.buffers[n].data.slice(0));for(var n in this.attributes){var r=this.attributes[n];e.attributes[n]=new vc(r.buffer,r.size,r.normalized,r.type,r.stride,r.start,r.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=xl.ELEMENT_ARRAY_BUFFER),e},t.merge=function(e){for(var n,r=new t,i=[],o=[],s=[],a=0;a<e.length;a++){n=e[a];for(var l=0;l<n.buffers.length;l++)o[l]=o[l]||0,o[l]+=n.buffers[l].data.length,s[l]=0}for(a=0;a<n.buffers.length;a++)i[a]=new(Ec[Bl(n.buffers[a].data)])(o[a]),r.buffers[a]=new _c(i[a]);for(a=0;a<e.length;a++){n=e[a];for(l=0;l<n.buffers.length;l++)i[l].set(n.buffers[l].data,s[l]),s[l]+=n.buffers[l].data.length}if(r.attributes=n.attributes,n.indexBuffer){r.indexBuffer=r.buffers[n.buffers.indexOf(n.indexBuffer)],r.indexBuffer.type=xl.ELEMENT_ARRAY_BUFFER;var u=0,c=0,h=0,d=0;for(a=0;a<n.buffers.length;a++)if(n.buffers[a]!==n.indexBuffer){d=a;break}for(var a in n.attributes){var p=n.attributes[a];(0|p.buffer)===d&&(c+=p.size*xc[p.type]/4)}for(a=0;a<e.length;a++){var f=e[a].indexBuffer.data;for(l=0;l<f.length;l++)r.indexBuffer.data[l+h]+=u;u+=e[a].buffers[d].data.length/c,h+=f.length}}return r},t}(),Sc=function(t){function e(){var e=t.call(this)||this;return e.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2]),e}return Wu(e,t),e}(Tc),Ac=function(t){function e(){var e=t.call(this)||this;return e.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),e.uvs=new Float32Array([0,0,1,0,1,1,0,1]),e.vertexBuffer=new _c(e.vertices),e.uvBuffer=new _c(e.uvs),e.addAttribute("aVertexPosition",e.vertexBuffer).addAttribute("aTextureCoord",e.uvBuffer).addIndex([0,1,2,0,2,3]),e}return Wu(e,t),e.prototype.map=function(t,e){var n=0,r=0;return this.uvs[0]=n,this.uvs[1]=r,this.uvs[2]=n+e.width/t.width,this.uvs[3]=r,this.uvs[4]=n+e.width/t.width,this.uvs[5]=r+e.height/t.height,this.uvs[6]=n,this.uvs[7]=r+e.height/t.height,n=e.x,r=e.y,this.vertices[0]=n,this.vertices[1]=r,this.vertices[2]=n+e.width,this.vertices[3]=r,this.vertices[4]=n+e.width,this.vertices[5]=r+e.height,this.vertices[6]=n,this.vertices[7]=r+e.height,this.invalidate(),this},e.prototype.invalidate=function(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this},e}(Tc),Mc=0,Dc=function(){function t(t,e,n){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=Mc++,this.static=!!e,this.ubo=!!n,t instanceof _c?(this.buffer=t,this.buffer.type=xl.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=t,this.ubo&&(this.buffer=new _c(new Float32Array(1)),this.buffer.type=xl.UNIFORM_BUFFER,this.autoManage=!0))}return t.prototype.update=function(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()},t.prototype.add=function(e,n,r){if(this.ubo)throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them");this.uniforms[e]=new t(n,r)},t.from=function(e,n,r){return new t(e,n,r)},t.uboFrom=function(e,n){return new t(e,null==n||n,!0)},t}(),Cc=function(){function t(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=bl.NONE,this.sourceFrame=new ou,this.destinationFrame=new ou,this.bindingSourceFrame=new ou,this.bindingDestinationFrame=new ou,this.filters=[],this.transform=null}return t.prototype.clear=function(){this.target=null,this.filters=null,this.renderTexture=null},t}(),Rc=[new cu,new cu,new cu,new cu],Oc=new du,Pc=function(){function t(t){this.renderer=t,this.defaultFilterStack=[{}],this.texturePool=new gc,this.texturePool.setScreenSize(t.view),this.statePool=[],this.quad=new Sc,this.quadUv=new Ac,this.tempRect=new ou,this.activeState={},this.globalUniforms=new Dc({outputFrame:new ou,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}return t.prototype.push=function(t,e){for(var n=this.renderer,r=this.defaultFilterStack,i=this.statePool.pop()||new Cc,o=this.renderer.renderTexture,s=e[0].resolution,a=e[0].multisample,l=e[0].padding,u=e[0].autoFit,c=e[0].legacy,h=1;h<e.length;h++){var d=e[h];s=Math.min(s,d.resolution),a=Math.min(a,d.multisample),l=this.useMaxPadding?Math.max(l,d.padding):l+d.padding,u=u&&d.autoFit,c=c||d.legacy}if(1===r.length&&(this.defaultFilterStack[0].renderTexture=o.current),r.push(i),i.resolution=s,i.multisample=a,i.legacy=c,i.target=t,i.sourceFrame.copyFrom(t.filterArea||t.getBounds(!0)),i.sourceFrame.pad(l),u){var p=this.tempRect.copyFrom(o.sourceFrame);n.projection.transform&&this.transformAABB(Oc.copyFrom(n.projection.transform).invert(),p),i.sourceFrame.fit(p)}this.roundFrame(i.sourceFrame,o.current?o.current.resolution:n.resolution,o.sourceFrame,o.destinationFrame,n.projection.transform),i.renderTexture=this.getOptimalFilterTexture(i.sourceFrame.width,i.sourceFrame.height,s,a),i.filters=e,i.destinationFrame.width=i.renderTexture.width,i.destinationFrame.height=i.renderTexture.height;var f=this.tempRect;f.x=0,f.y=0,f.width=i.sourceFrame.width,f.height=i.sourceFrame.height,i.renderTexture.filterFrame=i.sourceFrame,i.bindingSourceFrame.copyFrom(o.sourceFrame),i.bindingDestinationFrame.copyFrom(o.destinationFrame),i.transform=n.projection.transform,n.projection.transform=null,o.bind(i.renderTexture,i.sourceFrame,f),n.framebuffer.clear(0,0,0,0)},t.prototype.pop=function(){var t=this.defaultFilterStack,e=t.pop(),n=e.filters;this.activeState=e;var r=this.globalUniforms.uniforms;r.outputFrame=e.sourceFrame,r.resolution=e.resolution;var i=r.inputSize,o=r.inputPixel,s=r.inputClamp;if(i[0]=e.destinationFrame.width,i[1]=e.destinationFrame.height,i[2]=1/i[0],i[3]=1/i[1],o[0]=Math.round(i[0]*e.resolution),o[1]=Math.round(i[1]*e.resolution),o[2]=1/o[0],o[3]=1/o[1],s[0]=.5*o[2],s[1]=.5*o[3],s[2]=e.sourceFrame.width*i[2]-.5*o[2],s[3]=e.sourceFrame.height*i[3]-.5*o[3],e.legacy){var a=r.filterArea;a[0]=e.destinationFrame.width,a[1]=e.destinationFrame.height,a[2]=e.sourceFrame.x,a[3]=e.sourceFrame.y,r.filterClamp=r.inputClamp}this.globalUniforms.update();var l=t[t.length-1];if(this.renderer.framebuffer.blit(),1===n.length)n[0].apply(this,e.renderTexture,l.renderTexture,gl.BLEND,e),this.returnFilterTexture(e.renderTexture);else{var u=e.renderTexture,c=this.getOptimalFilterTexture(u.width,u.height,e.resolution);c.filterFrame=u.filterFrame;var h=0;for(h=0;h<n.length-1;++h){1===h&&e.multisample>1&&((c=this.getOptimalFilterTexture(u.width,u.height,e.resolution)).filterFrame=u.filterFrame),n[h].apply(this,u,c,gl.CLEAR,e);var d=u;u=c,c=d}n[h].apply(this,u,l.renderTexture,gl.BLEND,e),h>1&&e.multisample>1&&this.returnFilterTexture(e.renderTexture),this.returnFilterTexture(u),this.returnFilterTexture(c)}e.clear(),this.statePool.push(e)},t.prototype.bindAndClear=function(t,e){void 0===e&&(e=gl.CLEAR);var n=this.renderer,r=n.renderTexture,i=n.state;if(t===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,t&&t.filterFrame){var o=this.tempRect;o.x=0,o.y=0,o.width=t.filterFrame.width,o.height=t.filterFrame.height,r.bind(t,t.filterFrame,o)}else t!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?r.bind(t):this.renderer.renderTexture.bind(t,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);var s=1&i.stateId||this.forceClear;(e===gl.CLEAR||e===gl.BLIT&&s)&&this.renderer.framebuffer.clear(0,0,0,0)},t.prototype.applyFilter=function(t,e,n,r){var i=this.renderer;i.state.set(t.state),this.bindAndClear(n,r),t.uniforms.uSampler=e,t.uniforms.filterGlobals=this.globalUniforms,i.shader.bind(t),t.legacy=!!t.program.attributeData.aTextureCoord,t.legacy?(this.quadUv.map(e._frame,e.filterFrame),i.geometry.bind(this.quadUv),i.geometry.draw(al.TRIANGLES)):(i.geometry.bind(this.quad),i.geometry.draw(al.TRIANGLE_STRIP))},t.prototype.calculateSpriteMatrix=function(t,e){var n=this.activeState,r=n.sourceFrame,i=n.destinationFrame,o=e._texture.orig,s=t.set(i.width,0,0,i.height,r.x,r.y),a=e.worldTransform.copyTo(du.TEMP_MATRIX);return a.invert(),s.prepend(a),s.scale(1/o.width,1/o.height),s.translate(e.anchor.x,e.anchor.y),s},t.prototype.destroy=function(){this.renderer=null,this.texturePool.clear(!1)},t.prototype.getOptimalFilterTexture=function(t,e,n,r){return void 0===n&&(n=1),void 0===r&&(r=bl.NONE),this.texturePool.getOptimalTexture(t,e,n,r)},t.prototype.getFilterTexture=function(t,e,n){if("number"==typeof t){var r=t;t=e,e=r}t=t||this.activeState.renderTexture;var i=this.texturePool.getOptimalTexture(t.width,t.height,e||t.resolution,n||bl.NONE);return i.filterFrame=t.filterFrame,i},t.prototype.returnFilterTexture=function(t){this.texturePool.returnTexture(t)},t.prototype.emptyPool=function(){this.texturePool.clear(!0)},t.prototype.resize=function(){this.texturePool.setScreenSize(this.renderer.view)},t.prototype.transformAABB=function(t,e){var n=Rc[0],r=Rc[1],i=Rc[2],o=Rc[3];n.set(e.left,e.top),r.set(e.left,e.bottom),i.set(e.right,e.top),o.set(e.right,e.bottom),t.apply(n,n),t.apply(r,r),t.apply(i,i),t.apply(o,o);var s=Math.min(n.x,r.x,i.x,o.x),a=Math.min(n.y,r.y,i.y,o.y),l=Math.max(n.x,r.x,i.x,o.x),u=Math.max(n.y,r.y,i.y,o.y);e.x=s,e.y=a,e.width=l-s,e.height=u-a},t.prototype.roundFrame=function(t,e,n,r,i){if(i){var o=i.a,s=i.b,a=i.c,l=i.d;if((Math.abs(s)>1e-4||Math.abs(a)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(l)>1e-4))return}(i=i?Oc.copyFrom(i):Oc.identity()).translate(-n.x,-n.y).scale(r.width/n.width,r.height/n.height).translate(r.x,r.y),this.transformAABB(i,t),t.ceil(e),this.transformAABB(i.invert(),t)},t}(),Ic=function(){function t(t){this.renderer=t}return t.prototype.flush=function(){},t.prototype.destroy=function(){this.renderer=null},t.prototype.start=function(){},t.prototype.stop=function(){this.flush()},t.prototype.render=function(t){},t}(),Lc=function(){function t(t){this.renderer=t,this.emptyRenderer=new Ic(t),this.currentRenderer=this.emptyRenderer}return t.prototype.setObjectRenderer=function(t){this.currentRenderer!==t&&(this.currentRenderer.stop(),this.currentRenderer=t,this.currentRenderer.start())},t.prototype.flush=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.reset=function(){this.setObjectRenderer(this.emptyRenderer)},t.prototype.copyBoundTextures=function(t,e){for(var n=this.renderer.texture.boundTextures,r=e-1;r>=0;--r)t[r]=n[r]||null,t[r]&&(t[r]._batchLocation=r)},t.prototype.boundArray=function(t,e,n,r){for(var i=t.elements,o=t.ids,s=t.count,a=0,l=0;l<s;l++){var u=i[l],c=u._batchLocation;if(c>=0&&c<r&&e[c]===u)o[l]=c;else for(;a<r;){var h=e[a];if(!h||h._batchEnabled!==n||h._batchLocation!==a){o[l]=a,u._batchLocation=a,e[a]=u;break}a++}}},t.prototype.destroy=function(){this.renderer=null},t}(),Nc=0,Fc=function(){function t(t){this.renderer=t,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this),t.view.addEventListener("webglcontextlost",this.handleContextLost,!1),t.view.addEventListener("webglcontextrestored",this.handleContextRestored,!1)}return Object.defineProperty(t.prototype,"isLost",{get:function(){return!this.gl||this.gl.isContextLost()},enumerable:!1,configurable:!0}),t.prototype.contextChange=function(t){this.gl=t,this.renderer.gl=t,this.renderer.CONTEXT_UID=Nc++,t.isContextLost()&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").restoreContext()},t.prototype.initFromContext=function(t){this.gl=t,this.validateContext(t),this.renderer.gl=t,this.renderer.CONTEXT_UID=Nc++,this.renderer.runners.contextChange.emit(t)},t.prototype.initFromOptions=function(t){var e=this.createContext(this.renderer.view,t);this.initFromContext(e)},t.prototype.createContext=function(t,e){var n;if(wl.PREFER_ENV>=rl.WEBGL2&&(n=t.getContext("webgl2",e)),n)this.webGLVersion=2;else if(this.webGLVersion=1,!(n=t.getContext("webgl",e)||t.getContext("experimental-webgl",e)))throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=n,this.getExtensions(),this.gl},t.prototype.getExtensions=function(){var t=this.gl,e={anisotropicFiltering:t.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),s3tc:t.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:t.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:t.getExtension("WEBGL_compressed_texture_etc"),etc1:t.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:t.getExtension("WEBGL_compressed_texture_atc"),astc:t.getExtension("WEBGL_compressed_texture_astc")};1===this.webGLVersion?Object.assign(this.extensions,e,{drawBuffers:t.getExtension("WEBGL_draw_buffers"),depthTexture:t.getExtension("WEBGL_depth_texture"),loseContext:t.getExtension("WEBGL_lose_context"),vertexArrayObject:t.getExtension("OES_vertex_array_object")||t.getExtension("MOZ_OES_vertex_array_object")||t.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:t.getExtension("OES_element_index_uint"),floatTexture:t.getExtension("OES_texture_float"),floatTextureLinear:t.getExtension("OES_texture_float_linear"),textureHalfFloat:t.getExtension("OES_texture_half_float"),textureHalfFloatLinear:t.getExtension("OES_texture_half_float_linear")}):2===this.webGLVersion&&Object.assign(this.extensions,e,{colorBufferFloat:t.getExtension("EXT_color_buffer_float")})},t.prototype.handleContextLost=function(t){t.preventDefault()},t.prototype.handleContextRestored=function(){this.renderer.runners.contextChange.emit(this.gl)},t.prototype.destroy=function(){var t=this.renderer.view;this.renderer=null,t.removeEventListener("webglcontextlost",this.handleContextLost),t.removeEventListener("webglcontextrestored",this.handleContextRestored),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()},t.prototype.postrender=function(){this.renderer.renderingToScreen&&this.gl.flush()},t.prototype.validateContext=function(t){var e=t.getContextAttributes(),n="WebGL2RenderingContext"in self&&t instanceof self.WebGL2RenderingContext;n&&(this.webGLVersion=2),e.stencil||console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");var r=n||!!t.getExtension("OES_element_index_uint");this.supports.uint32Indices=r,r||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")},t}(),kc=function(t){this.framebuffer=t,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=bl.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0},Uc=new ou,Bc=function(){function t(t){this.renderer=t,this.managedFramebuffers=[],this.unknownFramebuffer=new uc(10,10),this.msaaSamples=null}return t.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new ou,this.hasMRT=!0,this.writeDepthTexture=!0,this.disposeAll(!0),1===this.renderer.context.webGLVersion){var e=this.renderer.context.extensions.drawBuffers,n=this.renderer.context.extensions.depthTexture;wl.PREFER_ENV===rl.WEBGL_LEGACY&&(e=null,n=null),e?t.drawBuffers=function(t){return e.drawBuffersWEBGL(t)}:(this.hasMRT=!1,t.drawBuffers=function(){}),n||(this.writeDepthTexture=!1)}else this.msaaSamples=t.getInternalformatParameter(t.RENDERBUFFER,t.RGBA8,t.SAMPLES)},t.prototype.bind=function(t,e,n){void 0===n&&(n=0);var r=this.gl;if(t){var i=t.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(t);this.current!==t&&(this.current=t,r.bindFramebuffer(r.FRAMEBUFFER,i.framebuffer)),i.mipLevel!==n&&(t.dirtyId++,t.dirtyFormat++,i.mipLevel=n),i.dirtyId!==t.dirtyId&&(i.dirtyId=t.dirtyId,i.dirtyFormat!==t.dirtyFormat?(i.dirtyFormat=t.dirtyFormat,i.dirtySize=t.dirtySize,this.updateFramebuffer(t,n)):i.dirtySize!==t.dirtySize&&(i.dirtySize=t.dirtySize,this.resizeFramebuffer(t)));for(var o=0;o<t.colorTextures.length;o++){var s=t.colorTextures[o];this.renderer.texture.unbind(s.parentTextureArray||s)}if(t.depthTexture&&this.renderer.texture.unbind(t.depthTexture),e){var a=e.width>>n,l=e.height>>n,u=a/e.width;this.setViewport(e.x*u,e.y*u,a,l)}else{a=t.width>>n,l=t.height>>n;this.setViewport(0,0,a,l)}}else this.current&&(this.current=null,r.bindFramebuffer(r.FRAMEBUFFER,null)),e?this.setViewport(e.x,e.y,e.width,e.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)},t.prototype.setViewport=function(t,e,n,r){var i=this.viewport;t=Math.round(t),e=Math.round(e),n=Math.round(n),r=Math.round(r),i.width===n&&i.height===r&&i.x===t&&i.y===e||(i.x=t,i.y=e,i.width=n,i.height=r,this.gl.viewport(t,e,n,r))},Object.defineProperty(t.prototype,"size",{get:function(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}},enumerable:!1,configurable:!0}),t.prototype.clear=function(t,e,n,r,i){void 0===i&&(i=ol.COLOR|ol.DEPTH);var o=this.gl;o.clearColor(t,e,n,r),o.clear(i)},t.prototype.initFramebuffer=function(t){var e=this.gl,n=new kc(e.createFramebuffer());return n.multisample=this.detectSamples(t.multisample),t.glFramebuffers[this.CONTEXT_UID]=n,this.managedFramebuffers.push(t),t.disposeRunner.add(this),n},t.prototype.resizeFramebuffer=function(t){var e=this.gl,n=t.glFramebuffers[this.CONTEXT_UID];n.msaaBuffer&&(e.bindRenderbuffer(e.RENDERBUFFER,n.msaaBuffer),e.renderbufferStorageMultisample(e.RENDERBUFFER,n.multisample,e.RGBA8,t.width,t.height)),n.stencil&&(e.bindRenderbuffer(e.RENDERBUFFER,n.stencil),n.msaaBuffer?e.renderbufferStorageMultisample(e.RENDERBUFFER,n.multisample,e.DEPTH24_STENCIL8,t.width,t.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,t.width,t.height));var r=t.colorTextures,i=r.length;e.drawBuffers||(i=Math.min(i,1));for(var o=0;o<i;o++){var s=r[o],a=s.parentTextureArray||s;this.renderer.texture.bind(a,0)}t.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(t.depthTexture,0)},t.prototype.updateFramebuffer=function(t,e){var n=this.gl,r=t.glFramebuffers[this.CONTEXT_UID],i=t.colorTextures,o=i.length;n.drawBuffers||(o=Math.min(o,1)),r.multisample>1&&this.canMultisampleFramebuffer(t)?(r.msaaBuffer=r.msaaBuffer||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.msaaBuffer),n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.RGBA8,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.RENDERBUFFER,r.msaaBuffer)):r.msaaBuffer&&(n.deleteRenderbuffer(r.msaaBuffer),r.msaaBuffer=null,r.blitFramebuffer&&(r.blitFramebuffer.dispose(),r.blitFramebuffer=null));for(var s=[],a=0;a<o;a++){var l=i[a],u=l.parentTextureArray||l;this.renderer.texture.bind(u,0),0===a&&r.msaaBuffer||(n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0+a,l.target,u._glTextures[this.CONTEXT_UID].texture,e),s.push(n.COLOR_ATTACHMENT0+a))}if((s.length>1&&n.drawBuffers(s),t.depthTexture)&&this.writeDepthTexture){var c=t.depthTexture;this.renderer.texture.bind(c,0),n.framebufferTexture2D(n.FRAMEBUFFER,n.DEPTH_ATTACHMENT,n.TEXTURE_2D,c._glTextures[this.CONTEXT_UID].texture,e)}!t.stencil&&!t.depth||t.depthTexture&&this.writeDepthTexture?r.stencil&&(n.deleteRenderbuffer(r.stencil),r.stencil=null):(r.stencil=r.stencil||n.createRenderbuffer(),n.bindRenderbuffer(n.RENDERBUFFER,r.stencil),r.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,r.multisample,n.DEPTH24_STENCIL8,t.width,t.height):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,t.width,t.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,r.stencil))},t.prototype.canMultisampleFramebuffer=function(t){return 1!==this.renderer.context.webGLVersion&&t.colorTextures.length<=1&&!t.depthTexture},t.prototype.detectSamples=function(t){var e=this.msaaSamples,n=bl.NONE;if(t<=1||null===e)return n;for(var r=0;r<e.length;r++)if(e[r]<=t){n=e[r];break}return 1===n&&(n=bl.NONE),n},t.prototype.blit=function(t,e,n){var r=this.current,i=this.renderer,o=this.gl,s=this.CONTEXT_UID;if(2===i.context.webGLVersion&&r){var a=r.glFramebuffers[s];if(a){if(!t){if(!a.msaaBuffer)return;var l=r.colorTextures[0];if(!l)return;a.blitFramebuffer||(a.blitFramebuffer=new uc(r.width,r.height),a.blitFramebuffer.addColorTexture(0,l)),(t=a.blitFramebuffer).colorTextures[0]!==l&&(t.colorTextures[0]=l,t.dirtyId++,t.dirtyFormat++),t.width===r.width&&t.height===r.height||(t.width=r.width,t.height=r.height,t.dirtyId++,t.dirtySize++)}e||((e=Uc).width=r.width,e.height=r.height),n||(n=e);var u=e.width===n.width&&e.height===n.height;this.bind(t),o.bindFramebuffer(o.READ_FRAMEBUFFER,a.framebuffer),o.blitFramebuffer(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height,o.COLOR_BUFFER_BIT,u?o.NEAREST:o.LINEAR)}}},t.prototype.disposeFramebuffer=function(t,e){var n=t.glFramebuffers[this.CONTEXT_UID],r=this.gl;if(n){delete t.glFramebuffers[this.CONTEXT_UID];var i=this.managedFramebuffers.indexOf(t);i>=0&&this.managedFramebuffers.splice(i,1),t.disposeRunner.remove(this),e||(r.deleteFramebuffer(n.framebuffer),n.msaaBuffer&&r.deleteRenderbuffer(n.msaaBuffer),n.stencil&&r.deleteRenderbuffer(n.stencil)),n.blitFramebuffer&&n.blitFramebuffer.dispose()}},t.prototype.disposeAll=function(t){var e=this.managedFramebuffers;this.managedFramebuffers=[];for(var n=0;n<e.length;n++)this.disposeFramebuffer(e[n],t)},t.prototype.forceStencil=function(){var t=this.current;if(t){var e=t.glFramebuffers[this.CONTEXT_UID];if(e&&!e.stencil){t.stencil=!0;var n=t.width,r=t.height,i=this.gl,o=i.createRenderbuffer();i.bindRenderbuffer(i.RENDERBUFFER,o),e.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,e.multisample,i.DEPTH24_STENCIL8,n,r):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,n,r),e.stencil=o,i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,o)}}},t.prototype.reset=function(){this.current=this.unknownFramebuffer,this.viewport=new ou},t.prototype.destroy=function(){this.renderer=null},t}(),Gc={5126:4,5123:2,5121:1},zc=function(){function t(t){this.renderer=t,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}return t.prototype.contextChange=function(){this.disposeAll(!0);var t=this.gl=this.renderer.gl,e=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,2!==e.webGLVersion){var n=this.renderer.context.extensions.vertexArrayObject;wl.PREFER_ENV===rl.WEBGL_LEGACY&&(n=null),n?(t.createVertexArray=function(){return n.createVertexArrayOES()},t.bindVertexArray=function(t){return n.bindVertexArrayOES(t)},t.deleteVertexArray=function(t){return n.deleteVertexArrayOES(t)}):(this.hasVao=!1,t.createVertexArray=function(){return null},t.bindVertexArray=function(){return null},t.deleteVertexArray=function(){return null})}if(2!==e.webGLVersion){var r=t.getExtension("ANGLE_instanced_arrays");r?(t.vertexAttribDivisor=function(t,e){return r.vertexAttribDivisorANGLE(t,e)},t.drawElementsInstanced=function(t,e,n,i,o){return r.drawElementsInstancedANGLE(t,e,n,i,o)},t.drawArraysInstanced=function(t,e,n,i){return r.drawArraysInstancedANGLE(t,e,n,i)}):this.hasInstance=!1}this.canUseUInt32ElementIndex=2===e.webGLVersion||!!e.extensions.uint32ElementIndex},t.prototype.bind=function(t,e){e=e||this.renderer.shader.shader;var n=this.gl,r=t.glVertexArrayObjects[this.CONTEXT_UID],i=!1;r||(this.managedGeometries[t.id]=t,t.disposeRunner.add(this),t.glVertexArrayObjects[this.CONTEXT_UID]=r={},i=!0);var o=r[e.program.id]||this.initGeometryVao(t,e,i);this._activeGeometry=t,this._activeVao!==o&&(this._activeVao=o,this.hasVao?n.bindVertexArray(o):this.activateVao(t,e.program)),this.updateBuffers()},t.prototype.reset=function(){this.unbind()},t.prototype.updateBuffers=function(){for(var t=this._activeGeometry,e=this.renderer.buffer,n=0;n<t.buffers.length;n++){var r=t.buffers[n];e.update(r)}},t.prototype.checkCompatibility=function(t,e){var n=t.attributes,r=e.attributeData;for(var i in r)if(!n[i])throw new Error('shader and geometry incompatible, geometry missing the "'+i+'" attribute')},t.prototype.getSignature=function(t,e){var n=t.attributes,r=e.attributeData,i=["g",t.id];for(var o in n)r[o]&&i.push(o);return i.join("-")},t.prototype.initGeometryVao=function(t,e,n){void 0===n&&(n=!0);var r=this.gl,i=this.CONTEXT_UID,o=this.renderer.buffer,s=e.program;s.glPrograms[i]||this.renderer.shader.generateProgram(e),this.checkCompatibility(t,s);var a=this.getSignature(t,s),l=t.glVertexArrayObjects[this.CONTEXT_UID],u=l[a];if(u)return l[s.id]=u,u;var c=t.buffers,h=t.attributes,d={},p={};for(var f in c)d[f]=0,p[f]=0;for(var f in h)!h[f].size&&s.attributeData[f]?h[f].size=s.attributeData[f].size:h[f].size||console.warn("PIXI Geometry attribute '"+f+"' size cannot be determined (likely the bound shader does not have the attribute)"),d[h[f].buffer]+=h[f].size*Gc[h[f].type];for(var f in h){var m=h[f],g=m.size;void 0===m.stride&&(d[m.buffer]===g*Gc[m.type]?m.stride=0:m.stride=d[m.buffer]),void 0===m.start&&(m.start=p[m.buffer],p[m.buffer]+=g*Gc[m.type])}u=r.createVertexArray(),r.bindVertexArray(u);for(var v=0;v<c.length;v++){var y=c[v];o.bind(y),n&&y._glBuffers[i].refCount++}return this.activateVao(t,s),this._activeVao=u,l[s.id]=u,l[a]=u,u},t.prototype.disposeGeometry=function(t,e){var n;if(this.managedGeometries[t.id]){delete this.managedGeometries[t.id];var r=t.glVertexArrayObjects[this.CONTEXT_UID],i=this.gl,o=t.buffers,s=null===(n=this.renderer)||void 0===n?void 0:n.buffer;if(t.disposeRunner.remove(this),r){if(s)for(var a=0;a<o.length;a++){var l=o[a]._glBuffers[this.CONTEXT_UID];l&&(l.refCount--,0!==l.refCount||e||s.dispose(o[a],e))}if(!e)for(var u in r)if("g"===u[0]){var c=r[u];this._activeVao===c&&this.unbind(),i.deleteVertexArray(c)}delete t.glVertexArrayObjects[this.CONTEXT_UID]}}},t.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedGeometries),n=0;n<e.length;n++)this.disposeGeometry(this.managedGeometries[e[n]],t)},t.prototype.activateVao=function(t,e){var n=this.gl,r=this.CONTEXT_UID,i=this.renderer.buffer,o=t.buffers,s=t.attributes;t.indexBuffer&&i.bind(t.indexBuffer);var a=null;for(var l in s){var u=s[l],c=o[u.buffer],h=c._glBuffers[r];if(e.attributeData[l]){a!==h&&(i.bind(c),a=h);var d=e.attributeData[l].location;if(n.enableVertexAttribArray(d),n.vertexAttribPointer(d,u.size,u.type||n.FLOAT,u.normalized,u.stride,u.start),u.instance){if(!this.hasInstance)throw new Error("geometry error, GPU Instancing is not supported on this device");n.vertexAttribDivisor(d,1)}}}},t.prototype.draw=function(t,e,n,r){var i=this.gl,o=this._activeGeometry;if(o.indexBuffer){var s=o.indexBuffer.data.BYTES_PER_ELEMENT,a=2===s?i.UNSIGNED_SHORT:i.UNSIGNED_INT;2===s||4===s&&this.canUseUInt32ElementIndex?o.instanced?i.drawElementsInstanced(t,e||o.indexBuffer.data.length,a,(n||0)*s,r||1):i.drawElements(t,e||o.indexBuffer.data.length,a,(n||0)*s):console.warn("unsupported index buffer type: uint32")}else o.instanced?i.drawArraysInstanced(t,n,e||o.getSize(),r||1):i.drawArrays(t,n,e||o.getSize());return this},t.prototype.unbind=function(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null},t.prototype.destroy=function(){this.renderer=null},t}(),Hc=function(){function t(t){void 0===t&&(t=null),this.type=_l.NONE,this.autoDetect=!0,this.maskObject=t||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=wl.FILTER_MULTISAMPLE,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._target=null}return t.prototype.reset=function(){this.pooled&&(this.maskObject=null,this.type=_l.NONE,this.autoDetect=!0),this._target=null},t.prototype.copyCountersOrReset=function(t){t?(this._stencilCounter=t._stencilCounter,this._scissorCounter=t._scissorCounter,this._scissorRect=t._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)},t}();function jc(t,e,n){var r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),r}function Vc(t,e){var n=t.getShaderSource(e).split("\n").map((function(t,e){return e+": "+t})),r=t.getShaderInfoLog(e),i=r.split("\n"),o={},s=i.map((function(t){return parseFloat(t.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))})).filter((function(t){return!(!t||o[t])&&(o[t]=!0,!0)})),a=[""];s.forEach((function(t){n[t-1]="%c"+n[t-1]+"%c",a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")}));var l=n.join("\n");a[0]=l,console.error(r),console.groupCollapsed("click to view full shader code"),console.warn.apply(console,a),console.groupEnd()}function Xc(t){for(var e=new Array(t),n=0;n<e.length;n++)e[n]=!1;return e}function Wc(t,e){switch(t){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return Xc(2*e);case"bvec3":return Xc(3*e);case"bvec4":return Xc(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var Yc,qc={},$c=qc;function Kc(){if(!Yc){Yc=yl.MEDIUM;var t=function(){if($c===qc||$c&&$c.isContextLost()){var t=document.createElement("canvas"),e=void 0;wl.PREFER_ENV>=rl.WEBGL2&&(e=t.getContext("webgl2",{})),e||((e=t.getContext("webgl",{})||t.getContext("experimental-webgl",{}))?e.getExtension("WEBGL_draw_buffers"):e=null),$c=e}return $c}();if(t&&t.getShaderPrecisionFormat){var e=t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT);Yc=e.precision?yl.HIGH:yl.MEDIUM}}return Yc}function Zc(t,e,n){if("precision"!==t.substring(0,9)){var r=e;return e===yl.HIGH&&n!==yl.HIGH&&(r=yl.MEDIUM),"precision "+r+" float;\n"+t}return n!==yl.HIGH&&"precision highp"===t.substring(0,15)?t.replace("precision highp","precision mediump"):t}var Jc={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function Qc(t){return Jc[t]}var th=null,eh={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function nh(t,e){if(!th){var n=Object.keys(eh);th={};for(var r=0;r<n.length;++r){var i=n[r];th[t[i]]=eh[i]}}return th[e]}var rh=[{test:function(t){return"float"===t.type&&1===t.size},code:function(t){return'\n            if(uv["'+t+'"] !== ud["'+t+'"].value)\n            {\n                ud["'+t+'"].value = uv["'+t+'"]\n                gl.uniform1f(ud["'+t+'"].location, uv["'+t+'"])\n            }\n            '}},{test:function(t){return("sampler2D"===t.type||"samplerCube"===t.type||"sampler2DArray"===t.type)&&1===t.size&&!t.isArray},code:function(t){return't = syncData.textureCount++;\n\n            renderer.texture.bind(uv["'+t+'"], t);\n\n            if(ud["'+t+'"].value !== t)\n            {\n                ud["'+t+'"].value = t;\n                gl.uniform1i(ud["'+t+'"].location, t);\n; // eslint-disable-line max-len\n            }'}},{test:function(t,e){return"mat3"===t.type&&1===t.size&&void 0!==e.a},code:function(t){return'\n            gl.uniformMatrix3fv(ud["'+t+'"].location, false, uv["'+t+'"].toArray(true));\n            '},codeUbo:function(t){return"\n                var "+t+"_matrix = uv."+t+".toArray(true);\n\n                data[offset] = "+t+"_matrix[0];\n                data[offset+1] = "+t+"_matrix[1];\n                data[offset+2] = "+t+"_matrix[2];\n        \n                data[offset + 4] = "+t+"_matrix[3];\n                data[offset + 5] = "+t+"_matrix[4];\n                data[offset + 6] = "+t+"_matrix[5];\n        \n                data[offset + 8] = "+t+"_matrix[6];\n                data[offset + 9] = "+t+"_matrix[7];\n                data[offset + 10] = "+t+"_matrix[8];\n            "}},{test:function(t,e){return"vec2"===t.type&&1===t.size&&void 0!==e.x},code:function(t){return'\n                cv = ud["'+t+'"].value;\n                v = uv["'+t+'"];\n\n                if(cv[0] !== v.x || cv[1] !== v.y)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    gl.uniform2f(ud["'+t+'"].location, v.x, v.y);\n                }'},codeUbo:function(t){return"\n                v = uv."+t+";\n\n                data[offset] = v.x;\n                data[offset+1] = v.y;\n            "}},{test:function(t){return"vec2"===t.type&&1===t.size},code:function(t){return'\n                cv = ud["'+t+'"].value;\n                v = uv["'+t+'"];\n\n                if(cv[0] !== v[0] || cv[1] !== v[1])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    gl.uniform2f(ud["'+t+'"].location, v[0], v[1]);\n                }\n            '}},{test:function(t,e){return"vec4"===t.type&&1===t.size&&void 0!==e.width},code:function(t){return'\n                cv = ud["'+t+'"].value;\n                v = uv["'+t+'"];\n\n                if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)\n                {\n                    cv[0] = v.x;\n                    cv[1] = v.y;\n                    cv[2] = v.width;\n                    cv[3] = v.height;\n                    gl.uniform4f(ud["'+t+'"].location, v.x, v.y, v.width, v.height)\n                }'},codeUbo:function(t){return"\n                    v = uv."+t+";\n\n                    data[offset] = v.x;\n                    data[offset+1] = v.y;\n                    data[offset+2] = v.width;\n                    data[offset+3] = v.height;\n                "}},{test:function(t){return"vec4"===t.type&&1===t.size},code:function(t){return'\n                cv = ud["'+t+'"].value;\n                v = uv["'+t+'"];\n\n                if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])\n                {\n                    cv[0] = v[0];\n                    cv[1] = v[1];\n                    cv[2] = v[2];\n                    cv[3] = v[3];\n\n                    gl.uniform4f(ud["'+t+'"].location, v[0], v[1], v[2], v[3])\n                }'}}],ih={float:"\n    if(cv !== v)\n    {\n        cv.v = v;\n        gl.uniform1f(location, v)\n    }",vec2:"\n    if(cv[0] !== v[0] || cv[1] !== v[1])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        gl.uniform2f(location, v[0], v[1])\n    }",vec3:"\n    if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])\n    {\n        cv[0] = v[0];\n        cv[1] = v[1];\n        cv[2] = v[2];\n\n        gl.uniform3f(location, v[0], v[1], v[2])\n    }",vec4:"gl.uniform4f(location, v[0], v[1], v[2], v[3])",int:"gl.uniform1i(location, v)",ivec2:"gl.uniform2i(location, v[0], v[1])",ivec3:"gl.uniform3i(location, v[0], v[1], v[2])",ivec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",uint:"gl.uniform1ui(location, v)",uvec2:"gl.uniform2ui(location, v[0], v[1])",uvec3:"gl.uniform3ui(location, v[0], v[1], v[2])",uvec4:"gl.uniform4ui(location, v[0], v[1], v[2], v[3])",bool:"\n    if(cv !== v)\n    {\n        cv.v = v;\n        gl.uniform1i(location, v)\n    }",bvec2:"gl.uniform2i(location, v[0], v[1])",bvec3:"gl.uniform3i(location, v[0], v[1], v[2])",bvec4:"gl.uniform4i(location, v[0], v[1], v[2], v[3])",mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:"gl.uniform1i(location, v)",samplerCube:"gl.uniform1i(location, v)",sampler2DArray:"gl.uniform1i(location, v)"},oh={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};var sh,ah=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join("\n");function lh(t){for(var e="",n=0;n<t;++n)n>0&&(e+="\nelse "),n<t-1&&(e+="if(test == "+n+".0){}");return e}var uh=0,ch={},hh=function(){function t(e,n,r){void 0===r&&(r="pixi-shader"),this.id=uh++,this.vertexSrc=e||t.defaultVertexSrc,this.fragmentSrc=n||t.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),"#version"!==this.vertexSrc.substring(0,8)&&(r=r.replace(/\s+/g,"-"),ch[r]?(ch[r]++,r+="-"+ch[r]):ch[r]=1,this.vertexSrc="#define SHADER_NAME "+r+"\n"+this.vertexSrc,this.fragmentSrc="#define SHADER_NAME "+r+"\n"+this.fragmentSrc,this.vertexSrc=Zc(this.vertexSrc,wl.PRECISION_VERTEX,yl.HIGH),this.fragmentSrc=Zc(this.fragmentSrc,wl.PRECISION_FRAGMENT,Kc())),this.glPrograms={},this.syncUniforms=null}return Object.defineProperty(t,"defaultVertexSrc",{get:function(){return"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void){\n   gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n   vTextureCoord = aTextureCoord;\n}\n"},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentSrc",{get:function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor *= texture2D(uSampler, vTextureCoord);\n}"},enumerable:!1,configurable:!0}),t.from=function(e,n,r){var i=e+n,o=$l[i];return o||($l[i]=o=new t(e,n,r)),o},t}(),dh=function(){function t(t,e){this.uniformBindCount=0,this.program=t,this.uniformGroup=e?e instanceof Dc?e:new Dc(e):new Dc({})}return t.prototype.checkUniformExists=function(t,e){if(e.uniforms[t])return!0;for(var n in e.uniforms){var r=e.uniforms[n];if(r.group&&this.checkUniformExists(t,r))return!0}return!1},t.prototype.destroy=function(){this.uniformGroup=null},Object.defineProperty(t.prototype,"uniforms",{get:function(){return this.uniformGroup.uniforms},enumerable:!1,configurable:!0}),t.from=function(e,n,r){return new t(hh.from(e,n),r)},t}(),ph=function(){function t(){this.data=0,this.blendMode=sl.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}return Object.defineProperty(t.prototype,"blend",{get:function(){return!!(1&this.data)},set:function(t){!!(1&this.data)!==t&&(this.data^=1)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"offsets",{get:function(){return!!(2&this.data)},set:function(t){!!(2&this.data)!==t&&(this.data^=2)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"culling",{get:function(){return!!(4&this.data)},set:function(t){!!(4&this.data)!==t&&(this.data^=4)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthTest",{get:function(){return!!(8&this.data)},set:function(t){!!(8&this.data)!==t&&(this.data^=8)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"depthMask",{get:function(){return!!(32&this.data)},set:function(t){!!(32&this.data)!==t&&(this.data^=32)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clockwiseFrontFace",{get:function(){return!!(16&this.data)},set:function(t){!!(16&this.data)!==t&&(this.data^=16)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"blendMode",{get:function(){return this._blendMode},set:function(t){this.blend=t!==sl.NONE,this._blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"polygonOffset",{get:function(){return this._polygonOffset},set:function(t){this.offsets=!!t,this._polygonOffset=t},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"[@pixi/core:State blendMode="+this.blendMode+" clockwiseFrontFace="+this.clockwiseFrontFace+" culling="+this.culling+" depthMask="+this.depthMask+" polygonOffset="+this.polygonOffset+"]"},t.for2d=function(){var e=new t;return e.depthTest=!1,e.blend=!0,e},t}(),fh=function(t){function e(n,r,i){var o=this,s=hh.from(n||e.defaultVertexSrc,r||e.defaultFragmentSrc);return(o=t.call(this,s,i)||this).padding=0,o.resolution=wl.FILTER_RESOLUTION,o.multisample=wl.FILTER_MULTISAMPLE,o.enabled=!0,o.autoFit=!0,o.state=new ph,o}return Wu(e,t),e.prototype.apply=function(t,e,n,r,i){t.applyFilter(this,e,n,r)},Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(t){this._resolution=t},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultVertexSrc",{get:function(){return"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n"},enumerable:!1,configurable:!0}),Object.defineProperty(e,"defaultFragmentSrc",{get:function(){return"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n   gl_FragColor = texture2D(uSampler, vTextureCoord);\n}\n"},enumerable:!1,configurable:!0}),e}(dh),mh=new du,gh=function(){function t(t,e){this._texture=t,this.mapCoord=new du,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=void 0===e?.5:e,this.isSimple=!1}return Object.defineProperty(t.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture=t,this._textureID=-1},enumerable:!1,configurable:!0}),t.prototype.multiplyUvs=function(t,e){void 0===e&&(e=t);for(var n=this.mapCoord,r=0;r<t.length;r+=2){var i=t[r],o=t[r+1];e[r]=i*n.a+o*n.c+n.tx,e[r+1]=i*n.b+o*n.d+n.ty}return e},t.prototype.update=function(t){var e=this._texture;if(!e||!e.valid)return!1;if(!t&&this._textureID===e._updateID)return!1;this._textureID=e._updateID,this._updateID++;var n=e._uvs;this.mapCoord.set(n.x1-n.x0,n.y1-n.y0,n.x3-n.x0,n.y3-n.y0,n.x0,n.y0);var r=e.orig,i=e.trim;i&&(mh.set(r.width/i.width,0,0,r.height/i.height,-i.x/i.width,-i.y/i.height),this.mapCoord.append(mh));var o=e.baseTexture,s=this.uClampFrame,a=this.clampMargin/o.resolution,l=this.clampOffset;return s[0]=(e._frame.x+a+l)/o.width,s[1]=(e._frame.y+a+l)/o.height,s[2]=(e._frame.x+e._frame.width-a+l)/o.width,s[3]=(e._frame.y+e._frame.height-a+l)/o.height,this.uClampOffset[0]=l/o.realWidth,this.uClampOffset[1]=l/o.realHeight,this.isSimple=e._frame.width===o.width&&e._frame.height===o.height&&0===e.rotate,!0},t}(),vh=function(t){function e(e){var n=this,r=new du;return n=t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 otherMatrix;\n\nvarying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0)  ).xy;\n}\n","varying vec2 vMaskCoord;\nvarying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform sampler2D mask;\nuniform float alpha;\nuniform float npmAlpha;\nuniform vec4 maskClamp;\n\nvoid main(void)\n{\n    float clip = step(3.5,\n        step(maskClamp.x, vMaskCoord.x) +\n        step(maskClamp.y, vMaskCoord.y) +\n        step(vMaskCoord.x, maskClamp.z) +\n        step(vMaskCoord.y, maskClamp.w));\n\n    vec4 original = texture2D(uSampler, vTextureCoord);\n    vec4 masky = texture2D(mask, vMaskCoord);\n    float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);\n\n    original *= (alphaMul * masky.r * alpha * clip);\n\n    gl_FragColor = original;\n}\n")||this,e.renderable=!1,n.maskSprite=e,n.maskMatrix=r,n}return Wu(e,t),e.prototype.apply=function(t,e,n,r){var i=this.maskSprite,o=i._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new gh(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=t.calculateSpriteMatrix(this.maskMatrix,i).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=i.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,t.applyFilter(this,e,n,r))},e}(fh),yh=function(){function t(t){this.renderer=t,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}return t.prototype.setMaskStack=function(t){this.maskStack=t,this.renderer.scissor.setMaskStack(t),this.renderer.stencil.setMaskStack(t)},t.prototype.push=function(t,e){var n=e;if(!n.isMaskData){var r=this.maskDataPool.pop()||new Hc;r.pooled=!0,r.maskObject=e,n=r}switch(n.autoDetect&&this.detect(n),n.copyCountersOrReset(this.maskStack[this.maskStack.length-1]),n._target=t,n.type){case _l.SCISSOR:this.maskStack.push(n),this.renderer.scissor.push(n);break;case _l.STENCIL:this.maskStack.push(n),this.renderer.stencil.push(n);break;case _l.SPRITE:n.copyCountersOrReset(null),this.pushSpriteMask(n),this.maskStack.push(n)}},t.prototype.pop=function(t){var e=this.maskStack.pop();if(e&&e._target===t){switch(e.type){case _l.SCISSOR:this.renderer.scissor.pop();break;case _l.STENCIL:this.renderer.stencil.pop(e.maskObject);break;case _l.SPRITE:this.popSpriteMask()}e.reset(),e.pooled&&this.maskDataPool.push(e)}},t.prototype.detect=function(t){var e=t.maskObject;if(e.isSprite)t.type=_l.SPRITE;else if(t.type=_l.STENCIL,this.enableScissor&&e.isFastRect&&e.isFastRect()){var n=e.worldTransform,r=Math.atan2(n.b,n.a),i=Math.atan2(n.d,n.c);r=Math.round(r*(180/Math.PI)*100),i=((i=Math.round(i*(180/Math.PI)*100)-r)%18e3+18e3)%18e3,0===(r=(r%9e3+9e3)%9e3)&&9e3===i&&(t.type=_l.SCISSOR)}},t.prototype.pushSpriteMask=function(t){var e,n,r=t.maskObject,i=t._target,o=this.alphaMaskPool[this.alphaMaskIndex];o||(o=this.alphaMaskPool[this.alphaMaskIndex]=[new vh(r)]);var s,a,l=this.renderer,u=l.renderTexture;if(u.current){var c=u.current;s=t.resolution||c.resolution,a=null!==(e=t.multisample)&&void 0!==e?e:c.multisample}else s=t.resolution||l.resolution,a=null!==(n=t.multisample)&&void 0!==n?n:l.multisample;o[0].resolution=s,o[0].multisample=a,o[0].maskSprite=r;var h=i.filterArea;i.filterArea=r.getBounds(!0),l.filter.push(i,o),i.filterArea=h,this.alphaMaskIndex++},t.prototype.popSpriteMask=function(){this.renderer.filter.pop(),this.alphaMaskIndex--},t.prototype.destroy=function(){this.renderer=null},t}(),_h=function(){function t(t){this.renderer=t,this.maskStack=[],this.glConst=0}return t.prototype.getStackLength=function(){return this.maskStack.length},t.prototype.setMaskStack=function(t){var e=this.renderer.gl,n=this.getStackLength();this.maskStack=t;var r=this.getStackLength();r!==n&&(0===r?e.disable(this.glConst):(e.enable(this.glConst),this._useCurrent()))},t.prototype._useCurrent=function(){},t.prototype.destroy=function(){this.renderer=null,this.maskStack=null},t}(),bh=function(t){function e(e){var n=t.call(this,e)||this;return n.glConst=WebGLRenderingContext.SCISSOR_TEST,n}return Wu(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._scissorCounter:0},e.prototype.push=function(t){var e=t.maskObject;e.renderable=!0;var n=t._scissorRect,r=e.getBounds(!0),i=this.renderer.gl;e.renderable=!1,n?r.fit(n):i.enable(i.SCISSOR_TEST),t._scissorCounter++,t._scissorRect=r,this._useCurrent()},e.prototype.pop=function(){var t=this.renderer.gl;this.getStackLength()>0?this._useCurrent():t.disable(t.SCISSOR_TEST)},e.prototype._useCurrent=function(){var t=this.maskStack[this.maskStack.length-1]._scissorRect,e=this.renderer.renderTexture.current,n=this.renderer.projection,r=n.transform,i=n.sourceFrame,o=n.destinationFrame,s=e?e.resolution:this.renderer.resolution,a=o.width/i.width,l=o.height/i.height,u=((t.x-i.x)*a+o.x)*s,c=((t.y-i.y)*l+o.y)*s,h=t.width*a*s,d=t.height*l*s;r&&(u+=r.tx*s,c+=r.ty*s),e||(c=this.renderer.height-d-c),u=Math.round(u),c=Math.round(c),h=Math.round(h),d=Math.round(d),this.renderer.gl.scissor(u,c,h,d)},e}(_h),xh=function(t){function e(e){var n=t.call(this,e)||this;return n.glConst=WebGLRenderingContext.STENCIL_TEST,n}return Wu(e,t),e.prototype.getStackLength=function(){var t=this.maskStack[this.maskStack.length-1];return t?t._stencilCounter:0},e.prototype.push=function(t){var e=t.maskObject,n=this.renderer.gl,r=t._stencilCounter;0===r&&(this.renderer.framebuffer.forceStencil(),n.enable(n.STENCIL_TEST)),t._stencilCounter++,n.colorMask(!1,!1,!1,!1),n.stencilFunc(n.EQUAL,r,4294967295),n.stencilOp(n.KEEP,n.KEEP,n.INCR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,this._useCurrent()},e.prototype.pop=function(t){var e=this.renderer.gl;0===this.getStackLength()?(e.disable(e.STENCIL_TEST),e.clearStencil(0),e.clear(e.STENCIL_BUFFER_BIT)):(e.colorMask(!1,!1,!1,!1),e.stencilOp(e.KEEP,e.KEEP,e.DECR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,this._useCurrent())},e.prototype._useCurrent=function(){var t=this.renderer.gl;t.colorMask(!0,!0,!0,!0),t.stencilFunc(t.EQUAL,this.getStackLength(),4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP)},e}(_h),wh=function(){function t(t){this.renderer=t,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new du,this.transform=null}return t.prototype.update=function(t,e,n,r){this.destinationFrame=t||this.destinationFrame||this.defaultFrame,this.sourceFrame=e||this.sourceFrame||t,this.calculateProjection(this.destinationFrame,this.sourceFrame,n,r),this.transform&&this.projectionMatrix.append(this.transform);var i=this.renderer;i.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,i.globalUniforms.update(),i.shader.shader&&i.shader.syncUniformGroup(i.shader.shader.uniforms.globals)},t.prototype.calculateProjection=function(t,e,n,r){var i=this.projectionMatrix,o=r?-1:1;i.identity(),i.a=1/e.width*2,i.d=o*(1/e.height*2),i.tx=-1-e.x*i.a,i.ty=-o-e.y*i.d},t.prototype.setTransform=function(t){},t.prototype.destroy=function(){this.renderer=null},t}(),Eh=new ou,Th=new ou,Sh=function(){function t(t){this.renderer=t,this.clearColor=t._backgroundColorRgba,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new ou,this.destinationFrame=new ou,this.viewportFrame=new ou}return t.prototype.bind=function(t,e,n){void 0===t&&(t=null);var r,i,o,s=this.renderer;this.current=t,t?(o=(r=t.baseTexture).resolution,e||(Eh.width=t.frame.width,Eh.height=t.frame.height,e=Eh),n||(Th.x=t.frame.x,Th.y=t.frame.y,Th.width=e.width,Th.height=e.height,n=Th),i=r.framebuffer):(o=s.resolution,e||(Eh.width=s.screen.width,Eh.height=s.screen.height,e=Eh),n||((n=Eh).width=e.width,n.height=e.height));var a=this.viewportFrame;a.x=n.x*o,a.y=n.y*o,a.width=n.width*o,a.height=n.height*o,t||(a.y=s.view.height-(a.y+a.height)),a.ceil(),this.renderer.framebuffer.bind(i,a),this.renderer.projection.update(n,e,o,!i),t?this.renderer.mask.setMaskStack(r.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(e),this.destinationFrame.copyFrom(n)},t.prototype.clear=function(t,e){t=this.current?t||this.current.baseTexture.clearColor:t||this.clearColor;var n=this.destinationFrame,r=this.current?this.current.baseTexture:this.renderer.screen,i=n.width!==r.width||n.height!==r.height;if(i){var o=this.viewportFrame,s=o.x,a=o.y,l=o.width,u=o.height;s=Math.round(s),a=Math.round(a),l=Math.round(l),u=Math.round(u),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(s,a,l,u)}this.renderer.framebuffer.clear(t[0],t[1],t[2],t[3],e),i&&this.renderer.scissor.pop()},t.prototype.resize=function(){this.bind(null)},t.prototype.reset=function(){this.bind(null)},t.prototype.destroy=function(){this.renderer=null},t}();function Ah(t,e,n,r,i){n.buffer.update(i)}var Mh={float:"\n        data[offset] = v;\n    ",vec2:"\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n    ",vec3:"\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n        data[offset+2] = v[2];\n\n    ",vec4:"\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n        data[offset+2] = v[2];\n        data[offset+3] = v[3];\n    ",mat2:"\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n\n        data[offset+4] = v[2];\n        data[offset+5] = v[3];\n    ",mat3:"\n        data[offset] = v[0];\n        data[offset+1] = v[1];\n        data[offset+2] = v[2];\n\n        data[offset + 4] = v[3];\n        data[offset + 5] = v[4];\n        data[offset + 6] = v[5];\n\n        data[offset + 8] = v[6];\n        data[offset + 9] = v[7];\n        data[offset + 10] = v[8];\n    ",mat4:"\n        for(var i = 0; i < 16; i++)\n        {\n            data[offset + i] = v[i];\n        }\n    "},Dh={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:32,mat3:48,mat4:64};function Ch(t,e){if(!t.autoManage)return{size:0,syncFunc:Ah};for(var n=function(t){for(var e=t.map((function(t){return{data:t,offset:0,dataLen:0,dirty:0}})),n=0,r=0,i=0,o=0;o<e.length;o++){var s=e[o];if(n=Dh[s.data.type],s.data.size>1&&(n=Math.max(n,16)*s.data.size),s.dataLen=n,r%n!=0&&r<16){var a=r%n%16;r+=a,i+=a}r+n>16?(i=16*Math.ceil(i/16),s.offset=i,i+=n,r=n):(s.offset=i,r+=n,i+=n)}return{uboElements:e,size:i=16*Math.ceil(i/16)}}(function(t,e){var n=[];for(var r in t)e[r]&&n.push(e[r]);return n.sort((function(t,e){return t.index-e.index})),n}(t.uniforms,e)),r=n.uboElements,i=n.size,o=["\n    var v = null;\n    var v2 = null;\n    var cv = null;\n    var t = 0;\n    var gl = renderer.gl\n    var index = 0;\n    var data = buffer.data;\n    "],s=0;s<r.length;s++){for(var a=r[s],l=t.uniforms[a.data.name],u=a.data.name,c=!1,h=0;h<rh.length;h++){var d=rh[h];if(d.codeUbo&&d.test(a.data,l)){o.push("offset = "+a.offset/4+";",rh[h].codeUbo(a.data.name,l)),c=!0;break}}if(!c)if(a.data.size>1){var p=Qc(a.data.type),f=Math.max(Dh[a.data.type]/16,1),m=p/f,g=(4-m%4)%4;o.push("\n                cv = ud."+u+".value;\n                v = uv."+u+";\n                offset = "+a.offset/4+";\n\n                t = 0;\n\n                for(var i=0; i < "+a.data.size*f+"; i++)\n                {\n                    for(var j = 0; j < "+m+"; j++)\n                    {\n                        data[offset++] = v[t++];\n                    }\n                    offset += "+g+";\n                }\n\n                ")}else{var v=Mh[a.data.type];o.push("\n                cv = ud."+u+".value;\n                v = uv."+u+";\n                offset = "+a.offset/4+";\n                "+v+";\n                ")}}return o.push("\n       renderer.buffer.update(buffer);\n    "),{size:i,syncFunc:new Function("ud","uv","renderer","syncData","buffer",o.join("\n"))}}var Rh=function(){function t(t,e){this.program=t,this.uniformData=e,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}return t.prototype.destroy=function(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null},t}();function Oh(t,e){var n=jc(t,t.VERTEX_SHADER,e.vertexSrc),r=jc(t,t.FRAGMENT_SHADER,e.fragmentSrc),i=t.createProgram();t.attachShader(i,n),t.attachShader(i,r),t.linkProgram(i),t.getProgramParameter(i,t.LINK_STATUS)||function(t,e,n,r){t.getProgramParameter(e,t.LINK_STATUS)||(t.getShaderParameter(n,t.COMPILE_STATUS)||Vc(t,n),t.getShaderParameter(r,t.COMPILE_STATUS)||Vc(t,r),console.error("PixiJS Error: Could not initialize shader."),""!==t.getProgramInfoLog(e)&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",t.getProgramInfoLog(e)))}(t,i,n,r),e.attributeData=function(t,e){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES),i=0;i<r;i++){var o=e.getActiveAttrib(t,i);if(0!==o.name.indexOf("gl_")){var s=nh(e,o.type),a={type:s,name:o.name,size:Qc(s),location:i};n[o.name]=a}}return n}(i,t),e.uniformData=function(t,e){for(var n={},r=e.getProgramParameter(t,e.ACTIVE_UNIFORMS),i=0;i<r;i++){var o=e.getActiveUniform(t,i),s=o.name.replace(/\[.*?\]$/,""),a=!!o.name.match(/\[.*?\]$/),l=nh(e,o.type);n[s]={name:s,index:i,type:l,size:o.size,isArray:a,value:Wc(l,o.size)}}return n}(i,t);var o=Object.keys(e.attributeData);o.sort((function(t,e){return t>e?1:-1}));for(var s=0;s<o.length;s++)e.attributeData[o[s]].location=s,t.bindAttribLocation(i,s,o[s]);t.linkProgram(i),t.deleteShader(n),t.deleteShader(r);var a={};for(var s in e.uniformData){var l=e.uniformData[s];a[s]={location:t.getUniformLocation(i,s),value:Wc(l.type,l.size)}}return new Rh(i,a)}var Ph=0,Ih={textureCount:0,uboCount:0},Lh=function(){function t(t){this.destroyed=!1,this.renderer=t,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=Ph++}return t.prototype.systemCheck=function(){if(!function(){if("boolean"==typeof sh)return sh;try{var t=new Function("param1","param2","param3","return param1[param2] === param3;");sh=!0===t({a:"b"},"a","b")}catch(t){sh=!1}return sh}())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")},t.prototype.contextChange=function(t){this.gl=t,this.reset()},t.prototype.bind=function(t,e){t.uniforms.globals=this.renderer.globalUniforms;var n=t.program,r=n.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(t);return this.shader=t,this.program!==n&&(this.program=n,this.gl.useProgram(r.program)),e||(Ih.textureCount=0,Ih.uboCount=0,this.syncUniformGroup(t.uniformGroup,Ih)),r},t.prototype.setUniforms=function(t){var e=this.shader.program,n=e.glPrograms[this.renderer.CONTEXT_UID];e.syncUniforms(n.uniformData,t,this.renderer)},t.prototype.syncUniformGroup=function(t,e){var n=this.getGlProgram();t.static&&t.dirtyId===n.uniformDirtyGroups[t.id]||(n.uniformDirtyGroups[t.id]=t.dirtyId,this.syncUniforms(t,n,e))},t.prototype.syncUniforms=function(t,e,n){(t.syncUniforms[this.shader.program.id]||this.createSyncGroups(t))(e.uniformData,t.uniforms,this.renderer,n)},t.prototype.createSyncGroups=function(t){var e=this.getSignature(t,this.shader.program.uniformData,"u");return this.cache[e]||(this.cache[e]=function(t,e){var n=["\n        var v = null;\n        var cv = null\n        var t = 0;\n        var gl = renderer.gl\n    "];for(var r in t.uniforms){var i=e[r];if(i){for(var o=t.uniforms[r],s=!1,a=0;a<rh.length;a++)if(rh[a].test(i,o)){n.push(rh[a].code(r,o)),s=!0;break}if(!s){var l=(1===i.size?ih:oh)[i.type].replace("location",'ud["'+r+'"].location');n.push('\n            cv = ud["'+r+'"].value;\n            v = uv["'+r+'"];\n            '+l+";")}}else t.uniforms[r].group&&(t.uniforms[r].ubo?n.push("\n                        renderer.shader.syncUniformBufferGroup(uv."+r+", '"+r+"');\n                    "):n.push("\n                        renderer.shader.syncUniformGroup(uv."+r+", syncData);\n                    "))}return new Function("ud","uv","renderer","syncData",n.join("\n"))}(t,this.shader.program.uniformData)),t.syncUniforms[this.shader.program.id]=this.cache[e],t.syncUniforms[this.shader.program.id]},t.prototype.syncUniformBufferGroup=function(t,e){var n=this.getGlProgram();if(!t.static||0!==t.dirtyId||!n.uniformGroups[t.id]){t.dirtyId=0;var r=n.uniformGroups[t.id]||this.createSyncBufferGroup(t,n,e);t.buffer.update(),r(n.uniformData,t.uniforms,this.renderer,Ih,t.buffer)}this.renderer.buffer.bindBufferBase(t.buffer,n.uniformBufferBindings[e])},t.prototype.createSyncBufferGroup=function(t,e,n){var r=this.renderer.gl;this.renderer.buffer.bind(t.buffer);var i=this.gl.getUniformBlockIndex(e.program,n);e.uniformBufferBindings[n]=this.shader.uniformBindCount,r.uniformBlockBinding(e.program,i,this.shader.uniformBindCount),this.shader.uniformBindCount++;var o=this.getSignature(t,this.shader.program.uniformData,"ubo"),s=this._uboCache[o];if(s||(s=this._uboCache[o]=Ch(t,this.shader.program.uniformData)),t.autoManage){var a=new Float32Array(s.size/4);t.buffer.update(a)}return e.uniformGroups[t.id]=s.syncFunc,e.uniformGroups[t.id]},t.prototype.getSignature=function(t,e,n){var r=t.uniforms,i=[n+"-"];for(var o in r)i.push(o),e[o]&&i.push(e[o].type);return i.join("-")},t.prototype.getGlProgram=function(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null},t.prototype.generateProgram=function(t){var e=this.gl,n=t.program,r=Oh(e,n);return n.glPrograms[this.renderer.CONTEXT_UID]=r,r},t.prototype.reset=function(){this.program=null,this.shader=null},t.prototype.destroy=function(){this.renderer=null,this.destroyed=!0},t}();var Nh=function(){function t(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=sl.NONE,this._blendEq=!1,this.map=[],this.map[0]=this.setBlend,this.map[1]=this.setOffset,this.map[2]=this.setCullFace,this.map[3]=this.setDepthTest,this.map[4]=this.setFrontFace,this.map[5]=this.setDepthMask,this.checks=[],this.defaultState=new ph,this.defaultState.blend=!0}return t.prototype.contextChange=function(t){this.gl=t,this.blendModes=function(t,e){return void 0===e&&(e=[]),e[sl.NORMAL]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.ADD]=[t.ONE,t.ONE],e[sl.MULTIPLY]=[t.DST_COLOR,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.SCREEN]=[t.ONE,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.OVERLAY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.DARKEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.LIGHTEN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.COLOR_DODGE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.COLOR_BURN]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.HARD_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.SOFT_LIGHT]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.DIFFERENCE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.EXCLUSION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.HUE]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.SATURATION]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.COLOR]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.LUMINOSITY]=[t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.NONE]=[0,0],e[sl.NORMAL_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.ADD_NPM]=[t.SRC_ALPHA,t.ONE,t.ONE,t.ONE],e[sl.SCREEN_NPM]=[t.SRC_ALPHA,t.ONE_MINUS_SRC_COLOR,t.ONE,t.ONE_MINUS_SRC_ALPHA],e[sl.SRC_IN]=[t.DST_ALPHA,t.ZERO],e[sl.SRC_OUT]=[t.ONE_MINUS_DST_ALPHA,t.ZERO],e[sl.SRC_ATOP]=[t.DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[sl.DST_OVER]=[t.ONE_MINUS_DST_ALPHA,t.ONE],e[sl.DST_IN]=[t.ZERO,t.SRC_ALPHA],e[sl.DST_OUT]=[t.ZERO,t.ONE_MINUS_SRC_ALPHA],e[sl.DST_ATOP]=[t.ONE_MINUS_DST_ALPHA,t.SRC_ALPHA],e[sl.XOR]=[t.ONE_MINUS_DST_ALPHA,t.ONE_MINUS_SRC_ALPHA],e[sl.SUBTRACT]=[t.ONE,t.ONE,t.ONE,t.ONE,t.FUNC_REVERSE_SUBTRACT,t.FUNC_ADD],e}(t),this.set(this.defaultState),this.reset()},t.prototype.set=function(t){if(t=t||this.defaultState,this.stateId!==t.data){for(var e=this.stateId^t.data,n=0;e;)1&e&&this.map[n].call(this,!!(t.data&1<<n)),e>>=1,n++;this.stateId=t.data}for(n=0;n<this.checks.length;n++)this.checks[n](this,t)},t.prototype.forceState=function(t){t=t||this.defaultState;for(var e=0;e<this.map.length;e++)this.map[e].call(this,!!(t.data&1<<e));for(e=0;e<this.checks.length;e++)this.checks[e](this,t);this.stateId=t.data},t.prototype.setBlend=function(e){this.updateCheck(t.checkBlendMode,e),this.gl[e?"enable":"disable"](this.gl.BLEND)},t.prototype.setOffset=function(e){this.updateCheck(t.checkPolygonOffset,e),this.gl[e?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)},t.prototype.setDepthTest=function(t){this.gl[t?"enable":"disable"](this.gl.DEPTH_TEST)},t.prototype.setDepthMask=function(t){this.gl.depthMask(t)},t.prototype.setCullFace=function(t){this.gl[t?"enable":"disable"](this.gl.CULL_FACE)},t.prototype.setFrontFace=function(t){this.gl.frontFace(this.gl[t?"CW":"CCW"])},t.prototype.setBlendMode=function(t){if(t!==this.blendMode){this.blendMode=t;var e=this.blendModes[t],n=this.gl;2===e.length?n.blendFunc(e[0],e[1]):n.blendFuncSeparate(e[0],e[1],e[2],e[3]),6===e.length?(this._blendEq=!0,n.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,n.blendEquationSeparate(n.FUNC_ADD,n.FUNC_ADD))}},t.prototype.setPolygonOffset=function(t,e){this.gl.polygonOffset(t,e)},t.prototype.reset=function(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)},t.prototype.updateCheck=function(t,e){var n=this.checks.indexOf(t);e&&-1===n?this.checks.push(t):e||-1===n||this.checks.splice(n,1)},t.checkBlendMode=function(t,e){t.setBlendMode(e.blendMode)},t.checkPolygonOffset=function(t,e){t.setPolygonOffset(1,e.polygonOffset)},t.prototype.destroy=function(){this.gl=null},t}(),Fh=function(){function t(t){this.renderer=t,this.count=0,this.checkCount=0,this.maxIdle=wl.GC_MAX_IDLE,this.checkCountMax=wl.GC_MAX_CHECK_COUNT,this.mode=wl.GC_MODE}return t.prototype.postrender=function(){this.renderer.renderingToScreen&&(this.count++,this.mode!==vl.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))},t.prototype.run=function(){for(var t=this.renderer.texture,e=t.managedTextures,n=!1,r=0;r<e.length;r++){var i=e[r];!i.framebuffer&&this.count-i.touched>this.maxIdle&&(t.destroyTexture(i,!0),e[r]=null,n=!0)}if(n){var o=0;for(r=0;r<e.length;r++)null!==e[r]&&(e[o++]=e[r]);e.length=o}},t.prototype.unload=function(t){var e=this.renderer.texture,n=t._texture;n&&!n.framebuffer&&e.destroyTexture(n);for(var r=t.children.length-1;r>=0;r--)this.unload(t.children[r])},t.prototype.destroy=function(){this.renderer=null},t}();var kh=function(t){this.texture=t,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=cl.UNSIGNED_BYTE,this.internalFormat=ll.RGBA,this.samplerType=0},Uh=function(){function t(t){this.renderer=t,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new Zu,this.hasIntegerTextures=!1}return t.prototype.contextChange=function(){var t=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=function(t){var e,n,r,i,o,s,a,l,u,c,h,d,p,f,m,g,v,y,_,b,x,w,E;return"WebGL2RenderingContext"in self&&t instanceof self.WebGL2RenderingContext?((e={})[cl.UNSIGNED_BYTE]=((n={})[ll.RGBA]=t.RGBA8,n[ll.RGB]=t.RGB8,n[ll.RG]=t.RG8,n[ll.RED]=t.R8,n[ll.RGBA_INTEGER]=t.RGBA8UI,n[ll.RGB_INTEGER]=t.RGB8UI,n[ll.RG_INTEGER]=t.RG8UI,n[ll.RED_INTEGER]=t.R8UI,n[ll.ALPHA]=t.ALPHA,n[ll.LUMINANCE]=t.LUMINANCE,n[ll.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,n),e[cl.BYTE]=((r={})[ll.RGBA]=t.RGBA8_SNORM,r[ll.RGB]=t.RGB8_SNORM,r[ll.RG]=t.RG8_SNORM,r[ll.RED]=t.R8_SNORM,r[ll.RGBA_INTEGER]=t.RGBA8I,r[ll.RGB_INTEGER]=t.RGB8I,r[ll.RG_INTEGER]=t.RG8I,r[ll.RED_INTEGER]=t.R8I,r),e[cl.UNSIGNED_SHORT]=((i={})[ll.RGBA_INTEGER]=t.RGBA16UI,i[ll.RGB_INTEGER]=t.RGB16UI,i[ll.RG_INTEGER]=t.RG16UI,i[ll.RED_INTEGER]=t.R16UI,i[ll.DEPTH_COMPONENT]=t.DEPTH_COMPONENT16,i),e[cl.SHORT]=((o={})[ll.RGBA_INTEGER]=t.RGBA16I,o[ll.RGB_INTEGER]=t.RGB16I,o[ll.RG_INTEGER]=t.RG16I,o[ll.RED_INTEGER]=t.R16I,o),e[cl.UNSIGNED_INT]=((s={})[ll.RGBA_INTEGER]=t.RGBA32UI,s[ll.RGB_INTEGER]=t.RGB32UI,s[ll.RG_INTEGER]=t.RG32UI,s[ll.RED_INTEGER]=t.R32UI,s[ll.DEPTH_COMPONENT]=t.DEPTH_COMPONENT24,s),e[cl.INT]=((a={})[ll.RGBA_INTEGER]=t.RGBA32I,a[ll.RGB_INTEGER]=t.RGB32I,a[ll.RG_INTEGER]=t.RG32I,a[ll.RED_INTEGER]=t.R32I,a),e[cl.FLOAT]=((l={})[ll.RGBA]=t.RGBA32F,l[ll.RGB]=t.RGB32F,l[ll.RG]=t.RG32F,l[ll.RED]=t.R32F,l[ll.DEPTH_COMPONENT]=t.DEPTH_COMPONENT32F,l),e[cl.HALF_FLOAT]=((u={})[ll.RGBA]=t.RGBA16F,u[ll.RGB]=t.RGB16F,u[ll.RG]=t.RG16F,u[ll.RED]=t.R16F,u),e[cl.UNSIGNED_SHORT_5_6_5]=((c={})[ll.RGB]=t.RGB565,c),e[cl.UNSIGNED_SHORT_4_4_4_4]=((h={})[ll.RGBA]=t.RGBA4,h),e[cl.UNSIGNED_SHORT_5_5_5_1]=((d={})[ll.RGBA]=t.RGB5_A1,d),e[cl.UNSIGNED_INT_2_10_10_10_REV]=((p={})[ll.RGBA]=t.RGB10_A2,p[ll.RGBA_INTEGER]=t.RGB10_A2UI,p),e[cl.UNSIGNED_INT_10F_11F_11F_REV]=((f={})[ll.RGB]=t.R11F_G11F_B10F,f),e[cl.UNSIGNED_INT_5_9_9_9_REV]=((m={})[ll.RGB]=t.RGB9_E5,m),e[cl.UNSIGNED_INT_24_8]=((g={})[ll.DEPTH_STENCIL]=t.DEPTH24_STENCIL8,g),e[cl.FLOAT_32_UNSIGNED_INT_24_8_REV]=((v={})[ll.DEPTH_STENCIL]=t.DEPTH32F_STENCIL8,v),E=e):((y={})[cl.UNSIGNED_BYTE]=((_={})[ll.RGBA]=t.RGBA,_[ll.RGB]=t.RGB,_[ll.ALPHA]=t.ALPHA,_[ll.LUMINANCE]=t.LUMINANCE,_[ll.LUMINANCE_ALPHA]=t.LUMINANCE_ALPHA,_),y[cl.UNSIGNED_SHORT_5_6_5]=((b={})[ll.RGB]=t.RGB,b),y[cl.UNSIGNED_SHORT_4_4_4_4]=((x={})[ll.RGBA]=t.RGBA,x),y[cl.UNSIGNED_SHORT_5_5_5_1]=((w={})[ll.RGBA]=t.RGBA,w),E=y),E}(t);var e=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=e;for(var n=0;n<e;n++)this.boundTextures[n]=null;this.emptyTextures={};var r=new kh(t.createTexture());t.bindTexture(t.TEXTURE_2D,r.texture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[t.TEXTURE_2D]=r,this.emptyTextures[t.TEXTURE_CUBE_MAP]=new kh(t.createTexture()),t.bindTexture(t.TEXTURE_CUBE_MAP,this.emptyTextures[t.TEXTURE_CUBE_MAP].texture);for(n=0;n<6;n++)t.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,null);t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_CUBE_MAP,t.TEXTURE_MIN_FILTER,t.LINEAR);for(n=0;n<this.boundTextures.length;n++)this.bind(null,n)},t.prototype.bind=function(t,e){void 0===e&&(e=0);var n=this.gl;if((t=null==t?void 0:t.castToBaseTexture())&&t.valid&&!t.parentTextureArray){t.touched=this.renderer.textureGC.count;var r=t._glTextures[this.CONTEXT_UID]||this.initTexture(t);this.boundTextures[e]!==t&&(this.currentLocation!==e&&(this.currentLocation=e,n.activeTexture(n.TEXTURE0+e)),n.bindTexture(t.target,r.texture)),r.dirtyId!==t.dirtyId&&(this.currentLocation!==e&&(this.currentLocation=e,n.activeTexture(n.TEXTURE0+e)),this.updateTexture(t)),this.boundTextures[e]=t}else this.currentLocation!==e&&(this.currentLocation=e,n.activeTexture(n.TEXTURE0+e)),n.bindTexture(n.TEXTURE_2D,this.emptyTextures[n.TEXTURE_2D].texture),this.boundTextures[e]=null},t.prototype.reset=function(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(var t=0;t<this.boundTextures.length;t++)this.boundTextures[t]=this.unknownTexture},t.prototype.unbind=function(t){var e=this.gl,n=this.boundTextures;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(var r=0;r<n.length;r++)n[r]===this.unknownTexture&&this.bind(null,r)}for(r=0;r<n.length;r++)n[r]===t&&(this.currentLocation!==r&&(e.activeTexture(e.TEXTURE0+r),this.currentLocation=r),e.bindTexture(t.target,this.emptyTextures[t.target].texture),n[r]=null)},t.prototype.ensureSamplerType=function(t){var e=this.boundTextures,n=this.hasIntegerTextures,r=this.CONTEXT_UID;if(n)for(var i=t-1;i>=0;--i){var o=e[i];if(o)o._glTextures[r].samplerType!==hl.FLOAT&&this.renderer.texture.unbind(o)}},t.prototype.initTexture=function(t){var e=new kh(this.gl.createTexture());return e.dirtyId=-1,t._glTextures[this.CONTEXT_UID]=e,this.managedTextures.push(t),t.on("dispose",this.destroyTexture,this),e},t.prototype.initTextureType=function(t,e){var n,r;e.internalFormat=null!==(r=null===(n=this.internalFormats[t.type])||void 0===n?void 0:n[t.format])&&void 0!==r?r:t.format,2===this.webGLVersion&&t.type===cl.HALF_FLOAT?e.type=this.gl.HALF_FLOAT:e.type=t.type},t.prototype.updateTexture=function(t){var e=t._glTextures[this.CONTEXT_UID];if(e){var n=this.renderer;if(this.initTextureType(t,e),t.resource&&t.resource.upload(n,t,e))e.samplerType!==hl.FLOAT&&(this.hasIntegerTextures=!0);else{var r=t.realWidth,i=t.realHeight,o=n.gl;(e.width!==r||e.height!==i||e.dirtyId<0)&&(e.width=r,e.height=i,o.texImage2D(t.target,0,e.internalFormat,r,i,0,t.format,e.type,null))}t.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(t),e.dirtyId=t.dirtyId}},t.prototype.destroyTexture=function(t,e){var n=this.gl;if((t=t.castToBaseTexture())._glTextures[this.CONTEXT_UID]&&(this.unbind(t),n.deleteTexture(t._glTextures[this.CONTEXT_UID].texture),t.off("dispose",this.destroyTexture,this),delete t._glTextures[this.CONTEXT_UID],!e)){var r=this.managedTextures.indexOf(t);-1!==r&&jl(this.managedTextures,r,1)}},t.prototype.updateTextureStyle=function(t){var e=t._glTextures[this.CONTEXT_UID];e&&(t.mipmap!==fl.POW2&&2===this.webGLVersion||t.isPowerOfTwo?e.mipmap=t.mipmap>=1:e.mipmap=!1,2===this.webGLVersion||t.isPowerOfTwo?e.wrapMode=t.wrapMode:e.wrapMode=pl.CLAMP,t.resource&&t.resource.style(this.renderer,t,e)||this.setStyle(t,e),e.dirtyStyleId=t.dirtyStyleId)},t.prototype.setStyle=function(t,e){var n=this.gl;if(e.mipmap&&t.mipmap!==fl.ON_MANUAL&&n.generateMipmap(t.target),n.texParameteri(t.target,n.TEXTURE_WRAP_S,e.wrapMode),n.texParameteri(t.target,n.TEXTURE_WRAP_T,e.wrapMode),e.mipmap){n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===dl.LINEAR?n.LINEAR_MIPMAP_LINEAR:n.NEAREST_MIPMAP_NEAREST);var r=this.renderer.context.extensions.anisotropicFiltering;if(r&&t.anisotropicLevel>0&&t.scaleMode===dl.LINEAR){var i=Math.min(t.anisotropicLevel,n.getParameter(r.MAX_TEXTURE_MAX_ANISOTROPY_EXT));n.texParameterf(t.target,r.TEXTURE_MAX_ANISOTROPY_EXT,i)}}else n.texParameteri(t.target,n.TEXTURE_MIN_FILTER,t.scaleMode===dl.LINEAR?n.LINEAR:n.NEAREST);n.texParameteri(t.target,n.TEXTURE_MAG_FILTER,t.scaleMode===dl.LINEAR?n.LINEAR:n.NEAREST)},t.prototype.destroy=function(){this.renderer=null},t}(),Bh={__proto__:null,FilterSystem:Pc,BatchSystem:Lc,ContextSystem:Fc,FramebufferSystem:Bc,GeometrySystem:zc,MaskSystem:yh,ScissorSystem:bh,StencilSystem:xh,ProjectionSystem:wh,RenderTextureSystem:Sh,ShaderSystem:Lh,StateSystem:Nh,TextureGCSystem:Fh,TextureSystem:Uh},Gh=new du,zh=function(t){function e(e,n){void 0===e&&(e=il.UNKNOWN);var r=t.call(this)||this;return n=Object.assign({},wl.RENDER_OPTIONS,n),r.options=n,r.type=e,r.screen=new ou(0,0,n.width,n.height),r.view=n.view||document.createElement("canvas"),r.resolution=n.resolution||wl.RESOLUTION,r.useContextAlpha=n.useContextAlpha,r.autoDensity=!!n.autoDensity,r.preserveDrawingBuffer=n.preserveDrawingBuffer,r.clearBeforeRender=n.clearBeforeRender,r._backgroundColor=0,r._backgroundColorRgba=[0,0,0,1],r._backgroundColorString="#000000",r.backgroundColor=n.backgroundColor||r._backgroundColor,r.backgroundAlpha=n.backgroundAlpha,void 0!==n.transparent&&(ql("6.0.0","Option transparent is deprecated, please use backgroundAlpha instead."),r.useContextAlpha=n.transparent,r.backgroundAlpha=n.transparent?0:1),r._lastObjectRendered=null,r.plugins={},r}return Wu(e,t),e.prototype.initPlugins=function(t){for(var e in t)this.plugins[e]=new t[e](this)},Object.defineProperty(e.prototype,"width",{get:function(){return this.view.width},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.view.height},enumerable:!1,configurable:!0}),e.prototype.resize=function(t,e){this.view.width=Math.round(t*this.resolution),this.view.height=Math.round(e*this.resolution);var n=this.view.width/this.resolution,r=this.view.height/this.resolution;this.screen.width=n,this.screen.height=r,this.autoDensity&&(this.view.style.width=n+"px",this.view.style.height=r+"px"),this.emit("resize",n,r)},e.prototype.generateTexture=function(t,e,n,r){void 0===e&&(e={}),"number"==typeof e&&(ql("6.1.0","generateTexture options (scaleMode, resolution, region) are now object options."),e={scaleMode:e,resolution:n,region:r});var i=e.region,o=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&(n[r[i]]=t[r[i]])}return n}(e,["region"]);0===(r=i||t.getLocalBounds(null,!0)).width&&(r.width=1),0===r.height&&(r.height=1);var s=mc.create(Yu({width:r.width,height:r.height},o));return Gh.tx=-r.x,Gh.ty=-r.y,this.render(t,{renderTexture:s,clear:!1,transform:Gh,skipUpdateTransform:!!t.parent}),s},e.prototype.destroy=function(t){for(var e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null;t&&this.view.parentNode&&this.view.parentNode.removeChild(this.view);this.plugins=null,this.type=il.UNKNOWN,this.view=null,this.screen=null,this._tempDisplayObjectParent=null,this.options=null,this._backgroundColorRgba=null,this._backgroundColorString=null,this._lastObjectRendered=null},Object.defineProperty(e.prototype,"backgroundColor",{get:function(){return this._backgroundColor},set:function(t){this._backgroundColor=t,this._backgroundColorString=Il(t),Pl(t,this._backgroundColorRgba)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"backgroundAlpha",{get:function(){return this._backgroundColorRgba[3]},set:function(t){this._backgroundColorRgba[3]=t},enumerable:!1,configurable:!0}),e}(Tl.a),Hh=function(t){this.buffer=t||null,this.updateID=-1,this.byteLength=-1,this.refCount=0},jh=function(){function t(t){this.renderer=t,this.managedBuffers={},this.boundBufferBases={}}return t.prototype.destroy=function(){this.renderer=null},t.prototype.contextChange=function(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID},t.prototype.bind=function(t){var e=this.gl,n=this.CONTEXT_UID,r=t._glBuffers[n]||this.createGLBuffer(t);e.bindBuffer(t.type,r.buffer)},t.prototype.bindBufferBase=function(t,e){var n=this.gl,r=this.CONTEXT_UID;if(this.boundBufferBases[e]!==t){var i=t._glBuffers[r]||this.createGLBuffer(t);this.boundBufferBases[e]=t,n.bindBufferBase(n.UNIFORM_BUFFER,e,i.buffer)}},t.prototype.bindBufferRange=function(t,e,n){var r=this.gl,i=this.CONTEXT_UID;n=n||0;var o=t._glBuffers[i]||this.createGLBuffer(t);r.bindBufferRange(r.UNIFORM_BUFFER,e||0,o.buffer,256*n,256)},t.prototype.update=function(t){var e=this.gl,n=this.CONTEXT_UID,r=t._glBuffers[n];if(t._updateID!==r.updateID)if(r.updateID=t._updateID,e.bindBuffer(t.type,r.buffer),r.byteLength>=t.data.byteLength)e.bufferSubData(t.type,0,t.data);else{var i=t.static?e.STATIC_DRAW:e.DYNAMIC_DRAW;r.byteLength=t.data.byteLength,e.bufferData(t.type,t.data,i)}},t.prototype.dispose=function(t,e){if(this.managedBuffers[t.id]){delete this.managedBuffers[t.id];var n=t._glBuffers[this.CONTEXT_UID],r=this.gl;t.disposeRunner.remove(this),n&&(e||r.deleteBuffer(n.buffer),delete t._glBuffers[this.CONTEXT_UID])}},t.prototype.disposeAll=function(t){for(var e=Object.keys(this.managedBuffers),n=0;n<e.length;n++)this.dispose(this.managedBuffers[e[n]],t)},t.prototype.createGLBuffer=function(t){var e=this.CONTEXT_UID,n=this.gl;return t._glBuffers[e]=new Hh(n.createBuffer()),this.managedBuffers[t.id]=t,t.disposeRunner.add(this),t._glBuffers[e]},t}(),Vh=function(t){function e(n){var r=t.call(this,il.WEBGL,n)||this;return n=r.options,r.gl=null,r.CONTEXT_UID=0,r.runners={destroy:new Hu("destroy"),contextChange:new Hu("contextChange"),reset:new Hu("reset"),update:new Hu("update"),postrender:new Hu("postrender"),prerender:new Hu("prerender"),resize:new Hu("resize")},r.runners.contextChange.add(r),r.globalUniforms=new Dc({projectionMatrix:new du},!0),r.addSystem(yh,"mask").addSystem(Fc,"context").addSystem(Nh,"state").addSystem(Lh,"shader").addSystem(Uh,"texture").addSystem(jh,"buffer").addSystem(zc,"geometry").addSystem(Bc,"framebuffer").addSystem(bh,"scissor").addSystem(xh,"stencil").addSystem(wh,"projection").addSystem(Fh,"textureGC").addSystem(Pc,"filter").addSystem(Sh,"renderTexture").addSystem(Lc,"batch"),r.initPlugins(e.__plugins),r.multisample=void 0,n.context?r.context.initFromContext(n.context):r.context.initFromOptions({alpha:!!r.useContextAlpha,antialias:n.antialias,premultipliedAlpha:r.useContextAlpha&&"notMultiplied"!==r.useContextAlpha,stencil:!0,preserveDrawingBuffer:n.preserveDrawingBuffer,powerPreference:r.options.powerPreference}),r.renderingToScreen=!0,function(t){var e;if(!Rl){if(navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var n=["\n %c %c %c PixiJS 6.1.3 - ✰ "+t+" ✰  %c  %c  http://www.pixijs.com/  %c %c ♥%c♥%c♥ \n\n","background: #ff66a5; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff66a5; background: #030307; padding:5px 0;","background: #ff66a5; padding:5px 0;","background: #ffc3dc; padding:5px 0;","background: #ff66a5; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;","color: #ff2424; background: #fff; padding:5px 0;"];(e=self.console).log.apply(e,n)}else self.console&&self.console.log("PixiJS 6.1.3 - "+t+" - http://www.pixijs.com/");Rl=!0}}(2===r.context.webGLVersion?"WebGL 2":"WebGL 1"),r.resize(r.options.width,r.options.height),r}return Wu(e,t),e.create=function(t){if(void 0===Cl&&(Cl=function(){var t={stencil:!0,failIfMajorPerformanceCaveat:wl.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!self.WebGLRenderingContext)return!1;var e=document.createElement("canvas"),n=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),r=!(!n||!n.getContextAttributes().stencil);if(n){var i=n.getExtension("WEBGL_lose_context");i&&i.loseContext()}return n=null,r}catch(t){return!1}}()),Cl)return new e(t);throw new Error('WebGL unsupported in this browser, use "pixi.js-legacy" for fallback canvas2d support.')},e.prototype.contextChange=function(){var t,e=this.gl;if(1===this.context.webGLVersion){var n=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,n)}else{n=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,n)}t>=bl.HIGH?this.multisample=bl.HIGH:t>=bl.MEDIUM?this.multisample=bl.MEDIUM:t>=bl.LOW?this.multisample=bl.LOW:this.multisample=bl.NONE},e.prototype.addSystem=function(t,e){var n=new t(this);if(this[e])throw new Error('Whoops! The name "'+e+'" is already in use');for(var r in this[e]=n,this.runners)this.runners[r].add(n);return this},e.prototype.render=function(t,e){var n,r,i,o;if(e&&(e instanceof mc?(ql("6.0.0","Renderer#render arguments changed, use options instead."),n=e,r=arguments[2],i=arguments[3],o=arguments[4]):(n=e.renderTexture,r=e.clear,i=e.transform,o=e.skipUpdateTransform)),this.renderingToScreen=!n,this.runners.prerender.emit(),this.emit("prerender"),this.projection.transform=i,!this.context.isLost){if(n||(this._lastObjectRendered=t),!o){var s=t.enableTempParent();t.updateTransform(),t.disableTempParent(s)}this.renderTexture.bind(n),this.batch.currentRenderer.start(),(void 0!==r?r:this.clearBeforeRender)&&this.renderTexture.clear(),t.render(this),this.batch.currentRenderer.flush(),n&&n.baseTexture.update(),this.runners.postrender.emit(),this.projection.transform=null,this.emit("postrender")}},e.prototype.generateTexture=function(e,n,r,i){void 0===n&&(n={});var o=t.prototype.generateTexture.call(this,e,n,r,i);return this.framebuffer.blit(),o},e.prototype.resize=function(e,n){t.prototype.resize.call(this,e,n),this.runners.resize.emit(this.screen.height,this.screen.width)},e.prototype.reset=function(){return this.runners.reset.emit(),this},e.prototype.clear=function(){this.renderTexture.bind(),this.renderTexture.clear()},e.prototype.destroy=function(e){for(var n in this.runners.destroy.emit(),this.runners)this.runners[n].destroy();t.prototype.destroy.call(this,e),this.gl=null},Object.defineProperty(e.prototype,"extract",{get:function(){return ql("6.0.0","Renderer#extract has been deprecated, please use Renderer#plugins.extract instead."),this.plugins.extract},enumerable:!1,configurable:!0}),e.registerPlugin=function(t,n){e.__plugins=e.__plugins||{},e.__plugins[t]=n},e}(zh);var Xh="attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n    gl_Position = filterVertexPosition();\n    vTextureCoord = filterTextureCoord();\n}\n",Wh=(function(){function t(t){ql("6.1.0","System class is deprecated, implemement ISystem interface instead."),this.renderer=t}t.prototype.destroy=function(){this.renderer=null}}(),function(){this.texArray=null,this.blend=0,this.type=al.TRIANGLES,this.start=0,this.size=0,this.data=null}),Yh=function(){function t(){this.elements=[],this.ids=[],this.count=0}return t.prototype.clear=function(){for(var t=0;t<this.count;t++)this.elements[t]=null;this.count=0},t}(),qh=function(){function t(t){"number"==typeof t?this.rawBinaryData=new ArrayBuffer(t):t instanceof Uint8Array?this.rawBinaryData=t.buffer:this.rawBinaryData=t,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}return Object.defineProperty(t.prototype,"int8View",{get:function(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint8View",{get:function(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int16View",{get:function(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"uint16View",{get:function(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"int32View",{get:function(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View},enumerable:!1,configurable:!0}),t.prototype.view=function(t){return this[t+"View"]},t.prototype.destroy=function(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null},t.sizeOf=function(t){switch(t){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(t+" isn't a valid view type")}},t}(),$h=function(t){function e(e){var n=t.call(this,e)||this;return n.shaderGenerator=null,n.geometryClass=null,n.vertexSize=null,n.state=ph.for2d(),n.size=4*wl.SPRITE_BATCH_SIZE,n._vertexCount=0,n._indexCount=0,n._bufferedElements=[],n._bufferedTextures=[],n._bufferSize=0,n._shader=null,n._packedGeometries=[],n._packedGeometryPoolSize=2,n._flushId=0,n._aBuffers={},n._iBuffers={},n.MAX_TEXTURES=1,n.renderer.on("prerender",n.onPrerender,n),e.runners.contextChange.add(n),n._dcIndex=0,n._aIndex=0,n._iIndex=0,n._attributeBuffer=null,n._indexBuffer=null,n._tempBoundTextures=[],n}return Wu(e,t),e.prototype.contextChange=function(){var t=this.renderer.gl;wl.PREFER_ENV===rl.WEBGL_LEGACY?this.MAX_TEXTURES=1:(this.MAX_TEXTURES=Math.min(t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),wl.SPRITE_MAX_TEXTURES),this.MAX_TEXTURES=function(t,e){if(0===t)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");for(var n=e.createShader(e.FRAGMENT_SHADER);;){var r=ah.replace(/%forloop%/gi,lh(t));if(e.shaderSource(n,r),e.compileShader(n),e.getShaderParameter(n,e.COMPILE_STATUS))break;t=t/2|0}return t}(this.MAX_TEXTURES,t)),this._shader=this.shaderGenerator.generateShader(this.MAX_TEXTURES);for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()},e.prototype.initFlushBuffers=function(){for(var t=e._drawCallPool,n=e._textureArrayPool,r=this.size/4,i=Math.floor(r/this.MAX_TEXTURES)+1;t.length<r;)t.push(new Wh);for(;n.length<i;)n.push(new Yh);for(var o=0;o<this.MAX_TEXTURES;o++)this._tempBoundTextures[o]=null},e.prototype.onPrerender=function(){this._flushId=0},e.prototype.render=function(t){t._texture.valid&&(this._vertexCount+t.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=t.vertexData.length/2,this._indexCount+=t.indices.length,this._bufferedTextures[this._bufferSize]=t._texture.baseTexture,this._bufferedElements[this._bufferSize++]=t)},e.prototype.buildTexturesAndDrawCalls=function(){var t=this._bufferedTextures,n=this.MAX_TEXTURES,r=e._textureArrayPool,i=this.renderer.batch,o=this._tempBoundTextures,s=this.renderer.textureGC.count,a=++Zu._globalBatch,l=0,u=r[0],c=0;i.copyBoundTextures(o,n);for(var h=0;h<this._bufferSize;++h){var d=t[h];t[h]=null,d._batchEnabled!==a&&(u.count>=n&&(i.boundArray(u,o,a,n),this.buildDrawCalls(u,c,h),c=h,u=r[++l],++a),d._batchEnabled=a,d.touched=s,u.elements[u.count++]=d)}u.count>0&&(i.boundArray(u,o,a,n),this.buildDrawCalls(u,c,this._bufferSize),++l,++a);for(h=0;h<o.length;h++)o[h]=null;Zu._globalBatch=a},e.prototype.buildDrawCalls=function(t,n,r){var i=this._bufferedElements,o=this._attributeBuffer,s=this._indexBuffer,a=this.vertexSize,l=e._drawCallPool,u=this._dcIndex,c=this._aIndex,h=this._iIndex,d=l[u];d.start=this._iIndex,d.texArray=t;for(var p=n;p<r;++p){var f=i[p],m=f._texture.baseTexture,g=Nl[m.alphaMode?1:0][f.blendMode];i[p]=null,n<p&&d.blend!==g&&(d.size=h-d.start,n=p,(d=l[++u]).texArray=t,d.start=h),this.packInterleavedGeometry(f,o,s,c,h),c+=f.vertexData.length/2*a,h+=f.indices.length,d.blend=g}n<r&&(d.size=h-d.start,++u),this._dcIndex=u,this._aIndex=c,this._iIndex=h},e.prototype.bindAndClearTexArray=function(t){for(var e=this.renderer.texture,n=0;n<t.count;n++)e.bind(t.elements[n],t.ids[n]),t.elements[n]=null;t.count=0},e.prototype.updateGeometry=function(){var t=this._packedGeometries,e=this._attributeBuffer,n=this._indexBuffer;wl.CAN_UPLOAD_SAME_BUFFER?(t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(n),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,t[this._flushId]=new this.geometryClass),t[this._flushId]._buffer.update(e.rawBinaryData),t[this._flushId]._indexBuffer.update(n),this.renderer.geometry.bind(t[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)},e.prototype.drawBatches=function(){for(var t=this._dcIndex,n=this.renderer,r=n.gl,i=n.state,o=e._drawCallPool,s=null,a=0;a<t;a++){var l=o[a],u=l.texArray,c=l.type,h=l.size,d=l.start,p=l.blend;s!==u&&(s=u,this.bindAndClearTexArray(u)),this.state.blendMode=p,i.set(this.state),r.drawElements(c,h,r.UNSIGNED_SHORT,2*d)}},e.prototype.flush=function(){0!==this._vertexCount&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)},e.prototype.start=function(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.MAX_TEXTURES),this.renderer.shader.bind(this._shader),wl.CAN_UPLOAD_SAME_BUFFER&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])},e.prototype.stop=function(){this.flush()},e.prototype.destroy=function(){for(var e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]&&this._packedGeometries[e].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),t.prototype.destroy.call(this)},e.prototype.getAttributeBuffer=function(t){var e=Gl(Math.ceil(t/8)),n=Hl(e),r=8*e;this._aBuffers.length<=n&&(this._iBuffers.length=n+1);var i=this._aBuffers[r];return i||(this._aBuffers[r]=i=new qh(r*this.vertexSize*4)),i},e.prototype.getIndexBuffer=function(t){var e=Gl(Math.ceil(t/12)),n=Hl(e),r=12*e;this._iBuffers.length<=n&&(this._iBuffers.length=n+1);var i=this._iBuffers[n];return i||(this._iBuffers[n]=i=new Uint16Array(r)),i},e.prototype.packInterleavedGeometry=function(t,e,n,r,i){for(var o=e.uint32View,s=e.float32View,a=r/this.vertexSize,l=t.uvs,u=t.indices,c=t.vertexData,h=t._texture.baseTexture._batchLocation,d=Math.min(t.worldAlpha,1),p=d<1&&t._texture.baseTexture.alphaMode?kl(t._tintRGB,d):t._tintRGB+(255*d<<24),f=0;f<c.length;f+=2)s[r++]=c[f],s[r++]=c[f+1],s[r++]=l[f],s[r++]=l[f+1],o[r++]=p,s[r++]=h;for(f=0;f<u.length;f++)n[i++]=a+u[f]},e._drawCallPool=[],e._textureArrayPool=[],e}(Ic),Kh=function(){function t(t,e){if(this.vertexSrc=t,this.fragTemplate=e,this.programCache={},this.defaultGroupCache={},e.indexOf("%count%")<0)throw new Error('Fragment template must contain "%count%".');if(e.indexOf("%forloop%")<0)throw new Error('Fragment template must contain "%forloop%".')}return t.prototype.generateShader=function(t){if(!this.programCache[t]){for(var e=new Int32Array(t),n=0;n<t;n++)e[n]=n;this.defaultGroupCache[t]=Dc.from({uSamplers:e},!0);var r=this.fragTemplate;r=(r=r.replace(/%count%/gi,""+t)).replace(/%forloop%/gi,this.generateSampleSrc(t)),this.programCache[t]=new hh(this.vertexSrc,r)}var i={tint:new Float32Array([1,1,1,1]),translationMatrix:new du,default:this.defaultGroupCache[t]};return new dh(this.programCache[t],i)},t.prototype.generateSampleSrc=function(t){var e="";e+="\n",e+="\n";for(var n=0;n<t;n++)n>0&&(e+="\nelse "),n<t-1&&(e+="if(vTextureId < "+n+".5)"),e+="\n{",e+="\n\tcolor = texture2D(uSamplers["+n+"], vTextureCoord);",e+="\n}";return e+="\n",e+="\n"},t}(),Zh=function(t){function e(e){void 0===e&&(e=!1);var n=t.call(this)||this;return n._buffer=new _c(null,e,!1),n._indexBuffer=new _c(null,e,!0),n.addAttribute("aVertexPosition",n._buffer,2,!1,cl.FLOAT).addAttribute("aTextureCoord",n._buffer,2,!1,cl.FLOAT).addAttribute("aColor",n._buffer,4,!0,cl.UNSIGNED_BYTE).addAttribute("aTextureId",n._buffer,1,!0,cl.FLOAT).addIndex(n._indexBuffer),n}return Wu(e,t),e}(Tc),Jh="precision highp float;\nattribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\nattribute float aTextureId;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform vec4 tint;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\n\nvoid main(void){\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vTextureId = aTextureId;\n    vColor = aColor * tint;\n}\n",Qh="varying vec2 vTextureCoord;\nvarying vec4 vColor;\nvarying float vTextureId;\nuniform sampler2D uSamplers[%count%];\n\nvoid main(void){\n    vec4 color;\n    %forloop%\n    gl_FragColor = color * vColor;\n}\n",td=function(){function t(){}return t.create=function(t){var e=Object.assign({vertex:Jh,fragment:Qh,geometryClass:Zh,vertexSize:6},t),n=e.vertex,r=e.fragment,i=e.vertexSize,o=e.geometryClass;return function(t){function e(e){var s=t.call(this,e)||this;return s.shaderGenerator=new Kh(n,r),s.geometryClass=o,s.vertexSize=i,s}return Wu(e,t),e}($h)},Object.defineProperty(t,"defaultVertexSrc",{get:function(){return Jh},enumerable:!1,configurable:!0}),Object.defineProperty(t,"defaultFragmentTemplate",{get:function(){return Qh},enumerable:!1,configurable:!0}),t}().create(),ed={},nd=function(t){Object.defineProperty(ed,t,{get:function(){return ql("6.0.0","PIXI.systems."+t+" has moved to PIXI."+t),ac[t]}})};for(var rd in ac)nd(rd);var id={},od=function(t){Object.defineProperty(id,t,{get:function(){return ql("6.0.0","PIXI.resources."+t+" has moved to PIXI."+t),Bh[t]}})};for(var rd in Bh)od(rd);var sd=function(){function t(e){var n=this;this.stage=new Du,e=Object.assign({forceCanvas:!1},e),this.renderer=function(t){return Vh.create(t)}(e),t._plugins.forEach((function(t){t.init.call(n,e)}))}return t.registerPlugin=function(e){t._plugins.push(e)},t.prototype.render=function(){this.renderer.render(this.stage)},Object.defineProperty(t.prototype,"view",{get:function(){return this.renderer.view},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"screen",{get:function(){return this.renderer.screen},enumerable:!1,configurable:!0}),t.prototype.destroy=function(e,n){var r=this,i=t._plugins.slice(0);i.reverse(),i.forEach((function(t){t.destroy.call(r)})),this.stage.destroy(n),this.stage=null,this.renderer.destroy(e),this.renderer=null},t._plugins=[],t}(),ad=function(){function t(){}return t.init=function(t){var e=this;Object.defineProperty(this,"resizeTo",{set:function(t){self.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(self.addEventListener("resize",this.queueResize),this.resize())},get:function(){return this._resizeTo}}),this.queueResize=function(){e._resizeTo&&(e.cancelResize(),e._resizeId=requestAnimationFrame((function(){return e.resize()})))},this.cancelResize=function(){e._resizeId&&(cancelAnimationFrame(e._resizeId),e._resizeId=null)},this.resize=function(){if(e._resizeTo){var t,n;if(e.cancelResize(),e._resizeTo===self)t=self.innerWidth,n=self.innerHeight;else{var r=e._resizeTo;t=r.clientWidth,n=r.clientHeight}e.renderer.resize(t,n)}},this._resizeId=null,this._resizeTo=null,this.resizeTo=t.resizeTo||null},t.destroy=function(){self.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null},t}();sd.registerPlugin(ad);var ld=new ou,ud=function(){function t(t){this.renderer=t}return t.prototype.image=function(t,e,n){var r=new Image;return r.src=this.base64(t,e,n),r},t.prototype.base64=function(t,e,n){return this.canvas(t).toDataURL(e,n)},t.prototype.canvas=function(e){var n,r,i,o=this.renderer,s=!1,a=!1;e&&(e instanceof mc?i=e:(i=this.renderer.generateTexture(e),a=!0)),i?(n=i.baseTexture.resolution,r=i.frame,s=!1,o.renderTexture.bind(i)):(n=this.renderer.resolution,s=!0,(r=ld).width=this.renderer.width,r.height=this.renderer.height,o.renderTexture.bind(null));var l=Math.floor(r.width*n+1e-4),u=Math.floor(r.height*n+1e-4),c=new Jl(l,u,1),h=new Uint8Array(4*l*u),d=o.gl;d.readPixels(r.x*n,r.y*n,l,u,d.RGBA,d.UNSIGNED_BYTE,h);var p=c.context.getImageData(0,0,l,u);if(t.arrayPostDivide(h,p.data),c.context.putImageData(p,0,0),s){var f=new Jl(c.width,c.height,1);f.context.scale(1,-1),f.context.drawImage(c.canvas,0,-u),c.destroy(),c=f}return a&&i.destroy(!0),c.canvas},t.prototype.pixels=function(e){var n,r,i,o=this.renderer,s=!1;e&&(e instanceof mc?i=e:(i=this.renderer.generateTexture(e),s=!0)),i?(n=i.baseTexture.resolution,r=i.frame,o.renderTexture.bind(i)):(n=o.resolution,(r=ld).width=o.width,r.height=o.height,o.renderTexture.bind(null));var a=r.width*n,l=r.height*n,u=new Uint8Array(4*a*l),c=o.gl;return c.readPixels(r.x*n,r.y*n,a,l,c.RGBA,c.UNSIGNED_BYTE,u),s&&i.destroy(!0),t.arrayPostDivide(u,u),u},t.prototype.destroy=function(){this.renderer=null},t.arrayPostDivide=function(t,e){for(var n=0;n<t.length;n+=4){var r=e[n+3]=t[n+3];0!==r?(e[n]=Math.round(Math.min(255*t[n]/r,255)),e[n+1]=Math.round(Math.min(255*t[n+1]/r,255)),e[n+2]=Math.round(Math.min(255*t[n+2]/r,255))):(e[n]=t[n],e[n+1]=t[n+1],e[n+2]=t[n+2])}},t}(),cd=function(){function t(t,e,n){void 0===e&&(e=!1),this._fn=t,this._once=e,this._thisArg=n,this._next=this._prev=this._owner=null}return t.prototype.detach=function(){return null!==this._owner&&(this._owner.detach(this),!0)},t}();function hd(t,e){return t._head?(t._tail._next=e,e._prev=t._tail,t._tail=e):(t._head=e,t._tail=e),e._owner=t,e}var dd=function(){function t(){this._head=this._tail=void 0}return t.prototype.handlers=function(t){void 0===t&&(t=!1);var e=this._head;if(t)return!!e;for(var n=[];e;)n.push(e),e=e._next;return n},t.prototype.has=function(t){if(!(t instanceof cd))throw new Error("MiniSignal#has(): First arg must be a SignalBinding object.");return t._owner===this},t.prototype.dispatch=function(){for(var t=arguments,e=[],n=0;n<arguments.length;n++)e[n]=t[n];var r=this._head;if(!r)return!1;for(;r;)r._once&&this.detach(r),r._fn.apply(r._thisArg,e),r=r._next;return!0},t.prototype.add=function(t,e){if(void 0===e&&(e=null),"function"!=typeof t)throw new Error("MiniSignal#add(): First arg must be a Function.");return hd(this,new cd(t,!1,e))},t.prototype.once=function(t,e){if(void 0===e&&(e=null),"function"!=typeof t)throw new Error("MiniSignal#once(): First arg must be a Function.");return hd(this,new cd(t,!0,e))},t.prototype.detach=function(t){if(!(t instanceof cd))throw new Error("MiniSignal#detach(): First arg must be a SignalBinding object.");return t._owner!==this||(t._prev&&(t._prev._next=t._next),t._next&&(t._next._prev=t._prev),t===this._head?(this._head=t._next,null===t._next&&(this._tail=null)):t===this._tail&&(this._tail=t._prev,this._tail._next=null),t._owner=null),this},t.prototype.detachAll=function(){var t=this._head;if(!t)return this;for(this._head=this._tail=null;t;)t._owner=null,t=t._next;return this},t}();function pd(t,e){e=e||{};for(var n={key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},r=n.parser[e.strictMode?"strict":"loose"].exec(t),i={},o=14;o--;)i[n.key[o]]=r[o]||"";return i[n.q.name]={},i[n.key[12]].replace(n.q.parser,(function(t,e,r){e&&(i[n.q.name][e]=r)})),i}var fd=!(!self.XDomainRequest||"withCredentials"in new XMLHttpRequest),md=null;function gd(){}function vd(t,e,n){e&&0===e.indexOf(".")&&(e=e.substring(1)),e&&(t[e]=n)}function yd(t){return t.toString().replace("object ","")}var _d=function(){function t(e,n,r){if(this._dequeue=gd,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=null,this._boundOnError=null,this._boundOnProgress=null,this._boundOnTimeout=null,this._boundXhrOnError=null,this._boundXhrOnTimeout=null,this._boundXhrOnAbort=null,this._boundXhrOnLoad=null,"string"!=typeof e||"string"!=typeof n)throw new Error("Both name and url are required for constructing a resource.");r=r||{},this._flags=0,this._setFlag(t.STATUS_FLAGS.DATA_URL,0===n.indexOf("data:")),this.name=e,this.url=n,this.extension=this._getExtension(),this.data=null,this.crossOrigin=!0===r.crossOrigin?"anonymous":r.crossOrigin,this.timeout=r.timeout||0,this.loadType=r.loadType||this._determineLoadType(),this.xhrType=r.xhrType,this.metadata=r.metadata||{},this.error=null,this.xhr=null,this.children=[],this.type=t.TYPE.UNKNOWN,this.progressChunk=0,this._dequeue=gd,this._onLoadBinding=null,this._elementTimer=0,this._boundComplete=this.complete.bind(this),this._boundOnError=this._onError.bind(this),this._boundOnProgress=this._onProgress.bind(this),this._boundOnTimeout=this._onTimeout.bind(this),this._boundXhrOnError=this._xhrOnError.bind(this),this._boundXhrOnTimeout=this._xhrOnTimeout.bind(this),this._boundXhrOnAbort=this._xhrOnAbort.bind(this),this._boundXhrOnLoad=this._xhrOnLoad.bind(this),this.onStart=new dd,this.onProgress=new dd,this.onComplete=new dd,this.onAfterMiddleware=new dd}return t.setExtensionLoadType=function(e,n){vd(t._loadTypeMap,e,n)},t.setExtensionXhrType=function(e,n){vd(t._xhrTypeMap,e,n)},Object.defineProperty(t.prototype,"isDataUrl",{get:function(){return this._hasFlag(t.STATUS_FLAGS.DATA_URL)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isComplete",{get:function(){return this._hasFlag(t.STATUS_FLAGS.COMPLETE)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isLoading",{get:function(){return this._hasFlag(t.STATUS_FLAGS.LOADING)},enumerable:!1,configurable:!0}),t.prototype.complete=function(){this._clearEvents(),this._finish()},t.prototype.abort=function(e){if(!this.error){if(this.error=new Error(e),this._clearEvents(),this.xhr)this.xhr.abort();else if(this.xdr)this.xdr.abort();else if(this.data)if(this.data.src)this.data.src=t.EMPTY_GIF;else for(;this.data.firstChild;)this.data.removeChild(this.data.firstChild);this._finish()}},t.prototype.load=function(e){var n=this;if(!this.isLoading)if(this.isComplete)e&&setTimeout((function(){return e(n)}),1);else switch(e&&this.onComplete.once(e),this._setFlag(t.STATUS_FLAGS.LOADING,!0),this.onStart.dispatch(this),!1!==this.crossOrigin&&"string"==typeof this.crossOrigin||(this.crossOrigin=this._determineCrossOrigin(this.url)),this.loadType){case t.LOAD_TYPE.IMAGE:this.type=t.TYPE.IMAGE,this._loadElement("image");break;case t.LOAD_TYPE.AUDIO:this.type=t.TYPE.AUDIO,this._loadSourceElement("audio");break;case t.LOAD_TYPE.VIDEO:this.type=t.TYPE.VIDEO,this._loadSourceElement("video");break;case t.LOAD_TYPE.XHR:default:fd&&this.crossOrigin?this._loadXdr():this._loadXhr()}},t.prototype._hasFlag=function(t){return 0!=(this._flags&t)},t.prototype._setFlag=function(t,e){this._flags=e?this._flags|t:this._flags&~t},t.prototype._clearEvents=function(){clearTimeout(this._elementTimer),this.data&&this.data.removeEventListener&&(this.data.removeEventListener("error",this._boundOnError,!1),this.data.removeEventListener("load",this._boundComplete,!1),this.data.removeEventListener("progress",this._boundOnProgress,!1),this.data.removeEventListener("canplaythrough",this._boundComplete,!1)),this.xhr&&(this.xhr.removeEventListener?(this.xhr.removeEventListener("error",this._boundXhrOnError,!1),this.xhr.removeEventListener("timeout",this._boundXhrOnTimeout,!1),this.xhr.removeEventListener("abort",this._boundXhrOnAbort,!1),this.xhr.removeEventListener("progress",this._boundOnProgress,!1),this.xhr.removeEventListener("load",this._boundXhrOnLoad,!1)):(this.xhr.onerror=null,this.xhr.ontimeout=null,this.xhr.onprogress=null,this.xhr.onload=null))},t.prototype._finish=function(){if(this.isComplete)throw new Error("Complete called again for an already completed resource.");this._setFlag(t.STATUS_FLAGS.COMPLETE,!0),this._setFlag(t.STATUS_FLAGS.LOADING,!1),this.onComplete.dispatch(this)},t.prototype._loadElement=function(t){this.metadata.loadElement?this.data=this.metadata.loadElement:"image"===t&&void 0!==self.Image?this.data=new Image:this.data=document.createElement(t),this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),this.metadata.skipSource||(this.data.src=this.url),this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))},t.prototype._loadSourceElement=function(t){if(this.metadata.loadElement?this.data=this.metadata.loadElement:"audio"===t&&void 0!==self.Audio?this.data=new Audio:this.data=document.createElement(t),null!==this.data){if(this.crossOrigin&&(this.data.crossOrigin=this.crossOrigin),!this.metadata.skipSource)if(navigator.isCocoonJS)this.data.src=Array.isArray(this.url)?this.url[0]:this.url;else if(Array.isArray(this.url))for(var e=this.metadata.mimeType,n=0;n<this.url.length;++n)this.data.appendChild(this._createSource(t,this.url[n],Array.isArray(e)?e[n]:e));else{e=this.metadata.mimeType;this.data.appendChild(this._createSource(t,this.url,Array.isArray(e)?e[0]:e))}this.data.addEventListener("error",this._boundOnError,!1),this.data.addEventListener("load",this._boundComplete,!1),this.data.addEventListener("progress",this._boundOnProgress,!1),this.data.addEventListener("canplaythrough",this._boundComplete,!1),this.data.load(),this.timeout&&(this._elementTimer=setTimeout(this._boundOnTimeout,this.timeout))}else this.abort("Unsupported element: "+t)},t.prototype._loadXhr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var e=this.xhr=new XMLHttpRequest;e.open("GET",this.url,!0),e.timeout=this.timeout,this.xhrType===t.XHR_RESPONSE_TYPE.JSON||this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT?e.responseType=t.XHR_RESPONSE_TYPE.TEXT:e.responseType=this.xhrType,e.addEventListener("error",this._boundXhrOnError,!1),e.addEventListener("timeout",this._boundXhrOnTimeout,!1),e.addEventListener("abort",this._boundXhrOnAbort,!1),e.addEventListener("progress",this._boundOnProgress,!1),e.addEventListener("load",this._boundXhrOnLoad,!1),e.send()},t.prototype._loadXdr=function(){"string"!=typeof this.xhrType&&(this.xhrType=this._determineXhrType());var t=this.xhr=new self.XDomainRequest;t.timeout=this.timeout||5e3,t.onerror=this._boundXhrOnError,t.ontimeout=this._boundXhrOnTimeout,t.onprogress=this._boundOnProgress,t.onload=this._boundXhrOnLoad,t.open("GET",this.url,!0),setTimeout((function(){return t.send()}),1)},t.prototype._createSource=function(t,e,n){n||(n=t+"/"+this._getExtension(e));var r=document.createElement("source");return r.src=e,r.type=n,r},t.prototype._onError=function(t){this.abort("Failed to load element using: "+t.target.nodeName)},t.prototype._onProgress=function(t){t&&t.lengthComputable&&this.onProgress.dispatch(this,t.loaded/t.total)},t.prototype._onTimeout=function(){this.abort("Load timed out.")},t.prototype._xhrOnError=function(){var t=this.xhr;this.abort(yd(t)+" Request failed. Status: "+t.status+', text: "'+t.statusText+'"')},t.prototype._xhrOnTimeout=function(){var t=this.xhr;this.abort(yd(t)+" Request timed out.")},t.prototype._xhrOnAbort=function(){var t=this.xhr;this.abort(yd(t)+" Request was aborted by the user.")},t.prototype._xhrOnLoad=function(){var e=this.xhr,n="",r=void 0===e.status?200:e.status;if(""!==e.responseType&&"text"!==e.responseType&&void 0!==e.responseType||(n=e.responseText),0===r&&(n.length>0||e.responseType===t.XHR_RESPONSE_TYPE.BUFFER)?r=200:1223===r&&(r=204),2===(r/100|0)){if(this.xhrType===t.XHR_RESPONSE_TYPE.TEXT)this.data=n,this.type=t.TYPE.TEXT;else if(this.xhrType===t.XHR_RESPONSE_TYPE.JSON)try{this.data=JSON.parse(n),this.type=t.TYPE.JSON}catch(t){return void this.abort("Error trying to parse loaded json: "+t)}else if(this.xhrType===t.XHR_RESPONSE_TYPE.DOCUMENT)try{if(self.DOMParser){var i=new DOMParser;this.data=i.parseFromString(n,"text/xml")}else{var o=document.createElement("div");o.innerHTML=n,this.data=o}this.type=t.TYPE.XML}catch(t){return void this.abort("Error trying to parse loaded xml: "+t)}else this.data=e.response||n;this.complete()}else this.abort("["+e.status+"] "+e.statusText+": "+e.responseURL)},t.prototype._determineCrossOrigin=function(t,e){if(0===t.indexOf("data:"))return"";if(self.origin!==self.location.origin)return"anonymous";e=e||self.location,md||(md=document.createElement("a")),md.href=t;var n=pd(md.href,{strictMode:!0}),r=!n.port&&""===e.port||n.port===e.port,i=n.protocol?n.protocol+":":"";return n.host===e.hostname&&r&&i===e.protocol?"":"anonymous"},t.prototype._determineXhrType=function(){return t._xhrTypeMap[this.extension]||t.XHR_RESPONSE_TYPE.TEXT},t.prototype._determineLoadType=function(){return t._loadTypeMap[this.extension]||t.LOAD_TYPE.XHR},t.prototype._getExtension=function(t){void 0===t&&(t=this.url);var e="";if(this.isDataUrl){var n=t.indexOf("/");e=t.substring(n+1,t.indexOf(";",n))}else{var r=t.indexOf("?"),i=t.indexOf("#"),o=Math.min(r>-1?r:t.length,i>-1?i:t.length);e=(t=t.substring(0,o)).substring(t.lastIndexOf(".")+1)}return e.toLowerCase()},t.prototype._getMimeFromXhrType=function(e){switch(e){case t.XHR_RESPONSE_TYPE.BUFFER:return"application/octet-binary";case t.XHR_RESPONSE_TYPE.BLOB:return"application/blob";case t.XHR_RESPONSE_TYPE.DOCUMENT:return"application/xml";case t.XHR_RESPONSE_TYPE.JSON:return"application/json";case t.XHR_RESPONSE_TYPE.DEFAULT:case t.XHR_RESPONSE_TYPE.TEXT:default:return"text/plain"}},t}();function bd(){}function xd(t){return function(){for(var e=arguments,n=[],r=0;r<arguments.length;r++)n[r]=e[r];if(null===t)throw new Error("Callback was already called.");var i=t;t=null,i.apply(this,n)}}!function(t){!function(t){t[t.NONE=0]="NONE",t[t.DATA_URL=1]="DATA_URL",t[t.COMPLETE=2]="COMPLETE",t[t.LOADING=4]="LOADING"}(t.STATUS_FLAGS||(t.STATUS_FLAGS={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.JSON=1]="JSON",t[t.XML=2]="XML",t[t.IMAGE=3]="IMAGE",t[t.AUDIO=4]="AUDIO",t[t.VIDEO=5]="VIDEO",t[t.TEXT=6]="TEXT"}(t.TYPE||(t.TYPE={})),function(t){t[t.XHR=1]="XHR",t[t.IMAGE=2]="IMAGE",t[t.AUDIO=3]="AUDIO",t[t.VIDEO=4]="VIDEO"}(t.LOAD_TYPE||(t.LOAD_TYPE={})),function(t){t.DEFAULT="text",t.BUFFER="arraybuffer",t.BLOB="blob",t.DOCUMENT="document",t.JSON="json",t.TEXT="text"}(t.XHR_RESPONSE_TYPE||(t.XHR_RESPONSE_TYPE={})),t._loadTypeMap={gif:t.LOAD_TYPE.IMAGE,png:t.LOAD_TYPE.IMAGE,bmp:t.LOAD_TYPE.IMAGE,jpg:t.LOAD_TYPE.IMAGE,jpeg:t.LOAD_TYPE.IMAGE,tif:t.LOAD_TYPE.IMAGE,tiff:t.LOAD_TYPE.IMAGE,webp:t.LOAD_TYPE.IMAGE,tga:t.LOAD_TYPE.IMAGE,svg:t.LOAD_TYPE.IMAGE,"svg+xml":t.LOAD_TYPE.IMAGE,mp3:t.LOAD_TYPE.AUDIO,ogg:t.LOAD_TYPE.AUDIO,wav:t.LOAD_TYPE.AUDIO,mp4:t.LOAD_TYPE.VIDEO,webm:t.LOAD_TYPE.VIDEO},t._xhrTypeMap={xhtml:t.XHR_RESPONSE_TYPE.DOCUMENT,html:t.XHR_RESPONSE_TYPE.DOCUMENT,htm:t.XHR_RESPONSE_TYPE.DOCUMENT,xml:t.XHR_RESPONSE_TYPE.DOCUMENT,tmx:t.XHR_RESPONSE_TYPE.DOCUMENT,svg:t.XHR_RESPONSE_TYPE.DOCUMENT,tsx:t.XHR_RESPONSE_TYPE.DOCUMENT,gif:t.XHR_RESPONSE_TYPE.BLOB,png:t.XHR_RESPONSE_TYPE.BLOB,bmp:t.XHR_RESPONSE_TYPE.BLOB,jpg:t.XHR_RESPONSE_TYPE.BLOB,jpeg:t.XHR_RESPONSE_TYPE.BLOB,tif:t.XHR_RESPONSE_TYPE.BLOB,tiff:t.XHR_RESPONSE_TYPE.BLOB,webp:t.XHR_RESPONSE_TYPE.BLOB,tga:t.XHR_RESPONSE_TYPE.BLOB,json:t.XHR_RESPONSE_TYPE.JSON,text:t.XHR_RESPONSE_TYPE.TEXT,txt:t.XHR_RESPONSE_TYPE.TEXT,ttf:t.XHR_RESPONSE_TYPE.BUFFER,otf:t.XHR_RESPONSE_TYPE.BUFFER},t.EMPTY_GIF="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw=="}(_d||(_d={}));var wd=function(t,e){this.data=t,this.callback=e},Ed=function(){function t(t,e){var n=this;if(void 0===e&&(e=1),this.workers=0,this.saturated=bd,this.unsaturated=bd,this.empty=bd,this.drain=bd,this.error=bd,this.started=!1,this.paused=!1,this._tasks=[],this._insert=function(t,e,r){if(r&&"function"!=typeof r)throw new Error("task callback must be a function");if(n.started=!0,null==t&&n.idle())setTimeout((function(){return n.drain()}),1);else{var i=new wd(t,"function"==typeof r?r:bd);e?n._tasks.unshift(i):n._tasks.push(i),setTimeout(n.process,1)}},this.process=function(){for(;!n.paused&&n.workers<n.concurrency&&n._tasks.length;){var t=n._tasks.shift();0===n._tasks.length&&n.empty(),n.workers+=1,n.workers===n.concurrency&&n.saturated(),n._worker(t.data,xd(n._next(t)))}},this._worker=t,0===e)throw new Error("Concurrency must not be zero");this.concurrency=e,this.buffer=e/4}return t.prototype._next=function(t){var e=this;return function(){for(var n=arguments,r=[],i=0;i<arguments.length;i++)r[i]=n[i];e.workers-=1,t.callback.apply(t,r),null!=r[0]&&e.error(r[0],t.data),e.workers<=e.concurrency-e.buffer&&e.unsaturated(),e.idle()&&e.drain(),e.process()}},t.prototype.push=function(t,e){this._insert(t,!1,e)},t.prototype.kill=function(){this.workers=0,this.drain=bd,this.started=!1,this._tasks=[]},t.prototype.unshift=function(t,e){this._insert(t,!0,e)},t.prototype.length=function(){return this._tasks.length},t.prototype.running=function(){return this.workers},t.prototype.idle=function(){return this._tasks.length+this.workers===0},t.prototype.pause=function(){!0!==this.paused&&(this.paused=!0)},t.prototype.resume=function(){if(!1!==this.paused){this.paused=!1;for(var t=1;t<=this.concurrency;t++)this.process()}},t.eachSeries=function(t,e,n,r){var i=0,o=t.length;!function s(a){a||i===o?n&&n(a):r?setTimeout((function(){e(t[i++],s)}),1):e(t[i++],s)}()},t.queue=function(e,n){return new t(e,n)},t}(),Td=/(#[\w-]+)?$/,Sd=function(){function t(e,n){var r=this;void 0===e&&(e=""),void 0===n&&(n=10),this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return r._loadResource(t,e)},this.resources={},this.baseUrl=e,this.progress=0,this.loading=!1,this.defaultQueryString="",this._beforeMiddleware=[],this._afterMiddleware=[],this._resourcesParsing=[],this._boundLoadResource=function(t,e){return r._loadResource(t,e)},this._queue=Ed.queue(this._boundLoadResource,n),this._queue.pause(),this.resources={},this.onProgress=new dd,this.onError=new dd,this.onLoad=new dd,this.onStart=new dd,this.onComplete=new dd;for(var i=0;i<t._plugins.length;++i){var o=t._plugins[i],s=o.pre,a=o.use;s&&this.pre(s),a&&this.use(a)}this._protected=!1}return t.prototype._add=function(t,e,n,r){if(this.loading&&(!n||!n.parentResource))throw new Error("Cannot add resources while the loader is running.");if(this.resources[t])throw new Error('Resource named "'+t+'" already exists.');if(e=this._prepareUrl(e),this.resources[t]=new _d(t,e,n),"function"==typeof r&&this.resources[t].onAfterMiddleware.once(r),this.loading){for(var i=n.parentResource,o=[],s=0;s<i.children.length;++s)i.children[s].isComplete||o.push(i.children[s]);var a=i.progressChunk*(o.length+1)/(o.length+2);i.children.push(this.resources[t]),i.progressChunk=a;for(s=0;s<o.length;++s)o[s].progressChunk=a;this.resources[t].progressChunk=a}return this._queue.push(this.resources[t]),this},t.prototype.pre=function(t){return this._beforeMiddleware.push(t),this},t.prototype.use=function(t){return this._afterMiddleware.push(t),this},t.prototype.reset=function(){for(var t in this.progress=0,this.loading=!1,this._queue.kill(),this._queue.pause(),this.resources){var e=this.resources[t];e._onLoadBinding&&e._onLoadBinding.detach(),e.isLoading&&e.abort("loader reset")}return this.resources={},this},t.prototype.load=function(t){if("function"==typeof t&&this.onComplete.once(t),this.loading)return this;if(this._queue.idle())this._onStart(),this._onComplete();else{for(var e=100/this._queue._tasks.length,n=0;n<this._queue._tasks.length;++n)this._queue._tasks[n].data.progressChunk=e;this._onStart(),this._queue.resume()}return this},Object.defineProperty(t.prototype,"concurrency",{get:function(){return this._queue.concurrency},set:function(t){this._queue.concurrency=t},enumerable:!1,configurable:!0}),t.prototype._prepareUrl=function(t){var e,n=pd(t,{strictMode:!0});if(e=n.protocol||!n.path||0===t.indexOf("//")?t:this.baseUrl.length&&this.baseUrl.lastIndexOf("/")!==this.baseUrl.length-1&&"/"!==t.charAt(0)?this.baseUrl+"/"+t:this.baseUrl+t,this.defaultQueryString){var r=Td.exec(e)[0];-1!==(e=e.substr(0,e.length-r.length)).indexOf("?")?e+="&"+this.defaultQueryString:e+="?"+this.defaultQueryString,e+=r}return e},t.prototype._loadResource=function(t,e){var n=this;t._dequeue=e,Ed.eachSeries(this._beforeMiddleware,(function(e,r){e.call(n,t,(function(){r(t.isComplete?{}:null)}))}),(function(){t.isComplete?n._onLoad(t):(t._onLoadBinding=t.onComplete.once(n._onLoad,n),t.load())}),!0)},t.prototype._onStart=function(){this.progress=0,this.loading=!0,this.onStart.dispatch(this)},t.prototype._onComplete=function(){this.progress=100,this.loading=!1,this.onComplete.dispatch(this,this.resources)},t.prototype._onLoad=function(t){var e=this;t._onLoadBinding=null,this._resourcesParsing.push(t),t._dequeue(),Ed.eachSeries(this._afterMiddleware,(function(n,r){n.call(e,t,r)}),(function(){t.onAfterMiddleware.dispatch(t),e.progress=Math.min(100,e.progress+t.progressChunk),e.onProgress.dispatch(e,t),t.error?e.onError.dispatch(t.error,e,t):e.onLoad.dispatch(e,t),e._resourcesParsing.splice(e._resourcesParsing.indexOf(t),1),e._queue.idle()&&0===e._resourcesParsing.length&&e._onComplete()}),!0)},t.prototype.destroy=function(){this._protected||this.reset()},Object.defineProperty(t,"shared",{get:function(){var e=t._shared;return e||((e=new t)._protected=!0,t._shared=e),e},enumerable:!1,configurable:!0}),t.registerPlugin=function(e){return t._plugins.push(e),e.add&&e.add(),t},t._plugins=[],t}();Sd.prototype.add=function(t,e,n,r){if(Array.isArray(t)){for(var i=0;i<t.length;++i)this.add(t[i]);return this}if("object"==typeof t&&(n=t,r=e||n.callback||n.onComplete,e=n.url,t=n.name||n.key||n.url),"string"!=typeof e&&(r=n,n=e,e=t),"string"!=typeof e)throw new Error("No url passed to add resource to loader.");return"function"==typeof n&&(r=n,n=null),this._add(t,e,n,r)};var Ad=function(){function t(){}return t.init=function(t){t=Object.assign({sharedLoader:!1},t),this.loader=t.sharedLoader?Sd.shared:new Sd},t.destroy=function(){this.loader&&(this.loader.destroy(),this.loader=null)},t}(),Md=function(){function t(){}return t.add=function(){_d.setExtensionLoadType("svg",_d.LOAD_TYPE.XHR),_d.setExtensionXhrType("svg",_d.XHR_RESPONSE_TYPE.TEXT)},t.use=function(t,e){if(!t.data||t.type!==_d.TYPE.IMAGE&&"svg"!==t.extension)e();else{var n=t.data,r=t.url,i=t.name,o=t.metadata;pc.fromLoader(n,r,i,o).then((function(n){t.texture=n,e()})).catch(e)}},t}();var Dd,Cd,Rd=self.URL||self.webkitURL;Sd.registerPlugin({use:function(t,e){if(t.data){if(t.xhr&&t.xhrType===_d.XHR_RESPONSE_TYPE.BLOB)if(self.Blob&&"string"!=typeof t.data){if(0===t.data.type.indexOf("image")){var n=Rd.createObjectURL(t.data);return t.blob=t.data,t.data=new Image,t.data.src=n,t.type=_d.TYPE.IMAGE,void(t.data.onload=function(){Rd.revokeObjectURL(n),t.data.onload=null,e()})}}else{var r=t.xhr.getResponseHeader("content-type");if(r&&0===r.indexOf("image"))return t.data=new Image,t.data.src="data:"+r+";base64,"+function(t){for(var e="",n=0;n<t.length;){for(var r=[0,0,0],i=[0,0,0,0],o=0;o<r.length;++o)n<t.length?r[o]=255&t.charCodeAt(n++):r[o]=0;switch(i[0]=r[0]>>2,i[1]=(3&r[0])<<4|r[1]>>4,i[2]=(15&r[1])<<2|r[2]>>6,i[3]=63&r[2],n-(t.length-1)){case 2:i[3]=64,i[2]=64;break;case 1:i[3]=64}for(o=0;o<i.length;++o)e+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(i[o])}return e}(t.xhr.responseText),t.type=_d.TYPE.IMAGE,void(t.data.onload=function(){t.data.onload=null,e()})}e()}else e()}}),Sd.registerPlugin(Md),function(t){t[t.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",t[t.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",t[t.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",t[t.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",t[t.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",t[t.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",t[t.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",t[t.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",t[t.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",t[t.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",t[t.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",t[t.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",t[t.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",t[t.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",t[t.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",t[t.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",t[t.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",t[t.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",t[t.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL"}(Cd||(Cd={}));var Od=((Dd={})[Cd.COMPRESSED_RGB_S3TC_DXT1_EXT]=.5,Dd[Cd.COMPRESSED_RGBA_S3TC_DXT1_EXT]=.5,Dd[Cd.COMPRESSED_RGBA_S3TC_DXT3_EXT]=1,Dd[Cd.COMPRESSED_RGBA_S3TC_DXT5_EXT]=1,Dd[Cd.COMPRESSED_SRGB_S3TC_DXT1_EXT]=.5,Dd[Cd.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT]=.5,Dd[Cd.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT]=1,Dd[Cd.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT]=1,Dd[Cd.COMPRESSED_R11_EAC]=.5,Dd[Cd.COMPRESSED_SIGNED_R11_EAC]=.5,Dd[Cd.COMPRESSED_RG11_EAC]=1,Dd[Cd.COMPRESSED_SIGNED_RG11_EAC]=1,Dd[Cd.COMPRESSED_RGB8_ETC2]=.5,Dd[Cd.COMPRESSED_RGBA8_ETC2_EAC]=1,Dd[Cd.COMPRESSED_SRGB8_ETC2]=.5,Dd[Cd.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC]=1,Dd[Cd.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2]=.5,Dd[Cd.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2]=.5,Dd[Cd.COMPRESSED_RGB_PVRTC_4BPPV1_IMG]=.5,Dd[Cd.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG]=.5,Dd[Cd.COMPRESSED_RGB_PVRTC_2BPPV1_IMG]=.25,Dd[Cd.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG]=.25,Dd[Cd.COMPRESSED_RGB_ETC1_WEBGL]=.5,Dd[Cd.COMPRESSED_RGB_ATC_WEBGL]=.5,Dd[Cd.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL]=1,Dd[Cd.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL]=1,Dd),Pd=function(t,e){return(Pd=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])})(t,e)};function Id(t,e){function n(){this.constructor=t}Pd(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function Ld(t,e){var n,r,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,r=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!(i=s.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=e.call(t,s)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}}var Nd,Fd,kd=function(t){function e(n,r){var i=t.call(this,n,r)||this;return i.format=r.format,i.levels=r.levels||1,i._width=r.width,i._height=r.height,i._extension=e._formatToExtension(i.format),(r.levelBuffers||i.buffer)&&(i._levelBuffers=r.levelBuffers||e._createLevelBuffers(n instanceof Uint8Array?n:i.buffer.uint8View,i.format,i.levels,4,4,i.width,i.height)),i}return Id(e,t),e.prototype.upload=function(t,e,n){var r=t.gl;if(!t.context.extensions[this._extension])throw new Error(this._extension+" textures are not supported on the current machine");if(!this._levelBuffers)return!1;for(var i=0,o=this.levels;i<o;i++){var s=this._levelBuffers[i],a=s.levelID,l=s.levelWidth,u=s.levelHeight,c=s.levelBuffer;r.compressedTexImage2D(r.TEXTURE_2D,a,this.format,l,u,0,c)}return!0},e.prototype.onBlobLoaded=function(){this._levelBuffers=e._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)},e._formatToExtension=function(t){if(t>=33776&&t<=33779)return"s3tc";if(t>=37488&&t<=37497)return"etc";if(t>=35840&&t<=35843)return"pvrtc";if(t>=36196)return"etc1";if(t>=35986&&t<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")},e._createLevelBuffers=function(t,e,n,r,i,o,s){for(var a=new Array(n),l=t.byteOffset,u=o,c=s,h=u+r-1&~(r-1),d=c+i-1&~(i-1),p=h*d*Od[e],f=0;f<n;f++)a[f]={levelID:f,levelWidth:n>1?u:h,levelHeight:n>1?c:d,levelBuffer:new Uint8Array(t.buffer,l,p)},l+=p,p=(h=(u=u>>1||1)+r-1&~(r-1))*(d=(c=c>>1||1)+i-1&~(i-1))*Od[e];return a},e}(function(t){function e(e,n){void 0===n&&(n={width:1,height:1,autoLoad:!0});var r,i,o=this;return"string"==typeof e?(r=e,i=new Uint8Array):(r=null,i=e),(o=t.call(this,i,n)||this).origin=r,o.buffer=i?new qh(i):null,o.origin&&!1!==n.autoLoad&&o.load(),i&&i.length&&(o.loaded=!0,o.onBlobLoaded(o.buffer.rawBinaryData)),o}return Id(e,t),e.prototype.onBlobLoaded=function(t){},e.prototype.load=function(){return t=this,e=void 0,r=function(){var t;return Ld(this,(function(e){switch(e.label){case 0:return[4,fetch(this.origin)];case 1:return[4,e.sent().blob()];case 2:return[4,e.sent().arrayBuffer()];case 3:return t=e.sent(),this.data=new Uint32Array(t),this.buffer=new qh(t),this.loaded=!0,this.onBlobLoaded(t),this.update(),[2,this]}}))},new((n=Promise)||(n=Promise))((function(i,o){function s(t){try{l(r.next(t))}catch(t){o(t)}}function a(t){try{l(r.throw(t))}catch(t){o(t)}}function l(t){t.done?i(t.value):new n((function(e){e(t.value)})).then(s,a)}l((r=r.apply(t,e||[])).next())}));var t,e,n,r},e}($u)),Ud=function(){function t(){}return t.use=function(e,n){var r=e.data;if(e.type===_d.TYPE.JSON&&r&&r.cacheID&&r.textures){for(var i=r.textures,o=void 0,s=void 0,a=0,l=i.length;a<l;a++){var u=i[a],c=u.src,h=u.format;if(h||(s=c),t.textureFormats[h]){o=c;break}}if(!(o=o||s))return void n(new Error("Cannot load compressed-textures in "+e.url+", make sure you provide a fallback"));if(o===e.url)return void n(new Error("URL of compressed texture cannot be the same as the manifest's URL"));var d={crossOrigin:e.crossOrigin,metadata:e.metadata.imageMetadata,parentResource:e},p=Dl.resolve(e.url.replace(this.baseUrl,""),o),f=r.cacheID;this.add(f,p,d,(function(t){if(t.error)n(t.error);else{var r=t.texture,i=void 0===r?null:r,o=t.textures,s=void 0===o?{}:o;Object.assign(e,{texture:i,textures:s}),n()}}))}else n()},t.add=function(){var e=document.createElement("canvas").getContext("webgl");if(e){var n={s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};for(var r in t.textureExtensions=n,t.textureFormats={},n){var i=n[r];i&&Object.assign(t.textureFormats,Object.getPrototypeOf(i))}}else console.warn("WebGL not available for compressed textures. Silently failing.")},t}();function Bd(t,e,n){var r={textures:{},texture:null};return e?(e.map((function(t){return new pc(new Zu(t,Object.assign({mipmap:fl.OFF,alphaMode:ml.NO_PREMULTIPLIED_ALPHA},n)))})).forEach((function(e,n){var i=e.baseTexture,o=t+"-"+(n+1);Zu.addToCache(i,o),pc.addToCache(e,o),0===n&&(Zu.addToCache(i,t),pc.addToCache(e,t),r.texture=e),r.textures[o]=e})),r):r}_d.setExtensionXhrType("dds",_d.XHR_RESPONSE_TYPE.BUFFER);var Gd,zd,Hd=3,jd=4,Vd=7,Xd=19,Wd=2,Yd=0,qd=1,$d=2,Kd=3;!function(t){t[t.DXGI_FORMAT_UNKNOWN=0]="DXGI_FORMAT_UNKNOWN",t[t.DXGI_FORMAT_R32G32B32A32_TYPELESS=1]="DXGI_FORMAT_R32G32B32A32_TYPELESS",t[t.DXGI_FORMAT_R32G32B32A32_FLOAT=2]="DXGI_FORMAT_R32G32B32A32_FLOAT",t[t.DXGI_FORMAT_R32G32B32A32_UINT=3]="DXGI_FORMAT_R32G32B32A32_UINT",t[t.DXGI_FORMAT_R32G32B32A32_SINT=4]="DXGI_FORMAT_R32G32B32A32_SINT",t[t.DXGI_FORMAT_R32G32B32_TYPELESS=5]="DXGI_FORMAT_R32G32B32_TYPELESS",t[t.DXGI_FORMAT_R32G32B32_FLOAT=6]="DXGI_FORMAT_R32G32B32_FLOAT",t[t.DXGI_FORMAT_R32G32B32_UINT=7]="DXGI_FORMAT_R32G32B32_UINT",t[t.DXGI_FORMAT_R32G32B32_SINT=8]="DXGI_FORMAT_R32G32B32_SINT",t[t.DXGI_FORMAT_R16G16B16A16_TYPELESS=9]="DXGI_FORMAT_R16G16B16A16_TYPELESS",t[t.DXGI_FORMAT_R16G16B16A16_FLOAT=10]="DXGI_FORMAT_R16G16B16A16_FLOAT",t[t.DXGI_FORMAT_R16G16B16A16_UNORM=11]="DXGI_FORMAT_R16G16B16A16_UNORM",t[t.DXGI_FORMAT_R16G16B16A16_UINT=12]="DXGI_FORMAT_R16G16B16A16_UINT",t[t.DXGI_FORMAT_R16G16B16A16_SNORM=13]="DXGI_FORMAT_R16G16B16A16_SNORM",t[t.DXGI_FORMAT_R16G16B16A16_SINT=14]="DXGI_FORMAT_R16G16B16A16_SINT",t[t.DXGI_FORMAT_R32G32_TYPELESS=15]="DXGI_FORMAT_R32G32_TYPELESS",t[t.DXGI_FORMAT_R32G32_FLOAT=16]="DXGI_FORMAT_R32G32_FLOAT",t[t.DXGI_FORMAT_R32G32_UINT=17]="DXGI_FORMAT_R32G32_UINT",t[t.DXGI_FORMAT_R32G32_SINT=18]="DXGI_FORMAT_R32G32_SINT",t[t.DXGI_FORMAT_R32G8X24_TYPELESS=19]="DXGI_FORMAT_R32G8X24_TYPELESS",t[t.DXGI_FORMAT_D32_FLOAT_S8X24_UINT=20]="DXGI_FORMAT_D32_FLOAT_S8X24_UINT",t[t.DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS=21]="DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS",t[t.DXGI_FORMAT_X32_TYPELESS_G8X24_UINT=22]="DXGI_FORMAT_X32_TYPELESS_G8X24_UINT",t[t.DXGI_FORMAT_R10G10B10A2_TYPELESS=23]="DXGI_FORMAT_R10G10B10A2_TYPELESS",t[t.DXGI_FORMAT_R10G10B10A2_UNORM=24]="DXGI_FORMAT_R10G10B10A2_UNORM",t[t.DXGI_FORMAT_R10G10B10A2_UINT=25]="DXGI_FORMAT_R10G10B10A2_UINT",t[t.DXGI_FORMAT_R11G11B10_FLOAT=26]="DXGI_FORMAT_R11G11B10_FLOAT",t[t.DXGI_FORMAT_R8G8B8A8_TYPELESS=27]="DXGI_FORMAT_R8G8B8A8_TYPELESS",t[t.DXGI_FORMAT_R8G8B8A8_UNORM=28]="DXGI_FORMAT_R8G8B8A8_UNORM",t[t.DXGI_FORMAT_R8G8B8A8_UNORM_SRGB=29]="DXGI_FORMAT_R8G8B8A8_UNORM_SRGB",t[t.DXGI_FORMAT_R8G8B8A8_UINT=30]="DXGI_FORMAT_R8G8B8A8_UINT",t[t.DXGI_FORMAT_R8G8B8A8_SNORM=31]="DXGI_FORMAT_R8G8B8A8_SNORM",t[t.DXGI_FORMAT_R8G8B8A8_SINT=32]="DXGI_FORMAT_R8G8B8A8_SINT",t[t.DXGI_FORMAT_R16G16_TYPELESS=33]="DXGI_FORMAT_R16G16_TYPELESS",t[t.DXGI_FORMAT_R16G16_FLOAT=34]="DXGI_FORMAT_R16G16_FLOAT",t[t.DXGI_FORMAT_R16G16_UNORM=35]="DXGI_FORMAT_R16G16_UNORM",t[t.DXGI_FORMAT_R16G16_UINT=36]="DXGI_FORMAT_R16G16_UINT",t[t.DXGI_FORMAT_R16G16_SNORM=37]="DXGI_FORMAT_R16G16_SNORM",t[t.DXGI_FORMAT_R16G16_SINT=38]="DXGI_FORMAT_R16G16_SINT",t[t.DXGI_FORMAT_R32_TYPELESS=39]="DXGI_FORMAT_R32_TYPELESS",t[t.DXGI_FORMAT_D32_FLOAT=40]="DXGI_FORMAT_D32_FLOAT",t[t.DXGI_FORMAT_R32_FLOAT=41]="DXGI_FORMAT_R32_FLOAT",t[t.DXGI_FORMAT_R32_UINT=42]="DXGI_FORMAT_R32_UINT",t[t.DXGI_FORMAT_R32_SINT=43]="DXGI_FORMAT_R32_SINT",t[t.DXGI_FORMAT_R24G8_TYPELESS=44]="DXGI_FORMAT_R24G8_TYPELESS",t[t.DXGI_FORMAT_D24_UNORM_S8_UINT=45]="DXGI_FORMAT_D24_UNORM_S8_UINT",t[t.DXGI_FORMAT_R24_UNORM_X8_TYPELESS=46]="DXGI_FORMAT_R24_UNORM_X8_TYPELESS",t[t.DXGI_FORMAT_X24_TYPELESS_G8_UINT=47]="DXGI_FORMAT_X24_TYPELESS_G8_UINT",t[t.DXGI_FORMAT_R8G8_TYPELESS=48]="DXGI_FORMAT_R8G8_TYPELESS",t[t.DXGI_FORMAT_R8G8_UNORM=49]="DXGI_FORMAT_R8G8_UNORM",t[t.DXGI_FORMAT_R8G8_UINT=50]="DXGI_FORMAT_R8G8_UINT",t[t.DXGI_FORMAT_R8G8_SNORM=51]="DXGI_FORMAT_R8G8_SNORM",t[t.DXGI_FORMAT_R8G8_SINT=52]="DXGI_FORMAT_R8G8_SINT",t[t.DXGI_FORMAT_R16_TYPELESS=53]="DXGI_FORMAT_R16_TYPELESS",t[t.DXGI_FORMAT_R16_FLOAT=54]="DXGI_FORMAT_R16_FLOAT",t[t.DXGI_FORMAT_D16_UNORM=55]="DXGI_FORMAT_D16_UNORM",t[t.DXGI_FORMAT_R16_UNORM=56]="DXGI_FORMAT_R16_UNORM",t[t.DXGI_FORMAT_R16_UINT=57]="DXGI_FORMAT_R16_UINT",t[t.DXGI_FORMAT_R16_SNORM=58]="DXGI_FORMAT_R16_SNORM",t[t.DXGI_FORMAT_R16_SINT=59]="DXGI_FORMAT_R16_SINT",t[t.DXGI_FORMAT_R8_TYPELESS=60]="DXGI_FORMAT_R8_TYPELESS",t[t.DXGI_FORMAT_R8_UNORM=61]="DXGI_FORMAT_R8_UNORM",t[t.DXGI_FORMAT_R8_UINT=62]="DXGI_FORMAT_R8_UINT",t[t.DXGI_FORMAT_R8_SNORM=63]="DXGI_FORMAT_R8_SNORM",t[t.DXGI_FORMAT_R8_SINT=64]="DXGI_FORMAT_R8_SINT",t[t.DXGI_FORMAT_A8_UNORM=65]="DXGI_FORMAT_A8_UNORM",t[t.DXGI_FORMAT_R1_UNORM=66]="DXGI_FORMAT_R1_UNORM",t[t.DXGI_FORMAT_R9G9B9E5_SHAREDEXP=67]="DXGI_FORMAT_R9G9B9E5_SHAREDEXP",t[t.DXGI_FORMAT_R8G8_B8G8_UNORM=68]="DXGI_FORMAT_R8G8_B8G8_UNORM",t[t.DXGI_FORMAT_G8R8_G8B8_UNORM=69]="DXGI_FORMAT_G8R8_G8B8_UNORM",t[t.DXGI_FORMAT_BC1_TYPELESS=70]="DXGI_FORMAT_BC1_TYPELESS",t[t.DXGI_FORMAT_BC1_UNORM=71]="DXGI_FORMAT_BC1_UNORM",t[t.DXGI_FORMAT_BC1_UNORM_SRGB=72]="DXGI_FORMAT_BC1_UNORM_SRGB",t[t.DXGI_FORMAT_BC2_TYPELESS=73]="DXGI_FORMAT_BC2_TYPELESS",t[t.DXGI_FORMAT_BC2_UNORM=74]="DXGI_FORMAT_BC2_UNORM",t[t.DXGI_FORMAT_BC2_UNORM_SRGB=75]="DXGI_FORMAT_BC2_UNORM_SRGB",t[t.DXGI_FORMAT_BC3_TYPELESS=76]="DXGI_FORMAT_BC3_TYPELESS",t[t.DXGI_FORMAT_BC3_UNORM=77]="DXGI_FORMAT_BC3_UNORM",t[t.DXGI_FORMAT_BC3_UNORM_SRGB=78]="DXGI_FORMAT_BC3_UNORM_SRGB",t[t.DXGI_FORMAT_BC4_TYPELESS=79]="DXGI_FORMAT_BC4_TYPELESS",t[t.DXGI_FORMAT_BC4_UNORM=80]="DXGI_FORMAT_BC4_UNORM",t[t.DXGI_FORMAT_BC4_SNORM=81]="DXGI_FORMAT_BC4_SNORM",t[t.DXGI_FORMAT_BC5_TYPELESS=82]="DXGI_FORMAT_BC5_TYPELESS",t[t.DXGI_FORMAT_BC5_UNORM=83]="DXGI_FORMAT_BC5_UNORM",t[t.DXGI_FORMAT_BC5_SNORM=84]="DXGI_FORMAT_BC5_SNORM",t[t.DXGI_FORMAT_B5G6R5_UNORM=85]="DXGI_FORMAT_B5G6R5_UNORM",t[t.DXGI_FORMAT_B5G5R5A1_UNORM=86]="DXGI_FORMAT_B5G5R5A1_UNORM",t[t.DXGI_FORMAT_B8G8R8A8_UNORM=87]="DXGI_FORMAT_B8G8R8A8_UNORM",t[t.DXGI_FORMAT_B8G8R8X8_UNORM=88]="DXGI_FORMAT_B8G8R8X8_UNORM",t[t.DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM=89]="DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM",t[t.DXGI_FORMAT_B8G8R8A8_TYPELESS=90]="DXGI_FORMAT_B8G8R8A8_TYPELESS",t[t.DXGI_FORMAT_B8G8R8A8_UNORM_SRGB=91]="DXGI_FORMAT_B8G8R8A8_UNORM_SRGB",t[t.DXGI_FORMAT_B8G8R8X8_TYPELESS=92]="DXGI_FORMAT_B8G8R8X8_TYPELESS",t[t.DXGI_FORMAT_B8G8R8X8_UNORM_SRGB=93]="DXGI_FORMAT_B8G8R8X8_UNORM_SRGB",t[t.DXGI_FORMAT_BC6H_TYPELESS=94]="DXGI_FORMAT_BC6H_TYPELESS",t[t.DXGI_FORMAT_BC6H_UF16=95]="DXGI_FORMAT_BC6H_UF16",t[t.DXGI_FORMAT_BC6H_SF16=96]="DXGI_FORMAT_BC6H_SF16",t[t.DXGI_FORMAT_BC7_TYPELESS=97]="DXGI_FORMAT_BC7_TYPELESS",t[t.DXGI_FORMAT_BC7_UNORM=98]="DXGI_FORMAT_BC7_UNORM",t[t.DXGI_FORMAT_BC7_UNORM_SRGB=99]="DXGI_FORMAT_BC7_UNORM_SRGB",t[t.DXGI_FORMAT_AYUV=100]="DXGI_FORMAT_AYUV",t[t.DXGI_FORMAT_Y410=101]="DXGI_FORMAT_Y410",t[t.DXGI_FORMAT_Y416=102]="DXGI_FORMAT_Y416",t[t.DXGI_FORMAT_NV12=103]="DXGI_FORMAT_NV12",t[t.DXGI_FORMAT_P010=104]="DXGI_FORMAT_P010",t[t.DXGI_FORMAT_P016=105]="DXGI_FORMAT_P016",t[t.DXGI_FORMAT_420_OPAQUE=106]="DXGI_FORMAT_420_OPAQUE",t[t.DXGI_FORMAT_YUY2=107]="DXGI_FORMAT_YUY2",t[t.DXGI_FORMAT_Y210=108]="DXGI_FORMAT_Y210",t[t.DXGI_FORMAT_Y216=109]="DXGI_FORMAT_Y216",t[t.DXGI_FORMAT_NV11=110]="DXGI_FORMAT_NV11",t[t.DXGI_FORMAT_AI44=111]="DXGI_FORMAT_AI44",t[t.DXGI_FORMAT_IA44=112]="DXGI_FORMAT_IA44",t[t.DXGI_FORMAT_P8=113]="DXGI_FORMAT_P8",t[t.DXGI_FORMAT_A8P8=114]="DXGI_FORMAT_A8P8",t[t.DXGI_FORMAT_B4G4R4A4_UNORM=115]="DXGI_FORMAT_B4G4R4A4_UNORM",t[t.DXGI_FORMAT_P208=116]="DXGI_FORMAT_P208",t[t.DXGI_FORMAT_V208=117]="DXGI_FORMAT_V208",t[t.DXGI_FORMAT_V408=118]="DXGI_FORMAT_V408",t[t.DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE=119]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIN_MIP_OPAQUE",t[t.DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE=120]="DXGI_FORMAT_SAMPLER_FEEDBACK_MIP_REGION_USED_OPAQUE",t[t.DXGI_FORMAT_FORCE_UINT=121]="DXGI_FORMAT_FORCE_UINT"}(Gd||(Gd={})),function(t){t[t.DDS_DIMENSION_TEXTURE1D=2]="DDS_DIMENSION_TEXTURE1D",t[t.DDS_DIMENSION_TEXTURE2D=3]="DDS_DIMENSION_TEXTURE2D",t[t.DDS_DIMENSION_TEXTURE3D=6]="DDS_DIMENSION_TEXTURE3D"}(zd||(zd={}));var Zd,Jd,Qd,tp=((Nd={})[827611204]=Cd.COMPRESSED_RGBA_S3TC_DXT1_EXT,Nd[861165636]=Cd.COMPRESSED_RGBA_S3TC_DXT3_EXT,Nd[894720068]=Cd.COMPRESSED_RGBA_S3TC_DXT5_EXT,Nd),ep=((Fd={})[Gd.DXGI_FORMAT_BC1_TYPELESS]=Cd.COMPRESSED_RGBA_S3TC_DXT1_EXT,Fd[Gd.DXGI_FORMAT_BC1_UNORM]=Cd.COMPRESSED_RGBA_S3TC_DXT1_EXT,Fd[Gd.DXGI_FORMAT_BC2_TYPELESS]=Cd.COMPRESSED_RGBA_S3TC_DXT3_EXT,Fd[Gd.DXGI_FORMAT_BC2_UNORM]=Cd.COMPRESSED_RGBA_S3TC_DXT3_EXT,Fd[Gd.DXGI_FORMAT_BC3_TYPELESS]=Cd.COMPRESSED_RGBA_S3TC_DXT5_EXT,Fd[Gd.DXGI_FORMAT_BC3_UNORM]=Cd.COMPRESSED_RGBA_S3TC_DXT5_EXT,Fd[Gd.DXGI_FORMAT_BC1_UNORM_SRGB]=Cd.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,Fd[Gd.DXGI_FORMAT_BC2_UNORM_SRGB]=Cd.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,Fd[Gd.DXGI_FORMAT_BC3_UNORM_SRGB]=Cd.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT,Fd),np=function(){function t(){}return t.use=function(e,n){if("dds"===e.extension&&e.data)try{Object.assign(e,Bd(e.name||e.url,t.parse(e.data),e.metadata))}catch(t){return void n(t)}n()},t.parse=function(t){var e=new Uint32Array(t);if(542327876!==e[0])throw new Error("Invalid DDS file magic word");var n=new Uint32Array(t,0,124/Uint32Array.BYTES_PER_ELEMENT),r=n[Hd],i=n[jd],o=n[Vd],s=new Uint32Array(t,Xd*Uint32Array.BYTES_PER_ELEMENT,32/Uint32Array.BYTES_PER_ELEMENT),a=s[1];if(4&a){var l=s[Wd];if(808540228!==l){var u=tp[l],c=new Uint8Array(t,128);return[new kd(c,{format:u,width:i,height:r,levels:o})]}var h=new Uint32Array(e.buffer,128,20/Uint32Array.BYTES_PER_ELEMENT),d=h[Yd],p=h[qd],f=h[$d],m=h[Kd],g=ep[d];if(void 0===g)throw new Error("DDSLoader cannot parse texture data with DXGI format "+d);if(4===f)throw new Error("DDSLoader does not support cubemap textures");if(p===zd.DDS_DIMENSION_TEXTURE3D)throw new Error("DDSLoader does not supported 3D texture data");var v=new Array;if(1===m)v.push(new Uint8Array(t,148));else{for(var y=Od[g],_=0,b=i,x=r,w=0;w<o;w++){_+=Math.max(1,b+3&-4)*Math.max(1,x+3&-4)*y,b>>>=1,x>>>=1}var E=148;for(w=0;w<m;w++)v.push(new Uint8Array(t,E,_)),E+=_}return v.map((function(t){return new kd(t,{format:g,width:i,height:r,levels:o})}))}if(64&a)throw new Error("DDSLoader does not support uncompressed texture data.");if(512&a)throw new Error("DDSLoader does not supported YUV uncompressed texture data.");if(131072&a)throw new Error("DDSLoader does not support single-channel (lumninance) texture data!");if(2&a)throw new Error("DDSLoader does not support single-channel (alpha) texture data!");throw new Error("DDSLoader failed to load a texture file due to an unknown reason!")},t}();_d.setExtensionXhrType("ktx",_d.XHR_RESPONSE_TYPE.BUFFER);var rp=[171,75,84,88,32,49,49,187,13,10,26,10],ip=12,op=16,sp=24,ap=28,lp=36,up=40,cp=44,hp=48,dp=52,pp=56,fp=60,mp=((Zd={})[cl.UNSIGNED_BYTE]=1,Zd[cl.UNSIGNED_SHORT]=2,Zd[cl.FLOAT]=4,Zd[cl.HALF_FLOAT]=8,Zd),gp=((Jd={})[ll.RGBA]=4,Jd[ll.RGB]=3,Jd[ll.LUMINANCE]=1,Jd[ll.LUMINANCE_ALPHA]=2,Jd[ll.ALPHA]=1,Jd),vp=((Qd={})[cl.UNSIGNED_SHORT_4_4_4_4]=2,Qd[cl.UNSIGNED_SHORT_5_5_5_1]=2,Qd[cl.UNSIGNED_SHORT_5_6_5]=2,Qd),yp=function(){function t(){}return t.use=function(e,n){if("ktx"===e.extension&&e.data)try{var r=e.name||e.url;Object.assign(e,Bd(r,t.parse(r,e.data),e.metadata))}catch(t){return void n(t)}n()},t.parse=function(e,n){var r=new DataView(n);if(!t.validate(e,r))return null;var i=67305985===r.getUint32(ip,!0),o=r.getUint32(op,i),s=r.getUint32(sp,i),a=r.getUint32(ap,i),l=r.getUint32(lp,i),u=r.getUint32(up,i)||1,c=r.getUint32(cp,i)||1,h=r.getUint32(hp,i)||1,d=r.getUint32(dp,i),p=r.getUint32(pp,i),f=r.getUint32(fp,i);if(0===u||1!==c)throw new Error("Only 2D textures are supported");if(1!==d)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(1!==h)throw new Error("WebGL does not support array textures");var m,g=l+3&-4,v=u+3&-4,y=new Array(h),_=l*u;if(0===o&&(_=g*v),void 0===(m=0!==o?mp[o]?mp[o]*gp[s]:vp[o]:Od[a]))throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");for(var b=_*m,x=l,w=u,E=g,T=v,S=64+f,A=0;A<p;A++){for(var M=r.getUint32(S,i),D=S+4,C=0;C<h;C++){var R=y[C];R||(R=y[C]=new Array(p)),R[A]={levelID:A,levelWidth:p>1?x:E,levelHeight:p>1?w:T,levelBuffer:new Uint8Array(n,D,b)},D+=b}S=(S+=M+4)%4!=0?S+4-S%4:S,b=(E=(x=x>>1||1)+4-1&-4)*(T=(w=w>>1||1)+4-1&-4)*m}if(0!==o)throw new Error("TODO: Uncompressed");return y.map((function(t){return new kd(null,{format:a,width:l,height:u,levels:p,levelBuffers:t})}))},t.validate=function(t,e){for(var n=0;n<rp.length;n++)if(e.getUint8(n)!==rp[n])return console.error(t+" is not a valid *.ktx file!"),!1;return!0},t}(),_p=function(t,e){return(_p=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])})(t,e)};function bp(t,e){function n(){this.constructor=t}_p(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}!function(t){function e(e,n,r,i){void 0===e&&(e=1500),void 0===r&&(r=16384),void 0===i&&(i=!1);var o=t.call(this)||this;return r>16384&&(r=16384),o._properties=[!1,!0,!1,!1,!1],o._maxSize=e,o._batchSize=r,o._buffers=null,o._bufferUpdateIDs=[],o._updateID=0,o.interactiveChildren=!1,o.blendMode=sl.NORMAL,o.autoResize=i,o.roundPixels=!0,o.baseTexture=null,o.setProperties(n),o._tint=0,o.tintRgb=new Float32Array(4),o.tint=16777215,o}bp(e,t),e.prototype.setProperties=function(t){t&&(this._properties[0]="vertices"in t||"scale"in t?!!t.vertices||!!t.scale:this._properties[0],this._properties[1]="position"in t?!!t.position:this._properties[1],this._properties[2]="rotation"in t?!!t.rotation:this._properties[2],this._properties[3]="uvs"in t?!!t.uvs:this._properties[3],this._properties[4]="tint"in t||"alpha"in t?!!t.tint||!!t.alpha:this._properties[4])},e.prototype.updateTransform=function(){this.displayObjectUpdateTransform()},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,Pl(t,this.tintRgb)},enumerable:!1,configurable:!0}),e.prototype.render=function(t){var e=this;this.visible&&!(this.worldAlpha<=0)&&this.children.length&&this.renderable&&(this.baseTexture||(this.baseTexture=this.children[0]._texture.baseTexture,this.baseTexture.valid||this.baseTexture.once("update",(function(){return e.onChildrenChange(0)}))),t.batch.setObjectRenderer(t.plugins.particle),t.plugins.particle.render(this))},e.prototype.onChildrenChange=function(t){for(var e=Math.floor(t/this._batchSize);this._bufferUpdateIDs.length<e;)this._bufferUpdateIDs.push(0);this._bufferUpdateIDs[e]=++this._updateID},e.prototype.dispose=function(){if(this._buffers){for(var t=0;t<this._buffers.length;++t)this._buffers[t].destroy();this._buffers=null}},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.dispose(),this._properties=null,this._buffers=null,this._bufferUpdateIDs=null}}(Du);var xp,wp,Ep=function(){function t(t,e,n){this.geometry=new Tc,this.indexBuffer=null,this.size=n,this.dynamicProperties=[],this.staticProperties=[];for(var r=0;r<t.length;++r){var i=t[r];i={attributeName:i.attributeName,size:i.size,uploadFunction:i.uploadFunction,type:i.type||cl.FLOAT,offset:i.offset},e[r]?this.dynamicProperties.push(i):this.staticProperties.push(i)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}return t.prototype.initBuffers=function(){var t=this.geometry,e=0;this.indexBuffer=new _c(function(t,e){void 0===e&&(e=null);var n=6*t;if((e=e||new Uint16Array(n)).length!==n)throw new Error("Out buffer length is incorrect, got "+e.length+" and expected "+n);for(var r=0,i=0;r<n;r+=6,i+=4)e[r+0]=i+0,e[r+1]=i+1,e[r+2]=i+2,e[r+3]=i+0,e[r+4]=i+2,e[r+5]=i+3;return e}(this.size),!0,!0),t.addIndex(this.indexBuffer),this.dynamicStride=0;for(var n=0;n<this.dynamicProperties.length;++n){(s=this.dynamicProperties[n]).offset=e,e+=s.size,this.dynamicStride+=s.size}var r=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(r),this.dynamicDataUint32=new Uint32Array(r),this.dynamicBuffer=new _c(this.dynamicData,!1,!1);var i=0;this.staticStride=0;for(n=0;n<this.staticProperties.length;++n){(s=this.staticProperties[n]).offset=i,i+=s.size,this.staticStride+=s.size}var o=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(o),this.staticDataUint32=new Uint32Array(o),this.staticBuffer=new _c(this.staticData,!0,!1);for(n=0;n<this.dynamicProperties.length;++n){var s=this.dynamicProperties[n];t.addAttribute(s.attributeName,this.dynamicBuffer,0,s.type===cl.UNSIGNED_BYTE,s.type,4*this.dynamicStride,4*s.offset)}for(n=0;n<this.staticProperties.length;++n){s=this.staticProperties[n];t.addAttribute(s.attributeName,this.staticBuffer,0,s.type===cl.UNSIGNED_BYTE,s.type,4*this.staticStride,4*s.offset)}},t.prototype.uploadDynamic=function(t,e,n){for(var r=0;r<this.dynamicProperties.length;r++){var i=this.dynamicProperties[r];i.uploadFunction(t,e,n,i.type===cl.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,i.offset)}this.dynamicBuffer._updateID++},t.prototype.uploadStatic=function(t,e,n){for(var r=0;r<this.staticProperties.length;r++){var i=this.staticProperties[r];i.uploadFunction(t,e,n,i.type===cl.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,i.offset)}this.staticBuffer._updateID++},t.prototype.destroy=function(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()},t}(),Tp=function(t){function e(e){var n=t.call(this,e)||this;return n.shader=null,n.properties=null,n.tempMatrix=new du,n.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:n.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:n.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:n.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:n.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:cl.UNSIGNED_BYTE,uploadFunction:n.uploadTint,offset:0}],n.shader=dh.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec4 aColor;\n\nattribute vec2 aPositionCoord;\nattribute float aRotation;\n\nuniform mat3 translationMatrix;\nuniform vec4 uColor;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nvoid main(void){\n    float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);\n    float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);\n\n    vec2 v = vec2(x, y);\n    v = v + aPositionCoord;\n\n    gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = aTextureCoord;\n    vColor = aColor * uColor;\n}\n","varying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void){\n    vec4 color = texture2D(uSampler, vTextureCoord) * vColor;\n    gl_FragColor = color;\n}",{}),n.state=ph.for2d(),n}return bp(e,t),e.prototype.render=function(t){var e=t.children,n=t._maxSize,r=t._batchSize,i=this.renderer,o=e.length;if(0!==o){o>n&&!t.autoResize&&(o=n);var s=t._buffers;s||(s=t._buffers=this.generateBuffers(t));var a=e[0]._texture.baseTexture;this.state.blendMode=Fl(t.blendMode,a.alphaMode),i.state.set(this.state);var l,u,c,h,d=i.gl,p=t.worldTransform.copyTo(this.tempMatrix);p.prepend(i.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=p.toArray(!0),this.shader.uniforms.uColor=(l=t.tintRgb,u=t.worldAlpha,c=this.shader.uniforms.uColor,h=a.alphaMode,c=c||new Float32Array(4),h||void 0===h?(c[0]=l[0]*u,c[1]=l[1]*u,c[2]=l[2]*u):(c[0]=l[0],c[1]=l[1],c[2]=l[2]),c[3]=u,c),this.shader.uniforms.uSampler=a,this.renderer.shader.bind(this.shader);for(var f=!1,m=0,g=0;m<o;m+=r,g+=1){var v=o-m;v>r&&(v=r),g>=s.length&&s.push(this._generateOneMoreBuffer(t));var y=s[g];y.uploadDynamic(e,m,v);var _=t._bufferUpdateIDs[g]||0;(f=f||y._updateID<_)&&(y._updateID=t._updateID,y.uploadStatic(e,m,v)),i.geometry.bind(y.geometry),d.drawElements(d.TRIANGLES,6*v,d.UNSIGNED_SHORT,0)}}},e.prototype.generateBuffers=function(t){for(var e=[],n=t._maxSize,r=t._batchSize,i=t._properties,o=0;o<n;o+=r)e.push(new Ep(this.properties,i,r));return e},e.prototype._generateOneMoreBuffer=function(t){var e=t._batchSize,n=t._properties;return new Ep(this.properties,n,e)},e.prototype.uploadVertices=function(t,e,n,r,i,o){for(var s=0,a=0,l=0,u=0,c=0;c<n;++c){var h=t[e+c],d=h._texture,p=h.scale.x,f=h.scale.y,m=d.trim,g=d.orig;m?(s=(a=m.x-h.anchor.x*g.width)+m.width,l=(u=m.y-h.anchor.y*g.height)+m.height):(s=g.width*(1-h.anchor.x),a=g.width*-h.anchor.x,l=g.height*(1-h.anchor.y),u=g.height*-h.anchor.y),r[o]=a*p,r[o+1]=u*f,r[o+i]=s*p,r[o+i+1]=u*f,r[o+2*i]=s*p,r[o+2*i+1]=l*f,r[o+3*i]=a*p,r[o+3*i+1]=l*f,o+=4*i}},e.prototype.uploadPosition=function(t,e,n,r,i,o){for(var s=0;s<n;s++){var a=t[e+s].position;r[o]=a.x,r[o+1]=a.y,r[o+i]=a.x,r[o+i+1]=a.y,r[o+2*i]=a.x,r[o+2*i+1]=a.y,r[o+3*i]=a.x,r[o+3*i+1]=a.y,o+=4*i}},e.prototype.uploadRotation=function(t,e,n,r,i,o){for(var s=0;s<n;s++){var a=t[e+s].rotation;r[o]=a,r[o+i]=a,r[o+2*i]=a,r[o+3*i]=a,o+=4*i}},e.prototype.uploadUvs=function(t,e,n,r,i,o){for(var s=0;s<n;++s){var a=t[e+s]._texture._uvs;a?(r[o]=a.x0,r[o+1]=a.y0,r[o+i]=a.x1,r[o+i+1]=a.y1,r[o+2*i]=a.x2,r[o+2*i+1]=a.y2,r[o+3*i]=a.x3,r[o+3*i+1]=a.y3,o+=4*i):(r[o]=0,r[o+1]=0,r[o+i]=0,r[o+i+1]=0,r[o+2*i]=0,r[o+2*i+1]=0,r[o+3*i]=0,r[o+3*i+1]=0,o+=4*i)}},e.prototype.uploadTint=function(t,e,n,r,i,o){for(var s=0;s<n;++s){var a=t[e+s],l=a._texture.baseTexture.alphaMode>0,u=a.alpha,c=u<1&&l?kl(a._tintRGB,u):a._tintRGB+(255*u<<24);r[o]=c,r[o+i]=c,r[o+2*i]=c,r[o+3*i]=c,o+=4*i}},e.prototype.destroy=function(){t.prototype.destroy.call(this),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null},e}(Ic);!function(t){t.MITER="miter",t.BEVEL="bevel",t.ROUND="round"}(xp||(xp={})),function(t){t.BUTT="butt",t.ROUND="round",t.SQUARE="square"}(wp||(wp={}));var Sp={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount:function(t,e){if(void 0===e&&(e=20),!this.adaptive||!t||isNaN(t))return e;var n=Math.ceil(t/this.maxLength);return n<this.minSegments?n=this.minSegments:n>this.maxSegments&&(n=this.maxSegments),n}},Ap=function(){function t(){this.color=16777215,this.alpha=1,this.texture=pc.WHITE,this.matrix=null,this.visible=!1,this.reset()}return t.prototype.clone=function(){var e=new t;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e},t.prototype.reset=function(){this.color=16777215,this.alpha=1,this.texture=pc.WHITE,this.matrix=null,this.visible=!1},t.prototype.destroy=function(){this.texture=null,this.matrix=null},t}(),Mp=function(t,e){return(Mp=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])})(t,e)};function Dp(t,e){function n(){this.constructor=t}Mp(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Cp={build:function(t){t.points=t.shape.points.slice()},triangulate:function(t,e){var n=t.points,r=t.holes,i=e.points,o=e.indices;if(n.length>=6){for(var s=[],a=0;a<r.length;a++){var l=r[a];s.push(n.length/2),n=n.concat(l.points)}var u=Al()(n,s,2);if(!u)return;var c=i.length/2;for(a=0;a<u.length;a+=3)o.push(u[a]+c),o.push(u[a+1]+c),o.push(u[a+2]+c);for(a=0;a<n.length;a++)i.push(n[a])}}},Rp={build:function(t){var e,n,r=t.shape,i=t.points,o=r.x,s=r.y;if(i.length=0,t.type===eu.CIRC)e=r.radius,n=r.radius;else{var a=t.shape;e=a.width,n=a.height}if(0!==e&&0!==n){var l=Math.floor(30*Math.sqrt(r.radius))||Math.floor(15*Math.sqrt(e+n));l/=2.3;for(var u=2*Math.PI/l,c=0;c<l-.5;c++)i.push(o+Math.sin(-u*c)*e,s+Math.cos(-u*c)*n);i.push(i[0],i[1])}},triangulate:function(t,e){var n=t.points,r=e.points,i=e.indices,o=r.length/2,s=o,a=t.shape,l=t.matrix,u=a.x,c=a.y;r.push(t.matrix?l.a*u+l.c*c+l.tx:u,t.matrix?l.b*u+l.d*c+l.ty:c);for(var h=0;h<n.length;h+=2)r.push(n[h],n[h+1]),i.push(o++,s,o)}},Op={build:function(t){var e=t.shape,n=e.x,r=e.y,i=e.width,o=e.height,s=t.points;s.length=0,s.push(n,r,n+i,r,n+i,r+o,n,r+o)},triangulate:function(t,e){var n=t.points,r=e.points,i=r.length/2;r.push(n[0],n[1],n[2],n[3],n[6],n[7],n[4],n[5]),e.indices.push(i,i+1,i+2,i+1,i+2,i+3)}};function Pp(t,e,n){return t+(e-t)*n}function Ip(t,e,n,r,i,o,s){void 0===s&&(s=[]);for(var a=s,l=0,u=0,c=0,h=0,d=0,p=0,f=0,m=0;f<=20;++f)l=Pp(t,n,m=f/20),u=Pp(e,r,m),c=Pp(n,i,m),h=Pp(r,o,m),d=Pp(l,c,m),p=Pp(u,h,m),0===f&&a[a.length-2]===d&&a[a.length-1]===p||a.push(d,p);return a}var Lp={build:function(t){var e=t.shape,n=t.points,r=e.x,i=e.y,o=e.width,s=e.height,a=Math.max(0,Math.min(e.radius,Math.min(o,s)/2));n.length=0,a?(Ip(r,i+a,r,i,r+a,i,n),Ip(r+o-a,i,r+o,i,r+o,i+a,n),Ip(r+o,i+s-a,r+o,i+s,r+o-a,i+s,n),Ip(r+a,i+s,r,i+s,r,i+s-a,n)):n.push(r,i,r+o,i,r+o,i+s,r,i+s)},triangulate:function(t,e){for(var n=t.points,r=e.points,i=e.indices,o=r.length/2,s=Al()(n,null,2),a=0,l=s.length;a<l;a+=3)i.push(s[a]+o),i.push(s[a+1]+o),i.push(s[a+2]+o);for(a=0,l=n.length;a<l;a++)r.push(n[a],n[++a])}};function Np(t,e,n,r,i,o,s,a){var l,u;s?(l=r,u=-n):(l=-r,u=n);var c=t-n*i+l,h=e-r*i+u,d=t+n*o+l,p=e+r*o+u;return a.push(c,h),a.push(d,p),2}function Fp(t,e,n,r,i,o,s,a){var l=n-t,u=r-e,c=Math.atan2(l,u),h=Math.atan2(i-t,o-e);a&&c<h?c+=2*Math.PI:!a&&c>h&&(h+=2*Math.PI);var d=c,p=h-c,f=Math.abs(p),m=Math.sqrt(l*l+u*u),g=1+(15*f*Math.sqrt(m)/Math.PI>>0),v=p/g;if(d+=v,a){s.push(t,e),s.push(n,r);for(var y=1,_=d;y<g;y++,_+=v)s.push(t,e),s.push(t+Math.sin(_)*m,e+Math.cos(_)*m);s.push(t,e),s.push(i,o)}else{s.push(n,r),s.push(t,e);for(y=1,_=d;y<g;y++,_+=v)s.push(t+Math.sin(_)*m,e+Math.cos(_)*m),s.push(t,e);s.push(i,o),s.push(t,e)}return 2*g}function kp(t,e){t.lineStyle.native?function(t,e){var n=0,r=t.shape,i=t.points||r.points,o=r.type!==eu.POLY||r.closeStroke;if(0!==i.length){var s=e.points,a=e.indices,l=i.length/2,u=s.length/2,c=u;for(s.push(i[0],i[1]),n=1;n<l;n++)s.push(i[2*n],i[2*n+1]),a.push(c,c+1),c++;o&&a.push(c,u)}}(t,e):function(t,e){var n=t.shape,r=t.points||n.points.slice(),i=e.closePointEps;if(0!==r.length){var o=t.lineStyle,s=new cu(r[0],r[1]),a=new cu(r[r.length-2],r[r.length-1]),l=n.type!==eu.POLY||n.closeStroke,u=Math.abs(s.x-a.x)<i&&Math.abs(s.y-a.y)<i;if(l){r=r.slice(),u&&(r.pop(),r.pop(),a.set(r[r.length-2],r[r.length-1]));var c=.5*(s.x+a.x),h=.5*(a.y+s.y);r.unshift(c,h),r.push(c,h)}var d=e.points,p=r.length/2,f=r.length,m=d.length/2,g=o.width/2,v=g*g,y=o.miterLimit*o.miterLimit,_=r[0],b=r[1],x=r[2],w=r[3],E=0,T=0,S=-(b-w),A=_-x,M=0,D=0,C=Math.sqrt(S*S+A*A);S/=C,A/=C,S*=g,A*=g;var R=o.alignment,O=2*(1-R),P=2*R;l||(o.cap===wp.ROUND?f+=Fp(_-S*(O-P)*.5,b-A*(O-P)*.5,_-S*O,b-A*O,_+S*P,b+A*P,d,!0)+2:o.cap===wp.SQUARE&&(f+=Np(_,b,S,A,O,P,!0,d))),d.push(_-S*O,b-A*O),d.push(_+S*P,b+A*P);for(var I=1;I<p-1;++I){_=r[2*(I-1)],b=r[2*(I-1)+1],x=r[2*I],w=r[2*I+1],E=r[2*(I+1)],T=r[2*(I+1)+1],S=-(b-w),A=_-x,S/=C=Math.sqrt(S*S+A*A),A/=C,S*=g,A*=g,M=-(w-T),D=x-E,M/=C=Math.sqrt(M*M+D*D),D/=C,M*=g,D*=g;var L=x-_,N=b-w,F=x-E,k=T-w,U=N*F-k*L,B=U<0;if(Math.abs(U)<.1)d.push(x-S*O,w-A*O),d.push(x+S*P,w+A*P);else{var G=(-S+_)*(-A+w)-(-S+x)*(-A+b),z=(-M+E)*(-D+w)-(-M+x)*(-D+T),H=(L*z-F*G)/U,j=(k*G-N*z)/U,V=(H-x)*(H-x)+(j-w)*(j-w),X=x+(H-x)*O,W=w+(j-w)*O,Y=x-(H-x)*P,q=w-(j-w)*P,$=B?O:P;V<=Math.min(L*L+N*N,F*F+k*k)+$*$*v?o.join===xp.BEVEL||V/v>y?(B?(d.push(X,W),d.push(x+S*P,w+A*P),d.push(X,W),d.push(x+M*P,w+D*P)):(d.push(x-S*O,w-A*O),d.push(Y,q),d.push(x-M*O,w-D*O),d.push(Y,q)),f+=2):o.join===xp.ROUND?B?(d.push(X,W),d.push(x+S*P,w+A*P),f+=Fp(x,w,x+S*P,w+A*P,x+M*P,w+D*P,d,!0)+4,d.push(X,W),d.push(x+M*P,w+D*P)):(d.push(x-S*O,w-A*O),d.push(Y,q),f+=Fp(x,w,x-S*O,w-A*O,x-M*O,w-D*O,d,!1)+4,d.push(x-M*O,w-D*O),d.push(Y,q)):(d.push(X,W),d.push(Y,q)):(d.push(x-S*O,w-A*O),d.push(x+S*P,w+A*P),o.join===xp.BEVEL||V/v>y||(o.join===xp.ROUND?f+=B?Fp(x,w,x+S*P,w+A*P,x+M*P,w+D*P,d,!0)+2:Fp(x,w,x-S*O,w-A*O,x-M*O,w-D*O,d,!1)+2:(B?(d.push(Y,q),d.push(Y,q)):(d.push(X,W),d.push(X,W)),f+=2)),d.push(x-M*O,w-D*O),d.push(x+M*P,w+D*P),f+=2)}}_=r[2*(p-2)],b=r[2*(p-2)+1],x=r[2*(p-1)],S=-(b-(w=r[2*(p-1)+1])),A=_-x,S/=C=Math.sqrt(S*S+A*A),A/=C,S*=g,A*=g,d.push(x-S*O,w-A*O),d.push(x+S*P,w+A*P),l||(o.cap===wp.ROUND?f+=Fp(x-S*(O-P)*.5,w-A*(O-P)*.5,x-S*O,w-A*O,x+S*P,w+A*P,d,!1)+2:o.cap===wp.SQUARE&&(f+=Np(x,w,S,A,O,P,!1,d)));var K=e.indices,Z=Sp.epsilon*Sp.epsilon;for(I=m;I<f+m-2;++I)_=d[2*I],b=d[2*I+1],x=d[2*(I+1)],w=d[2*(I+1)+1],E=d[2*(I+2)],T=d[2*(I+2)+1],Math.abs(_*(w-T)+x*(T-b)+E*(b-w))<Z||K.push(I,I+1,I+2)}}(t,e)}var Up,Bp=function(){function t(){}return t.curveTo=function(t,e,n,r,i,o){var s=o[o.length-2],a=o[o.length-1]-e,l=s-t,u=r-e,c=n-t,h=Math.abs(a*c-l*u);if(h<1e-8||0===i)return o[o.length-2]===t&&o[o.length-1]===e||o.push(t,e),null;var d=a*a+l*l,p=u*u+c*c,f=a*u+l*c,m=i*Math.sqrt(d)/h,g=i*Math.sqrt(p)/h,v=m*f/d,y=g*f/p,_=m*c+g*l,b=m*u+g*a,x=l*(g+v),w=a*(g+v),E=c*(m+y),T=u*(m+y);return{cx:_+t,cy:b+e,radius:i,startAngle:Math.atan2(w-b,x-_),endAngle:Math.atan2(T-b,E-_),anticlockwise:l*u>c*a}},t.arc=function(t,e,n,r,i,o,s,a,l){for(var u=s-o,c=Sp._segmentsCount(Math.abs(u)*i,40*Math.ceil(Math.abs(u)/nu)),h=u/(2*c),d=2*h,p=Math.cos(h),f=Math.sin(h),m=c-1,g=m%1/m,v=0;v<=m;++v){var y=h+o+d*(v+g*v),_=Math.cos(y),b=-Math.sin(y);l.push((p*_+f*b)*i+n,(p*-b+f*_)*i+r)}},t}(),Gp=function(){function t(){}return t.curveLength=function(t,e,n,r,i,o,s,a){for(var l=0,u=0,c=0,h=0,d=0,p=0,f=0,m=0,g=0,v=0,y=0,_=t,b=e,x=1;x<=10;++x)v=_-(m=(f=(p=(d=1-(u=x/10))*d)*d)*t+3*p*u*n+3*d*(c=u*u)*i+(h=c*u)*s),y=b-(g=f*e+3*p*u*r+3*d*c*o+h*a),_=m,b=g,l+=Math.sqrt(v*v+y*y);return l},t.curveTo=function(e,n,r,i,o,s,a){var l=a[a.length-2],u=a[a.length-1];a.length-=2;var c=Sp._segmentsCount(t.curveLength(l,u,e,n,r,i,o,s)),h=0,d=0,p=0,f=0,m=0;a.push(l,u);for(var g=1,v=0;g<=c;++g)p=(d=(h=1-(v=g/c))*h)*h,m=(f=v*v)*v,a.push(p*l+3*d*v*e+3*h*f*r+m*o,p*u+3*d*v*n+3*h*f*i+m*s)},t}(),zp=function(){function t(){}return t.curveLength=function(t,e,n,r,i,o){var s=t-2*n+i,a=e-2*r+o,l=2*n-2*t,u=2*r-2*e,c=4*(s*s+a*a),h=4*(s*l+a*u),d=l*l+u*u,p=2*Math.sqrt(c+h+d),f=Math.sqrt(c),m=2*c*f,g=2*Math.sqrt(d),v=h/f;return(m*p+f*h*(p-g)+(4*d*c-h*h)*Math.log((2*f+v+p)/(v+g)))/(4*m)},t.curveTo=function(e,n,r,i,o){for(var s=o[o.length-2],a=o[o.length-1],l=Sp._segmentsCount(t.curveLength(s,a,e,n,r,i)),u=0,c=0,h=1;h<=l;++h){var d=h/l;u=s+(e-s)*d,c=a+(n-a)*d,o.push(u+(e+(r-e)*d-u)*d,c+(n+(i-n)*d-c)*d)}},t}(),Hp=function(){function t(){this.reset()}return t.prototype.begin=function(t,e,n){this.reset(),this.style=t,this.start=e,this.attribStart=n},t.prototype.end=function(t,e){this.attribSize=e-this.attribStart,this.size=t-this.start},t.prototype.reset=function(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0},t}(),jp=((Up={})[eu.POLY]=Cp,Up[eu.CIRC]=Rp,Up[eu.ELIP]=Rp,Up[eu.RECT]=Op,Up[eu.RREC]=Lp,Up),Vp=[],Xp=[];function Wp(t){for(var e=t.points,n=0,r=0;r<e.length-2;r+=2)n+=(e[r+2]-e[r])*(e[r+3]+e[r+1]);return n>0}var Yp=function(){function t(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null),this.points=[],this.holes=[],this.shape=t,this.lineStyle=n,this.fillStyle=e,this.matrix=r,this.type=t.type}return t.prototype.clone=function(){return new t(this.shape,this.fillStyle,this.lineStyle,this.matrix)},t.prototype.destroy=function(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null},t}(),qp=new cu,$p=new wu,Kp=function(t){function e(){var e=t.call(this)||this;return e.closePointEps=1e-4,e.boundsPadding=0,e.uvsFloat32=null,e.indicesUint16=null,e.batchable=!1,e.points=[],e.colors=[],e.uvs=[],e.indices=[],e.textureIds=[],e.graphicsData=[],e.drawCalls=[],e.batchDirty=-1,e.batches=[],e.dirty=0,e.cacheDirty=-1,e.clearDirty=0,e.shapeIndex=0,e._bounds=new wu,e.boundsDirty=-1,e}return Dp(e,t),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds},enumerable:!1,configurable:!0}),e.prototype.invalidate=function(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(var t=0;t<this.drawCalls.length;t++)this.drawCalls[t].texArray.clear(),Xp.push(this.drawCalls[t]);this.drawCalls.length=0;for(t=0;t<this.batches.length;t++){var e=this.batches[t];e.reset(),Vp.push(e)}this.batches.length=0},e.prototype.clear=function(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this},e.prototype.drawShape=function(t,e,n,r){void 0===e&&(e=null),void 0===n&&(n=null),void 0===r&&(r=null);var i=new Yp(t,e,n,r);return this.graphicsData.push(i),this.dirty++,this},e.prototype.drawHole=function(t,e){if(void 0===e&&(e=null),!this.graphicsData.length)return null;var n=new Yp(t,null,null,e),r=this.graphicsData[this.graphicsData.length-1];return n.lineStyle=r.lineStyle,r.holes.push(n),this.dirty++,this},e.prototype.destroy=function(){t.prototype.destroy.call(this);for(var e=0;e<this.graphicsData.length;++e)this.graphicsData[e].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null},e.prototype.containsPoint=function(t){for(var e=this.graphicsData,n=0;n<e.length;++n){var r=e[n];if(r.fillStyle.visible&&(r.shape&&(r.matrix?r.matrix.applyInverse(t,qp):qp.copyFrom(t),r.shape.contains(qp.x,qp.y)))){var i=!1;if(r.holes)for(var o=0;o<r.holes.length;o++){if(r.holes[o].shape.contains(qp.x,qp.y)){i=!0;break}}if(!i)return!0}}return!1},e.prototype.updateBatches=function(t){if(this.graphicsData.length){if(this.validateBatching()){this.cacheDirty=this.dirty;var e=this.uvs,n=this.graphicsData,r=null,i=null;this.batches.length>0&&(i=(r=this.batches[this.batches.length-1]).style);for(var o=this.shapeIndex;o<n.length;o++){this.shapeIndex++;var s=n[o],a=s.fillStyle,l=s.lineStyle;jp[s.type].build(s),s.matrix&&this.transformPoints(s.points,s.matrix);for(var u=0;u<2;u++){var c=0===u?a:l;if(c.visible){var h=c.texture.baseTexture,d=this.indices.length,p=this.points.length/2;h.wrapMode=pl.REPEAT,0===u?this.processFill(s):this.processLine(s);var f=this.points.length/2-p;0!==f&&(r&&!this._compareStyles(i,c)&&(r.end(d,p),r=null),r||((r=Vp.pop()||new Hp).begin(c,d,p),this.batches.push(r),i=c),this.addUvs(this.points,e,c.texture,p,f,c.matrix))}}}var m=this.indices.length,g=this.points.length/2;if(r&&r.end(m,g),0!==this.batches.length){if(this.indicesUint16&&this.indices.length===this.indicesUint16.length)this.indicesUint16.set(this.indices);else{var v=g>65535&&t;this.indicesUint16=v?new Uint32Array(this.indices):new Uint16Array(this.indices)}this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}else this.batchable=!0}}else this.batchable=!0},e.prototype._compareStyles=function(t,e){return!(!t||!e)&&(t.texture.baseTexture===e.texture.baseTexture&&(t.color+t.alpha===e.color+e.alpha&&!!t.native==!!e.native))},e.prototype.validateBatching=function(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(var t=0,e=this.graphicsData.length;t<e;t++){var n=this.graphicsData[t],r=n.fillStyle,i=n.lineStyle;if(r&&!r.texture.baseTexture.valid)return!1;if(i&&!i.texture.baseTexture.valid)return!1}return!0},e.prototype.packBatches=function(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);for(var t=this.batches,e=0,n=t.length;e<n;e++)for(var r=t[e],i=0;i<r.size;i++){var o=r.start+i;this.indicesUint16[o]=this.indicesUint16[o]-r.attribStart}},e.prototype.isBatchable=function(){if(this.points.length>131070)return!1;for(var t=this.batches,n=0;n<t.length;n++)if(t[n].style.native)return!1;return this.points.length<2*e.BATCHABLE_SIZE},e.prototype.buildDrawCalls=function(){for(var t=++Zu._globalBatch,e=0;e<this.drawCalls.length;e++)this.drawCalls[e].texArray.clear(),Xp.push(this.drawCalls[e]);this.drawCalls.length=0;var n=this.colors,r=this.textureIds,i=Xp.pop();i||((i=new Wh).texArray=new Yh),i.texArray.count=0,i.start=0,i.size=0,i.type=al.TRIANGLES;var o=0,s=null,a=0,l=!1,u=al.TRIANGLES,c=0;this.drawCalls.push(i);for(e=0;e<this.batches.length;e++){var h=this.batches[e],d=h.style,p=d.texture.baseTexture;l!==!!d.native&&(u=(l=!!d.native)?al.LINES:al.TRIANGLES,s=null,o=8,t++),s!==p&&(s=p,p._batchEnabled!==t&&(8===o&&(t++,o=0,i.size>0&&((i=Xp.pop())||((i=new Wh).texArray=new Yh),this.drawCalls.push(i)),i.start=c,i.size=0,i.texArray.count=0,i.type=u),p.touched=1,p._batchEnabled=t,p._batchLocation=o,p.wrapMode=pl.REPEAT,i.texArray.elements[i.texArray.count++]=p,o++)),i.size+=h.size,c+=h.size,a=p._batchLocation,this.addColors(n,d.color,d.alpha,h.attribSize,h.attribStart),this.addTextureIds(r,a,h.attribSize,h.attribStart)}Zu._globalBatch=t,this.packAttributes()},e.prototype.packAttributes=function(){for(var t=this.points,e=this.uvs,n=this.colors,r=this.textureIds,i=new ArrayBuffer(3*t.length*4),o=new Float32Array(i),s=new Uint32Array(i),a=0,l=0;l<t.length/2;l++)o[a++]=t[2*l],o[a++]=t[2*l+1],o[a++]=e[2*l],o[a++]=e[2*l+1],s[a++]=n[l],o[a++]=r[l];this._buffer.update(i),this._indexBuffer.update(this.indicesUint16)},e.prototype.processFill=function(t){t.holes.length?(this.processHoles(t.holes),Cp.triangulate(t,this)):jp[t.type].triangulate(t,this)},e.prototype.processLine=function(t){kp(t,this);for(var e=0;e<t.holes.length;e++)kp(t.holes[e],this)},e.prototype.processHoles=function(t){for(var e=0;e<t.length;e++){var n=t[e];jp[n.type].build(n),n.matrix&&this.transformPoints(n.points,n.matrix)}},e.prototype.calculateBounds=function(){var t=this._bounds,e=$p,n=du.IDENTITY;this._bounds.clear(),e.clear();for(var r=0;r<this.graphicsData.length;r++){var i=this.graphicsData[r],o=i.shape,s=i.type,a=i.lineStyle,l=i.matrix||du.IDENTITY,u=0;if(a&&a.visible){var c=a.alignment;u=a.width,s===eu.POLY?Wp(o)?u*=1-c:u*=c:u*=Math.max(0,c)}if(n!==l&&(e.isEmpty()||(t.addBoundsMatrix(e,n),e.clear()),n=l),s===eu.RECT||s===eu.RREC){var h=o;e.addFramePad(h.x,h.y,h.x+h.width,h.y+h.height,u,u)}else if(s===eu.CIRC){var d=o;e.addFramePad(d.x,d.y,d.x,d.y,d.radius+u,d.radius+u)}else if(s===eu.ELIP){var p=o;e.addFramePad(p.x,p.y,p.x,p.y,p.width+u,p.height+u)}else{var f=o;t.addVerticesMatrix(n,f.points,0,f.points.length,u,u)}}e.isEmpty()||t.addBoundsMatrix(e,n),t.pad(this.boundsPadding,this.boundsPadding)},e.prototype.transformPoints=function(t,e){for(var n=0;n<t.length/2;n++){var r=t[2*n],i=t[2*n+1];t[2*n]=e.a*r+e.c*i+e.tx,t[2*n+1]=e.b*r+e.d*i+e.ty}},e.prototype.addColors=function(t,e,n,r,i){void 0===i&&(i=0);var o=kl((e>>16)+(65280&e)+((255&e)<<16),n);t.length=Math.max(t.length,i+r);for(var s=0;s<r;s++)t[i+s]=o},e.prototype.addTextureIds=function(t,e,n,r){void 0===r&&(r=0),t.length=Math.max(t.length,r+n);for(var i=0;i<n;i++)t[r+i]=e},e.prototype.addUvs=function(t,e,n,r,i,o){void 0===o&&(o=null);for(var s=0,a=e.length,l=n.frame;s<i;){var u=t[2*(r+s)],c=t[2*(r+s)+1];if(o){var h=o.a*u+o.c*c+o.tx;c=o.b*u+o.d*c+o.ty,u=h}s++,e.push(u/l.width,c/l.height)}var d=n.baseTexture;(l.width<d.width||l.height<d.height)&&this.adjustUvs(e,n,a,i)},e.prototype.adjustUvs=function(t,e,n,r){for(var i=e.baseTexture,o=1e-6,s=n+2*r,a=e.frame,l=a.width/i.width,u=a.height/i.height,c=a.x/a.width,h=a.y/a.height,d=Math.floor(t[n]+o),p=Math.floor(t[n+1]+o),f=n+2;f<s;f+=2)d=Math.min(d,Math.floor(t[f]+o)),p=Math.min(p,Math.floor(t[f+1]+o));c-=d,h-=p;for(f=n;f<s;f+=2)t[f]=(t[f]+c)*l,t[f+1]=(t[f+1]+h)*u},e.BATCHABLE_SIZE=100,e}(Zh),Zp=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.width=0,e.alignment=.5,e.native=!1,e.cap=wp.BUTT,e.join=xp.MITER,e.miterLimit=10,e}return Dp(e,t),e.prototype.clone=function(){var t=new e;return t.color=this.color,t.alpha=this.alpha,t.texture=this.texture,t.matrix=this.matrix,t.visible=this.visible,t.width=this.width,t.alignment=this.alignment,t.native=this.native,t.cap=this.cap,t.join=this.join,t.miterLimit=this.miterLimit,t},e.prototype.reset=function(){t.prototype.reset.call(this),this.color=0,this.alignment=.5,this.width=0,this.native=!1},e}(Ap),Jp=new Float32Array(3),Qp={},tf=function(t){function e(e){void 0===e&&(e=null);var n=t.call(this)||this;return n.shader=null,n.pluginName="batch",n.currentPath=null,n.batches=[],n.batchTint=-1,n.batchDirty=-1,n.vertexData=null,n._fillStyle=new Ap,n._lineStyle=new Zp,n._matrix=null,n._holeMode=!1,n.state=ph.for2d(),n._geometry=e||new Kp,n._geometry.refCount++,n._transformID=-1,n.tint=16777215,n.blendMode=sl.NORMAL,n}return Dp(e,t),Object.defineProperty(e.prototype,"geometry",{get:function(){return this._geometry},enumerable:!1,configurable:!0}),e.prototype.clone=function(){return this.finishPoly(),new e(this._geometry)},Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fill",{get:function(){return this._fillStyle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"line",{get:function(){return this._lineStyle},enumerable:!1,configurable:!0}),e.prototype.lineStyle=function(t,e,n,r,i){return void 0===t&&(t=null),void 0===e&&(e=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===i&&(i=!1),"number"==typeof t&&(t={width:t,color:e,alpha:n,alignment:r,native:i}),this.lineTextureStyle(t)},e.prototype.lineTextureStyle=function(t){t=Object.assign({width:0,texture:pc.WHITE,color:t&&t.texture?16777215:0,alpha:1,matrix:null,alignment:.5,native:!1,cap:wp.BUTT,join:xp.MITER,miterLimit:10},t),this.currentPath&&this.startPoly();var e=t.width>0&&t.alpha>0;return e?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._lineStyle,{visible:e},t)):this._lineStyle.reset(),this},e.prototype.startPoly=function(){if(this.currentPath){var t=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new lu,this.currentPath.closeStroke=!1,this.currentPath.points.push(t[e-2],t[e-1]))}else this.currentPath=new lu,this.currentPath.closeStroke=!1},e.prototype.finishPoly=function(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)},e.prototype.moveTo=function(t,e){return this.startPoly(),this.currentPath.points[0]=t,this.currentPath.points[1]=e,this},e.prototype.lineTo=function(t,e){this.currentPath||this.moveTo(0,0);var n=this.currentPath.points,r=n[n.length-2],i=n[n.length-1];return r===t&&i===e||n.push(t,e),this},e.prototype._initCurve=function(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.currentPath?0===this.currentPath.points.length&&(this.currentPath.points=[t,e]):this.moveTo(t,e)},e.prototype.quadraticCurveTo=function(t,e,n,r){this._initCurve();var i=this.currentPath.points;return 0===i.length&&this.moveTo(0,0),zp.curveTo(t,e,n,r,i),this},e.prototype.bezierCurveTo=function(t,e,n,r,i,o){return this._initCurve(),Gp.curveTo(t,e,n,r,i,o,this.currentPath.points),this},e.prototype.arcTo=function(t,e,n,r,i){this._initCurve(t,e);var o=this.currentPath.points,s=Bp.curveTo(t,e,n,r,i,o);if(s){var a=s.cx,l=s.cy,u=s.radius,c=s.startAngle,h=s.endAngle,d=s.anticlockwise;this.arc(a,l,u,c,h,d)}return this},e.prototype.arc=function(t,e,n,r,i,o){if(void 0===o&&(o=!1),r===i)return this;if(!o&&i<=r?i+=nu:o&&r<=i&&(r+=nu),0===i-r)return this;var s=t+Math.cos(r)*n,a=e+Math.sin(r)*n,l=this._geometry.closePointEps,u=this.currentPath?this.currentPath.points:null;if(u){var c=Math.abs(u[u.length-2]-s),h=Math.abs(u[u.length-1]-a);c<l&&h<l||u.push(s,a)}else this.moveTo(s,a),u=this.currentPath.points;return Bp.arc(s,a,t,e,n,r,i,o,u),this},e.prototype.beginFill=function(t,e){return void 0===t&&(t=0),void 0===e&&(e=1),this.beginTextureFill({texture:pc.WHITE,color:t,alpha:e})},e.prototype.beginTextureFill=function(t){t=Object.assign({texture:pc.WHITE,color:16777215,alpha:1,matrix:null},t),this.currentPath&&this.startPoly();var e=t.alpha>0;return e?(t.matrix&&(t.matrix=t.matrix.clone(),t.matrix.invert()),Object.assign(this._fillStyle,{visible:e},t)):this._fillStyle.reset(),this},e.prototype.endFill=function(){return this.finishPoly(),this._fillStyle.reset(),this},e.prototype.drawRect=function(t,e,n,r){return this.drawShape(new ou(t,e,n,r))},e.prototype.drawRoundedRect=function(t,e,n,r,i){return this.drawShape(new uu(t,e,n,r,i))},e.prototype.drawCircle=function(t,e,n){return this.drawShape(new su(t,e,n))},e.prototype.drawEllipse=function(t,e,n,r){return this.drawShape(new au(t,e,n,r))},e.prototype.drawPolygon=function(){for(var t,e=arguments,n=[],r=0;r<arguments.length;r++)n[r]=e[r];var i=!0,o=n[0];o.points?(i=o.closeStroke,t=o.points):t=Array.isArray(n[0])?n[0]:n;var s=new lu(t);return s.closeStroke=i,this.drawShape(s),this},e.prototype.drawShape=function(t){return this._holeMode?this._geometry.drawHole(t,this._matrix):this._geometry.drawShape(t,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this},e.prototype.clear=function(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this},e.prototype.isFastRect=function(){var t=this._geometry.graphicsData;return!(1!==t.length||t[0].shape.type!==eu.RECT||t[0].holes.length||t[0].lineStyle.visible&&t[0].lineStyle.width)},e.prototype._render=function(t){this.finishPoly();var e=this._geometry,n=t.context.supports.uint32Indices;e.updateBatches(n),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(t)):(t.batch.flush(),this._renderDirect(t))},e.prototype._populateBatches=function(){var t=this._geometry,e=this.blendMode,n=t.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=t.batchDirty,this.batches.length=n,this.vertexData=new Float32Array(t.points);for(var r=0;r<n;r++){var i=t.batches[r],o=i.style.color,s=new Float32Array(this.vertexData.buffer,4*i.attribStart*2,2*i.attribSize),a=new Float32Array(t.uvsFloat32.buffer,4*i.attribStart*2,2*i.attribSize),l={vertexData:s,blendMode:e,indices:new Uint16Array(t.indicesUint16.buffer,2*i.start,i.size),uvs:a,_batchRGB:Pl(o),_tintRGB:o,_texture:i.style.texture,alpha:i.style.alpha,worldAlpha:1};this.batches[r]=l}},e.prototype._renderBatched=function(t){if(this.batches.length){t.batch.setObjectRenderer(t.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(var e=0,n=this.batches.length;e<n;e++){var r=this.batches[e];r.worldAlpha=this.worldAlpha*r.alpha,t.plugins[this.pluginName].render(r)}}},e.prototype._renderDirect=function(t){var e=this._resolveDirectShader(t),n=this._geometry,r=this.tint,i=this.worldAlpha,o=e.uniforms,s=n.drawCalls;o.translationMatrix=this.transform.worldTransform,o.tint[0]=(r>>16&255)/255*i,o.tint[1]=(r>>8&255)/255*i,o.tint[2]=(255&r)/255*i,o.tint[3]=i,t.shader.bind(e),t.geometry.bind(n,e),t.state.set(this.state);for(var a=0,l=s.length;a<l;a++)this._renderDrawCallDirect(t,n.drawCalls[a])},e.prototype._renderDrawCallDirect=function(t,e){for(var n=e.texArray,r=e.type,i=e.size,o=e.start,s=n.count,a=0;a<s;a++)t.texture.bind(n.elements[a],a);t.geometry.draw(r,i,o)},e.prototype._resolveDirectShader=function(t){var e=this.shader,n=this.pluginName;if(!e){if(!Qp[n]){for(var r=t.plugins.batch.MAX_TEXTURES,i=new Int32Array(r),o=0;o<r;o++)i[o]=o;var s={tint:new Float32Array([1,1,1,1]),translationMatrix:new du,default:Dc.from({uSamplers:i},!0)},a=t.plugins[n]._shader.program;Qp[n]=new dh(a,s)}e=Qp[n]}return e},e.prototype._calculateBounds=function(){this.finishPoly();var t=this._geometry;if(t.graphicsData.length){var e=t.bounds,n=e.minX,r=e.minY,i=e.maxX,o=e.maxY;this._bounds.addFrame(this.transform,n,r,i,o)}},e.prototype.containsPoint=function(t){return this.worldTransform.applyInverse(t,e._TEMP_POINT),this._geometry.containsPoint(e._TEMP_POINT)},e.prototype.calculateTints=function(){if(this.batchTint!==this.tint){this.batchTint=this.tint;for(var t=Pl(this.tint,Jp),e=0;e<this.batches.length;e++){var n=this.batches[e],r=n._batchRGB,i=(t[0]*r[0]*255<<16)+(t[1]*r[1]*255<<8)+(0|t[2]*r[2]*255);n._tintRGB=(i>>16)+(65280&i)+((255&i)<<16)}}},e.prototype.calculateVertices=function(){var t=this.transform._worldID;if(this._transformID!==t){this._transformID=t;for(var e=this.transform.worldTransform,n=e.a,r=e.b,i=e.c,o=e.d,s=e.tx,a=e.ty,l=this._geometry.points,u=this.vertexData,c=0,h=0;h<l.length;h+=2){var d=l[h],p=l[h+1];u[c++]=n*d+i*p+s,u[c++]=o*p+r*d+a}}},e.prototype.closePath=function(){var t=this.currentPath;return t&&(t.closeStroke=!0,this.finishPoly()),this},e.prototype.setMatrix=function(t){return this._matrix=t,this},e.prototype.beginHole=function(){return this.finishPoly(),this._holeMode=!0,this},e.prototype.endHole=function(){return this.finishPoly(),this._holeMode=!1,this},e.prototype.destroy=function(e){this._geometry.refCount--,0===this._geometry.refCount&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,t.prototype.destroy.call(this,e)},e._TEMP_POINT=new cu,e}(Du),ef=function(t,e){return(ef=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])})(t,e)};var nf,rf=new cu,of=new Uint16Array([0,1,2,0,2,3]),sf=function(t){function e(e){var n=t.call(this)||this;return n._anchor=new hu(n._onAnchorUpdate,n,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),n._texture=null,n._width=0,n._height=0,n._tint=null,n._tintRGB=null,n.tint=16777215,n.blendMode=sl.NORMAL,n._cachedTint=16777215,n.uvs=null,n.texture=e||pc.EMPTY,n.vertexData=new Float32Array(8),n.vertexTrimmedData=null,n._transformID=-1,n._textureID=-1,n._transformTrimmedID=-1,n._textureTrimmedID=-1,n.indices=of,n.pluginName="batch",n.isSprite=!0,n._roundPixels=wl.ROUND_PIXELS,n}return function(t,e){function n(){this.constructor=t}ef(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype._onTextureUpdate=function(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=Vl(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=Vl(this.scale.y)*this._height/this._texture.orig.height)},e.prototype._onAnchorUpdate=function(){this._transformID=-1,this._transformTrimmedID=-1},e.prototype.calculateVertices=function(){var t=this._texture;if(this._transformID!==this.transform._worldID||this._textureID!==t._updateID){this._textureID!==t._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=t._updateID;var e=this.transform.worldTransform,n=e.a,r=e.b,i=e.c,o=e.d,s=e.tx,a=e.ty,l=this.vertexData,u=t.trim,c=t.orig,h=this._anchor,d=0,p=0,f=0,m=0;if(u?(d=(p=u.x-h._x*c.width)+u.width,f=(m=u.y-h._y*c.height)+u.height):(d=(p=-h._x*c.width)+c.width,f=(m=-h._y*c.height)+c.height),l[0]=n*p+i*m+s,l[1]=o*m+r*p+a,l[2]=n*d+i*m+s,l[3]=o*m+r*d+a,l[4]=n*d+i*f+s,l[5]=o*f+r*d+a,l[6]=n*p+i*f+s,l[7]=o*f+r*p+a,this._roundPixels)for(var g=wl.RESOLUTION,v=0;v<l.length;++v)l[v]=Math.round((l[v]*g|0)/g)}},e.prototype.calculateTrimmedVertices=function(){if(this.vertexTrimmedData){if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return}else this.vertexTrimmedData=new Float32Array(8);this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;var t=this._texture,e=this.vertexTrimmedData,n=t.orig,r=this._anchor,i=this.transform.worldTransform,o=i.a,s=i.b,a=i.c,l=i.d,u=i.tx,c=i.ty,h=-r._x*n.width,d=h+n.width,p=-r._y*n.height,f=p+n.height;e[0]=o*h+a*p+u,e[1]=l*p+s*h+c,e[2]=o*d+a*p+u,e[3]=l*p+s*d+c,e[4]=o*d+a*f+u,e[5]=l*f+s*d+c,e[6]=o*h+a*f+u,e[7]=l*f+s*h+c},e.prototype._render=function(t){this.calculateVertices(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this)},e.prototype._calculateBounds=function(){var t=this._texture.trim,e=this._texture.orig;!t||t.width===e.width&&t.height===e.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._texture.orig.width*-this._anchor._x,this._bounds.minY=this._texture.orig.height*-this._anchor._y,this._bounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._bounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new ou),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,rf);var e=this._texture.orig.width,n=this._texture.orig.height,r=-e*this.anchor.x,i=0;return rf.x>=r&&rf.x<r+e&&(i=-n*this.anchor.y,rf.y>=i&&rf.y<i+n)},e.prototype.destroy=function(e){if(t.prototype.destroy.call(this,e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,"boolean"==typeof e?e:e&&e.texture){var n="boolean"==typeof e?e:e&&e.baseTexture;this._texture.destroy(!!n)}this._texture=null},e.from=function(t,n){return new e(t instanceof pc?t:pc.from(t,n))},Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"width",{get:function(){return Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){var e=Vl(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){var e=Vl(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{get:function(){return this._anchor},set:function(t){this._anchor.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return this._texture},set:function(t){this._texture!==t&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=t||pc.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,t&&(t.baseTexture.valid?this._onTextureUpdate():t.once("update",this._onTextureUpdate,this)))},enumerable:!1,configurable:!0}),e}(Du),af=function(t,e){return(af=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])})(t,e)};!function(t){t[t.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",t[t.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL"}(nf||(nf={}));var lf={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:nf.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100,leading:0},uf=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],cf=function(){function t(t){this.styleID=0,this.reset(),pf(this,t,t)}return t.prototype.clone=function(){var e={};return pf(e,this,lf),new t(e)},t.prototype.reset=function(){pf(this,lf,lf)},Object.defineProperty(t.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"breakWords",{get:function(){return this._breakWords},set:function(t){this._breakWords!==t&&(this._breakWords=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadow",{get:function(){return this._dropShadow},set:function(t){this._dropShadow!==t&&(this._dropShadow=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAlpha",{get:function(){return this._dropShadowAlpha},set:function(t){this._dropShadowAlpha!==t&&(this._dropShadowAlpha=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowAngle",{get:function(){return this._dropShadowAngle},set:function(t){this._dropShadowAngle!==t&&(this._dropShadowAngle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowBlur",{get:function(){return this._dropShadowBlur},set:function(t){this._dropShadowBlur!==t&&(this._dropShadowBlur=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowColor",{get:function(){return this._dropShadowColor},set:function(t){var e=df(t);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropShadowDistance",{get:function(){return this._dropShadowDistance},set:function(t){this._dropShadowDistance!==t&&(this._dropShadowDistance=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fill",{get:function(){return this._fill},set:function(t){var e=df(t);this._fill!==e&&(this._fill=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientType",{get:function(){return this._fillGradientType},set:function(t){this._fillGradientType!==t&&(this._fillGradientType=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fillGradientStops",{get:function(){return this._fillGradientStops},set:function(t){(function(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t.length!==e.length)return!1;for(var n=0;n<t.length;++n)if(t[n]!==e[n])return!1;return!0})(this._fillGradientStops,t)||(this._fillGradientStops=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(t){this.fontFamily!==t&&(this._fontFamily=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontStyle",{get:function(){return this._fontStyle},set:function(t){this._fontStyle!==t&&(this._fontStyle=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontVariant",{get:function(){return this._fontVariant},set:function(t){this._fontVariant!==t&&(this._fontVariant=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"fontWeight",{get:function(){return this._fontWeight},set:function(t){this._fontWeight!==t&&(this._fontWeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineHeight",{get:function(){return this._lineHeight},set:function(t){this._lineHeight!==t&&(this._lineHeight=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"leading",{get:function(){return this._leading},set:function(t){this._leading!==t&&(this._leading=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lineJoin",{get:function(){return this._lineJoin},set:function(t){this._lineJoin!==t&&(this._lineJoin=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"miterLimit",{get:function(){return this._miterLimit},set:function(t){this._miterLimit!==t&&(this._miterLimit=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this._padding},set:function(t){this._padding!==t&&(this._padding=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"stroke",{get:function(){return this._stroke},set:function(t){var e=df(t);this._stroke!==e&&(this._stroke=e,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"strokeThickness",{get:function(){return this._strokeThickness},set:function(t){this._strokeThickness!==t&&(this._strokeThickness=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textBaseline",{get:function(){return this._textBaseline},set:function(t){this._textBaseline!==t&&(this._textBaseline=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trim",{get:function(){return this._trim},set:function(t){this._trim!==t&&(this._trim=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"whiteSpace",{get:function(){return this._whiteSpace},set:function(t){this._whiteSpace!==t&&(this._whiteSpace=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrap",{get:function(){return this._wordWrap},set:function(t){this._wordWrap!==t&&(this._wordWrap=t,this.styleID++)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wordWrapWidth",{get:function(){return this._wordWrapWidth},set:function(t){this._wordWrapWidth!==t&&(this._wordWrapWidth=t,this.styleID++)},enumerable:!1,configurable:!0}),t.prototype.toFontString=function(){var t="number"==typeof this.fontSize?this.fontSize+"px":this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(var n=e.length-1;n>=0;n--){var r=e[n].trim();!/([\"\'])[^\'\"]+\1/.test(r)&&uf.indexOf(r)<0&&(r='"'+r+'"'),e[n]=r}return this.fontStyle+" "+this.fontVariant+" "+this.fontWeight+" "+t+" "+e.join(",")},t}();function hf(t){return"number"==typeof t?Il(t):("string"==typeof t&&0===t.indexOf("0x")&&(t=t.replace("0x","#")),t)}function df(t){if(Array.isArray(t)){for(var e=0;e<t.length;++e)t[e]=hf(t[e]);return t}return hf(t)}function pf(t,e,n){for(var r in n)Array.isArray(e[r])?t[r]=e[r].slice():t[r]=e[r]}var ff=function(){function t(t,e,n,r,i,o,s,a,l){this.text=t,this.style=e,this.width=n,this.height=r,this.lines=i,this.lineWidths=o,this.lineHeight=s,this.maxLineWidth=a,this.fontProperties=l}return t.measureText=function(e,n,r,i){void 0===i&&(i=t._canvas),r=null==r?n.wordWrap:r;var o=n.toFontString(),s=t.measureFont(o);0===s.fontSize&&(s.fontSize=n.fontSize,s.ascent=n.fontSize);var a=i.getContext("2d");a.font=o;for(var l=(r?t.wordWrap(e,n,i):e).split(/(?:\r\n|\r|\n)/),u=new Array(l.length),c=0,h=0;h<l.length;h++){var d=a.measureText(l[h]).width+(l[h].length-1)*n.letterSpacing;u[h]=d,c=Math.max(c,d)}var p=c+n.strokeThickness;n.dropShadow&&(p+=n.dropShadowDistance);var f=n.lineHeight||s.fontSize+n.strokeThickness,m=Math.max(f,s.fontSize+n.strokeThickness)+(l.length-1)*(f+n.leading);return n.dropShadow&&(m+=n.dropShadowDistance),new t(e,n,p,m,l,u,f+n.leading,c,s)},t.wordWrap=function(e,n,r){void 0===r&&(r=t._canvas);for(var i=r.getContext("2d"),o=0,s="",a="",l=Object.create(null),u=n.letterSpacing,c=n.whiteSpace,h=t.collapseSpaces(c),d=t.collapseNewlines(c),p=!h,f=n.wordWrapWidth+u,m=t.tokenize(e),g=0;g<m.length;g++){var v=m[g];if(t.isNewline(v)){if(!d){a+=t.addLine(s),p=!h,s="",o=0;continue}v=" "}if(h){var y=t.isBreakingSpace(v),_=t.isBreakingSpace(s[s.length-1]);if(y&&_)continue}var b=t.getFromCache(v,u,l,i);if(b>f)if(""!==s&&(a+=t.addLine(s),s="",o=0),t.canBreakWords(v,n.breakWords))for(var x=t.wordWrapSplit(v),w=0;w<x.length;w++){for(var E=x[w],T=1;x[w+T];){var S=x[w+T],A=E[E.length-1];if(t.canBreakChars(A,S,v,w,n.breakWords))break;E+=S,T++}w+=E.length-1;var M=t.getFromCache(E,u,l,i);M+o>f&&(a+=t.addLine(s),p=!1,s="",o=0),s+=E,o+=M}else{s.length>0&&(a+=t.addLine(s),s="",o=0);var D=g===m.length-1;a+=t.addLine(v,!D),p=!1,s="",o=0}else b+o>f&&(p=!1,a+=t.addLine(s),s="",o=0),(s.length>0||!t.isBreakingSpace(v)||p)&&(s+=v,o+=b)}return a+=t.addLine(s,!1)},t.addLine=function(e,n){return void 0===n&&(n=!0),e=t.trimRight(e),e=n?e+"\n":e},t.getFromCache=function(t,e,n,r){var i=n[t];if("number"!=typeof i){var o=t.length*e;i=r.measureText(t).width+o,n[t]=i}return i},t.collapseSpaces=function(t){return"normal"===t||"pre-line"===t},t.collapseNewlines=function(t){return"normal"===t},t.trimRight=function(e){if("string"!=typeof e)return"";for(var n=e.length-1;n>=0;n--){var r=e[n];if(!t.isBreakingSpace(r))break;e=e.slice(0,-1)}return e},t.isNewline=function(e){return"string"==typeof e&&t._newlines.indexOf(e.charCodeAt(0))>=0},t.isBreakingSpace=function(e,n){return"string"==typeof e&&t._breakingSpaces.indexOf(e.charCodeAt(0))>=0},t.tokenize=function(e){var n=[],r="";if("string"!=typeof e)return n;for(var i=0;i<e.length;i++){var o=e[i],s=e[i+1];t.isBreakingSpace(o,s)||t.isNewline(o)?(""!==r&&(n.push(r),r=""),n.push(o)):r+=o}return""!==r&&n.push(r),n},t.canBreakWords=function(t,e){return e},t.canBreakChars=function(t,e,n,r,i){return!0},t.wordWrapSplit=function(t){return t.split("")},t.measureFont=function(e){if(t._fonts[e])return t._fonts[e];var n={ascent:0,descent:0,fontSize:0},r=t._canvas,i=t._context;i.font=e;var o=t.METRICS_STRING+t.BASELINE_SYMBOL,s=Math.ceil(i.measureText(o).width),a=Math.ceil(i.measureText(t.BASELINE_SYMBOL).width),l=Math.ceil(t.HEIGHT_MULTIPLIER*a);a=a*t.BASELINE_MULTIPLIER|0,r.width=s,r.height=l,i.fillStyle="#f00",i.fillRect(0,0,s,l),i.font=e,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(o,0,a);var u=i.getImageData(0,0,s,l).data,c=u.length,h=4*s,d=0,p=0,f=!1;for(d=0;d<a;++d){for(var m=0;m<h;m+=4)if(255!==u[p+m]){f=!0;break}if(f)break;p+=h}for(n.ascent=a-d,p=c-h,f=!1,d=l;d>a;--d){for(m=0;m<h;m+=4)if(255!==u[p+m]){f=!0;break}if(f)break;p-=h}return n.descent=d-a,n.fontSize=n.ascent+n.descent,t._fonts[e]=n,n},t.clearMetrics=function(e){void 0===e&&(e=""),e?delete t._fonts[e]:t._fonts={}},t}(),mf=function(){try{var t=new OffscreenCanvas(0,0),e=t.getContext("2d");return e&&e.measureText?t:document.createElement("canvas")}catch(t){return document.createElement("canvas")}}();mf.width=mf.height=10,ff._canvas=mf,ff._context=mf.getContext("2d"),ff._fonts={},ff.METRICS_STRING="|ÉqÅ",ff.BASELINE_SYMBOL="M",ff.BASELINE_MULTIPLIER=1.4,ff.HEIGHT_MULTIPLIER=2,ff._newlines=[10,13],ff._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var gf={texture:!0,children:!1,baseTexture:!0},vf=function(t){function e(e,n,r){var i=this,o=!1;r||(r=document.createElement("canvas"),o=!0),r.width=3,r.height=3;var s=pc.from(r);return s.orig=new ou,s.trim=new ou,(i=t.call(this,s)||this)._ownCanvas=o,i.canvas=r,i.context=i.canvas.getContext("2d"),i._resolution=wl.RESOLUTION,i._autoResolution=!0,i._text=null,i._style=null,i._styleListener=null,i._font="",i.text=e,i.style=n,i.localStyleID=-1,i}return function(t,e){function n(){this.constructor=t}af(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.updateText=function(t){var n=this._style;if(this.localStyleID!==n.styleID&&(this.dirty=!0,this.localStyleID=n.styleID),this.dirty||!t){this._font=this._style.toFontString();var r,i,o=this.context,s=ff.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),a=s.width,l=s.height,u=s.lines,c=s.lineHeight,h=s.lineWidths,d=s.maxLineWidth,p=s.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,a)+2*n.padding)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,l)+2*n.padding)*this._resolution),o.scale(this._resolution,this._resolution),o.clearRect(0,0,this.canvas.width,this.canvas.height),o.font=this._font,o.lineWidth=n.strokeThickness,o.textBaseline=n.textBaseline,o.lineJoin=n.lineJoin,o.miterLimit=n.miterLimit;for(var f=n.dropShadow?2:1,m=0;m<f;++m){var g=n.dropShadow&&0===m,v=g?Math.ceil(Math.max(1,l)+2*n.padding):0,y=v*this._resolution;if(g){o.fillStyle="black",o.strokeStyle="black";var _=n.dropShadowColor,b=Pl("number"==typeof _?_:Ll(_));o.shadowColor="rgba("+255*b[0]+","+255*b[1]+","+255*b[2]+","+n.dropShadowAlpha+")",o.shadowBlur=n.dropShadowBlur,o.shadowOffsetX=Math.cos(n.dropShadowAngle)*n.dropShadowDistance,o.shadowOffsetY=Math.sin(n.dropShadowAngle)*n.dropShadowDistance+y}else o.fillStyle=this._generateFillStyle(n,u,s),o.strokeStyle=n.stroke,o.shadowColor="black",o.shadowBlur=0,o.shadowOffsetX=0,o.shadowOffsetY=0;var x=(c-p.fontSize)/2;(!e.nextLineHeightBehavior||c-p.fontSize<0)&&(x=0);for(var w=0;w<u.length;w++)r=n.strokeThickness/2,i=n.strokeThickness/2+w*c+p.ascent+x,"right"===n.align?r+=d-h[w]:"center"===n.align&&(r+=(d-h[w])/2),n.stroke&&n.strokeThickness&&this.drawLetterSpacing(u[w],r+n.padding,i+n.padding-v,!0),n.fill&&this.drawLetterSpacing(u[w],r+n.padding,i+n.padding-v)}this.updateTexture()}},e.prototype.drawLetterSpacing=function(t,e,n,r){void 0===r&&(r=!1);var i=this._style.letterSpacing;if(0!==i)for(var o=e,s=Array.from?Array.from(t):t.split(""),a=this.context.measureText(t).width,l=0,u=0;u<s.length;++u){var c=s[u];r?this.context.strokeText(c,o,n):this.context.fillText(c,o,n),o+=a-(l=this.context.measureText(t.substring(u+1)).width)+i,a=l}else r?this.context.strokeText(t,e,n):this.context.fillText(t,e,n)},e.prototype.updateTexture=function(){var t=this.canvas;if(this._style.trim){var e=function(t){var e,n,r,i=t.width,o=t.height,s=t.getContext("2d"),a=s.getImageData(0,0,i,o).data,l=a.length,u={top:null,left:null,right:null,bottom:null},c=null;for(e=0;e<l;e+=4)0!==a[e+3]&&(n=e/4%i,r=~~(e/4/i),null===u.top&&(u.top=r),(null===u.left||n<u.left)&&(u.left=n),(null===u.right||u.right<n)&&(u.right=n+1),(null===u.bottom||u.bottom<r)&&(u.bottom=r));return null!==u.top&&(i=u.right-u.left,o=u.bottom-u.top+1,c=s.getImageData(u.left,u.top,i,o)),{height:o,width:i,data:c}}(t);e.data&&(t.width=e.width,t.height=e.height,this.context.putImageData(e.data,0,0))}var n=this._texture,r=this._style,i=r.trim?0:r.padding,o=n.baseTexture;n.trim.width=n._frame.width=t.width/this._resolution,n.trim.height=n._frame.height=t.height/this._resolution,n.trim.x=-i,n.trim.y=-i,n.orig.width=n._frame.width-2*i,n.orig.height=n._frame.height-2*i,this._onTextureUpdate(),o.setRealSize(t.width,t.height,this._resolution),n.updateUvs(),this._recursivePostUpdateTransform(),this.dirty=!1},e.prototype._render=function(e){this._autoResolution&&this._resolution!==e.resolution&&(this._resolution=e.resolution,this.dirty=!0),this.updateText(!0),t.prototype._render.call(this,e)},e.prototype.getLocalBounds=function(e){return this.updateText(!0),t.prototype.getLocalBounds.call(this,e)},e.prototype._calculateBounds=function(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)},e.prototype._generateFillStyle=function(t,e,n){var r,i=t.fill;if(!Array.isArray(i))return i;if(1===i.length)return i[0];var o=t.dropShadow?t.dropShadowDistance:0,s=t.padding||0,a=this.canvas.width/this._resolution-o-2*s,l=this.canvas.height/this._resolution-o-2*s,u=i.slice(),c=t.fillGradientStops.slice();if(!c.length)for(var h=u.length+1,d=1;d<h;++d)c.push(d/h);if(u.unshift(i[0]),c.unshift(0),u.push(i[i.length-1]),c.push(1),t.fillGradientType===nf.LINEAR_VERTICAL){r=this.context.createLinearGradient(a/2,s,a/2,l+s);var p=n.fontProperties.fontSize+t.strokeThickness;for(d=0;d<e.length;d++){var f=n.lineHeight*(d-1)+p,m=n.lineHeight*d,g=m;d>0&&f>m&&(g=(m+f)/2);var v=m+p,y=n.lineHeight*(d+1),_=v;d+1<e.length&&y<v&&(_=(v+y)/2);for(var b=(_-g)/l,x=0;x<u.length;x++){var w=0;w="number"==typeof c[x]?c[x]:x/u.length;var E=Math.min(1,Math.max(0,g/l+w*b));E=Number(E.toFixed(5)),r.addColorStop(E,u[x])}}}else{r=this.context.createLinearGradient(s,l/2,a+s,l/2);var T=u.length+1,S=1;for(d=0;d<u.length;d++){var A=void 0;A="number"==typeof c[d]?c[d]:S/T,r.addColorStop(A,u[d]),S++}}return r},e.prototype.destroy=function(e){"boolean"==typeof e&&(e={children:e}),e=Object.assign({},gf,e),t.prototype.destroy.call(this,e),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null},Object.defineProperty(e.prototype,"width",{get:function(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width},set:function(t){this.updateText(!0);var e=Vl(this.scale.x)||1;this.scale.x=e*t/this._texture.orig.width,this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height},set:function(t){this.updateText(!0);var e=Vl(this.scale.y)||1;this.scale.y=e*t/this._texture.orig.height,this._height=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"style",{get:function(){return this._style},set:function(t){t=t||{},this._style=t instanceof cf?t:new cf(t),this.localStyleID=-1,this.dirty=!0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resolution",{get:function(){return this._resolution},set:function(t){this._autoResolution=!1,this._resolution!==t&&(this._resolution=t,this.dirty=!0)},enumerable:!1,configurable:!0}),e.nextLineHeightBehavior=!1,e}(sf);wl.UPLOADS_PER_FRAME=4;var yf=function(t,e){return(yf=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])})(t,e)};var _f=function(){function t(t){this.maxItemsPerFrame=t,this.itemsLeft=0}return t.prototype.beginFrame=function(){this.itemsLeft=this.maxItemsPerFrame},t.prototype.allowedToUpload=function(){return this.itemsLeft-- >0},t}();function bf(t,e){var n=!1;if(t&&t._textures&&t._textures.length)for(var r=0;r<t._textures.length;r++)if(t._textures[r]instanceof pc){var i=t._textures[r].baseTexture;-1===e.indexOf(i)&&(e.push(i),n=!0)}return n}function xf(t,e){if(t.baseTexture instanceof Zu){var n=t.baseTexture;return-1===e.indexOf(n)&&e.push(n),!0}return!1}function wf(t,e){if(t._texture&&t._texture instanceof pc){var n=t._texture.baseTexture;return-1===e.indexOf(n)&&e.push(n),!0}return!1}function Ef(t,e){return e instanceof vf&&(e.updateText(!0),!0)}function Tf(t,e){if(e instanceof cf){var n=e.toFontString();return ff.measureFont(n),!0}return!1}function Sf(t,e){if(t instanceof vf){-1===e.indexOf(t.style)&&e.push(t.style),-1===e.indexOf(t)&&e.push(t);var n=t._texture.baseTexture;return-1===e.indexOf(n)&&e.push(n),!0}return!1}function Af(t,e){return t instanceof cf&&(-1===e.indexOf(t)&&e.push(t),!0)}function Mf(t,e){return e instanceof Zu&&(e._glTextures[t.CONTEXT_UID]||t.texture.bind(e),!0)}function Df(t,e){if(!(e instanceof tf))return!1;var n=e.geometry;e.finishPoly(),n.updateBatches();for(var r=n.batches,i=0;i<r.length;i++){var o=r[i].style.texture;o&&Mf(t,o.baseTexture)}return n.batchable||t.geometry.bind(n,e._resolveDirectShader(t)),!0}function Cf(t,e){return t instanceof tf&&(e.push(t),!0)}var Rf=function(t){function e(e){var n=t.call(this,e)||this;return n.uploadHookHelper=n.renderer,n.registerFindHook(Cf),n.registerUploadHook(Mf),n.registerUploadHook(Df),n}return function(t,e){function n(){this.constructor=t}yf(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(function(){function t(t){var e=this;this.limiter=new _f(wl.UPLOADS_PER_FRAME),this.renderer=t,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=function(){e.queue&&e.prepareItems()},this.registerFindHook(Sf),this.registerFindHook(Af),this.registerFindHook(bf),this.registerFindHook(xf),this.registerFindHook(wf),this.registerUploadHook(Ef),this.registerUploadHook(Tf)}return t.prototype.upload=function(t,e){"function"==typeof t&&(e=t,t=null),t&&this.add(t),this.queue.length?(e&&this.completes.push(e),this.ticking||(this.ticking=!0,Pu.system.addOnce(this.tick,this,Cu.UTILITY))):e&&e()},t.prototype.tick=function(){setTimeout(this.delayedTick,0)},t.prototype.prepareItems=function(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){var t=this.queue[0],e=!1;if(t&&!t._destroyed)for(var n=0,r=this.uploadHooks.length;n<r;n++)if(this.uploadHooks[n](this.uploadHookHelper,t)){this.queue.shift(),e=!0;break}e||this.queue.shift()}if(this.queue.length)Pu.system.addOnce(this.tick,this,Cu.UTILITY);else{this.ticking=!1;var i=this.completes.slice(0);this.completes.length=0;for(n=0,r=i.length;n<r;n++)i[n]()}},t.prototype.registerFindHook=function(t){return t&&this.addHooks.push(t),this},t.prototype.registerUploadHook=function(t){return t&&this.uploadHooks.push(t),this},t.prototype.add=function(t){for(var e=0,n=this.addHooks.length;e<n&&!this.addHooks[e](t,this.queue);e++);if(t instanceof Du)for(e=t.children.length-1;e>=0;e--)this.add(t.children[e]);return this},t.prototype.destroy=function(){this.ticking&&Pu.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null},t}()),Of=(function(){function t(t){this.maxMilliseconds=t,this.frameStart=0}t.prototype.beginFrame=function(){this.frameStart=Date.now()},t.prototype.allowedToUpload=function(){return Date.now()-this.frameStart<this.maxMilliseconds}}(),function(){function t(t,e,n){void 0===n&&(n=null),this._texture=t instanceof pc?t:null,this.baseTexture=t instanceof Zu?t:this._texture.baseTexture,this.textures={},this.animations={},this.data=e;var r=this.baseTexture.resource;this.resolution=this._updateResolution(n||(r?r.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}return t.prototype._updateResolution=function(t){void 0===t&&(t=null);var e=this.data.meta.scale,n=tu(t,null);return null===n&&(n=void 0!==e?parseFloat(e):1),1!==n&&this.baseTexture.setResolution(n),n},t.prototype.parse=function(e){this._batchIndex=0,this._callback=e,this._frameKeys.length<=t.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()},t.prototype._processFrames=function(e){for(var n=e,r=t.BATCH_SIZE;n-e<r&&n<this._frameKeys.length;){var i=this._frameKeys[n],o=this._frames[i],s=o.frame;if(s){var a=null,l=null,u=!1!==o.trimmed&&o.sourceSize?o.sourceSize:o.frame,c=new ou(0,0,Math.floor(u.w)/this.resolution,Math.floor(u.h)/this.resolution);a=o.rotated?new ou(Math.floor(s.x)/this.resolution,Math.floor(s.y)/this.resolution,Math.floor(s.h)/this.resolution,Math.floor(s.w)/this.resolution):new ou(Math.floor(s.x)/this.resolution,Math.floor(s.y)/this.resolution,Math.floor(s.w)/this.resolution,Math.floor(s.h)/this.resolution),!1!==o.trimmed&&o.spriteSourceSize&&(l=new ou(Math.floor(o.spriteSourceSize.x)/this.resolution,Math.floor(o.spriteSourceSize.y)/this.resolution,Math.floor(s.w)/this.resolution,Math.floor(s.h)/this.resolution)),this.textures[i]=new pc(this.baseTexture,a,c,l,o.rotated?2:0,o.anchor),pc.addToCache(this.textures[i],i)}n++}},t.prototype._processAnimations=function(){var t=this.data.animations||{};for(var e in t){this.animations[e]=[];for(var n=0;n<t[e].length;n++){var r=t[e][n];this.animations[e].push(this.textures[r])}}},t.prototype._parseComplete=function(){var t=this._callback;this._callback=null,this._batchIndex=0,t.call(this,this.textures)},t.prototype._nextBatch=function(){var e=this;this._processFrames(this._batchIndex*t.BATCH_SIZE),this._batchIndex++,setTimeout((function(){e._batchIndex*t.BATCH_SIZE<e._frameKeys.length?e._nextBatch():(e._processAnimations(),e._parseComplete())}),0)},t.prototype.destroy=function(t){var e;for(var n in void 0===t&&(t=!1),this.textures)this.textures[n].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,t&&(null===(e=this._texture)||void 0===e||e.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null},t.BATCH_SIZE=1e3,t}()),Pf=function(){function t(){}return t.use=function(e,n){var r,i,o=this,s=e.name+"_image";if(e.data&&e.type===_d.TYPE.JSON&&e.data.frames&&!o.resources[s]){var a=null===(i=null===(r=e.data)||void 0===r?void 0:r.meta)||void 0===i?void 0:i.related_multi_packs;if(Array.isArray(a))for(var l=function(t){if("string"!=typeof t)return"continue";var n=t.replace(".json",""),r=Dl.resolve(e.url.replace(o.baseUrl,""),t);if(o.resources[n]||Object.values(o.resources).some((function(t){return Dl.format(Dl.parse(t.url))===r})))return"continue";var i={crossOrigin:e.crossOrigin,loadType:_d.LOAD_TYPE.XHR,xhrType:_d.XHR_RESPONSE_TYPE.JSON,parentResource:e,metadata:e.metadata};o.add(n,r,i)},u=0,c=a;u<c.length;u++){l(c[u])}var h={crossOrigin:e.crossOrigin,metadata:e.metadata.imageMetadata,parentResource:e},d=t.getResourcePath(e,o.baseUrl);o.add(s,d,h,(function(t){if(t.error)n(t.error);else{var r=new Of(t.texture,e.data,e.url);r.parse((function(){e.spritesheet=r,e.textures=r.textures,n()}))}}))}else n()},t.getResourcePath=function(t,e){return t.isDataUrl?t.data.meta.image:Dl.resolve(t.url.replace(e,""),t.data.meta.image)},t}(),If=function(t,e){return(If=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])})(t,e)};function Lf(t,e){function n(){this.constructor=t}If(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var Nf=new cu,Ff=(function(t){function e(e,n,r){void 0===n&&(n=100),void 0===r&&(r=100);var i=t.call(this,e)||this;return i.tileTransform=new xu,i._width=n,i._height=r,i.uvMatrix=i.texture.uvMatrix||new gh(e),i.pluginName="tilingSprite",i.uvRespectAnchor=!1,i}Lf(e,t),Object.defineProperty(e.prototype,"clampMargin",{get:function(){return this.uvMatrix.clampMargin},set:function(t){this.uvMatrix.clampMargin=t,this.uvMatrix.update(!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tileScale",{get:function(){return this.tileTransform.scale},set:function(t){this.tileTransform.scale.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tilePosition",{get:function(){return this.tileTransform.position},set:function(t){this.tileTransform.position.copyFrom(t)},enumerable:!1,configurable:!0}),e.prototype._onTextureUpdate=function(){this.uvMatrix&&(this.uvMatrix.texture=this._texture),this._cachedTint=16777215},e.prototype._render=function(t){var e=this._texture;e&&e.valid&&(this.tileTransform.updateLocalTransform(),this.uvMatrix.update(),t.batch.setObjectRenderer(t.plugins[this.pluginName]),t.plugins[this.pluginName].render(this))},e.prototype._calculateBounds=function(){var t=this._width*-this._anchor._x,e=this._height*-this._anchor._y,n=this._width*(1-this._anchor._x),r=this._height*(1-this._anchor._y);this._bounds.addFrame(this.transform,t,e,n,r)},e.prototype.getLocalBounds=function(e){return 0===this.children.length?(this._bounds.minX=this._width*-this._anchor._x,this._bounds.minY=this._height*-this._anchor._y,this._bounds.maxX=this._width*(1-this._anchor._x),this._bounds.maxY=this._height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new ou),e=this._localBoundsRect),this._bounds.getRectangle(e)):t.prototype.getLocalBounds.call(this,e)},e.prototype.containsPoint=function(t){this.worldTransform.applyInverse(t,Nf);var e=this._width,n=this._height,r=-e*this.anchor._x;if(Nf.x>=r&&Nf.x<r+e){var i=-n*this.anchor._y;if(Nf.y>=i&&Nf.y<i+n)return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.tileTransform=null,this.uvMatrix=null},e.from=function(t,n){return new e(t instanceof pc?t:pc.from(t,n),n.width,n.height)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t},enumerable:!1,configurable:!0})}(sf),"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTransform;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;\n}\n"),kf=new du,Uf=function(t){function e(e){var n=t.call(this,e)||this,r={globals:n.renderer.globalUniforms};return n.shader=dh.from(Ff,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\nuniform mat3 uMapCoord;\nuniform vec4 uClampFrame;\nuniform vec2 uClampOffset;\n\nvoid main(void)\n{\n    vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);\n    coord = (uMapCoord * vec3(coord, 1.0)).xy;\n    coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);\n\n    vec4 texSample = texture2D(uSampler, coord);\n    gl_FragColor = texSample * uColor;\n}\n",r),n.simpleShader=dh.from(Ff,"varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform vec4 uColor;\n\nvoid main(void)\n{\n    vec4 sample = texture2D(uSampler, vTextureCoord);\n    gl_FragColor = sample * uColor;\n}\n",r),n.quad=new Ac,n.state=ph.for2d(),n}return Lf(e,t),e.prototype.render=function(t){var e=this.renderer,n=this.quad,r=n.vertices;r[0]=r[6]=t._width*-t.anchor.x,r[1]=r[3]=t._height*-t.anchor.y,r[2]=r[4]=t._width*(1-t.anchor.x),r[5]=r[7]=t._height*(1-t.anchor.y);var i=t.uvRespectAnchor?t.anchor.x:0,o=t.uvRespectAnchor?t.anchor.y:0;(r=n.uvs)[0]=r[6]=-i,r[1]=r[3]=-o,r[2]=r[4]=1-i,r[5]=r[7]=1-o,n.invalidate();var s=t._texture,a=s.baseTexture,l=t.tileTransform.localTransform,u=t.uvMatrix,c=a.isPowerOfTwo&&s.frame.width===a.width&&s.frame.height===a.height;c&&(a._glTextures[e.CONTEXT_UID]?c=a.wrapMode!==pl.CLAMP:a.wrapMode===pl.CLAMP&&(a.wrapMode=pl.REPEAT));var h=c?this.simpleShader:this.shader,d=s.width,p=s.height,f=t._width,m=t._height;kf.set(l.a*d/f,l.b*d/m,l.c*p/f,l.d*p/m,l.tx/f,l.ty/m),kf.invert(),c?kf.prepend(u.mapCoord):(h.uniforms.uMapCoord=u.mapCoord.toArray(!0),h.uniforms.uClampFrame=u.uClampFrame,h.uniforms.uClampOffset=u.uClampOffset),h.uniforms.uTransform=kf.toArray(!0),h.uniforms.uColor=Ul(t.tint,t.worldAlpha,h.uniforms.uColor,a.alphaMode),h.uniforms.translationMatrix=t.transform.worldTransform.toArray(!0),h.uniforms.uSampler=s,e.shader.bind(h),e.geometry.bind(n),this.state.blendMode=Fl(t.blendMode,a.alphaMode),e.state.set(this.state),e.geometry.draw(this.renderer.gl.TRIANGLES,6,0)},e}(Ic),Bf=function(t,e){return(Bf=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])})(t,e)};function Gf(t,e){function n(){this.constructor=t}Bf(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var zf=function(){function t(t,e){this.uvBuffer=t,this.uvMatrix=e,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}return t.prototype.update=function(t){if(t||this._bufferUpdateId!==this.uvBuffer._updateID||this._textureUpdateId!==this.uvMatrix._updateID){this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;var e=this.uvBuffer.data;this.data&&this.data.length===e.length||(this.data=new Float32Array(e.length)),this.uvMatrix.multiplyUvs(e,this.data),this._updateID++}},t}(),Hf=new cu,jf=new lu,Vf=function(t){function e(e,n,r,i){void 0===i&&(i=al.TRIANGLES);var o=t.call(this)||this;return o.geometry=e,e.refCount++,o.shader=n,o.state=r||ph.for2d(),o.drawMode=i,o.start=0,o.size=0,o.uvs=null,o.indices=null,o.vertexData=new Float32Array(1),o.vertexDirty=-1,o._transformID=-1,o._roundPixels=wl.ROUND_PIXELS,o.batchUvs=null,o}return Gf(e,t),Object.defineProperty(e.prototype,"uvBuffer",{get:function(){return this.geometry.buffers[1]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"verticesBuffer",{get:function(){return this.geometry.buffers[0]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"material",{get:function(){return this.shader},set:function(t){this.shader=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.state.blendMode},set:function(t){this.state.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){this._roundPixels!==t&&(this._transformID=-1),this._roundPixels=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return"tint"in this.shader?this.shader.tint:null},set:function(t){this.shader.tint=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"texture",{get:function(){return"texture"in this.shader?this.shader.texture:null},set:function(t){this.shader.texture=t},enumerable:!1,configurable:!0}),e.prototype._render=function(t){var n=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===al.TRIANGLES&&n.length<2*e.BATCHABLE_SIZE?this._renderToBatch(t):this._renderDefault(t)},e.prototype._renderDefault=function(t){var e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),t.batch.flush(),e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),t.shader.bind(e),t.state.set(this.state),t.geometry.bind(this.geometry,e),t.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)},e.prototype._renderToBatch=function(t){var e=this.geometry,n=this.shader;n.uvMatrix&&(n.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=n._tintRGB,this._texture=n.texture;var r=this.material.pluginName;t.batch.setObjectRenderer(t.plugins[r]),t.plugins[r].render(this)},e.prototype.calculateVertices=function(){var t=this.geometry.buffers[0],e=t.data,n=t._updateID;if(n!==this.vertexDirty||this._transformID!==this.transform._worldID){this._transformID=this.transform._worldID,this.vertexData.length!==e.length&&(this.vertexData=new Float32Array(e.length));for(var r=this.transform.worldTransform,i=r.a,o=r.b,s=r.c,a=r.d,l=r.tx,u=r.ty,c=this.vertexData,h=0;h<c.length/2;h++){var d=e[2*h],p=e[2*h+1];c[2*h]=i*d+s*p+l,c[2*h+1]=o*d+a*p+u}if(this._roundPixels){var f=wl.RESOLUTION;for(h=0;h<c.length;++h)c[h]=Math.round((c[h]*f|0)/f)}this.vertexDirty=n}},e.prototype.calculateUvs=function(){var t=this.geometry.buffers[1],e=this.shader;e.uvMatrix.isSimple?this.uvs=t.data:(this.batchUvs||(this.batchUvs=new zf(t,e.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)},e.prototype._calculateBounds=function(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)},e.prototype.containsPoint=function(t){if(!this.getBounds().contains(t.x,t.y))return!1;this.worldTransform.applyInverse(t,Hf);for(var e=this.geometry.getBuffer("aVertexPosition").data,n=jf.points,r=this.geometry.getIndex().data,i=r.length,o=4===this.drawMode?3:1,s=0;s+2<i;s+=o){var a=2*r[s],l=2*r[s+1],u=2*r[s+2];if(n[0]=e[a],n[1]=e[a+1],n[2]=e[l],n[3]=e[l+1],n[4]=e[u],n[5]=e[u+1],jf.contains(Hf.x,Hf.y))return!0}return!1},e.prototype.destroy=function(e){t.prototype.destroy.call(this,e),this.geometry.refCount--,0===this.geometry.refCount&&this.geometry.dispose(),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null},e.BATCHABLE_SIZE=100,e}(Du),Xf=function(t){function e(e,n){var r=this,i={uSampler:e,alpha:1,uTextureMatrix:du.IDENTITY,uColor:new Float32Array([1,1,1,1])};return(n=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},n)).uniforms&&Object.assign(i,n.uniforms),(r=t.call(this,n.program||hh.from("attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\nuniform mat3 translationMatrix;\nuniform mat3 uTextureMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n\n    vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\n}\n","varying vec2 vTextureCoord;\nuniform vec4 uColor;\n\nuniform sampler2D uSampler;\n\nvoid main(void)\n{\n    gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;\n}\n"),i)||this)._colorDirty=!1,r.uvMatrix=new gh(e),r.batchable=void 0===n.program,r.pluginName=n.pluginName,r.tint=n.tint,r.alpha=n.alpha,r}return Gf(e,t),Object.defineProperty(e.prototype,"texture",{get:function(){return this.uniforms.uSampler},set:function(t){this.uniforms.uSampler!==t&&(this.uniforms.uSampler=t,this.uvMatrix.texture=t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this._alpha},set:function(t){t!==this._alpha&&(this._alpha=t,this._colorDirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){t!==this._tint&&(this._tint=t,this._tintRGB=(t>>16)+(65280&t)+((255&t)<<16),this._colorDirty=!0)},enumerable:!1,configurable:!0}),e.prototype.update=function(){if(this._colorDirty){this._colorDirty=!1;var t=this.texture.baseTexture;Ul(this._tint,this._alpha,this.uniforms.uColor,t.alphaMode)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)},e}(dh),Wf=function(t){function e(e,n,r){var i=t.call(this)||this,o=new _c(e),s=new _c(n,!0),a=new _c(r,!0,!0);return i.addAttribute("aVertexPosition",o,2,!1,cl.FLOAT).addAttribute("aTextureCoord",s,2,!1,cl.FLOAT).addIndex(a),i._updateId=-1,i}return Gf(e,t),Object.defineProperty(e.prototype,"vertexDirtyId",{get:function(){return this.buffers[0]._updateID},enumerable:!1,configurable:!0}),e}(Tc),Yf=function(t,e){return(Yf=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])})(t,e)};var qf=function(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[]},$f=function(){function t(){}return t.test=function(t){return"string"==typeof t&&0===t.indexOf("info face=")},t.parse=function(t){var e=t.match(/^[a-z]+\s+.+$/gm),n={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[]};for(var r in e){var i=e[r].match(/^[a-z]+/gm)[0],o=e[r].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),s={};for(var a in o){var l=o[a].split("="),u=l[0],c=l[1].replace(/"/gm,""),h=parseFloat(c),d=isNaN(h)?c:h;s[u]=d}n[i].push(s)}var p=new qf;return n.info.forEach((function(t){return p.info.push({face:t.face,size:parseInt(t.size,10)})})),n.common.forEach((function(t){return p.common.push({lineHeight:parseInt(t.lineHeight,10)})})),n.page.forEach((function(t){return p.page.push({id:parseInt(t.id,10),file:t.file})})),n.char.forEach((function(t){return p.char.push({id:parseInt(t.id,10),page:parseInt(t.page,10),x:parseInt(t.x,10),y:parseInt(t.y,10),width:parseInt(t.width,10),height:parseInt(t.height,10),xoffset:parseInt(t.xoffset,10),yoffset:parseInt(t.yoffset,10),xadvance:parseInt(t.xadvance,10)})})),n.kerning.forEach((function(t){return p.kerning.push({first:parseInt(t.first,10),second:parseInt(t.second,10),amount:parseInt(t.amount,10)})})),p},t}(),Kf=function(){function t(){}return t.test=function(t){return t instanceof XMLDocument&&t.getElementsByTagName("page").length&&null!==t.getElementsByTagName("info")[0].getAttribute("face")},t.parse=function(t){for(var e=new qf,n=t.getElementsByTagName("info"),r=t.getElementsByTagName("common"),i=t.getElementsByTagName("page"),o=t.getElementsByTagName("char"),s=t.getElementsByTagName("kerning"),a=0;a<n.length;a++)e.info.push({face:n[a].getAttribute("face"),size:parseInt(n[a].getAttribute("size"),10)});for(a=0;a<r.length;a++)e.common.push({lineHeight:parseInt(r[a].getAttribute("lineHeight"),10)});for(a=0;a<i.length;a++)e.page.push({id:parseInt(i[a].getAttribute("id"),10)||0,file:i[a].getAttribute("file")});for(a=0;a<o.length;a++){var l=o[a];e.char.push({id:parseInt(l.getAttribute("id"),10),page:parseInt(l.getAttribute("page"),10)||0,x:parseInt(l.getAttribute("x"),10),y:parseInt(l.getAttribute("y"),10),width:parseInt(l.getAttribute("width"),10),height:parseInt(l.getAttribute("height"),10),xoffset:parseInt(l.getAttribute("xoffset"),10),yoffset:parseInt(l.getAttribute("yoffset"),10),xadvance:parseInt(l.getAttribute("xadvance"),10)})}for(a=0;a<s.length;a++)e.kerning.push({first:parseInt(s[a].getAttribute("first"),10),second:parseInt(s[a].getAttribute("second"),10),amount:parseInt(s[a].getAttribute("amount"),10)});return e},t}(),Zf=function(){function t(){}return t.test=function(t){if("string"==typeof t&&t.indexOf("<font>")>-1){var e=(new self.DOMParser).parseFromString(t,"text/xml");return Kf.test(e)}return!1},t.parse=function(t){var e=(new self.DOMParser).parseFromString(t,"text/xml");return Kf.parse(e)},t}(),Jf=[$f,Kf,Zf];function Qf(t){for(var e=0;e<Jf.length;e++)if(Jf[e].test(t))return Jf[e];return null}function tm(t,e,n,r,i,o,s){var a=n.text,l=n.fontProperties;e.translate(r,i),e.scale(o,o);var u=s.strokeThickness/2,c=-s.strokeThickness/2;e.font=s.toFontString(),e.lineWidth=s.strokeThickness,e.textBaseline=s.textBaseline,e.lineJoin=s.lineJoin,e.miterLimit=s.miterLimit,e.fillStyle=function(t,e,n,r,i,o){var s,a=n.fill;if(!Array.isArray(a))return a;if(1===a.length)return a[0];var l=n.dropShadow?n.dropShadowDistance:0,u=n.padding||0,c=t.width/r-l-2*u,h=t.height/r-l-2*u,d=a.slice(),p=n.fillGradientStops.slice();if(!p.length)for(var f=d.length+1,m=1;m<f;++m)p.push(m/f);if(d.unshift(a[0]),p.unshift(0),d.push(a[a.length-1]),p.push(1),n.fillGradientType===nf.LINEAR_VERTICAL){s=e.createLinearGradient(c/2,u,c/2,h+u);var g=0,v=(o.fontProperties.fontSize+n.strokeThickness)/h;for(m=0;m<i.length;m++)for(var y=o.lineHeight*m,_=0;_<d.length;_++){var b=y/h+("number"==typeof p[_]?p[_]:_/d.length)*v,x=Math.max(g,b);x=Math.min(x,1),s.addColorStop(x,d[_]),g=x}}else{s=e.createLinearGradient(u,h/2,c+u,h/2);var w=d.length+1,E=1;for(m=0;m<d.length;m++){var T=void 0;T="number"==typeof p[m]?p[m]:E/w,s.addColorStop(T,d[m]),E++}}return s}(t,e,s,o,[a],n),e.strokeStyle=s.stroke;var h=s.dropShadowColor,d=Pl("number"==typeof h?h:Ll(h));s.dropShadow?(e.shadowColor="rgba("+255*d[0]+","+255*d[1]+","+255*d[2]+","+s.dropShadowAlpha+")",e.shadowBlur=s.dropShadowBlur,e.shadowOffsetX=Math.cos(s.dropShadowAngle)*s.dropShadowDistance,e.shadowOffsetY=Math.sin(s.dropShadowAngle)*s.dropShadowDistance):(e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0),s.stroke&&s.strokeThickness&&e.strokeText(a,u,c+n.lineHeight-l.descent),s.fill&&e.fillText(a,u,c+n.lineHeight-l.descent),e.setTransform(1,0,0,1,0,0),e.fillStyle="rgba(0, 0, 0, 0)"}var em=function(){function t(t,e,n){var r=t.info[0],i=t.common[0],o=tu(t.page[0].file),s={};this._ownsTextures=n,this.font=r.face,this.size=r.size,this.lineHeight=i.lineHeight/o,this.chars={},this.pageTextures=s;for(var a=0;a<t.page.length;a++){var l=t.page[a],u=l.id,c=l.file;s[u]=e instanceof Array?e[a]:e[c]}for(a=0;a<t.char.length;a++){var h=t.char[a],d=(u=h.id,h.page),p=t.char[a],f=p.x,m=p.y,g=p.width,v=p.height,y=p.xoffset,_=p.yoffset,b=p.xadvance;m/=o,g/=o,v/=o,y/=o,_/=o,b/=o;var x=new ou((f/=o)+s[d].frame.x/o,m+s[d].frame.y/o,g,v);this.chars[u]={xOffset:y,yOffset:_,xAdvance:b,kerning:{},texture:new pc(s[d].baseTexture,x),page:d}}for(a=0;a<t.kerning.length;a++){var w=t.kerning[a],E=w.first,T=w.second,S=w.amount;E/=o,T/=o,S/=o,this.chars[T]&&(this.chars[T].kerning[E]=S)}}return t.prototype.destroy=function(){for(var t in this.chars)this.chars[t].texture.destroy(),this.chars[t].texture=null;for(var t in this.pageTextures)this._ownsTextures&&this.pageTextures[t].destroy(!0),this.pageTextures[t]=null;this.chars=null,this.pageTextures=null},t.install=function(e,n,r){var i;if(e instanceof qf)i=e;else{var o=Qf(e);if(!o)throw new Error("Unrecognized data format for font.");i=o.parse(e)}n instanceof pc&&(n=[n]);var s=new t(i,n,r);return t.available[s.font]=s,s},t.uninstall=function(e){var n=t.available[e];if(!n)throw new Error("No font found named '"+e+"'");n.destroy(),delete t.available[e]},t.from=function(e,n,r){if(!e)throw new Error("[BitmapFont] Property `name` is required.");var i=Object.assign({},t.defaultOptions,r),o=i.chars,s=i.padding,a=i.resolution,l=i.textureWidth,u=i.textureHeight,c=function(t){"string"==typeof t&&(t=[t]);for(var e=[],n=0,r=t.length;n<r;n++){var i=t[n];if(Array.isArray(i)){if(2!==i.length)throw new Error("[BitmapFont]: Invalid character range length, expecting 2 got "+i.length+".");var o=i[0].charCodeAt(0),s=i[1].charCodeAt(0);if(s<o)throw new Error("[BitmapFont]: Invalid character range.");for(var a=o,l=s;a<=l;a++)e.push(String.fromCharCode(a))}else e.push.apply(e,i.split(""))}if(0===e.length)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}(o),h=n instanceof cf?n:new cf(n),d=l,p=new qf;p.info[0]={face:h.fontFamily,size:h.fontSize},p.common[0]={lineHeight:h.fontSize};for(var f,m,g,v=0,y=0,_=0,b=[],x=0;x<c.length;x++){f||((f=document.createElement("canvas")).width=l,f.height=u,m=f.getContext("2d"),g=new Zu(f,{resolution:a}),b.push(new pc(g)),p.page.push({id:b.length-1,file:""}));var w=ff.measureText(c[x],h,!1,f),E=w.width,T=Math.ceil(w.height),S=Math.ceil(("italic"===h.fontStyle?2:1)*E);if(y>=u-T*a){if(0===y)throw new Error("[BitmapFont] textureHeight "+u+"px is too small for "+h.fontSize+"px fonts");--x,f=null,m=null,g=null,y=0,v=0,_=0}else if(_=Math.max(T+w.fontProperties.descent,_),S*a+v>=d)--x,y+=_*a,y=Math.ceil(y),v=0,_=0;else{tm(f,m,w,v,y,a,h);var A=w.text.charCodeAt(0);p.char.push({id:A,page:b.length-1,x:v/a,y:y/a,width:S,height:T,xoffset:0,yoffset:0,xadvance:Math.ceil(E-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0))}),v+=(S+2*s)*a,v=Math.ceil(v)}}x=0;for(var M=c.length;x<M;x++)for(var D=c[x],C=0;C<M;C++){var R=c[C],O=m.measureText(D).width,P=m.measureText(R).width,I=m.measureText(D+R).width-(O+P);I&&p.kerning.push({first:D.charCodeAt(0),second:R.charCodeAt(0),amount:I})}var L=new t(p,b,!0);return void 0!==t.available[e]&&t.uninstall(e),t.available[e]=L,L},t.ALPHA=[["a","z"],["A","Z"]," "],t.NUMERIC=[["0","9"]],t.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "],t.ASCII=[[" ","~"]],t.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:t.ALPHANUMERIC},t.available={},t}(),nm=[],rm=[],im=(function(t){function e(n,r){void 0===r&&(r={});var i=t.call(this)||this;i._tint=16777215;var o=Object.assign({},e.styleDefaults,r),s=o.align,a=o.tint,l=o.maxWidth,u=o.letterSpacing,c=o.fontName,h=o.fontSize;if(!em.available[c])throw new Error('Missing BitmapFont "'+c+'"');return i._activePagesMeshData=[],i._textWidth=0,i._textHeight=0,i._align=s,i._tint=a,i._fontName=c,i._fontSize=h||em.available[c].size,i._text=n,i._maxWidth=l,i._maxLineHeight=0,i._letterSpacing=u,i._anchor=new hu((function(){i.dirty=!0}),i,0,0),i._roundPixels=wl.ROUND_PIXELS,i.dirty=!0,i._textureCache={},i}(function(t,e){function n(){this.constructor=t}Yf(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})(e,t),e.prototype.updateText=function(){for(var t,e=em.available[this._fontName],n=this._fontSize/e.size,r=new cu,i=[],o=[],s=[],a=this._text.replace(/(?:\r\n|\r)/g,"\n")||" ",l=a.length,u=this._maxWidth*e.size/this._fontSize,c=null,h=0,d=0,p=0,f=-1,m=0,g=0,v=0,y=0,_=0;_<l;_++){var b=a.charCodeAt(_),x=a.charAt(_);if(/(?:\s)/.test(x)&&(f=_,m=h,y++),"\r"!==x&&"\n"!==x){var w=e.chars[b];if(w){c&&w.kerning[c]&&(r.x+=w.kerning[c]);var E=rm.pop()||{texture:pc.EMPTY,line:0,charCode:0,prevSpaces:0,position:new cu};E.texture=w.texture,E.line=p,E.charCode=b,E.position.x=r.x+w.xOffset+this._letterSpacing/2,E.position.y=r.y+w.yOffset,E.prevSpaces=y,i.push(E),h=E.position.x+w.texture.orig.width,r.x+=w.xAdvance+this._letterSpacing,v=Math.max(v,w.yOffset+w.texture.height),c=b,-1!==f&&u>0&&r.x>u&&(jl(i,1+f-++g,1+_-f),_=f,f=-1,o.push(m),s.push(i.length>0?i[i.length-1].prevSpaces:0),d=Math.max(d,m),p++,r.x=0,r.y+=e.lineHeight,c=null,y=0)}}else o.push(h),s.push(-1),d=Math.max(d,h),++p,++g,r.x=0,r.y+=e.lineHeight,c=null,y=0}var T=a.charAt(a.length-1);"\r"!==T&&"\n"!==T&&(/(?:\s)/.test(T)&&(h=m),o.push(h),d=Math.max(d,h),s.push(-1));var S=[];for(_=0;_<=p;_++){var A=0;"right"===this._align?A=d-o[_]:"center"===this._align?A=(d-o[_])/2:"justify"===this._align&&(A=s[_]<0?0:(d-o[_])/s[_]),S.push(A)}var M=i.length,D={},C=[],R=this._activePagesMeshData;for(_=0;_<R.length;_++)nm.push(R[_]);for(_=0;_<M;_++){var O=(G=i[_].texture).baseTexture.uid;if(!D[O]){if(!(Y=nm.pop())){var P=new Wf,I=new Xf(pc.EMPTY);Y={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:new Vf(P,I),vertices:null,uvs:null,indices:null}}Y.index=0,Y.indexCount=0,Y.vertexCount=0,Y.uvsCount=0,Y.total=0;var L=this._textureCache;L[O]=L[O]||new pc(G.baseTexture),Y.mesh.texture=L[O],Y.mesh.tint=this._tint,C.push(Y),D[O]=Y}D[O].total++}for(_=0;_<R.length;_++)-1===C.indexOf(R[_])&&this.removeChild(R[_].mesh);for(_=0;_<C.length;_++)C[_].mesh.parent!==this&&this.addChild(C[_].mesh);for(var _ in this._activePagesMeshData=C,D){var N=(Y=D[_]).total;if(!((null===(t=Y.indices)||void 0===t?void 0:t.length)>6*N)||Y.vertices.length<2*Vf.BATCHABLE_SIZE)Y.vertices=new Float32Array(8*N),Y.uvs=new Float32Array(8*N),Y.indices=new Uint16Array(6*N);else for(var F=Y.total,k=Y.vertices,U=4*F*2;U<k.length;U++)k[U]=0;Y.mesh.size=6*N}for(_=0;_<M;_++){var B=(x=i[_]).position.x+S[x.line]*("justify"===this._align?x.prevSpaces:1);this._roundPixels&&(B=Math.round(B));var G,z=B*n,H=x.position.y*n,j=D[(G=x.texture).baseTexture.uid],V=G.frame,X=G._uvs,W=j.index++;j.indices[6*W+0]=0+4*W,j.indices[6*W+1]=1+4*W,j.indices[6*W+2]=2+4*W,j.indices[6*W+3]=0+4*W,j.indices[6*W+4]=2+4*W,j.indices[6*W+5]=3+4*W,j.vertices[8*W+0]=z,j.vertices[8*W+1]=H,j.vertices[8*W+2]=z+V.width*n,j.vertices[8*W+3]=H,j.vertices[8*W+4]=z+V.width*n,j.vertices[8*W+5]=H+V.height*n,j.vertices[8*W+6]=z,j.vertices[8*W+7]=H+V.height*n,j.uvs[8*W+0]=X.x0,j.uvs[8*W+1]=X.y0,j.uvs[8*W+2]=X.x1,j.uvs[8*W+3]=X.y1,j.uvs[8*W+4]=X.x2,j.uvs[8*W+5]=X.y2,j.uvs[8*W+6]=X.x3,j.uvs[8*W+7]=X.y3}for(var _ in this._textWidth=d*n,this._textHeight=(r.y+e.lineHeight)*n,D){var Y=D[_];if(0!==this.anchor.x||0!==this.anchor.y)for(var q=0,$=this._textWidth*this.anchor.x,K=this._textHeight*this.anchor.y,Z=0;Z<Y.total;Z++)Y.vertices[q++]-=$,Y.vertices[q++]-=K,Y.vertices[q++]-=$,Y.vertices[q++]-=K,Y.vertices[q++]-=$,Y.vertices[q++]-=K,Y.vertices[q++]-=$,Y.vertices[q++]-=K;this._maxLineHeight=v*n;var J=Y.mesh.geometry.getBuffer("aVertexPosition"),Q=Y.mesh.geometry.getBuffer("aTextureCoord"),tt=Y.mesh.geometry.getIndex();J.data=Y.vertices,Q.data=Y.uvs,tt.data=Y.indices,J.update(),Q.update(),tt.update()}for(_=0;_<i.length;_++)rm.push(i[_])},e.prototype.updateTransform=function(){this.validate(),this.containerUpdateTransform()},e.prototype.getLocalBounds=function(){return this.validate(),t.prototype.getLocalBounds.call(this)},e.prototype.validate=function(){this.dirty&&(this.updateText(),this.dirty=!1)},Object.defineProperty(e.prototype,"tint",{get:function(){return this._tint},set:function(t){if(this._tint!==t){this._tint=t;for(var e=0;e<this._activePagesMeshData.length;e++)this._activePagesMeshData[e].mesh.tint=t}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"align",{get:function(){return this._align},set:function(t){this._align!==t&&(this._align=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontName",{get:function(){return this._fontName},set:function(t){if(!em.available[t])throw new Error('Missing BitmapFont "'+t+'"');this._fontName!==t&&(this._fontName=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSize",{get:function(){return this._fontSize},set:function(t){this._fontSize!==t&&(this._fontSize=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"anchor",{get:function(){return this._anchor},set:function(t){"number"==typeof t?this._anchor.set(t):this._anchor.copyFrom(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){return this._text},set:function(t){t=String(null==t?"":t),this._text!==t&&(this._text=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxWidth",{get:function(){return this._maxWidth},set:function(t){this._maxWidth!==t&&(this._maxWidth=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"maxLineHeight",{get:function(){return this.validate(),this._maxLineHeight},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textWidth",{get:function(){return this.validate(),this._textWidth},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"letterSpacing",{get:function(){return this._letterSpacing},set:function(t){this._letterSpacing!==t&&(this._letterSpacing=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roundPixels",{get:function(){return this._roundPixels},set:function(t){t!==this._roundPixels&&(this._roundPixels=t,this.dirty=!0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textHeight",{get:function(){return this.validate(),this._textHeight},enumerable:!1,configurable:!0}),e.prototype.destroy=function(e){var n=this._textureCache;for(var r in n){n[r].destroy(),delete n[r]}this._textureCache=null,t.prototype.destroy.call(this,e)},e.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0}}(Du),function(){function t(){}return t.add=function(){_d.setExtensionXhrType("fnt",_d.XHR_RESPONSE_TYPE.TEXT)},t.use=function(e,n){var r=Qf(e.data);if(r)for(var i=t.getBaseUrl(this,e),o=r.parse(e.data),s={},a=function(t){s[t.metadata.pageFile]=t.texture,Object.keys(s).length===o.page.length&&(e.bitmapFont=em.install(o,s,!0),n())},l=0;l<o.page.length;++l){var u=o.page[l].file,c=i+u,h=!1;for(var d in this.resources){var p=this.resources[d];if(p.url===c){p.metadata.pageFile=u,p.texture?a(p):p.onAfterMiddleware.add(a),h=!0;break}}if(!h){var f={crossOrigin:e.crossOrigin,loadType:_d.LOAD_TYPE.IMAGE,metadata:Object.assign({pageFile:u},e.metadata.imageMetadata),parentResource:e};this.add(c,f,a)}}else n()},t.getBaseUrl=function(e,n){var r=n.isDataUrl?"":t.dirname(n.url);return n.isDataUrl&&("."===r&&(r=""),e.baseUrl&&r&&"/"===e.baseUrl.charAt(e.baseUrl.length-1)&&(r+="/")),(r=r.replace(e.baseUrl,""))&&"/"!==r.charAt(r.length-1)&&(r+="/"),r},t.dirname=function(t){var e=t.replace(/\\/g,"/").replace(/\/$/,"").replace(/\/[^\/]*$/,"");return e===t?".":""===e?"/":e},t}()),om=function(t,e){return(om=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])})(t,e)};var sm=function(t){function e(e){void 0===e&&(e=1);var n=t.call(this,"attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 vTextureCoord;\n\nvoid main(void)\n{\n    gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n    vTextureCoord = aTextureCoord;\n}","varying vec2 vTextureCoord;\n\nuniform sampler2D uSampler;\nuniform float uAlpha;\n\nvoid main(void)\n{\n   gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;\n}\n",{uAlpha:1})||this;return n.alpha=e,n}return function(t,e){function n(){this.constructor=t}om(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(fh),am=function(t,e){return(am=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])})(t,e)};function lm(t,e){function n(){this.constructor=t}am(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var um,cm,hm,dm,pm,fm,mm,gm,vm,ym,_m,bm,xm,wm,Em,Tm,Sm,Am,Mm,Dm={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},Cm=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{","    gl_FragColor = vec4(0.0);","    %blur%","}"].join("\n");!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(um||(um={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(cm||(cm={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(hm||(hm={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(dm||(dm={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(pm||(pm={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(fm||(fm={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(mm||(mm={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(gm||(gm={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(vm||(vm={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(ym||(ym={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}(_m||(_m={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(bm||(bm={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(xm||(xm={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(wm||(wm={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(Em||(Em={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(Tm||(Tm={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(Sm||(Sm={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(Am||(Am={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(Mm||(Mm={}));var Rm=function(t){function e(e,n,r,i,o){void 0===n&&(n=8),void 0===r&&(r=4),void 0===i&&(i=wl.FILTER_RESOLUTION),void 0===o&&(o=5);var s=this,a=function(t,e){var n,r=Math.ceil(t/2),i="\n    attribute vec2 aVertexPosition;\n\n    uniform mat3 projectionMatrix;\n\n    uniform float strength;\n\n    varying vec2 vBlurTexCoords[%size%];\n\n    uniform vec4 inputSize;\n    uniform vec4 outputFrame;\n\n    vec4 filterVertexPosition( void )\n    {\n        vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n        return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n    }\n\n    vec2 filterTextureCoord( void )\n    {\n        return aVertexPosition * (outputFrame.zw * inputSize.zw);\n    }\n\n    void main(void)\n    {\n        gl_Position = filterVertexPosition();\n\n        vec2 textureCoord = filterTextureCoord();\n        %blur%\n    }",o="";n=e?"vBlurTexCoords[%index%] =  textureCoord + vec2(%sampleIndex% * strength, 0.0);":"vBlurTexCoords[%index%] =  textureCoord + vec2(0.0, %sampleIndex% * strength);";for(var s=0;s<t;s++){var a=n.replace("%index%",s.toString());o+=a=a.replace("%sampleIndex%",s-(r-1)+".0"),o+="\n"}return i=(i=i.replace("%blur%",o)).replace("%size%",t.toString())}(o,e),l=function(t){for(var e,n=Dm[t],r=n.length,i=Cm,o="",s=0;s<t;s++){var a="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;".replace("%index%",s.toString());e=s,s>=r&&(e=t-s-1),o+=a=a.replace("%value%",n[e].toString()),o+="\n"}return i=(i=i.replace("%blur%",o)).replace("%size%",t.toString())}(o);return(s=t.call(this,a,l)||this).horizontal=e,s.resolution=i,s._quality=0,s.quality=r,s.blur=n,s}return lm(e,t),e.prototype.apply=function(t,e,n,r){if(n?this.horizontal?this.uniforms.strength=1/n.width*(n.width/e.width):this.uniforms.strength=1/n.height*(n.height/e.height):this.horizontal?this.uniforms.strength=1/t.renderer.width*(t.renderer.width/e.width):this.uniforms.strength=1/t.renderer.height*(t.renderer.height/e.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,1===this.passes)t.applyFilter(this,e,n,r);else{var i=t.getFilterTexture(),o=t.renderer,s=e,a=i;this.state.blend=!1,t.applyFilter(this,s,a,wm.CLEAR);for(var l=1;l<this.passes-1;l++){t.bindAndClear(s,wm.BLIT),this.uniforms.uSampler=a;var u=a;a=s,s=u,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,t.applyFilter(this,a,n,r),t.returnFilterTexture(i)}},Object.defineProperty(e.prototype,"blur",{get:function(){return this.strength},set:function(t){this.padding=1+2*Math.abs(t),this.strength=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this._quality},set:function(t){this._quality=t,this.passes=t},enumerable:!1,configurable:!0}),e}(fh),Om=function(t){function e(e,n,r,i){void 0===e&&(e=8),void 0===n&&(n=4),void 0===r&&(r=wl.FILTER_RESOLUTION),void 0===i&&(i=5);var o=t.call(this)||this;return o.blurXFilter=new Rm(!0,e,n,r,i),o.blurYFilter=new Rm(!1,e,n,r,i),o.resolution=r,o.quality=n,o.blur=e,o.repeatEdgePixels=!1,o}return lm(e,t),e.prototype.apply=function(t,e,n,r){var i=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(i&&o){var s=t.getFilterTexture();this.blurXFilter.apply(t,e,s,wm.CLEAR),this.blurYFilter.apply(t,s,n,r),t.returnFilterTexture(s)}else o?this.blurYFilter.apply(t,e,n,r):this.blurXFilter.apply(t,e,n,r)},e.prototype.updatePadding=function(){this._repeatEdgePixels?this.padding=0:this.padding=2*Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))},Object.defineProperty(e.prototype,"blur",{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=this.blurYFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quality",{get:function(){return this.blurXFilter.quality},set:function(t){this.blurXFilter.quality=this.blurYFilter.quality=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurX",{get:function(){return this.blurXFilter.blur},set:function(t){this.blurXFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blurY",{get:function(){return this.blurYFilter.blur},set:function(t){this.blurYFilter.blur=t,this.updatePadding()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"blendMode",{get:function(){return this.blurYFilter.blendMode},set:function(t){this.blurYFilter.blendMode=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"repeatEdgePixels",{get:function(){return this._repeatEdgePixels},set:function(t){this._repeatEdgePixels=t,this.updatePadding()},enumerable:!1,configurable:!0}),e}(fh),Pm=function(t,e){return(Pm=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])})(t,e)};var Im=function(t){function e(){var e=this,n={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};return(e=t.call(this,Xh,"varying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float m[20];\nuniform float uAlpha;\n\nvoid main(void)\n{\n    vec4 c = texture2D(uSampler, vTextureCoord);\n\n    if (uAlpha == 0.0) {\n        gl_FragColor = c;\n        return;\n    }\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (c.a > 0.0) {\n      c.rgb /= c.a;\n    }\n\n    vec4 result;\n\n    result.r = (m[0] * c.r);\n        result.r += (m[1] * c.g);\n        result.r += (m[2] * c.b);\n        result.r += (m[3] * c.a);\n        result.r += m[4];\n\n    result.g = (m[5] * c.r);\n        result.g += (m[6] * c.g);\n        result.g += (m[7] * c.b);\n        result.g += (m[8] * c.a);\n        result.g += m[9];\n\n    result.b = (m[10] * c.r);\n       result.b += (m[11] * c.g);\n       result.b += (m[12] * c.b);\n       result.b += (m[13] * c.a);\n       result.b += m[14];\n\n    result.a = (m[15] * c.r);\n       result.a += (m[16] * c.g);\n       result.a += (m[17] * c.b);\n       result.a += (m[18] * c.a);\n       result.a += m[19];\n\n    vec3 rgb = mix(c.rgb, result.rgb, uAlpha);\n\n    // Premultiply alpha again.\n    rgb *= result.a;\n\n    gl_FragColor = vec4(rgb, result.a);\n}\n",n)||this).alpha=1,e}return function(t,e){function n(){this.constructor=t}Pm(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype._loadMatrix=function(t,e){void 0===e&&(e=!1);var n=t;e&&(this._multiply(n,this.uniforms.m,t),n=this._colorMatrix(n)),this.uniforms.m=n},e.prototype._multiply=function(t,e,n){return t[0]=e[0]*n[0]+e[1]*n[5]+e[2]*n[10]+e[3]*n[15],t[1]=e[0]*n[1]+e[1]*n[6]+e[2]*n[11]+e[3]*n[16],t[2]=e[0]*n[2]+e[1]*n[7]+e[2]*n[12]+e[3]*n[17],t[3]=e[0]*n[3]+e[1]*n[8]+e[2]*n[13]+e[3]*n[18],t[4]=e[0]*n[4]+e[1]*n[9]+e[2]*n[14]+e[3]*n[19]+e[4],t[5]=e[5]*n[0]+e[6]*n[5]+e[7]*n[10]+e[8]*n[15],t[6]=e[5]*n[1]+e[6]*n[6]+e[7]*n[11]+e[8]*n[16],t[7]=e[5]*n[2]+e[6]*n[7]+e[7]*n[12]+e[8]*n[17],t[8]=e[5]*n[3]+e[6]*n[8]+e[7]*n[13]+e[8]*n[18],t[9]=e[5]*n[4]+e[6]*n[9]+e[7]*n[14]+e[8]*n[19]+e[9],t[10]=e[10]*n[0]+e[11]*n[5]+e[12]*n[10]+e[13]*n[15],t[11]=e[10]*n[1]+e[11]*n[6]+e[12]*n[11]+e[13]*n[16],t[12]=e[10]*n[2]+e[11]*n[7]+e[12]*n[12]+e[13]*n[17],t[13]=e[10]*n[3]+e[11]*n[8]+e[12]*n[13]+e[13]*n[18],t[14]=e[10]*n[4]+e[11]*n[9]+e[12]*n[14]+e[13]*n[19]+e[14],t[15]=e[15]*n[0]+e[16]*n[5]+e[17]*n[10]+e[18]*n[15],t[16]=e[15]*n[1]+e[16]*n[6]+e[17]*n[11]+e[18]*n[16],t[17]=e[15]*n[2]+e[16]*n[7]+e[17]*n[12]+e[18]*n[17],t[18]=e[15]*n[3]+e[16]*n[8]+e[17]*n[13]+e[18]*n[18],t[19]=e[15]*n[4]+e[16]*n[9]+e[17]*n[14]+e[18]*n[19]+e[19],t},e.prototype._colorMatrix=function(t){var e=new Float32Array(t);return e[4]/=255,e[9]/=255,e[14]/=255,e[19]/=255,e},e.prototype.brightness=function(t,e){var n=[t,0,0,0,0,0,t,0,0,0,0,0,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.tint=function(t,e){var n=[(t>>16&255)/255,0,0,0,0,0,(t>>8&255)/255,0,0,0,0,0,(255&t)/255,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.greyscale=function(t,e){var n=[t,t,t,0,0,t,t,t,0,0,t,t,t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.blackAndWhite=function(t){this._loadMatrix([.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0],t)},e.prototype.hue=function(t,e){t=(t||0)/180*Math.PI;var n=Math.cos(t),r=Math.sin(t),i=1/3,o=(0,Math.sqrt)(i),s=[n+(1-n)*i,i*(1-n)-o*r,i*(1-n)+o*r,0,0,i*(1-n)+o*r,n+i*(1-n),i*(1-n)-o*r,0,0,i*(1-n)-o*r,i*(1-n)+o*r,n+i*(1-n),0,0,0,0,0,1,0];this._loadMatrix(s,e)},e.prototype.contrast=function(t,e){var n=(t||0)+1,r=-.5*(n-1),i=[n,0,0,0,r,0,n,0,0,r,0,0,n,0,r,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.saturate=function(t,e){void 0===t&&(t=0);var n=2*t/3+1,r=-.5*(n-1),i=[n,r,r,0,0,r,n,r,0,0,r,r,n,0,0,0,0,0,1,0];this._loadMatrix(i,e)},e.prototype.desaturate=function(){this.saturate(-1)},e.prototype.negative=function(t){this._loadMatrix([-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0],t)},e.prototype.sepia=function(t){this._loadMatrix([.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0],t)},e.prototype.technicolor=function(t){this._loadMatrix([1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0],t)},e.prototype.polaroid=function(t){this._loadMatrix([1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0],t)},e.prototype.toBGR=function(t){this._loadMatrix([0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0],t)},e.prototype.kodachrome=function(t){this._loadMatrix([1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0],t)},e.prototype.browni=function(t){this._loadMatrix([.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0],t)},e.prototype.vintage=function(t){this._loadMatrix([.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0],t)},e.prototype.colorTone=function(t,e,n,r,i){var o=((n=n||16770432)>>16&255)/255,s=(n>>8&255)/255,a=(255&n)/255,l=((r=r||3375104)>>16&255)/255,u=(r>>8&255)/255,c=(255&r)/255,h=[.3,.59,.11,0,0,o,s,a,t=t||.2,0,l,u,c,e=e||.15,0,o-l,s-u,a-c,0,0];this._loadMatrix(h,i)},e.prototype.night=function(t,e){var n=[-2*(t=t||.1),-t,0,0,0,-t,0,t,0,0,0,t,2*t,0,0,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.predator=function(t,e){var n=[11.224130630493164*t,-4.794486999511719*t,-2.8746118545532227*t,0*t,.40342438220977783*t,-3.6330697536468506*t,9.193157196044922*t,-2.951810836791992*t,0*t,-1.316135048866272*t,-3.2184197902679443*t,-4.2375030517578125*t,7.476448059082031*t,0*t,.8044459223747253*t,0,0,0,1,0];this._loadMatrix(n,e)},e.prototype.lsd=function(t){this._loadMatrix([2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0],t)},e.prototype.reset=function(){this._loadMatrix([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0],!1)},Object.defineProperty(e.prototype,"matrix",{get:function(){return this.uniforms.m},set:function(t){this.uniforms.m=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"alpha",{get:function(){return this.uniforms.uAlpha},set:function(t){this.uniforms.uAlpha=t},enumerable:!1,configurable:!0}),e}(fh);Im.prototype.grayscale=Im.prototype.greyscale;var Lm=function(t,e){return(Lm=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])})(t,e)};var Nm=function(t){function e(e,n){var r=this,i=new du;return e.renderable=!1,(r=t.call(this,"attribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\nuniform mat3 filterMatrix;\n\nvarying vec2 vTextureCoord;\nvarying vec2 vFilterCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvec2 filterTextureCoord( void )\n{\n    return aVertexPosition * (outputFrame.zw * inputSize.zw);\n}\n\nvoid main(void)\n{\n\tgl_Position = filterVertexPosition();\n\tvTextureCoord = filterTextureCoord();\n\tvFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0)  ).xy;\n}\n","varying vec2 vFilterCoord;\nvarying vec2 vTextureCoord;\n\nuniform vec2 scale;\nuniform mat2 rotation;\nuniform sampler2D uSampler;\nuniform sampler2D mapSampler;\n\nuniform highp vec4 inputSize;\nuniform vec4 inputClamp;\n\nvoid main(void)\n{\n  vec4 map =  texture2D(mapSampler, vFilterCoord);\n\n  map -= 0.5;\n  map.xy = scale * inputSize.zw * (rotation * map.xy);\n\n  gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));\n}\n",{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])})||this).maskSprite=e,r.maskMatrix=i,null==n&&(n=20),r.scale=new cu(n,n),r}return function(t,e){function n(){this.constructor=t}Lm(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e.prototype.apply=function(t,e,n,r){this.uniforms.filterMatrix=t.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;var i=this.maskSprite.worldTransform,o=Math.sqrt(i.a*i.a+i.b*i.b),s=Math.sqrt(i.c*i.c+i.d*i.d);0!==o&&0!==s&&(this.uniforms.rotation[0]=i.a/o,this.uniforms.rotation[1]=i.b/o,this.uniforms.rotation[2]=i.c/s,this.uniforms.rotation[3]=i.d/s),t.applyFilter(this,e,n,r)},Object.defineProperty(e.prototype,"map",{get:function(){return this.uniforms.mapSampler},set:function(t){this.uniforms.mapSampler=t},enumerable:!1,configurable:!0}),e}(fh),Fm=function(t,e){return(Fm=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])})(t,e)};var km=function(t){function e(){return t.call(this,"\nattribute vec2 aVertexPosition;\n\nuniform mat3 projectionMatrix;\n\nvarying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\n\nuniform vec4 inputSize;\nuniform vec4 outputFrame;\n\nvec4 filterVertexPosition( void )\n{\n    vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;\n\n    return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);\n}\n\nvoid texcoords(vec2 fragCoord, vec2 inverseVP,\n               out vec2 v_rgbNW, out vec2 v_rgbNE,\n               out vec2 v_rgbSW, out vec2 v_rgbSE,\n               out vec2 v_rgbM) {\n    v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;\n    v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;\n    v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;\n    v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;\n    v_rgbM = vec2(fragCoord * inverseVP);\n}\n\nvoid main(void) {\n\n   gl_Position = filterVertexPosition();\n\n   vFragCoord = aVertexPosition * outputFrame.zw;\n\n   texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n}\n",'varying vec2 v_rgbNW;\nvarying vec2 v_rgbNE;\nvarying vec2 v_rgbSW;\nvarying vec2 v_rgbSE;\nvarying vec2 v_rgbM;\n\nvarying vec2 vFragCoord;\nuniform sampler2D uSampler;\nuniform highp vec4 inputSize;\n\n\n/**\n Basic FXAA implementation based on the code on geeks3d.com with the\n modification that the texture2DLod stuff was removed since it\'s\n unsupported by WebGL.\n\n --\n\n From:\n https://github.com/mitsuhiko/webgl-meincraft\n\n Copyright (c) 2011 by Armin Ronacher.\n\n Some rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions are\n met:\n\n * Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n * Redistributions in binary form must reproduce the above\n copyright notice, this list of conditions and the following\n disclaimer in the documentation and/or other materials provided\n with the distribution.\n\n * The names of the contributors may not be used to endorse or\n promote products derived from this software without specific\n prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n */\n\n#ifndef FXAA_REDUCE_MIN\n#define FXAA_REDUCE_MIN   (1.0/ 128.0)\n#endif\n#ifndef FXAA_REDUCE_MUL\n#define FXAA_REDUCE_MUL   (1.0 / 8.0)\n#endif\n#ifndef FXAA_SPAN_MAX\n#define FXAA_SPAN_MAX     8.0\n#endif\n\n//optimized version for mobile, where dependent\n//texture reads can be a bottleneck\nvec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,\n          vec2 v_rgbNW, vec2 v_rgbNE,\n          vec2 v_rgbSW, vec2 v_rgbSE,\n          vec2 v_rgbM) {\n    vec4 color;\n    vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;\n    vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;\n    vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;\n    vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;\n    vec4 texColor = texture2D(tex, v_rgbM);\n    vec3 rgbM  = texColor.xyz;\n    vec3 luma = vec3(0.299, 0.587, 0.114);\n    float lumaNW = dot(rgbNW, luma);\n    float lumaNE = dot(rgbNE, luma);\n    float lumaSW = dot(rgbSW, luma);\n    float lumaSE = dot(rgbSE, luma);\n    float lumaM  = dot(rgbM,  luma);\n    float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));\n    float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));\n\n    mediump vec2 dir;\n    dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));\n    dir.y =  ((lumaNW + lumaSW) - (lumaNE + lumaSE));\n\n    float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *\n                          (0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);\n\n    float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);\n    dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),\n              max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),\n                  dir * rcpDirMin)) * inverseVP;\n\n    vec3 rgbA = 0.5 * (\n                       texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +\n                       texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);\n    vec3 rgbB = rgbA * 0.5 + 0.25 * (\n                                     texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +\n                                     texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);\n\n    float lumaB = dot(rgbB, luma);\n    if ((lumaB < lumaMin) || (lumaB > lumaMax))\n        color = vec4(rgbA, texColor.a);\n    else\n        color = vec4(rgbB, texColor.a);\n    return color;\n}\n\nvoid main() {\n\n      vec4 color;\n\n      color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);\n\n      gl_FragColor = color;\n}\n')||this}return function(t,e){function n(){this.constructor=t}Fm(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),e}(fh),Um=function(t,e){return(Um=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])})(t,e)};var Bm,Gm,zm,Hm,jm,Vm,Xm,Wm,Ym,qm,$m,Km,Zm,Jm,Qm,tg,eg,ng,rg,ig=function(t){function e(e,n){void 0===e&&(e=.5),void 0===n&&(n=Math.random());var r=t.call(this,Xh,"precision highp float;\n\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\n\nuniform float uNoise;\nuniform float uSeed;\nuniform sampler2D uSampler;\n\nfloat rand(vec2 co)\n{\n    return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\n}\n\nvoid main()\n{\n    vec4 color = texture2D(uSampler, vTextureCoord);\n    float randomValue = rand(gl_FragCoord.xy * uSeed);\n    float diff = (randomValue - 0.5) * uNoise;\n\n    // Un-premultiply alpha before applying the color matrix. See issue #3539.\n    if (color.a > 0.0) {\n        color.rgb /= color.a;\n    }\n\n    color.r += diff;\n    color.g += diff;\n    color.b += diff;\n\n    // Premultiply alpha again.\n    color.rgb *= color.a;\n\n    gl_FragColor = color;\n}\n",{uNoise:0,uSeed:0})||this;return r.noise=e,r.seed=n,r}return function(t,e){function n(){this.constructor=t}Um(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}(e,t),Object.defineProperty(e.prototype,"noise",{get:function(){return this.uniforms.uNoise},set:function(t){this.uniforms.uNoise=t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"seed",{get:function(){return this.uniforms.uSeed},set:function(t){this.uniforms.uSeed=t},enumerable:!1,configurable:!0}),e}(fh);!function(t){t[t.WEBGL_LEGACY=0]="WEBGL_LEGACY",t[t.WEBGL=1]="WEBGL",t[t.WEBGL2=2]="WEBGL2"}(Bm||(Bm={})),function(t){t[t.UNKNOWN=0]="UNKNOWN",t[t.WEBGL=1]="WEBGL",t[t.CANVAS=2]="CANVAS"}(Gm||(Gm={})),function(t){t[t.COLOR=16384]="COLOR",t[t.DEPTH=256]="DEPTH",t[t.STENCIL=1024]="STENCIL"}(zm||(zm={})),function(t){t[t.NORMAL=0]="NORMAL",t[t.ADD=1]="ADD",t[t.MULTIPLY=2]="MULTIPLY",t[t.SCREEN=3]="SCREEN",t[t.OVERLAY=4]="OVERLAY",t[t.DARKEN=5]="DARKEN",t[t.LIGHTEN=6]="LIGHTEN",t[t.COLOR_DODGE=7]="COLOR_DODGE",t[t.COLOR_BURN=8]="COLOR_BURN",t[t.HARD_LIGHT=9]="HARD_LIGHT",t[t.SOFT_LIGHT=10]="SOFT_LIGHT",t[t.DIFFERENCE=11]="DIFFERENCE",t[t.EXCLUSION=12]="EXCLUSION",t[t.HUE=13]="HUE",t[t.SATURATION=14]="SATURATION",t[t.COLOR=15]="COLOR",t[t.LUMINOSITY=16]="LUMINOSITY",t[t.NORMAL_NPM=17]="NORMAL_NPM",t[t.ADD_NPM=18]="ADD_NPM",t[t.SCREEN_NPM=19]="SCREEN_NPM",t[t.NONE=20]="NONE",t[t.SRC_OVER=0]="SRC_OVER",t[t.SRC_IN=21]="SRC_IN",t[t.SRC_OUT=22]="SRC_OUT",t[t.SRC_ATOP=23]="SRC_ATOP",t[t.DST_OVER=24]="DST_OVER",t[t.DST_IN=25]="DST_IN",t[t.DST_OUT=26]="DST_OUT",t[t.DST_ATOP=27]="DST_ATOP",t[t.ERASE=26]="ERASE",t[t.SUBTRACT=28]="SUBTRACT",t[t.XOR=29]="XOR"}(Hm||(Hm={})),function(t){t[t.POINTS=0]="POINTS",t[t.LINES=1]="LINES",t[t.LINE_LOOP=2]="LINE_LOOP",t[t.LINE_STRIP=3]="LINE_STRIP",t[t.TRIANGLES=4]="TRIANGLES",t[t.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",t[t.TRIANGLE_FAN=6]="TRIANGLE_FAN"}(jm||(jm={})),function(t){t[t.RGBA=6408]="RGBA",t[t.RGB=6407]="RGB",t[t.RG=33319]="RG",t[t.RED=6403]="RED",t[t.RGBA_INTEGER=36249]="RGBA_INTEGER",t[t.RGB_INTEGER=36248]="RGB_INTEGER",t[t.RG_INTEGER=33320]="RG_INTEGER",t[t.RED_INTEGER=36244]="RED_INTEGER",t[t.ALPHA=6406]="ALPHA",t[t.LUMINANCE=6409]="LUMINANCE",t[t.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",t[t.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",t[t.DEPTH_STENCIL=34041]="DEPTH_STENCIL"}(Vm||(Vm={})),function(t){t[t.TEXTURE_2D=3553]="TEXTURE_2D",t[t.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",t[t.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",t[t.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",t[t.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",t[t.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",t[t.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",t[t.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z"}(Xm||(Xm={})),function(t){t[t.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",t[t.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",t[t.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",t[t.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",t[t.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",t[t.UNSIGNED_INT=5125]="UNSIGNED_INT",t[t.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",t[t.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",t[t.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",t[t.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",t[t.BYTE=5120]="BYTE",t[t.SHORT=5122]="SHORT",t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",t[t.HALF_FLOAT=36193]="HALF_FLOAT"}(Wm||(Wm={})),function(t){t[t.FLOAT=0]="FLOAT",t[t.INT=1]="INT",t[t.UINT=2]="UINT"}(Ym||(Ym={})),function(t){t[t.NEAREST=0]="NEAREST",t[t.LINEAR=1]="LINEAR"}(qm||(qm={})),function(t){t[t.CLAMP=33071]="CLAMP",t[t.REPEAT=10497]="REPEAT",t[t.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT"}($m||($m={})),function(t){t[t.OFF=0]="OFF",t[t.POW2=1]="POW2",t[t.ON=2]="ON",t[t.ON_MANUAL=3]="ON_MANUAL"}(Km||(Km={})),function(t){t[t.NPM=0]="NPM",t[t.UNPACK=1]="UNPACK",t[t.PMA=2]="PMA",t[t.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",t[t.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",t[t.PREMULTIPLY_ALPHA=2]="PREMULTIPLY_ALPHA"}(Zm||(Zm={})),function(t){t[t.NO=0]="NO",t[t.YES=1]="YES",t[t.AUTO=2]="AUTO",t[t.BLEND=0]="BLEND",t[t.CLEAR=1]="CLEAR",t[t.BLIT=2]="BLIT"}(Jm||(Jm={})),function(t){t[t.AUTO=0]="AUTO",t[t.MANUAL=1]="MANUAL"}(Qm||(Qm={})),function(t){t.LOW="lowp",t.MEDIUM="mediump",t.HIGH="highp"}(tg||(tg={})),function(t){t[t.NONE=0]="NONE",t[t.SCISSOR=1]="SCISSOR",t[t.STENCIL=2]="STENCIL",t[t.SPRITE=3]="SPRITE"}(eg||(eg={})),function(t){t[t.NONE=0]="NONE",t[t.LOW=2]="LOW",t[t.MEDIUM=4]="MEDIUM",t[t.HIGH=8]="HIGH"}(ng||(ng={})),function(t){t[t.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",t[t.ARRAY_BUFFER=34962]="ARRAY_BUFFER",t[t.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER"}(rg||(rg={}));var og=new du;Su.prototype._cacheAsBitmap=!1,Su.prototype._cacheData=null,Su.prototype._cacheAsBitmapResolution=null,Su.prototype._cacheAsBitmapMultisample=ng.NONE;var sg=function(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null};Object.defineProperties(Su.prototype,{cacheAsBitmapResolution:{get:function(){return this._cacheAsBitmapResolution},set:function(t){t!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get:function(){return this._cacheAsBitmapMultisample},set:function(t){t!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=t,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get:function(){return this._cacheAsBitmap},set:function(t){var e;this._cacheAsBitmap!==t&&(this._cacheAsBitmap=t,t?(this._cacheData||(this._cacheData=new sg),(e=this._cacheData).originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):((e=this._cacheData).sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea))}}}),Su.prototype._renderCached=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(t),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(t))},Su.prototype._initCachedDisplayObject=function(t){var e;if(!this._cacheData||!this._cacheData.sprite){var n=this.alpha;this.alpha=1,t.batch.flush();var r=this.getLocalBounds(null,!0).clone();if(this.filters){var i=this.filters[0].padding;r.pad(i)}r.ceil(wl.RESOLUTION);var o=t.renderTexture.current,s=t.renderTexture.sourceFrame.clone(),a=t.renderTexture.destinationFrame.clone(),l=t.projection.transform,u=mc.create({width:r.width,height:r.height,resolution:this.cacheAsBitmapResolution||t.resolution,multisample:null!==(e=this.cacheAsBitmapMultisample)&&void 0!==e?e:t.multisample}),c="cacheAsBitmap_"+Wl();this._cacheData.textureCacheId=c,Zu.addToCache(u.baseTexture,c),pc.addToCache(u,c);var h=this.transform.localTransform.copyTo(og).invert().translate(-r.x,-r.y);this.render=this._cacheData.originalRender,t.render(this,{renderTexture:u,clear:!0,transform:h,skipUpdateTransform:!1}),t.framebuffer.blit(),t.projection.transform=l,t.renderTexture.bind(o,s,a),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var d=new sf(u);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-r.x/r.width,d.anchor.y=-r.y/r.height,d.alpha=n,d._bounds=this._bounds,this._cacheData.sprite=d,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=d.containsPoint.bind(d)}},Su.prototype._renderCachedCanvas=function(t){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(t),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(t))},Su.prototype._initCachedDisplayObjectCanvas=function(t){if(!this._cacheData||!this._cacheData.sprite){var e=this.getLocalBounds(null,!0),n=this.alpha;this.alpha=1;var r=t.context,i=t._projTransform;e.ceil(wl.RESOLUTION);var o=mc.create({width:e.width,height:e.height}),s="cacheAsBitmap_"+Wl();this._cacheData.textureCacheId=s,Zu.addToCache(o.baseTexture,s),pc.addToCache(o,s);var a=og;this.transform.localTransform.copyTo(a),a.invert(),a.tx-=e.x,a.ty-=e.y,this.renderCanvas=this._cacheData.originalRenderCanvas,t.render(this,{renderTexture:o,clear:!0,transform:a,skipUpdateTransform:!1}),t.context=r,t._projTransform=i,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=n;var l=new sf(o);l.transform.worldTransform=this.transform.worldTransform,l.anchor.x=-e.x/e.width,l.anchor.y=-e.y/e.height,l.alpha=n,l._bounds=this._bounds,this._cacheData.sprite=l,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=t._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=l.containsPoint.bind(l)}},Su.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID},Su.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)},Su.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,Zu.removeFromCache(this._cacheData.textureCacheId),pc.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null},Su.prototype._cacheAsBitmapDestroy=function(t){this.cacheAsBitmap=!1,this.destroy(t)},Su.prototype.name=null,Du.prototype.getChildByName=function(t,e){for(var n=0,r=this.children.length;n<r;n++)if(this.children[n].name===t)return this.children[n];if(e)for(n=0,r=this.children.length;n<r;n++){if(this.children[n].getChildByName){var i=this.children[n].getChildByName(t,!0);if(i)return i}}return null},Su.prototype.getGlobalPosition=function(t,e){return void 0===t&&(t=new cu),void 0===e&&(e=!1),this.parent?this.parent.toGlobal(this.position,t,e):(t.x=this.position.x,t.y=this.position.y),t};var ag=function(t,e){return(ag=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])})(t,e)};function lg(t,e){function n(){this.constructor=t}ag(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}var ug=function(t){function e(e,n,r,i){void 0===e&&(e=100),void 0===n&&(n=100),void 0===r&&(r=10),void 0===i&&(i=10);var o=t.call(this)||this;return o.segWidth=r,o.segHeight=i,o.width=e,o.height=n,o.build(),o}return lg(e,t),e.prototype.build=function(){for(var t=this.segWidth*this.segHeight,e=[],n=[],r=[],i=this.segWidth-1,o=this.segHeight-1,s=this.width/i,a=this.height/o,l=0;l<t;l++){var u=l%this.segWidth,c=l/this.segWidth|0;e.push(u*s,c*a),n.push(u/i,c/o)}var h=i*o;for(l=0;l<h;l++){var d=l%i,p=l/i|0,f=p*this.segWidth+d,m=p*this.segWidth+d+1,g=(p+1)*this.segWidth+d,v=(p+1)*this.segWidth+d+1;r.push(f,m,g,m,v,g)}this.buffers[0].data=new Float32Array(e),this.buffers[1].data=new Float32Array(n),this.indexBuffer.data=new Uint16Array(r),this.buffers[0].update(),this.buffers[1].update(),this.indexBuffer.update()},e}(Wf),cg=function(t){function e(e,n,r){void 0===e&&(e=200),void 0===r&&(r=0);var i=t.call(this,new Float32Array(4*n.length),new Float32Array(4*n.length),new Uint16Array(6*(n.length-1)))||this;return i.points=n,i._width=e,i.textureScale=r,i.build(),i}return lg(e,t),Object.defineProperty(e.prototype,"width",{get:function(){return this._width},enumerable:!1,configurable:!0}),e.prototype.build=function(){var t=this.points;if(t){var e=this.getBuffer("aVertexPosition"),n=this.getBuffer("aTextureCoord"),r=this.getIndex();if(!(t.length<1)){e.data.length/4!==t.length&&(e.data=new Float32Array(4*t.length),n.data=new Float32Array(4*t.length),r.data=new Uint16Array(6*(t.length-1)));var i=n.data,o=r.data;i[0]=0,i[1]=0,i[2]=0,i[3]=1;for(var s=0,a=t[0],l=this._width*this.textureScale,u=t.length,c=0;c<u;c++){var h=4*c;if(this.textureScale>0){var d=a.x-t[c].x,p=a.y-t[c].y,f=Math.sqrt(d*d+p*p);a=t[c],s+=f/l}else s=c/(u-1);i[h]=s,i[h+1]=0,i[h+2]=s,i[h+3]=1}var m=0;for(c=0;c<u-1;c++){h=2*c;o[m++]=h,o[m++]=h+1,o[m++]=h+2,o[m++]=h+2,o[m++]=h+1,o[m++]=h+3}n.update(),r.update(),this.updateVertices()}}},e.prototype.updateVertices=function(){var t=this.points;if(!(t.length<1)){for(var e,n=t[0],r=0,i=0,o=this.buffers[0].data,s=t.length,a=0;a<s;a++){var l=t[a],u=4*a;i=-((e=a<t.length-1?t[a+1]:l).x-n.x),r=e.y-n.y;var c=Math.sqrt(r*r+i*i),h=this.textureScale>0?this.textureScale*this._width/2:this._width/2;r/=c,i/=c,r*=h,i*=h,o[u]=l.x+r,o[u+1]=l.y+i,o[u+2]=l.x-r,o[u+3]=l.y-i,n=l}this.buffers[0].update()}},e.prototype.update=function(){this.textureScale>0?this.build():this.updateVertices()},e}(Wf),hg=(function(t){function e(e,n,r){void 0===r&&(r=0);var i=this,o=new cg(e.height,n,r),s=new Xf(e);return r>0&&(e.baseTexture.wrapMode=pl.REPEAT),(i=t.call(this,o,s)||this).autoUpdate=!0,i}lg(e,t),e.prototype._render=function(e){var n=this.geometry;(this.autoUpdate||n._width!==this.shader.texture.height)&&(n._width=this.shader.texture.height,n.update()),t.prototype._render.call(this,e)}}(Vf),function(t){function e(e,n,r){var i=this,o=new ug(e.width,e.height,n,r),s=new Xf(pc.WHITE);return(i=t.call(this,o,s)||this).texture=e,i.autoResize=!0,i}return lg(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID;var t=this.geometry,e=this.shader.texture,n=e.width,r=e.height;!this.autoResize||t.width===n&&t.height===r||(t.width=this.shader.texture.width,t.height=this.shader.texture.height,t.build())},Object.defineProperty(e.prototype,"texture",{get:function(){return this.shader.texture},set:function(t){this.shader.texture!==t&&(this.shader.texture=t,this._textureID=-1,t.baseTexture.valid?this.textureUpdated():t.once("update",this.textureUpdated,this))},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this._textureID!==this.shader.texture._updateID&&this.textureUpdated(),t.prototype._render.call(this,e)},e.prototype.destroy=function(e){this.shader.texture.off("update",this.textureUpdated,this),t.prototype.destroy.call(this,e)},e}(Vf)),dg=(function(t){function e(e,n,r,i,o){void 0===e&&(e=pc.EMPTY);var s=this,a=new Wf(n,r,i);a.getBuffer("aVertexPosition").static=!1;var l=new Xf(e);return(s=t.call(this,a,l,null,o)||this).autoUpdate=!0,s}lg(e,t),Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype._render=function(e){this.autoUpdate&&this.geometry.getBuffer("aVertexPosition").update(),t.prototype._render.call(this,e)}}(Vf),function(t){function e(e,n,r,i,o){void 0===n&&(n=10),void 0===r&&(r=10),void 0===i&&(i=10),void 0===o&&(o=10);var s=t.call(this,pc.WHITE,4,4)||this;return s._origWidth=e.orig.width,s._origHeight=e.orig.height,s._width=s._origWidth,s._height=s._origHeight,s._leftWidth=n,s._rightWidth=i,s._topHeight=r,s._bottomHeight=o,s.texture=e,s}lg(e,t),e.prototype.textureUpdated=function(){this._textureID=this.shader.texture._updateID,this._refresh()},Object.defineProperty(e.prototype,"vertices",{get:function(){return this.geometry.getBuffer("aVertexPosition").data},set:function(t){this.geometry.getBuffer("aVertexPosition").data=t},enumerable:!1,configurable:!0}),e.prototype.updateHorizontalVertices=function(){var t=this.vertices,e=this._getMinScale();t[9]=t[11]=t[13]=t[15]=this._topHeight*e,t[17]=t[19]=t[21]=t[23]=this._height-this._bottomHeight*e,t[25]=t[27]=t[29]=t[31]=this._height},e.prototype.updateVerticalVertices=function(){var t=this.vertices,e=this._getMinScale();t[2]=t[10]=t[18]=t[26]=this._leftWidth*e,t[4]=t[12]=t[20]=t[28]=this._width-this._rightWidth*e,t[6]=t[14]=t[22]=t[30]=this._width},e.prototype._getMinScale=function(){var t=this._leftWidth+this._rightWidth,e=this._width>t?1:this._width/t,n=this._topHeight+this._bottomHeight,r=this._height>n?1:this._height/n;return Math.min(e,r)},Object.defineProperty(e.prototype,"width",{get:function(){return this._width},set:function(t){this._width=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(t){this._height=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"leftWidth",{get:function(){return this._leftWidth},set:function(t){this._leftWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"rightWidth",{get:function(){return this._rightWidth},set:function(t){this._rightWidth=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"topHeight",{get:function(){return this._topHeight},set:function(t){this._topHeight=t,this._refresh()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bottomHeight",{get:function(){return this._bottomHeight},set:function(t){this._bottomHeight=t,this._refresh()},enumerable:!1,configurable:!0}),e.prototype._refresh=function(){var t=this.texture,e=this.geometry.buffers[1].data;this._origWidth=t.orig.width,this._origHeight=t.orig.height;var n=1/this._origWidth,r=1/this._origHeight;e[0]=e[8]=e[16]=e[24]=0,e[1]=e[3]=e[5]=e[7]=0,e[6]=e[14]=e[22]=e[30]=1,e[25]=e[27]=e[29]=e[31]=1,e[2]=e[10]=e[18]=e[26]=n*this._leftWidth,e[4]=e[12]=e[20]=e[28]=1-n*this._rightWidth,e[9]=e[11]=e[13]=e[15]=r*this._topHeight,e[17]=e[19]=e[21]=e[23]=1-r*this._bottomHeight,this.updateHorizontalVertices(),this.updateVerticalVertices(),this.geometry.buffers[0].update(),this.geometry.buffers[1].update()}}(hg),function(t,e){return(dg=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])})(t,e)});!function(t){function e(e,n){void 0===n&&(n=!0);var r=t.call(this,e[0]instanceof pc?e[0]:e[0].texture)||this;return r._textures=null,r._durations=null,r._autoUpdate=n,r._isConnectedToTicker=!1,r.animationSpeed=1,r.loop=!0,r.updateAnchor=!1,r.onComplete=null,r.onFrameChange=null,r.onLoop=null,r._currentTime=0,r._playing=!1,r._previousFrame=null,r.textures=e,r}(function(t,e){function n(){this.constructor=t}dg(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)})(e,t),e.prototype.stop=function(){this._playing&&(this._playing=!1,this._autoUpdate&&this._isConnectedToTicker&&(Pu.shared.remove(this.update,this),this._isConnectedToTicker=!1))},e.prototype.play=function(){this._playing||(this._playing=!0,this._autoUpdate&&!this._isConnectedToTicker&&(Pu.shared.add(this.update,this,Cu.HIGH),this._isConnectedToTicker=!0))},e.prototype.gotoAndStop=function(t){this.stop();var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture()},e.prototype.gotoAndPlay=function(t){var e=this.currentFrame;this._currentTime=t,e!==this.currentFrame&&this.updateTexture(),this.play()},e.prototype.update=function(t){if(this._playing){var e=this.animationSpeed*t,n=this.currentFrame;if(null!==this._durations){var r=this._currentTime%1*this._durations[this.currentFrame];for(r+=e/60*1e3;r<0;)this._currentTime--,r+=this._durations[this.currentFrame];var i=Math.sign(this.animationSpeed*t);for(this._currentTime=Math.floor(this._currentTime);r>=this._durations[this.currentFrame];)r-=this._durations[this.currentFrame]*i,this._currentTime+=i;this._currentTime+=r/this._durations[this.currentFrame]}else this._currentTime+=e;this._currentTime<0&&!this.loop?(this.gotoAndStop(0),this.onComplete&&this.onComplete()):this._currentTime>=this._textures.length&&!this.loop?(this.gotoAndStop(this._textures.length-1),this.onComplete&&this.onComplete()):n!==this.currentFrame&&(this.loop&&this.onLoop&&(this.animationSpeed>0&&this.currentFrame<n||this.animationSpeed<0&&this.currentFrame>n)&&this.onLoop(),this.updateTexture())}},e.prototype.updateTexture=function(){var t=this.currentFrame;this._previousFrame!==t&&(this._previousFrame=t,this._texture=this._textures[t],this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this.uvs=this._texture._uvs.uvsFloat32,this.updateAnchor&&this._anchor.copyFrom(this._texture.defaultAnchor),this.onFrameChange&&this.onFrameChange(this.currentFrame))},e.prototype.destroy=function(e){this.stop(),t.prototype.destroy.call(this,e),this.onComplete=null,this.onFrameChange=null,this.onLoop=null},e.fromFrames=function(t){for(var n=[],r=0;r<t.length;++r)n.push(pc.from(t[r]));return new e(n)},e.fromImages=function(t){for(var n=[],r=0;r<t.length;++r)n.push(pc.from(t[r]));return new e(n)},Object.defineProperty(e.prototype,"totalFrames",{get:function(){return this._textures.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textures",{get:function(){return this._textures},set:function(t){if(t[0]instanceof pc)this._textures=t,this._durations=null;else{this._textures=[],this._durations=[];for(var e=0;e<t.length;e++)this._textures.push(t[e].texture),this._durations.push(t[e].time)}this._previousFrame=null,this.gotoAndStop(0),this.updateTexture()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentFrame",{get:function(){var t=Math.floor(this._currentTime)%this._textures.length;return t<0&&(t+=this._textures.length),t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playing",{get:function(){return this._playing},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"autoUpdate",{get:function(){return this._autoUpdate},set:function(t){t!==this._autoUpdate&&(this._autoUpdate=t,!this._autoUpdate&&this._isConnectedToTicker?(Pu.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._playing&&(Pu.shared.add(this.update,this),this._isConnectedToTicker=!0))},enumerable:!1,configurable:!0})}(sf);Vh.registerPlugin("accessibility",Ru),Vh.registerPlugin("extract",ud),Vh.registerPlugin("interaction",zu),Vh.registerPlugin("particle",Tp),Vh.registerPlugin("prepare",Rf),Vh.registerPlugin("batch",td),Vh.registerPlugin("tilingSprite",Uf),Sd.registerPlugin(im),Sd.registerPlugin(Ud),Sd.registerPlugin(np),Sd.registerPlugin(yp),Sd.registerPlugin(Pf),sd.registerPlugin(Iu),sd.registerPlugin(Ad);var pg={AlphaFilter:sm,BlurFilter:Om,BlurFilterPass:Rm,ColorMatrixFilter:Im,DisplacementFilter:Nm,FXAAFilter:km,NoiseFilter:ig};function fg(t){return(fg="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 mg(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,gg(r.key),r)}}function gg(t){var e=function(t,e){if("object"!=fg(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=fg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==fg(e)?e:String(e)}var vg=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=e,this.setSizes(),this.initScene(),this.loadImages()}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"loadImages",value:function(){var t=this;this.loader=new Sd,this.loader.add("shapeOrange","".concat(window.theme_assets_url,"/images/cyber-60/cyber60_gradient-1.png")),this.loader.add("shapeBlue","".concat(window.theme_assets_url,"/images/cyber-60/cyber60_gradient-2.png")),this.loader.add("turbulence","".concat(window.theme_assets_url,"/images/cyber-60/turbulence.frag")),this.loader.load((function(e,n){t.initSprites(n)}))}},{key:"initSprites",value:function(t){var e=this;this.el.parentElement.classList.add("loaded"),this.shapeOrange=new sf(t.shapeOrange.texture),this.shapeBlue=new sf(t.shapeBlue.texture),this.shapeBlue.anchor.set(.5,.5),this.shapeOrange.anchor.set(.5,.5);var n=this.shapeBlue.texture.orig.width/this.shapeBlue.texture.orig.height;this.shapeBlue.height=1.2*this.elHeight,this.shapeBlue.width=this.shapeBlue.height*n;var r=this.shapeOrange.texture.orig.width/this.shapeOrange.texture.orig.height;this.shapeOrange.height=1.2*this.elHeight,this.shapeOrange.width=this.shapeOrange.height*r,this.shapeBlue.x=this.elWidth/2,this.shapeBlue.y=this.elHeight/2,this.shapeOrange.x=this.elWidth/2,this.shapeOrange.y=this.elHeight/2,this.shapeBlueScale=this.shapeBlue.scale.x,this.shapeOrangeScale=this.shapeOrange.scale.x;var i=t.turbulence.data;this.uniformTimeAmount=0,this.uniformTimeSize=0,this.speedAmount=.01,this.speedSize=.02,this.filterParams={amount:0,complexity:3,size:0,time:0,offsetX:this.elWidth/2,offsetY:this.elHeight/2,offset:[this.elWidth/2,this.elHeight/2]},this.turbulenceFilter=new fh(null,i,this.filterParams),this.turbulenceFilter.autoFit=!1,this.filterContainer=new Du,this.filterContainer.position.set(0,0),this.filterContainer.addChild(this.shapeOrange),this.filterContainer.addChild(this.shapeBlue),this.filterContainer.filters=[this.turbulenceFilter],this.shapeBlue.blendMode=sl.SCREEN,this.app.stage.addChild(this.filterContainer);var o=.15*this.elWidth,s=.15*this.elHeight;this.filterContainer.filterArea=new ou(-o,-s,this.elWidth+2*o,this.elHeight+2*s),this.scaleTimeBlue=0,this.scaleTimeOrange=0,this.time=0,this.blur=-1,this.isAnimated=!0,this.app.start(),this.app.ticker.add((function(t){e.update(t)}))}},{key:"update",value:function(t){this.shapeBlue.rotation+=.01,this.shapeOrange.rotation-=.01,this.scaleTimeBlue+=.005*t;var e=1.2+.3*Math.sin(this.scaleTimeBlue)*this.shapeBlueScale;this.shapeBlue.scale.set(e),this.scaleTimeOrange+=.006*t;var n=1+.25*Math.sin(this.scaleTimeOrange)*this.shapeOrangeScale;this.shapeOrange.scale.set(n),this.uniformTimeAmount+=t*this.speedAmount,this.uniformTimeSize+=t*this.speedSize,this.time+=.001*t,this.turbulenceFilter.uniforms.amount=.12*(.5*Math.sin(this.uniformTimeAmount)+.5),this.turbulenceFilter.uniforms.size=.5*Math.sin(this.uniformTimeSize)+.5,this.turbulenceFilter.uniforms.time=Math.sin(this.time)}},{key:"initScene",value:function(){this.app=new sd({width:this.elWidth,height:this.elHeight,backgroundColor:0,resolution:1,autoResize:!0,antialias:!0}),this.el.appendChild(this.app.view),this.initMonitorIfInView()}},{key:"setSizes",value:function(){this.elWidth=this.el.offsetWidth,this.elHeight=this.el.offsetHeight}},{key:"initMonitorIfInView",value:function(){var t=this;new MutationObserver((function(e){e.forEach((function(e){e.target===t.el&&"class"===e.attributeName&&(t.isAnimated=e.target.classList.contains("is-inview"),t.isAnimated?t.app.start():t.app.stop())}))})).observe(this.el,{attributes:!0})}},{key:"beforeDestroy",value:function(){this.shapeBlue&&(this.shapeBlue.destroy(!0),this.shapeBlue=null),this.shapeOrange&&(this.shapeOrange.destroy(!0),this.shapeOrange=null),this.turbulenceFilter&&(this.turbulenceFilter.destroy(!0),this.turbulenceFilter=null),this.filterContainer&&(this.filterContainer.destroy(!0),this.filterContainer=null),this.loader&&(this.loader.destroy(!0),this.loader=null),this.app&&(this.app.destroy(!0),this.app=null)}}])&&mg(e.prototype,n),r&&mg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=gg(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(vg,"instance",null);var yg=vg;function _g(t){return(_g="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 bg(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,wg(r.key),r)}}function xg(t,e,n){return(e=wg(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function wg(t){var e=function(t,e){if("object"!=_g(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=_g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_g(e)?e:String(e)}h.b.registerPlugin(rn);var Eg=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.initApp(),this.loadSprites(),this.currentMouse=1,this.targetMouse=.5,this.opacity=0,this.scrollerPos=0}var e,n,r;return e=t,(n=[{key:"initApp",value:function(){this.containerEl=document.getElementById("lsvp-logo-3d"),this.parent=document.getElementById("introduction"),this.scroller=window.scroller,this.initialized=!1,this.mouseInitialized=!1,this.app=new sd({backgroundAlpha:0,resolution:window.devicePixelRatio||1,autoDensity:!0,antialias:!0,width:this.containerEl.offsetWidth,height:this.containerEl.offsetHeight}),this.containerEl.appendChild(this.app.view)}},{key:"initScrollTrigger",value:function(){var t=this;rn.create({trigger:this.parent,start:"top top",end:function(){return"+=".concat(window.innerHeight/2)},scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0,onUpdate:function(e){t.scrollerPos=.25*e.progress}})}},{key:"loadSprites",value:function(){var e=this;Sd.shared.add("logo",t.SPRITE_SHEET_PATH).add("overlay",t.OVERLAY_PATH).load((function(t,n){e.setup(n.logo.texture,n.overlay.texture)}))}},{key:"setup",value:function(t,e){var n={uSampler:t,uOverlay:e,uMouse:0,uOffsetX:.3,uOffsetY:-.07,uScale:2,uOverlayStrength:1.6,uAlpha:0},r=(new Tc).addAttribute("aVertexPosition",[-1,-1,1,-1,1,1,-1,1],2).addAttribute("aTextureCoord",[0,0,1,0,1,1,0,1],2).addIndex([0,1,2,0,2,3]);this.shader=dh.from("\n            attribute vec2 aVertexPosition;\n            attribute vec2 aTextureCoord;\n\n            uniform mat3 projectionMatrix;\n            uniform mat3 translationMatrix;\n\n            varying vec2 vTextureCoord;\n\n            void main() {\n                gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\n                vTextureCoord = aTextureCoord;\n            }","\n            precision highp float;\n            varying vec2 vTextureCoord;\n            uniform sampler2D uSampler;\n            uniform sampler2D uOverlay;\n            uniform float uMouse;\n            uniform float uOffsetX;\n            uniform float uOffsetY;\n            uniform float uScale;\n            uniform float uOverlayStrength;\n            uniform float uAlpha;\n\n            vec2 getSubUV(vec2 uv, float index) {\n                float ind = index / 8.0;\n                vec2 uv1 = uv / 8.0;\n                uv1.y += floor(ind) / 8.0;\n                uv1.x += mod(floor(ind * 8.0), 8.0) / 8.0;\n                return uv1;\n            }\n\n            vec3 overlayBlend(vec3 base, vec3 blend) {\n                return mix(\n                    2.0 * base * blend,\n                    1.0 - 2.0 * (1.0 - base) * (1.0 - blend),\n                    step(0.5, base)\n                );\n            }\n\n            void main() {\n                float index = mix(1.0, 63.0, uMouse);\n                float blend = fract(index);\n                vec2 subUV = getSubUV(vTextureCoord, index);\n                vec2 subUV2 = getSubUV(vTextureCoord, index + 1.0);\n                \n                vec4 diffuse = texture2D(uSampler, subUV);\n                vec4 diffuseNext = texture2D(uSampler, subUV2);\n                \n                vec4 spriteColor = mix(diffuse, diffuseNext, blend);\n                \n                vec2 overlayUV = (vTextureCoord - 0.5) / uScale + 0.5;\n                overlayUV += vec2(uOffsetX, uOffsetY);\n                \n                vec4 overlayColor = texture2D(uOverlay, overlayUV);\n                \n                vec3 blendedColor = overlayBlend(spriteColor.rgb, overlayColor.rgb);\n                \n                float alpha = spriteColor.a * uAlpha;\n                \n                gl_FragColor = vec4(mix(spriteColor.rgb, blendedColor, overlayColor.a * uOverlayStrength), alpha);\n            }",n),this.quad=new Vf(r,this.shader);var i=Math.min(this.app.screen.width,this.app.screen.height)/2;this.quad.scale.set(i),this.quad.position.set(this.app.screen.width/2,this.app.screen.height/2),this.renderTexture=mc.create({width:this.app.screen.width,height:this.app.screen.height}),this.outputSprite=new sf(this.renderTexture),this.blurFilter=new pg.BlurFilter(23,12),this.outputSprite.filters=[this.blurFilter],this.app.stage.addChild(this.outputSprite),window.addEventListener("mousemove",this.onMouseMove.bind(this)),this.app.ticker.add(this.animate.bind(this)),this.initScrollTrigger()}},{key:"onMouseMove",value:function(t){this.mouseInitialized&&(this.targetMouse=t.clientX/window.innerWidth*.5+.25)}},{key:"easeOutPower",value:function(t,e){return 1-Math.pow(1-t,e)}},{key:"animate",value:function(t){var e=this.targetMouse-this.currentMouse;this.mouseInitialized?Math.abs(e)>1e-4?this.currentMouse+=e*this.easeOutPower(.07,2):this.currentMouse=this.targetMouse:Math.abs(e)>.003?this.currentMouse+=.04*e:(this.currentMouse=this.targetMouse,this.mouseInitialized=!0),this.shader.uniforms.uMouse=this.currentMouse-this.scrollerPos,this.shader.uniforms.uAlpha=this.opacity,this.opacity<.999?this.opacity+=.03*(1-this.opacity):this.opacity=1,this.app.renderer.render(this.quad,{renderTexture:this.renderTexture})}},{key:"destroy",value:function(){window.removeEventListener("mousemove",this.onMouseMove),this.app.destroy()}}])&&bg(e.prototype,n),r&&bg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Tg(t){return(Tg="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 Sg(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,Ag(r.key),r)}}function Ag(t){var e=function(t,e){if("object"!=Tg(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=Tg(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==Tg(e)?e:String(e)}xg(Eg,"SPRITE_SHEET_PATH","".concat(window.theme_assets_url,"/images/lsvp-logo-3d/lsvp-logo-v3.png")),xg(Eg,"OVERLAY_PATH","".concat(window.theme_assets_url,"/images/lsvp-logo-3d/overlay.png")),h.b.registerPlugin(rn);var Mg=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.scroller=window.scroller,this.isMobile=this.scroller.scroll.isMobile,this.isTablet=this.scroller.scroll.isTablet;var e=document.querySelector("main[data-template]"),n=e?e.getAttribute("data-template"):null;this.isPageGameChangers="game-changers.blade.php"===n,this.isPageNewsletter="newsletter-page.blade.php"===n,this.scrollAnimations(),this.initNavigation(),this.setupScrollTrigger(),this.setupMenuColorScrollTrigger()}var e,n,r;return e=t,r=[{key:"create",value:function(){document.querySelector("body");var e=document.querySelector("main[data-template]"),n=e?e.getAttribute("data-template"):null;n&&["newsletter-page.blade.php","game-changers.blade.php"].includes(n)&&null===t._instance&&(t._instance=new t)}},{key:"destroy",value:function(){t._instance&&(t._instance.beforeDestroy(),t._instance=null)}}],(n=[{key:"initNavigation",value:function(){var t=this;this.header=document.getElementById("header"),this.sections=Array.from(document.querySelectorAll(".section-content")),this.navLinks=Array.from(document.querySelectorAll(".nav-timeline .nav a")),this.colorMenuSections=Array.from(document.querySelectorAll(".color-menu")),this.navLinks.forEach((function(e){e.addEventListener("click",(function(n){n.preventDefault();var r=e.getAttribute("href").substring(1),i=document.getElementById(r);if(i){var o;if(o=t.isMobile?i.dataset.scrollOffsetMobile||i.dataset.scrollOffset||"0":i.dataset.scrollOffset||"0",console.log("offset",o),o.endsWith("%")){var s=parseFloat(o)/100;o=window.innerHeight*s}t.scroller.scrollTo(i,{offset:parseInt(o),duration:1e3,easing:[.25,0,.35,1]})}else console.error("Target section not found: ".concat(r))}))}))}},{key:"setupScrollTrigger",value:function(){var t=this;this.sections.forEach((function(e){try{rn.create({trigger:e,start:"top 50%",end:"bottom 50%",scroller:"[data-scroll-container]",invalidateOnRefresh:!0,onEnter:function(){return t.updateActiveLink(e.id,!0)},onEnterBack:function(){return t.updateActiveLink(e.id,!0)}})}catch(t){console.error("Error creating ScrollTrigger for section ".concat(e.id,":"),t)}}))}},{key:"setupMenuColorScrollTrigger",value:function(){var t=this;this.colorMenuSections.forEach((function(e){rn.create({trigger:e,start:"top 90px",end:"bottom 90px",scroller:"[data-scroll-container]",invalidateOnRefresh:!0,onEnter:function(){return t.updateMenuColor(e)},onEnterBack:function(){return t.updateMenuColor(e)}})}))}},{key:"updateActiveLink",value:function(t,e){var n=document.querySelector('.nav-timeline .nav a[href="#'.concat(t,'"]'));n?e&&(this.navLinks.forEach((function(t){return t.parentElement.classList.remove("active")})),n.parentElement.classList.add("active")):console.error("Link not found for id: ".concat(t))}},{key:"updateMenuColor",value:function(t){this.header?(this.header.classList.remove("dark-menu","light-menu"),t.classList.contains("dark-menu")?this.header.classList.add("dark-menu"):t.classList.contains("light-menu")&&this.header.classList.add("light-menu")):console.error("Header element not found")}},{key:"resetMenuColor",value:function(){this.header?this.header.classList.remove("dark-menu","light-menu"):console.error("Header element not found")}},{key:"animationArrow",value:function(){var t=this;h.b.set(".animation-arrow",{x:-200,y:0}),h.b.to(".animation-arrow",{x:function(){return t.isMobile?2*window.innerWidth:window.innerWidth},ease:"none",scrollTrigger:{trigger:".nl-hero",start:"top top",end:"bottom top",scrub:!0,scroller:"[data-scroll-container]"}})}},{key:"animationHero",value:function(){h.b.to(".txt-wrap .h2",{scrollTrigger:{trigger:".nl-hero",start:"top top",end:"50% top",scroller:"[data-scroll-container]",scrub:!0},scale:.7,transformOrigin:"left bottom",ease:"power1.out"})}},{key:"animationExploringMinds",value:function(){h.b.set(".nl-exploring-minds .heading h2 b",{x:"-100vw"}),h.b.set(".nl-exploring-minds .heading h2 span",{x:"100vw"}),h.b.set(".nl-exploring-minds .heading .icon-arrow",{x:"100vw"}),h.b.timeline({scrollTrigger:{trigger:".nl-exploring-minds",start:"top 70%",end:"top 50%",scrub:!0,scroller:"[data-scroll-container]"}}).to(".nl-exploring-minds .heading h2 b",{x:0,ease:"power1.out"},0).to(".nl-exploring-minds .heading h2 span",{x:0,ease:"power1.out"},0),h.b.to(".nl-exploring-minds .heading h2",{scale:.7,transformOrigin:"right top",scrollTrigger:{trigger:".nl-exploring-minds",start:"top 55%",end:"top 20%",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}),h.b.to(".nl-exploring-minds .heading .icon-arrow",{x:0,transformOrigin:"right top",scrollTrigger:{trigger:".nl-exploring-minds",start:"top 55%",end:"top 20%",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}),document.querySelectorAll(".nl-exploring-minds .nl-post-list .news-post-row").forEach((function(t,e){h.b.set(t,{opacity:0,x:function(){return e%2==0?200:-200}}),h.b.to(t,{opacity:1,x:0,scrollTrigger:{trigger:t,start:"top 80%",end:"top 45%",scrub:!0,scroller:"[data-scroll-container]"}})}))}},{key:"animationStories",value:function(){var t=this,e=document.querySelector("#stories .heading h2"),n=e.querySelector("span"),r=document.getElementById("full-story");h.b.set(n,{scale:2.5,xPercent:-50,yPercent:-50,left:"50%",transformOrigin:"center center"}),h.b.to(n,{scale:1,yPercent:0,ease:"power1.out",scrollTrigger:{trigger:"#stories",start:"top 70%",end:"top 30%",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}),h.b.to(n,{xPercent:0,left:function(){var t=e.offsetWidth,r=n.offsetWidth;return"".concat(t-r,"px")},ease:"power1.out",scrollTrigger:{trigger:"#stories",start:"top 30.5%",end:"top 0%",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}),h.b.set("#stories .heading p span",{opacity:0,x:"-=100"});var i="top 30%";this.isPageGameChangers&&(i="top 50%");var o="top 0%";if(this.isPageGameChangers&&(o=this.isMobile?"top 30%":"top 20%"),h.b.to("#stories .heading p span",{opacity:1,x:0,ease:"power1.out",stagger:.2,scrollTrigger:{trigger:"#stories",start:i,end:o,scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}),r){var s=r.querySelector(".img");if(s){var a=s.getBoundingClientRect(),l={width:.9,height:.95},u=a.width*l.width,c={top:0,left:u/2,right:u/2,bottom:.5625*a.width*l.height};h.b.set(s,{clipPath:"inset(".concat(c.top,"px ").concat(c.right,"px ").concat(c.bottom,"px ").concat(c.left+1,"px)"),y:"-=100",opacity:0}),h.b.timeline({scrollTrigger:{trigger:r,start:function(){return t.isMobile?"top 87%":"top 70%"},end:"+=30%",scrub:!0,scroller:"[data-scroll-container]"}}).to(s,{opacity:1,ease:"power1.inOut"},0).to(s,{y:0,clipPath:"inset(0px 0px 0px 0px)",ease:"none"},0)}}var d=document.querySelector(".nl-stories-slider"),p=document.querySelector(".nl-stories-footer");if(p){var f=p.querySelector("h2");d&&h.b.to(d,{scale:.8,transformOrigin:"center center",ease:"none",scrollTrigger:{trigger:".nl-stories",start:"bottom 100%",end:"bottom 80%",scrub:!0,scroller:"[data-scroll-container]"}}),f&&(h.b.set(f,{y:"-=100%"}),h.b.to(f,{scale:1,opacity:1,transformOrigin:"center center",y:"40%",ease:"none",scrollTrigger:{trigger:".nl-stories",start:"bottom 120%",end:"bottom 80%",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}),h.b.to(f,{scale:.5,ease:"none",transformOrigin:"center center",scrollTrigger:{trigger:".nl-stories",start:"bottom 80%",end:function(){return"+=".concat(.66*window.innerHeight)},scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}))}}},{key:"animationOnAi",value:function(){var t=document.querySelector("#on_ai .heading .category-title"),e=document.querySelector("#on_ai .heading h2"),n=document.querySelector("#on_ai .heading .ellipse"),r=document.querySelector("#on-ai--story");h.b.set(t,{scale:7,transformOrigin:"center center"}),h.b.set(e,{opacity:0,scale:3,transformOrigin:"center center"}),h.b.set(n,{opacity:0,transformOrigin:"center center"}),rn.create({trigger:"#on-ai--hero",start:"top top",end:function(){return"+=".concat(1.5*window.innerHeight)},pin:"#on-ai--hero-inner",pinSpacing:!0,scroller:"[data-scroll-container]",pinType:this.isMobile?"fixed":"transform",invalidateOnRefresh:!0});var i=h.b.timeline({scrollTrigger:{trigger:"#on-ai--hero",start:"top 40%",end:"bottom top",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}});i.fromTo(t,{scale:7,y:function(){return"".concat(window.innerHeight/2)}},{duration:.2,scale:5,y:function(){return"".concat(window.innerHeight/4)},ease:"none"},0),i.to(t,{duration:.2,scale:2.5,ease:"none"},.2),i.fromTo(e,{opacity:0,scale:3,y:function(){return"".concat(window.innerHeight/2)}},{opacity:1,duration:.2,scale:2,y:function(){return"".concat(window.innerHeight/3.5)},ease:"none"},.2),i.to(t,{duration:.2,scale:1,y:0,ease:"none"},.4),i.to(e,{duration:.2,scale:1,y:0,ease:"none"},.4),i.fromTo(n,{opacity:0,y:function(){return"".concat(window.innerHeight/3.5)}},{duration:.2,opacity:1,y:0,ease:"none"},.4),r&&i.fromTo(r,{opacity:0,y:"+=100",scale:1.4},{opacity:1,y:0,scale:1,duration:.2,transformOrigin:"center top",ease:"none"},.6),i.to({progress:0},{progress:1,duration:.2,ease:"none"},.8),r&&!this.isMobile&&h.b.to(r,{scale:.6,ease:"none",scrollTrigger:{trigger:r,start:"top 50%",end:"bottom 20%",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}})}},{key:"animationPodcasts",value:function(){var t=document.querySelector(".nl-podcast"),e=t.querySelector(".heading h2");t&&e&&(h.b.fromTo(e,{scale:3,y:function(){return"-".concat(window.innerHeight/2)}},{scale:1,y:0,ease:"none",scrollTrigger:{trigger:t,start:"top bottom",end:"top 40%",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}),h.b.timeline({scrollTrigger:{trigger:t,start:"top top",end:"bottom bottom",pin:e,pinSpacing:!1,pinType:this.isMobile?"fixed":"transform",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}).fromTo(e,{scale:1,y:0},{scale:1.8,y:function(){return"".concat(window.innerHeight/2-e.offsetHeight)},opacity:0,ease:"none"}).to({progress:0},{progress:1,ease:"none"})),rn.create({trigger:".nl-podcast",start:"bottom bottom",end:function(){return"+=".concat(window.innerHeight)},pin:".nl-podcast--inner",pinSpacing:!1,scroller:"[data-scroll-container]",pinType:this.isMobile?"fixed":"transform",invalidateOnRefresh:!0})}},{key:"animationAdvisory",value:function(){var t=this,e=document.querySelector(".nl-unlocking-impact"),n=e.querySelector(".heading"),r=e.querySelectorAll(".advisory-council-hero .images .img");e&&n&&h.b.fromTo(n,{scale:3,opacity:0},{scale:1,opacity:1,transformOrigin:"right top",ease:"none",scrollTrigger:{trigger:e,start:"top 80%",end:function(){return t.isMobile?"top 40%":"top 20%"},scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}}),e&&r.length&&h.b.fromTo(r,{scale:1.5,opacity:0,x:"50vw"},{scale:1,x:0,opacity:1,ease:"none",stagger:.2,scrollTrigger:{trigger:e,start:"top 75%",end:"top 0%",scrub:!0,scroller:"[data-scroll-container]",invalidateOnRefresh:!0}})}},{key:"animationBackgroundsHighlights",value:function(){}},{key:"animationBackgroundsOnAi",value:function(){rn.create({trigger:"#on_ai",start:"top top",end:"bottom top",pin:"#on-ai-bg",pinType:this.isMobile?"fixed":"transform",pinSpacing:!1,scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0}),h.b.set("#on-ai-bg--inner",{rotate:30,y:function(){return"+=".concat(window.innerHeight/5)}});var t=h.b.timeline({scrollTrigger:{trigger:"#on_ai",start:"top 80%",end:"bottom top",scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0}});t.to("#on-ai-bg--inner",{rotate:60,x:function(){return"-=".concat(window.innerWidth/3)},y:function(){return"+=".concat(window.innerHeight/5)},ease:"none"}),t.to("#on-ai-bg--inner",{rotate:90,ease:"none"}),t.to("#on-ai-bg--inner",{rotate:120,y:0,x:0,ease:"none"})}},{key:"animationBackgroundsStories",value:function(){rn.create({trigger:"#stories",start:"top top",end:"bottom top",pin:"#stories-bg",pinType:this.isMobile?"fixed":"transform",pinSpacing:!1,scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0});var t=h.b.timeline({scrollTrigger:{trigger:"#stories",start:"top 80%",end:"bottom top",scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0}});h.b.set("#stories-bg--inner",{rotate:90}),t.to("#stories-bg--inner",{rotate:-10,y:function(){return"+=".concat(window.innerHeight/5)},ease:"none"}),t.to("#stories-bg--inner",{rotate:30,x:function(){return"-=".concat(window.innerWidth/3)},ease:"none"}),t.to("#stories-bg--inner",{rotate:60,y:function(){return"+=".concat(window.innerHeight/3)},ease:"none"}),t.to("#stories-bg--inner",{rotate:90,ease:"none"}),t.to("#stories-bg--inner",{rotate:120,y:0,x:0,ease:"none"})}},{key:"animationBackgroundsEvents",value:function(){var t=h.b.timeline({scrollTrigger:{trigger:"#events",start:"top top",end:"bottom bottom",pin:"#events-bg",pinSpacing:!1,scroller:"[data-scroll-container]",pinType:this.isMobile?"fixed":"transform",invalidateOnRefresh:!0,scrub:!0}});t.to("#events-bg--inner",{rotate:270,x:function(){return"-=".concat(window.innerWidth/4)},y:function(){return"+=".concat(window.innerHeight/6)},ease:"none"},"-=0.1").addLabel("start"),t.to("#events-bg--inner",{rotate:180,x:function(){return"-=".concat(window.innerWidth/3)},y:function(){return"-=".concat(window.innerHeight/6)},ease:"none"}).addLabel("checkpoint0"),t.to("#events-bg--inner",{rotate:90,x:function(){return"-=".concat(window.innerWidth/6)},y:function(){return"+=".concat(window.innerHeight/6)},ease:"none"}).addLabel("checkpoint1"),t.to("#events-bg--noise",{opacity:1,ease:"none"},"start"),t.to("#events-bg--inner",{rotate:45,x:function(){return"+=".concat(window.innerWidth/2)},ease:"none"},"checkpoint1"),t.to("#events-bg--inner",{rotate:0,x:function(){return"+=".concat(window.innerWidth/2)},y:function(){return"-".concat(window.innerHeight/10)},ease:"none"})}},{key:"animationBackgroundsPodcasts",value:function(){rn.create({trigger:".nl-podcast",start:"top top",end:"bottom bottom",pin:"#podcast-bg",pinType:this.isMobile?"fixed":"transform",pinSpacing:!1,scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0}),h.b.timeline({scrollTrigger:{trigger:".nl-podcast",start:"top 80%",end:"bottom bottom",scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0}}).to("#podcast-bg--inner",{rotate:20,ease:"none"}).to("#podcast-bg--inner",{rotate:40,x:function(){return"-=".concat(window.innerWidth/4)},ease:"none"}).to("#podcast-bg--inner",{rotate:60,y:function(){return"+=".concat(window.innerHeight/4)},x:function(){return"+=".concat(window.innerWidth/4)},ease:"none"}).to("#podcast-bg--inner",{rotate:80,opacity:0,y:function(){return"-=".concat(window.innerHeight/4)},x:function(){return"+=".concat(window.innerWidth/4)},ease:"none"})}},{key:"animationBackgrounds",value:function(){this.animationBackgroundsOnAi(),this.animationBackgroundsStories(),this.animationBackgroundsPodcasts(),this.animationBackgroundsEvents()}},{key:"animationLogo",value:function(){this.logoContainerEl=document.getElementById("lsvp-logo-3d"),this.logoContainerEl&&(this.logo3d=new Eg(this.logoContainerEl))}},{key:"scrollAnimations",value:function(){this.animationLogo(),this.animationHero(),this.animationArrow(),this.animationOnAi(),this.animationPodcasts(),this.animationStories(),this.animationExploringMinds(),this.animationBackgrounds(),rn.refresh()}},{key:"beforeDestroy",value:function(){this.logo3d&&this.logo3d.destroy(),rn.getAll().forEach((function(t){return t.kill()}))}}])&&Sg(e.prototype,n),r&&Sg(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=Ag(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(Mg,"_instance",null);class Dg{addEventListener(t,e){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[t]&&(n[t]=[]),-1===n[t].indexOf(e)&&n[t].push(e)}hasEventListener(t,e){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[t]&&-1!==n[t].indexOf(e)}removeEventListener(t,e){if(void 0===this._listeners)return;const n=this._listeners[t];if(void 0!==n){const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}dispatchEvent(t){if(void 0===this._listeners)return;const e=this._listeners[t.type];if(void 0!==e){t.target=this;const n=e.slice(0);for(let e=0,r=n.length;e<r;e++)n[e].call(this,t);t.target=null}}}const Cg=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];const Rg=Math.PI/180,Og=180/Math.PI;function Pg(){const t=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(Cg[255&t]+Cg[t>>8&255]+Cg[t>>16&255]+Cg[t>>24&255]+"-"+Cg[255&e]+Cg[e>>8&255]+"-"+Cg[e>>16&15|64]+Cg[e>>24&255]+"-"+Cg[63&n|128]+Cg[n>>8&255]+"-"+Cg[n>>16&255]+Cg[n>>24&255]+Cg[255&r]+Cg[r>>8&255]+Cg[r>>16&255]+Cg[r>>24&255]).toLowerCase()}function Ig(t,e,n){return Math.max(e,Math.min(n,t))}function Lg(t,e){return(t%e+e)%e}function Ng(t,e,n){return(1-n)*t+n*e}function Fg(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return t/4294967295;case Uint16Array:return t/65535;case Uint8Array:return t/255;case Int32Array:return Math.max(t/2147483647,-1);case Int16Array:return Math.max(t/32767,-1);case Int8Array:return Math.max(t/127,-1);default:throw new Error("Invalid component type.")}}function kg(t,e){switch(e.constructor){case Float32Array:return t;case Uint32Array:return Math.round(4294967295*t);case Uint16Array:return Math.round(65535*t);case Uint8Array:return Math.round(255*t);case Int32Array:return Math.round(2147483647*t);case Int16Array:return Math.round(32767*t);case Int8Array:return Math.round(127*t);default:throw new Error("Invalid component type.")}}class Ug{constructor(t=0,e=0){Ug.prototype.isVector2=!0,this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t){return this.x+=t.x,this.y+=t.y,this}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){const e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(Ig(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){const n=Math.cos(e),r=Math.sin(e),i=this.x-t.x,o=this.y-t.y;return this.x=i*n-o*r+t.x,this.y=i*r+o*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Bg{constructor(t,e,n,r,i,o,s,a,l){Bg.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==t&&this.set(t,e,n,r,i,o,s,a,l)}set(t,e,n,r,i,o,s,a,l){const u=this.elements;return u[0]=t,u[1]=r,u[2]=s,u[3]=e,u[4]=i,u[5]=a,u[6]=n,u[7]=o,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){const e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,r=e.elements,i=this.elements,o=n[0],s=n[3],a=n[6],l=n[1],u=n[4],c=n[7],h=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],v=r[1],y=r[4],_=r[7],b=r[2],x=r[5],w=r[8];return i[0]=o*f+s*v+a*b,i[3]=o*m+s*y+a*x,i[6]=o*g+s*_+a*w,i[1]=l*f+u*v+c*b,i[4]=l*m+u*y+c*x,i[7]=l*g+u*_+c*w,i[2]=h*f+d*v+p*b,i[5]=h*m+d*y+p*x,i[8]=h*g+d*_+p*w,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],a=t[6],l=t[7],u=t[8];return e*o*u-e*s*l-n*i*u+n*s*a+r*i*l-r*o*a}invert(){const t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],a=t[6],l=t[7],u=t[8],c=u*o-s*l,h=s*a-u*i,d=l*i-o*a,p=e*c+n*h+r*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return t[0]=c*f,t[1]=(r*l-u*n)*f,t[2]=(s*n-r*o)*f,t[3]=h*f,t[4]=(u*e-r*a)*f,t[5]=(r*i-s*e)*f,t[6]=d*f,t[7]=(n*a-l*e)*f,t[8]=(o*e-n*i)*f,this}transpose(){let t;const e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){const e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,r,i,o,s){const a=Math.cos(i),l=Math.sin(i);return this.set(n*a,n*l,-n*(a*o+l*s)+o+t,-r*l,r*a,-r*(-l*o+a*s)+s+e,0,0,1),this}scale(t,e){return this.premultiply(Gg.makeScale(t,e)),this}rotate(t){return this.premultiply(Gg.makeRotation(-t)),this}translate(t,e){return this.premultiply(Gg.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<9;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return(new this.constructor).fromArray(this.elements)}}const Gg=new Bg;function zg(t){for(let e=t.length-1;e>=0;--e)if(t[e]>=65535)return!0;return!1}Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array;function Hg(t){return document.createElementNS("http://www.w3.org/1999/xhtml",t)}function jg(){const t=Hg("canvas");return t.style.display="block",t}const Vg={};function Xg(t){t in Vg||(Vg[t]=!0,console.warn(t))}const Wg=(new Bg).set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Yg=(new Bg).set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),qg={"srgb-linear":{transfer:"linear",primaries:"rec709",luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t,fromReference:t=>t},srgb:{transfer:"srgb",primaries:"rec709",luminanceCoefficients:[.2126,.7152,.0722],toReference:t=>t.convertSRGBToLinear(),fromReference:t=>t.convertLinearToSRGB()},"display-p3-linear":{transfer:"linear",primaries:"p3",luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.applyMatrix3(Yg),fromReference:t=>t.applyMatrix3(Wg)},"display-p3":{transfer:"srgb",primaries:"p3",luminanceCoefficients:[.2289,.6917,.0793],toReference:t=>t.convertSRGBToLinear().applyMatrix3(Yg),fromReference:t=>t.applyMatrix3(Wg).convertLinearToSRGB()}},$g=new Set(["srgb-linear","display-p3-linear"]),Kg={enabled:!0,_workingColorSpace:"srgb-linear",get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(t){if(!$g.has(t))throw new Error(`Unsupported working color space, "${t}".`);this._workingColorSpace=t},convert:function(t,e,n){if(!1===this.enabled||e===n||!e||!n)return t;const r=qg[e].toReference;return(0,qg[n].fromReference)(r(t))},fromWorkingColorSpace:function(t,e){return this.convert(t,this._workingColorSpace,e)},toWorkingColorSpace:function(t,e){return this.convert(t,e,this._workingColorSpace)},getPrimaries:function(t){return qg[t].primaries},getTransfer:function(t){return""===t?"linear":qg[t].transfer},getLuminanceCoefficients:function(t,e=this._workingColorSpace){return t.fromArray(qg[e].luminanceCoefficients)}};function Zg(t){return t<.04045?.0773993808*t:Math.pow(.9478672986*t+.0521327014,2.4)}function Jg(t){return t<.0031308?12.92*t:1.055*Math.pow(t,.41666)-.055}let Qg;let tv=0;class ev{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:tv++}),this.uuid=Pg(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){!0===t&&this.version++}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.images[this.uuid])return t.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let t;if(Array.isArray(r)){t=[];for(let e=0,n=r.length;e<n;e++)r[e].isDataTexture?t.push(nv(r[e].image)):t.push(nv(r[e]))}else t=nv(r);n.url=t}return e||(t.images[this.uuid]=n),n}}function nv(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap?class{static getDataURL(t){if(/^data:/i.test(t.src))return t.src;if("undefined"==typeof HTMLCanvasElement)return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{void 0===Qg&&(Qg=Hg("canvas")),Qg.width=t.width,Qg.height=t.height;const n=Qg.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=Qg}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}static sRGBToLinear(t){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap){const e=Hg("canvas");e.width=t.width,e.height=t.height;const n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);const r=n.getImageData(0,0,t.width,t.height),i=r.data;for(let t=0;t<i.length;t++)i[t]=255*Zg(i[t]/255);return n.putImageData(r,0,0),e}if(t.data){const e=t.data.slice(0);for(let t=0;t<e.length;t++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[t]=Math.floor(255*Zg(e[t]/255)):e[t]=Zg(e[t]);return{data:e,width:t.width,height:t.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}}.getDataURL(t):t.data?{data:Array.from(t.data),width:t.width,height:t.height,type:t.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let rv=0;class iv extends Dg{constructor(t=iv.DEFAULT_IMAGE,e=iv.DEFAULT_MAPPING,n=1001,r=1001,i=1006,o=1008,s=1023,a=1009,l=iv.DEFAULT_ANISOTROPY,u=""){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:rv++}),this.uuid=Pg(),this.name="",this.source=new ev(t),this.mipmaps=[],this.mapping=e,this.channel=0,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=o,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=a,this.offset=new Ug(0,0),this.repeat=new Ug(1,1),this.center=new Ug(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Bg,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=u,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(t=null){this.source.data=t}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(t){return this.name=t.name,this.source=t.source,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,this.channel=t.channel,this.wrapS=t.wrapS,this.wrapT=t.wrapT,this.magFilter=t.magFilter,this.minFilter=t.minFilter,this.anisotropy=t.anisotropy,this.format=t.format,this.internalFormat=t.internalFormat,this.type=t.type,this.offset.copy(t.offset),this.repeat.copy(t.repeat),this.center.copy(t.center),this.rotation=t.rotation,this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrix.copy(t.matrix),this.generateMipmaps=t.generateMipmaps,this.premultiplyAlpha=t.premultiplyAlpha,this.flipY=t.flipY,this.unpackAlignment=t.unpackAlignment,this.colorSpace=t.colorSpace,this.userData=JSON.parse(JSON.stringify(t.userData)),this.needsUpdate=!0,this}toJSON(t){const e=void 0===t||"string"==typeof t;if(!e&&void 0!==t.textures[this.uuid])return t.textures[this.uuid];const n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(t).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),e||(t.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(t){if(300!==this.mapping)return t;if(t.applyMatrix3(this.matrix),t.x<0||t.x>1)switch(this.wrapS){case 1e3:t.x=t.x-Math.floor(t.x);break;case 1001:t.x=t.x<0?0:1;break;case 1002:1===Math.abs(Math.floor(t.x)%2)?t.x=Math.ceil(t.x)-t.x:t.x=t.x-Math.floor(t.x)}if(t.y<0||t.y>1)switch(this.wrapT){case 1e3:t.y=t.y-Math.floor(t.y);break;case 1001:t.y=t.y<0?0:1;break;case 1002:1===Math.abs(Math.floor(t.y)%2)?t.y=Math.ceil(t.y)-t.y:t.y=t.y-Math.floor(t.y)}return this.flipY&&(t.y=1-t.y),t}set needsUpdate(t){!0===t&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(t){!0===t&&this.pmremVersion++}}iv.DEFAULT_IMAGE=null,iv.DEFAULT_MAPPING=300,iv.DEFAULT_ANISOTROPY=1;class ov{constructor(t=0,e=0,n=0,r=1){ov.prototype.isVector4=!0,this.x=t,this.y=e,this.z=n,this.w=r}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=void 0!==t.w?t.w:1,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){const e=this.x,n=this.y,r=this.z,i=this.w,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r+o[12]*i,this.y=o[1]*e+o[5]*n+o[9]*r+o[13]*i,this.z=o[2]*e+o[6]*n+o[10]*r+o[14]*i,this.w=o[3]*e+o[7]*n+o[11]*r+o[15]*i,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);const e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,r,i;const o=t.elements,s=o[0],a=o[4],l=o[8],u=o[1],c=o[5],h=o[9],d=o[2],p=o[6],f=o[10];if(Math.abs(a-u)<.01&&Math.abs(l-d)<.01&&Math.abs(h-p)<.01){if(Math.abs(a+u)<.1&&Math.abs(l+d)<.1&&Math.abs(h+p)<.1&&Math.abs(s+c+f-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;const t=(s+1)/2,o=(c+1)/2,m=(f+1)/2,g=(a+u)/4,v=(l+d)/4,y=(h+p)/4;return t>o&&t>m?t<.01?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(t),r=g/n,i=v/n):o>m?o<.01?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=g/r,i=y/r):m<.01?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(m),n=v/i,r=y/i),this.set(n,r,i,e),this}let m=Math.sqrt((p-h)*(p-h)+(l-d)*(l-d)+(u-a)*(u-a));return Math.abs(m)<.001&&(m=1),this.x=(p-h)/m,this.y=(l-d)/m,this.z=(u-a)/m,this.w=Math.acos((s+c+f-1)/2),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class sv extends Dg{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new ov(0,0,t,e),this.scissorTest=!1,this.viewport=new ov(0,0,t,e);const r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:1006,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);const i=new iv(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);i.flipY=!1,i.generateMipmaps=n.generateMipmaps,i.internalFormat=n.internalFormat,this.textures=[];const o=n.count;for(let t=0;t<o;t++)this.textures[t]=i.clone(),this.textures[t].isRenderTargetTexture=!0;this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let r=0,i=this.textures.length;r<i;r++)this.textures[r].image.width=t,this.textures[r].image.height=e,this.textures[r].image.depth=n;this.dispose()}this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return(new this.constructor).copy(this)}copy(t){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let e=0,n=t.textures.length;e<n;e++)this.textures[e]=t.textures[e].clone(),this.textures[e].isRenderTargetTexture=!0;const e=Object.assign({},t.texture.image);return this.texture.source=new ev(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,null!==t.depthTexture&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class av extends sv{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}}class lv extends iv{constructor(t=null,e=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}}class uv extends iv{constructor(t=null,e=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:r},this.magFilter=1003,this.minFilter=1003,this.wrapR=1001,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class cv{constructor(t=0,e=0,n=0,r=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=r}static slerpFlat(t,e,n,r,i,o,s){let a=n[r+0],l=n[r+1],u=n[r+2],c=n[r+3];const h=i[o+0],d=i[o+1],p=i[o+2],f=i[o+3];if(0===s)return t[e+0]=a,t[e+1]=l,t[e+2]=u,void(t[e+3]=c);if(1===s)return t[e+0]=h,t[e+1]=d,t[e+2]=p,void(t[e+3]=f);if(c!==f||a!==h||l!==d||u!==p){let t=1-s;const e=a*h+l*d+u*p+c*f,n=e>=0?1:-1,r=1-e*e;if(r>Number.EPSILON){const i=Math.sqrt(r),o=Math.atan2(i,e*n);t=Math.sin(t*o)/i,s=Math.sin(s*o)/i}const i=s*n;if(a=a*t+h*i,l=l*t+d*i,u=u*t+p*i,c=c*t+f*i,t===1-s){const t=1/Math.sqrt(a*a+l*l+u*u+c*c);a*=t,l*=t,u*=t,c*=t}}t[e]=a,t[e+1]=l,t[e+2]=u,t[e+3]=c}static multiplyQuaternionsFlat(t,e,n,r,i,o){const s=n[r],a=n[r+1],l=n[r+2],u=n[r+3],c=i[o],h=i[o+1],d=i[o+2],p=i[o+3];return t[e]=s*p+u*c+a*d-l*h,t[e+1]=a*p+u*h+l*c-s*d,t[e+2]=l*p+u*d+s*h-a*c,t[e+3]=u*p-s*c-a*h-l*d,t}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e=!0){const n=t._x,r=t._y,i=t._z,o=t._order,s=Math.cos,a=Math.sin,l=s(n/2),u=s(r/2),c=s(i/2),h=a(n/2),d=a(r/2),p=a(i/2);switch(o){case"XYZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"YXZ":this._x=h*u*c+l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"ZXY":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c-h*d*p;break;case"ZYX":this._x=h*u*c-l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c+h*d*p;break;case"YZX":this._x=h*u*c+l*d*p,this._y=l*d*c+h*u*p,this._z=l*u*p-h*d*c,this._w=l*u*c-h*d*p;break;case"XZY":this._x=h*u*c-l*d*p,this._y=l*d*c-h*u*p,this._z=l*u*p+h*d*c,this._w=l*u*c+h*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return!0===e&&this._onChangeCallback(),this}setFromAxisAngle(t,e){const n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){const e=t.elements,n=e[0],r=e[4],i=e[8],o=e[1],s=e[5],a=e[9],l=e[2],u=e[6],c=e[10],h=n+s+c;if(h>0){const t=.5/Math.sqrt(h+1);this._w=.25/t,this._x=(u-a)*t,this._y=(i-l)*t,this._z=(o-r)*t}else if(n>s&&n>c){const t=2*Math.sqrt(1+n-s-c);this._w=(u-a)/t,this._x=.25*t,this._y=(r+o)/t,this._z=(i+l)/t}else if(s>c){const t=2*Math.sqrt(1+s-n-c);this._w=(i-l)/t,this._x=(r+o)/t,this._y=.25*t,this._z=(a+u)/t}else{const t=2*Math.sqrt(1+c-n-s);this._w=(o-r)/t,this._x=(i+l)/t,this._y=(a+u)/t,this._z=.25*t}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(Ig(this.dot(t),-1,1)))}rotateTowards(t,e){const n=this.angleTo(t);if(0===n)return this;const r=Math.min(1,e/n);return this.slerp(t,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let t=this.length();return 0===t?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){const n=t._x,r=t._y,i=t._z,o=t._w,s=e._x,a=e._y,l=e._z,u=e._w;return this._x=n*u+o*s+r*l-i*a,this._y=r*u+o*a+i*s-n*l,this._z=i*u+o*l+n*a-r*s,this._w=o*u-n*s-r*a-i*l,this._onChangeCallback(),this}slerp(t,e){if(0===e)return this;if(1===e)return this.copy(t);const n=this._x,r=this._y,i=this._z,o=this._w;let s=o*t._w+n*t._x+r*t._y+i*t._z;if(s<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=o,this._x=n,this._y=r,this._z=i,this;const a=1-s*s;if(a<=Number.EPSILON){const t=1-e;return this._w=t*o+e*this._w,this._x=t*n+e*this._x,this._y=t*r+e*this._y,this._z=t*i+e*this._z,this.normalize(),this}const l=Math.sqrt(a),u=Math.atan2(l,s),c=Math.sin((1-e)*u)/l,h=Math.sin(e*u)/l;return this._w=o*c+this._w*h,this._x=n*c+this._x*h,this._y=r*c+this._y*h,this._z=i*c+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){const t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),i=Math.sqrt(n);return this.set(r*Math.sin(t),r*Math.cos(t),i*Math.sin(e),i*Math.cos(e))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class hv{constructor(t=0,e=0,n=0){hv.prototype.isVector3=!0,this.x=t,this.y=e,this.z=n}set(t,e,n){return void 0===n&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return this.applyQuaternion(pv.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(pv.setFromAxisAngle(t,e))}applyMatrix3(t){const e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[3]*n+i[6]*r,this.y=i[1]*e+i[4]*n+i[7]*r,this.z=i[2]*e+i[5]*n+i[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){const e=this.x,n=this.y,r=this.z,i=t.elements,o=1/(i[3]*e+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*e+i[4]*n+i[8]*r+i[12])*o,this.y=(i[1]*e+i[5]*n+i[9]*r+i[13])*o,this.z=(i[2]*e+i[6]*n+i[10]*r+i[14])*o,this}applyQuaternion(t){const e=this.x,n=this.y,r=this.z,i=t.x,o=t.y,s=t.z,a=t.w,l=2*(o*r-s*n),u=2*(s*e-i*r),c=2*(i*n-o*e);return this.x=e+a*l+o*c-s*u,this.y=n+a*u+s*l-i*c,this.z=r+a*c+i*u-o*l,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){const e=this.x,n=this.y,r=this.z,i=t.elements;return this.x=i[0]*e+i[4]*n+i[8]*r,this.y=i[1]*e+i[5]*n+i[9]*r,this.z=i[2]*e+i[6]*n+i[10]*r,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t){return this.crossVectors(this,t)}crossVectors(t,e){const n=t.x,r=t.y,i=t.z,o=e.x,s=e.y,a=e.z;return this.x=r*a-i*s,this.y=i*o-n*a,this.z=n*s-r*o,this}projectOnVector(t){const e=t.lengthSq();if(0===e)return this.set(0,0,0);const n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return dv.copy(this).projectOnVector(t),this.sub(dv)}reflect(t){return this.sub(dv.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){const e=Math.sqrt(this.lengthSq()*t.lengthSq());if(0===e)return Math.PI/2;const n=this.dot(t)/e;return Math.acos(Ig(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){const e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){const r=Math.sin(e)*t;return this.x=r*Math.sin(n),this.y=Math.cos(e)*t,this.z=r*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){const e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){const e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,4*e)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,3*e)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e){return this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const t=Math.random()*Math.PI*2,e=2*Math.random()-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const dv=new hv,pv=new cv;class fv{constructor(t=new hv(1/0,1/0,1/0),e=new hv(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(gv.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(gv.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){const n=gv.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return(new this.constructor).copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);const n=t.geometry;if(void 0!==n){const r=n.getAttribute("position");if(!0===e&&void 0!==r&&!0!==t.isInstancedMesh)for(let e=0,n=r.count;e<n;e++)!0===t.isMesh?t.getVertexPosition(e,gv):gv.fromBufferAttribute(r,e),gv.applyMatrix4(t.matrixWorld),this.expandByPoint(gv);else void 0!==t.boundingBox?(null===t.boundingBox&&t.computeBoundingBox(),vv.copy(t.boundingBox)):(null===n.boundingBox&&n.computeBoundingBox(),vv.copy(n.boundingBox)),vv.applyMatrix4(t.matrixWorld),this.union(vv)}const r=t.children;for(let t=0,n=r.length;t<n;t++)this.expandByObject(r[t],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.max.z}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return t.max.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,gv),gv.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Tv),Sv.subVectors(this.max,Tv),yv.subVectors(t.a,Tv),_v.subVectors(t.b,Tv),bv.subVectors(t.c,Tv),xv.subVectors(_v,yv),wv.subVectors(bv,_v),Ev.subVectors(yv,bv);let e=[0,-xv.z,xv.y,0,-wv.z,wv.y,0,-Ev.z,Ev.y,xv.z,0,-xv.x,wv.z,0,-wv.x,Ev.z,0,-Ev.x,-xv.y,xv.x,0,-wv.y,wv.x,0,-Ev.y,Ev.x,0];return!!Dv(e,yv,_v,bv,Sv)&&(e=[1,0,0,0,1,0,0,0,1],!!Dv(e,yv,_v,bv,Sv)&&(Av.crossVectors(xv,wv),e=[Av.x,Av.y,Av.z],Dv(e,yv,_v,bv,Sv)))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,gv).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=.5*this.getSize(gv).length()),t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()||(mv[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),mv[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),mv[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),mv[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),mv[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),mv[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),mv[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),mv[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(mv)),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}}const mv=[new hv,new hv,new hv,new hv,new hv,new hv,new hv,new hv],gv=new hv,vv=new fv,yv=new hv,_v=new hv,bv=new hv,xv=new hv,wv=new hv,Ev=new hv,Tv=new hv,Sv=new hv,Av=new hv,Mv=new hv;function Dv(t,e,n,r,i){for(let o=0,s=t.length-3;o<=s;o+=3){Mv.fromArray(t,o);const s=i.x*Math.abs(Mv.x)+i.y*Math.abs(Mv.y)+i.z*Math.abs(Mv.z),a=e.dot(Mv),l=n.dot(Mv),u=r.dot(Mv);if(Math.max(-Math.max(a,l,u),Math.min(a,l,u))>s)return!1}return!0}const Cv=new fv,Rv=new hv,Ov=new hv;class Pv{constructor(t=new hv,e=-1){this.isSphere=!0,this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){const n=this.center;void 0!==e?n.copy(e):Cv.setFromPoints(t).getCenter(n);let r=0;for(let e=0,i=t.length;e<i;e++)r=Math.max(r,n.distanceToSquared(t[e]));return this.radius=Math.sqrt(r),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){const e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){const n=this.center.distanceToSquared(t);return e.copy(t),n>this.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;Rv.subVectors(t,this.center);const e=Rv.lengthSq();if(e>this.radius*this.radius){const t=Math.sqrt(e),n=.5*(t-this.radius);this.center.addScaledVector(Rv,n/t),this.radius+=n}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(!0===this.center.equals(t.center)?this.radius=Math.max(this.radius,t.radius):(Ov.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(Rv.copy(t.center).add(Ov)),this.expandByPoint(Rv.copy(t.center).sub(Ov))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Iv=new hv,Lv=new hv,Nv=new hv,Fv=new hv,kv=new hv,Uv=new hv,Bv=new hv;class Gv{constructor(t=new hv,e=new hv(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,Iv)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);const n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){const e=Iv.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(Iv.copy(this.origin).addScaledVector(this.direction,e),Iv.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){Lv.copy(t).add(e).multiplyScalar(.5),Nv.copy(e).sub(t).normalize(),Fv.copy(this.origin).sub(Lv);const i=.5*t.distanceTo(e),o=-this.direction.dot(Nv),s=Fv.dot(this.direction),a=-Fv.dot(Nv),l=Fv.lengthSq(),u=Math.abs(1-o*o);let c,h,d,p;if(u>0)if(c=o*a-s,h=o*s-a,p=i*u,c>=0)if(h>=-p)if(h<=p){const t=1/u;c*=t,h*=t,d=c*(c+o*h+2*s)+h*(o*c+h+2*a)+l}else h=i,c=Math.max(0,-(o*h+s)),d=-c*c+h*(h+2*a)+l;else h=-i,c=Math.max(0,-(o*h+s)),d=-c*c+h*(h+2*a)+l;else h<=-p?(c=Math.max(0,-(-o*i+s)),h=c>0?-i:Math.min(Math.max(-i,-a),i),d=-c*c+h*(h+2*a)+l):h<=p?(c=0,h=Math.min(Math.max(-i,-a),i),d=h*(h+2*a)+l):(c=Math.max(0,-(o*i+s)),h=c>0?i:Math.min(Math.max(-i,-a),i),d=-c*c+h*(h+2*a)+l);else h=o>0?-i:i,c=Math.max(0,-(o*h+s)),d=-c*c+h*(h+2*a)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,c),r&&r.copy(Lv).addScaledVector(Nv,h),d}intersectSphere(t,e){Iv.subVectors(t.center,this.origin);const n=Iv.dot(this.direction),r=Iv.dot(Iv)-n*n,i=t.radius*t.radius;if(r>i)return null;const o=Math.sqrt(i-r),s=n-o,a=n+o;return a<0?null:s<0?this.at(a,e):this.at(s,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){const e=t.normal.dot(this.direction);if(0===e)return 0===t.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){const n=this.distanceToPlane(t);return null===n?null:this.at(n,e)}intersectsPlane(t){const e=t.distanceToPoint(this.origin);if(0===e)return!0;return t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,r,i,o,s,a;const l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,h=this.origin;return l>=0?(n=(t.min.x-h.x)*l,r=(t.max.x-h.x)*l):(n=(t.max.x-h.x)*l,r=(t.min.x-h.x)*l),u>=0?(i=(t.min.y-h.y)*u,o=(t.max.y-h.y)*u):(i=(t.max.y-h.y)*u,o=(t.min.y-h.y)*u),n>o||i>r?null:((i>n||isNaN(n))&&(n=i),(o<r||isNaN(r))&&(r=o),c>=0?(s=(t.min.z-h.z)*c,a=(t.max.z-h.z)*c):(s=(t.max.z-h.z)*c,a=(t.min.z-h.z)*c),n>a||s>r?null:((s>n||n!=n)&&(n=s),(a<r||r!=r)&&(r=a),r<0?null:this.at(n>=0?n:r,e)))}intersectsBox(t){return null!==this.intersectBox(t,Iv)}intersectTriangle(t,e,n,r,i){kv.subVectors(e,t),Uv.subVectors(n,t),Bv.crossVectors(kv,Uv);let o,s=this.direction.dot(Bv);if(s>0){if(r)return null;o=1}else{if(!(s<0))return null;o=-1,s=-s}Fv.subVectors(this.origin,t);const a=o*this.direction.dot(Uv.crossVectors(Fv,Uv));if(a<0)return null;const l=o*this.direction.dot(kv.cross(Fv));if(l<0)return null;if(a+l>s)return null;const u=-o*Fv.dot(Bv);return u<0?null:this.at(u/s,i)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class zv{constructor(t,e,n,r,i,o,s,a,l,u,c,h,d,p,f,m){zv.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==t&&this.set(t,e,n,r,i,o,s,a,l,u,c,h,d,p,f,m)}set(t,e,n,r,i,o,s,a,l,u,c,h,d,p,f,m){const g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=r,g[1]=i,g[5]=o,g[9]=s,g[13]=a,g[2]=l,g[6]=u,g[10]=c,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new zv).fromArray(this.elements)}copy(t){const e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){const e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){const e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){const e=this.elements,n=t.elements,r=1/Hv.setFromMatrixColumn(t,0).length(),i=1/Hv.setFromMatrixColumn(t,1).length(),o=1/Hv.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[3]=0,e[4]=n[4]*i,e[5]=n[5]*i,e[6]=n[6]*i,e[7]=0,e[8]=n[8]*o,e[9]=n[9]*o,e[10]=n[10]*o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){const e=this.elements,n=t.x,r=t.y,i=t.z,o=Math.cos(n),s=Math.sin(n),a=Math.cos(r),l=Math.sin(r),u=Math.cos(i),c=Math.sin(i);if("XYZ"===t.order){const t=o*u,n=o*c,r=s*u,i=s*c;e[0]=a*u,e[4]=-a*c,e[8]=l,e[1]=n+r*l,e[5]=t-i*l,e[9]=-s*a,e[2]=i-t*l,e[6]=r+n*l,e[10]=o*a}else if("YXZ"===t.order){const t=a*u,n=a*c,r=l*u,i=l*c;e[0]=t+i*s,e[4]=r*s-n,e[8]=o*l,e[1]=o*c,e[5]=o*u,e[9]=-s,e[2]=n*s-r,e[6]=i+t*s,e[10]=o*a}else if("ZXY"===t.order){const t=a*u,n=a*c,r=l*u,i=l*c;e[0]=t-i*s,e[4]=-o*c,e[8]=r+n*s,e[1]=n+r*s,e[5]=o*u,e[9]=i-t*s,e[2]=-o*l,e[6]=s,e[10]=o*a}else if("ZYX"===t.order){const t=o*u,n=o*c,r=s*u,i=s*c;e[0]=a*u,e[4]=r*l-n,e[8]=t*l+i,e[1]=a*c,e[5]=i*l+t,e[9]=n*l-r,e[2]=-l,e[6]=s*a,e[10]=o*a}else if("YZX"===t.order){const t=o*a,n=o*l,r=s*a,i=s*l;e[0]=a*u,e[4]=i-t*c,e[8]=r*c+n,e[1]=c,e[5]=o*u,e[9]=-s*u,e[2]=-l*u,e[6]=n*c+r,e[10]=t-i*c}else if("XZY"===t.order){const t=o*a,n=o*l,r=s*a,i=s*l;e[0]=a*u,e[4]=-c,e[8]=l*u,e[1]=t*c+i,e[5]=o*u,e[9]=n*c-r,e[2]=r*c-n,e[6]=s*u,e[10]=i*c+t}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Vv,t,Xv)}lookAt(t,e,n){const r=this.elements;return qv.subVectors(t,e),0===qv.lengthSq()&&(qv.z=1),qv.normalize(),Wv.crossVectors(n,qv),0===Wv.lengthSq()&&(1===Math.abs(n.z)?qv.x+=1e-4:qv.z+=1e-4,qv.normalize(),Wv.crossVectors(n,qv)),Wv.normalize(),Yv.crossVectors(qv,Wv),r[0]=Wv.x,r[4]=Yv.x,r[8]=qv.x,r[1]=Wv.y,r[5]=Yv.y,r[9]=qv.y,r[2]=Wv.z,r[6]=Yv.z,r[10]=qv.z,this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){const n=t.elements,r=e.elements,i=this.elements,o=n[0],s=n[4],a=n[8],l=n[12],u=n[1],c=n[5],h=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],y=n[7],_=n[11],b=n[15],x=r[0],w=r[4],E=r[8],T=r[12],S=r[1],A=r[5],M=r[9],D=r[13],C=r[2],R=r[6],O=r[10],P=r[14],I=r[3],L=r[7],N=r[11],F=r[15];return i[0]=o*x+s*S+a*C+l*I,i[4]=o*w+s*A+a*R+l*L,i[8]=o*E+s*M+a*O+l*N,i[12]=o*T+s*D+a*P+l*F,i[1]=u*x+c*S+h*C+d*I,i[5]=u*w+c*A+h*R+d*L,i[9]=u*E+c*M+h*O+d*N,i[13]=u*T+c*D+h*P+d*F,i[2]=p*x+f*S+m*C+g*I,i[6]=p*w+f*A+m*R+g*L,i[10]=p*E+f*M+m*O+g*N,i[14]=p*T+f*D+m*P+g*F,i[3]=v*x+y*S+_*C+b*I,i[7]=v*w+y*A+_*R+b*L,i[11]=v*E+y*M+_*O+b*N,i[15]=v*T+y*D+_*P+b*F,this}multiplyScalar(t){const e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){const t=this.elements,e=t[0],n=t[4],r=t[8],i=t[12],o=t[1],s=t[5],a=t[9],l=t[13],u=t[2],c=t[6],h=t[10],d=t[14];return t[3]*(+i*a*c-r*l*c-i*s*h+n*l*h+r*s*d-n*a*d)+t[7]*(+e*a*d-e*l*h+i*o*h-r*o*d+r*l*u-i*a*u)+t[11]*(+e*l*c-e*s*d-i*o*c+n*o*d+i*s*u-n*l*u)+t[15]*(-r*s*u-e*a*c+e*s*h+r*o*c-n*o*h+n*a*u)}transpose(){const t=this.elements;let e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){const r=this.elements;return t.isVector3?(r[12]=t.x,r[13]=t.y,r[14]=t.z):(r[12]=t,r[13]=e,r[14]=n),this}invert(){const t=this.elements,e=t[0],n=t[1],r=t[2],i=t[3],o=t[4],s=t[5],a=t[6],l=t[7],u=t[8],c=t[9],h=t[10],d=t[11],p=t[12],f=t[13],m=t[14],g=t[15],v=c*m*l-f*h*l+f*a*d-s*m*d-c*a*g+s*h*g,y=p*h*l-u*m*l-p*a*d+o*m*d+u*a*g-o*h*g,_=u*f*l-p*c*l+p*s*d-o*f*d-u*s*g+o*c*g,b=p*c*a-u*f*a-p*s*h+o*f*h+u*s*m-o*c*m,x=e*v+n*y+r*_+i*b;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/x;return t[0]=v*w,t[1]=(f*h*i-c*m*i-f*r*d+n*m*d+c*r*g-n*h*g)*w,t[2]=(s*m*i-f*a*i+f*r*l-n*m*l-s*r*g+n*a*g)*w,t[3]=(c*a*i-s*h*i-c*r*l+n*h*l+s*r*d-n*a*d)*w,t[4]=y*w,t[5]=(u*m*i-p*h*i+p*r*d-e*m*d-u*r*g+e*h*g)*w,t[6]=(p*a*i-o*m*i-p*r*l+e*m*l+o*r*g-e*a*g)*w,t[7]=(o*h*i-u*a*i+u*r*l-e*h*l-o*r*d+e*a*d)*w,t[8]=_*w,t[9]=(p*c*i-u*f*i-p*n*d+e*f*d+u*n*g-e*c*g)*w,t[10]=(o*f*i-p*s*i+p*n*l-e*f*l-o*n*g+e*s*g)*w,t[11]=(u*s*i-o*c*i-u*n*l+e*c*l+o*n*d-e*s*d)*w,t[12]=b*w,t[13]=(u*f*r-p*c*r+p*n*h-e*f*h-u*n*m+e*c*m)*w,t[14]=(p*s*r-o*f*r-p*n*a+e*f*a+o*n*m-e*s*m)*w,t[15]=(o*c*r-u*s*r+u*n*a-e*c*a-o*n*h+e*s*h)*w,this}scale(t){const e=this.elements,n=t.x,r=t.y,i=t.z;return e[0]*=n,e[4]*=r,e[8]*=i,e[1]*=n,e[5]*=r,e[9]*=i,e[2]*=n,e[6]*=r,e[10]*=i,e[3]*=n,e[7]*=r,e[11]*=i,this}getMaxScaleOnAxis(){const t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))}makeTranslation(t,e,n){return t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){const e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){const e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){const n=Math.cos(e),r=Math.sin(e),i=1-n,o=t.x,s=t.y,a=t.z,l=i*o,u=i*s;return this.set(l*o+n,l*s-r*a,l*a+r*s,0,l*s+r*a,u*s+n,u*a-r*o,0,l*a-r*s,u*a+r*o,i*a*a+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,r,i,o){return this.set(1,n,i,0,t,1,o,0,e,r,1,0,0,0,0,1),this}compose(t,e,n){const r=this.elements,i=e._x,o=e._y,s=e._z,a=e._w,l=i+i,u=o+o,c=s+s,h=i*l,d=i*u,p=i*c,f=o*u,m=o*c,g=s*c,v=a*l,y=a*u,_=a*c,b=n.x,x=n.y,w=n.z;return r[0]=(1-(f+g))*b,r[1]=(d+_)*b,r[2]=(p-y)*b,r[3]=0,r[4]=(d-_)*x,r[5]=(1-(h+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(p+y)*w,r[9]=(m-v)*w,r[10]=(1-(h+f))*w,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this}decompose(t,e,n){const r=this.elements;let i=Hv.set(r[0],r[1],r[2]).length();const o=Hv.set(r[4],r[5],r[6]).length(),s=Hv.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),t.x=r[12],t.y=r[13],t.z=r[14],jv.copy(this);const a=1/i,l=1/o,u=1/s;return jv.elements[0]*=a,jv.elements[1]*=a,jv.elements[2]*=a,jv.elements[4]*=l,jv.elements[5]*=l,jv.elements[6]*=l,jv.elements[8]*=u,jv.elements[9]*=u,jv.elements[10]*=u,e.setFromRotationMatrix(jv),n.x=i,n.y=o,n.z=s,this}makePerspective(t,e,n,r,i,o,s=2e3){const a=this.elements,l=2*i/(e-t),u=2*i/(n-r),c=(e+t)/(e-t),h=(n+r)/(n-r);let d,p;if(2e3===s)d=-(o+i)/(o-i),p=-2*o*i/(o-i);else{if(2001!==s)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);d=-o/(o-i),p=-o*i/(o-i)}return a[0]=l,a[4]=0,a[8]=c,a[12]=0,a[1]=0,a[5]=u,a[9]=h,a[13]=0,a[2]=0,a[6]=0,a[10]=d,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,n,r,i,o,s=2e3){const a=this.elements,l=1/(e-t),u=1/(n-r),c=1/(o-i),h=(e+t)*l,d=(n+r)*u;let p,f;if(2e3===s)p=(o+i)*c,f=-2*c;else{if(2001!==s)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);p=i*c,f=-1*c}return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-h,a[1]=0,a[5]=2*u,a[9]=0,a[13]=-d,a[2]=0,a[6]=0,a[10]=f,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){const e=this.elements,n=t.elements;for(let t=0;t<16;t++)if(e[t]!==n[t])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){const n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}}const Hv=new hv,jv=new zv,Vv=new hv(0,0,0),Xv=new hv(1,1,1),Wv=new hv,Yv=new hv,qv=new hv,$v=new zv,Kv=new cv;class Zv{constructor(t=0,e=0,n=0,r=Zv.DEFAULT_ORDER){this.isEuler=!0,this._x=t,this._y=e,this._z=n,this._order=r}get x(){return this._x}set x(t){this._x=t,this._onChangeCallback()}get y(){return this._y}set y(t){this._y=t,this._onChangeCallback()}get z(){return this._z}set z(t){this._z=t,this._onChangeCallback()}get order(){return this._order}set order(t){this._order=t,this._onChangeCallback()}set(t,e,n,r=this._order){return this._x=t,this._y=e,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(t){return this._x=t._x,this._y=t._y,this._z=t._z,this._order=t._order,this._onChangeCallback(),this}setFromRotationMatrix(t,e=this._order,n=!0){const r=t.elements,i=r[0],o=r[4],s=r[8],a=r[1],l=r[5],u=r[9],c=r[2],h=r[6],d=r[10];switch(e){case"XYZ":this._y=Math.asin(Ig(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-o,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Ig(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,d),this._z=Math.atan2(a,l)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(Ig(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-o,l)):(this._y=0,this._z=Math.atan2(a,i));break;case"ZYX":this._y=Math.asin(-Ig(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(a,i)):(this._x=0,this._z=Math.atan2(-o,l));break;case"YZX":this._z=Math.asin(Ig(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-Ig(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,!0===n&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return $v.makeRotationFromQuaternion(t),this.setFromRotationMatrix($v,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Kv.setFromEuler(this),this.setFromQuaternion(Kv,t)}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._order===this._order}fromArray(t){return this._x=t[0],this._y=t[1],this._z=t[2],void 0!==t[3]&&(this._order=t[3]),this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Zv.DEFAULT_ORDER="XYZ";class Jv{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return 0!=(this.mask&t.mask)}isEnabled(t){return 0!=(this.mask&(1<<t|0))}}let Qv=0;const ty=new hv,ey=new cv,ny=new zv,ry=new hv,iy=new hv,oy=new hv,sy=new cv,ay=new hv(1,0,0),ly=new hv(0,1,0),uy=new hv(0,0,1),cy={type:"added"},hy={type:"removed"},dy={type:"childadded",child:null},py={type:"childremoved",child:null};class fy extends Dg{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Qv++}),this.uuid=Pg(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=fy.DEFAULT_UP.clone();const t=new hv,e=new Zv,n=new cv,r=new hv(1,1,1);e._onChange((function(){n.setFromEuler(e,!1)})),n._onChange((function(){e.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:t},rotation:{configurable:!0,enumerable:!0,value:e},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new zv},normalMatrix:{value:new Bg}}),this.matrix=new zv,this.matrixWorld=new zv,this.matrixAutoUpdate=fy.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=fy.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new Jv,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(t){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(t),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(t){return this.quaternion.premultiply(t),this}setRotationFromAxisAngle(t,e){this.quaternion.setFromAxisAngle(t,e)}setRotationFromEuler(t){this.quaternion.setFromEuler(t,!0)}setRotationFromMatrix(t){this.quaternion.setFromRotationMatrix(t)}setRotationFromQuaternion(t){this.quaternion.copy(t)}rotateOnAxis(t,e){return ey.setFromAxisAngle(t,e),this.quaternion.multiply(ey),this}rotateOnWorldAxis(t,e){return ey.setFromAxisAngle(t,e),this.quaternion.premultiply(ey),this}rotateX(t){return this.rotateOnAxis(ay,t)}rotateY(t){return this.rotateOnAxis(ly,t)}rotateZ(t){return this.rotateOnAxis(uy,t)}translateOnAxis(t,e){return ty.copy(t).applyQuaternion(this.quaternion),this.position.add(ty.multiplyScalar(e)),this}translateX(t){return this.translateOnAxis(ay,t)}translateY(t){return this.translateOnAxis(ly,t)}translateZ(t){return this.translateOnAxis(uy,t)}localToWorld(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(this.matrixWorld)}worldToLocal(t){return this.updateWorldMatrix(!0,!1),t.applyMatrix4(ny.copy(this.matrixWorld).invert())}lookAt(t,e,n){t.isVector3?ry.copy(t):ry.set(t,e,n);const r=this.parent;this.updateWorldMatrix(!0,!1),iy.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?ny.lookAt(iy,ry,this.up):ny.lookAt(ry,iy,this.up),this.quaternion.setFromRotationMatrix(ny),r&&(ny.extractRotation(r.matrixWorld),ey.setFromRotationMatrix(ny),this.quaternion.premultiply(ey.invert()))}add(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return t===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",t),this):(t&&t.isObject3D?(t.removeFromParent(),t.parent=this,this.children.push(t),t.dispatchEvent(cy),dy.child=t,this.dispatchEvent(dy),dy.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",t),this)}remove(t){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.remove(arguments[t]);return this}const e=this.children.indexOf(t);return-1!==e&&(t.parent=null,this.children.splice(e,1),t.dispatchEvent(hy),py.child=t,this.dispatchEvent(py),py.child=null),this}removeFromParent(){const t=this.parent;return null!==t&&t.remove(this),this}clear(){return this.remove(...this.children)}attach(t){return this.updateWorldMatrix(!0,!1),ny.copy(this.matrixWorld).invert(),null!==t.parent&&(t.parent.updateWorldMatrix(!0,!1),ny.multiply(t.parent.matrixWorld)),t.applyMatrix4(ny),t.removeFromParent(),t.parent=this,this.children.push(t),t.updateWorldMatrix(!1,!0),t.dispatchEvent(cy),dy.child=t,this.dispatchEvent(dy),dy.child=null,this}getObjectById(t){return this.getObjectByProperty("id",t)}getObjectByName(t){return this.getObjectByProperty("name",t)}getObjectByProperty(t,e){if(this[t]===e)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(t,e);if(void 0!==r)return r}}getObjectsByProperty(t,e,n=[]){this[t]===e&&n.push(this);const r=this.children;for(let i=0,o=r.length;i<o;i++)r[i].getObjectsByProperty(t,e,n);return n}getWorldPosition(t){return this.updateWorldMatrix(!0,!1),t.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(iy,t,oy),t}getWorldScale(t){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(iy,sy,t),t}getWorldDirection(t){this.updateWorldMatrix(!0,!1);const e=this.matrixWorld.elements;return t.set(e[8],e[9],e[10]).normalize()}raycast(){}traverse(t){t(this);const e=this.children;for(let n=0,r=e.length;n<r;n++)e[n].traverse(t)}traverseVisible(t){if(!1===this.visible)return;t(this);const e=this.children;for(let n=0,r=e.length;n<r;n++)e[n].traverseVisible(t)}traverseAncestors(t){const e=this.parent;null!==e&&(t(e),e.traverseAncestors(t))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||t)&&(!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,t=!0);const e=this.children;for(let n=0,r=e.length;n<r;n++){e[n].updateMatrixWorld(t)}}updateWorldMatrix(t,e){const n=this.parent;if(!0===t&&null!==n&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),!0===this.matrixWorldAutoUpdate&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),!0===e){const t=this.children;for(let e=0,n=t.length;e<n;e++){t[e].updateWorldMatrix(!1,!0)}}}toJSON(t){const e=void 0===t||"string"==typeof t,n={};e&&(t={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const r={};function i(e,n){return void 0===e[n.uuid]&&(e[n.uuid]=n.toJSON(t)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(t=>({boxInitialized:t.boxInitialized,boxMin:t.box.min.toArray(),boxMax:t.box.max.toArray(),sphereInitialized:t.sphereInitialized,sphereRadius:t.sphere.radius,sphereCenter:t.sphere.center.toArray()})),r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(t),null!==this._colorsTexture&&(r.colorsTexture=this._colorsTexture.toJSON(t)),null!==this.boundingSphere&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),null!==this.boundingBox&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()})),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(t).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(t).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(t.geometries,this.geometry);const e=this.geometry.parameters;if(void 0!==e&&void 0!==e.shapes){const n=e.shapes;if(Array.isArray(n))for(let e=0,r=n.length;e<r;e++){const r=n[e];i(t.shapes,r)}else i(t.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(t.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const e=[];for(let n=0,r=this.material.length;n<r;n++)e.push(i(t.materials,this.material[n]));r.material=e}else r.material=i(t.materials,this.material);if(this.children.length>0){r.children=[];for(let e=0;e<this.children.length;e++)r.children.push(this.children[e].toJSON(t).object)}if(this.animations.length>0){r.animations=[];for(let e=0;e<this.animations.length;e++){const n=this.animations[e];r.animations.push(i(t.animations,n))}}if(e){const e=o(t.geometries),r=o(t.materials),i=o(t.textures),s=o(t.images),a=o(t.shapes),l=o(t.skeletons),u=o(t.animations),c=o(t.nodes);e.length>0&&(n.geometries=e),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),a.length>0&&(n.shapes=a),l.length>0&&(n.skeletons=l),u.length>0&&(n.animations=u),c.length>0&&(n.nodes=c)}return n.object=r,n;function o(t){const e=[];for(const n in t){const r=t[n];delete r.metadata,e.push(r)}return e}}clone(t){return(new this.constructor).copy(this,t)}copy(t,e=!0){if(this.name=t.name,this.up.copy(t.up),this.position.copy(t.position),this.rotation.order=t.rotation.order,this.quaternion.copy(t.quaternion),this.scale.copy(t.scale),this.matrix.copy(t.matrix),this.matrixWorld.copy(t.matrixWorld),this.matrixAutoUpdate=t.matrixAutoUpdate,this.matrixWorldAutoUpdate=t.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=t.matrixWorldNeedsUpdate,this.layers.mask=t.layers.mask,this.visible=t.visible,this.castShadow=t.castShadow,this.receiveShadow=t.receiveShadow,this.frustumCulled=t.frustumCulled,this.renderOrder=t.renderOrder,this.animations=t.animations.slice(),this.userData=JSON.parse(JSON.stringify(t.userData)),!0===e)for(let e=0;e<t.children.length;e++){const n=t.children[e];this.add(n.clone())}return this}}fy.DEFAULT_UP=new hv(0,1,0),fy.DEFAULT_MATRIX_AUTO_UPDATE=!0,fy.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const my=new hv,gy=new hv,vy=new hv,yy=new hv,_y=new hv,by=new hv,xy=new hv,wy=new hv,Ey=new hv,Ty=new hv,Sy=new ov,Ay=new ov,My=new ov;class Dy{constructor(t=new hv,e=new hv,n=new hv){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,r){r.subVectors(n,e),my.subVectors(t,e),r.cross(my);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(t,e,n,r,i){my.subVectors(r,e),gy.subVectors(n,e),vy.subVectors(t,e);const o=my.dot(my),s=my.dot(gy),a=my.dot(vy),l=gy.dot(gy),u=gy.dot(vy),c=o*l-s*s;if(0===c)return i.set(0,0,0),null;const h=1/c,d=(l*a-s*u)*h,p=(o*u-s*a)*h;return i.set(1-d-p,p,d)}static containsPoint(t,e,n,r){return null!==this.getBarycoord(t,e,n,r,yy)&&(yy.x>=0&&yy.y>=0&&yy.x+yy.y<=1)}static getInterpolation(t,e,n,r,i,o,s,a){return null===this.getBarycoord(t,e,n,r,yy)?(a.x=0,a.y=0,"z"in a&&(a.z=0),"w"in a&&(a.w=0),null):(a.setScalar(0),a.addScaledVector(i,yy.x),a.addScaledVector(o,yy.y),a.addScaledVector(s,yy.z),a)}static getInterpolatedAttribute(t,e,n,r,i,o){return Sy.setScalar(0),Ay.setScalar(0),My.setScalar(0),Sy.fromBufferAttribute(t,e),Ay.fromBufferAttribute(t,n),My.fromBufferAttribute(t,r),o.setScalar(0),o.addScaledVector(Sy,i.x),o.addScaledVector(Ay,i.y),o.addScaledVector(My,i.z),o}static isFrontFacing(t,e,n,r){return my.subVectors(n,e),gy.subVectors(t,e),my.cross(gy).dot(r)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this}setFromAttributeAndIndices(t,e,n,r){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,r),this}clone(){return(new this.constructor).copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return my.subVectors(this.c,this.b),gy.subVectors(this.a,this.b),.5*my.cross(gy).length()}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return Dy.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return Dy.getBarycoord(t,this.a,this.b,this.c,e)}getInterpolation(t,e,n,r,i){return Dy.getInterpolation(t,this.a,this.b,this.c,e,n,r,i)}containsPoint(t){return Dy.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return Dy.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){const n=this.a,r=this.b,i=this.c;let o,s;_y.subVectors(r,n),by.subVectors(i,n),wy.subVectors(t,n);const a=_y.dot(wy),l=by.dot(wy);if(a<=0&&l<=0)return e.copy(n);Ey.subVectors(t,r);const u=_y.dot(Ey),c=by.dot(Ey);if(u>=0&&c<=u)return e.copy(r);const h=a*c-u*l;if(h<=0&&a>=0&&u<=0)return o=a/(a-u),e.copy(n).addScaledVector(_y,o);Ty.subVectors(t,i);const d=_y.dot(Ty),p=by.dot(Ty);if(p>=0&&d<=p)return e.copy(i);const f=d*l-a*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),e.copy(n).addScaledVector(by,s);const m=u*p-d*c;if(m<=0&&c-u>=0&&d-p>=0)return xy.subVectors(i,r),s=(c-u)/(c-u+(d-p)),e.copy(r).addScaledVector(xy,s);const g=1/(m+f+h);return o=f*g,s=h*g,e.copy(n).addScaledVector(_y,o).addScaledVector(by,s)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}}const Cy={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Ry={h:0,s:0,l:0},Oy={h:0,s:0,l:0};function Py(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+6*(e-t)*(2/3-n):t}class Iy{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(void 0===e&&void 0===n){const e=t;e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e="srgb"){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(255&t)/255,Kg.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=Kg.workingColorSpace){return this.r=t,this.g=e,this.b=n,Kg.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=Kg.workingColorSpace){if(t=Lg(t,1),e=Ig(e,0,1),n=Ig(n,0,1),0===e)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+e):n+e-n*e,i=2*n-r;this.r=Py(i,r,t+1/3),this.g=Py(i,r,t),this.b=Py(i,r,t-1/3)}return Kg.toWorkingColorSpace(this,r),this}setStyle(t,e="srgb"){function n(e){void 0!==e&&parseFloat(e)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(t)){let i;const o=r[1],s=r[2];switch(o){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,e);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,e);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){const n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,e);if(6===i)return this.setHex(parseInt(n,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e="srgb"){const n=Cy[t.toLowerCase()];return void 0!==n?this.setHex(n,e):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copySRGBToLinear(t){return this.r=Zg(t.r),this.g=Zg(t.g),this.b=Zg(t.b),this}copyLinearToSRGB(t){return this.r=Jg(t.r),this.g=Jg(t.g),this.b=Jg(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t="srgb"){return Kg.fromWorkingColorSpace(Ly.copy(this),t),65536*Math.round(Ig(255*Ly.r,0,255))+256*Math.round(Ig(255*Ly.g,0,255))+Math.round(Ig(255*Ly.b,0,255))}getHexString(t="srgb"){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=Kg.workingColorSpace){Kg.fromWorkingColorSpace(Ly.copy(this),e);const n=Ly.r,r=Ly.g,i=Ly.b,o=Math.max(n,r,i),s=Math.min(n,r,i);let a,l;const u=(s+o)/2;if(s===o)a=0,l=0;else{const t=o-s;switch(l=u<=.5?t/(o+s):t/(2-o-s),o){case n:a=(r-i)/t+(r<i?6:0);break;case r:a=(i-n)/t+2;break;case i:a=(n-r)/t+4}a/=6}return t.h=a,t.s=l,t.l=u,t}getRGB(t,e=Kg.workingColorSpace){return Kg.fromWorkingColorSpace(Ly.copy(this),e),t.r=Ly.r,t.g=Ly.g,t.b=Ly.b,t}getStyle(t="srgb"){Kg.fromWorkingColorSpace(Ly.copy(this),t);const e=Ly.r,n=Ly.g,r=Ly.b;return"srgb"!==t?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(255*e)},${Math.round(255*n)},${Math.round(255*r)})`}offsetHSL(t,e,n){return this.getHSL(Ry),this.setHSL(Ry.h+t,Ry.s+e,Ry.l+n)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Ry),t.getHSL(Oy);const n=Ng(Ry.h,Oy.h,e),r=Ng(Ry.s,Oy.s,e),i=Ng(Ry.l,Oy.l,e);return this.setHSL(n,r,i),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){const e=this.r,n=this.g,r=this.b,i=t.elements;return this.r=i[0]*e+i[3]*n+i[6]*r,this.g=i[1]*e+i[4]*n+i[7]*r,this.b=i[2]*e+i[5]*n+i[8]*r,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Ly=new Iy;Iy.NAMES=Cy;let Ny=0;class Fy extends Dg{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Ny++}),this.uuid=Pg(),this.name="",this.type="Material",this.blending=1,this.side=0,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=204,this.blendDst=205,this.blendEquation=100,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Iy(0,0,0),this.blendAlpha=0,this.depthFunc=3,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=519,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=7680,this.stencilZFail=7680,this.stencilZPass=7680,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(void 0!==t)for(const e in t){const n=t[e];if(void 0===n){console.warn(`THREE.Material: parameter '${e}' has value of undefined.`);continue}const r=this[e];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]=n:console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`)}}toJSON(t){const e=void 0===t||"string"==typeof t;e&&(t={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};function r(t){const e=[];for(const n in t){const r=t[n];delete r.metadata,e.push(r)}return e}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),void 0!==this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.dispersion&&(n.dispersion=this.dispersion),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapRotation&&(n.envMapRotation=this.envMapRotation.toArray()),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),1!==this.blending&&(n.blending=this.blending),0!==this.side&&(n.side=this.side),!0===this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=!0),204!==this.blendSrc&&(n.blendSrc=this.blendSrc),205!==this.blendDst&&(n.blendDst=this.blendDst),100!==this.blendEquation&&(n.blendEquation=this.blendEquation),null!==this.blendSrcAlpha&&(n.blendSrcAlpha=this.blendSrcAlpha),null!==this.blendDstAlpha&&(n.blendDstAlpha=this.blendDstAlpha),null!==this.blendEquationAlpha&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),0!==this.blendAlpha&&(n.blendAlpha=this.blendAlpha),3!==this.depthFunc&&(n.depthFunc=this.depthFunc),!1===this.depthTest&&(n.depthTest=this.depthTest),!1===this.depthWrite&&(n.depthWrite=this.depthWrite),!1===this.colorWrite&&(n.colorWrite=this.colorWrite),255!==this.stencilWriteMask&&(n.stencilWriteMask=this.stencilWriteMask),519!==this.stencilFunc&&(n.stencilFunc=this.stencilFunc),0!==this.stencilRef&&(n.stencilRef=this.stencilRef),255!==this.stencilFuncMask&&(n.stencilFuncMask=this.stencilFuncMask),7680!==this.stencilFail&&(n.stencilFail=this.stencilFail),7680!==this.stencilZFail&&(n.stencilZFail=this.stencilZFail),7680!==this.stencilZPass&&(n.stencilZPass=this.stencilZPass),!0===this.stencilWrite&&(n.stencilWrite=this.stencilWrite),void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaHash&&(n.alphaHash=!0),!0===this.alphaToCoverage&&(n.alphaToCoverage=!0),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=!0),!0===this.forceSinglePass&&(n.forceSinglePass=!0),!0===this.wireframe&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=!0),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),e){const e=r(t.textures),i=r(t.images);e.length>0&&(n.textures=e),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;const e=t.clippingPlanes;let n=null;if(null!==e){const t=e.length;n=new Array(t);for(let r=0;r!==t;++r)n[r]=e[r].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){!0===t&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class ky extends Fy{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Iy(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Zv,this.combine=0,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.fog=t.fog,this}}const Uy=new hv,By=new Ug;class Gy{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=void 0!==t?t.length/e:0,this.normalized=n,this.usage=35044,this.updateRanges=[],this.gpuType=1015,this.version=0}onUploadCallback(){}set needsUpdate(t){!0===t&&this.version++}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[t+r]=e.array[n+r];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(2===this.itemSize)for(let e=0,n=this.count;e<n;e++)By.fromBufferAttribute(this,e),By.applyMatrix3(t),this.setXY(e,By.x,By.y);else if(3===this.itemSize)for(let e=0,n=this.count;e<n;e++)Uy.fromBufferAttribute(this,e),Uy.applyMatrix3(t),this.setXYZ(e,Uy.x,Uy.y,Uy.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)Uy.fromBufferAttribute(this,e),Uy.applyMatrix4(t),this.setXYZ(e,Uy.x,Uy.y,Uy.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)Uy.fromBufferAttribute(this,e),Uy.applyNormalMatrix(t),this.setXYZ(e,Uy.x,Uy.y,Uy.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)Uy.fromBufferAttribute(this,e),Uy.transformDirection(t),this.setXYZ(e,Uy.x,Uy.y,Uy.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=Fg(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=kg(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=Fg(e,this.array)),e}setX(t,e){return this.normalized&&(e=kg(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=Fg(e,this.array)),e}setY(t,e){return this.normalized&&(e=kg(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=Fg(e,this.array)),e}setZ(t,e){return this.normalized&&(e=kg(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=Fg(e,this.array)),e}setW(t,e){return this.normalized&&(e=kg(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=kg(e,this.array),n=kg(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,r){return t*=this.itemSize,this.normalized&&(e=kg(e,this.array),n=kg(n,this.array),r=kg(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this}setXYZW(t,e,n,r,i){return t*=this.itemSize,this.normalized&&(e=kg(e,this.array),n=kg(n,this.array),r=kg(r,this.array),i=kg(i,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=i,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(t.name=this.name),35044!==this.usage&&(t.usage=this.usage),t}}class zy extends Gy{constructor(t,e,n){super(new Uint16Array(t),e,n)}}class Hy extends Gy{constructor(t,e,n){super(new Uint32Array(t),e,n)}}class jy extends Gy{constructor(t,e,n){super(new Float32Array(t),e,n)}}let Vy=0;const Xy=new zv,Wy=new fy,Yy=new hv,qy=new fv,$y=new fv,Ky=new hv;class Zy extends Dg{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Vy++}),this.uuid=Pg(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(zg(t)?Hy:zy)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return void 0!==this.attributes[t]}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){const e=this.attributes.position;void 0!==e&&(e.applyMatrix4(t),e.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const e=(new Bg).getNormalMatrix(t);n.applyNormalMatrix(e),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(t),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(t){return Xy.makeRotationFromQuaternion(t),this.applyMatrix4(Xy),this}rotateX(t){return Xy.makeRotationX(t),this.applyMatrix4(Xy),this}rotateY(t){return Xy.makeRotationY(t),this.applyMatrix4(Xy),this}rotateZ(t){return Xy.makeRotationZ(t),this.applyMatrix4(Xy),this}translate(t,e,n){return Xy.makeTranslation(t,e,n),this.applyMatrix4(Xy),this}scale(t,e,n){return Xy.makeScale(t,e,n),this.applyMatrix4(Xy),this}lookAt(t){return Wy.lookAt(t),Wy.updateMatrix(),this.applyMatrix4(Wy.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Yy).negate(),this.translate(Yy.x,Yy.y,Yy.z),this}setFromPoints(t){const e=[];for(let n=0,r=t.length;n<r;n++){const r=t[n];e.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new jy(e,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new fv);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),void this.boundingBox.set(new hv(-1/0,-1/0,-1/0),new hv(1/0,1/0,1/0));if(void 0!==t){if(this.boundingBox.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];qy.setFromBufferAttribute(n),this.morphTargetsRelative?(Ky.addVectors(this.boundingBox.min,qy.min),this.boundingBox.expandByPoint(Ky),Ky.addVectors(this.boundingBox.max,qy.max),this.boundingBox.expandByPoint(Ky)):(this.boundingBox.expandByPoint(qy.min),this.boundingBox.expandByPoint(qy.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Pv);const t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute)return console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),void this.boundingSphere.set(new hv,1/0);if(t){const n=this.boundingSphere.center;if(qy.setFromBufferAttribute(t),e)for(let t=0,n=e.length;t<n;t++){const n=e[t];$y.setFromBufferAttribute(n),this.morphTargetsRelative?(Ky.addVectors(qy.min,$y.min),qy.expandByPoint(Ky),Ky.addVectors(qy.max,$y.max),qy.expandByPoint(Ky)):(qy.expandByPoint($y.min),qy.expandByPoint($y.max))}qy.getCenter(n);let r=0;for(let e=0,i=t.count;e<i;e++)Ky.fromBufferAttribute(t,e),r=Math.max(r,n.distanceToSquared(Ky));if(e)for(let i=0,o=e.length;i<o;i++){const o=e[i],s=this.morphTargetsRelative;for(let e=0,i=o.count;e<i;e++)Ky.fromBufferAttribute(o,e),s&&(Yy.fromBufferAttribute(t,e),Ky.add(Yy)),r=Math.max(r,n.distanceToSquared(Ky))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const t=this.index,e=this.attributes;if(null===t||void 0===e.position||void 0===e.normal||void 0===e.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.position,r=e.normal,i=e.uv;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new Gy(new Float32Array(4*n.count),4));const o=this.getAttribute("tangent"),s=[],a=[];for(let t=0;t<n.count;t++)s[t]=new hv,a[t]=new hv;const l=new hv,u=new hv,c=new hv,h=new Ug,d=new Ug,p=new Ug,f=new hv,m=new hv;function g(t,e,r){l.fromBufferAttribute(n,t),u.fromBufferAttribute(n,e),c.fromBufferAttribute(n,r),h.fromBufferAttribute(i,t),d.fromBufferAttribute(i,e),p.fromBufferAttribute(i,r),u.sub(l),c.sub(l),d.sub(h),p.sub(h);const o=1/(d.x*p.y-p.x*d.y);isFinite(o)&&(f.copy(u).multiplyScalar(p.y).addScaledVector(c,-d.y).multiplyScalar(o),m.copy(c).multiplyScalar(d.x).addScaledVector(u,-p.x).multiplyScalar(o),s[t].add(f),s[e].add(f),s[r].add(f),a[t].add(m),a[e].add(m),a[r].add(m))}let v=this.groups;0===v.length&&(v=[{start:0,count:t.count}]);for(let e=0,n=v.length;e<n;++e){const n=v[e],r=n.start;for(let e=r,i=r+n.count;e<i;e+=3)g(t.getX(e+0),t.getX(e+1),t.getX(e+2))}const y=new hv,_=new hv,b=new hv,x=new hv;function w(t){b.fromBufferAttribute(r,t),x.copy(b);const e=s[t];y.copy(e),y.sub(b.multiplyScalar(b.dot(e))).normalize(),_.crossVectors(x,e);const n=_.dot(a[t])<0?-1:1;o.setXYZW(t,y.x,y.y,y.z,n)}for(let e=0,n=v.length;e<n;++e){const n=v[e],r=n.start;for(let e=r,i=r+n.count;e<i;e+=3)w(t.getX(e+0)),w(t.getX(e+1)),w(t.getX(e+2))}}computeVertexNormals(){const t=this.index,e=this.getAttribute("position");if(void 0!==e){let n=this.getAttribute("normal");if(void 0===n)n=new Gy(new Float32Array(3*e.count),3),this.setAttribute("normal",n);else for(let t=0,e=n.count;t<e;t++)n.setXYZ(t,0,0,0);const r=new hv,i=new hv,o=new hv,s=new hv,a=new hv,l=new hv,u=new hv,c=new hv;if(t)for(let h=0,d=t.count;h<d;h+=3){const d=t.getX(h+0),p=t.getX(h+1),f=t.getX(h+2);r.fromBufferAttribute(e,d),i.fromBufferAttribute(e,p),o.fromBufferAttribute(e,f),u.subVectors(o,i),c.subVectors(r,i),u.cross(c),s.fromBufferAttribute(n,d),a.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(u),a.add(u),l.add(u),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(p,a.x,a.y,a.z),n.setXYZ(f,l.x,l.y,l.z)}else for(let t=0,s=e.count;t<s;t+=3)r.fromBufferAttribute(e,t+0),i.fromBufferAttribute(e,t+1),o.fromBufferAttribute(e,t+2),u.subVectors(o,i),c.subVectors(r,i),u.cross(c),n.setXYZ(t+0,u.x,u.y,u.z),n.setXYZ(t+1,u.x,u.y,u.z),n.setXYZ(t+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)Ky.fromBufferAttribute(t,e),Ky.normalize(),t.setXYZ(e,Ky.x,Ky.y,Ky.z)}toNonIndexed(){function t(t,e){const n=t.array,r=t.itemSize,i=t.normalized,o=new n.constructor(e.length*r);let s=0,a=0;for(let i=0,l=e.length;i<l;i++){s=t.isInterleavedBufferAttribute?e[i]*t.data.stride+t.offset:e[i]*r;for(let t=0;t<r;t++)o[a++]=n[s++]}return new Gy(o,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const e=new Zy,n=this.index.array,r=this.attributes;for(const i in r){const o=t(r[i],n);e.setAttribute(i,o)}const i=this.morphAttributes;for(const r in i){const o=[],s=i[r];for(let e=0,r=s.length;e<r;e++){const r=t(s[e],n);o.push(r)}e.morphAttributes[r]=o}e.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let t=0,n=o.length;t<n;t++){const n=o[t];e.addGroup(n.start,n.count,n.materialIndex)}return e}toJSON(){const t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,""!==this.name&&(t.name=this.name),Object.keys(this.userData).length>0&&(t.userData=this.userData),void 0!==this.parameters){const e=this.parameters;for(const n in e)void 0!==e[n]&&(t[n]=e[n]);return t}t.data={attributes:{}};const e=this.index;null!==e&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});const n=this.attributes;for(const e in n){const r=n[e];t.data.attributes[e]=r.toJSON(t.data)}const r={};let i=!1;for(const e in this.morphAttributes){const n=this.morphAttributes[e],o=[];for(let e=0,r=n.length;e<r;e++){const r=n[e];o.push(r.toJSON(t.data))}o.length>0&&(r[e]=o,i=!0)}i&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(t.data.groups=JSON.parse(JSON.stringify(o)));const s=this.boundingSphere;return null!==s&&(t.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),t}clone(){return(new this.constructor).copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const e={};this.name=t.name;const n=t.index;null!==n&&this.setIndex(n.clone(e));const r=t.attributes;for(const t in r){const n=r[t];this.setAttribute(t,n.clone(e))}const i=t.morphAttributes;for(const t in i){const n=[],r=i[t];for(let t=0,i=r.length;t<i;t++)n.push(r[t].clone(e));this.morphAttributes[t]=n}this.morphTargetsRelative=t.morphTargetsRelative;const o=t.groups;for(let t=0,e=o.length;t<e;t++){const e=o[t];this.addGroup(e.start,e.count,e.materialIndex)}const s=t.boundingBox;null!==s&&(this.boundingBox=s.clone());const a=t.boundingSphere;return null!==a&&(this.boundingSphere=a.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const Jy=new zv,Qy=new Gv,t_=new Pv,e_=new hv,n_=new hv,r_=new hv,i_=new hv,o_=new hv,s_=new hv,a_=new hv,l_=new hv;class u_ extends fy{constructor(t=new Zy,e=new ky){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),void 0!==t.morphTargetInfluences&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),void 0!==t.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t<e;t++){const e=n[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[e]=t}}}}getVertexPosition(t,e){const n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,o=n.morphTargetsRelative;e.fromBufferAttribute(r,t);const s=this.morphTargetInfluences;if(i&&s){s_.set(0,0,0);for(let n=0,r=i.length;n<r;n++){const r=s[n],a=i[n];0!==r&&(o_.fromBufferAttribute(a,t),o?s_.addScaledVector(o_,r):s_.addScaledVector(o_.sub(e),r))}e.add(s_)}return e}raycast(t,e){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0!==r){if(null===n.boundingSphere&&n.computeBoundingSphere(),t_.copy(n.boundingSphere),t_.applyMatrix4(i),Qy.copy(t.ray).recast(t.near),!1===t_.containsPoint(Qy.origin)){if(null===Qy.intersectSphere(t_,e_))return;if(Qy.origin.distanceToSquared(e_)>(t.far-t.near)**2)return}Jy.copy(i).invert(),Qy.copy(t.ray).applyMatrix4(Jy),null!==n.boundingBox&&!1===Qy.intersectsBox(n.boundingBox)||this._computeIntersections(t,e,Qy)}}_computeIntersections(t,e,n){let r;const i=this.geometry,o=this.material,s=i.index,a=i.attributes.position,l=i.attributes.uv,u=i.attributes.uv1,c=i.attributes.normal,h=i.groups,d=i.drawRange;if(null!==s)if(Array.isArray(o))for(let i=0,a=h.length;i<a;i++){const a=h[i],p=o[a.materialIndex];for(let i=Math.max(a.start,d.start),o=Math.min(s.count,Math.min(a.start+a.count,d.start+d.count));i<o;i+=3){r=c_(this,p,t,n,l,u,c,s.getX(i),s.getX(i+1),s.getX(i+2)),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=a.materialIndex,e.push(r))}}else{for(let i=Math.max(0,d.start),a=Math.min(s.count,d.start+d.count);i<a;i+=3){r=c_(this,o,t,n,l,u,c,s.getX(i),s.getX(i+1),s.getX(i+2)),r&&(r.faceIndex=Math.floor(i/3),e.push(r))}}else if(void 0!==a)if(Array.isArray(o))for(let i=0,s=h.length;i<s;i++){const s=h[i],p=o[s.materialIndex];for(let i=Math.max(s.start,d.start),o=Math.min(a.count,Math.min(s.start+s.count,d.start+d.count));i<o;i+=3){r=c_(this,p,t,n,l,u,c,i,i+1,i+2),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=s.materialIndex,e.push(r))}}else{for(let i=Math.max(0,d.start),s=Math.min(a.count,d.start+d.count);i<s;i+=3){r=c_(this,o,t,n,l,u,c,i,i+1,i+2),r&&(r.faceIndex=Math.floor(i/3),e.push(r))}}}}function c_(t,e,n,r,i,o,s,a,l,u){t.getVertexPosition(a,n_),t.getVertexPosition(l,r_),t.getVertexPosition(u,i_);const c=function(t,e,n,r,i,o,s,a){let l;if(l=1===e.side?r.intersectTriangle(s,o,i,!0,a):r.intersectTriangle(i,o,s,0===e.side,a),null===l)return null;l_.copy(a),l_.applyMatrix4(t.matrixWorld);const u=n.ray.origin.distanceTo(l_);return u<n.near||u>n.far?null:{distance:u,point:l_.clone(),object:t}}(t,e,n,r,n_,r_,i_,a_);if(c){const t=new hv;Dy.getBarycoord(a_,n_,r_,i_,t),i&&(c.uv=Dy.getInterpolatedAttribute(i,a,l,u,t,new Ug)),o&&(c.uv1=Dy.getInterpolatedAttribute(o,a,l,u,t,new Ug)),s&&(c.normal=Dy.getInterpolatedAttribute(s,a,l,u,t,new hv),c.normal.dot(r.direction)>0&&c.normal.multiplyScalar(-1));const e={a:a,b:l,c:u,normal:new hv,materialIndex:0};Dy.getNormal(n_,r_,i_,e.normal),c.face=e,c.barycoord=t}return c}class h_ extends Zy{constructor(t=1,e=1,n=1,r=1,i=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:i,depthSegments:o};const s=this;r=Math.floor(r),i=Math.floor(i),o=Math.floor(o);const a=[],l=[],u=[],c=[];let h=0,d=0;function p(t,e,n,r,i,o,p,f,m,g,v){const y=o/m,_=p/g,b=o/2,x=p/2,w=f/2,E=m+1,T=g+1;let S=0,A=0;const M=new hv;for(let o=0;o<T;o++){const s=o*_-x;for(let a=0;a<E;a++){const h=a*y-b;M[t]=h*r,M[e]=s*i,M[n]=w,l.push(M.x,M.y,M.z),M[t]=0,M[e]=0,M[n]=f>0?1:-1,u.push(M.x,M.y,M.z),c.push(a/m),c.push(1-o/g),S+=1}}for(let t=0;t<g;t++)for(let e=0;e<m;e++){const n=h+e+E*t,r=h+e+E*(t+1),i=h+(e+1)+E*(t+1),o=h+(e+1)+E*t;a.push(n,r,o),a.push(r,i,o),A+=6}s.addGroup(d,A,v),d+=A,h+=S}p("z","y","x",-1,-1,n,e,t,o,i,0),p("z","y","x",1,-1,n,e,-t,o,i,1),p("x","z","y",1,1,t,n,e,r,o,2),p("x","z","y",1,-1,t,n,-e,r,o,3),p("x","y","z",1,-1,t,e,n,r,i,4),p("x","y","z",-1,-1,t,e,-n,r,i,5),this.setIndex(a),this.setAttribute("position",new jy(l,3)),this.setAttribute("normal",new jy(u,3)),this.setAttribute("uv",new jy(c,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new h_(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}}function d_(t){const e={};for(const n in t){e[n]={};for(const r in t[n]){const i=t[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[n][r]=null):e[n][r]=i.clone():Array.isArray(i)?e[n][r]=i.slice():e[n][r]=i}}return e}function p_(t){const e={};for(let n=0;n<t.length;n++){const r=d_(t[n]);for(const t in r)e[t]=r[t]}return e}function f_(t){const e=t.getRenderTarget();return null===e?t.outputColorSpace:!0===e.isXRRenderTarget?e.texture.colorSpace:Kg.workingColorSpace}const m_={clone:d_,merge:p_};class g_ extends Fy{constructor(t){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==t&&this.setValues(t)}copy(t){return super.copy(t),this.fragmentShader=t.fragmentShader,this.vertexShader=t.vertexShader,this.uniforms=d_(t.uniforms),this.uniformsGroups=function(t){const e=[];for(let n=0;n<t.length;n++)e.push(t[n].clone());return e}(t.uniformsGroups),this.defines=Object.assign({},t.defines),this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.fog=t.fog,this.lights=t.lights,this.clipping=t.clipping,this.extensions=Object.assign({},t.extensions),this.glslVersion=t.glslVersion,this}toJSON(t){const e=super.toJSON(t);e.glslVersion=this.glslVersion,e.uniforms={};for(const n in this.uniforms){const r=this.uniforms[n].value;r&&r.isTexture?e.uniforms[n]={type:"t",value:r.toJSON(t).uuid}:r&&r.isColor?e.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?e.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?e.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?e.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?e.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?e.uniforms[n]={type:"m4",value:r.toArray()}:e.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader,e.lights=this.lights,e.clipping=this.clipping;const n={};for(const t in this.extensions)!0===this.extensions[t]&&(n[t]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}}class v_ extends fy{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new zv,this.projectionMatrix=new zv,this.projectionMatrixInverse=new zv,this.coordinateSystem=2e3}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this.coordinateSystem=t.coordinateSystem,this}getWorldDirection(t){return super.getWorldDirection(t).negate()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}const y_=new hv,__=new Ug,b_=new Ug;class x_ extends v_{constructor(t=50,e=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=null===t.view?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){const e=.5*this.getFilmHeight()/t;this.fov=2*Og*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){const t=Math.tan(.5*Rg*this.fov);return.5*this.getFilmHeight()/t}getEffectiveFOV(){return 2*Og*Math.atan(Math.tan(.5*Rg*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(t,e,n){y_.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),e.set(y_.x,y_.y).multiplyScalar(-t/y_.z),y_.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(y_.x,y_.y).multiplyScalar(-t/y_.z)}getViewSize(t,e){return this.getViewBounds(t,__,b_),e.subVectors(b_,__)}setViewOffset(t,e,n,r,i,o){this.aspect=t/e,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=this.near;let e=t*Math.tan(.5*Rg*this.fov)/this.zoom,n=2*e,r=this.aspect*n,i=-.5*r;const o=this.view;if(null!==this.view&&this.view.enabled){const t=o.fullWidth,s=o.fullHeight;i+=o.offsetX*r/t,e-=o.offsetY*n/s,r*=o.width/t,n*=o.height/s}const s=this.filmOffset;0!==s&&(i+=t*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,e,e-n,t,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,null!==this.view&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}}class w_ extends fy{constructor(t,e,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new x_(-90,1,t,e);r.layers=this.layers,this.add(r);const i=new x_(-90,1,t,e);i.layers=this.layers,this.add(i);const o=new x_(-90,1,t,e);o.layers=this.layers,this.add(o);const s=new x_(-90,1,t,e);s.layers=this.layers,this.add(s);const a=new x_(-90,1,t,e);a.layers=this.layers,this.add(a);const l=new x_(-90,1,t,e);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const t=this.coordinateSystem,e=this.children.concat(),[n,r,i,o,s,a]=e;for(const t of e)this.remove(t);if(2e3===t)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),a.up.set(0,1,0),a.lookAt(0,0,-1);else{if(2001!==t)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+t);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),a.up.set(0,-1,0),a.lookAt(0,0,-1)}for(const t of e)this.add(t),t.updateMatrixWorld()}update(t,e){null===this.parent&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:r}=this;this.coordinateSystem!==t.coordinateSystem&&(this.coordinateSystem=t.coordinateSystem,this.updateCoordinateSystem());const[i,o,s,a,l,u]=this.children,c=t.getRenderTarget(),h=t.getActiveCubeFace(),d=t.getActiveMipmapLevel(),p=t.xr.enabled;t.xr.enabled=!1;const f=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0,r),t.render(e,i),t.setRenderTarget(n,1,r),t.render(e,o),t.setRenderTarget(n,2,r),t.render(e,s),t.setRenderTarget(n,3,r),t.render(e,a),t.setRenderTarget(n,4,r),t.render(e,l),n.texture.generateMipmaps=f,t.setRenderTarget(n,5,r),t.render(e,u),t.setRenderTarget(c,h,d),t.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class E_ extends iv{constructor(t,e,n,r,i,o,s,a,l,u){super(t=void 0!==t?t:[],e=void 0!==e?e:301,n,r,i,o,s,a,l,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(t){this.image=t}}class T_ extends av{constructor(t=1,e={}){super(t,t,e),this.isWebGLCubeRenderTarget=!0;const n={width:t,height:t,depth:1},r=[n,n,n,n,n,n];this.texture=new E_(r,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==e.generateMipmaps&&e.generateMipmaps,this.texture.minFilter=void 0!==e.minFilter?e.minFilter:1006}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.colorSpace=e.colorSpace,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:"\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",fragmentShader:"\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t"},r=new h_(5,5,5),i=new g_({name:"CubemapFromEquirect",uniforms:d_(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:1,blending:0});i.uniforms.tEquirect.value=e;const o=new u_(r,i),s=e.minFilter;1008===e.minFilter&&(e.minFilter=1006);return new w_(1,10,this).update(t,o),e.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(t,e,n,r){const i=t.getRenderTarget();for(let i=0;i<6;i++)t.setRenderTarget(this,i),t.clear(e,n,r);t.setRenderTarget(i)}}const S_=new hv,A_=new hv,M_=new Bg;class D_{constructor(t=new hv(1,0,0),e=0){this.isPlane=!0,this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){const r=S_.subVectors(n,e).cross(A_.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(r,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){const t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(t).addScaledVector(this.normal,-this.distanceToPoint(t))}intersectLine(t,e){const n=t.delta(S_),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(t.start)?e.copy(t.start):null;const i=-(t.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:e.copy(t.start).addScaledVector(n,i)}intersectsLine(t){const e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){const n=e||M_.getNormalMatrix(t),r=this.coplanarPoint(S_).applyMatrix4(t),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const C_=new Pv,R_=new hv;class O_{constructor(t=new D_,e=new D_,n=new D_,r=new D_,i=new D_,o=new D_){this.planes=[t,e,n,r,i,o]}set(t,e,n,r,i,o){const s=this.planes;return s[0].copy(t),s[1].copy(e),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(o),this}copy(t){const e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t,e=2e3){const n=this.planes,r=t.elements,i=r[0],o=r[1],s=r[2],a=r[3],l=r[4],u=r[5],c=r[6],h=r[7],d=r[8],p=r[9],f=r[10],m=r[11],g=r[12],v=r[13],y=r[14],_=r[15];if(n[0].setComponents(a-i,h-l,m-d,_-g).normalize(),n[1].setComponents(a+i,h+l,m+d,_+g).normalize(),n[2].setComponents(a+o,h+u,m+p,_+v).normalize(),n[3].setComponents(a-o,h-u,m-p,_-v).normalize(),n[4].setComponents(a-s,h-c,m-f,_-y).normalize(),2e3===e)n[5].setComponents(a+s,h+c,m+f,_+y).normalize();else{if(2001!==e)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+e);n[5].setComponents(s,c,f,y).normalize()}return this}intersectsObject(t){if(void 0!==t.boundingSphere)null===t.boundingSphere&&t.computeBoundingSphere(),C_.copy(t.boundingSphere).applyMatrix4(t.matrixWorld);else{const e=t.geometry;null===e.boundingSphere&&e.computeBoundingSphere(),C_.copy(e.boundingSphere).applyMatrix4(t.matrixWorld)}return this.intersectsSphere(C_)}intersectsSprite(t){return C_.center.set(0,0,0),C_.radius=.7071067811865476,C_.applyMatrix4(t.matrixWorld),this.intersectsSphere(C_)}intersectsSphere(t){const e=this.planes,n=t.center,r=-t.radius;for(let t=0;t<6;t++){if(e[t].distanceToPoint(n)<r)return!1}return!0}intersectsBox(t){const e=this.planes;for(let n=0;n<6;n++){const r=e[n];if(R_.x=r.normal.x>0?t.max.x:t.min.x,R_.y=r.normal.y>0?t.max.y:t.min.y,R_.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(R_)<0)return!1}return!0}containsPoint(t){const e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function P_(){let t=null,e=!1,n=null,r=null;function i(e,o){n(e,o),r=t.requestAnimationFrame(i)}return{start:function(){!0!==e&&null!==n&&(r=t.requestAnimationFrame(i),e=!0)},stop:function(){t.cancelAnimationFrame(r),e=!1},setAnimationLoop:function(t){n=t},setContext:function(e){t=e}}}function I_(t){const e=new WeakMap;return{get:function(t){return t.isInterleavedBufferAttribute&&(t=t.data),e.get(t)},remove:function(n){n.isInterleavedBufferAttribute&&(n=n.data);const r=e.get(n);r&&(t.deleteBuffer(r.buffer),e.delete(n))},update:function(n,r){if(n.isInterleavedBufferAttribute&&(n=n.data),n.isGLBufferAttribute){const t=e.get(n);return void((!t||t.version<n.version)&&e.set(n,{buffer:n.buffer,type:n.type,bytesPerElement:n.elementSize,version:n.version}))}const i=e.get(n);if(void 0===i)e.set(n,function(e,n){const r=e.array,i=e.usage,o=r.byteLength,s=t.createBuffer();let a;if(t.bindBuffer(n,s),t.bufferData(n,r,i),e.onUploadCallback(),r instanceof Float32Array)a=t.FLOAT;else if(r instanceof Uint16Array)a=e.isFloat16BufferAttribute?t.HALF_FLOAT:t.UNSIGNED_SHORT;else if(r instanceof Int16Array)a=t.SHORT;else if(r instanceof Uint32Array)a=t.UNSIGNED_INT;else if(r instanceof Int32Array)a=t.INT;else if(r instanceof Int8Array)a=t.BYTE;else if(r instanceof Uint8Array)a=t.UNSIGNED_BYTE;else{if(!(r instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+r);a=t.UNSIGNED_BYTE}return{buffer:s,type:a,bytesPerElement:r.BYTES_PER_ELEMENT,version:e.version,size:o}}(n,r));else if(i.version<n.version){if(i.size!==n.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");!function(e,n,r){const i=n.array,o=n.updateRanges;if(t.bindBuffer(r,e),0===o.length)t.bufferSubData(r,0,i);else{o.sort((t,e)=>t.start-e.start);let e=0;for(let t=1;t<o.length;t++){const n=o[e],r=o[t];r.start<=n.start+n.count+1?n.count=Math.max(n.count,r.start+r.count-n.start):(++e,o[e]=r)}o.length=e+1;for(let e=0,n=o.length;e<n;e++){const n=o[e];t.bufferSubData(r,n.start*i.BYTES_PER_ELEMENT,i,n.start,n.count)}n.clearUpdateRanges()}n.onUploadCallback()}(i.buffer,n,r),i.version=n.version}}}}class L_ extends Zy{constructor(t=1,e=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:t,height:e,widthSegments:n,heightSegments:r};const i=t/2,o=e/2,s=Math.floor(n),a=Math.floor(r),l=s+1,u=a+1,c=t/s,h=e/a,d=[],p=[],f=[],m=[];for(let t=0;t<u;t++){const e=t*h-o;for(let n=0;n<l;n++){const r=n*c-i;p.push(r,-e,0),f.push(0,0,1),m.push(n/s),m.push(1-t/a)}}for(let t=0;t<a;t++)for(let e=0;e<s;e++){const n=e+l*t,r=e+l*(t+1),i=e+1+l*(t+1),o=e+1+l*t;d.push(n,r,o),d.push(r,i,o)}this.setIndex(d),this.setAttribute("position",new jy(p,3)),this.setAttribute("normal",new jy(f,3)),this.setAttribute("uv",new jy(m,2))}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new L_(t.width,t.height,t.widthSegments,t.heightSegments)}}const N_={alphahash_fragment:"#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\t#ifdef ALPHA_TO_COVERAGE\n\tdiffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a );\n\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\tif ( diffuseColor.a < alphaTest ) discard;\n\t#endif\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_CLEARCOAT ) \n\t\tclearcoatSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_SHEEN ) \n\t\tsheenSpecularIndirect *= ambientOcclusion;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometryNormal, geometryViewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",batching_pars_vertex:"#ifdef USE_BATCHING\n\t#if ! defined( GL_ANGLE_multi_draw )\n\t#define gl_DrawID _gl_DrawID\n\tuniform int _gl_DrawID;\n\t#endif\n\tuniform highp sampler2D batchingTexture;\n\tuniform highp usampler2D batchingIdTexture;\n\tmat4 getBatchingMatrix( const in float i ) {\n\t\tint size = textureSize( batchingTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n\tfloat getIndirectIndex( const in int i ) {\n\t\tint size = textureSize( batchingIdTexture, 0 ).x;\n\t\tint x = i % size;\n\t\tint y = i / size;\n\t\treturn float( texelFetch( batchingIdTexture, ivec2( x, y ), 0 ).r );\n\t}\n#endif\n#ifdef USE_BATCHING_COLOR\n\tuniform sampler2D batchingColorTexture;\n\tvec3 getBatchingColor( const in float i ) {\n\t\tint size = textureSize( batchingColorTexture, 0 ).x;\n\t\tint j = int( i );\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\treturn texelFetch( batchingColorTexture, ivec2( x, y ), 0 ).rgb;\n\t}\n#endif",batching_vertex:"#ifdef USE_BATCHING\n\tmat4 batchingMatrix = getBatchingMatrix( getIndirectIndex( gl_DrawID ) );\n#endif",begin_vertex:"vec3 transformed = vec3( position );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n} // validated",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660,  0.0556434,\n\t\t-1.5371385,  1.8760108, -0.2040259,\n\t\t-0.4985314,  0.0415560,  1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\treturn vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) );\n\t\tvec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#ifdef ALPHA_TO_COVERAGE\n\t\tfloat distanceToPlane, distanceGradient;\n\t\tfloat clipOpacity = 1.0;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\tclipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\tif ( clipOpacity == 0.0 ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tfloat unionClipOpacity = 1.0;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tdistanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w;\n\t\t\t\tdistanceGradient = fwidth( distanceToPlane ) / 2.0;\n\t\t\t\tunionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane );\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tclipOpacity *= 1.0 - unionClipOpacity;\n\t\t#endif\n\t\tdiffuseColor.a *= clipOpacity;\n\t\tif ( diffuseColor.a == 0.0 ) discard;\n\t#else\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\t\tbool clipped = true;\n\t\t\t#pragma unroll_loop_start\n\t\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\t\tplane = clippingPlanes[ i ];\n\t\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t\t}\n\t\t\t#pragma unroll_loop_end\n\t\t\tif ( clipped ) discard;\n\t\t#endif\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif\n#ifdef USE_BATCHING_COLOR\n\tvec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) );\n\tvColor.xyz *= batchingColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}\nvec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n} // validated",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = objectTangent;\n#endif\n#ifdef USE_BATCHING\n\tmat3 bm = mat3( batchingMatrix );\n\ttransformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) );\n\ttransformedNormal = bm * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = bm * transformedTangent;\n\t#endif\n#endif\n#ifdef USE_INSTANCING\n\tmat3 im = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) );\n\ttransformedNormal = im * transformedNormal;\n\t#ifdef USE_TANGENT\n\t\ttransformedTangent = im * transformedTangent;\n\t#endif\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\ttransformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_pars_fragment:"\nconst mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3(\n\tvec3( 0.8224621, 0.177538, 0.0 ),\n\tvec3( 0.0331941, 0.9668058, 0.0 ),\n\tvec3( 0.0170827, 0.0723974, 0.9105199 )\n);\nconst mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.2249401, - 0.2249404, 0.0 ),\n\tvec3( - 0.0420569, 1.0420571, 0.0 ),\n\tvec3( - 0.0196376, - 0.0786361, 1.0982735 )\n);\nvec4 LinearSRGBToLinearDisplayP3( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a );\n}\nvec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) {\n\treturn vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a );\n}\nvec4 LinearTransferOETF( in vec4 value ) {\n\treturn value;\n}\nvec4 sRGBTransferOETF( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\tuniform mat3 envMapRotation;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\n#if defined( USE_LIGHT_PROBES )\n\tuniform vec3 lightProbe[ 9 ];\n#endif\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\tif ( cutoffDistance > 0.0 ) {\n\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t}\n\treturn distanceFalloff;\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometryPosition;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_DISPERSION\n\tmaterial.dispersion = dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tif( material.anisotropy == 0.0 ) {\n\t\tanisotropyV = vec2( 1.0, 0.0 );\n\t} else {\n\t\tanisotropyV /= material.anisotropy;\n\t\tmaterial.anisotropy = saturate( material.anisotropy );\n\t}\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y;\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\tfloat dispersion;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecularDirect = vec3( 0.0 );\nvec3 clearcoatSpecularIndirect = vec3( 0.0 );\nvec3 sheenSpecularDirect = vec3( 0.0 );\nvec3 sheenSpecularIndirect = vec3(0.0 );\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n    float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n    float x2 = x * x;\n    float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n    return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.roughness;\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometryNormal;\n\t\tvec3 viewDir = geometryViewDir;\n\t\tvec3 position = geometryPosition;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3(    0, 1,    0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometryNormal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material );\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nvec3 geometryPosition = - vViewPosition;\nvec3 geometryNormal = normal;\nvec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\nvec3 geometryClearcoatNormal = vec3( 0.0 );\n#ifdef USE_CLEARCOAT\n\tgeometryClearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometryViewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometryPosition, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometryPosition, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\t#if defined( USE_LIGHT_PROBES )\n\t\tirradiance += getLightProbeIrradiance( lightProbe, geometryNormal );\n\t#endif\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometryNormal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness );\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tgl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\tvFragDepth = 1.0 + gl_Position.w;\n\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vMapUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphinstance_vertex:"#ifdef USE_INSTANCING_MORPH\n\tfloat morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\tfloat morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tmorphTargetInfluences[i] =  texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r;\n\t}\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\t#ifndef USE_INSTANCING_MORPH\n\t\tuniform float morphTargetBaseInfluence;\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t#endif\n\tuniform sampler2DArray morphTargetsTexture;\n\tuniform ivec2 morphTargetsTextureSize;\n\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t}\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t}\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 nonPerturbedNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = nonPerturbedNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.;\nconst float Inv255 = 1. / 255.;\nconst vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 );\nconst vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g );\nconst vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b );\nconst vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a );\nvec4 packDepthToRGBA( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec4( 0., 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec4( 1., 1., 1., 1. );\n\tfloat vuf;\n\tfloat af = modf( v * PackFactors.a, vuf );\n\tfloat bf = modf( vuf * ShiftRight8, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af );\n}\nvec3 packDepthToRGB( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec3( 0., 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec3( 1., 1., 1. );\n\tfloat vuf;\n\tfloat bf = modf( v * PackFactors.b, vuf );\n\tfloat gf = modf( vuf * ShiftRight8, vuf );\n\treturn vec3( vuf * Inv255, gf * PackUpscale, bf );\n}\nvec2 packDepthToRG( const in float v ) {\n\tif( v <= 0.0 )\n\t\treturn vec2( 0., 0. );\n\tif( v >= 1.0 )\n\t\treturn vec2( 1., 1. );\n\tfloat vuf;\n\tfloat gf = modf( v * 256., vuf );\n\treturn vec2( vuf * Inv255, gf );\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors4 );\n}\nfloat unpackRGBToDepth( const in vec3 v ) {\n\treturn dot( v, UnpackFactors3 );\n}\nfloat unpackRGToDepth( const in vec2 v ) {\n\treturn v.r * UnpackFactors2.r + v.g * UnpackFactors2.g;\n}\nvec4 pack2HalfToRGBA( const in vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( const in vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn depth * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_BATCHING\n\tmvPosition = batchingMatrix * mvPosition;\n#endif\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t  f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tfloat shadow = 1.0;\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\t\n\t\tfloat lightToPositionLength = length( lightToPosition );\n\t\tif ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) {\n\t\t\tfloat dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\t\tdp += shadowBias;\n\t\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\t\tshadow = (\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t\t) * ( 1.0 / 9.0 );\n\t\t\t#else\n\t\t\t\tshadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t\t#endif\n\t\t}\n\t\treturn mix( 1.0, shadow, shadowIntensity );\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowIntensity;\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tint size = textureSize( boneTexture, 0 ).x;\n\t\tint j = int( i ) * 4;\n\t\tint x = j % size;\n\t\tint y = j / size;\n\t\tvec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 );\n\t\tvec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 );\n\t\tvec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 );\n\t\tvec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 );\n\t\treturn mat4( v1, v2, v3, v4 );\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vSpecularMapUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn saturate( toneMappingExposure * color );\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 CineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3(  1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108,  1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605,  1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nconst mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3(\n\tvec3( 1.6605, - 0.1246, - 0.0182 ),\n\tvec3( - 0.5876, 1.1329, - 0.1006 ),\n\tvec3( - 0.0728, - 0.0083, 1.1187 )\n);\nconst mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3(\n\tvec3( 0.6274, 0.0691, 0.0164 ),\n\tvec3( 0.3293, 0.9195, 0.0880 ),\n\tvec3( 0.0433, 0.0113, 0.8956 )\n);\nvec3 agxDefaultContrastApprox( vec3 x ) {\n\tvec3 x2 = x * x;\n\tvec3 x4 = x2 * x2;\n\treturn + 15.5 * x4 * x2\n\t\t- 40.14 * x4 * x\n\t\t+ 31.96 * x4\n\t\t- 6.868 * x2 * x\n\t\t+ 0.4298 * x2\n\t\t+ 0.1191 * x\n\t\t- 0.00232;\n}\nvec3 AgXToneMapping( vec3 color ) {\n\tconst mat3 AgXInsetMatrix = mat3(\n\t\tvec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ),\n\t\tvec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ),\n\t\tvec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 )\n\t);\n\tconst mat3 AgXOutsetMatrix = mat3(\n\t\tvec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ),\n\t\tvec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ),\n\t\tvec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 )\n\t);\n\tconst float AgxMinEv = - 12.47393;\tconst float AgxMaxEv = 4.026069;\n\tcolor *= toneMappingExposure;\n\tcolor = LINEAR_SRGB_TO_LINEAR_REC2020 * color;\n\tcolor = AgXInsetMatrix * color;\n\tcolor = max( color, 1e-10 );\tcolor = log2( color );\n\tcolor = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv );\n\tcolor = clamp( color, 0.0, 1.0 );\n\tcolor = agxDefaultContrastApprox( color );\n\tcolor = AgXOutsetMatrix * color;\n\tcolor = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) );\n\tcolor = LINEAR_REC2020_TO_LINEAR_SRGB * color;\n\tcolor = clamp( color, 0.0, 1.0 );\n\treturn color;\n}\nvec3 NeutralToneMapping( vec3 color ) {\n\tconst float StartCompression = 0.8 - 0.04;\n\tconst float Desaturation = 0.15;\n\tcolor *= toneMappingExposure;\n\tfloat x = min( color.r, min( color.g, color.b ) );\n\tfloat offset = x < 0.08 ? x - 6.25 * x * x : 0.04;\n\tcolor -= offset;\n\tfloat peak = max( color.r, max( color.g, color.b ) );\n\tif ( peak < StartCompression ) return color;\n\tfloat d = 1. - StartCompression;\n\tfloat newPeak = 1. - d * d / ( peak + d - StartCompression );\n\tcolor *= newPeak / peak;\n\tfloat g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. );\n\treturn mix( color, vec3( newPeak ), g );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a *  a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec4 transmittedLight;\n\t\tvec3 transmittance;\n\t\t#ifdef USE_DISPERSION\n\t\t\tfloat halfSpread = ( ior - 1.0 ) * 0.025 * dispersion;\n\t\t\tvec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread );\n\t\t\tfor ( int i = 0; i < 3; i ++ ) {\n\t\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix );\n\t\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\n\t\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\t\trefractionCoords += 1.0;\n\t\t\t\trefractionCoords /= 2.0;\n\t\t\n\t\t\t\tvec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] );\n\t\t\t\ttransmittedLight[ i ] = transmissionSample[ i ];\n\t\t\t\ttransmittedLight.a += transmissionSample.a;\n\t\t\t\ttransmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ];\n\t\t\t}\n\t\t\ttransmittedLight.a /= 3.0;\n\t\t\n\t\t#else\n\t\t\n\t\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\t\trefractionCoords += 1.0;\n\t\t\trefractionCoords /= 2.0;\n\t\t\ttransmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\t\ttransmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\t\n\t\t#endif\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_BATCHING\n\t\tworldPosition = batchingMatrix * worldPosition;\n\t#endif\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nuniform mat3 backgroundRotation;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",depth_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#elif DEPTH_PACKING == 3202\n\t\tgl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 );\n\t#elif DEPTH_PACKING == 3203\n\t\tgl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <skinbase_vertex>\n\t#include <morphinstance_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <clipping_planes_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vLightMapUv );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity );\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define USE_SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_DISPERSION\n\tuniform float dispersion;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat;\n\t#endif\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <batching_pars_vertex>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\n\t#include <color_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <batching_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <batching_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphinstance_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix[ 3 ];\n\tvec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"},F_={common:{diffuse:{value:new Iy(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Bg},alphaMap:{value:null},alphaMapTransform:{value:new Bg},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Bg}},envmap:{envMap:{value:null},envMapRotation:{value:new Bg},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Bg}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Bg}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Bg},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Bg},normalScale:{value:new Ug(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Bg},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Bg}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Bg}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Bg}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Iy(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Iy(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Bg},alphaTest:{value:0},uvTransform:{value:new Bg}},sprite:{diffuse:{value:new Iy(16777215)},opacity:{value:1},center:{value:new Ug(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Bg},alphaMap:{value:null},alphaMapTransform:{value:new Bg},alphaTest:{value:0}}},k_={basic:{uniforms:p_([F_.common,F_.specularmap,F_.envmap,F_.aomap,F_.lightmap,F_.fog]),vertexShader:N_.meshbasic_vert,fragmentShader:N_.meshbasic_frag},lambert:{uniforms:p_([F_.common,F_.specularmap,F_.envmap,F_.aomap,F_.lightmap,F_.emissivemap,F_.bumpmap,F_.normalmap,F_.displacementmap,F_.fog,F_.lights,{emissive:{value:new Iy(0)}}]),vertexShader:N_.meshlambert_vert,fragmentShader:N_.meshlambert_frag},phong:{uniforms:p_([F_.common,F_.specularmap,F_.envmap,F_.aomap,F_.lightmap,F_.emissivemap,F_.bumpmap,F_.normalmap,F_.displacementmap,F_.fog,F_.lights,{emissive:{value:new Iy(0)},specular:{value:new Iy(1118481)},shininess:{value:30}}]),vertexShader:N_.meshphong_vert,fragmentShader:N_.meshphong_frag},standard:{uniforms:p_([F_.common,F_.envmap,F_.aomap,F_.lightmap,F_.emissivemap,F_.bumpmap,F_.normalmap,F_.displacementmap,F_.roughnessmap,F_.metalnessmap,F_.fog,F_.lights,{emissive:{value:new Iy(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:N_.meshphysical_vert,fragmentShader:N_.meshphysical_frag},toon:{uniforms:p_([F_.common,F_.aomap,F_.lightmap,F_.emissivemap,F_.bumpmap,F_.normalmap,F_.displacementmap,F_.gradientmap,F_.fog,F_.lights,{emissive:{value:new Iy(0)}}]),vertexShader:N_.meshtoon_vert,fragmentShader:N_.meshtoon_frag},matcap:{uniforms:p_([F_.common,F_.bumpmap,F_.normalmap,F_.displacementmap,F_.fog,{matcap:{value:null}}]),vertexShader:N_.meshmatcap_vert,fragmentShader:N_.meshmatcap_frag},points:{uniforms:p_([F_.points,F_.fog]),vertexShader:N_.points_vert,fragmentShader:N_.points_frag},dashed:{uniforms:p_([F_.common,F_.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:N_.linedashed_vert,fragmentShader:N_.linedashed_frag},depth:{uniforms:p_([F_.common,F_.displacementmap]),vertexShader:N_.depth_vert,fragmentShader:N_.depth_frag},normal:{uniforms:p_([F_.common,F_.bumpmap,F_.normalmap,F_.displacementmap,{opacity:{value:1}}]),vertexShader:N_.meshnormal_vert,fragmentShader:N_.meshnormal_frag},sprite:{uniforms:p_([F_.sprite,F_.fog]),vertexShader:N_.sprite_vert,fragmentShader:N_.sprite_frag},background:{uniforms:{uvTransform:{value:new Bg},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:N_.background_vert,fragmentShader:N_.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new Bg}},vertexShader:N_.backgroundCube_vert,fragmentShader:N_.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:N_.cube_vert,fragmentShader:N_.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:N_.equirect_vert,fragmentShader:N_.equirect_frag},distanceRGBA:{uniforms:p_([F_.common,F_.displacementmap,{referencePosition:{value:new hv},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:N_.distanceRGBA_vert,fragmentShader:N_.distanceRGBA_frag},shadow:{uniforms:p_([F_.lights,F_.fog,{color:{value:new Iy(0)},opacity:{value:1}}]),vertexShader:N_.shadow_vert,fragmentShader:N_.shadow_frag}};k_.physical={uniforms:p_([k_.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Bg},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Bg},clearcoatNormalScale:{value:new Ug(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Bg},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Bg},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Bg},sheen:{value:0},sheenColor:{value:new Iy(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Bg},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Bg},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Bg},transmissionSamplerSize:{value:new Ug},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Bg},attenuationDistance:{value:0},attenuationColor:{value:new Iy(0)},specularColor:{value:new Iy(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Bg},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Bg},anisotropyVector:{value:new Ug},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Bg}}]),vertexShader:N_.meshphysical_vert,fragmentShader:N_.meshphysical_frag};const U_={r:0,b:0,g:0},B_=new Zv,G_=new zv;function z_(t,e,n,r,i,o,s){const a=new Iy(0);let l,u,c=!0===o?0:1,h=null,d=0,p=null;function f(t){let r=!0===t.isScene?t.background:null;if(r&&r.isTexture){r=(t.backgroundBlurriness>0?n:e).get(r)}return r}function m(e,n){e.getRGB(U_,f_(t)),r.buffers.color.setClear(U_.r,U_.g,U_.b,n,s)}return{getClearColor:function(){return a},setClearColor:function(t,e=1){a.set(t),c=e,m(a,c)},getClearAlpha:function(){return c},setClearAlpha:function(t){c=t,m(a,c)},render:function(e){let n=!1;const i=f(e);null===i?m(a,c):i&&i.isColor&&(m(i,1),n=!0);const o=t.xr.getEnvironmentBlendMode();"additive"===o?r.buffers.color.setClear(0,0,0,1,s):"alpha-blend"===o&&r.buffers.color.setClear(0,0,0,0,s),(t.autoClear||n)&&(r.buffers.depth.setTest(!0),r.buffers.depth.setMask(!0),r.buffers.color.setMask(!0),t.clear(t.autoClearColor,t.autoClearDepth,t.autoClearStencil))},addToRenderList:function(e,n){const r=f(n);r&&(r.isCubeTexture||306===r.mapping)?(void 0===u&&(u=new u_(new h_(1,1,1),new g_({name:"BackgroundCubeMaterial",uniforms:d_(k_.backgroundCube.uniforms),vertexShader:k_.backgroundCube.vertexShader,fragmentShader:k_.backgroundCube.fragmentShader,side:1,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(t,e,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),B_.copy(n.backgroundRotation),B_.x*=-1,B_.y*=-1,B_.z*=-1,r.isCubeTexture&&!1===r.isRenderTargetTexture&&(B_.y*=-1,B_.z*=-1),u.material.uniforms.envMap.value=r,u.material.uniforms.flipEnvMap.value=r.isCubeTexture&&!1===r.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=n.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,u.material.uniforms.backgroundRotation.value.setFromMatrix4(G_.makeRotationFromEuler(B_)),u.material.toneMapped="srgb"!==Kg.getTransfer(r.colorSpace),h===r&&d===r.version&&p===t.toneMapping||(u.material.needsUpdate=!0,h=r,d=r.version,p=t.toneMapping),u.layers.enableAll(),e.unshift(u,u.geometry,u.material,0,0,null)):r&&r.isTexture&&(void 0===l&&(l=new u_(new L_(2,2),new g_({name:"BackgroundMaterial",uniforms:d_(k_.background.uniforms),vertexShader:k_.background.vertexShader,fragmentShader:k_.background.fragmentShader,side:0,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=r,l.material.uniforms.backgroundIntensity.value=n.backgroundIntensity,l.material.toneMapped="srgb"!==Kg.getTransfer(r.colorSpace),!0===r.matrixAutoUpdate&&r.updateMatrix(),l.material.uniforms.uvTransform.value.copy(r.matrix),h===r&&d===r.version&&p===t.toneMapping||(l.material.needsUpdate=!0,h=r,d=r.version,p=t.toneMapping),l.layers.enableAll(),e.unshift(l,l.geometry,l.material,0,0,null))}}}function H_(t,e){const n=t.getParameter(t.MAX_VERTEX_ATTRIBS),r={},i=u(null);let o=i,s=!1;function a(e){return t.bindVertexArray(e)}function l(e){return t.deleteVertexArray(e)}function u(t){const e=[],r=[],i=[];for(let t=0;t<n;t++)e[t]=0,r[t]=0,i[t]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:e,enabledAttributes:r,attributeDivisors:i,object:t,attributes:{},index:null}}function c(){const t=o.newAttributes;for(let e=0,n=t.length;e<n;e++)t[e]=0}function h(t){d(t,0)}function d(e,n){const r=o.newAttributes,i=o.enabledAttributes,s=o.attributeDivisors;r[e]=1,0===i[e]&&(t.enableVertexAttribArray(e),i[e]=1),s[e]!==n&&(t.vertexAttribDivisor(e,n),s[e]=n)}function p(){const e=o.newAttributes,n=o.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==e[r]&&(t.disableVertexAttribArray(r),n[r]=0)}function f(e,n,r,i,o,s,a){!0===a?t.vertexAttribIPointer(e,n,r,o,s):t.vertexAttribPointer(e,n,r,i,o,s)}function m(){g(),s=!0,o!==i&&(o=i,a(o.object))}function g(){i.geometry=null,i.program=null,i.wireframe=!1}return{setup:function(n,i,l,m,g){let v=!1;const y=function(e,n,i){const o=!0===i.wireframe;let s=r[e.id];void 0===s&&(s={},r[e.id]=s);let a=s[n.id];void 0===a&&(a={},s[n.id]=a);let l=a[o];void 0===l&&(l=u(t.createVertexArray()),a[o]=l);return l}(m,l,i);o!==y&&(o=y,a(o.object)),v=function(t,e,n,r){const i=o.attributes,s=e.attributes;let a=0;const l=n.getAttributes();for(const e in l){if(l[e].location>=0){const n=i[e];let r=s[e];if(void 0===r&&("instanceMatrix"===e&&t.instanceMatrix&&(r=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(r=t.instanceColor)),void 0===n)return!0;if(n.attribute!==r)return!0;if(r&&n.data!==r.data)return!0;a++}}return o.attributesNum!==a||o.index!==r}(n,m,l,g),v&&function(t,e,n,r){const i={},s=e.attributes;let a=0;const l=n.getAttributes();for(const e in l){if(l[e].location>=0){let n=s[e];void 0===n&&("instanceMatrix"===e&&t.instanceMatrix&&(n=t.instanceMatrix),"instanceColor"===e&&t.instanceColor&&(n=t.instanceColor));const r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[e]=r,a++}}o.attributes=i,o.attributesNum=a,o.index=r}(n,m,l,g),null!==g&&e.update(g,t.ELEMENT_ARRAY_BUFFER),(v||s)&&(s=!1,function(n,r,i,o){c();const s=o.attributes,a=i.getAttributes(),l=r.defaultAttributeValues;for(const r in a){const i=a[r];if(i.location>=0){let a=s[r];if(void 0===a&&("instanceMatrix"===r&&n.instanceMatrix&&(a=n.instanceMatrix),"instanceColor"===r&&n.instanceColor&&(a=n.instanceColor)),void 0!==a){const r=a.normalized,s=a.itemSize,l=e.get(a);if(void 0===l)continue;const u=l.buffer,c=l.type,p=l.bytesPerElement,m=c===t.INT||c===t.UNSIGNED_INT||1013===a.gpuType;if(a.isInterleavedBufferAttribute){const e=a.data,l=e.stride,g=a.offset;if(e.isInstancedInterleavedBuffer){for(let t=0;t<i.locationSize;t++)d(i.location+t,e.meshPerAttribute);!0!==n.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=e.meshPerAttribute*e.count)}else for(let t=0;t<i.locationSize;t++)h(i.location+t);t.bindBuffer(t.ARRAY_BUFFER,u);for(let t=0;t<i.locationSize;t++)f(i.location+t,s/i.locationSize,c,r,l*p,(g+s/i.locationSize*t)*p,m)}else{if(a.isInstancedBufferAttribute){for(let t=0;t<i.locationSize;t++)d(i.location+t,a.meshPerAttribute);!0!==n.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=a.meshPerAttribute*a.count)}else for(let t=0;t<i.locationSize;t++)h(i.location+t);t.bindBuffer(t.ARRAY_BUFFER,u);for(let t=0;t<i.locationSize;t++)f(i.location+t,s/i.locationSize,c,r,s*p,s/i.locationSize*t*p,m)}}else if(void 0!==l){const e=l[r];if(void 0!==e)switch(e.length){case 2:t.vertexAttrib2fv(i.location,e);break;case 3:t.vertexAttrib3fv(i.location,e);break;case 4:t.vertexAttrib4fv(i.location,e);break;default:t.vertexAttrib1fv(i.location,e)}}}}p()}(n,i,l,m),null!==g&&t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e.get(g).buffer))},reset:m,resetDefaultState:g,dispose:function(){m();for(const t in r){const e=r[t];for(const t in e){const n=e[t];for(const t in n)l(n[t].object),delete n[t];delete e[t]}delete r[t]}},releaseStatesOfGeometry:function(t){if(void 0===r[t.id])return;const e=r[t.id];for(const t in e){const n=e[t];for(const t in n)l(n[t].object),delete n[t];delete e[t]}delete r[t.id]},releaseStatesOfProgram:function(t){for(const e in r){const n=r[e];if(void 0===n[t.id])continue;const i=n[t.id];for(const t in i)l(i[t].object),delete i[t];delete n[t.id]}},initAttributes:c,enableAttribute:h,disableUnusedAttributes:p}}function j_(t,e,n){let r;function i(e,i,o){0!==o&&(t.drawArraysInstanced(r,e,i,o),n.update(i,r,o))}this.setMode=function(t){r=t},this.render=function(e,i){t.drawArrays(r,e,i),n.update(i,r,1)},this.renderInstances=i,this.renderMultiDraw=function(t,i,o){if(0===o)return;e.get("WEBGL_multi_draw").multiDrawArraysWEBGL(r,t,0,i,0,o);let s=0;for(let t=0;t<o;t++)s+=i[t];n.update(s,r,1)},this.renderMultiDrawInstances=function(t,o,s,a){if(0===s)return;const l=e.get("WEBGL_multi_draw");if(null===l)for(let e=0;e<t.length;e++)i(t[e],o[e],a[e]);else{l.multiDrawArraysInstancedWEBGL(r,t,0,o,0,a,0,s);let e=0;for(let t=0;t<s;t++)e+=o[t];for(let t=0;t<a.length;t++)n.update(e,r,a[t])}}}function V_(t,e,n,r){let i;function o(e){if("highp"===e){if(t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.HIGH_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.HIGH_FLOAT).precision>0)return"highp";e="mediump"}return"mediump"===e&&t.getShaderPrecisionFormat(t.VERTEX_SHADER,t.MEDIUM_FLOAT).precision>0&&t.getShaderPrecisionFormat(t.FRAGMENT_SHADER,t.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let s=void 0!==n.precision?n.precision:"highp";const a=o(s);a!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",a,"instead."),s=a);const l=!0===n.logarithmicDepthBuffer,u=!0===n.reverseDepthBuffer&&e.has("EXT_clip_control");if(!0===u){const t=e.get("EXT_clip_control");t.clipControlEXT(t.LOWER_LEFT_EXT,t.ZERO_TO_ONE_EXT)}const c=t.getParameter(t.MAX_TEXTURE_IMAGE_UNITS),h=t.getParameter(t.MAX_VERTEX_TEXTURE_IMAGE_UNITS);return{isWebGL2:!0,getMaxAnisotropy:function(){if(void 0!==i)return i;if(!0===e.has("EXT_texture_filter_anisotropic")){const n=e.get("EXT_texture_filter_anisotropic");i=t.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else i=0;return i},getMaxPrecision:o,textureFormatReadable:function(e){return 1023===e||r.convert(e)===t.getParameter(t.IMPLEMENTATION_COLOR_READ_FORMAT)},textureTypeReadable:function(n){const i=1016===n&&(e.has("EXT_color_buffer_half_float")||e.has("EXT_color_buffer_float"));return!(1009!==n&&r.convert(n)!==t.getParameter(t.IMPLEMENTATION_COLOR_READ_TYPE)&&1015!==n&&!i)},precision:s,logarithmicDepthBuffer:l,reverseDepthBuffer:u,maxTextures:c,maxVertexTextures:h,maxTextureSize:t.getParameter(t.MAX_TEXTURE_SIZE),maxCubemapSize:t.getParameter(t.MAX_CUBE_MAP_TEXTURE_SIZE),maxAttributes:t.getParameter(t.MAX_VERTEX_ATTRIBS),maxVertexUniforms:t.getParameter(t.MAX_VERTEX_UNIFORM_VECTORS),maxVaryings:t.getParameter(t.MAX_VARYING_VECTORS),maxFragmentUniforms:t.getParameter(t.MAX_FRAGMENT_UNIFORM_VECTORS),vertexTextures:h>0,maxSamples:t.getParameter(t.MAX_SAMPLES)}}function X_(t){const e=this;let n=null,r=0,i=!1,o=!1;const s=new D_,a=new Bg,l={value:null,needsUpdate:!1};function u(t,n,r,i){const o=null!==t?t.length:0;let u=null;if(0!==o){if(u=l.value,!0!==i||null===u){const e=r+4*o,i=n.matrixWorldInverse;a.getNormalMatrix(i),(null===u||u.length<e)&&(u=new Float32Array(e));for(let e=0,n=r;e!==o;++e,n+=4)s.copy(t[e]).applyMatrix4(i,a),s.normal.toArray(u,n),u[n+3]=s.constant}l.value=u,l.needsUpdate=!0}return e.numPlanes=o,e.numIntersection=0,u}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(t,e){const n=0!==t.length||e||0!==r||i;return i=e,r=t.length,n},this.beginShadows=function(){o=!0,u(null)},this.endShadows=function(){o=!1},this.setGlobalState=function(t,e){n=u(t,e,0)},this.setState=function(s,a,c){const h=s.clippingPlanes,d=s.clipIntersection,p=s.clipShadows,f=t.get(s);if(!i||null===h||0===h.length||o&&!p)o?u(null):function(){l.value!==n&&(l.value=n,l.needsUpdate=r>0);e.numPlanes=r,e.numIntersection=0}();else{const t=o?0:r,e=4*t;let i=f.clippingState||null;l.value=i,i=u(h,a,e,c);for(let t=0;t!==e;++t)i[t]=n[t];f.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=t}}}function W_(t){let e=new WeakMap;function n(t,e){return 303===e?t.mapping=301:304===e&&(t.mapping=302),t}function r(t){const n=t.target;n.removeEventListener("dispose",r);const i=e.get(n);void 0!==i&&(e.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping;if(303===o||304===o){if(e.has(i)){return n(e.get(i).texture,i.mapping)}{const o=i.image;if(o&&o.height>0){const s=new T_(o.height);return s.fromEquirectangularTexture(t,i),e.set(i,s),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){e=new WeakMap}}}class Y_ extends v_{constructor(t=-1,e=1,n=1,r=-1,i=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=i,this.far=o,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=null===t.view?null:Object.assign({},t.view),this}setViewOffset(t,e,n,r,i,o){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-t,o=n+t,s=r+e,a=r-e;if(null!==this.view&&this.view.enabled){const t=(this.right-this.left)/this.view.fullWidth/this.zoom,e=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=t*this.view.offsetX,o=i+t*this.view.width,s-=e*this.view.offsetY,a=s-e*this.view.height}this.projectionMatrix.makeOrthographic(i,o,s,a,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){const e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,null!==this.view&&(e.object.view=Object.assign({},this.view)),e}}const q_=[.125,.215,.35,.446,.526,.582],$_=new Y_,K_=new Iy;let Z_=null,J_=0,Q_=0,tb=!1;const eb=(1+Math.sqrt(5))/2,nb=1/eb,rb=[new hv(-eb,nb,0),new hv(eb,nb,0),new hv(-nb,0,eb),new hv(nb,0,eb),new hv(0,eb,-nb),new hv(0,eb,nb),new hv(-1,1,-1),new hv(1,1,-1),new hv(-1,1,1),new hv(1,1,1)];class ib{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,r=100){Z_=this._renderer.getRenderTarget(),J_=this._renderer.getActiveCubeFace(),Q_=this._renderer.getActiveMipmapLevel(),tb=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(t,n,r,i),e>0&&this._blur(i,0,0,e),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(t,e=null){return this._fromTexture(t,e)}fromCubemap(t,e=null){return this._fromTexture(t,e)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=lb(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=ab(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(t){this._lodMax=Math.floor(Math.log2(t)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let t=0;t<this._lodPlanes.length;t++)this._lodPlanes[t].dispose()}_cleanup(t){this._renderer.setRenderTarget(Z_,J_,Q_),this._renderer.xr.enabled=tb,t.scissorTest=!1,sb(t,0,0,t.width,t.height)}_fromTexture(t,e){301===t.mapping||302===t.mapping?this._setSize(0===t.image.length?16:t.image[0].width||t.image[0].image.width):this._setSize(t.image.width/4),Z_=this._renderer.getRenderTarget(),J_=this._renderer.getActiveCubeFace(),Q_=this._renderer.getActiveMipmapLevel(),tb=this._renderer.xr.enabled,this._renderer.xr.enabled=!1;const n=e||this._allocateTargets();return this._textureToCubeUV(t,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const t=3*Math.max(this._cubeSize,112),e=4*this._cubeSize,n={magFilter:1006,minFilter:1006,generateMipmaps:!1,type:1016,format:1023,colorSpace:"srgb-linear",depthBuffer:!1},r=ob(t,e,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==t||this._pingPongRenderTarget.height!==e){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=ob(t,e,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(t){const e=[],n=[],r=[];let i=t;const o=t-4+1+q_.length;for(let s=0;s<o;s++){const o=Math.pow(2,i);n.push(o);let a=1/o;s>t-4?a=q_[s-t+4-1]:0===s&&(a=0),r.push(a);const l=1/(o-2),u=-l,c=1+l,h=[u,u,c,u,c,c,u,u,c,c,u,c],d=6,p=6,f=3,m=2,g=1,v=new Float32Array(f*p*d),y=new Float32Array(m*p*d),_=new Float32Array(g*p*d);for(let t=0;t<d;t++){const e=t%3*2/3-1,n=t>2?0:-1,r=[e,n,0,e+2/3,n,0,e+2/3,n+1,0,e,n,0,e+2/3,n+1,0,e,n+1,0];v.set(r,f*p*t),y.set(h,m*p*t);const i=[t,t,t,t,t,t];_.set(i,g*p*t)}const b=new Zy;b.setAttribute("position",new Gy(v,f)),b.setAttribute("uv",new Gy(y,m)),b.setAttribute("faceIndex",new Gy(_,g)),e.push(b),i>4&&i--}return{lodPlanes:e,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(t,e,n){const r=new Float32Array(20),i=new hv(0,1,0);return new g_({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:t+".0"},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:ub(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}(r,t,e)}return r}_compileMaterial(t){const e=new u_(this._lodPlanes[0],t);this._renderer.compile(e,$_)}_sceneToCubeUV(t,e,n,r){const i=new x_(90,1,e,n),o=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],a=this._renderer,l=a.autoClear,u=a.toneMapping;a.getClearColor(K_),a.toneMapping=0,a.autoClear=!1;const c=new ky({name:"PMREM.Background",side:1,depthWrite:!1,depthTest:!1}),h=new u_(new h_,c);let d=!1;const p=t.background;p?p.isColor&&(c.color.copy(p),t.background=null,d=!0):(c.color.copy(K_),d=!0);for(let e=0;e<6;e++){const n=e%3;0===n?(i.up.set(0,o[e],0),i.lookAt(s[e],0,0)):1===n?(i.up.set(0,0,o[e]),i.lookAt(0,s[e],0)):(i.up.set(0,o[e],0),i.lookAt(0,0,s[e]));const l=this._cubeSize;sb(r,n*l,e>2?l:0,l,l),a.setRenderTarget(r),d&&a.render(h,i),a.render(t,i)}h.geometry.dispose(),h.material.dispose(),a.toneMapping=u,a.autoClear=l,t.background=p}_textureToCubeUV(t,e){const n=this._renderer,r=301===t.mapping||302===t.mapping;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=lb()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===t.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=ab());const i=r?this._cubemapMaterial:this._equirectMaterial,o=new u_(this._lodPlanes[0],i);i.uniforms.envMap.value=t;const s=this._cubeSize;sb(e,0,0,3*s,2*s),n.setRenderTarget(e),n.render(o,$_)}_applyPMREM(t){const e=this._renderer,n=e.autoClear;e.autoClear=!1;const r=this._lodPlanes.length;for(let e=1;e<r;e++){const n=Math.sqrt(this._sigmas[e]*this._sigmas[e]-this._sigmas[e-1]*this._sigmas[e-1]),i=rb[(r-e-1)%rb.length];this._blur(t,e-1,e,n,i)}e.autoClear=n}_blur(t,e,n,r,i){const o=this._pingPongRenderTarget;this._halfBlur(t,o,e,n,r,"latitudinal",i),this._halfBlur(o,t,n,n,r,"longitudinal",i)}_halfBlur(t,e,n,r,i,o,s){const a=this._renderer,l=this._blurMaterial;"latitudinal"!==o&&"longitudinal"!==o&&console.error("blur direction must be either latitudinal or longitudinal!");const u=new u_(this._lodPlanes[r],l),c=l.uniforms,h=this._sizeLods[n]-1,d=isFinite(i)?Math.PI/(2*h):2*Math.PI/39,p=i/d,f=isFinite(i)?1+Math.floor(3*p):20;f>20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let t=0;t<20;++t){const e=t/p,n=Math.exp(-e*e/2);m.push(n),0===t?g+=n:t<f&&(g+=2*n)}for(let t=0;t<m.length;t++)m[t]=m[t]/g;c.envMap.value=t.texture,c.samples.value=f,c.weights.value=m,c.latitudinal.value="latitudinal"===o,s&&(c.poleAxis.value=s);const{_lodMax:v}=this;c.dTheta.value=d,c.mipInt.value=v-n;const y=this._sizeLods[r];sb(e,3*y*(r>v-4?r-v+4:0),4*(this._cubeSize-y),3*y,2*y),a.setRenderTarget(e),a.render(u,$_)}}function ob(t,e,n){const r=new av(t,e,n);return r.texture.mapping=306,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function sb(t,e,n,r,i){t.viewport.set(e,n,r,i),t.scissor.set(e,n,r,i)}function ab(){return new g_({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:ub(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function lb(){return new g_({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:ub(),fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:0,depthTest:!1,depthWrite:!1})}function ub(){return"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t"}function cb(t){let e=new WeakMap,n=null;function r(t){const n=t.target;n.removeEventListener("dispose",r);const i=e.get(n);void 0!==i&&(e.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const o=i.mapping,s=303===o||304===o,a=301===o||302===o;if(s||a){let o=e.get(i);const l=void 0!==o?o.texture.pmremVersion:0;if(i.isRenderTargetTexture&&i.pmremVersion!==l)return null===n&&(n=new ib(t)),o=s?n.fromEquirectangular(i,o):n.fromCubemap(i,o),o.texture.pmremVersion=i.pmremVersion,e.set(i,o),o.texture;if(void 0!==o)return o.texture;{const l=i.image;return s&&l&&l.height>0||a&&l&&function(t){let e=0;for(let n=0;n<6;n++)void 0!==t[n]&&e++;return 6===e}(l)?(null===n&&(n=new ib(t)),o=s?n.fromEquirectangular(i):n.fromCubemap(i),o.texture.pmremVersion=i.pmremVersion,e.set(i,o),i.addEventListener("dispose",r),o.texture):null}}}return i},dispose:function(){e=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function hb(t){const e={};function n(n){if(void 0!==e[n])return e[n];let r;switch(n){case"WEBGL_depth_texture":r=t.getExtension("WEBGL_depth_texture")||t.getExtension("MOZ_WEBGL_depth_texture")||t.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=t.getExtension("EXT_texture_filter_anisotropic")||t.getExtension("MOZ_EXT_texture_filter_anisotropic")||t.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=t.getExtension("WEBGL_compressed_texture_s3tc")||t.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=t.getExtension("WEBGL_compressed_texture_pvrtc")||t.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=t.getExtension(n)}return e[n]=r,r}return{has:function(t){return null!==n(t)},init:function(){n("EXT_color_buffer_float"),n("WEBGL_clip_cull_distance"),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture"),n("WEBGL_render_shared_exponent")},get:function(t){const e=n(t);return null===e&&Xg("THREE.WebGLRenderer: "+t+" extension not supported."),e}}}function db(t,e,n,r){const i={},o=new WeakMap;function s(t){const a=t.target;null!==a.index&&e.remove(a.index);for(const t in a.attributes)e.remove(a.attributes[t]);for(const t in a.morphAttributes){const n=a.morphAttributes[t];for(let t=0,r=n.length;t<r;t++)e.remove(n[t])}a.removeEventListener("dispose",s),delete i[a.id];const l=o.get(a);l&&(e.remove(l),o.delete(a)),r.releaseStatesOfGeometry(a),!0===a.isInstancedBufferGeometry&&delete a._maxInstanceCount,n.memory.geometries--}function a(t){const n=[],r=t.index,i=t.attributes.position;let s=0;if(null!==r){const t=r.array;s=r.version;for(let e=0,r=t.length;e<r;e+=3){const r=t[e+0],i=t[e+1],o=t[e+2];n.push(r,i,i,o,o,r)}}else{if(void 0===i)return;{const t=i.array;s=i.version;for(let e=0,r=t.length/3-1;e<r;e+=3){const t=e+0,r=e+1,i=e+2;n.push(t,r,r,i,i,t)}}}const a=new(zg(n)?Hy:zy)(n,1);a.version=s;const l=o.get(t);l&&e.remove(l),o.set(t,a)}return{get:function(t,e){return!0===i[e.id]||(e.addEventListener("dispose",s),i[e.id]=!0,n.memory.geometries++),e},update:function(n){const r=n.attributes;for(const n in r)e.update(r[n],t.ARRAY_BUFFER);const i=n.morphAttributes;for(const n in i){const r=i[n];for(let n=0,i=r.length;n<i;n++)e.update(r[n],t.ARRAY_BUFFER)}},getWireframeAttribute:function(t){const e=o.get(t);if(e){const n=t.index;null!==n&&e.version<n.version&&a(t)}else a(t);return o.get(t)}}}function pb(t,e,n){let r,i,o;function s(e,s,a){0!==a&&(t.drawElementsInstanced(r,s,i,e*o,a),n.update(s,r,a))}this.setMode=function(t){r=t},this.setIndex=function(t){i=t.type,o=t.bytesPerElement},this.render=function(e,s){t.drawElements(r,s,i,e*o),n.update(s,r,1)},this.renderInstances=s,this.renderMultiDraw=function(t,o,s){if(0===s)return;e.get("WEBGL_multi_draw").multiDrawElementsWEBGL(r,o,0,i,t,0,s);let a=0;for(let t=0;t<s;t++)a+=o[t];n.update(a,r,1)},this.renderMultiDrawInstances=function(t,a,l,u){if(0===l)return;const c=e.get("WEBGL_multi_draw");if(null===c)for(let e=0;e<t.length;e++)s(t[e]/o,a[e],u[e]);else{c.multiDrawElementsInstancedWEBGL(r,a,0,i,t,0,u,0,l);let e=0;for(let t=0;t<l;t++)e+=a[t];for(let t=0;t<u.length;t++)n.update(e,r,u[t])}}}function fb(t){const e={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:e,programs:null,autoReset:!0,reset:function(){e.calls=0,e.triangles=0,e.points=0,e.lines=0},update:function(n,r,i){switch(e.calls++,r){case t.TRIANGLES:e.triangles+=i*(n/3);break;case t.LINES:e.lines+=i*(n/2);break;case t.LINE_STRIP:e.lines+=i*(n-1);break;case t.LINE_LOOP:e.lines+=i*n;break;case t.POINTS:e.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}function mb(t,e,n){const r=new WeakMap,i=new ov;return{update:function(o,s,a){const l=o.morphTargetInfluences,u=s.morphAttributes.position||s.morphAttributes.normal||s.morphAttributes.color,c=void 0!==u?u.length:0;let h=r.get(s);if(void 0===h||h.count!==c){void 0!==h&&h.texture.dispose();const t=void 0!==s.morphAttributes.position,n=void 0!==s.morphAttributes.normal,o=void 0!==s.morphAttributes.color,a=s.morphAttributes.position||[],l=s.morphAttributes.normal||[],u=s.morphAttributes.color||[];let d=0;!0===t&&(d=1),!0===n&&(d=2),!0===o&&(d=3);let p=s.attributes.position.count*d,f=1;p>e.maxTextureSize&&(f=Math.ceil(p/e.maxTextureSize),p=e.maxTextureSize);const m=new Float32Array(p*f*4*c),g=new lv(m,p,f,c);g.type=1015,g.needsUpdate=!0;const v=4*d;for(let e=0;e<c;e++){const r=a[e],s=l[e],c=u[e],h=p*f*4*e;for(let e=0;e<r.count;e++){const a=e*v;!0===t&&(i.fromBufferAttribute(r,e),m[h+a+0]=i.x,m[h+a+1]=i.y,m[h+a+2]=i.z,m[h+a+3]=0),!0===n&&(i.fromBufferAttribute(s,e),m[h+a+4]=i.x,m[h+a+5]=i.y,m[h+a+6]=i.z,m[h+a+7]=0),!0===o&&(i.fromBufferAttribute(c,e),m[h+a+8]=i.x,m[h+a+9]=i.y,m[h+a+10]=i.z,m[h+a+11]=4===c.itemSize?i.w:1)}}h={count:c,texture:g,size:new Ug(p,f)},r.set(s,h),s.addEventListener("dispose",(function t(){g.dispose(),r.delete(s),s.removeEventListener("dispose",t)}))}if(!0===o.isInstancedMesh&&null!==o.morphTexture)a.getUniforms().setValue(t,"morphTexture",o.morphTexture,n);else{let e=0;for(let t=0;t<l.length;t++)e+=l[t];const n=s.morphTargetsRelative?1:1-e;a.getUniforms().setValue(t,"morphTargetBaseInfluence",n),a.getUniforms().setValue(t,"morphTargetInfluences",l)}a.getUniforms().setValue(t,"morphTargetsTexture",h.texture,n),a.getUniforms().setValue(t,"morphTargetsTextureSize",h.size)}}}function gb(t,e,n,r){let i=new WeakMap;function o(t){const e=t.target;e.removeEventListener("dispose",o),n.remove(e.instanceMatrix),null!==e.instanceColor&&n.remove(e.instanceColor)}return{update:function(s){const a=r.render.frame,l=s.geometry,u=e.get(s,l);if(i.get(u)!==a&&(e.update(u),i.set(u,a)),s.isInstancedMesh&&(!1===s.hasEventListener("dispose",o)&&s.addEventListener("dispose",o),i.get(s)!==a&&(n.update(s.instanceMatrix,t.ARRAY_BUFFER),null!==s.instanceColor&&n.update(s.instanceColor,t.ARRAY_BUFFER),i.set(s,a))),s.isSkinnedMesh){const t=s.skeleton;i.get(t)!==a&&(t.update(),i.set(t,a))}return u},dispose:function(){i=new WeakMap}}}class vb extends iv{constructor(t,e,n,r,i,o,s,a,l,u=1026){if(1026!==u&&1027!==u)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&1026===u&&(n=1014),void 0===n&&1027===u&&(n=1020),super(null,r,i,o,s,a,u,n,l),this.isDepthTexture=!0,this.image={width:t,height:e},this.magFilter=void 0!==s?s:1003,this.minFilter=void 0!==a?a:1003,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(t){return super.copy(t),this.compareFunction=t.compareFunction,this}toJSON(t){const e=super.toJSON(t);return null!==this.compareFunction&&(e.compareFunction=this.compareFunction),e}}const yb=new iv,_b=new vb(1,1),bb=new lv,xb=new uv,wb=new E_,Eb=[],Tb=[],Sb=new Float32Array(16),Ab=new Float32Array(9),Mb=new Float32Array(4);function Db(t,e,n){const r=t[0];if(r<=0||r>0)return t;const i=e*n;let o=Eb[i];if(void 0===o&&(o=new Float32Array(i),Eb[i]=o),0!==e){r.toArray(o,0);for(let r=1,i=0;r!==e;++r)i+=n,t[r].toArray(o,i)}return o}function Cb(t,e){if(t.length!==e.length)return!1;for(let n=0,r=t.length;n<r;n++)if(t[n]!==e[n])return!1;return!0}function Rb(t,e){for(let n=0,r=e.length;n<r;n++)t[n]=e[n]}function Ob(t,e){let n=Tb[e];void 0===n&&(n=new Int32Array(e),Tb[e]=n);for(let r=0;r!==e;++r)n[r]=t.allocateTextureUnit();return n}function Pb(t,e){const n=this.cache;n[0]!==e&&(t.uniform1f(this.addr,e),n[0]=e)}function Ib(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2f(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Cb(n,e))return;t.uniform2fv(this.addr,e),Rb(n,e)}}function Lb(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3f(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else if(void 0!==e.r)n[0]===e.r&&n[1]===e.g&&n[2]===e.b||(t.uniform3f(this.addr,e.r,e.g,e.b),n[0]=e.r,n[1]=e.g,n[2]=e.b);else{if(Cb(n,e))return;t.uniform3fv(this.addr,e),Rb(n,e)}}function Nb(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4f(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Cb(n,e))return;t.uniform4fv(this.addr,e),Rb(n,e)}}function Fb(t,e){const n=this.cache,r=e.elements;if(void 0===r){if(Cb(n,e))return;t.uniformMatrix2fv(this.addr,!1,e),Rb(n,e)}else{if(Cb(n,r))return;Mb.set(r),t.uniformMatrix2fv(this.addr,!1,Mb),Rb(n,r)}}function kb(t,e){const n=this.cache,r=e.elements;if(void 0===r){if(Cb(n,e))return;t.uniformMatrix3fv(this.addr,!1,e),Rb(n,e)}else{if(Cb(n,r))return;Ab.set(r),t.uniformMatrix3fv(this.addr,!1,Ab),Rb(n,r)}}function Ub(t,e){const n=this.cache,r=e.elements;if(void 0===r){if(Cb(n,e))return;t.uniformMatrix4fv(this.addr,!1,e),Rb(n,e)}else{if(Cb(n,r))return;Sb.set(r),t.uniformMatrix4fv(this.addr,!1,Sb),Rb(n,r)}}function Bb(t,e){const n=this.cache;n[0]!==e&&(t.uniform1i(this.addr,e),n[0]=e)}function Gb(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2i(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Cb(n,e))return;t.uniform2iv(this.addr,e),Rb(n,e)}}function zb(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3i(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Cb(n,e))return;t.uniform3iv(this.addr,e),Rb(n,e)}}function Hb(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4i(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Cb(n,e))return;t.uniform4iv(this.addr,e),Rb(n,e)}}function jb(t,e){const n=this.cache;n[0]!==e&&(t.uniform1ui(this.addr,e),n[0]=e)}function Vb(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y||(t.uniform2ui(this.addr,e.x,e.y),n[0]=e.x,n[1]=e.y);else{if(Cb(n,e))return;t.uniform2uiv(this.addr,e),Rb(n,e)}}function Xb(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z||(t.uniform3ui(this.addr,e.x,e.y,e.z),n[0]=e.x,n[1]=e.y,n[2]=e.z);else{if(Cb(n,e))return;t.uniform3uiv(this.addr,e),Rb(n,e)}}function Wb(t,e){const n=this.cache;if(void 0!==e.x)n[0]===e.x&&n[1]===e.y&&n[2]===e.z&&n[3]===e.w||(t.uniform4ui(this.addr,e.x,e.y,e.z,e.w),n[0]=e.x,n[1]=e.y,n[2]=e.z,n[3]=e.w);else{if(Cb(n,e))return;t.uniform4uiv(this.addr,e),Rb(n,e)}}function Yb(t,e,n){const r=this.cache,i=n.allocateTextureUnit();let o;r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),this.type===t.SAMPLER_2D_SHADOW?(_b.compareFunction=515,o=_b):o=yb,n.setTexture2D(e||o,i)}function qb(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(e||xb,i)}function $b(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(e||wb,i)}function Kb(t,e,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(t.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(e||bb,i)}function Zb(t,e){t.uniform1fv(this.addr,e)}function Jb(t,e){const n=Db(e,this.size,2);t.uniform2fv(this.addr,n)}function Qb(t,e){const n=Db(e,this.size,3);t.uniform3fv(this.addr,n)}function tx(t,e){const n=Db(e,this.size,4);t.uniform4fv(this.addr,n)}function ex(t,e){const n=Db(e,this.size,4);t.uniformMatrix2fv(this.addr,!1,n)}function nx(t,e){const n=Db(e,this.size,9);t.uniformMatrix3fv(this.addr,!1,n)}function rx(t,e){const n=Db(e,this.size,16);t.uniformMatrix4fv(this.addr,!1,n)}function ix(t,e){t.uniform1iv(this.addr,e)}function ox(t,e){t.uniform2iv(this.addr,e)}function sx(t,e){t.uniform3iv(this.addr,e)}function ax(t,e){t.uniform4iv(this.addr,e)}function lx(t,e){t.uniform1uiv(this.addr,e)}function ux(t,e){t.uniform2uiv(this.addr,e)}function cx(t,e){t.uniform3uiv(this.addr,e)}function hx(t,e){t.uniform4uiv(this.addr,e)}function dx(t,e,n){const r=this.cache,i=e.length,o=Ob(n,i);Cb(r,o)||(t.uniform1iv(this.addr,o),Rb(r,o));for(let t=0;t!==i;++t)n.setTexture2D(e[t]||yb,o[t])}function px(t,e,n){const r=this.cache,i=e.length,o=Ob(n,i);Cb(r,o)||(t.uniform1iv(this.addr,o),Rb(r,o));for(let t=0;t!==i;++t)n.setTexture3D(e[t]||xb,o[t])}function fx(t,e,n){const r=this.cache,i=e.length,o=Ob(n,i);Cb(r,o)||(t.uniform1iv(this.addr,o),Rb(r,o));for(let t=0;t!==i;++t)n.setTextureCube(e[t]||wb,o[t])}function mx(t,e,n){const r=this.cache,i=e.length,o=Ob(n,i);Cb(r,o)||(t.uniform1iv(this.addr,o),Rb(r,o));for(let t=0;t!==i;++t)n.setTexture2DArray(e[t]||bb,o[t])}class gx{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.type=e.type,this.setValue=function(t){switch(t){case 5126:return Pb;case 35664:return Ib;case 35665:return Lb;case 35666:return Nb;case 35674:return Fb;case 35675:return kb;case 35676:return Ub;case 5124:case 35670:return Bb;case 35667:case 35671:return Gb;case 35668:case 35672:return zb;case 35669:case 35673:return Hb;case 5125:return jb;case 36294:return Vb;case 36295:return Xb;case 36296:return Wb;case 35678:case 36198:case 36298:case 36306:case 35682:return Yb;case 35679:case 36299:case 36307:return qb;case 35680:case 36300:case 36308:case 36293:return $b;case 36289:case 36303:case 36311:case 36292:return Kb}}(e.type)}}class vx{constructor(t,e,n){this.id=t,this.addr=n,this.cache=[],this.type=e.type,this.size=e.size,this.setValue=function(t){switch(t){case 5126:return Zb;case 35664:return Jb;case 35665:return Qb;case 35666:return tx;case 35674:return ex;case 35675:return nx;case 35676:return rx;case 5124:case 35670:return ix;case 35667:case 35671:return ox;case 35668:case 35672:return sx;case 35669:case 35673:return ax;case 5125:return lx;case 36294:return ux;case 36295:return cx;case 36296:return hx;case 35678:case 36198:case 36298:case 36306:case 35682:return dx;case 35679:case 36299:case 36307:return px;case 35680:case 36300:case 36308:case 36293:return fx;case 36289:case 36303:case 36311:case 36292:return mx}}(e.type)}}class yx{constructor(t){this.id=t,this.seq=[],this.map={}}setValue(t,e,n){const r=this.seq;for(let i=0,o=r.length;i!==o;++i){const o=r[i];o.setValue(t,e[o.id],n)}}}const _x=/(\w+)(\])?(\[|\.)?/g;function bx(t,e){t.seq.push(e),t.map[e.id]=e}function xx(t,e,n){const r=t.name,i=r.length;for(_x.lastIndex=0;;){const o=_x.exec(r),s=_x.lastIndex;let a=o[1];const l="]"===o[2],u=o[3];if(l&&(a|=0),void 0===u||"["===u&&s+2===i){bx(n,void 0===u?new gx(a,t,e):new vx(a,t,e));break}{let t=n.map[a];void 0===t&&(t=new yx(a),bx(n,t)),n=t}}}class wx{constructor(t,e){this.seq=[],this.map={};const n=t.getProgramParameter(e,t.ACTIVE_UNIFORMS);for(let r=0;r<n;++r){const n=t.getActiveUniform(e,r);xx(n,t.getUniformLocation(e,n.name),this)}}setValue(t,e,n,r){const i=this.map[e];void 0!==i&&i.setValue(t,n,r)}setOptional(t,e,n){const r=e[n];void 0!==r&&this.setValue(t,n,r)}static upload(t,e,n,r){for(let i=0,o=e.length;i!==o;++i){const o=e[i],s=n[o.id];!1!==s.needsUpdate&&o.setValue(t,s.value,r)}}static seqWithValue(t,e){const n=[];for(let r=0,i=t.length;r!==i;++r){const i=t[r];i.id in e&&n.push(i)}return n}}function Ex(t,e,n){const r=t.createShader(e);return t.shaderSource(r,n),t.compileShader(r),r}let Tx=0;function Sx(t,e,n){const r=t.getShaderParameter(e,t.COMPILE_STATUS),i=t.getShaderInfoLog(e).trim();if(r&&""===i)return"";const o=/ERROR: 0:(\d+)/.exec(i);if(o){const r=parseInt(o[1]);return n.toUpperCase()+"\n\n"+i+"\n\n"+function(t,e){const n=t.split("\n"),r=[],i=Math.max(e-6,0),o=Math.min(e+6,n.length);for(let t=i;t<o;t++){const i=t+1;r.push(`${i===e?">":" "} ${i}: ${n[t]}`)}return r.join("\n")}(t.getShaderSource(e),r)}return i}function Ax(t,e){const n=function(t){const e=Kg.getPrimaries(Kg.workingColorSpace),n=Kg.getPrimaries(t);let r;switch(e===n?r="":"p3"===e&&"rec709"===n?r="LinearDisplayP3ToLinearSRGB":"rec709"===e&&"p3"===n&&(r="LinearSRGBToLinearDisplayP3"),t){case"srgb-linear":case"display-p3-linear":return[r,"LinearTransferOETF"];case"srgb":case"display-p3":return[r,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",t),[r,"LinearTransferOETF"]}}(e);return`vec4 ${t}( vec4 value ) { return ${n[0]}( ${n[1]}( value ) ); }`}function Mx(t,e){let n;switch(e){case 1:n="Linear";break;case 2:n="Reinhard";break;case 3:n="Cineon";break;case 4:n="ACESFilmic";break;case 6:n="AgX";break;case 7:n="Neutral";break;case 5:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),n="Linear"}return"vec3 "+t+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}const Dx=new hv;function Cx(){Kg.getLuminanceCoefficients(Dx);return["float luminance( const in vec3 rgb ) {",`\tconst vec3 weights = vec3( ${Dx.x.toFixed(4)}, ${Dx.y.toFixed(4)}, ${Dx.z.toFixed(4)} );`,"\treturn dot( weights, rgb );","}"].join("\n")}function Rx(t){return""!==t}function Ox(t,e){const n=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return t.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function Px(t,e){return t.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const Ix=/^[ \t]*#include +<([\w\d./]+)>/gm;function Lx(t){return t.replace(Ix,Fx)}const Nx=new Map;function Fx(t,e){let n=N_[e];if(void 0===n){const t=Nx.get(e);if(void 0===t)throw new Error("Can not resolve #include <"+e+">");n=N_[t],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,t)}return Lx(n)}const kx=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ux(t){return t.replace(kx,Bx)}function Bx(t,e,n,r){let i="";for(let t=parseInt(e);t<parseInt(n);t++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+t+" ]").replace(/UNROLLED_LOOP_INDEX/g,t);return i}function Gx(t){let e=`precision ${t.precision} float;\n\tprecision ${t.precision} int;\n\tprecision ${t.precision} sampler2D;\n\tprecision ${t.precision} samplerCube;\n\tprecision ${t.precision} sampler3D;\n\tprecision ${t.precision} sampler2DArray;\n\tprecision ${t.precision} sampler2DShadow;\n\tprecision ${t.precision} samplerCubeShadow;\n\tprecision ${t.precision} sampler2DArrayShadow;\n\tprecision ${t.precision} isampler2D;\n\tprecision ${t.precision} isampler3D;\n\tprecision ${t.precision} isamplerCube;\n\tprecision ${t.precision} isampler2DArray;\n\tprecision ${t.precision} usampler2D;\n\tprecision ${t.precision} usampler3D;\n\tprecision ${t.precision} usamplerCube;\n\tprecision ${t.precision} usampler2DArray;\n\t`;return"highp"===t.precision?e+="\n#define HIGH_PRECISION":"mediump"===t.precision?e+="\n#define MEDIUM_PRECISION":"lowp"===t.precision&&(e+="\n#define LOW_PRECISION"),e}function zx(t,e,n,r){const i=t.getContext(),o=n.defines;let s=n.vertexShader,a=n.fragmentShader;const l=function(t){let e="SHADOWMAP_TYPE_BASIC";return 1===t.shadowMapType?e="SHADOWMAP_TYPE_PCF":2===t.shadowMapType?e="SHADOWMAP_TYPE_PCF_SOFT":3===t.shadowMapType&&(e="SHADOWMAP_TYPE_VSM"),e}(n),u=function(t){let e="ENVMAP_TYPE_CUBE";if(t.envMap)switch(t.envMapMode){case 301:case 302:e="ENVMAP_TYPE_CUBE";break;case 306:e="ENVMAP_TYPE_CUBE_UV"}return e}(n),c=function(t){let e="ENVMAP_MODE_REFLECTION";if(t.envMap)switch(t.envMapMode){case 302:e="ENVMAP_MODE_REFRACTION"}return e}(n),h=function(t){let e="ENVMAP_BLENDING_NONE";if(t.envMap)switch(t.combine){case 0:e="ENVMAP_BLENDING_MULTIPLY";break;case 1:e="ENVMAP_BLENDING_MIX";break;case 2:e="ENVMAP_BLENDING_ADD"}return e}(n),d=function(t){const e=t.envMapCubeUVHeight;if(null===e)return null;const n=Math.log2(e)-2,r=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:r,maxMip:n}}(n),p=function(t){return[t.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",t.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(Rx).join("\n")}(n),f=function(t){const e=[];for(const n in t){const r=t[n];!1!==r&&e.push("#define "+n+" "+r)}return e.join("\n")}(o),m=i.createProgram();let g,v,y=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(g=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,f].filter(Rx).join("\n"),g.length>0&&(g+="\n"),v=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,f].filter(Rx).join("\n"),v.length>0&&(v+="\n")):(g=[Gx(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,f,n.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",n.batching?"#define USE_BATCHING":"",n.batchingColor?"#define USE_BATCHING_COLOR":"",n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.instancingMorph?"#define USE_INSTANCING_MORPH":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH","\tuniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(Rx).join("\n"),v=[Gx(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,f,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+c:"",n.envMap?"#define "+h:"",d?"#define CUBEUV_TEXEL_WIDTH "+d.texelWidth:"",d?"#define CUBEUV_TEXEL_HEIGHT "+d.texelHeight:"",d?"#define CUBEUV_MAX_MIP "+d.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.dispersion?"#define USE_DISPERSION":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor||n.batchingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.numLightProbes>0?"#define USE_LIGHT_PROBES":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",0!==n.toneMapping?"#define TONE_MAPPING":"",0!==n.toneMapping?N_.tonemapping_pars_fragment:"",0!==n.toneMapping?Mx("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",N_.colorspace_pars_fragment,Ax("linearToOutputTexel",n.outputColorSpace),Cx(),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(Rx).join("\n")),s=Lx(s),s=Ox(s,n),s=Px(s,n),a=Lx(a),a=Ox(a,n),a=Px(a,n),s=Ux(s),a=Ux(a),!0!==n.isRawShaderMaterial&&(y="#version 300 es\n",g=[p,"#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+g,v=["#define varying in","300 es"===n.glslVersion?"":"layout(location = 0) out highp vec4 pc_fragColor;","300 es"===n.glslVersion?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+v);const _=y+g+s,b=y+v+a,x=Ex(i,i.VERTEX_SHADER,_),w=Ex(i,i.FRAGMENT_SHADER,b);function E(e){if(t.debug.checkShaderErrors){const n=i.getProgramInfoLog(m).trim(),r=i.getShaderInfoLog(x).trim(),o=i.getShaderInfoLog(w).trim();let s=!0,a=!0;if(!1===i.getProgramParameter(m,i.LINK_STATUS))if(s=!1,"function"==typeof t.debug.onShaderError)t.debug.onShaderError(i,m,x,w);else{const t=Sx(i,x,"vertex"),r=Sx(i,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(m,i.VALIDATE_STATUS)+"\n\nMaterial Name: "+e.name+"\nMaterial Type: "+e.type+"\n\nProgram Info Log: "+n+"\n"+t+"\n"+r)}else""!==n?console.warn("THREE.WebGLProgram: Program Info Log:",n):""!==r&&""!==o||(a=!1);a&&(e.diagnostics={runnable:s,programLog:n,vertexShader:{log:r,prefix:g},fragmentShader:{log:o,prefix:v}})}i.deleteShader(x),i.deleteShader(w),T=new wx(i,m),S=function(t,e){const n={},r=t.getProgramParameter(e,t.ACTIVE_ATTRIBUTES);for(let i=0;i<r;i++){const r=t.getActiveAttrib(e,i),o=r.name;let s=1;r.type===t.FLOAT_MAT2&&(s=2),r.type===t.FLOAT_MAT3&&(s=3),r.type===t.FLOAT_MAT4&&(s=4),n[o]={type:r.type,location:t.getAttribLocation(e,o),locationSize:s}}return n}(i,m)}let T,S;i.attachShader(m,x),i.attachShader(m,w),void 0!==n.index0AttributeName?i.bindAttribLocation(m,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(m,0,"position"),i.linkProgram(m),this.getUniforms=function(){return void 0===T&&E(this),T},this.getAttributes=function(){return void 0===S&&E(this),S};let A=!1===n.rendererExtensionParallelShaderCompile;return this.isReady=function(){return!1===A&&(A=i.getProgramParameter(m,37297)),A},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(m),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=Tx++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=x,this.fragmentShader=w,this}let Hx=0;class jx{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(t){const e=t.vertexShader,n=t.fragmentShader,r=this._getShaderStage(e),i=this._getShaderStage(n),o=this._getShaderCacheForMaterial(t);return!1===o.has(r)&&(o.add(r),r.usedTimes++),!1===o.has(i)&&(o.add(i),i.usedTimes++),this}remove(t){const e=this.materialCache.get(t);for(const t of e)t.usedTimes--,0===t.usedTimes&&this.shaderCache.delete(t.code);return this.materialCache.delete(t),this}getVertexShaderID(t){return this._getShaderStage(t.vertexShader).id}getFragmentShaderID(t){return this._getShaderStage(t.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(t){const e=this.materialCache;let n=e.get(t);return void 0===n&&(n=new Set,e.set(t,n)),n}_getShaderStage(t){const e=this.shaderCache;let n=e.get(t);return void 0===n&&(n=new Vx(t),e.set(t,n)),n}}class Vx{constructor(t){this.id=Hx++,this.code=t,this.usedTimes=0}}function Xx(t,e,n,r,i,o,s){const a=new Jv,l=new jx,u=new Set,c=[],h=i.logarithmicDepthBuffer,d=i.reverseDepthBuffer,p=i.vertexTextures;let f=i.precision;const m={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function g(t){return u.add(t),0===t?"uv":"uv"+t}return{getParameters:function(o,a,c,v,y){const _=v.fog,b=y.geometry,x=o.isMeshStandardMaterial?v.environment:null,w=(o.isMeshStandardMaterial?n:e).get(o.envMap||x),E=w&&306===w.mapping?w.image.height:null,T=m[o.type];null!==o.precision&&(f=i.getMaxPrecision(o.precision),f!==o.precision&&console.warn("THREE.WebGLProgram.getParameters:",o.precision,"not supported, using",f,"instead."));const S=b.morphAttributes.position||b.morphAttributes.normal||b.morphAttributes.color,A=void 0!==S?S.length:0;let M,D,C,R,O=0;if(void 0!==b.morphAttributes.position&&(O=1),void 0!==b.morphAttributes.normal&&(O=2),void 0!==b.morphAttributes.color&&(O=3),T){const t=k_[T];M=t.vertexShader,D=t.fragmentShader}else M=o.vertexShader,D=o.fragmentShader,l.update(o),C=l.getVertexShaderID(o),R=l.getFragmentShaderID(o);const P=t.getRenderTarget(),I=!0===y.isInstancedMesh,L=!0===y.isBatchedMesh,N=!!o.map,F=!!o.matcap,k=!!w,U=!!o.aoMap,B=!!o.lightMap,G=!!o.bumpMap,z=!!o.normalMap,H=!!o.displacementMap,j=!!o.emissiveMap,V=!!o.metalnessMap,X=!!o.roughnessMap,W=o.anisotropy>0,Y=o.clearcoat>0,q=o.dispersion>0,$=o.iridescence>0,K=o.sheen>0,Z=o.transmission>0,J=W&&!!o.anisotropyMap,Q=Y&&!!o.clearcoatMap,tt=Y&&!!o.clearcoatNormalMap,et=Y&&!!o.clearcoatRoughnessMap,nt=$&&!!o.iridescenceMap,rt=$&&!!o.iridescenceThicknessMap,it=K&&!!o.sheenColorMap,ot=K&&!!o.sheenRoughnessMap,st=!!o.specularMap,at=!!o.specularColorMap,lt=!!o.specularIntensityMap,ut=Z&&!!o.transmissionMap,ct=Z&&!!o.thicknessMap,ht=!!o.gradientMap,dt=!!o.alphaMap,pt=o.alphaTest>0,ft=!!o.alphaHash,mt=!!o.extensions;let gt=0;o.toneMapped&&(null!==P&&!0!==P.isXRRenderTarget||(gt=t.toneMapping));const vt={shaderID:T,shaderType:o.type,shaderName:o.name,vertexShader:M,fragmentShader:D,defines:o.defines,customVertexShaderID:C,customFragmentShaderID:R,isRawShaderMaterial:!0===o.isRawShaderMaterial,glslVersion:o.glslVersion,precision:f,batching:L,batchingColor:L&&null!==y._colorsTexture,instancing:I,instancingColor:I&&null!==y.instanceColor,instancingMorph:I&&null!==y.morphTexture,supportsVertexTextures:p,outputColorSpace:null===P?t.outputColorSpace:!0===P.isXRRenderTarget?P.texture.colorSpace:"srgb-linear",alphaToCoverage:!!o.alphaToCoverage,map:N,matcap:F,envMap:k,envMapMode:k&&w.mapping,envMapCubeUVHeight:E,aoMap:U,lightMap:B,bumpMap:G,normalMap:z,displacementMap:p&&H,emissiveMap:j,normalMapObjectSpace:z&&1===o.normalMapType,normalMapTangentSpace:z&&0===o.normalMapType,metalnessMap:V,roughnessMap:X,anisotropy:W,anisotropyMap:J,clearcoat:Y,clearcoatMap:Q,clearcoatNormalMap:tt,clearcoatRoughnessMap:et,dispersion:q,iridescence:$,iridescenceMap:nt,iridescenceThicknessMap:rt,sheen:K,sheenColorMap:it,sheenRoughnessMap:ot,specularMap:st,specularColorMap:at,specularIntensityMap:lt,transmission:Z,transmissionMap:ut,thicknessMap:ct,gradientMap:ht,opaque:!1===o.transparent&&1===o.blending&&!1===o.alphaToCoverage,alphaMap:dt,alphaTest:pt,alphaHash:ft,combine:o.combine,mapUv:N&&g(o.map.channel),aoMapUv:U&&g(o.aoMap.channel),lightMapUv:B&&g(o.lightMap.channel),bumpMapUv:G&&g(o.bumpMap.channel),normalMapUv:z&&g(o.normalMap.channel),displacementMapUv:H&&g(o.displacementMap.channel),emissiveMapUv:j&&g(o.emissiveMap.channel),metalnessMapUv:V&&g(o.metalnessMap.channel),roughnessMapUv:X&&g(o.roughnessMap.channel),anisotropyMapUv:J&&g(o.anisotropyMap.channel),clearcoatMapUv:Q&&g(o.clearcoatMap.channel),clearcoatNormalMapUv:tt&&g(o.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:et&&g(o.clearcoatRoughnessMap.channel),iridescenceMapUv:nt&&g(o.iridescenceMap.channel),iridescenceThicknessMapUv:rt&&g(o.iridescenceThicknessMap.channel),sheenColorMapUv:it&&g(o.sheenColorMap.channel),sheenRoughnessMapUv:ot&&g(o.sheenRoughnessMap.channel),specularMapUv:st&&g(o.specularMap.channel),specularColorMapUv:at&&g(o.specularColorMap.channel),specularIntensityMapUv:lt&&g(o.specularIntensityMap.channel),transmissionMapUv:ut&&g(o.transmissionMap.channel),thicknessMapUv:ct&&g(o.thicknessMap.channel),alphaMapUv:dt&&g(o.alphaMap.channel),vertexTangents:!!b.attributes.tangent&&(z||W),vertexColors:o.vertexColors,vertexAlphas:!0===o.vertexColors&&!!b.attributes.color&&4===b.attributes.color.itemSize,pointsUvs:!0===y.isPoints&&!!b.attributes.uv&&(N||dt),fog:!!_,useFog:!0===o.fog,fogExp2:!!_&&_.isFogExp2,flatShading:!0===o.flatShading,sizeAttenuation:!0===o.sizeAttenuation,logarithmicDepthBuffer:h,reverseDepthBuffer:d,skinning:!0===y.isSkinnedMesh,morphTargets:void 0!==b.morphAttributes.position,morphNormals:void 0!==b.morphAttributes.normal,morphColors:void 0!==b.morphAttributes.color,morphTargetsCount:A,morphTextureStride:O,numDirLights:a.directional.length,numPointLights:a.point.length,numSpotLights:a.spot.length,numSpotLightMaps:a.spotLightMap.length,numRectAreaLights:a.rectArea.length,numHemiLights:a.hemi.length,numDirLightShadows:a.directionalShadowMap.length,numPointLightShadows:a.pointShadowMap.length,numSpotLightShadows:a.spotShadowMap.length,numSpotLightShadowsWithMaps:a.numSpotLightShadowsWithMaps,numLightProbes:a.numLightProbes,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:o.dithering,shadowMapEnabled:t.shadowMap.enabled&&c.length>0,shadowMapType:t.shadowMap.type,toneMapping:gt,decodeVideoTexture:N&&!0===o.map.isVideoTexture&&"srgb"===Kg.getTransfer(o.map.colorSpace),premultipliedAlpha:o.premultipliedAlpha,doubleSided:2===o.side,flipSided:1===o.side,useDepthPacking:o.depthPacking>=0,depthPacking:o.depthPacking||0,index0AttributeName:o.index0AttributeName,extensionClipCullDistance:mt&&!0===o.extensions.clipCullDistance&&r.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(mt&&!0===o.extensions.multiDraw||L)&&r.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:r.has("KHR_parallel_shader_compile"),customProgramCacheKey:o.customProgramCacheKey()};return vt.vertexUv1s=u.has(1),vt.vertexUv2s=u.has(2),vt.vertexUv3s=u.has(3),u.clear(),vt},getProgramCacheKey:function(e){const n=[];if(e.shaderID?n.push(e.shaderID):(n.push(e.customVertexShaderID),n.push(e.customFragmentShaderID)),void 0!==e.defines)for(const t in e.defines)n.push(t),n.push(e.defines[t]);return!1===e.isRawShaderMaterial&&(!function(t,e){t.push(e.precision),t.push(e.outputColorSpace),t.push(e.envMapMode),t.push(e.envMapCubeUVHeight),t.push(e.mapUv),t.push(e.alphaMapUv),t.push(e.lightMapUv),t.push(e.aoMapUv),t.push(e.bumpMapUv),t.push(e.normalMapUv),t.push(e.displacementMapUv),t.push(e.emissiveMapUv),t.push(e.metalnessMapUv),t.push(e.roughnessMapUv),t.push(e.anisotropyMapUv),t.push(e.clearcoatMapUv),t.push(e.clearcoatNormalMapUv),t.push(e.clearcoatRoughnessMapUv),t.push(e.iridescenceMapUv),t.push(e.iridescenceThicknessMapUv),t.push(e.sheenColorMapUv),t.push(e.sheenRoughnessMapUv),t.push(e.specularMapUv),t.push(e.specularColorMapUv),t.push(e.specularIntensityMapUv),t.push(e.transmissionMapUv),t.push(e.thicknessMapUv),t.push(e.combine),t.push(e.fogExp2),t.push(e.sizeAttenuation),t.push(e.morphTargetsCount),t.push(e.morphAttributeCount),t.push(e.numDirLights),t.push(e.numPointLights),t.push(e.numSpotLights),t.push(e.numSpotLightMaps),t.push(e.numHemiLights),t.push(e.numRectAreaLights),t.push(e.numDirLightShadows),t.push(e.numPointLightShadows),t.push(e.numSpotLightShadows),t.push(e.numSpotLightShadowsWithMaps),t.push(e.numLightProbes),t.push(e.shadowMapType),t.push(e.toneMapping),t.push(e.numClippingPlanes),t.push(e.numClipIntersection),t.push(e.depthPacking)}(n,e),function(t,e){a.disableAll(),e.supportsVertexTextures&&a.enable(0);e.instancing&&a.enable(1);e.instancingColor&&a.enable(2);e.instancingMorph&&a.enable(3);e.matcap&&a.enable(4);e.envMap&&a.enable(5);e.normalMapObjectSpace&&a.enable(6);e.normalMapTangentSpace&&a.enable(7);e.clearcoat&&a.enable(8);e.iridescence&&a.enable(9);e.alphaTest&&a.enable(10);e.vertexColors&&a.enable(11);e.vertexAlphas&&a.enable(12);e.vertexUv1s&&a.enable(13);e.vertexUv2s&&a.enable(14);e.vertexUv3s&&a.enable(15);e.vertexTangents&&a.enable(16);e.anisotropy&&a.enable(17);e.alphaHash&&a.enable(18);e.batching&&a.enable(19);e.dispersion&&a.enable(20);e.batchingColor&&a.enable(21);t.push(a.mask),a.disableAll(),e.fog&&a.enable(0);e.useFog&&a.enable(1);e.flatShading&&a.enable(2);e.logarithmicDepthBuffer&&a.enable(3);e.reverseDepthBuffer&&a.enable(4);e.skinning&&a.enable(5);e.morphTargets&&a.enable(6);e.morphNormals&&a.enable(7);e.morphColors&&a.enable(8);e.premultipliedAlpha&&a.enable(9);e.shadowMapEnabled&&a.enable(10);e.doubleSided&&a.enable(11);e.flipSided&&a.enable(12);e.useDepthPacking&&a.enable(13);e.dithering&&a.enable(14);e.transmission&&a.enable(15);e.sheen&&a.enable(16);e.opaque&&a.enable(17);e.pointsUvs&&a.enable(18);e.decodeVideoTexture&&a.enable(19);e.alphaToCoverage&&a.enable(20);t.push(a.mask)}(n,e),n.push(t.outputColorSpace)),n.push(e.customProgramCacheKey),n.join()},getUniforms:function(t){const e=m[t.type];let n;if(e){const t=k_[e];n=m_.clone(t.uniforms)}else n=t.uniforms;return n},acquireProgram:function(e,n){let r;for(let t=0,e=c.length;t<e;t++){const e=c[t];if(e.cacheKey===n){r=e,++r.usedTimes;break}}return void 0===r&&(r=new zx(t,n,e,o),c.push(r)),r},releaseProgram:function(t){if(0==--t.usedTimes){const e=c.indexOf(t);c[e]=c[c.length-1],c.pop(),t.destroy()}},releaseShaderCache:function(t){l.remove(t)},programs:c,dispose:function(){l.dispose()}}}function Wx(){let t=new WeakMap;return{has:function(e){return t.has(e)},get:function(e){let n=t.get(e);return void 0===n&&(n={},t.set(e,n)),n},remove:function(e){t.delete(e)},update:function(e,n,r){t.get(e)[n]=r},dispose:function(){t=new WeakMap}}}function Yx(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.material.id!==e.material.id?t.material.id-e.material.id:t.z!==e.z?t.z-e.z:t.id-e.id}function qx(t,e){return t.groupOrder!==e.groupOrder?t.groupOrder-e.groupOrder:t.renderOrder!==e.renderOrder?t.renderOrder-e.renderOrder:t.z!==e.z?e.z-t.z:t.id-e.id}function $x(){const t=[];let e=0;const n=[],r=[],i=[];function o(n,r,i,o,s,a){let l=t[e];return void 0===l?(l={id:n.id,object:n,geometry:r,material:i,groupOrder:o,renderOrder:n.renderOrder,z:s,group:a},t[e]=l):(l.id=n.id,l.object=n,l.geometry=r,l.material=i,l.groupOrder=o,l.renderOrder=n.renderOrder,l.z=s,l.group=a),e++,l}return{opaque:n,transmissive:r,transparent:i,init:function(){e=0,n.length=0,r.length=0,i.length=0},push:function(t,e,s,a,l,u){const c=o(t,e,s,a,l,u);s.transmission>0?r.push(c):!0===s.transparent?i.push(c):n.push(c)},unshift:function(t,e,s,a,l,u){const c=o(t,e,s,a,l,u);s.transmission>0?r.unshift(c):!0===s.transparent?i.unshift(c):n.unshift(c)},finish:function(){for(let n=e,r=t.length;n<r;n++){const e=t[n];if(null===e.id)break;e.id=null,e.object=null,e.geometry=null,e.material=null,e.group=null}},sort:function(t,e){n.length>1&&n.sort(t||Yx),r.length>1&&r.sort(e||qx),i.length>1&&i.sort(e||qx)}}}function Kx(){let t=new WeakMap;return{get:function(e,n){const r=t.get(e);let i;return void 0===r?(i=new $x,t.set(e,[i])):n>=r.length?(i=new $x,r.push(i)):i=r[n],i},dispose:function(){t=new WeakMap}}}function Zx(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":n={direction:new hv,color:new Iy};break;case"SpotLight":n={position:new hv,direction:new hv,color:new Iy,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new hv,color:new Iy,distance:0,decay:0};break;case"HemisphereLight":n={direction:new hv,skyColor:new Iy,groundColor:new Iy};break;case"RectAreaLight":n={color:new Iy,position:new hv,halfWidth:new hv,halfHeight:new hv}}return t[e.id]=n,n}}}let Jx=0;function Qx(t,e){return(e.castShadow?2:0)-(t.castShadow?2:0)+(e.map?1:0)-(t.map?1:0)}function tw(t){const e=new Zx,n=function(){const t={};return{get:function(e){if(void 0!==t[e.id])return t[e.id];let n;switch(e.type){case"DirectionalLight":case"SpotLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ug};break;case"PointLight":n={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Ug,shadowCameraNear:1,shadowCameraFar:1e3}}return t[e.id]=n,n}}}(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let t=0;t<9;t++)r.probe.push(new hv);const i=new hv,o=new zv,s=new zv;return{setup:function(i){let o=0,s=0,a=0;for(let t=0;t<9;t++)r.probe[t].set(0,0,0);let l=0,u=0,c=0,h=0,d=0,p=0,f=0,m=0,g=0,v=0,y=0;i.sort(Qx);for(let t=0,_=i.length;t<_;t++){const _=i[t],b=_.color,x=_.intensity,w=_.distance,E=_.shadow&&_.shadow.map?_.shadow.map.texture:null;if(_.isAmbientLight)o+=b.r*x,s+=b.g*x,a+=b.b*x;else if(_.isLightProbe){for(let t=0;t<9;t++)r.probe[t].addScaledVector(_.sh.coefficients[t],x);y++}else if(_.isDirectionalLight){const t=e.get(_);if(t.color.copy(_.color).multiplyScalar(_.intensity),_.castShadow){const t=_.shadow,e=n.get(_);e.shadowIntensity=t.intensity,e.shadowBias=t.bias,e.shadowNormalBias=t.normalBias,e.shadowRadius=t.radius,e.shadowMapSize=t.mapSize,r.directionalShadow[l]=e,r.directionalShadowMap[l]=E,r.directionalShadowMatrix[l]=_.shadow.matrix,p++}r.directional[l]=t,l++}else if(_.isSpotLight){const t=e.get(_);t.position.setFromMatrixPosition(_.matrixWorld),t.color.copy(b).multiplyScalar(x),t.distance=w,t.coneCos=Math.cos(_.angle),t.penumbraCos=Math.cos(_.angle*(1-_.penumbra)),t.decay=_.decay,r.spot[c]=t;const i=_.shadow;if(_.map&&(r.spotLightMap[g]=_.map,g++,i.updateMatrices(_),_.castShadow&&v++),r.spotLightMatrix[c]=i.matrix,_.castShadow){const t=n.get(_);t.shadowIntensity=i.intensity,t.shadowBias=i.bias,t.shadowNormalBias=i.normalBias,t.shadowRadius=i.radius,t.shadowMapSize=i.mapSize,r.spotShadow[c]=t,r.spotShadowMap[c]=E,m++}c++}else if(_.isRectAreaLight){const t=e.get(_);t.color.copy(b).multiplyScalar(x),t.halfWidth.set(.5*_.width,0,0),t.halfHeight.set(0,.5*_.height,0),r.rectArea[h]=t,h++}else if(_.isPointLight){const t=e.get(_);if(t.color.copy(_.color).multiplyScalar(_.intensity),t.distance=_.distance,t.decay=_.decay,_.castShadow){const t=_.shadow,e=n.get(_);e.shadowIntensity=t.intensity,e.shadowBias=t.bias,e.shadowNormalBias=t.normalBias,e.shadowRadius=t.radius,e.shadowMapSize=t.mapSize,e.shadowCameraNear=t.camera.near,e.shadowCameraFar=t.camera.far,r.pointShadow[u]=e,r.pointShadowMap[u]=E,r.pointShadowMatrix[u]=_.shadow.matrix,f++}r.point[u]=t,u++}else if(_.isHemisphereLight){const t=e.get(_);t.skyColor.copy(_.color).multiplyScalar(x),t.groundColor.copy(_.groundColor).multiplyScalar(x),r.hemi[d]=t,d++}}h>0&&(!0===t.has("OES_texture_float_linear")?(r.rectAreaLTC1=F_.LTC_FLOAT_1,r.rectAreaLTC2=F_.LTC_FLOAT_2):(r.rectAreaLTC1=F_.LTC_HALF_1,r.rectAreaLTC2=F_.LTC_HALF_2)),r.ambient[0]=o,r.ambient[1]=s,r.ambient[2]=a;const _=r.hash;_.directionalLength===l&&_.pointLength===u&&_.spotLength===c&&_.rectAreaLength===h&&_.hemiLength===d&&_.numDirectionalShadows===p&&_.numPointShadows===f&&_.numSpotShadows===m&&_.numSpotMaps===g&&_.numLightProbes===y||(r.directional.length=l,r.spot.length=c,r.rectArea.length=h,r.point.length=u,r.hemi.length=d,r.directionalShadow.length=p,r.directionalShadowMap.length=p,r.pointShadow.length=f,r.pointShadowMap.length=f,r.spotShadow.length=m,r.spotShadowMap.length=m,r.directionalShadowMatrix.length=p,r.pointShadowMatrix.length=f,r.spotLightMatrix.length=m+g-v,r.spotLightMap.length=g,r.numSpotLightShadowsWithMaps=v,r.numLightProbes=y,_.directionalLength=l,_.pointLength=u,_.spotLength=c,_.rectAreaLength=h,_.hemiLength=d,_.numDirectionalShadows=p,_.numPointShadows=f,_.numSpotShadows=m,_.numSpotMaps=g,_.numLightProbes=y,r.version=Jx++)},setupView:function(t,e){let n=0,a=0,l=0,u=0,c=0;const h=e.matrixWorldInverse;for(let e=0,d=t.length;e<d;e++){const d=t[e];if(d.isDirectionalLight){const t=r.directional[n];t.direction.setFromMatrixPosition(d.matrixWorld),i.setFromMatrixPosition(d.target.matrixWorld),t.direction.sub(i),t.direction.transformDirection(h),n++}else if(d.isSpotLight){const t=r.spot[l];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(h),t.direction.setFromMatrixPosition(d.matrixWorld),i.setFromMatrixPosition(d.target.matrixWorld),t.direction.sub(i),t.direction.transformDirection(h),l++}else if(d.isRectAreaLight){const t=r.rectArea[u];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(h),s.identity(),o.copy(d.matrixWorld),o.premultiply(h),s.extractRotation(o),t.halfWidth.set(.5*d.width,0,0),t.halfHeight.set(0,.5*d.height,0),t.halfWidth.applyMatrix4(s),t.halfHeight.applyMatrix4(s),u++}else if(d.isPointLight){const t=r.point[a];t.position.setFromMatrixPosition(d.matrixWorld),t.position.applyMatrix4(h),a++}else if(d.isHemisphereLight){const t=r.hemi[c];t.direction.setFromMatrixPosition(d.matrixWorld),t.direction.transformDirection(h),c++}}},state:r}}function ew(t){const e=new tw(t),n=[],r=[];const i={lightsArray:n,shadowsArray:r,camera:null,lights:e,transmissionRenderTarget:{}};return{init:function(t){i.camera=t,n.length=0,r.length=0},state:i,setupLights:function(){e.setup(n)},setupLightsView:function(t){e.setupView(n,t)},pushLight:function(t){n.push(t)},pushShadow:function(t){r.push(t)}}}function nw(t){let e=new WeakMap;return{get:function(n,r=0){const i=e.get(n);let o;return void 0===i?(o=new ew(t),e.set(n,[o])):r>=i.length?(o=new ew(t),i.push(o)):o=i[r],o},dispose:function(){e=new WeakMap}}}class rw extends Fy{constructor(t){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=3200,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}}class iw extends Fy{constructor(t){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(t)}copy(t){return super.copy(t),this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}}function ow(t,e,n){let r=new O_;const i=new Ug,o=new Ug,s=new ov,a=new rw({depthPacking:3201}),l=new iw,u={},c=n.maxTextureSize,h={0:1,1:0,2:2},d=new g_({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Ug},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),p=d.clone();p.defines.HORIZONTAL_PASS=1;const f=new Zy;f.setAttribute("position",new Gy(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const m=new u_(f,d),g=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=1;let v=this.type;function y(n,r){const o=e.update(m);d.defines.VSM_SAMPLES!==n.blurSamples&&(d.defines.VSM_SAMPLES=n.blurSamples,p.defines.VSM_SAMPLES=n.blurSamples,d.needsUpdate=!0,p.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new av(i.x,i.y)),d.uniforms.shadow_pass.value=n.map.texture,d.uniforms.resolution.value=n.mapSize,d.uniforms.radius.value=n.radius,t.setRenderTarget(n.mapPass),t.clear(),t.renderBufferDirect(r,null,o,d,m,null),p.uniforms.shadow_pass.value=n.mapPass.texture,p.uniforms.resolution.value=n.mapSize,p.uniforms.radius.value=n.radius,t.setRenderTarget(n.map),t.clear(),t.renderBufferDirect(r,null,o,p,m,null)}function _(e,n,r,i){let o=null;const s=!0===r.isPointLight?e.customDistanceMaterial:e.customDepthMaterial;if(void 0!==s)o=s;else if(o=!0===r.isPointLight?l:a,t.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const t=o.uuid,e=n.uuid;let r=u[t];void 0===r&&(r={},u[t]=r);let i=r[e];void 0===i&&(i=o.clone(),r[e]=i,n.addEventListener("dispose",x)),o=i}if(o.visible=n.visible,o.wireframe=n.wireframe,o.side=3===i?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:h[n.side],o.alphaMap=n.alphaMap,o.alphaTest=n.alphaTest,o.map=n.map,o.clipShadows=n.clipShadows,o.clippingPlanes=n.clippingPlanes,o.clipIntersection=n.clipIntersection,o.displacementMap=n.displacementMap,o.displacementScale=n.displacementScale,o.displacementBias=n.displacementBias,o.wireframeLinewidth=n.wireframeLinewidth,o.linewidth=n.linewidth,!0===r.isPointLight&&!0===o.isMeshDistanceMaterial){t.properties.get(o).light=r}return o}function b(n,i,o,s,a){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&3===a)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(o.matrixWorldInverse,n.matrixWorld);const r=e.update(n),l=n.material;if(Array.isArray(l)){const e=r.groups;for(let u=0,c=e.length;u<c;u++){const c=e[u],h=l[c.materialIndex];if(h&&h.visible){const e=_(n,h,s,a);n.onBeforeShadow(t,n,i,o,r,e,c),t.renderBufferDirect(o,null,r,e,n,c),n.onAfterShadow(t,n,i,o,r,e,c)}}}else if(l.visible){const e=_(n,l,s,a);n.onBeforeShadow(t,n,i,o,r,e,null),t.renderBufferDirect(o,null,r,e,n,null),n.onAfterShadow(t,n,i,o,r,e,null)}}const l=n.children;for(let t=0,e=l.length;t<e;t++)b(l[t],i,o,s,a)}function x(t){t.target.removeEventListener("dispose",x);for(const e in u){const n=u[e],r=t.target.uuid;if(r in n){n[r].dispose(),delete n[r]}}}this.render=function(e,n,a){if(!1===g.enabled)return;if(!1===g.autoUpdate&&!1===g.needsUpdate)return;if(0===e.length)return;const l=t.getRenderTarget(),u=t.getActiveCubeFace(),h=t.getActiveMipmapLevel(),d=t.state;d.setBlending(0),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);const p=3!==v&&3===this.type,f=3===v&&3!==this.type;for(let l=0,u=e.length;l<u;l++){const u=e[l],h=u.shadow;if(void 0===h){console.warn("THREE.WebGLShadowMap:",u,"has no shadow.");continue}if(!1===h.autoUpdate&&!1===h.needsUpdate)continue;i.copy(h.mapSize);const m=h.getFrameExtents();if(i.multiply(m),o.copy(h.mapSize),(i.x>c||i.y>c)&&(i.x>c&&(o.x=Math.floor(c/m.x),i.x=o.x*m.x,h.mapSize.x=o.x),i.y>c&&(o.y=Math.floor(c/m.y),i.y=o.y*m.y,h.mapSize.y=o.y)),null===h.map||!0===p||!0===f){const t=3!==this.type?{minFilter:1003,magFilter:1003}:{};null!==h.map&&h.map.dispose(),h.map=new av(i.x,i.y,t),h.map.texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()}t.setRenderTarget(h.map),t.clear();const g=h.getViewportCount();for(let t=0;t<g;t++){const e=h.getViewport(t);s.set(o.x*e.x,o.y*e.y,o.x*e.z,o.y*e.w),d.viewport(s),h.updateMatrices(u,t),r=h.getFrustum(),b(n,a,h.camera,u,this.type)}!0!==h.isPointLightShadow&&3===this.type&&y(h,a),h.needsUpdate=!1}v=this.type,g.needsUpdate=!1,t.setRenderTarget(l,u,h)}}const sw={0:1,2:6,4:7,3:5,1:0,6:2,7:4,5:3};function aw(t){const e=new function(){let e=!1;const n=new ov;let r=null;const i=new ov(0,0,0,0);return{setMask:function(n){r===n||e||(t.colorMask(n,n,n,n),r=n)},setLocked:function(t){e=t},setClear:function(e,r,o,s,a){!0===a&&(e*=s,r*=s,o*=s),n.set(e,r,o,s),!1===i.equals(n)&&(t.clearColor(e,r,o,s),i.copy(n))},reset:function(){e=!1,r=null,i.set(-1,0,0,0)}}},n=new function(){let e=!1,n=!1,r=null,i=null,o=null;return{setReversed:function(t){n=t},setTest:function(e){e?B(t.DEPTH_TEST):G(t.DEPTH_TEST)},setMask:function(n){r===n||e||(t.depthMask(n),r=n)},setFunc:function(e){if(n&&(e=sw[e]),i!==e){switch(e){case 0:t.depthFunc(t.NEVER);break;case 1:t.depthFunc(t.ALWAYS);break;case 2:t.depthFunc(t.LESS);break;case 3:t.depthFunc(t.LEQUAL);break;case 4:t.depthFunc(t.EQUAL);break;case 5:t.depthFunc(t.GEQUAL);break;case 6:t.depthFunc(t.GREATER);break;case 7:t.depthFunc(t.NOTEQUAL);break;default:t.depthFunc(t.LEQUAL)}i=e}},setLocked:function(t){e=t},setClear:function(e){o!==e&&(t.clearDepth(e),o=e)},reset:function(){e=!1,r=null,i=null,o=null}}},r=new function(){let e=!1,n=null,r=null,i=null,o=null,s=null,a=null,l=null,u=null;return{setTest:function(n){e||(n?B(t.STENCIL_TEST):G(t.STENCIL_TEST))},setMask:function(r){n===r||e||(t.stencilMask(r),n=r)},setFunc:function(e,n,s){r===e&&i===n&&o===s||(t.stencilFunc(e,n,s),r=e,i=n,o=s)},setOp:function(e,n,r){s===e&&a===n&&l===r||(t.stencilOp(e,n,r),s=e,a=n,l=r)},setLocked:function(t){e=t},setClear:function(e){u!==e&&(t.clearStencil(e),u=e)},reset:function(){e=!1,n=null,r=null,i=null,o=null,s=null,a=null,l=null,u=null}}},i=new WeakMap,o=new WeakMap;let s={},a={},l=new WeakMap,u=[],c=null,h=!1,d=null,p=null,f=null,m=null,g=null,v=null,y=null,_=new Iy(0,0,0),b=0,x=!1,w=null,E=null,T=null,S=null,A=null;const M=t.getParameter(t.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let D=!1,C=0;const R=t.getParameter(t.VERSION);-1!==R.indexOf("WebGL")?(C=parseFloat(/^WebGL (\d)/.exec(R)[1]),D=C>=1):-1!==R.indexOf("OpenGL ES")&&(C=parseFloat(/^OpenGL ES (\d)/.exec(R)[1]),D=C>=2);let O=null,P={};const I=t.getParameter(t.SCISSOR_BOX),L=t.getParameter(t.VIEWPORT),N=(new ov).fromArray(I),F=(new ov).fromArray(L);function k(e,n,r,i){const o=new Uint8Array(4),s=t.createTexture();t.bindTexture(e,s),t.texParameteri(e,t.TEXTURE_MIN_FILTER,t.NEAREST),t.texParameteri(e,t.TEXTURE_MAG_FILTER,t.NEAREST);for(let s=0;s<r;s++)e===t.TEXTURE_3D||e===t.TEXTURE_2D_ARRAY?t.texImage3D(n,0,t.RGBA,1,1,i,0,t.RGBA,t.UNSIGNED_BYTE,o):t.texImage2D(n+s,0,t.RGBA,1,1,0,t.RGBA,t.UNSIGNED_BYTE,o);return s}const U={};function B(e){!0!==s[e]&&(t.enable(e),s[e]=!0)}function G(e){!1!==s[e]&&(t.disable(e),s[e]=!1)}U[t.TEXTURE_2D]=k(t.TEXTURE_2D,t.TEXTURE_2D,1),U[t.TEXTURE_CUBE_MAP]=k(t.TEXTURE_CUBE_MAP,t.TEXTURE_CUBE_MAP_POSITIVE_X,6),U[t.TEXTURE_2D_ARRAY]=k(t.TEXTURE_2D_ARRAY,t.TEXTURE_2D_ARRAY,1,1),U[t.TEXTURE_3D]=k(t.TEXTURE_3D,t.TEXTURE_3D,1,1),e.setClear(0,0,0,1),n.setClear(1),r.setClear(0),B(t.DEPTH_TEST),n.setFunc(3),V(!1),X(1),B(t.CULL_FACE),j(0);const z={100:t.FUNC_ADD,101:t.FUNC_SUBTRACT,102:t.FUNC_REVERSE_SUBTRACT};z[103]=t.MIN,z[104]=t.MAX;const H={200:t.ZERO,201:t.ONE,202:t.SRC_COLOR,204:t.SRC_ALPHA,210:t.SRC_ALPHA_SATURATE,208:t.DST_COLOR,206:t.DST_ALPHA,203:t.ONE_MINUS_SRC_COLOR,205:t.ONE_MINUS_SRC_ALPHA,209:t.ONE_MINUS_DST_COLOR,207:t.ONE_MINUS_DST_ALPHA,211:t.CONSTANT_COLOR,212:t.ONE_MINUS_CONSTANT_COLOR,213:t.CONSTANT_ALPHA,214:t.ONE_MINUS_CONSTANT_ALPHA};function j(e,n,r,i,o,s,a,l,u,c){if(0!==e){if(!1===h&&(B(t.BLEND),h=!0),5===e)o=o||n,s=s||r,a=a||i,n===p&&o===g||(t.blendEquationSeparate(z[n],z[o]),p=n,g=o),r===f&&i===m&&s===v&&a===y||(t.blendFuncSeparate(H[r],H[i],H[s],H[a]),f=r,m=i,v=s,y=a),!1!==l.equals(_)&&u===b||(t.blendColor(l.r,l.g,l.b,u),_.copy(l),b=u),d=e,x=!1;else if(e!==d||c!==x){if(100===p&&100===g||(t.blendEquation(t.FUNC_ADD),p=100,g=100),c)switch(e){case 1:t.blendFuncSeparate(t.ONE,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case 2:t.blendFunc(t.ONE,t.ONE);break;case 3:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case 4:t.blendFuncSeparate(t.ZERO,t.SRC_COLOR,t.ZERO,t.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}else switch(e){case 1:t.blendFuncSeparate(t.SRC_ALPHA,t.ONE_MINUS_SRC_ALPHA,t.ONE,t.ONE_MINUS_SRC_ALPHA);break;case 2:t.blendFunc(t.SRC_ALPHA,t.ONE);break;case 3:t.blendFuncSeparate(t.ZERO,t.ONE_MINUS_SRC_COLOR,t.ZERO,t.ONE);break;case 4:t.blendFunc(t.ZERO,t.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",e)}f=null,m=null,v=null,y=null,_.set(0,0,0),b=0,d=e,x=c}}else!0===h&&(G(t.BLEND),h=!1)}function V(e){w!==e&&(e?t.frontFace(t.CW):t.frontFace(t.CCW),w=e)}function X(e){0!==e?(B(t.CULL_FACE),e!==E&&(1===e?t.cullFace(t.BACK):2===e?t.cullFace(t.FRONT):t.cullFace(t.FRONT_AND_BACK))):G(t.CULL_FACE),E=e}function W(e,n,r){e?(B(t.POLYGON_OFFSET_FILL),S===n&&A===r||(t.polygonOffset(n,r),S=n,A=r)):G(t.POLYGON_OFFSET_FILL)}return{buffers:{color:e,depth:n,stencil:r},enable:B,disable:G,bindFramebuffer:function(e,n){return a[e]!==n&&(t.bindFramebuffer(e,n),a[e]=n,e===t.DRAW_FRAMEBUFFER&&(a[t.FRAMEBUFFER]=n),e===t.FRAMEBUFFER&&(a[t.DRAW_FRAMEBUFFER]=n),!0)},drawBuffers:function(e,n){let r=u,i=!1;if(e){r=l.get(n),void 0===r&&(r=[],l.set(n,r));const o=e.textures;if(r.length!==o.length||r[0]!==t.COLOR_ATTACHMENT0){for(let e=0,n=o.length;e<n;e++)r[e]=t.COLOR_ATTACHMENT0+e;r.length=o.length,i=!0}}else r[0]!==t.BACK&&(r[0]=t.BACK,i=!0);i&&t.drawBuffers(r)},useProgram:function(e){return c!==e&&(t.useProgram(e),c=e,!0)},setBlending:j,setMaterial:function(i,o){2===i.side?G(t.CULL_FACE):B(t.CULL_FACE);let s=1===i.side;o&&(s=!s),V(s),1===i.blending&&!1===i.transparent?j(0):j(i.blending,i.blendEquation,i.blendSrc,i.blendDst,i.blendEquationAlpha,i.blendSrcAlpha,i.blendDstAlpha,i.blendColor,i.blendAlpha,i.premultipliedAlpha),n.setFunc(i.depthFunc),n.setTest(i.depthTest),n.setMask(i.depthWrite),e.setMask(i.colorWrite);const a=i.stencilWrite;r.setTest(a),a&&(r.setMask(i.stencilWriteMask),r.setFunc(i.stencilFunc,i.stencilRef,i.stencilFuncMask),r.setOp(i.stencilFail,i.stencilZFail,i.stencilZPass)),W(i.polygonOffset,i.polygonOffsetFactor,i.polygonOffsetUnits),!0===i.alphaToCoverage?B(t.SAMPLE_ALPHA_TO_COVERAGE):G(t.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:V,setCullFace:X,setLineWidth:function(e){e!==T&&(D&&t.lineWidth(e),T=e)},setPolygonOffset:W,setScissorTest:function(e){e?B(t.SCISSOR_TEST):G(t.SCISSOR_TEST)},activeTexture:function(e){void 0===e&&(e=t.TEXTURE0+M-1),O!==e&&(t.activeTexture(e),O=e)},bindTexture:function(e,n,r){void 0===r&&(r=null===O?t.TEXTURE0+M-1:O);let i=P[r];void 0===i&&(i={type:void 0,texture:void 0},P[r]=i),i.type===e&&i.texture===n||(O!==r&&(t.activeTexture(r),O=r),t.bindTexture(e,n||U[e]),i.type=e,i.texture=n)},unbindTexture:function(){const e=P[O];void 0!==e&&void 0!==e.type&&(t.bindTexture(e.type,null),e.type=void 0,e.texture=void 0)},compressedTexImage2D:function(){try{t.compressedTexImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},compressedTexImage3D:function(){try{t.compressedTexImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage2D:function(){try{t.texImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texImage3D:function(){try{t.texImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},updateUBOMapping:function(e,n){let r=o.get(n);void 0===r&&(r=new WeakMap,o.set(n,r));let i=r.get(e);void 0===i&&(i=t.getUniformBlockIndex(n,e.name),r.set(e,i))},uniformBlockBinding:function(e,n){const r=o.get(n).get(e);i.get(n)!==r&&(t.uniformBlockBinding(n,r,e.__bindingPointIndex),i.set(n,r))},texStorage2D:function(){try{t.texStorage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texStorage3D:function(){try{t.texStorage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texSubImage2D:function(){try{t.texSubImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},texSubImage3D:function(){try{t.texSubImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},compressedTexSubImage2D:function(){try{t.compressedTexSubImage2D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},compressedTexSubImage3D:function(){try{t.compressedTexSubImage3D.apply(t,arguments)}catch(t){console.error("THREE.WebGLState:",t)}},scissor:function(e){!1===N.equals(e)&&(t.scissor(e.x,e.y,e.z,e.w),N.copy(e))},viewport:function(e){!1===F.equals(e)&&(t.viewport(e.x,e.y,e.z,e.w),F.copy(e))},reset:function(){t.disable(t.BLEND),t.disable(t.CULL_FACE),t.disable(t.DEPTH_TEST),t.disable(t.POLYGON_OFFSET_FILL),t.disable(t.SCISSOR_TEST),t.disable(t.STENCIL_TEST),t.disable(t.SAMPLE_ALPHA_TO_COVERAGE),t.blendEquation(t.FUNC_ADD),t.blendFunc(t.ONE,t.ZERO),t.blendFuncSeparate(t.ONE,t.ZERO,t.ONE,t.ZERO),t.blendColor(0,0,0,0),t.colorMask(!0,!0,!0,!0),t.clearColor(0,0,0,0),t.depthMask(!0),t.depthFunc(t.LESS),t.clearDepth(1),t.stencilMask(4294967295),t.stencilFunc(t.ALWAYS,0,4294967295),t.stencilOp(t.KEEP,t.KEEP,t.KEEP),t.clearStencil(0),t.cullFace(t.BACK),t.frontFace(t.CCW),t.polygonOffset(0,0),t.activeTexture(t.TEXTURE0),t.bindFramebuffer(t.FRAMEBUFFER,null),t.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),t.bindFramebuffer(t.READ_FRAMEBUFFER,null),t.useProgram(null),t.lineWidth(1),t.scissor(0,0,t.canvas.width,t.canvas.height),t.viewport(0,0,t.canvas.width,t.canvas.height),s={},O=null,P={},a={},l=new WeakMap,u=[],c=null,h=!1,d=null,p=null,f=null,m=null,g=null,v=null,y=null,_=new Iy(0,0,0),b=0,x=!1,w=null,E=null,T=null,S=null,A=null,N.set(0,0,t.canvas.width,t.canvas.height),F.set(0,0,t.canvas.width,t.canvas.height),e.reset(),n.reset(),r.reset()}}}function lw(t,e,n,r){const i=function(t){switch(t){case 1009:case 1010:return{byteLength:1,components:1};case 1012:case 1011:case 1016:return{byteLength:2,components:1};case 1017:case 1018:return{byteLength:2,components:4};case 1014:case 1013:case 1015:return{byteLength:4,components:1};case 35902:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${t}.`)}(r);switch(n){case 1021:case 1024:return t*e;case 1025:return t*e*2;case 1028:case 1029:return t*e/i.components*i.byteLength;case 1030:case 1031:return t*e*2/i.components*i.byteLength;case 1022:return t*e*3/i.components*i.byteLength;case 1023:case 1033:return t*e*4/i.components*i.byteLength;case 33776:case 33777:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case 33778:case 33779:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case 35841:case 35843:return Math.max(t,16)*Math.max(e,8)/4;case 35840:case 35842:return Math.max(t,8)*Math.max(e,8)/2;case 36196:case 37492:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*8;case 37496:case 37808:return Math.floor((t+3)/4)*Math.floor((e+3)/4)*16;case 37809:return Math.floor((t+4)/5)*Math.floor((e+3)/4)*16;case 37810:return Math.floor((t+4)/5)*Math.floor((e+4)/5)*16;case 37811:return Math.floor((t+5)/6)*Math.floor((e+4)/5)*16;case 37812:return Math.floor((t+5)/6)*Math.floor((e+5)/6)*16;case 37813:return Math.floor((t+7)/8)*Math.floor((e+4)/5)*16;case 37814:return Math.floor((t+7)/8)*Math.floor((e+5)/6)*16;case 37815:return Math.floor((t+7)/8)*Math.floor((e+7)/8)*16;case 37816:return Math.floor((t+9)/10)*Math.floor((e+4)/5)*16;case 37817:return Math.floor((t+9)/10)*Math.floor((e+5)/6)*16;case 37818:return Math.floor((t+9)/10)*Math.floor((e+7)/8)*16;case 37819:return Math.floor((t+9)/10)*Math.floor((e+9)/10)*16;case 37820:return Math.floor((t+11)/12)*Math.floor((e+9)/10)*16;case 37821:return Math.floor((t+11)/12)*Math.floor((e+11)/12)*16;case 36492:case 36494:case 36495:return Math.ceil(t/4)*Math.ceil(e/4)*16;case 36283:case 36284:return Math.ceil(t/4)*Math.ceil(e/4)*8;case 36285:case 36286:return Math.ceil(t/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${n} format.`)}function uw(t,e,n,r,i,o,s){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,l="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),u=new Ug,c=new WeakMap;let h;const d=new WeakMap;let p=!1;try{p="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(t){}function f(t,e){return p?new OffscreenCanvas(t,e):Hg("canvas")}function m(t,e,n){let r=1;const i=G(t);if((i.width>n||i.height>n)&&(r=n/Math.max(i.width,i.height)),r<1){if("undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&t instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&t instanceof ImageBitmap||"undefined"!=typeof VideoFrame&&t instanceof VideoFrame){const n=Math.floor(r*i.width),o=Math.floor(r*i.height);void 0===h&&(h=f(n,o));const s=e?f(n,o):h;s.width=n,s.height=o;return s.getContext("2d").drawImage(t,0,0,n,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+i.width+"x"+i.height+") to ("+n+"x"+o+")."),s}return"data"in t&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+i.width+"x"+i.height+")."),t}return t}function g(t){return t.generateMipmaps&&1003!==t.minFilter&&1006!==t.minFilter}function v(e){t.generateMipmap(e)}function y(n,r,i,o,s=!1){if(null!==n){if(void 0!==t[n])return t[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let a=r;if(r===t.RED&&(i===t.FLOAT&&(a=t.R32F),i===t.HALF_FLOAT&&(a=t.R16F),i===t.UNSIGNED_BYTE&&(a=t.R8)),r===t.RED_INTEGER&&(i===t.UNSIGNED_BYTE&&(a=t.R8UI),i===t.UNSIGNED_SHORT&&(a=t.R16UI),i===t.UNSIGNED_INT&&(a=t.R32UI),i===t.BYTE&&(a=t.R8I),i===t.SHORT&&(a=t.R16I),i===t.INT&&(a=t.R32I)),r===t.RG&&(i===t.FLOAT&&(a=t.RG32F),i===t.HALF_FLOAT&&(a=t.RG16F),i===t.UNSIGNED_BYTE&&(a=t.RG8)),r===t.RG_INTEGER&&(i===t.UNSIGNED_BYTE&&(a=t.RG8UI),i===t.UNSIGNED_SHORT&&(a=t.RG16UI),i===t.UNSIGNED_INT&&(a=t.RG32UI),i===t.BYTE&&(a=t.RG8I),i===t.SHORT&&(a=t.RG16I),i===t.INT&&(a=t.RG32I)),r===t.RGB_INTEGER&&(i===t.UNSIGNED_BYTE&&(a=t.RGB8UI),i===t.UNSIGNED_SHORT&&(a=t.RGB16UI),i===t.UNSIGNED_INT&&(a=t.RGB32UI),i===t.BYTE&&(a=t.RGB8I),i===t.SHORT&&(a=t.RGB16I),i===t.INT&&(a=t.RGB32I)),r===t.RGBA_INTEGER&&(i===t.UNSIGNED_BYTE&&(a=t.RGBA8UI),i===t.UNSIGNED_SHORT&&(a=t.RGBA16UI),i===t.UNSIGNED_INT&&(a=t.RGBA32UI),i===t.BYTE&&(a=t.RGBA8I),i===t.SHORT&&(a=t.RGBA16I),i===t.INT&&(a=t.RGBA32I)),r===t.RGB&&i===t.UNSIGNED_INT_5_9_9_9_REV&&(a=t.RGB9_E5),r===t.RGBA){const e=s?"linear":Kg.getTransfer(o);i===t.FLOAT&&(a=t.RGBA32F),i===t.HALF_FLOAT&&(a=t.RGBA16F),i===t.UNSIGNED_BYTE&&(a="srgb"===e?t.SRGB8_ALPHA8:t.RGBA8),i===t.UNSIGNED_SHORT_4_4_4_4&&(a=t.RGBA4),i===t.UNSIGNED_SHORT_5_5_5_1&&(a=t.RGB5_A1)}return a!==t.R16F&&a!==t.R32F&&a!==t.RG16F&&a!==t.RG32F&&a!==t.RGBA16F&&a!==t.RGBA32F||e.get("EXT_color_buffer_float"),a}function _(e,n){let r;return e?null===n||1014===n||1020===n?r=t.DEPTH24_STENCIL8:1015===n?r=t.DEPTH32F_STENCIL8:1012===n&&(r=t.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):null===n||1014===n||1020===n?r=t.DEPTH_COMPONENT24:1015===n?r=t.DEPTH_COMPONENT32F:1012===n&&(r=t.DEPTH_COMPONENT16),r}function b(t,e){return!0===g(t)||t.isFramebufferTexture&&1003!==t.minFilter&&1006!==t.minFilter?Math.log2(Math.max(e.width,e.height))+1:void 0!==t.mipmaps&&t.mipmaps.length>0?t.mipmaps.length:t.isCompressedTexture&&Array.isArray(t.image)?e.mipmaps.length:1}function x(t){const e=t.target;e.removeEventListener("dispose",x),function(t){const e=r.get(t);if(void 0===e.__webglInit)return;const n=t.source,i=d.get(n);if(i){const r=i[e.__cacheKey];r.usedTimes--,0===r.usedTimes&&E(t),0===Object.keys(i).length&&d.delete(n)}r.remove(t)}(e),e.isVideoTexture&&c.delete(e)}function w(e){const n=e.target;n.removeEventListener("dispose",w),function(e){const n=r.get(e);e.depthTexture&&e.depthTexture.dispose();if(e.isWebGLCubeRenderTarget)for(let e=0;e<6;e++){if(Array.isArray(n.__webglFramebuffer[e]))for(let r=0;r<n.__webglFramebuffer[e].length;r++)t.deleteFramebuffer(n.__webglFramebuffer[e][r]);else t.deleteFramebuffer(n.__webglFramebuffer[e]);n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer[e])}else{if(Array.isArray(n.__webglFramebuffer))for(let e=0;e<n.__webglFramebuffer.length;e++)t.deleteFramebuffer(n.__webglFramebuffer[e]);else t.deleteFramebuffer(n.__webglFramebuffer);if(n.__webglDepthbuffer&&t.deleteRenderbuffer(n.__webglDepthbuffer),n.__webglMultisampledFramebuffer&&t.deleteFramebuffer(n.__webglMultisampledFramebuffer),n.__webglColorRenderbuffer)for(let e=0;e<n.__webglColorRenderbuffer.length;e++)n.__webglColorRenderbuffer[e]&&t.deleteRenderbuffer(n.__webglColorRenderbuffer[e]);n.__webglDepthRenderbuffer&&t.deleteRenderbuffer(n.__webglDepthRenderbuffer)}const i=e.textures;for(let e=0,n=i.length;e<n;e++){const n=r.get(i[e]);n.__webglTexture&&(t.deleteTexture(n.__webglTexture),s.memory.textures--),r.remove(i[e])}r.remove(e)}(n)}function E(e){const n=r.get(e);t.deleteTexture(n.__webglTexture);const i=e.source;delete d.get(i)[n.__cacheKey],s.memory.textures--}let T=0;function S(e,i){const o=r.get(e);if(e.isVideoTexture&&function(t){const e=s.render.frame;c.get(t)!==e&&(c.set(t,e),t.update())}(e),!1===e.isRenderTargetTexture&&e.version>0&&o.__version!==e.version){const t=e.image;if(null===t)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==t.complete)return void O(o,e,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(t.TEXTURE_2D,o.__webglTexture,t.TEXTURE0+i)}const A={1e3:t.REPEAT,1001:t.CLAMP_TO_EDGE,1002:t.MIRRORED_REPEAT},M={1003:t.NEAREST,1004:t.NEAREST_MIPMAP_NEAREST,1005:t.NEAREST_MIPMAP_LINEAR,1006:t.LINEAR,1007:t.LINEAR_MIPMAP_NEAREST,1008:t.LINEAR_MIPMAP_LINEAR},D={512:t.NEVER,519:t.ALWAYS,513:t.LESS,515:t.LEQUAL,514:t.EQUAL,518:t.GEQUAL,516:t.GREATER,517:t.NOTEQUAL};function C(n,o){if(1015!==o.type||!1!==e.has("OES_texture_float_linear")||1006!==o.magFilter&&1007!==o.magFilter&&1005!==o.magFilter&&1008!==o.magFilter&&1006!==o.minFilter&&1007!==o.minFilter&&1005!==o.minFilter&&1008!==o.minFilter||console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),t.texParameteri(n,t.TEXTURE_WRAP_S,A[o.wrapS]),t.texParameteri(n,t.TEXTURE_WRAP_T,A[o.wrapT]),n!==t.TEXTURE_3D&&n!==t.TEXTURE_2D_ARRAY||t.texParameteri(n,t.TEXTURE_WRAP_R,A[o.wrapR]),t.texParameteri(n,t.TEXTURE_MAG_FILTER,M[o.magFilter]),t.texParameteri(n,t.TEXTURE_MIN_FILTER,M[o.minFilter]),o.compareFunction&&(t.texParameteri(n,t.TEXTURE_COMPARE_MODE,t.COMPARE_REF_TO_TEXTURE),t.texParameteri(n,t.TEXTURE_COMPARE_FUNC,D[o.compareFunction])),!0===e.has("EXT_texture_filter_anisotropic")){if(1003===o.magFilter)return;if(1005!==o.minFilter&&1008!==o.minFilter)return;if(1015===o.type&&!1===e.has("OES_texture_float_linear"))return;if(o.anisotropy>1||r.get(o).__currentAnisotropy){const s=e.get("EXT_texture_filter_anisotropic");t.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(o.anisotropy,i.getMaxAnisotropy())),r.get(o).__currentAnisotropy=o.anisotropy}}}function R(e,n){let r=!1;void 0===e.__webglInit&&(e.__webglInit=!0,n.addEventListener("dispose",x));const i=n.source;let o=d.get(i);void 0===o&&(o={},d.set(i,o));const a=function(t){const e=[];return e.push(t.wrapS),e.push(t.wrapT),e.push(t.wrapR||0),e.push(t.magFilter),e.push(t.minFilter),e.push(t.anisotropy),e.push(t.internalFormat),e.push(t.format),e.push(t.type),e.push(t.generateMipmaps),e.push(t.premultiplyAlpha),e.push(t.flipY),e.push(t.unpackAlignment),e.push(t.colorSpace),e.join()}(n);if(a!==e.__cacheKey){void 0===o[a]&&(o[a]={texture:t.createTexture(),usedTimes:0},s.memory.textures++,r=!0),o[a].usedTimes++;const i=o[e.__cacheKey];void 0!==i&&(o[e.__cacheKey].usedTimes--,0===i.usedTimes&&E(n)),e.__cacheKey=a,e.__webglTexture=o[a].texture}return r}function O(e,s,a){let l=t.TEXTURE_2D;(s.isDataArrayTexture||s.isCompressedArrayTexture)&&(l=t.TEXTURE_2D_ARRAY),s.isData3DTexture&&(l=t.TEXTURE_3D);const u=R(e,s),c=s.source;n.bindTexture(l,e.__webglTexture,t.TEXTURE0+a);const h=r.get(c);if(c.version!==h.__version||!0===u){n.activeTexture(t.TEXTURE0+a);const e=Kg.getPrimaries(Kg.workingColorSpace),r=""===s.colorSpace?null:Kg.getPrimaries(s.colorSpace),d=""===s.colorSpace||e===r?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,s.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,s.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,d);let p=m(s.image,!1,i.maxTextureSize);p=B(s,p);const f=o.convert(s.format,s.colorSpace),x=o.convert(s.type);let w,E=y(s.internalFormat,f,x,s.colorSpace,s.isVideoTexture);C(l,s);const T=s.mipmaps,S=!0!==s.isVideoTexture,A=void 0===h.__version||!0===u,M=c.dataReady,D=b(s,p);if(s.isDepthTexture)E=_(1027===s.format,s.type),A&&(S?n.texStorage2D(t.TEXTURE_2D,1,E,p.width,p.height):n.texImage2D(t.TEXTURE_2D,0,E,p.width,p.height,0,f,x,null));else if(s.isDataTexture)if(T.length>0){S&&A&&n.texStorage2D(t.TEXTURE_2D,D,E,T[0].width,T[0].height);for(let e=0,r=T.length;e<r;e++)w=T[e],S?M&&n.texSubImage2D(t.TEXTURE_2D,e,0,0,w.width,w.height,f,x,w.data):n.texImage2D(t.TEXTURE_2D,e,E,w.width,w.height,0,f,x,w.data);s.generateMipmaps=!1}else S?(A&&n.texStorage2D(t.TEXTURE_2D,D,E,p.width,p.height),M&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,p.width,p.height,f,x,p.data)):n.texImage2D(t.TEXTURE_2D,0,E,p.width,p.height,0,f,x,p.data);else if(s.isCompressedTexture)if(s.isCompressedArrayTexture){S&&A&&n.texStorage3D(t.TEXTURE_2D_ARRAY,D,E,T[0].width,T[0].height,p.depth);for(let e=0,r=T.length;e<r;e++)if(w=T[e],1023!==s.format)if(null!==f)if(S){if(M)if(s.layerUpdates.size>0){const r=lw(w.width,w.height,s.format,s.type);for(const i of s.layerUpdates){const o=w.data.subarray(i*r/w.data.BYTES_PER_ELEMENT,(i+1)*r/w.data.BYTES_PER_ELEMENT);n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,e,0,0,i,w.width,w.height,1,f,o,0,0)}s.clearLayerUpdates()}else n.compressedTexSubImage3D(t.TEXTURE_2D_ARRAY,e,0,0,0,w.width,w.height,p.depth,f,w.data,0,0)}else n.compressedTexImage3D(t.TEXTURE_2D_ARRAY,e,E,w.width,w.height,p.depth,0,w.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else S?M&&n.texSubImage3D(t.TEXTURE_2D_ARRAY,e,0,0,0,w.width,w.height,p.depth,f,x,w.data):n.texImage3D(t.TEXTURE_2D_ARRAY,e,E,w.width,w.height,p.depth,0,f,x,w.data)}else{S&&A&&n.texStorage2D(t.TEXTURE_2D,D,E,T[0].width,T[0].height);for(let e=0,r=T.length;e<r;e++)w=T[e],1023!==s.format?null!==f?S?M&&n.compressedTexSubImage2D(t.TEXTURE_2D,e,0,0,w.width,w.height,f,w.data):n.compressedTexImage2D(t.TEXTURE_2D,e,E,w.width,w.height,0,w.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):S?M&&n.texSubImage2D(t.TEXTURE_2D,e,0,0,w.width,w.height,f,x,w.data):n.texImage2D(t.TEXTURE_2D,e,E,w.width,w.height,0,f,x,w.data)}else if(s.isDataArrayTexture)if(S){if(A&&n.texStorage3D(t.TEXTURE_2D_ARRAY,D,E,p.width,p.height,p.depth),M)if(s.layerUpdates.size>0){const e=lw(p.width,p.height,s.format,s.type);for(const r of s.layerUpdates){const i=p.data.subarray(r*e/p.data.BYTES_PER_ELEMENT,(r+1)*e/p.data.BYTES_PER_ELEMENT);n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,r,p.width,p.height,1,f,x,i)}s.clearLayerUpdates()}else n.texSubImage3D(t.TEXTURE_2D_ARRAY,0,0,0,0,p.width,p.height,p.depth,f,x,p.data)}else n.texImage3D(t.TEXTURE_2D_ARRAY,0,E,p.width,p.height,p.depth,0,f,x,p.data);else if(s.isData3DTexture)S?(A&&n.texStorage3D(t.TEXTURE_3D,D,E,p.width,p.height,p.depth),M&&n.texSubImage3D(t.TEXTURE_3D,0,0,0,0,p.width,p.height,p.depth,f,x,p.data)):n.texImage3D(t.TEXTURE_3D,0,E,p.width,p.height,p.depth,0,f,x,p.data);else if(s.isFramebufferTexture){if(A)if(S)n.texStorage2D(t.TEXTURE_2D,D,E,p.width,p.height);else{let e=p.width,r=p.height;for(let i=0;i<D;i++)n.texImage2D(t.TEXTURE_2D,i,E,e,r,0,f,x,null),e>>=1,r>>=1}}else if(T.length>0){if(S&&A){const e=G(T[0]);n.texStorage2D(t.TEXTURE_2D,D,E,e.width,e.height)}for(let e=0,r=T.length;e<r;e++)w=T[e],S?M&&n.texSubImage2D(t.TEXTURE_2D,e,0,0,f,x,w):n.texImage2D(t.TEXTURE_2D,e,E,f,x,w);s.generateMipmaps=!1}else if(S){if(A){const e=G(p);n.texStorage2D(t.TEXTURE_2D,D,E,e.width,e.height)}M&&n.texSubImage2D(t.TEXTURE_2D,0,0,0,f,x,p)}else n.texImage2D(t.TEXTURE_2D,0,E,f,x,p);g(s)&&v(l),h.__version=c.version,s.onUpdate&&s.onUpdate(s)}e.__version=s.version}function P(e,i,s,l,u,c){const h=o.convert(s.format,s.colorSpace),d=o.convert(s.type),p=y(s.internalFormat,h,d,s.colorSpace);if(!r.get(i).__hasExternalTextures){const e=Math.max(1,i.width>>c),r=Math.max(1,i.height>>c);u===t.TEXTURE_3D||u===t.TEXTURE_2D_ARRAY?n.texImage3D(u,c,p,e,r,i.depth,0,h,d,null):n.texImage2D(u,c,p,e,r,0,h,d,null)}n.bindFramebuffer(t.FRAMEBUFFER,e),U(i)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,l,u,r.get(s).__webglTexture,0,k(i)):(u===t.TEXTURE_2D||u>=t.TEXTURE_CUBE_MAP_POSITIVE_X&&u<=t.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&t.framebufferTexture2D(t.FRAMEBUFFER,l,u,r.get(s).__webglTexture,c),n.bindFramebuffer(t.FRAMEBUFFER,null)}function I(e,n,r){if(t.bindRenderbuffer(t.RENDERBUFFER,e),n.depthBuffer){const i=n.depthTexture,o=i&&i.isDepthTexture?i.type:null,s=_(n.stencilBuffer,o),l=n.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,u=k(n);U(n)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,u,s,n.width,n.height):r?t.renderbufferStorageMultisample(t.RENDERBUFFER,u,s,n.width,n.height):t.renderbufferStorage(t.RENDERBUFFER,s,n.width,n.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,l,t.RENDERBUFFER,e)}else{const e=n.textures;for(let i=0;i<e.length;i++){const s=e[i],l=o.convert(s.format,s.colorSpace),u=o.convert(s.type),c=y(s.internalFormat,l,u,s.colorSpace),h=k(n);r&&!1===U(n)?t.renderbufferStorageMultisample(t.RENDERBUFFER,h,c,n.width,n.height):U(n)?a.renderbufferStorageMultisampleEXT(t.RENDERBUFFER,h,c,n.width,n.height):t.renderbufferStorage(t.RENDERBUFFER,c,n.width,n.height)}}t.bindRenderbuffer(t.RENDERBUFFER,null)}function L(e){const i=r.get(e),o=!0===e.isWebGLCubeRenderTarget;if(i.__boundDepthTexture!==e.depthTexture){const t=e.depthTexture;if(i.__depthDisposeCallback&&i.__depthDisposeCallback(),t){const e=()=>{delete i.__boundDepthTexture,delete i.__depthDisposeCallback,t.removeEventListener("dispose",e)};t.addEventListener("dispose",e),i.__depthDisposeCallback=e}i.__boundDepthTexture=t}if(e.depthTexture&&!i.__autoAllocateDepthBuffer){if(o)throw new Error("target.depthTexture not supported in Cube render targets");!function(e,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(t.FRAMEBUFFER,e),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),S(i.depthTexture,0);const o=r.get(i.depthTexture).__webglTexture,s=k(i);if(1026===i.depthTexture.format)U(i)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,o,0,s):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.TEXTURE_2D,o,0);else{if(1027!==i.depthTexture.format)throw new Error("Unknown depthTexture format");U(i)?a.framebufferTexture2DMultisampleEXT(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,o,0,s):t.framebufferTexture2D(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.TEXTURE_2D,o,0)}}(i.__webglFramebuffer,e)}else if(o){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)if(n.bindFramebuffer(t.FRAMEBUFFER,i.__webglFramebuffer[r]),void 0===i.__webglDepthbuffer[r])i.__webglDepthbuffer[r]=t.createRenderbuffer(),I(i.__webglDepthbuffer[r],e,!1);else{const n=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,o=i.__webglDepthbuffer[r];t.bindRenderbuffer(t.RENDERBUFFER,o),t.framebufferRenderbuffer(t.FRAMEBUFFER,n,t.RENDERBUFFER,o)}}else if(n.bindFramebuffer(t.FRAMEBUFFER,i.__webglFramebuffer),void 0===i.__webglDepthbuffer)i.__webglDepthbuffer=t.createRenderbuffer(),I(i.__webglDepthbuffer,e,!1);else{const n=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,r=i.__webglDepthbuffer;t.bindRenderbuffer(t.RENDERBUFFER,r),t.framebufferRenderbuffer(t.FRAMEBUFFER,n,t.RENDERBUFFER,r)}n.bindFramebuffer(t.FRAMEBUFFER,null)}const N=[],F=[];function k(t){return Math.min(i.maxSamples,t.samples)}function U(t){const n=r.get(t);return t.samples>0&&!0===e.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function B(t,e){const n=t.colorSpace,r=t.format,i=t.type;return!0===t.isCompressedTexture||!0===t.isVideoTexture||"srgb-linear"!==n&&""!==n&&("srgb"===Kg.getTransfer(n)?1023===r&&1009===i||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",n)),e}function G(t){return"undefined"!=typeof HTMLImageElement&&t instanceof HTMLImageElement?(u.width=t.naturalWidth||t.width,u.height=t.naturalHeight||t.height):"undefined"!=typeof VideoFrame&&t instanceof VideoFrame?(u.width=t.displayWidth,u.height=t.displayHeight):(u.width=t.width,u.height=t.height),u}this.allocateTextureUnit=function(){const t=T;return t>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+t+" texture units while this GPU supports only "+i.maxTextures),T+=1,t},this.resetTextureUnits=function(){T=0},this.setTexture2D=S,this.setTexture2DArray=function(e,i){const o=r.get(e);e.version>0&&o.__version!==e.version?O(o,e,i):n.bindTexture(t.TEXTURE_2D_ARRAY,o.__webglTexture,t.TEXTURE0+i)},this.setTexture3D=function(e,i){const o=r.get(e);e.version>0&&o.__version!==e.version?O(o,e,i):n.bindTexture(t.TEXTURE_3D,o.__webglTexture,t.TEXTURE0+i)},this.setTextureCube=function(e,s){const a=r.get(e);e.version>0&&a.__version!==e.version?function(e,s,a){if(6!==s.image.length)return;const l=R(e,s),u=s.source;n.bindTexture(t.TEXTURE_CUBE_MAP,e.__webglTexture,t.TEXTURE0+a);const c=r.get(u);if(u.version!==c.__version||!0===l){n.activeTexture(t.TEXTURE0+a);const e=Kg.getPrimaries(Kg.workingColorSpace),r=""===s.colorSpace?null:Kg.getPrimaries(s.colorSpace),h=""===s.colorSpace||e===r?t.NONE:t.BROWSER_DEFAULT_WEBGL;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,s.flipY),t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,s.premultiplyAlpha),t.pixelStorei(t.UNPACK_ALIGNMENT,s.unpackAlignment),t.pixelStorei(t.UNPACK_COLORSPACE_CONVERSION_WEBGL,h);const d=s.isCompressedTexture||s.image[0].isCompressedTexture,p=s.image[0]&&s.image[0].isDataTexture,f=[];for(let t=0;t<6;t++)f[t]=d||p?p?s.image[t].image:s.image[t]:m(s.image[t],!0,i.maxCubemapSize),f[t]=B(s,f[t]);const _=f[0],x=o.convert(s.format,s.colorSpace),w=o.convert(s.type),E=y(s.internalFormat,x,w,s.colorSpace),T=!0!==s.isVideoTexture,S=void 0===c.__version||!0===l,A=u.dataReady;let M,D=b(s,_);if(C(t.TEXTURE_CUBE_MAP,s),d){T&&S&&n.texStorage2D(t.TEXTURE_CUBE_MAP,D,E,_.width,_.height);for(let e=0;e<6;e++){M=f[e].mipmaps;for(let r=0;r<M.length;r++){const i=M[r];1023!==s.format?null!==x?T?A&&n.compressedTexSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r,0,0,i.width,i.height,x,i.data):n.compressedTexImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r,E,i.width,i.height,0,i.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):T?A&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r,0,0,i.width,i.height,x,w,i.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r,E,i.width,i.height,0,x,w,i.data)}}}else{if(M=s.mipmaps,T&&S){M.length>0&&D++;const e=G(f[0]);n.texStorage2D(t.TEXTURE_CUBE_MAP,D,E,e.width,e.height)}for(let e=0;e<6;e++)if(p){T?A&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,f[e].width,f[e].height,x,w,f[e].data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,E,f[e].width,f[e].height,0,x,w,f[e].data);for(let r=0;r<M.length;r++){const i=M[r].image[e].image;T?A&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r+1,0,0,i.width,i.height,x,w,i.data):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r+1,E,i.width,i.height,0,x,w,i.data)}}else{T?A&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,0,0,x,w,f[e]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,0,E,x,w,f[e]);for(let r=0;r<M.length;r++){const i=M[r];T?A&&n.texSubImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r+1,0,0,x,w,i.image[e]):n.texImage2D(t.TEXTURE_CUBE_MAP_POSITIVE_X+e,r+1,E,x,w,i.image[e])}}}g(s)&&v(t.TEXTURE_CUBE_MAP),c.__version=u.version,s.onUpdate&&s.onUpdate(s)}e.__version=s.version}(a,e,s):n.bindTexture(t.TEXTURE_CUBE_MAP,a.__webglTexture,t.TEXTURE0+s)},this.rebindTextures=function(e,n,i){const o=r.get(e);void 0!==n&&P(o.__webglFramebuffer,e,e.texture,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,0),void 0!==i&&L(e)},this.setupRenderTarget=function(e){const i=e.texture,a=r.get(e),l=r.get(i);e.addEventListener("dispose",w);const u=e.textures,c=!0===e.isWebGLCubeRenderTarget,h=u.length>1;if(h||(void 0===l.__webglTexture&&(l.__webglTexture=t.createTexture()),l.__version=i.version,s.memory.textures++),c){a.__webglFramebuffer=[];for(let e=0;e<6;e++)if(i.mipmaps&&i.mipmaps.length>0){a.__webglFramebuffer[e]=[];for(let n=0;n<i.mipmaps.length;n++)a.__webglFramebuffer[e][n]=t.createFramebuffer()}else a.__webglFramebuffer[e]=t.createFramebuffer()}else{if(i.mipmaps&&i.mipmaps.length>0){a.__webglFramebuffer=[];for(let e=0;e<i.mipmaps.length;e++)a.__webglFramebuffer[e]=t.createFramebuffer()}else a.__webglFramebuffer=t.createFramebuffer();if(h)for(let e=0,n=u.length;e<n;e++){const n=r.get(u[e]);void 0===n.__webglTexture&&(n.__webglTexture=t.createTexture(),s.memory.textures++)}if(e.samples>0&&!1===U(e)){a.__webglMultisampledFramebuffer=t.createFramebuffer(),a.__webglColorRenderbuffer=[],n.bindFramebuffer(t.FRAMEBUFFER,a.__webglMultisampledFramebuffer);for(let n=0;n<u.length;n++){const r=u[n];a.__webglColorRenderbuffer[n]=t.createRenderbuffer(),t.bindRenderbuffer(t.RENDERBUFFER,a.__webglColorRenderbuffer[n]);const i=o.convert(r.format,r.colorSpace),s=o.convert(r.type),l=y(r.internalFormat,i,s,r.colorSpace,!0===e.isXRRenderTarget),c=k(e);t.renderbufferStorageMultisample(t.RENDERBUFFER,c,l,e.width,e.height),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+n,t.RENDERBUFFER,a.__webglColorRenderbuffer[n])}t.bindRenderbuffer(t.RENDERBUFFER,null),e.depthBuffer&&(a.__webglDepthRenderbuffer=t.createRenderbuffer(),I(a.__webglDepthRenderbuffer,e,!0)),n.bindFramebuffer(t.FRAMEBUFFER,null)}}if(c){n.bindTexture(t.TEXTURE_CUBE_MAP,l.__webglTexture),C(t.TEXTURE_CUBE_MAP,i);for(let n=0;n<6;n++)if(i.mipmaps&&i.mipmaps.length>0)for(let r=0;r<i.mipmaps.length;r++)P(a.__webglFramebuffer[n][r],e,i,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+n,r);else P(a.__webglFramebuffer[n],e,i,t.COLOR_ATTACHMENT0,t.TEXTURE_CUBE_MAP_POSITIVE_X+n,0);g(i)&&v(t.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(h){for(let i=0,o=u.length;i<o;i++){const o=u[i],s=r.get(o);n.bindTexture(t.TEXTURE_2D,s.__webglTexture),C(t.TEXTURE_2D,o),P(a.__webglFramebuffer,e,o,t.COLOR_ATTACHMENT0+i,t.TEXTURE_2D,0),g(o)&&v(t.TEXTURE_2D)}n.unbindTexture()}else{let r=t.TEXTURE_2D;if((e.isWebGL3DRenderTarget||e.isWebGLArrayRenderTarget)&&(r=e.isWebGL3DRenderTarget?t.TEXTURE_3D:t.TEXTURE_2D_ARRAY),n.bindTexture(r,l.__webglTexture),C(r,i),i.mipmaps&&i.mipmaps.length>0)for(let n=0;n<i.mipmaps.length;n++)P(a.__webglFramebuffer[n],e,i,t.COLOR_ATTACHMENT0,r,n);else P(a.__webglFramebuffer,e,i,t.COLOR_ATTACHMENT0,r,0);g(i)&&v(r),n.unbindTexture()}e.depthBuffer&&L(e)},this.updateRenderTargetMipmap=function(e){const i=e.textures;for(let o=0,s=i.length;o<s;o++){const s=i[o];if(g(s)){const i=e.isWebGLCubeRenderTarget?t.TEXTURE_CUBE_MAP:t.TEXTURE_2D,o=r.get(s).__webglTexture;n.bindTexture(i,o),v(i),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(e){if(e.samples>0)if(!1===U(e)){const i=e.textures,o=e.width,s=e.height;let a=t.COLOR_BUFFER_BIT;const u=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT,c=r.get(e),h=i.length>1;if(h)for(let e=0;e<i.length;e++)n.bindFramebuffer(t.FRAMEBUFFER,c.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.RENDERBUFFER,null),n.bindFramebuffer(t.FRAMEBUFFER,c.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.TEXTURE_2D,null,0);n.bindFramebuffer(t.READ_FRAMEBUFFER,c.__webglMultisampledFramebuffer),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,c.__webglFramebuffer);for(let n=0;n<i.length;n++){if(e.resolveDepthBuffer&&(e.depthBuffer&&(a|=t.DEPTH_BUFFER_BIT),e.stencilBuffer&&e.resolveStencilBuffer&&(a|=t.STENCIL_BUFFER_BIT)),h){t.framebufferRenderbuffer(t.READ_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.RENDERBUFFER,c.__webglColorRenderbuffer[n]);const e=r.get(i[n]).__webglTexture;t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0)}t.blitFramebuffer(0,0,o,s,0,0,o,s,a,t.NEAREST),!0===l&&(N.length=0,F.length=0,N.push(t.COLOR_ATTACHMENT0+n),e.depthBuffer&&!1===e.resolveDepthBuffer&&(N.push(u),F.push(u),t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,F)),t.invalidateFramebuffer(t.READ_FRAMEBUFFER,N))}if(n.bindFramebuffer(t.READ_FRAMEBUFFER,null),n.bindFramebuffer(t.DRAW_FRAMEBUFFER,null),h)for(let e=0;e<i.length;e++){n.bindFramebuffer(t.FRAMEBUFFER,c.__webglMultisampledFramebuffer),t.framebufferRenderbuffer(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.RENDERBUFFER,c.__webglColorRenderbuffer[e]);const o=r.get(i[e]).__webglTexture;n.bindFramebuffer(t.FRAMEBUFFER,c.__webglFramebuffer),t.framebufferTexture2D(t.DRAW_FRAMEBUFFER,t.COLOR_ATTACHMENT0+e,t.TEXTURE_2D,o,0)}n.bindFramebuffer(t.DRAW_FRAMEBUFFER,c.__webglMultisampledFramebuffer)}else if(e.depthBuffer&&!1===e.resolveDepthBuffer&&l){const n=e.stencilBuffer?t.DEPTH_STENCIL_ATTACHMENT:t.DEPTH_ATTACHMENT;t.invalidateFramebuffer(t.DRAW_FRAMEBUFFER,[n])}},this.setupDepthRenderbuffer=L,this.setupFrameBufferTexture=P,this.useMultisampledRTT=U}function cw(t,e){return{convert:function(n,r=""){let i;const o=Kg.getTransfer(r);if(1009===n)return t.UNSIGNED_BYTE;if(1017===n)return t.UNSIGNED_SHORT_4_4_4_4;if(1018===n)return t.UNSIGNED_SHORT_5_5_5_1;if(35902===n)return t.UNSIGNED_INT_5_9_9_9_REV;if(1010===n)return t.BYTE;if(1011===n)return t.SHORT;if(1012===n)return t.UNSIGNED_SHORT;if(1013===n)return t.INT;if(1014===n)return t.UNSIGNED_INT;if(1015===n)return t.FLOAT;if(1016===n)return t.HALF_FLOAT;if(1021===n)return t.ALPHA;if(1022===n)return t.RGB;if(1023===n)return t.RGBA;if(1024===n)return t.LUMINANCE;if(1025===n)return t.LUMINANCE_ALPHA;if(1026===n)return t.DEPTH_COMPONENT;if(1027===n)return t.DEPTH_STENCIL;if(1028===n)return t.RED;if(1029===n)return t.RED_INTEGER;if(1030===n)return t.RG;if(1031===n)return t.RG_INTEGER;if(1033===n)return t.RGBA_INTEGER;if(33776===n||33777===n||33778===n||33779===n)if("srgb"===o){if(i=e.get("WEBGL_compressed_texture_s3tc_srgb"),null===i)return null;if(33776===n)return i.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(33777===n)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(33778===n)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(33779===n)return i.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(i=e.get("WEBGL_compressed_texture_s3tc"),null===i)return null;if(33776===n)return i.COMPRESSED_RGB_S3TC_DXT1_EXT;if(33777===n)return i.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(33778===n)return i.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(33779===n)return i.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(35840===n||35841===n||35842===n||35843===n){if(i=e.get("WEBGL_compressed_texture_pvrtc"),null===i)return null;if(35840===n)return i.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(35841===n)return i.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(35842===n)return i.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(35843===n)return i.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(36196===n||37492===n||37496===n){if(i=e.get("WEBGL_compressed_texture_etc"),null===i)return null;if(36196===n||37492===n)return"srgb"===o?i.COMPRESSED_SRGB8_ETC2:i.COMPRESSED_RGB8_ETC2;if(37496===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:i.COMPRESSED_RGBA8_ETC2_EAC}if(37808===n||37809===n||37810===n||37811===n||37812===n||37813===n||37814===n||37815===n||37816===n||37817===n||37818===n||37819===n||37820===n||37821===n){if(i=e.get("WEBGL_compressed_texture_astc"),null===i)return null;if(37808===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:i.COMPRESSED_RGBA_ASTC_4x4_KHR;if(37809===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:i.COMPRESSED_RGBA_ASTC_5x4_KHR;if(37810===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:i.COMPRESSED_RGBA_ASTC_5x5_KHR;if(37811===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:i.COMPRESSED_RGBA_ASTC_6x5_KHR;if(37812===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:i.COMPRESSED_RGBA_ASTC_6x6_KHR;if(37813===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:i.COMPRESSED_RGBA_ASTC_8x5_KHR;if(37814===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:i.COMPRESSED_RGBA_ASTC_8x6_KHR;if(37815===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:i.COMPRESSED_RGBA_ASTC_8x8_KHR;if(37816===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:i.COMPRESSED_RGBA_ASTC_10x5_KHR;if(37817===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:i.COMPRESSED_RGBA_ASTC_10x6_KHR;if(37818===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:i.COMPRESSED_RGBA_ASTC_10x8_KHR;if(37819===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:i.COMPRESSED_RGBA_ASTC_10x10_KHR;if(37820===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:i.COMPRESSED_RGBA_ASTC_12x10_KHR;if(37821===n)return"srgb"===o?i.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:i.COMPRESSED_RGBA_ASTC_12x12_KHR}if(36492===n||36494===n||36495===n){if(i=e.get("EXT_texture_compression_bptc"),null===i)return null;if(36492===n)return"srgb"===o?i.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:i.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(36494===n)return i.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(36495===n)return i.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}if(36283===n||36284===n||36285===n||36286===n){if(i=e.get("EXT_texture_compression_rgtc"),null===i)return null;if(36492===n)return i.COMPRESSED_RED_RGTC1_EXT;if(36284===n)return i.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(36285===n)return i.COMPRESSED_RED_GREEN_RGTC2_EXT;if(36286===n)return i.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return 1020===n?t.UNSIGNED_INT_24_8:void 0!==t[n]?t[n]:null}}}class hw extends x_{constructor(t=[]){super(),this.isArrayCamera=!0,this.cameras=t}}class dw extends fy{constructor(){super(),this.isGroup=!0,this.type="Group"}}const pw={type:"move"};class fw{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new dw,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new dw,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new hv,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new hv),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new dw,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new hv,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new hv),this._grip}dispatchEvent(t){return null!==this._targetRay&&this._targetRay.dispatchEvent(t),null!==this._grip&&this._grip.dispatchEvent(t),null!==this._hand&&this._hand.dispatchEvent(t),this}connect(t){if(t&&t.hand){const e=this._hand;if(e)for(const n of t.hand.values())this._getHandJoint(e,n)}return this.dispatchEvent({type:"connected",data:t}),this}disconnect(t){return this.dispatchEvent({type:"disconnected",data:t}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(t,e,n){let r=null,i=null,o=null;const s=this._targetRay,a=this._grip,l=this._hand;if(t&&"visible-blurred"!==e.session.visibilityState){if(l&&t.hand){o=!0;for(const r of t.hand.values()){const t=e.getJointPose(r,n),i=this._getHandJoint(l,r);null!==t&&(i.matrix.fromArray(t.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.matrixWorldNeedsUpdate=!0,i.jointRadius=t.radius),i.visible=null!==t}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position),a=.02,u=.005;l.inputState.pinching&&s>a+u?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!l.inputState.pinching&&s<=a-u&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else null!==a&&t.gripSpace&&(i=e.getPose(t.gripSpace,n),null!==i&&(a.matrix.fromArray(i.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,i.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(i.linearVelocity)):a.hasLinearVelocity=!1,i.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(i.angularVelocity)):a.hasAngularVelocity=!1));null!==s&&(r=e.getPose(t.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(pw)))}return null!==s&&(s.visible=null!==r),null!==a&&(a.visible=null!==i),null!==l&&(l.visible=null!==o),this}_getHandJoint(t,e){if(void 0===t.joints[e.jointName]){const n=new dw;n.matrixAutoUpdate=!1,n.visible=!1,t.joints[e.jointName]=n,t.add(n)}return t.joints[e.jointName]}}class mw{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(t,e,n){if(null===this.texture){const r=new iv;t.properties.get(r).__webglTexture=e.texture,e.depthNear==n.depthNear&&e.depthFar==n.depthFar||(this.depthNear=e.depthNear,this.depthFar=e.depthFar),this.texture=r}}getMesh(t){if(null!==this.texture&&null===this.mesh){const e=t.cameras[0].viewport,n=new g_({vertexShader:"\nvoid main() {\n\n\tgl_Position = vec4( position, 1.0 );\n\n}",fragmentShader:"\nuniform sampler2DArray depthColor;\nuniform float depthWidth;\nuniform float depthHeight;\n\nvoid main() {\n\n\tvec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight );\n\n\tif ( coord.x >= 1.0 ) {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r;\n\n\t} else {\n\n\t\tgl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r;\n\n\t}\n\n}",uniforms:{depthColor:{value:this.texture},depthWidth:{value:e.z},depthHeight:{value:e.w}}});this.mesh=new u_(new L_(20,20),n)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class gw extends Dg{constructor(t,e){super();const n=this;let r=null,i=1,o=null,s="local-floor",a=1,l=null,u=null,c=null,h=null,d=null,p=null;const f=new mw,m=e.getContextAttributes();let g=null,v=null;const y=[],_=[],b=new Ug;let x=null;const w=new x_;w.layers.enable(1),w.viewport=new ov;const E=new x_;E.layers.enable(2),E.viewport=new ov;const T=[w,E],S=new hw;S.layers.enable(1),S.layers.enable(2);let A=null,M=null;function D(t){const e=_.indexOf(t.inputSource);if(-1===e)return;const n=y[e];void 0!==n&&(n.update(t.inputSource,t.frame,l||o),n.dispatchEvent({type:t.type,data:t.inputSource}))}function C(){r.removeEventListener("select",D),r.removeEventListener("selectstart",D),r.removeEventListener("selectend",D),r.removeEventListener("squeeze",D),r.removeEventListener("squeezestart",D),r.removeEventListener("squeezeend",D),r.removeEventListener("end",C),r.removeEventListener("inputsourceschange",R);for(let t=0;t<y.length;t++){const e=_[t];null!==e&&(_[t]=null,y[t].disconnect(e))}A=null,M=null,f.reset(),t.setRenderTarget(g),d=null,h=null,c=null,r=null,v=null,N.stop(),n.isPresenting=!1,t.setPixelRatio(x),t.setSize(b.width,b.height,!1),n.dispatchEvent({type:"sessionend"})}function R(t){for(let e=0;e<t.removed.length;e++){const n=t.removed[e],r=_.indexOf(n);r>=0&&(_[r]=null,y[r].disconnect(n))}for(let e=0;e<t.added.length;e++){const n=t.added[e];let r=_.indexOf(n);if(-1===r){for(let t=0;t<y.length;t++){if(t>=_.length){_.push(n),r=t;break}if(null===_[t]){_[t]=n,r=t;break}}if(-1===r)break}const i=y[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(t){let e=y[t];return void 0===e&&(e=new fw,y[t]=e),e.getTargetRaySpace()},this.getControllerGrip=function(t){let e=y[t];return void 0===e&&(e=new fw,y[t]=e),e.getGripSpace()},this.getHand=function(t){let e=y[t];return void 0===e&&(e=new fw,y[t]=e),e.getHandSpace()},this.setFramebufferScaleFactor=function(t){i=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(t){s=t,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return l||o},this.setReferenceSpace=function(t){l=t},this.getBaseLayer=function(){return null!==h?h:d},this.getBinding=function(){return c},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(u){if(r=u,null!==r){if(g=t.getRenderTarget(),r.addEventListener("select",D),r.addEventListener("selectstart",D),r.addEventListener("selectend",D),r.addEventListener("squeeze",D),r.addEventListener("squeezestart",D),r.addEventListener("squeezeend",D),r.addEventListener("end",C),r.addEventListener("inputsourceschange",R),!0!==m.xrCompatible&&await e.makeXRCompatible(),x=t.getPixelRatio(),t.getSize(b),void 0===r.renderState.layers){const n={antialias:m.antialias,alpha:!0,depth:m.depth,stencil:m.stencil,framebufferScaleFactor:i};d=new XRWebGLLayer(r,e,n),r.updateRenderState({baseLayer:d}),t.setPixelRatio(1),t.setSize(d.framebufferWidth,d.framebufferHeight,!1),v=new av(d.framebufferWidth,d.framebufferHeight,{format:1023,type:1009,colorSpace:t.outputColorSpace,stencilBuffer:m.stencil})}else{let n=null,o=null,s=null;m.depth&&(s=m.stencil?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT24,n=m.stencil?1027:1026,o=m.stencil?1020:1014);const a={colorFormat:e.RGBA8,depthFormat:s,scaleFactor:i};c=new XRWebGLBinding(r,e),h=c.createProjectionLayer(a),r.updateRenderState({layers:[h]}),t.setPixelRatio(1),t.setSize(h.textureWidth,h.textureHeight,!1),v=new av(h.textureWidth,h.textureHeight,{format:1023,type:1009,depthTexture:new vb(h.textureWidth,h.textureHeight,o,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:m.stencil,colorSpace:t.outputColorSpace,samples:m.antialias?4:0,resolveDepthBuffer:!1===h.ignoreDepthValues})}v.isXRRenderTarget=!0,this.setFoveation(a),l=null,o=await r.requestReferenceSpace(s),N.setContext(r),N.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode},this.getDepthTexture=function(){return f.getDepthTexture()};const O=new hv,P=new hv;function I(t,e){null===e?t.matrixWorld.copy(t.matrix):t.matrixWorld.multiplyMatrices(e.matrixWorld,t.matrix),t.matrixWorldInverse.copy(t.matrixWorld).invert()}this.updateCamera=function(t){if(null===r)return;let e=t.near,n=t.far;null!==f.texture&&(f.depthNear>0&&(e=f.depthNear),f.depthFar>0&&(n=f.depthFar)),S.near=E.near=w.near=e,S.far=E.far=w.far=n,A===S.near&&M===S.far||(r.updateRenderState({depthNear:S.near,depthFar:S.far}),A=S.near,M=S.far);const i=t.parent,o=S.cameras;I(S,i);for(let t=0;t<o.length;t++)I(o[t],i);2===o.length?function(t,e,n){O.setFromMatrixPosition(e.matrixWorld),P.setFromMatrixPosition(n.matrixWorld);const r=O.distanceTo(P),i=e.projectionMatrix.elements,o=n.projectionMatrix.elements,s=i[14]/(i[10]-1),a=i[14]/(i[10]+1),l=(i[9]+1)/i[5],u=(i[9]-1)/i[5],c=(i[8]-1)/i[0],h=(o[8]+1)/o[0],d=s*c,p=s*h,f=r/(-c+h),m=f*-c;if(e.matrixWorld.decompose(t.position,t.quaternion,t.scale),t.translateX(m),t.translateZ(f),t.matrixWorld.compose(t.position,t.quaternion,t.scale),t.matrixWorldInverse.copy(t.matrixWorld).invert(),-1===i[10])t.projectionMatrix.copy(e.projectionMatrix),t.projectionMatrixInverse.copy(e.projectionMatrixInverse);else{const e=s+f,n=a+f,i=d-m,o=p+(r-m),c=l*a/n*e,h=u*a/n*e;t.projectionMatrix.makePerspective(i,o,c,h,e,n),t.projectionMatrixInverse.copy(t.projectionMatrix).invert()}}(S,w,E):S.projectionMatrix.copy(w.projectionMatrix),function(t,e,n){null===n?t.matrix.copy(e.matrixWorld):(t.matrix.copy(n.matrixWorld),t.matrix.invert(),t.matrix.multiply(e.matrixWorld));t.matrix.decompose(t.position,t.quaternion,t.scale),t.updateMatrixWorld(!0),t.projectionMatrix.copy(e.projectionMatrix),t.projectionMatrixInverse.copy(e.projectionMatrixInverse),t.isPerspectiveCamera&&(t.fov=2*Og*Math.atan(1/t.projectionMatrix.elements[5]),t.zoom=1)}(t,S,i)},this.getCamera=function(){return S},this.getFoveation=function(){if(null!==h||null!==d)return a},this.setFoveation=function(t){a=t,null!==h&&(h.fixedFoveation=t),null!==d&&void 0!==d.fixedFoveation&&(d.fixedFoveation=t)},this.hasDepthSensing=function(){return null!==f.texture},this.getDepthSensingMesh=function(){return f.getMesh(S)};let L=null;const N=new P_;N.setAnimationLoop((function(e,i){if(u=i.getViewerPose(l||o),p=i,null!==u){const e=u.views;null!==d&&(t.setRenderTargetFramebuffer(v,d.framebuffer),t.setRenderTarget(v));let n=!1;e.length!==S.cameras.length&&(S.cameras.length=0,n=!0);for(let r=0;r<e.length;r++){const i=e[r];let o=null;if(null!==d)o=d.getViewport(i);else{const e=c.getViewSubImage(h,i);o=e.viewport,0===r&&(t.setRenderTargetTextures(v,e.colorTexture,h.ignoreDepthValues?void 0:e.depthStencilTexture),t.setRenderTarget(v))}let s=T[r];void 0===s&&(s=new x_,s.layers.enable(r),s.viewport=new ov,T[r]=s),s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.quaternion,s.scale),s.projectionMatrix.fromArray(i.projectionMatrix),s.projectionMatrixInverse.copy(s.projectionMatrix).invert(),s.viewport.set(o.x,o.y,o.width,o.height),0===r&&(S.matrix.copy(s.matrix),S.matrix.decompose(S.position,S.quaternion,S.scale)),!0===n&&S.cameras.push(s)}const i=r.enabledFeatures;if(i&&i.includes("depth-sensing")){const n=c.getDepthInformation(e[0]);n&&n.isValid&&n.texture&&f.init(t,n,r.renderState)}}for(let t=0;t<y.length;t++){const e=_[t],n=y[t];null!==e&&void 0!==n&&n.update(e,i,l||o)}L&&L(e,i),i.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:i}),p=null})),this.setAnimationLoop=function(t){L=t},this.dispose=function(){}}}const vw=new Zv,yw=new zv;function _w(t,e){function n(t,e){!0===t.matrixAutoUpdate&&t.updateMatrix(),e.value.copy(t.matrix)}function r(t,r){t.opacity.value=r.opacity,r.color&&t.diffuse.value.copy(r.color),r.emissive&&t.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(t.map.value=r.map,n(r.map,t.mapTransform)),r.alphaMap&&(t.alphaMap.value=r.alphaMap,n(r.alphaMap,t.alphaMapTransform)),r.bumpMap&&(t.bumpMap.value=r.bumpMap,n(r.bumpMap,t.bumpMapTransform),t.bumpScale.value=r.bumpScale,1===r.side&&(t.bumpScale.value*=-1)),r.normalMap&&(t.normalMap.value=r.normalMap,n(r.normalMap,t.normalMapTransform),t.normalScale.value.copy(r.normalScale),1===r.side&&t.normalScale.value.negate()),r.displacementMap&&(t.displacementMap.value=r.displacementMap,n(r.displacementMap,t.displacementMapTransform),t.displacementScale.value=r.displacementScale,t.displacementBias.value=r.displacementBias),r.emissiveMap&&(t.emissiveMap.value=r.emissiveMap,n(r.emissiveMap,t.emissiveMapTransform)),r.specularMap&&(t.specularMap.value=r.specularMap,n(r.specularMap,t.specularMapTransform)),r.alphaTest>0&&(t.alphaTest.value=r.alphaTest);const i=e.get(r),o=i.envMap,s=i.envMapRotation;o&&(t.envMap.value=o,vw.copy(s),vw.x*=-1,vw.y*=-1,vw.z*=-1,o.isCubeTexture&&!1===o.isRenderTargetTexture&&(vw.y*=-1,vw.z*=-1),t.envMapRotation.value.setFromMatrix4(yw.makeRotationFromEuler(vw)),t.flipEnvMap.value=o.isCubeTexture&&!1===o.isRenderTargetTexture?-1:1,t.reflectivity.value=r.reflectivity,t.ior.value=r.ior,t.refractionRatio.value=r.refractionRatio),r.lightMap&&(t.lightMap.value=r.lightMap,t.lightMapIntensity.value=r.lightMapIntensity,n(r.lightMap,t.lightMapTransform)),r.aoMap&&(t.aoMap.value=r.aoMap,t.aoMapIntensity.value=r.aoMapIntensity,n(r.aoMap,t.aoMapTransform))}return{refreshFogUniforms:function(e,n){n.color.getRGB(e.fogColor.value,f_(t)),n.isFog?(e.fogNear.value=n.near,e.fogFar.value=n.far):n.isFogExp2&&(e.fogDensity.value=n.density)},refreshMaterialUniforms:function(t,i,o,s,a){i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(t,i):i.isMeshToonMaterial?(r(t,i),function(t,e){e.gradientMap&&(t.gradientMap.value=e.gradientMap)}(t,i)):i.isMeshPhongMaterial?(r(t,i),function(t,e){t.specular.value.copy(e.specular),t.shininess.value=Math.max(e.shininess,1e-4)}(t,i)):i.isMeshStandardMaterial?(r(t,i),function(t,e){t.metalness.value=e.metalness,e.metalnessMap&&(t.metalnessMap.value=e.metalnessMap,n(e.metalnessMap,t.metalnessMapTransform));t.roughness.value=e.roughness,e.roughnessMap&&(t.roughnessMap.value=e.roughnessMap,n(e.roughnessMap,t.roughnessMapTransform));e.envMap&&(t.envMapIntensity.value=e.envMapIntensity)}(t,i),i.isMeshPhysicalMaterial&&function(t,e,r){t.ior.value=e.ior,e.sheen>0&&(t.sheenColor.value.copy(e.sheenColor).multiplyScalar(e.sheen),t.sheenRoughness.value=e.sheenRoughness,e.sheenColorMap&&(t.sheenColorMap.value=e.sheenColorMap,n(e.sheenColorMap,t.sheenColorMapTransform)),e.sheenRoughnessMap&&(t.sheenRoughnessMap.value=e.sheenRoughnessMap,n(e.sheenRoughnessMap,t.sheenRoughnessMapTransform)));e.clearcoat>0&&(t.clearcoat.value=e.clearcoat,t.clearcoatRoughness.value=e.clearcoatRoughness,e.clearcoatMap&&(t.clearcoatMap.value=e.clearcoatMap,n(e.clearcoatMap,t.clearcoatMapTransform)),e.clearcoatRoughnessMap&&(t.clearcoatRoughnessMap.value=e.clearcoatRoughnessMap,n(e.clearcoatRoughnessMap,t.clearcoatRoughnessMapTransform)),e.clearcoatNormalMap&&(t.clearcoatNormalMap.value=e.clearcoatNormalMap,n(e.clearcoatNormalMap,t.clearcoatNormalMapTransform),t.clearcoatNormalScale.value.copy(e.clearcoatNormalScale),1===e.side&&t.clearcoatNormalScale.value.negate()));e.dispersion>0&&(t.dispersion.value=e.dispersion);e.iridescence>0&&(t.iridescence.value=e.iridescence,t.iridescenceIOR.value=e.iridescenceIOR,t.iridescenceThicknessMinimum.value=e.iridescenceThicknessRange[0],t.iridescenceThicknessMaximum.value=e.iridescenceThicknessRange[1],e.iridescenceMap&&(t.iridescenceMap.value=e.iridescenceMap,n(e.iridescenceMap,t.iridescenceMapTransform)),e.iridescenceThicknessMap&&(t.iridescenceThicknessMap.value=e.iridescenceThicknessMap,n(e.iridescenceThicknessMap,t.iridescenceThicknessMapTransform)));e.transmission>0&&(t.transmission.value=e.transmission,t.transmissionSamplerMap.value=r.texture,t.transmissionSamplerSize.value.set(r.width,r.height),e.transmissionMap&&(t.transmissionMap.value=e.transmissionMap,n(e.transmissionMap,t.transmissionMapTransform)),t.thickness.value=e.thickness,e.thicknessMap&&(t.thicknessMap.value=e.thicknessMap,n(e.thicknessMap,t.thicknessMapTransform)),t.attenuationDistance.value=e.attenuationDistance,t.attenuationColor.value.copy(e.attenuationColor));e.anisotropy>0&&(t.anisotropyVector.value.set(e.anisotropy*Math.cos(e.anisotropyRotation),e.anisotropy*Math.sin(e.anisotropyRotation)),e.anisotropyMap&&(t.anisotropyMap.value=e.anisotropyMap,n(e.anisotropyMap,t.anisotropyMapTransform)));t.specularIntensity.value=e.specularIntensity,t.specularColor.value.copy(e.specularColor),e.specularColorMap&&(t.specularColorMap.value=e.specularColorMap,n(e.specularColorMap,t.specularColorMapTransform));e.specularIntensityMap&&(t.specularIntensityMap.value=e.specularIntensityMap,n(e.specularIntensityMap,t.specularIntensityMapTransform))}(t,i,a)):i.isMeshMatcapMaterial?(r(t,i),function(t,e){e.matcap&&(t.matcap.value=e.matcap)}(t,i)):i.isMeshDepthMaterial?r(t,i):i.isMeshDistanceMaterial?(r(t,i),function(t,n){const r=e.get(n).light;t.referencePosition.value.setFromMatrixPosition(r.matrixWorld),t.nearDistance.value=r.shadow.camera.near,t.farDistance.value=r.shadow.camera.far}(t,i)):i.isMeshNormalMaterial?r(t,i):i.isLineBasicMaterial?(function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,e.map&&(t.map.value=e.map,n(e.map,t.mapTransform))}(t,i),i.isLineDashedMaterial&&function(t,e){t.dashSize.value=e.dashSize,t.totalSize.value=e.dashSize+e.gapSize,t.scale.value=e.scale}(t,i)):i.isPointsMaterial?function(t,e,r,i){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.size.value=e.size*r,t.scale.value=.5*i,e.map&&(t.map.value=e.map,n(e.map,t.uvTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,n(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,i,o,s):i.isSpriteMaterial?function(t,e){t.diffuse.value.copy(e.color),t.opacity.value=e.opacity,t.rotation.value=e.rotation,e.map&&(t.map.value=e.map,n(e.map,t.mapTransform));e.alphaMap&&(t.alphaMap.value=e.alphaMap,n(e.alphaMap,t.alphaMapTransform));e.alphaTest>0&&(t.alphaTest.value=e.alphaTest)}(t,i):i.isShadowMaterial?(t.color.value.copy(i.color),t.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function bw(t,e,n,r){let i={},o={},s=[];const a=t.getParameter(t.MAX_UNIFORM_BUFFER_BINDINGS);function l(t,e,n,r){const i=t.value,o=e+"_"+n;if(void 0===r[o])return r[o]="number"==typeof i||"boolean"==typeof i?i:i.clone(),!0;{const t=r[o];if("number"==typeof i||"boolean"==typeof i){if(t!==i)return r[o]=i,!0}else if(!1===t.equals(i))return t.copy(i),!0}return!1}function u(t){const e={boundary:0,storage:0};return"number"==typeof t||"boolean"==typeof t?(e.boundary=4,e.storage=4):t.isVector2?(e.boundary=8,e.storage=8):t.isVector3||t.isColor?(e.boundary=16,e.storage=12):t.isVector4?(e.boundary=16,e.storage=16):t.isMatrix3?(e.boundary=48,e.storage=48):t.isMatrix4?(e.boundary=64,e.storage=64):t.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",t),e}function c(e){const n=e.target;n.removeEventListener("dispose",c);const r=s.indexOf(n.__bindingPointIndex);s.splice(r,1),t.deleteBuffer(i[n.id]),delete i[n.id],delete o[n.id]}return{bind:function(t,e){const n=e.program;r.uniformBlockBinding(t,n)},update:function(n,h){let d=i[n.id];void 0===d&&(!function(t){const e=t.uniforms;let n=0;for(let t=0,r=e.length;t<r;t++){const r=Array.isArray(e[t])?e[t]:[e[t]];for(let t=0,e=r.length;t<e;t++){const e=r[t],i=Array.isArray(e.value)?e.value:[e.value];for(let t=0,r=i.length;t<r;t++){const r=u(i[t]),o=n%16,s=o%r.boundary,a=o+s;n+=s,0!==a&&16-a<r.storage&&(n+=16-a),e.__data=new Float32Array(r.storage/Float32Array.BYTES_PER_ELEMENT),e.__offset=n,n+=r.storage}}}const r=n%16;r>0&&(n+=16-r);t.__size=n,t.__cache={}}(n),d=function(e){const n=function(){for(let t=0;t<a;t++)if(-1===s.indexOf(t))return s.push(t),t;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();e.__bindingPointIndex=n;const r=t.createBuffer(),i=e.__size,o=e.usage;return t.bindBuffer(t.UNIFORM_BUFFER,r),t.bufferData(t.UNIFORM_BUFFER,i,o),t.bindBuffer(t.UNIFORM_BUFFER,null),t.bindBufferBase(t.UNIFORM_BUFFER,n,r),r}(n),i[n.id]=d,n.addEventListener("dispose",c));const p=h.program;r.updateUBOMapping(n,p);const f=e.render.frame;o[n.id]!==f&&(!function(e){const n=i[e.id],r=e.uniforms,o=e.__cache;t.bindBuffer(t.UNIFORM_BUFFER,n);for(let e=0,n=r.length;e<n;e++){const n=Array.isArray(r[e])?r[e]:[r[e]];for(let r=0,i=n.length;r<i;r++){const i=n[r];if(!0===l(i,e,r,o)){const e=i.__offset,n=Array.isArray(i.value)?i.value:[i.value];let r=0;for(let o=0;o<n.length;o++){const s=n[o],a=u(s);"number"==typeof s||"boolean"==typeof s?(i.__data[0]=s,t.bufferSubData(t.UNIFORM_BUFFER,e+r,i.__data)):s.isMatrix3?(i.__data[0]=s.elements[0],i.__data[1]=s.elements[1],i.__data[2]=s.elements[2],i.__data[3]=0,i.__data[4]=s.elements[3],i.__data[5]=s.elements[4],i.__data[6]=s.elements[5],i.__data[7]=0,i.__data[8]=s.elements[6],i.__data[9]=s.elements[7],i.__data[10]=s.elements[8],i.__data[11]=0):(s.toArray(i.__data,r),r+=a.storage/Float32Array.BYTES_PER_ELEMENT)}t.bufferSubData(t.UNIFORM_BUFFER,e,i.__data)}}}t.bindBuffer(t.UNIFORM_BUFFER,null)}(n),o[n.id]=f)},dispose:function(){for(const e in i)t.deleteBuffer(i[e]);s=[],i={},o={}}}}class xw{constructor(t={}){const{canvas:e=jg(),context:n=null,depth:r=!0,stencil:i=!1,alpha:o=!1,antialias:s=!1,premultipliedAlpha:a=!0,preserveDrawingBuffer:l=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:c=!1}=t;let h;if(this.isWebGLRenderer=!0,null!==n){if("undefined"!=typeof WebGLRenderingContext&&n instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");h=n.getContextAttributes().alpha}else h=o;const d=new Uint32Array(4),p=new Int32Array(4);let f=null,m=null;const g=[],v=[];this.domElement=e,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace="srgb",this.toneMapping=0,this.toneMappingExposure=1;const y=this;let _=!1,b=0,x=0,w=null,E=-1,T=null;const S=new ov,A=new ov;let M=null;const D=new Iy(0);let C=0,R=e.width,O=e.height,P=1,I=null,L=null;const N=new ov(0,0,R,O),F=new ov(0,0,R,O);let k=!1;const U=new O_;let B=!1,G=!1;const z=new zv,H=new zv,j=new hv,V=new ov,X={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let W=!1;function Y(){return null===w?P:1}let q,$,K,Z,J,Q,tt,et,nt,rt,it,ot,st,at,lt,ut,ct,ht,dt,pt,ft,mt,gt,vt,yt=n;function _t(t,n){return e.getContext(t,n)}try{const t={alpha:!0,depth:r,stencil:i,antialias:s,premultipliedAlpha:a,preserveDrawingBuffer:l,powerPreference:u,failIfMajorPerformanceCaveat:c};if("setAttribute"in e&&e.setAttribute("data-engine","three.js r169"),e.addEventListener("webglcontextlost",wt,!1),e.addEventListener("webglcontextrestored",Et,!1),e.addEventListener("webglcontextcreationerror",Tt,!1),null===yt){const e="webgl2";if(yt=_t(e,t),null===yt)throw _t(e)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(t){throw console.error("THREE.WebGLRenderer: "+t.message),t}function bt(){q=new hb(yt),q.init(),mt=new cw(yt,q),$=new V_(yt,q,t,mt),K=new aw(yt),$.reverseDepthBuffer&&K.buffers.depth.setReversed(!0),Z=new fb(yt),J=new Wx,Q=new uw(yt,q,K,J,$,mt,Z),tt=new W_(y),et=new cb(y),nt=new I_(yt),gt=new H_(yt,nt),rt=new db(yt,nt,Z,gt),it=new gb(yt,rt,nt,Z),dt=new mb(yt,$,Q),ut=new X_(J),ot=new Xx(y,tt,et,q,$,gt,ut),st=new _w(y,J),at=new Kx,lt=new nw(q),ht=new z_(y,tt,et,K,it,h,a),ct=new ow(y,it,$),vt=new bw(yt,Z,$,K),pt=new j_(yt,q,Z),ft=new pb(yt,q,Z),Z.programs=ot.programs,y.capabilities=$,y.extensions=q,y.properties=J,y.renderLists=at,y.shadowMap=ct,y.state=K,y.info=Z}bt();const xt=new gw(y,yt);function wt(t){t.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),_=!0}function Et(){console.log("THREE.WebGLRenderer: Context Restored."),_=!1;const t=Z.autoReset,e=ct.enabled,n=ct.autoUpdate,r=ct.needsUpdate,i=ct.type;bt(),Z.autoReset=t,ct.enabled=e,ct.autoUpdate=n,ct.needsUpdate=r,ct.type=i}function Tt(t){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",t.statusMessage)}function St(t){const e=t.target;e.removeEventListener("dispose",St),function(t){(function(t){const e=J.get(t).programs;void 0!==e&&(e.forEach((function(t){ot.releaseProgram(t)})),t.isShaderMaterial&&ot.releaseShaderCache(t))})(t),J.remove(t)}(e)}function At(t,e,n){!0===t.transparent&&2===t.side&&!1===t.forceSinglePass?(t.side=1,t.needsUpdate=!0,Ft(t,e,n),t.side=0,t.needsUpdate=!0,Ft(t,e,n),t.side=2):Ft(t,e,n)}this.xr=xt,this.getContext=function(){return yt},this.getContextAttributes=function(){return yt.getContextAttributes()},this.forceContextLoss=function(){const t=q.get("WEBGL_lose_context");t&&t.loseContext()},this.forceContextRestore=function(){const t=q.get("WEBGL_lose_context");t&&t.restoreContext()},this.getPixelRatio=function(){return P},this.setPixelRatio=function(t){void 0!==t&&(P=t,this.setSize(R,O,!1))},this.getSize=function(t){return t.set(R,O)},this.setSize=function(t,n,r=!0){xt.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(R=t,O=n,e.width=Math.floor(t*P),e.height=Math.floor(n*P),!0===r&&(e.style.width=t+"px",e.style.height=n+"px"),this.setViewport(0,0,t,n))},this.getDrawingBufferSize=function(t){return t.set(R*P,O*P).floor()},this.setDrawingBufferSize=function(t,n,r){R=t,O=n,P=r,e.width=Math.floor(t*r),e.height=Math.floor(n*r),this.setViewport(0,0,t,n)},this.getCurrentViewport=function(t){return t.copy(S)},this.getViewport=function(t){return t.copy(N)},this.setViewport=function(t,e,n,r){t.isVector4?N.set(t.x,t.y,t.z,t.w):N.set(t,e,n,r),K.viewport(S.copy(N).multiplyScalar(P).round())},this.getScissor=function(t){return t.copy(F)},this.setScissor=function(t,e,n,r){t.isVector4?F.set(t.x,t.y,t.z,t.w):F.set(t,e,n,r),K.scissor(A.copy(F).multiplyScalar(P).round())},this.getScissorTest=function(){return k},this.setScissorTest=function(t){K.setScissorTest(k=t)},this.setOpaqueSort=function(t){I=t},this.setTransparentSort=function(t){L=t},this.getClearColor=function(t){return t.copy(ht.getClearColor())},this.setClearColor=function(){ht.setClearColor.apply(ht,arguments)},this.getClearAlpha=function(){return ht.getClearAlpha()},this.setClearAlpha=function(){ht.setClearAlpha.apply(ht,arguments)},this.clear=function(t=!0,e=!0,n=!0){let r=0;if(t){let t=!1;if(null!==w){const e=w.texture.format;t=1033===e||1031===e||1029===e}if(t){const t=w.texture.type,e=1009===t||1014===t||1012===t||1020===t||1017===t||1018===t,n=ht.getClearColor(),r=ht.getClearAlpha(),i=n.r,o=n.g,s=n.b;e?(d[0]=i,d[1]=o,d[2]=s,d[3]=r,yt.clearBufferuiv(yt.COLOR,0,d)):(p[0]=i,p[1]=o,p[2]=s,p[3]=r,yt.clearBufferiv(yt.COLOR,0,p))}else r|=yt.COLOR_BUFFER_BIT}e&&(r|=yt.DEPTH_BUFFER_BIT,yt.clearDepth(this.capabilities.reverseDepthBuffer?0:1)),n&&(r|=yt.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),yt.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){e.removeEventListener("webglcontextlost",wt,!1),e.removeEventListener("webglcontextrestored",Et,!1),e.removeEventListener("webglcontextcreationerror",Tt,!1),at.dispose(),lt.dispose(),J.dispose(),tt.dispose(),et.dispose(),it.dispose(),gt.dispose(),vt.dispose(),ot.dispose(),xt.dispose(),xt.removeEventListener("sessionstart",Dt),xt.removeEventListener("sessionend",Ct),Rt.stop()},this.renderBufferDirect=function(t,e,n,r,i,o){null===e&&(e=X);const s=i.isMesh&&i.matrixWorld.determinant()<0,a=function(t,e,n,r,i){!0!==e.isScene&&(e=X);Q.resetTextureUnits();const o=e.fog,s=r.isMeshStandardMaterial?e.environment:null,a=null===w?y.outputColorSpace:!0===w.isXRRenderTarget?w.texture.colorSpace:"srgb-linear",l=(r.isMeshStandardMaterial?et:tt).get(r.envMap||s),u=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,c=!!n.attributes.tangent&&(!!r.normalMap||r.anisotropy>0),h=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,p=!!n.morphAttributes.color;let f=0;r.toneMapped&&(null!==w&&!0!==w.isXRRenderTarget||(f=y.toneMapping));const g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,v=void 0!==g?g.length:0,_=J.get(r),b=m.state.lights;if(!0===B&&(!0===G||t!==T)){const e=t===T&&r.id===E;ut.setState(r,t,e)}let x=!1;r.version===_.__version?_.needsLights&&_.lightsStateVersion!==b.state.version||_.outputColorSpace!==a||i.isBatchedMesh&&!1===_.batching?x=!0:i.isBatchedMesh||!0!==_.batching?i.isBatchedMesh&&!0===_.batchingColor&&null===i.colorTexture||i.isBatchedMesh&&!1===_.batchingColor&&null!==i.colorTexture||i.isInstancedMesh&&!1===_.instancing?x=!0:i.isInstancedMesh||!0!==_.instancing?i.isSkinnedMesh&&!1===_.skinning?x=!0:i.isSkinnedMesh||!0!==_.skinning?i.isInstancedMesh&&!0===_.instancingColor&&null===i.instanceColor||i.isInstancedMesh&&!1===_.instancingColor&&null!==i.instanceColor||i.isInstancedMesh&&!0===_.instancingMorph&&null===i.morphTexture||i.isInstancedMesh&&!1===_.instancingMorph&&null!==i.morphTexture||_.envMap!==l||!0===r.fog&&_.fog!==o?x=!0:void 0===_.numClippingPlanes||_.numClippingPlanes===ut.numPlanes&&_.numIntersection===ut.numIntersection?(_.vertexAlphas!==u||_.vertexTangents!==c||_.morphTargets!==h||_.morphNormals!==d||_.morphColors!==p||_.toneMapping!==f||_.morphTargetsCount!==v)&&(x=!0):x=!0:x=!0:x=!0:x=!0:(x=!0,_.__version=r.version);let S=_.currentProgram;!0===x&&(S=Ft(r,e,i));let A=!1,M=!1,D=!1;const C=S.getUniforms(),R=_.uniforms;K.useProgram(S.program)&&(A=!0,M=!0,D=!0);r.id!==E&&(E=r.id,M=!0);if(A||T!==t){$.reverseDepthBuffer?(z.copy(t.projectionMatrix),function(t){const e=t.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}(z),function(t){const e=t.elements;-1===e[11]?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=1-e[14])}(z),C.setValue(yt,"projectionMatrix",z)):C.setValue(yt,"projectionMatrix",t.projectionMatrix),C.setValue(yt,"viewMatrix",t.matrixWorldInverse);const e=C.map.cameraPosition;void 0!==e&&e.setValue(yt,j.setFromMatrixPosition(t.matrixWorld)),$.logarithmicDepthBuffer&&C.setValue(yt,"logDepthBufFC",2/(Math.log(t.far+1)/Math.LN2)),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&C.setValue(yt,"isOrthographic",!0===t.isOrthographicCamera),T!==t&&(T=t,M=!0,D=!0)}if(i.isSkinnedMesh){C.setOptional(yt,i,"bindMatrix"),C.setOptional(yt,i,"bindMatrixInverse");const t=i.skeleton;t&&(null===t.boneTexture&&t.computeBoneTexture(),C.setValue(yt,"boneTexture",t.boneTexture,Q))}i.isBatchedMesh&&(C.setOptional(yt,i,"batchingTexture"),C.setValue(yt,"batchingTexture",i._matricesTexture,Q),C.setOptional(yt,i,"batchingIdTexture"),C.setValue(yt,"batchingIdTexture",i._indirectTexture,Q),C.setOptional(yt,i,"batchingColorTexture"),null!==i._colorsTexture&&C.setValue(yt,"batchingColorTexture",i._colorsTexture,Q));const I=n.morphAttributes;void 0===I.position&&void 0===I.normal&&void 0===I.color||dt.update(i,n,S);(M||_.receiveShadow!==i.receiveShadow)&&(_.receiveShadow=i.receiveShadow,C.setValue(yt,"receiveShadow",i.receiveShadow));r.isMeshGouraudMaterial&&null!==r.envMap&&(R.envMap.value=l,R.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1);r.isMeshStandardMaterial&&null===r.envMap&&null!==e.environment&&(R.envMapIntensity.value=e.environmentIntensity);M&&(C.setValue(yt,"toneMappingExposure",y.toneMappingExposure),_.needsLights&&function(t,e){t.ambientLightColor.needsUpdate=e,t.lightProbe.needsUpdate=e,t.directionalLights.needsUpdate=e,t.directionalLightShadows.needsUpdate=e,t.pointLights.needsUpdate=e,t.pointLightShadows.needsUpdate=e,t.spotLights.needsUpdate=e,t.spotLightShadows.needsUpdate=e,t.rectAreaLights.needsUpdate=e,t.hemisphereLights.needsUpdate=e}(R,D),o&&!0===r.fog&&st.refreshFogUniforms(R,o),st.refreshMaterialUniforms(R,r,P,O,m.state.transmissionRenderTarget[t.id]),wx.upload(yt,kt(_),R,Q));r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(wx.upload(yt,kt(_),R,Q),r.uniformsNeedUpdate=!1);r.isSpriteMaterial&&C.setValue(yt,"center",i.center);if(C.setValue(yt,"modelViewMatrix",i.modelViewMatrix),C.setValue(yt,"normalMatrix",i.normalMatrix),C.setValue(yt,"modelMatrix",i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const t=r.uniformsGroups;for(let e=0,n=t.length;e<n;e++){const n=t[e];vt.update(n,S),vt.bind(n,S)}}return S}(t,e,n,r,i);K.setMaterial(r,s);let l=n.index,u=1;if(!0===r.wireframe){if(l=rt.getWireframeAttribute(n),void 0===l)return;u=2}const c=n.drawRange,h=n.attributes.position;let d=c.start*u,p=(c.start+c.count)*u;null!==o&&(d=Math.max(d,o.start*u),p=Math.min(p,(o.start+o.count)*u)),null!==l?(d=Math.max(d,0),p=Math.min(p,l.count)):null!=h&&(d=Math.max(d,0),p=Math.min(p,h.count));const f=p-d;if(f<0||f===1/0)return;let g;gt.setup(i,r,a,n,l);let v=pt;if(null!==l&&(g=nt.get(l),v=ft,v.setIndex(g)),i.isMesh)!0===r.wireframe?(K.setLineWidth(r.wireframeLinewidth*Y()),v.setMode(yt.LINES)):v.setMode(yt.TRIANGLES);else if(i.isLine){let t=r.linewidth;void 0===t&&(t=1),K.setLineWidth(t*Y()),i.isLineSegments?v.setMode(yt.LINES):i.isLineLoop?v.setMode(yt.LINE_LOOP):v.setMode(yt.LINE_STRIP)}else i.isPoints?v.setMode(yt.POINTS):i.isSprite&&v.setMode(yt.TRIANGLES);if(i.isBatchedMesh)if(null!==i._multiDrawInstances)v.renderMultiDrawInstances(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount,i._multiDrawInstances);else if(q.get("WEBGL_multi_draw"))v.renderMultiDraw(i._multiDrawStarts,i._multiDrawCounts,i._multiDrawCount);else{const t=i._multiDrawStarts,e=i._multiDrawCounts,n=i._multiDrawCount,o=l?nt.get(l).bytesPerElement:1,s=J.get(r).currentProgram.getUniforms();for(let r=0;r<n;r++)s.setValue(yt,"_gl_DrawID",r),v.render(t[r]/o,e[r])}else if(i.isInstancedMesh)v.renderInstances(d,f,i.count);else if(n.isInstancedBufferGeometry){const t=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,e=Math.min(n.instanceCount,t);v.renderInstances(d,f,e)}else v.render(d,f)},this.compile=function(t,e,n=null){null===n&&(n=t),m=lt.get(n),m.init(e),v.push(m),n.traverseVisible((function(t){t.isLight&&t.layers.test(e.layers)&&(m.pushLight(t),t.castShadow&&m.pushShadow(t))})),t!==n&&t.traverseVisible((function(t){t.isLight&&t.layers.test(e.layers)&&(m.pushLight(t),t.castShadow&&m.pushShadow(t))})),m.setupLights();const r=new Set;return t.traverse((function(t){if(!(t.isMesh||t.isPoints||t.isLine||t.isSprite))return;const e=t.material;if(e)if(Array.isArray(e))for(let i=0;i<e.length;i++){const o=e[i];At(o,n,t),r.add(o)}else At(e,n,t),r.add(e)})),v.pop(),m=null,r},this.compileAsync=function(t,e,n=null){const r=this.compile(t,e,n);return new Promise(e=>{function n(){r.forEach((function(t){J.get(t).currentProgram.isReady()&&r.delete(t)})),0!==r.size?setTimeout(n,10):e(t)}null!==q.get("KHR_parallel_shader_compile")?n():setTimeout(n,10)})};let Mt=null;function Dt(){Rt.stop()}function Ct(){Rt.start()}const Rt=new P_;function Ot(t,e,n,r){if(!1===t.visible)return;if(t.layers.test(e.layers))if(t.isGroup)n=t.renderOrder;else if(t.isLOD)!0===t.autoUpdate&&t.update(e);else if(t.isLight)m.pushLight(t),t.castShadow&&m.pushShadow(t);else if(t.isSprite){if(!t.frustumCulled||U.intersectsSprite(t)){r&&V.setFromMatrixPosition(t.matrixWorld).applyMatrix4(H);const e=it.update(t),i=t.material;i.visible&&f.push(t,e,i,n,V.z,null)}}else if((t.isMesh||t.isLine||t.isPoints)&&(!t.frustumCulled||U.intersectsObject(t))){const e=it.update(t),i=t.material;if(r&&(void 0!==t.boundingSphere?(null===t.boundingSphere&&t.computeBoundingSphere(),V.copy(t.boundingSphere.center)):(null===e.boundingSphere&&e.computeBoundingSphere(),V.copy(e.boundingSphere.center)),V.applyMatrix4(t.matrixWorld).applyMatrix4(H)),Array.isArray(i)){const r=e.groups;for(let o=0,s=r.length;o<s;o++){const s=r[o],a=i[s.materialIndex];a&&a.visible&&f.push(t,e,a,n,V.z,s)}}else i.visible&&f.push(t,e,i,n,V.z,null)}const i=t.children;for(let t=0,o=i.length;t<o;t++)Ot(i[t],e,n,r)}function Pt(t,e,n,r){const i=t.opaque,o=t.transmissive,s=t.transparent;m.setupLightsView(n),!0===B&&ut.setGlobalState(y.clippingPlanes,n),r&&K.viewport(S.copy(r)),i.length>0&&Lt(i,e,n),o.length>0&&Lt(o,e,n),s.length>0&&Lt(s,e,n),K.buffers.depth.setTest(!0),K.buffers.depth.setMask(!0),K.buffers.color.setMask(!0),K.setPolygonOffset(!1)}function It(t,e,n,r){if(null!==(!0===n.isScene?n.overrideMaterial:null))return;void 0===m.state.transmissionRenderTarget[r.id]&&(m.state.transmissionRenderTarget[r.id]=new av(1,1,{generateMipmaps:!0,type:q.has("EXT_color_buffer_half_float")||q.has("EXT_color_buffer_float")?1016:1009,minFilter:1008,samples:4,stencilBuffer:i,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Kg.workingColorSpace}));const o=m.state.transmissionRenderTarget[r.id],s=r.viewport||S;o.setSize(s.z,s.w);const a=y.getRenderTarget();y.setRenderTarget(o),y.getClearColor(D),C=y.getClearAlpha(),C<1&&y.setClearColor(16777215,.5),y.clear(),W&&ht.render(n);const l=y.toneMapping;y.toneMapping=0;const u=r.viewport;if(void 0!==r.viewport&&(r.viewport=void 0),m.setupLightsView(r),!0===B&&ut.setGlobalState(y.clippingPlanes,r),Lt(t,n,r),Q.updateMultisampleRenderTarget(o),Q.updateRenderTargetMipmap(o),!1===q.has("WEBGL_multisampled_render_to_texture")){let t=!1;for(let i=0,o=e.length;i<o;i++){const o=e[i],s=o.object,a=o.geometry,l=o.material,u=o.group;if(2===l.side&&s.layers.test(r.layers)){const e=l.side;l.side=1,l.needsUpdate=!0,Nt(s,n,r,a,l,u),l.side=e,l.needsUpdate=!0,t=!0}}!0===t&&(Q.updateMultisampleRenderTarget(o),Q.updateRenderTargetMipmap(o))}y.setRenderTarget(a),y.setClearColor(D,C),void 0!==u&&(r.viewport=u),y.toneMapping=l}function Lt(t,e,n){const r=!0===e.isScene?e.overrideMaterial:null;for(let i=0,o=t.length;i<o;i++){const o=t[i],s=o.object,a=o.geometry,l=null===r?o.material:r,u=o.group;s.layers.test(n.layers)&&Nt(s,e,n,a,l,u)}}function Nt(t,e,n,r,i,o){t.onBeforeRender(y,e,n,r,i,o),t.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,t.matrixWorld),t.normalMatrix.getNormalMatrix(t.modelViewMatrix),i.onBeforeRender(y,e,n,r,t,o),!0===i.transparent&&2===i.side&&!1===i.forceSinglePass?(i.side=1,i.needsUpdate=!0,y.renderBufferDirect(n,e,r,i,t,o),i.side=0,i.needsUpdate=!0,y.renderBufferDirect(n,e,r,i,t,o),i.side=2):y.renderBufferDirect(n,e,r,i,t,o),t.onAfterRender(y,e,n,r,i,o)}function Ft(t,e,n){!0!==e.isScene&&(e=X);const r=J.get(t),i=m.state.lights,o=m.state.shadowsArray,s=i.state.version,a=ot.getParameters(t,i.state,o,e,n),l=ot.getProgramCacheKey(a);let u=r.programs;r.environment=t.isMeshStandardMaterial?e.environment:null,r.fog=e.fog,r.envMap=(t.isMeshStandardMaterial?et:tt).get(t.envMap||r.environment),r.envMapRotation=null!==r.environment&&null===t.envMap?e.environmentRotation:t.envMapRotation,void 0===u&&(t.addEventListener("dispose",St),u=new Map,r.programs=u);let c=u.get(l);if(void 0!==c){if(r.currentProgram===c&&r.lightsStateVersion===s)return Ut(t,a),c}else a.uniforms=ot.getUniforms(t),t.onBeforeCompile(a,y),c=ot.acquireProgram(a,l),u.set(l,c),r.uniforms=a.uniforms;const h=r.uniforms;return(t.isShaderMaterial||t.isRawShaderMaterial)&&!0!==t.clipping||(h.clippingPlanes=ut.uniform),Ut(t,a),r.needsLights=function(t){return t.isMeshLambertMaterial||t.isMeshToonMaterial||t.isMeshPhongMaterial||t.isMeshStandardMaterial||t.isShadowMaterial||t.isShaderMaterial&&!0===t.lights}(t),r.lightsStateVersion=s,r.needsLights&&(h.ambientLightColor.value=i.state.ambient,h.lightProbe.value=i.state.probe,h.directionalLights.value=i.state.directional,h.directionalLightShadows.value=i.state.directionalShadow,h.spotLights.value=i.state.spot,h.spotLightShadows.value=i.state.spotShadow,h.rectAreaLights.value=i.state.rectArea,h.ltc_1.value=i.state.rectAreaLTC1,h.ltc_2.value=i.state.rectAreaLTC2,h.pointLights.value=i.state.point,h.pointLightShadows.value=i.state.pointShadow,h.hemisphereLights.value=i.state.hemi,h.directionalShadowMap.value=i.state.directionalShadowMap,h.directionalShadowMatrix.value=i.state.directionalShadowMatrix,h.spotShadowMap.value=i.state.spotShadowMap,h.spotLightMatrix.value=i.state.spotLightMatrix,h.spotLightMap.value=i.state.spotLightMap,h.pointShadowMap.value=i.state.pointShadowMap,h.pointShadowMatrix.value=i.state.pointShadowMatrix),r.currentProgram=c,r.uniformsList=null,c}function kt(t){if(null===t.uniformsList){const e=t.currentProgram.getUniforms();t.uniformsList=wx.seqWithValue(e.seq,t.uniforms)}return t.uniformsList}function Ut(t,e){const n=J.get(t);n.outputColorSpace=e.outputColorSpace,n.batching=e.batching,n.batchingColor=e.batchingColor,n.instancing=e.instancing,n.instancingColor=e.instancingColor,n.instancingMorph=e.instancingMorph,n.skinning=e.skinning,n.morphTargets=e.morphTargets,n.morphNormals=e.morphNormals,n.morphColors=e.morphColors,n.morphTargetsCount=e.morphTargetsCount,n.numClippingPlanes=e.numClippingPlanes,n.numIntersection=e.numClipIntersection,n.vertexAlphas=e.vertexAlphas,n.vertexTangents=e.vertexTangents,n.toneMapping=e.toneMapping}Rt.setAnimationLoop((function(t){Mt&&Mt(t)})),"undefined"!=typeof self&&Rt.setContext(self),this.setAnimationLoop=function(t){Mt=t,xt.setAnimationLoop(t),null===t?Rt.stop():Rt.start()},xt.addEventListener("sessionstart",Dt),xt.addEventListener("sessionend",Ct),this.render=function(t,e){if(void 0!==e&&!0!==e.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===_)return;if(!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),null===e.parent&&!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),!0===xt.enabled&&!0===xt.isPresenting&&(!0===xt.cameraAutoUpdate&&xt.updateCamera(e),e=xt.getCamera()),!0===t.isScene&&t.onBeforeRender(y,t,e,w),m=lt.get(t,v.length),m.init(e),v.push(m),H.multiplyMatrices(e.projectionMatrix,e.matrixWorldInverse),U.setFromProjectionMatrix(H),G=this.localClippingEnabled,B=ut.init(this.clippingPlanes,G),f=at.get(t,g.length),f.init(),g.push(f),!0===xt.enabled&&!0===xt.isPresenting){const t=y.xr.getDepthSensingMesh();null!==t&&Ot(t,e,-1/0,y.sortObjects)}Ot(t,e,0,y.sortObjects),f.finish(),!0===y.sortObjects&&f.sort(I,L),W=!1===xt.enabled||!1===xt.isPresenting||!1===xt.hasDepthSensing(),W&&ht.addToRenderList(f,t),this.info.render.frame++,!0===B&&ut.beginShadows();const n=m.state.shadowsArray;ct.render(n,t,e),!0===B&&ut.endShadows(),!0===this.info.autoReset&&this.info.reset();const r=f.opaque,i=f.transmissive;if(m.setupLights(),e.isArrayCamera){const n=e.cameras;if(i.length>0)for(let e=0,o=n.length;e<o;e++){It(r,i,t,n[e])}W&&ht.render(t);for(let e=0,r=n.length;e<r;e++){const r=n[e];Pt(f,t,r,r.viewport)}}else i.length>0&&It(r,i,t,e),W&&ht.render(t),Pt(f,t,e);null!==w&&(Q.updateMultisampleRenderTarget(w),Q.updateRenderTargetMipmap(w)),!0===t.isScene&&t.onAfterRender(y,t,e),gt.resetDefaultState(),E=-1,T=null,v.pop(),v.length>0?(m=v[v.length-1],!0===B&&ut.setGlobalState(y.clippingPlanes,m.state.camera)):m=null,g.pop(),f=g.length>0?g[g.length-1]:null},this.getActiveCubeFace=function(){return b},this.getActiveMipmapLevel=function(){return x},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(t,e,n){J.get(t.texture).__webglTexture=e,J.get(t.depthTexture).__webglTexture=n;const r=J.get(t);r.__hasExternalTextures=!0,r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===q.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1)},this.setRenderTargetFramebuffer=function(t,e){const n=J.get(t);n.__webglFramebuffer=e,n.__useDefaultFramebuffer=void 0===e},this.setRenderTarget=function(t,e=0,n=0){w=t,b=e,x=n;let r=!0,i=null,o=!1,s=!1;if(t){const a=J.get(t);if(void 0!==a.__useDefaultFramebuffer)K.bindFramebuffer(yt.FRAMEBUFFER,null),r=!1;else if(void 0===a.__webglFramebuffer)Q.setupRenderTarget(t);else if(a.__hasExternalTextures)Q.rebindTextures(t,J.get(t.texture).__webglTexture,J.get(t.depthTexture).__webglTexture);else if(t.depthBuffer){const e=t.depthTexture;if(a.__boundDepthTexture!==e){if(null!==e&&J.has(e)&&(t.width!==e.image.width||t.height!==e.image.height))throw new Error("WebGLRenderTarget: Attached DepthTexture is initialized to the incorrect size.");Q.setupDepthRenderbuffer(t)}}const l=t.texture;(l.isData3DTexture||l.isDataArrayTexture||l.isCompressedArrayTexture)&&(s=!0);const u=J.get(t).__webglFramebuffer;t.isWebGLCubeRenderTarget?(i=Array.isArray(u[e])?u[e][n]:u[e],o=!0):i=t.samples>0&&!1===Q.useMultisampledRTT(t)?J.get(t).__webglMultisampledFramebuffer:Array.isArray(u)?u[n]:u,S.copy(t.viewport),A.copy(t.scissor),M=t.scissorTest}else S.copy(N).multiplyScalar(P).floor(),A.copy(F).multiplyScalar(P).floor(),M=k;if(K.bindFramebuffer(yt.FRAMEBUFFER,i)&&r&&K.drawBuffers(t,i),K.viewport(S),K.scissor(A),K.setScissorTest(M),o){const r=J.get(t.texture);yt.framebufferTexture2D(yt.FRAMEBUFFER,yt.COLOR_ATTACHMENT0,yt.TEXTURE_CUBE_MAP_POSITIVE_X+e,r.__webglTexture,n)}else if(s){const r=J.get(t.texture),i=e||0;yt.framebufferTextureLayer(yt.FRAMEBUFFER,yt.COLOR_ATTACHMENT0,r.__webglTexture,n||0,i)}E=-1},this.readRenderTargetPixels=function(t,e,n,r,i,o,s){if(!t||!t.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=J.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==s&&(a=a[s]),a){K.bindFramebuffer(yt.FRAMEBUFFER,a);try{const s=t.texture,a=s.format,l=s.type;if(!$.textureFormatReadable(a))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");if(!$.textureTypeReadable(l))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i&&yt.readPixels(e,n,r,i,mt.convert(a),mt.convert(l),o)}finally{const t=null!==w?J.get(w).__webglFramebuffer:null;K.bindFramebuffer(yt.FRAMEBUFFER,t)}}},this.readRenderTargetPixelsAsync=async function(t,e,n,r,i,o,s){if(!t||!t.isWebGLRenderTarget)throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let a=J.get(t).__webglFramebuffer;if(t.isWebGLCubeRenderTarget&&void 0!==s&&(a=a[s]),a){const s=t.texture,l=s.format,u=s.type;if(!$.textureFormatReadable(l))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!$.textureTypeReadable(u))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(e>=0&&e<=t.width-r&&n>=0&&n<=t.height-i){K.bindFramebuffer(yt.FRAMEBUFFER,a);const t=yt.createBuffer();yt.bindBuffer(yt.PIXEL_PACK_BUFFER,t),yt.bufferData(yt.PIXEL_PACK_BUFFER,o.byteLength,yt.STREAM_READ),yt.readPixels(e,n,r,i,mt.convert(l),mt.convert(u),0);const s=null!==w?J.get(w).__webglFramebuffer:null;K.bindFramebuffer(yt.FRAMEBUFFER,s);const c=yt.fenceSync(yt.SYNC_GPU_COMMANDS_COMPLETE,0);return yt.flush(),await function(t,e,n){return new Promise((function(r,i){setTimeout((function o(){switch(t.clientWaitSync(e,t.SYNC_FLUSH_COMMANDS_BIT,0)){case t.WAIT_FAILED:i();break;case t.TIMEOUT_EXPIRED:setTimeout(o,n);break;default:r()}}),n)}))}(yt,c,4),yt.bindBuffer(yt.PIXEL_PACK_BUFFER,t),yt.getBufferSubData(yt.PIXEL_PACK_BUFFER,0,o),yt.deleteBuffer(t),yt.deleteSync(c),o}throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(t,e=null,n=0){!0!==t.isTexture&&(Xg("WebGLRenderer: copyFramebufferToTexture function signature has changed."),e=arguments[0]||null,t=arguments[1]);const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),o=Math.floor(t.image.height*r),s=null!==e?e.x:0,a=null!==e?e.y:0;Q.setTexture2D(t,0),yt.copyTexSubImage2D(yt.TEXTURE_2D,n,0,0,s,a,i,o),K.unbindTexture()},this.copyTextureToTexture=function(t,e,n=null,r=null,i=0){let o,s,a,l,u,c;!0!==t.isTexture&&(Xg("WebGLRenderer: copyTextureToTexture function signature has changed."),r=arguments[0]||null,t=arguments[1],e=arguments[2],i=arguments[3]||0,n=null),null!==n?(o=n.max.x-n.min.x,s=n.max.y-n.min.y,a=n.min.x,l=n.min.y):(o=t.image.width,s=t.image.height,a=0,l=0),null!==r?(u=r.x,c=r.y):(u=0,c=0);const h=mt.convert(e.format),d=mt.convert(e.type);Q.setTexture2D(e,0),yt.pixelStorei(yt.UNPACK_FLIP_Y_WEBGL,e.flipY),yt.pixelStorei(yt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),yt.pixelStorei(yt.UNPACK_ALIGNMENT,e.unpackAlignment);const p=yt.getParameter(yt.UNPACK_ROW_LENGTH),f=yt.getParameter(yt.UNPACK_IMAGE_HEIGHT),m=yt.getParameter(yt.UNPACK_SKIP_PIXELS),g=yt.getParameter(yt.UNPACK_SKIP_ROWS),v=yt.getParameter(yt.UNPACK_SKIP_IMAGES),y=t.isCompressedTexture?t.mipmaps[i]:t.image;yt.pixelStorei(yt.UNPACK_ROW_LENGTH,y.width),yt.pixelStorei(yt.UNPACK_IMAGE_HEIGHT,y.height),yt.pixelStorei(yt.UNPACK_SKIP_PIXELS,a),yt.pixelStorei(yt.UNPACK_SKIP_ROWS,l),t.isDataTexture?yt.texSubImage2D(yt.TEXTURE_2D,i,u,c,o,s,h,d,y.data):t.isCompressedTexture?yt.compressedTexSubImage2D(yt.TEXTURE_2D,i,u,c,y.width,y.height,h,y.data):yt.texSubImage2D(yt.TEXTURE_2D,i,u,c,o,s,h,d,y),yt.pixelStorei(yt.UNPACK_ROW_LENGTH,p),yt.pixelStorei(yt.UNPACK_IMAGE_HEIGHT,f),yt.pixelStorei(yt.UNPACK_SKIP_PIXELS,m),yt.pixelStorei(yt.UNPACK_SKIP_ROWS,g),yt.pixelStorei(yt.UNPACK_SKIP_IMAGES,v),0===i&&e.generateMipmaps&&yt.generateMipmap(yt.TEXTURE_2D),K.unbindTexture()},this.copyTextureToTexture3D=function(t,e,n=null,r=null,i=0){let o,s,a,l,u,c,h,d,p;!0!==t.isTexture&&(Xg("WebGLRenderer: copyTextureToTexture3D function signature has changed."),n=arguments[0]||null,r=arguments[1]||null,t=arguments[2],e=arguments[3],i=arguments[4]||0);const f=t.isCompressedTexture?t.mipmaps[i]:t.image;null!==n?(o=n.max.x-n.min.x,s=n.max.y-n.min.y,a=n.max.z-n.min.z,l=n.min.x,u=n.min.y,c=n.min.z):(o=f.width,s=f.height,a=f.depth,l=0,u=0,c=0),null!==r?(h=r.x,d=r.y,p=r.z):(h=0,d=0,p=0);const m=mt.convert(e.format),g=mt.convert(e.type);let v;if(e.isData3DTexture)Q.setTexture3D(e,0),v=yt.TEXTURE_3D;else{if(!e.isDataArrayTexture&&!e.isCompressedArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Q.setTexture2DArray(e,0),v=yt.TEXTURE_2D_ARRAY}yt.pixelStorei(yt.UNPACK_FLIP_Y_WEBGL,e.flipY),yt.pixelStorei(yt.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e.premultiplyAlpha),yt.pixelStorei(yt.UNPACK_ALIGNMENT,e.unpackAlignment);const y=yt.getParameter(yt.UNPACK_ROW_LENGTH),_=yt.getParameter(yt.UNPACK_IMAGE_HEIGHT),b=yt.getParameter(yt.UNPACK_SKIP_PIXELS),x=yt.getParameter(yt.UNPACK_SKIP_ROWS),w=yt.getParameter(yt.UNPACK_SKIP_IMAGES);yt.pixelStorei(yt.UNPACK_ROW_LENGTH,f.width),yt.pixelStorei(yt.UNPACK_IMAGE_HEIGHT,f.height),yt.pixelStorei(yt.UNPACK_SKIP_PIXELS,l),yt.pixelStorei(yt.UNPACK_SKIP_ROWS,u),yt.pixelStorei(yt.UNPACK_SKIP_IMAGES,c),t.isDataTexture||t.isData3DTexture?yt.texSubImage3D(v,i,h,d,p,o,s,a,m,g,f.data):e.isCompressedArrayTexture?yt.compressedTexSubImage3D(v,i,h,d,p,o,s,a,m,f.data):yt.texSubImage3D(v,i,h,d,p,o,s,a,m,g,f),yt.pixelStorei(yt.UNPACK_ROW_LENGTH,y),yt.pixelStorei(yt.UNPACK_IMAGE_HEIGHT,_),yt.pixelStorei(yt.UNPACK_SKIP_PIXELS,b),yt.pixelStorei(yt.UNPACK_SKIP_ROWS,x),yt.pixelStorei(yt.UNPACK_SKIP_IMAGES,w),0===i&&e.generateMipmaps&&yt.generateMipmap(v),K.unbindTexture()},this.initRenderTarget=function(t){void 0===J.get(t).__webglFramebuffer&&Q.setupRenderTarget(t)},this.initTexture=function(t){t.isCubeTexture?Q.setTextureCube(t,0):t.isData3DTexture?Q.setTexture3D(t,0):t.isDataArrayTexture||t.isCompressedArrayTexture?Q.setTexture2DArray(t,0):Q.setTexture2D(t,0),K.unbindTexture()},this.resetState=function(){b=0,x=0,w=null,K.reset(),gt.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return 2e3}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(t){this._outputColorSpace=t;const e=this.getContext();e.drawingBufferColorSpace="display-p3"===t?"display-p3":"srgb",e.unpackColorSpace="display-p3-linear"===Kg.workingColorSpace?"display-p3":"srgb"}}class ww extends fy{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Zv,this.environmentIntensity=1,this.environmentRotation=new Zv,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),null!==t.background&&(this.background=t.background.clone()),null!==t.environment&&(this.environment=t.environment.clone()),null!==t.fog&&(this.fog=t.fog.clone()),this.backgroundBlurriness=t.backgroundBlurriness,this.backgroundIntensity=t.backgroundIntensity,this.backgroundRotation.copy(t.backgroundRotation),this.environmentIntensity=t.environmentIntensity,this.environmentRotation.copy(t.environmentRotation),null!==t.overrideMaterial&&(this.overrideMaterial=t.overrideMaterial.clone()),this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){const e=super.toJSON(t);return null!==this.fog&&(e.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(e.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(e.object.backgroundIntensity=this.backgroundIntensity),e.object.backgroundRotation=this.backgroundRotation.toArray(),1!==this.environmentIntensity&&(e.object.environmentIntensity=this.environmentIntensity),e.object.environmentRotation=this.environmentRotation.toArray(),e}}class Ew extends Fy{constructor(t){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Iy(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.linewidth=t.linewidth,this.linecap=t.linecap,this.linejoin=t.linejoin,this.fog=t.fog,this}}const Tw=new hv,Sw=new hv,Aw=new zv,Mw=new Gv,Dw=new Pv,Cw=new hv,Rw=new hv;class Ow extends fy{constructor(t=new Zy,e=new Ew){super(),this.isLine=!0,this.type="Line",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[0];for(let t=1,r=e.count;t<r;t++)Tw.fromBufferAttribute(e,t-1),Sw.fromBufferAttribute(e,t),n[t]=n[t-1],n[t]+=Tw.distanceTo(Sw);t.setAttribute("lineDistance",new jy(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(t,e){const n=this.geometry,r=this.matrixWorld,i=t.params.Line.threshold,o=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Dw.copy(n.boundingSphere),Dw.applyMatrix4(r),Dw.radius+=i,!1===t.ray.intersectsSphere(Dw))return;Aw.copy(r).invert(),Mw.copy(t.ray).applyMatrix4(Aw);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),a=s*s,l=this.isLineSegments?2:1,u=n.index,c=n.attributes.position;if(null!==u){const n=Math.max(0,o.start),r=Math.min(u.count,o.start+o.count);for(let i=n,o=r-1;i<o;i+=l){const n=u.getX(i),r=u.getX(i+1),o=Pw(this,t,Mw,a,n,r);o&&e.push(o)}if(this.isLineLoop){const i=u.getX(r-1),o=u.getX(n),s=Pw(this,t,Mw,a,i,o);s&&e.push(s)}}else{const n=Math.max(0,o.start),r=Math.min(c.count,o.start+o.count);for(let i=n,o=r-1;i<o;i+=l){const n=Pw(this,t,Mw,a,i,i+1);n&&e.push(n)}if(this.isLineLoop){const i=Pw(this,t,Mw,a,r-1,n);i&&e.push(i)}}}updateMorphTargets(){const t=this.geometry.morphAttributes,e=Object.keys(t);if(e.length>0){const n=t[e[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let t=0,e=n.length;t<e;t++){const e=n[t].name||String(t);this.morphTargetInfluences.push(0),this.morphTargetDictionary[e]=t}}}}}function Pw(t,e,n,r,i,o){const s=t.geometry.attributes.position;Tw.fromBufferAttribute(s,i),Sw.fromBufferAttribute(s,o);if(n.distanceSqToSegment(Tw,Sw,Cw,Rw)>r)return;Cw.applyMatrix4(t.matrixWorld);const a=e.ray.origin.distanceTo(Cw);return a<e.near||a>e.far?void 0:{distance:a,point:Rw.clone().applyMatrix4(t.matrixWorld),index:i,face:null,faceIndex:null,barycoord:null,object:t}}const Iw=new hv,Lw=new hv;class Nw extends Ow{constructor(t,e){super(t,e),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const t=this.geometry;if(null===t.index){const e=t.attributes.position,n=[];for(let t=0,r=e.count;t<r;t+=2)Iw.fromBufferAttribute(e,t),Lw.fromBufferAttribute(e,t+1),n[t]=0===t?0:n[t-1],n[t+1]=n[t]+Iw.distanceTo(Lw);t.setAttribute("lineDistance",new jy(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class Fw extends iv{constructor(t,e,n,r,i,o,s,a,l){super(t,e,n,r,i,o,s,a,l),this.isVideoTexture=!0,this.minFilter=void 0!==o?o:1006,this.magFilter=void 0!==i?i:1006,this.generateMipmaps=!1;const u=this;"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback((function e(){u.needsUpdate=!0,t.requestVideoFrameCallback(e)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const t=this.image;!1==="requestVideoFrameCallback"in t&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class kw extends g_{constructor(t){super(t),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}function Uw(t,e,n){return!t||!n&&t.constructor===e?t:"number"==typeof e.BYTES_PER_ELEMENT?new e(t):Array.prototype.slice.call(t)}function Bw(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}class Gw{constructor(t,e,n,r){this.parameterPositions=t,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new e.constructor(n),this.sampleValues=e,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(t){const e=this.parameterPositions;let n=this._cachedIndex,r=e[n],i=e[n-1];t:{e:{let o;n:{r:if(!(t<r)){for(let o=n+2;;){if(void 0===r){if(t<i)break r;return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===o)break;if(i=r,r=e[++n],t<r)break e}o=e.length;break n}if(t>=i)break t;{const s=e[1];t<s&&(n=2,i=s);for(let o=n-2;;){if(void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(n===o)break;if(r=i,i=e[--n-1],t>=i)break e}o=n,n=0}}for(;n<o;){const r=n+o>>>1;t<e[r]?o=r:n=r+1}if(r=e[n],i=e[n-1],void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===r)return n=e.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,t,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(t){const e=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=t*r;for(let t=0;t!==r;++t)e[t]=n[i+t];return e}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class zw extends Gw{constructor(t,e,n,r){super(t,e,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:2400,endingEnd:2400}}intervalChanged_(t,e,n){const r=this.parameterPositions;let i=t-2,o=t+1,s=r[i],a=r[o];if(void 0===s)switch(this.getSettings_().endingStart){case 2401:i=t,s=2*e-n;break;case 2402:i=r.length-2,s=e+r[i]-r[i+1];break;default:i=t,s=n}if(void 0===a)switch(this.getSettings_().endingEnd){case 2401:o=t,a=2*n-e;break;case 2402:o=1,a=n+r[1]-r[0];break;default:o=t-1,a=e}const l=.5*(n-e),u=this.valueSize;this._weightPrev=l/(e-s),this._weightNext=l/(a-n),this._offsetPrev=i*u,this._offsetNext=o*u}interpolate_(t,e,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=t*s,l=a-s,u=this._offsetPrev,c=this._offsetNext,h=this._weightPrev,d=this._weightNext,p=(n-e)/(r-e),f=p*p,m=f*p,g=-h*m+2*h*f-h*p,v=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*p+1,y=(-1-d)*m+(1.5+d)*f+.5*p,_=d*m-d*f;for(let t=0;t!==s;++t)i[t]=g*o[u+t]+v*o[l+t]+y*o[a+t]+_*o[c+t];return i}}class Hw extends Gw{constructor(t,e,n,r){super(t,e,n,r)}interpolate_(t,e,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=t*s,l=a-s,u=(n-e)/(r-e),c=1-u;for(let t=0;t!==s;++t)i[t]=o[l+t]*c+o[a+t]*u;return i}}class jw extends Gw{constructor(t,e,n,r){super(t,e,n,r)}interpolate_(t){return this.copySampleValue_(t-1)}}class Vw{constructor(t,e,n,r){if(void 0===t)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===e||0===e.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+t);this.name=t,this.times=Uw(e,this.TimeBufferType),this.values=Uw(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(t){const e=t.constructor;let n;if(e.toJSON!==this.toJSON)n=e.toJSON(t);else{n={name:t.name,times:Uw(t.times,Array),values:Uw(t.values,Array)};const e=t.getInterpolation();e!==t.DefaultInterpolation&&(n.interpolation=e)}return n.type=t.ValueTypeName,n}InterpolantFactoryMethodDiscrete(t){return new jw(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodLinear(t){return new Hw(this.times,this.values,this.getValueSize(),t)}InterpolantFactoryMethodSmooth(t){return new zw(this.times,this.values,this.getValueSize(),t)}setInterpolation(t){let e;switch(t){case 2300:e=this.InterpolantFactoryMethodDiscrete;break;case 2301:e=this.InterpolantFactoryMethodLinear;break;case 2302:e=this.InterpolantFactoryMethodSmooth}if(void 0===e){const e="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(t===this.DefaultInterpolation)throw new Error(e);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",e),this}return this.createInterpolant=e,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return 2300;case this.InterpolantFactoryMethodLinear:return 2301;case this.InterpolantFactoryMethodSmooth:return 2302}}getValueSize(){return this.values.length/this.times.length}shift(t){if(0!==t){const e=this.times;for(let n=0,r=e.length;n!==r;++n)e[n]+=t}return this}scale(t){if(1!==t){const e=this.times;for(let n=0,r=e.length;n!==r;++n)e[n]*=t}return this}trim(t,e){const n=this.times,r=n.length;let i=0,o=r-1;for(;i!==r&&n[i]<t;)++i;for(;-1!==o&&n[o]>e;)--o;if(++o,0!==i||o!==r){i>=o&&(o=Math.max(o,1),i=o-1);const t=this.getValueSize();this.times=n.slice(i,o),this.values=this.values.slice(i*t,o*t)}return this}validate(){let t=!0;const e=this.getValueSize();e-Math.floor(e)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let o=null;for(let e=0;e!==i;e++){const r=n[e];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,e,r),t=!1;break}if(null!==o&&o>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,e,r,o),t=!1;break}o=r}if(void 0!==r&&Bw(r))for(let e=0,n=r.length;e!==n;++e){const n=r[e];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,e,n),t=!1;break}}return t}optimize(){const t=this.times.slice(),e=this.values.slice(),n=this.getValueSize(),r=2302===this.getInterpolation(),i=t.length-1;let o=1;for(let s=1;s<i;++s){let i=!1;const a=t[s];if(a!==t[s+1]&&(1!==s||a!==t[0]))if(r)i=!0;else{const t=s*n,r=t-n,o=t+n;for(let s=0;s!==n;++s){const n=e[t+s];if(n!==e[r+s]||n!==e[o+s]){i=!0;break}}}if(i){if(s!==o){t[o]=t[s];const r=s*n,i=o*n;for(let t=0;t!==n;++t)e[i+t]=e[r+t]}++o}}if(i>0){t[o]=t[i];for(let t=i*n,r=o*n,s=0;s!==n;++s)e[r+s]=e[t+s];++o}return o!==t.length?(this.times=t.slice(0,o),this.values=e.slice(0,o*n)):(this.times=t,this.values=e),this}clone(){const t=this.times.slice(),e=this.values.slice(),n=new(0,this.constructor)(this.name,t,e);return n.createInterpolant=this.createInterpolant,n}}Vw.prototype.TimeBufferType=Float32Array,Vw.prototype.ValueBufferType=Float32Array,Vw.prototype.DefaultInterpolation=2301;class Xw extends Vw{constructor(t,e,n){super(t,e,n)}}Xw.prototype.ValueTypeName="bool",Xw.prototype.ValueBufferType=Array,Xw.prototype.DefaultInterpolation=2300,Xw.prototype.InterpolantFactoryMethodLinear=void 0,Xw.prototype.InterpolantFactoryMethodSmooth=void 0;class Ww extends Vw{}Ww.prototype.ValueTypeName="color";class Yw extends Vw{}Yw.prototype.ValueTypeName="number";class qw extends Gw{constructor(t,e,n,r){super(t,e,n,r)}interpolate_(t,e,n,r){const i=this.resultBuffer,o=this.sampleValues,s=this.valueSize,a=(n-e)/(r-e);let l=t*s;for(let t=l+s;l!==t;l+=4)cv.slerpFlat(i,0,o,l-s,o,l,a);return i}}class $w extends Vw{InterpolantFactoryMethodLinear(t){return new qw(this.times,this.values,this.getValueSize(),t)}}$w.prototype.ValueTypeName="quaternion",$w.prototype.InterpolantFactoryMethodSmooth=void 0;class Kw extends Vw{constructor(t,e,n){super(t,e,n)}}Kw.prototype.ValueTypeName="string",Kw.prototype.ValueBufferType=Array,Kw.prototype.DefaultInterpolation=2300,Kw.prototype.InterpolantFactoryMethodLinear=void 0,Kw.prototype.InterpolantFactoryMethodSmooth=void 0;class Zw extends Vw{}Zw.prototype.ValueTypeName="vector";const Jw={enabled:!1,files:{},add:function(t,e){!1!==this.enabled&&(this.files[t]=e)},get:function(t){if(!1!==this.enabled)return this.files[t]},remove:function(t){delete this.files[t]},clear:function(){this.files={}}};class Qw{constructor(t,e,n){const r=this;let i=!1,o=0,s=0,a=void 0;const l=[];this.onStart=void 0,this.onLoad=t,this.onProgress=e,this.onError=n,this.itemStart=function(t){s++,!1===i&&void 0!==r.onStart&&r.onStart(t,o,s),i=!0},this.itemEnd=function(t){o++,void 0!==r.onProgress&&r.onProgress(t,o,s),o===s&&(i=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(t){void 0!==r.onError&&r.onError(t)},this.resolveURL=function(t){return a?a(t):t},this.setURLModifier=function(t){return a=t,this},this.addHandler=function(t,e){return l.push(t,e),this},this.removeHandler=function(t){const e=l.indexOf(t);return-1!==e&&l.splice(e,2),this},this.getHandler=function(t){for(let e=0,n=l.length;e<n;e+=2){const n=l[e],r=l[e+1];if(n.global&&(n.lastIndex=0),n.test(t))return r}return null}}}const tE=new Qw;class eE{constructor(t){this.manager=void 0!==t?t:tE,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(t,e){const n=this;return new Promise((function(r,i){n.load(t,r,e,i)}))}parse(){}setCrossOrigin(t){return this.crossOrigin=t,this}setWithCredentials(t){return this.withCredentials=t,this}setPath(t){return this.path=t,this}setResourcePath(t){return this.resourcePath=t,this}setRequestHeader(t){return this.requestHeader=t,this}}eE.DEFAULT_MATERIAL_NAME="__DEFAULT";Error;class nE extends eE{constructor(t){super(t)}load(t,e,n,r){void 0!==this.path&&(t=this.path+t),t=this.manager.resolveURL(t);const i=this,o=Jw.get(t);if(void 0!==o)return i.manager.itemStart(t),setTimeout((function(){e&&e(o),i.manager.itemEnd(t)}),0),o;const s=Hg("img");function a(){u(),Jw.add(t,this),e&&e(this),i.manager.itemEnd(t)}function l(e){u(),r&&r(e),i.manager.itemError(t),i.manager.itemEnd(t)}function u(){s.removeEventListener("load",a,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",a,!1),s.addEventListener("error",l,!1),"data:"!==t.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),i.manager.itemStart(t),s.src=t,s}}class rE extends eE{constructor(t){super(t)}load(t,e,n,r){const i=new iv,o=new nE(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(t,(function(t){i.image=t,i.needsUpdate=!0,void 0!==e&&e(i)}),n,r),i}}const iE=new RegExp("[\\[\\]\\.:\\/]","g"),oE="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",sE=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC","[^\\[\\]\\.:\\/]")+/(WCOD+)?/.source.replace("WCOD",oE)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC","[^\\[\\]\\.:\\/]")+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC","[^\\[\\]\\.:\\/]")+"$"),aE=["material","materials","bones","map"];class lE{constructor(t,e,n){this.path=e,this.parsedPath=n||lE.parseTrackName(e),this.node=lE.findNode(t,this.parsedPath.nodeName),this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,e,n){return t&&t.isAnimationObjectGroup?new lE.Composite(t,e,n):new lE(t,e,n)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(iE,"")}static parseTrackName(t){const e=sE.exec(t);if(null===e)throw new Error("PropertyBinding: Cannot parse trackName: "+t);const n={nodeName:e[2],objectName:e[3],objectIndex:e[4],propertyName:e[5],propertyIndex:e[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const t=n.nodeName.substring(r+1);-1!==aE.indexOf(t)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=t)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return n}static findNode(t,e){if(void 0===e||""===e||"."===e||-1===e||e===t.name||e===t.uuid)return t;if(t.skeleton){const n=t.skeleton.getBoneByName(e);if(void 0!==n)return n}if(t.children){const n=function(t){for(let r=0;r<t.length;r++){const i=t[r];if(i.name===e||i.uuid===e)return i;const o=n(i.children);if(o)return o}return null},r=n(t.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(t,e){t[e]=this.targetObject[this.propertyName]}_getValue_array(t,e){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)t[e++]=n[r]}_getValue_arrayElement(t,e){t[e]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(t,e){this.resolvedProperty.toArray(t,e)}_setValue_direct(t,e){this.targetObject[this.propertyName]=t[e]}_setValue_direct_setNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(t,e){this.targetObject[this.propertyName]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(t,e){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=t[e++]}_setValue_array_setNeedsUpdate(t,e){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(t,e){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=t[e++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(t,e){this.resolvedProperty[this.propertyIndex]=t[e]}_setValue_arrayElement_setNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty[this.propertyIndex]=t[e],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(t,e){this.resolvedProperty.fromArray(t,e)}_setValue_fromArray_setNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(t,e){this.resolvedProperty.fromArray(t,e),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(t,e){this.bind(),this.getValue(t,e)}_setValue_unbound(t,e){this.bind(),this.setValue(t,e)}bind(){let t=this.node;const e=this.parsedPath,n=e.objectName,r=e.propertyName;let i=e.propertyIndex;if(t||(t=lE.findNode(this.rootNode,e.nodeName),this.node=t),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!t)return void console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");if(n){let r=e.objectIndex;switch(n){case"materials":if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);t=t.material.materials;break;case"bones":if(!t.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);t=t.skeleton.bones;for(let e=0;e<t.length;e++)if(t[e].name===r){r=e;break}break;case"map":if("map"in t){t=t.map;break}if(!t.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!t.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);t=t.material.map;break;default:if(void 0===t[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);t=t[n]}if(void 0!==r){if(void 0===t[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,t);t=t[r]}}const o=t[r];if(void 0===o){const n=e.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",t)}let s=this.Versioning.None;this.targetObject=t,void 0!==t.needsUpdate?s=this.Versioning.NeedsUpdate:void 0!==t.matrixWorldNeedsUpdate&&(s=this.Versioning.MatrixWorldNeedsUpdate);let a=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!t.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!t.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==t.morphTargetDictionary[i]&&(i=t.morphTargetDictionary[i])}a=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=i}else void 0!==o.fromArray&&void 0!==o.toArray?(a=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(a=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=r;this.getValue=this.GetterByBindingType[a],this.setValue=this.SetterByBindingTypeAndVersioning[a][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}lE.Composite=class{constructor(t,e,n){const r=n||lE.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}getValue(t,e){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(t,e)}setValue(t,e){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(t,e)}bind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){const t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},lE.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},lE.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},lE.prototype.GetterByBindingType=[lE.prototype._getValue_direct,lE.prototype._getValue_array,lE.prototype._getValue_arrayElement,lE.prototype._getValue_toArray],lE.prototype.SetterByBindingTypeAndVersioning=[[lE.prototype._setValue_direct,lE.prototype._setValue_direct_setNeedsUpdate,lE.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[lE.prototype._setValue_array,lE.prototype._setValue_array_setNeedsUpdate,lE.prototype._setValue_array_setMatrixWorldNeedsUpdate],[lE.prototype._setValue_arrayElement,lE.prototype._setValue_arrayElement_setNeedsUpdate,lE.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[lE.prototype._setValue_fromArray,lE.prototype._setValue_fromArray_setNeedsUpdate,lE.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];new Float32Array(1);const uE=new zv;class cE{constructor(t,e,n=0,r=1/0){this.ray=new Gv(t,e),this.near=n,this.far=r,this.camera=null,this.layers=new Jv,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(t,e){this.ray.set(t,e)}setFromCamera(t,e){e.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(e.matrixWorld),this.ray.direction.set(t.x,t.y,.5).unproject(e).sub(this.ray.origin).normalize(),this.camera=e):e.isOrthographicCamera?(this.ray.origin.set(t.x,t.y,(e.near+e.far)/(e.near-e.far)).unproject(e),this.ray.direction.set(0,0,-1).transformDirection(e.matrixWorld),this.camera=e):console.error("THREE.Raycaster: Unsupported camera type: "+e.type)}setFromXRController(t){return uE.identity().extractRotation(t.matrixWorld),this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(0,0,-1).applyMatrix4(uE),this}intersectObject(t,e=!0,n=[]){return dE(t,this,n,e),n.sort(hE),n}intersectObjects(t,e=!0,n=[]){for(let r=0,i=t.length;r<i;r++)dE(t[r],this,n,e);return n.sort(hE),n}}function hE(t,e){return t.distance-e.distance}function dE(t,e,n,r){let i=!0;if(t.layers.test(e.layers)){!1===t.raycast(e,n)&&(i=!1)}if(!0===i&&!0===r){const r=t.children;for(let t=0,i=r.length;t<i;t++)dE(r[t],e,n,!0)}}function pE(t){return(pE="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 fE(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,mE(r.key),r)}}function mE(t){var e=function(t,e){if("object"!=pE(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=pE(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pE(e)?e:String(e)}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:"169"}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__="169");var gE=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.callbacks={},this.callbacks.base={}}var e,n,r;return e=t,(n=[{key:"on",value:function(t,e){var n=this;return void 0===t||""===t?(console.warn("wrong names"),!1):void 0===e?(console.warn("wrong callback"),!1):(this.resolveNames(t).forEach((function(t){var r=n.resolveName(t);n.callbacks[r.namespace]instanceof Object||(n.callbacks[r.namespace]={}),n.callbacks[r.namespace][r.value]instanceof Array||(n.callbacks[r.namespace][r.value]=[]),n.callbacks[r.namespace][r.value].push(e)})),this)}},{key:"off",value:function(t){var e=this;return void 0===t||""===t?(console.warn("wrong name"),!1):(this.resolveNames(t).forEach((function(t){var n=e.resolveName(t);if("base"!==n.namespace&&""===n.value)delete e.callbacks[n.namespace];else if("base"===n.namespace)for(var r in e.callbacks)e.callbacks[r]instanceof Object&&e.callbacks[r][n.value]instanceof Array&&(delete e.callbacks[r][n.value],0===Object.keys(e.callbacks[r]).length&&delete e.callbacks[r]);else e.callbacks[n.namespace]instanceof Object&&e.callbacks[n.namespace][n.value]instanceof Array&&(delete e.callbacks[n.namespace][n.value],0===Object.keys(e.callbacks[n.namespace]).length&&delete e.callbacks[n.namespace])})),this)}},{key:"trigger",value:function(t,e){if(void 0===t||""===t)return console.warn("wrong name"),!1;var n=null,r=null,i=e instanceof Array?e:[],o=this.resolveNames(t);if("base"===(o=this.resolveName(o[0])).namespace)for(var s in this.callbacks)this.callbacks[s]instanceof Object&&this.callbacks[s][o.value]instanceof Array&&this.callbacks[s][o.value].forEach((function(t){r=t.apply(this,i),void 0===n&&(n=r)}));else if(this.callbacks[o.namespace]instanceof Object){if(""===o.value)return console.warn("wrong name"),this;this.callbacks[o.namespace][o.value].forEach((function(t){r=t.apply(this,i),void 0===n&&(n=r)}))}return n}},{key:"resolveNames",value:function(t){var e=t;return e=(e=(e=e.replace(/[^a-zA-Z0-9 ,/.]/g,"")).replace(/[,/]+/g," ")).split(" ")}},{key:"resolveName",value:function(t){var e={},n=t.split(".");return e.original=t,e.value=n[0],e.namespace="base",n.length>1&&""!==n[1]&&(e.namespace=n[1]),e}}])&&fE(e.prototype,n),r&&fE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function vE(t){return(vE="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 yE(t){return function(t){if(Array.isArray(t))return _E(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return _E(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _E(t,e)}(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 _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}function bE(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,AE(r.key),r)}}function xE(t,e){return(xE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function wE(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=SE(t);if(e){var i=SE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return EE(this,n)}}function EE(t,e){if(e&&("object"===vE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return TE(t)}function TE(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function SE(t){return(SE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function AE(t){var e=function(t,e){if("object"!=vE(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=vE(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==vE(e)?e:String(e)}h.b.registerPlugin(rn),h.b.registerPlugin(Qo);var ME=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xE(t,e)}(o,t);var e,n,r,i=wE(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).parent=t||document,o._instance?EE(e,o._instance):(o._instance=TE(e),e.experience=window.experience,e.scroller=window.scroller,e.isMobile=e.scroller.scroll.isMobile,e.setViewportHeight(),e.init(),e)}return e=o,r=[{key:"getInstance",value:function(){return o._instance||new o}}],(n=[{key:"setViewportHeight",value:function(){var t=.01*window.innerHeight;document.documentElement.style.setProperty("--vh","".concat(t,"px"))}},{key:"initPreloader",value:function(){this.html.preloader={el:this.parent.getElementById("preloader")},this.html.preloader.progressEl=this.html.preloader.el.querySelector(".preloader--progress"),this.html.preloader.progressBarEl=this.html.preloader.el.querySelector(".preloader--progress-bar"),this.html.preloader.textEl=this.html.preloader.el.querySelector(".preloader--logo"),this.html.preloader.placeholderEl=this.html.preloader.el.querySelector(".preloader--placeholder"),this.html.preloader.overlayEl=this.html.preloader.el.querySelector(".preloader--overlay")}},{key:"setPreloaderProgress",value:function(t){h.b.to(this.html.preloader.progressBarEl,{width:"".concat(t,"%"),duration:.5,ease:"power4.inOut"})}},{key:"hidePreloader",value:function(){var t=this;h.b.timeline({onComplete:function(){t.html.preloader.el.style.display="none",t.runAnimation("heroTitle")}}).to(this.html.preloader.progressEl,{y:"+=30",opacity:0,duration:.5,ease:"power4.inOut"},.5).to(this.html.preloader.textEl,{y:"-=30",opacity:0,duration:.5,ease:"power4.inOut"},.5).to(this.html.preloader.el,{opacity:0,duration:1,ease:"power4.inOut"},.8)}},{key:"init",value:function(){this.html={},this.html.body=document.body,this.html.title=this.parent.getElementById("hero-title"),this.html.hero=this.parent.getElementById("cyber60-hero"),this.html.presented=this.parent.querySelector(".presented-by"),this.animations={},this.initPreloader(),this.initTitleParallax(),this.initContentBackground(),this.isMobile||this.initHeroParallax()}},{key:"initContentBackground",value:function(){var t=this;this.html.backgroundEl=this.parent.getElementById("cyber60-content-background"),rn.create({trigger:"#cyber60-main",endTrigger:".cyber60--content",scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0,start:"top top",end:"bottom bottom",onUpdate:function(e){t.trigger("backgroundUpdate",[e.progress])}}),this.isMobile?rn.create({trigger:"#cyber60-main",endTrigger:".cyber60--content",pin:"#cyber60-content-background",pinType:"fixed",pinSpacing:!1,scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0,start:"top top",end:"bottom bottom",onUpdate:function(e){t.trigger("backgroundUpdate",[e.progress])}}):rn.create({trigger:"#cyber60-main",endTrigger:".cyber60--content",scroller:"[data-scroll-container]",invalidateOnRefresh:!0,scrub:!0,start:"top top",end:"bottom bottom",onUpdate:function(e){t.trigger("backgroundUpdate",[e.progress])}})}},{key:"runAnimation",value:function(t){this.animations[t]&&this.animations[t].play()}},{key:"initTitleParallax",value:function(){this.html.title=this.html.hero.querySelector("h1"),this.html.titleSplit=new Qo(this.html.title,{type:"lines,words,chars",charsClass:"js-letter"}),this.html.titleLetters=this.html.titleSplit.chars,this.html.titleLines=this.html.titleSplit.lines,this.html.titleLines.forEach((function(t,e){t.classList.add("js-line-".concat(e))})),this.html.titleLetters.forEach((function(t,e){return t.innerHTML='<div class="js-inner">'+t.innerHTML+"</div>"})),this.html.titleLettersInner=yE(this.html.title.querySelectorAll(".js-inner")),this.html.subtitle=this.html.hero.querySelector("h2"),this.html.subtitleSplit=new Qo(this.html.subtitle,{type:"lines,words,chars",charsClass:"js-letter"}),this.html.subtitleLetters=this.html.subtitleSplit.chars,this.html.subtitleLines=this.html.subtitleSplit.lines,this.html.subtitleLines.forEach((function(t,e){t.classList.add("js-line-".concat(e))})),this.html.subtitleLetters.forEach((function(t,e){return t.innerHTML='<div class="js-inner">'+t.innerHTML+"</div>"})),this.html.subtitleLettersInner=yE(this.html.subtitle.querySelectorAll(".js-inner")),this.animations.heroTitle=h.b.timeline({paused:!0}),this.animations.heroTitle.to(this.html.titleLettersInner,{y:0,duration:1,stagger:.03,ease:"power4.inOut"}).to(this.html.subtitleLettersInner,{y:0,duration:1,stagger:.03,ease:"power4.inOut"},.4).to(".cyber60-hero--content--arrow",{opacity:1,duration:.5,ease:"power4.inOut"},1).to(this.html.presented,{opacity:1,x:0,duration:1.3,ease:"power3.inOut"},1)}},{key:"onScroll",value:function(t){this.trigger("smooth-scroll",t),rn.update()}},{key:"update",value:function(t){}},{key:"initHeroParallax",value:function(){}},{key:"destroy",value:function(){this.scroller&&this.scroller.off("scroll",this.onScroll),this.off("backgroundUpdate"),h.b.killTweensOf(this.html.titleLettersInner),h.b.killTweensOf(this.html.subtitleLettersInner),h.b.killTweensOf(".cyber60-hero--content--arrow"),this.animations.heroTitle&&this.animations.heroTitle.kill(),rn.getAll().forEach((function(t){return t.kill()})),document.documentElement.style.removeProperty("--vh"),o._instance=null,this.html=null}}])&&bE(e.prototype,n),r&&bE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(gE);function DE(t){return(DE="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 CE(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,NE(r.key),r)}}function RE(t,e){return(RE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function OE(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=LE(t);if(e){var i=LE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return PE(this,n)}}function PE(t,e){if(e&&("object"===DE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return IE(t)}function IE(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function LE(t){return(LE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function NE(t){var e=function(t,e){if("object"!=DE(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=DE(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==DE(e)?e:String(e)}!function(t,e,n){(e=AE(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(ME,"_instance",null);var FE=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&RE(t,e)}(o,t);var e,n,r,i=OE(o);function o(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),o._instance?PE(t,o._instance):(t=i.call(this),o._instance=IE(t),t.UI=ME.getInstance(),t.width=window.innerWidth,t.height=window.innerHeight,t.pixelRatio=Math.min(window.devicePixelRatio,2),t.hero={},t.hero.height=t.UI.html.hero.clientHeight,t.hero.width=t.UI.html.hero.clientWidth,t.hero.wrapperRect=t.UI.html.hero.getBoundingClientRect(),t.isMobile=t.getIsMobile(),window.addEventListener("resize",(function(){t.width=window.innerWidth,t.height=window.innerHeight,t.pixelRatio=Math.min(window.devicePixelRatio,2),t.hero.height=t.UI.html.hero.clientHeight,t.hero.width=t.UI.html.hero.clientWidth,t.hero.wrapperRect=t.UI.html.hero.getBoundingClientRect(),t.isMobile=t.getIsMobile(),t.trigger("resize")})),t)}return e=o,r=[{key:"getInstance",value:function(){return o._instance||new o}}],(n=[{key:"getIsMobile",value:function(){return window.matchMedia("(max-width: 767px)").matches}}])&&CE(e.prototype,n),r&&CE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(gE);function kE(t){return(kE="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 UE(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,VE(r.key),r)}}function BE(t,e){return(BE=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function GE(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=jE(t);if(e){var i=jE(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return zE(this,n)}}function zE(t,e){if(e&&("object"===kE(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return HE(t)}function HE(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function jE(t){return(jE=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function VE(t){var e=function(t,e){if("object"!=kE(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=kE(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==kE(e)?e:String(e)}!function(t,e,n){(e=NE(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(FE,"_instance",null);var XE=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&BE(t,e)}(o,t);var e,n,r,i=GE(o);function o(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),o._instance?zE(t,o._instance):(t=i.call(this),o._instance=HE(t),t.start=Date.now(),t.current=t.start,t.playing=!0,t.elapsed=0,t.delta=.016666666666666666,t.timeline=h.a.timeline({paused:!0}),window.requestAnimationFrame((function(){t.tick()})),t)}return e=o,r=[{key:"getInstance",value:function(){return o._instance||new o}}],(n=[{key:"tick",value:function(){var t=this,e=Date.now();this.delta=Math.min(.001*(e-this.current),.016),this.current=e,this.elapsed=.001*(this.current-this.start),this.delta>.06&&(this.delta=.06),this.timeline.time(this.elapsed),this.trigger("tick"),window.requestAnimationFrame((function(){t.tick()}))}},{key:"reset",value:function(){this.start=Date.now(),this.current=this.start,this.elapsed=0}},{key:"getDelta",value:function(){return this.delta}}])&&UE(e.prototype,n),r&&UE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(gE);function WE(t){return(WE="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 YE(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,$E(r.key),r)}}function qE(t,e,n){return(e=$E(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $E(t){var e=function(t,e){if("object"!=WE(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=WE(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==WE(e)?e:String(e)}!function(t,e,n){(e=VE(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(XE,"_instance",null);var KE=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),qE(this,"experience",new aA),qE(this,"scene",this.experience.scene),qE(this,"renderer",this.experience.renderer),qE(this,"sizes",this.experience.sizes),qE(this,"input",this.experience.input),qE(this,"instance",new Y_(-1,1,1,-1,-1,10)),qE(this,"target",new hv),this.scene.add(this.instance),this.instance.position.z=5}var e,n,r;return e=t,(n=[{key:"resize",value:function(){this.instance.aspect=this.sizes.hero.width/this.sizes.hero.height,this.instance.updateProjectionMatrix()}},{key:"getWidthModifier",value:function(){return 1/this.sizes.width/this.sizes.height}},{key:"destroy",value:function(){this.scene.remove(this.instance),this.instance=null}}])&&YE(e.prototype,n),r&&YE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ZE(t){return(ZE="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 JE(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,QE(r.key),r)}}function QE(t){var e=function(t,e){if("object"!=ZE(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=ZE(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==ZE(e)?e:String(e)}var tT=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.experience=new aA,this.sizes=this.experience.sizes,this.scene=this.experience.scene,this.camera=this.experience.camera,this.ui=this.experience.ui,this.setInstance()}var e,n,r;return e=t,(n=[{key:"setInstance",value:function(){this.clearColor="#010101",this.instance=new xw({powerPreference:"high-performance",antialias:!0,alpha:!1,stencil:!1,depth:!1,useLegacyLights:!1,physicallyCorrectLights:!1}),this.canvas=this.ui.html.hero.appendChild(this.instance.domElement),this.instance.outputColorSpace="srgb",this.instance.toneMapping=0,this.instance.setPixelRatio(Math.min(this.sizes.pixelRatio,2)),this.instance.setClearColor(this.clearColor,1),this.instance.setSize(this.sizes.hero.width,this.sizes.hero.height)}},{key:"update",value:function(){this.productionRender()}},{key:"productionRender",value:function(){this.instance.render(this.scene,this.camera.instance)}},{key:"resize",value:function(){this.instance.setSize(this.sizes.hero.width,this.sizes.hero.height),this.instance.setPixelRatio(this.sizes.pixelRatio)}},{key:"destroy",value:function(){this.instance&&(this.instance.dispose(),this.instance=null),this.canvas&&this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas),this.canvas=null,this.experience=null,this.sizes=null,this.scene=null,this.camera=null,this.ui=null,this.clearColor=null}}])&&JE(e.prototype,n),r&&JE(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function eT(t){return(eT="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 nT(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(!t)return;if("string"==typeof t)return rT(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return rT(t,e)}(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=n.call(t)},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 rT(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 iT(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,oT(r.key),r)}}function oT(t){var e=function(t,e){if("object"!=eT(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=eT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==eT(e)?e:String(e)}function sT(t,e){return(sT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function aT(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=uT(t);if(e){var i=uT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return lT(this,n)}}function lT(t,e){if(e&&("object"===eT(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 uT(t){return(uT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var cT=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sT(t,e)}(o,t);var e,n,r,i=aT(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).ui=ME.getInstance(),e.sources=t,e.items={},e.toLoad=e.sources.length,e.loaded=0,e.loadedAll=!1,e.setLoaders(),e.startLoading(),e}return e=o,(n=[{key:"setLoaders",value:function(){this.loaders={},this.loaders.textureLoader=new rE}},{key:"startLoading",value:function(){var t,e=this,n=nT(this.sources);try{var r=function(){var n=t.value;if("texture"===n.type)e.loaders.textureLoader.load(n.path,(function(t){e.sourceLoaded(n,t)}));else if("videoTexture"===n.type){var r=document.createElement("video");r.src=n.path,r.setAttribute("crossorigin","anonymous"),r.muted=!0,r.loop=!0,r.load(),r.setAttribute("playsinline",""),r.setAttribute("webkit-playsinline",""),r.pause(),r.onerror=function(){e.sourceError(n)};var i={videoTexture:new Fw(r),videoElement:r,videoWidth:0,videoHeight:0,isVideoTexture:!0,isGalleryObject:!0};r.addEventListener("canplaythrough",(function(){i.videoWidth=r.videoWidth,i.videoHeight=r.videoHeight,e.sourceLoaded(n,i)}),{once:!0})}};for(n.s();!(t=n.n()).done;)r()}catch(t){n.e(t)}finally{n.f()}0===this.sources.length&&setTimeout((function(){e.loadedAll=!0,e.trigger("ready")}))}},{key:"sourceError",value:function(t){this.items[t.name]=null,this.handleLoading()}},{key:"sourceLoaded",value:function(t,e){this.items[t.name]=e,this.handleLoading()}},{key:"handleLoading",value:function(){this.loaded++,this.loadedPercentage=this.loaded/this.toLoad,this.ui.setPreloaderProgress(100*this.loadedPercentage),this.loaded===this.toLoad&&(this.loadedAll=!0,this.trigger("ready"))}}])&&iT(e.prototype,n),r&&iT(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(gE),hT=window.matchMedia("(max-width: 767px)").matches?"-mobile":"",dT=[{name:"videoTextureHero",type:"videoTexture",path:"".concat(window.theme_assets_url,"/images/cyber60-v2/cyber60-hero").concat(hT,".mp4")},{name:"videoTextureBackground",type:"videoTexture",path:"".concat(window.theme_assets_url,"/images/cyber60-v2/cyber60-background").concat(hT,".mp4")}];function pT(t){return(pT="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 fT(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,gT(r.key),r)}}function mT(t,e,n){return(e=gT(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function gT(t){var e=function(t,e){if("object"!=pT(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=pT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==pT(e)?e:String(e)}var vT=function(){function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),mT(this,"gallery",new dw),t._instance)return t._instance;t._instance=this,this.experience=new aA,this.input=this.experience.input,this.sizes=this.experience.sizes,this.resources=this.experience.resources,this.scene=this.experience.scene,this.fluidCursorTexture=e,this.pano=this.experience.pano,this.canvas=this.experience.renderer.canvas,this.init(),this.initEvents()}var e,n,r;return e=t,r=[{key:"getInstance",value:function(){return t._instance||new t}}],(n=[{key:"initTexture",value:function(){if(null!==this.resources.items.videoTextureHero){this.videoTexture=this.resources.items.videoTextureHero,this.videoTexture.videoTexture.format=1022,this.videoTexture.videoTexture.colorSpace="srgb",this.videoTexture.videoTexture.minFilter=1006,this.videoTexture.videoTexture.magFilter=1006,this.videoTexture.videoTexture.generateMipmaps=!1,this.videoElement=this.videoTexture.videoElement,this.videoElement.play();var t=this.calcAspectRatio();this.material.uniforms.uVideo.value=this.videoTexture.videoTexture,this.material.uniforms.uResolution.value=new ov(t.x,t.y,t.z,t.w)}else this.videoTexture=null}},{key:"init",value:function(){this.scene.add(this.gallery),this.geometry=new L_(2,2),this.material=new g_({uniforms:{uVideo:{value:null},uDisplacement:{value:this.fluidCursorTexture},uDisplacementFactor:{value:.3},uResolution:{value:new ov},uGrainAmount:{value:.035},uGrainSize:{value:this.sizes.isMobile?.8:1.4},uLumAmount:{value:1},uTimer:{value:0},uCursorDelta:{value:new Ug}},vertexShader:"varying vec2 vUv;\nvoid main() {\n    vUv = uv;\n    gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);\n}\n",fragmentShader:"uniform sampler2D uVideo;\nuniform vec4 uResolution;\nuniform float uTimer;\nuniform float uGrainAmount;\nuniform float uGrainSize;\nuniform float uLumAmount;\nuniform sampler2D uDisplacement;\nuniform float uDisplacementFactor;\nuniform vec2 uCursorDelta;\n\nvarying vec2 vUv;\n\nconst float permTexUnit = 1.0/256.0;        // Perm texture texel-size\nconst float permTexUnitHalf = 0.5/256.0;    // Half perm texture texel-size\n\n#define Blend(base, blend, funcf)       vec3(funcf(base.r, blend.r), funcf(base.g, blend.g), funcf(base.b, blend.b))\n#define BlendSoftLightf(base, blend)    ((blend < 0.5) ? (2.0 * base * blend + base * base * (1.0 - 2.0 * blend)) : (sqrt(base) * (2.0 * blend - 1.0) + 2.0 * base * (1.0 - blend)))\n#define BlendLightenf(base, blend)      max(blend, base)\n\n#define BlendSoftLight(base, blend)     Blend(base, blend, BlendSoftLightf)\n#define BlendLighten                    BlendLightenf\n\n//a random texture generator, but you can also use a pre-computed perturbation texture\nvec4 rnm(in vec2 tc)\n{\n    float noise =  sin(dot(tc,vec2(uTimer)+vec2(12.9898,78.233))) * 43758.5453;\n    float noiseR =  fract(noise)*2.0-1.0;\n    float noiseG =  fract(noise*1.2154)*2.0-1.0;\n    float noiseB =  fract(noise*1.3453)*2.0-1.0;\n    float noiseA =  fract(noise*1.3647)*2.0-1.0;\n\n    return vec4(noiseR,noiseG,noiseB,noiseA);\n}\n\nfloat fade(in float t) {\n    return t*t*t*(t*(t*6.0-15.0)+10.0);\n}\n\nfloat pnoise3D(in vec3 p)\n{\n    vec3 pi = permTexUnit*floor(p)+permTexUnitHalf; // Integer part, scaled so +1 moves permTexUnit texel\n    // and offset 1/2 texel to sample texel centers\n    vec3 pf = fract(p);     // Fractional part for interpolation\n\n    // Noise contributions from (x=0, y=0), z=0 and z=1\n    float perm00 = rnm(pi.xy).a ;\n    vec3  grad000 = rnm(vec2(perm00, pi.z)).rgb * 4.0 - 1.0;\n    float n000 = dot(grad000, pf);\n    vec3  grad001 = rnm(vec2(perm00, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n    float n001 = dot(grad001, pf - vec3(0.0, 0.0, 1.0));\n\n    // Noise contributions from (x=0, y=1), z=0 and z=1\n    float perm01 = rnm(pi.xy + vec2(0.0, permTexUnit)).a ;\n    vec3  grad010 = rnm(vec2(perm01, pi.z)).rgb * 4.0 - 1.0;\n    float n010 = dot(grad010, pf - vec3(0.0, 1.0, 0.0));\n    vec3  grad011 = rnm(vec2(perm01, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n    float n011 = dot(grad011, pf - vec3(0.0, 1.0, 1.0));\n\n    // Noise contributions from (x=1, y=0), z=0 and z=1\n    float perm10 = rnm(pi.xy + vec2(permTexUnit, 0.0)).a ;\n    vec3  grad100 = rnm(vec2(perm10, pi.z)).rgb * 4.0 - 1.0;\n    float n100 = dot(grad100, pf - vec3(1.0, 0.0, 0.0));\n    vec3  grad101 = rnm(vec2(perm10, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n    float n101 = dot(grad101, pf - vec3(1.0, 0.0, 1.0));\n\n    // Noise contributions from (x=1, y=1), z=0 and z=1\n    float perm11 = rnm(pi.xy + vec2(permTexUnit, permTexUnit)).a ;\n    vec3  grad110 = rnm(vec2(perm11, pi.z)).rgb * 4.0 - 1.0;\n    float n110 = dot(grad110, pf - vec3(1.0, 1.0, 0.0));\n    vec3  grad111 = rnm(vec2(perm11, pi.z + permTexUnit)).rgb * 4.0 - 1.0;\n    float n111 = dot(grad111, pf - vec3(1.0, 1.0, 1.0));\n\n    // Blend contributions along x\n    vec4 n_x = mix(vec4(n000, n001, n010, n011), vec4(n100, n101, n110, n111), fade(pf.x));\n\n    // Blend contributions along y\n    vec2 n_xy = mix(n_x.xy, n_x.zw, fade(pf.y));\n\n    // Blend contributions along z\n    float n_xyz = mix(n_xy.x, n_xy.y, fade(pf.z));\n\n    // We're done, return the final noise value.\n    return n_xyz;\n}\n\n//2d coordinate orientation thing\nvec2 coordRot(in vec2 tc, in float angle)\n{\n    float aspect = uResolution.x/uResolution.y;\n    float rotX = ((tc.x*2.0-1.0)*aspect*cos(angle)) - ((tc.y*2.0-1.0)*sin(angle));\n    float rotY = ((tc.y*2.0-1.0)*cos(angle)) + ((tc.x*2.0-1.0)*aspect*sin(angle));\n    rotX = ((rotX/aspect)*0.5+0.5);\n    rotY = rotY*0.5+0.5;\n    return vec2(rotX,rotY);\n}\n\n\nhighp float rand(vec2 co)\n{\n    highp float a = 12.9898;\n    highp float b = 78.233;\n    highp float c = 43758.5453;\n    highp float dt= dot(co.xy ,vec2(a,b));\n    highp float sn= mod(dt,3.14);\n    return fract(sin(sn) * c);\n}\n\nfloat fastNoise(vec2 n) {\n\tconst vec2 d = vec2(0.0, 1.0);\n\tvec2 b = floor(n), f = smoothstep(vec2(0.0), vec2(1.0), fract(n));\n\treturn mix(mix(rand(b), rand(b + d.yx ), f.x), mix(rand(b + d.xy ), rand(b + d.yy ), f.x), f.y);\n}\n\nvoid main() {\n    vec2 newUv = (vUv - vec2(0., 0.5)) * uResolution.zw + vec2(0., 0.5);\n\n    vec2 position = newUv;\n\n\tfloat c = 1.0;\n\tvec3 color = vec3(c);\n\n\tvec2 texCoord = position.st;\n\n\tvec3 rotOffset = vec3(1.425,3.892,5.835); //rotation offset values\n\tvec2 rotCoordsR = coordRot(texCoord, uTimer+rotOffset.x);\n\tvec3 noise = vec3(pnoise3D(vec3(rotCoordsR*vec2(uResolution.x/uGrainSize,uResolution.y/uGrainSize),0.0)));\n\n    vec2 displacementUv = vUv + uCursorDelta;\n\n    vec2 displacement = texture2D(uDisplacement, displacementUv).xy;\n    newUv += displacement * uDisplacementFactor;\n\n    vec4 diffuse = texture2D(uVideo, newUv);\n    vec3 col = diffuse.rgb;\n\n\n\tcolor = noise;\n\t//constant moving burn\n    color += vec3( fastNoise(texCoord*sin(uTimer*0.1)*3.0 + fastNoise(uTimer*0.4+texCoord*2.0)) )*0.2;\n\n\n    vec3 lumcoeff = vec3(0.299,0.587,0.114);\n    float luminance = mix(0.0,dot(col, lumcoeff),uLumAmount);\n    float lum = smoothstep(0.2,0.0,luminance);\n    lum += luminance;\n\n    color = mix(color,vec3(0.0),pow(lum,4.0));\n    col += color*uGrainAmount;\n\n    col = mix(col, BlendSoftLight(col, color), uGrainAmount );\n\n\n    col -= clamp( 0.1*vec3( smoothstep(0.000001, 0.0000, rand(texCoord.xx*uTimer) ) * (abs(cos(uTimer)*sin(uTimer*1.5))-0.5) ), 0.0, 1.0 );\n\n\tgl_FragColor = vec4( col, diffuse.a );\n}\n"}),this.mesh=new u_(this.geometry,this.material),this.gallery.add(this.mesh)}},{key:"fitPlaneToCamera",value:function(){var t=this.experience.camera.instance.position.z,e=this.sizes.hero.width/this.sizes.hero.height,n=this.experience.camera.instance.fov*Math.PI/180,r=2*Math.tan(n/2)*t,i=r*e;this.mesh.scale.x=i,this.mesh.scale.y=r}},{key:"initEvents",value:function(){var t=this;this.resources.on("ready",(function(){t.initTexture()}))}},{key:"calcAspectRatio",value:function(){var t,e,n=[{width:512,height:512},{width:1920,height:1080}],r=this.sizes.isMobile?0:1,i=n[r].width,o=n[r].height/i;return this.sizes.hero.height/this.sizes.hero.width>o?(t=this.sizes.hero.width/this.sizes.hero.height*o,e=1):(t=1,e=this.sizes.hero.height/this.sizes.hero.width/o),{x:this.sizes.hero.width,y:this.sizes.hero.height,z:t,w:e}}},{key:"updateGlobalCursor",value:function(){var t=this.canvas.getBoundingClientRect(),e=this.input.calculateCursorDelta(t);this.material.uniforms.uCursorDelta.value.copy(e)}},{key:"update",value:function(t){this.videoTexture&&this.videoTexture.videoTexture&&this.videoTexture.videoTexture.update(),this.updateGlobalCursor(),this.material.uniforms.uTimer.value+=t}},{key:"resize",value:function(){var t=this.calcAspectRatio();this.material.uniforms.uResolution.value.set(t.x,t.y,t.z,t.w)}},{key:"destroy",value:function(){this.scene&&this.scene.remove(this.gallery),this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose(),this.mesh&&(this.mesh.geometry.dispose(),this.mesh.material.dispose()),this.videoTexture&&this.videoTexture.videoTexture.dispose(),this.videoElement&&(this.videoElement.pause(),this.videoElement.src="",this.videoElement.load()),this.resources&&this.resources.off("ready",this.initTexture),this.gallery=null,this.experience=null,this.input=null,this.sizes=null,this.resources=null,this.scene=null,this.fluidCursorTexture=null,this.pano=null,this.canvas=null,this.geometry=null,this.material=null,this.mesh=null,this.videoTexture=null,this.videoElement=null,t._instance=null}}])&&fT(e.prototype,n),r&&fT(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function yT(t){return(yT="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 _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,bT(r.key),r)}}function bT(t){var e=function(t,e){if("object"!=yT(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=yT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==yT(e)?e:String(e)}mT(vT,"_instance",null);var xT=function(){function t(){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),t._instance)return t._instance;t._instance=this,this.experience=new aA,this.sizes=this.experience.sizes,this.clock=this.experience.time,this.width=this.sizes.hero.width,this.height=this.sizes.hero.height,this.aspect=this.width/this.height,this.isMobile=!1,this.breakpoint=768,this.fboWidth=null,this.fboHeight=null,this.resizeFunc=this.resize.bind(this),this.time=0,this.delta=0,this.init()}var e,n,r;return e=t,r=[{key:"getInstance",value:function(){return null===this._instance&&(this._instance=new t),this._instance}}],(n=[{key:"init",value:function(){this.pixelRatio=window.devicePixelRatio,this.resize(),this.renderer=this.experience.renderer.instance,this.renderTarget=new av(this.width,this.height,{minFilter:1003,magFilter:1003,format:1023,type:1016,stencilBuffer:!1,depthBuffer:!1,generateMipmaps:!1})}},{key:"resize",value:function(){this.width=this.sizes.hero.width,this.height=this.sizes.hero.height,this.aspect=this.width/this.height}},{key:"update",value:function(){this.delta=this.clock.getDelta(),this.time+=this.delta}},{key:"getTexture",value:function(){return this.renderTarget.texture}},{key:"destroy",value:function(){window.removeEventListener("resize",this.resizeFunc),this.renderTarget&&this.renderTarget.dispose(),this.experience=null,this.sizes=null,this.clock=null,this.renderer=null,this.width=null,this.height=null,this.aspect=null,this.isMobile=!1,this.fboWidth=null,this.fboHeight=null,this.pixelRatio=null,this.time=0,this.delta=0,t._instance=null}}])&&_T(e.prototype,n),r&&_T(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();!function(t,e,n){(e=bT(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(xT,"_instance",null);var wT="precision lowp float;\nattribute vec3 position;\nuniform vec2 px;\nuniform vec2 boundarySpace;\nvarying vec2 uv;\n\n\nvoid main(){\n    vec3 pos = position;\n    vec2 scale = 1.0 - boundarySpace * 2.0;\n    pos.xy = pos.xy * scale;\n    uv = vec2(0.5)+(pos.xy)*0.5;\n    gl_Position = vec4(pos, 1.0);\n}\n",ET="precision lowp float;\nuniform sampler2D velocity;\nuniform float dt;\nuniform vec2 fboSize;\nuniform vec2 px;\nuniform float dissipation;\nvarying vec2 uv;\n\nvoid main() {\n    vec2 ratio = max(fboSize.x, fboSize.y) / fboSize;\n\n    vec2 spot_new = uv;\n    vec2 vel_old = texture2D(velocity, uv).xy;\n    // back trace\n    vec2 spot_old = spot_new - vel_old * dt * ratio;\n    vec2 vel_new1 = texture2D(velocity, spot_old).xy;\n\n    // forward trace\n    vec2 spot_new2 = spot_old + vel_new1 * dt * ratio;\n\n    vec2 error = spot_new2 - spot_new;\n\n    vec2 spot_new3 = spot_new - error / 2.0;\n    vec2 vel_2 = texture2D(velocity, spot_new3).xy * 0.95;\n\n    // back trace 2\n    vec2 spot_old2 = spot_new3 - vel_2 * dt * ratio;\n    vec2 newVel2 = texture2D(velocity, spot_old2).xy;\n\n    // Apply dissipation\n    newVel2 *= dissipation;\n\n    gl_FragColor = vec4(newVel2, 0.0, 1.0);\n//    vec2 vel = texture2D(velocity, uv).xy;\n//    vec2 uv2 = uv - vel * dt * ratio;\n//    vec2 newVel = texture2D(velocity, uv2).xy;\n//\n//    newVel *= dissipation;\n//\n//    gl_FragColor = vec4(newVel, 0.0, 0.0);\n\n\n}\n";function TT(t){return(TT="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 ST(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,AT(r.key),r)}}function AT(t){var e=function(t,e){if("object"!=TT(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=TT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==TT(e)?e:String(e)}var MT=function(){function t(e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.props=e,this.uniforms=null===(n=this.props.material)||void 0===n?void 0:n.uniforms,this.common=xT.getInstance()}var e,n,r;return e=t,(n=[{key:"init",value:function(){this.scene=new ww,this.camera=new v_,this.uniforms&&(this.material=new kw(this.props.material),this.geometry=new L_(2,2),this.plane=new u_(this.geometry,this.material),this.scene.add(this.plane))}},{key:"update",value:function(){this.common.renderer.setRenderTarget(this.props.output),this.common.renderer.render(this.scene,this.camera),this.common.renderer.setRenderTarget(null)}},{key:"destroy",value:function(){if(this.geometry&&(this.geometry.dispose(),this.geometry=null),this.material&&(this.material.dispose(),this.material=null),this.plane&&(this.scene.remove(this.plane),this.plane=null),this.scene){for(;this.scene.children.length>0;){var t=this.scene.children[0];this.scene.remove(t),t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()}this.scene=null}if(this.camera=null,this.uniforms){for(var e in this.uniforms)this.uniforms[e].value=null;this.uniforms=null}this.props=null,this.common=null}}])&&ST(e.prototype,n),r&&ST(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function DT(t){return(DT="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 CT(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,RT(r.key),r)}}function RT(t){var e=function(t,e){if("object"!=DT(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=DT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==DT(e)?e:String(e)}function OT(){return(OT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=PT(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function PT(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=FT(t)););return t}function IT(t,e){return(IT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function LT(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=FT(t);if(e){var i=FT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return NT(this,n)}}function NT(t,e){if(e&&("object"===DT(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 FT(t){return(FT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var kT=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&IT(t,e)}(o,t);var e,n,r,i=LT(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,{material:{depthWrite:!1,depthTest:!1,vertexShader:wT,fragmentShader:ET,uniforms:{boundarySpace:{value:t.cellScale},px:{value:t.cellScale},fboSize:{value:t.fboSize},velocity:{value:t.src.texture},dt:{value:t.dt},dissipation:{value:.95}}},output:t.dst})).init(),e}return e=o,(n=[{key:"init",value:function(){OT(FT(o.prototype),"init",this).call(this),this.createBoundary()}},{key:"createBoundary",value:function(){var t=new Zy,e=new Float32Array([-1,-1,0,-1,1,0,-1,1,0,1,1,0,1,1,0,1,-1,0,1,-1,0,-1,-1,0]);t.setAttribute("position",new Gy(e,3));var n=new kw({vertexShader:"precision lowp float;\nattribute vec3 position;\nvarying vec2 uv;\nuniform vec2 px;\n\n\n\nvoid main(){\n    vec3 pos = position;\n    uv = 0.5 + pos.xy * 0.5;\n    vec2 n = sign(pos.xy);\n    pos.xy = abs(pos.xy) - px * 1.0;\n    pos.xy *= n;\n    gl_Position = vec4(pos, 1.0);\n}\n",fragmentShader:ET,uniforms:this.uniforms});this.line=new Nw(t,n),this.scene.add(this.line)}},{key:"update",value:function(t){var e=t.dt,n=t.isBounce;t.BFECC,this.uniforms.dt.value=e,this.line.visible=n,OT(FT(o.prototype),"update",this).call(this)}},{key:"destroy",value:function(){for(var t in OT(FT(o.prototype),"destroy",this).call(this),this.line&&(this.line.geometry&&this.line.geometry.dispose(),this.line.material&&this.line.material.dispose(),this.scene.remove(this.line),this.line=null),this.uniforms)this.uniforms[t].value=null;this.uniforms=null,this.output=null}}])&&CT(e.prototype,n),r&&CT(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(MT);function UT(t){return(UT="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 BT(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,zT(r.key),r)}}function GT(t,e,n){return(e=zT(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function zT(t){var e=function(t,e){if("object"!=UT(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=UT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==UT(e)?e:String(e)}var HT=function(){function t(){var e=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),GT(this,"onMouseMoved",(function(t){var n=t.clientX,r=t.clientY;e.clientX=n,e.clientY=r,e.cursor.x=n/window.innerWidth*2-1,e.cursor.y=-r/window.innerHeight*2+1,e.cursor.x=Math.max(-1,Math.min(1,e.cursor.x)),e.cursor.y=Math.max(-1,Math.min(1,e.cursor.y))})),t._instance)return t._instance;t._instance=this,this.experience=aA.getInstance(),this.canvas=this.experience.renderer.canvas,this.sizes=FE.getInstance(),this.cursor=new hv,this.coords_old=new Ug,this.diff=new Ug,this.clientX=0,this.clientY=0,this.init()}var e,n,r;return e=t,r=[{key:"getInstance",value:function(){return t.instance||new t}}],(n=[{key:"init",value:function(){window.addEventListener("mousemove",this.onMouseMoved)}},{key:"update",value:function(){this.diff.subVectors(this.cursor,this.coords_old),this.coords_old.copy(this.cursor),0===this.coords_old.x&&0===this.coords_old.y&&this.diff.set(0,0)}},{key:"getCursorPosition",value:function(){return this.cursor}},{key:"getCursorDiff",value:function(){return this.diff}},{key:"calculateCursorDelta",value:function(t){var e=t.left/t.width,n=-t.top/t.height;return new Ug(e,n)}},{key:"destroy",value:function(){window.removeEventListener("mousemove",this.onMouseMoved),t._instance=null}}])&&BT(e.prototype,n),r&&BT(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function jT(t){return(jT="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 VT(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,XT(r.key),r)}}function XT(t){var e=function(t,e){if("object"!=jT(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=jT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==jT(e)?e:String(e)}function WT(){return(WT="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=YT(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function YT(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ZT(t)););return t}function qT(t,e){return(qT=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function $T(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=ZT(t);if(e){var i=ZT(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return KT(this,n)}}function KT(t,e){if(e&&("object"===jT(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 ZT(t){return(ZT=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}GT(HT,"instance",null);var JT=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qT(t,e)}(o,t);var e,n,r,i=$T(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,{output:t.dst})).input=HT.getInstance(),e.init(t),e}return e=o,(n=[{key:"init",value:function(t){WT(ZT(o.prototype),"init",this).call(this);var e=new L_(1,1),n=new kw({vertexShader:"precision lowp float;\n\nattribute vec3 position;\nattribute vec2 uv;\nuniform vec2 center;\nuniform vec2 scale;\nuniform vec2 px;\nvarying vec2 vUv;\n\nvoid main(){\n    vec2 pos = position.xy * scale * 2.0 * px + center;\n    vUv = uv;\n    gl_Position = vec4(pos, 0.0, 1.0);\n}\n",fragmentShader:"precision lowp float;\n\nuniform vec2 force;\nuniform vec2 center;\nuniform vec2 scale;\nuniform vec2 px;\nvarying vec2 vUv;\n\nvoid main(){\n    vec2 circle = (vUv - 0.5) * 2.5;\n    float d = 1.0-min(length(circle), 1.0);\n    d *= d;\n    gl_FragColor = vec4(force * d, 0, 1);\n}\n",blending:2,depthWrite:!1,depthTest:!1,uniforms:{px:{value:t.cellScale},force:{value:new Ug(0,0)},center:{value:new Ug(0,0)},scale:{value:new Ug(t.cursor_size,t.cursor_size)}}});this.mouseMesh=new u_(e,n),this.scene.add(this.mouseMesh)}},{key:"update",value:function(t){var e=this.input.diff.x/2*t.mouse_force,n=this.input.diff.y/2*t.mouse_force,r=t.cursor_size*t.cellScale.x,i=t.cursor_size*t.cellScale.y,s=Math.min(Math.max(this.input.cursor.x,-1+r+2*t.cellScale.x),1-r-2*t.cellScale.x),a=Math.min(Math.max(this.input.cursor.y,-1+i+2*t.cellScale.y),1-i-2*t.cellScale.y),l=this.mouseMesh.material.uniforms;l.force.value.set(e,n),l.center.value.set(s,a),l.scale.value.set(t.cursor_size,t.cursor_size),WT(ZT(o.prototype),"update",this).call(this)}},{key:"destroy",value:function(){WT(ZT(o.prototype),"destroy",this).call(this),this.scene.remove(this.mouseMesh),this.mouseMesh.geometry.dispose(),this.mouseMesh.material.dispose(),this.mouseMesh=null,this.input=null}}])&&VT(e.prototype,n),r&&VT(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(MT);function QT(t){return(QT="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 tS(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,eS(r.key),r)}}function eS(t){var e=function(t,e){if("object"!=QT(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=QT(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==QT(e)?e:String(e)}function nS(){return(nS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=rS(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function rS(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=aS(t)););return t}function iS(t,e){return(iS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function oS(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=aS(t);if(e){var i=aS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return sS(this,n)}}function sS(t,e){if(e&&("object"===QT(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 aS(t){return(aS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var lS=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iS(t,e)}(o,t);var e,n,r,i=oS(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,{material:{depthWrite:!1,depthTest:!1,vertexShader:wT,fragmentShader:"precision lowp float;\nuniform sampler2D velocity;\nuniform float dt;\nuniform vec2 px;\nvarying vec2 uv;\n\nvoid main(){\n    float x0 = texture2D(velocity, uv-vec2(px.x, 0)).x;\n    float x1 = texture2D(velocity, uv+vec2(px.x, 0)).x;\n    float y0 = texture2D(velocity, uv-vec2(0, px.y)).y;\n    float y1 = texture2D(velocity, uv+vec2(0, px.y)).y;\n    float divergence = (x1-x0 + y1-y0) / 2.0;\n\n    gl_FragColor = vec4(divergence / dt);\n}\n",uniforms:{boundarySpace:{value:t.boundarySpace},velocity:{value:t.src.texture},px:{value:t.cellScale},dt:{value:t.dt}}},output:t.dst})).init(),e}return e=o,(n=[{key:"update",value:function(t){var e=t.vel;this.uniforms.velocity.value=e.texture,nS(aS(o.prototype),"update",this).call(this)}},{key:"destroy",value:function(){for(var t in nS(aS(o.prototype),"destroy",this).call(this),this.uniforms)this.uniforms[t].value=null;this.uniforms=null,this.output=null}}])&&tS(e.prototype,n),r&&tS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(MT);function uS(t){return(uS="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 cS(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,hS(r.key),r)}}function hS(t){var e=function(t,e){if("object"!=uS(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=uS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==uS(e)?e:String(e)}function dS(){return(dS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=pS(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function pS(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vS(t)););return t}function fS(t,e){return(fS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function mS(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=vS(t);if(e){var i=vS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return gS(this,n)}}function gS(t,e){if(e&&("object"===uS(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 vS(t){return(vS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var yS=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fS(t,e)}(o,t);var e,n,r,i=mS(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,{material:{depthWrite:!1,depthTest:!1,vertexShader:wT,fragmentShader:"precision lowp float;\nuniform sampler2D pressure;\nuniform sampler2D divergence;\nuniform vec2 px;\nvarying vec2 uv;\n\nvoid main(){\n    // poisson equation\n    float p0 = texture2D(pressure, uv+vec2(px.x * 2.0,  0)).r;\n    float p1 = texture2D(pressure, uv-vec2(px.x * 2.0, 0)).r;\n    float p2 = texture2D(pressure, uv+vec2(0, px.y * 2.0 )).r;\n    float p3 = texture2D(pressure, uv-vec2(0, px.y * 2.0 )).r;\n    float div = texture2D(divergence, uv).r;\n\n    float newP = (p0 + p1 + p2 + p3) / 4.0 - div;\n    gl_FragColor = vec4(newP);\n}\n",uniforms:{boundarySpace:{value:t.boundarySpace},pressure:{value:t.dst_.texture},divergence:{value:t.src.texture},px:{value:t.cellScale}}},output:t.dst,output0:t.dst_,output1:t.dst})).init(),e}return e=o,(n=[{key:"update",value:function(t){for(var e,n,r=t.iterations,i=0;i<r;i++)i%2==0?(e=this.props.output0,n=this.props.output1):(e=this.props.output1,n=this.props.output0),this.uniforms.pressure.value=e.texture,this.props.output=n,dS(vS(o.prototype),"update",this).call(this);return n}},{key:"destroy",value:function(){for(var t in dS(vS(o.prototype),"destroy",this).call(this),this.uniforms)this.uniforms[t].value=null;this.uniforms=null,this.props.output=null,this.props.output0=null,this.props.output1=null,this.props=null}}])&&cS(e.prototype,n),r&&cS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(MT);function _S(t){return(_S="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 bS(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,xS(r.key),r)}}function xS(t){var e=function(t,e){if("object"!=_S(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=_S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==_S(e)?e:String(e)}function wS(){return(wS="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=ES(t,e);if(r){var i=Object.getOwnPropertyDescriptor(r,e);return i.get?i.get.call(arguments.length<3?t:n):i.value}}).apply(this,arguments)}function ES(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=MS(t)););return t}function TS(t,e){return(TS=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function SS(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=MS(t);if(e){var i=MS(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return AS(this,n)}}function AS(t,e){if(e&&("object"===_S(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 MS(t){return(MS=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var DS=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&TS(t,e)}(o,t);var e,n,r,i=SS(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this,{material:{depthWrite:!1,depthTest:!1,vertexShader:wT,fragmentShader:"precision lowp float;\nuniform sampler2D pressure;\nuniform sampler2D velocity;\nuniform vec2 px;\nuniform float dt;\nvarying vec2 uv;\n\nvoid main(){\n    float p0 = texture2D(pressure, uv+vec2(px.x, 0)).r;\n    float p1 = texture2D(pressure, uv-vec2(px.x, 0)).r;\n    float p2 = texture2D(pressure, uv+vec2(0, px.y)).r;\n    float p3 = texture2D(pressure, uv-vec2(0, px.y)).r;\n\n    vec2 v = texture2D(velocity, uv).xy;\n    vec2 gradP = vec2(p0 - p1, p2 - p3) * 0.5;\n    v = v - gradP * dt;\n    gl_FragColor = vec4(v, 0.0, 1.0);\n}\n",uniforms:{boundarySpace:{value:t.boundarySpace},pressure:{value:t.src_p.texture},velocity:{value:t.src_v.texture},px:{value:t.cellScale},dt:{value:t.dt}}},output:t.dst})).init(),e}return e=o,(n=[{key:"update",value:function(t){var e=t.vel,n=t.pressure;this.uniforms.velocity.value=e.texture,this.uniforms.pressure.value=n.texture,wS(MS(o.prototype),"update",this).call(this)}},{key:"destroy",value:function(){for(var t in wS(MS(o.prototype),"destroy",this).call(this),this.uniforms)this.uniforms[t].value=null;this.uniforms=null,this.output=null,this.init=null}}])&&bS(e.prototype,n),r&&bS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(MT);function CS(t){return(CS="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 RS(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,OS(r.key),r)}}function OS(t){var e=function(t,e){if("object"!=CS(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=CS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==CS(e)?e:String(e)}var PS=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.props=e,this.fbos={vel_0:null,vel_1:null,vel_viscous0:null,vel_viscous1:null,div:null,pressure_0:null,pressure_1:null},this.options={iterations_poisson:8,iterations_viscous:8,mouse_force:20,resolution:.5,cursor_size:120,viscous:15,dt:.024,isViscous:!1},this.experience=aA.getInstance(),this.sizes=this.experience.sizes,this.fboSize=new Ug,this.cellScale=new Ug,this.boundarySpace=new Ug,this.init()}var e,n,r;return e=t,(n=[{key:"init",value:function(){this.calcSize(),this.createAllFBO(),this.createShaderPass()}},{key:"createAllFBO",value:function(){var t=/(iPad|iPhone|iPod)/g.test(navigator.userAgent)?1016:1015;for(var e in this.fbos)this.fbos[e]=new av(this.fboSize.x,this.fboSize.y,{type:t})}},{key:"createShaderPass",value:function(){this.advection=new kT({cellScale:this.cellScale,fboSize:this.fboSize,dt:this.options.dt,src:this.fbos.vel_0,dst:this.fbos.vel_1}),this.externalForce=new JT({cellScale:this.cellScale,cursor_size:this.options.cursor_size,dst:this.fbos.vel_1}),this.divergence=new lS({cellScale:this.cellScale,boundarySpace:this.boundarySpace,src:this.fbos.vel_viscous0,dst:this.fbos.div,dt:this.options.dt}),this.poisson=new yS({cellScale:this.cellScale,boundarySpace:this.boundarySpace,src:this.fbos.div,dst:this.fbos.pressure_1,dst_:this.fbos.pressure_0}),this.pressure=new DS({cellScale:this.cellScale,boundarySpace:this.boundarySpace,src_p:this.fbos.pressure_0,src_v:this.fbos.vel_viscous0,dst:this.fbos.vel_0,dt:this.options.dt})}},{key:"calcSize",value:function(){var t=Math.round(this.options.resolution*this.sizes.hero.width),e=Math.round(this.options.resolution*this.sizes.hero.height),n=1/t,r=1/e;this.cellScale.set(n,r),this.fboSize.set(t,e)}},{key:"resize",value:function(){for(var t in this.calcSize(),this.fbos)this.fbos[t].setSize(this.fboSize.x,this.fboSize.y)}},{key:"update",value:function(){this.boundarySpace.copy(this.cellScale),this.advection.update(this.options),this.externalForce.update({cursor_size:this.options.cursor_size,mouse_force:this.options.mouse_force,cellScale:this.cellScale});var t=this.fbos.vel_1;this.divergence.update({vel:t});var e=this.poisson.update({iterations:this.options.iterations_poisson});this.pressure.update({vel:t,pressure:e})}},{key:"destroy",value:function(){for(var t in this.fbos)this.fbos[t]&&(this.fbos[t].dispose(),this.fbos[t]=null);this.advection&&(this.advection.destroy(),this.advection=null),this.externalForce&&(this.externalForce.destroy(),this.externalForce=null),this.divergence&&(this.divergence.destroy(),this.divergence=null),this.poisson&&(this.poisson.destroy(),this.poisson=null),this.pressure&&(this.pressure.destroy(),this.pressure=null),this.props=null,this.experience=null,this.sizes=null,this.fboSize=null,this.cellScale=null,this.boundarySpace=null,this.options=null}}])&&RS(e.prototype,n),r&&RS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function IS(t){return(IS="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 LS(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,NS(r.key),r)}}function NS(t){var e=function(t,e){if("object"!=IS(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=IS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==IS(e)?e:String(e)}var FS=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.experience=aA.getInstance(),this.common=xT.getInstance(),this.init()}var e,n,r;return e=t,(n=[{key:"init",value:function(){this.simulation=new PS,this.scene=new ww,this.camera=new v_,this.output=new u_(new L_(2,2),new kw({depthWrite:!1,depthTest:!1,vertexShader:wT,fragmentShader:"precision lowp float;\nuniform sampler2D velocity;\nvarying vec2 uv;\n\nvoid main(){\n    vec2 vel = texture2D(velocity, uv).xy;\n    float len = length(vel);\n    vel = vel * 1.5 + 0.1;\n\n    vec3 color = vec3(vel.x, vel.y, 1.0);\n    color = mix(vec3(0.), color, len);\n\n    gl_FragColor = vec4(color,  1.0);\n}\n",uniforms:{velocity:{value:this.simulation.fbos.vel_0.texture},clearColor:{value:new Iy(1118481).convertSRGBToLinear()},boundarySpace:{value:new Ug}}})),this.scene.add(this.output)}},{key:"resize",value:function(){this.simulation.resize()}},{key:"render",value:function(){this.common.renderer.setRenderTarget(this.common.renderTarget),this.common.renderer.autoClear=!1,this.common.renderer.render(this.scene,this.camera),this.common.renderer.setRenderTarget(null)}},{key:"update",value:function(){this.simulation.update(),this.render()}},{key:"destroy",value:function(){this.output&&(this.output.geometry&&this.output.geometry.dispose(),this.output.material&&(this.output.material.uniforms.velocity.value&&this.output.material.uniforms.velocity.value.dispose(),this.output.material.dispose())),this.scene&&(this.scene.remove(this.output),this.scene.traverse((function(t){t.geometry&&t.geometry.dispose(),t.material&&t.material.dispose()}))),this.simulation&&this.simulation.destroy(),this.experience=null,this.common=null,this.simulation=null,this.scene=null,this.camera=null,this.output=null}}])&&LS(e.prototype,n),r&&LS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function kS(t){return(kS="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 US(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,BS(r.key),r)}}function BS(t){var e=function(t,e){if("object"!=kS(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=kS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==kS(e)?e:String(e)}var GS=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.common=new xT,this.input=HT.getInstance(),this.init()}var e,n,r;return e=t,(n=[{key:"init",value:function(){this.output=new FS}},{key:"resize",value:function(){this.common.resize(),this.output.resize()}},{key:"update",value:function(){this.input.update(),this.common.update(),this.output.update()}},{key:"getTexture",value:function(){return this.common.getTexture()}},{key:"destroy",value:function(){this.common.destroy(),this.output.destroy()}}])&&US(e.prototype,n),r&&US(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zS(t){return(zS="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 HS(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,jS(r.key),r)}}function jS(t){var e=function(t,e){if("object"!=zS(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=zS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==zS(e)?e:String(e)}var VS=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.container=e,this.experience=new aA,this.ui=this.experience.ui,this.sizes=this.experience.sizes,this.resources=this.experience.resources,this.progress=0,this.totalDuration=0,this.videoLoopCount=3,this.init(),this.initEvents()}var e,n,r;return e=t,(n=[{key:"initTexture",value:function(){null!==this.resources.items.videoTextureBackground?(this.videoTexture=this.resources.items.videoTextureBackground,this.videoTexture.videoTexture.format=1022,this.videoTexture.videoTexture.colorSpace="srgb",this.videoTexture.videoTexture.minFilter=1006,this.videoTexture.videoTexture.magFilter=1006,this.videoTexture.videoTexture.generateMipmaps=!1,this.videoTexture.videoTexture.flipY=!1,this.videoElement=this.videoTexture.videoElement,this.uniforms.uTexture.value=this.videoTexture.videoTexture,this.totalDuration=this.videoElement.duration*this.videoLoopCount):this.videoTexture=null}},{key:"init",value:function(){var t=this;this.scene=new ww,this.resources.on("ready",(function(){t.initTexture()})),this.camera=new Y_(-1,1,1,-1,-1,1),this.renderer=new xw({powerPreference:"high-performance",antialias:!1,alpha:!1,stencil:!1,depth:!1,useLegacyLights:!1,physicallyCorrectLights:!1}),this.clearColor="#8272FB",this.renderer.setPixelRatio(Math.min(window.devicePixelRatio,2)),this.renderer.setSize(window.innerWidth,1.2*window.innerHeight),this.container.appendChild(this.renderer.domElement),this.renderer.outputColorSpace="srgb",this.renderer.toneMapping=0,this.renderer.setClearColor(this.clearColor,1),this.uniforms={uTexture:{value:null},uScrollRatio:{value:0},uTotalTextureHeight:{value:1}},this.material=new g_({uniforms:this.uniforms,vertexShader:"varying vec2 vUv;\nvoid main() {\n    vUv = uv;\n\n    gl_Position = projectionMatrix * modelViewMatrix * vec4(position,1.0);\n}\n",fragmentShader:"uniform sampler2D uTexture;\nuniform float uScrollRatio;\nuniform float uTotalTextureHeight;\nvarying vec2 vUv;\n\nfloat random(vec2 st) {\n    return fract(sin(dot(st.xy, vec2(12.9898, 78.233))) * 43758.5453123);\n}\n\nvoid main() {\n    vec2 uv = vUv;\n    float visibleTextureFraction = 1.0 / uTotalTextureHeight;\n\n    uv.y = uv.y * visibleTextureFraction + (1.0 - uScrollRatio) * (1.0 - visibleTextureFraction);\n\n    float blurAmount = 0.005;\n    vec4 color = vec4(0.0);\n    for (float x = -2.0; x <= 2.0; x++) {\n        for (float y = -2.0; y <= 2.0; y++) {\n            vec2 offset = vec2(x, y) * blurAmount;\n            color += texture2D(uTexture, uv + offset);\n        }\n    }\n    color /= 25.0; // Normalize (5x5 kernel)\n\n    vec3 whiteColor = vec3(1.0, 1.0, 1.0);\n    float overlayOpacity = 0.4;\n    color.rgb = mix(color.rgb, whiteColor, overlayOpacity);\n\n    float grain = random(vUv);\n    float grainThreshold = 0.9;\n    float grainOpacity = 0.25;\n\n    if (grain > grainThreshold) {\n        color.rgb = mix(color.rgb, whiteColor, grainOpacity);\n    }\n\n    gl_FragColor = color;\n}\n"}),this.geometry=new L_(2,2),this.mesh=new u_(this.geometry,this.material),this.scene.add(this.mesh)}},{key:"updateUniforms",value:function(){var t=window.innerHeight,e=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)/t;this.uniforms.uScrollRatio.value=this.progress,this.uniforms.uTotalTextureHeight.value=e}},{key:"onWindowResize",value:function(){this.renderer.setSize(window.innerWidth,1.2*window.innerHeight),this.updateUniforms()}},{key:"render",value:function(){this.updateUniforms(),this.renderer.render(this.scene,this.camera)}},{key:"initEvents",value:function(){window.addEventListener("resize",this.onWindowResize.bind(this)),this.ui.on("backgroundUpdate",this.update.bind(this))}},{key:"update",value:function(t){if(0!==this.totalDuration){this.progress=t;var e=t*this.totalDuration%this.videoElement.duration;Math.abs(this.videoElement.currentTime-e)>.01&&(this.videoElement.currentTime=e,this.videoTexture.videoTexture.needsUpdate=!0)}}},{key:"destroy",value:function(){window.removeEventListener("resize",this.onWindowResize.bind(this)),this.ui.off("backgroundUpdate",this.update.bind(this)),this.geometry&&this.geometry.dispose(),this.material&&this.material.dispose(),this.mesh&&this.scene.remove(this.mesh),this.renderer&&this.renderer.dispose(),this.container&&this.renderer&&this.container.removeChild(this.renderer.domElement),this.videoTexture&&this.videoTexture.videoTexture.dispose(),this.videoElement&&(this.videoElement.pause(),this.videoElement.src="",this.videoElement.load()),this.scene=null,this.camera=null,this.renderer=null,this.geometry=null,this.material=null,this.mesh=null,this.videoTexture=null,this.videoElement=null,this.uniforms=null,this.experience&&this.experience.background===this&&(this.experience.background=null),this.container=null,this.experience=null,this.ui=null,this.sizes=null,this.resources=null}}])&&HS(e.prototype,n),r&&HS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function XS(t){return(XS="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 WS(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,YS(r.key),r)}}function YS(t){var e=function(t,e){if("object"!=XS(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=XS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==XS(e)?e:String(e)}h.b.registerPlugin(rn);var qS=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.experience=aA.getInstance(),this.sizes=this.experience.sizes,this.resources=this.experience.resources,this.element=document.getElementById("cyber60-intro"),this.videoEl=document.getElementById("cyber60-intro-video"),this.maskEl=document.getElementById("cyber60-intro-mask"),this.maskTopEl=document.getElementById("cyber60-intro-mask-top"),this.maskBottomEl=document.getElementById("cyber60-intro-mask-bottom"),this.scroller=window.scroller,this.isMobile=this.scroller.scroll.isMobile,this.addListeners()}var e,n,r;return e=t,(n=[{key:"initMaskDesktop",value:function(){var t=this;h.b.set(this.maskTopEl,{height:function(){return(window.innerHeight-window.innerWidth/t.aspectRatio)/2},scaleY:0}),h.b.set(this.maskBottomEl,{height:function(){return(window.innerHeight-window.innerWidth/t.aspectRatio)/2},scaleY:0}),this.timeline=h.b.timeline({scrollTrigger:{trigger:this.element,start:"top bottom",end:function(){return"+=".concat(2*window.innerHeight)},scrub:!0,invalidateOnRefresh:!0,scroller:"[data-scroll-container]"}}).fromTo(this.maskEl,{y:function(){return-1*window.innerHeight*1.5}},{y:function(){return-1*window.innerHeight},duration:1,ease:"none"}).to(this.maskTopEl,{scaleY:1,transformOrigin:"top",duration:.5,ease:"none"},1).to(this.maskBottomEl,{scaleY:1,transformOrigin:"bottom",duration:.5,ease:"none"},1).to(this.maskEl,{scale:50,duration:.5,ease:"none"},1.5).to(this.maskTopEl,{scaleY:0,transformOrigin:"top",duration:.4,ease:"none"},1.5).to(this.maskBottomEl,{scaleY:0,transformOrigin:"bottom",duration:.4,ease:"none"},1.5)}},{key:"initMaskMobile",value:function(){this.timeline=h.b.timeline({scrollTrigger:{trigger:this.element,start:"top bottom",end:function(){return"+=".concat(2*window.innerHeight)},scrub:!0,invalidateOnRefresh:!0,scroller:"[data-scroll-container]"}}).fromTo(this.maskEl,{y:function(){return-1*window.innerHeight*1.5}},{y:function(){return-1*window.innerHeight},duration:1,ease:"none"})}},{key:"initMask",value:function(){this.aspectRatio=425.2/65.2,h.b.set(this.maskEl,{y:function(){return-1*window.innerHeight*1.5}}),this.isMobile?this.initMaskMobile():this.initMaskDesktop()}},{key:"addListeners",value:function(){this.resources.on("ready",this.onResourcesLoaded.bind(this)),this.scroller.on("scroll",this.onScroll.bind(this))}},{key:"onScroll",value:function(t){rn.update()}},{key:"onResourcesLoaded",value:function(){var t=this;this.initTexture(),this.initMask(),setTimeout((function(){t.refresh()}),1e3)}},{key:"initTexture",value:function(){var t=this;null!==this.resources.items.videoTextureHero&&(this.videoTexture=this.resources.items.videoTextureHero,this.video=this.videoTexture.videoElement.cloneNode(!0),this.video.loop=!0,this.video.muted=!0,this.video.autoplay=!0,this.video.playsInline=!0,this.video.crossOrigin="anonymous",this.video.setAttribute("playsinline",""),this.video.setAttribute("muted",""),this.video.setAttribute("autoplay",""),this.video.setAttribute("loop",""),this.video.setAttribute("crossorigin","anonymous"),this.video.setAttribute("preload","auto"),this.video.setAttribute("webkit-playsinline",""),this.video.controls=!1,this.videoEl.appendChild(this.video),this.video.play(),this.video.addEventListener("pause",(function(){t.video.play()})))}},{key:"refresh",value:function(){rn.refresh()}}])&&WS(e.prototype,n),r&&WS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function $S(t){return($S="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 KS(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,ZS(r.key),r)}}function ZS(t){var e=function(t,e){if("object"!=$S(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=$S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==$S(e)?e:String(e)}var JS=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.experience=new aA,this.ui=this.experience.ui,this.time=this.experience.time,this.camera=this.experience.camera,this.scene=this.experience.scene,this.resources=this.experience.resources,this.input=this.experience.input,this.fluidCursor=new GS,this.fluidCursorTexture=this.fluidCursor.getTexture(),this.raycaster=new cE,this.setupWorld()}var e,n,r;return e=t,(n=[{key:"setupHero",value:function(){this.heroWall=new vT(this.fluidCursorTexture)}},{key:"setupContentBackground",value:function(){this.backgroundEl=document.getElementById("cyber60-content-background"),this.background=new VS(this.backgroundEl)}},{key:"setupWorld",value:function(){this.setupContentBackground(),this.setupHero(),this.setupIntroUI(),this.experience.appLoaded=!0}},{key:"setupIntroUI",value:function(){this.introUI=new qS}},{key:"resize",value:function(){this.fluidCursor&&this.fluidCursor.resize(),this.heroWall&&this.heroWall.resize()}},{key:"update",value:function(t){var e,n;this.camera&&this.heroWall&&this.raycaster.setFromCamera(this.input.cursor,this.camera.instance),null===(e=this.heroWall)||void 0===e||e.update(t),null===(n=this.background)||void 0===n||n.render(t),this.fluidCursor.update(t)}},{key:"destroy",value:function(){var t;null===(t=this.heroWall)||void 0===t||t.destroy(),this.fluidCursor.destroy(),this.background.destroy()}}])&&KS(e.prototype,n),r&&KS(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function QS(t){return(QS="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 tA(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,sA(r.key),r)}}function eA(t,e){return(eA=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function nA(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=oA(t);if(e){var i=oA(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return rA(this,n)}}function rA(t,e){if(e&&("object"===QS(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return iA(t)}function iA(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function oA(t){return(oA=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function sA(t){var e=function(t,e){if("object"!=QS(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=QS(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==QS(e)?e:String(e)}var aA=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}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&eA(t,e)}(o,t);var e,n,r,i=nA(o);function o(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,o),(e=i.call(this)).parent=t||document,o._instance?rA(e,o._instance):(o._instance=iA(e),window.experience=iA(e),e.initResources(),e.init(),e)}return e=o,r=[{key:"getInstance",value:function(){return o._instance||new o}}],(n=[{key:"initDesktop",value:function(){this.scene=new ww,this.camera=new KE,this.renderer=new tT,this.input=new HT,this.world=new JS}},{key:"initMobile",value:function(){this.scene=new ww,this.camera=new KE,this.renderer=new tT,this.input=new HT,this.world=new JS}},{key:"initResources",value:function(){this.resources=new cT(dT)}},{key:"init",value:function(){this.ui=new ME(this.parent),this.sizes=new FE,this.time=new XE,this.sizes.isMobile?this.initMobile():this.initDesktop(),this.setListeners(),this.trigger("classesReady")}},{key:"resize",value:function(){this.camera.resize(),this.world.resize(),this.renderer.resize()}},{key:"update",value:function(){this.world.update(this.time.delta),this.ui.update(this.time.current),this.renderer.update(this.time.delta)}},{key:"updateMobile",value:function(){this.world.update(this.time.delta),this.ui.update(this.time.current),this.renderer.update(this.time.delta)}},{key:"setListeners",value:function(){var t=this;this.sizes.on("resize",(function(){t.resize()})),this.time.on("tick",(function(){t.sizes.isMobile?t.updateMobile():t.update()})),this.resources.on("ready",(function(){t.ui.hidePreloader(),setTimeout((function(){window.scroller.update()}),500)}))}},{key:"destroy",value:function(){this.ui.destroy(),this.camera.destroy(),this.renderer.destroy(),this.world.destroy()}}])&&tA(e.prototype,n),r&&tA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),o}(gE);function lA(t){return(lA="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 uA(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,cA(r.key),r)}}function cA(t){var e=function(t,e){if("object"!=lA(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=lA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==lA(e)?e:String(e)}!function(t,e,n){(e=sA(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(aA,"_instance",null);var hA=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.experience=new aA(e)}var e,n,r;return e=t,r=[{key:"create",value:function(e){return t.instance||(t.instance=new t(e)),t.instance}},{key:"destroy",value:function(){t.instance&&(t.instance.beforeDestroy(),t.instance=null)}}],(n=[{key:"beforeDestroy",value:function(){this.experience.destroy()}}])&&uA(e.prototype,n),r&&uA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function dA(t){return(dA="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 pA(t){return function(t){if(Array.isArray(t))return fA(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return fA(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return fA(t,e)}(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 fA(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 mA(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,gA(r.key),r)}}function gA(t){var e=function(t,e){if("object"!=dA(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!=dA(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==dA(e)?e:String(e)}!function(t,e,n){(e=cA(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n}(hA,"instance",null),h.b.registerPlugin(rn);s.a.use(l.a,{routes:[{path:"/global-presence/:id",name:"global-presence"},{path:"/team-member/:id",name:"team-member"},{path:"/company/:id",name:"company"},{path:"/jobs/:id",name:"jobs"},{path:"/:post/:id",name:"post"}]}),s.a.use(c.a);var vA=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.speed=.5,this.mm=h.b.matchMedia(),this.init()}var e,n,r;return e=t,(n=[{key:"identifierPage",value:function(t){t.current;var e,n=t.next,r=(new DOMParser).parseFromString(n.html,"text/html").querySelector("body").getAttribute("data-slug"),i=document.querySelector("body");(e=i.classList).remove.apply(e,pA(i.classList)),i.classList.add(r)}},{key:"toggleScrollOpacity",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if("object"!==dA(this.scroll))return!1;var n=$("."+this.scroll.scrollbarClass);n.length&&setTimeout((function(){n.css("opacity",0===t?0:"")}),e)}},{key:"initBarba",value:function(){var t=this;s.a.hooks.beforeEnter((function(e){t.identifierPage(e),t.initAlways(e)})),s.a.hooks.beforeLeave((function(e){t.destroyAlways(e),t.toggleScrollOpacity(0)})),s.a.hooks.once((function(e){t.initOnce(e)})),s.a.hooks.afterEnter((function(e){t.initAlwaysEnter(e),t.toggleScrollOpacity(1,500)})),s.a.hooks.leave((function(e){setTimeout((function(){t.mm.add("(min-width:992px)",(function(){window.scroller.scrollTo(document.querySelector("[data-scroll-container]").offsetTop,{duration:.1,disableLerp:!0})})),t.mm.add("(max-width:991px)",(function(){window.scrollTo(0,0)}))}),1e3*t.speed)})),s.a.init({prefetchIgnore:["/company/(.*)","/team-member/(.*)","/story/(.*)","/founder/(.*)","/jobs/(.*)","/global-presence/(.*)"],debug:!1,prevent:function(t){var e=t.el,n=t.href,r=(t.event,window.location.origin);return e.classList&&(e.classList.contains("ab-item")||e.parentElement.classList.contains("ab-item")||document.querySelector('body[data-template="seed-program"]')||document.querySelector(".page-launch")||n===r+"/launch"||n===r+"/launch/"||["enterprise","healthcare","consumer","fintech","gaming","blockchain"].map((function(t){return n===r+"/focus-area-"+t+"/"||n===r+"/focus-area-"+t||document.querySelector("page-focus-area-"+t)})))},timeout:12e3,sync:!0,transitions:[{name:"slide-up-transition",once:function(e){var n=e.next;if("home"!==n.namespace&&"home-india"!==n.namespace)return t.onceTransition=h.b.timeline({onStart:function(){setTimeout((function(){t.mm.add("(min-width:992px)",(function(){window.scroller.scrollTo(document.querySelector("[data-scroll-container]").offsetTop,{duration:.1})})),t.mm.add("(max-width:991px)",(function(){window.scrollTo(0,0)}))}),100)},onComplete:function(){t.onceTransition.kill(),t.onceTransition=null}}).set(n.container,{y:100,autoAlpha:0}).to(n.container,{autoAlpha:1,ease:"circ.out",duration:t.speed,delay:.5,y:0,clearProps:"y"}),t.onceTransition;h.b.set(n.container,{autoAlpha:1})},leave:function(e){return h.b.set(document.querySelector("#footer"),{autoAlpha:0}),t.leaveTransition=h.b.timeline({onComplete:function(){t.leaveTransition.kill(),t.leaveTransition=null}}).to(e.current.container,{autoAlpha:0,ease:"circ.out",duration:t.speed,y:100,clearProps:"all",onStart:function(){}}).set(e.current.container,{opacity:0,y:0}),t.leaveTransition},enter:function(e){"home"!==e.next.namespace?(h.b.set(e.next.container,{autoAlpha:1}),t.enterTransititon=h.b.timeline().from(e.next.container,{autoAlpha:0,ease:"circ.out",delay:.5,y:200,duration:t.speed,clearProps:"y",onStart:function(){},onComplete:function(){h.b.set(document.querySelector("#footer"),{autoAlpha:1}),t.enterTransititon.kill(),t.enterTransititon=null}})):setTimeout((function(){h.b.set(e.next.container,{autoAlpha:1}),h.b.set(document.querySelector("#footer"),{autoAlpha:1})}),700)}}],views:[{namespace:"home",beforeEnter:function(t){Sn(t).then((function(e){var n=t.next.container.querySelector("#banner-type-2");n&&qi.create(n),Ss.create({selector:t.next.container.querySelector(".swiper-founder"),container:t.next.container,namespace:t.next.namespace,next:"[data-barba-namespace='home'] .founder-section .swiper-button-next",prev:"[data-barba-namespace='home'] .swiper-button-prev",pagination:'[data-barba-namespace="home"]  .founder-section .swiper-pagination'})}))},beforeLeave:function(){qi.destroy(),Ss.destroy()}},{namespace:"home-india",beforeEnter:function(t){Sn(t).then((function(e){var n=t.next.container.querySelector("#banner-type-2");n&&qi.create(n),Ss.create({selector:t.next.container.querySelector(".swiper-founder"),container:t.next.container,namespace:t.next.namespace,next:"[data-barba-namespace='home-india'] .founder-section .swiper-button-next",prev:"[data-barba-namespace='home-india'] .founder-section .swiper-button-prev",pagination:'[data-barba-namespace="home-india"]  .founder-section .swiper-pagination',breakpoints:{768:{slidesPerView:2,spaceBetween:64,slidesPerGroup:1},1024:{slidesPerView:2,spaceBetween:64,slidesPerGroup:1},1280:{slidesPerView:5,spaceBetween:116,slidesPerGroup:1}}})})),setTimeout((function(){Si.create({selector:t.next.container.querySelector(".swiper-stories:not(#specialists-swiper)"),next:'[data-barba-namespace="home-india"] .stories-slider-section .swiper-button-next',prev:'[data-barba-namespace="home-india"] .stories-slider-section .swiper-button-prev',pagination:'[data-barba-namespace="home-india"] .stories-slider-section .swiper-pagination',container:t.next.container})}),0)},beforeLeave:function(t){qi.destroy(),Si.destroy(),Ss.destroy()}},{namespace:"about",beforeEnter:function(t){},beforeLeave:function(){}},{namespace:"lighthouse",beforeEnter:function(e){t.accordion=new Hn({speed:.5,element:"[data-accordion]",container:e.next.container})},beforeLeave:function(){t.accordion.destroy()}},{namespace:"companies",beforeEnter:function(t){void 0===window.companiesAutocomplete&&t.next.container.querySelectorAll("[data-script]").forEach((function(t){if(!t.src){var e=t.cloneNode(!0),n=document.createElement("script");n.innerHTML=e.innerHTML,document.head.appendChild(n)}t.remove()})),dr.create({container:t.next.container}),setTimeout((function(){$s.create({container:t.next.container})}),300)},afterEnter:function(t){setTimeout((function(){var e;if("back"===t.trigger&&"company"===(null==t||null===(e=t.current)||void 0===e||null===(e=e.route)||void 0===e?void 0:e.name)){var n,r,i,o=sessionStorage.getItem("founder"),s=null==t||null===(n=t.current)||void 0===n||null===(n=n.route)||void 0===n||null===(n=n.params)||void 0===n?void 0:n.id,a="true"===o?null==t||null===(r=t.next)||void 0===r||null===(r=r.container)||void 0===r?void 0:r.querySelector('.section-founder-spotlight [data-company-id="'.concat(s,'"]')):null==t||null===(i=t.next)||void 0===i||null===(i=i.container)||void 0===i?void 0:i.querySelector('.companies-wrapper [data-company-id="'.concat(s,'"]')),l="true"===o?-1*a.getBoundingClientRect().height:-2*a.getBoundingClientRect().height;a&&window.scroller.scrollTo(a,{duration:100,offset:l})}}),700)},beforeLeave:function(t){dr.destroy(t),$s.destroy()}},{namespace:"lightspeed-team",beforeEnter:function(t){void 0===window.teamsAutocomplete&&t.next.container.querySelectorAll("[data-script]").forEach((function(t){if(!t.src){var e=t.cloneNode(!0),n=document.createElement("script");n.innerHTML=e.innerHTML,document.head.appendChild(n)}t.remove()})),Qn.create({container:t.next.container}),setTimeout((function(){$s.create({container:t.next.container})}),300)},beforeLeave:function(t){Qn.destroy(),$s.destroy()}},{namespace:"stories",beforeEnter:function(e){void 0===window.storiesAutocomplete&&e.next.container.querySelectorAll("[data-script]").forEach((function(t){if(!t.src){var e=t.cloneNode(!0),n=document.createElement("script");n.innerHTML=e.innerHTML,document.head.appendChild(n)}t.remove()})),setTimeout((function(){t.StoriesFilters=new Yn({container:e.next.container}),Si.create({selector:e.next.container.querySelector(".swiper-stories:not(#specialists-swiper)"),next:'[data-barba-namespace="stories"] .swiper-button-next',prev:'[data-barba-namespace="stories"] .swiper-button-prev',pagination:'[data-barba-namespace="stories"] .swiper-pagination',container:e.next.container})}),0),setTimeout((function(){$s.create({container:e.next.container})}),300)},beforeLeave:function(e){t.StoriesFilters.destroy(),Si.destroy(),$s.destroy()}},{namespace:"events",beforeEnter:function(t){Si.create({selector:t.next.container.querySelector(".swiper-stories:not(#specialists-swiper)"),next:".page-events .events-slider .swiper-button-next",prev:".page-events .events-slider .swiper-button-prev",pagination:".page-events  .events-slider .swiper-pagination",container:t.next.container})},beforeLeave:function(t){Si.destroy()}},{namespace:"advisory-council",beforeEnter:function(e){Si.create({selector:e.next.container.querySelector(".swiper-stories:not(#specialists-swiper)"),next:".page-advisory-council .events-slider .swiper-button-next",prev:".page-advisory-council .events-slider .swiper-button-prev",pagination:".page-advisory-council  .events-slider .swiper-pagination",container:e.next.container}),t.accordionA=new Hn({speed:.5,element:"[data-accordion]",container:e.next.container})},beforeLeave:function(e){Si.destroy(),t.accordionA.destroy()}},{namespace:"press-kits",beforeEnter:function(t){void 0===window.teamsAutocomplete&&t.next.container.querySelectorAll("[data-script]").forEach((function(t){if(!t.src){var e=t.cloneNode(!0),n=document.createElement("script");n.innerHTML=e.innerHTML,document.head.appendChild(n)}t.remove()})),setTimeout((function(){Qn.create({container:t.next.container})}),0)},beforeLeave:function(t){Qn.destroy()}},{namespace:"lightspeed-launch",beforeEnter:function(t){Hn.create({speed:.5,element:"[data-accordion]",container:t.next.container})},beforeLeave:function(t){}},{namespace:"focus-area",beforeEnter:function(t){Ss.create({selector:t.next.container.querySelector(".swiper-founder"),container:t.next.container,namespace:t.next.namespace,next:"[data-barba-namespace='focus-area'] .team-slider-section .swiper-button-next",prev:"[data-barba-namespace='focus-area'] .team-slider-section .swiper-button-prev",pagination:'[data-barba-namespace="focus-area"]  .team-slider-section .swiper-pagination',mobileSpeed:300}),t.next.container.querySelectorAll("[data-appear-after-transition]").forEach((function(t){var e=t.querySelectorAll("[data-appear-after-transition-item]");h.b.from(e,{y:200,opacity:0,duration:.8,ease:"power1.out",delay:.5,stagger:.1,clearProps:"all",overwrite:!0})})),setTimeout((function(){aa.create()}),1e3)},beforeLeave:function(t){aa.destroy()}},{namespace:"focus-area-ai",beforeEnter:function(t){Ss.create({selector:t.next.container.querySelector(".swiper-founder"),container:t.next.container,namespace:t.next.namespace,next:"[data-barba-namespace='focus-area-ai'] .team-slider-section .swiper-button-next",prev:"[data-barba-namespace='focus-area-ai'] .team-slider-section .swiper-button-prev",pagination:'[data-barba-namespace="focus-area-ai"]  .team-slider-section .swiper-pagination',mobileSpeed:300}),t.next.container.querySelectorAll("[data-appear-after-transition]").forEach((function(t){var e=t.querySelectorAll("[data-appear-after-transition-item]");h.b.from(e,{y:200,opacity:0,duration:.8,ease:"power1.out",delay:.5,stagger:.1,clearProps:"all",overwrite:!0})})),setTimeout((function(){aa.create()}),1e3)},beforeLeave:function(t){aa.destroy()}},{namespace:"cyber60",beforeEnter:function(t){hA.create(t.next.container)},beforeLeave:function(t){hA.destroy()}}]}),window.barba=s.a}},{key:"initLocoScroll",value:function(){var t,e=-1!==(t=navigator.userAgent.toLowerCase()).indexOf("mac")?"Mac":-1!==t.indexOf("win")?"Windows":"Unknown",n=null!==document.querySelector("[data-post-type]");this.scroll=new fn.a({el:document.querySelector("[data-scroll-container]"),name:"scroll",offset:[0,0],repeat:!0,smooth:!n,initPosition:{x:0,y:0},direction:"vertical",gestureDirection:"vertical",class:"is-inview",scrollbarContainer:!1,scrollbarClass:"c-scrollbar",scrollingClass:"has-scroll-scrolling",draggingClass:"has-scroll-dragging",smoothClass:"has-scroll-smooth",initClass:"has-scroll-init",getSpeed:!0,getDirection:!0,scrollFromAnywhere:!1,multiplier:"Mac"===e?.75:1.5,firefoxMultiplier:150,resetNativeScroll:!1,tablet:{smooth:!1,direction:"vertical",gestureDirection:"vertical"},smartphone:{smooth:!1,direction:"vertical",gestureDirection:"vertical",reloadOnContextChange:!0}}),window.scroller=this.scroll,rn.defaults({scroller:this.scroll})}},{key:"locoscrolProxy",value:function(){window.scroller.on("scroll",(function(){try{rn.update()}catch(t){}})),rn.scrollerProxy("[data-scroll-container]",{scrollTop:function(t){return window.scroller.scroll.instance.scroll.y},getBoundingClientRect:function(){return{top:0,left:0,width:window.innerWidth,height:window.innerHeight}},pinType:document.querySelector("[data-scroll-container]").style.transform?"transform":"fixed"}),rn.addEventListener("refresh",(function(){try{window.scroller.update()}catch(t){}})),rn.refresh()}},{key:"resizerObserver",value:function(){new ResizeObserver((function(){window.scroller.update(),rn.refresh()})).observe(document.querySelector("[data-scroll-container]"))}},{key:"initOnce",value:function(t){var e;!function(){var t=$(".nav-opener"),e=$(".nav-slide").find("a");t.click((function(){$("body").toggleClass("nav-active"),$(this).hasClass("close")&&($("body").addClass("nav-close"),setTimeout((function(){$("body").removeClass("nav-close")}),1001))}));var n=document.querySelectorAll(".main-nav li > a");n&&n.forEach((function(t){t.insertAdjacentHTML("beforeend",'<i class="arrow-right"></i>')})),$(".main-nav li").each((function(t){var e=$(this),n=e.find("ul"),r=e.find("a").eq(0);n.length&&(e.addClass("hasdrop"),r.length&&r.addClass("hasdrop-a").attr({"data-more":"","data-outside":""})),e[0].style="--index:"+t})),e.click((function(){!$(this).hasClass("hasdrop-a")&&$("body").removeClass("nav-active")}));var r=function(){var t=window.innerHeight||document.documentElement.clientHeight,e=document.querySelector(".nav-slide");null==e||e.style.setProperty("height",t+"px")};r(),window.addEventListener("resize",r)}(),jQuery("[data-select]").each((function(){var t=jQuery(this),e=t.next(),n=e.find("a");t.attr({"data-outside":"","data-more":""}),n.on("click",(function(n){n.preventDefault(),t.text(jQuery(this).text()),e.slideUp(200),t.removeClass("active").addClass("selected"),e.find("li").removeClass("active"),jQuery(this).parent().addClass("active")})),e.children().hasClass("active")&&t.text(jQuery(this).next().find(".active a").text()).addClass("selected")})),(e=navigator.appVersion.toLowerCase().match(new RegExp(["iphone","ipad","windows","mac","linux"].join("|"))))&&$("body").addClass(e[0]),En(".sub-nav a",".sub-nav"),En(".footer-nav a",".footer-nav"),En(".main-nav a",".main-nav"),$("#mc-newsletter-form, #cyber-newsletter-form").on("submit",(function(t){t.preventDefault();var e=$("#newsletter-nonce").val(),n=$(".signup-form #email").val(),r=window.location.href,i=t.target.id;n.match(/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9-]+(?:\.[a-zA-Z0-9-]+)*$/)?(console.log(i),$.ajax({type:"post",dataType:"json",url:wp_ajax.ajaxurl,data:{action:"lsvp_newsletter",nonce:e,email:n,referring_site:r,formId:i},success:function(t){$(".signup-form #email").parent().removeClass("invalid"),$(".signup-form #email").parent().addClass("success")},error:function(t){as("Error: Please try again later"),console.log(t)}})):as("Invalid email address")})),$(document).ready((function(){var t=$(".cyber-content .cyber-section-box[id], .cyber-content .the-cyber-60[id]"),e=$(".cyber-toc-list:not(.research-toc)");t.each((function(t){var n=$(this).find("h3:first:not(.hide-in-toc), h2:first:not(.hide-in-toc), span:first + h3:not(.hide-in-toc), h5:first:not(.hide-in-toc)");if(n.length){var r;r=n.first().html().trim();var i="section-".concat(t+1);$(this).attr("id",i);var o=$("<li>").html('<a href="#'.concat(i,'">').concat(r,"</a>"));e.append(o)}}));var n=e.find("a");$(".cyber-toc-list a, .cyber-hero .tag").on("click",(function(t){t.preventDefault(),$(this).parents(".cyber-toc-list").find("a").removeClass("active"),$(this).addClass("active");var e=$(this).attr("href");window.scroller.scrollTo(e,{offset:-67,duration:800,ease:"easeInOutQuart"})})),window.scroller.on("scroll",(function(){var e=$(window).scrollTop();t.each((function(t){var r="#section-".concat(t+1),i=$(this).offset().top-80,o=$(this).outerHeight();e>=i&&e<i+o&&(n.removeClass("active"),n.filter('[href="'.concat(r,'"]')).addClass("active"))}))}))})),window.scroller,$(document).ready((function(){var t=[];$(".vimeo-video").each((function(){t.push({player:new Vimeo.Player($(this).find("iframe").get(0)),top:$(this).position().top,height:$(this).outerHeight(),status:"paused"})}));var e=$(window).height();scroller.on("scroll",(function(n){for(var r=n.scroll.y,i=0;i<t.length;i++){var o=t[i].top+t[i].height,s=r+e>o+1500?"play":"pause";t[i].status!=s&&(t[i].status=s,t[i].player[s]())}}))}))}},{key:"initAlwaysEnter",value:function(t){setTimeout((function(){ss.create({selector:t.next.container,container:t.next.container}),ks.create({selector:t.next.container,container:t.next.container}),da.create(),Rs.create({selector:pA(t.next.container.querySelectorAll("[data-horizontal-scroll-lines]")),container:t.next.container})}),2*this.speed*1e3)}},{key:"initAlways",value:function(t){var e,n,r,i;!function(){$(document).ready((function(){var t=window.location.href;$("#focus-area-menu li").each((function(){$(this).find("a").attr("href")===t&&$(this).addClass("active")}))}));var t=$("#focus-area-menu");$(t).find('a[target="_blank"]').length>0&&$(t).find("li").on("click",(function(){$(t).find("li").removeClass("active"),$(this).addClass("active")}))}(),Dn(),_s.create(t.next.container),bs(),En(),$("body").find("[data-close]").on("click",(function(t){t.preventDefault(),Mn((function(){$("body").removeClass("filter--active")}))})),$("body").find("[data-back-blog]").on("click",(function(){new URL(window.location.href);var t=new URL(document.referrer);window.location.replace(t)})),Cn(),zs.create(t.next.container),e=function(t){t.preventDefault(),$(this).hasClass("active")?$(this).removeClass("active"):$(this).addClass("active"),$(this).next().stop().slideToggle(200)},n=function(t){$("[data-outside]").not(this).removeClass("active").next().slideUp(200)},r=function(t){var e=$(t.target);e.closest("[data-outside]").length||e.closest("[data-outside] + *").length||setTimeout((function(){$("[data-outside]").removeClass("active").next().slideUp(200)}),200)},$(document).off("click","[data-more]",e),$(document).off("click","[data-outside]",n),$("html").off("click touchstart pointerdown MSPointerDown",r),$("[data-more]").next().hide(),$("[data-more].active").next().show(),$(void 0).hasClass("active")?$(void 0).removeClass("active"):$(void 0).addClass("active"),$(document).on("click","[data-more]",e),$(document).on("click","[data-outside]",n),$("html").on("click touchstart pointerdown MSPointerDown",r),$(".block-holder").each((function(){var t=$(this),e=t.find(".block.drop-open"),n=t.find(".lts-drop");e.on("click",(function(t){t.preventDefault(),n.toggleClass("visible"),$("body").toggleClass("drop-active",n.hasClass("visible")),$(window).width()<=768&&$("body").css("overflow","hidden")})),$(".modal-close-btn").on("click",(function(t){t.preventDefault(),n.removeClass("visible"),n.hide(),$(".drop-open").removeClass("active"),$("body").css("overflow","auto")})),$(document).on("click",(function(e){t.is(e.target)||0!==t.has(e.target).length||n.hasClass("visible")&&(n.removeClass("visible"),$("body").removeClass("drop-active"))}))})),ir.create(),document.querySelectorAll(".link").forEach((function(t){t.style.width=t.offsetWidth+20+"px"})),(i=$('[href^="#modal-faction"]')).length&&(i.each((function(){$(this).click((function(t){return t.preventDefault(),$("body").addClass("modal-faction-active"),$("#modal-faction").addClass("show"),!1}))})),$("#modal-faction .modal-close-btn, #modal-faction .btn").click((function(t){$("body").removeClass("modal-faction-active"),$("#modal-faction").removeClass("show")}))),document.querySelectorAll("[data-class-on-load]").forEach((function(t){t.dataset.classOnLoad&&t.dataset.classOnLoad.length>0&&t.classList.add(t.dataset.classOnLoad)})),An.create(t.next.container.querySelectorAll("[data-transparent-img]")),function(t){var e=t.querySelector(".bg-about");if(null!==e){var n=t.querySelector(".news-feed").offsetHeight;e.style.height=n+"px"}}(t.next.container),Qs.create({selector:t.next.container}),ra.create(),Mg.create(),eo.create(pA(document.querySelectorAll("[data-tab-feed]"))),bi.create(t.next.container),function(){function t(t){var e=document.querySelectorAll("video:not(.background)"),n=document.querySelectorAll("iframe"),r="";e.forEach((function(t){t.paused||t.pause()})),t?t.find("iframe").each((function(){r=this.getAttribute("src"),this.removeAttribute("src"),this.setAttribute("src",r)})):n.forEach((function(t){r=t.getAttribute("src"),t.removeAttribute("src"),t.setAttribute("src",r)}))}$("[data-modal]").on("click",(function(){$("body").addClass("modal-active"),$(".modal").removeClass("show");var t=$($(this).attr("href"));t.removeAttr("style").addClass("show");var e=t.find('iframe[src*="vimeo.com"]');return e.length&&new Vimeo.Player(e[0]).play().catch((function(t){console.error("Error playing Vimeo video:",t)})),!1})),jQuery(".modal .close").click((function(e){e.preventDefault();var n=$(this).closest(".modal");$("body").removeClass("modal-active"),$(".modal").removeClass("show"),t(n)})),jQuery("html").on("click touchstart pointerdown MSPointerDown",(function(e){var n=jQuery(e.target),r=$(".modal.show");n.closest(".modal-content").length||n.closest(".modal-content-holder").length||($("body").removeClass("modal-active"),$(".modal").removeClass("show"),"video-modal"!==r.attr("id")&&t(r))}))}(),$(document).ready((function(){var t=$(".swiper-slide-active"),e=t.data("caption"),n=t.data("url");$(".img-caption").text(e),n?$(".img-caption").attr("href",n):$(".img-caption").removeAttr("href");var r=$(".image-slider-modal .swiper-slide-active"),i=r.data("caption"),o=r.data("url");$(".img-caption-modal").text(i),o?$(".img-caption-modal").attr("href",o):$(".img-caption-modal").removeAttr("href")}));var o=document.getElementById("cyber60-hero-wrapper");o&&yg.create(o),Xs.create(t.next.container),$("[data-tab]").click((function(t){t.preventDefault();var e=$(this).attr("data-tab");$(this).parent().siblings().find("[data-tab]").removeClass("active"),$("#"+e).siblings().fadeOut(310),$(this).addClass("active"),setTimeout((function(){$("#"+e).fadeIn(300)}),305)})),$("#"+$("[data-tab].active").data("tab")).addClass("active")}},{key:"destroyAlways",value:function(t){eo.destroy(),bi.destroy(),ss.destroy(t),ks.destroy(),$(document).off("click","[data-more]"),$(document).off("click","[data-outside]"),$("html").off("click touchstart pointerdown MSPointerDown"),Rs.destroy(),zs.destroy(),Xs.destroy(),ir.destroy(),_s.destroy(),Qs.destroy(),ra.destroy(),An.destroy(),da.destroy(),yg.destroy(),NewsletterAnimations.destroy()}},{key:"recalculateSmoothScroll",value:function(){rn.refresh(),window.scroller.update()}},{key:"restartPage",value:function(){var t=window.matchMedia("screen and (min-width: 1440px)"),e=window.matchMedia("screen and (max-width: 1339px)");t.addListener((function(t){t.matches&&location.reload()})),e.addListener((function(t){t.matches&&location.reload()}))}},{key:"reloadOnContextChange",value:function(){var t=window.matchMedia("screen and (min-width: 768px)"),e=window.matchMedia("screen and (max-width: 767px)");t.addListener((function(t){t.matches&&(console.log("app barba init"),location.reload())})),e.addListener((function(t){t.matches&&(console.log("inita"),location.reload())}))}},{key:"init",value:function(){this.initLocoScroll(),this.locoscrolProxy(),this.resizerObserver(),this.initBarba(),this.reloadOnContextChange(),window.updateLocoAndScrollTrigger=function(){window.scroller.update(),rn.refresh()}}}])&&mA(e.prototype,n),r&&mA(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();document.addEventListener("DOMContentLoaded",(function(){new vA}))},nmq7:function(t,e,n){"use strict";var r=n("0jNN"),i=Object.prototype.hasOwnProperty,o=Array.isArray,s={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:r.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},a=function(t){return t.replace(/&#(\d+);/g,(function(t,e){return String.fromCharCode(parseInt(e,10))}))},l=function(t,e){return t&&"string"==typeof t&&e.comma&&t.indexOf(",")>-1?t.split(","):t},u=function(t,e,n,r){if(t){var o=n.allowDots?t.replace(/\.([^.[]+)/g,"[$1]"):t,s=/(\[[^[\]]*])/g,a=n.depth>0&&/(\[[^[\]]*])/.exec(o),u=a?o.slice(0,a.index):o,c=[];if(u){if(!n.plainObjects&&i.call(Object.prototype,u)&&!n.allowPrototypes)return;c.push(u)}for(var h=0;n.depth>0&&null!==(a=s.exec(o))&&h<n.depth;){if(h+=1,!n.plainObjects&&i.call(Object.prototype,a[1].slice(1,-1))&&!n.allowPrototypes)return;c.push(a[1])}return a&&c.push("["+o.slice(a.index)+"]"),function(t,e,n,r){for(var i=r?e:l(e,n),o=t.length-1;o>=0;--o){var s,a=t[o];if("[]"===a&&n.parseArrays)s=[].concat(i);else{s=n.plainObjects?Object.create(null):{};var u="["===a.charAt(0)&&"]"===a.charAt(a.length-1)?a.slice(1,-1):a,c=parseInt(u,10);n.parseArrays||""!==u?!isNaN(c)&&a!==u&&String(c)===u&&c>=0&&n.parseArrays&&c<=n.arrayLimit?(s=[])[c]=i:"__proto__"!==u&&(s[u]=i):s={0:i}}i=s}return i}(c,e,n,r)}};t.exports=function(t,e){var n=function(t){if(!t)return s;if(null!==t.decoder&&void 0!==t.decoder&&"function"!=typeof t.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==t.charset&&"utf-8"!==t.charset&&"iso-8859-1"!==t.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var e=void 0===t.charset?s.charset:t.charset;return{allowDots:void 0===t.allowDots?s.allowDots:!!t.allowDots,allowPrototypes:"boolean"==typeof t.allowPrototypes?t.allowPrototypes:s.allowPrototypes,allowSparse:"boolean"==typeof t.allowSparse?t.allowSparse:s.allowSparse,arrayLimit:"number"==typeof t.arrayLimit?t.arrayLimit:s.arrayLimit,charset:e,charsetSentinel:"boolean"==typeof t.charsetSentinel?t.charsetSentinel:s.charsetSentinel,comma:"boolean"==typeof t.comma?t.comma:s.comma,decoder:"function"==typeof t.decoder?t.decoder:s.decoder,delimiter:"string"==typeof t.delimiter||r.isRegExp(t.delimiter)?t.delimiter:s.delimiter,depth:"number"==typeof t.depth||!1===t.depth?+t.depth:s.depth,ignoreQueryPrefix:!0===t.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof t.interpretNumericEntities?t.interpretNumericEntities:s.interpretNumericEntities,parameterLimit:"number"==typeof t.parameterLimit?t.parameterLimit:s.parameterLimit,parseArrays:!1!==t.parseArrays,plainObjects:"boolean"==typeof t.plainObjects?t.plainObjects:s.plainObjects,strictNullHandling:"boolean"==typeof t.strictNullHandling?t.strictNullHandling:s.strictNullHandling}}(e);if(""===t||null==t)return n.plainObjects?Object.create(null):{};for(var c="string"==typeof t?function(t,e){var n,u={__proto__:null},c=e.ignoreQueryPrefix?t.replace(/^\?/,""):t,h=e.parameterLimit===1/0?void 0:e.parameterLimit,d=c.split(e.delimiter,h),p=-1,f=e.charset;if(e.charsetSentinel)for(n=0;n<d.length;++n)0===d[n].indexOf("utf8=")&&("utf8=%E2%9C%93"===d[n]?f="utf-8":"utf8=%26%2310003%3B"===d[n]&&(f="iso-8859-1"),p=n,n=d.length);for(n=0;n<d.length;++n)if(n!==p){var m,g,v=d[n],y=v.indexOf("]="),_=-1===y?v.indexOf("="):y+1;-1===_?(m=e.decoder(v,s.decoder,f,"key"),g=e.strictNullHandling?null:""):(m=e.decoder(v.slice(0,_),s.decoder,f,"key"),g=r.maybeMap(l(v.slice(_+1),e),(function(t){return e.decoder(t,s.decoder,f,"value")}))),g&&e.interpretNumericEntities&&"iso-8859-1"===f&&(g=a(g)),v.indexOf("[]=")>-1&&(g=o(g)?[g]:g),i.call(u,m)?u[m]=r.combine(u[m],g):u[m]=g}return u}(t,n):t,h=n.plainObjects?Object.create(null):{},d=Object.keys(c),p=0;p<d.length;++p){var f=d[p],m=u(f,c[f],n,"string"==typeof t);h=r.merge(h,m,n)}return!0===n.allowSparse?h:r.compact(h)}},oh6g:function(t,e,n){"use strict";function r(t,e){this.name="AggregateError",this.errors=t,this.message=e||""}r.prototype=Error.prototype,e.a=function(t){var e=this;return new e((function(n,i){if(!t||void 0===t.length)return i(new TypeError("Promise.any accepts an array"));var o=Array.prototype.slice.call(t);if(0===o.length)return i();for(var s=[],a=0;a<o.length;a++)try{e.resolve(o[a]).then(n).catch((function(t){s.push(t),s.length===o.length&&i(new r(s,"All promises were rejected"))}))}catch(t){i(t)}}))}},sxOR:function(t,e,n){"use strict";var r=String.prototype.replace,i=/%20/g,o="RFC1738",s="RFC3986";t.exports={default:s,formatters:{RFC1738:function(t){return r.call(t,i,"+")},RFC3986:function(t){return String(t)}},RFC1738:o,RFC3986:s}},t9wJ:function(t,e,n){var r=n("Ofh6");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,i);r.locals&&(t.exports=r.locals)},"u+OR":function(t,e,n){var r=n("PMrG");"string"==typeof r&&(r=[[t.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,i);r.locals&&(t.exports=r.locals)},uhBA:function(t,e,n){"use strict";var r=Object.prototype.hasOwnProperty,i="~";function o(){}function s(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function a(t,e,n,r,o){if("function"!=typeof n)throw new TypeError("The listener must be a function");var a=new s(n,r||t,o),l=i?i+e:e;return t._events[l]?t._events[l].fn?t._events[l]=[t._events[l],a]:t._events[l].push(a):(t._events[l]=a,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new o:delete t._events[e]}function u(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),u.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)r.call(t,e)&&n.push(i?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},u.prototype.listeners=function(t){var e=i?i+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,s=new Array(o);r<o;r++)s[r]=n[r].fn;return s},u.prototype.listenerCount=function(t){var e=i?i+t:t,n=this._events[e];return n?n.fn?1:n.length:0},u.prototype.emit=function(t,e,n,r,o,s){var a=i?i+t:t;if(!this._events[a])return!1;var l,u,c=this._events[a],h=arguments.length;if(c.fn){switch(c.once&&this.removeListener(t,c.fn,void 0,!0),h){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,e),!0;case 3:return c.fn.call(c.context,e,n),!0;case 4:return c.fn.call(c.context,e,n,r),!0;case 5:return c.fn.call(c.context,e,n,r,o),!0;case 6:return c.fn.call(c.context,e,n,r,o,s),!0}for(u=1,l=new Array(h-1);u<h;u++)l[u-1]=arguments[u];c.fn.apply(c.context,l)}else{var d,p=c.length;for(u=0;u<p;u++)switch(c[u].once&&this.removeListener(t,c[u].fn,void 0,!0),h){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(d=1,l=new Array(h-1);d<h;d++)l[d-1]=arguments[d];c[u].fn.apply(c[u].context,l)}}return!0},u.prototype.on=function(t,e,n){return a(this,t,e,n,!1)},u.prototype.once=function(t,e,n){return a(this,t,e,n,!0)},u.prototype.removeListener=function(t,e,n,r){var o=i?i+t:t;if(!this._events[o])return this;if(!e)return l(this,o),this;var s=this._events[o];if(s.fn)s.fn!==e||r&&!s.once||n&&s.context!==n||l(this,o);else{for(var a=0,u=[],c=s.length;a<c;a++)(s[a].fn!==e||r&&!s[a].once||n&&s[a].context!==n)&&u.push(s[a]);u.length?this._events[o]=1===u.length?u[0]:u:l(this,o)}return this},u.prototype.removeAllListeners=function(t){var e;return t?(e=i?i+t:t,this._events[e]&&l(this,e)):(this._events=new o,this._eventsCount=0),this},u.prototype.off=u.prototype.removeListener,u.prototype.addListener=u.prototype.on,u.prefixed=i,u.EventEmitter=u,t.exports=u},uvZ8:function(t,e,n){t.exports=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)}}function e(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}function n(){return(n=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}).apply(this,arguments)}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}function i(t){return(i=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t,e,n){return(s=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}}()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var i=new(Function.bind.apply(t,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function a(t){var e="function"==typeof Map?new Map:void 0;return(a=function(t){if(null===t||-1===Function.toString.call(t).indexOf("[native code]"))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,n)}function n(){return s(t,arguments,i(this).constructor)}return n.prototype=Object.create(t.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),o(n,t)})(t)}function l(t,e){try{var n=t()}catch(t){return e(t)}return n&&n.then?n.then(void 0,e):n}var u;"undefined"!=typeof Symbol&&(Symbol.iterator||(Symbol.iterator=Symbol("Symbol.iterator"))),"undefined"!=typeof Symbol&&(Symbol.asyncIterator||(Symbol.asyncIterator=Symbol("Symbol.asyncIterator"))),function(t){t[t.off=0]="off",t[t.error=1]="error",t[t.warning=2]="warning",t[t.info=3]="info",t[t.debug=4]="debug"}(u||(u={}));var c=u.off,h=function(){function t(t){this.t=t}t.getLevel=function(){return c},t.setLevel=function(t){return c=u[t]};var e=t.prototype;return e.error=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.i(console.error,u.error,e)},e.warn=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.i(console.warn,u.warning,e)},e.info=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.i(console.info,u.info,e)},e.debug=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];this.i(console.log,u.debug,e)},e.i=function(e,n,r){n<=t.getLevel()&&e.apply(console,["["+this.t+"] "].concat(r))},t}(),d=S,p=_,f=y,m=b,g=T,v=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g");function y(t,e){for(var n,r=[],i=0,o=0,s="",a=e&&e.delimiter||"/",l=e&&e.whitelist||void 0,u=!1;null!==(n=v.exec(t));){var c=n[0],h=n[1],d=n.index;if(s+=t.slice(o,d),o=d+c.length,h)s+=h[1],u=!0;else{var p="",f=n[2],m=n[3],g=n[4],y=n[5];if(!u&&s.length){var _=s.length-1,b=s[_];(!l||l.indexOf(b)>-1)&&(p=b,s=s.slice(0,_))}s&&(r.push(s),s="",u=!1);var E=m||g,T=p||a;r.push({name:f||i++,prefix:p,delimiter:T,optional:"?"===y||"*"===y,repeat:"+"===y||"*"===y,pattern:E?w(E):"[^"+x(T===a?T:T+a)+"]+?"})}}return(s||o<t.length)&&r.push(s+t.substr(o)),r}function _(t,e){return function(n,r){var i=t.exec(n);if(!i)return!1;for(var o=i[0],s=i.index,a={},l=r&&r.decode||decodeURIComponent,u=1;u<i.length;u++)if(void 0!==i[u]){var c=e[u-1];a[c.name]=c.repeat?i[u].split(c.delimiter).map((function(t){return l(t,c)})):l(i[u],c)}return{path:o,index:s,params:a}}}function b(t,e){for(var n=new Array(t.length),r=0;r<t.length;r++)"object"==typeof t[r]&&(n[r]=new RegExp("^(?:"+t[r].pattern+")$",E(e)));return function(e,r){for(var i="",o=r&&r.encode||encodeURIComponent,s=!r||!1!==r.validate,a=0;a<t.length;a++){var l=t[a];if("string"!=typeof l){var u,c=e?e[l.name]:void 0;if(Array.isArray(c)){if(!l.repeat)throw new TypeError('Expected "'+l.name+'" to not repeat, but got array');if(0===c.length){if(l.optional)continue;throw new TypeError('Expected "'+l.name+'" to not be empty')}for(var h=0;h<c.length;h++){if(u=o(c[h],l),s&&!n[a].test(u))throw new TypeError('Expected all "'+l.name+'" to match "'+l.pattern+'"');i+=(0===h?l.prefix:l.delimiter)+u}}else if("string"!=typeof c&&"number"!=typeof c&&"boolean"!=typeof c){if(!l.optional)throw new TypeError('Expected "'+l.name+'" to be '+(l.repeat?"an array":"a string"))}else{if(u=o(String(c),l),s&&!n[a].test(u))throw new TypeError('Expected "'+l.name+'" to match "'+l.pattern+'", but got "'+u+'"');i+=l.prefix+u}}else i+=l}return i}}function x(t){return t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1")}function w(t){return t.replace(/([=!:$/()])/g,"\\$1")}function E(t){return t&&t.sensitive?"":"i"}function T(t,e,n){for(var r=(n=n||{}).strict,i=!1!==n.start,o=!1!==n.end,s=n.delimiter||"/",a=[].concat(n.endsWith||[]).map(x).concat("$").join("|"),l=i?"^":"",u=0;u<t.length;u++){var c=t[u];if("string"==typeof c)l+=x(c);else{var h=c.repeat?"(?:"+c.pattern+")(?:"+x(c.delimiter)+"(?:"+c.pattern+"))*":c.pattern;e&&e.push(c),l+=c.optional?c.prefix?"(?:"+x(c.prefix)+"("+h+"))?":"("+h+")?":x(c.prefix)+"("+h+")"}}if(o)r||(l+="(?:"+x(s)+")?"),l+="$"===a?"$":"(?="+a+")";else{var d=t[t.length-1],p="string"==typeof d?d[d.length-1]===s:void 0===d;r||(l+="(?:"+x(s)+"(?="+a+"))?"),p||(l+="(?="+x(s)+"|"+a+")")}return new RegExp(l,E(n))}function S(t,e,n){return t instanceof RegExp?function(t,e){if(!e)return t;var n=t.source.match(/\((?!\?)/g);if(n)for(var r=0;r<n.length;r++)e.push({name:r,prefix:null,delimiter:null,optional:!1,repeat:!1,pattern:null});return t}(t,e):Array.isArray(t)?function(t,e,n){for(var r=[],i=0;i<t.length;i++)r.push(S(t[i],e,n).source);return new RegExp("(?:"+r.join("|")+")",E(n))}(t,e,n):function(t,e,n){return T(y(t,n),e,n)}(t,e,n)}d.match=function(t,e){var n=[];return _(S(t,n,e),n)},d.regexpToFunction=p,d.parse=f,d.compile=function(t,e){return b(y(t,e),e)},d.tokensToFunction=m,d.tokensToRegExp=g;var A={container:"container",history:"history",namespace:"namespace",prefix:"data-barba",prevent:"prevent",wrapper:"wrapper"},M=new(function(){function t(){this.o=A,this.u=new DOMParser}var e=t.prototype;return e.toString=function(t){return t.outerHTML},e.toDocument=function(t){return this.u.parseFromString(t,"text/html")},e.toElement=function(t){var e=document.createElement("div");return e.innerHTML=t,e},e.getHtml=function(t){return void 0===t&&(t=document),this.toString(t.documentElement)},e.getWrapper=function(t){return void 0===t&&(t=document),t.querySelector("["+this.o.prefix+'="'+this.o.wrapper+'"]')},e.getContainer=function(t){return void 0===t&&(t=document),t.querySelector("["+this.o.prefix+'="'+this.o.container+'"]')},e.removeContainer=function(t){document.body.contains(t)&&t.parentNode.removeChild(t)},e.addContainer=function(t,e){var n=this.getContainer();n?this.s(t,n):e.appendChild(t)},e.getNamespace=function(t){void 0===t&&(t=document);var e=t.querySelector("["+this.o.prefix+"-"+this.o.namespace+"]");return e?e.getAttribute(this.o.prefix+"-"+this.o.namespace):null},e.getHref=function(t){if(t.tagName&&"a"===t.tagName.toLowerCase()){if("string"==typeof t.href)return t.href;var e=t.getAttribute("href")||t.getAttribute("xlink:href");if(e)return this.resolveUrl(e.baseVal||e)}return null},e.resolveUrl=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];var r=e.length;if(0===r)throw new Error("resolveUrl requires at least one argument; got none.");var i=document.createElement("base");if(i.href=arguments[0],1===r)return i.href;var o=document.getElementsByTagName("head")[0];o.insertBefore(i,o.firstChild);for(var s,a=document.createElement("a"),l=1;l<r;l++)a.href=arguments[l],i.href=s=a.href;return o.removeChild(i),s},e.s=function(t,e){e.parentNode.insertBefore(t,e.nextSibling)},t}()),D=new(function(){function t(){this.h=[],this.v=-1}var r=t.prototype;return r.init=function(t,e){this.l="barba";var n={ns:e,scroll:{x:window.scrollX,y:window.scrollY},url:t};this.h.push(n),this.v=0;var r={from:this.l,index:0,states:[].concat(this.h)};window.history&&window.history.replaceState(r,"",t)},r.change=function(t,e,n){if(n&&n.state){var r=n.state,i=r.index;e=this.m(this.v-i),this.replace(r.states),this.v=i}else this.add(t,e);return e},r.add=function(t,e){var n=this.size,r=this.p(e),i={ns:"tmp",scroll:{x:window.scrollX,y:window.scrollY},url:t};this.h.push(i),this.v=n;var o={from:this.l,index:n,states:[].concat(this.h)};switch(r){case"push":window.history&&window.history.pushState(o,"",t);break;case"replace":window.history&&window.history.replaceState(o,"",t)}},r.update=function(t,e){var r=e||this.v,i=n({},this.get(r),{},t);this.set(r,i)},r.remove=function(t){t?this.h.splice(t,1):this.h.pop(),this.v--},r.clear=function(){this.h=[],this.v=-1},r.replace=function(t){this.h=t},r.get=function(t){return this.h[t]},r.set=function(t,e){return this.h[t]=e},r.p=function(t){var e="push",n=t,r=A.prefix+"-"+A.history;return n.hasAttribute&&n.hasAttribute(r)&&(e=n.getAttribute(r)),e},r.m=function(t){return Math.abs(t)>1?t>0?"forward":"back":0===t?"popstate":t>0?"back":"forward"},e(t,[{key:"current",get:function(){return this.h[this.v]}},{key:"state",get:function(){return this.h[this.h.length-1]}},{key:"previous",get:function(){return this.v<1?null:this.h[this.v-1]}},{key:"size",get:function(){return this.h.length}}]),t}()),C=function(t,e){try{var n=function(){if(!e.next.html)return Promise.resolve(t).then((function(t){var n=e.next;if(t){var r=M.toElement(t);n.namespace=M.getNamespace(r),n.container=M.getContainer(r),n.html=t,D.update({ns:n.namespace});var i=M.toDocument(t);document.title=i.title}}))}();return Promise.resolve(n&&n.then?n.then((function(){})):void 0)}catch(t){return Promise.reject(t)}},R=d,O={__proto__:null,update:C,nextTick:function(){return new Promise((function(t){window.requestAnimationFrame(t)}))},pathToRegexp:R},P=function(){return window.location.origin},I=function(t){return void 0===t&&(t=window.location.href),L(t).port},L=function(t){var e,n=t.match(/:\d+/);if(null===n)/^http/.test(t)&&(e=80),/^https/.test(t)&&(e=443);else{var r=n[0].substring(1);e=parseInt(r,10)}var i,o=t.replace(P(),""),s={},a=o.indexOf("#");a>=0&&(i=o.slice(a+1),o=o.slice(0,a));var l=o.indexOf("?");return l>=0&&(s=N(o.slice(l+1)),o=o.slice(0,l)),{hash:i,path:o,port:e,query:s}},N=function(t){return t.split("&").reduce((function(t,e){var n=e.split("=");return t[n[0]]=n[1],t}),{})},F=function(t){return void 0===t&&(t=window.location.href),t.replace(/(\/#.*|\/|#.*)$/,"")},k={__proto__:null,getHref:function(){return window.location.href},getOrigin:P,getPort:I,getPath:function(t){return void 0===t&&(t=window.location.href),L(t).path},parse:L,parseQuery:N,clean:F};function U(t,e,n){return void 0===e&&(e=2e3),new Promise((function(r,i){var o=new XMLHttpRequest;o.onreadystatechange=function(){if(o.readyState===XMLHttpRequest.DONE)if(200===o.status)r(o.responseText);else if(o.status){var e={status:o.status,statusText:o.statusText};n(t,e),i(e)}},o.ontimeout=function(){var r=new Error("Timeout error ["+e+"]");n(t,r),i(r)},o.onerror=function(){var e=new Error("Fetch error");n(t,e),i(e)},o.open("GET",t),o.timeout=e,o.setRequestHeader("Accept","text/html,application/xhtml+xml,application/xml"),o.setRequestHeader("x-barba","yes"),o.send()}))}var B=function(t){return!!t&&("object"==typeof t||"function"==typeof t)&&"function"==typeof t.then};function G(t,e){return void 0===e&&(e={}),function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];var o=!1,s=new Promise((function(n,i){e.async=function(){return o=!0,function(t,e){t?i(t):n(e)}};var s=t.apply(e,r);o||(B(s)?s.then(n,i):n(s))}));return s}}var z=new(function(t){function e(){var e;return(e=t.call(this)||this).logger=new h("@barba/core"),e.all=["ready","page","reset","currentAdded","currentRemoved","nextAdded","nextRemoved","beforeOnce","once","afterOnce","before","beforeLeave","leave","afterLeave","beforeEnter","enter","afterEnter","after"],e.registered=new Map,e.init(),e}r(e,t);var n=e.prototype;return n.init=function(){var t=this;this.registered.clear(),this.all.forEach((function(e){t[e]||(t[e]=function(n,r){t.registered.has(e)||t.registered.set(e,new Set),t.registered.get(e).add({ctx:r||{},fn:n})})}))},n.do=function(t){for(var e=this,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];if(this.registered.has(t)){var o=Promise.resolve();return this.registered.get(t).forEach((function(t){o=o.then((function(){return G(t.fn,t.ctx).apply(void 0,r)}))})),o.catch((function(n){e.logger.debug("Hook error ["+t+"]"),e.logger.error(n)}))}return Promise.resolve()},n.clear=function(){var t=this;this.all.forEach((function(e){delete t[e]})),this.init()},n.help=function(){this.logger.info("Available hooks: "+this.all.join(","));var t=[];this.registered.forEach((function(e,n){return t.push(n)})),this.logger.info("Registered hooks: "+t.join(","))},e}((function(){}))),H=function(){function t(t){if(this.P=[],"boolean"==typeof t)this.g=t;else{var e=Array.isArray(t)?t:[t];this.P=e.map((function(t){return R(t)}))}}return t.prototype.checkHref=function(t){if("boolean"==typeof this.g)return this.g;var e=L(t).path;return this.P.some((function(t){return null!==t.exec(e)}))},t}(),j=function(t){function e(e){var n;return(n=t.call(this,e)||this).k=new Map,n}r(e,t);var i=e.prototype;return i.set=function(t,e,n){return this.k.set(t,{action:n,request:e}),{action:n,request:e}},i.get=function(t){return this.k.get(t)},i.getRequest=function(t){return this.k.get(t).request},i.getAction=function(t){return this.k.get(t).action},i.has=function(t){return!this.checkHref(t)&&this.k.has(t)},i.delete=function(t){return this.k.delete(t)},i.update=function(t,e){var r=n({},this.k.get(t),{},e);return this.k.set(t,r),r},e}(H),V=function(){return!window.history.pushState},X=function(t){return!t.el||!t.href},W=function(t){var e=t.event;return e.which>1||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey},Y=function(t){var e=t.el;return e.hasAttribute("target")&&"_blank"===e.target},q=function(t){var e=t.el;return void 0!==e.protocol&&window.location.protocol!==e.protocol||void 0!==e.hostname&&window.location.hostname!==e.hostname},$=function(t){var e=t.el;return void 0!==e.port&&I()!==I(e.href)},K=function(t){var e=t.el;return e.getAttribute&&"string"==typeof e.getAttribute("download")},Z=function(t){return t.el.hasAttribute(A.prefix+"-"+A.prevent)},J=function(t){return Boolean(t.el.closest("["+A.prefix+"-"+A.prevent+'="all"]'))},Q=function(t){var e=t.href;return F(e)===F()&&I(e)===I()},tt=function(t){function e(e){var n;return(n=t.call(this,e)||this).suite=[],n.tests=new Map,n.init(),n}r(e,t);var n=e.prototype;return n.init=function(){this.add("pushState",V),this.add("exists",X),this.add("newTab",W),this.add("blank",Y),this.add("corsDomain",q),this.add("corsPort",$),this.add("download",K),this.add("preventSelf",Z),this.add("preventAll",J),this.add("sameUrl",Q,!1)},n.add=function(t,e,n){void 0===n&&(n=!0),this.tests.set(t,e),n&&this.suite.push(t)},n.run=function(t,e,n,r){return this.tests.get(t)({el:e,event:n,href:r})},n.checkLink=function(t,e,n){var r=this;return this.suite.some((function(i){return r.run(i,t,e,n)}))},e}(H),et=function(t){function e(n,r){var i;void 0===r&&(r="Barba error");for(var o=arguments.length,s=new Array(o>2?o-2:0),a=2;a<o;a++)s[a-2]=arguments[a];return(i=t.call.apply(t,[this].concat(s))||this).error=n,i.label=r,Error.captureStackTrace&&Error.captureStackTrace(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(i),e),i.name="BarbaError",i}return r(e,t),e}(a(Error)),nt=function(){function t(t){void 0===t&&(t=[]),this.logger=new h("@barba/core"),this.all=[],this.page=[],this.once=[],this.A=[{name:"namespace",type:"strings"},{name:"custom",type:"function"}],t&&(this.all=this.all.concat(t)),this.update()}var e=t.prototype;return e.add=function(t,e){switch(t){case"rule":this.A.splice(e.position||0,0,e.value);break;case"transition":default:this.all.push(e)}this.update()},e.resolve=function(t,e){var n=this;void 0===e&&(e={});var r=e.once?this.once:this.page;r=r.filter(e.self?function(t){return t.name&&"self"===t.name}:function(t){return!t.name||"self"!==t.name});var i=new Map,o=r.find((function(r){var o=!0,s={};return!(!e.self||"self"!==r.name)||(n.A.reverse().forEach((function(e){o&&(o=n.R(r,e,t,s),r.from&&r.to&&(o=n.R(r,e,t,s,"from")&&n.R(r,e,t,s,"to")),r.from&&!r.to&&(o=n.R(r,e,t,s,"from")),!r.from&&r.to&&(o=n.R(r,e,t,s,"to")))})),i.set(r,s),o)})),s=i.get(o),a=[];if(a.push(e.once?"once":"page"),e.self&&a.push("self"),s){var l,u=[o];Object.keys(s).length>0&&u.push(s),(l=this.logger).info.apply(l,["Transition found ["+a.join(",")+"]"].concat(u))}else this.logger.info("No transition found ["+a.join(",")+"]");return o},e.update=function(){var t=this;this.all=this.all.map((function(e){return t.T(e)})).sort((function(t,e){return t.priority-e.priority})).reverse().map((function(t){return delete t.priority,t})),this.page=this.all.filter((function(t){return void 0!==t.leave||void 0!==t.enter})),this.once=this.all.filter((function(t){return void 0!==t.once}))},e.R=function(t,e,n,r,i){var o=!0,s=!1,a=t,l=e.name,u=l,c=l,h=l,d=i?a[i]:a,p="to"===i?n.next:n.current;if(i?d&&d[l]:d[l]){switch(e.type){case"strings":default:var f=Array.isArray(d[u])?d[u]:[d[u]];p[u]&&-1!==f.indexOf(p[u])&&(s=!0),-1===f.indexOf(p[u])&&(o=!1);break;case"object":var m=Array.isArray(d[c])?d[c]:[d[c]];p[c]?(p[c].name&&-1!==m.indexOf(p[c].name)&&(s=!0),-1===m.indexOf(p[c].name)&&(o=!1)):o=!1;break;case"function":d[h](n)?s=!0:o=!1}s&&(i?(r[i]=r[i]||{},r[i][l]=a[i][l]):r[l]=a[l])}return o},e.O=function(t,e,n){var r=0;return(t[e]||t.from&&t.from[e]||t.to&&t.to[e])&&(r+=Math.pow(10,n),t.from&&t.from[e]&&(r+=1),t.to&&t.to[e]&&(r+=2)),r},e.T=function(t){var e=this;t.priority=0;var n=0;return this.A.forEach((function(r,i){n+=e.O(t,r.name,i+1)})),t.priority=n,t},t}(),rt=function(){function t(t){void 0===t&&(t=[]),this.logger=new h("@barba/core"),this.S=!1,this.store=new nt(t)}var n=t.prototype;return n.get=function(t,e){return this.store.resolve(t,e)},n.doOnce=function(t){var e=t.data,n=t.transition;try{var r=function(){i.S=!1},i=this,o=n||{};i.S=!0;var s=l((function(){return Promise.resolve(i.j("beforeOnce",e,o)).then((function(){return Promise.resolve(i.once(e,o)).then((function(){return Promise.resolve(i.j("afterOnce",e,o)).then((function(){}))}))}))}),(function(t){i.S=!1,i.logger.debug("Transition error [before/after/once]"),i.logger.error(t)}));return Promise.resolve(s&&s.then?s.then(r):r())}catch(t){return Promise.reject(t)}},n.doPage=function(t){var e=t.data,n=t.transition,r=t.page,i=t.wrapper;try{var o=function(t){if(s)return t;a.S=!1},s=!1,a=this,u=n||{},c=!0===u.sync||!1;a.S=!0;var h=l((function(){function t(){return Promise.resolve(a.j("before",e,u)).then((function(){function t(t){return Promise.resolve(a.remove(e)).then((function(){return Promise.resolve(a.j("after",e,u)).then((function(){}))}))}var n=function(){if(c)return l((function(){return Promise.resolve(a.add(e,i)).then((function(){return Promise.resolve(a.j("beforeLeave",e,u)).then((function(){return Promise.resolve(a.j("beforeEnter",e,u)).then((function(){return Promise.resolve(Promise.all([a.leave(e,u),a.enter(e,u)])).then((function(){return Promise.resolve(a.j("afterLeave",e,u)).then((function(){return Promise.resolve(a.j("afterEnter",e,u)).then((function(){}))}))}))}))}))}))}),(function(t){if(a.M(t))throw new et(t,"Transition error [sync]")}));var t=function(t){return l((function(){var t=function(){if(!1!==n)return Promise.resolve(a.add(e,i)).then((function(){return Promise.resolve(a.j("beforeEnter",e,u)).then((function(){return Promise.resolve(a.enter(e,u,n)).then((function(){return Promise.resolve(a.j("afterEnter",e,u)).then((function(){}))}))}))}))}();if(t&&t.then)return t.then((function(){}))}),(function(t){if(a.M(t))throw new et(t,"Transition error [before/after/enter]")}))},n=!1,o=l((function(){return Promise.resolve(a.j("beforeLeave",e,u)).then((function(){return Promise.resolve(Promise.all([a.leave(e,u),C(r,e)]).then((function(t){return t[0]}))).then((function(t){return n=t,Promise.resolve(a.j("afterLeave",e,u)).then((function(){}))}))}))}),(function(t){if(a.M(t))throw new et(t,"Transition error [before/after/leave]")}));return o&&o.then?o.then(t):t()}();return n&&n.then?n.then(t):t()}))}var n=function(){if(c)return Promise.resolve(C(r,e)).then((function(){}))}();return n&&n.then?n.then(t):t()}),(function(t){if(a.S=!1,t.name&&"BarbaError"===t.name)throw a.logger.debug(t.label),a.logger.error(t.error),t;throw a.logger.debug("Transition error [page]"),a.logger.error(t),t}));return Promise.resolve(h&&h.then?h.then(o):o(h))}catch(t){return Promise.reject(t)}},n.once=function(t,e){try{return Promise.resolve(z.do("once",t,e)).then((function(){return e.once?G(e.once,e)(t):Promise.resolve()}))}catch(t){return Promise.reject(t)}},n.leave=function(t,e){try{return Promise.resolve(z.do("leave",t,e)).then((function(){return e.leave?G(e.leave,e)(t):Promise.resolve()}))}catch(t){return Promise.reject(t)}},n.enter=function(t,e,n){try{return Promise.resolve(z.do("enter",t,e)).then((function(){return e.enter?G(e.enter,e)(t,n):Promise.resolve()}))}catch(t){return Promise.reject(t)}},n.add=function(t,e){try{return M.addContainer(t.next.container,e),z.do("nextAdded",t),Promise.resolve()}catch(t){return Promise.reject(t)}},n.remove=function(t){try{return M.removeContainer(t.current.container),z.do("currentRemoved",t),Promise.resolve()}catch(t){return Promise.reject(t)}},n.M=function(t){return t.message?!/Timeout error|Fetch error/.test(t.message):!t.status},n.j=function(t,e,n){try{return Promise.resolve(z.do(t,e,n)).then((function(){return n[t]?G(n[t],n)(e):Promise.resolve()}))}catch(t){return Promise.reject(t)}},e(t,[{key:"isRunning",get:function(){return this.S},set:function(t){this.S=t}},{key:"hasOnce",get:function(){return this.store.once.length>0}},{key:"hasSelf",get:function(){return this.store.all.some((function(t){return"self"===t.name}))}},{key:"shouldWait",get:function(){return this.store.all.some((function(t){return t.to&&!t.to.route||t.sync}))}}]),t}(),it=function(){function t(t){var e=this;this.names=["beforeLeave","afterLeave","beforeEnter","afterEnter"],this.byNamespace=new Map,0!==t.length&&(t.forEach((function(t){e.byNamespace.set(t.namespace,t)})),this.names.forEach((function(t){z[t](e.L(t))})))}return t.prototype.L=function(t){var e=this;return function(n){var r=t.match(/enter/i)?n.next:n.current,i=e.byNamespace.get(r.namespace);return i&&i[t]?G(i[t],i)(n):Promise.resolve()}},t}();Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e&&1===e.nodeType);return null});var ot={container:null,html:"",namespace:"",url:{hash:"",href:"",path:"",port:null,query:{}}};return new(function(){function t(){this.version="2.9.7",this.schemaPage=ot,this.Logger=h,this.logger=new h("@barba/core"),this.plugins=[],this.hooks=z,this.dom=M,this.helpers=O,this.history=D,this.request=U,this.url=k}var r=t.prototype;return r.use=function(t,e){var n=this.plugins;n.indexOf(t)>-1?this.logger.warn("Plugin ["+t.name+"] already installed."):"function"==typeof t.install?(t.install(this,e),n.push(t)):this.logger.warn("Plugin ["+t.name+'] has no "install" method.')},r.init=function(t){var e=void 0===t?{}:t,r=e.transitions,i=void 0===r?[]:r,o=e.views,s=void 0===o?[]:o,a=e.schema,l=void 0===a?A:a,u=e.requestError,c=e.timeout,d=void 0===c?2e3:c,p=e.cacheIgnore,f=void 0!==p&&p,m=e.prefetchIgnore,g=void 0!==m&&m,v=e.preventRunning,y=void 0!==v&&v,_=e.prevent,b=void 0===_?null:_,x=e.debug,w=e.logLevel;if(h.setLevel(!0===(void 0!==x&&x)?"debug":void 0===w?"off":w),this.logger.info(this.version),Object.keys(l).forEach((function(t){A[t]&&(A[t]=l[t])})),this.$=u,this.timeout=d,this.cacheIgnore=f,this.prefetchIgnore=g,this.preventRunning=y,this._=this.dom.getWrapper(),!this._)throw new Error("[@barba/core] No Barba wrapper found");this._.setAttribute("aria-live","polite"),this.q();var E=this.data.current;if(!E.container)throw new Error("[@barba/core] No Barba container found");if(this.cache=new j(f),this.prevent=new tt(g),this.transitions=new rt(i),this.views=new it(s),null!==b){if("function"!=typeof b)throw new Error("[@barba/core] Prevent should be a function");this.prevent.add("preventCustom",b)}this.history.init(E.url.href,E.namespace),this.B=this.B.bind(this),this.U=this.U.bind(this),this.D=this.D.bind(this),this.F(),this.plugins.forEach((function(t){return t.init()}));var T=this.data;T.trigger="barba",T.next=T.current,T.current=n({},this.schemaPage),this.hooks.do("ready",T),this.once(T),this.q()},r.destroy=function(){this.q(),this.H(),this.history.clear(),this.hooks.clear(),this.plugins=[]},r.force=function(t){window.location.assign(t)},r.go=function(t,e,n){var r;if(void 0===e&&(e="barba"),this.transitions.isRunning)this.force(t);else if(!(r="popstate"===e?this.history.current&&this.url.getPath(this.history.current.url)===this.url.getPath(t):this.prevent.run("sameUrl",null,null,t))||this.transitions.hasSelf)return e=this.history.change(t,e,n),n&&(n.stopPropagation(),n.preventDefault()),this.page(t,e,r)},r.once=function(t){try{var e=this;return Promise.resolve(e.hooks.do("beforeEnter",t)).then((function(){function n(){return Promise.resolve(e.hooks.do("afterEnter",t)).then((function(){}))}var r=function(){if(e.transitions.hasOnce){var n=e.transitions.get(t,{once:!0});return Promise.resolve(e.transitions.doOnce({transition:n,data:t})).then((function(){}))}}();return r&&r.then?r.then(n):n()}))}catch(t){return Promise.reject(t)}},r.page=function(t,e,r){try{var i=function(){var t=o.data;return Promise.resolve(o.hooks.do("page",t)).then((function(){var e=l((function(){var e=o.transitions.get(t,{once:!1,self:r});return Promise.resolve(o.transitions.doPage({data:t,page:s,transition:e,wrapper:o._})).then((function(){o.q()}))}),(function(){0===h.getLevel()&&o.force(t.current.url.href)}));if(e&&e.then)return e.then((function(){}))}))},o=this;o.data.next.url=n({href:t},o.url.parse(t)),o.data.trigger=e;var s=o.cache.has(t)?o.cache.update(t,{action:"click"}).request:o.cache.set(t,o.request(t,o.timeout,o.onRequestError.bind(o,e)),"click").request,a=function(){if(o.transitions.shouldWait)return Promise.resolve(C(s,o.data)).then((function(){}))}();return Promise.resolve(a&&a.then?a.then(i):i())}catch(t){return Promise.reject(t)}},r.onRequestError=function(t){this.transitions.isRunning=!1;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=n[0],o=n[1],s=this.cache.getAction(i);return this.cache.delete(i),!(this.$&&!1===this.$(t,s,i,o)||("click"===s&&this.force(i),1))},r.prefetch=function(t){var e=this;this.cache.has(t)||this.cache.set(t,this.request(t,this.timeout,this.onRequestError.bind(this,"barba")).catch((function(t){e.logger.error(t)})),"prefetch")},r.F=function(){!0!==this.prefetchIgnore&&(document.addEventListener("mouseover",this.B),document.addEventListener("touchstart",this.B)),document.addEventListener("click",this.U),window.addEventListener("popstate",this.D)},r.H=function(){!0!==this.prefetchIgnore&&(document.removeEventListener("mouseover",this.B),document.removeEventListener("touchstart",this.B)),document.removeEventListener("click",this.U),window.removeEventListener("popstate",this.D)},r.B=function(t){var e=this,n=this.I(t);if(n){var r=this.dom.getHref(n);this.prevent.checkHref(r)||this.cache.has(r)||this.cache.set(r,this.request(r,this.timeout,this.onRequestError.bind(this,n)).catch((function(t){e.logger.error(t)})),"enter")}},r.U=function(t){var e=this.I(t);if(e)return this.transitions.isRunning&&this.preventRunning?(t.preventDefault(),void t.stopPropagation()):void this.go(this.dom.getHref(e),e,t)},r.D=function(t){this.go(this.url.getHref(),"popstate",t)},r.I=function(t){for(var e=t.target;e&&!this.dom.getHref(e);)e=e.parentNode;if(e&&!this.prevent.checkLink(e,t,this.dom.getHref(e)))return e},r.q=function(){var t=this.url.getHref(),e={container:this.dom.getContainer(),html:this.dom.getHtml(),namespace:this.dom.getNamespace(),url:n({href:t},this.url.parse(t))};this.C={current:e,next:n({},this.schemaPage),trigger:void 0},this.hooks.do("reset",this.data)},e(t,[{key:"data",get:function(){return this.C}},{key:"wrapper",get:function(){return this._}}]),t}())}()},yLpj:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},yrm9:function(t,e,n){var r;t.exports=(r=window.requestIdleCallback||function(t){var e=Date.now();return setTimeout((function(){t({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-e))}})}),1)},new(function(){function t(){this.name="@barba/prefetch",this.version="2.1.10",this.toPrefetch=new Set}var e=t.prototype;return e.install=function(t,e){var n=void 0===e?{}:e,r=n.root,i=void 0===r?document.body:r,o=n.timeout,s=void 0===o?2e3:o;this.logger=new t.Logger(this.name),this.logger.info(this.version),this.barba=t,this.root=i,this.timeout=s},e.init=function(){var t=this;this.barba.prefetchIgnore?this.logger.warn("barba.prefetchIgnore is enabled"):this.barba.cacheIgnore?this.logger.warn("barba.cacheIgnore is enabled"):(this.observer=new IntersectionObserver((function(e){e.forEach((function(e){if(e.isIntersecting){var n=e.target,r=t.barba.dom.getHref(n);t.toPrefetch.has(r)&&(t.observer.unobserve(n),t.barba.cache.has(r)?t.barba.cache.update(r,{action:"prefetch"}):t.barba.cache.set(r,t.barba.request(r,t.barba.timeout,t.barba.onRequestError.bind(t.barba,"barba")).catch((function(e){t.logger.error(e)})),"prefetch"))}}))})),this.observe(),this.barba.hooks.after(this.observe,this))},e.observe=function(){var t=this;r((function(){t.root.querySelectorAll("a").forEach((function(e){var n=e,r=t.barba.dom.getHref(n);t.barba.cache.has(r)||t.barba.prevent.checkHref(r)||t.barba.prevent.checkLink(n,{},r)||(t.observer.observe(e),t.toPrefetch.add(r))}))}),{timeout:this.timeout})},t}()))},yt1c:function(t,e,n){t.exports=new(function(){function t(){this.name="@barba/router",this.version="2.1.10",this.routeNames=[],this.routesByName={}}var e=t.prototype;return e.install=function(t,e){var n=this,r=(void 0===e?{}:e).routes,i=void 0===r?[]:r;this.logger=new t.Logger(this.name),this.logger.info(this.version),this.barba=t,i.forEach((function(t){var e=t.name,r=t.path,i=[],o=n.barba.helpers.pathToRegexp(r,i);n.routeNames.indexOf(e)>-1?console.warn("[@barba/router] Duplicated route name ("+e+")"):(n.routeNames.push(e),n.routesByName[e]={keys:i,path:r,regex:o})})),t.schemaPage.route=void 0},e.init=function(){this.barba.transitions.store.add("rule",{position:1,value:{name:"route",type:"object"}}),this.barba.hooks.page(this.resolveRoutes,this),this.barba.hooks.reset(this.resolveRoutes,this)},e.resolveUrl=function(t){for(var e=this,n=this.barba.url.parse(t).path,r={name:name,params:{}},i=function(t,i){var o=e.routeNames[t],s=e.routesByName[o],a=s.keys,l=s.regex.exec(n);if(null!==l)return r.name=o,a.forEach((function(t,e){r.params[t.name]=l[e+1]})),{v:r}},o=0,s=this.routeNames.length;o<s;o++){var a=i(o);if("object"==typeof a)return a.v}return null},e.resolveRoutes=function(t){var e=t.current,n=t.next;e.route=e.url.href?this.resolveUrl(e.url.href):void 0,n.route=n.url.href?this.resolveUrl(n.url.href):void 0},t}())},"z/o8":function(t,e,n){"use strict";function r(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function i(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,t.__proto__=e}n.d(e,"b",(function(){return zr})),n.d(e,"a",(function(){return zr}));var o,s,a,l,u,c,h,d,p,f,m,g,v,y,_,b={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},x={duration:.5,overwrite:!1,delay:0},w=1e8,E=2*Math.PI,T=E/4,S=0,A=Math.sqrt,M=Math.cos,D=Math.sin,C=function(t){return"string"==typeof t},R=function(t){return"function"==typeof t},O=function(t){return"number"==typeof t},P=function(t){return void 0===t},I=function(t){return"object"==typeof t},L=function(t){return!1!==t},N=function(){return"undefined"!=typeof window},F=function(t){return R(t)||C(t)},k="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},U=Array.isArray,B=/(?:-?\.?\d|\.)+/gi,G=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,z=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,H=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,j=/[+-]=-?[.\d]+/,V=/[^,'"\[\]\s]+/gi,X=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,W={},Y={},q=function(t){return(Y=Et(t,W))&&En},$=function(t,e){return console.warn("Invalid property",t,"set to",e,"Missing plugin? gsap.registerPlugin()")},K=function(t,e){return!e&&console.warn(t)},Z=function(t,e){return t&&(W[t]=e)&&Y&&(Y[t]=e)||W},J=function(){return 0},Q={suppressEvents:!0,isStart:!0,kill:!1},tt={suppressEvents:!0,kill:!1},et={suppressEvents:!0},nt={},rt=[],it={},ot={},st={},at=30,lt=[],ut="",ct=function(t){var e,n,r=t[0];if(I(r)||R(r)||(t=[t]),!(e=(r._gsap||{}).harness)){for(n=lt.length;n--&&!lt[n].targetTest(r););e=lt[n]}for(n=t.length;n--;)t[n]&&(t[n]._gsap||(t[n]._gsap=new Fe(t[n],e)))||t.splice(n,1);return t},ht=function(t){return t._gsap||ct(te(t))[0]._gsap},dt=function(t,e,n){return(n=t[e])&&R(n)?t[e]():P(n)&&t.getAttribute&&t.getAttribute(e)||n},pt=function(t,e){return(t=t.split(",")).forEach(e)||t},ft=function(t){return Math.round(1e5*t)/1e5||0},mt=function(t){return Math.round(1e7*t)/1e7||0},gt=function(t,e){var n=e.charAt(0),r=parseFloat(e.substr(2));return t=parseFloat(t),"+"===n?t+r:"-"===n?t-r:"*"===n?t*r:t/r},vt=function(t,e){for(var n=e.length,r=0;t.indexOf(e[r])<0&&++r<n;);return r<n},yt=function(){var t,e,n=rt.length,r=rt.slice(0);for(it={},rt.length=0,t=0;t<n;t++)(e=r[t])&&e._lazy&&(e.render(e._lazy[0],e._lazy[1],!0)._lazy=0)},_t=function(t,e,n,r){rt.length&&!s&&yt(),t.render(e,n,r||s&&e<0&&(t._initted||t._startAt)),rt.length&&!s&&yt()},bt=function(t){var e=parseFloat(t);return(e||0===e)&&(t+"").match(V).length<2?e:C(t)?t.trim():t},xt=function(t){return t},wt=function(t,e){for(var n in e)n in t||(t[n]=e[n]);return t},Et=function(t,e){for(var n in e)t[n]=e[n];return t},Tt=function t(e,n){for(var r in n)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(e[r]=I(n[r])?t(e[r]||(e[r]={}),n[r]):n[r]);return e},St=function(t,e){var n,r={};for(n in t)n in e||(r[n]=t[n]);return r},At=function(t){var e,n=t.parent||l,r=t.keyframes?(e=U(t.keyframes),function(t,n){for(var r in n)r in t||"duration"===r&&e||"ease"===r||(t[r]=n[r])}):wt;if(L(t.inherit))for(;n;)r(t,n.vars.defaults),n=n.parent||n._dp;return t},Mt=function(t,e,n,r,i){void 0===n&&(n="_first"),void 0===r&&(r="_last");var o,s=t[r];if(i)for(o=e[i];s&&s[i]>o;)s=s._prev;return s?(e._next=s._next,s._next=e):(e._next=t[n],t[n]=e),e._next?e._next._prev=e:t[r]=e,e._prev=s,e.parent=e._dp=t,e},Dt=function(t,e,n,r){void 0===n&&(n="_first"),void 0===r&&(r="_last");var i=e._prev,o=e._next;i?i._next=o:t[n]===e&&(t[n]=o),o?o._prev=i:t[r]===e&&(t[r]=i),e._next=e._prev=e.parent=null},Ct=function(t,e){t.parent&&(!e||t.parent.autoRemoveChildren)&&t.parent.remove&&t.parent.remove(t),t._act=0},Rt=function(t,e){if(t&&(!e||e._end>t._dur||e._start<0))for(var n=t;n;)n._dirty=1,n=n.parent;return t},Ot=function(t){for(var e=t.parent;e&&e.parent;)e._dirty=1,e.totalDuration(),e=e.parent;return t},Pt=function(t,e,n,r){return t._startAt&&(s?t._startAt.revert(tt):t.vars.immediateRender&&!t.vars.autoRevert||t._startAt.render(e,!0,r))},It=function(t){return t._repeat?Lt(t._tTime,t=t.duration()+t._rDelay)*t:0},Lt=function(t,e){var n=Math.floor(t/=e);return t&&n===t?n-1:n},Nt=function(t,e){return(t-e._start)*e._ts+(e._ts>=0?0:e._dirty?e.totalDuration():e._tDur)},Ft=function(t){return t._end=mt(t._start+(t._tDur/Math.abs(t._ts||t._rts||1e-8)||0))},kt=function(t,e){var n=t._dp;return n&&n.smoothChildTiming&&t._ts&&(t._start=mt(n._time-(t._ts>0?e/t._ts:((t._dirty?t.totalDuration():t._tDur)-e)/-t._ts)),Ft(t),n._dirty||Rt(n,t)),t},Ut=function(t,e){var n;if((e._time||!e._dur&&e._initted||e._start<t._time&&(e._dur||!e.add))&&(n=Nt(t.rawTime(),e),(!e._dur||$t(0,e.totalDuration(),n)-e._tTime>1e-8)&&e.render(n,!0)),Rt(t,e)._dp&&t._initted&&t._time>=t._dur&&t._ts){if(t._dur<t.duration())for(n=t;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;t._zTime=-1e-8}},Bt=function(t,e,n,r){return e.parent&&Ct(e),e._start=mt((O(n)?n:n||t!==l?Wt(t,n,e):t._time)+e._delay),e._end=mt(e._start+(e.totalDuration()/Math.abs(e.timeScale())||0)),Mt(t,e,"_first","_last",t._sort?"_start":0),Ht(e)||(t._recent=e),r||Ut(t,e),t._ts<0&&kt(t,t._tTime),t},Gt=function(t,e){return(W.ScrollTrigger||$("scrollTrigger",e))&&W.ScrollTrigger.create(e,t)},zt=function(t,e,n,r,i){return Ve(t,e,i),t._initted?!n&&t._pt&&!s&&(t._dur&&!1!==t.vars.lazy||!t._dur&&t.vars.lazy)&&p!==Ee.frame?(rt.push(t),t._lazy=[i,r],1):void 0:1},Ht=function(t){var e=t.data;return"isFromStart"===e||"isStart"===e},jt=function(t,e,n,r){var i=t._repeat,o=mt(e)||0,s=t._tTime/t._tDur;return s&&!r&&(t._time*=o/t._dur),t._dur=o,t._tDur=i?i<0?1e10:mt(o*(i+1)+t._rDelay*i):o,s>0&&!r&&kt(t,t._tTime=t._tDur*s),t.parent&&Ft(t),n||Rt(t.parent,t),t},Vt=function(t){return t instanceof Ue?Rt(t):jt(t,t._dur)},Xt={_start:0,endTime:J,totalDuration:J},Wt=function t(e,n,r){var i,o,s,a=e.labels,l=e._recent||Xt,u=e.duration()>=w?l.endTime(!1):e._dur;return C(n)&&(isNaN(n)||n in a)?(o=n.charAt(0),s="%"===n.substr(-1),i=n.indexOf("="),"<"===o||">"===o?(i>=0&&(n=n.replace(/=/,"")),("<"===o?l._start:l.endTime(l._repeat>=0))+(parseFloat(n.substr(1))||0)*(s?(i<0?l:r).totalDuration()/100:1)):i<0?(n in a||(a[n]=u),a[n]):(o=parseFloat(n.charAt(i-1)+n.substr(i+1)),s&&r&&(o=o/100*(U(r)?r[0]:r).totalDuration()),i>1?t(e,n.substr(0,i-1),r)+o:u+o)):null==n?u:+n},Yt=function(t,e,n){var r,i,o=O(e[1]),s=(o?2:1)+(t<2?0:1),a=e[s];if(o&&(a.duration=e[1]),a.parent=n,t){for(r=a,i=n;i&&!("immediateRender"in r);)r=i.vars.defaults||{},i=L(i.vars.inherit)&&i.parent;a.immediateRender=L(r.immediateRender),t<2?a.runBackwards=1:a.startAt=e[s-1]}return new $e(e[0],a,e[s+1])},qt=function(t,e){return t||0===t?e(t):e},$t=function(t,e,n){return n<t?t:n>e?e:n},Kt=function(t,e){return C(t)&&(e=X.exec(t))?e[1]:""},Zt=[].slice,Jt=function(t,e){return t&&I(t)&&"length"in t&&(!e&&!t.length||t.length-1 in t&&I(t[0]))&&!t.nodeType&&t!==u},Qt=function(t,e,n){return void 0===n&&(n=[]),t.forEach((function(t){var r;return C(t)&&!e||Jt(t,1)?(r=n).push.apply(r,te(t)):n.push(t)}))||n},te=function(t,e,n){return a&&!e&&a.selector?a.selector(t):!C(t)||n||!c&&Te()?U(t)?Qt(t,n):Jt(t)?Zt.call(t,0):t?[t]:[]:Zt.call((e||h).querySelectorAll(t),0)},ee=function(t){return t=te(t)[0]||K("Invalid scope")||{},function(e){var n=t.current||t.nativeElement||t;return te(e,n.querySelectorAll?n:n===t?K("Invalid scope")||h.createElement("div"):t)}},ne=function(t){return t.sort((function(){return.5-Math.random()}))},re=function(t){if(R(t))return t;var e=I(t)?t:{each:t},n=Oe(e.ease),r=e.from||0,i=parseFloat(e.base)||0,o={},s=r>0&&r<1,a=isNaN(r)||s,l=e.axis,u=r,c=r;return C(r)?u=c={center:.5,edges:.5,end:1}[r]||0:!s&&a&&(u=r[0],c=r[1]),function(t,s,h){var d,p,f,m,g,v,y,_,b,x=(h||e).length,E=o[x];if(!E){if(!(b="auto"===e.grid?0:(e.grid||[1,w])[1])){for(y=-w;y<(y=h[b++].getBoundingClientRect().left)&&b<x;);b<x&&b--}for(E=o[x]=[],d=a?Math.min(b,x)*u-.5:r%b,p=b===w?0:a?x*c/b-.5:r/b|0,y=0,_=w,v=0;v<x;v++)f=v%b-d,m=p-(v/b|0),E[v]=g=l?Math.abs("y"===l?m:f):A(f*f+m*m),g>y&&(y=g),g<_&&(_=g);"random"===r&&ne(E),E.max=y-_,E.min=_,E.v=x=(parseFloat(e.amount)||parseFloat(e.each)*(b>x?x-1:l?"y"===l?x/b:b:Math.max(b,x/b))||0)*("edges"===r?-1:1),E.b=x<0?i-x:i,E.u=Kt(e.amount||e.each)||0,n=n&&x<0?Ce(n):n}return x=(E[t]-E.min)/E.max||0,mt(E.b+(n?n(x):x)*E.v)+E.u}},ie=function(t){var e=Math.pow(10,((t+"").split(".")[1]||"").length);return function(n){var r=mt(Math.round(parseFloat(n)/t)*t*e);return(r-r%1)/e+(O(n)?0:Kt(n))}},oe=function(t,e){var n,r,i=U(t);return!i&&I(t)&&(n=i=t.radius||w,t.values?(t=te(t.values),(r=!O(t[0]))&&(n*=n)):t=ie(t.increment)),qt(e,i?R(t)?function(e){return r=t(e),Math.abs(r-e)<=n?r:e}:function(e){for(var i,o,s=parseFloat(r?e.x:e),a=parseFloat(r?e.y:0),l=w,u=0,c=t.length;c--;)(i=r?(i=t[c].x-s)*i+(o=t[c].y-a)*o:Math.abs(t[c]-s))<l&&(l=i,u=c);return u=!n||l<=n?t[u]:e,r||u===e||O(e)?u:u+Kt(e)}:ie(t))},se=function(t,e,n,r){return qt(U(t)?!e:!0===n?!!(n=0):!r,(function(){return U(t)?t[~~(Math.random()*t.length)]:(n=n||1e-5)&&(r=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((t-n/2+Math.random()*(e-t+.99*n))/n)*n*r)/r}))},ae=function(t,e,n){return qt(n,(function(n){return t[~~e(n)]}))},le=function(t){for(var e,n,r,i,o=0,s="";~(e=t.indexOf("random(",o));)r=t.indexOf(")",e),i="["===t.charAt(e+7),n=t.substr(e+7,r-e-7).match(i?V:B),s+=t.substr(o,e-o)+se(i?n:+n[0],i?0:+n[1],+n[2]||1e-5),o=r+1;return s+t.substr(o,t.length-o)},ue=function(t,e,n,r,i){var o=e-t,s=r-n;return qt(i,(function(e){return n+((e-t)/o*s||0)}))},ce=function(t,e,n){var r,i,o,s=t.labels,a=w;for(r in s)(i=s[r]-e)<0==!!n&&i&&a>(i=Math.abs(i))&&(o=r,a=i);return o},he=function(t,e,n){var r,i,o,s=t.vars,l=s[e],u=a,c=t._ctx;if(l)return r=s[e+"Params"],i=s.callbackScope||t,n&&rt.length&&yt(),c&&(a=c),o=r?l.apply(i,r):l.call(i),a=u,o},de=function(t){return Ct(t),t.scrollTrigger&&t.scrollTrigger.kill(!!s),t.progress()<1&&he(t,"onInterrupt"),t},pe=[],fe=function(t){if(N()&&t){var e=(t=!t.name&&t.default||t).name,n=R(t),r=e&&!n&&t.init?function(){this._props=[]}:t,i={init:J,render:on,add:He,kill:an,modifier:sn,rawVars:0},o={targetTest:0,get:0,getSetter:tn,aliases:{},register:0};if(Te(),t!==r){if(ot[e])return;wt(r,wt(St(t,i),o)),Et(r.prototype,Et(i,St(t,o))),ot[r.prop=e]=r,t.targetTest&&(lt.push(r),nt[e]=1),e=("css"===e?"CSS":e.charAt(0).toUpperCase()+e.substr(1))+"Plugin"}Z(e,r),t.register&&t.register(En,r,cn)}else t&&pe.push(t)},me={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},ge=function(t,e,n){return 255*(6*(t+=t<0?1:t>1?-1:0)<1?e+(n-e)*t*6:t<.5?n:3*t<2?e+(n-e)*(2/3-t)*6:e)+.5|0},ve=function(t,e,n){var r,i,o,s,a,l,u,c,h,d,p=t?O(t)?[t>>16,t>>8&255,255&t]:0:me.black;if(!p){if(","===t.substr(-1)&&(t=t.substr(0,t.length-1)),me[t])p=me[t];else if("#"===t.charAt(0)){if(t.length<6&&(r=t.charAt(1),i=t.charAt(2),o=t.charAt(3),t="#"+r+r+i+i+o+o+(5===t.length?t.charAt(4)+t.charAt(4):"")),9===t.length)return[(p=parseInt(t.substr(1,6),16))>>16,p>>8&255,255&p,parseInt(t.substr(7),16)/255];p=[(t=parseInt(t.substr(1),16))>>16,t>>8&255,255&t]}else if("hsl"===t.substr(0,3))if(p=d=t.match(B),e){if(~t.indexOf("="))return p=t.match(G),n&&p.length<4&&(p[3]=1),p}else s=+p[0]%360/360,a=+p[1]/100,r=2*(l=+p[2]/100)-(i=l<=.5?l*(a+1):l+a-l*a),p.length>3&&(p[3]*=1),p[0]=ge(s+1/3,r,i),p[1]=ge(s,r,i),p[2]=ge(s-1/3,r,i);else p=t.match(B)||me.transparent;p=p.map(Number)}return e&&!d&&(r=p[0]/255,i=p[1]/255,o=p[2]/255,l=((u=Math.max(r,i,o))+(c=Math.min(r,i,o)))/2,u===c?s=a=0:(h=u-c,a=l>.5?h/(2-u-c):h/(u+c),s=u===r?(i-o)/h+(i<o?6:0):u===i?(o-r)/h+2:(r-i)/h+4,s*=60),p[0]=~~(s+.5),p[1]=~~(100*a+.5),p[2]=~~(100*l+.5)),n&&p.length<4&&(p[3]=1),p},ye=function(t){var e=[],n=[],r=-1;return t.split(be).forEach((function(t){var i=t.match(z)||[];e.push.apply(e,i),n.push(r+=i.length+1)})),e.c=n,e},_e=function(t,e,n){var r,i,o,s,a="",l=(t+a).match(be),u=e?"hsla(":"rgba(",c=0;if(!l)return t;if(l=l.map((function(t){return(t=ve(t,e,1))&&u+(e?t[0]+","+t[1]+"%,"+t[2]+"%,"+t[3]:t.join(","))+")"})),n&&(o=ye(t),(r=n.c).join(a)!==o.c.join(a)))for(s=(i=t.replace(be,"1").split(z)).length-1;c<s;c++)a+=i[c]+(~r.indexOf(c)?l.shift()||u+"0,0,0,0)":(o.length?o:l.length?l:n).shift());if(!i)for(s=(i=t.split(be)).length-1;c<s;c++)a+=i[c]+l[c];return a+i[s]},be=function(){var t,e="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(t in me)e+="|"+t+"\\b";return new RegExp(e+")","gi")}(),xe=/hsl[a]?\(/,we=function(t){var e,n=t.join(" ");if(be.lastIndex=0,be.test(n))return e=xe.test(n),t[1]=_e(t[1],e),t[0]=_e(t[0],e,ye(t[1])),!0},Ee=function(){var t,e,n,r,i,o,s=Date.now,a=500,l=33,p=s(),f=p,g=1e3/240,v=g,y=[],_=function n(u){var c,h,d,m,_=s()-f,b=!0===u;if(_>a&&(p+=_-l),((c=(d=(f+=_)-p)-v)>0||b)&&(m=++r.frame,i=d-1e3*r.time,r.time=d/=1e3,v+=c+(c>=g?4:g-c),h=1),b||(t=e(n)),h)for(o=0;o<y.length;o++)y[o](d,i,m,u)};return r={time:0,frame:0,tick:function(){_(!0)},deltaRatio:function(t){return i/(1e3/(t||60))},wake:function(){d&&(!c&&N()&&(u=c=window,h=u.document||{},W.gsap=En,(u.gsapVersions||(u.gsapVersions=[])).push(En.version),q(Y||u.GreenSockGlobals||!u.gsap&&u||{}),n=u.requestAnimationFrame,pe.forEach(fe)),t&&r.sleep(),e=n||function(t){return setTimeout(t,v-1e3*r.time+1|0)},m=1,_(2))},sleep:function(){(n?u.cancelAnimationFrame:clearTimeout)(t),m=0,e=J},lagSmoothing:function(t,e){a=t||1/0,l=Math.min(e||33,a)},fps:function(t){g=1e3/(t||240),v=1e3*r.time+g},add:function(t,e,n){var i=e?function(e,n,o,s){t(e,n,o,s),r.remove(i)}:t;return r.remove(t),y[n?"unshift":"push"](i),Te(),i},remove:function(t,e){~(e=y.indexOf(t))&&y.splice(e,1)&&o>=e&&o--},_listeners:y}}(),Te=function(){return!m&&Ee.wake()},Se={},Ae=/^[\d.\-M][\d.\-,\s]/,Me=/["']/g,De=function(t){for(var e,n,r,i={},o=t.substr(1,t.length-3).split(":"),s=o[0],a=1,l=o.length;a<l;a++)n=o[a],e=a!==l-1?n.lastIndexOf(","):n.length,r=n.substr(0,e),i[s]=isNaN(r)?r.replace(Me,"").trim():+r,s=n.substr(e+1).trim();return i},Ce=function(t){return function(e){return 1-t(1-e)}},Re=function t(e,n){for(var r,i=e._first;i;)i instanceof Ue?t(i,n):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===n||(i.timeline?t(i.timeline,n):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=n)),i=i._next},Oe=function(t,e){return t&&(R(t)?t:Se[t]||function(t){var e,n,r,i,o=(t+"").split("("),s=Se[o[0]];return s&&o.length>1&&s.config?s.config.apply(null,~t.indexOf("{")?[De(o[1])]:(e=t,n=e.indexOf("(")+1,r=e.indexOf(")"),i=e.indexOf("(",n),e.substring(n,~i&&i<r?e.indexOf(")",r+1):r)).split(",").map(bt)):Se._CE&&Ae.test(t)?Se._CE("",t):s}(t))||e},Pe=function(t,e,n,r){void 0===n&&(n=function(t){return 1-e(1-t)}),void 0===r&&(r=function(t){return t<.5?e(2*t)/2:1-e(2*(1-t))/2});var i,o={easeIn:e,easeOut:n,easeInOut:r};return pt(t,(function(t){for(var e in Se[t]=W[t]=o,Se[i=t.toLowerCase()]=n,o)Se[i+("easeIn"===e?".in":"easeOut"===e?".out":".inOut")]=Se[t+"."+e]=o[e]})),o},Ie=function(t){return function(e){return e<.5?(1-t(1-2*e))/2:.5+t(2*(e-.5))/2}},Le=function t(e,n,r){var i=n>=1?n:1,o=(r||(e?.3:.45))/(n<1?n:1),s=o/E*(Math.asin(1/i)||0),a=function(t){return 1===t?1:i*Math.pow(2,-10*t)*D((t-s)*o)+1},l="out"===e?a:"in"===e?function(t){return 1-a(1-t)}:Ie(a);return o=E/o,l.config=function(n,r){return t(e,n,r)},l},Ne=function t(e,n){void 0===n&&(n=1.70158);var r=function(t){return t?--t*t*((n+1)*t+n)+1:0},i="out"===e?r:"in"===e?function(t){return 1-r(1-t)}:Ie(r);return i.config=function(n){return t(e,n)},i};pt("Linear,Quad,Cubic,Quart,Quint,Strong",(function(t,e){var n=e<5?e+1:e;Pe(t+",Power"+(n-1),e?function(t){return Math.pow(t,n)}:function(t){return t},(function(t){return 1-Math.pow(1-t,n)}),(function(t){return t<.5?Math.pow(2*t,n)/2:1-Math.pow(2*(1-t),n)/2}))})),Se.Linear.easeNone=Se.none=Se.Linear.easeIn,Pe("Elastic",Le("in"),Le("out"),Le()),g=7.5625,y=1/(v=2.75),Pe("Bounce",(function(t){return 1-_(1-t)}),_=function(t){return t<y?g*t*t:t<.7272727272727273?g*Math.pow(t-1.5/v,2)+.75:t<.9090909090909092?g*(t-=2.25/v)*t+.9375:g*Math.pow(t-2.625/v,2)+.984375}),Pe("Expo",(function(t){return t?Math.pow(2,10*(t-1)):0})),Pe("Circ",(function(t){return-(A(1-t*t)-1)})),Pe("Sine",(function(t){return 1===t?1:1-M(t*T)})),Pe("Back",Ne("in"),Ne("out"),Ne()),Se.SteppedEase=Se.steps=W.SteppedEase={config:function(t,e){void 0===t&&(t=1);var n=1/t,r=t+(e?0:1),i=e?1:0;return function(t){return((r*$t(0,1-1e-8,t)|0)+i)*n}}},x.ease=Se["quad.out"],pt("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(t){return ut+=t+","+t+"Params,"}));var Fe=function(t,e){this.id=S++,t._gsap=this,this.target=t,this.harness=e,this.get=e?e.get:dt,this.set=e?e.getSetter:tn},ke=function(){function t(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,jt(this,+t.duration,1,1),this.data=t.data,a&&(this._ctx=a,a.data.push(this)),m||Ee.wake()}var e=t.prototype;return e.delay=function(t){return t||0===t?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+t-this._delay),this._delay=t,this):this._delay},e.duration=function(t){return arguments.length?this.totalDuration(this._repeat>0?t+(t+this._rDelay)*this._repeat:t):this.totalDuration()&&this._dur},e.totalDuration=function(t){return arguments.length?(this._dirty=0,jt(this,this._repeat<0?t:(t-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(t,e){if(Te(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(kt(this,t),!n._dp||n.parent||Ut(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&t<this._tDur||this._ts<0&&t>0||!this._tDur&&!t)&&Bt(this._dp,this,this._start-this._delay)}return(this._tTime!==t||!this._dur&&!e||this._initted&&1e-8===Math.abs(this._zTime)||!t&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=t),_t(this,t,e)),this},e.time=function(t,e){return arguments.length?this.totalTime(Math.min(this.totalDuration(),t+It(this))%(this._dur+this._rDelay)||(t?this._dur:0),e):this._time},e.totalProgress=function(t,e){return arguments.length?this.totalTime(this.totalDuration()*t,e):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},e.progress=function(t,e){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?t:1-t)+It(this),e):this.duration()?Math.min(1,this._time/this._dur):this.ratio},e.iteration=function(t,e){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(t-1)*n,e):this._repeat?Lt(this._tTime,n)+1:1},e.timeScale=function(t,e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===t)return this;var n=this.parent&&this._ts?Nt(this.parent._time,this):this._tTime;return this._rts=+t||0,this._ts=this._ps||-1e-8===t?0:this._rts,this.totalTime($t(-Math.abs(this._delay),this._tDur,n),!1!==e),Ft(this),Ot(this)},e.paused=function(t){return arguments.length?(this._ps!==t&&(this._ps=t,t?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Te(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&1e-8!==Math.abs(this._zTime)&&(this._tTime-=1e-8)))),this):this._ps},e.startTime=function(t){if(arguments.length){this._start=t;var e=this.parent||this._dp;return e&&(e._sort||!this.parent)&&Bt(e,this,t-this._delay),this}return this._start},e.endTime=function(t){return this._start+(L(t)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(t){var e=this.parent||this._dp;return e?t&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Nt(e.rawTime(t),this):this._tTime:this._tTime},e.revert=function(t){void 0===t&&(t=et);var e=s;return s=t,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(t),this.totalTime(-.01,t.suppressEvents)),"nested"!==this.data&&!1!==t.kill&&this.kill(),s=e,this},e.globalTime=function(t){for(var e=this,n=arguments.length?t:e.rawTime();e;)n=e._start+n/(Math.abs(e._ts)||1),e=e._dp;return!this.parent&&this._sat?this._sat.globalTime(t):n},e.repeat=function(t){return arguments.length?(this._repeat=t===1/0?-2:t,Vt(this)):-2===this._repeat?1/0:this._repeat},e.repeatDelay=function(t){if(arguments.length){var e=this._time;return this._rDelay=t,Vt(this),e?this.time(e):this}return this._rDelay},e.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},e.seek=function(t,e){return this.totalTime(Wt(this,t),L(e))},e.restart=function(t,e){return this.play().totalTime(t?-this._delay:0,L(e))},e.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},e.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},e.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(t){return arguments.length?(!!t!==this.reversed()&&this.timeScale(-this._rts||(t?-1e-8:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},e.isActive=function(){var t,e=this.parent||this._dp,n=this._start;return!(e&&!(this._ts&&this._initted&&e.isActive()&&(t=e.rawTime(!0))>=n&&t<this.endTime(!0)-1e-8))},e.eventCallback=function(t,e,n){var r=this.vars;return arguments.length>1?(e?(r[t]=e,n&&(r[t+"Params"]=n),"onUpdate"===t&&(this._onUpdate=e)):delete r[t],this):r[t]},e.then=function(t){var e=this;return new Promise((function(n){var r=R(t)?t:xt,i=function(){var t=e.then;e.then=null,R(r)&&(r=r(e))&&(r.then||r===e)&&(e.then=t),n(r),e.then=t};e._initted&&1===e.totalProgress()&&e._ts>=0||!e._tTime&&e._ts<0?i():e._prom=i}))},e.kill=function(){de(this)},t}();wt(ke.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var Ue=function(t){function e(e,n){var i;return void 0===e&&(e={}),(i=t.call(this,e)||this).labels={},i.smoothChildTiming=!!e.smoothChildTiming,i.autoRemoveChildren=!!e.autoRemoveChildren,i._sort=L(e.sortChildren),l&&Bt(e.parent||l,r(i),n),e.reversed&&i.reverse(),e.paused&&i.paused(!0),e.scrollTrigger&&Gt(r(i),e.scrollTrigger),i}i(e,t);var n=e.prototype;return n.to=function(t,e,n){return Yt(0,arguments,this),this},n.from=function(t,e,n){return Yt(1,arguments,this),this},n.fromTo=function(t,e,n,r){return Yt(2,arguments,this),this},n.set=function(t,e,n){return e.duration=0,e.parent=this,At(e).repeatDelay||(e.repeat=0),e.immediateRender=!!e.immediateRender,new $e(t,e,Wt(this,n),1),this},n.call=function(t,e,n){return Bt(this,$e.delayedCall(0,t,e),n)},n.staggerTo=function(t,e,n,r,i,o,s){return n.duration=e,n.stagger=n.stagger||r,n.onComplete=o,n.onCompleteParams=s,n.parent=this,new $e(t,n,Wt(this,i)),this},n.staggerFrom=function(t,e,n,r,i,o,s){return n.runBackwards=1,At(n).immediateRender=L(n.immediateRender),this.staggerTo(t,e,n,r,i,o,s)},n.staggerFromTo=function(t,e,n,r,i,o,s,a){return r.startAt=n,At(r).immediateRender=L(r.immediateRender),this.staggerTo(t,e,r,i,o,s,a)},n.render=function(t,e,n){var r,i,o,a,u,c,h,d,p,f,m,g,v=this._time,y=this._dirty?this.totalDuration():this._tDur,_=this._dur,b=t<=0?0:mt(t),x=this._zTime<0!=t<0&&(this._initted||!_);if(this!==l&&b>y&&t>=0&&(b=y),b!==this._tTime||n||x){if(v!==this._time&&_&&(b+=this._time-v,t+=this._time-v),r=b,p=this._start,c=!(d=this._ts),x&&(_||(v=this._zTime),(t||!e)&&(this._zTime=t)),this._repeat){if(m=this._yoyo,u=_+this._rDelay,this._repeat<-1&&t<0)return this.totalTime(100*u+t,e,n);if(r=mt(b%u),b===y?(a=this._repeat,r=_):((a=~~(b/u))&&a===b/u&&(r=_,a--),r>_&&(r=_)),f=Lt(this._tTime,u),!v&&this._tTime&&f!==a&&this._tTime-f*u-this._dur<=0&&(f=a),m&&1&a&&(r=_-r,g=1),a!==f&&!this._lock){var w=m&&1&f,E=w===(m&&1&a);if(a<f&&(w=!w),v=w?0:b%_?_:b,this._lock=1,this.render(v||(g?0:mt(a*u)),e,!_)._lock=0,this._tTime=b,!e&&this.parent&&he(this,"onRepeat"),this.vars.repeatRefresh&&!g&&(this.invalidate()._lock=1),v&&v!==this._time||c!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(_=this._dur,y=this._tDur,E&&(this._lock=2,v=w?_:-1e-4,this.render(v,!0),this.vars.repeatRefresh&&!g&&this.invalidate()),this._lock=0,!this._ts&&!c)return this;Re(this,g)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function(t,e,n){var r;if(n>e)for(r=t._first;r&&r._start<=n;){if("isPause"===r.data&&r._start>e)return r;r=r._next}else for(r=t._last;r&&r._start>=n;){if("isPause"===r.data&&r._start<e)return r;r=r._prev}}(this,mt(v),mt(r)))&&(b-=r-(r=h._start)),this._tTime=b,this._time=r,this._act=!d,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=t,v=0),!v&&r&&!e&&!a&&(he(this,"onStart"),this._tTime!==b))return this;if(r>=v&&t>=0)for(i=this._first;i;){if(o=i._next,(i._act||r>=i._start)&&i._ts&&h!==i){if(i.parent!==this)return this.render(t,e,n);if(i.render(i._ts>0?(r-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(r-i._start)*i._ts,e,n),r!==this._time||!this._ts&&!c){h=0,o&&(b+=this._zTime=-1e-8);break}}i=o}else{i=this._last;for(var T=t<0?t:r;i;){if(o=i._prev,(i._act||T<=i._end)&&i._ts&&h!==i){if(i.parent!==this)return this.render(t,e,n);if(i.render(i._ts>0?(T-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(T-i._start)*i._ts,e,n||s&&(i._initted||i._startAt)),r!==this._time||!this._ts&&!c){h=0,o&&(b+=this._zTime=T?-1e-8:1e-8);break}}i=o}}if(h&&!e&&(this.pause(),h.render(r>=v?0:-1e-8)._zTime=r>=v?1:-1,this._ts))return this._start=p,Ft(this),this.render(t,e,n);this._onUpdate&&!e&&he(this,"onUpdate",!0),(b===y&&this._tTime>=this.totalDuration()||!b&&v)&&(p!==this._start&&Math.abs(d)===Math.abs(this._ts)||this._lock||((t||!_)&&(b===y&&this._ts>0||!b&&this._ts<0)&&Ct(this,1),e||t<0&&!v||!b&&!v&&y||(he(this,b===y&&t>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(b<y&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(t,e){var n=this;if(O(e)||(e=Wt(this,e,t)),!(t instanceof ke)){if(U(t))return t.forEach((function(t){return n.add(t,e)})),this;if(C(t))return this.addLabel(t,e);if(!R(t))return this;t=$e.delayedCall(0,t)}return this!==t?Bt(this,t,e):this},n.getChildren=function(t,e,n,r){void 0===t&&(t=!0),void 0===e&&(e=!0),void 0===n&&(n=!0),void 0===r&&(r=-w);for(var i=[],o=this._first;o;)o._start>=r&&(o instanceof $e?e&&i.push(o):(n&&i.push(o),t&&i.push.apply(i,o.getChildren(!0,e,n)))),o=o._next;return i},n.getById=function(t){for(var e=this.getChildren(1,1,1),n=e.length;n--;)if(e[n].vars.id===t)return e[n]},n.remove=function(t){return C(t)?this.removeLabel(t):R(t)?this.killTweensOf(t):(Dt(this,t),t===this._recent&&(this._recent=this._last),Rt(this))},n.totalTime=function(e,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=mt(Ee.time-(this._ts>0?e/this._ts:(this.totalDuration()-e)/-this._ts))),t.prototype.totalTime.call(this,e,n),this._forcing=0,this):this._tTime},n.addLabel=function(t,e){return this.labels[t]=Wt(this,e),this},n.removeLabel=function(t){return delete this.labels[t],this},n.addPause=function(t,e,n){var r=$e.delayedCall(0,e||J,n);return r.data="isPause",this._hasPause=1,Bt(this,r,Wt(this,t))},n.removePause=function(t){var e=this._first;for(t=Wt(this,t);e;)e._start===t&&"isPause"===e.data&&Ct(e),e=e._next},n.killTweensOf=function(t,e,n){for(var r=this.getTweensOf(t,n),i=r.length;i--;)Be!==r[i]&&r[i].kill(t,e);return this},n.getTweensOf=function(t,e){for(var n,r=[],i=te(t),o=this._first,s=O(e);o;)o instanceof $e?vt(o._targets,i)&&(s?(!Be||o._initted&&o._ts)&&o.globalTime(0)<=e&&o.globalTime(o.totalDuration())>e:!e||o.isActive())&&r.push(o):(n=o.getTweensOf(i,e)).length&&r.push.apply(r,n),o=o._next;return r},n.tweenTo=function(t,e){e=e||{};var n,r=this,i=Wt(r,t),o=e,s=o.startAt,a=o.onStart,l=o.onStartParams,u=o.immediateRender,c=$e.to(r,wt({ease:e.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:e.duration||Math.abs((i-(s&&"time"in s?s.time:r._time))/r.timeScale())||1e-8,onStart:function(){if(r.pause(),!n){var t=e.duration||Math.abs((i-(s&&"time"in s?s.time:r._time))/r.timeScale());c._dur!==t&&jt(c,t,0,1).render(c._time,!0,!0),n=1}a&&a.apply(c,l||[])}},e));return u?c.render(0):c},n.tweenFromTo=function(t,e,n){return this.tweenTo(e,wt({startAt:{time:Wt(this,t)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(t){return void 0===t&&(t=this._time),ce(this,Wt(this,t))},n.previousLabel=function(t){return void 0===t&&(t=this._time),ce(this,Wt(this,t),1)},n.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.previousLabel(this._time+1e-8)},n.shiftChildren=function(t,e,n){void 0===n&&(n=0);for(var r,i=this._first,o=this.labels;i;)i._start>=n&&(i._start+=t,i._end+=t),i=i._next;if(e)for(r in o)o[r]>=n&&(o[r]+=t);return Rt(this)},n.invalidate=function(e){var n=this._first;for(this._lock=0;n;)n.invalidate(e),n=n._next;return t.prototype.invalidate.call(this,e)},n.clear=function(t){void 0===t&&(t=!0);for(var e,n=this._first;n;)e=n._next,this.remove(n),n=e;return this._dp&&(this._time=this._tTime=this._pTime=0),t&&(this.labels={}),Rt(this)},n.totalDuration=function(t){var e,n,r,i=0,o=this,s=o._last,a=w;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-t:t));if(o._dirty){for(r=o.parent;s;)e=s._prev,s._dirty&&s.totalDuration(),(n=s._start)>a&&o._sort&&s._ts&&!o._lock?(o._lock=1,Bt(o,s,n-s._delay,1)._lock=0):a=n,n<0&&s._ts&&(i-=n,(!r&&!o._dp||r&&r.smoothChildTiming)&&(o._start+=n/o._ts,o._time-=n,o._tTime-=n),o.shiftChildren(-n,!1,-Infinity),a=0),s._end>i&&s._ts&&(i=s._end),s=e;jt(o,o===l&&o._time>i?o._time:i,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(t){if(l._ts&&(_t(l,Nt(t,l)),p=Ee.frame),Ee.frame>=at){at+=b.autoSleep||120;var e=l._first;if((!e||!e._ts)&&b.autoSleep&&Ee._listeners.length<2){for(;e&&!e._ts;)e=e._next;e||Ee.sleep()}}},e}(ke);wt(Ue.prototype,{_lock:0,_hasPause:0,_forcing:0});var Be,Ge,ze=function(t,e,n,r,i,o,s){var a,l,u,c,h,d,p,f,m=new cn(this._pt,t,e,0,1,rn,null,i),g=0,v=0;for(m.b=n,m.e=r,n+="",(p=~(r+="").indexOf("random("))&&(r=le(r)),o&&(o(f=[n,r],t,e),n=f[0],r=f[1]),l=n.match(H)||[];a=H.exec(r);)c=a[0],h=r.substring(g,a.index),u?u=(u+1)%5:"rgba("===h.substr(-5)&&(u=1),c!==l[v++]&&(d=parseFloat(l[v-1])||0,m._pt={_next:m._pt,p:h||1===v?h:",",s:d,c:"="===c.charAt(1)?gt(d,c)-d:parseFloat(c)-d,m:u&&u<4?Math.round:0},g=H.lastIndex);return m.c=g<r.length?r.substring(g,r.length):"",m.fp=s,(j.test(r)||p)&&(m.e=0),this._pt=m,m},He=function(t,e,n,r,i,o,s,a,l,u){R(r)&&(r=r(i||0,t,o));var c,h=t[e],d="get"!==n?n:R(h)?l?t[e.indexOf("set")||!R(t["get"+e.substr(3)])?e:"get"+e.substr(3)](l):t[e]():h,p=R(h)?l?Je:Ze:Ke;if(C(r)&&(~r.indexOf("random(")&&(r=le(r)),"="===r.charAt(1)&&((c=gt(d,r)+(Kt(d)||0))||0===c)&&(r=c)),!u||d!==r||Ge)return isNaN(d*r)||""===r?(!h&&!(e in t)&&$(e,r),ze.call(this,t,e,d,r,p,a||b.stringFilter,l)):(c=new cn(this._pt,t,e,+d||0,r-(d||0),"boolean"==typeof h?nn:en,0,p),l&&(c.fp=l),s&&c.modifier(s,this,t),this._pt=c)},je=function(t,e,n,r,i,o){var s,a,l,u;if(ot[t]&&!1!==(s=new ot[t]).init(i,s.rawVars?e[t]:function(t,e,n,r,i){if(R(t)&&(t=We(t,i,e,n,r)),!I(t)||t.style&&t.nodeType||U(t)||k(t))return C(t)?We(t,i,e,n,r):t;var o,s={};for(o in t)s[o]=We(t[o],i,e,n,r);return s}(e[t],r,i,o,n),n,r,o)&&(n._pt=a=new cn(n._pt,i,t,0,1,s.render,s,0,s.priority),n!==f))for(l=n._ptLookup[n._targets.indexOf(i)],u=s._props.length;u--;)l[s._props[u]]=a;return s},Ve=function t(e,n,r){var i,a,u,c,h,d,p,f,m,g,v,y,_,b=e.vars,E=b.ease,T=b.startAt,S=b.immediateRender,A=b.lazy,M=b.onUpdate,D=b.runBackwards,C=b.yoyoEase,R=b.keyframes,O=b.autoRevert,P=e._dur,I=e._startAt,N=e._targets,F=e.parent,k=F&&"nested"===F.data?F.vars.targets:N,U="auto"===e._overwrite&&!o,B=e.timeline;if(B&&(!R||!E)&&(E="none"),e._ease=Oe(E,x.ease),e._yEase=C?Ce(Oe(!0===C?E:C,x.ease)):0,C&&e._yoyo&&!e._repeat&&(C=e._yEase,e._yEase=e._ease,e._ease=C),e._from=!B&&!!b.runBackwards,!B||R&&!b.stagger){if(y=(f=N[0]?ht(N[0]).harness:0)&&b[f.prop],i=St(b,nt),I&&(I._zTime<0&&I.progress(1),n<0&&D&&S&&!O?I.render(-1,!0):I.revert(D&&P?tt:Q),I._lazy=0),T){if(Ct(e._startAt=$e.set(N,wt({data:"isStart",overwrite:!1,parent:F,immediateRender:!0,lazy:!I&&L(A),startAt:null,delay:0,onUpdate:M&&function(){return he(e,"onUpdate")},stagger:0},T))),e._startAt._dp=0,e._startAt._sat=e,n<0&&(s||!S&&!O)&&e._startAt.revert(tt),S&&P&&n<=0&&r<=0)return void(n&&(e._zTime=n))}else if(D&&P&&!I)if(n&&(S=!1),u=wt({overwrite:!1,data:"isFromStart",lazy:S&&!I&&L(A),immediateRender:S,stagger:0,parent:F},i),y&&(u[f.prop]=y),Ct(e._startAt=$e.set(N,u)),e._startAt._dp=0,e._startAt._sat=e,n<0&&(s?e._startAt.revert(tt):e._startAt.render(-1,!0)),e._zTime=n,S){if(!n)return}else t(e._startAt,1e-8,1e-8);for(e._pt=e._ptCache=0,A=P&&L(A)||A&&!P,a=0;a<N.length;a++){if(p=(h=N[a])._gsap||ct(N)[a]._gsap,e._ptLookup[a]=g={},it[p.id]&&rt.length&&yt(),v=k===N?a:k.indexOf(h),f&&!1!==(m=new f).init(h,y||i,e,v,k)&&(e._pt=c=new cn(e._pt,h,m.name,0,1,m.render,m,0,m.priority),m._props.forEach((function(t){g[t]=c})),m.priority&&(d=1)),!f||y)for(u in i)ot[u]&&(m=je(u,i,e,v,h,k))?m.priority&&(d=1):g[u]=c=He.call(e,h,u,"get",i[u],v,k,0,b.stringFilter);e._op&&e._op[a]&&e.kill(h,e._op[a]),U&&e._pt&&(Be=e,l.killTweensOf(h,g,e.globalTime(n)),_=!e.parent,Be=0),e._pt&&A&&(it[p.id]=1)}d&&un(e),e._onInit&&e._onInit(e)}e._onUpdate=M,e._initted=(!e._op||e._pt)&&!_,R&&n<=0&&B.render(w,!0,!0)},Xe=function(t,e,n,r){var i,o,s=e.ease||r||"power1.inOut";if(U(e))o=n[t]||(n[t]=[]),e.forEach((function(t,n){return o.push({t:n/(e.length-1)*100,v:t,e:s})}));else for(i in e)o=n[i]||(n[i]=[]),"ease"===i||o.push({t:parseFloat(t),v:e[i],e:s})},We=function(t,e,n,r,i){return R(t)?t.call(e,n,r,i):C(t)&&~t.indexOf("random(")?le(t):t},Ye=ut+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",qe={};pt(Ye+",id,stagger,delay,duration,paused,scrollTrigger",(function(t){return qe[t]=1}));var $e=function(t){function e(e,n,i,s){var a;"number"==typeof n&&(i.duration=n,n=i,i=null);var u,c,h,d,p,f,m,g,v=(a=t.call(this,s?n:At(n))||this).vars,y=v.duration,_=v.delay,x=v.immediateRender,w=v.stagger,E=v.overwrite,T=v.keyframes,S=v.defaults,A=v.scrollTrigger,M=v.yoyoEase,D=n.parent||l,C=(U(e)||k(e)?O(e[0]):"length"in n)?[e]:te(e);if(a._targets=C.length?ct(C):K("GSAP target "+e+" not found. https://gsap.com",!b.nullTargetWarn)||[],a._ptLookup=[],a._overwrite=E,T||w||F(y)||F(_)){if(n=a.vars,(u=a.timeline=new Ue({data:"nested",defaults:S||{},targets:D&&"nested"===D.data?D.vars.targets:C})).kill(),u.parent=u._dp=r(a),u._start=0,w||F(y)||F(_)){if(d=C.length,m=w&&re(w),I(w))for(p in w)~Ye.indexOf(p)&&(g||(g={}),g[p]=w[p]);for(c=0;c<d;c++)(h=St(n,qe)).stagger=0,M&&(h.yoyoEase=M),g&&Et(h,g),f=C[c],h.duration=+We(y,r(a),c,f,C),h.delay=(+We(_,r(a),c,f,C)||0)-a._delay,!w&&1===d&&h.delay&&(a._delay=_=h.delay,a._start+=_,h.delay=0),u.to(f,h,m?m(c,f,C):0),u._ease=Se.none;u.duration()?y=_=0:a.timeline=0}else if(T){At(wt(u.vars.defaults,{ease:"none"})),u._ease=Oe(T.ease||n.ease||"none");var R,P,N,B=0;if(U(T))T.forEach((function(t){return u.to(C,t,">")})),u.duration();else{for(p in h={},T)"ease"===p||"easeEach"===p||Xe(p,T[p],h,T.easeEach);for(p in h)for(R=h[p].sort((function(t,e){return t.t-e.t})),B=0,c=0;c<R.length;c++)(N={ease:(P=R[c]).e,duration:(P.t-(c?R[c-1].t:0))/100*y})[p]=P.v,u.to(C,N,B),B+=N.duration;u.duration()<y&&u.to({},{duration:y-u.duration()})}}y||a.duration(y=u.duration())}else a.timeline=0;return!0!==E||o||(Be=r(a),l.killTweensOf(C),Be=0),Bt(D,r(a),i),n.reversed&&a.reverse(),n.paused&&a.paused(!0),(x||!y&&!T&&a._start===mt(D._time)&&L(x)&&function t(e){return!e||e._ts&&t(e.parent)}(r(a))&&"nested"!==D.data)&&(a._tTime=-1e-8,a.render(Math.max(0,-_)||0)),A&&Gt(r(a),A),a}i(e,t);var n=e.prototype;return n.render=function(t,e,n){var r,i,o,a,l,u,c,h,d,p=this._time,f=this._tDur,m=this._dur,g=t<0,v=t>f-1e-8&&!g?f:t<1e-8?0:t;if(m){if(v!==this._tTime||!t||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g){if(r=v,h=this.timeline,this._repeat){if(a=m+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*a+t,e,n);if(r=mt(v%a),v===f?(o=this._repeat,r=m):((o=~~(v/a))&&o===mt(v/a)&&(r=m,o--),r>m&&(r=m)),(u=this._yoyo&&1&o)&&(d=this._yEase,r=m-r),l=Lt(this._tTime,a),r===p&&!n&&this._initted&&o===l)return this._tTime=v,this;o!==l&&(h&&this._yEase&&Re(h,u),this.vars.repeatRefresh&&!u&&!this._lock&&this._time!==m&&this._initted&&(this._lock=n=1,this.render(mt(a*o),!0).invalidate()._lock=0))}if(!this._initted){if(zt(this,g?t:r,n,e,v))return this._tTime=0,this;if(!(p===this._time||n&&this.vars.repeatRefresh&&o!==l))return this;if(m!==this._dur)return this.render(t,e,n)}if(this._tTime=v,this._time=r,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=c=(d||this._ease)(r/m),this._from&&(this.ratio=c=1-c),r&&!p&&!e&&!o&&(he(this,"onStart"),this._tTime!==v))return this;for(i=this._pt;i;)i.r(c,i.d),i=i._next;h&&h.render(t<0?t:!r&&u?-1e-8:h._dur*h._ease(r/this._dur),e,n)||this._startAt&&(this._zTime=t),this._onUpdate&&!e&&(g&&Pt(this,t,0,n),he(this,"onUpdate")),this._repeat&&o!==l&&this.vars.onRepeat&&!e&&this.parent&&he(this,"onRepeat"),v!==this._tDur&&v||this._tTime!==v||(g&&!this._onUpdate&&Pt(this,t,0,!0),(t||!m)&&(v===this._tDur&&this._ts>0||!v&&this._ts<0)&&Ct(this,1),e||g&&!p||!(v||p||u)||(he(this,v===f?"onComplete":"onReverseComplete",!0),this._prom&&!(v<f&&this.timeScale()>0)&&this._prom()))}}else!function(t,e,n,r){var i,o,a,l=t.ratio,u=e<0||!e&&(!t._start&&function t(e){var n=e.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||t(n))}(t)&&(t._initted||!Ht(t))||(t._ts<0||t._dp._ts<0)&&!Ht(t))?0:1,c=t._rDelay,h=0;if(c&&t._repeat&&(h=$t(0,t._tDur,e),o=Lt(h,c),t._yoyo&&1&o&&(u=1-u),o!==Lt(t._tTime,c)&&(l=1-u,t.vars.repeatRefresh&&t._initted&&t.invalidate())),u!==l||s||r||1e-8===t._zTime||!e&&t._zTime){if(!t._initted&&zt(t,e,r,n,h))return;for(a=t._zTime,t._zTime=e||(n?1e-8:0),n||(n=e&&!a),t.ratio=u,t._from&&(u=1-u),t._time=0,t._tTime=h,i=t._pt;i;)i.r(u,i.d),i=i._next;e<0&&Pt(t,e,0,!0),t._onUpdate&&!n&&he(t,"onUpdate"),h&&t._repeat&&!n&&t.parent&&he(t,"onRepeat"),(e>=t._tDur||e<0)&&t.ratio===u&&(u&&Ct(t,1),n||s||(he(t,u?"onComplete":"onReverseComplete",!0),t._prom&&t._prom()))}else t._zTime||(t._zTime=e)}(this,t,e,n);return this},n.targets=function(){return this._targets},n.invalidate=function(e){return(!e||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(e),t.prototype.invalidate.call(this,e)},n.resetTo=function(t,e,n,r,i){m||Ee.wake(),this._ts||this.play();var o=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Ve(this,o),function(t,e,n,r,i,o,s,a){var l,u,c,h,d=(t._pt&&t._ptCache||(t._ptCache={}))[e];if(!d)for(d=t._ptCache[e]=[],c=t._ptLookup,h=t._targets.length;h--;){if((l=c[h][e])&&l.d&&l.d._pt)for(l=l.d._pt;l&&l.p!==e&&l.fp!==e;)l=l._next;if(!l)return Ge=1,t.vars[e]="+=0",Ve(t,s),Ge=0,a?K(e+" not eligible for reset"):1;d.push(l)}for(h=d.length;h--;)(l=(u=d[h])._pt||u).s=!r&&0!==r||i?l.s+(r||0)+o*l.c:r,l.c=n-l.s,u.e&&(u.e=ft(n)+Kt(u.e)),u.b&&(u.b=l.s+Kt(u.b))}(this,t,e,n,r,this._ease(o/this._dur),o,i)?this.resetTo(t,e,n,r,1):(kt(this,0),this.parent||Mt(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(t,e){if(void 0===e&&(e="all"),!(t||e&&"all"!==e))return this._lazy=this._pt=0,this.parent?de(this):this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(t,e,Be&&!0!==Be.vars.overwrite)._first||de(this),this.parent&&n!==this.timeline.totalDuration()&&jt(this,this._dur*this.timeline._tDur/n,0,1),this}var r,i,o,s,a,l,u,c=this._targets,h=t?te(t):c,d=this._ptLookup,p=this._pt;if((!e||"all"===e)&&function(t,e){for(var n=t.length,r=n===e.length;r&&n--&&t[n]===e[n];);return n<0}(c,h))return"all"===e&&(this._pt=0),de(this);for(r=this._op=this._op||[],"all"!==e&&(C(e)&&(a={},pt(e,(function(t){return a[t]=1})),e=a),e=function(t,e){var n,r,i,o,s=t[0]?ht(t[0]).harness:0,a=s&&s.aliases;if(!a)return e;for(r in n=Et({},e),a)if(r in n)for(i=(o=a[r].split(",")).length;i--;)n[o[i]]=n[r];return n}(c,e)),u=c.length;u--;)if(~h.indexOf(c[u]))for(a in i=d[u],"all"===e?(r[u]=e,s=i,o={}):(o=r[u]=r[u]||{},s=e),s)(l=i&&i[a])&&("kill"in l.d&&!0!==l.d.kill(a)||Dt(this,l,"_pt"),delete i[a]),"all"!==o&&(o[a]=1);return this._initted&&!this._pt&&p&&de(this),this},e.to=function(t,n){return new e(t,n,arguments[2])},e.from=function(t,e){return Yt(1,arguments)},e.delayedCall=function(t,n,r,i){return new e(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:t,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},e.fromTo=function(t,e,n){return Yt(2,arguments)},e.set=function(t,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new e(t,n)},e.killTweensOf=function(t,e,n){return l.killTweensOf(t,e,n)},e}(ke);wt($e.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),pt("staggerTo,staggerFrom,staggerFromTo",(function(t){$e[t]=function(){var e=new Ue,n=Zt.call(arguments,0);return n.splice("staggerFromTo"===t?5:4,0,0),e[t].apply(e,n)}}));var Ke=function(t,e,n){return t[e]=n},Ze=function(t,e,n){return t[e](n)},Je=function(t,e,n,r){return t[e](r.fp,n)},Qe=function(t,e,n){return t.setAttribute(e,n)},tn=function(t,e){return R(t[e])?Ze:P(t[e])&&t.setAttribute?Qe:Ke},en=function(t,e){return e.set(e.t,e.p,Math.round(1e6*(e.s+e.c*t))/1e6,e)},nn=function(t,e){return e.set(e.t,e.p,!!(e.s+e.c*t),e)},rn=function(t,e){var n=e._pt,r="";if(!t&&e.b)r=e.b;else if(1===t&&e.e)r=e.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*t):Math.round(1e4*(n.s+n.c*t))/1e4)+r,n=n._next;r+=e.c}e.set(e.t,e.p,r,e)},on=function(t,e){for(var n=e._pt;n;)n.r(t,n.d),n=n._next},sn=function(t,e,n,r){for(var i,o=this._pt;o;)i=o._next,o.p===r&&o.modifier(t,e,n),o=i},an=function(t){for(var e,n,r=this._pt;r;)n=r._next,r.p===t&&!r.op||r.op===t?Dt(this,r,"_pt"):r.dep||(e=1),r=n;return!e},ln=function(t,e,n,r){r.mSet(t,e,r.m.call(r.tween,n,r.mt),r)},un=function(t){for(var e,n,r,i,o=t._pt;o;){for(e=o._next,n=r;n&&n.pr>o.pr;)n=n._next;(o._prev=n?n._prev:i)?o._prev._next=o:r=o,(o._next=n)?n._prev=o:i=o,o=e}t._pt=r},cn=function(){function t(t,e,n,r,i,o,s,a,l){this.t=e,this.s=r,this.c=i,this.p=n,this.r=o||en,this.d=s||this,this.set=a||Ke,this.pr=l||0,this._next=t,t&&(t._prev=this)}return t.prototype.modifier=function(t,e,n){this.mSet=this.mSet||this.set,this.set=ln,this.m=t,this.mt=n,this.tween=e},t}();pt(ut+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(t){return nt[t]=1})),W.TweenMax=W.TweenLite=$e,W.TimelineLite=W.TimelineMax=Ue,l=new Ue({sortChildren:!1,defaults:x,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),b.stringFilter=we;var hn=[],dn={},pn=[],fn=0,mn=0,gn=function(t){return(dn[t]||pn).map((function(t){return t()}))},vn=function(){var t=Date.now(),e=[];t-fn>2&&(gn("matchMediaInit"),hn.forEach((function(t){var n,r,i,o,s=t.queries,a=t.conditions;for(r in s)(n=u.matchMedia(s[r]).matches)&&(i=1),n!==a[r]&&(a[r]=n,o=1);o&&(t.revert(),i&&e.push(t))})),gn("matchMediaRevert"),e.forEach((function(t){return t.onMatch(t,(function(e){return t.add(null,e)}))})),fn=t,gn("matchMedia"))},yn=function(){function t(t,e){this.selector=e&&ee(e),this.data=[],this._r=[],this.isReverted=!1,this.id=mn++,t&&this.add(t)}var e=t.prototype;return e.add=function(t,e,n){R(t)&&(n=e,e=t,t=R);var r=this,i=function(){var t,i=a,o=r.selector;return i&&i!==r&&i.data.push(r),n&&(r.selector=ee(n)),a=r,t=e.apply(r,arguments),R(t)&&r._r.push(t),a=i,r.selector=o,r.isReverted=!1,t};return r.last=i,t===R?i(r,(function(t){return r.add(null,t)})):t?r[t]=i:i},e.ignore=function(t){var e=a;a=null,t(this),a=e},e.getTweens=function(){var e=[];return this.data.forEach((function(n){return n instanceof t?e.push.apply(e,n.getTweens()):n instanceof $e&&!(n.parent&&"nested"===n.parent.data)&&e.push(n)})),e},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(t,e){var n=this;if(t?function(){for(var e,r=n.getTweens(),i=n.data.length;i--;)"isFlip"===(e=n.data[i]).data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(t){return r.splice(r.indexOf(t),1)})));for(r.map((function(t){return{g:t._dur||t._delay||t._sat&&!t._sat.vars.immediateRender?t.globalTime(0):-1/0,t:t}})).sort((function(t,e){return e.g-t.g||-1/0})).forEach((function(e){return e.t.revert(t)})),i=n.data.length;i--;)(e=n.data[i])instanceof Ue?"nested"!==e.data&&(e.scrollTrigger&&e.scrollTrigger.revert(),e.kill()):!(e instanceof $e)&&e.revert&&e.revert(t);n._r.forEach((function(e){return e(t,n)})),n.isReverted=!0}():this.data.forEach((function(t){return t.kill&&t.kill()})),this.clear(),e)for(var r=hn.length;r--;)hn[r].id===this.id&&hn.splice(r,1)},e.revert=function(t){this.kill(t||{})},t}(),_n=function(){function t(t){this.contexts=[],this.scope=t}var e=t.prototype;return e.add=function(t,e,n){I(t)||(t={matches:t});var r,i,o,s=new yn(0,n||this.scope),l=s.conditions={};for(i in a&&!s.selector&&(s.selector=a.selector),this.contexts.push(s),e=s.add("onMatch",e),s.queries=t,t)"all"===i?o=1:(r=u.matchMedia(t[i]))&&(hn.indexOf(s)<0&&hn.push(s),(l[i]=r.matches)&&(o=1),r.addListener?r.addListener(vn):r.addEventListener("change",vn));return o&&e(s,(function(t){return s.add(null,t)})),this},e.revert=function(t){this.kill(t||{})},e.kill=function(t){this.contexts.forEach((function(e){return e.kill(t,!0)}))},t}(),bn={registerPlugin:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e.forEach((function(t){return fe(t)}))},timeline:function(t){return new Ue(t)},getTweensOf:function(t,e){return l.getTweensOf(t,e)},getProperty:function(t,e,n,r){C(t)&&(t=te(t)[0]);var i=ht(t||{}).get,o=n?xt:bt;return"native"===n&&(n=""),t?e?o((ot[e]&&ot[e].get||i)(t,e,n,r)):function(e,n,r){return o((ot[e]&&ot[e].get||i)(t,e,n,r))}:t},quickSetter:function(t,e,n){if((t=te(t)).length>1){var r=t.map((function(t){return En.quickSetter(t,e,n)})),i=r.length;return function(t){for(var e=i;e--;)r[e](t)}}t=t[0]||{};var o=ot[e],s=ht(t),a=s.harness&&(s.harness.aliases||{})[e]||e,l=o?function(e){var r=new o;f._pt=0,r.init(t,n?e+n:e,f,0,[t]),r.render(1,r),f._pt&&on(1,f)}:s.set(t,a);return o?l:function(e){return l(t,a,n?e+n:e,s,1)}},quickTo:function(t,e,n){var r,i=En.to(t,Et(((r={})[e]="+=0.1",r.paused=!0,r),n||{})),o=function(t,n,r){return i.resetTo(e,t,n,r)};return o.tween=i,o},isTweening:function(t){return l.getTweensOf(t,!0).length>0},defaults:function(t){return t&&t.ease&&(t.ease=Oe(t.ease,x.ease)),Tt(x,t||{})},config:function(t){return Tt(b,t||{})},registerEffect:function(t){var e=t.name,n=t.effect,r=t.plugins,i=t.defaults,o=t.extendTimeline;(r||"").split(",").forEach((function(t){return t&&!ot[t]&&!W[t]&&K(e+" effect requires "+t+" plugin.")})),st[e]=function(t,e,r){return n(te(t),wt(e||{},i),r)},o&&(Ue.prototype[e]=function(t,n,r){return this.add(st[e](t,I(n)?n:(r=n)&&{},this),r)})},registerEase:function(t,e){Se[t]=Oe(e)},parseEase:function(t,e){return arguments.length?Oe(t,e):Se},getById:function(t){return l.getById(t)},exportRoot:function(t,e){void 0===t&&(t={});var n,r,i=new Ue(t);for(i.smoothChildTiming=L(t.smoothChildTiming),l.remove(i),i._dp=0,i._time=i._tTime=l._time,n=l._first;n;)r=n._next,!e&&!n._dur&&n instanceof $e&&n.vars.onComplete===n._targets[0]||Bt(i,n,n._start-n._delay),n=r;return Bt(l,i,0),i},context:function(t,e){return t?new yn(t,e):a},matchMedia:function(t){return new _n(t)},matchMediaRefresh:function(){return hn.forEach((function(t){var e,n,r=t.conditions;for(n in r)r[n]&&(r[n]=!1,e=1);e&&t.revert()}))||vn()},addEventListener:function(t,e){var n=dn[t]||(dn[t]=[]);~n.indexOf(e)||n.push(e)},removeEventListener:function(t,e){var n=dn[t],r=n&&n.indexOf(e);r>=0&&n.splice(r,1)},utils:{wrap:function t(e,n,r){var i=n-e;return U(e)?ae(e,t(0,e.length),n):qt(r,(function(t){return(i+(t-e)%i)%i+e}))},wrapYoyo:function t(e,n,r){var i=n-e,o=2*i;return U(e)?ae(e,t(0,e.length-1),n):qt(r,(function(t){return e+((t=(o+(t-e)%o)%o||0)>i?o-t:t)}))},distribute:re,random:se,snap:oe,normalize:function(t,e,n){return ue(t,e,0,1,n)},getUnit:Kt,clamp:function(t,e,n){return qt(n,(function(n){return $t(t,e,n)}))},splitColor:ve,toArray:te,selector:ee,mapRange:ue,pipe:function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return e.reduce((function(t,e){return e(t)}),t)}},unitize:function(t,e){return function(n){return t(parseFloat(n))+(e||Kt(n))}},interpolate:function t(e,n,r,i){var o=isNaN(e+n)?0:function(t){return(1-t)*e+t*n};if(!o){var s,a,l,u,c,h=C(e),d={};if(!0===r&&(i=1)&&(r=null),h)e={p:e},n={p:n};else if(U(e)&&!U(n)){for(l=[],u=e.length,c=u-2,a=1;a<u;a++)l.push(t(e[a-1],e[a]));u--,o=function(t){t*=u;var e=Math.min(c,~~t);return l[e](t-e)},r=n}else i||(e=Et(U(e)?[]:{},e));if(!l){for(s in n)He.call(d,e,s,"get",n[s]);o=function(t){return on(t,d)||(h?e.p:e)}}}return qt(r,o)},shuffle:ne},install:q,effects:st,ticker:Ee,updateRoot:Ue.updateRoot,plugins:ot,globalTimeline:l,core:{PropTween:cn,globals:Z,Tween:$e,Timeline:Ue,Animation:ke,getCache:ht,_removeLinkedListItem:Dt,reverting:function(){return s},context:function(t){return t&&a&&(a.data.push(t),t._ctx=a),a},suppressOverwrites:function(t){return o=t}}};pt("to,from,fromTo,delayedCall,set,killTweensOf",(function(t){return bn[t]=$e[t]})),Ee.add(Ue.updateRoot),f=bn.to({},{duration:0});var xn=function(t,e){for(var n=t._pt;n&&n.p!==e&&n.op!==e&&n.fp!==e;)n=n._next;return n},wn=function(t,e){return{name:t,rawVars:1,init:function(t,n,r){r._onInit=function(t){var r,i;if(C(n)&&(r={},pt(n,(function(t){return r[t]=1})),n=r),e){for(i in r={},n)r[i]=e(n[i]);n=r}!function(t,e){var n,r,i,o=t._targets;for(n in e)for(r=o.length;r--;)(i=t._ptLookup[r][n])&&(i=i.d)&&(i._pt&&(i=xn(i,n)),i&&i.modifier&&i.modifier(e[n],t,o[r],n))}(t,n)}}}},En=bn.registerPlugin({name:"attr",init:function(t,e,n,r,i){var o,s,a;for(o in this.tween=n,e)a=t.getAttribute(o)||"",(s=this.add(t,"setAttribute",(a||0)+"",e[o],r,i,0,0,o)).op=o,s.b=a,this._props.push(o)},render:function(t,e){for(var n=e._pt;n;)s?n.set(n.t,n.p,n.b,n):n.r(t,n.d),n=n._next}},{name:"endArray",init:function(t,e){for(var n=e.length;n--;)this.add(t,n,t[n]||0,e[n],0,0,0,0,0,1)}},wn("roundProps",ie),wn("modifiers"),wn("snap",oe))||bn;$e.version=Ue.version=En.version="3.12.3",d=1,N()&&Te();Se.Power0,Se.Power1,Se.Power2,Se.Power3,Se.Power4,Se.Linear,Se.Quad,Se.Cubic,Se.Quart,Se.Quint,Se.Strong,Se.Elastic,Se.Back,Se.SteppedEase,Se.Bounce,Se.Sine,Se.Expo,Se.Circ;var Tn,Sn,An,Mn,Dn,Cn,Rn,On,Pn={},In=180/Math.PI,Ln=Math.PI/180,Nn=Math.atan2,Fn=/([A-Z])/g,kn=/(left|right|width|margin|padding|x)/i,Un=/[\s,\(]\S/,Bn={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},Gn=function(t,e){return e.set(e.t,e.p,Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},zn=function(t,e){return e.set(e.t,e.p,1===t?e.e:Math.round(1e4*(e.s+e.c*t))/1e4+e.u,e)},Hn=function(t,e){return e.set(e.t,e.p,t?Math.round(1e4*(e.s+e.c*t))/1e4+e.u:e.b,e)},jn=function(t,e){var n=e.s+e.c*t;e.set(e.t,e.p,~~(n+(n<0?-.5:.5))+e.u,e)},Vn=function(t,e){return e.set(e.t,e.p,t?e.e:e.b,e)},Xn=function(t,e){return e.set(e.t,e.p,1!==t?e.b:e.e,e)},Wn=function(t,e,n){return t.style[e]=n},Yn=function(t,e,n){return t.style.setProperty(e,n)},qn=function(t,e,n){return t._gsap[e]=n},$n=function(t,e,n){return t._gsap.scaleX=t._gsap.scaleY=n},Kn=function(t,e,n,r,i){var o=t._gsap;o.scaleX=o.scaleY=n,o.renderTransform(i,o)},Zn=function(t,e,n,r,i){var o=t._gsap;o[e]=n,o.renderTransform(i,o)},Jn="transform",Qn=Jn+"Origin",tr=function t(e,n){var r=this,i=this.target,o=i.style,s=i._gsap;if(e in Pn&&o){if(this.tfm=this.tfm||{},"transform"===e)return Bn.transform.split(",").forEach((function(e){return t.call(r,e,n)}));if(~(e=Bn[e]||e).indexOf(",")?e.split(",").forEach((function(t){return r.tfm[t]=yr(i,t)})):this.tfm[e]=s.x?s[e]:yr(i,e),e===Qn&&(this.tfm.zOrigin=s.zOrigin),this.props.indexOf(Jn)>=0)return;s.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Qn,n,"")),e=Jn}(o||n)&&this.props.push(e,n,o[e])},er=function(t){t.translate&&(t.removeProperty("translate"),t.removeProperty("scale"),t.removeProperty("rotate"))},nr=function(){var t,e,n=this.props,r=this.target,i=r.style,o=r._gsap;for(t=0;t<n.length;t+=3)n[t+1]?r[n[t]]=n[t+2]:n[t+2]?i[n[t]]=n[t+2]:i.removeProperty("--"===n[t].substr(0,2)?n[t]:n[t].replace(Fn,"-$1").toLowerCase());if(this.tfm){for(e in this.tfm)o[e]=this.tfm[e];o.svg&&(o.renderTransform(),r.setAttribute("data-svg-origin",this.svgo||"")),(t=Rn())&&t.isStart||i[Jn]||(er(i),o.zOrigin&&i[Qn]&&(i[Qn]+=" "+o.zOrigin+"px",o.zOrigin=0,o.renderTransform()),o.uncache=1)}},rr=function(t,e){var n={target:t,props:[],revert:nr,save:tr};return t._gsap||En.core.getCache(t),e&&e.split(",").forEach((function(t){return n.save(t)})),n},ir=function(t,e){var n=Sn.createElementNS?Sn.createElementNS((e||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),t):Sn.createElement(t);return n&&n.style?n:Sn.createElement(t)},or=function t(e,n,r){var i=getComputedStyle(e);return i[n]||i.getPropertyValue(n.replace(Fn,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&t(e,ar(n)||n,1)||""},sr="O,Moz,ms,Ms,Webkit".split(","),ar=function(t,e,n){var r=(e||Dn).style,i=5;if(t in r&&!n)return t;for(t=t.charAt(0).toUpperCase()+t.substr(1);i--&&!(sr[i]+t in r););return i<0?null:(3===i?"ms":i>=0?sr[i]:"")+t},lr=function(){"undefined"!=typeof window&&window.document&&(Tn=window,Sn=Tn.document,An=Sn.documentElement,Dn=ir("div")||{style:{}},ir("div"),Jn=ar(Jn),Qn=Jn+"Origin",Dn.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",On=!!ar("perspective"),Rn=En.core.reverting,Mn=1)},ur=function t(e){var n,r=ir("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,s=this.style.cssText;if(An.appendChild(r),r.appendChild(this),this.style.display="block",e)try{n=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=t}catch(t){}else this._gsapBBox&&(n=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),An.removeChild(r),this.style.cssText=s,n},cr=function(t,e){for(var n=e.length;n--;)if(t.hasAttribute(e[n]))return t.getAttribute(e[n])},hr=function(t){var e;try{e=t.getBBox()}catch(n){e=ur.call(t,!0)}return e&&(e.width||e.height)||t.getBBox===ur||(e=ur.call(t,!0)),!e||e.width||e.x||e.y?e:{x:+cr(t,["x","cx","x1"])||0,y:+cr(t,["y","cy","y1"])||0,width:0,height:0}},dr=function(t){return!(!t.getCTM||t.parentNode&&!t.ownerSVGElement||!hr(t))},pr=function(t,e){if(e){var n,r=t.style;e in Pn&&e!==Qn&&(e=Jn),r.removeProperty?("ms"!==(n=e.substr(0,2))&&"webkit"!==e.substr(0,6)||(e="-"+e),r.removeProperty("--"===n?e:e.replace(Fn,"-$1").toLowerCase())):r.removeAttribute(e)}},fr=function(t,e,n,r,i,o){var s=new cn(t._pt,e,n,0,1,o?Xn:Vn);return t._pt=s,s.b=r,s.e=i,t._props.push(n),s},mr={deg:1,rad:1,turn:1},gr={grid:1,flex:1},vr=function t(e,n,r,i){var o,s,a,l,u=parseFloat(r)||0,c=(r+"").trim().substr((u+"").length)||"px",h=Dn.style,d=kn.test(n),p="svg"===e.tagName.toLowerCase(),f=(p?"client":"offset")+(d?"Width":"Height"),m="px"===i,g="%"===i;if(i===c||!u||mr[i]||mr[c])return u;if("px"!==c&&!m&&(u=t(e,n,r,"px")),l=e.getCTM&&dr(e),(g||"%"===c)&&(Pn[n]||~n.indexOf("adius")))return o=l?e.getBBox()[d?"width":"height"]:e[f],ft(g?u/o*100:u/100*o);if(h[d?"width":"height"]=100+(m?c:i),s=~n.indexOf("adius")||"em"===i&&e.appendChild&&!p?e:e.parentNode,l&&(s=(e.ownerSVGElement||{}).parentNode),s&&s!==Sn&&s.appendChild||(s=Sn.body),(a=s._gsap)&&g&&a.width&&d&&a.time===Ee.time&&!a.uncache)return ft(u/a.width*100);if(!g||"height"!==n&&"width"!==n)(g||"%"===c)&&!gr[or(s,"display")]&&(h.position=or(e,"position")),s===e&&(h.position="static"),s.appendChild(Dn),o=Dn[f],s.removeChild(Dn),h.position="absolute";else{var v=e.style[n];e.style[n]=100+i,o=e[f],v?e.style[n]=v:pr(e,n)}return d&&g&&((a=ht(s)).time=Ee.time,a.width=s[f]),ft(m?o*u/100:o&&u?100/o*u:0)},yr=function(t,e,n,r){var i;return Mn||lr(),e in Bn&&"transform"!==e&&~(e=Bn[e]).indexOf(",")&&(e=e.split(",")[0]),Pn[e]&&"transform"!==e?(i=Cr(t,r),i="transformOrigin"!==e?i[e]:i.svg?i.origin:Rr(or(t,Qn))+" "+i.zOrigin+"px"):(!(i=t.style[e])||"auto"===i||r||~(i+"").indexOf("calc("))&&(i=wr[e]&&wr[e](t,e,n)||or(t,e)||dt(t,e)||("opacity"===e?1:0)),n&&!~(i+"").trim().indexOf(" ")?vr(t,e,i,n)+n:i},_r=function(t,e,n,r){if(!n||"none"===n){var i=ar(e,t,1),o=i&&or(t,i,1);o&&o!==n?(e=i,n=o):"borderColor"===e&&(n=or(t,"borderTopColor"))}var s,a,l,u,c,h,d,p,f,m,g,v=new cn(this._pt,t.style,e,0,1,rn),y=0,_=0;if(v.b=n,v.e=r,n+="","auto"===(r+="")&&(h=t.style[e],t.style[e]=r,r=or(t,e)||r,h?t.style[e]=h:pr(t,e)),we(s=[n,r]),r=s[1],l=(n=s[0]).match(z)||[],(r.match(z)||[]).length){for(;a=z.exec(r);)d=a[0],f=r.substring(y,a.index),c?c=(c+1)%5:"rgba("!==f.substr(-5)&&"hsla("!==f.substr(-5)||(c=1),d!==(h=l[_++]||"")&&(u=parseFloat(h)||0,g=h.substr((u+"").length),"="===d.charAt(1)&&(d=gt(u,d)+g),p=parseFloat(d),m=d.substr((p+"").length),y=z.lastIndex-m.length,m||(m=m||b.units[e]||g,y===r.length&&(r+=m,v.e+=m)),g!==m&&(u=vr(t,e,h,m)||0),v._pt={_next:v._pt,p:f||1===_?f:",",s:u,c:p-u,m:c&&c<4||"zIndex"===e?Math.round:0});v.c=y<r.length?r.substring(y,r.length):""}else v.r="display"===e&&"none"===r?Xn:Vn;return j.test(r)&&(v.e=0),this._pt=v,v},br={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},xr=function(t,e){if(e.tween&&e.tween._time===e.tween._dur){var n,r,i,o=e.t,s=o.style,a=e.u,l=o._gsap;if("all"===a||!0===a)s.cssText="",r=1;else for(i=(a=a.split(",")).length;--i>-1;)n=a[i],Pn[n]&&(r=1,n="transformOrigin"===n?Qn:Jn),pr(o,n);r&&(pr(o,Jn),l&&(l.svg&&o.removeAttribute("transform"),Cr(o,1),l.uncache=1,er(s)))}},wr={clearProps:function(t,e,n,r,i){if("isFromStart"!==i.data){var o=t._pt=new cn(t._pt,e,n,0,0,xr);return o.u=r,o.pr=-10,o.tween=i,t._props.push(n),1}}},Er=[1,0,0,1,0,0],Tr={},Sr=function(t){return"matrix(1, 0, 0, 1, 0, 0)"===t||"none"===t||!t},Ar=function(t){var e=or(t,Jn);return Sr(e)?Er:e.substr(7).match(G).map(ft)},Mr=function(t,e){var n,r,i,o,s=t._gsap||ht(t),a=t.style,l=Ar(t);return s.svg&&t.getAttribute("transform")?"1,0,0,1,0,0"===(l=[(i=t.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?Er:l:(l!==Er||t.offsetParent||t===An||s.svg||(i=a.display,a.display="block",(n=t.parentNode)&&t.offsetParent||(o=1,r=t.nextElementSibling,An.appendChild(t)),l=Ar(t),i?a.display=i:pr(t,"display"),o&&(r?n.insertBefore(t,r):n?n.appendChild(t):An.removeChild(t))),e&&l.length>6?[l[0],l[1],l[4],l[5],l[12],l[13]]:l)},Dr=function(t,e,n,r,i,o){var s,a,l,u=t._gsap,c=i||Mr(t,!0),h=u.xOrigin||0,d=u.yOrigin||0,p=u.xOffset||0,f=u.yOffset||0,m=c[0],g=c[1],v=c[2],y=c[3],_=c[4],b=c[5],x=e.split(" "),w=parseFloat(x[0])||0,E=parseFloat(x[1])||0;n?c!==Er&&(a=m*y-g*v)&&(l=w*(-g/a)+E*(m/a)-(m*b-g*_)/a,w=w*(y/a)+E*(-v/a)+(v*b-y*_)/a,E=l):(w=(s=hr(t)).x+(~x[0].indexOf("%")?w/100*s.width:w),E=s.y+(~(x[1]||x[0]).indexOf("%")?E/100*s.height:E),"xOrigin"in u||!w&&!E||(w-=s.x,E-=s.y)),r||!1!==r&&u.smooth?(_=w-h,b=E-d,u.xOffset=p+(_*m+b*v)-_,u.yOffset=f+(_*g+b*y)-b):u.xOffset=u.yOffset=0,u.xOrigin=w,u.yOrigin=E,u.smooth=!!r,u.origin=e,u.originIsAbsolute=!!n,t.style[Qn]="0px 0px",o&&(fr(o,u,"xOrigin",h,w),fr(o,u,"yOrigin",d,E),fr(o,u,"xOffset",p,u.xOffset),fr(o,u,"yOffset",f,u.yOffset)),t.setAttribute("data-svg-origin",w+" "+E)},Cr=function(t,e){var n=t._gsap||new Fe(t);if("x"in n&&!e&&!n.uncache)return n;var r,i,o,s,a,l,u,c,h,d,p,f,m,g,v,y,_,x,w,E,T,S,A,M,D,C,R,O,P,I,L,N,F=t.style,k=n.scaleX<0,U=getComputedStyle(t),B=or(t,Qn)||"0";return r=i=o=l=u=c=h=d=p=0,s=a=1,n.svg=!(!t.getCTM||!dr(t)),U.translate&&("none"===U.translate&&"none"===U.scale&&"none"===U.rotate||(F[Jn]=("none"!==U.translate?"translate3d("+(U.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==U.rotate?"rotate("+U.rotate+") ":"")+("none"!==U.scale?"scale("+U.scale.split(" ").join(",")+") ":"")+("none"!==U[Jn]?U[Jn]:"")),F.scale=F.rotate=F.translate="none"),g=Mr(t,n.svg),n.svg&&(n.uncache?(D=t.getBBox(),B=n.xOrigin-D.x+"px "+(n.yOrigin-D.y)+"px",M=""):M=!e&&t.getAttribute("data-svg-origin"),Dr(t,M||B,!!M||n.originIsAbsolute,!1!==n.smooth,g)),f=n.xOrigin||0,m=n.yOrigin||0,g!==Er&&(x=g[0],w=g[1],E=g[2],T=g[3],r=S=g[4],i=A=g[5],6===g.length?(s=Math.sqrt(x*x+w*w),a=Math.sqrt(T*T+E*E),l=x||w?Nn(w,x)*In:0,(h=E||T?Nn(E,T)*In+l:0)&&(a*=Math.abs(Math.cos(h*Ln))),n.svg&&(r-=f-(f*x+m*E),i-=m-(f*w+m*T))):(N=g[6],I=g[7],R=g[8],O=g[9],P=g[10],L=g[11],r=g[12],i=g[13],o=g[14],u=(v=Nn(N,P))*In,v&&(M=S*(y=Math.cos(-v))+R*(_=Math.sin(-v)),D=A*y+O*_,C=N*y+P*_,R=S*-_+R*y,O=A*-_+O*y,P=N*-_+P*y,L=I*-_+L*y,S=M,A=D,N=C),c=(v=Nn(-E,P))*In,v&&(y=Math.cos(-v),L=T*(_=Math.sin(-v))+L*y,x=M=x*y-R*_,w=D=w*y-O*_,E=C=E*y-P*_),l=(v=Nn(w,x))*In,v&&(M=x*(y=Math.cos(v))+w*(_=Math.sin(v)),D=S*y+A*_,w=w*y-x*_,A=A*y-S*_,x=M,S=D),u&&Math.abs(u)+Math.abs(l)>359.9&&(u=l=0,c=180-c),s=ft(Math.sqrt(x*x+w*w+E*E)),a=ft(Math.sqrt(A*A+N*N)),v=Nn(S,A),h=Math.abs(v)>2e-4?v*In:0,p=L?1/(L<0?-L:L):0),n.svg&&(M=t.getAttribute("transform"),n.forceCSS=t.setAttribute("transform","")||!Sr(or(t,Jn)),M&&t.setAttribute("transform",M))),Math.abs(h)>90&&Math.abs(h)<270&&(k?(s*=-1,h+=l<=0?180:-180,l+=l<=0?180:-180):(a*=-1,h+=h<=0?180:-180)),e=e||n.uncache,n.x=r-((n.xPercent=r&&(!e&&n.xPercent||(Math.round(t.offsetWidth/2)===Math.round(-r)?-50:0)))?t.offsetWidth*n.xPercent/100:0)+"px",n.y=i-((n.yPercent=i&&(!e&&n.yPercent||(Math.round(t.offsetHeight/2)===Math.round(-i)?-50:0)))?t.offsetHeight*n.yPercent/100:0)+"px",n.z=o+"px",n.scaleX=ft(s),n.scaleY=ft(a),n.rotation=ft(l)+"deg",n.rotationX=ft(u)+"deg",n.rotationY=ft(c)+"deg",n.skewX=h+"deg",n.skewY=d+"deg",n.transformPerspective=p+"px",(n.zOrigin=parseFloat(B.split(" ")[2])||!e&&n.zOrigin||0)&&(F[Qn]=Rr(B)),n.svg||(n.xOffset=n.yOffset=0),n.force3D=b.force3D,n.renderTransform=n.svg?Lr:On?Ir:Pr,n.uncache=0,n},Rr=function(t){return(t=t.split(" "))[0]+" "+t[1]},Or=function(t,e,n){var r=Kt(e);return ft(parseFloat(e)+parseFloat(vr(t,"x",n+"px",r)))+r},Pr=function(t,e){e.z="0px",e.rotationY=e.rotationX="0deg",e.force3D=0,Ir(t,e)},Ir=function(t,e){var n=e||this,r=n.xPercent,i=n.yPercent,o=n.x,s=n.y,a=n.z,l=n.rotation,u=n.rotationY,c=n.rotationX,h=n.skewX,d=n.skewY,p=n.scaleX,f=n.scaleY,m=n.transformPerspective,g=n.force3D,v=n.target,y=n.zOrigin,_="",b="auto"===g&&t&&1!==t||!0===g;if(y&&("0deg"!==c||"0deg"!==u)){var x,w=parseFloat(u)*Ln,E=Math.sin(w),T=Math.cos(w);w=parseFloat(c)*Ln,x=Math.cos(w),o=Or(v,o,E*x*-y),s=Or(v,s,-Math.sin(w)*-y),a=Or(v,a,T*x*-y+y)}"0px"!==m&&(_+="perspective("+m+") "),(r||i)&&(_+="translate("+r+"%, "+i+"%) "),(b||"0px"!==o||"0px"!==s||"0px"!==a)&&(_+="0px"!==a||b?"translate3d("+o+", "+s+", "+a+") ":"translate("+o+", "+s+") "),"0deg"!==l&&(_+="rotate("+l+") "),"0deg"!==u&&(_+="rotateY("+u+") "),"0deg"!==c&&(_+="rotateX("+c+") "),"0deg"===h&&"0deg"===d||(_+="skew("+h+", "+d+") "),1===p&&1===f||(_+="scale("+p+", "+f+") "),v.style[Jn]=_||"translate(0, 0)"},Lr=function(t,e){var n,r,i,o,s,a=e||this,l=a.xPercent,u=a.yPercent,c=a.x,h=a.y,d=a.rotation,p=a.skewX,f=a.skewY,m=a.scaleX,g=a.scaleY,v=a.target,y=a.xOrigin,_=a.yOrigin,b=a.xOffset,x=a.yOffset,w=a.forceCSS,E=parseFloat(c),T=parseFloat(h);d=parseFloat(d),p=parseFloat(p),(f=parseFloat(f))&&(p+=f=parseFloat(f),d+=f),d||p?(d*=Ln,p*=Ln,n=Math.cos(d)*m,r=Math.sin(d)*m,i=Math.sin(d-p)*-g,o=Math.cos(d-p)*g,p&&(f*=Ln,s=Math.tan(p-f),i*=s=Math.sqrt(1+s*s),o*=s,f&&(s=Math.tan(f),n*=s=Math.sqrt(1+s*s),r*=s)),n=ft(n),r=ft(r),i=ft(i),o=ft(o)):(n=m,o=g,r=i=0),(E&&!~(c+"").indexOf("px")||T&&!~(h+"").indexOf("px"))&&(E=vr(v,"x",c,"px"),T=vr(v,"y",h,"px")),(y||_||b||x)&&(E=ft(E+y-(y*n+_*i)+b),T=ft(T+_-(y*r+_*o)+x)),(l||u)&&(s=v.getBBox(),E=ft(E+l/100*s.width),T=ft(T+u/100*s.height)),s="matrix("+n+","+r+","+i+","+o+","+E+","+T+")",v.setAttribute("transform",s),w&&(v.style[Jn]=s)},Nr=function(t,e,n,r,i){var o,s,a=C(i),l=parseFloat(i)*(a&&~i.indexOf("rad")?In:1)-r,u=r+l+"deg";return a&&("short"===(o=i.split("_")[1])&&(l%=360)!==l%180&&(l+=l<0?360:-360),"cw"===o&&l<0?l=(l+36e9)%360-360*~~(l/360):"ccw"===o&&l>0&&(l=(l-36e9)%360-360*~~(l/360))),t._pt=s=new cn(t._pt,e,n,r,l,zn),s.e=u,s.u="deg",t._props.push(n),s},Fr=function(t,e){for(var n in e)t[n]=e[n];return t},kr=function(t,e,n){var r,i,o,s,a,l,u,c=Fr({},n._gsap),h=n.style;for(i in c.svg?(o=n.getAttribute("transform"),n.setAttribute("transform",""),h[Jn]=e,r=Cr(n,1),pr(n,Jn),n.setAttribute("transform",o)):(o=getComputedStyle(n)[Jn],h[Jn]=e,r=Cr(n,1),h[Jn]=o),Pn)(o=c[i])!==(s=r[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(a=Kt(o)!==(u=Kt(s))?vr(n,i,o,u):parseFloat(o),l=parseFloat(s),t._pt=new cn(t._pt,r,i,a,l-a,Gn),t._pt.u=u||0,t._props.push(i));Fr(r,c)};pt("padding,margin,Width,Radius",(function(t,e){var n="Top",r="Right",i="Bottom",o="Left",s=(e<3?[n,r,i,o]:[n+o,n+r,i+r,i+o]).map((function(n){return e<2?t+n:"border"+n+t}));wr[e>1?"border"+t:t]=function(t,e,n,r,i){var o,a;if(arguments.length<4)return o=s.map((function(e){return yr(t,e,n)})),5===(a=o.join(" ")).split(o[0]).length?o[0]:a;o=(r+"").split(" "),a={},s.forEach((function(t,e){return a[t]=o[e]=o[e]||o[(e-1)/2|0]})),t.init(e,a,i)}}));var Ur,Br,Gr={name:"css",register:lr,targetTest:function(t){return t.style&&t.nodeType},init:function(t,e,n,r,i){var o,s,a,l,u,c,h,d,p,f,m,g,v,y,_,x,w,E,T,S,A=this._props,M=t.style,D=n.vars.startAt;for(h in Mn||lr(),this.styles=this.styles||rr(t),x=this.styles.props,this.tween=n,e)if("autoRound"!==h&&(s=e[h],!ot[h]||!je(h,e,n,r,t,i)))if(u=typeof s,c=wr[h],"function"===u&&(u=typeof(s=s.call(n,r,t,i))),"string"===u&&~s.indexOf("random(")&&(s=le(s)),c)c(this,t,h,s,n)&&(_=1);else if("--"===h.substr(0,2))o=(getComputedStyle(t).getPropertyValue(h)+"").trim(),s+="",be.lastIndex=0,be.test(o)||(d=Kt(o),p=Kt(s)),p?d!==p&&(o=vr(t,h,o,p)+p):d&&(s+=d),this.add(M,"setProperty",o,s,r,i,0,0,h),A.push(h),x.push(h,0,M[h]);else if("undefined"!==u){if(D&&h in D?(o="function"==typeof D[h]?D[h].call(n,r,t,i):D[h],C(o)&&~o.indexOf("random(")&&(o=le(o)),Kt(o+"")||"auto"===o||(o+=b.units[h]||Kt(yr(t,h))||""),"="===(o+"").charAt(1)&&(o=yr(t,h))):o=yr(t,h),l=parseFloat(o),(f="string"===u&&"="===s.charAt(1)&&s.substr(0,2))&&(s=s.substr(2)),a=parseFloat(s),h in Bn&&("autoAlpha"===h&&(1===l&&"hidden"===yr(t,"visibility")&&a&&(l=0),x.push("visibility",0,M.visibility),fr(this,M,"visibility",l?"inherit":"hidden",a?"inherit":"hidden",!a)),"scale"!==h&&"transform"!==h&&~(h=Bn[h]).indexOf(",")&&(h=h.split(",")[0])),m=h in Pn)if(this.styles.save(h),g||((v=t._gsap).renderTransform&&!e.parseTransform||Cr(t,e.parseTransform),y=!1!==e.smoothOrigin&&v.smooth,(g=this._pt=new cn(this._pt,M,Jn,0,1,v.renderTransform,v,0,-1)).dep=1),"scale"===h)this._pt=new cn(this._pt,v,"scaleY",v.scaleY,(f?gt(v.scaleY,f+a):a)-v.scaleY||0,Gn),this._pt.u=0,A.push("scaleY",h),h+="X";else{if("transformOrigin"===h){x.push(Qn,0,M[Qn]),E=void 0,T=void 0,S=void 0,E=(w=s).split(" "),T=E[0],S=E[1]||"50%","top"!==T&&"bottom"!==T&&"left"!==S&&"right"!==S||(w=T,T=S,S=w),E[0]=br[T]||T,E[1]=br[S]||S,s=E.join(" "),v.svg?Dr(t,s,0,y,0,this):((p=parseFloat(s.split(" ")[2])||0)!==v.zOrigin&&fr(this,v,"zOrigin",v.zOrigin,p),fr(this,M,h,Rr(o),Rr(s)));continue}if("svgOrigin"===h){Dr(t,s,1,y,0,this);continue}if(h in Tr){Nr(this,v,h,l,f?gt(l,f+s):s);continue}if("smoothOrigin"===h){fr(this,v,"smooth",v.smooth,s);continue}if("force3D"===h){v[h]=s;continue}if("transform"===h){kr(this,s,t);continue}}else h in M||(h=ar(h)||h);if(m||(a||0===a)&&(l||0===l)&&!Un.test(s)&&h in M)a||(a=0),(d=(o+"").substr((l+"").length))!==(p=Kt(s)||(h in b.units?b.units[h]:d))&&(l=vr(t,h,o,p)),this._pt=new cn(this._pt,m?v:M,h,l,(f?gt(l,f+a):a)-l,m||"px"!==p&&"zIndex"!==h||!1===e.autoRound?Gn:jn),this._pt.u=p||0,d!==p&&"%"!==p&&(this._pt.b=o,this._pt.r=Hn);else if(h in M)_r.call(this,t,h,o,f?f+s:s);else if(h in t)this.add(t,h,o||t[h],f?f+s:s,r,i);else if("parseTransform"!==h){$(h,s);continue}m||(h in M?x.push(h,0,M[h]):x.push(h,1,o||t[h])),A.push(h)}_&&un(this)},render:function(t,e){if(e.tween._time||!Rn())for(var n=e._pt;n;)n.r(t,n.d),n=n._next;else e.styles.revert()},get:yr,aliases:Bn,getSetter:function(t,e,n){var r=Bn[e];return r&&r.indexOf(",")<0&&(e=r),e in Pn&&e!==Qn&&(t._gsap.x||yr(t,"x"))?n&&Cn===n?"scale"===e?$n:qn:(Cn=n||{})&&("scale"===e?Kn:Zn):t.style&&!P(t.style[e])?Wn:~e.indexOf("-")?Yn:tn(t,e)},core:{_removeProperty:pr,_getMatrix:Mr}};En.utils.checkPrefix=ar,En.core.getStyleSaver=rr,Br=pt("x,y,z,scale,scaleX,scaleY,xPercent,yPercent,"+(Ur="rotation,rotationX,rotationY,skewX,skewY")+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(t){Pn[t]=1})),pt(Ur,(function(t){b.units[t]="deg",Tr[t]=1})),Bn[Br[13]]="x,y,z,scale,scaleX,scaleY,xPercent,yPercent,"+Ur,pt("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(t){var e=t.split(":");Bn[e[1]]=Br[e[0]]})),pt("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(t){b.units[t]="px"})),En.registerPlugin(Gr);var zr=En.registerPlugin(Gr)||En;zr.core.Tween}});
//# sourceMappingURL=app.js.map