Files
OfficialSite/www/assets/scripts/app.js

14 lines
67 KiB
JavaScript
Raw Normal View History

(()=>{var Jt=Object.create;var U=Object.defineProperty;var Qt=Object.getOwnPropertyDescriptor;var te=Object.getOwnPropertyNames,dt=Object.getOwnPropertySymbols,ee=Object.getPrototypeOf,mt=Object.prototype.hasOwnProperty,ie=Object.prototype.propertyIsEnumerable;var vt=(s,n,t)=>n in s?U(s,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[n]=t,pt=(s,n)=>{for(var t in n||(n={}))mt.call(n,t)&&vt(s,t,n[t]);if(dt)for(var t of dt(n))ie.call(n,t)&&vt(s,t,n[t]);return s};var ne=(s,n)=>()=>(n||s((n={exports:{}}).exports,n),n.exports),se=(s,n)=>{for(var t in n)U(s,t,{get:n[t],enumerable:!0})},re=(s,n,t,i)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of te(n))!mt.call(s,e)&&e!==t&&U(s,e,{get:()=>n[e],enumerable:!(i=Qt(n,e))||i.enumerable});return s};var oe=(s,n,t)=>(t=s!=null?Jt(ee(s)):{},re(n||!s||!s.__esModule?U(t,"default",{value:s,enumerable:!0}):t,s));var yt=(s,n,t)=>new Promise((i,e)=>{var r=l=>{try{a(t.next(l))}catch(c){e(c)}},o=l=>{try{a(t.throw(l))}catch(c){e(c)}},a=l=>l.done?i(l.value):Promise.resolve(l.value).then(r,o);a((t=t.apply(s,n)).next())});var Ft=ne((qt,Z)=>{(function(s,n){typeof define=="function"&&define.amd?define([],function(){return s.svg4everybody=n()}):typeof Z=="object"&&Z.exports?Z.exports=n():s.svg4everybody=n()})(qt,function(){function s(e,r,o){if(o){var a=document.createDocumentFragment(),l=!r.hasAttribute("viewBox")&&o.getAttribute("viewBox");l&&r.setAttribute("viewBox",l);for(var c=o.cloneNode(!0);c.childNodes.length;)a.appendChild(c.firstChild);e.appendChild(a)}}function n(e){e.onreadystatechange=function(){if(e.readyState===4){var r=e._cachedDocument;r||(r=e._cachedDocument=document.implementation.createHTMLDocument(""),r.body.innerHTML=e.responseText,e._cachedTarget={}),e._embeds.splice(0).map(function(o){var a=e._cachedTarget[o.id];a||(a=e._cachedTarget[o.id]=r.getElementById(o.id)),s(o.parent,o.svg,a)})}},e.onreadystatechange()}function t(e){function r(){for(var A=0;A<C.length;){var k=C[A],w=k.parentNode,d=i(w),m=k.getAttribute("xlink:href")||k.getAttribute("href");if(!m&&a.attributeName&&(m=k.getAttribute(a.attributeName)),d&&m){if(o)if(!a.validate||a.validate(m,d,k)){w.removeChild(k);var b=m.split("#"),y=b.shift(),T=b.join("#");if(y.length){var g=h[y];g||(g=h[y]=new XMLHttpRequest,g.open("GET",y),g.send(),g._embeds=[]),g._embeds.push({parent:w,svg:d,id:T}),n(g)}else s(w,d,document.getElementById(T))}else++A,++L}else++A}(!C.length||C.length-L>0)&&p(r,67)}var o,a=Object(e),l=/\bTrident\/[567]\b|\bMSIE (?:9|10)\.0\b/,c=/\bAppleWebKit\/(\d+)\b/,f=/\bEdge\/12\.(\d+)\b/,u=/\bEdge\/.(\d+)\b/,v=window.top!==window.self;o="polyfill"in a?a.polyfill:l.test(navigator.userAgent)||(navigator.userAgent.match(f)||[])[1]<10547||(navigator.userAgent.match(c)||[])[1]<537||u.test(navigator.userAgent)&&v;var h={},p=window.requestAnimationFrame||setTimeout,C=document.getElementsByTagName("use"),L=0;o&&r()}function i(e){for(var r=e;r.nodeName.toLowerCase()!=="svg"&&(r=r.parentNode););return r}return t})});function q(s){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?q=function(n){return typeof n}:q=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},q(s)}function wt(s,n){if(!(s instanceof n))throw new TypeError("Cannot call a class as a function")}function gt(s,n){for(var t=0;t<n.length;t++){var i=n[t];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(s,i.key,i)}}function St(s,n,t){return n&&gt(s.prototype,n),t&&gt(s,t),s}function bt(s,n,t){return n in s?Object.defineProperty(s,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):s[n]=t,s}function V(s,n){return ce(s)||ue(s,n)||Et(s,n)||de()}function ae(s){return le(s)||he(s)||Et(s)||fe()}function le(s){if(Array.isArray(s))return tt(s)}function ce(s){if(Array.isArray(s))return s}function he(s){if(typeof Symbol!="undefined"&&Symbol.iterator in Object(s))return Array.from(s)}function ue(s,n){if(!(typeof Symbol=="undefined"||!(Symbol.iterator in Object(s)))){var t=[],i=!0,e=!1,r=void 0;try{for(var o=s[Symbol.iterator](),
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function de(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var F=function(){function s(n){wt(this,s),this.mAttr="data-"+n.dataName,this.mCaptureEvents=["mouseenter","mouseleave"],this.el=n.el}return St(s,[{key:"mInit",value:function(t){var i=this;this.modules=t,this.mCheckEventTarget=this.mCheckEventTarget.bind(this),this.events&&Object.keys(this.events).forEach(function(e){return i.mAddEvent(e)})}},{key:"mUpdate",value:function(t){this.modules=t}},{key:"mDestroy",value:function(){var t=this;this.events&&Object.keys(this.events).forEach(function(i){return t.mRemoveEvent(i)})}},{key:"mAddEvent",value:function(t){var i=!!this.mCaptureEvents.includes(t);this.el.addEventListener(t,this.mCheckEventTarget,i)}},{key:"mRemoveEvent",value:function(t){var i=!!this.mCaptureEvents.includes(t);this.el.removeEventListener(t,this.mCheckEventTarget,i)}},{key:"mCheckEventTarget",value:function(t){var i=this.events[t.type];if(typeof i=="string")this[i](t);else{var e="["+this.mAttr+"]",r=t.target;if(this.mCaptureEvents.includes(t.type))r.matches(e)&&this.mCallEventMethod(t,i,r);else for(;r&&r!==document&&!(r.matches(e)&&this.mCallEventMethod(t,i,r)!="undefined");)r=r.parentNode}}},{key:"mCallEventMethod",value:function(t,i,e){var r=e.getAttribute(this.mAttr);if(i.hasOwnProperty(r)){var o=i[r];t.hasOwnProperty("currentTarget")||Object.defineProperty(t,"currentTarget",{value:e}),t.hasOwnProperty("curTarget")||Object.defineProperty(t,"curTarget",{value:e}),this[o](t)}}},{key:"$",value:function(t,i){var e=t.indexOf("."),r=t.indexOf("#"),o=t.indexOf("["),a=[e,r,o].filter(function(v){return v!=-1}),l=!1,c=t,f="",u=this.el;return a.length&&(l=Math.min.apply(Math,ae(a)),c=t.slice(0,l),f=t.slice(l)),q(i)=="object"&&(u=i),u.querySelectorAll("["+this.mAttr+"="+c+"]"+f)}},{key:"parent",value:function(t,i){for(var e="["+this.mAttr+"="+t+"]",r=i.parentNode;r&&r!==document;){if(r.matches(e))return r;r=r.parentNode}}},{key:"getData",value:function(t,i){var e=i||this.el;return e.getAttribute(this.mAttr+"-"+t)}},{key:"setData",value:function(t,i,e){var r=e||this.el;return r.setAttribute(this.mAttr+"-"+t,i)}},{key:"call",value:function(t,i,e,r){var o=this;i&&!e&&(e=i,i=!1),this.modules[e]&&(r?this.modules[e][r]&&this.modules[e][r][t](i):Object.keys(this.modules[e]).forEach(function(a){o.modules[e][a][t](i)}))}},{key:"on",value:function(t,i,e,r){var o=this;this.modules[i]&&(r?this.modules[i][r].el.addEventListener(t,function(a){return e(a)}):Object.keys(this.modules[i]).forEach(function(a){o.modules[i][a].el.addEventListener(t,function(l){return e(l)})}))}},{key:"init",value:function(){}},{key:"destroy",value:function(){}}]),s}(),ve=function(){function s(n){wt(this,s),this.app,this.modules=n.modules,this.currentModules={},this.activeModules={},this.newModules={},this.moduleId=0}return St(s,[{key:"init",value:function(t,i){var e=this,r=i||document,o=r.querySelectorAll("*");t&&!this.app&&(this.app=t),this.activeModules.app={app:this.app},o.forEach(function(a){Array.from(a.attributes).forEach(function(l){if(l.name.startsWith("data-module")){var c=!1,f=l.name.split("-").splice(2),u=e.toCamel(f);if(e.modules[u]?c=!0:e.modules[e.toUpper(u)]&&(u=e.toUpper(u),c=!0),c){var v={el:a,name:u,dataName:f.join("-")},h=new e.modules[u](v),p=l.value;p||(e.moduleId++,p="m"+e.moduleId,a.setAttribute(l.name,p)),e.addActiveModule(u,p,h);var C=u+"-"+p;i?e.newModules[C]=h:e.currentModules[C]=h}}})}),Object.entries(this.currentModules).forEach(function(a){var l=V(a,2),c=l[0],f=l[1];if(i){var u=c.split("-"),v=u.shift(),h=u.pop();e.addActiveModule(v,h,f)}else e.initModule(f)})}},{key:"initModule",value:function(t){t.mInit(this.activeModules),t.init()}},{key:"addActiveModule",value:function(t,i,e){this.activeModules[t]?Object.assign(this.activeModules[t],bt({},i,e)):this.activeModules[t]=bt({},i,e)}},{key:"update",value:function(t){var i=this;this.init(this.app,t),Object.entries(this.currentModules).forEach(function(e){var r=V(e,2),o=r[0],a=r[1];a.mUpdate(i.activeModules)}),Object.entries(this.newModules).forEach(function(e){var r=V(e,2),o=r[0],a=r[1];i.initMo
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ee=function(){function s(n){me(this,s),this.defaults={name:"load",loadingClass:"is-loading",loadedClass:"is-loaded",readyClass:"is-ready",transitionsPrefix:"is-",transitionsHistory:!0,enterDelay:0,exitDelay:0,loadedDelay:0,isLoaded:!1,isEntered:!1,isUrl:!1,transitionContainer:null,popstateIgnore:!1},Object.assign(this,this.defaults,n),this.options=n,this.namespace="modular",this.html=document.documentElement,this.href=window.location.href,this.container="data-"+this.name+"-container",this.subContainer=!1,this.prevTransition=null,this.loadAttributes=["src","srcset","style","href"],this.isInserted=!1,this.isLoading=!1,this.enterTimeout=!1,this.controller=new AbortController,this.classContainer=this.html,this.isChrome=navigator.userAgent.indexOf("Chrome")!=-1,this.init()}return pe(s,[{key:"init",value:function(){var t=this;window.addEventListener("popstate",function(i){return t.checkState(i)},!1),this.html.addEventListener("click",function(i){return t.checkClick(i)},!1),this.loadEls(document)}},{key:"checkClick",value:function(t){if(!t.ctrlKey&&!t.metaKey)for(var i=t.target;i&&i!==document;){if(i.matches("a")&&i.getAttribute("download")==null){var e=i.getAttribute("href");!e.startsWith("#")&&!e.startsWith("mailto:")&&!e.startsWith("tel:")&&(t.preventDefault(),this.reset(),this.getClickOptions(i));break}i=i.parentNode}}},{key:"checkState",value:function(){typeof this.popstateIgnore=="string"&&window.location.href.indexOf(this.popstateIgnore)>-1||(this.reset(),this.getStateOptions())}},{key:"reset",value:function(){this.isLoading&&(this.controller.abort(),this.isLoading=!1,this.controller=new AbortController),window.clearTimeout(this.enterTimeout),this.isInserted&&this.removeContainer(),this.classContainer=this.html,Object.assign(this,this.defaults,this.options)}},{key:"getClickOptions",value:function(t){this.transition=t.getAttribute("data-"+this.name),this.isUrl=t.getAttribute("data-"+this.name+"-url");var i=t.getAttribute("href"),e=t.getAttribute("target");if(e=="_blank"){window.open(i,"_blank");return}if(this.transition=="false"){window.location=i;return}this.setOptions(i,!0)}},{key:"getStateOptions",value:function(){this.transitionsHistory?this.transition=history.state:this.transition=!1;var t=window.location.href;this.setOptions(t)}},{key:"goTo",value:function(t,i,e){this.reset(),this.transition=i,this.isUrl=e,this.setOptions(t,!0)}},{key:"setOptions",value:function(t,i){var e="["+this.container+"]",r;this.transition&&this.transition!="true"&&(this.transitionContainer="["+this.container+'="'+this.transition+'"]',this.loadingClass=this.transitions[this.transition].loadingClass||this.loadingClass,this.loadedClass=this.transitions[this.transition].loadedClass||this.loadedClass,this.readyClass=this.transitions[this.transition].readyClass||this.readyClass,this.transitionsPrefix=this.transitions[this.transition].transitionsPrefix||this.transitionsPrefix,this.enterDelay=this.transitions[this.transition].enterDelay||this.enterDelay,this.exitDelay=this.transitions[this.transition].exitDelay||this.exitDelay,this.loadedDelay=this.transitions[this.transition].loadedDelay||this.loadedDelay,r=document.querySelector(this.transitionContainer)),r?(e=this.transitionContainer,this.oldContainer=r,this.classContainer=this.oldContainer.parentNode,this.subContainer||history.replaceState(this.transition,null,this.href),this.subContainer=!0):(this.oldContainer=document.querySelector(e),this.subContainer&&history.replaceState(this.prevTransition,null,this.href),this.subContainer=!1),this.href=t,this.parentContainer=this.oldContainer.parentNode,this.isUrl===""||this.isUrl!=null&&this.isUrl!="false"&&this.isUrl!=!1?history.pushState(this.transition,null,t):(this.oldContainer.classList.add("is-old"),this.setLoading(),this.startEnterDelay(),this.loadHref(t,e,i))}},{key:"setLoading",value:function(){this.classContainer.classList.remove(this.loadedClass,this.readyClass),this.classContainer.classList.add(this.loadingClass),this.classContainer.classList.remove(this
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Be(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var W={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"}},Rt=function(){function s(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};G(this,s),Object.assign(this,W,n),this.smartphone=W.smartphone,n.smartphone&&Object.assign(this.smartphone,n.smartphone),this.tablet=W.tablet,n.tablet&&Object.assign(this.tablet,n.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),this.direction==="horizontal"?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 $(s,[{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)||navigator.platform==="MacIntel"&&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){var i=t=="desktop"?this.smooth:this[t].smooth,e=this.context=="desktop"?this.smooth:this[this.context].smooth;i!=e&&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(i){i.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 i=this,e=this.instance.scroll.y,r=e+this.windowHeight,o=this.instance.scroll.x,a=o+this.windowWidth;Object.entries(this.els).forEach(function(l){var c=j(l,2),f=c[0],u=c[1];if(u&&(!u.inView||t)&&(i.direction==="horizontal"?a>=u.left&&o<u.right&&i.setInView(u,f):r>=u.top&&e<u.bottom&&i.setInView(u,f)),u&&u.inView)if(i.direction==="horizontal"){var v=u.right-u.left;u.progress=(i.instance.scroll.x-(u.left-i.windowWidth))/(v+i.windowWidth),(a<u.left||o>u.right)&&i.setOutOfView(u,f)}else{var h=u.bottom-u.top;u.progress=(i.instance.scroll.y-(u.top-i.windowHeight))/(h+i.windowHei
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
/*! svg4everybody v2.1.9 | github.com/jonathantneal/svg4everybody */
//# sourceMappingURL=app.js.map