1/* @license GPL-2.0-or-later https://git.drupalcode.org/project/once/-/raw/v1.0.1/LICENSE.md */ 2/*! @drupal/once - v1.0.1 - 2021-06-12 */ 3var once=function(){"use strict";var n=/[\11\12\14\15\40]+/,e="data-once",t=document;function r(n,t,r){return n[t+"Attribute"](e,r)}function o(e){if("string"!=typeof e)throw new TypeError("once ID must be a string");if(""===e||n.test(e))throw new RangeError("once ID must not be empty or contain spaces");return'[data-once~="'+e+'"]'}function u(n){if(!(n instanceof Element))throw new TypeError("The element must be an instance of Element");return!0}function i(n,e){void 0===e&&(e=t);var r=n;if(null===n)r=[];else{if(!n)throw new TypeError("Selector must not be empty");"string"!=typeof n||e!==t&&!u(e)?n instanceof Element&&(r=[n]):r=e.querySelectorAll(n)}return Array.prototype.slice.call(r)}function c(n,e,t){return e.filter((function(e){var r=u(e)&&e.matches(n);return r&&t&&t(e),r}))}function f(e,t){var o=t.add,u=t.remove,i=[];r(e,"has")&&r(e,"get").trim().split(n).forEach((function(n){i.indexOf(n)<0&&n!==u&&i.push(n)})),o&&i.push(o);var c=i.join(" ");r(e,""===c?"remove":"set",c)}function a(n,e,t){return c(":not("+o(n)+")",i(e,t),(function(e){return f(e,{add:n})}))}return a.remove=function(n,e,t){return c(o(n),i(e,t),(function(e){return f(e,{remove:n})}))},a.filter=function(n,e,t){return c(o(n),i(e,t))},a.find=function(n,e){return i(n?o(n):"[data-once]",e)},a}(); 4 5; 6/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 7(function(){const settingsElement=document.querySelector('head > script[type="application/json"][data-drupal-selector="drupal-settings-json"], body > script[type="application/json"][data-drupal-selector="drupal-settings-json"]');window.drupalSettings={};if(settingsElement!==null)window.drupalSettings=JSON.parse(settingsElement.textContent);})();; 8window.Drupal={behaviors:{},locale:{}};(function(Drupal,drupalSettings,drupalTranslations,console,Proxy,Reflect){Drupal.throwError=function(error){setTimeout(()=>{throw error;},0);};Drupal.attachBehaviors=function(context,settings){context=context||document;settings=settings||drupalSettings;const behaviors=Drupal.behaviors;Object.keys(behaviors||{}).forEach((i)=>{if(typeof behaviors[i].attach==='function')try{behaviors[i].attach(context,settings);}catch(e){Drupal.throwError(e);}});};Drupal.detachBehaviors=function(context,settings,trigger){context=context||document;settings=settings||drupalSettings;trigger=trigger||'unload';const behaviors=Drupal.behaviors;Object.keys(behaviors||{}).forEach((i)=>{if(typeof behaviors[i].detach==='function')try{behaviors[i].detach(context,settings,trigger);}catch(e){Drupal.throwError(e);}});};Drupal.checkPlain=function(str){str=str.toString().replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"').replace(/'/g,''');return str;};Drupal.formatString=function(str,args){const processedArgs={};Object.keys(args||{}).forEach((key)=>{switch(key.charAt(0)){case '@':processedArgs[key]=Drupal.checkPlain(args[key]);break;case '!':processedArgs[key]=args[key];break;default:processedArgs[key]=Drupal.theme('placeholder',args[key]);break;}});return Drupal.stringReplace(str,processedArgs,null);};Drupal.stringReplace=function(str,args,keys){if(str.length===0)return str;if(!Array.isArray(keys)){keys=Object.keys(args||{});keys.sort((a,b)=>a.length-b.length);}if(keys.length===0)return str;const key=keys.pop();const fragments=str.split(key);if(keys.length){for(let i=0;i<fragments.length;i++)fragments[i]=Drupal.stringReplace(fragments[i],args,keys.slice(0));}return fragments.join(args[key]);};Drupal.t=function(str,args,options){options=options||{};options.context=options.context||'';if(drupalTranslations?.strings?.[options.context]?.[str])str=drupalTranslations.strings[options.context][str];if(args)str=Drupal.formatString(str,args);return str;};Drupal.url=function(path){return drupalSettings.path.baseUrl+drupalSettings.path.pathPrefix+path;};Drupal.url.toAbsolute=function(url){const urlParsingNode=document.createElement('a');try{url=decodeURIComponent(url);}catch(e){}urlParsingNode.setAttribute('href',url);return urlParsingNode.href;};Drupal.url.isLocal=function(url){let absoluteUrl=Drupal.url.toAbsolute(url);let {protocol}=window.location;if(protocol==='http:'&&absoluteUrl.startsWith('https:'))protocol='https:';let baseUrl=`${protocol}//${window.location.host}${drupalSettings.path.baseUrl.slice(0,-1)}`;try{absoluteUrl=decodeURIComponent(absoluteUrl);}catch(e){}try{baseUrl=decodeURIComponent(baseUrl);}catch(e){}return absoluteUrl===baseUrl||absoluteUrl.startsWith(`${baseUrl}/`);};Drupal.formatPlural=function(count,singular,plural,args,options){args=args||{};args['@count']=count;const pluralDelimiter=drupalSettings.pluralDelimiter;const translations=Drupal.t(singular+pluralDelimiter+plural,args,options).split(pluralDelimiter);let index=0;
8if(drupalTranslations?.pluralFormula)index=count in drupalTranslations.pluralFormula?drupalTranslations.pluralFormula[count]:drupalTranslations.pluralFormula.default;else{if(args['@count']!==1)index=1;}return translations[index];};Drupal.encodePath=function(item){return window.encodeURIComponent(item).replace(/%2F/g,'/');};Drupal.deprecationError=({message})=>{if(drupalSettings.suppressDeprecationErrors===false&&console?.warn)console.warn(`[Deprecation] ${message}`);};Drupal.deprecatedProperty=({target,deprecatedProperty,message})=>{if(!Proxy||!Reflect)return target;return new Proxy(target,{get:(target,key,...rest)=>{if(key===deprecatedProperty)Drupal.deprecationError({message});return Reflect.get(target,key,...rest);}});};Drupal.theme=function(func,...args){if(typeof Drupal.theme?.[func]==='function')return Drupal.theme[func](...args);Drupal.throwError(new TypeError(`Drupal.theme.${func} must be function type.`));};Drupal.theme.placeholder=function(str){return `<em class="placeholder">${Drupal.checkPlain(str)}</em>`;};Drupal.elementIsVisible=function(elem){return !!(elem.offsetWidth||elem.offsetHeight||elem.getClientRects().length);};Drupal.elementIsHidden=function(elem){return !Drupal.elementIsVisible(elem);};})(Drupal,window.drupalSettings,window.drupalTranslations,window.console,window.Proxy,window.Reflect);; 9if(window.jQuery)jQuery.noConflict();document.documentElement.className+=' js';(function(Drupal,drupalSettings){const domReady=(callback)=>{const listener=()=>{callback();document.removeEventListener('DOMContentLoaded',listener);};if(document.readyState!=='loading')setTimeout(callback,0);else document.addEventListener('DOMContentLoaded',listener);};domReady(()=>{Drupal.attachBehaviors(document,drupalSettings);});})(Drupal,window.drupalSettings);; 10/* @license MIT https://raw.githubusercontent.com/focus-trap/tabbable/v6.3.0/LICENSE */ 11/*! 12* tabbable 6.3.0 13* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE 14*/ 15!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):(t="undefined"!=typeof globalThis?globalThis:t||self,function(){var n=t.tabbable,o=t.tabbable={};e(o),o.noConflict=function(){return t.tabbable=n,o}}())}(this,(function(t){"use strict";var e=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],n=e.join(","),o="undefined"==typeof Element,r=o?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,i=!o&&Element.prototype.getRootNode?function(t){var e;return null==t||null===(e=t.getRootNode)||void 0===e?void 0:e.call(t)}:function(t){return null==t?void 0:t.ownerDocument},a=function(t,e){var n;void 0===e&&(e=!0);var o=null==t||null===(n=t.getAttribute)||void 0===n?void 0:n.call(t,"inert");return""===o||"true"===o||e&&t&&a(t.parentNode)},l=function(t,e,o){if(a(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(n));return e&&r.call(t,n)&&i.unshift(t),i=i.filter(o)},u=function(t,e,o){for(var i=[],l=Array.from(t);l.length;){var c=l.shift();if(!a(c,!1))if("SLOT"===c.tagName){var d=c.assignedElements(),f=d.length?d:c.children,s=u(f,!0,o);o.flatten?i.push.apply(i,s):i.push({scopeParent:c,candidates:s})}else{r.call(c,n)&&o.filter(c)&&(e||!t.includes(c))&&i.push(c);var p=c.shadowRoot||"function"==typeof o.getShadowRoot&&o.getShadowRoot(c),h=!a(p,!1)&&(!o.shadowRootFilter||o.shadowRootFilter(c));if(p&&h){var v=u(!0===p?c.children:p.children,!0,o);o.flatten?i.push.apply(i,v):i.push({scopeParent:c,candidates:v})}else l.unshift.apply(l,c.children)}}return i},c=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},d=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||function(t){var e,n=null==t||null===(e=t.getAttribute)||void 0===e?void 0:e.call(t,"contenteditable");return""===n||"true"===n}(t))&&!c(t)?0:t.tabIndex},f=function(t,e){return t.tabIndex===e.tabIndex?t.documentOrder-e.documentOrder:t.tabIndex-e.tabIndex},s=function(t){return"INPUT"===t.tagName},p=function(t){return function(t){return s(t)&&"radio"===t.type}(t)&&!function(t){if(!t.name)return!0;var e,n=t.form||i(t),o=function(t){return n.querySelectorAll('input[type="radio"][name="'+t+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)e=o(window.CSS.escape(t.name));else try{e=o(t.name)}catch(t){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",t.message),!1}var r=function(t,e){for(var n=0;n<t.length;n++)if(t[n].checked&&t[n].form===e)return t[n]}(e,t.form);return!r||r===t}(t)},h=function(t){var e=t.getBoundingClientRect(),n=e.width,o=e.height;return 0===n&&0===o},v=function(t,e){var n=e.displayCheck,o=e.getShadowRoot;if("full-native"===n&&"checkVisibility"in t)return!t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});if("hidden"===getComputedStyle(t).visibility)return!0;var a=r.call(t,"details>summary:first-of-type")?t.parentElement:t;if(r.call(a,"details:not([open]) *"))return!0;
15if(n&&"full"!==n&&"full-native"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return h(t)}else{if("function"==typeof o){for(var l=t;t;){var u=t.parentElement,c=i(t);if(u&&!u.shadowRoot&&!0===o(u))return h(t);t=t.assignedSlot?t.assignedSlot:u||c===t.ownerDocument?u:c.host}t=l}if(function(t){var e,n,o,r,a=t&&i(t),l=null===(e=a)||void 0===e?void 0:e.host,u=!1;if(a&&a!==t)for(u=!!(null!==(n=l)&&void 0!==n&&null!==(o=n.ownerDocument)&&void 0!==o&&o.contains(l)||null!=t&&null!==(r=t.ownerDocument)&&void 0!==r&&r.contains(t));!u&&l;){var c,d,f;u=!(null===(d=l=null===(c=a=i(l))||void 0===c?void 0:c.host)||void 0===d||null===(f=d.ownerDocument)||void 0===f||!f.contains(l))}return u}(t))return!t.getClientRects().length;if("legacy-full"!==n)return!0}return!1},b=function(t,e){return!(e.disabled||a(e)||function(t){return s(t)&&"hidden"===t.type}(e)||v(e,t)||function(t){return"DETAILS"===t.tagName&&Array.prototype.slice.apply(t.children).some((function(t){return"SUMMARY"===t.tagName}))}(e)||function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var e=t.parentElement;e;){if("FIELDSET"===e.tagName&&e.disabled){for(var n=0;n<e.children.length;n++){var o=e.children.item(n);if("LEGEND"===o.tagName)return!!r.call(e,"fieldset[disabled] *")||!o.contains(t)}return!0}e=e.parentElement}return!1}(e))},y=function(t,e){return!(p(e)||d(e)<0||!b(t,e))},m=function(t){var e=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(e)||e>=0)},g=function(t){var e=[],n=[];return t.forEach((function(t,o){var r=!!t.scopeParent,i=r?t.scopeParent:t,a=function(t,e){var n=d(t);return n<0&&e&&!c(t)?0:n}(i,r),l=r?g(t.candidates):i;0===a?r?e.push.apply(e,l):e.push(i):n.push({documentOrder:o,tabIndex:a,item:t,isScope:r,content:l})})),n.sort(f).reduce((function(t,e){return e.isScope?t.push.apply(t,e.content):t.push(e.content),t}),[]).concat(e)},w=e.concat("iframe").join(",");t.focusable=function(t,e){return(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:b.bind(null,e),flatten:!0,getShadowRoot:e.getShadowRoot}):l(t,e.includeContainer,b.bind(null,e))},t.getTabIndex=d,t.isFocusable=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==r.call(t,w)&&b(e,t)},t.isTabbable=function(t,e){if(e=e||{},!t)throw new Error("No node provided");return!1!==r.call(t,n)&&y(e,t)},t.tabbable=function(t,e){var n;return n=(e=e||{}).getShadowRoot?u([t],e.includeContainer,{filter:y.bind(null,e),flatten:!1,getShadowRoot:e.getShadowRoot,shadowRootFilter:m}):l(t,e.includeContainer,y.bind(null,e)),g(n)}})); 16 17; 18/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 19document.addEventListener("DOMContentLoaded",function(){const heading=document.querySelector(".basic-block--heading");if(!heading)return;if(document.querySelector(".lang-toggle-container"))return;const docLang=(document.documentElement.getAttribute("lang")||"").toLowerCase();const lang=docLang.split("-")[0];const currentPath=window.location.pathname;let newPath;if(currentPath.startsWith("/de/"))newPath=currentPath.replace(/^\/de\//,"/");else newPath="/de"+currentPath;newPath=newPath.replace(/\/{2,}/g,"/");const htmlEn=` 20 <div class="lang-toggle-container en"> 21 <ul class="toggle toggle--revenera"> 22 <a href="#" class="toggle__btn active">English</a> 23 <a href="${newPath}" class="toggle__btn">Deutsch</a> 24 </ul> 25 </div> 26 `;const htmlDe=` 27 <div class="lang-toggle-container de"> 28 <ul class="toggle toggle--revenera"> 29 <a href="${newPath}" class="toggle__btn">English</a> 30 <a href="#" class="toggle__btn active">Deutsch</a> 31 </ul> 32 </div> 33 `;const htmlToInject=lang==="de"?htmlDe:htmlEn;heading.insertAdjacentHTML("afterend",htmlToInject);const container=document.querySelector(".lang-toggle-container");if(container)container.addEventListener("click",function(e){const activeLink=e.target.closest("a.toggle__btn.active");if(activeLink){e.preventDefault();e.stopPropagation();}});});; 34(function($,Drupal){Drupal.theme.progressBar=function(id){const escapedId=Drupal.checkPlain(id);return (`<div id="${escapedId}" class="progress" aria-live="polite">`+'<div class="progress__label"> </div>'+'<div class="progress__track"><div class="progress__bar"></div></div>'+'<div class="progress__percentage"></div>'+'<div class="progress__description"> </div>'+'</div>');};Drupal.ProgressBar=function(id,updateCallback,method,errorCallback){this.id=id;this.method=method||'GET';this.updateCallback=updateCallback;this.errorCallback=errorCallback;this.element=$(Drupal.theme('progressBar',id));};$.extend(Drupal.ProgressBar.prototype,{setProgress(percentage,message,label){if(percentage>=0&&percentage<=100){$(this.element).find('div.progress__bar').each(function(){this.style.width=`${percentage}%`;});$(this.element).find('div.progress__percentage').html(`${percentage}%`);}$('div.progress__description',this.element).html(message);$('div.progress__label',this.element).html(label);if(this.updateCallback)this.updateCallback(percentage,message,this);},startMonitoring(uri,delay){this.delay=delay;this.uri=uri;this.sendPing();},stopMonitoring(){clearTimeout(this.timer);this.uri=null;},sendPing(){if(this.timer)clearTimeout(this.timer);if(this.uri){const pb=this;let uri=this.uri;if(!uri.includes('?'))uri+='?';else uri+='&';uri+='_format=json';$.ajax({type:this.method,url:uri,data:'',dataType:'json',success(progress){if(progress.status===0){pb.displayError(progress.data);return;}pb.setProgress(progress.percentage,progress.message,progress.label);pb.timer=setTimeout(()=>{pb.sendPing();},pb.delay);},error(xmlhttp){const e=new Drupal.AjaxError(xmlhttp,pb.uri);pb.displayError(`<pre>${e.message}</pre>`);}});}},displayError(string){const error=$('<div class="messages messages--error"></div>').html(string);$(this.element).before(error).hide();if(this.errorCallback)this.errorCallback(this);}});})(jQuery,Drupal);; 35/* @license MIT https://raw.githubusercontent.com/muicss/loadjs/4.3.0/LICENSE.txt */ 36loadjs=function(){var h=function(){},o={},c={},f={};function u(e,n){if(e){var t=f[e];if(c[e]=n,t)for(;t.length;)t[0](e,n),t.splice(0,1)}}function l(e,n){e.call&&(e={success:e}),n.length?(e.error||h)(n):(e.success||h)(e)}function p(t,r,i,s){var o,e,u,n=document,c=i.async,f=(i.numRetries||0)+1,l=i.before||h,a=t.replace(/[\?|#].*$/,""),d=t.replace(/^(css|img|module|nomodule)!/,"");if(s=s||0,/(^css!|\.css$)/.test(a))(u=n.createElement("link")).rel="stylesheet",u.href=d,(o="hideFocus"in u)&&u.relList&&(o=0,u.rel="preload",u.as="style");else if(/(^img!|\.(png|gif|jpg|svg|webp)$)/.test(a))(u=n.createElement("img")).src=d;else if((u=n.createElement("script")).src=d,u.async=void 0===c||c,e="noModule"in u,/^module!/.test(a)){if(!e)return r(t,"l");u.type="module"}else if(/^nomodule!/.test(a)&&e)return r(t,"l");!(u.onload=u.onerror=u.onbeforeload=function(e){var n=e.type[0];if(o)try{u.sheet.cssText.length||(n="e")}catch(e){18!=e.code&&(n="e")}if("e"==n){if((s+=1)<f)return p(t,r,i,s)}else if("preload"==u.rel&&"style"==u.as)return u.rel="stylesheet";r(t,n,e.defaultPrevented)})!==l(t,u)&&n.head.appendChild(u)}function t(e,n,t){var r,i;if(n&&n.trim&&(r=n),i=(r?t:n)||{},r){if(r in o)throw"LoadJS";o[r]=!0}
36function s(n,t){!function(e,r,n){var t,i,s=(e=e.push?e:[e]).length,o=s,u=[];for(t=function(e,n,t){if("e"==n&&u.push(e),"b"==n){if(!t)return;u.push(e)}--s||r(u)},i=0;i<o;i++)p(e[i],t,n)}(e,function(e){l(i,e),n&&l({success:n,error:t},e),u(r,e)},i)}if(i.returnPromise)return new Promise(s);s()}return t.ready=function(e,n){return function(e,t){e=e.push?e:[e];var n,r,i,s=[],o=e.length,u=o;for(n=function(e,n){n.length&&s.push(e),--u||t(s)};o--;)r=e[o],(i=c[r])?n(r,i):(f[r]=f[r]||[]).push(n)}(e,function(e){l(n,e)}),t},t.done=function(e){u(e,[])},t.reset=function(){o={},c={},f={}},t.isDefined=function(e){return e in o},t}();; 37/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 38Drupal.debounce=function(func,wait,immediate){let timeout;let result;return function(...args){const context=this;const later=function(){timeout=null;if(!immediate)result=func.apply(context,args);};const callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow)result=func.apply(context,args);return result;};};; 39(function(Drupal,debounce){let liveElement;const announcements=[];Drupal.behaviors.drupalAnnounce={attach(context){if(!liveElement){liveElement=document.createElement('div');liveElement.id='drupal-live-announce';liveElement.className='visually-hidden';liveElement.setAttribute('aria-live','polite');liveElement.setAttribute('aria-busy','false');document.body.appendChild(liveElement);}}};function announce(){const text=[];let priority='polite';let announcement;const il=announcements.length;for(let i=0;i<il;i++){announcement=announcements.pop();text.unshift(announcement.text);if(announcement.priority==='assertive')priority='assertive';}if(text.length){liveElement.innerHTML='';liveElement.setAttribute('aria-busy','true');liveElement.setAttribute('aria-live',priority);liveElement.innerHTML=text.join('\n');liveElement.setAttribute('aria-busy','false');}}Drupal.announce=function(text,priority){announcements.push({text,priority});return debounce(announce,200)();};})(Drupal,Drupal.debounce);; 40((Drupal)=>{Drupal.Message=class{constructor(messageWrapper=null){if(!messageWrapper)this.messageWrapper=Drupal.Message.defaultWrapper();else this.messageWrapper=messageWrapper;}static defaultWrapper(){let wrapper=document.querySelector('[data-drupal-messages]')||document.querySelector('[data-drupal-messages-fallback]');if(!wrapper){wrapper=document.createElement('div');document.body.appendChild(wrapper);}if(wrapper.hasAttribute('data-drupal-messages-fallback')){wrapper.removeAttribute('data-drupal-messages-fallback');wrapper.classList.remove('hidden');}wrapper.setAttribute('data-drupal-messages','');return wrapper.innerHTML===''?Drupal.Message.messageInternalWrapper(wrapper):wrapper.firstElementChild;}static getMessageTypeLabels(){return {status:Drupal.t('Status message'),error:Drupal.t('Error message'),warning:Drupal.t('Warning message')};}add(message,options={}){if(!options.hasOwnProperty('type'))options.type='status';if(typeof message!=='string')throw new Error('Message must be a string.');Drupal.Message.announce(message,options);options.id=options.id?String(options.id):`${options.type}-${Math.random().toFixed(15).replace('0.','')}`;if(!Drupal.Message.getMessageTypeLabels().hasOwnProperty(options.type)){const {type}=options;throw new Error(`The message type, ${type}, is not present in Drupal.Message.getMessageTypeLabels().`);}this.messageWrapper.appendChild(Drupal.theme('message',{text:message},options));return options.id;}select(id){return this.messageWrapper.querySelector(`[data-drupal-message-id^="${id}"]`);}remove(id){return this.messageWrapper.removeChild(this.select(id));}clear(){this.messageWrapper.querySelectorAll('[data-drupal-message-id]').forEach((message)=>{this.messageWrapper.removeChild(message);});}static announce(message,options){if(!options.priority&&(options.type==='warning'||options.type==='error'))options.priority='assertive';if(options.announce!=='')Drupal.announce(options.announce||message,options.priority);}static messageInternalWrapper(messageWrapper){const innerWrapper=document.createElement('div');innerWrapper.setAttribute('class','messages__wrapper');messageWrapper.insertAdjacentElement('afterbegin',innerWrapper);return innerWrapper;}};Drupal.theme.message=({text},{type,id})=>
40{const messagesTypes=Drupal.Message.getMessageTypeLabels();const messageWrapper=document.createElement('div');messageWrapper.setAttribute('class',`messages messages--${type}`);messageWrapper.setAttribute('role',type==='error'||type==='warning'?'alert':'status');messageWrapper.setAttribute('data-drupal-message-id',id);messageWrapper.setAttribute('data-drupal-message-type',type);messageWrapper.setAttribute('aria-label',messagesTypes[type]);messageWrapper.innerHTML=`${text}`;return messageWrapper;};})(Drupal);; 41((Drupal)=>{Drupal.theme.ajaxProgressIndicatorFullscreen=()=>'<div class="ajax-progress ajax-progress--fullscreen"><div class="ajax-progress__throbber ajax-progress__throbber--fullscreen"> </div></div>';Drupal.theme.ajaxProgressThrobber=(message)=>{const messageMarkup=typeof message==='string'?Drupal.theme('ajaxProgressMessage',message):'';const throbber='<div class="ajax-progress__throbber"> </div>';return `<div class="ajax-progress ajax-progress--throbber">${throbber}${messageMarkup}</div>`;};Drupal.theme.ajaxProgressMessage=(message)=>`<div class="ajax-progress__message">${message}</div>`;})(Drupal);; 42(function($,window,Drupal,drupalSettings,loadjs,{isFocusable,tabbable}){Drupal.behaviors.AJAX={attach(context,settings){function loadAjaxBehavior(base){const elementSettings=settings.ajax[base];if(typeof elementSettings.selector==='undefined')elementSettings.selector=`#${base}`;once('drupal-ajax',$(elementSettings.selector)).forEach((el)=>{elementSettings.element=el;elementSettings.base=base;Drupal.ajax(elementSettings);});}Object.keys(settings.ajax||{}).forEach(loadAjaxBehavior);Drupal.ajax.bindAjaxLinks(document.body);once('ajax','.use-ajax-submit').forEach((el)=>{const elementSettings={url:$(el.form).attr('action'),setClick:true,event:'click',progress:{type:'throbber'},base:el.id,element:el};Drupal.ajax(elementSettings);});},detach(context,settings,trigger){if(trigger==='unload')Drupal.ajax.expired().forEach((instance)=>{Drupal.ajax.instances[instance.instanceIndex]=null;});}};Drupal.AjaxError=function(xmlhttp,uri,customMessage){let statusCode;let statusText;let responseText;if(xmlhttp.status)statusCode=`\n${Drupal.t('An AJAX HTTP error occurred.')}\n${Drupal.t('HTTP Result Code: !status',{'!status':xmlhttp.status})}`;else statusCode=`\n${Drupal.t('An AJAX HTTP request terminated abnormally.')}`;statusCode+=`\n${Drupal.t('Debugging information follows.')}`;const pathText=`\n${Drupal.t('Path: !uri',{'!uri':uri})}`;statusText='';try{statusText=`\n${Drupal.t('StatusText: !statusText',{'!statusText':xmlhttp.statusText.trim()})}`;}catch(e){}responseText='';try{responseText=`\n${Drupal.t('ResponseText: !responseText',{'!responseText':xmlhttp.responseText.trim()})}`;}catch(e){}responseText=responseText.replace(/<("[^"]*"|'[^']*'|[^'">])*>/gi,'');responseText=responseText.replace(/[\n]+\s+/g,'\n');const readyStateText=xmlhttp.status===0?`\n${Drupal.t('ReadyState: !readyState',{'!readyState':xmlhttp.readyState})}`:'';customMessage=customMessage?`\n${Drupal.t('CustomMessage: !customMessage',{'!customMessage':customMessage})}`:'';this.message=statusCode+pathText+statusText+customMessage+responseText+readyStateText;this.name='AjaxError';if(!Drupal.AjaxError.messages)Drupal.AjaxError.messages=new Drupal.Message();Drupal.AjaxError.messages.add(Drupal.t("Oops, something went wrong. Check your browser's developer console for more details."),{type:'error'});};Drupal.AjaxError.prototype=new Error();Drupal.AjaxError.prototype.constructor=Drupal.AjaxError;Drupal.ajax=function(settings){if(arguments.length!==1)throw new Error('Drupal.ajax() function must be called with one configuration object only');const base=settings.base||false;const element=settings.element||false;delete settings.base;delete settings.element;if(!settings.progress&&!element)settings.progress=false;const ajax=new Drupal.Ajax(base,element,settings);ajax.instanceIndex=Drupal.ajax.instances.length;Drupal.ajax.instances.push(ajax);return ajax;};Drupal.ajax.instances=[];Drupal.ajax.expired=function(){return Drupal.ajax.instances.filter((instance)=>instance&&instance.element!==false&&!document.body.contains(instance.element));};Drupal.ajax.bindAjaxLinks=(element)=>
42{once('ajax','.use-ajax',element).forEach((ajaxLink)=>{const $linkElement=$(ajaxLink);const elementSettings={progress:{type:'throbber'},dialogType:$linkElement.data('dialog-type'),dialog:$linkElement.data('dialog-options'),dialogRenderer:$linkElement.data('dialog-renderer'),base:$linkElement.attr('id'),element:ajaxLink};const href=$linkElement.attr('href');if(href){elementSettings.url=href;elementSettings.event='click';}const httpMethod=$linkElement.data('ajax-http-method');if(httpMethod)elementSettings.httpMethod=httpMethod;Drupal.ajax(elementSettings);});};Drupal.Ajax=function(base,element,elementSettings){const defaults={httpMethod:'POST',event:element?'mousedown':null,keypress:true,selector:base?`#${base}`:null,effect:'none',speed:'none',method:'replaceWith',progress:{type:'throbber',message:Drupal.t('Processing...')},submit:{js:true}};$.extend(this,defaults,elementSettings);this.commands=new Drupal.AjaxCommands();this.instanceIndex=false;if(this.wrapper)this.wrapper=`#${this.wrapper}`;this.element=element;this.preCommandsFocusedElementSelector=null;this.elementSettings=elementSettings;if(this.element?.form)this.$form=$(this.element.form);if(!this.url){const $element=$(this.element);if(this.element.tagName==='A')this.url=$element.attr('href');else{if(this.element&&element.form)this.url=this.$form.attr('action');}}const originalUrl=this.url;this.url=this.url.replace(/\/nojs(\/|$|\?|#)/,'/ajax$1');if(drupalSettings.ajaxTrustedUrl[originalUrl])drupalSettings.ajaxTrustedUrl[this.url]=true;const ajax=this;ajax.options={url:ajax.url,data:ajax.submit,isInProgress(){return ajax.ajaxing;},beforeSerialize(elementSettings,options){return ajax.beforeSerialize(elementSettings,options);},beforeSubmit(formValues,elementSettings,options){ajax.ajaxing=true;ajax.preCommandsFocusedElementSelector=null;return ajax.beforeSubmit(formValues,elementSettings,options);},beforeSend(xmlhttprequest,options){ajax.ajaxing=true;return ajax.beforeSend(xmlhttprequest,options);},success(response,status,xmlhttprequest){ajax.preCommandsFocusedElementSelector=document.activeElement.getAttribute('data-drupal-selector');if(typeof response==='string')response=JSON.parse(response);if(response!==null&&!drupalSettings.ajaxTrustedUrl[ajax.url])if(xmlhttprequest.getResponseHeader('X-Drupal-Ajax-Token')!=='1'){const customMessage=Drupal.t('The response failed verification so will not be processed.');return ajax.error(xmlhttprequest,ajax.url,customMessage);}return (Promise.resolve(ajax.success(response,status)).then(()=>{ajax.ajaxing=false;$(document).trigger('ajaxSuccess',[xmlhttprequest,this]);$(document).trigger('ajaxComplete',[xmlhttprequest,this]);if(--$.active===0)$(document).trigger('ajaxStop');}));},error(xmlhttprequest,status,error){ajax.ajaxing=false;},complete(xmlhttprequest,status){if(status==='error'||status==='parsererror')return ajax.error(xmlhttprequest,ajax.url);},dataType:'json',jsonp:false,method:ajax.httpMethod};if(elementSettings.dialog)ajax.options.data.dialogOptions=elementSettings.dialog;if(!ajax.options.url.includes('?'))ajax.options.url+='?';else ajax.options.url+='&';let wrapper=`drupal_${elementSettings.dialogType||'ajax'}`;if(elementSettings.dialogRenderer)wrapper+=`.${elementSettings.dialogRenderer}`;ajax.options.url+=`${Drupal.ajax.WRAPPER_FORMAT}=${wrapper}`;$(ajax.element).on(elementSettings.event,function(event){if(!drupalSettings.ajaxTrustedUrl[ajax.url]&&!Drupal.url.isLocal(ajax.url))throw new Error(Drupal.t('The callback URL is not local and not trusted: !url',{'!url':ajax.url}));return ajax.eventResponse(this,event);});if(elementSettings.keypress)$(ajax.element).on('keypress',function(event){return ajax.keypressResponse(this,event);});if(elementSettings.prevent)$(ajax.element).on(elementSettings.prevent,false);};Drupal.ajax.WRAPPER_FORMAT='_wrapper_format';Drupal.Ajax.AJAX_REQUEST_PARAMETER='_drupal_ajax';Drupal.Ajax.prototype.execute=function(){if(this.ajaxing)return;try{this.beforeSerialize(this.element,this.options);return $.ajax(this.options);}catch(e){this.ajaxing=false;window.alert(`An error occurred while attempting to process ${this.options.url}: ${e.message}`);return $.Deferred().reject();}};Drupal.Ajax.prototype.keypressResponse=function(element,event){const ajax=this;if(event.which===13||(event.which===32&&element.type!=='text'&&element.type!=='textarea'&&element.type!=='tel'&&element.type!=='number')){event.preventDefault();event.stopPropagation();$(element).trigger(ajax.elementSettings.event);}};Drupal.Ajax.prototype.eventResponse=function(element,event){event.preventDefault();event.stopPropagation();const ajax=this;if(ajax.ajaxing)return;try{if(ajax.$form){if(ajax.setClick)element.form.clk=element;ajax.$form.ajaxSubmit(ajax.options);}else{ajax.beforeSerialize(ajax.element,ajax.options);$.ajax(ajax.options);}}catch(e){ajax.ajaxing=false;window.alert(`An error occurred while attempting to process ${ajax.options.url}: ${e.message}`);}};Drupal.Ajax.prototype.beforeSerialize=function(element,options){if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.detachBehaviors(this.$form.get(0),settings,'serialize');}options.data[Drupal.Ajax.AJAX_REQUEST_PARAMETER]=1;const pageState=drupalSettings.ajaxPageState;options.data['ajax_page_state[theme]']=pageState.theme;options.data['ajax_page_state[theme_token]']=pageState.theme_token;options.data['ajax_page_state[libraries]']=pageState.libraries;};Drupal.Ajax.prototype.beforeSubmit=function(formValues,element,options){};Drupal.Ajax.prototype.beforeSend=function(xmlhttprequest,options){if(this.$form){options.extraData=options.extraData||{};options.extraData.ajax_iframe_upload='1';const v=$.fieldValue(this.element);if(v!==null)options.extraData[this.element.name]=v;}$(this.element).prop('disabled',true);if(!this.progress||!this.progress.type)return;const progressIndicatorMethod=`setProgressIndicator${this.progress.type.slice(0,1).toUpperCase()}${this.progress.type.slice(1).toLowerCase()}`;if(progressIndicatorMethod in this&&typeof this[progressIndicatorMethod]==='function')this[progressIndicatorMethod].call(this);};Drupal.theme.ajaxProgressThrobber=(message)=>{const messageMarkup=typeof message==='string'?Drupal.theme('ajaxProgressMessage',message):'';const throbber='<div class="throbber"> </div>';return `<div class="ajax-progress ajax-progress-throbber">${throbber}${messageMarkup}</div>`;};Drupal.theme.ajaxProgressIndicatorFullscreen=()=>'<div class="ajax-progress ajax-progress-fullscreen"> </div>';Drupal.theme.ajaxProgressMessage=(message)=>`<div class="message">${message}</div>`;Drupal.theme.ajaxProgressBar=($element)=>$('<div class="ajax-progress ajax-progress-bar"></div>').append($element);Drupal.Ajax.prototype.setProgressIndicatorBar=function(){const progressBar=new Drupal.ProgressBar(`ajax-progress-${this.element.i
42d}`,$.noop,this.progress.method,$.noop);if(this.progress.message)progressBar.setProgress(-1,this.progress.message);if(this.progress.url)progressBar.startMonitoring(this.progress.url,this.progress.interval||1500);this.progress.element=$(Drupal.theme('ajaxProgressBar',progressBar.element));this.progress.object=progressBar;$(this.element).after(this.progress.element);};Drupal.Ajax.prototype.setProgressIndicatorThrobber=function(){this.progress.element=$(Drupal.theme('ajaxProgressThrobber',this.progress.message));if($(this.element).closest('[data-drupal-ajax-container]').length)$(this.element).closest('[data-drupal-ajax-container]').after(this.progress.element);else $(this.element).after(this.progress.element);};Drupal.Ajax.prototype.setProgressIndicatorFullscreen=function(){this.progress.element=$(Drupal.theme('ajaxProgressIndicatorFullscreen'));$('body').append(this.progress.element);};Drupal.Ajax.prototype.commandExecutionQueue=function(response,status){const ajaxCommands=this.commands;return Object.keys(response||{}).reduce((executionQueue,key)=>executionQueue.then(()=>{const {command}=response[key];if(command&&ajaxCommands[command])return ajaxCommands[command](this,response[key],status);}),Promise.resolve());};Drupal.Ajax.prototype.success=function(response,status){if(this.progress.element)$(this.progress.element).remove();if(this.progress.object)this.progress.object.stopMonitoring();$(this.element).prop('disabled',false);const elementParents=$(this.element).parents('[data-drupal-selector]').addBack().toArray();const focusChanged=Object.keys(response||{}).some((key)=>{const {command,method}=response[key];return (command==='focusFirst'||command==='openDialog'||(command==='invoke'&&method==='focus'));});return (this.commandExecutionQueue(response,status).then(()=>{if(!focusChanged){let target=false;if(this.element){if($(this.element).data('refocus-blur')&&this.preCommandsFocusedElementSelector)target=document.querySelector(`[data-drupal-selector="${this.preCommandsFocusedElementSelector}"]`);if(!target&&!$(this.element).data('disable-refocus')){for(let n=elementParents.length-1;!target&&n>=0;n--)target=document.querySelector(`[data-drupal-selector="${elementParents[n].getAttribute('data-drupal-selector')}"]`);}}if(target)$(target).trigger('focus');}if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.attachBehaviors(this.$form.get(0),settings);}this.settings=null;}).catch((error)=>console.error(Drupal.t('An error occurred during the execution of the Ajax response: !error',{'!error':error}))));};Drupal.Ajax.prototype.getEffect=function(response){const type=response.effect||this.effect;const speed=response.speed||this.speed;const effect={};if(type==='none'){effect.showEffect='show';effect.hideEffect='hide';effect.showSpeed='';}else if(type==='fade'){effect.showEffect='fadeIn';effect.hideEffect='fadeOut';effect.showSpeed=speed;}else{effect.showEffect=`${type}Toggle`;effect.hideEffect=`${type}Toggle`;effect.showSpeed=speed;}return effect;};Drupal.Ajax.prototype.error=function(xmlhttprequest,uri,customMessage){if(this.progress.element)$(this.progress.element).remove();if(this.progress.object)this.progress.object.stopMonitoring();$(this.wrapper).show();$(this.element).prop('disabled',false);if(this.$form&&document.body.contains(this.$form.get(0))){const settings=this.settings||drupalSettings;Drupal.attachBehaviors(this.$form.get(0),settings);}throw new Drupal.AjaxError(xmlhttprequest,uri,customMessage);};Drupal.theme.ajaxWrapperNewContent=($newContent,ajax,response)=>(response.effect||ajax.effect)!=='none'&&$newContent.filter((i)=>!(($newContent[i].nodeName==='#comment'||($newContent[i].nodeName==='#text'&&/^(\s|\n|\r)*$/.test($newContent[i].textContent))))).length>1?Drupal.theme('ajaxWrapperMultipleRootElements',$newContent):$newContent;Drupal.theme.ajaxWrapperMultipleRootElements=($elements)=>$('<div></div>').append($elements);Drupal.AjaxCommands=function(){};Drupal.AjaxCommands.prototype={insert(ajax,response){const $wrapper=response.selector?$(response.selector):$(ajax.wrapper);const method=response.method||ajax.method;const effect=ajax.getEffect(response);const settings=response.settings||ajax.settings||drupalSettings;const parseHTML=(htmlString)=>{const fragment=document.createDocumentFragment();const template=fragment.appendChild(document.createElement('template'));template.innerHTML=htmlString;return template.content.childNodes;};let $newContent=$(parseHTML(response.data));
42$newContent=Drupal.theme('ajaxWrapperNewContent',$newContent,ajax,response);switch(method){case 'html':case 'replaceWith':case 'replaceAll':case 'empty':case 'remove':Drupal.detachBehaviors($wrapper.get(0),settings);break;default:break;}$wrapper[method]($newContent);if(effect.showEffect!=='show')$newContent.hide();const $ajaxNewContent=$newContent.find('.ajax-new-content');if($ajaxNewContent.length){$ajaxNewContent.hide();$newContent.show();$ajaxNewContent[effect.showEffect](effect.showSpeed);}else{if(effect.showEffect!=='show')$newContent[effect.showEffect](effect.showSpeed);}$newContent.each((index,element)=>{if(element.nodeType===Node.ELEMENT_NODE&&document.documentElement.contains(element))Drupal.attachBehaviors(element,settings);});},remove(ajax,response,status){const settings=response.settings||ajax.settings||drupalSettings;$(response.selector).each(function(){Drupal.detachBehaviors(this,settings);}).remove();},changed(ajax,response,status){const $element=$(response.selector);if(!$element.hasClass('ajax-changed')){$element.addClass('ajax-changed');if(response.asterisk)$element.find(response.asterisk).append(` <abbr class="ajax-changed" title="${Drupal.t('Changed')}">*</abbr> `);}},alert(ajax,response,status){window.alert(response.text);},announce(ajax,response){if(response.priority)Drupal.announce(response.text,response.priority);else Drupal.announce(response.text);},redirect(ajax,response,status){window.location=response.url;},css(ajax,response,status){$(response.selector).css(response.argument);},settings(ajax,response,status){const ajaxSettings=drupalSettings.ajax;if(ajaxSettings)Drupal.ajax.expired().forEach((instance)=>{if(instance.selector){const selector=instance.selector.replace('#','');if(selector in ajaxSettings)delete ajaxSettings[selector];}});if(response.merge)$.extend(true,drupalSettings,response.settings);else ajax.settings=response.settings;},data(ajax,response,status){$(response.selector).data(response.name,response.value);},focusFirst(ajax,response,status){let focusChanged=false;const container=document.querySelector(response.selector);if(container){const tabbableElements=tabbable(container);if(tabbableElements.length){tabbableElements[0].focus();focusChanged=true;}else{if(isFocusable(container)){container.focus();focusChanged=true;}}}if(ajax.hasOwnProperty('element')&&!focusChanged)ajax.element.focus();},invoke(ajax,response,status){const $element=$(response.selector);$element[response.method](...response.args);},restripe(ajax,response,status){$(response.selector).find('> tbody > tr:visible, > tr:visible').removeClass('odd even').filter(':even').addClass('odd').end().filter(':odd').addClass('even');},update_build_id(ajax,response,status){document.querySelectorAll(`input[name="form_build_id"][value="${response.old}"]`).forEach((item)=>{item.value=response.new;});},add_css(ajax,response,status){const allUniqueBundleIds=response.data.map(function(style){const uniqueBundleId=style.href;if(!loadjs.isDefined(uniqueBundleId))loadjs(`css!${style.href}`,uniqueBundleId,{before(path,styleEl){Object.keys(style).forEach((attributeKey)=>{styleEl.setAttribute(attributeKey,style[attributeKey]);});}});return uniqueBundleId;});return new Promise((resolve,reject)=>{loadjs.ready(allUniqueBundleIds,{success(){resolve();},error(depsNotFound){const message=Drupal.t(`The following files could not be loaded: @dependencies`,{'@dependencies':depsNotFound.join(', ')});reject(message);}});});},message(ajax,response){const messages=new Drupal.Message(document.querySelector(response.messageWrapperQuerySelector));if(response.clearPrevious)messages.clear();messages.add(response.message,response.messageOptions);},add_js(ajax,response,status){const parentEl=document.querySelector(response.selector||'body');const settings=ajax.settings||drupalSettings;const allUniqueBundleIds=response.data.map((script)=>{const uniqueBundleId=script.src;if(!loadjs.isDefined(uniqueBundleId))loadjs(script.src,uniqueBundleId,{async:false,before(path,scriptEl){Object.keys(script).forEach((attributeKey)=>{scriptEl.setAttribute(attributeKey,script[attributeKey]);});parentEl.appendChild(scriptEl);return false;}});return uniqueBundleId;});return new Promise((resolve,reject)=>{loadjs.ready(allUniqueBundleIds,{success(){Drupal.attachBehaviors(parentEl,settings);resolve();},error(depsNotFound){const message=Drupal.t(`The following files could not be loaded: @dependencies`,{'@dependencies':depsNotFound.join(', ')});reject(message);}});});},scrollTop(ajax,response){document.querySelector(response.selector)?.scrollIntoView();}};const stopEvent=(xhr,settings)=>{return (xhr.getResponseHeader('X-Drupal-Ajax-Token')==='1'&&typeof settings.isInProgress==='function'&&settings.isInProgress());};$.extend(true,$.event.special,{ajaxSuccess:{trigger(event,xhr,settings){if(stopEvent(xhr,settings))return false;}},ajaxComplete:{trigger(event,xhr,settings){if(stopEvent(xhr,settings)){$.active++;return false;}}}});})(jQuery,window,Drupal,drupalSettings,loadjs,window.tabbable);; 43/*! 44 * Bootstrap v5.1.3 (https://getbootstrap.com/) 45 * Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors) 46 * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) 47 */ 48!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("@popperjs/core")):"function"==typeof define&&define.amd?define(["@popperjs/core"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).bootstrap=e(t.Popper)}(this,(function(t){"use strict";function e(t){if(t&&t.__esModule)return t;const e=Object.create(null);if(t)for(const i in t)if("default"!==i){const s=Object.getOwnPropertyDescriptor(t,i);Object.defineProperty(e,i,s.get?s:{enumerable:!0,get:()=>t[i]})}return e.default=t,Object.freeze(e)}const i=e(t),s="transitionend",n=t=>{let e=t.getAttribute("data-bs-target");if(!e||"#"===e){let i=t.getAttribute("href");if(!i||!i.includes("#")&&!i.startsWith("."))return null;i.includes("#")&&!i.startsWith("#")&&(i=`#${i.split("#")[1]}`),e=i&&"#"!==i?i.trim():null}return e},o=t=>{const e=n(t);return e&&document.querySelector(e)?e:null},r=t=>{const e=n(t);return e?document.querySelector(e):null},a=t=>{t.dispatchEvent(new Event(s))},l=t=>!(!t||"object"!=typeof t)&&(void 0!==t.jquery&&(t=t[0]),void 0!==t.nodeType),c=t=>l(t)?t.jquery?t[0]:t:"string"==typeof t&&t.length>0?document.querySelector(t):null,h=(t,e,i)=>
48{Object.keys(i).forEach((s=>{const n=i[s],o=e[s],r=o&&l(o)?"element":null==(a=o)?`${a}`:{}.toString.call(a).match(/\s([a-z]+)/i)[1].toLowerCase();var a;if(!new RegExp(n).test(r))throw new TypeError(`${t.toUpperCase()}: Option "${s}" provided type "${r}" but expected type "${n}".`)}))},d=t=>!(!l(t)||0===t.getClientRects().length)&&"visible"===getComputedStyle(t).getPropertyValue("visibility"),u=t=>!t||t.nodeType!==Node.ELEMENT_NODE||!!t.classList.contains("disabled")||(void 0!==t.disabled?t.disabled:t.hasAttribute("disabled")&&"false"!==t.getAttribute("disabled")),g=t=>{if(!document.documentElement.attachShadow)return null;if("function"==typeof t.getRootNode){const e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?g(t.parentNode):null},_=()=>{},f=t=>{t.offsetHeight},p=()=>{const{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},m=[],b=()=>"rtl"===document.documentElement.dir,v=t=>{var e;e=()=>{const e=p();if(e){const i=t.NAME,s=e.fn[i];e.fn[i]=t.jQueryInterface,e.fn[i].Constructor=t,e.fn[i].noConflict=()=>(e.fn[i]=s,t.jQueryInterface)}},"loading"===document.readyState?(m.length||document.addEventListener("DOMContentLoaded",(()=>{m.forEach((t=>t()))})),m.push(e)):e()},y=t=>{"function"==typeof t&&t()},E=(t,e,i=!0)=>{if(!i)return void y(t);const n=(t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:i}=window.getComputedStyle(t);const s=Number.parseFloat(e),n=Number.parseFloat(i);return s||n?(e=e.split(",")[0],i=i.split(",")[0],1e3*(Number.parseFloat(e)+Number.parseFloat(i))):0})(e)+5;let o=!1;const r=({target:i})=>{i===e&&(o=!0,e.removeEventListener(s,r),y(t))};e.addEventListener(s,r),setTimeout((()=>{o||a(e)}),n)},w=(t,e,i,s)=>{let n=t.indexOf(e);if(-1===n)return t[!i&&s?t.length-1:0];const o=t.length;return n+=i?1:-1,s&&(n=(n+o)%o),t[Math.max(0,Math.min(n,o-1))]},A=/[^.]*(?=\..*)\.|.*/,T=/\..*/,C=/::\d+$/,k={};let L=1;
48const S={mouseenter:"mouseover",mouseleave:"mouseout"},O=/^(mouseenter|mouseleave)/i,N=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function D(t,e){return e&&`${e}::${L++}`||t.uidEvent||L++}function I(t){const e=D(t);return t.uidEvent=e,k[e]=k[e]||{},k[e]}function P(t,e,i=null){const s=Object.keys(t);for(let n=0,o=s.length;n<o;n++){const o=t[s[n]];if(o.originalHandler===e&&o.delegationSelector===i)return o}return null}function x(t,e,i){const s="string"==typeof e,n=s?i:e;let o=H(t);return N.has(o)||(o=t),[s,n,o]}function M(t,e,i,s,n){if("string"!=typeof e||!t)return;if(i||(i=s,s=null),O.test(e)){const t=t=>function(e){if(!e.relatedTarget||e.relatedTarget!==e.delegateTarget&&!e.delegateTarget.contains(e.relatedTarget))return t.call(this,e)};s?s=t(s):i=t(i)}const[o,r,a]=x(e,i,s),l=I(t),c=l[a]||(l[a]={}),h=P(c,r,o?i:null);if(h)return void(h.oneOff=h.oneOff&&n);const d=D(r,e.replace(A,"")),u=o?function(t,e,i){return function s(n){const o=t.querySelectorAll(e);for(let{target:r}=n;r&&r!==this;r=r.parentNode)for(let a=o.length;a--;)if(o[a]===r)return n.delegateTarget=r,s.oneOff&&$.off(t,n.type,e,i),i.apply(r,[n]);return null}}(t,i,s):function(t,e){return function i(s){return s.delegateTarget=t,i.oneOff&&$.off(t,s.type,e),e.apply(t,[s])}}(t,i);u.delegationSelector=o?i:null,u.originalHandler=r,u.oneOff=n,u.uidEvent=d,c[d]=u,t.addEventListener(a,u,o)}function j(t,e,i,s,n){const o=P(e[i],s,n);o&&(t.removeEventListener(i,o,Boolean(n)),delete e[i][o.uidEvent])}function H(t){return t=t.replace(T,""),S[t]||t}const $={on(t,e,i,s){M(t,e,i,s,!1)},one(t,e,i,s){M(t,e,i,s,!0)},off(t,e,i,s){if("string"!=typeof e||!t)return;const[n,o,r]=x(e,i,s),a=r!==e,l=I(t),c=e.startsWith(".");if(void 0!==o){if(!l||!l[r])return;return void j(t,l,r,o,n?i:null)}c&&Object.keys(l).forEach((i=>{!function(t,e,i,s){const n=e[i]||{};Object.keys(n).forEach((o=>{if(o.includes(s)){const s=n[o];j(t,e,i,s.originalHandler,s.delegationSelector)}}))}(t,l,i,e.slice(1))}));const h=l[r]||{};Object.keys(h).forEach((i=>{const s=i.replace(C,"");if(!a||e.includes(s)){const e=h[i];j(t,l,r,e.originalHandler,e.delegationSelector)}}))},trigger(t,e,i){if("string"!=typeof e||!t)return null;const s=p(),n=H(e),o=e!==n,r=N.has(n);let a,l=!0,c=!0,h=!1,d=null;return o&&s&&(a=s.Event(e,i),s(t).trigger(a),l=!a.isPropagationStopped(),c=!a.isImmediatePropagationStopped(),h=a.isDefaultPrevented()),r?(d=document.createEvent("HTMLEvents"),d.initEvent(n,l,!0)):d=new CustomEvent(e,{bubbles:l,cancelable:!0}
48),void 0!==i&&Object.keys(i).forEach((t=>{Object.defineProperty(d,t,{get:()=>i[t]})})),h&&d.preventDefault(),c&&t.dispatchEvent(d),d.defaultPrevented&&void 0!==a&&a.preventDefault(),d}},B=new Map,z={set(t,e,i){B.has(t)||B.set(t,new Map);const s=B.get(t);s.has(e)||0===s.size?s.set(e,i):console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(s.keys())[0]}.`)},get:(t,e)=>B.has(t)&&B.get(t).get(e)||null,remove(t,e){if(!B.has(t))return;const i=B.get(t);i.delete(e),0===i.size&&B.delete(t)}};class R{constructor(t){(t=c(t))&&(this._element=t,z.set(this._element,this.constructor.DATA_KEY,this))}dispose(){z.remove(this._element,this.constructor.DATA_KEY),$.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach((t=>{this[t]=null}))}_queueCallback(t,e,i=!0){E(t,e,i)}static getInstance(t){return z.get(c(t),this.DATA_KEY)}static getOrCreateInstance(t,e={}){return this.getInstance(t)||new this(t,"object"==typeof e?e:null)}static get VERSION(){return"5.1.3"}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}}const F=(t,e="hide")=>{const i=`click.dismiss${t.EVENT_KEY}`,s=t.NAME;$.on(document,i,`[data-bs-dismiss="${s}"]`,(function(i){if(["A","AREA"].includes(this.tagName)&&i.preventDefault(),u(this))return;const n=r(this)||this.closest(`.${s}`);t.getOrCreateInstance(n)[e]()}))};class q extends R{static get NAME(){return"alert"}close(){if($.trigger(this._element,"close.bs.alert").defaultPrevented)return;this._element.classList.remove("show");const t=this._element.classList.contains("fade");this._queueCallback((()=>this._destroyElement()),this._element,t)}_destroyElement(){this._element.remove(),$.trigger(this._element,"closed.bs.alert"),this.dispose()}static jQueryInterface(t){return this.each((function(){const e=q.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}F(q,"close"),v(q);const W='[data-bs-toggle="button"]';class U extends R{static get NAME(){return"button"}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle("active"))}static jQueryInterface(t){return this.each((function(){const e=U.getOrCreateInstance(this);"toggle"===t&&e[t]()}))}}function K(t){return"true"===t||"false"!==t&&(t===Number(t).toString()?Number(t):""===t||"null"===t?null:t)}function V(t){return t.replace(/[A-Z]/g,(t=>`-${t.toLowerCase()}`))}$.on(document,"click.bs.button.data-api",W,(t=>{t.preventDefault();const e=t.target.closest(W);U.getOrCreateInstance(e).toggle()})),v(U);const X={setDataAttribute(t,e,i){t.setAttribute(`data-bs-${V(e)}`,i)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${V(e)}`)},getDataAttributes(t){if(!t)return{};const e={};return Object.keys(t.dataset).filter((t=>t.startsWith("bs"))).forEach((i=>{let s=i.replace(/^bs/,"");s=s.charAt(0).toLowerCase()+s.slice(1,s.length),e[s]=K(t.dataset[i])})),e},getDataAttribute:(t,e)=>K(t.getAttribute(`data-bs-${V(e)}`)),offset(t){const e=t.getBoundingClientRect();return{top:e.top+window.pageYOffset,left:e.left+window.pageXOffset}},position:t=>({top:t.offsetTop,left:t.offsetLeft})},Y={find:(t,e=document.documentElement)=>[].concat(...Element.prototype.querySelectorAll.call(e,t)),findOne:(t,e=document.documentElement)=>Element.prototype.querySelector.call(e,t),children:(t,e)=>[].concat(...t.children).filter((t=>t.matches(e))),parents(t,e){const i=[];let s=t.parentNode;for(;s&&s.nodeType===Node.ELEMENT_NODE&&3!==s.nodeType;)s.matches(e)&&i.push(s),s=s.parentNode;return i},prev(t,e){let i=t.previousElementSibling;for(;i;){if(i.matches(e))return[i];i=i.previousElementSibling}return[]},next(t,e){let i=t.nextElementSibling;for(;i;){if(i.matches(e))return[i];i=i.nextElementSibling}return[]},focusableChildren(t){const e=["a","button","input","textarea","select","details","[tabindex]",'[contenteditable="true"]'].map((t=>`${t}:not([tabindex^="-"])`)).join(", ");return this.find(e,t).filter((t=>!u(t)&&d(t)))}},Q="carousel",G={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Z={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},J="next",tt="prev",et="left",it="right",st={ArrowLeft:it,ArrowRight:et},nt="slid.bs.carousel",ot="active",rt=".active.carousel-item";class at extends R{constructor(t,e){super(t),this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(e),this._indicatorsElement=Y.findOne(".carousel-indicators",this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return G}static get NAME(){return Q}
48next(){this._slide(J)}nextWhenVisible(){!document.hidden&&d(this._element)&&this.next()}prev(){this._slide(tt)}pause(t){t||(this._isPaused=!0),Y.findOne(".carousel-item-next, .carousel-item-prev",this._element)&&(a(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(t){t||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(t){this._activeElement=Y.findOne(rt,this._element);const e=this._getItemIndex(this._activeElement);if(t>this._items.length-1||t<0)return;if(this._isSliding)return void $.one(this._element,nt,(()=>this.to(t)));if(e===t)return this.pause(),void this.cycle();const i=t>e?J:tt;this._slide(i,this._items[t])}_getConfig(t){return t={...G,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}},h(Q,t,Z),t}_handleSwipe(){const t=Math.abs(this.touchDeltaX);if(t<=40)return;const e=t/this.touchDeltaX;this.touchDeltaX=0,e&&this._slide(e>0?it:et)}_addEventListeners(){this._config.keyboard&&$.on(this._element,"keydown.bs.carousel",(t=>this._keydown(t))),"hover"===this._config.pause&&($.on(this._element,"mouseenter.bs.carousel",(t=>this.pause(t))),$.on(this._element,"mouseleave.bs.carousel",(t=>this.cycle(t)))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){const t=t=>this._pointerEvent&&("pen"===t.pointerType||"touch"===t.pointerType),e=e=>{t(e)?this.touchStartX=e.clientX:this._pointerEvent||(this.touchStartX=e.touches[0].clientX)},i=t=>{this.touchDeltaX=t.touches&&t.touches.length>1?0:t.touches[0].clientX-this.touchStartX},s=e=>{t(e)&&(this.touchDeltaX=e.clientX-this.touchStartX),this._handleSwipe(),"hover"===this._config.pause&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout((t=>this.cycle(t)),500+this._config.interval))};Y.find(".carousel-item img",this._element).forEach((t=>{$.on(t,"dragstart.bs.carousel",(t=>t.preventDefault()))})),this._pointerEvent?($.on(this._element,"pointerdown.bs.carousel",(t=>e(t))),$.on(this._element,"pointerup.bs.carousel",(t=>s(t))),this._element.classList.add("pointer-event")):($.on(this._element,"touchstart.bs.carousel",(t=>e(t))),$.on(this._element,"touchmove.bs.carousel",(t=>i(t))),$.on(this._element,"touchend.bs.carousel",(t=>s(t))))}_keydown(t){if(/input|textarea/i.test(t.target.tagName))return;const e=st[t.key];e&&(t.preventDefault(),this._slide(e))}_getItemIndex(t){return this._items=t&&t.parentNode?Y.find(".carousel-item",t.parentNode):[],this._items.indexOf(t)}_getItemByOrder(t,e){const i=t===J;return w(this._items,e,i,this._config.wrap)}_triggerSlideEvent(t,e){const i=this._getItemIndex(t),s=this._getItemIndex(Y.findOne(rt,this._element));return $.trigger(this._element,"slide.bs.carousel",{relatedTarget:t,direction:e,from:s,to:i})}_setActiveIndicatorElement(t){if(this._indicatorsElement){const e=Y.findOne(".active",this._indicatorsElement);e.classList.remove(ot),e.removeAttribute("aria-current");const i=Y.find("[data-bs-target]",this._indicatorsElement);for(let e=0;e<i.length;e++)if(Number.parseInt(i[e].getAttribute("data-bs-slide-to"),10)===this._getItemIndex(t)){i[e].classList.add(ot),i[e].setAttribute("aria-current","true");break}}}_updateInterval(){const t=this._activeElement||Y.findOne(rt,this._element);if(!t)return;const e=Number.parseInt(t.getAttribute("data-bs-interval"),10);e?(this._config.defaultInterval=this._config.defaultInterval||this._config.interval,this._config.interval=e):this._config.interval=this._config.defaultInterval||this._config.interval}_slide(t,e){const i=this._directionToOrder(t),s=Y.findOne(rt,this._element),n=this._getItemIndex(s),o=e||this._getItemByOrder(i,s),r=this._getItemIndex(o),a=Boolean(this._interval),l=i===J,c=l?"carousel-item-start":"carousel-item-end",h=l?"carousel-item-next":"carousel-item-prev",d=this._orderToDirection(i);if(o&&o.classList.contains(ot))return void(this._isSliding=!1);if(this._isSliding)return;if(this._triggerSlideEvent(o,d).defaultPrevented)return;if(!s||!o)return;this._isSliding=!0,a&&this.pause(),this._setActiveIndicatorElement(o),this._activeElement=o;const u=()=>{$.trigger(this._element,nt,{relatedTarget:o,direction:d,from:n,to:r})};if(this._element.classList.contains("slide")){o.classList.add(h),f(o),s.classList.add(c),o.classList.add(c);const t=()=>{o.classList.remove(c,h),o.classList.add(ot),s.classList.remove(ot,h,c),this._isSliding=!1,setTimeout(u,0)};this._queueCallback(t,s,!0)}else s.classList.remove(ot),o.classList.add(ot),this._isSliding=!1,u();a&&this.cycle()}_directionToOrder(t){return[it,et].includes(t)?b()?t===et?tt:J:t===et?J:tt:t}_orderToDirection(t){return[J,tt].includes(t)?b()?t===tt?et:it:t===tt?it:et:t}static carouselInterface(t,e){const i=at.getOrCreateInstance(t,e);let{_config:s}=i;"object"==typeof e&&(s={...s,...e});const n="string"==typeof e?e:s.slide;if("number"==typeof e)i.to(e);else if("string"==typeof n){if(void 0===i[n])throw new TypeError(`No method n
48amed "${n}"`);i[n]()}else s.interval&&s.ride&&(i.pause(),i.cycle())}static jQueryInterface(t){return this.each((function(){at.carouselInterface(this,t)}))}static dataApiClickHandler(t){const e=r(this);if(!e||!e.classList.contains("carousel"))return;const i={...X.getDataAttributes(e),...X.getDataAttributes(this)},s=this.getAttribute("data-bs-slide-to");s&&(i.interval=!1),at.carouselInterface(e,i),s&&at.getInstance(e).to(s),t.preventDefault()}}$.on(document,"click.bs.carousel.data-api","[data-bs-slide], [data-bs-slide-to]",at.dataApiClickHandler),$.on(window,"load.bs.carousel.data-api",(()=>{const t=Y.find('[data-bs-ride="carousel"]');for(let e=0,i=t.length;e<i;e++)at.carouselInterface(t[e],at.getInstance(t[e]))})),v(at);const lt="collapse",ct={toggle:!0,parent:null},ht={toggle:"boolean",parent:"(null|element)"},dt="show",ut="collapse",gt="collapsing",_t="collapsed",ft=":scope .collapse .collapse",pt='[data-bs-toggle="collapse"]';class mt extends R{constructor(t,e){super(t),this._isTransitioning=!1,this._config=this._getConfig(e),this._triggerArray=[];const i=Y.find(pt);for(let t=0,e=i.length;t<e;t++){const e=i[t],s=o(e),n=Y.find(s).filter((t=>t===this._element));null!==s&&n.length&&(this._selector=s,this._triggerArray.push(e))}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return ct}static get NAME(){return lt}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t,e=[];if(this._config.parent){const t=Y.find(ft,this._config.parent);e=Y.find(".collapse.show, .collapse.collapsing",this._config.parent).filter((e=>!t.includes(e)))}const i=Y.findOne(this._selector);if(e.length){const s=e.find((t=>i!==t));if(t=s?mt.getInstance(s):null,t&&t._isTransitioning)return}if($.trigger(this._element,"show.bs.collapse").defaultPrevented)return;e.forEach((e=>{i!==e&&mt.getOrCreateInstance(e,{toggle:!1}).hide(),t||z.set(e,"bs.collapse",null)}));const s=this._getDimension();this._element.classList.remove(ut),this._element.classList.add(gt),this._element.style[s]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;const n=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(gt),this._element.classList.add(ut,dt),this._element.style[s]="",$.trigger(this._element,"shown.bs.collapse")}),this._element,!0),this._element.style[s]=`${this._element[n]}px`}hide(){if(this._isTransitioning||!this._isShown())return;if($.trigger(this._element,"hide.bs.collapse").defaultPrevented)return;const t=this._getDimension();this._element.style[t]=`${this._element.getBoundingClientRect()[t]}px`,f(this._element),this._element.classList.add(gt),this._element.classList.remove(ut,dt);const e=this._triggerArray.length;for(let t=0;t<e;t++){const e=this._triggerArray[t],i=r(e);i&&!this._isShown(i)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0,this._element.style[t]="",this._queueCallback((()=>{this._isTransitioning=!1,this._element.classList.remove(gt),this._element.classList.add(ut),$.trigger(this._element,"hidden.bs.collapse")}),this._element,!0)}_isShown(t=this._element){return t.classList.contains(dt)}_getConfig(t){return(t={...ct,...X.getDataAttributes(this._element),...t}).toggle=Boolean(t.toggle),t.parent=c(t.parent),h(lt,t,ht),t}_getDimension(){return this._element.classList.contains("collapse-horizontal")?"width":"height"}_initializeChildren(){if(!this._config.parent)return;const t=Y.find(ft,this._config.parent);Y.find(pt,this._config.parent).filter((e=>!t.includes(e))).forEach((t=>{const e=r(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}))}_addAriaAndCollapsedClass(t,e){t.length&&t.forEach((t=>{e?t.classList.remove(_t):t.classList.add(_t),t.setAttribute("aria-expanded",e)}))}static jQueryInterface(t){return this.each((function(){const e={};"string"==typeof t&&/show|hide/.test(t)&&(e.toggle=!1);const i=mt.getOrCreateInstance(this,e);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method n
48amed "${t}"`);i[t]()}}))}}$.on(document,"click.bs.collapse.data-api",pt,(function(t){("A"===t.target.tagName||t.delegateTarget&&"A"===t.delegateTarget.tagName)&&t.preventDefault();const e=o(this);Y.find(e).forEach((t=>{mt.getOrCreateInstance(t,{toggle:!1}).toggle()}))})),v(mt);const bt="dropdown",vt="Escape",yt="Space",Et="ArrowUp",wt="ArrowDown",At=new RegExp("ArrowUp|ArrowDown|Escape"),Tt="click.bs.dropdown.data-api",Ct="keydown.bs.dropdown.data-api",kt="show",Lt='[data-bs-toggle="dropdown"]',St=".dropdown-menu",Ot=b()?"top-end":"top-start",Nt=b()?"top-start":"top-end",Dt=b()?"bottom-end":"bottom-start",It=b()?"bottom-start":"bottom-end",Pt=b()?"left-start":"right-start",xt=b()?"right-start":"left-start",Mt={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},jt={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"};class Ht extends R{constructor(t,e){super(t),this._popper=null,this._config=this._getConfig(e),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar()}static get Default(){return Mt}static get DefaultType(){return jt}static get NAME(){return bt}toggle(){return this._isShown()?this.hide():this.show()}show(){if(u(this._element)||this._isShown(this._menu))return;const t={relatedTarget:this._element};if($.trigger(this._element,"show.bs.dropdown",t).defaultPrevented)return;const e=Ht.getParentFromElement(this._element);this._inNavbar?X.setDataAttribute(this._menu,"popper","none"):this._createPopper(e),"ontouchstart"in document.documentElement&&!e.closest(".navbar-nav")&&[].concat(...document.body.children).forEach((t=>$.on(t,"mouseover",_))),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.add(kt),this._element.classList.add(kt),$.trigger(this._element,"shown.bs.dropdown",t)}hide(){if(u(this._element)||!this._isShown(this._menu))return;const t={relatedTarget:this._element};this._completeHide(t)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_completeHide(t){$.trigger(this._element,"hide.bs.dropdown",t).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>$.off(t,"mouseover",_))),this._popper&&this._popper.destroy(),this._menu.classList.remove(kt),this._element.classList.remove(kt),this._element.setAttribute("aria-expanded","false"),X.removeDataAttribute(this._menu,"popper"),$.trigger(this._element,"hidden.bs.dropdown",t))}_getConfig(t){if(t={...this.constructor.Default,...X.getDataAttributes(this._element),...t},h(bt,t,this.constructor.DefaultType),"object"==typeof t.reference&&!l(t.reference)&&"function"!=typeof t.reference.getBoundingClientRect)throw new TypeError(`${bt.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return t}_createPopper(t){if(void 0===i)throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let e=this._element;"parent"===this._config.reference?e=t:l(this._config.reference)?e=c(this._config.reference):"object"==typeof this._config.reference&&(e=this._config.reference);const s=this._getPopperConfig(),n=s.modifiers.find((t=>"applyStyles"===t.name&&!1===t.enabled));this._popper=i.createPopper(e,this._menu,s),n&&X.setDataAttribute(this._menu,"popper","static")}_isShown(t=this._element){return t.classList.contains(kt)}_getMenuElement(){return Y.next(this._element,St)[0]}_getPlacement(){const t=this._element.parentNode;if(t.classList.contains("dropend"))return Pt;if(t.classList.contains("dropstart"))return xt;const e="end"===getComputedStyle(this._menu).getPropertyValue("--bs-position").trim();return t.classList.contains("dropup")?e?Nt:Ot:e?It:Dt}
48_detectNavbar(){return null!==this._element.closest(".navbar")}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_getPopperConfig(){const t={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return"static"===this._config.display&&(t.modifiers=[{name:"applyStyles",enabled:!1}]),{...t,..."function"==typeof this._config.popperConfig?this._config.popperConfig(t):this._config.popperConfig}}_selectMenuItem({key:t,target:e}){const i=Y.find(".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",this._menu).filter(d);i.length&&w(i,e,t===wt,!i.includes(e)).focus()}static jQueryInterface(t){return this.each((function(){const e=Ht.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}static clearMenus(t){if(t&&(2===t.button||"keyup"===t.type&&"Tab"!==t.key))return;const e=Y.find(Lt);for(let i=0,s=e.length;i<s;i++){const s=Ht.getInstance(e[i]);if(!s||!1===s._config.autoClose)continue;if(!s._isShown())continue;const n={relatedTarget:s._element};if(t){const e=t.composedPath(),i=e.includes(s._menu);if(e.includes(s._element)||"inside"===s._config.autoClose&&!i||"outside"===s._config.autoClose&&i)continue;if(s._menu.contains(t.target)&&("keyup"===t.type&&"Tab"===t.key||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;"click"===t.type&&(n.clickEvent=t)}s._completeHide(n)}}static getParentFromElement(t){return r(t)||t.parentNode}static dataApiKeydownHandler(t){if(/input|textarea/i.test(t.target.tagName)?t.key===yt||t.key!==vt&&(t.key!==wt&&t.key!==Et||t.target.closest(St)):!At.test(t.key))return;const e=this.classList.contains(kt);if(!e&&t.key===vt)return;if(t.preventDefault(),t.stopPropagation(),u(this))return;const i=this.matches(Lt)?this:Y.prev(this,Lt)[0],s=Ht.getOrCreateInstance(i);if(t.key!==vt)return t.key===Et||t.key===wt?(e||s.show(),void s._selectMenuItem(t)):void(e&&t.key!==yt||Ht.clearMenus());s.hide()}}$.on(document,Ct,Lt,Ht.dataApiKeydownHandler),$.on(document,Ct,St,Ht.dataApiKeydownHandler),$.on(document,Tt,Ht.clearMenus),$.on(document,"keyup.bs.dropdown.data-api",Ht.clearMenus),$.on(document,Tt,Lt,(function(t){t.preventDefault(),Ht.getOrCreateInstance(this).toggle()})),v(Ht);const $t=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Bt=".sticky-top";class zt{constructor(){this._element=document.body}getWidth(){const t=document.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}hide(){const t=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",(e=>e+t)),this._setElementAttributes($t,"paddingRight",(e=>e+t)),this._setElementAttributes(Bt,"marginRight",(e=>e-t))}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(t,e,i){const s=this.getWidth();this._applyManipulationCallback(t,(t=>{if(t!==this._element&&window.innerWidth>t.clientWidth+s)return;this._saveInitialAttribute(t,e);const n=window.getComputedStyle(t)[e];t.style[e]=`${i(Number.parseFloat(n))}px`}))}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes($t,"paddingRight"),this._resetElementAttributes(Bt,"marginRight")}_saveInitialAttribute(t,e){const i=t.style[e];i&&X.setDataAttribute(t,e,i)}_resetElementAttributes(t,e){this._applyManipulationCallback(t,(t=>{const i=X.getDataAttribute(t,e);void 0===i?t.style.removeProperty(e):(X.removeDataAttribute(t,e),t.style[e]=i)}))}_applyManipulationCallback(t,e){l(t)?e(t):Y.find(t,this._element).forEach(e)}isOverflowing(){return this.getWidth()>0}}const Rt={className:"modal-backdrop",isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},Ft={className:"string",isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},qt="show",Wt="mousedown.bs.backdrop";class Ut{constructor(t){this._config=this._getConfig(t),this._isAppended=!1,this._element=null}show(t){this._config.isVisible?(this._append(),this._config.isAnimated&&f(this._getElement()),this._getElement().classList.add(qt),this._emulateAnimation((()=>{y(t)}))):y(t)}hide(t){this._config.isVisible?(this._getElement().classList.remove(qt),this._emulateAnimation((()=>{this.dispose(),y(t)}))):y(t)}_getElement(){if(!this._element){const t=document.createElement("div");t.className=this._config.className,this._config.isAnimated&&t.classList.add("fade"),this._element=t}return this._element}_getConfig(t){return(t={...Rt,..."object"==typeof t?t:{}}).rootElement=c(t.rootElement),h("backdrop",t,Ft),t}_append(){this._isAppended||(this._config.rootElement.append(this._getElement()),$.on(this._getElement(),Wt,(()=>{y(this._config.clickCallback)})),this._isAppended=!0)}dispose(){this._isAppended&&($.off(this._element,Wt),this._element.remove(),this._isAppended=!1)}_emulateAnimation(t){E(t,this._getElement(),this._config.isAnimated)}}const Kt={trapElement:null,autofocus:!0},Vt={trapElement:"element",autofocus:"boolean"}
48,Xt=".bs.focustrap",Yt="backward";class Qt{constructor(t){this._config=this._getConfig(t),this._isActive=!1,this._lastTabNavDirection=null}activate(){const{trapElement:t,autofocus:e}=this._config;this._isActive||(e&&t.focus(),$.off(document,Xt),$.on(document,"focusin.bs.focustrap",(t=>this._handleFocusin(t))),$.on(document,"keydown.tab.bs.focustrap",(t=>this._handleKeydown(t))),this._isActive=!0)}deactivate(){this._isActive&&(this._isActive=!1,$.off(document,Xt))}_handleFocusin(t){const{target:e}=t,{trapElement:i}=this._config;if(e===document||e===i||i.contains(e))return;const s=Y.focusableChildren(i);0===s.length?i.focus():this._lastTabNavDirection===Yt?s[s.length-1].focus():s[0].focus()}_handleKeydown(t){"Tab"===t.key&&(this._lastTabNavDirection=t.shiftKey?Yt:"forward")}_getConfig(t){return t={...Kt,..."object"==typeof t?t:{}},h("focustrap",t,Vt),t}}const Gt="modal",Zt="Escape",Jt={backdrop:!0,keyboard:!0,focus:!0},te={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},ee="hidden.bs.modal",ie="show.bs.modal",se="resize.bs.modal",ne="click.dismiss.bs.modal",oe="keydown.dismiss.bs.modal",re="mousedown.dismiss.bs.modal",ae="modal-open",le="show",ce="modal-static";class he extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._dialog=Y.findOne(".modal-dialog",this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new zt}static get Default(){return Jt}static get NAME(){return Gt}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||this._isTransitioning||$.trigger(this._element,ie,{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(ae),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),$.on(this._dialog,re,(()=>{$.one(this._element,"mouseup.dismiss.bs.modal",(t=>{t.target===this._element&&(this._ignoreBackdropClick=!0)}))})),this._showBackdrop((()=>this._showElement(t))))}hide(){if(!this._isShown||this._isTransitioning)return;if($.trigger(this._element,"hide.bs.modal").defaultPrevented)return;this._isShown=!1;const t=this._isAnimated();t&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),this._focustrap.deactivate(),this._element.classList.remove(le),$.off(this._element,ne),$.off(this._dialog,re),this._queueCallback((()=>this._hideModal()),this._element,t)}dispose(){[window,this._dialog].forEach((t=>$.off(t,".bs.modal"))),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ut({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Qt({trapElement:this._element})}_getConfig(t){return t={...Jt,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}},h(Gt,t,te),t}_showElement(t){const e=this._isAnimated(),i=Y.findOne(".modal-body",this._dialog);this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE||document.body.append(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),e&&f(this._element),this._element.classList.add(le),this._queueCallback((()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,$.trigger(this._element,"shown.bs.modal",{relatedTarget:t})}),this._dialog,e)}_setEscapeEvent(){this._isShown?$.on(this._element,oe,(t=>{this._config.keyboard&&t.key===Zt?(t.preventDefault(),this.hide()):this._config.keyboard||t.key!==Zt||this._triggerBackdropTransition()})):$.off(this._element,oe)}_setResizeEvent(){this._isShown?$.on(window,se,(()=>this._adjustDialog())):$.off(window,se)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide((()=>{document.body.classList.remove(ae),this._resetAdjustments(),this._scrollBar.reset(),$.trigger(this._element,ee)}))}_showBackdrop(t){$.on(this._element,ne,(t=>{this._ignoreBackdropClick?this._ignoreBackdropClick=!1:t.target===t.currentTarget&&(!0===this._config.backdrop?this.hide():"static"===this._config.backdrop&&this._triggerBackdropTransition())})),this._backdrop.show(t)}_isAnimated(){return this._element.classList.contains("fade")}_triggerBackdropTransition(){if($.trigger(this._element,"hidePrevented.bs.modal").defaultPrevented)return;const{classList:t,scrollHeight:e,style:i}=this._element,s=e>document.documentElement.clientHeight;!s&&"hidden"===i.overflowY||t.contains(ce)||(s||(i.overflowY="hidden"),t.add(ce),this._queueCallback((()=>{t.remove(ce),s||this._queueCallback((()=>{i.overflowY=""}),this._dialog)}),this._dialog),this._element.focus())}_adjustDialog(){const t=this._element.scrollHeight>document.documentElement.clientHeight,e=this._scrollBar.getWidth(),i=e>0;(!i&&t&&!b()||i&&!t&&b())&&(this._element.style.paddingLeft=`${e}px`),(i&&!t&&!b()||!i&&t&&b())&&(this._element.style.paddingRight=`${e}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(t,e){return this.each((function(){const i=he.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===i[t])throw new TypeError(`No method n
48amed "${t}"`);i[t](e)}}))}}$.on(document,"click.bs.modal.data-api",'[data-bs-toggle="modal"]',(function(t){const e=r(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),$.one(e,ie,(t=>{t.defaultPrevented||$.one(e,ee,(()=>{d(this)&&this.focus()}))}));const i=Y.findOne(".modal.show");i&&he.getInstance(i).hide(),he.getOrCreateInstance(e).toggle(this)})),F(he),v(he);const de="offcanvas",ue={backdrop:!0,keyboard:!0,scroll:!1},ge={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},_e="show",fe=".offcanvas.show",pe="hidden.bs.offcanvas";class me extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get NAME(){return de}static get Default(){return ue}toggle(t){return this._isShown?this.hide():this.show(t)}show(t){this._isShown||$.trigger(this._element,"show.bs.offcanvas",{relatedTarget:t}).defaultPrevented||(this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new zt).hide(),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(_e),this._queueCallback((()=>{this._config.scroll||this._focustrap.activate(),$.trigger(this._element,"shown.bs.offcanvas",{relatedTarget:t})}),this._element,!0))}hide(){this._isShown&&($.trigger(this._element,"hide.bs.offcanvas").defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.remove(_e),this._backdrop.hide(),this._queueCallback((()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||(new zt).reset(),$.trigger(this._element,pe)}),this._element,!0)))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_getConfig(t){return t={...ue,...X.getDataAttributes(this._element),..."object"==typeof t?t:{}},h(de,t,ge),t}_initializeBackDrop(){return new Ut({className:"offcanvas-backdrop",isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_initializeFocusTrap(){return new Qt({trapElement:this._element})}_addEventListeners(){$.on(this._element,"keydown.dismiss.bs.offcanvas",(t=>{this._config.keyboard&&"Escape"===t.key&&this.hide()}))}static jQueryInterface(t){return this.each((function(){const e=me.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t]||t.startsWith("_")||"constructor"===t)throw new TypeError(`No method named "${t}"`);e[t](this)}}))}}$.on(document,"click.bs.offcanvas.data-api",'[data-bs-toggle="offcanvas"]',(function(t){const e=r(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),u(this))return;$.one(e,pe,(()=>{d(this)&&this.focus()}));const i=Y.findOne(fe);i&&i!==e&&me.getInstance(i).hide(),me.getOrCreateInstance(e).toggle(this)})),$.on(window,"load.bs.offcanvas.data-api",(()=>Y.find(fe).forEach((t=>me.getOrCreateInstance(t).show())))),F(me),v(me);const be=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),ve=/^(?:(?:https?|mailto|ftp|tel|file|sms):|[^#&/:?]*(?:[#/?]|$))/i,ye=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,Ee=(t,e)=>{const i=t.nodeName.toLowerCase();if(e.includes(i))return!be.has(i)||Boolean(ve.test(t.nodeValue)||ye.test(t.nodeValue));const s=e.filter((t=>t instanceof RegExp));for(let t=0,e=s.length;t<e;t++)if(s[t].test(i))return!0;return!1};function we(t,e,i){if(!t.length)return t;if(i&&"function"==typeof i)return i(t);const s=(new window.DOMParser).parseFromString(t,"text/html"),n=[].concat(...s.body.querySelectorAll("*"));for(let t=0,i=n.length;t<i;t++){const i=n[t],s=i.nodeName.toLowerCase();if(!Object.keys(e).includes(s)){i.remove();continue}const o=[].concat(...i.attributes),r=[].concat(e["*"]||[],e[s]||[]);o.forEach((t=>{Ee(t,r)||i.removeAttribute(t.nodeName)}))}return s.body.innerHTML}const Ae="tooltip",Te=new Set(["sanitize","allowList","sanitizeFn"]),Ce={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boun
48dary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},ke={AUTO:"auto",TOP:"top",RIGHT:b()?"left":"right",BOTTOM:"bottom",LEFT:b()?"right":"left"},Le={animation:!0,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:{"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","srcset","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},popperConfig:null},Se={HIDE:"hide.bs.tooltip",HIDDEN:"hidden.bs.tooltip",SHOW:"show.bs.tooltip",SHOWN:"shown.bs.tooltip",INSERTED:"inserted.bs.tooltip",CLICK:"click.bs.tooltip",FOCUSIN:"focusin.bs.tooltip",FOCUSOUT:"focusout.bs.tooltip",MOUSEENTER:"mouseenter.bs.tooltip",MOUSELEAVE:"mouseleave.bs.tooltip"},Oe="fade",Ne="show",De="show",Ie="out",Pe=".tooltip-inner",xe=".modal",Me="hide.bs.modal",je="hover",He="focus";class $e extends R{constructor(t,e){if(void 0===i)throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(t),this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(e),this.tip=null,this._setListeners()}static get Default(){return Le}static get NAME(){return Ae}static get Event(){return Se}static get DefaultType(){return Ce}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(t){if(this._isEnabled)if(t){const e=this._initializeOnDelegatedTarget(t);e._activeTrigger.click=!e._activeTrigger.click,e._isWithActiveTrigger()?e._enter(null,e):e._leave(null,e)}else{if(this.getTipElement().classList.contains(Ne))return void this._leave(null,this);this._enter(null,this)}}dispose(){clearTimeout(this._timeout),$.off(this._element.closest(xe),Me,this._hideModalHandler),this.tip&&this.tip.remove(),this._disposePopper(),super.dispose()}show(){if("none"===this._element.style.display)throw new Error("Please use show on visible elements");if(!this.isWithContent()||!this._isEnabled)return;const t=$.trigger(this._element,this.constructor.Event.SHOW),e=g(this._element),s=null===e?this._element.ownerDocument.documentElement.contains(this._element):e.contains(this._element);if(t.defaultPrevented||!s)return;"tooltip"===this.constructor.NAME&&this.tip&&this.getTitle()!==this.tip.querySelector(Pe).innerHTML&&(this._disposePopper(),this.tip.remove(),this.tip=null);const n=this.getTipElement(),o=(t=>{do{t+=Math.floor(1e6*Math.random())}while(document.getElementById(t));return t})(this.constructor.NAME);n.setAttribute("id",o),this._element.setAttribute("aria-describedby",o),this._config.animation&&n.classList.add(Oe);const r="function"==typeof this._config.placement?this._config.placement.call(this,n,this._element):this._config.placement,a=this._getAttachment(r);this._addAttachmentClass(a);const{container:l}=this._config;z.set(n,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(l.append(n),$.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=i.createPopper(this._element,n,this._getPopperConfig(a)),n.classList.add(Ne);const c=this._resolvePossibleFunction(this._config.customClass);c&&n.classList.add(...c.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach((t=>{$.on(t,"mouseover",_)}));const h=this.tip.classList.contains(Oe);this._queueCallback((()=>{const t=this._hoverState;this._hoverState=null,$.trigger(this._element,this.constructor.Event.SHOWN),t===Ie&&this._leave(null,this)}),this.tip,h)}hide(){if(!this._popper)return;const t=this.getTipElement();if($.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;t.classList.remove(Ne),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEac
48h((t=>$.off(t,"mouseover",_))),this._activeTrigger.click=!1,this._activeTrigger.focus=!1,this._activeTrigger.hover=!1;const e=this.tip.classList.contains(Oe);this._queueCallback((()=>{this._isWithActiveTrigger()||(this._hoverState!==De&&t.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),$.trigger(this._element,this.constructor.Event.HIDDEN),this._disposePopper())}),this.tip,e),this._hoverState=""}update(){null!==this._popper&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;const t=document.createElement("div");t.innerHTML=this._config.template;const e=t.children[0];return this.setContent(e),e.classList.remove(Oe,Ne),this.tip=e,this.tip}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),Pe)}_sanitizeAndSetContent(t,e,i){const s=Y.findOne(i,t);e||!s?this.setElementContent(s,e):s.remove()}setElementContent(t,e){if(null!==t)return l(e)?(e=c(e),void(this._config.html?e.parentNode!==t&&(t.innerHTML="",t.append(e)):t.textContent=e.textContent)):void(this._config.html?(this._config.sanitize&&(e=we(e,this._config.allowList,this._config.sanitizeFn)),t.innerHTML=e):t.textContent=e)}getTitle(){const t=this._element.getAttribute("data-bs-original-title")||this._config.title;return this._resolvePossibleFunction(t)}updateAttachment(t){return"right"===t?"end":"left"===t?"start":t}_initializeOnDelegatedTarget(t,e){return e||this.constructor.getOrCreateInstance(t.delegateTarget,this._getDelegateConfig())}_getOffset(){const{offset:t}=this._config;return"string"==typeof t?t.split(",").map((t=>Number.parseInt(t,10))):"function"==typeof t?e=>t(e,this._element):t}_resolvePossibleFunction(t){return"function"==typeof t?t.call(this._element):t}_getPopperConfig(t){const e={placement:t,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:t=>this._handlePopperPlacementChange(t)}],onFirstUpdate:t=>{t.options.placement!==t.placement&&this._handlePopperPlacementChange(t)}};return{...e,..."function"==typeof this._config.popperConfig?this._config.popperConfig(e):this._config.popperConfig}}_addAttachmentClass(t){this.getTipElement().classList.add(`${this._getBasicClassPrefix()}-${this.updateAttachment(t)}`)}_getAttachment(t){return ke[t.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach((t=>{if("click"===t)$.on(this._element,this.constructor.Event.CLICK,this._config.selector,(t=>this.toggle(t)));else if("manual"!==t){const e=t===je?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,i=t===je?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;$.on(this._element,e,this._config.selector,(t=>this._enter(t))),$.on(this._element,i,this._config.selector,(t=>this._leave(t)))}})),this._hideModalHandler=()=>{this._element&&this.hide()},$.on(this._element.closest(xe),Me,this._hideModalHandler),this._config.selector?this._config={...this._config,trigger:"manual",selector:""}:this._fixTitle()}_fixTitle(){const t=this._element.getAttribute("title"),e=typeof this._element.getAttribute("data-bs-original-title");(t||"string"!==e)&&(this._element.setAttribute("data-bs-original-title",t||""),!t||this._element.getAttribute("aria-label")||this._element.textContent||this._element.setAttribute("aria-label",t),this._element.setAttribute("title",""))}_enter(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusin"===t.type?He:je]=!0),e.getTipElement().classList.contains(Ne)||e._hoverState===De?e._hoverState=De:(clearTimeout(e._timeout),e._hoverState=De,e._config.delay&&e._config.delay.show?e._timeout=setTimeout((()=>{e._hoverState===De&&e.show()}),e._config.delay.show):e.show())}_leave(t,e){e=this._initializeOnDelegatedTarget(t,e),t&&(e._activeTrigger["focusout"===t.type?He:je]=e._element.contains(t.relatedTarget)),e._isWithActiveTrigger()||(clearTimeout(e._timeout),e._hoverState=Ie,e._config.delay&&e._config.delay.hide?e._timeout=setTimeout((()=>{e._hoverState===Ie&&e.hide()}),e._config.delay.hide):e.hide())}_isWithActiveTrigger(){for(const t in this._activeTrigger)if(this._activeTrigger[t])return!0;return!1}_getConfig(t){const e=X.getDataAttributes(this._element);return Object.keys(e).forEach((t=>{Te.has(t)&&delete e[t]})),(t={...this.constructor.Default,...e,..."object"==typeof t&&t?t:{}}).container=!1===t.container?document.body:c(t.container),"number"==typeof t.delay&&(t.delay={show:t.delay,hide:t.delay}),"number"==typeof t.title&&(t.title=t.title.toString()),"number"==typeof t.content&&(t.content=t.content.toString()),h(Ae,t,this.constructor.DefaultType),t.sanitize&&(t.template=we(t.template,t.allowList,t.sanitizeFn)),t}_getDelegateConfig(){const t={};for(const e in this._config)this.constructor.Default[e]!==this._config[e]&&(t[e]=this._config[e]);return t}_cleanTipClass(){const t=this.getTipElement(),e=new RegExp(`(^|\\s)${this._getBasicClassPrefix()}\\S+`,"g"),i=t.getAttribute("class").match(e);null!==i&&i.length>0&&i.map((t=>
48t.trim())).forEach((e=>t.classList.remove(e)))}_getBasicClassPrefix(){return"bs-tooltip"}_handlePopperPlacementChange(t){const{state:e}=t;e&&(this.tip=e.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(e.placement)))}_disposePopper(){this._popper&&(this._popper.destroy(),this._popper=null)}static jQueryInterface(t){return this.each((function(){const e=$e.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}v($e);const Be={...$e.Default,placement:"right",offset:[0,8],trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>'},ze={...$e.DefaultType,content:"(string|element|function)"},Re={HIDE:"hide.bs.popover",HIDDEN:"hidden.bs.popover",SHOW:"show.bs.popover",SHOWN:"shown.bs.popover",INSERTED:"inserted.bs.popover",CLICK:"click.bs.popover",FOCUSIN:"focusin.bs.popover",FOCUSOUT:"focusout.bs.popover",MOUSEENTER:"mouseenter.bs.popover",MOUSELEAVE:"mouseleave.bs.popover"};class Fe extends $e{static get Default(){return Be}static get NAME(){return"popover"}static get Event(){return Re}static get DefaultType(){return ze}isWithContent(){return this.getTitle()||this._getContent()}setContent(t){this._sanitizeAndSetContent(t,this.getTitle(),".popover-header"),this._sanitizeAndSetContent(t,this._getContent(),".popover-body")}_getContent(){return this._resolvePossibleFunction(this._config.content)}_getBasicClassPrefix(){return"bs-popover"}static jQueryInterface(t){return this.each((function(){const e=Fe.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}v(Fe);const qe="scrollspy",We={offset:10,method:"auto",target:""},Ue={offset:"number",method:"string",target:"(string|element)"},Ke="active",Ve=".nav-link, .list-group-item, .dropdown-item",Xe="position";class Ye extends R{constructor(t,e){super(t),this._scrollElement="BODY"===this._element.tagName?window:this._element,this._config=this._getConfig(e),this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,$.on(this._scrollElement,"scroll.bs.scrollspy",(()=>this._process())),this.refresh(),this._process()}static get Default(){return We}static get NAME(){return qe}refresh(){const t=this._scrollElement===this._scrollElement.window?"offset":Xe,e="auto"===this._config.method?t:this._config.method,i=e===Xe?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),Y.find(Ve,this._config.target).map((t=>{const s=o(t),n=s?Y.findOne(s):null;if(n){const t=n.getBoundingClientRect();if(t.width||t.height)return[X[e](n).top+i,s]}return null})).filter((t=>t)).sort(((t,e)=>t[0]-e[0])).forEach((t=>{this._offsets.push(t[0]),this._targets.push(t[1])}))}dispose(){$.off(this._scrollElement,".bs.scrollspy"),super.dispose()}_getConfig(t){return(t={...We,...X.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}}).target=c(t.target)||document.documentElement,h(qe,t,Ue),t}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){const t=this._getScrollTop()+this._config.offset,e=this._getScrollHeight(),i=this._config.offset+e-this._getOffsetHeight();if(this._scrollHeight!==e&&this.refresh(),t>=i){const t=this._targets[this._targets.length-1];this._activeTarget!==t&&this._activate(t)}else{if(this._activeTarget&&t<this._offsets[0]&&this._offsets[0]>0)return this._activeTarget=null,void this._clear();for(let e=this._offsets.length;e--;)this._activeTarget!==this._targets[e]&&t>=this._offsets[e]&&(void 0===this._offsets[e+1]||t<this._offsets[e+1])&&this._activate(this._targets[e])}}_activate(t){this._activeTarget=t,this._clear();const e=Ve.split(",").map((e=>`${e}[data-bs-target="${t}"],${e}[href="${t}"]`)),i=Y.findOne(e.join(","),this._config.target);i.classList.add(Ke),i.classList.contains("dropdown-item")?Y.findOne(".dropdown-toggle",i.closest(".dropdown")).classList.add(Ke):Y.parents(i,".nav, .list-group").forEach((t=>{Y.prev(t,".nav-link, .list-group-item").forEach((t=>t.classList.add(Ke))),Y.prev(t,".nav-item").forEach((t=>{Y.children(t,".nav-link").forEach((t=>t.classList.add(Ke)))}))})),$.trigger(this._scrollElement,"activate.bs.scrollspy",{relatedTarget:t})}_clear(){Y.find(Ve,this._config.target).filter((t=>
48t.classList.contains(Ke))).forEach((t=>t.classList.remove(Ke)))}static jQueryInterface(t){return this.each((function(){const e=Ye.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(window,"load.bs.scrollspy.data-api",(()=>{Y.find('[data-bs-spy="scroll"]').forEach((t=>new Ye(t)))})),v(Ye);const Qe="active",Ge="fade",Ze="show",Je=".active",ti=":scope > li > .active";class ei extends R{static get NAME(){return"tab"}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(Qe))return;let t;const e=r(this._element),i=this._element.closest(".nav, .list-group");if(i){const e="UL"===i.nodeName||"OL"===i.nodeName?ti:Je;t=Y.find(e,i),t=t[t.length-1]}const s=t?$.trigger(t,"hide.bs.tab",{relatedTarget:this._element}):null;if($.trigger(this._element,"show.bs.tab",{relatedTarget:t}).defaultPrevented||null!==s&&s.defaultPrevented)return;this._activate(this._element,i);const n=()=>{$.trigger(t,"hidden.bs.tab",{relatedTarget:this._element}),$.trigger(this._element,"shown.bs.tab",{relatedTarget:t})};e?this._activate(e,e.parentNode,n):n()}_activate(t,e,i){const s=(!e||"UL"!==e.nodeName&&"OL"!==e.nodeName?Y.children(e,Je):Y.find(ti,e))[0],n=i&&s&&s.classList.contains(Ge),o=()=>this._transitionComplete(t,s,i);s&&n?(s.classList.remove(Ze),this._queueCallback(o,t,!0)):o()}_transitionComplete(t,e,i){if(e){e.classList.remove(Qe);const t=Y.findOne(":scope > .dropdown-menu .active",e.parentNode);t&&t.classList.remove(Qe),"tab"===e.getAttribute("role")&&e.setAttribute("aria-selected",!1)}t.classList.add(Qe),"tab"===t.getAttribute("role")&&t.setAttribute("aria-selected",!0),f(t),t.classList.contains(Ge)&&t.classList.add(Ze);let s=t.parentNode;if(s&&"LI"===s.nodeName&&(s=s.parentNode),s&&s.classList.contains("dropdown-menu")){const e=t.closest(".dropdown");e&&Y.find(".dropdown-toggle",e).forEach((t=>t.classList.add(Qe))),t.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(t){return this.each((function(){const e=ei.getOrCreateInstance(this);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method named "${t}"`);e[t]()}}))}}$.on(document,"click.bs.tab.data-api",'[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',(function(t){["A","AREA"].includes(this.tagName)&&t.preventDefault(),u(this)||ei.getOrCreateInstance(this).show()})),v(ei);const ii="toast",si="hide",ni="show",oi="showing",ri={animation:"boolean",autohide:"boolean",delay:"number"},ai={animation:!0,autohide:!0,delay:5e3};class li extends R{constructor(t,e){super(t),this._config=this._getConfig(e),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return ri}static get Default(){return ai}static get NAME(){return ii}show(){$.trigger(this._element,"show.bs.toast").defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add("fade"),this._element.classList.remove(si),f(this._element),this._element.classList.add(ni),this._element.classList.add(oi),this._queueCallback((()=>{this._element.classList.remove(oi),$.trigger(this._element,"shown.bs.toast"),this._maybeScheduleHide()}),this._element,this._config.animation))}hide(){this._element.classList.contains(ni)&&($.trigger(this._element,"hide.bs.toast").defaultPrevented||(this._element.classList.add(oi),this._queueCallback((()=>{this._element.classList.add(si),this._element.classList.remove(oi),this._element.classList.remove(ni),$.trigger(this._element,"hidden.bs.toast")}),this._element,this._config.animation)))}dispose(){this._clearTimeout(),this._element.classList.contains(ni)&&this._element.classList.remove(ni),super.dispose()}_getConfig(t){return t={...ai,...X.getDataAttributes(this._element),..."object"==typeof t&&t?t:{}},h(ii,t,this.constructor.DefaultType),t}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout((()=>{this.hide()}),this._config.delay)))}_onInteraction(t,e){switch(t.type){case"mouseover":case"mouseout":this._hasMouseInteraction=e;break;case"focusin":case"focusout":this._hasKeyboardInteraction=e}if(e)return void this._clearTimeout();const i=t.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){$.on(this._element,"mouseover.bs.toast",(t=>this._onInteraction(t,!0))),$.on(this._element,"mouseout.bs.toast",(t=>this._onInteraction(t,!1))),$.on(this._element,"focusin.bs.toast",(t=>this._onInteraction(t,!0))),$.on(this._element,"focusout.bs.toast",(t=>this._onInteraction(t,!1)))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each((function(){const e=li.getOrCreateInstance(this,t);if("string"==typeof t){if(void 0===e[t])throw new TypeError(`No method n
48amed "${t}"`);e[t](this)}}))}}return F(li),v(li),{Alert:q,Button:U,Carousel:at,Collapse:mt,Dropdown:Ht,Modal:he,Offcanvas:me,Popover:Fe,ScrollSpy:Ye,Tab:ei,Toast:li,Tooltip:$e}})); 49 50; 51!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarousel=t();}(this,(function(){"use strict";function n(n){return "number"==typeof n;}function t(n){return "string"==typeof n;}function e(n){return "boolean"==typeof n;}function r(n){return "[object Object]"===Object.prototype.toString.call(n);}function o(n){return Math.abs(n);}function i(n){return Math.sign(n);}function c(n,t){return o(n-t);}function u(n){return f(n).map(Number);}function s(n){return n[a(n)];}function a(n){return Math.max(0,n.length-1);}function d(n,t){return t===a(n);}function l(n,t=0){return Array.from(Array(n),((n,e)=>t+e));}function f(n){return Object.keys(n);}function p(n,t){return [n,t].reduce(((n,t)=>(f(t).forEach(((e)=>{const o=n[e],i=t[e],c=r(o)&&r(i);n[e]=c?p(o,i):i;})),n)),{});}function m(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent;}function g(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let c;if("addEventListener" in e)e.addEventListener(r,o,i),c=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),c=()=>n.removeListener(o);}return n.push(c),t;},clear:function(){n=n.filter(((n)=>n()));}};return t;}function h(n,t,e,r){const o=g(),i=1e3/60;let c=null,u=0,s=0;function a(n){if(!s)return;c||(c=n,e(),e());const o=n-c;for(c=n,u+=o;u>=i;)e(),u-=i;r(u/i),s&&(s=t.requestAnimationFrame(a));}function d(){t.cancelAnimationFrame(s),c=null,u=0,s=0;}return {init:function(){o.add(n,"visibilitychange",(()=>{n.hidden&&(c=null,u=0);}));},destroy:function(){d(),o.clear();},start:function(){s||(s=t.requestAnimationFrame(a));},stop:d,update:e,render:r};}function x(n=0,t=0){const e=o(n-t);function r(t){return t<n;}function i(n){return n>t;}function c(n){return r(n)||i(n);}return {length:e,max:t,min:n,constrain:function(e){return c(e)?r(e)?n:t:e;},reachedAny:c,reachedMax:i,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n;}};}function y(n,t,e){const {constrain:r}=x(0,n),i=n+1;let c=u(t);function u(n){return e?o((i+n)%i):r(n);}function s(){return c;}function a(){return y(n,s(),e);}const d={get:s,set:function(n){return c=u(n),d;},add:function(n){return a().set(s()+n);},clone:a};return d;}function v(n,t,r,u,s,a,d,l,f,p,h,y,v,b,S,w,E,L,D){const {cross:I,direction:M}=n,A=["INPUT","SELECT","TEXTAREA"],F={passive:!1},T=g(),O=g(),P=x(50,225).constrain(b.measure(20)),z={mouse:300,touch:400},H={mouse:500,touch:600},k=S?43:25;let V=!1,B=0,C=0,N=!1,R=!1,j=!1,G=!1;function q(n){if(!m(n,u)&&n.touches.length>=2)return U(n);const t=a.readPoint(n),e=a.readPoint(n,I),r=c(t,B),o=c(e,C);if(!R&&!G){if(!n.cancelable)return U(n);if(R=r>o,!R)return U(n);}const i=a.pointerMove(n);r>w&&(j=!0),p.useFriction(.3).useDuration(.75),l.start(),s.add(M(i)),n.preventDefault();}function U(n){const t=h.byDistance(0,!1).index!==y.get(),e=a.pointerUp(n)*(S?H:z)[G?"mouse":"touch"],r=function(n,t){const e=y.add(-1*i(n)),r=h.byDistance(n,!S).distance;return S||o(n)<P?r:E&&t?.5*r:h.byIndex(e.get(),0).distance;}(M(e),t),u=function(n,t){if(0===n||0===t)return 0;if(o(n)<=o(t))return 0;const e=c(o(n),o(t));return o(e/n);}(e,r),s=k-10*u,d=L+u/50;R=!1,N=!1,O.clear(),p.useDuration(s).useFriction(d),f.distance(r,!S),G=!1,v.emit("pointerUp");}function W(n){j&&(n.stopPropagation(),n.preventDefault(),j=!1);}return {init:function(n){if(!D)return;function o(o){(e(D)||D(n,o))&&function(n){const e=m(n,u);if(G=e,j=S&&e&&!n.buttons&&V,V=c(s.get(),d.get())>=2,e&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return A.includes(t);}(n.target))return;N=!0,a.pointerDown(n),p.useFriction(0).useDuration(0),s.set(d),function(){const n=G?r:t;O.add(n,"touchmove",q,F).add(n,"touchend",U).add(n,"mousemove",q,F).add(n,"mouseup",U);}(),B=a.readPoint(n),C=a.readPoint(n,I),v.emit("pointerDown");}(o);}const i=t;T.add(i,"dragstart",((n)=>n.preventDefault()),F).add(i,"touchmove",(()=>{}),F).add(i,"touchend",(()=>{})).add(i,"touchstart",o).add(i,"mousedown",o).add(i,"touchcancel",U).add(i,"contextmenu",U).add(i,"click",W,!0);},destroy:function(){T.clear(),O.clear();},pointerDown:function(){return N;}};}function b(n,t){let e,r;function i(n){return n.timeStamp;}function c(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return (m(e,t)?e:e.touches[0])[o];}return {pointerDown:function(n){return e=n,r=n,c(n);},pointerMove:function(n){const t=c(n)-c(r),o=i(n)-i(e)>170;return r=n,o&&(e=n),t;},pointerUp:function(n){if(!e||!r)return 0;const t=c(r)-c(e),u=i(n)-i(e),s=i(n)-i(r)>170,a=t/u;return u&&!s&&o(a)>.1?a:0;},readPoint:c};}function S(n,t,r,i,c,u,s){const a=[n].concat(i);let d,l,f=[],p=!1;function m(n){return c.measureSize(s.measure(n));}return {init:function(c){u&&(l=m(n),f=i.map(m),d=new ResizeObserver(((r)=>{(e(u)||u(c,r))&&function(e){for(const r of e){if(p)return;const e=r.target===n,u=i.indexOf(r.target),s=e?l:f[u];if(o(m(e?n:i[u])-s)>=.5){c.reInit(),t.emit("resize");break;}}}(r);})),r.requestAnimationFrame((()=>{a.forEach(((n)=>d.observe(n)));})));},destroy:function(){p=!0,d&&d.disconnect();}};}function w(n,t,e,r,i){const c=i.measure(10),u=i.measure(50),s=x(.
511,.99);let a=!1;function d(){return !a&&(!!n.reachedAny(e.get())&&!!n.reachedAny(t.get()));}return {shouldConstrain:d,constrain:function(i){if(!d())return;const a=n.reachedMin(t.get())?"min":"max",l=o(n[a]-t.get()),f=e.get()-t.get(),p=s.constrain(l/u);e.subtract(f*p),!i&&o(f)<c&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction());},toggleActive:function(n){a=!n;}};}function E(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=x(o,i);return {loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get());}(t))return;const o=n*(-1*t);r.forEach(((n)=>n.add(o)));}};}function L(n,t,e,r,c){const {reachedAny:u,removeOffset:a,constrain:d}=r;function l(n){return n.concat().sort(((n,t)=>o(n)-o(t)))[0];}function f(t,r){const o=[t,t+e,t-e];if(!n)return t;if(!r)return l(o);const c=o.filter(((n)=>i(n)===r));return c.length?l(c):s(o)-e;}return {byDistance:function(e,r){const i=c.get()+e,{index:s,distance:l}=function(e){const r=n?a(e):d(e),i=t.map(((n,t)=>({diff:f(n-r,0),index:t}))).sort(((n,t)=>o(n.diff)-o(t.diff))),{index:c}=i[0];return {index:c,distance:r};}(i),p=!n&&u(i);return !r||p?{index:s,distance:e}:{index:s,distance:e+f(t[s]-l,0)};},byIndex:function(n,e){return {index:n,distance:f(t[n]-c.get(),e)};},shortcut:f};}function D(t,r,o,i,c,u,s,a){const d={passive:!0,capture:!0};let l=0;function f(n){"Tab"===n.code&&(l=(new Date()).getTime());}return {init:function(p){a&&(u.add(document,"keydown",f,!1),r.forEach(((r,f)=>{u.add(r,"focus",((r)=>{(e(a)||a(p,r))&&function(e){if((new Date()).getTime()-l>10)return;s.emit("slideFocusStart"),t.scrollLeft=0;const r=o.findIndex(((n)=>n.includes(e)));n(r)&&(c.useDuration(0),i.index(r,0),s.emit("slideFocus"));}(f);}),d);})));}};}function I(t){let e=t;function r(t){return n(t)?t:t.get();}return {get:function(){return e;},set:function(n){e=r(n);},add:function(n){e+=r(n);},subtract:function(n){e-=r(n);}};}function M(n,t){const e="x"===n.scroll?function(n){return `translate3d(${n}px,0px,0px)`;}:function(n){return `translate3d(0px,${n}px,0px)`;},r=t.style;let o=null,i=!1;return {clear:function(){i||(r.transform="",t.getAttribute("style")||t.removeAttribute("style"));},to:function(t){if(i)return;const c=(u=n.direction(t),Math.round(100*u)/100);var u;c!==o&&(r.transform=e(c),o=c);},toggleActive:function(n){i=!n;}};}function A(n,t,e,r,o,i,c,s,a){const d=.5,l=u(o),f=u(o).reverse(),p=function(){const n=c[0];return h(g(f,n),e,!1);}().concat(function(){const n=t-c[0]-1;return h(g(l,n),-e,!0);}());function m(n,t){return n.reduce(((n,t)=>n-o[t]),t);}function g(n,t){return n.reduce(((n,e)=>m(n,t)>0?n.concat([e]):n),[]);}function h(o,c,u){const l=function(n){return i.map(((e,o)=>({start:e-r[o]+d+n,end:e+t-d+n})));}(c);return o.map(((t)=>{const r=u?0:-e,o=u?e:0,i=u?"end":"start",c=l[t][i];return {index:t,loopPoint:c,slideLocation:I(-1),translate:M(n,a[t]),target:()=>s.get()>c?r:o};}));}return {canLoop:function(){return p.every((({index:n})=>m(l.filter(((t)=>t!==n)),t)<=.1));},clear:function(){p.forEach(((n)=>n.translate.clear()));},loop:function(){p.forEach(((n)=>{const {target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o));}));},loopPoints:p};}function F(n,t,r){let o,i=!1;return {init:function(c){r&&(o=new MutationObserver(((n)=>{i||(e(r)||r(c,n))&&function(n){for(const e of n)if("childList"===e.type){c.reInit(),t.emit("slidesChanged");break;}}(n);})),o.observe(n,{childList:!0}));},destroy:function(){o&&o.disconnect(),i=!0;}};}function T(n,t,e,r){const o={};let i,c=null,u=null,s=!1;return {init:function(){i=new IntersectionObserver(((n)=>{s||(n.forEach(((n)=>{const e=t.indexOf(n.target);o[e]=n;})),c=null,u=null,e.emit("slidesInView"));}),{root:n.parentElement,threshold:r}),t.forEach(((n)=>i.observe(n)));},destroy:function(){i&&i.disconnect(),s=!0;},get:function(n=!0){if(n&&c)return c;if(!n&&u)return u;const t=function(n){return f(o).reduce(((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return (n&&i||!n&&!i)&&t.push(r),t;}),[]);}(n);return n&&(c=t),n||(u=t),t;}};}function O(t,e,r,i,c,d,l,f,p){const {startEdge:m,endEdge:g,direction:h}=t,x=n(r);return {groupSlides:function(n){return x?function(n,t){return u(n).filter(((n)=>n%t==0)).map(((e)=>n.slice(e,e+t)));}(n,r):function(n){return n.length?u(n).reduce(((t,r,u)=>{const x=s(t)||0,y=0===x,v=r===a(n),b=c[m]-d[x][m],S=c[m]-d[r][g],w=!i&&y?h(l):0,E=o(S-(!i&&v?h(f):0)-(b+w));return u&&E>e+p&&t.push(r),v&&t.push(n.length),t;}),[]).map(((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t);})):[];}(n);}};}function P(n,e,r,f,p,m,P){const {align:z,axis:H,direction:k,startIndex:V,loop:B,duration:C,dragFree:N,dragThreshold:R,inViewThreshold:j,slidesToScroll:G,skipSnaps:q,containScroll:U,watchResize:W,watchSlides:$,watchDrag:Q,watchFocus:X}=m,Y={measure:function(n){const {offsetTop:t,offsetLeft:e,offsetWidth:r,offsetHeight:o}=n;
51return {top:t,right:e+r,bottom:t+o,left:e,width:r,height:o};}},J=Y.measure(e),K=r.map(Y.measure),Z=function(n,t){const e="rtl"===t,r="y"===n,o=!r&&e?-1:1;return {scroll:r?"y":"x",cross:r?"x":"y",startEdge:r?"top":e?"right":"left",endEdge:r?"bottom":e?"left":"right",measureSize:function(n){const {height:t,width:e}=n;return r?t:e;},direction:function(n){return n*o;}};}(H,k),_=Z.measureSize(J),nn=function(n){return {measure:function(t){return n*(t/100);}};}(_),tn=function(n,e){const r={start:function(){return 0;},center:function(n){return o(n)/2;},end:o};function o(n){return e-n;}return {measure:function(o,i){return t(n)?r[n](o):n(e,o,i);}};}(z,_),en=!B&&!!U,rn=B||!!U,{slideSizes:on,slideSizesWithGaps:cn,startGap:un,endGap:sn}=function(n,t,e,r,i,c){const {measureSize:u,startEdge:a,endEdge:l}=n,f=e[0]&&i,p=function(){if(!f)return 0;const n=e[0];return o(t[a]-n[a]);}(),m=function(){if(!f)return 0;const n=c.getComputedStyle(s(r));return parseFloat(n.getPropertyValue(`margin-${l}`));}(),g=e.map(u),h=e.map(((n,t,e)=>{const r=!t,o=d(e,t);return r?g[t]+p:o?g[t]+m:e[t+1][a]-n[a];})).map(o);return {slideSizes:g,slideSizesWithGaps:h,startGap:p,endGap:m};}(Z,J,K,r,rn,p),an=O(Z,_,G,B,J,K,un,sn,2),{snaps:dn,snapsAligned:ln}=function(n,t,e,r,i){const {startEdge:c,endEdge:u}=n,{groupSlides:a}=i,d=a(r).map(((n)=>s(n)[u]-n[0][c])).map(o).map(t.measure),l=r.map(((n)=>e[c]-n[c])).map(((n)=>-o(n))),f=a(l).map(((n)=>n[0])).map(((n,t)=>n+d[t]));return {snaps:l,snapsAligned:f};}(Z,tn,J,K,an),fn=-s(dn)+s(cn),{snapsContained:pn,scrollContainLimit:mn}=function(n,t,e,r,o){const i=x(-t+n,0),u=e.map(((n,t)=>{const {min:r,max:o}=i,c=i.constrain(n),u=!t,s=d(e,t);return u?o:s||l(r,c)?r:l(o,c)?o:c;})).map(((n)=>parseFloat(n.toFixed(3)))),a=function(){const n=u[0],t=s(u);return x(u.lastIndexOf(n),u.indexOf(t)+1);}();function l(n,t){return c(n,t)<=1;}return {snapsContained:function(){if(t<=n+o)return [i.max];if("keepSnaps"===r)return u;const {min:e,max:c}=a;return u.slice(e,c);}(),scrollContainLimit:a};}(_,fn,ln,U,2),gn=en?pn:ln,{limit:hn}=function(n,t,e){const r=t[0];return {limit:x(e?r-n:s(t),r)};}(fn,gn,B),xn=y(a(gn),V,B),yn=xn.clone(),vn=u(r),bn=h(f,p,(()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:r}})=>{r||e.constrain(n.pointerDown()),t.seek();})(Hn)),((n)=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,previousLocation:o,scrollLooper:i,slideLooper:c,dragHandler:u,animation:s,eventHandler:a,scrollBounds:d,options:{loop:l}},f)=>{const p=n.settled(),m=!d.shouldConstrain(),g=l?p:p&&m,h=g&&!u.pointerDown();h&&s.stop();const x=e.get()*f+o.get()*(1-f);r.set(x),l&&(i.loop(n.direction()),c.loop()),t.to(r.get()),h&&a.emit("settle"),g||a.emit("scroll");})(Hn,n))),Sn=gn[xn.get()],wn=I(Sn),En=I(Sn),Ln=I(Sn),Dn=I(Sn),In=function(n,t,e,r,c,u){let s=0,a=0,d=c,l=u,f=n.get(),p=0;function m(n){return d=n,h;}function g(n){return l=n,h;}const h={direction:function(){return a;},duration:function(){return d;},velocity:function(){return s;},seek:function(){const t=r.get()-n.get();let o=0;return d?(e.set(n),s+=t/d,s*=l,f+=s,n.add(s),o=f-p):(s=0,e.set(r),n.set(r),o=t),a=i(o),p=f,h;},settled:function(){return o(r.get()-t.get())<.001;},useBaseFriction:function(){return g(u);},useBaseDuration:function(){return m(c);},useFriction:g,useDuration:m};return h;}(wn,Ln,En,Dn,C,.68),Mn=L(B,gn,fn,hn,Dn),An=function(n,t,e,r,o,i,c){function u(o){const u=o.distance,s=o.index!==t.get();i.add(u),u&&(r.duration()?n.start():(n.update(),n.render(1),n.update())),s&&(e.set(t.get()),t.set(o.index),c.emit("select"));}return {distance:function(n,t){u(o.byDistance(n,t));},index:function(n,e){const r=t.clone().set(n);u(o.byIndex(r.get(),e));}};}(bn,xn,yn,In,Mn,Dn,P),Fn=function(n){const {max:t,length:e}=n;return {get:function(n){return e?(n-t)/-e:0;}};}(hn),Tn=g(),On=T(e,r,P,j),{slideRegistry:Pn}=function(n,t,e,r,o,i){const {groupSlides:c}=o,{min:u,max:f}=r;return {slideRegistry:function(){const r=c(i),o=!n||"keepSnaps"===t;return 1===e.length?[i]:o?r:r.slice(u,f).map(((n,t,e)=>{const r=!t,o=d(e,t);return r?l(s(e[0])+1):o?l(a(i)-s(e)[0]+1,s(e)[0]):n;}));}()};}(en,U,gn,mn,an,vn),zn=D(n,r,Pn,An,In,Tn,P,X),Hn={ownerDocument:f,ownerWindow:p,eventHandler:P,containerRect:J,slideRects:K,animation:bn,axis:Z,dragHandler:v(Z,n,f,p,Dn,b(Z,p),wn,bn,An,In,Mn,xn,P,nn,N,R,q,.68,Q),eventStore:Tn,percentOfView:nn,index:xn,indexPrevious:yn,limit:hn,location:wn,offsetLocation:Ln,previousLocation:En,options:m,resizeHandler:S(e,P,p,r,Z,W,Y),scrollBody:In,scrollBounds:w(hn,Ln,Dn,In,nn),scrollLooper:E(fn,hn,Ln,[wn,Ln,En,Dn]),scrollProgress:Fn,scrollSnapList:gn.map(Fn.get),scrollSnaps:gn,scrollTarget:Mn,scrollTo:An,slideLooper:A(Z,_,fn,on,cn,dn,gn,Ln,r),slideFocus:zn,slidesHandler:F(e,P,$),slidesInView:On,slideIndexes:vn,slideRegistry:Pn,slidesToScroll:an,target:Dn,translate:M(Z,e)};return Hn;}const z={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function H(n){function t(n,t){return p(n,t||{});}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=f(r).filter(((t)=>n.matchMedia(t).matches)).map(((n)=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o);},optionsMediaQueries:function(t){return t.map(((n)=>f(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia);}};return e;}function k(n,e,r){const o=n.ownerDocument,i=o.defaultView,c=H(i),u=function(n){let t=[];return {init:function(e,r){return t=r.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach(((t)=>t.init(e,n))),r.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{});},destroy:function(){t=t.filter(((n)=>n.destroy()));}};}(c),s=g(),a=function(){let n,t={};function e(n){return t[n]||[];}const r={init:function(t){n=t;},emit:function(t){return e(t).forEach(((e)=>e(n,t))),r;},off:function(n,o){return t[n]=e(n).filter(((n)=>n!==o)),r;},on:function(n,o){return t[n]=e(n).concat([o]),r;},clear:function(){t={};}};return r;}(),{mergeOptions:d,optionsAtMedia:l,optionsMediaQueries:f}=c,{on:p,off:m,emit:h}=a,x=A;let y,v,b,S,w=!1,E=d(z,k.globalOptions),L=d(E),D=[];function I(t){const e=P(n,b,S,o,i,t,a);if(t.loop&&!e.slideLooper.canLoop())return I(Object.assign({},t,{loop:!1}));return e;}function M(e,r){w||(E=d(E,e),L=l(E),D=r||D,function(){const {container:e,slides:r}=L,o=t(e)?n.querySelector(e):e;b=o||n.children[0];const i=t(r)?b.querySelectorAll(r):r;S=[].slice.call(i||b.children);}(),y=I(L),f([E,...D.map((({options:n})=>
51n))]).forEach(((n)=>s.add(n,"change",A))),L.active&&(y.translate.to(y.location.get()),y.animation.init(),y.slidesInView.init(),y.slideFocus.init(V),y.eventHandler.init(V),y.resizeHandler.init(V),y.slidesHandler.init(V),y.options.loop&&y.slideLooper.loop(),b.offsetParent&&S.length&&y.dragHandler.init(V),v=u.init(V,D)));}function A(n,t){const e=O();F(),M(d({startIndex:e},n),t),a.emit("reInit");}function F(){y.dragHandler.destroy(),y.eventStore.clear(),y.translate.clear(),y.slideLooper.clear(),y.resizeHandler.destroy(),y.slidesHandler.destroy(),y.slidesInView.destroy(),y.animation.destroy(),u.destroy(),s.clear();}function T(n,t,e){L.active&&!w&&(y.scrollBody.useBaseFriction().useDuration(!0===t?0:L.duration),y.scrollTo.index(n,e||0));}function O(){return y.index.get();}const V={canScrollNext:function(){return y.index.add(1).get()!==O();},canScrollPrev:function(){return y.index.add(-1).get()!==O();},containerNode:function(){return b;},internalEngine:function(){return y;},destroy:function(){w||(w=!0,s.clear(),F(),a.emit("destroy"),a.clear());},off:m,on:p,emit:h,plugins:function(){return v;},previousScrollSnap:function(){return y.indexPrevious.get();},reInit:x,rootNode:function(){return n;},scrollNext:function(n){T(y.index.add(1).get(),n,-1);},scrollPrev:function(n){T(y.index.add(-1).get(),n,1);},scrollProgress:function(){return y.scrollProgress.get(y.offsetLocation.get());},scrollSnapList:function(){return y.scrollSnapList;},scrollTo:T,selectedScrollSnap:O,slideNodes:function(){return S;},slidesInView:function(){return y.slidesInView.get();},slidesNotInView:function(){return y.slidesInView.get(!1);}};return M(e,r),setTimeout((()=>a.emit("init")),0),V;}return k.globalOptions=void 0,k;}));; 52!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselAutoplay=t();}(this,(function(){"use strict";const n={active:!0,breakpoints:{},delay:4e3,jump:!1,playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,stopOnLastSnap:!1,rootNode:null};function t(o={}){let e,i,s,l,r=null,u=0,a=!1,c=!1,p=!1,f=!1;function d(){s||(g()?p=!0:(a||i.emit("autoplay:play"),function(){const {ownerWindow:n}=i.internalEngine();n.clearTimeout(u),u=n.setTimeout(E,l[i.selectedScrollSnap()]),r=(new Date()).getTime(),i.emit("autoplay:timerset");}(),a=!0));}function m(){s||(a&&i.emit("autoplay:stop"),function(){const {ownerWindow:n}=i.internalEngine();n.clearTimeout(u),u=0,r=null,i.emit("autoplay:timerstopped");}(),a=!1);}function y(){if(g())return p=a,m();p&&d();}function g(){const {ownerDocument:n}=i.internalEngine();return "hidden"===n.visibilityState;}function O(){c||m();}function S(){c||d();}function w(){c=!0,m();}function b(){c=!1,d();}function E(){const {index:n}=i.internalEngine(),t=n.clone().add(1).get(),o=i.scrollSnapList().length-1,s=e.stopOnLastSnap&&t===o;if(i.canScrollNext()?i.scrollNext(f):i.scrollTo(0,f),i.emit("autoplay:select"),s)return m();d();}return {name:"autoplay",options:o,init:function(r,u){i=r;const {mergeOptions:a,optionsAtMedia:c}=u,p=a(n,t.globalOptions),g=a(p,o);if(e=c(g),i.scrollSnapList().length<=1)return;f=e.jump,s=!1,l=function(n,t){const o=n.scrollSnapList();return "number"==typeof t?o.map((()=>t)):t(o,n);}(i,e.delay);const {eventStore:E,ownerDocument:I}=i.internalEngine(),h=!!i.internalEngine().options.watchDrag,T=function(n,t){const o=n.rootNode();return t&&t(o)||o;}(i,e.rootNode);E.add(I,"visibilitychange",y),h&&i.on("pointerDown",O),h&&!e.stopOnInteraction&&i.on("pointerUp",S),e.stopOnMouseEnter&&E.add(T,"mouseenter",w),e.stopOnMouseEnter&&!e.stopOnInteraction&&E.add(T,"mouseleave",b),e.stopOnFocusIn&&i.on("slideFocusStart",m),e.stopOnFocusIn&&!e.stopOnInteraction&&E.add(i.containerNode(),"focusout",d),e.playOnInit&&d();},destroy:function(){i.off("pointerDown",O).off("pointerUp",S).off("slideFocusStart",m),m(),s=!0,a=!1;},play:function(n){void 0!==n&&(f=n),d();},stop:function(){a&&m();},reset:function(){a&&d();},isPlaying:function(){return a;},timeUntilNext:function(){return r?l[i.selectedScrollSnap()]-((new Date()).getTime()-r):null;}};}return t.globalOptions=void 0,t;}));;
53/** 54 * A lightweight youtube embed. Still should feel the same to the user, just MUCH faster to initialize and paint. 55 * 56 * Thx to these as the inspiration 57 * https://storage.googleapis.com/amp-vs-non-amp/youtube-lazy.html 58 * https://autoplay-youtube-player.glitch.me/ 59 * 60 * Once built it, I also found these: 61 * https://github.com/ampproject/amphtml/blob/master/extensions/amp-youtube (ðð) 62 * https://github.com/Daugilas/lazyYT 63 * https://github.com/vb/lazyframe 64 */ 65class LiteYTEmbed extends HTMLElement { 66 connectedCallback() { 67 this.videoId = this.getAttribute('videoid'); 68 69 let playBtnEl = this.querySelector('.lyt-playbtn,.lty-playbtn'); 70 // A label for the button takes priority over a [playlabel] attribute on the custom-element 71 this.playLabel = (playBtnEl && playBtnEl.textContent.trim()) || this.getAttribute('playlabel') || 'Play'; 72 73 this.dataset.title = this.getAttribute('title') || ""; 74 75 /** 76 * Lo, the youtube poster image! (aka the thumbnail, image placeholder, etc) 77 * 78 * See https://github.com/paulirish/lite-youtube-embed/blob/master/youtube-thumbnail-urls.md 79 */ 80 if (!this.style.backgroundImage) { 81 this.style.backgroundImage = `url("https://i.ytimg.com/vi/${this.videoId}/hqdefault.jpg")`; 82 this.upgradePosterImage(); 83 } 84 85 // Set up play button, and its visually hidden label 86 if (!playBtnEl) { 87 playBtnEl = document.createElement('button'); 88 playBtnEl.type = 'button'; 89 // Include the mispelled 'lty-' in case it's still being used. https://github.com/paulirish/lite-youtube-embed/issues/65 90 playBtnEl.classList.add('lyt-playbtn', 'lty-playbtn'); 91 this.append(playBtnEl); 92 } 93 if (!playBtnEl.textContent) { 94 const playBtnLabelEl = document.createElement('span'); 95 playBtnLabelEl.className = 'lyt-visually-hidden'; 96 playBtnLabelEl.textContent = this.playLabel; 97 playBtnEl.append(playBtnLabelEl); 98 } 99 100 this.addNoscriptIframe(); 101 102 // for the PE pattern, change anchor's semantics to button 103 if(playBtnEl.nodeName === 'A'){ 104 playBtnEl.removeAttribute('href'); 105 playBtnEl.setAttribute('tabindex', '0'); 106 playBtnEl.setAttribute('role', 'button'); 107 // fake button needs keyboard help 108 playBtnEl.addEventListener('keydown', e => { 109 if( e.key === 'Enter' || e.key === ' ' ){ 110 e.preventDefault(); 111 this.activate(); 112 } 113 }); 114 } 115 116 // On hover (or tap), warm up the TCP connections we're (likely) about to use. 117 this.addEventListener('pointerover', LiteYTEmbed.warmConnections, {once: true}); 118 this.addEventListener('focusin', LiteYTEmbed.warmConnections, {once: true}); 119 120 // Once the user clicks, add the real iframe and drop our play button 121 // TODO: In the future we could be like amp-youtube and silently swap in the iframe during idle time 122 // We'd want to only do this for in-viewport or near-viewport ones: https://github.com/ampproject/amphtml/pull/5003 123 this.addEventListener('click', this.activate); 124 125 // Chrome & Edge desktop have no problem with the basic YouTube Embed with ?autoplay=1 126 // However Safari desktop and most/all mobile browsers do not successfully track the user gesture of clicking through the creation/loading of the iframe, 127 // so they don't autoplay automatically. Instead we must load an additional 2 sequential JS files (1KB + 165KB) (un-br) for the YT Player API 128 // TODO: Try loading the the YT API in parallel with our iframe and then attaching/playing it. #82 129 this.needsYTApi = this.hasAttribute("js-api") || navigator.vendor.includes('Apple') || navigator.userAgent.includes('Mobi'); 130 } 131 132 /** 133 * Add a <link rel={preload | preconnect} ...> to the head 134 */ 135 static addPrefetch(kind, url, as) { 136 const linkEl = document.createElement('link'); 137 linkEl.rel = kind; 138 linkEl.href = url; 139 if (as) { 140 linkEl.as = as; 141 } 142 document.head.append(linkEl); 143 } 144 145 /** 146 * Begin pre-connecting to warm up the iframe load 147 * Since the embed's network requests load within its iframe, 148 * preload/prefetch'ing them outside the iframe will only cause double-downloads. 149 * So, the best we can do is warm up a few connections to origins that are in the critical path. 150 * 151 * Maybe `<link rel=preload as=document>` would work, but it's unsupported: http://crbug.com/593267 152 * But TBH, I don't think it'll happen soon with Site Isolation and split caches adding serious complexity. 153 */ 154 static warmConnections() { 155 if (LiteYTEmbed.preconnected) return; 156 157 // The iframe document and most of its subresources come right off youtube.com 158 LiteYTEmbed.addPrefetch('preconnect', 'https://www.youtube-nocookie.com'); 159 // The botguard script is fetched off from google.com 160 LiteYTEmbed.addPrefetch('preconnect', 'https://www.google.com'); 161 162 // Not certain if these ad related domains are in the critical path. Could verify with domain-specific throttling. 163 LiteYTEmbed.addPrefetch('preconnect', 'https://googleads.g.doubleclick.net'); 164 LiteYTEmbed.addPrefetch('preconnect', 'https://static.doubleclick.net'); 165 166 LiteYTEmbed.preconnected = true; 167 } 168 169 fetchYTPlayerApi() { 170 if (window.YT || (window.YT && window.YT.Player)) return; 171 172 this.ytApiPromise = new Promise((res, rej) => { 173 var el = document.createElement('script'); 174 el.src = 'https://www.youtube.com/iframe_api'; 175 el.async = true; 176 el.onload = _ => { 177 YT.ready(res); 178 }; 179 el.onerror = rej; 180 this.append(el); 181 }); 182 } 183 184 /** Return the YT Player API instance. (Public L-YT-E API) */ 185 async getYTPlayer() { 186 if(!this.playerPromise) { 187 await this.activate(); 188 } 189 190 return this.playerPromise; 191 } 192 193 async addYTPlayerIframe() { 194 this.fetchYTPlayerApi(); 195 await this.ytApiPromise; 196 197 const videoPlaceholderEl = document.createElement('div') 198 this.append(videoPlaceholderEl); 199 200 const paramsObj = Object.fromEntries(this.getParams().entries()); 201 202 this.playerPromise = new Promise(resolve => { 203 let player = new YT.Player(videoPlaceholderEl, { 204 width: '100%', 205 videoId: this.videoId, 206 playerVars: paramsObj, 207 events: { 208 'onReady': event => { 209 event.target.playVideo(); 210 resolve(player); 211 } 212 } 213 }); 214 }); 215 } 216 217 // Add the iframe within <noscript> for indexability discoverability. See https://github.com/paulirish/lite-youtube-embed/issues/105 218 addNoscriptIframe() { 219 const iframeEl = this.createBasicIframe(); 220 const noscriptEl = document.createElement('noscript'); 221 // Appending into noscript isn't equivalant for mysterious reasons: https://html.spec.whatwg.org/multipage/scripting.html#the-noscript-element 222 noscriptEl.innerHTML = iframeEl.outerHTML; 223 this.append(noscriptEl); 224 } 225 226 getParams() { 227 const params = new URLSearchParams(this.getAttribute('params') || []); 228 params.append('autoplay', '1'); 229 params.append('playsinline', '1'); 230 return params; 231 } 232 233 async activate(){ 234 if (this.classList.contains('lyt-activated')) return; 235 this.classList.add('lyt-activated'); 236 237 if (this.needsYTApi) { 238 return this.addYTPlayerIframe(this.getParams()); 239 } 240 241 const iframeEl = this.createBasicIframe(); 242 this.append(iframeEl); 243 244 // Set focus for a11y
245 iframeEl.focus(); 246 } 247 248 createBasicIframe(){ 249 const iframeEl = document.createElement('iframe'); 250 iframeEl.width = 560; 251 iframeEl.height = 315; 252 // No encoding necessary as [title] is safe. https://cheatsheetseries.owasp.org/cheatsheets/Cross_Site_Scripting_Prevention_Cheat_Sheet.html#:~:text=Safe%20HTML%20Attributes%20include 253 iframeEl.title = this.playLabel; 254 iframeEl.allow = 'accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture'; 255 iframeEl.allowFullscreen = true; 256 // Required by Youtube to fix Error 153 257 iframeEl.referrerPolicy = 'strict-origin-when-cross-origin'; 258 // AFAIK, the encoding here isn't necessary for XSS, but we'll do it only because this is a URL 259 // https://stackoverflow.com/q/64959723/89484 260 iframeEl.src = `https://www.youtube-nocookie.com/embed/${encodeURIComponent(this.videoId)}?${this.getParams().toString()}`; 261 return iframeEl; 262 } 263 264 /** 265 * In the spirit of the `lowsrc` attribute and progressive JPEGs, we'll upgrade the reliable 266 * poster image to a higher resolution one, if it's available. 267 * Interestingly this sddefault webp is often smaller in filesize, but we will still attempt it second 268 * because getting _an_ image in front of the user if our first priority. 269 * 270 * See https://github.com/paulirish/lite-youtube-embed/blob/master/youtube-thumbnail-urls.md for more details 271 */ 272 upgradePosterImage() { 273 // Defer to reduce network contention. 274 setTimeout(() => { 275 const webpUrl = `https://i.ytimg.com/vi_webp/${this.videoId}/sddefault.webp`; 276 const img = new Image(); 277 img.fetchPriority = 'low'; // low priority to reduce network contention 278 img.referrerpolicy = 'origin'; // Not 100% sure it's needed, but https://github.com/ampproject/amphtml/pull/3940 279 img.src = webpUrl; 280 img.onload = e => { 281 // A pretty ugly hack since onerror won't fire on YouTube image 404. This is (probably) due to 282 // Youtube's style of returning data even with a 404 status. That data is a 120x90 placeholder image. 283 // ⦠per "annoying yt 404 behavior" in the .md 284 const noAvailablePoster = e.target.naturalHeight == 90 && e.target.naturalWidth == 120; 285 if (noAvailablePoster) return; 286 287 this.style.backgroundImage = `url("${webpUrl}")`; 288 } 289 }, 100); 290 } 291} 292// Register custom element 293customElements.define('lite-youtube', LiteYTEmbed); 294; 295(()=>{var e={52(e){var t;t=()=>(()=>{"use strict";var e=[,(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>i.Animation});var i=n(2)},(e,t,n)=>{n.r(t),n.d(t,{Animation:()=>i});var i=function(){function e(e,t,n,i){this.animation=e,this.artboard=t,this.playing=i,this.loopCount=0,this.scrubTo=null,this.instance=new n.LinearAnimationInstance(e,t)}return Object.defineProperty(e.prototype,"name",{get:function(){return this.animation.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){return this.instance.time},set:function(e){this.instance.time=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"loopValue",{get:function(){return this.animation.loopValue},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"needsScrub",{get:function(){return null!==this.scrubTo},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){null===this.scrubTo?this.instance.advance(e):(this.instance.time=0,this.instance.advance(this.scrubTo),this.scrubTo=null)},e.prototype.apply=function(e){this.instance.apply(e)},e.prototype.cleanup=function(){this.instance.delete()},e}()},(e,t,n)=>{n.r(t),n.d(t,{RuntimeLoader:()=>o});var i=n(4),r=n(5),a=function(){return a=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},a.apply(this,arguments)},o=function(){function e(){}return e.notifyError=function(t){var n;for(e.isLoading=!1;e.errorCallbackQueue.length>0;)null===(n=e.errorCallbackQueue.shift())||void 0===n||n(t);e.callBackQueue=[]},e.loadRuntime=function(){var t=e.wasmURL,n=e.wasmBinary;e.enablePerfMarks&&performance.mark("rive:wasm-init:start"),i.default(a({locateFile:function(){return t}},n?{wasmBinary:n}:{})).then(function(t){var n;for(e.enablePerfMarks&&(performance.mark("rive:wasm-init:end"),performance.measure("rive:wasm-init","rive:wasm-init:start","rive:wasm-init:end")),e.runtime=t,e.errorCallbackQueue=[];e.callBackQueue.length>0;)null===(n=e.callBackQueue.shift())||void 0===n||n(e.runtime)}).catch(function(n){var i={message:(null==n?void 0:n.message)||"Unknown error",type:(null==n?void 0:n.name)||"Error",wasmError:n
295instanceof WebAssembly.CompileError||n instanceof WebAssembly.RuntimeError,originalError:n};console.debug("Rive WASM load error details:",i);var r=e.wasmFallbackURL,a=null!==r&&t.toLowerCase()===r.toLowerCase();if(null===r||a){var o=a?"the configured WASM URL or its fallback (".concat(r,")"):t,s=["Could not load Rive WASM file from ".concat(o,"."),"Possible reasons:","- Network connection is down","- WebAssembly is not supported in this environment","- The WASM file is corrupted or incompatible","\nError details:","- Type: ".concat(i.type),"- Message: ".concat(i.message),"- WebAssembly-specific error: ".concat(i.wasmError),"\nTo resolve, you may need to:","1. Check your network connection","2. Set a new WASM source via RuntimeLoader.setWasmUrl()","3. Call RuntimeLoader.awaitInstance() again"].join("\n");console.error(s),e.notifyError(new Error(s))}else console.warn("Failed to load WASM from ".concat(t," (").concat(i.message,"), trying fallback URL: ").concat(r)),e.wasmBinary=null,e.setWasmUrl(r),e.loadRuntime()})},e.getInstance=function(t,n){e.isLoading||(e.isLoading=!0,e.loadRuntime()),e.runtime?t(e.runtime):(e.callBackQueue.push(t),n&&e.errorCallbackQueue.push(n))},e.awaitInstance=function(){return new Promise(function(t,n){return e.getInstance(t,n)})},e.setWasmUrl=function(t){e.wasmURL=t},e.getWasmUrl=function(){return e.wasmURL},e.setWasmFallbackUrl=function(t){e.wasmFallbackURL=t},e.getWasmFallbackUrl=function(){return e.wasmFallbackURL},e.setWasmBinary=function(t){t instanceof ArrayBuffer||null===t?e.wasmBinary=t:console.error("setWasmBinary expects an ArrayBuffer or null")},e.getWasmBinary=function(){return e.wasmBinary},e.isLoading=!1,e.callBackQueue=[],e.wasmURL="https://unpkg.com/".concat(r.name,"@").concat(r.version,"/rive.wasm"),e.wasmFallbackURL="https://cdn.jsdelivr.net/npm/".concat(r.name,"@").concat(r.version,"/rive_fallback.wasm"),e.wasmBinary=null,e.errorCallbackQueue=[],e.enablePerfMarks=!1,e}()},(e,t,n)=>{var i;n.r(t),n.d(t,{default:()=>r});const r=(i="undefined"!=typeof document?document.currentScript?.src:void 0,function(e={}){var t,n,r=e,a=new Promise((e,i)=>{t=e,n=i}),o="object"==typeof window,s="function"==typeof importScripts;function l(){function e(e){const a=i;n=t=0,i=new Map,a.forEach(t=>{try{t(e)}catch(e){console.error(e)}}),this.gb(),r&&r.Hb()}let t=0,n=0,i=new Map,r=null,a=null;this.requestAnimationFrame=function(r){t||=requestAnimationFrame(e.bind(this));const a=++n;return i.set(a,r),a},this.cancelAnimationFrame=function(e){i.delete(e),t&&0==i.size&&(cancelAnimationFrame(t),t=0)},this.Fb=function(e){a&&(document.body.remove(a),a=null),e||(a=document.createElement("div"),a.style.backgroundColor="black",a.style.position="fixed",a.style.right=0,a.style.top=0,a.style.color="white",a.style.padding="4px",a.innerHTML="RIVE FPS",e=function(e){a.innerHTML="RIVE FPS "+e.toFixed(1)},document.body.appendChild(a)),r=new function(){let t=0,n=0;this.Hb=function(){var i=performance.now();n?(++t,1e3<(i-=n)&&(e(1e3*t/i),t=n=0)):(n=i,t=0)}}},this.Cb=function(){a&&(document.body.remove(a),a=null),r=null},this.gb=function(){}}function c(e){const t=new Map;let n=-1/0;this.push=function(i){return i=i+((1<<e)-1)>>e,t.has(i)&&clearTimeout(t.get(i)),t.set(i,setTimeout(function(){t.delete(i),0==t.length?n=-1/0:i==n&&(n=Math.max(...t.keys()),console.assert(n<i))},1e3)),n=Math.max(i,n),n<<e}}const u=r.onRuntimeInitialized;r.onRuntimeInitialized=function(){u&&u();let e=r.decodeAudio;r.decodeAudio=function(t,n){n(t=e(t))};let t=r.decodeFont;
295r.decodeFont=function(e,n){n(e=t(e))};let n=r.setFallbackFontCb;r.setFallbackFontCallback="function"==typeof n?function(e){n(e)}:function(){console.warn("Module.setFallbackFontCallback called, but text support is not enabled in this build.")};const i=r.FileAssetLoader;r.ptrToAsset=e=>{let t=r.ptrToFileAsset(e);return t.isImage?r.ptrToImageAsset(e):t.isFont?r.ptrToFontAsset(e):t.isAudio?r.ptrToAudioAsset(e):t},r.CustomFileAssetLoader=i.extend("CustomFileAssetLoader",{__construct:function({loadContents:e}){this.__parent.__construct.call(this),this.ub=e},loadContents:function(e,t){return e=r.ptrToAsset(e),this.ub(e,t)}}),r.CDNFileAssetLoader=i.extend("CDNFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this)},loadContents:function(e){let t=r.ptrToAsset(e);return""!==(e=t.cdnUuid)&&(n=t.cdnBaseUrl+"/"+e,(i=new XMLHttpRequest).responseType="arraybuffer",i.onreadystatechange=function(){4==i.readyState&&200==i.status&&(e=>{t.decode(new Uint8Array(e.response))})(i)},i.open("GET",n,!0),i.send(null),!0);var n,i}}),r.FallbackFileAssetLoader=i.extend("FallbackFileAssetLoader",{__construct:function(){this.__parent.__construct.call(this),this.bb=[]},addLoader:function(e){this.bb.push(e)},loadContents:function(e,t){for(let n of this.bb)if(n.loadContents(e,t))return!0;return!1}});let a=r.computeAlignment;r.computeAlignment=function(e,t,n,i,r=1){return a.call(this,e,t,n,i,r)}};const d="createConicGradient createImageData createLinearGradient createPattern createRadialGradient getContextAttributes getImageData getLineDash getTransform isContextLost isPointInPath isPointInStroke measureText".split(" "),h=new function(){function e(){if(!t){var e=document.createElement("canvas"),o={alpha:1,depth:0,stencil:0,antialias:0,premultipliedAlpha:1,preserveDrawingBuffer:0,powerPreference:"high-performance",failIfMajorPerformanceCaveat:0,enableExtensionsByDefault:1,explicitSwapControl:1,renderViaOffscreenBackBuffer:1};let s;if(/iPhone|iPad|iPod/i.test(navigator.userAgent)){if(s=e.getContext("webgl",o),n=1,!s)return console.log("No WebGL support. Image mesh will not be drawn."),!1}else if(s=e.getContext("webgl2",o))n=2;else{if(!(s=e.getContext("webgl",o)))return console.log("No WebGL support. Image mesh will not be drawn."),!1;n=1}function c(e,t,n){if(t=s.createShader(t),s.shaderSource(t,n),s.compileShader(t),0<((n=s.getShaderInfoLog(t))||"").length)throw n;s.attachShader(e,t)}if(s=new Proxy(s,{get:(e,t)=>e.isContextLost()?(l||(console.error("Cannot render the mesh because the GL Context was lost. Tried to invoke ",t),l=!0),"function"==typeof e[t]?function(){}:void 0):"function"==typeof e[t]?function(...n){return e[t].apply(e,n)}:e[t],set(e,t,n){if(!e.isContextLost())return e[t]=n,!0;l||(console.error("Cannot render the mesh because the GL Context was lost. Tried to set property "+t),l=!0)}}),i=Math.min(s.getParameter(s.MAX_RENDERBUFFER_SIZE),s.getParameter(s.MAX_TEXTURE_SIZE)),c(e=s.createProgram(),s.VERTEX_SHADER,"attribute vec2 vertex;\n attribute vec2 uv;\n uniform vec4 mat;\n uniform vec2 translate;\n varying vec2 st;\n void main() {\n st = uv;\n gl_Position = vec4(mat2(mat) * vertex + translate, 0, 1);\n }"),c(e,s.FRAGMENT_SHADER,"precision highp float;\n uniform sampler2D image;\n varying vec2 st;\n void main() {\n gl_FragColor = texture2D(image, st);\n }"),s.bindAttribLocation(e,0,"vertex"),s.bindAttribLocation(e,1,"uv"),s.linkProgram(e),0<((o=s.getProgramInfoLog(e))||"").trim().length)throw o;r=s.getUniformLocation(e,"mat"),a=s.getUniformLocation(e,"translate"),s.useProgram(e),s.bindBuffer(s.ARRAY_BUFFER,s.createBuffer()),s.enableVertexAttribArray(0),s.enableVertexAttribArray(1),s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,s.createBuffer()),s.uniform1i(s.getUniformLocation(e,"image"),0),s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),t=s}return!0}let t=null,n=0,i=0,r=null,a=null,o=0,s=0,l=!1;e(),this.Tb=function(){return e(),i},this.Bb=function(e){t.deleteTexture&&t.deleteTexture(e)},this.Ab=function(i){if(!e())return null;const r=t.createTexture();return r?(t.bindTexture(t.TEXTURE_2D,r),t.texImage2D(t.TEXTURE_2D,0,t.RGBA,t.RGBA,t.UNSIGNED_BYTE,i),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),2==n?(t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR_MIPMAP_LINEAR),t.generateMipmap(t.TEXTURE_2D)):t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),r):null};const u=new c(8),d=new c(8),h=new c(10),f=new c(10);this.Eb=function(n,i,l,c,p){if(e()){var m=u.push(n),v=d.push(i);if(t.canvas){for(var b of(t.canvas.width==m&&t.canvas.height==v||(t.canvas.width=m,t.canvas.height=v),t.viewport(0,v-i,n,i),t.disable(t.SCISSOR_TEST),t.clearColor(0,0,0,0),t.clear(t.COLOR_BUFFER_BIT),t.enable(t.SCISSOR_TEST),l.sort((e,t)=>
295t.nb-e.nb),m=h.push(c),o!=m&&(t.bufferData(t.ARRAY_BUFFER,8*m,t.DYNAMIC_DRAW),o=m),m=0,l))t.bufferSubData(t.ARRAY_BUFFER,m,b.La),m+=4*b.La.length;for(var y of(console.assert(m==4*c),l))t.bufferSubData(t.ARRAY_BUFFER,m,y.rb),m+=4*y.rb.length;for(var g of(console.assert(m==8*c),m=f.push(p),s!=m&&(t.bufferData(t.ELEMENT_ARRAY_BUFFER,2*m,t.DYNAMIC_DRAW),s=m),b=0,l))t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,b,g.indices),b+=2*g.indices.length;console.assert(b==2*p),g=0,y=!0,m=b=0;for(const e of l){e.image.Da!=g&&(t.bindTexture(t.TEXTURE_2D,e.image.Ca||null),g=e.image.Da),e.Yb?(t.scissor(e.Ra,v-e.Sa-e.ab,e.kc,e.ab),y=!0):y&&(t.scissor(0,v-i,n,i),y=!1),l=2/n;const o=-2/i;t.uniform4f(r,e.da[0]*l*e.ua,e.da[1]*o*e.va,e.da[2]*l*e.ua,e.da[3]*o*e.va),t.uniform2f(a,e.da[4]*l*e.ua+l*(e.Ra-e.Ub*e.ua)-1,e.da[5]*o*e.va+o*(e.Sa-e.Vb*e.va)+1),t.vertexAttribPointer(0,2,t.FLOAT,!1,0,m),t.vertexAttribPointer(1,2,t.FLOAT,!1,0,m+4*c),t.drawElements(t.TRIANGLES,e.indices.length,t.UNSIGNED_SHORT,b),m+=4*e.La.length,b+=2*e.indices.length}console.assert(m==4*c),console.assert(b==2*p)}}},this.canvas=function(){return e()&&t.canvas}},f=r.onRuntimeInitialized;r.onRuntimeInitialized=function(){function e(e){switch(e){case p.srcOver:return"source-over";case p.screen:return"screen";case p.overlay:return"overlay";case p.darken:return"darken";case p.lighten:return"lighten";case p.colorDodge:return"color-dodge";case p.colorBurn:return"color-burn";case p.hardLight:return"hard-light";case p.softLight:return"soft-light";case p.difference:return"difference";case p.exclusion:return"exclusion";case p.multiply:return"multiply";case p.hue:return"hue";case p.saturation:return"saturation";case p.color:return"color";case p.luminosity:return"luminosity"}}function t(e){return"rgba("+((16711680&e)>>>16)+","+((65280&e)>>>8)+","+((255&e)>>>0)+","+((4278190080&e)>>>24)/255+")"}function n(){0<C.length&&(h.Eb(S.drawWidth(),S.drawHeight(),C,E,I),C=[],I=E=0,S.reset(512,512));for(const e of A){for(const t of e.G)t();e.G=[]}A.clear()}f&&f();var i=r.RenderPaintStyle;const a=r.RenderPath,o=r.RenderPaint,s=r.Renderer,c=r.StrokeCap,u=r.StrokeJoin,p=r.BlendMode,m=i.fill,v=i.stroke,b=r.FillRule.evenOdd;let y=1;var g=r.RenderImage.extend("CanvasRenderImage",{__construct:function({ha:e,sa:t}={}){this.__parent.__construct.call(this),this.Da=y,y=y+1&2147483647||1,this.ha=e,this.sa=t},__destruct:function(){this.Ca&&(h.Bb(this.Ca),URL.revokeObjectURL(this.Oa)),this.__parent.__destruct.call(this)},decode:function(e){var t=this;t.sa&&t.sa(t);var n=new Image;t.Oa=URL.createObjectURL(new Blob([e],{type:"image/png"})),n.onload=function(){t.tb=n,t.Ca=h.Ab(n),t.size(n.width,n.height),t.ha&&t.ha(t)},n.src=t.Oa}}),w=a.extend("CanvasRenderPath",{__construct:function(){this.__parent.__construct.call(this),this.R=new Path2D},rewind:function(){this.R=new Path2D},addPath:function(e,t,n,i,r,a,o){var s=this.R,l=s.addPath;e=e.R;const c=new DOMMatrix;c.a=t,c.b=n,c.c=i,c.d=r,c.e=a,c.f=o,l.call(s,e,c)},fillRule:function(e){this.Na=e},moveTo:function(e,t){this.R.moveTo(e,t)},lineTo:function(e,t){this.R.lineTo(e,t)},cubicTo:function(e,t,n,i,r,a){this.R.bezierCurveTo(e,t,n,i,r,a)},close:function(){this.R.closePath()}}),_=o.extend("CanvasRenderPaint",{color:function(e){this.Pa=t(e)},thickness:function(e){this.xb=e},join:function(e){switch(e){case u.miter:this.Ba="miter";break;case u.round:this.Ba="round";break;case u.bevel:this.Ba="bevel"}},cap:function(e){switch(e){case c.butt:this.Aa="butt";break;case c.round:this.Aa="round";break;case c.square:this.Aa="square"}},style:function(e){this.wb=e},blendMode:function(t){this.sb=e(t)},clearGradient:function(){this.fa=null},linearGradient:function(e,t,n,i){this.fa={ob:e,pb:t,Va:n,Wa:i,Ja:[]}},radialGradient:function(e,t,n,i){this.fa={ob:e,pb:t,Va:n,Wa:i,Ja:[],Sb:!0}},addStop:function(e,t){this.fa.Ja.push({color:e,stop:t})},completeGradient:function(){},draw:function(e,n,i,r){let a=this.wb;var o=this.Pa,s=this.fa;const l=e.globalCompositeOperation,c=e.globalAlpha;if(e.globalCompositeOperation=this.sb,e.globalAlpha=r,null!=s){o=s.ob;const n=s.pb,i=s.Va;var u=s.Wa;r=s.Ja,s.Sb?(s=i-o,u-=n,o=e.createRadialGradient(o,n,0,o,n,Math.sqrt(s*s+u*u))):o=e.createLinearGradient(o,n,i,u);for(let e=0,n=r.length;e<n;e++)s=r[e],o.addColorStop(s.stop,t(s.color));this.Pa=o,this.fa=null}switch(a){case v:e.strokeStyle=o,e.lineWidth=this.xb,e.lineCap=this.Aa,e.lineJoin=this.Ba,e.stroke(n);break;case m:e.fillStyle=o,e.fill(n,i)}e.globalCompositeOperation=l,e.globalAlpha=c}});const A=new Set;let S=null,C=[],E=0,I=0;var x=r.CanvasRenderer=s.extend("Renderer",{__construct:function(e){this.__parent.__construct.call(this),this.P=[1,0,0,1,0,0],this.D=[1],this.A=e.getContext("2d"),this.Ma=e,this.G=[]}
295,save:function(){this.P.push(...this.P.slice(this.P.length-6)),this.D.push(this.D[this.D.length-1]),this.G.push(this.A.save.bind(this.A))},restore:function(){const e=this.P.length-6;if(6>e)throw"restore() called without matching save().";this.P.splice(e),this.D.pop(),this.G.push(this.A.restore.bind(this.A))},transform:function(e,t,n,i,r,a){const o=this.P,s=o.length-6;o.splice(s,6,o[s]*e+o[s+2]*t,o[s+1]*e+o[s+3]*t,o[s]*n+o[s+2]*i,o[s+1]*n+o[s+3]*i,o[s]*r+o[s+2]*a+o[s+4],o[s+1]*r+o[s+3]*a+o[s+5]),this.G.push(this.A.transform.bind(this.A,e,t,n,i,r,a))},rotate:function(e){const t=Math.sin(e);e=Math.cos(e),this.transform(e,t,-t,e,0,0)},modulateOpacity:function(e){this.D[this.D.length-1]*=e},_drawPath:function(e,t){this.G.push(t.draw.bind(t,this.A,e.R,e.Na===b?"evenodd":"nonzero",Math.max(0,this.D[this.D.length-1])))},_drawRiveImage:function(t,n,i,r){var a=t.tb;if(a){var o=this.A,s=e(i),l=Math.max(0,r*this.D[this.D.length-1]);this.G.push(function(){o.globalCompositeOperation=s,o.globalAlpha=l,o.drawImage(a,0,0),o.globalAlpha=1})}},_getMatrix:function(e){const t=this.P,n=t.length-6;for(let i=0;6>i;++i)e[i]=t[n+i]},_drawImageMesh:function(t,i,a,o,s,l,c,u,d,f,p,m,v,b){let y,g,w;try{y=r.HEAPF32.slice(s>>2,(s>>2)+l),g=r.HEAPF32.slice(c>>2,(c>>2)+u),w=r.HEAPU16.slice(d>>1,(d>>1)+f)}catch(e){return void console.error("[Rive] _drawImageMesh: failed to read mesh data from WASM heap. Mesh skipped for this frame.")}i=this.A.canvas.width,s=this.A.canvas.height,c=v-p,u=b-m,p=Math.max(p,0),m=Math.max(m,0),v=Math.min(v,i),b=Math.min(b,s);const _=v-p,x=b-m;if(console.assert(_<=Math.min(c,i)),console.assert(x<=Math.min(u,s)),!(0>=_||0>=x)){v=_<c||x<u,i=b=1;var M=Math.ceil(_*b),k=Math.ceil(x*i);s=h.Tb(),M>s&&(b*=s/M,M=s),k>s&&(i*=s/k,k=s),S||(S=new r.DynamicRectanizer(s),S.reset(512,512)),0>(s=S.addRect(M,k))&&(n(),A.add(this),s=S.addRect(M,k),console.assert(0<=s));var R=65535&s,F=s>>16;C.push({da:this.P.slice(this.P.length-6),image:t,Ra:R,Sa:F,Ub:p,Vb:m,kc:M,ab:k,ua:b,va:i,La:y,rb:g,indices:w,Yb:v,nb:t.Da<<1|(v?1:0)}),E+=l,I+=f;var L=this.A,T=e(a),P=Math.max(0,o*this.D[this.D.length-1]);this.G.push(function(){L.save(),L.resetTransform(),L.globalCompositeOperation=T,L.globalAlpha=P;const e=h.canvas();e&&L.drawImage(e,R,F,M,k,p,m,_,x),L.restore()})}},_clipPath:function(e){this.G.push(this.A.clip.bind(this.A,e.R,e.Na===b?"evenodd":"nonzero"))},clear:function(){A.add(this),this.G.push(this.A.clearRect.bind(this.A,0,0,this.Ma.width,this.Ma.height))},flush:function(){},translate:function(e,t){this.transform(1,0,0,1,e,t)}});r.makeRenderer=function(e){const t=new x(e),n=t.A;return new Proxy(t,{get(e,i){if("function"==typeof e[i])return function(...t){return e[i].apply(e,t)};if("function"==typeof n[i]){if(-1<d.indexOf(i))throw Error("RiveException: Method call to '"+i+"()' is not allowed, as the renderer cannot immediately pass through the return values of any canvas 2d context methods.");return function(...e){t.G.push(n[i].bind(n,...e))}}return e[i]},set(e,i,r){if(i in n)return t.G.push(()=>{n[i]=r}),!0}})},r.decodeImage=function(e,t){new g({ha:t}).decode(e)},r.renderFactory={makeRenderPaint:function(){return new _},makeRenderPath:function(){return new w},makeRenderImage:function(){let e=k;return new g({sa:()=>{e.total++},ha:()=>{if(e.loaded++,e.loaded===e.total){const t=e.ready;t&&(t(),e.ready=null)}}})}};let M=r.load,k=null;r.load=function(e,t,n=!0){const i=new r.FallbackFileAssetLoader;return void 0!==t&&i.addLoader(t),n&&(t=new r.CDNFileAssetLoader,i.addLoader(t)),new Promise(function(t){let n=null;k={total:0,loaded:0,ready:function(){t(n)}},n=M(e,i),0==k.total&&t(n)})};let R=r.RendererWrapper.prototype.align;r.RendererWrapper.prototype.align=function(e,t,n,i,r=1){R.call(this,e,t,n,i,r)},i=new l,r.requestAnimationFrame=i.requestAnimationFrame.bind(i),r.cancelAnimationFrame=i.cancelAnimationFrame.bind(i),r.enableFPSCounter=i.Fb.bind(i),r.disableFPSCounter=i.Cb,i.gb=n,r.resolveAnimationFrame=n,r.cleanup=function(){S&&S.delete()}};var p,m,v=Object.assign({},r),b="./this.program",y="";(o||s)&&(s?y=self.location.href:"undefined"!=typeof document&&document.currentScript&&(y=document.currentScript.src),i&&(y=i),y=y.startsWith("blob:")?"":y.substr(0,y.replace(/[?#].*/,"").lastIndexOf("/")+1),s&&(m=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),p=(e,t,n)=>{if(q(e)){var i=new XMLHttpRequest;i.open("GET",e,!0),i.responseType="arraybuffer",i.onload=()=>{200==i.status||0==i.status&&i.response?t(i.response):n()},i.onerror=n,i.send(null)}else fetch(e,{credentials:"same-origin"}).then(e=>e.ok?e.arrayBuffer():Promise.reject(Error(e.status+" : "+e.url))).then(t,n)});var g,w=r.print||console.log.bind(console),_=r.printErr||console.error.bind(console);Object.assign(r,v),v=null,r.thisProgram&&(b=r.thisProgram),r.wasmBinary&&(g=r.
295wasmBinary);var A,S,C,E,I,x,M,k,R,F=!1;function L(){var e=A.buffer;r.HEAP8=S=new Int8Array(e),r.HEAP16=E=new Int16Array(e),r.HEAPU8=C=new Uint8Array(e),r.HEAPU16=I=new Uint16Array(e),r.HEAP32=x=new Int32Array(e),r.HEAPU32=M=new Uint32Array(e),r.HEAPF32=k=new Float32Array(e),r.HEAPF64=R=new Float64Array(e)}var T=[],P=[],O=[];function j(){var e=r.preRun.shift();T.unshift(e)}var D=0,B=null,N=null;function V(e){throw r.onAbort?.(e),_(e="Aborted("+e+")"),F=!0,e=new WebAssembly.RuntimeError(e+". Build with -sASSERTIONS for more info."),n(e),e}var W,U=e=>e.startsWith("data:application/octet-stream;base64,"),q=e=>e.startsWith("file://");function H(e){if(e==W&&g)return new Uint8Array(g);if(m)return m(e);throw"both async and sync fetching of the wasm failed"}function z(e,t,n){return function(e){return g?Promise.resolve().then(()=>H(e)):new Promise((t,n)=>{p(e,e=>t(new Uint8Array(e)),()=>{try{t(H(e))}catch(e){n(e)}})})}(e).then(e=>WebAssembly.instantiate(e,t)).then(n,e=>{_(`failed to asynchronously prepare wasm: ${e}`),V(e)})}var $,Y,X={494893:(e,t,n,i,r)=>{if("undefined"==typeof window||void 0===(window.AudioContext||window.webkitAudioContext))return 0;if(void 0===window.miniaudio){window.miniaudio={referenceCount:0},window.miniaudio.device_type={},window.miniaudio.device_type.playback=e,window.miniaudio.device_type.capture=t,window.miniaudio.device_type.duplex=n,window.miniaudio.device_state={},window.miniaudio.device_state.stopped=i,window.miniaudio.device_state.started=r;let a=window.miniaudio;a.devices=[],a.track_device=function(e){for(var t=0;t<a.devices.length;++t)if(null==a.devices[t])return a.devices[t]=e,t;return a.devices.push(e),a.devices.length-1},a.untrack_device_by_index=function(e){for(a.devices[e]=null;0<a.devices.length&&null==a.devices[a.devices.length-1];)a.devices.pop()},a.untrack_device=function(e){for(var t=0;t<a.devices.length;++t)if(a.devices[t]==e)return a.untrack_device_by_index(t)},a.get_device_by_index=function(e){return a.devices[e]},a.unlock_event_types=["touchend","click"],a.unlock=function(){for(var e=0;e<a.devices.length;++e){var t=a.devices[e];null!=t&&null!=t.I&&t.state===a.device_state.started&&t.I.resume().then(()=>{Tn(t.hb)},e=>{console.error("Failed to resume audiocontext",e)})}a.unlock_event_types.map(function(e){document.removeEventListener(e,a.unlock,!0)})},a.unlock_event_types.map(function(e){document.addEventListener(e,a.unlock,!0)})}return window.miniaudio.referenceCount+=1,1},497071:()=>{void 0!==window.miniaudio&&(window.miniaudio.unlock_event_types.map(function(e){document.removeEventListener(e,window.miniaudio.unlock,!0)}),--window.miniaudio.referenceCount,0===window.miniaudio.referenceCount&&delete window.miniaudio)},497375:()=>void 0!==navigator.mediaDevices&&void 0!==navigator.mediaDevices.getUserMedia,497479:()=>{try{var e=new(window.AudioContext||window.webkitAudioContext),t=e.sampleRate;return e.close(),t}catch(e){return 0}},497650:(e,t,n,i,r,a)=>{if(void 0===window.miniaudio)return-1;var o={},s={};return e==window.miniaudio.device_type.playback&&0!=n&&(s.sampleRate=n),o.I=new(window.AudioContext||window.webkitAudioContext)(s),o.I.suspend(),o.state=window.miniaudio.device_state.stopped,n=0,e!=window.miniaudio.device_type.playback&&(n=t),o.W=o.I.createScriptProcessor(i,n,t),o.W.onaudioprocess=function(n){if(null!=o.na&&0!=o.na.length||(o.na=new Float32Array(k.buffer,r,i*t)),e==window.miniaudio.device_type.capture||e==window.miniaudio.device_type.duplex){for(var s=0;s<t;s+=1)for(var l=n.inputBuffer.getChannelData(s),c=o.na,u=0;u<i;u+=1)c[u*t+s]=l[u];On(a,i,r)}if(e==window.miniaudio.device_type.playback||e==window.miniaudio.device_type.duplex)for(jn(a,i,r),s=0;s<n.outputBuffer.numberOfChannels;++s)for(l=n.outputBuffer.getChannelData(s),c=o.na,u=0;u<i;u+=1)l[u]=c[u*t+s];else for(s=0;s<n.outputBuffer.numberOfChannels;++s)n.outputBuffer.getChannelData(s).fill(0)},e!=window.miniaudio.device_type.capture&&e!=window.miniaudio.device_type.duplex||navigator.mediaDevices.getUserMedia({audio:!0,video:!1}).then(function(e){o.wa=o.I.createMediaStreamSource(e),o.wa.connect(o.W),o.W.connect(o.I.destination)}).catch(function(e){console.log("Failed to get user media: "+e)}),e==window.miniaudio.device_type.playback&&o.W.connect(o.I.destination),o.hb=a,window.miniaudio.track_device(o)},500527:e=>window.miniaudio.get_device_by_index(e).I.sampleRate,500600:e=>{void 0!==(e=window.miniaudio.get_device_by_index(e)).W&&(e.W.onaudioprocess=function(){},e.W.disconnect(),e.W=void 0),void 0!==e.wa&&(e.wa.disconnect(),e.wa=void 0),e.I.close(),e.I=void 0,e.hb=void 0},501e3:e=>{window.miniaudio.untrack_device_by_index(e)},501050:e=>{(e=window.miniaudio.get_device_by_index(e)).I.resume(),e.state=window.miniaudio.device_state.started},501189:e=>{(e=window.miniaudio.get_device_by_index(e)).I.suspend(),e.state=window.miniaudio.device_state.stopped}},G=e=>{for(;0<e.length;)e.shift()(r)};function K(){var e=x[+tt>>2];return tt+=4,e}var Q=(e,t)=>{for(var n=0,i=e.length-1;0<=i;i--){var r=e[i];"."===r?e.splice(i,1):".."===r?(e.splice(i,1),n++):n&&(e.splice(i,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},J=e=>{var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=Q(e.split("/").filter(e=>!!e),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},Z=e=>{var t=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1);return e=t[0],t=t[1],e||t?(t&&=t.substr(0,t.length-1),e+t):"."},ee=e=>{if("/"===e)return"/";var t=(e=(e=J(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},te=e=>(te=(()=>
295{if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues)return e=>crypto.getRandomValues(e);V("initRandomDevice")})())(e),ne=(...e)=>{for(var t="",n=!1,i=e.length-1;-1<=i&&!n;i--){if("string"!=typeof(n=0<=i?e[i]:"/"))throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";t=n+"/"+t,n="/"===n.charAt(0)}return(n?"/":"")+(t=Q(t.split("/").filter(e=>!!e),!n).join("/"))||"."},ie="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0,re=(e,t,n)=>{var i=t+n;for(n=t;e[n]&&!(n>=i);)++n;if(16<n-t&&e.buffer&&ie)return ie.decode(e.subarray(t,n));for(i="";t<n;){var r=e[t++];if(128&r){var a=63&e[t++];if(192==(224&r))i+=String.fromCharCode((31&r)<<6|a);else{var o=63&e[t++];65536>(r=224==(240&r)?(15&r)<<12|a<<6|o:(7&r)<<18|a<<12|o<<6|63&e[t++])?i+=String.fromCharCode(r):(r-=65536,i+=String.fromCharCode(55296|r>>10,56320|1023&r))}}else i+=String.fromCharCode(r)}return i},ae=[],oe=e=>{for(var t=0,n=0;n<e.length;++n){var i=e.charCodeAt(n);127>=i?t++:2047>=i?t+=2:55296<=i&&57343>=i?(t+=4,++n):t+=3}return t},se=(e,t,n,i)=>{if(!(0<i))return 0;var r=n;i=n+i-1;for(var a=0;a<e.length;++a){var o=e.charCodeAt(a);if(55296<=o&&57343>=o&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++a)),127>=o){if(n>=i)break;t[n++]=o}else{if(2047>=o){if(n+1>=i)break;t[n++]=192|o>>6}else{if(65535>=o){if(n+2>=i)break;t[n++]=224|o>>12}else{if(n+3>=i)break;t[n++]=240|o>>18,t[n++]=128|o>>12&63}t[n++]=128|o>>6&63}t[n++]=128|63&o}}return t[n]=0,n-r};function le(e,t){var n=Array(oe(e)+1);return e=se(e,n,0,n.length),t&&(n.length=e),n}var ce=[];function ue(e,t){ce[e]={input:[],F:[],T:t},Be(e,de)}var de={open(e){var t=ce[e.node.ta];if(!t)throw new Ae(43);e.o=t,e.seekable=!1},close(e){e.o.T.la(e.o)},la(e){e.o.T.la(e.o)},read(e,t,n,i){if(!e.o||!e.o.T.$a)throw new Ae(60);for(var r=0,a=0;a<i;a++){try{var o=e.o.T.$a(e.o)}catch(e){throw new Ae(29)}if(void 0===o&&0===r)throw new Ae(6);if(null==o)break;r++,t[n+a]=o}return r&&(e.node.timestamp=Date.now()),r},write(e,t,n,i){if(!e.o||!e.o.T.Ga)throw new Ae(60);try{for(var r=0;r<i;r++)e.o.T.Ga(e.o,t[n+r])}catch(e){throw new Ae(29)}return i&&(e.node.timestamp=Date.now()),r}},he={$a(){e:{if(!ae.length){var e=null;if("undefined"!=typeof window&&"function"==typeof window.prompt&&null!==(e=window.prompt("Input: "))&&(e+="\n"),!e){e=null;break e}ae=le(e,!0)}e=ae.shift()}return e},Ga(e,t){null===t||10===t?(w(re(e.F,0)),e.F=[]):0!=t&&e.F.push(t)},la(e){e.F&&0<e.F.length&&(w(re(e.F,0)),e.F=[])},Pb:()=>({uc:25856,wc:5,tc:191,vc:35387,sc:[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}),Qb:()=>0,Rb:()=>[24,80]},fe={Ga(e,t){null===t||10===t?(_(re(e.F,0)),e.F=[]):0!=t&&e.F.push(t)},la(e){e.F&&0<e.F.length&&(_(re(e.F,0)),e.F=[])}};function pe(e,t){var n=e.j?e.j.length:0;n>=t||(t=Math.max(t,n*(1048576>n?2:1.125)>>>0),0!=n&&(t=Math.max(t,256)),n=e.j,e.j=new Uint8Array(t),0<e.u&&e.j.set(n.subarray(0,e.u),0))}var me={L:null,S:()=>me.createNode(null,"/",16895,0),createNode(e,t,n,i){if(24576==(61440&n)||4096==(61440&n))throw new Ae(63);return me.L||(me.L={dir:{node:{V:me.i.V,N:me.i.N,ga:me.i.ga,qa:me.i.qa,lb:me.i.lb,qb:me.i.qb,mb:me.i.mb,kb:me.i.kb,xa:me.i.xa},stream:{Z:me.l.Z}},file:{node:{V:me.i.V,N:me.i.N},stream:{Z:me.l.Z,read:me.l.read,write:me.l.write,Qa:me.l.Qa,cb:me.l.cb,fb:me.l.fb}},link:{node:{V:me.i.V,N:me.i.N,ia:me.i.ia},stream:{}},Ta:{node:{V:me.i.V,N:me.i.N},stream:De}}),16384==(61440&(n=Re(e,t,n,i)).mode)?(n.i=me.L.dir.node,n.l=me.L.dir.stream,n.j={}):32768==(61440&n.mode)?(n.i=me.L.file.node,n.l=me.L.file.stream,n.u=0,n.j=null):40960==(61440&n.mode)?(n.i=me.L.link.node,n.l=me.L.link.stream):8192==(61440&n.mode)&&(n.i=me.L.Ta.node,n.l=me.L.Ta.stream),n.timestamp=Date.now(),e&&(e.j[t]=n,e.timestamp=n.timestamp),n},Ac:e=>e.j?e.j.subarray?e.j.subarray(0,e.u):new Uint8Array(e.j):new Uint8Array(0),i:{V(e){var t={};return t.yc=8192==(61440&e.mode)?e.id:1,t.Cc=e.id,t.mode=e.mode,t.Gc=1,t.uid=0,t.Bc=0,t.ta=e.ta,16384==(61440&e.mode)?t.size=4096:32768==(61440&e.mode)?t.size=e.u:40960==(61440&e.mode)?t.size=e.link.length:t.size=0,t.qc=new Date(e.timestamp),t.Fc=new Date(e.timestamp),t.xc=new Date(e.timestamp),t.yb=4096,t.rc=Math.ceil(t.size/t.yb),t},N(e,t){if(void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&(t=t.size,e.u!=t))if(0==t)e.j=null,e.u=0;else{var n=e.j;e.j=new Uint8Array(t),n&&e.j.set(n.subarray(0,Math.min(t,e.u))),e.u=t}},ga(){throw Se[44]},qa:(e,t,n,i)=>me.createNode(e,t,n,i),lb(e,t,n){if(16384==(61440&e.mode)){try{var i=ke(t,n)}catch(e){}if(i)for(var r in i.j)throw new Ae(55)}delete e.parent.j[e.name],e.parent.timestamp=Date.now(),e.name=n,t.j[n]=e,t.timestamp=e.parent.timestamp},qb(e,t){delete e.j[t],e.timestamp=Date.now()},mb(e,t){var n,i=ke(e,t);for(n in i.j)throw new Ae(55);delete e.j[t],e.timestamp=Date.now()},kb(e){var t,n=[".",".."];
295for(t of Object.keys(e.j))n.push(t);return n},xa:(e,t,n)=>((e=me.createNode(e,t,41471,0)).link=n,e),ia(e){if(40960!=(61440&e.mode))throw new Ae(28);return e.link}},l:{read(e,t,n,i,r){var a=e.node.j;if(r>=e.node.u)return 0;if(8<(e=Math.min(e.node.u-r,i))&&a.subarray)t.set(a.subarray(r,r+e),n);else for(i=0;i<e;i++)t[n+i]=a[r+i];return e},write(e,t,n,i,r,a){if(t.buffer===S.buffer&&(a=!1),!i)return 0;if((e=e.node).timestamp=Date.now(),t.subarray&&(!e.j||e.j.subarray)){if(a)return e.j=t.subarray(n,n+i),e.u=i;if(0===e.u&&0===r)return e.j=t.slice(n,n+i),e.u=i;if(r+i<=e.u)return e.j.set(t.subarray(n,n+i),r),i}if(pe(e,r+i),e.j.subarray&&t.subarray)e.j.set(t.subarray(n,n+i),r);else for(a=0;a<i;a++)e.j[r+a]=t[n+a];return e.u=Math.max(e.u,r+i),i},Z(e,t,n){if(1===n?t+=e.position:2===n&&32768==(61440&e.node.mode)&&(t+=e.node.u),0>t)throw new Ae(28);return t},Qa(e,t,n){pe(e.node,t+n),e.node.u=Math.max(e.node.u,t+n)},cb(e,t,n,i,r){if(32768!=(61440&e.node.mode))throw new Ae(43);if(e=e.node.j,2&r||e.buffer!==S.buffer){if((0<n||n+t<e.length)&&(e=e.subarray?e.subarray(n,n+t):Array.prototype.slice.call(e,n,n+t)),n=!0,V(),!(t=void 0))throw new Ae(48);S.set(e,t)}else n=!1,t=e.byteOffset;return{m:t,pc:n}},fb:(e,t,n,i)=>(me.l.write(e,t,0,i,n,!1),0)}},ve=null,be={},ye=[],ge=1,we=null,_e=!0,Ae=class{constructor(e){this.name="ErrnoError",this.Y=e}},Se={},Ce=class{constructor(){this.ma={},this.node=null}get flags(){return this.ma.flags}set flags(e){this.ma.flags=e}get position(){return this.ma.position}set position(e){this.ma.position=e}},Ee=class{constructor(e,t,n,i){e||=this,this.parent=e,this.S=e.S,this.ra=null,this.id=ge++,this.name=t,this.mode=n,this.i={},this.l={},this.ta=i}get read(){return!(365&~this.mode)}set read(e){e?this.mode|=365:this.mode&=-366}get write(){return!(146&~this.mode)}set write(e){e?this.mode|=146:this.mode&=-147}};function Ie(e,t={}){if(!(e=ne(e)))return{path:"",node:null};if(8<(t=Object.assign({Za:!0,Ia:0},t)).Ia)throw new Ae(32);e=e.split("/").filter(e=>!!e);for(var n=ve,i="/",r=0;r<e.length;r++){var a=r===e.length-1;if(a&&t.parent)break;if(n=ke(n,e[r]),i=J(i+"/"+e[r]),n.ra&&(!a||a&&t.Za)&&(n=n.ra.root),!a||t.Ya)for(a=0;40960==(61440&n.mode);)if(n=He(i),n=Ie(i=ne(Z(i),n),{Ia:t.Ia+1}).node,40<a++)throw new Ae(32)}return{path:i,node:n}}function xe(e){for(var t;;){if(e===e.parent)return e=e.S.eb,t?"/"!==e[e.length-1]?`${e}/${t}`:e+t:e;t=t?`${e.name}/${t}`:e.name,e=e.parent}}function Me(e,t){for(var n=0,i=0;i<t.length;i++)n=(n<<5)-n+t.charCodeAt(i)|0;return(e+n>>>0)%we.length}function ke(e,t){var n=16384==(61440&e.mode)?(n=Le(e,"x"))?n:e.i.ga?0:2:54;if(n)throw new Ae(n);for(n=we[Me(e.id,t)];n;n=n.Xb){var i=n.name;if(n.parent.id===e.id&&i===t)return n}return e.i.ga(e,t)}function Re(e,t,n,i){return t=Me((e=new Ee(e,t,n,i)).parent.id,e.name),e.Xb=we[t],we[t]=e}function Fe(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t}function Le(e,t){return _e?0:!t.includes("r")||292&e.mode?t.includes("w")&&!(146&e.mode)||t.includes("x")&&!(73&e.mode)?2:0:2}function Te(e,t){try{return ke(e,t),20}catch(e){}return Le(e,"wx")}function Pe(e){if(!(e=ye[e]))throw new Ae(8);return e}function Oe(e,t=-1){if(e=Object.assign(new Ce,e),-1==t)e:{for(t=0;4096>=t;t++)if(!ye[t])break e;throw new Ae(33)}return e.U=t,ye[t]=e}var je,De={open(e){e.l=be[e.node.ta].l,e.l.open?.(e)},Z(){throw new Ae(70)}};function Be(e,t){be[e]={l:t}}function Ne(e,t){var n="/"===t;if(n&&ve)throw new Ae(10);if(!n&&t){var i=Ie(t,{Za:!1});if(t=i.path,(i=i.node).ra)throw new Ae(10);if(16384!=(61440&i.mode))throw new Ae(54)}t={type:e,Ic:{},eb:t,Wb:[]},(e=e.S(t)).S=t,t.root=e,n?ve=e:i&&(i.ra=t,i.S&&i.S.Wb.push(t))}function Ve(e,t,n){var i=Ie(e,{parent:!0}).node;if(!(e=ee(e))||"."===e||".."===e)throw new Ae(28);var r=Te(i,e);if(r)throw new Ae(r);if(!i.i.qa)throw new Ae(63);return i.i.qa(i,e,t,n)}function We(e){return Ve(e,16895,0)}function Ue(e,t,n){void 0===n&&(n=t,t=438),Ve(e,8192|t,n)}function qe(e,t){if(!ne(e))throw new Ae(44);var n=Ie(t,{parent:!0}).node;if(!n)throw new Ae(44);var i=Te(n,t=ee(t));if(i)throw new Ae(i);if(!n.i.xa)throw new Ae(63);n.i.xa(n,t,e)}function He(e){if(!(e=Ie(e).node))throw new Ae(44);if(!e.i.ia)throw new Ae(28);return ne(xe(e.parent),e.i.ia(e))}function ze(e,t,n){if(""===e)throw new Ae(44);if("string"==typeof t){var i={r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090}[t];if(void 0===i)throw Error(`Unknown file open mode: ${t}`);t=i}if(n=64&t?4095&(void 0===n?438:n)|32768:0,"object"==typeof e)var a=e;else{e=J(e);try{a=Ie(e,{Ya:!(131072&t)}).node}catch(e){}}if(i=!1,64&t)if(a){if(128&t)throw new Ae(20)}else a=Ve(e,n,0),i=!0;if(!a)throw new Ae(44);if(8192==(61440&a.mode)&&(t&=-513),65536&t&&16384!=(61440&a.mode))throw new Ae(54);if(!i&&(n=a?40960==(61440&a.mode)?32:16384==(61440&a.mode)&&("r"!==Fe(t)||512&t)?31:Le(a,Fe(t)):44))throw new Ae(n);
295if(512&t&&!i){if(!(n="string"==typeof(n=a)?Ie(n,{Ya:!0}).node:n).i.N)throw new Ae(63);if(16384==(61440&n.mode))throw new Ae(31);if(32768!=(61440&n.mode))throw new Ae(28);if(i=Le(n,"w"))throw new Ae(i);n.i.N(n,{size:0,timestamp:Date.now()})}return t&=-131713,(a=Oe({node:a,path:xe(a),flags:t,seekable:!0,position:0,l:a.l,jc:[],error:!1})).l.open&&a.l.open(a),!r.logReadFiles||1&t||(Ge||={},e in Ge||(Ge[e]=1)),a}function $e(e,t,n){if(null===e.U)throw new Ae(8);if(!e.seekable||!e.l.Z)throw new Ae(70);if(0!=n&&1!=n&&2!=n)throw new Ae(28);e.position=e.l.Z(e,t,n),e.jc=[]}function Ye(e,t,n){e=J("/dev/"+e);var i=((e,t)=>{var n=0;return e&&(n|=365),t&&(n|=146),n})(!!t,!!n);Xe||=64;var r=Xe++<<8;Be(r,{open(e){e.seekable=!1},close(){n?.buffer?.length&&n(10)},read(e,n,i,r){for(var a=0,o=0;o<r;o++){try{var s=t()}catch(e){throw new Ae(29)}if(void 0===s&&0===a)throw new Ae(6);if(null==s)break;a++,n[i+o]=s}return a&&(e.node.timestamp=Date.now()),a},write(e,t,i,r){for(var a=0;a<r;a++)try{n(t[i+a])}catch(e){throw new Ae(29)}return r&&(e.node.timestamp=Date.now()),a}}),Ue(e,i,r)}var Xe,Ge,Ke,Qe,Je,Ze,et,tt=void 0,nt=(e,t)=>Object.defineProperty(t,"name",{value:e}),it=[],rt=[],at=e=>{if(!e)throw new Ke("Cannot use deleted val. handle = "+e);return rt[e]},ot=e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:const t=it.pop()||rt.length;return rt[t]=e,rt[t+1]=1,t}},st=e=>{var t=Error,n=nt(e,function(t){this.name=e,this.message=t,void 0!==(t=Error(t).stack)&&(this.stack=this.toString()+"\n"+t.replace(/^Error(:[^\n]*)?\n/,""))});return n.prototype=Object.create(t.prototype),n.prototype.constructor=n,n.prototype.toString=function(){return void 0===this.message?this.name:`${this.name}: ${this.message}`},n},lt=e=>{for(var t="";C[e];)t+=Je[C[e++]];return t},ct=[],ut=()=>{for(;ct.length;){var e=ct.pop();e.g.ca=!1,e.delete()}},dt={},ht=(e,t)=>{if(void 0===t)throw new Ke("ptr should not be undefined");for(;e.B;)t=e.ja(t),e=e.B;return t},ft={},pt=e=>{e=Ln(e);var t=lt(e);return Rn(e),t},mt=(e,t)=>{var n=ft[e];if(void 0===n)throw e=`${t} has unknown type ${pt(e)}`,new Ke(e);return n},vt=()=>{},bt=!1,yt=(e,t,n)=>t===n?e:void 0===n.B||null===(e=yt(e,t,n.B))?null:n.Db(e),gt={},wt=(e,t)=>{if(!t.s||!t.m)throw new et("makeClassHandle requires ptr and ptrType");if(!!t.H!=!!t.C)throw new et("Both smartPtrType and smartPtr must be specified");return t.count={value:1},_t(Object.create(e,{g:{value:t,writable:!0}}))},_t=e=>"undefined"==typeof FinalizationRegistry?(_t=e=>e,e):(bt=new FinalizationRegistry(e=>{--(e=e.g).count.value,0===e.count.value&&(e.C?e.H.M(e.C):e.s.h.M(e.m))}),vt=e=>{bt.unregister(e)},(_t=e=>{var t=e.g;return t.C&&bt.register(e,{g:t},e),e})(e)),At={},St=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function Ct(e){return this.fromWireType(M[e>>2])}var Et={},It={},xt=(e,t,n)=>{function i(t){if((t=n(t)).length!==e.length)throw new et("Mismatched type converter count");for(var i=0;i<e.length;++i)Mt(e[i],t[i])}e.forEach(function(e){It[e]=t});var r=Array(t.length),a=[],o=0;t.forEach((e,t)=>{ft.hasOwnProperty(e)?r[t]=ft[e]:(a.push(e),Et.hasOwnProperty(e)||(Et[e]=[]),Et[e].push(()=>{r[t]=ft[e],++o===a.length&&i(r)}))}),0===a.length&&i(r)};function Mt(e,t,n={}){if(!("argPackAdvance"in t))throw new TypeError("registerType registeredInstance requires argPackAdvance");return function(e,t,n={}){var i=t.name;if(!e)throw new Ke(`type "${i}" must have a positive integer typeid pointer`);if(ft.hasOwnProperty(e)){if(n.Nb)return;throw new Ke(`Cannot register type '${i}' twice`)}ft[e]=t,delete It[e],Et.hasOwnProperty(e)&&(t=Et[e],delete Et[e],t.forEach(e=>e()))}(e,t,n)}var kt=e=>{throw new Ke(e.g.s.h.name+" instance already deleted")};function Rt(){}var Ft=(e,t,n)=>{if(void 0===e[t].v){var i=e[t];e[t]=function(...i){if(!e[t].v.hasOwnProperty(i.length))throw new Ke(`Function '${n}' called with an invalid number of arguments (${i.length}) - expects one of (${e[t].v})!`);return e[t].v[i.length].apply(this,i)},e[t].v=[],e[t].v[i.ba]=i}},Lt=(e,t,n)=>{if(r.hasOwnProperty(e)){if(void 0===n||void 0!==r[e].v&&void 0!==r[e].v[n])throw new Ke(`Cannot register public name '${e}' twice`);if(Ft(r,e,e),r.hasOwnProperty(n))throw new Ke(`Cannot register multiple overloads of a function with the same number of arguments (${n})!`);r[e].v[n]=t}else r[e]=t,void 0!==n&&(r[e].Hc=n)};function Tt(e,t,n,i,r,a,o,s){this.name=e,this.constructor=t,this.K=n,this.M=i,this.B=r,this.Ib=a,this.ja=o,this.Db=s,this.ib=[]}var Pt=(e,t,n)=>{for(;t!==n;){if(!t.ja)throw new Ke(`Expected null or instance of ${n.name}, got an instance of ${t.name}`);e=t.ja(e),t=t.B}return e};function Ot(e,t){if(null===t){if(this.Fa)throw new Ke(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new Ke(`Cannot pass "${tn(t)}" as a ${this.name}`);if(!t.g.m)throw new Ke(`Cannot pass deleted object as a pointer of type ${this.name}`);return Pt(t.g.m,t.g.s.h,this.h)}function jt(e,t){if(null===t){if(this.Fa)throw new Ke(`null is not a valid ${this.name}`);if(this.pa){var n=this.Ha();return null!==e&&e.push(this.M,n),n}return 0}if(!t||!t.g)throw new Ke(`Cannot pass "${tn(t)}" as a ${this.name}`);if(!t.g.m)throw new Ke(`Cannot pass deleted object as a pointer of type ${this.name}`);if(!this.oa&&t.g.s.oa)throw new Ke(`Cannot convert argument of type ${t.g.H?t.g.H.name:t.g.s.name} to parameter type ${this.name}`);if(n=Pt(t.g.m,t.g.s.h,this.h),this.pa){if(void 0===t.g.C)throw new Ke("Passing raw pointer to smart pointer is illegal");
295switch(this.dc){case 0:if(t.g.H!==this)throw new Ke(`Cannot convert argument of type ${t.g.H?t.g.H.name:t.g.s.name} to parameter type ${this.name}`);n=t.g.C;break;case 1:n=t.g.C;break;case 2:if(t.g.H===this)n=t.g.C;else{var i=t.clone();n=this.$b(n,ot(()=>i.delete())),null!==e&&e.push(this.M,n)}break;default:throw new Ke("Unsupporting sharing policy")}}return n}function Dt(e,t){if(null===t){if(this.Fa)throw new Ke(`null is not a valid ${this.name}`);return 0}if(!t.g)throw new Ke(`Cannot pass "${tn(t)}" as a ${this.name}`);if(!t.g.m)throw new Ke(`Cannot pass deleted object as a pointer of type ${this.name}`);if(t.g.s.oa)throw new Ke(`Cannot convert argument of type ${t.g.s.name} to parameter type ${this.name}`);return Pt(t.g.m,t.g.s.h,this.h)}function Bt(e,t,n,i,r,a,o,s,l,c,u){this.name=e,this.h=t,this.Fa=n,this.oa=i,this.pa=r,this.Zb=a,this.dc=o,this.jb=s,this.Ha=l,this.$b=c,this.M=u,r||void 0!==t.B?this.toWireType=jt:(this.toWireType=i?Ot:Dt,this.J=null)}var Nt,Vt,Wt=(e,t,n)=>{if(!r.hasOwnProperty(e))throw new et("Replacing nonexistent public symbol");void 0!==r[e].v&&void 0!==n?r[e].v[n]=t:(r[e]=t,r[e].ba=n)},Ut=[],qt=e=>{var t=Ut[e];return t||(e>=Ut.length&&(Ut.length=e+1),Ut[e]=t=Nt.get(e)),t},Ht=(e,t)=>(...n)=>((e,t,n=[])=>(e.includes("j")?(e=e.replace(/p/g,"i"),t=(0,r["dynCall_"+e])(t,...n)):t=qt(t)(...n),t))(e,t,n),zt=(e,t)=>{var n=(e=lt(e)).includes("j")?Ht(e,t):qt(t);if("function"!=typeof n)throw new Ke(`unknown function pointer with signature ${e}: ${t}`);return n},$t=(e,t)=>{var n=[],i={};throw t.forEach(function e(t){i[t]||ft[t]||(It[t]?It[t].forEach(e):(n.push(t),i[t]=!0))}),new Vt(`${e}: `+n.map(pt).join([", "]))};function Yt(e,t,n,i,r){var a=t.length;if(2>a)throw new Ke("argTypes array size mismatch! Must at least get return value and 'this' types!");var o=null!==t[1]&&null!==n,s=function(e){for(var t=1;t<e.length;++t)if(null!==e[t]&&void 0===e[t].J)return!0;return!1}(t),l="void"!==t[0].name,c=a-2,u=Array(c),d=[],h=[];return nt(e,function(...n){if(n.length!==c)throw new Ke(`function ${e} called with ${n.length} arguments, expected ${c}`);if(h.length=0,d.length=o?2:1,d[0]=r,o){var a=t[1].toWireType(h,this);d[1]=a}for(var f=0;f<c;++f)u[f]=t[f+2].toWireType(h,n[f]),d.push(u[f]);if(n=i(...d),s)St(h);else for(f=o?1:2;f<t.length;f++){var p=1===f?a:u[f-2];null!==t[f].J&&t[f].J(p)}return a=l?t[0].fromWireType(n):void 0})}var Xt,Gt=(e,t)=>{for(var n=[],i=0;i<e;i++)n.push(M[t+4*i>>2]);return n},Kt=e=>{const t=(e=e.trim()).indexOf("(");return-1!==t?e.substr(0,t):e},Qt=(e,t,n)=>{if(!(e instanceof Object))throw new Ke(`${n} with invalid "this": ${e}`);if(!(e instanceof t.h.constructor))throw new Ke(`${n} incompatible with "this" of type ${e.constructor.name}`);if(!e.g.m)throw new Ke(`cannot call emscripten binding method ${n} on deleted object`);return Pt(e.g.m,e.g.s.h,t.h)},Jt=e=>{9<e&&0===--rt[e+1]&&(rt[e]=void 0,it.push(e))},Zt={name:"emscripten::val",fromWireType:e=>{var t=at(e);return Jt(e),t},toWireType:(e,t)=>ot(t),argPackAdvance:8,readValueFromPointer:Ct,J:null},en=(e,t,n)=>{switch(t){case 1:return n?function(e){return this.fromWireType(S[e])}:function(e){return this.fromWireType(C[e])};case 2:return n?function(e){return this.fromWireType(E[e>>1])}:function(e){return this.fromWireType(I[e>>1])};case 4:return n?function(e){return this.fromWireType(x[e>>2])}:function(e){return this.fromWireType(M[e>>2])};default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},tn=e=>{if(null===e)return"null";var t=typeof e;return"object"===t||"array"===t||"function"===t?e.toString():""+e},nn=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType(k[e>>2])};case 8:return function(e){return this.fromWireType(R[e>>3])};default:throw new TypeError(`invalid float width (${t}): ${e}`)}},rn=(e,t,n)=>{switch(t){case 1:return n?e=>S[e]:e=>C[e];case 2:return n?e=>E[e>>1]:e=>I[e>>1];case 4:return n?e=>x[e>>2]:e=>M[e>>2];default:throw new TypeError(`invalid integer width (${t}): ${e}`)}},an="undefined"!=typeof TextDecoder?new TextDecoder("utf-16le"):void 0,on=(e,t)=>{for(var n=e>>1,i=n+t/2;!(n>=i)&&I[n];)++n;if(32<(n<<=1)-e&&an)return an.decode(C.subarray(e,n));for(n="",i=0;!(i>=t/2);++i){var r=E[e+2*i>>1];if(0==r)break;n+=String.fromCharCode(r)}return n},sn=(e,t,n)=>{if(n??=2147483647,2>n)return 0;var i=t;n=(n-=2)<2*e.length?n/2:e.length;for(var r=0;r<n;++r)E[t>>1]=e.charCodeAt(r),t+=2;return E[t>>1]=0,t-i},ln=e=>2*e.length,cn=(e,t)=>{for(var n=0,i="";!(n>=t/4);){var r=x[e+4*n>>2];if(0==r)break;++n,65536<=r?(r-=65536,i+=String.fromCharCode(55296|r>>10,56320|1023&r)):i+=String.fromCharCode(r)}return i},un=(e,t,n)=>{if(n??=2147483647,4>n)return 0;var i=t;n=i+n-4;for(var r=0;r<e.length;++r){var a=e.charCodeAt(r);if(55296<=a&&57343>=a&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++r)),x[t>>2]=a,(t+=4)+4>n)break}return x[t>>2]=0,t-i},dn=e=>{for(var t=0,n=0;n<e.length;++n){var i=e.charCodeAt(n);55296<=i&&57343>=i&&++n,t+=4}return t},hn=(e,t,n)=>{var i=[];return e=e.toWireType(i,n),i.length&&(M[t>>2]=ot(i)),e},fn=[],pn={},mn=e=>{var t=pn[e];return void 0===t?lt(e):t},vn=Reflect.construct,bn=e=>0==e%4&&(0!=e%100||0==e%400),yn=[0,31,60,91,121,152,182,213,244,274,305,335],gn=[0,31,59,90,120,151,181,212,243,273,304,334],wn=[],_n={},An=()=>
295{if(!Xt){var e,t={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:b||"./this.program"};for(e in _n)void 0===_n[e]?delete t[e]:t[e]=_n[e];var n=[];for(e in t)n.push(`${e}=${t[e]}`);Xt=n}return Xt},Sn=[31,29,31,30,31,30,31,31,30,31,30,31],Cn=[31,28,31,30,31,30,31,31,30,31,30,31],En=(e,t,n,i)=>{function r(e,t,n){for(e="number"==typeof e?e.toString():e||"";e.length<t;)e=n[0]+e;return e}function a(e,t){return r(e,t,"0")}function o(e,t){function n(e){return 0>e?-1:0<e?1:0}var i;return 0===(i=n(e.getFullYear()-t.getFullYear()))&&0===(i=n(e.getMonth()-t.getMonth()))&&(i=n(e.getDate()-t.getDate())),i}function s(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function l(e){var t=e.$;for(e=new Date(new Date(e.aa+1900,0,1).getTime());0<t;){var n=e.getMonth(),i=(bn(e.getFullYear())?Sn:Cn)[n];if(!(t>i-e.getDate())){e.setDate(e.getDate()+t);break}t-=i-e.getDate()+1,e.setDate(1),11>n?e.setMonth(n+1):(e.setMonth(0),e.setFullYear(e.getFullYear()+1))}return n=new Date(e.getFullYear()+1,0,4),t=s(new Date(e.getFullYear(),0,4)),n=s(n),0>=o(t,e)?0>=o(n,e)?e.getFullYear()+1:e.getFullYear():e.getFullYear()-1}var c=M[i+40>>2];for(var u in i={hc:x[i>>2],fc:x[i+4>>2],ya:x[i+8>>2],Ka:x[i+12>>2],za:x[i+16>>2],aa:x[i+20>>2],O:x[i+24>>2],$:x[i+28>>2],Kc:x[i+32>>2],ec:x[i+36>>2],ic:c&&c?re(C,c):""},n=n?re(C,n):"",c={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"})n=n.replace(new RegExp(u,"g"),c[u]);var d="Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),h="January February March April May June July August September October November December".split(" ");for(u in c={"%a":e=>d[e.O].substring(0,3),"%A":e=>d[e.O],"%b":e=>h[e.za].substring(0,3),"%B":e=>h[e.za],"%C":e=>a((e.aa+1900)/100|0,2),"%d":e=>a(e.Ka,2),"%e":e=>r(e.Ka,2," "),"%g":e=>l(e).toString().substring(2),"%G":l,"%H":e=>a(e.ya,2),"%I":e=>(0==(e=e.ya)?e=12:12<e&&(e-=12),a(e,2)),"%j":e=>{for(var t=0,n=0;n<=e.za-1;t+=(bn(e.aa+1900)?Sn:Cn)[n++]);return a(e.Ka+t,3)},"%m":e=>a(e.za+1,2),"%M":e=>a(e.fc,2),"%n":()=>"\n","%p":e=>0<=e.ya&&12>e.ya?"AM":"PM","%S":e=>a(e.hc,2),"%t":()=>"\t","%u":e=>e.O||7,"%U":e=>a(Math.floor((e.$+7-e.O)/7),2),"%V":e=>{var t=Math.floor((e.$+7-(e.O+6)%7)/7);if(2>=(e.O+371-e.$-2)%7&&t++,t)53==t&&(4==(n=(e.O+371-e.$)%7)||3==n&&bn(e.aa)||(t=1));else{t=52;var n=(e.O+7-e.$-1)%7;(4==n||5==n&&bn(e.aa%400-1))&&t++}return a(t,2)},"%w":e=>e.O,"%W":e=>a(Math.floor((e.$+7-(e.O+6)%7)/7),2),"%y":e=>(e.aa+1900).toString().substring(2),"%Y":e=>e.aa+1900,"%z":e=>{var t=0<=(e=e.ec);return e=Math.abs(e)/60,(t?"+":"-")+String("0000"+(e/60*100+e%60)).slice(-4)},"%Z":e=>e.ic,"%%":()=>"%"},n=n.replace(/%%/g,"\0\0"),c)n.includes(u)&&(n=n.replace(new RegExp(u,"g"),c[u](i)));return(u=le(n=n.replace(/\0\0/g,"%"),!1)).length>t?0:(S.set(u,e),u.length-1)};[44].forEach(e=>{Se[e]=new Ae(e),Se[e].stack="<generic error, no stack>"}),we=Array(4096),Ne(me,"/"),We("/tmp"),We("/home"),We("/home/web_user"),function(){We("/dev"),Be(259,{read:()=>0,write:(e,t,n,i)=>i}),Ue("/dev/null",259),ue(1280,he),ue(1536,fe),Ue("/dev/tty",1280),Ue("/dev/tty1",1536);var e=new Uint8Array(1024),t=0,n=()=>(0===t&&(t=te(e).byteLength),e[--t]);Ye("random",n),Ye("urandom",n),We("/dev/shm"),We("/dev/shm/tmp")}(),function(){We("/proc");var e=We("/proc/self");We("/proc/self/fd"),Ne({S(){var t=Re(e,"fd",16895,73);return t.i={ga(e,t){var n=Pe(+t);return(e={parent:null,S:{eb:"fake"},i:{ia:()=>n.path}}).parent=e}},t}},"/proc/self/fd")}
295(),Ke=r.BindingError=class extends Error{constructor(e){super(e),this.name="BindingError"}},rt.push(0,1,void 0,1,null,1,!0,1,!1,1),r.count_emval_handles=()=>rt.length/2-5-it.length,Qe=r.PureVirtualError=st("PureVirtualError");for(var In=Array(256),xn=0;256>xn;++xn)In[xn]=String.fromCharCode(xn);Je=In,r.getInheritedInstanceCount=()=>Object.keys(dt).length,r.getLiveInheritedInstances=()=>{var e,t=[];for(e in dt)dt.hasOwnProperty(e)&&t.push(dt[e]);return t},r.flushPendingDeletes=ut,r.setDelayFunction=e=>{Ze=e,ct.length&&Ze&&Ze(ut)},et=r.InternalError=class extends Error{constructor(e){super(e),this.name="InternalError"}},Object.assign(Rt.prototype,{isAliasOf:function(e){if(!(this instanceof Rt&&e instanceof Rt))return!1;var t=this.g.s.h,n=this.g.m;e.g=e.g;var i=e.g.s.h;for(e=e.g.m;t.B;)n=t.ja(n),t=t.B;for(;i.B;)e=i.ja(e),i=i.B;return t===i&&n===e},clone:function(){if(this.g.m||kt(this),this.g.ea)return this.g.count.value+=1,this;var e=_t,t=Object,n=t.create,i=Object.getPrototypeOf(this),r=this.g;return(e=e(n.call(t,i,{g:{value:{count:r.count,ca:r.ca,ea:r.ea,m:r.m,s:r.s,C:r.C,H:r.H}}}))).g.count.value+=1,e.g.ca=!1,e},delete(){if(this.g.m||kt(this),this.g.ca&&!this.g.ea)throw new Ke("Object already scheduled for deletion");vt(this);var e=this.g;--e.count.value,0===e.count.value&&(e.C?e.H.M(e.C):e.s.h.M(e.m)),this.g.ea||(this.g.C=void 0,this.g.m=void 0)},isDeleted:function(){return!this.g.m},deleteLater:function(){if(this.g.m||kt(this),this.g.ca&&!this.g.ea)throw new Ke("Object already scheduled for deletion");return ct.push(this),1===ct.length&&Ze&&Ze(ut),this.g.ca=!0,this}}),Object.assign(Bt.prototype,{Jb(e){return this.jb&&(e=this.jb(e)),e},Ua(e){this.M?.(e)},argPackAdvance:8,readValueFromPointer:Ct,fromWireType:function(e){function t(){return this.pa?wt(this.h.K,{s:this.Zb,m:n,H:this,C:e}):wt(this.h.K,{s:this,m:e})}var n=this.Jb(e);if(!n)return this.Ua(e),null;var i=((e,t)=>(t=ht(e,t),dt[t]))(this.h,n);if(void 0!==i)return 0===i.g.count.value?(i.g.m=n,i.g.C=e,i.clone()):(i=i.clone(),this.Ua(e),i);if(i=this.h.Ib(n),!(i=gt[i]))return t.call(this);i=this.oa?i.zb:i.pointerType;var r=yt(n,this.h,i.h);return null===r?t.call(this):this.pa?wt(i.h.K,{s:i,m:r,H:this,C:e}):wt(i.h.K,{s:i,m:r})}}),Vt=r.UnboundTypeError=st("UnboundTypeError");var Mn={__syscall_fcntl64:function(e,t,n){tt=n;try{var i=Pe(e);switch(t){case 0:var r=K();if(0>r)break;for(;ye[r];)r++;return function(e,t=-1){return e=Oe(e,t),e.l?.zc?.(e),e}(i,r).U;case 1:case 2:case 13:case 14:return 0;case 3:return i.flags;case 4:return r=K(),i.flags|=r,0;case 12:return r=K(),E[r+0>>1]=2,0}return-28}catch(e){if("ErrnoError"!==e.name)throw e;return-e.Y}},__syscall_ioctl:function(e,t,n){tt=n;try{var i=Pe(e);switch(t){case 21509:case 21510:case 21511:case 21512:case 21524:case 21515:return i.o?0:-59;case 21505:if(!i.o)return-59;if(i.o.T.Pb){e=[3,28,127,21,4,0,1,0,17,19,26,0,18,15,23,22,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];var r=K();x[r>>2]=25856,x[r+4>>2]=5,x[r+8>>2]=191,x[r+12>>2]=35387;for(var a=0;32>a;a++)S[r+a+17]=e[a]||0}return 0;case 21506:case 21507:case 21508:if(!i.o)return-59;if(i.o.T.Qb)for(r=K(),e=[],a=0;32>a;a++)e.push(S[r+a+17]);return 0;case 21519:return i.o?(r=K(),x[r>>2]=0):-59;case 21520:return i.o?-28:-59;case 21531:if(r=K(),!i.l.Ob)throw new Ae(59);return i.l.Ob(i,t,r);case 21523:return i.o?(i.o.T.Rb&&(a=[24,80],r=K(),E[r>>1]=a[0],E[r+2>>1]=a[1]),0):-59;default:return-28}}catch(e){if("ErrnoError"!==e.name)throw e;return-e.Y}}
295,__syscall_openat:function(e,t,n,i){tt=i;try{var r=t=t?re(C,t):"";if("/"===r.charAt(0))t=r;else{var a=-100===e?"/":Pe(e).path;if(0==r.length)throw new Ae(44);t=J(a+"/"+r)}return ze(t,n,i?K():0).U}catch(e){if("ErrnoError"!==e.name)throw e;return-e.Y}},_abort_js:()=>{V("")},_embind_create_inheriting_constructor:(e,t,n)=>{e=lt(e),t=mt(t,"wrapper"),n=at(n);var i=t.h,r=i.K,a=i.B.K,o=i.B.constructor;return e=nt(e,function(...e){i.B.ib.forEach(function(e){if(this[e]===a[e])throw new Qe(`Pure virtual function ${e} must be implemented in JavaScript`)}.bind(this)),Object.defineProperty(this,"__parent",{value:r}),this.__construct(...e)}),r.__construct=function(...e){if(this===r)throw new Ke("Pass correct 'this' to __construct");e=o.implement(this,...e),vt(e);var t=e.g;if(e.notifyOnDestruction(),t.ea=!0,Object.defineProperties(this,{g:{value:t}}),_t(this),e=t.m,e=ht(i,e),dt.hasOwnProperty(e))throw new Ke(`Tried to register registered instance: ${e}`);dt[e]=this},r.__destruct=function(){if(this===r)throw new Ke("Pass correct 'this' to __destruct");vt(this);var e=this.g.m;if(e=ht(i,e),!dt.hasOwnProperty(e))throw new Ke(`Tried to unregister unregistered instance: ${e}`);delete dt[e]},e.prototype=Object.create(r),Object.assign(e.prototype,n),ot(e)},_embind_finalize_value_object:e=>{var t=At[e];delete At[e];var n=t.Ha,i=t.M,r=t.Xa,a=r.map(e=>e.Mb).concat(r.map(e=>e.bc));xt([e],a,e=>{var a={};return r.forEach((t,n)=>{var i=e[n],o=t.Kb,s=t.Lb,l=e[n+r.length],c=t.ac,u=t.cc;a[t.Gb]={read:e=>i.fromWireType(o(s,e)),write:(e,t)=>{var n=[];c(u,e,l.toWireType(n,t)),St(n)}}}),[{name:t.name,fromWireType:e=>{var t,n={};for(t in a)n[t]=a[t].read(e);return i(e),n},toWireType:(e,t)=>{for(var r in a)if(!(r in t))throw new TypeError(`Missing field: "${r}"`);var o=n();for(r in a)a[r].write(o,t[r]);return null!==e&&e.push(i,o),o},argPackAdvance:8,readValueFromPointer:Ct,J:i}]})},_embind_register_bigint:()=>{},_embind_register_bool:(e,t,n,i)=>{Mt(e,{name:t=lt(t),fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:i},argPackAdvance:8,readValueFromPointer:function(e){return this.fromWireType(C[e])},J:null})},_embind_register_class:(e,t,n,i,r,a,o,s,l,c,u,d,h)=>{u=lt(u),a=zt(r,a),s&&=zt(o,s),c&&=zt(l,c),h=zt(d,h);var f=(e=>{if(void 0===e)return"_unknown";var t=(e=e.replace(/[^a-zA-Z0-9_]/g,"$")).charCodeAt(0);return 48<=t&&57>=t?`_${e}`:e})(u);Lt(f,function(){$t(`Cannot construct ${u} due to unbound types`,[i])}),xt([e,t,n],i?[i]:[],t=>{if(t=t[0],i)var n=t.h,r=n.K;else r=Rt.prototype;t=nt(u,function(...e){if(Object.getPrototypeOf(this)!==o)throw new Ke("Use 'new' to construct "+u);if(void 0===d.X)throw new Ke(u+" has no accessible constructor");var t=d.X[e.length];if(void 0===t)throw new Ke(`Tried to invoke ctor of ${u} with invalid number of parameters (${e.length}) - expected (${Object.keys(d.X).toString()}) parameters instead!`);return t.apply(this,e)});var o=Object.create(r,{constructor:{value:t}});t.prototype=o;var l,d=new Tt(u,t,o,h,n,a,s,c);return d.B&&((l=d.B).ka??(l.ka=[]),d.B.ka.push(d)),n=new Bt(u,d,!0,!1,!1),l=new Bt(u+"*",d,!1,!1,!1),r=new Bt(u+" const*",d,!1,!0,!1),gt[e]={pointerType:l,zb:r},Wt(f,t),[n,l,r]})},_embind_register_class_class_function:(e,t,n,i,r,a,o)=>{var s=Gt(n,i);t=lt(t),t=Kt(t),a=zt(r,a),xt([],[e],e=>{function i(){$t(`Cannot call ${r} due to unbound types`,s)}var r=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]);var l=e.h.constructor;return void 0===l[t]?(i.ba=n-1,l[t]=i):(Ft(l,t,r),l[t].v[n-1]=i),xt([],s,i=>{if(i=Yt(r,[i[0],null].concat(i.slice(1)),null,a,o),void 0===l[t].v?(i.ba=n-1,l[t]=i):l[t].v[n-1]=i,e.h.ka)for(const n of e.h.ka)n.constructor.hasOwnProperty(t)||(n.constructor[t]=i);return[]}),[]})},_embind_register_class_class_property:(e,t,n,i,r,a,o,s)=>{t=lt(t),a=zt(r,a),xt([],[e],e=>{var r=`${(e=e[0]).name}.${t}`,l={get(){$t(`Cannot access ${r} due to unbound types`,[n])},enumerable:!0,configurable:!0};return l.set=s?()=>{$t(`Cannot access ${r} due to unbound types`,[n])}:()=>{throw new Ke(`${r} is a read-only property`)},Object.defineProperty(e.h.constructor,t,l),xt([],[n],n=>{n=n[0];var r={get:()=>n.fromWireType(a(i)),enumerable:!0};return s&&(s=zt(o,s),r.set=e=>{var t=[];s(i,n.toWireType(t,e)),St(t)}),Object.defineProperty(e.h.constructor,t,r),[]}),[]})},_embind_register_class_constructor:(e,t,n,i,r,a)=>{var o=Gt(t,n);r=zt(i,r),xt([],[e],e=>{var n=`constructor ${(e=e[0]).name}`;if(void 0===e.h.X&&(e.h.X=[]),void 0!==e.h.X[t-1])throw new Ke(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.h.X[t-1]=()=>{$t(`Cannot construct ${e.name} due to unbound types`,o)},xt([],o,i=>(i.splice(1,0,null),e.h.X[t-1]=Yt(n,i,null,r,a),[])),[]})},_embind_register_class_function:(e,t,n,i,r,a,o,s)=>{var l=Gt(n,i);t=lt(t),t=Kt(t),a=zt(r,a),xt([],[e],e=>{function i(){$t(`Cannot call ${r} due to unbound types`,l)}var r=`${(e=e[0]).name}.${t}`;t.startsWith("@@")&&(t=Symbol[t.substring(2)]),s&&e.h.ib.push(t);var c=e.h.K,u=c[t];return void 0===u||void 0===u.v&&u.className!==e.name&&u.ba===n-2?(i.ba=n-2,i.className=e.n
295ame,c[t]=i):(Ft(c,t,r),c[t].v[n-2]=i),xt([],l,i=>(i=Yt(r,i,e,a,o),void 0===c[t].v?(i.ba=n-2,c[t]=i):c[t].v[n-2]=i,[])),[]})},_embind_register_class_property:(e,t,n,i,r,a,o,s,l,c)=>{t=lt(t),r=zt(i,r),xt([],[e],e=>{var i=`${(e=e[0]).name}.${t}`,u={get(){$t(`Cannot access ${i} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return u.set=l?()=>$t(`Cannot access ${i} due to unbound types`,[n,o]):()=>{throw new Ke(i+" is a read-only property")},Object.defineProperty(e.h.K,t,u),xt([],l?[n,o]:[n],n=>{var o=n[0],u={get(){var t=Qt(this,e,i+" getter");return o.fromWireType(r(a,t))},enumerable:!0};if(l){l=zt(s,l);var d=n[1];u.set=function(t){var n=Qt(this,e,i+" setter"),r=[];l(c,n,d.toWireType(r,t)),St(r)}}return Object.defineProperty(e.h.K,t,u),[]}),[]})},_embind_register_emval:e=>Mt(e,Zt),_embind_register_enum:(e,t,n,i)=>{function r(){}t=lt(t),r.values={},Mt(e,{name:t,constructor:r,fromWireType:function(e){return this.constructor.values[e]},toWireType:(e,t)=>t.value,argPackAdvance:8,readValueFromPointer:en(t,n,i),J:null}),Lt(t,r)},_embind_register_enum_value:(e,t,n)=>{var i=mt(e,"enum");t=lt(t),e=i.constructor,i=Object.create(i.constructor.prototype,{value:{value:n},constructor:{value:nt(`${i.name}_${t}`,function(){})}}),e.values[n]=i,e[t]=i},_embind_register_float:(e,t,n)=>{Mt(e,{name:t=lt(t),fromWireType:e=>e,toWireType:(e,t)=>t,argPackAdvance:8,readValueFromPointer:nn(t,n),J:null})},_embind_register_function:(e,t,n,i,r,a)=>{var o=Gt(t,n);e=lt(e),e=Kt(e),r=zt(i,r),Lt(e,function(){$t(`Cannot call ${e} due to unbound types`,o)},t-1),xt([],o,n=>(Wt(e,Yt(e,[n[0],null].concat(n.slice(1)),null,r,a),t-1),[]))},_embind_register_integer:(e,t,n,i,r)=>{if(t=lt(t),-1===r&&(r=4294967295),r=e=>e,0===i){var a=32-8*n;r=e=>e<<a>>>a}var o=t.includes("unsigned")?function(e,t){return t>>>0}:function(e,t){return t};Mt(e,{name:t,fromWireType:r,toWireType:o,argPackAdvance:8,readValueFromPointer:rn(t,n,0!==i),J:null})},_embind_register_memory_view:(e,t,n)=>{function i(e){return new r(S.buffer,M[e+4>>2],M[e>>2])}var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array][t];Mt(e,{name:n=lt(n),fromWireType:i,argPackAdvance:8,readValueFromPointer:i},{Nb:!0})},_embind_register_std_string:(e,t)=>{var n="std::string"===(t=lt(t));Mt(e,{name:t,fromWireType:function(e){var t=M[e>>2],i=e+4;if(n)for(var r=i,a=0;a<=t;++a){var o=i+a;if(a==t||0==C[o]){if(r=r?re(C,r,o-r):"",void 0===s)var s=r;else s+=String.fromCharCode(0),s+=r;r=o+1}}else{for(s=Array(t),a=0;a<t;++a)s[a]=String.fromCharCode(C[i+a]);s=s.join("")}return Rn(e),s},toWireType:function(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var i="string"==typeof t;if(!(i||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int8Array))throw new Ke("Cannot pass non-string to std::string");var r=n&&i?oe(t):t.length,a=Fn(4+r+1),o=a+4;if(M[a>>2]=r,n&&i)se(t,C,o,r+1);else if(i)for(i=0;i<r;++i){var s=t.charCodeAt(i);if(255<s)throw Rn(o),new Ke("String has UTF-16 code units that do not fit in 8 bits");C[o+i]=s}else for(i=0;i<r;++i)C[o+i]=t[i];return null!==e&&e.push(Rn,a),a},argPackAdvance:8,readValueFromPointer:Ct,J(e){Rn(e)}})},_embind_register_std_wstring:(e,t,n)=>{if(n=lt(n),2===t)var i=on,r=sn,a=ln,o=e=>I[e>>1];else 4===t&&(i=cn,r=un,a=dn,o=e=>M[e>>2]);Mt(e,{name:n,fromWireType:e=>{for(var n,r=M[e>>2],a=e+4,s=0;s<=r;++s){var l=e+4+s*t;s!=r&&0!=o(l)||(a=i(a,l-a),void 0===n?n=a:(n+=String.fromCharCode(0),n+=a),a=l+t)}return Rn(e),n},toWireType:(e,i)=>{if("string"!=typeof i)throw new Ke(`Cannot pass non-string to C++ string type ${n}`);var o=a(i),s=Fn(4+o+t);return M[s>>2]=o/t,r(i,s+4,o+t),null!==e&&e.push(Rn,s),s},argPackAdvance:8,readValueFromPointer:Ct,J(e){Rn(e)}})},_embind_register_value_object:(e,t,n,i,r,a)=>{At[e]={name:lt(t),Ha:zt(n,i),M:zt(r,a),Xa:[]}},_embind_register_value_object_field:(e,t,n,i,r,a,o,s,l,c)=>{At[e].Xa.push({Gb:lt(t),Mb:n,Kb:zt(i,r),Lb:a,bc:o,ac:zt(s,l),cc:c})},_embind_register_void:(e,t)=>{Mt(e,{Dc:!0,name:t=lt(t),argPackAdvance:0,fromWireType:()=>{},toWireType:()=>{}})},_emscripten_get_now_is_monotonic:()=>1,_emscripten_memcpy_js:(e,t,n)=>C.copyWithin(e,t,t+n),_emscripten_throw_longjmp:()=>{throw 1/0},_emval_as:(e,t,n)=>(e=at(e),t=mt(t,"emval::as"),hn(t,n,e)),_emval_call:(e,t,n,i)=>(e=fn[e])(null,t=at(t),n,i),_emval_call_method:(e,t,n,i,r)=>
295(e=fn[e])(t=at(t),t[n=mn(n)],i,r),_emval_decref:Jt,_emval_get_method_caller:(e,t,n)=>{var i=((e,t)=>{for(var n=Array(e),i=0;i<e;++i)n[i]=mt(M[t+4*i>>2],"parameter "+i);return n})(e,t),r=i.shift();e--;var a=Array(e);return t=`methodCaller<(${i.map(e=>e.name).join(", ")}) => ${r.name}>`,(e=>{var t=fn.length;return fn.push(e),t})(nt(t,(t,o,s,l)=>{for(var c=0,u=0;u<e;++u)a[u]=i[u].readValueFromPointer(l+c),c+=i[u].argPackAdvance;return t=1===n?vn(o,a):o.apply(t,a),hn(r,s,t)}))},_emval_get_module_property:e=>(e=mn(e),ot(r[e])),_emval_get_property:(e,t)=>(e=at(e),t=at(t),ot(e[t])),_emval_incref:e=>{9<e&&(rt[e+1]+=1)},_emval_new_array:()=>ot([]),_emval_new_cstring:e=>ot(mn(e)),_emval_new_object:()=>ot({}),_emval_run_destructors:e=>{var t=at(e);St(t),Jt(e)},_emval_set_property:(e,t,n)=>{e=at(e),t=at(t),n=at(n),e[t]=n},_emval_take_value:(e,t)=>(e=(e=mt(e,"_emval_take_value")).readValueFromPointer(t),ot(e)),_gmtime_js:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),x[n>>2]=e.getUTCSeconds(),x[n+4>>2]=e.getUTCMinutes(),x[n+8>>2]=e.getUTCHours(),x[n+12>>2]=e.getUTCDate(),x[n+16>>2]=e.getUTCMonth(),x[n+20>>2]=e.getUTCFullYear()-1900,x[n+24>>2]=e.getUTCDay(),x[n+28>>2]=(e.getTime()-Date.UTC(e.getUTCFullYear(),0,1,0,0,0,0))/864e5|0},_localtime_js:function(e,t,n){e=new Date(1e3*(t+2097152>>>0<4194305-!!e?(e>>>0)+4294967296*t:NaN)),x[n>>2]=e.getSeconds(),x[n+4>>2]=e.getMinutes(),x[n+8>>2]=e.getHours(),x[n+12>>2]=e.getDate(),x[n+16>>2]=e.getMonth(),x[n+20>>2]=e.getFullYear()-1900,x[n+24>>2]=e.getDay(),x[n+28>>2]=(bn(e.getFullYear())?yn:gn)[e.getMonth()]+e.getDate()-1|0,x[n+36>>2]=-60*e.getTimezoneOffset(),t=new Date(e.getFullYear(),6,1).getTimezoneOffset();var i=new Date(e.getFullYear(),0,1).getTimezoneOffset();x[n+32>>2]=0|(t!=i&&e.getTimezoneOffset()==Math.min(i,t))},_tzset_js:(e,t,n,i)=>{var r=(new Date).getFullYear(),a=new Date(r,0,1),o=new Date(r,6,1);r=a.getTimezoneOffset();var s=o.getTimezoneOffset();M[e>>2]=60*Math.max(r,s),x[t>>2]=Number(r!=s),a=(e=e=>e.toLocaleTimeString(void 0,{hour12:!1,timeZoneName:"short"}).split(" ")[1])(a),o=e(o),s<r?(se(a,C,n,17),se(o,C,i,17)):(se(a,C,i,17),se(o,C,n,17))},emscripten_asm_const_int:(e,t,n)=>{wn.length=0;for(var i;i=C[t++];){var r=105!=i;n+=(r&=112!=i)&&n%8?4:0,wn.push(112==i?M[n>>2]:105==i?x[n>>2]:R[n>>3]),n+=r?8:4}return X[e](...wn)},emscripten_date_now:()=>Date.now(),emscripten_get_now:()=>performance.now(),emscripten_resize_heap:e=>{var t=C.length;if(2147483648<(e>>>=0))return!1;for(var n=1;4>=n;n*=2){var i=t*(1+.2/n);i=Math.min(i,e+100663296);var r=Math;i=Math.max(e,i);e:{r=(r.min.call(r,2147483648,i+(65536-i%65536)%65536)-A.buffer.byteLength+65535)/65536;try{A.grow(r),L();var a=1;break e}catch(e){}a=void 0}if(a)return!0}return!1},environ_get:(e,t)=>{var n=0;return An().forEach((i,r)=>{var a=t+n;for(r=M[e+4*r>>2]=a,a=0;a<i.length;++a)S[r++]=i.charCodeAt(a);S[r]=0,n+=i.length+1}),0},environ_sizes_get:(e,t)=>{var n=An();M[e>>2]=n.length;var i=0;return n.forEach(e=>i+=e.length+1),M[t>>2]=i,0},fd_close:function(e){try{var t=Pe(e);if(null===t.U)throw new Ae(8);t.Ea&&(t.Ea=null);try{t.l.close&&t.l.close(t)}catch(e){throw e}finally{ye[t.U]=null}return t.U=null,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.Y}},fd_read:function(e,t,n,i){try{e:{var r=Pe(e);e=t;for(var a,o=t=0;o<n;o++){var s=M[e>>2],l=M[e+4>>2];e+=8;var c=r,u=a,d=S;if(0>l||0>u)throw new Ae(28);if(null===c.U)throw new Ae(8);if(1==(2097155&c.flags))throw new Ae(8);if(16384==(61440&c.node.mode))throw new Ae(31);if(!c.l.read)throw new Ae(28);var h=void 0!==u;if(h){if(!c.seekable)throw new Ae(70)}else u=c.position;var f=c.l.read(c,d,s,l,u);h||(c.position+=f);var p=f;if(0>p){var m=-1;break e}if(t+=p,p<l)break;void 0!==a&&(a+=p)}m=t}return M[i>>2]=m,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.Y}},fd_seek:function(e,t,n,i,r){t=n+2097152>>>0<4194305-!!t?(t>>>0)+4294967296*n:NaN;try{if(isNaN(t))return 61;var a=Pe(e);return $e(a,t,i),Y=[a.position>>>0,($=a.position,1<=+Math.abs($)?0<$?+Math.floor($/4294967296)>>>0:~~+Math.ceil(($-+(~~$>>>0))/4294967296)>>>0:0)],x[r>>2]=Y[0],x[r+4>>2]=Y[1],a.Ea&&0===t&&0===i&&(a.Ea=null),0}catch(e){if("ErrnoError"!==e.name)throw e;return e.Y}},fd_write:function(e,t,n,i){try{e:{var r=Pe(e);e=t;for(var a,o=t=0;o<n;o++){var s=M[e>>2],l=M[e+4>>2];e+=8;var c=r,u=s,d=l,h=a,f=S;if(0>d||0>h)throw new Ae(28);
295if(null===c.U)throw new Ae(8);if(!(2097155&c.flags))throw new Ae(8);if(16384==(61440&c.node.mode))throw new Ae(31);if(!c.l.write)throw new Ae(28);c.seekable&&1024&c.flags&&$e(c,0,2);var p=void 0!==h;if(p){if(!c.seekable)throw new Ae(70)}else h=c.position;var m=c.l.write(c,f,u,d,h,void 0);p||(c.position+=m);var v=m;if(0>v){var b=-1;break e}t+=v,void 0!==a&&(a+=v)}b=t}return M[i>>2]=b,0}catch(e){if("ErrnoError"!==e.name)throw e;return e.Y}},invoke_vii:function(e,t,n){var i=Nn();try{qt(e)(t,n)}catch(e){if(Bn(i),e!==e+0)throw e;Dn(1,0)}},isWindowsBrowser:function(){return-1<navigator.platform.indexOf("Win")},strftime:En,strftime_l:(e,t,n,i)=>En(e,t,n,i),wasm_start_image_decode:function(e,t,n){t=r.HEAP8.subarray(t,t+n),(n=new Uint8Array(n)).set(t),createImageBitmap(new Blob([n])).then(function(t){var n=new OffscreenCanvas(t.width,t.height).getContext("2d");n.drawImage(t,0,0);var i=(n=n.getImageData(0,0,t.width,t.height)).data.length,a=r.vb(i);r.lc.set(n.data,a),r.nc(e,t.width,t.height,a,i)}).catch(function(t){t=t.message||"decode failed";var n=r.Ec(t)+1,i=r.vb(n);r.Jc(t,i,n),r.oc(e,i),r.mc(i)})}},kn=function(){function e(e){return kn=e.exports,A=kn.memory,L(),Nt=kn.__indirect_function_table,P.unshift(kn.__wasm_call_ctors),D--,r.monitorRunDependencies?.(D),0==D&&(null!==B&&(clearInterval(B),B=null),N&&(e=N,N=null,e())),kn}var t={env:Mn,wasi_snapshot_preview1:Mn};if(D++,r.monitorRunDependencies?.(D),r.instantiateWasm)try{return r.instantiateWasm(t,e)}catch(e){_(`Module.instantiateWasm callback failed with error: ${e}`),n(e)}return W||=U("canvas_advanced.wasm")?"canvas_advanced.wasm":r.locateFile?r.locateFile("canvas_advanced.wasm",y):y+"canvas_advanced.wasm",function(e,t){var n=W;return g||"function"!=typeof WebAssembly.instantiateStreaming||U(n)||q(n)||"function"!=typeof fetch?z(n,e,t):fetch(n,{credentials:"same-origin"}).then(i=>WebAssembly.instantiateStreaming(i,e).then(t,function(i){return _(`wasm streaming compile failed: ${i}`),_("falling back to ArrayBuffer instantiation"),z(n,e,t)}))}(t,function(t){e(t.instance)}).catch(n),{}}(),Rn=e=>(Rn=kn.free)(e),Fn=e=>(Fn=kn.malloc)(e),Ln=e=>(Ln=kn.__getTypeName)(e);r._wasm_image_decode_complete=(e,t,n,i,a)=>(r._wasm_image_decode_complete=kn.wasm_image_decode_complete)(e,t,n,i,a),r._wasm_image_decode_error=(e,t)=>(r._wasm_image_decode_error=kn.wasm_image_decode_error)(e,t);var Tn=r._ma_device__on_notification_unlocked=e=>(Tn=r._ma_device__on_notification_unlocked=kn.ma_device__on_notification_unlocked)(e);r._ma_malloc_emscripten=(e,t)=>(r._ma_malloc_emscripten=kn.ma_malloc_emscripten)(e,t),r._ma_free_emscripten=(e,t)=>(r._ma_free_emscripten=kn.ma_free_emscripten)(e,t);var Pn,On=r._ma_device_process_pcm_frames_capture__webaudio=(e,t,n)=>(On=r._ma_device_process_pcm_frames_capture__webaudio=kn.ma_device_process_pcm_frames_capture__webaudio)(e,t,n),jn=r._ma_device_process_pcm_frames_playback__webaudio=(e,t,n)=>(jn=r._ma_device_process_pcm_frames_playback__webaudio=kn.ma_device_process_pcm_frames_playback__webaudio)(e,t,n),Dn=(e,t)=>(Dn=kn.setThrew)(e,t),Bn=e=>(Bn=kn._emscripten_stack_restore)(e),Nn=()=>(Nn=kn.emscripten_stack_get_current)();function Vn(){function e(){if(!Pn&&(Pn=!0,r.calledRun=!0,!F)){if(r.noFSInit||je||(je=!0,r.stdin=r.stdin,r.stdout=r.stdout,r.stderr=r.stderr,r.stdin?Ye("stdin",r.stdin):qe("/dev/tty","/dev/stdin"),r.stdout?Ye("stdout",null,r.stdout):qe("/dev/tty","/dev/stdout"),r.stderr?Ye("stderr",null,r.stderr):qe("/dev/tty1","/dev/stderr"),ze("/dev/stdin",0),ze("/dev/stdout",1),ze("/dev/stderr",1)),_e=!1,G(P),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;){var e=r.postRun.shift();O.unshift(e)}G(O)}}if(!(0<D)){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)j();G(T),0<D||(r.setStatus?(r.setStatus("Running..."),setTimeout(function(){setTimeout(function(){r.setStatus("")},1),e()},1)):e())}}if(r.dynCall_iiji=(e,t,n,i,a)=>(r.dynCall_iiji=kn.dynCall_iiji)(e,t,n,i,a),r.dynCall_jiji=(e,t,n,i,a)=>(r.dynCall_jiji=kn.dynCall_jiji)(e,t,n,i,a),r.dynCall_iiiji=(e,t,n,i,a,o)=>(r.dynCall_iiiji=kn.dynCall_iiiji)(e,t,n,i,a,o),r.dynCall_iij=(e,t,n,i)=>(r.dynCall_iij=kn.dynCall_iij)(e,t,n,i),r.dynCall_jii=(e,t,n)=>
295(r.dynCall_jii=kn.dynCall_jii)(e,t,n),r.dynCall_viijii=(e,t,n,i,a,o,s)=>(r.dynCall_viijii=kn.dynCall_viijii)(e,t,n,i,a,o,s),r.dynCall_iiiiij=(e,t,n,i,a,o,s)=>(r.dynCall_iiiiij=kn.dynCall_iiiiij)(e,t,n,i,a,o,s),r.dynCall_iiiiijj=(e,t,n,i,a,o,s,l,c)=>(r.dynCall_iiiiijj=kn.dynCall_iiiiijj)(e,t,n,i,a,o,s,l,c),r.dynCall_iiiiiijj=(e,t,n,i,a,o,s,l,c,u)=>(r.dynCall_iiiiiijj=kn.dynCall_iiiiiijj)(e,t,n,i,a,o,s,l,c,u),N=function e(){Pn||Vn(),Pn||(N=e)},r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);0<r.preInit.length;)r.preInit.pop()();return Vn(),a})},e=>{e.exports=JSON.parse('{"name":"@rive-app/canvas","version":"2.39.2","description":"Rive\'s canvas based web api.","main":"rive.js","homepage":"https://rive.app","repository":{"type":"git","url":"https://github.com/rive-app/rive-wasm/tree/master/js"},"keywords":["rive","animation"],"author":"Rive","contributors":["Luigi Rosso <[email protected]> (https://rive.app)","Maxwell Talbot <[email protected]> (https://rive.app)","Arthur Vivian <[email protected]> (https://rive.app)","Umberto Sonnino <[email protected]> (https://rive.app)","Matthew Sullivan <[email protected]> (mailto:[email protected])"],"license":"MIT","files":["rive.js","rive.js.map","rive.wasm","rive_fallback.wasm","rive.d.ts","rive_advanced.mjs.d.ts","runtimeLoader.d.ts","utils","semantics"],"typings":"rive.d.ts","dependencies":{},"browser":{"fs":false,"path":false}}')},(e,t,n)=>{n.r(t),n.d(t,{AccessibilityOverlay:()=>r.AccessibilityOverlay,SemanticActionType:()=>a.SemanticActionType,SemanticMode:()=>a.SemanticMode,SemanticRole:()=>a.SemanticRole,SemanticState:()=>a.SemanticState,SemanticTrait:()=>a.SemanticTrait,SemanticTreeModel:()=>i.SemanticTreeModel,hasState:()=>a.hasState,hasTrait:()=>a.hasTrait,roleName:()=>a.roleName,stateNames:()=>a.stateNames,traitNames:()=>a.traitNames});var i=n(7),r=n(9),a=n(8)},(e,t,n)=>{n.r(t),n.d(t,{SemanticTreeModel:()=>a});var i=n(8),r=function(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},a=function(){function e(){this._nodesById=new Map,this._roots=[],this._semanticVersion=0,this._geometryVersion=0,this._geometryChangedIds=new Set,this._semanticChangedIds=new Set,this._debug=!1}return Object.defineProperty(e.prototype,"nodeCount",{get:function(){return this._nodesById.size},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"semanticVersion",{get:function(){return this._semanticVersion},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometryVersion",{get:function(){return this._geometryVersion},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"geometryChangedIds",{get:function(){return this._geometryChangedIds},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"semanticChangedIds",{get:function(){return this._semanticChangedIds},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"roots",{get:function(){return this._roots},enumerable:!1,configurable:!0}),e.prototype.nodeById=function(e){return this._nodesById.get(e)},e.prototype.siblingIndexOf=function(e){var t=this._nodesById.get(e);if(!t)return-1;if(t.parentId<0)return this._roots.indexOf(e);var n=this._nodesById.get(t.parentId);return n?n.children.indexOf(e):-1},e.prototype.detach=function(e){var t=this._nodesById.get(e);if(t)if(t.parentId<0)-1!==(n=this._roots.indexOf(e))&&this._roots.splice(n,1);else{var n,i=this._nodesById.get(t.parentId);i&&-1!==(n=i.children.indexOf(e))&&i.children.splice(n,1)}},e.prototype.attach=function(e,t,n){var i=this._nodesById.get(e);if(i)if(t<0){i.parentId=-1;var r=o(n,0,this._roots.length);this._roots.splice(r,0,e)}else{var a=this._nodesById.get(t);a?(i.parentId=t,r=o(n,0,a.children.length),a.children.splice(r,0,e)):(i.parentId=-1,this._roots.push(e))}},e.prototype.removeSubtree=function(e){var t=this._nodesById.get(e);if(t){for(var n=0,i=r([],t.children,!0);n<i.length;n++){var a=i[n];this.removeSubtree(a)}this.detach(e),this._nodesById.delete(e)}},e.prototype.applyDiff=function(e){var t,n,i=this;this._geometryChangedIds.clear(),this._semanticChangedIds.clear();for(var r=!1,a=!1,o=function(){r=!0},f=function(e){r=!0,i._semanticChangedIds.add(e)},p=function(e){a=!0,i._geometryChangedIds.add(e)},m=0,v=e.removed;m<v.length;m++){var b=v[m];this._nodesById.has(b)&&(this.removeSubtree(b),o())}for(var y=0,g=e.added;y<g.length;y++){var w=g[y];(N=this._nodesById.get(w.id))?(c(N,w)&&(d(N,w),f(w.id)),u(N,w)&&(h(N,w),p(w.id))):(this._nodesById.set(w.id,l(w)),f(w.id),p(w.id)),this.detach(w.id),this.attach(w.id,w.parentId,w.siblingIndex)}for(var _=0,A=e.moved;_<A.length;_++)if(w=A[_],N=this._nodesById.get(w.id)){var S=N.parentId!==w.parentId,C=this.siblingIndexOf(w.id);u(N,w)&&(h(N,w),p(w.id)),this.detach(w.id),this.attach(w.id,w.parentId,w.siblingIndex),(S||this.siblingIndexOf(w.id)!==C)&&o()}for(var E=0,I=e.childrenUpdated;E<I.length;E++){var x=I[E];if(x.parentId<0){var M=x.childIds.filter(function(e){return i._nodesById.has(e)});if(!s(this._roots,M)){this._roots.length=0,(t=this._roots).push.apply(t,M);for(var k=0,R=this._roots;k<R.length;k++)b=R[k],(P=this._nodesById.get(b))&&(P.parentId=-1);o()}}else{var F=this._nodesById.get(x.parentId);if(!F)continue;if(M=x.childIds.filter(function(e){return i._nodesById.has(e)}),!s(F.children,M)){F.children.length=0,(n=F.children).push.apply(n,M);for(var L=0,T=F.children;L<T.length;L++){var P;b=T[L],(P=this._nodesById.get(b))&&(P.parentId=x.parentId)}o()}}}for(var O=0,j=e.updatedSemantic;O<j.length;O++)w=j[O],(N=this._nodesById.get(w.id))&&c(N,w)&&(d(N,w),f(w.id));for(var D=0,B=e.updatedGeometry;D<B.length;D++){var N;w=B[D],(N=this._nodesById.get(w.id))&&u(N,w)&&(h(N,w),p(w.id))}(r||a)&&(r&&this._semanticVersion++,a&&this._geometryVersion++,this._debug&&this.logDiff(e,r,a))},Object.defineProperty(e.prototype,"debug",{set:function(e){this._debug=e}
295,enumerable:!1,configurable:!0}),e.prototype.logDiff=function(e,t,n){for(var r=["[rive:semantics] semantic v".concat(this._semanticVersion)+(n?" geometry v".concat(this._geometryVersion):"")+(t?"":" (geometry-only)")],a=0,o=e.removed;a<o.length;a++){var s=o[a];r.push(" - removed #".concat(s))}for(var l=0,c=e.added;l<c.length;l++){var u=c[l];r.push(" + added #".concat(u.id," ").concat((0,i.roleName)(u.role))+(u.label?' "'.concat(u.label,'"'):"")+" bounds:(".concat(u.minX.toFixed(1),",").concat(u.minY.toFixed(1),")-(").concat(u.maxX.toFixed(1),",").concat(u.maxY.toFixed(1),")")+" states=[".concat((0,i.stateNames)(u.stateFlags),"]")+" traits=[".concat((0,i.traitNames)(u.traitFlags),"]"))}for(var d=0,h=e.moved;d<h.length;d++)u=h[d],r.push(" ~ moved #".concat(u.id," â parent=").concat(u.parentId," idx=").concat(u.siblingIndex)+" bounds:(".concat(u.minX.toFixed(1),",").concat(u.minY.toFixed(1),")-(").concat(u.maxX.toFixed(1),",").concat(u.maxY.toFixed(1),")"));for(var f=0,p=e.childrenUpdated;f<p.length;f++){var m=p[f];r.push(" â children of ".concat(m.parentId<0?"root":"#"+m.parentId,": [").concat(m.childIds.join(", "),"]"))}for(var v=0,b=e.updatedSemantic;v<b.length;v++)u=b[v],r.push(" â semantic #".concat(u.id," ").concat((0,i.roleName)(u.role))+(u.label?' "'.concat(u.label,'"'):"")+" states=[".concat((0,i.stateNames)(u.stateFlags),"]")+" traits=[".concat((0,i.traitNames)(u.traitFlags),"]"));for(var y=0,g=e.updatedGeometry;y<g.length;y++)u=g[y],r.push(" â geometry #".concat(u.id," (").concat(u.minX.toFixed(1),",").concat(u.minY.toFixed(1),")-(").concat(u.maxX.toFixed(1),",").concat(u.maxY.toFixed(1),")"));console.log(r.join("\n"))},e.prototype.flattened=function(){for(var e=this,t=[],n=function(i,r){var a=e._nodesById.get(i);if(a){t.push({depth:r,node:a});for(var o=0,s=a.children;o<s.length;o++){var l=s[o];n(l,r+1)}}},i=0,r=this._roots;i<r.length;i++){var a=r[i];n(a,0)}return t},e}();function o(e,t,n){return e<t?t:e>n?n:e}function s(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function l(e){return{id:e.id,parentId:-1,role:e.role,label:e.label,value:e.value,hint:e.hint,stateFlags:e.stateFlags,traitFlags:e.traitFlags,headingLevel:e.headingLevel,minX:e.minX,minY:e.minY,maxX:e.maxX,maxY:e.maxY,children:[]}}function c(e,t){return e.role!==t.role||e.label!==t.label||e.value!==t.value||e.hint!==t.hint||e.stateFlags!==t.stateFlags||e.traitFlags!==t.traitFlags||e.headingLevel!==t.headingLevel}function u(e,t){return e.minX!==t.minX||e.minY!==t.minY||e.maxX!==t.maxX||e.maxY!==t.maxY}function d(e,t){e.role=t.role,e.label=t.label,e.value=t.value,e.hint=t.hint,e.stateFlags=t.stateFlags,e.traitFlags=t.traitFlags,e.headingLevel=t.headingLevel}function h(e,t){e.minX=t.minX,e.minY=t.minY,e.maxX=t.maxX,e.maxY=t.maxY}},(e,t,n)=>{n.r(t),n.d(t,{SemanticActionType:()=>c,SemanticMode:()=>o,SemanticRole:()=>i,SemanticState:()=>r,SemanticTrait:()=>s,hasState:()=>a,hasTrait:()=>l,roleName:()=>y,stateNames:()=>g,traitNames:()=>w});var i={none:0,button:1,link:2,checkbox:3,switchControl:4,slider:5,textField:6,text:7,image:8,group:9,list:10,listItem:11,tab:12,tabList:13,dialog:14,alertDialog:15,radioGroup:16,radioButton:17},r={None:0,Expanded:1,Selected:2,Checked:4,Mixed:8,Toggled:16,Required:32,Disabled:64,Focused:128,Hidden:256,LiveRegion:512,ReadOnly:1024,Modal:2048,Obscured:4096,Multiline:8192};function a(e,t){return 0!==(e&t)}var o={Disabled:"disabled",Enabled:"enabled"},s={None:0,Expandable:1,Selectable:2,Checkable:4,Toggleable:8,Requirable:16,Enablable:32,Focusable:64};function l(e,t){return 0!==(e&t)}for(var c={tap:0,increase:1,decrease:2},u={},d=0,h=Object.entries(i);d<h.length;d++){var f=h[d],p=f[0],m=f[1];u[m]=p}var v=Object.entries(r).filter(function(e){return 0!==e[1]}),b=Object.entries(s).filter(function(e){return 0!==e[1]});function y(e){var t;return null!==(t=u[e])&&void 0!==t?t:"unknown(".concat(e,")")}function g(e){if(0===e)return"none";for(var t=[],n=0,i=v;n<i.length;n++){var r=i[n],a=r[0];e&r[1]&&t.push(a)}return t.join(", ")||"none"}function w(e){if(0===e)return"none";for(var t=[],n=0,i=b;n<i.length;n++){var r=i[n],a=r[0];e&r[1]&&t.push(a)}return t.join(", ")||"none"}},(e,t,n)=>{n.r(t),n.d(t,{AccessibilityOverlay:()=>r});var i=n(8),r=function(){function e(e){var t,n=this;this.elements=new Map,this.descElements=new Map,this.lastSemanticVersion=-1,this.lastGeometryVersion=-1,this.pendingTextGeometry=[],this.textGeometryKeys=new WeakMap,this.lastCanvasPositioning={width:-1,height:-1,offsetTop:-1,offsetLeft:-1},this._geometryDirty=!0,this.isUpdating=!1,this.transformContainer=null,this._artboardBounds={minX:0,minY:0,maxX:0,maxY:0},this.repositionTimer=null,this.canvasResizeObserver=null,this.parentResizeObserver=null,this.positionObserver=null,this._onWindowResize=function(){return n.scheduleReposition()},this.instanceId=e.instanceId,this.fireAction=e.fireAction,this.requestFocus=e.requestFocus,this.clearFocus=e.clearFocus,this.canvas=e.canvas,this.semanticsOptions=e.semanticsOptions,this.allowFocusInterrupt=null!==(t=e.allowFocusInterrupt)&&void 0!==t&&t,this.container=this.createContainer(e.canvas),this.attachPositionObservers()}return e.prototype.getSemanticOverlayContainer=function(){return this.container},e.prototype.attachPositionObservers=function(){var e=this;this.canvasResizeObserver=new ResizeObserver(function(){return e.scheduleReposition()}),this.canvasResizeObserver.observe(this.canvas);var t=this.canvas.parentElement;t&&(this.parentResizeObserver=new ResizeObserver(function(){return e.scheduleReposition()}),this.parentResizeObserver.observe(t)),window.addEventListener("resize",this._onWindowResize),this.observePosition()},e.prototype.observePosition=function(){var e,t=this;if("undefined"!=typeof IntersectionObserver){null===(e=this.positionObserver)||void 0===e||e.disconnect(),this.positionObserver=null;var n=this.canvas.getBoundingClientRect();if(n.width&&n.height){var i=[n.top,window.innerWidth-n.right,window.innerHeight-n.bottom,n.left].map(function(e){return"".concat(-Math.round(e),"px")}
295).join(" "),r=!1;this.positionObserver=new IntersectionObserver(function(){r?t.scheduleReposition():r=!0},{threshold:1,rootMargin:i}),this.positionObserver.observe(this.canvas)}}},e.prototype.scheduleReposition=function(){var e=this;this._geometryDirty=!0,null===this.repositionTimer&&(this.repositionTimer=setTimeout(function(){e.repositionTimer=null,e.syncContainerGeometry(),e.observePosition()},500))},e.prototype.syncContainerGeometry=function(){var e=this.canvas.getBoundingClientRect(),t=this.canvas.offsetTop,n=this.canvas.offsetLeft;e.width===this.lastCanvasPositioning.width&&e.height===this.lastCanvasPositioning.height&&t===this.lastCanvasPositioning.offsetTop&&n===this.lastCanvasPositioning.offsetLeft||(this.container.style.top=t+"px",this.container.style.left=n+"px",this.container.style.width=e.width+"px",this.container.style.height=e.height+"px",this.container.tabIndex=-1,this.lastCanvasPositioning.width=e.width,this.lastCanvasPositioning.height=e.height,this.lastCanvasPositioning.offsetTop=t,this.lastCanvasPositioning.offsetLeft=n)},e.prototype.createContainer=function(e){var t,n,i=document.createElement("div");i.id="rive-a11y-".concat(this.instanceId),i.setAttribute("role","region"),i.setAttribute("aria-label",null!==(n=null===(t=this.semanticsOptions)||void 0===t?void 0:t.riveCanvasLabel)&&void 0!==n?n:"Rive animation");var r=e.getBoundingClientRect();return i.style.cssText=["position:absolute","top:".concat(e.offsetTop,"px"),"left:".concat(e.offsetLeft,"px"),"width:".concat(r.width,"px"),"height:".concat(r.height,"px"),"overflow:hidden","pointer-events:none","opacity:0"].join(";"),e.insertAdjacentElement("afterend",i),i},e.prototype.needsUpdate=function(e){var t=e.semanticVersion!==this.lastSemanticVersion,n=e.geometryVersion!==this.lastGeometryVersion,i=this._geometryDirty||!this.transformContainer;return t||n||i?{semanticChanged:t,nodeGeometryChanged:n,layoutChanged:i}:null},e.prototype.update=function(e,t,n,i,r){var a=null!=r?r:this.needsUpdate(e);!a&&t&&(a={semanticChanged:!1,nodeGeometryChanged:!1,layoutChanged:!0}),a&&this.performUpdate(e,t,n,i,a)},e.prototype.performUpdate=function(e,t,n,i,r){var a,o=r.semanticChanged,s=r.nodeGeometryChanged,l=e.semanticVersion-this.lastSemanticVersion>1;if(this.lastSemanticVersion=e.semanticVersion,this.lastGeometryVersion=e.geometryVersion,this.isUpdating=!0,this._artboardBounds=i,t&&(this.syncContainerGeometry(),this.syncTransformContainer(t,n,i),this._geometryDirty=!1),o){var c=null!==(a=this.transformContainer)&&void 0!==a?a:this.container,u=new Set;this.rebuildChildren(c,e.roots,e,0,0,u,l);var d=[];this.elements.forEach(function(e,t){u.has(t)||d.push(t)});for(var h=0,f=d;h<f.length;h++){var p=f[h],m=this.elements.get(p);m&&m.parentNode&&m.parentNode.removeChild(m),this.elements.delete(p);var v=this.descElements.get(p);v&&v.parentNode&&v.parentNode.removeChild(v),this.descElements.delete(p)}}else s&&this.updateGeometryForChangedNodes(e);this.flushTextGeometry(),this.isUpdating=!1},e.prototype.destroy=function(){var e,t,n;null!==this.repositionTimer&&(clearTimeout(this.repositionTimer),this.repositionTimer=null),window.removeEventListener("resize",this._onWindowResize),null===(e=this.canvasResizeObserver)||void 0===e||e.disconnect(),null===(t=this.parentResizeObserver)||void 0===t||t.disconnect(),null===(n=this.positionObserver)||void 0===n||n.disconnect(),this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.elements.clear(),this.descElements.clear(),this.pendingTextGeometry.length=0},e.prototype.rebuildChildren=function(e,t,n,r,a,o,s){for(var l=0;l<t.length;l++){var c=t[l],u=n.nodeById(c);if(u){o.add(c);var d=this.elements.get(c),h=!d;d||(d=this.createElement(u),this.elements.set(c,d)),(h||s||n.semanticChangedIds.has(c))&&this.applyAttributes(d,u),this.applyPosition(d,u,r,a);var f=e.children[l];if(f!==d&&(f?e.insertBefore(d,f):e.appendChild(d)),(0,i.hasTrait)(u.traitFlags,i.SemanticTrait.Focusable)&&(0,i.hasState)(u.stateFlags,i.SemanticState.Focused)){var p=document.activeElement,m=null==p?void 0:p.closest('[aria-modal="true"]'),v=!!m&&this.container.contains(m)&&!m.contains(d);p!==d&&!v&&this.canMoveFocus()&&d.focus()}u.children.length>0&&this.rebuildChildren(d,u.children,n,u.minX,u.minY,o,s),h&&this.autoFocusDialogOnAppear(d,u,n)}}},e.prototype.updateGeometryForChangedNodes=function(e){for(var t,n,i=0,r=Array.from(e.geometryChangedIds);i<r.length;i++){var a=r[i],o=e.nodeById(a);if(o){var s=0,l=0,c=null!==(t=this.transformContainer)&&void 0!==t?t:this.container;if(o.parentId>=0){var u=e.nodeById(o.parentId);u&&(s=u.minX,l=u.minY,c=null!==(n=this.elements.get(o.parentId))&&void 0!==n?n:c)}this.updateNodeGeometrySubtree(e,a,s,l,c)}}},e.prototype.updateNodeGeometrySubtree=function(e,t,n,i,r){var a=e.n
295odeById(t);if(a){var o=this.elements.get(t);if(o){this.applyPosition(o,a,n,i);for(var s=0,l=a.children;s<l.length;s++){var c=l[s];this.updateNodeGeometrySubtree(e,c,a.minX,a.minY,o)}}}},e.prototype.canMoveFocus=function(){var e=document.activeElement;return e===this.canvas||this.container.contains(e)||this.allowFocusInterrupt},e.prototype.autoFocusDialogOnAppear=function(e,t,n){var i;if(b(t.role,t.stateFlags)&&this.canMoveFocus()){var r=document.activeElement;if(!r||r===e||!e.contains(r)){var a=null!==(i=this.routeDefaultFocusTarget(t,n))&&void 0!==i?i:e;a.hasAttribute("tabindex")||a.setAttribute("tabindex","-1"),document.activeElement!==a&&a.focus({preventScroll:!0})}}},e.prototype.routeDefaultFocusTarget=function(e,t){for(var n,i=0,r=e.children;i<r.length;i++){var a=r[i],o=t.nodeById(a);if(o){var s=this.elements.get(a);if(s&&y(o))return s;if(o.children.length>0||!o.label){var l=this.routeDefaultFocusTarget(o,t);if(l)return l}else if(s)return null!==(n=s.querySelector(":scope > span"))&&void 0!==n?n:s}}return null},Object.defineProperty(e.prototype,"nodeIdPrefix",{get:function(){return"rive-".concat(this.instanceId,"-sem-")},enumerable:!1,configurable:!0}),e.prototype.nodeIdFromElement=function(e){if(!e.id.startsWith(this.nodeIdPrefix))return null;var t=e.id.slice(this.nodeIdPrefix.length);if(!t)return null;var n=Number(t);return Number.isNaN(n)?null:n},e.prototype.createElement=function(e){var t=function(e){switch(e){case i.SemanticRole.link:return"a";case i.SemanticRole.text:default:return"div"}}(e.role),n=document.createElement(t);if(n.id="".concat(this.nodeIdPrefix).concat(e.id),n.style.cssText=d,e.role===i.SemanticRole.text){var r=document.createElement("span");r.style.cssText=h,n.appendChild(r)}return this.attachActionHandlers(n,e),n},e.prototype.attachRovingNav=function(e,t){var n=this;e.addEventListener("keydown",function(r){var a=null;if("ArrowRight"===r.key||"ArrowDown"===r.key?a="next":"ArrowLeft"===r.key||"ArrowUp"===r.key?a="prev":t.includeHomeEnd&&"Home"===r.key?a="first":t.includeHomeEnd&&"End"===r.key&&(a="last"),a){r.preventDefault();var o=t.members(),s=o.indexOf(e);if(!(s<0)){var l=o.length,c="next"===a?o[(s+1)%l]:"prev"===a?o[(s-1+l)%l]:"first"===a?o[0]:o[l-1];if(c&&c!==e){c.focus();var u=n.nodeIdFromElement(c);null!==u&&n.fireAction(u,i.SemanticActionType.tap)}}}})},e.prototype.attachActionHandlers=function(e,t){var n=this,r=t.role,a=t.id;if(function(e){switch(e){case i.SemanticRole.button:case i.SemanticRole.link:case i.SemanticRole.checkbox:case i.SemanticRole.switchControl:case i.SemanticRole.tab:case i.SemanticRole.radioButton:return!0;default:return!1}}(r)){e.addEventListener("click",function(){n.fireAction(a,i.SemanticActionType.tap)});var o=r===i.SemanticRole.link?["Enter"]:["Enter"," "];e.addEventListener("keydown",function(e){o.includes(e.key)&&(e.preventDefault(),n.fireAction(a,i.SemanticActionType.tap))})}r===i.SemanticRole.slider&&e.addEventListener("keydown",function(e){"ArrowRight"===e.key||"ArrowUp"===e.key?(e.preventDefault(),n.fireAction(a,i.SemanticActionType.increase)):"ArrowLeft"!==e.key&&"ArrowDown"!==e.key||(e.preventDefault(),n.fireAction(a,i.SemanticActionType.decrease))}),r===i.SemanticRole.tab&&this.attachRovingNav(e,{includeHomeEnd:!0,members:function(){var t=e.parentElement;return t?Array.from(t.children).filter(function(e){return e instanceof HTMLElement&&"tab"===e.getAttribute("role")}):[]}}),r===i.SemanticRole.radioButton&&this.attachRovingNav(e,{includeHomeEnd:!1,members:function(){var t,n=null!==(t=e.closest('[role="radiogroup"]'))&&void 0!==t?t:e.parentElement;return n?Array.from(n.querySelectorAll('[role="radio"]')):[]}}),(0,i.hasTrait)(t.traitFlags,i.SemanticTrait.Focusable)&&e.addEventListener("focus",function(){n.requestFocus(a)})},e.prototype.applyAttributes=function(e,t){var n,r,d,h=t.role,y=t.stateFlags,g=t.traitFlags,w=function(e){switch(e){case i.SemanticRole.none:return"group";case i.SemanticRole.button:return"button";case i.SemanticRole.link:return null;case i.SemanticRole.checkbox:return"checkbox";case i.SemanticRole.switchControl:return"switch";case i.SemanticRole.slider:return"slider";case i.SemanticRole.textField:return"textbox";case i.SemanticRole.image:return"img";case i.SemanticRole.group:return"group";case i.SemanticRole.list:return"list";case i.SemanticRole.listItem:return"listitem";case i.SemanticRole.tab:return"tab";case i.SemanticRole.tabList:return"tablist";case i.SemanticRole.dialog:return"dialog";case i.SemanticRole.alertDialog:return"alertdialog";case i.SemanticRole.radioGroup:return"radiogroup";case i.SemanticRole.radioButton:return"radio";case i.SemanticRole.text:default:return null}}(h);if(w?f(e,"role",w):p(e,"role"),h===i.SemanticRole.link&&f(e,"role","link"),v(h)||(0,i.hasTrait)(g,i.SemanticTrait.Focusable)||h===i.SemanticRole.listItem?f(e,"tabindex","-1"):p(e,"tabindex"),t.label?f(e,"aria-label",t.label):p(e,"aria-label"),h===i.SemanticRole.slider){if(t.value){var _=parseFloat(t.value);Number.isFinite(_)?f(e,"aria-valuenow",String(_)):p(e,"aria-valuenow"),f(e,"aria-valuetext",t.value)}else p(e,"aria-valuenow"),p(e,"aria-valuetext");f(e,"aria-orientation","horizontal"),m(e,"aria-readonly",(0,i.hasState)(y,i.SemanticState.ReadOnly))}else p(e,"aria-valuenow"),p(e,"aria-valuetext"),p(e,"aria-orientation"),p(e,"aria-readonly");if(t.hint){var A="rive-".concat(this.instanceId,"-desc-").concat(t.id),S=this.descElements.get(t.id);S||((S=document.createElement("span")).id=A,S.style.cssText=u,this.container.appendChild(S),this.descElements.set(t.id,S)),S.textContent!==t.hint&&(S.textContent=t.hint),f(e,"aria-describedby",A)}
295else{p(e,"aria-describedby");var C=this.descElements.get(t.id);C&&(C.parentNode&&C.parentNode.removeChild(C),this.descElements.delete(t.id))}if(h===i.SemanticRole.text){var E=null!==(n=e.querySelector(":scope > span"))&&void 0!==n?n:e,I=null!==(r=t.label)&&void 0!==r?r:"";E.textContent!==I&&(E.textContent=I),p(e,"aria-label"),t.headingLevel>0?(f(e,"role","heading"),f(e,"aria-level",String(t.headingLevel))):p(e,"aria-level")}(0,i.hasTrait)(g,i.SemanticTrait.Expandable)&&a.has(h)?m(e,"aria-expanded",(0,i.hasState)(y,i.SemanticState.Expanded)):p(e,"aria-expanded"),h===i.SemanticRole.tab||(0,i.hasTrait)(g,i.SemanticTrait.Selectable)&&o.has(h)?m(e,"aria-selected",(0,i.hasState)(y,i.SemanticState.Selected)):p(e,"aria-selected"),(0,i.hasTrait)(g,i.SemanticTrait.Checkable)&&s.has(h)?(0,i.hasState)(y,i.SemanticState.Mixed)&&h!==i.SemanticRole.switchControl?f(e,"aria-checked","mixed"):m(e,"aria-checked",(0,i.hasState)(y,i.SemanticState.Checked)):p(e,"aria-checked"),(0,i.hasTrait)(g,i.SemanticTrait.Toggleable)?(l.has(h)?m(e,"aria-pressed",(0,i.hasState)(y,i.SemanticState.Toggled)):p(e,"aria-pressed"),h===i.SemanticRole.switchControl&&m(e,"aria-checked",(0,i.hasState)(y,i.SemanticState.Toggled))):p(e,"aria-pressed"),(0,i.hasTrait)(g,i.SemanticTrait.Requirable)&&c.has(h)?m(e,"aria-required",(0,i.hasState)(y,i.SemanticState.Required)):p(e,"aria-required"),(0,i.hasTrait)(g,i.SemanticTrait.Enablable)?m(e,"aria-disabled",(0,i.hasState)(y,i.SemanticState.Disabled)):p(e,"aria-disabled");var x=h===i.SemanticRole.image&&!t.label;if((0,i.hasState)(y,i.SemanticState.Hidden)||(0,i.hasState)(y,i.SemanticState.Obscured)||x?f(e,"aria-hidden","true"):p(e,"aria-hidden"),(0,i.hasState)(y,i.SemanticState.LiveRegion)?f(e,"aria-live","polite"):p(e,"aria-live"),h===i.SemanticRole.textField){if(m(e,"aria-readonly",(0,i.hasState)(y,i.SemanticState.ReadOnly)),m(e,"aria-multiline",(0,i.hasState)(y,i.SemanticState.Multiline)),0===t.children.length){var M=null!==(d=t.value)&&void 0!==d?d:"";e.textContent!==M&&(e.textContent=M)}}else p(e,"aria-multiline");b(h,y)?f(e,"aria-modal","true"):p(e,"aria-modal")},e.prototype.applyPosition=function(e,t,n,r){var a=this._artboardBounds,o=Math.max(t.minX,a.minX),s=Math.max(t.minY,a.minY),l=Math.min(t.maxX,a.maxX),c=Math.min(t.maxY,a.maxY),u=o-n,d=s-r,h=Math.max(0,l-o),f=Math.max(0,c-s),p=Math.round(u),m=Math.round(d),v=Math.round(h)+"px",b=Math.round(f)+"px",y=p+"px",g=m+"px";e.style.left!==y&&(e.style.left=y),e.style.top!==g&&(e.style.top=g),e.style.width!==v&&(e.style.width=v),e.style.height!==b&&(e.style.height=b),e.style.transform&&(e.style.transform=""),t.role===i.SemanticRole.text&&this.pendingTextGeometry.push(e)},e.prototype.flushTextGeometry=function(){var e;if(0!==this.pendingTextGeometry.length){for(var t=[],n=0,i=this.pendingTextGeometry;n<i.length;n++){var r=null!==(e=(c=i[n]).querySelector(":scope > span"))&&void 0!==e?e:c,a="".concat(c.style.width,"|").concat(c.style.height,"|").concat(r.textContent);this.textGeometryKeys.get(c)!==a&&(r.style.width="auto",r.style.height="auto",r.style.transformOrigin="0 0",r.style.transform="",t.push({host:c,span:r,key:a}))}this.pendingTextGeometry.length=0;for(var o=t.map(function(e){var t=e.host,n=e.span,i=t.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.width>0&&r.height>0){var a=i.width/r.width,o=i.height/r.height;return"scale(".concat(a,", ").concat(o,")")}return"none"}),s=0;s<t.length;s++){var l=t[s],c=l.host;r=l.span,a=l.key,r.style.transform=o[s],this.textGeometryKeys.set(c,a)}}},e.prototype.syncTransformContainer=function(e,t,n){if(!this.transformContainer){var i=document.createElement("div");i.style.cssText=["position:absolute","top:0","left:0","overflow:visible","pointer-events:none","transform-origin:0 0"].join(";"),this.container.appendChild(i),this.transformContainer=i}var r=n.maxX-n.minX,a=n.maxY-n.minY;this.transformContainer.style.width=Math.round(r)+"px",this.transformContainer.style.height=Math.round(a)+"px";var o=1/(t||1),s=e.xx*o,l=e.xy*o,c=e.yx*o,u=e.yy*o,d=e.tx*o,h=e.ty*o;this.transformContainer.style.transform="matrix(".concat(s,",").concat(l,",").concat(c,",").concat(u,",").concat(d,",").concat(h,")")},e}(),a=new Set([i.SemanticRole.button,i.SemanticRole.link,i.SemanticRole.checkbox,i.SemanticRole.switchControl,i.SemanticRole.tab]),o=new Set([i.SemanticRole.tab]),s=new Set([i.SemanticRole.checkbox,i.SemanticRole.radioButton,i.SemanticRole.switchControl]),l=new Set([i.SemanticRole.button]),c=new Set([i.SemanticRole.checkbox,i.SemanticRole.textField,i.SemanticRole.radioGroup]),u=["position:absolute","width:1px","height:1px","overflow:hidden","pointer-events:none","left:-9999px"].join(";"),d=["position:absolute","pointer-events:none","box-sizing:border-box","overflow:visible","margin:0","padding:0","transform-origin: 0px 0px 0px","border:none","background:transparent","color:transparent"].join(";"),h=["display:inline-block","white-space:nowrap","pointer-events:none"].join(";");function f(e,t,n){e.getAttribute(t)!==n&&e.setAttribute(t,n)}function p(e,t){e.hasAttribute(t)&&e.removeAttribute(t)}function m(e,t,n){f(e,t,n?"true":"false")}function v(e){switch(e){case i.SemanticRole.button:case i.SemanticRole.link:case i.SemanticRole.checkbox:case i.SemanticRole.switchControl:case i.SemanticRole.slider:case i.SemanticRole.tab:case i.SemanticRole.radioButton:case i.SemanticRole.textField:return!0;default:return!1}}function b(e,t){return e===i.SemanticRole.alertDialog||e===i.SemanticRole.dialog&&(0,i.hasState)(t,i.SemanticState.Modal)}function y(e){return v(e.role)||(0,i.hasTrait)(e.traitFlags,i.SemanticTrait.Focusable)}},(e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>o.AudioAssetWrapper,AudioWrapper:()=>o.AudioWrapper,BLANK_URL:()=>a.BLANK_URL,CustomFileAssetLoaderWrapper:()=>o.CustomFileAssetLoaderWrapper,FileAssetWrapper:()=>o.FileAssetWrapper,FileFinalizer:()=>o.FileFinalizer,FocusSessionState:()=>r.FocusSessionState,FontAssetWrapper:()=>o.FontAssetWrapper,FontWrapper:()=>o.FontWrapper,ImageAssetWrapper:()=>o.ImageAssetWrapper,ImageWrapper:()=>o.ImageWrapper,KeyboardInteractions:()=>r.KeyboardInteractions,RiveFont:()=>s.RiveFont,createFinalization:()=>o.createFinalization,finalizationRegistry:()=>o.finalizationRegistry,registerTouchInteractions:()=>i.registerTouchInteractions,sanitizeUrl:()=>a.sanitizeUrl});var i=n(11),r=n(12),a=n(13),o=n(14),s=n(15)},(e,t,n)=>{n.r(t),n.d(t,{registerTouchInteractions:()=>r});var i=function(e,t,n,i){var r,a=e;return(null===(r=a.changedTouches)||void 0===r?void 0:r.length)?(!t&&["touchstart","touchmove"].includes(e.type)&&e.preventDefault(),function(e,t,n){var i,r=[];if(t)for(var a=0;a<e.length;a++){var o=e[a];r.push({clientX:o.clientX,clientY:o.clientY,identifier:o.identifier})}else{var s=null!==n?null!==(i=Array.from(e).find(function(e){return e.identifier===n}))&&void 0!==i?i:null:e[0];
295s&&r.push({clientX:s.clientX,clientY:s.clientY,identifier:s.identifier})}return r}(a.changedTouches,n,i)):[{clientX:e.clientX,clientY:e.clientY,identifier:0}]},r=function(e){var t=e.canvas,n=e.artboard,r=e.stateMachines,a=void 0===r?[]:r,o=e.renderer,s=e.rive,l=e.fit,c=e.alignment,u=e.isTouchScrollEnabled,d=void 0!==u&&u,h=e.dispatchPointerExit,f=void 0===h||h,p=e.enableMultiTouch,m=void 0!==p&&p,v=e.layoutScaleFactor,b=void 0===v?1:v,y=e.advanceAndDrain;if(!(t&&a.length&&o&&s&&n&&"undefined"!=typeof window))return null;var g=null,w=!1,_=null,A=function(){_=null},S=function(e){var t;if(w&&e instanceof MouseEvent)"mouseup"==e.type&&(w=!1);else{w=d&&"touchend"===e.type&&"touchstart"===g,g=e.type;var r=e.currentTarget.getBoundingClientRect();if(!m&&"touchstart"===e.type&&null===_){var o=null===(t=e.changedTouches)||void 0===t?void 0:t[0];o&&(_=o.identifier)}var u=i(e,d,m,m?null:_),h=s.computeAlignment(l,c,{minX:0,minY:0,maxX:r.width,maxY:r.height},n.bounds,b),p=new s.Mat2D;switch(h.invert(p),u.forEach(function(e){var t=e.clientX,n=e.clientY;if(t||n){var i=t-r.left,a=n-r.top,o=new s.Vec2D(i,a),l=s.mapXY(p,o),c=l.x(),u=l.y();e.transformedX=c,e.transformedY=u,l.delete(),o.delete()}}),p.delete(),h.delete(),e.type){case"mouseout":for(var v=function(e){f?u.forEach(function(t){e.pointerExit(t.transformedX,t.transformedY,t.identifier)}):u.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},A=0,S=a;A<S.length;A++)v(S[A]);break;case"touchmove":case"mouseover":case"mousemove":for(var C=function(e){u.forEach(function(t){e.pointerMove(t.transformedX,t.transformedY,t.identifier)})},E=0,I=a;E<I.length;E++)C(I[E]);break;case"touchstart":case"mousedown":for(var x=function(e){u.forEach(function(t){e.pointerDown(t.transformedX,t.transformedY,t.identifier)})},M=0,k=a;M<k.length;M++)x(k[M]);y(0);break;case"touchend":for(var R=function(e){u.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier),e.pointerExit(t.transformedX,t.transformedY,t.identifier)})},F=0,L=a;F<L.length;F++)R(L[F]);y(0),!m&&u.some(function(e){return e.identifier===_})&&(_=null);break;case"mouseup":for(var T=function(e){u.forEach(function(t){e.pointerUp(t.transformedX,t.transformedY,t.identifier)})},P=0,O=a;P<O.length;P++)T(O[P]);y(0)}}}.bind(void 0);return t.addEventListener("mouseover",S),t.addEventListener("mouseout",S),t.addEventListener("mousemove",S),t.addEventListener("mousedown",S),t.addEventListener("mouseup",S),t.addEventListener("touchmove",S,{passive:d}),t.addEventListener("touchstart",S,{passive:d}),t.addEventListener("touchend",S),t.addEventListener("touchcancel",A),function(){t.removeEventListener("mouseover",S),t.removeEventListener("mouseout",S),t.removeEventListener("mousemove",S),t.removeEventListener("mousedown",S),t.removeEventListener("mouseup",S),t.removeEventListener("touchmove",S),t.removeEventListener("touchstart",S),t.removeEventListener("touchend",S),t.removeEventListener("touchcancel",A)}}},(e,t,n)=>{var i;n.r(t),n.d(t,{FocusSessionState:()=>i,KeyboardInteractions:()=>r}),function(e){e.NotFocused="notFocused",e.EntryPending="entryPending",e.RiveFocused="riveFocused"}(i||(i={}));var r=function(){function e(e){var t,n=e.canvas,r=e.stateMachine,a=e.hasFocusNodes,o=e.getOverlayElement,s=this;this.focusSessionState=i.NotFocused,this.canvasHasFocus=!1,this.focusDomainReleased=!1,this.currentOverlayElement=null,this.onCanvasFocus=function(e){s.syncOverlayListener(),s.canvasHasFocus=!0,s.focusDomainReleased=!1,s.hasFocusNodes&&(s.mainSm.focusState().hasFocus||(s.focusSessionState=i.EntryPending,s.isKeyboardDrivenFocus()&&(s.cameFromBeforeCanvas(e.relatedTarget)?s.mainSm.focusNext():s.mainSm.focusPrevious())&&(s.focusSessionState=i.RiveFocused)))},this.onCanvasBlur=function(e){s.focusSessionState=i.NotFocused,s.canvasHasFocus=!1},this.onOverlayFocusIn=function(e){s.isInOverlay(e.target)&&(s.focusDomainReleased=!1)},this.onFocusDomainHostFocusIn=function(e){s.syncOverlayListener()},this.onKeyDown=function(e){s.syncOverlayListener(),s.focusDomainReleased||s.shouldRiveHandleKeyEvent(e)&&"Tab"===e.code&&s.hasFocusNodes&&((e.shiftKey?s.mainSm.focusPrevious():s.mainSm.focusNext())?(s.focusSessionState=i.RiveFocused,e.preventDefault()):(s.focusSessionState=i.NotFocused,s.focusDomainReleased=!0,s.canvasHasFocus=!1),s.syncOverlayListener())},this.canvas=n,this.mainSm=r,this.hasFocusNodes=a,this.getOverlayElement=o,this.focusDomainHost=null!==(t=n.parentElement)&&void 0!==t?t:document,n.addEventListener("focus",this.onCanvasF
295ocus),n.addEventListener("blur",this.onCanvasBlur),n.addEventListener("keydown",this.onKeyDown),this.focusDomainHost.addEventListener("focusin",this.onFocusDomainHostFocusIn),this.syncOverlayListener()}return e.prototype.setFocusSessionState=function(e){this.focusSessionState=e},e.prototype.notifyRiveFocused=function(){this.focusSessionState=i.RiveFocused},e.prototype.shouldRiveHandleKeyEvent=function(e){if(this.isInFocusDomain(document.activeElement)||this.isInOverlay(e.target))return!0;var t=this.focusSessionState!==i.NotFocused,n=e.target===this.canvas;return t&&(this.canvasHasFocus||n)},e.prototype.isInFocusDomain=function(e){return e===this.canvas||this.isInOverlay(e)},e.prototype.isInOverlay=function(e){var t,n,i;return e instanceof Node&&null!==(i=null===(n=null===(t=this.getOverlayElement)||void 0===t?void 0:t.call(this))||void 0===n?void 0:n.contains(e))&&void 0!==i&&i},e.prototype.syncOverlayListener=function(){var e,t,n,i,r,a,o=null!==(t=null===(e=this.getOverlayElement)||void 0===e?void 0:e.call(this))&&void 0!==t?t:null;o!==this.currentOverlayElement&&(null===(n=this.currentOverlayElement)||void 0===n||n.removeEventListener("focusin",this.onOverlayFocusIn),null===(i=this.currentOverlayElement)||void 0===i||i.removeEventListener("keydown",this.onKeyDown,!0),this.currentOverlayElement=o,null===(r=this.currentOverlayElement)||void 0===r||r.addEventListener("focusin",this.onOverlayFocusIn),null===(a=this.currentOverlayElement)||void 0===a||a.addEventListener("keydown",this.onKeyDown,!0))},e.prototype.isKeyboardDrivenFocus=function(){try{return this.canvas.matches(":focus-visible")}catch(e){return!1}},e.prototype.cameFromBeforeCanvas=function(e){if(!e)return!0;var t=this.canvas.compareDocumentPosition(e);return!(!(t&Node.DOCUMENT_POSITION_PRECEDING)&&t&Node.DOCUMENT_POSITION_FOLLOWING)},e.prototype.cleanup=function(){var e,t;this.canvas.removeEventListener("focus",this.onCanvasFocus),this.canvas.removeEventListener("blur",this.onCanvasBlur),this.canvas.removeEventListener("keydown",this.onKeyDown),this.focusDomainHost.removeEventListener("focusin",this.onFocusDomainHostFocusIn),null===(e=this.currentOverlayElement)||void 0===e||e.removeEventListener("focusin",this.onOverlayFocusIn),null===(t=this.currentOverlayElement)||void 0===t||t.removeEventListener("keydown",this.onKeyDown,!0)},e}()},(e,t,n)=>{n.r(t),n.d(t,{BLANK_URL:()=>c,sanitizeUrl:()=>u});var i=/^([^\w]*)(javascript|data|vbscript)/im,r=/&#(\w+)(^\w|;)?/g,a=/&(newline|tab);/gi,o=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,s=/^.+(:|:)/gim,l=[".","/"],c="about:blank";function u(e){if(!e)return c;var t,n=(t=e,t.replace(o,"").replace(r,function(e,t){return String.fromCharCode(t)})).replace(a,"").replace(o,"").trim();if(!n)return c;if(function(e){return l.indexOf(e[0])>-1}(n))return n;var u=n.match(s);if(!u)return n;var d=u[0];return i.test(d)?c:n}},(e,t,n)=>{n.r(t),n.d(t,{AudioAssetWrapper:()=>p,AudioWrapper:()=>c,CustomFileAssetLoaderWrapper:()=>d,FileAssetWrapper:()=>h,FileFinalizer:()=>a,FontAssetWrapper:()=>m,FontWrapper:()=>u,ImageAssetWrapper:()=>f,ImageWrapper:()=>l,createFinalization:()=>y,finalizationRegistry:()=>b});var i,r=(i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},i(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),a=function(){function e(e){this.selfUnref=!1,this._file=e}return e.prototype.unref=function(){this._file&&this._file.unref()},e}(),o=function(){function e(e){this._finalizableObject=e}return e.prototype.unref=function(){this._finalizableObject.unref()},e}(),s=function(){function e(){this.selfUnref=!1}return e.prototype.unref=function(){},e}(),l=function(e){function t(t){var n=e.call(this)||this;return n._nativeImage=t,n}return r(t,e),Object.defineProperty(t.prototype,"nativeImage",{get:function(){return this._nativeImage}
295,enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeImage.unref()},t}(s),c=function(e){function t(t){var n=e.call(this)||this;return n._nativeAudio=t,n}return r(t,e),Object.defineProperty(t.prototype,"nativeAudio",{get:function(){return this._nativeAudio},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeAudio.unref()},t}(s),u=function(e){function t(t){var n=e.call(this)||this;return n._nativeFont=t,n}return r(t,e),Object.defineProperty(t.prototype,"nativeFont",{get:function(){return this._nativeFont},enumerable:!1,configurable:!0}),t.prototype.unref=function(){this.selfUnref&&this._nativeFont.unref()},t}(s),d=function(){function e(e,t){this._assetLoaderCallback=t,this.assetLoader=new e.CustomFileAssetLoader({loadContents:this.loadContents.bind(this)})}return e.prototype.loadContents=function(e,t){var n;if(e.isImage)n=new f(e);else if(e.isAudio)n=new p(e);else{if(!e.isFont)return!1;n=new m(e)}return this._assetLoaderCallback(n,t)},e}(),h=function(){function e(e){this._nativeFileAsset=e}return e.prototype.decode=function(e){this._nativeFileAsset.decode(e)},Object.defineProperty(e.prototype,"name",{get:function(){return this._nativeFileAsset.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fileExtension",{get:function(){return this._nativeFileAsset.fileExtension},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueFilename",{get:function(){return this._nativeFileAsset.uniqueFilename},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isAudio",{get:function(){return this._nativeFileAsset.isAudio},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isImage",{get:function(){return this._nativeFileAsset.isImage},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isFont",{get:function(){return this._nativeFileAsset.isFont},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cdnUuid",{get:function(){return this._nativeFileAsset.cdnUuid},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nativeFileAsset",{get:function(){return this._nativeFileAsset},enumerable:!1,configurable:!0}),e}(),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.setRenderImage=function(e){this._nativeFileAsset.setRenderImage(e.nativeImage)},t}(h),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.setAudioSource=function(e){this._nativeFileAsset.setAudioSource(e.nativeAudio)},t}(h),m=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r(t,e),t.prototype.setFont=function(e){this._nativeFileAsset.setFont(e.nativeFont)},t}(h),v=function(){function e(e){}return e.prototype.register=function(e){e.selfUnref=!0},e.prototype.unregister=function(e){},e}(),b=new("undefined"!=typeof FinalizationRegistry?FinalizationRegistry:v)(function(e){null==e||e.unref()}),y=function(e,t){var n=new o(t);b.register(e,n)}},(e,t,n)=>{n.r(t),n.d(t,{RiveFont:()=>r});var i=n(3),r=function(){function e(){}return e.setFallbackFontCallback=function(t){e._fallbackFontCallback=null!=t?t:null,e._wireFallbackProc()},e._fontToPtr=function(e){var t;if(null==e)return null;var n=e.nativeFont,i=null===(t=null==n?void 0:n.ptr)||void 0===t?void 0:t.call(n);return null!=i?i:null},e._getFallbackPtr=function(t,n){return n<0||n>=t.length?null:e._fontToPtr(t[n])},e._wireFallbackProc=function(){i.RuntimeLoader.getInstance(function(t){var n=e._fallbackFontCallback;n?t.setFallbackFontCallback(function(t,i,r){var a=n(t,r);return a?Array.isArray(a)?e._getFallbackPtr(a,i):0===i?e._fontToPtr(a):null:null}):t.setFallbackFontCallback(null)})},e._fallbackFontCallback=null,e}()}],t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var a=t[i]={exports:{}};return e[i](a,a.exports,n),a.exports}n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}
295),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{Alignment:()=>r,DataEnum:()=>W,DataType:()=>R,DrawOptimizationOptions:()=>a,EventType:()=>w,Fit:()=>t,Layout:()=>b,LoopType:()=>_,Rive:()=>B,RiveEventType:()=>y,RiveFile:()=>D,RiveFont:()=>c.RiveFont,RuntimeLoader:()=>s.RuntimeLoader,SemanticMode:()=>l.SemanticMode,StateMachineInput:()=>g,StateMachineInputType:()=>v,Testing:()=>ne,ViewModel:()=>V,ViewModelInstance:()=>U,ViewModelInstanceArtboard:()=>Z,ViewModelInstanceAssetFont:()=>J,ViewModelInstanceAssetImage:()=>Q,ViewModelInstanceBoolean:()=>$,ViewModelInstanceColor:()=>K,ViewModelInstanceEnum:()=>X,ViewModelInstanceList:()=>G,ViewModelInstanceNumber:()=>z,ViewModelInstanceString:()=>H,ViewModelInstanceTrigger:()=>Y,ViewModelInstanceValue:()=>q,decodeAudio:()=>ie,decodeFont:()=>ae,decodeImage:()=>re});var e,t,r,a,o=n(1),s=n(3),l=n(6),c=n(10),u=(e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)},function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}),d=function(){return d=Object.assign||function(e){for(var t,n=1,i=arguments.length;n<i;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)},h=function(e,t,n,i){return new(n||(n=Promise))(function(r,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(o,s)}l((i=i.apply(e,t||[])).next())})},f=function(e,t){var n,i,r,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]},o=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return o.next=s(0),o.throw=s(1),o.return=s(2),"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(n=1,i&&(r=2&s[0]?i.return:s[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,s[1])).done)return r;switch(i=0,r&&(s=[2&s[0],r.value]),s[0]){case 0:case 1:r=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,i=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!r||s[1]>r[0]&&s[1]<r[3])){a.label=s[1];break}if(6===s[0]&&a.label<r[1]){a.label=r[1],r=s;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(s);break}r[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(e){s=[6,e],i=0}finally{n=r=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}},p=function(e,t,n){if(n||2===arguments.length)for(var i,r=0,a=t.length;r<a;r++)!i&&r in t||(i||(i=Array.prototype.slice.call(t,0,r)),i[r]=t[r]);return e.concat(i||Array.prototype.slice.call(t))},m=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isHandledError=!0,t}return u(t,e),t}(Error);!function(e){e.Cover="cover",e.Contain="contain",e.Fill="fill",e.FitWidth="fitWidth",e.FitHeight="fitHeight",e.None="none",e.ScaleDown="scaleDown",e.Layout="layout"}(t||(t={})),function(e){e.Center="center",e.TopLeft="topLeft",e.TopCenter="topCenter",e.TopRight="topRight",e.CenterLeft="centerLeft",e.CenterRight="centerRight",e.BottomLeft="bottomLeft",e.BottomCenter="bottomCenter",e.BottomRight="bottomRight"}(r||(r={})),function(e){e.AlwaysDraw="alwaysDraw",e.DrawOnChanged="drawOnChanged"}(a||(a={}));var v,b=function(){function e(e){var n,i,a,o,s,l,c;this.fit=null!==(n=null==e?void 0:e.fit)&&void 0!==n?n:t.Contain,this.alignment=null!==(i=null==e?void 0:e.alignment)&&void 0!==i?i:r.Center,this.layoutScaleFactor=null!==(a=null==e?void 0:e.layoutScaleFactor)&&void 0!==a?a:1,this.minX=null!==(o=null==e?void 0:e.minX)&&void 0!==o?o:0,this.minY=null!==(s=null==e?void 0:e.minY)&&void 0!==s?s:0,this.maxX=null!==(l=null==e?void 0:e.maxX)&&void 0!==l?l:0,this.maxY=null!==(c=null==e?void 0:e.maxY)&&void 0!==c?c:0}return e.new=function(t){var n=t.fit,i=t.alignment,r=t.minX,a=t.minY,o=t.maxX,s=t.maxY;return console.warn("This function is deprecated: please use `new Layout({})` instead"),new e({fit:n,alignment:i,minX:r,minY:a,maxX:o,maxY:s})},e.prototype.copyWith=function(t){var n=t.fit,i=t.alignment,r=t.layoutScaleFactor,a=t.minX,o=t.minY,s=t.maxX,l=t.maxY;return new e({fit:null!=n?n:this.fit,alignment:null!=i?i:this.alignment,layoutScaleFactor:null!=r?r:this.layoutScaleFactor,minX:null!=a?a:this.minX,minY:null!=o?o:this.minY,maxX:null!=s?s:this.maxX,maxY:null!=l?l:this.maxY})},e.prototype.runtimeFit=function(e){return this.cachedRuntimeFit?this.cachedRuntimeFit:(n=this.fit===t.Cover?e.Fit.cover:this.fit===t.Contain?e.Fit.contain:this.fit===t.Fill?e.Fit.fill:this.fit===t.FitWidth?e.Fit.fitWidth:this.fit===t.FitHeight?e.Fit.fitHeight:this.fit===t.ScaleDown?e.Fit.scaleDown:this.fit===t.Layout?e.Fit.layout:e.Fit.none,this.cachedRuntimeFit=n,n);var n},e.prototype.runtimeAlignment=function(e){return this.cachedRuntimeAlignment?this.cachedRuntimeAlignment:(t=this.alignment===r.TopLeft?e.Alignment.topLeft:this.alignment===r.TopCenter?e.Alignment.topCenter:this.alignment===r.TopRight?e.Alignment.topRight:this.alignment===r.CenterLeft?e.Alignment.centerLeft:this.alignment===r.CenterRight?e.Alignment.centerRight:this.alignment===r.BottomLeft?e.Alignment.bottomLeft:this.alignment===r.BottomCenter?e.Alignment.bottomCenter:this.alignment===r.BottomRight?e.Alignment.bottomRight:e.Alignment.center,this.cachedRuntimeAlignment=t,t);var t},e}();!function(e){e[e.Number=56]="Number",e[e.Trigger=58]="Trigger",e[e.Boolean=59]="Boolean"}(v||(v={}));var y,g=function(){function e(e,t){this.type=e,this.runtimeInput=t}return Object.defineProperty(e.prototype,"name",{get:function(){return this.runtimeInput.name}
295,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"value",{get:function(){return this.runtimeInput.value},set:function(e){this.runtimeInput.value=e},enumerable:!1,configurable:!0}),e.prototype.fire=function(){this.type===v.Trigger&&this.runtimeInput.fire()},e.prototype.delete=function(){this.runtimeInput=null},e}();!function(e){e[e.General=128]="General",e[e.OpenUrl=131]="OpenUrl"}(y||(y={}));var w,_,A=function(e){this.isBindableArtboard=!1,this.isBindableArtboard=e},S=function(e){function t(t,n){var i=e.call(this,!1)||this;return i.nativeArtboard=t,i.file=n,i}return u(t,e),t}(A),C=function(e){function t(t){var n=e.call(this,!0)||this;return n.selfUnref=!1,n.nativeArtboard=t,n}return u(t,e),Object.defineProperty(t.prototype,"viewModel",{set:function(e){this.nativeViewModel=e.nativeInstance},enumerable:!1,configurable:!0}),t.prototype.destroy=function(){var e;this.selfUnref&&(this.nativeArtboard.unref(),null===(e=this.nativeViewModel)||void 0===e||e.unref())},t}(A),E=function(){function e(e,t,n,i){this.stateMachine=e,this.playing=n,this.artboard=i,this.inputs=[],this.instance=new t.StateMachineInstance(e,i),this.initInputs(t)}return Object.defineProperty(e.prototype,"hasFocusNodes",{get:function(){return this.instance.hasFocusNodes()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this.stateMachine.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"statesChanged",{get:function(){for(var e=[],t=0;t<this.instance.stateChangedCount();t++)e.push(this.instance.stateChangedNameByIndex(t));return e},enumerable:!1,configurable:!0}),e.prototype.advance=function(e){this.instance.advance(e)},e.prototype.advanceAndApply=function(e){this.instance.advanceAndApply(e)},e.prototype.enableSemantics=function(){this.instance.enableSemantics()},e.prototype.drainSemanticsDiff=function(){return this.instance.drainSemanticsDiff()},e.prototype.fireSemanticAction=function(e,t){this.instance.fireSemanticAction(e,t)},e.prototype.focusSemanticNode=function(e){return this.instance.focusSemanticNode(e)},e.prototype.reportedEventCount=function(){return this.instance.reportedEventCount()},e.prototype.reportedEventAt=function(e){return this.instance.reportedEventAt(e)},e.prototype.initInputs=function(e){for(var t=0;t<this.instance.inputCount();t++){var n=this.instance.input(t);this.inputs.push(this.mapRuntimeInput(n,e))}},e.prototype.mapRuntimeInput=function(e,t){return e.type===t.SMIInput.bool?new g(v.Boolean,e.asBool()):e.type===t.SMIInput.number?new g(v.Number,e.asNumber()):e.type===t.SMIInput.trigger?new g(v.Trigger,e.asTrigger()):void 0},e.prototype.cleanup=function(){this.inputs.forEach(function(e){e.delete()}),this.inputs.length=0,this.instance.delete()},e.prototype.bindViewModelInstance=function(e){null!=e.runtimeInstance&&this.instance.bindViewModelInstance(e.runtimeInstance)},e.prototype.focusState=function(){return this.instance.focusState()},e.prototype.clearFocus=function(){this.instance.clearFocus()},e}(),I=function(){function e(e,t,n,i,r){void 0===i&&(i=[]),void 0===r&&(r=[]),this.runtime=e,this.artboard=t,this.eventManager=n,this.animations=i,this.stateMachines=r}return e.prototype.add=function(e,t,n,i){if(void 0===n&&(n=!0),void 0===i&&(i=!1),0===(e=te(e)).length)this.animations.forEach(function(e){return e.playing=t}),this.stateMachines.forEach(function(e){return e.playing=t});else for(var r=this.animations.map(function(e){return e.name}),a=this.stateMachines.map(function(e){return e.name}),s=0;s<e.length;s++){var l=r.indexOf(e[s]),c=a.indexOf(e[s]);if(l>=0||c>=0)l>=0?this.animations[l].playing=t:this.stateMachines[c].playing=t;else{var u=this.artboard.animationByName(e[s]);if(u){var d=new o.Animation(u,this.artboard,this.runtime,t);d.advance(0),d.apply(1),this.animations.push(d)}else{var h=this.artboard.stateMachineByName(e[s]);if(h){var f=new E(h,this.runtime,t,this.artboard);i&&f.enableSemantics(),this.stateMachines.push(f)}}}}return n&&(t?this.eventManager.fire({type:w.Play,data:this.playing}):this.eventManager.fire({type:w.Pause,data:this.paused})),t?this.playing:this.paused},e.prototype.initLinearAnimations=function(e,t,n){void 0===n&&(n=!1);for(var i=this.animations.map(function(e){return e.name}),r=0;r<e.length;r++){var a=i.indexOf(e[r]);if(a>=0)this.animations[a].playing=t;else{var s=this.artboard.animationByName(e[r]);if(s){var l=new o.Animation(s,this.artboard,this.runtime,t);l.advance(0),l.apply(1),this.animations.push(l)}else{if(n){var c="State Machine with name ".concat(e[r]," not found");
295throw new m(c)}console.error("Animation with name ".concat(e[r]," not found."))}}}},e.prototype.initStateMachines=function(e,t,n){for(var i=this.stateMachines.map(function(e){return e.name}),r=0;r<e.length;r++){var a=i.indexOf(e[r]);if(a>=0)this.stateMachines[a].playing=t;else{var o=this.artboard.stateMachineByName(e[r]);if(o){var s=new E(o,this.runtime,t,this.artboard);n&&s.enableSemantics(),this.stateMachines.push(s)}else console.warn("State Machine with name ".concat(e[r]," not found. Falling back to find an animation with the same name.")),this.initLinearAnimations([e[r]],t,!0)}}},e.prototype.play=function(e){return this.add(e,!0)},e.prototype.advanceIfPaused=function(){this.stateMachines.forEach(function(e){e.playing||e.advanceAndApply(0)})},e.prototype.pause=function(e){return this.add(e,!1)},e.prototype.scrub=function(e,t){var n=this.animations.filter(function(t){return e.includes(t.name)});return n.forEach(function(e){return e.scrubTo=t}),n.map(function(e){return e.name})},Object.defineProperty(e.prototype,"playing",{get:function(){return this.animations.filter(function(e){return e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"paused",{get:function(){return this.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}).concat(this.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}))},enumerable:!1,configurable:!0}),e.prototype.stop=function(e){var t=this,n=[];if(0===(e=te(e)).length)n=this.animations.map(function(e){return e.name}).concat(this.stateMachines.map(function(e){return e.name})),this.animations.forEach(function(e){return e.cleanup()}),this.stateMachines.forEach(function(e){return e.cleanup()}),this.animations.splice(0,this.animations.length),this.stateMachines.splice(0,this.stateMachines.length);else{var i=this.animations.filter(function(t){return e.includes(t.name)});i.forEach(function(e){e.cleanup(),t.animations.splice(t.animations.indexOf(e),1)});var r=this.stateMachines.filter(function(t){return e.includes(t.name)});r.forEach(function(e){e.cleanup(),t.stateMachines.splice(t.stateMachines.indexOf(e),1)}),n=i.map(function(e){return e.name}).concat(r.map(function(e){return e.name}))}return this.eventManager.fire({type:w.Stop,data:n}),n},Object.defineProperty(e.prototype,"isPlaying",{get:function(){return this.animations.reduce(function(e,t){return e||t.playing},!1)||this.stateMachines.reduce(function(e,t){return e||t.playing},!1)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return!this.isPlaying&&(this.animations.length>0||this.stateMachines.length>0)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){return 0===this.animations.length&&0===this.stateMachines.length},enumerable:!1,configurable:!0}),e.prototype.atLeastOne=function(e,t,n){var i;return void 0===t&&(t=!0),void 0===n&&(n=!1),0===this.animations.length&&0===this.stateMachines.length&&(this.artboard.animationCount()>0?this.add([i=this.artboard.animationByIndex(0).name],e,t):this.artboard.stateMachineCount()>0&&this.add([i=this.artboard.stateMachineByIndex(0).name],e,t,n)),i},e.prototype.handleLooping=function(){for(var e=0,t=this.animations.filter(function(e){return e.playing});e<t.length;e++){var n=t[e];0===n.loopValue&&n.loopCount?(n.loopCount=0,this.stop(n.name)):1===n.loopValue&&n.loopCount?(this.eventManager.fire({type:w.Loop,data:{animation:n.name,type:_.Loop}}),n.loopCount=0):2===n.loopValue&&n.loopCount>1&&(this.eventManager.fire({type:w.Loop,data:{animation:n.name,type:_.PingPong}}),n.loopCount=0)}},e.prototype.handleStateChanges=function(){for(var e=[],t=0,n=this.stateMachines.filter(function(e){return e.playing});t<n.length;t++){var i=n[t];e.push.apply(e,i.statesChanged)}e.length>0&&this.eventManager.fire({type:w.StateChange,data:e})},e.prototype.handleAdvancing=function(e){this.eventManager.fire({type:w.Advance,data:e})},e}();
295!function(e){e.Load="load",e.LoadError="loaderror",e.Play="play",e.Pause="pause",e.Stop="stop",e.Loop="loop",e.Draw="draw",e.Advance="advance",e.StateChange="statechange",e.RiveEvent="riveevent",e.AudioStatusChange="audiostatuschange"}(w||(w={})),function(e){e.OneShot="oneshot",e.Loop="loop",e.PingPong="pingpong"}(_||(_={}));var x,M=function(){function e(e){void 0===e&&(e=[]),this.listeners=e}return e.prototype.getListeners=function(e){return this.listeners.filter(function(t){return t.type===e})},e.prototype.add=function(e){this.listeners.includes(e)||this.listeners.push(e)},e.prototype.remove=function(e){for(var t=0;t<this.listeners.length;t++){var n=this.listeners[t];if(n.type===e.type&&n.callback===e.callback){this.listeners.splice(t,1);break}}},e.prototype.removeAll=function(e){var t=this;e?this.listeners.filter(function(t){return t.type===e}).forEach(function(e){return t.remove(e)}):this.listeners.splice(0,this.listeners.length)},e.prototype.fire=function(e){this.getListeners(e.type).forEach(function(t){return t.callback(e)})},e}(),k=function(){function e(e){this.eventManager=e,this.queue=[]}return e.prototype.add=function(e){this.queue.push(e)},e.prototype.process=function(){for(;this.queue.length>0;){var e=this.queue.shift();(null==e?void 0:e.action)&&e.action(),(null==e?void 0:e.event)&&this.eventManager.fire(e.event)}},e}();!function(e){e[e.AVAILABLE=0]="AVAILABLE",e[e.UNAVAILABLE=1]="UNAVAILABLE"}(x||(x={}));var R,F=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._started=!1,t._enabled=!1,t._status=x.UNAVAILABLE,t}return u(t,e),t.prototype.delay=function(e){return h(this,void 0,void 0,function(){return f(this,function(t){return[2,new Promise(function(t){return setTimeout(t,e)})]})})},t.prototype.timeout=function(){return h(this,void 0,void 0,function(){return f(this,function(e){return[2,new Promise(function(e,t){return setTimeout(t,50)})]})})},t.prototype.reportToListeners=function(){this.fire({type:w.AudioStatusChange}),this.removeAll()},t.prototype.enableAudio=function(){return h(this,void 0,void 0,function(){return f(this,function(e){return this._enabled||(this._enabled=!0,this._status=x.AVAILABLE,this.reportToListeners()),[2]})})},t.prototype.testAudio=function(){return h(this,void 0,void 0,function(){return f(this,function(e){switch(e.label){case 0:if(this._status!==x.UNAVAILABLE||null===this._audioContext)return[3,4];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,Promise.race([this._audioContext.resume(),this.timeout()])];case 2:return e.sent(),this.enableAudio(),[3,4];case 3:return e.sent(),[3,4];case 4:return[2]}})})},t.prototype._establishAudio=function(){return h(this,void 0,void 0,function(){return f(this,function(e){switch(e.label){case 0:return this._started?[3,5]:(this._started=!0,"undefined"!=typeof window?[3,1]:(this.enableAudio(),[3,5]));case 1:this._audioContext=new AudioContext,this.listenForUserAction(),e.label=2;case 2:return this._status!==x.UNAVAILABLE?[3,5]:[4,this.testAudio()];case 3:return e.sent(),[4,this.delay(1e3)];case 4:return e.sent(),[3,2];case 5:return[2]}})})},t.prototype.listenForUserAction=function(){var e=this;document.addEventListener("pointerdown",function(){return h(e,void 0,void 0,function(){return f(this,function(e){return this.enableAudio(),[2]})})},{once:!0})},t.prototype.establishAudio=function(){return h(this,void 0,void 0,function(){return f(this,function(e){return this._establishAudio(),[2]})})},Object.defineProperty(t.prototype,"systemVolume",{get:function(){return this._status===x.UNAVAILABLE?(this.testAudio(),0):1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"status",{get:function(){return this._status},enumerable:!1,configurable:!0}),t}(M),L=new F,T=function(){function e(){}return e.prototype.observe=function(){},e.prototype.unobserve=function(){},e.prototype.disconnect=function(){},e}(),P=globalThis.ResizeObserver||T,O=new(function(){function e(){var e=this;this._elementsMap=new Map,this._onObservedEntry=function(t){var n=e._elementsMap.get(t.target);null!==n?n.onResize(0==t.target.clientWidth||0==t.target.clientHeight):e._resizeObserver.unobserve(t.target)},this._onObserved=function(t){t.forEach(e._onObservedEntry)},this._resizeObserver=new P(this._onObserved)}return e.prototype.add=function(e,t){var n={onResize:t,element:e};return this._elementsMap.set(e,n),this._resizeObserver.observe(e),n},e.prototype.remove=function(e){this._resizeObserver.unobserve(e.element),this._elementsMap.delete(e.element)},e}()),j=0,D=function(){function e(e){this.enableRiveAssetCDN=!0,this.enablePerfMarks=!1,this.referenceCount=0,this.destroyed=!1,this.selfUnref=!1,this.bindableArtboards=[],this.src=e.src,this.buffer=e.buffer,e.assetLoader&&(this.assetLoader=e.assetLoader),this.enableRiveAssetCDN="boolean"!=typeof e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.enablePerfMarks=!!e.enablePerfMarks,this.enablePerfMarks&&(s.RuntimeLoader.enablePerfMarks=!0),this.eventManager=new M,e.onLoad&&this.on(w.Load,e.onLoad),e.onLoadError&&this.on(w.LoadError,e.onLoadError)}return e.prototype.releaseFile=function(){var e;this.selfUnref&&(null===(e=this.file)||void 0===e||e.unref()),this.file=null},e.prototype.releaseBindableArtboards=function(){this.bindableArtboards.forEach(function(e){return e.destroy()})},e.prototype.initData=function(){return h(this,void 0,void 0,function(){var t,n,i,r,a,o;return f(this,function(s){switch(s.label){case 0:if(!this.src||this.buffer)return[3,4];s.label=1;case 1:return s.trys.push([1,3,,4]),t=this,[4,ee(this.src)];case 2:return t.buffer=s.sent(),[3,4];case 3:if((n=s.sent())instanceof Error)throw n;
295throw new m(e.fileLoadErrorMessage);case 4:return this.destroyed?[2]:(this.assetLoader&&(r=new c.CustomFileAssetLoaderWrapper(this.runtime,this.assetLoader),i=r.assetLoader),this.enablePerfMarks&&performance.mark("rive:file-load:start"),a=this,[4,this.runtime.load(new Uint8Array(this.buffer),i,this.enableRiveAssetCDN)]);case 5:return a.file=s.sent(),this.enablePerfMarks&&(performance.mark("rive:file-load:end"),performance.measure("rive:file-load","rive:file-load:start","rive:file-load:end")),o=new c.FileFinalizer(this.file),c.finalizationRegistry.register(this,o),this.destroyed?(this.releaseFile(),[2]):(null!==this.file?this.eventManager.fire({type:w.Load,data:this}):this.fireLoadError(e.fileLoadErrorMessage),[2])}})})},e.prototype.loadRiveFileBytes=function(){return h(this,void 0,void 0,function(){var e;return f(this,function(t){return this.enablePerfMarks&&performance.mark("rive:fetch-riv:start"),e=this.src?ee(this.src):Promise.resolve(this.buffer),this.enablePerfMarks&&this.src&&e.then(function(){performance.mark("rive:fetch-riv:end"),performance.measure("rive:fetch-riv","rive:fetch-riv:start","rive:fetch-riv:end")}),[2,e]})})},e.prototype.loadRuntime=function(){return h(this,void 0,void 0,function(){var e;return f(this,function(t){return this.enablePerfMarks&&performance.mark("rive:await-wasm:start"),e=s.RuntimeLoader.awaitInstance(),this.enablePerfMarks&&e.then(function(){performance.mark("rive:await-wasm:end"),performance.measure("rive:await-wasm","rive:await-wasm:start","rive:await-wasm:end")}),[2,e]})})},e.prototype.init=function(){return h(this,void 0,void 0,function(){var t,n,i,r;return f(this,function(a){switch(a.label){case 0:if(!this.src&&!this.buffer)return this.fireLoadError(e.missingErrorMessage),[2];a.label=1;case 1:return a.trys.push([1,4,,5]),[4,Promise.all([this.loadRiveFileBytes(),this.loadRuntime()])];case 2:return t=a.sent(),n=t[0],i=t[1],this.destroyed?[2]:(this.buffer=n,this.runtime=i,this.enablePerfMarks&&performance.mark("rive:init-data:start"),[4,this.initData()]);case 3:return a.sent(),this.enablePerfMarks&&(performance.mark("rive:init-data:end"),performance.measure("rive:init-data","rive:init-data:start","rive:init-data:end")),[3,5];case 4:return r=a.sent(),this.fireLoadError(r instanceof Error?r.message:e.fileLoadErrorMessage),[3,5];case 5:return[2]}})})},e.prototype.fireLoadError=function(e){throw this.eventManager.fire({type:w.LoadError,data:e}),new m(e)},e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.cleanup=function(){this.referenceCount-=1,this.referenceCount<=0&&(this.removeAllRiveEventListeners(),this.releaseFile(),this.releaseBindableArtboards(),this.destroyed=!0)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.getInstance=function(){if(null!==this.file)return this.referenceCount+=1,this.file},e.prototype.destroyIfUnused=function(){this.referenceCount<=0&&this.cleanup()},e.prototype.createBindableArtboard=function(e){if(null!=e){var t=new C(e);return(0,c.createFinalization)(t,t.nativeArtboard),this.bindableArtboards.push(t),t}return null},e.prototype.getArtboard=function(e){var t=this.file.artboardByName(e);if(null!=t)return new S(t,this)},e.prototype.getBindableArtboard=function(e){var t=this.file.bindableArtboardByName(e);return this.createBindableArtboard(t)},e.prototype.getDefaultBindableArtboard=function(){var e=this.file.bindableArtboardDefault();return this.createBindableArtboard(e)},e.prototype.internalBindableArtboardFromArtboard=function(e){var t=this.file.internalBindableArtboardFromArtboard(e);return this.createBindableArtboard(t)},e.prototype.viewModelByName=function(e){var t=this.file.viewModelByName(e);return null!==t?new V(t):null},e.prototype.globalViewModelNames=function(){return this.file.globalViewModelNames()},e.missingErrorMessage="Rive source file or data buffer required",e.fileLoadErrorMessage="The file failed to load",e}(),B=function(){function e(e){var t,n,i,r,o=this;this.loaded=!1,this.destroyed=!1,this._observed=null,this.readyForPlaying=!1,this.artboard=null,this.eventCleanup=null,this._keyboardInteractions=null,this.shouldDisableRiveListeners=!1,this.automaticallyHandleEvents=!1,this.dispatchPointerExit=!0,this.enableMultiTouch=!1,this.enableRiveAssetCDN=!0,this.semanticsMode=l.SemanticMode.Disabled,this.semanticsOptions={riveCanvasLabel:"Rive animation"},this._semanticsActive=!1,this._volume=1,this._artboardWidth=void 0,this._artboardHeight=void 0,this._devicePixelRatioUsed=1,this._hasZeroSize=!1,this._needsRedraw=!1,this._currentCanvasWidth=0,this._currentCanvasHeight=0,this._audioEventListener=null,this._boundDraw=null,this._pageVisibilityHandler=null,this._explicitlyStoppedRendering=!1,this._viewModelInstance=null,this._globalViewModelInstances=new Map,this._dataEnums=null,this._tabIndex=null,this._prevHasFocus=!1,this._focusOptions={allowFocusInterrupt:!1},this._semanticTree=null,this._accessibilityOverlay=null,this._overlayTransformDirty=!0,this._instanceId="".concat(j++),this.drawOptimization=a.DrawOnChanged,this.enablePerfMarks=!1,this.durations=[],this.frameTimes=[],this.frameCount=0,this.isTouchScrollEnabled=!1,this.onCanvasResize=function(e){var t=o._hasZeroSize!==e;o._hasZeroSize=e,e?o._layout.maxX&&o._layout.maxY||o.resizeToCanvas():t&&o.resizeDrawingSurfaceToCanvas()},this.frameRequestId=null,this.renderSecondTimer=0,this._boundDraw=this.draw.bind(this),"undefined"!=typeof document&&(this._pageVisibilityHandler=this._onPageVisibilityChange.bind(this),document.addEventListener("visibilitychange",this._pageVisibilityHandler)),this.canvas=e.canvas,e.canvas.constructor===HTMLCanvasElement&&(this._observed=O.add(this.canvas,this.onCanvasResize)),this._currentCanvasWidth=this.canvas.width,this._currentCanvasHeight=this.canvas.height,this.src=e.src,this.buffer=e.buffer,this.riveFile=e.riveFile,this.layout=null!==(t=e.layout)&&void 0!==t?t:new b,this.shouldDisableRiveListeners=!!e.shouldDisableRiveListeners,this.isTouchScrollEnabled=!!e.isTouchScrollEnabled,this.automaticallyHandleEvents=!!e.automaticallyHandleEvents,this.dispatchPointerExit=!1===e.dispatchPointerExit?e.dispatchPointerExit:this.dispatchPointerExit,this.enableMultiTouch=!!e.enableMultiTouch,this.drawOptimization=null!==(n=e.drawingOptions)&&void 0!==n?n:this.drawOptimization,this.enableRiveAssetCDN=void 0===e.enableRiveAssetCDN||e.enableRiveAssetCDN,this.enablePerfMarks=!!e.enablePerfMarks,this.enablePerfMarks&&(s.RuntimeLoader.enablePerfMarks=!0),this._focusOptions=null!==(i=e.focusOptions)&&void 0!==i?i:this._focusOptions,this._tabIndex=null!==(r=e.tabIndex)&&void 0!==r?r:null,this.eventManager=new M,e.onLoad&&this.on(w.Load,e.onLoad),e.onLoadError&&this.on(w.LoadError,e.onLoadError),e.onPlay&&this.on(w.Play,e.onPlay),e.onPause&&this.on(w.Pause,e.onPause),e.onStop&&this.on(w.Stop,e.onStop),e.onLoop&&this.on(w.Lo
295op,e.onLoop),e.onStateChange&&this.on(w.StateChange,e.onStateChange),e.onAdvance&&this.on(w.Advance,e.onAdvance),e.onload&&!e.onLoad&&this.on(w.Load,e.onload),e.onloaderror&&!e.onLoadError&&this.on(w.LoadError,e.onloaderror),e.onplay&&!e.onPlay&&this.on(w.Play,e.onplay),e.onpause&&!e.onPause&&this.on(w.Pause,e.onpause),e.onstop&&!e.onStop&&this.on(w.Stop,e.onstop),e.onloop&&!e.onLoop&&this.on(w.Loop,e.onloop),e.onstatechange&&!e.onStateChange&&this.on(w.StateChange,e.onstatechange),e.assetLoader&&(this.assetLoader=e.assetLoader),this.taskQueue=new k(this.eventManager),this.init({src:this.src,buffer:this.buffer,riveFile:this.riveFile,autoplay:e.autoplay,autoBind:e.autoBind,animations:e.animations,stateMachines:e.stateMachines,artboard:e.artboard,useOffscreenRenderer:e.useOffscreenRenderer,tabIndex:e.tabIndex,semanticsMode:e.semanticsMode,semanticsOptions:e.semanticsOptions})}return Object.defineProperty(e.prototype,"viewModelCount",{get:function(){return this.file.viewModelCount()},enumerable:!1,configurable:!0}),e.new=function(t){return console.warn("This function is deprecated: please use `new Rive({})` instead"),new e(t)},e.prototype.enableSemantics=function(){this.semanticsMode=l.SemanticMode.Enabled,this.activateSemantics()},e.prototype.activateSemantics=function(){this._semanticsActive||this.semanticsMode===l.SemanticMode.Disabled||(this._semanticsActive=!0,this.syncSemanticsOnStateMachines())},e.prototype.syncSemanticsOnStateMachines=function(){if(this._semanticsActive&&this.animator)for(var e=0,t=this.animator.stateMachines;e<t.length;e++)t[e].enableSemantics()},e.prototype.cleanupSemantics=function(){this._semanticTree=null,this._accessibilityOverlay&&(this._accessibilityOverlay.destroy(),this._accessibilityOverlay=null)},e.prototype.onSystemAudioChanged=function(){this.volume=this._volume},e.prototype.init=function(t){var n=this,i=t.src,r=t.buffer,a=t.riveFile,o=t.animations,c=t.stateMachines,u=t.artboard,d=t.autoplay,h=void 0!==d&&d,f=t.useOffscreenRenderer,p=void 0!==f&&f,v=t.autoBind,b=void 0!==v&&v,y=t.tabIndex,g=t.semanticsMode,_=t.semanticsOptions;if(!this.destroyed){if(this.src=i,this.buffer=r,this.riveFile=a,this._tabIndex=null!=y?y:null,this.semanticsMode=null!=g?g:l.SemanticMode.Disabled,this.semanticsOptions=null!=_?_:this.semanticsOptions,!this.src&&!this.buffer&&!this.riveFile)throw new m(e.missingErrorMessage);var A=te(o),S=te(c);this.loaded=!1,this.readyForPlaying=!1,s.RuntimeLoader.awaitInstance().then(function(e){if(!n.destroyed){n.runtime=e,n.removeRiveListeners(),n.cleanupSemantics(),n.deleteRiveRenderer(),n.enablePerfMarks&&performance.mark("rive:make-renderer:start");try{if(n.renderer=n.runtime.makeRenderer(n.canvas,p),!n.renderer)throw new Error("Renderer is null, cannot render Rive on the canvas.")}catch(e){throw console.error(e),new m("Unable to create the renderer, your environment may not support WebGL. Try the @rive-app/canvas runtime as an alternative.")}n.enablePerfMarks&&(performance.mark("rive:make-renderer:end"),performance.measure("rive:make-renderer","rive:make-renderer:start","rive:make-renderer:end")),n.canvas.width||n.canvas.height||n.resizeDrawingSurfaceToCanvas(),n.initData(u,A,S,h,b).then(function(e){if(e)return n.setupRiveListeners()}).catch(function(e){console.error(e)})}}).catch(function(e){n.eventManager.fire({type:w.LoadError,data:e.message})})}},e.prototype.setupRiveListeners=function(e){var t=this;if(this.eventCleanup&&this.eventCleanup(),this.cleanupKeyboardInteractions(),!this.shouldDisableRiveListeners){var n=this.animator.stateMachines.filter(function(e){return e.playing}).filter(function(e){return t.runtime.hasListeners(e.instance)}).map(function(e){return e.instance}),i=this.isTouchScrollEnabled,r=this.dispatchPointerExit,a=this.enableMultiTouch;e&&"isTouchScrollEnabled"in e&&(i=e.isTouchScrollEnabled),this.eventCleanup=(0,c.registerTouchInteractions)({canvas:this.canvas,artboard:this.artboard,stateMachines:n,renderer:this.renderer,rive:this.runtime,fit:this._layout.runtimeFit(this.runtime),alignment:this._layout.runtimeAlignment(this.runtime),isTouchScrollEnabled:i,dispatchPointerExit:r,enableMultiTouch:a,layoutScaleFactor:this._layout.layoutScaleFactor,advanceAndDrain:this.advanceAndReportChanges.bind(this)}),this.ensureKeyboardInteractions()}},e.prototype.ensureKeyboardInteractions=function(){var e=this;if(!this._keyboardInteractions&&!this.shouldDisableRiveListeners&&"undefined"!=typeof window&&this.canvas instanceof HTMLCanvasElement){var t=this.animator.stateMachines.find(function(e){return e.playing&&e.hasFocusNodes});if(t){var n=this.canvas.tabIndex;(-1===n||isNaN(n))&&(this.canvas.tabIndex=null!==this._tabIndex?this._tabIndex:0),this._keyboardInteractions=new c.KeyboardInteractions({canvas:this.canvas,stateMachine:t.instance,hasFocusNodes:!0,getOverlayElement:function(){var t,n;return null!==(n=null===(t=e._accessibilityOverlay)||void 0===t?void 0:t.getSemanticOverlayContainer())&&void 0!==n?n:null}})}}},e.prototype.cleanupKeyboardInteractions=function(){this._keyboardInteractions&&(this._keyboardInteractions.cleanup(),this._keyboardInteractions=null)},e.prototype.removeRiveListeners=function(){this.eventCleanup&&(this.eventCleanup(),this.eventCleanup=null),this.cleanupKeyboardInteractions()},e.prototype.initializeAudio=function(){var e,t=this;L.status==x.UNAVAILABLE&&(this.file.hasAudio||(null===(e=this.artboard)||void 0===e?void 0:e.hasAudio)&&null===this._audioEventListener)&&(this._audioEventListener={type:w.AudioStatusChange,callback:function(){return t.onSystemAudioChanged()}},L.add(this._audioEventListener),L.establishAudio())},e.prototype.initArtboardSize=function(){this.artboard&&(this._artboardWidth=this.artboard.width=this._artboardWidth||this.artboard.width,this._artboardHeight=this.artboard.height=this._artboardHeight||this.artboard.height)},e.prototype.initData=function(e,t,n,i,r){return h(this,void 0,void 0,function(){var a,o,s,c;return f(this,function(u){switch(u.label){case 0:return u.trys.push([0,3,,4]),null!=this.riveFile?[3,2]:(a=new D({src:this.src,buffer:this.buffer,enableRiveAssetCDN:this.enableRiveAssetCDN,assetLoader:this.assetLoader,enablePerfMarks:this.enablePerfMarks}),this.riveFile=a,[4,a.init()]);case 1:if(u.sent(),this.destroyed)return a.destroyIfUnused(),[2,!1];u.label=2;case 2:this.file=this.riveFile.getInstance(),this.initArtboard(e,t,n,i,r),this.initArtboardSize(),this.initializeAudio(),this.semanticsMode===l.SemanticMode.Enabled?this.activateSemantics():this._semanticsActive&&this.syncSemanticsOnStateMachines();try{this.loaded=!0,this.eventManager.fire({type:w.Load,data:null!==(c=this.src)&&void 0!==c?c:"buffer"})}catch(e){console.error(e)}return this.animator.advanceIfPaused(),this.readyForPlaying=!0,this.taskQueue.process(),this.drawFrame(),[2,!0];case 3:return o=u.sent(),s=(d=o)&&d.isHandledError?d.message:"Problem loading file; may be corrupt!",this.eventManager.fire({type:w.LoadError,data:s}),[2,Promise.reject(s)];case 4:return[2]}var d})})},e.prototype.initArtboard=function(e,t,n,i,r){if(this.file){var a,o=e?this.file.artboardByName(e):this.file.defaultArtboard();
295if(!o)throw new m("Invalid artboard name or no default artboard");if(this.artboard=o,o.volume=this._volume*L.systemVolume,this.animator=new I(this.runtime,this.artboard,this.eventManager),t.length>0||n.length>0?(a=t.concat(n),this.animator.initLinearAnimations(t,i),this.animator.initStateMachines(n,i,this._semanticsActive)):a=[this.animator.atLeastOne(i,!1,this._semanticsActive)],this.taskQueue.add({event:{type:i?w.Play:w.Pause,data:a}}),r){var s=this.file.defaultArtboardViewModel(o);if(null!==s){var l=s.defaultInstance();if(null!==l){var u=new U(l,null);(0,c.createFinalization)(u,u.runtimeInstance),this.setViewModelInstance(u)}}for(var d=0,h=this.file.globalViewModelNames();d<h.length;d++){var f=h[d],p=this.file.viewModelByName(f);if(null!==p){var v=new V(p).defaultInstance();null!==v&&this.setGlobalViewModelInstance(f,v)}}this.bind()}}},e.prototype.drawFrame=function(){var e,t;(null===(e=null===document||void 0===document?void 0:document.timeline)||void 0===e?void 0:e.currentTime)?this.loaded&&this.artboard&&!this.frameRequestId&&(this._boundDraw(document.timeline.currentTime),null===(t=this.runtime)||void 0===t||t.resolveAnimationFrame()):this.scheduleRendering()},e.prototype._canvasSizeChanged=function(){var e=!1;return this.canvas&&(this.canvas.width!==this._currentCanvasWidth&&(this._currentCanvasWidth=this.canvas.width,e=!0),this.canvas.height!==this._currentCanvasHeight&&(this._currentCanvasHeight=this.canvas.height,e=!0)),e},e.prototype.pollFocusState=function(){var e,t;if(this.ensureKeyboardInteractions(),this._keyboardInteractions){var n=this.animator.stateMachines.find(function(e){return e.playing&&e.hasFocusNodes});if(n){if(this.canvas instanceof HTMLCanvasElement){if(n.focusState().hasFocus){if(this._keyboardInteractions.notifyRiveFocused(),!this._prevHasFocus){var i=null===(e=this._accessibilityOverlay)||void 0===e?void 0:e.getSemanticOverlayContainer();!(document.activeElement===this.canvas||null!==(t=null==i?void 0:i.contains(document.activeElement))&&void 0!==t&&t)&&this._focusOptions.allowFocusInterrupt&&this.canvas.focus(),this._prevHasFocus=!0}return}this._prevHasFocus=!1,this._keyboardInteractions.focusSessionState===c.FocusSessionState.RiveFocused&&this._keyboardInteractions.setFocusSessionState(c.FocusSessionState.NotFocused)}}else this._prevHasFocus=!1}else this._prevHasFocus=!1},e.prototype.advanceAndReportChanges=function(e){for(var t,n,i=0,r=this.animator.animations.filter(function(e){return e.playing||e.needsScrub}).sort(function(e){return e.needsScrub?-1:1});i<r.length;i++){var a=r[i];a.advance(e),a.instance.didLoop&&(a.loopCount+=1),a.apply(1)}for(var o=this.animator.stateMachines.filter(function(e){return e.playing}),s=this.enablePerfMarks&&this.frameCount<3?this.frameCount:-1,u=0,d=o;u<d.length;u++){var h=d[u],f=h.reportedEventCount();if(f)for(var p=0;p<f;p++){var m=h.reportedEventAt(p);if(m)if(m.type===y.OpenUrl){if(this.eventManager.fire({type:w.RiveEvent,data:m}),this.automaticallyHandleEvents){var v=document.createElement("a"),b=m,g=b.url,_=b.target,A=(0,c.sanitizeUrl)(g);g&&v.setAttribute("href",A),_&&v.setAttribute("target",_),A&&A!==c.BLANK_URL&&v.click()}}else this.eventManager.fire({type:w.RiveEvent,data:m})}if(s>=0&&performance.mark("rive:sm-advance:start:f".concat(s)),h.advanceAndApply(e),s>=0&&(performance.mark("rive:sm-advance:end:f".concat(s)),performance.measure("rive:sm-advance:f".concat(s),"rive:sm-advance:start:f".concat(s),"rive:sm-advance:end:f".concat(s))),this._semanticsActive){var S=h.drainSemanticsDiff();S&&(this._semanticTree||(this._semanticTree=new l.SemanticTreeModel),this._semanticTree.applyDiff(S))}}if(this._semanticsActive&&this._semanticTree&&o.length>0&&this.canvas instanceof HTMLCanvasElement){if(!this._accessibilityOverlay){var C=o[0];this._accessibilityOverlay=new l.AccessibilityOverlay({canvas:this.canvas,instanceId:this._instanceId,semanticsOptions:this.semanticsOptions,allowFocusInterrupt:this._focusOptions.allowFocusInterrupt,fireAction:function(e,t){C.fireSemanticAction(e,t)},requestFocus:function(e){return C.focusSemanticNode(e)},clearFocus:function(){return C.instance.clearFocus()}})}var E=null===(t=this._accessibilityOverlay)||void 0===t?void 0:t.needsUpdate(this._semanticTree);if(E||this._overlayTransformDirty){var I=null;if((null==E?void 0:E.layoutChanged)||this._overlayTransformDirty){var x=this._layout.runtimeFit(this.runtime),M=this._layout.runtimeAlignment(this.runtime);I=this.runtime.computeAlignment(x,M,{minX:this._layout.minX,minY:this._layout.minY,maxX:this._layout.maxX,maxY:this._layout.maxY},this.artboard.bounds,this._devicePixelRatioUsed*this._layout.layoutScaleFactor),this._overlayTransformDirty=!1}this._accessibilityOverlay.update(this._semanticTree,I,this._devicePixelRatioUsed,this.artboard.bounds,E),null==I||I.delete()}}0==this.animator.stateMachines.length&&this.artboard.advance(e),this.animator.handleLooping(),this.animator.handleStateChanges(),this.animator.handleAdvancing(e),this.pollFocusState(),null===(n=this._viewModelInstance)||void 0===n||n.handleCallbacks(),this._globalViewModelInstances.forEac
295h(function(e){e&&e.handleCallbacks()})},e.prototype.draw=function(e,t){this.frameRequestId=null;var n=performance.now(),i=this.enablePerfMarks&&this.frameCount<3?this.frameCount:-1;this.lastRenderTime||(this.lastRenderTime=e),this.renderSecondTimer+=e-this.lastRenderTime,this.renderSecondTimer>5e3&&(this.renderSecondTimer=0,null==t||t());var r=(e-this.lastRenderTime)/1e3;this.lastRenderTime=e,this.advanceAndReportChanges(r);var o=this.renderer;this._hasZeroSize||(this.drawOptimization==a.AlwaysDraw||this.artboard.didChange()||this._needsRedraw||this._canvasSizeChanged())&&(o.clear(),o.save(),i>=0&&performance.mark("rive:align-renderer:start:f".concat(i)),this.alignRenderer(),i>=0&&(performance.mark("rive:align-renderer:end:f".concat(i)),performance.measure("rive:align-renderer:f".concat(i),"rive:align-renderer:start:f".concat(i),"rive:align-renderer:end:f".concat(i))),i>=0&&performance.mark("rive:artboard-draw:start:f".concat(i)),this.artboard.draw(o),i>=0&&(performance.mark("rive:artboard-draw:end:f".concat(i)),performance.measure("rive:artboard-draw:f".concat(i),"rive:artboard-draw:start:f".concat(i),"rive:artboard-draw:end:f".concat(i))),o.restore(),i>=0&&performance.mark("rive:renderer-flush:start:f".concat(i)),o.flush(),i>=0&&(performance.mark("rive:renderer-flush:end:f".concat(i)),performance.measure("rive:renderer-flush:f".concat(i),"rive:renderer-flush:start:f".concat(i),"rive:renderer-flush:end:f".concat(i))),this._needsRedraw=!1),this.frameCount++;var s=performance.now();for(this.frameTimes.push(s),this.durations.push(s-n);this.frameTimes[0]<=s-1e3;)this.frameTimes.shift(),this.durations.shift();this.animator.isPlaying?this.scheduleRendering():(this.animator.isPaused||this.animator.isStopped)&&(this.lastRenderTime=0)},e.prototype.alignRenderer=function(){var e=this,t=e.renderer,n=e.runtime,i=e._layout,r=e.artboard;t.align(i.runtimeFit(n),i.runtimeAlignment(n),{minX:i.minX,minY:i.minY,maxX:i.maxX,maxY:i.maxY},r.bounds,this._devicePixelRatioUsed*i.layoutScaleFactor)},Object.defineProperty(e.prototype,"fps",{get:function(){return this.durations.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameTime",{get:function(){return 0===this.durations.length?0:(this.durations.reduce(function(e,t){return e+t},0)/this.durations.length).toFixed(4)},enumerable:!1,configurable:!0}),e.prototype.cleanup=function(){var e,t,n,i;this.destroyed=!0,this.stopRendering(),null===(t=null===(e=this.renderer)||void 0===e?void 0:e.bindContext)||void 0===t||t.call(e),this.cleanupInstances(),null!==this._observed&&O.remove(this._observed),this.removeRiveListeners(),this.file&&(null===(n=this.riveFile)||void 0===n||n.cleanup(),this.file=null),this.riveFile=null,this.deleteRiveRenderer(),null!==this._audioEventListener&&(L.remove(this._audioEventListener),this._audioEventListener=null),this._pageVisibilityHandler&&(document.removeEventListener("visibilitychange",this._pageVisibilityHandler),this._pageVisibilityHandler=null),null===(i=this._viewModelInstance)||void 0===i||i.cleanup(),this._viewModelInstance=null,this._globalViewModelInstances.forEach(function(e){return e.cleanup()}),this._globalViewModelInstances.clear(),this._dataEnums=null},e.prototype.deleteRiveRenderer=function(){var e;null===(e=this.renderer)||void 0===e||e.delete(),this.renderer=null},e.prototype.cleanupInstances=function(){null!==this.eventCleanup&&this.eventCleanup(),this.cleanupKeyboardInteractions(),this.cleanupSemantics(),this.stop(),this.artboard&&(this.artboard.delete(),this.artboard=null)},e.prototype.retrieveTextRun=function(e){var t;if(e)if(this.artboard){var n=this.artboard.textRun(e);if(n)return n;console.warn("Could not access a text run with name '".concat(e,"' in the '").concat(null===(t=this.artboard)||void 0===t?void 0:t.name,"' Artboard. Note that you must rename a text run node in the Rive editor to make it queryable at runtime."))}else console.warn("Tried to access text run, but the Artboard is null");else console.warn("No text run name provided")},e.prototype.getTextRunValue=function(e){var t=this.retrieveTextRun(e);return t?t.text:void 0},e.prototype.setTextRunValue=function(e,t){var n=this.retrieveTextRun(e);n&&(n.text=t)},e.prototype.play=function(e,t){var n=this;e=te(e),this.readyForPlaying?(this.animator.play(e),this.syncSemanticsOnStateMachines(),this.eventCleanup&&this.eventCleanup(),this.cleanupKeyboardInteractions(),this.setupRiveListeners(),this.startRendering()):this.taskQueue.add({action:function(){return n.play(e,t)}})},e.prototype.pause=function(e){var t=this;e=te(e),this.readyForPlaying?(this.eventCleanup&&this.eventCleanup(),this.cleanupKeyboardInteractions(),this.animator.pause(e)):this.taskQueue.add({action:function(){return t.pause(e)}})},e.prototype.scrub=function(e,t){var n=this;e=te(e),this.readyForPlaying?(this.animator.scrub(e,t||0),this.drawFrame()):this.taskQueue.add({action:function(){return n.scrub(e,t)}})},e.prototype.stop=function(e){var t=this;e=te(e),this.readyForPlaying?(this.animator&&this.animator.stop(e),this.eventCleanup&&this.eventCleanup(),this.cleanupKeyboardInteractions(),this.cleanupSemantics()):this.taskQueue.add({action:function(){return t.stop(e)}})},e.prototype.reset=function(e){var t,n,i=null==e?void 0:e.artboard,r=te(null==e?void 0:e.animations),a=te(null==e?void 0:e.stateMachines),o=null!==(t=null==e?void 0:e.autoplay)&&void 0!==t&&t,s=null!==(n=null==e?void 0:e.autoBind)&&void 0!==n&&n;this.cleanupInstances(),this.initArtboard(i,r,a,o,s),this.taskQueue.process()},e.prototype.load=function(e){this.file=null,this.stop(),this.init(e)},Object.defineProperty(e.prototype,"layout",{get:function(){return this._layout},set:function(e){this._layout=e,this._overlayTransformDirty=!0,e.maxX&&e.maxY||this.resizeToCanvas(),this.loaded&&!this.animator.isPlaying&&this.drawFrame()}
295,enumerable:!1,configurable:!0}),e.prototype.resizeToCanvas=function(){this._layout=this.layout.copyWith({minX:0,minY:0,maxX:this.canvas.width,maxY:this.canvas.height}),this._overlayTransformDirty=!0},e.prototype.resizeDrawingSurfaceToCanvas=function(e){if(this.canvas instanceof HTMLCanvasElement&&window){var n=this.canvas.getBoundingClientRect(),i=n.width,r=n.height,a=e||window.devicePixelRatio||1;if(this.devicePixelRatioUsed=a,this.canvas.width=a*i,this.canvas.height=a*r,this._needsRedraw=!0,this.resizeToCanvas(),this.layout.fit===t.Layout){var o=this._layout.layoutScaleFactor;this.artboard.width=i/o,this.artboard.height=r/o}this.drawFrame()}},Object.defineProperty(e.prototype,"source",{get:function(){return this.src},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"activeArtboard",{get:function(){return this.artboard?this.artboard.name:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"semanticTree",{get:function(){return this._semanticTree},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"accessibilityOverlay",{get:function(){return this._accessibilityOverlay},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"animationNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.animationCount();t++)e.push(this.artboard.animationByIndex(t).name);return e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stateMachineNames",{get:function(){if(!this.loaded||!this.artboard)return[];for(var e=[],t=0;t<this.artboard.stateMachineCount();t++)e.push(this.artboard.stateMachineByIndex(t).name);return e},enumerable:!1,configurable:!0}),e.prototype.stateMachineInputs=function(e){if(this.loaded){var t=this.animator.stateMachines.find(function(t){return t.name===e});return null==t?void 0:t.inputs}},e.prototype.retrieveInputAtPath=function(e,t){if(e)if(this.artboard){var n=this.artboard.inputByPath(e,t);if(n)return n;console.warn("Could not access an input with name: '".concat(e,"', at path:'").concat(t,"'"))}else console.warn("Tried to access input: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));else console.warn("No input name provided for path '".concat(t,"'"))},e.prototype.setBooleanStateAtPath=function(e,t,n){var i=this.retrieveInputAtPath(e,n);i&&(i.type===v.Boolean?i.asBool().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(n,"' is not a boolean")))},e.prototype.setNumberStateAtPath=function(e,t,n){var i=this.retrieveInputAtPath(e,n);i&&(i.type===v.Number?i.asNumber().value=t:console.warn("Input with name: '".concat(e,"', at path:'").concat(n,"' is not a number")))},e.prototype.fireStateAtPath=function(e,t){var n=this.retrieveInputAtPath(e,t);n&&(n.type===v.Trigger?n.asTrigger().fire():console.warn("Input with name: '".concat(e,"', at path:'").concat(t,"' is not a trigger")))},e.prototype.retrieveTextAtPath=function(e,t){if(e)if(t)if(this.artboard){var n=this.artboard.textByPath(e,t);if(n)return n;console.warn("Could not access text with name: '".concat(e,"', at path:'").concat(t,"'"))}else console.warn("Tried to access text: '".concat(e,"', at path: '").concat(t,"', but the Artboard is null"));else console.warn("No path provided for text '".concat(e,"'"));else console.warn("No text name provided for path '".concat(t,"'"))},e.prototype.getTextRunValueAtPath=function(e,t){var n=this.retrieveTextAtPath(e,t);if(n)return n.text;console.warn("Could not get text with name: '".concat(e,"', at path:'").concat(t,"'"))},e.prototype.setTextRunValueAtPath=function(e,t,n){var i=this.retrieveTextAtPath(e,n);i?i.text=t:console.warn("Could not set text with name: '".concat(e,"', at path:'").concat(n,"'"))},Object.defineProperty(e.prototype,"playingStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"playingAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return e.playing}).map(function(e){return e.name}):[]}
295,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pausedAnimationNames",{get:function(){return this.loaded?this.animator.animations.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pausedStateMachineNames",{get:function(){return this.loaded?this.animator.stateMachines.filter(function(e){return!e.playing}).map(function(e){return e.name}):[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPlaying",{get:function(){return this.animator.isPlaying},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isPaused",{get:function(){return this.animator.isPaused},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isStopped",{get:function(){var e,t;return null===(t=null===(e=this.animator)||void 0===e?void 0:e.isStopped)||void 0===t||t},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"bounds",{get:function(){return this.artboard?this.artboard.bounds:void 0},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t){this.eventManager.add({type:e,callback:t})},e.prototype.off=function(e,t){this.eventManager.remove({type:e,callback:t})},e.prototype.unsubscribe=function(e,t){console.warn("This function is deprecated: please use `off()` instead."),this.off(e,t)},e.prototype.removeAllRiveEventListeners=function(e){this.eventManager.removeAll(e)},e.prototype.unsubscribeAll=function(e){console.warn("This function is deprecated: please use `removeAllRiveEventListeners()` instead."),this.removeAllRiveEventListeners(e)},e.prototype.stopRendering=function(){this._explicitlyStoppedRendering=!0,this.loaded&&this.frameRequestId&&(this.runtime.cancelAnimationFrame?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null)},e.prototype.startRendering=function(){this._explicitlyStoppedRendering=!1,this.drawFrame()},e.prototype.scheduleRendering=function(){this.loaded&&this.artboard&&!this.frameRequestId&&(this.runtime.requestAnimationFrame?this.frameRequestId=this.runtime.requestAnimationFrame(this._boundDraw):this.frameRequestId=requestAnimationFrame(this._boundDraw))},e.prototype._onPageVisibilityChange=function(){var e,t;document.hidden?(null!==this.frameRequestId&&((null===(e=this.runtime)||void 0===e?void 0:e.cancelAnimationFrame)?this.runtime.cancelAnimationFrame(this.frameRequestId):cancelAnimationFrame(this.frameRequestId),this.frameRequestId=null),this.lastRenderTime=0):(null===(t=this.animator)||void 0===t?void 0:t.isPlaying)&&!this._explicitlyStoppedRendering&&this.scheduleRendering()},e.prototype.enableFPSCounter=function(e){this.runtime.enableFPSCounter(e)},e.prototype.disableFPSCounter=function(){this.runtime.disableFPSCounter()},Object.defineProperty(e.prototype,"contents",{get:function(){if(this.loaded){for(var e={artboards:[]},t=0;t<this.file.artboardCount();t++){for(var n=this.file.artboardByIndex(t),i={name:n.name,animations:[],stateMachines:[]},r=0;r<n.animationCount();r++){var a=n.animationByIndex(r);i.animations.push(a.name)}for(var o=0;o<n.stateMachineCount();o++){for(var s=n.stateMachineByIndex(o),l=s.name,c=new this.runtime.StateMachineInstance(s,n),u=[],d=0;d<c.inputCount();d++){var h=c.input(d);u.push({name:h.name,type:h.type})}i.stateMachines.push({name:l,inputs:u})}e.artboards.push(i)}return e}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"volume",{get:function(){return this.artboard&&this.artboard.volume!==this._volume&&(this._volume=this.artboard.volume),this._volume},set:function(e){this._volume=e,this.artboard&&(this.artboard.volume=e*L.systemVolume)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardWidth",{get:function(){var e;return this.artboard?this.artboard.width:null!==(e=this._artboardWidth)&&void 0!==e?e:0},set:function(e){this._artboardWidth=e,this.artboard&&(this.artboard.width=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"artboardHeight",{get:function(){var e;return this.artboard?this.artboard.height:null!==(e=this._artboardHeight)&&void 0!==e?e:0}
295,set:function(e){this._artboardHeight=e,this.artboard&&(this.artboard.height=e)},enumerable:!1,configurable:!0}),e.prototype.resetArtboardSize=function(){this.artboard?(this.artboard.resetArtboardSize(),this._artboardWidth=this.artboard.width,this._artboardHeight=this.artboard.height):(this._artboardWidth=void 0,this._artboardHeight=void 0)},Object.defineProperty(e.prototype,"devicePixelRatioUsed",{get:function(){return this._devicePixelRatioUsed},set:function(e){e!==this._devicePixelRatioUsed&&(this._overlayTransformDirty=!0),this._devicePixelRatioUsed=e},enumerable:!1,configurable:!0}),e.prototype.bindViewModelInstance=function(e){e&&(this.setViewModelInstance(e),this.bind())},e.prototype.setViewModelInstance=function(e){var t,n=null==e?void 0:e.runtimeInstance;this.artboard&&!this.destroyed&&e&&n&&(e.internalIncrementReferenceCount(),null===(t=this._viewModelInstance)||void 0===t||t.cleanup(),this._viewModelInstance=e,this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(e){return e.instance.setViewModelInstance(n)}):this.artboard.setViewModelInstance(n))},e.prototype.bind=function(){this.artboard&&!this.destroyed&&(this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(e){return e.instance.bind()}):this.artboard.bind())},Object.defineProperty(e.prototype,"viewModelInstance",{get:function(){return this._viewModelInstance},enumerable:!1,configurable:!0}),e.prototype.setGlobalViewModelInstance=function(e,t){var n,i=null==t?void 0:t.runtimeInstance;if(!this.artboard||this.destroyed||!i)return!1;var r=!1;return this.animator.stateMachines.length>0?this.animator.stateMachines.forEach(function(t){t.instance.setGlobalViewModelInstance(e,i)&&(r=!0)}):r=this.artboard.setGlobalViewModelInstance(e,i),r&&(t.internalIncrementReferenceCount(),null===(n=this._globalViewModelInstances.get(e))||void 0===n||n.cleanup(),this._globalViewModelInstances.set(e,t)),r},e.prototype.globalViewModelInstance=function(e){var t=this._globalViewModelInstances.get(e);if(t)return t;if(!this.artboard||this.destroyed)return null;var n=this.animator.stateMachines.length>0?this.animator.stateMachines[0].instance.globalViewModelInstance(e):this.artboard.globalViewModelInstance(e);if(null===n)return null;var i=new U(n,null);return(0,c.createFinalization)(i,n),i.internalIncrementReferenceCount(),this._globalViewModelInstances.set(e,i),i},e.prototype.globalViewModelNames=function(){var e,t;return null!==(t=null===(e=this.file)||void 0===e?void 0:e.globalViewModelNames())&&void 0!==t?t:[]},e.prototype.viewModelByIndex=function(e){var t=this.file.viewModelByIndex(e);return null!==t?new V(t):null},e.prototype.viewModelByName=function(e){var t;return null===(t=this.riveFile)||void 0===t?void 0:t.viewModelByName(e)},e.prototype.enums=function(){if(null===this._dataEnums){var e=this.file.enums();this._dataEnums=e.map(function(e){return new W(e)})}return this._dataEnums},e.prototype.defaultViewModel=function(){if(this.artboard){var e=this.file.defaultArtboardViewModel(this.artboard);if(e)return new V(e)}return null},e.prototype.getArtboard=function(e){var t,n;return null!==(n=null===(t=this.riveFile)||void 0===t?void 0:t.getArtboard(e))&&void 0!==n?n:null},e.prototype.getBindableArtboard=function(e){var t,n;return null!==(n=null===(t=this.riveFile)||void 0===t?void 0:t.getBindableArtboard(e))&&void 0!==n?n:null},e.prototype.getDefaultBindableArtboard=function(){var e,t;return null!==(t=null===(e=this.riveFile)||void 0===e?void 0:e.getDefaultBindableArtboard())&&void 0!==t?t:null},e.prototype.clearFocus=function(){this.animator.stateMachines.filter(function(e){return e.playing&&e.hasFocusNodes}).forEach(function(e){return e.clearFocus()})},e.missingErrorMessage="Rive source file or data buffer required",e.cleanupErrorMessage="Attempt to use file after calling cleanup.",e}();!function(e){e.none="none",e.string="string",e.number="number",e.boolean="boolean",e.color="color",e.list="list",e.enumType="enumType",e.trigger="trigger",e.viewModel="viewModel",e.integer="integer",e.listIndex="listIndex",e.image="image",e.artboard="artboard"}(R||(R={}));var N,V=function(){function e(e){this._viewModel=e}return Object.defineProperty(e.prototype,"instanceCount",{get:function(){return this._viewModel.instanceCount}
295,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModel.name},enumerable:!1,configurable:!0}),e.prototype.instanceByIndex=function(e){var t=this._viewModel.instanceByIndex(e);if(null!==t){var n=new U(t,null);return(0,c.createFinalization)(n,t),n}return null},e.prototype.instanceByName=function(e){var t=this._viewModel.instanceByName(e);if(null!==t){var n=new U(t,null);return(0,c.createFinalization)(n,t),n}return null},e.prototype.defaultInstance=function(){var e=this._viewModel.defaultInstance();if(null!==e){var t=new U(e,null);return(0,c.createFinalization)(t,e),t}return null},e.prototype.instance=function(){var e=this._viewModel.instance();if(null!==e){var t=new U(e,null);return(0,c.createFinalization)(t,e),t}return null},Object.defineProperty(e.prototype,"properties",{get:function(){return this._viewModel.getProperties()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instanceNames",{get:function(){return this._viewModel.getInstanceNames()},enumerable:!1,configurable:!0}),e}(),W=function(){function e(e){this._dataEnum=e}return Object.defineProperty(e.prototype,"name",{get:function(){return this._dataEnum.name},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"values",{get:function(){return this._dataEnum.values},enumerable:!1,configurable:!0}),e}();!function(e){e.Number="number",e.String="string",e.Boolean="boolean",e.Color="color",e.Trigger="trigger",e.Enum="enum",e.List="list",e.Image="image",e.Font="font",e.Artboard="artboard"}(N||(N={}));var U=function(){function e(e,t){this._parents=[],this._children=[],this._viewModelInstances=new Map,this._propertiesWithCallbacks=[],this._referenceCount=0,this.selfUnref=!1,this._runtimeInstance=e,null!==t&&this._parents.push(t)}return Object.defineProperty(e.prototype,"runtimeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"nativeInstance",{get:function(){return this._runtimeInstance},enumerable:!1,configurable:!0}),e.prototype.handleCallbacks=function(){0!==this._propertiesWithCallbacks.length&&(this._propertiesWithCallbacks.forEach(function(e){e.handleCallbacks()}),this._propertiesWithCallbacks.forEach(function(e){e.clearChanges()})),this._children.forEach(function(e){return e.handleCallbacks()})},e.prototype.addParent=function(e){this._parents.includes(e)||(this._parents.push(e),(this._propertiesWithCallbacks.length>0||this._children.length>0)&&e.addToViewModelCallbacks(this))},e.prototype.removeParent=function(e){var t=this._parents.indexOf(e);-1!==t&&(this._parents[t].removeFromViewModelCallbacks(this),this._parents.splice(t,1))},e.prototype.addToPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)||(this._propertiesWithCallbacks.push(e),this._propertiesWithCallbacks.length>0&&this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromPropertyCallbacks=function(e){var t=this;this._propertiesWithCallbacks.includes(e)&&(this._propertiesWithCallbacks=this._propertiesWithCallbacks.filter(function(t){return t!==e}),0===this._children.length&&0===this._propertiesWithCallbacks.length&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.addToViewModelCallbacks=function(e){var t=this;this._children.includes(e)||(this._children.push(e),this._parents.forEach(function(e){e.addToViewModelCallbacks(t)}))},e.prototype.removeFromViewModelCallbacks=function(e){var t=this;this._children.includes(e)&&(this._children=this._children.filter(function(t){return t!==e}),0===this._children.length&&0===this._propertiesWithCallbacks.length&&this._parents.forEach(function(e){e.removeFromViewModelCallbacks(t)}))},e.prototype.clearCallbacks=function(){this._propertiesWithCallbacks.forEach(function(e){e.clearCallbacks()})},e.prototype.propertyFromPath=function(e,t){var n=e.split("/");return this.propertyFromPathSegments(n,0,t)},e.prototype.viewModelFromPathSegments=function(e,t){var n=this.internalViewModelInstance(e[t]);return null!==n?t==e.length-1?n:n.viewModelFromPathSegments(e,t++):null},e.prototype.propertyFromPathSegments=function(e,t,n){var i,r,a,o,s,l,c,u,d,h,f,p,m,v,b,y,g,w,_,A;
295if(t<e.length-1){var S=this.internalViewModelInstance(e[t]);return null!==S?S.propertyFromPathSegments(e,t+1,n):null}var C=null;switch(n){case N.Number:if(null!==(C=null!==(r=null===(i=this._runtimeInstance)||void 0===i?void 0:i.number(e[t]))&&void 0!==r?r:null))return new z(C,this);break;case N.String:if(null!==(C=null!==(o=null===(a=this._runtimeInstance)||void 0===a?void 0:a.string(e[t]))&&void 0!==o?o:null))return new H(C,this);break;case N.Boolean:if(null!==(C=null!==(l=null===(s=this._runtimeInstance)||void 0===s?void 0:s.boolean(e[t]))&&void 0!==l?l:null))return new $(C,this);break;case N.Color:if(null!==(C=null!==(u=null===(c=this._runtimeInstance)||void 0===c?void 0:c.color(e[t]))&&void 0!==u?u:null))return new K(C,this);break;case N.Trigger:if(null!==(C=null!==(h=null===(d=this._runtimeInstance)||void 0===d?void 0:d.trigger(e[t]))&&void 0!==h?h:null))return new Y(C,this);break;case N.Enum:if(null!==(C=null!==(p=null===(f=this._runtimeInstance)||void 0===f?void 0:f.enum(e[t]))&&void 0!==p?p:null))return new X(C,this);break;case N.List:if(null!==(C=null!==(v=null===(m=this._runtimeInstance)||void 0===m?void 0:m.list(e[t]))&&void 0!==v?v:null))return new G(C,this);break;case N.Image:if(null!==(C=null!==(y=null===(b=this._runtimeInstance)||void 0===b?void 0:b.image(e[t]))&&void 0!==y?y:null))return new Q(C,this);break;case N.Font:if(null!==(C=null!==(w=null===(g=this._runtimeInstance)||void 0===g?void 0:g.font(e[t]))&&void 0!==w?w:null))return new J(C,this);break;case N.Artboard:if(null!==(C=null!==(A=null===(_=this._runtimeInstance)||void 0===_?void 0:_.artboard(e[t]))&&void 0!==A?A:null))return new Z(C,this)}return null},e.prototype.internalViewModelInstance=function(t){var n;if(this._viewModelInstances.has(t))return this._viewModelInstances.get(t);var i=null===(n=this._runtimeInstance)||void 0===n?void 0:n.viewModel(t);if(null!==i){var r=new e(i,this);return(0,c.createFinalization)(r,i),r.internalIncrementReferenceCount(),this._viewModelInstances.set(t,r),r}return null},e.prototype.number=function(e){return this.propertyFromPath(e,N.Number)},e.prototype.string=function(e){return this.propertyFromPath(e,N.String)},e.prototype.boolean=function(e){return this.propertyFromPath(e,N.Boolean)},e.prototype.color=function(e){return this.propertyFromPath(e,N.Color)},e.prototype.trigger=function(e){return this.propertyFromPath(e,N.Trigger)},e.prototype.enum=function(e){return this.propertyFromPath(e,N.Enum)},e.prototype.list=function(e){return this.propertyFromPath(e,N.List)},e.prototype.image=function(e){return this.propertyFromPath(e,N.Image)},e.prototype.font=function(e){return this.propertyFromPath(e,N.Font)},e.prototype.artboard=function(e){return this.propertyFromPath(e,N.Artboard)},e.prototype.viewModel=function(e){var t=e.split("/"),n=t.length>1?this.viewModelFromPathSegments(t.slice(0,t.length-1),0):this;return null!=n?n.internalViewModelInstance(t[t.length-1]):null},e.prototype.internalReplaceViewModel=function(e,t){var n;if(null!==t.runtimeInstance){var i=(null===(n=this._runtimeInstance)||void 0===n?void 0:n.replaceViewModel(e,t.runtimeInstance))||!1;if(i){t.internalIncrementReferenceCount();var r=this.internalViewModelInstance(e);null!==r&&(r.removeParent(this),this._children.includes(r)&&(this._children=this._children.filter(function(e){return e!==r})),r.cleanup()),this._viewModelInstances.set(e,t),t.addParent(this)}return i}return!1},e.prototype.replaceViewModel=function(e,t){var n,i=e.split("/"),r=i.length>1?this.viewModelFromPathSegments(i.slice(0,i.length-1),0):this;return null!==(n=null==r?void 0:r.internalReplaceViewModel(i[i.length-1],t))&&void 0!==n&&n},e.prototype.incrementReferenceCount=function(){var e;this._referenceCount++,null===(e=this._runtimeInstance)||void 0===e||e.incrementReferenceCount()},e.prototype.decrementReferenceCount=function(){var e;this._referenceCount--,null===(e=this._runtimeInstance)||void 0===e||e.decrementReferenceCount()},Object.defineProperty(e.prototype,"properties",{get:function(){var e;return(null===(e=this._runtimeInstance)||void 0===e?void 0:e.getProperties().map(function(e){return d({},e)}))||[]}
295,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewModelName",{get:function(){var e,t;return null!==(t=null===(e=this._runtimeInstance)||void 0===e?void 0:e.getViewModelName())&&void 0!==t?t:""},enumerable:!1,configurable:!0}),e.prototype.internalIncrementReferenceCount=function(){this._referenceCount++},e.prototype.cleanup=function(){var e,t=this;if(this._referenceCount--,this._referenceCount<=0){this.selfUnref&&(null===(e=this._runtimeInstance)||void 0===e||e.unref()),this._runtimeInstance=null,this.clearCallbacks(),this._propertiesWithCallbacks=[],this._viewModelInstances.forEach(function(e){e.cleanup()}),this._viewModelInstances.clear();var n=p([],this._children,!0);this._children.length=0;var i=p([],this._parents,!0);this._parents.length=0,n.forEach(function(e){e.removeParent(t)}),i.forEach(function(e){e.removeFromViewModelCallbacks(t)})}},e}(),q=function(){function e(e,t){this.callbacks=[],this._viewModelInstanceValue=e,this._parentViewModel=t}return e.prototype.on=function(e){0===this.callbacks.length&&this._viewModelInstanceValue.clearChanges(),this.callbacks.includes(e)||(this.callbacks.push(e),this._parentViewModel.addToPropertyCallbacks(this))},e.prototype.off=function(e){e?this.callbacks=this.callbacks.filter(function(t){return t!==e}):this.callbacks.length=0,0===this.callbacks.length&&this._parentViewModel.removeFromPropertyCallbacks(this)},e.prototype.internalHandleCallback=function(e){},e.prototype.handleCallbacks=function(){var e=this;this._viewModelInstanceValue.hasChanged&&this.callbacks.forEach(function(t){e.internalHandleCallback(t)})},e.prototype.clearChanges=function(){this._viewModelInstanceValue.clearChanges()},e.prototype.clearCallbacks=function(){this.callbacks.length=0},Object.defineProperty(e.prototype,"name",{get:function(){return this._viewModelInstanceValue.name},enumerable:!1,configurable:!0}),e}(),H=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(q),z=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(q),$=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(q),Y=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),t.prototype.trigger=function(){return this._viewModelInstanceValue.trigger()},t.prototype.internalHandleCallback=function(e){e()},t}(q),X=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"valueIndex",{get:function(){return this._viewModelInstanceValue.valueIndex},set:function(e){this._viewModelInstanceValue.valueIndex=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"values",{get:function(){return this._viewModelInstanceValue.values},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e(this.value)},t}(q),G=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"length",{get:function(){return this._viewModelInstanceValue.size},enumerable:!1,configurable:!0}),t.prototype.addInstance=function(e){null!=e.runtimeInstance&&(this._viewModelInstanceValue.addInstance(e.runtimeInstance),e.addParent(this._parentViewModel))},t.prototype.addInstanceAt=function(e,t){return!(null==e.runtimeInstance||!this._viewModelInstanceValue.addInstanceAt(e.runtimeInstance,t)||(e.addParent(this._parentViewModel),0))},t.prototype.removeInstance=function(e){null!=e.runtimeInstance&&(this._viewModelInstanceValue.removeInstance(e.runtimeInstance),e.removeParent(this._parentViewModel))},t.prototype.removeInstanceAt=function(e){this._viewModelInstanceValue.removeInstanceAt(e)},t.prototype.instanceAt=function(e){var t=this._viewModelInstanceValue.instanceAt(e);if(null!=t){var n=new U(t,this._parentViewModel);return(0,c.createFinalization)(n,t),n}return null},t.prototype.swap=function(e,t){this._viewModelInstanceValue.swap(e,t)},t.prototype.internalHandleCallback=function(e){e()},t}(q),K=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._viewModelInstanceValue.value},set:function(e){this._viewModelInstanceValue.value=e}
295,enumerable:!1,configurable:!0}),t.prototype.rgb=function(e,t,n){this._viewModelInstanceValue.rgb(e,t,n)},t.prototype.rgba=function(e,t,n,i){this._viewModelInstanceValue.argb(i,e,t,n)},t.prototype.argb=function(e,t,n,i){this._viewModelInstanceValue.argb(e,t,n,i)},t.prototype.alpha=function(e){this._viewModelInstanceValue.alpha(e)},t.prototype.opacity=function(e){this._viewModelInstanceValue.alpha(Math.round(255*Math.max(0,Math.min(1,e))))},t.prototype.internalHandleCallback=function(e){e(this.value)},t}(q),Q=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t;this._viewModelInstanceValue.value(null!==(t=null==e?void 0:e.nativeImage)&&void 0!==t?t:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(q),J=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t;this._viewModelInstanceValue.value(null!==(t=null==e?void 0:e.nativeFont)&&void 0!==t?t:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(q),Z=function(e){function t(t,n){return e.call(this,t,n)||this}return u(t,e),Object.defineProperty(t.prototype,"value",{set:function(e){var t,n,i;i=e.isBindableArtboard?e:e.file.internalBindableArtboardFromArtboard(e.nativeArtboard),this._viewModelInstanceValue.value(null!==(t=null==i?void 0:i.nativeArtboard)&&void 0!==t?t:null),(null==i?void 0:i.nativeViewModel)&&this._viewModelInstanceValue.viewModelInstance(null!==(n=null==i?void 0:i.nativeViewModel)&&void 0!==n?n:null)},enumerable:!1,configurable:!0}),t.prototype.internalHandleCallback=function(e){e()},t}(q),ee=function(e){return h(void 0,void 0,void 0,function(){var t,n;return f(this,function(i){switch(i.label){case 0:return t=new Request(e),[4,fetch(t)];case 1:if(!(n=i.sent()).ok)throw new Error("Failed to fetch the Rive file: HTTP ".concat(n.status));return[4,n.arrayBuffer()];case 2:return[2,i.sent()]}})})},te=function(e){return"string"==typeof e?[e]:e instanceof Array?e:[]},ne={EventManager:M,TaskQueueManager:k},ie=function(e){return h(void 0,void 0,void 0,function(){var t,n;return f(this,function(i){switch(i.label){case 0:return[4,new Promise(function(t){return s.RuntimeLoader.getInstance(function(n){n.decodeAudio(e,t)})})];case 1:return t=i.sent(),n=new c.AudioWrapper(t),c.finalizationRegistry.register(n,t),[2,n]}})})},re=function(e){return h(void 0,void 0,void 0,function(){var t,n;return f(this,function(i){switch(i.label){case 0:return[4,new Promise(function(t){return s.RuntimeLoader.getInstance(function(n){n.decodeImage(e,t)})})];case 1:return t=i.sent(),n=new c.ImageWrapper(t),c.finalizationRegistry.register(n,t),[2,n]}})})},ae=function(e){return h(void 0,void 0,void 0,function(){var t,n;return f(this,function(i){switch(i.label){case 0:return[4,new Promise(function(t){return s.RuntimeLoader.getInstance(function(n){n.decodeFont(e,t)})})];case 1:return t=i.sent(),n=new c.FontWrapper(t),c.finalizationRegistry.register(n,t),[2,n]}})})}})(),i})(),e.exports=t()},850(){((e,Drupal,t)=>{Drupal.behaviors.accordion={attach:function(n){const i=t("accordion-header",document.querySelectorAll(".accordion .accordion-header .accordion-button"),n);Array.isArray(i)&&i.length&&i.forEach(t=>{t.addEventListener("click",function(){const t=e(this).parent().parent(),n=t.find(".accordion-collapse")[0];t.hasClass("active")?(n.style.maxHeight=`${n.scrollHeight}px`,setTimeout(()=>{n.style.maxHeight="0",t.removeClass("active")},1)):(t.addClass("active"),n.style.maxHeight=`${n.scrollHeight}px`)})})}}})(jQuery,Drupal,once)},222(){((Drupal,e)=>{Drupal.behaviors.anchorLink={attach:function(t){const n=e("anchor-link",document.querySelectorAll(".block--anchor-link"),t);Array.isArray(n)&&n.length&&n.forEach(e=>{const t=e;t.querySelector(".clipboard-guide").addEventListener("click",e=>{e.preventDefault(),function(e){const t=e.querySelector(".clipboard-guide"),n=e.querySelector(".copied"),i=e.querySelector("h2").getAttribute("id"),r=`${window.location.href.split("#")[0]}#${i}`,a=document.createElement("input");a.value=r,document.body.appendChild(a),a.select(),document.execCommand("copy"),document.body.removeChild(a),n.classList.add("active"),t.classList.add("hidden"),setTimeout(()=>{n.classList.remove("active"),t.classList.remove("hidden")},3e3)}(t)})})}}})(Drupal,once)},475(){((Drupal,e)=>{Drupal.behaviors.anchorLinkNavigation={attach:function(t){const n=e("anchor-link-title",document.querySelectorAll(".anchor-link-title"),t);function i(e){document.querySelectorAll("#anchor-link-list li").forEach(e
295=>{e.classList.remove("active")});const t=document.querySelector(`#anchor-link-list li a[href="#${e}"]`).parentElement;t&&t.classList.add("active")}function r(){const e=document.querySelector('header[role="banner"]');return e?e.offsetHeight:0}function a(e){const t=e.textContent;let n=e.getAttribute("id");null===n&&(n=window.location.hash.substring(1));const a=document.createElement("li"),o=document.createElement("a");o.textContent=t,o.setAttribute("href",`#${n}`),a.appendChild(o),document.getElementById("anchor-link-list").appendChild(a),o.addEventListener("click",e=>{e.preventDefault(),function(e){const t=r(),n=e.getAttribute("href").substring(1),a=document.getElementById(n);if(a){const e=a.getBoundingClientRect().top+window.scrollY-t;window.scrollTo({top:e,behavior:"smooth"}),history.pushState(null,null,`#${n}`),i(n)}}(o)})}Array.isArray(n)&&n.length&&(n.forEach(e=>{a(e)}),window.onload=()=>{!function(){const e=document.querySelector(".block--anchor-link-navigation"),t=e.parentElement,a=r();e&&window.addEventListener("scroll",()=>{const r=t.getBoundingClientRect().top,o=t.getBoundingClientRect().bottom,s=e.getBoundingClientRect().bottom;r<=a&&o>=e.offsetHeight+a+50&&(s>0||!e.classList.contains("fixed-sidebar"))?e.classList.add("fixed-sidebar"):e.classList.remove("fixed-sidebar");let l="";n.forEach(e=>{const t=e.parentElement.parentElement.nextElementSibling,n=t.offsetTop,r=t.clientHeight;window.scrollY>=n-r/3&&(l=e.getAttribute("id"),l&&i(l))})})}();const e=window.location.hash.substring(1);e&&i(e)})}}})(Drupal,once)},566(){((e,Drupal)=>{Drupal.behaviors.flexeraBreadcrumbs={attach(){const e=document.querySelector(".hero"),t=document.querySelector(".breadcrumbs");if(!e||!t)return;const n=getComputedStyle(e).getPropertyValue("--text-color");t.style.setProperty("--text-color",n),"#fff"===n&&t.style.setProperty("--text-color-hover","#323334")}}})(jQuery,Drupal)},900(){((e,Drupal)=>{Drupal.behaviors.flexera_embeded={attach:function(t){if(t!==document)return;window.addEventListener("message",e=>{if(e.data.isFlexeraIframe){const t=(e=>[].slice.call(document.getElementsByTagName("iframe")).filter(t=>t.contentWindow===e.source)[0])(e);t&&(t.style.height=`${e.data.calculatedHeight+4}px`)}},!1);const n=e("iframe[data-src]");n.length&&n.each((t,n)=>{let i=e(n).attr("data-src");const r=window.location;if(r.search.substring(1).length){const e=r.search.substring(1);let t="?";i.indexOf("?")>0&&(t="&"),i=i+t+e}e(n).attr({src:i})})}}})(jQuery,Drupal)},843(){Drupal.behaviors.flexeraCheckbox={attach(){document.querySelectorAll(".views-exposed-form input.form-checkbox").forEach(e=>{if("true"===e.dataset.flexeraCheckboxInitialized)return;e.dataset.flexeraCheckboxInitialized="true";const t=document.createElement("span");t._originalCheckbox=e,e._fakeCheckbox=t,t.classList.add("fake-checkbox"),e.checked&&t.classList.add("is-checked"),t.addEventListener("click",e=>{const t=e.target;t.classList.contains("is-checked")?t.classList.remove("is-checked"):t.classList.add("is-checked"),t._originalCheckbox.checked=t.classList.contains("is-checked")}),e.addEventListener("change",e=>{const t=e.target;t.checked?t._fakeCheckbox.classList.add("is-checked"):t._fakeCheckbox.classList.remove("is-checked")}),e.before(t),e.setAttribute("hidden","hidden")})}}},593(){((Drupal,e)=>{const t=(e,t=!1)=>{const{hash:n}=window.location;n&&((e=>{e.forEach(e=>{Array.from(e.children).forEach((e,t)=>{const n=e.querySelector(".tab-title");let i=t;n&&(i=n.id.replace(/\s/g,"-")),e.id=`panel-${i}`})})})(e),e.forEach(e=>{const i=document.querySelector(`a.nav-item[href="${n}"]`);if(!i)return;if(!e.closest(".layout__region--tabs").contains(i))return;const r=document.querySelector(n);if(!r)return;const a=i.closest(".tabs-items"),o=r.closest(".tab-content");if(a&&o){const e=a.querySelector(".nav-link.is-active");e&&e.classList.remove("is-active"),i.classList.add("is-active");const t=o.querySelector(".tab-pane.active");t&&(t.classList.remove("active"),t.style=null),r.classList.add("active")}if(t){const e=r.getBoundingClientRect().top+window.scrollY-250;window.scrollTo({top:e,behavior:"smooth"})}}))},n=()=>{const e=document.querySelectorAll(".layout--horizontal-tabs ul.tabs");
295e.length&&e.forEach(e=>{const t=e.querySelectorAll("li.tabs__tab a"),n=e.querySelector("li.tabs__tab a.is-active"),[i]="function"==typeof t.first?t.first():[t[0]],[r]="function"==typeof t.last?t.last():[t[t.length-1]];if(document.querySelectorAll("body.flexera").length){const t=e.parentElement;e.scrollWidth>t.clientWidth?(e.style.justifyContent="flex-start",n!==i?e.previousElementSibling.classList.remove("first-element"):e.previousElementSibling.classList.add("first-element"),n!==r?e.nextElementSibling.classList.remove("last-element"):e.nextElementSibling.classList.add("last-element")):(e.style.justifyContent="center",e.style.margin="0",e.previousElementSibling.style.setProperty("display","none","important"),e.nextElementSibling.style.setProperty("display","none","important"))}})},i=e=>{const t=document.querySelectorAll("ul.tabs");t.length&&t.forEach(t=>{if(t.contains(e)){const n=e.offsetLeft,i=e.offsetWidth,r=n-(t.offsetWidth-i)/2;t.scrollTo({left:r,behavior:"smooth"})}}),n()};Drupal.behaviors.horizontalTabs={attach:function(r){const a=document.querySelectorAll("#layout-builder");if(a&&a.length)return;const o=e("horizontal-tabs",document.querySelectorAll(".layout--horizontal-tabs .tab-content"),r);Array.isArray(o)&&o.length&&o.forEach(n=>{const a=e("tabs-items",n.parentNode.querySelector(".tabs-items"),r),s=n.children;for(let e=0;e<s.length;e++){const n=s[e],r=n.querySelector(".tab-icon-url"),l=n.querySelector(".tab-title");let c=null,u=`Tab ${e}`,d=e;r&&(c=r.getAttribute("data-url")),l&&(u=l.textContent,d=l.id.replace(/\s/g,"-")),n.classList.add("tab-pane"),0===e&&n.classList.add("active"),n.id=`panel-${d}`;const h=document.createElement("a");h.classList.add("nav-item","nav-link"),h.setAttribute("role","button"),h.setAttribute("tabindex",e),h.setAttribute("aria-label",u),0===e&&h.classList.add("is-active"),h.href=`#panel-${d}`,h.id=`tab-${d}`;let f=null;c&&(f=document.createElement("img"),f.classList.add("tab-icon"),f.src=c);const p=document.createElement("div");p.classList.add("label"),p.textContent=u,f&&h.appendChild(f),h.appendChild(p);const m=document.createElement("li");m.classList.add("tabs__tab"),m.appendChild(h),a[0]&&a[0].appendChild(m);const v={attributes:!0,attributeOldValue:!0};new MutationObserver(e=>{e.forEach(e=>{"class"===e.attributeName&&h.classList.contains("is-active")&&i(h)})}).observe(h,v),h.addEventListener("click",e=>{e.preventDefault(),window.history.replaceState(null,"",`#panel-${d}`),t(o,!1)})}}),t(o,!0),n(),window.addEventListener("hashchange",()=>{t(o,!0),n()}),window.addEventListener("resize",n)}}})(Drupal,once)},434(){((e,Drupal)=>{Drupal.flexera=Drupal.flexera||{},Drupal.flexera.scrollTo=(t,n)=>{e("html, body").scrollLeft(t).scrollTop(n)},Drupal.flexera.scrollToElement=t=>{let n=e(t).offset().top;const i=document.querySelector(".layout-container__header header");if(i&&(n-=i.offsetHeight),n-=5,document.body.classList.contains("toolbar-fixed")&&document.body.classList.contains("toolbar-horizontal")){const e=document.getElementById("toolbar-bar");n-=e.offsetHeight;const t=e.querySelector(".toolbar-tray.is-active");t&&(n-=t.offsetHeight)}Drupal.flexera.scrollTo(0,n)},Drupal.flexera.scrollToHash=e=>{e=e.replace(/^#/,"");const t=document.getElementById(e);t&&(t.removeAttribute("id"),Drupal.flexera.scrollToElement(t),setTimeout(()=>t.setAttribute("id",e),250))},Drupal.behaviors.flexeraLink={attach(){const t=window.location.href.split("#")[0];document.querySelectorAll("a").forEach(n=>{if("true"===n.dataset.flexeraLinkInitialized)return;if(n.dataset.flexeraLinkInitialized="true",!n.getAttribute("href"))return;let i=0===n.getAttribute("href").indexOf("#");if(!i){i=n.href.split("#")[0]===t}i&&(n.classList.add("link--hash"),e(n).parent().hasClass("tabs__tab")||n.addEventListener("click",()=>(Drupal.flexera.scrollToHash(`#${n.href.split("#")[1]}`),!1)))})},detach(){}},Drupal.behaviors.flexeraWindowHash={initialized:!1,attach(){if(Drupal.behaviors.flexeraWindowHash.initialized)return;Drupal.behaviors.flexeraWindowHash.initialized=!0;const e=(window.location.hash||"").replace(/^#/,"");""!==e&&Drupal.flexera.scrollToHash(e)},detach(){}}})(jQuery,Drupal)},48(){((Drupal,e)=>{Drupal.behaviors.logoGridAnimate={attach(t){const n=e("logoGridAnimate",".logo-grid__items.logo-grid-animated",t);
295if(!Array.isArray(n)||!n.length)return;const i=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting?e.target.classList.add("in-view"):e.target.classList.remove("in-view")})},{threshold:.03});n.forEach(e=>{e.querySelectorAll(".logo-grid__logo").forEach((e,t)=>{e.style.setProperty("--delay",.02*t+"s"),i.observe(e)})})}}})(Drupal,once)},429(){((e,Drupal,t)=>{Drupal.behaviors.menu={attach:function(n){const i=null!==document.querySelector("#block-flexera-main-menu-v2")?1199.98:767.98,r=t("burger-button",document.querySelector("header #burger-button"),n);Array.isArray(r)&&r.length&&r[0].addEventListener("click",function(){const t=e("header").toggleClass("active").hasClass("active");e(this).attr("aria-expanded",t),e(this).toggleClass("active",t),t?(e(".mobile-menu").slideDown({start(){e(this).css({display:"flex"})}}),e("body").addClass("noscroll")):(e("body").removeClass("noscroll"),e(".mobile-menu").slideUp(),e("#block-flexera-main-menu-v2 .menu-level-0 > li.has-child").removeClass("expanded"))});const a=t("header-menu-items",document.querySelectorAll(".main-menu .menu-level-0 > li.has-child > span, .main-menu .menu-level-0 > li.has-child > a"),n);Array.isArray(a)&&a.length&&a.forEach(t=>{t.addEventListener("click",function(t){if(t.stopPropagation(),window.innerWidth<i){t.preventDefault();const n=e(this).parent();if(e(this).closest("#block-flexera-main-menu-v2").length)return n.toggleClass("expanded"),void n.find("ul.menu-level-1").css("display","");n.children("ul").slideToggle(),n.hasClass("expanded")?n.removeClass("expanded"):n.addClass("expanded")}})});const o=t("header-menu-v2-back",document.querySelectorAll("#block-flexera-main-menu-v2 .menu-level-1__back"),n);Array.isArray(o)&&o.length&&o.forEach(t=>{t.addEventListener("click",function(t){t.preventDefault(),t.stopPropagation(),e(this).closest("li.has-child").removeClass("expanded")})}),e(window).resize(()=>{window.innerWidth>i&&e("header .mobile-menu").css({display:"flex"}),window.innerWidth<i&&e("header .mobile-menu").css({display:"none"})});const s=t("footer-menu-columns",document.querySelectorAll(".footer__mainmenu .menu-level-0 > li.has-child"),n),l=s[s.length-1],c=document.querySelector(".footer__right-sidebar");c.style.display="block",l?.appendChild(c);const u=t("footer-menu-items",document.querySelectorAll(".footer__mainmenu .menu-level-1 > li.has-child > span:not(.d-md-none), .footer__mainmenu .menu-level-1 > li.has-child > a"),n);Array.isArray(u)&&u.length&&u.forEach(t=>{t.addEventListener("click",function(n){var i;e(window).width()<767.98&&(n.preventDefault(),i=t,u.forEach(e=>{e!==i&&(e.parentElement.classList.remove("expanded"),e.parentElement.querySelector("ul").style.display="none")}),e(this).parent().hasClass("expanded")?(e(this).parent().removeClass("expanded"),e(this).parent().children("ul").toggle()):(e(this).parent().addClass("expanded"),e(this).parent().children("ul").toggle()))})});const d="header .menu-level-0 > .has-child, .main-menu .menu-level-0 > .has-child > span",h=".language-switcher",f="opened",p=".layout-overlay",m="flexera:header-dropdown-opened",v=()=>{document.querySelector(p).style.display="none"},b=()=>{document.querySelector(p).style.display="block"};function y(e){document.querySelectorAll(d).forEach(t=>{if(t!==e){t.classList.remove(f);if(t.closest("#block-flexera-main-menu-v2")&&window.innerWidth<i)return;const e=t.querySelector(".menu-level-1");e&&(e.style.display="none")}});document.querySelectorAll(h).forEach(t=>{if(t!==e){const e=t.children[0].querySelector(".links"),n=t.children[0].querySelector(".language-switcher__content");e&&(n.classList.remove(f),e.style.display="none")}})}const g=t("header-dropdown-opened-listener",document.querySelector("header"),n);Array.isArray(g)&&g.length&&document.addEventListener(m,e=>{e.detail&&"menu"!==e.detail.source&&(y(),v())}),window.addEventListener("click",function(e){const t=document.querySelectorAll(d),n=document.querySelectorAll(h);function i(t){for(let n=0;n<t.length;n++)if(t[n].contains(e.target))return!0;return!1}i(t)||i(n)||(y(),v())}),window.addEventListener("keydown",e=>{"Escape"===e.key&&(y(),v())});const w=t("main-menu-dropdowns",document.querySelectorAll(d),n),_=e=>{let t=null;t=e.currentTarget.classList.contains("has-child")?e.currentTarget:e.currentTarget.parentElement,y(t);const n=t.querySelector(".menu-level-1");t.classList.contains(f)?(t.classList.remove(f),n.style.display="none",v()):(window.innerWidth>i&&t.classList.add(f),n.style.display=t.closest("#block-flexera-main-menu-v2")?"flex":"block",b(),document.dispatchEvent(new CustomEvent(m,{detail:{source:"menu"}})))};
295w.forEach(e=>{e.addEventListener("click",_,!1)});t("main-v2-login-close",document.querySelectorAll(".main-v2-login-links .menu-level-1"),n).forEach(e=>{const t=document.createElement("button");t.type="button",t.className="menu-level-1__close",t.setAttribute("aria-label",Drupal.t("Close")),e.prepend(t),t.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),e.style.display="none",v()})});const A=t("language-switcher-dropdowns",document.querySelectorAll(h),n),S=e=>{const t=e.currentTarget;y(t);const n=t.children[0].querySelector(".links");if(n){const e=t.children[0].querySelector(".language-switcher__content");e.classList.contains(f)?(e.classList.remove(f),n.style.display="none",v()):(e.classList.add(f),n.style.display="block",b(),document.dispatchEvent(new CustomEvent(m,{detail:{source:"menu"}})))}};A.forEach(e=>{e.addEventListener("click",S,!1)})}}})(jQuery,Drupal,once)},609(){((e,Drupal)=>{Drupal.flexera=Drupal.flexera||{},Drupal.flexera.modal=Drupal.flexera.modal||{element:null,widget:null,body:null},Drupal.behaviors.flexeraModalDialog={attach(){null===Drupal.flexera.modal.widget&&(Drupal.flexera.modal.element=document.getElementById("bs-modal"),Drupal.flexera.modal.body=Drupal.flexera.modal.element.querySelector(".modal-body"),Drupal.flexera.modal.widget=new bootstrap.Modal(Drupal.flexera.modal.element))}},Drupal.behaviors.flexeraModalLinks={attach(){document.querySelectorAll("[data-modal-href]").forEach(t=>{"true"!==t.dataset.flexeraModalLinkInitialized&&(t.dataset.flexeraModalLinkInitialized="true",t.addEventListener("click",t=>(Drupal.flexera.modal.widget.show(),Drupal.flexera.modal.body.textContent=Drupal.t("Loading"),e.ajax({url:t.target.dataset.modalHref,data:{_wrapper_format:"custom_modal"},dataType:"json",type:"get",context:t.target,success:e=>{Drupal.flexera.modal.body.innerHTML=e.body,Drupal.flexera.modal.widget.handleUpdate()}}),t.preventDefault(),!1)))})}},Drupal.behaviors.flexeraClickableCard={attach(){document.querySelectorAll(".card--clickable").forEach(e=>{"true"!==e.dataset.clickableCardInitialized&&(e.dataset.clickableCardInitialized="true",e.addEventListener("click",t=>{if("BUTTON"===t.target.nodeName)return!0;const n=e.querySelector("a[data-card-action]");return n?(n.click(),t.preventDefault(),!1):(console.error("Card doesn't define an action.",e),!0)}))})}},Drupal.behaviors.youtubeModal={attach:function(){document.addEventListener("shown.bs.modal",e=>{const t=e.target;if(t&&t.classList.contains("youtubeModal")){const e=t.querySelector(".lite-youtube button.lty-playbtn");t.querySelectorAll("iframe").forEach(e=>{e.src&&(e.src+="&autoplay=1&")}),e?.click()}}),document.addEventListener("hidden.bs.modal",e=>{const t=e.target;t&&t.classList.contains("youtubeModal")&&t.querySelectorAll("iframe").forEach(e=>{e.src=e.src.replace("autoplay=1&","")})})}}})(jQuery,Drupal)},422(){((Drupal,e)=>{function t(t){const n=e("pathFactoryIntegrationMapLinks",document.querySelectorAll("a[href*='PFOVERLAY=TRUE']"),t);Array.isArray(n)&&n.length&&n.forEach(e=>{const t=e.getAttribute("href").replace("PFOVERLAY=TRUE","");e.setAttribute("data-lookbook-overlay-href",t),e.href="#",e.querySelector(".image")?.classList.add("video-image"),e.querySelector(".hero__img div")?.classList.add("video-image")})}Drupal.behaviors.pathFactoryIntegration={attach:function(n){t(n);e("pathFactoryIntegrationButtons",document.querySelectorAll(".pager--infinite-scroll .btn"),n).forEach(e=>{e.addEventListener("click",()=>{t(n)})});const i=(e,t)=>{const n=document.createElement(e);Object.entries(t).forEach(([e,t])=>n.setAttribute(e,t)),document["link"===e?"head":"body"].appendChild(n)};i("script",{type:"text/javascript",src:"https://app.cdn.lookbookhq.com/libraries/overlay/overlay.js"}),i("link",{rel:"stylesheet",type:"text/css",href:"https://app.cdn.lookbookhq.com/libraries/overlay/overlay.css"})}}})(Drupal,once)},432(){((Drupal,e)=>{Drupal.behaviors.flexeraResourcesGrid={attach(t){const n=e("flexeraResourcesGrid",".block-resources, .block-related-products",t),i=window.innerWidth<=768;if(Array.isArray(n)&&n.length&&!i){const e=new IntersectionObserver(e=>
295{e.forEach(e=>{e.isIntersecting?e.target.classList.add("in-view"):e.target.classList.remove("in-view")})},{threshold:.1});n.forEach(t=>{t.querySelectorAll(".view__rows").forEach(t=>{t.querySelectorAll(".card--resource, .card-nav").forEach((t,n)=>{t.style.setProperty("--delay",.1*n+"s"),e.observe(t)})})})}}}})(Drupal,once)},90(){((Drupal,e)=>{Drupal.behaviors.resourcesListing={attach:function(t){if(t===document&&!t?.classList?.contains("block-resources-listing")){const{terms:n}=drupalSettings,i=e("resources-listing-filter-menu",document.querySelector(".block--resources-listing .views-exposed-form-collapsible.collapse"),t);Array.isArray(i)&&i.length&&Array.isArray(n)&&n.forEach(e=>{const t=i[0].querySelector(`.form-item-type-${e} input`)||i[0].querySelector(`.form-item-category-${e} input`);t&&(t.checked=!0)})}}}})(Drupal,once)},210(e,t,n){const{Rive:i,Fit:r,Layout:a,Alignment:o}=n(52);((Drupal,e)=>{Drupal.behaviors.riveAnimation={attach(t){const n=e("rive-animation",document.querySelectorAll(".rive-canvas"),t);if(Array.isArray(n)&&n.length){const e=e=>"contain"===String(e).toLowerCase()?r.Contain:r.Cover;n.forEach(t=>{const n=t.getAttribute("data-mode")||"inline",r=t.getAttribute("file-url-desktop"),s=t.getAttribute("file-url-mobile"),l=window.innerWidth<=768,c=l&&s?s:r,u="true"===t.getAttribute("data-autoplay"),d=e(t.getAttribute("data-bg-fit")),h=t.getAttribute("data-animation-name"),{useAspectRatio:f}=t.dataset,p=l?t.dataset.widthMobile:t.dataset.widthDesktop,m=l?t.dataset.heightMobile:t.dataset.heightDesktop;if("background"===n){const e=t.closest('[class*="__rive-bg"]'),n=e?.getAttribute("data-rive-host"),r=(n?e.closest(`.${n}`):null)||e?.parentElement;if(!e||!r)return;const s=t.dataset.heightDesktop,p=t.dataset.heightMobile;(s||p)&&(r.style.minHeight=l?p:s);const m=()=>{const n=e.getBoundingClientRect(),i=window.devicePixelRatio||1;t.style.width="100%",t.style.height="1"===f?"auto":"100%",t.width=Math.max(1,Math.floor(n.width*i)),t.height=Math.max(1,Math.floor(n.height*i))};m();const v=new i({src:c,canvas:t,autoplay:u,stateMachines:h,layout:new a({fit:d,alignment:o.Center}),onLoad:()=>{v.resizeDrawingSurfaceToCanvas();new IntersectionObserver(e=>e.forEach(e=>e.isIntersecting?v.play():v.pause()),{threshold:.4}).observe(r)}});new ResizeObserver(()=>{m(),v.resizeDrawingSurfaceToCanvas()}).observe(e),window.addEventListener("resize",()=>{m(),v.resizeDrawingSurfaceToCanvas()},{passive:!0})}else{const e=t.parentElement;e&&e.setAttribute("aria-live","polite"),t.style.width=p||"100%",t.style.height=m||"auto";const n=()=>{const e=window.devicePixelRatio||1,n=t.getBoundingClientRect(),i=Math.max(1,Math.floor(n.width*e)),r=Math.max(1,Math.floor(n.height*e));t.width!==i&&(t.width=i),t.height!==r&&(t.height=r)};n();const r=new i({src:c,canvas:t,autoplay:u,stateMachines:h,layout:new a({fit:d}),onLoad:()=>{if(r.resizeDrawingSurfaceToCanvas(),!u){new IntersectionObserver(e=>e.forEach(e=>e.isIntersecting?r.play():r.pause()),{threshold:.4}).observe(t)}}});new ResizeObserver(()=>{n(),r.resizeDrawingSurfaceToCanvas()}).observe(t),window.addEventListener("resize",()=>{n(),r.resizeDrawingSurfaceToCanvas()},{passive:!0})}if("1"===f){t.style.width="100%",t.style.height="auto";const e=parseFloat(p),n=parseFloat(m);Number.isNaN(e)||Number.isNaN(n)||0===n||(t.style.aspectRatio=`${e} / ${n}`)}})}}}})(Drupal,once)},354(){((Drupal,e)=>{Drupal.behaviors.searchBar={attach:function(t){const{body:n}=document,i=e("search-desktop",document.querySelector(".search-desktop"),t);if(Array.isArray(i)&&i.length){const e={};e.body=n,e.searchContainer=i[0],e.searchBar=e.searchContainer.querySelector(".search-bar"),e.searchBtn=e.searchContainer.querySelector("#icon-nav-search"),e.overlay=document.querySelector(".layout-overlay");const t=()=>{e.searchBar.style.width=`${e.searchContainer.offsetLeft}px`},r=()=>{e.searchBar.style.width=0,e.overlay.style.display="none",e.body.classList.remove("search-focused"),window.removeEventListener("resize",t),window.removeEventListener("click",o)},a=()=>{e.body.classList.add("search-focused"),e.overlay.style.display="inherit",e.searchBar.querySelector('[name="searchString"]').focus(),t(),window.addEventListener("resize",t),window.addEventListener("click",o)},o=t=>{!e.searchBar!==t.target&&e.searchContainer.contains(t.target)||r()};e.searchBtn&&e.searchBtn.addEventListener("click",t=>{t.preventDefault(),e.body.classList.contains("search-focused")?r():a()}),e.searchBar.querySelector('[name="searchString"]').addEventListener("keydown",e=>{"Escape"===e.key&&r()})}const r=e("search-overlay-v2",document.querySelector("#search-trigger-v2"),t);if(Array.isArray(r)&&r.length){const e=r[0],t=document.querySelector("#search-overlay-v2"),i=t.querySelector("#search-overlay-v2-close"),a=t.querySelector('[name="searchString"]'),o="flexera:header-dropdown-opened",s=n=>{t.contains(n.target)||e.contains(n.target)||l()},l=()=>{t.hidden=!0,n.classList.remove("search-overlay-v2-open"),e.setAttribute("aria-expanded","fal
295se"),window.removeEventListener("click",s)},c=()=>{t.hidden=!1,n.classList.add("search-overlay-v2-open"),e.setAttribute("aria-expanded","true"),a.focus(),window.addEventListener("click",s),document.dispatchEvent(new CustomEvent(o,{detail:{source:"search"}}))};e.addEventListener("click",()=>{t.hidden?c():l()}),i.addEventListener("click",l),document.addEventListener("keydown",e=>{"Escape"!==e.key||t.hidden||l()}),document.addEventListener(o,e=>{e.detail&&"search"!==e.detail.source&&!t.hidden&&l()})}e("search-bar-submit",document.querySelectorAll(".search-bar form"),t).forEach(e=>{e.addEventListener("submit",e=>{e.preventDefault();const t=e.target.querySelector('[name="searchString"]').value;window.location.href=`/search-results#!/?searchString=${t}`})})}}})(Drupal,once)},870(){((Drupal,e)=>{Drupal.behaviors.statistic={attach:function(t){const n=e("jsCounter",document.querySelectorAll(".js-counter"),t);n?.forEach(e=>{const t=e.textContent.trim();e.setAttribute("data-target",t);const n=Number.parseInt(t,10);Number.isNaN(n)||n!==Number.parseInt(e.getAttribute("data-target"),10)||(e.textContent=0,e.addEventListener("viewportenter",()=>{!function(e){if(!e?.classList.contains("counted")){const t=2e3,n=1e3/60,i=Math.round(t/n);(()=>{let t=0;const r=parseInt(+e.getAttribute("data-target"),10),a=setInterval(()=>{t+=1;const n=t/i,o=Math.round(r*n);parseInt(e.innerHTML,10)!==o&&(e.innerHTML=o),t===i&&clearInterval(a)},n)})(),e?.classList.add("counted")}}(e)}),Flexera.windowing.enableViewportEvents(e))})}}})(Drupal,once)},972(){((e,Drupal,t)=>{Drupal.behaviors.table={attach:function(n){e("table .table--tab",n).on("click",function(){e(this).next("p").toggle()});const i=t("js-toggle-trigger",document.querySelectorAll(".js-toggle-trigger"),n);Array.isArray(i)&&i.length&&i.forEach(t=>{t.addEventListener("click",function(){const t=e(this).parent();t.addClass("js-toggle"),t.hasClass("active")?(t.removeClass("active"),t.parent().find(".u-hidden").slideToggle()):(t.addClass("active"),t.parent().find(".u-hidden").slideToggle())})})}}})(jQuery,Drupal,once)},886(){((e,Drupal,t)=>{Drupal.behaviors.tabs={attach:function(n){const i=(e,t)=>{const[n]="function"==typeof e.first?e.first():[e[0]],[i]="function"==typeof e.last?e.last():[e[e.length-1]],r=document.querySelector(".tabs"),a=r.parentElement;if(!(r.scrollWidth>a.clientWidth))return;const o=document.querySelector(".layout--tabs .prev_tab"),s=document.querySelector(".layout--tabs .next_tab");t===n?o.parentElement.classList.add("first-element"):o.parentElement.classList.remove("first-element"),t===i?s.parentElement.classList.add("last-element"):s.parentElement.classList.remove("last-element")},r=t("mobile-prev-tab",document.querySelector(".layout--tabs .prev_tab"),n);Array.isArray(r)&&r.length&&r[0].addEventListener("click",()=>{const t=e(r[0]).parent().siblings(".tabs"),n=t.find(".is-active");let a=n.parent().prev().children("a");0===a.length&&(a=n.parent().parent().children().last().children("a")),n.removeClass("is-active"),a.addClass("is-active");const o=e(r[0]).closest(".tab-titles").siblings(".tab-content"),s=o.find(".active");let l=s.prev();0===l.length&&(l=o.children().last()),s.removeClass("active"),s.hide(),l.addClass("active"),l.show();r[0].closest(".layout--tabs").classList.contains("layout--horizontal-tabs")&&i(t.find("li.tabs__tab a"),a[0])});const a=t("mobile-next-tab",document.querySelector(".layout--tabs .next_tab"),n);if(Array.isArray(a)&&a.length&&a[0].addEventListener("click",()=>{const t=e(a[0]).parent().siblings(".tabs"),n=t.find(".is-active");let r=n.parent().next().children("a");0===r.length&&(r=n.parent().parent().children().first().children("a")),n.removeClass("is-active"),r.addClass("is-active");const o=e(a[0]).closest(".tab-titles").siblings(".tab-content"),s=o.find(".active");let l=s.next();0===l.length&&(l=o.children().first()),s.removeClass("active"),s.hide(),l.addClass("active"),l.show();a[0].closest(".layout--tabs").classList.contains("layout--horizontal-tabs")&&i(t.find("li.tabs__tab a"),r[0])}),e(".layout--tabs").length>0){let t;const i=(e,n)=>{t||(t=!0,setTimeout(()=>{e(),t=!1},n))};e(window,n).on("load resize",()=>{const t=e(this);i(()=>{e(".layout--tabs .tab-content",n).each(()=>{let n=0;t.innerWidth<=992?e(".tab-pane .block--tab",this).each(()=>{e(this).css("height","")}):(e(".tab-pane .block--tab",this).each(()=>{e(this).css("height",""),e(this).parent().show(),e(this).height()>n&&(n=e(this).height()),e(this).parent().hasClass("active")||e(this).parent().hide()}),e(".tab-pane .block--tab",this).height(n))})},500)})}const o=t("layout--tabs",document.querySelectorAll(".layout--tabs li.tabs__tab a"),n);function s(e){setTimeout(()=>{const t=document.querySelector(`.layout--tabs li.tabs__tab a[href="#${e}"]`),n=document.querySelector(`.layout--tabs .tab-pane[id="${e}"]`);if(t&&n){const e=t.closest(".layout--tabs"),r=e.querySelector("li.tabs__tab a.is-active");r&&r.classList.remove("is-active"),t.classList.add("is-active");const a=e.querySelector(".tab-pane.active");a&&(a.classList.remove("active"),a.style.display="none"),n.classList.add("active"),n.style.display="block";const o=function(){const e=document.querySelector('header[role="banner"]');return e?e.offsetHeight:0}(),s=n.getBoundingClientRect().top-(o+100);window.scrollBy({top:s,behavior:"smooth"}),e.classList.contains("layout--horizontal-tabs")&&i(e.querySelectorAll("li.tabs__tab a"),t)}},500),window.scrollBy({top:0,behavior:"smooth"})}
295Array.isArray(o)&&o.length&&o.forEach(e=>{e.addEventListener("click",()=>{const t=e.getAttribute("href").substring(1);history.pushState(null,null,`#${t}`)})}),window.onload=()=>{const e=window.location.hash.substring(1);e&&s(e)}}}})(jQuery,Drupal,once)},515(){((Drupal,e)=>{Drupal.behaviors.video={attach:function(t){function n(e,t){const n=(e.contentDocument||e.contentWindow.document).querySelector("iframe");if(n){const e=new URL(n.src);!0===t?e.searchParams.set("autoplay","1"):e.searchParams.delete("autoplay"),n.src=e.toString()}}e("video-modal",t.querySelectorAll(".videoModal"),t).forEach(e=>{const t=e.querySelector("iframe");t&&(e.addEventListener("shown.bs.modal",()=>{n(t,!0)}),e.addEventListener("hidden.bs.modal",()=>{t&&n(t,!1)}))}),e("flexera-background-video",t.querySelectorAll(".video-embed-object-fit-cover"),t).forEach(e=>{const t=e.querySelector("iframe");if(t){t.loading="eager",t.classList.add("iframe-video-embed");const e=document.querySelector(".background-local-video");if(e){let t=!1;if("featurePolicy"in document){document.featurePolicy.features().includes("autoplay")&&(t=!0)}t||e.style.setProperty("background-size","cover","important")}}})}}})(Drupal,once)},800(){window.Flexera={},Flexera.windowing={enableViewportEvents(e,t="",n){this._viewportObservers||(this._viewportObservers=new Map),this._viewportObservers.has(t)||this._viewportObservers.set(t,new IntersectionObserver(e=>{const i=t?`-${t}`:"";e.forEach(e=>{e.isIntersecting?(e.boundingClientRect.top>=e.rootBounds.top&&e.target.dispatchEvent(new CustomEvent(`viewportenteratbottom${i}`,{detail:n})),e.boundingClientRect.bottom<=e.rootBounds.bottom&&e.target.dispatchEvent(new CustomEvent(`viewportenterattop${i}`,{detail:n})),e.target.dispatchEvent(new CustomEvent(`viewportenter${i}`,{detail:n}))):(e.boundingClientRect.top>=e.rootBounds.bottom&&e.target.dispatchEvent(new CustomEvent(`viewportleaveatbottom${i}`,{detail:n})),e.boundingClientRect.bottom<=e.rootBounds.top&&e.target.dispatchEvent(new CustomEvent(`viewportleaveattop${i}`,{detail:n})),e.target.dispatchEvent(new CustomEvent(`viewportleave${i}`,{detail:n})))})},n)),this._viewportObservers.get(t).observe(e)},isElementInViewport(e){if(!e)return!1;const t=e.getBoundingClientRect();return t.height>0&&t.top<=window.innerHeight&&t.bottom>=0&&t.width>0&&t.left<=window.innerWidth&&t.right>=0},POSITIONS:{WITHIN_VIEWPORT:Symbol("WITHIN_VIEWPORT"),AFTER_VIEWPORT_END:Symbol("AFTER_VIEWPORT_END"),BEFORE_VIEWPORT_START:Symbol("BEFORE_VIEWPORT_START"),INVISIBLE:Symbol("INVISIBLE")},whereIsElementX(e){if(!e)return this.POSITIONS.INVISIBLE;const t=e.getBoundingClientRect();return t.height<=0||t.width<=0?this.POSITIONS.INVISIBLE:t.bottom<0?this.POSITIONS.BEFORE_VIEWPORT_START:t.top>window.innerHeight?this.POSITIONS.AFTER_VIEWPORT_END:this.POSITIONS.WITHIN_VIEWPORT},whereIsElementY(e){if(!e)return this.POSITIONS.INVISIBLE;const t=e.getBoundingClientRect();return t.height<=0||t.width<=0?this.POSITIONS.INVISIBLE:t.right<0?this.POSITIONS.BEFORE_VIEWPORT_START:t.left>window.innerWidth?this.POSITIONS.AFTER_VIEWPORT_END:this.POSITIONS.WITHIN_VIEWPORT}}},164(){const e=(e,t,n,i)=>{let r=[];const a=()=>{const a=e.slideNodes();t.innerHTML=e.scrollSnapList().map((e,t)=>{let n;if(i){const e=a[t].querySelector(".case-study-carousel .case-study-info .logo");if(e){const t=e.cloneNode(!0);t.querySelectorAll("[data-contextual-id], .contextual, .field__item, .paragraph").forEach(e=>e.remove());n=`<button class="embla__dot" type="button">${t.outerHTML}</button>`}}else n='<button class="embla__dot" type="button"></button>';return n}).join("");r=Array.from(t.querySelectorAll(".embla__dot")),r.forEach((t,i)=>{t.addEventListener("click",()=>(t=>{e.scrollTo(t),n&&n(e)})(i),!1)})},o=()=>{const t=e.previousScrollSnap(),n=e.selectedScrollSnap();r[t].classList.remove("embla__dot--selected"),r[n].classList.add("embla__dot--selected")};return e.on("init",a).on("reInit",a).on("init",o).on("reInit",o).on("select",o),()=>{t.innerHTML=""}},t=t=>{const n=once("flexeraEmblaCarousel",document.querySelectorAll(".embla"),t);n&&n.length&&n.forEach(n=>{const i=once("flexeraEmblaSliders",n.querySelectorAll("._none"),t);if(i&&i.length){const t=n.querySelector(".embla__viewport"),r=n.querySelector(".embla__dots"),a=!Number.isNaN(n.getAttribute("size"))&&i.length>1?n.getAttribute("size"):"100";
295i.forEach(e=>{e.style.flex=`0 0 ${a}%`});let o={dragFree:!1,loop:!0,slides:i};"100"!==a&&(o={containScroll:!1});let s=[];const l=Number.isNaN(n.id)||""===n.id?12e3:Number(n.id);if(n.classList.contains("enable-autoplay")){s=[EmblaCarouselAutoplay({stopOnInteraction:!1,stopOnMouseEnter:!0,delay:l})]}const c=EmblaCarousel(t,o,s),u=e=>{const t=e?.plugins()?.autoplay;if(!t)return;(!1===t.options.stopOnInteraction||!1===t.options.stopOnMouseEnter?t.reset:t.stop)()};if(n.classList.contains("show-prev-next-navigation")&&((e,t)=>{const n=document.createElement("button");n.classList.add("embla__prev");const i=document.createElement("button");i.classList.add("embla__next");const r=t.querySelector(".container.embla__prev_next__controls");n.addEventListener("click",()=>e.scrollPrev(),!1),i.addEventListener("click",()=>e.scrollNext(),!1),r.appendChild(n),r.appendChild(i)})(c,n),n.classList.contains("show-dot-navigation")||n.classList.contains("show_case_study_carousel")){const t=n.classList.contains("show_case_study_carousel"),i=e(c,r,u,t);c.on("destroy",i)}}})};(Drupal=>{Drupal.behaviors.flexeraEmblaCarousel={attach:e=>{const n=document.querySelectorAll("#layout-builder");n&&n.length||(t(e),document.addEventListener("shown.bs.modal",()=>{t(e)}))}}})(Drupal)}};const t={};function n(i){const r=t[i];if(void 0!==r)return r.exports;const a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var i=0;i<t.length;){var r=t[i++],a=t[i++];n.o(e,r)?0===a&&i++:0===a?Object.defineProperty(e,r,{enumerable:!0,value:t[i++]}):Object.defineProperty(e,r,{enumerable:!0,get:a})}else for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";n(850),n(566),n(434),n(48),n(429),n(354),n(609),n(422),n(432),n(90),n(593),n(886),n(843),n(900),n(870),n(800),n(515),n(222),n(475),n(164),n(972),n(210)})()})(); 296 297(()=>{var e={900(){((e,Drupal)=>{Drupal.behaviors.flexera_embeded={attach:function(t){if(t!==document)return;window.addEventListener("message",e=>{if(e.data.isFlexeraIframe){const t=(e=>[].slice.call(document.getElementsByTagName("iframe")).filter(t=>t.contentWindow===e.source)[0])(e);t&&(t.style.height=`${e.data.calculatedHeight+4}px`)}},!1);const r=e("iframe[data-src]");r.length&&r.each((t,r)=>{let n=e(r).attr("data-src");const o=window.location;if(o.search.substring(1).length){const e=o.search.substring(1);let t="?";n.indexOf("?")>0&&(t="&"),n=n+t+e}e(r).attr({src:n})})}}})(jQuery,Drupal)},429(){((e,Drupal,t)=>{const r=(e,t)=>{e.style.height=`${e.offsetHeight}px`,e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=`${t}ms`,e.offsetHeight,e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,window.setTimeout(()=>{e.style.display="none",e.style.removeProperty("height"),e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")},t)},n=1199.98;Drupal.behaviors.menu={attach:function(o){const a=t("btn-burger",document.querySelector("header .btn-burger"),o);Array.isArray(a)&&a.length&&a[0].addEventListener("click",function(){e("header").addClass("active"),e(".mobile-menu").slideDown({start(){e(this).css({display:"flex"})}}),e("body").addClass("noscroll")});const s=t("btn-close",document.querySelector("header .btn-close"),o);Array.isArray(s)&&s.length&&s[0].addEventListener("click",function(){e("body").removeClass("noscroll"),e("header").removeClass("active"),e(".mobile-menu").slideUp(),e("header li.expanded").each(t=>{e(t).removeClass("expanded"),e(t).children("ul").toggle()})});const i=t("header-menu-items",document.querySelectorAll(".main-menu li.has-child > a, .main-menu li.has-child > span, .menu-level-1 > li.has-child > a, .menu-level-1 > li.has-child > span, .menu-level-2 > li.has-child > a, .menu-level-2 > li.has-child > span, .external-links li.has-child > a, .external-links li.has-child > span"),o);
297Array.isArray(i)&&i.length&&i.forEach(e=>{e.addEventListener("click",function(t){const o=window.innerWidth<n,a=t.currentTarget.getBoundingClientRect();if(t.clientX-a.left>(o?a.width-120:a.width-60)){t.stopPropagation();const n=e.parentElement;if(o||n.closest(".menu-level-2")||n.closest(".direction-column")){t.preventDefault();const e=n.querySelector("ul");n.classList.contains("expanded")?(n.classList.remove("expanded"),r(e,500)):(Array.from(n.parentElement.children).filter(e=>e!==n&&e.classList.contains("has-child")&&e.classList.contains("expanded")).forEach(e=>{e.classList.remove("expanded");const t=e.querySelector("ul");t&&r(t,500)}),n.classList.add("expanded"),((e,t)=>{e.style.removeProperty("display");let{display:r}=window.getComputedStyle(e);"none"===r&&(r="block"),e.style.display=r;const n=e.offsetHeight;e.style.overflow="hidden",e.style.height=0,e.style.paddingTop=0,e.style.paddingBottom=0,e.style.marginTop=0,e.style.marginBottom=0,e.offsetHeight,e.style.transitionProperty="height, margin, padding",e.style.transitionDuration=`${t}ms`,e.style.height=`${n}px`,e.style.removeProperty("padding-top"),e.style.removeProperty("padding-bottom"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-bottom"),window.setTimeout(()=>{e.style.removeProperty("height"),e.style.removeProperty("overflow"),e.style.removeProperty("transition-duration"),e.style.removeProperty("transition-property")},t)})(e,500))}}})}),e(window).resize(()=>{window.innerWidth>n&&e("header .mobile-menu").css({display:"flex"}),window.innerWidth<n&&e("header .mobile-menu").css({display:"none"})});const l=t("footer-menu-items",document.querySelectorAll(".footer__mainmenu .menu-level-0 > li.has-child > span, .footer__mainmenu .menu-level-0 > li.has-child > a"),o);Array.isArray(l)&&l.length&&l.forEach(t=>{t.addEventListener("click",function(t){e(window).width()<1199.98&&(t.preventDefault(),e(this).parent().hasClass("expanded")?(e(this).parent().removeClass("expanded"),e(this).parent().children("ul").toggle()):(e(this).parent().addClass("expanded"),e(this).parent().children("ul").toggle()))})});function c(){e(".layout-overlay").show()}function d(){e(".layout-overlay").hide()}function h(e){for(let t=0;t<e.length;t++)e[t].addEventListener("mouseover",c,!1),e[t].addEventListener("mouseout",d,!1)}h(document.querySelectorAll("header .menu-level-0 > .has-child"));h(document.getElementsByClassName("language_switcher"))}}})(jQuery,Drupal,once)},354(){(Drupal=>{Drupal.behaviors.reveneraSearchBar={attach:function(){const e={};e.body=document.body,e.searchContainer=document.querySelector(".revenera-search-desktop"),e.searchBar=e.searchContainer.querySelector(".search-bar"),e.openBtn=e.searchContainer.querySelector("#icon-nav-search"),e.closeBtn=e.searchContainer.querySelector("#icon-nav-search-close"),e.overlay=document.querySelector(".layout-overlay"),e.searchForms=document.querySelectorAll(".search-bar form");const t=()=>{e.searchBar.style.width=`${e.searchContainer.offsetLeft}px`},r=()=>{e.searchBar.style.width=0,e.overlay.style.display="none",e.body.classList.remove("search-focused"),window.removeEventListener("resize",t),window.removeEventListener("click",n)},n=t=>{!e.searchBar!==t.target&&e.searchContainer.contains(t.target)||r()};e.openBtn.addEventListener("click",r=>{r.preventDefault(),e.body.classList.add("search-focused"),e.overlay.style.display="inherit",e.searchBar.querySelector('[name="searchString"]').focus(),t(),window.addEventListener("resize",t),window.addEventListener("click",n)}),e.closeBtn.addEventListener("click",e=>{e.preventDefault(),r()}),[...e.searchForms].forEach(e=>{e.addEventListener("submit",e=>{e.preventDefault();const t=e.target.querySelector('[name="searchString"]').value;window.location.href=`/search-results#!/?searchString=${t}`});e.querySelector('[name="searchString"]').addEventListener("keydown",e=>{"Escape"===e.key&&r()})})}}})(Drupal)},972(){((e,Drupal,t)=>{Drupal.behaviors.table={attach:function(r){e("table .table--tab",r).on("click",function(){e(this).next("p").toggle()});const n=t("js-toggle-trigger",document.querySelectorAll(".js-toggle-trigger"),r);
297Array.isArray(n)&&n.length&&n.forEach(t=>{t.addEventListener("click",function(){const t=e(this).parent();t.addClass("js-toggle"),t.hasClass("active")?(t.removeClass("active"),t.parent().find(".u-hidden").slideToggle()):(t.addClass("active"),t.parent().find(".u-hidden").slideToggle())})})}}})(jQuery,Drupal,once)}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const a=t[n]={exports:{}};return e[n](a,a.exports,r),a.exports}r.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var o=t[n++],a=t[n++];r.o(e,o)?0===a&&n++:0===a?Object.defineProperty(e,o,{enumerable:!0,value:t[n++]}):Object.defineProperty(e,o,{enumerable:!0,get:a})}else for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";r(972),r(900),r(429),r(354)})()})(); 298 299(function(Drupal,drupalSettings,once){const sitewideAlertsSelector='[data-sitewide-alert]';const shouldShowOnThisPage=(pages=[],negate=true)=>{if(pages.length===0)return true;let pagePathMatches=false;const currentPath=window.location.pathname;for(let i=0;i<pages.length;i++){const baseUrl=drupalSettings.path.baseUrl.slice(0,-1);const page=baseUrl+pages[i];if(page.charAt(page.length-1)==='*'){if(currentPath.startsWith(page.substring(0,page.length-1))){pagePathMatches=true;break;}}else{if(page===currentPath){pagePathMatches=true;break;}}}return negate?!pagePathMatches:pagePathMatches;};const alertWasDismissed=(alert)=>{if(!alert.dismissible)return false;if(!(`alert-dismissed-${alert.uuid}` in window.localStorage))return false;const dismissedAtTimestamp=Number(window.localStorage.getItem(`alert-dismissed-${alert.uuid}`));return dismissedAtTimestamp>=alert.dismissalIgnoreBefore;};const updateLandmarkRole=()=>{const roots=document.querySelectorAll(sitewideAlertsSelector);roots.forEach((root)=>{const hasAlerts=root.querySelector('[data-uuid]')!==null;if(hasAlerts){root.setAttribute('role','region');root.setAttribute('aria-label',Drupal.t('Site alerts'));}else{root.removeAttribute('role');root.removeAttribute('aria-label');}});};const updateAlertCount=()=>{if(!drupalSettings.sitewideAlert.showCount)return;const roots=document.querySelectorAll(sitewideAlertsSelector);roots.forEach((root)=>{let count=0;const alerts=root.querySelectorAll('[data-uuid]');const totalCount=alerts.length;alerts.forEach((alert)=>{count++;const alertCountContainer=alert.querySelector('.alert-count');if(!alertCountContainer)return;alertCountContainer.innerHTML=Drupal.t('@current_count of @total_count alerts',{'@current_count':count,'@total_count':totalCount});});});};const removeAlert=(alert)=>{alert.dispatchEvent(new CustomEvent('sitewide-alert-removed',{bubbles:true,composed:true}));alert.remove();updateAlertCount();updateLandmarkRole();};const dismissAlert=(alert)=>{window.localStorage.setItem(`alert-dismissed-${alert.uuid}`,String(Math.round(new Date().getTime()/1000)));document.querySelectorAll(`[data-uuid="${alert.uuid}"]`).forEach((alert)=>{alert.dispatchEvent(new CustomEvent('sitewide-alert-dismissed',{bubbles:true,composed:true}));removeAlert(alert);});};const buildAlertElement=(alert)=>{const alertElement=document.createElement('div');alertElement.innerHTML=alert.renderedAlert;if(alert.dismissible){const dismissButtons=alertElement.getElementsByClassName('js-dismiss-button');for(let i=0;i<dismissButtons.length;i++)dismissButtons[i].addEventListener('click',()=>dismissAlert(alert));}return alertElement.firstElementChild;};const processSsrAlerts=()=>{const roots=document.querySelectorAll(sitewideAlertsSelector);roots.forEach((root)=>{const existingAlerts=root.querySelectorAll('[data-uuid]');existingAlerts.forEach((alertElement)=>{const uuid=alertElement.dataset.uuid;const dismissalIgnoreBefore=parseInt(alertElement.dataset.dismissalIgnoreBefore,10)||0;const isDismissible=alertElement.dataset.dismissible==='true';const alertData={uuid,dismissalIgnoreBefore,dismissible:isDismissible};if(alertWasDismissed(alertData)){removeAlert(alertElement);return;}if(isDismissible){const dismissButtons=alertElement.getElementsByClassName('js-dismiss-button');for(let i=0;i<dismissButtons.length;i++)dismissButtons[i].addEventListener('click',()=>dismissAlert(alertData));}});});};const fetchAlerts=()=>{const url=new URL(Drupal.url('sitewide_alert/load'),window.location.origin);url.username='';url.password='';return fetch(url.toString()).then((res)=>res.json()).then((result)=>result.sitewideAlerts,(error)=>{console.error(error);});};const removeStaleAlerts=(alerts)=>{const roots=document.querySelectorAll(sitewideAlertsSelector);
299roots.forEach((root)=>{const existingAlerts=root.querySelectorAll('[data-uuid]');const alertsToBeRemoved=Array.from(existingAlerts).filter((alert)=>!alerts.includes(alert.getAttribute('data-uuid')));alertsToBeRemoved.forEach((alert)=>removeAlert(alert));});};const initAlerts=()=>{const roots=document.querySelectorAll(sitewideAlertsSelector);fetchAlerts().then((alerts)=>{removeStaleAlerts(alerts.map((alert)=>alert.uuid));alerts.forEach((alert)=>{const dismissed=alertWasDismissed(alert);const showOnThisPage=shouldShowOnThisPage(alert.showOnPages,alert.negateShowOnPages);roots.forEach((root)=>{const existingAlertElement=root.querySelector(`[data-uuid="${alert.uuid}"]`);if(showOnThisPage&&!dismissed){if(existingAlertElement&&existingAlertElement.dataset.changed===alert.changed)return;const renderableAlertElement=buildAlertElement(alert);if(existingAlertElement)root.replaceChild(renderableAlertElement,existingAlertElement);else root.appendChild(renderableAlertElement);renderableAlertElement.dispatchEvent(new CustomEvent('sitewide-alert-rendered',{bubbles:true,composed:true}));Drupal.attachBehaviors(renderableAlertElement);return;}if((dismissed||!showOnThisPage)&&existingAlertElement)removeAlert(existingAlertElement);});updateAlertCount();});updateLandmarkRole();});};const supportsHistoryPushState=()=>{return 'pushState' in window.history&&window.history.pushState!==null;};const supportsHistoryReplaceState=()=>{return ('replaceState' in window.history&&window.history.replaceState!==null);};const triggerHistoryEvent=(thisArg,argArray)=>{const event=new CustomEvent('sitewidealerts.popstate',{detail:{state:thisArg,options:argArray}});window.dispatchEvent(event);};const proxyPushState=()=>{if(supportsHistoryPushState())window.history.pushState=new Proxy(window.history.pushState,{apply(target,thisArg,argArray){triggerHistoryEvent(thisArg,argArray);return target.apply(thisArg,argArray);}});if(supportsHistoryReplaceState())window.history.replaceState=new Proxy(window.history.replaceState,{apply(target,thisArg,argArray){triggerHistoryEvent(thisArg,argArray);return target.apply(thisArg,argArray);}});};function debounce(func,wait,immediate){let timeout;return function(...args){const context=this;const later=function(){timeout=null;if(!immediate)func.apply(context,args);};const callNow=immediate&&!timeout;clearTimeout(timeout);timeout=setTimeout(later,wait);if(callNow)func.apply(context,args);};}const historyListener=()=>{const debounced=debounce(initAlerts,2000);window.addEventListener('sitewidealerts.popstate',debounced);window.addEventListener('popstate',debounced);};Drupal.behaviors.sitewide_alert_init={attach:(context)=>{once('sitewide_alerts_init','html',context).forEach(()=>{processSsrAlerts();updateLandmarkRole();if(drupalSettings.sitewideAlert.serverSideRender!==true)initAlerts();proxyPushState();historyListener();if(drupalSettings.sitewideAlert.automaticRefresh===true){const interval=setInterval(()=>initAlerts(),drupalSettings.sitewideAlert.refreshInterval<1000?1000:drupalSettings.sitewideAlert.refreshInterval);if(!drupalSettings.sitewideAlert.automaticRefresh)clearInterval(interval);}});}};})(Drupal,drupalSettings,once);; 300/* @license GPL-2.0-or-later https://raw.githubusercontent.com/jquery-form/form/master/LICENSE */ 301(function(factory){if(typeof define==='function'&&define.amd)define(['jquery'],factory);else if(typeof module==='object'&&module.exports)module.exports=function(root,jQuery){if(typeof jQuery==='undefined')if(typeof window!=='undefined')jQuery=require('jquery');else jQuery=require('jquery')(root);factory(jQuery);return jQuery;};else factory(jQuery);}(function($){'use strict';var rCRLF=/\r?\n/g;var feature={};feature.fileapi=$('<input type="file">').get(0).files!==undefined;feature.formdata=(typeof window.FormData!=='undefined');var hasProp=!!$.fn.prop;$.fn.attr2=function(){if(!hasProp)return this.attr.apply(this,arguments);var val=this.prop.apply(this,arguments);if((val&&val.jquery)||typeof val==='string')return val;return this.attr.apply(this,arguments);};$.fn.ajaxSubmit=function(options,data,dataType,onSuccess){if(!this.length){log('ajaxSubmit: ski
301pping submit process - no element selected');return this;}var method,action,url,isMsie,iframeSrc,$form=this;if(typeof options==='function')options={success:options};else if(typeof options==='string'||(options===false&&arguments.length>0)){options={'url':options,'data':data,'dataType':dataType};if(typeof onSuccess==='function')options.success=onSuccess;}else{if(typeof options==='undefined')options={};}method=options.method||options.type||this.attr2('method');action=options.url||this.attr2('action');url=(typeof action==='string')?action.trim():'';url=url||window.location.href||'';if(url)url=(url.match(/^([^#]+)/)||[])[1];isMsie=/(MSIE|Trident)/.test(navigator.userAgent||'');iframeSrc=(isMsie&&/^https/i.test(window.location.href||''))?'javascript:false':'about:blank';options=$.extend(true,{url,success:$.ajaxSettings.success,type:method||$.ajaxSettings.type,iframeSrc},options);var veto={};this.trigger('form-pre-serialize',[this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-pre-serialize trigger');return this;}if(options.beforeSerialize&&options.beforeSerialize(this,options)===false){log('ajaxSubmit: submit aborted via beforeSerialize callback');return this;}var traditional=options.traditional;if(typeof traditional==='undefined')traditional=$.ajaxSettings.traditional;var elements=[];var qx,a=this.formToArray(options.semantic,elements,options.filtering);if(options.data){var optionsData=typeof (options.data)==="function"?options.data(a):options.data;options.extraData=optionsData;qx=$.param(optionsData,traditional);}if(options.beforeSubmit&&options.beforeSubmit(a,this,options)===false){log('ajaxSubmit: submit aborted via beforeSubmit callback');return this;}this.trigger('form-submit-validate',[a,this,options,veto]);if(veto.veto){log('ajaxSubmit: submit vetoed via form-submit-validate trigger');return this;}var q=$.param(a,traditional);if(qx)q=(q?(q+'&'+qx):qx);if(options.type.toUpperCase()==='GET'){options.url+=(options.url.indexOf('?')>=0?'&':'?')+q;options.data=null;}else options.data=q;var callbacks=[];if(options.resetForm)callbacks.push(function(){$form.resetForm();});if(options.clearForm)callbacks.push(function(){$form.clearForm(options.includeHidden);});if(!options.dataType&&options.target){var oldSuccess=options.success||function(){};callbacks.push(function(data,textStatus,jqXHR){var successArguments=arguments,fn=options.replaceTarget?'replaceWith':'html';$(options.target)[fn](data).each(function(){oldSuccess.apply(this,successArguments);});});}else{if(options.success)if(Array.isArray(options.success))callbacks=callbacks.concat(options.success);else callbacks.push(options.success);}options.success=function(data,status,xhr){var context=options.context||this;for(var i=0,max=callbacks.length;i<max;i++)callbacks[i].apply(context,[data,status,xhr||$form,$form]);};if(options.error){var oldError=options.error;options.error=function(xhr,status,error){var context=options.context||this;oldError.apply(context,[xhr,status,error,$form]);};}if(options.complete){var oldComplete=options.complete;options.complete=function(xhr,status){var context=options.context||this;oldComplete.apply(context,[xhr,status,$form]);};}var fileInputs=$('input[type=file]:enabled',this).filter(function(){return $(this).val()!=='';});var hasFileInputs=fileInputs.length>0;var mp='multipart/form-data';var multipart=($form.attr('enctype')===mp||$form.attr('encoding')===mp);var fileAPI=feature.fileapi&&feature.formdata;log('fileAPI :'+fileAPI);var shouldUseFrame=(hasFileInputs||multipart)&&!fileAPI;var jqxhr;if(options.iframe!==false&&(options.iframe||shouldUseFrame))if(options.closeKeepAlive)$.get(options.closeKeepAlive,function(){jqxhr=fileUploadIframe(a);});else jqxhr=fileUploadIframe(a);else if((hasFileInputs||multipart)&&fileAPI)jqxhr=fileUploadXhr(a);else jqxhr=$.ajax(options);$form.removeData('jqxhr').data('jqxhr',jqxhr);for(var k=0;k<elements.length;k++)elements[k]=null;this.trigger('form-submit-notify',[this,options]);return this;function deepSerialize(extraData){var serialized=$.param(extraData,options.traditional).split('&');var len=serialized.length;var result=[];var i,part;for(i=0;i<len;i++){serialized[i]=serialized[i].replace(/\+/g,' ');part=serialized[i].split('=');result.push([decodeURIComponent(part[0]),decodeURIComponent(part[1])]);}return result;}function fileUploadXhr(a){var formdata=new FormData();for(var i=0;i<a.length;i++)formdata.append(a[i].name,a[i].value);if(options.extraData){var serializedData=deepSerialize(options.extraData);for(i=0;i<serializedData.length;i++)if(serializedData[i])formdata.append(serializedData[i][0],serializedData[i][1]);}options.data=null;var s=$.extend(true,{},$.ajaxSettings,options,{contentType:false,processData:false,cache:false,type:method||'POST'});if(options.uploadProgress)s.xhr=function(){var xhr=$.ajaxSettings.xhr();if(xhr.upload)xhr.upload.addEventListener('progress',function(event){var percent=0;var position=event.loaded||event.position;var total=event.total;if(event.lengthComputable)percent=Math.ceil(position/total*100);options.uploadProgress(event,position,total,percent);},false);return xhr;};s.data=null;var beforeSend=s.beforeSend;s.beforeSend=function(xhr,o){if(options.formData)o.data=options.formData;else o.data=formdata;
301if(beforeSend)beforeSend.call(this,xhr,o);};return $.ajax(s);}function fileUploadIframe(a){var form=$form[0],el,i,s,g,id,$io,io,xhr,sub,n,timedOut,timeoutHandle;var deferred=$.Deferred();deferred.abort=function(status){xhr.abort(status);};if(a)for(i=0;i<elements.length;i++){el=$(elements[i]);if(hasProp)el.prop('disabled',false);else el.removeAttr('disabled');}s=$.extend(true,{},$.ajaxSettings,options);s.context=s.context||s;id='jqFormIO'+new Date().getTime();var ownerDocument=form.ownerDocument;var $body=$form.closest('body');if(s.iframeTarget){$io=$(s.iframeTarget,ownerDocument);n=$io.attr2('name');if(!n)$io.attr2('name',id);else id=n;}else{$io=$('<iframe name="'+id+'" src="'+s.iframeSrc+'" />',ownerDocument);$io.css({position:'absolute',top:'-1000px',left:'-1000px'});}io=$io[0];xhr={aborted:0,responseText:null,responseXML:null,status:0,statusText:'n/a',getAllResponseHeaders:function(){},getResponseHeader:function(){},setRequestHeader:function(){},abort:function(status){var e=(status==='timeout'?'timeout':'aborted');log('aborting upload... '+e);this.aborted=1;try{if(io.contentWindow.document.execCommand)io.contentWindow.document.execCommand('Stop');}catch(ignore){}$io.attr('src',s.iframeSrc);xhr.error=e;if(s.error)s.error.call(s.context,xhr,e,status);if(g)$.event.trigger('ajaxError',[xhr,s,e]);if(s.complete)s.complete.call(s.context,xhr,e);}};g=s.global;if(g&&$.active++===0)$.event.trigger('ajaxStart');if(g)$.event.trigger('ajaxSend',[xhr,s]);if(s.beforeSend&&s.beforeSend.call(s.context,xhr,s)===false){if(s.global)$.active--;deferred.reject();return deferred;}if(xhr.aborted){deferred.reject();return deferred;}sub=form.clk;if(sub){n=sub.name;if(n&&!sub.disabled){s.extraData=s.extraData||{};s.extraData[n]=sub.value;if(sub.type==='image'){s.extraData[n+'.x']=form.clk_x;s.extraData[n+'.y']=form.clk_y;}}}var CLIENT_TIMEOUT_ABORT=1;var SERVER_ABORT=2;function getDoc(frame){var doc=null;try{if(frame.contentWindow)doc=frame.contentWindow.document;}catch(err){log('cannot get iframe.contentWindow document: '+err);}if(doc)return doc;try{doc=frame.contentDocument?frame.contentDocument:frame.document;}catch(err){log('cannot get iframe.contentDocument: '+err);doc=frame.document;}return doc;}var csrf_token=$('meta[name=csrf-token]').attr('content');var csrf_param=$('meta[name=csrf-param]').attr('content');if(csrf_param&&csrf_token){s.extraData=s.extraData||{};s.extraData[csrf_param]=csrf_token;}function doSubmit(){var t=$form.attr2('target'),a=$form.attr2('action'),mp='multipart/form-data',et=$form.attr('enctype')||$form.attr('encoding')||mp;form.setAttribute('target',id);if(!method||/post/i.test(method))form.setAttribute('method','POST');if(a!==s.url)form.setAttribute('action',s.url);if(!s.skipEncodingOverride&&(!method||/post/i.test(method)))$form.attr({encoding:'multipart/form-data',enctype:'multipart/form-data'});if(s.timeout)timeoutHandle=setTimeout(function(){timedOut=true;cb(CLIENT_TIMEOUT_ABORT);},s.timeout);function checkState(){try{var state=getDoc(io).readyState;log('state = '+state);if(state&&state.toLowerCase()==='uninitialized')setTimeout(checkState,50);}catch(e){log('Server abort: ',e,' (',e.name,')');cb(SERVER_ABORT);if(timeoutHandle)clearTimeout(timeoutHandle);timeoutHandle=undefined;}}var extraInputs=[];try{if(s.extraData)for(var n in s.extraData)if(s.extraData.hasOwnProperty(n))if($.isPlainObject(s.extraData[n])&&s.extraData[n].hasOwnProperty('name')&&s.extraData[n].hasOwnProperty('value'))extraInputs.push($('<input type="hidden" name="'+s.extraData[n].name+'">',ownerDocument).val(s.extraData[n].value).appendTo(form)[0]);else extraInputs.push($('<input type="hidden" name="'+n+'">',ownerDocument).val(s.extraData[n]).appendTo(form)[0]);if(!s.iframeTarget)$io.appendTo($body);if(io.attachEvent)io.attachEvent('onload',cb);else io.addEventListener('load',cb,false);setTimeout(checkState,15);try{form.submit();}catch(err){var submitFn=document.createElement('form').submit;submitFn.apply(form);}}finally{form.setAttribute('action',a);form.setAttribute('enctype',et);if(t)form.setAttribute('target',t);else $form.removeAttr('target');$(extraInputs).remove();}}if(s.forceSync)doSubmit();else setTimeout(doSubmit,10);var data,doc,domCheckCount=50,callbackProcessed;function cb(e){if(xhr.aborted||callbackProcessed)return;doc=getDoc(io);if(!doc){log('cannot access response document');e=SERVER_ABORT;}if(e===CLIENT_TIMEOUT_ABORT&&xhr){xhr.abort('timeout');deferred.reject(xhr,'timeout');return;}if(e===SERVER_ABORT&&xhr){xhr.abort('server abort');deferred.reject(xhr,'error','server abort');return;}if(!doc||doc.location.href===s.iframeSrc)if(!timedOut)return;if(io.detachEvent)io.detachEvent('onload',cb);else io.removeEventListener('load',cb,false);var status='success',errMsg;
301try{if(timedOut)throw 'timeout';var isXml=s.dataType==='xml'||doc.XMLDocument||$.isXMLDoc(doc);log('isXml='+isXml);if(!isXml&&window.opera&&(doc.body===null||!doc.body.innerHTML))if(--domCheckCount){log('requeing onLoad callback, DOM not available');setTimeout(cb,250);return;}var docRoot=doc.body?doc.body:doc.documentElement;xhr.responseText=docRoot?docRoot.innerHTML:null;xhr.responseXML=doc.XMLDocument?doc.XMLDocument:doc;if(isXml)s.dataType='xml';xhr.getResponseHeader=function(header){var headers={'content-type':s.dataType};return headers[header.toLowerCase()];};if(docRoot){xhr.status=Number(docRoot.getAttribute('status'))||xhr.status;xhr.statusText=docRoot.getAttribute('statusText')||xhr.statusText;}var dt=(s.dataType||'').toLowerCase();var scr=/(json|script|text)/.test(dt);if(scr||s.textarea){var ta=doc.getElementsByTagName('textarea')[0];if(ta){xhr.responseText=ta.value;xhr.status=Number(ta.getAttribute('status'))||xhr.status;xhr.statusText=ta.getAttribute('statusText')||xhr.statusText;}else{if(scr){var pre=doc.getElementsByTagName('pre')[0];var b=doc.getElementsByTagName('body')[0];if(pre)xhr.responseText=pre.textContent?pre.textContent:pre.innerText;else{if(b)xhr.responseText=b.textContent?b.textContent:b.innerText;}}}}else{if(dt==='xml'&&!xhr.responseXML&&xhr.responseText)xhr.responseXML=toXml(xhr.responseText);}try{data=httpData(xhr,dt,s);}catch(err){status='parsererror';xhr.error=errMsg=(err||status);}}catch(err){log('error caught: ',err);status='error';xhr.error=errMsg=(err||status);}if(xhr.aborted){log('upload aborted');status=null;}if(xhr.status)status=((xhr.status>=200&&xhr.status<300)||xhr.status===304)?'success':'error';if(status==='success'){if(s.success)s.success.call(s.context,data,'success',xhr);deferred.resolve(xhr.responseText,'success',xhr);if(g)$.event.trigger('ajaxSuccess',[xhr,s]);}else{if(status){if(typeof errMsg==='undefined')errMsg=xhr.statusText;if(s.error)s.error.call(s.context,xhr,status,errMsg);deferred.reject(xhr,'error',errMsg);if(g)$.event.trigger('ajaxError',[xhr,s,errMsg]);}}if(g)$.event.trigger('ajaxComplete',[xhr,s]);if(g&&!--$.active)$.event.trigger('ajaxStop');if(s.complete)s.complete.call(s.context,xhr,status);callbackProcessed=true;if(s.timeout)clearTimeout(timeoutHandle);setTimeout(function(){if(!s.iframeTarget)$io.remove();else $io.attr('src',s.iframeSrc);xhr.responseXML=null;},100);}var toXml=$.parseXML||function(s,doc){if(window.ActiveXObject){doc=new ActiveXObject('Microsoft.XMLDOM');doc.async='false';doc.loadXML(s);}else doc=(new DOMParser()).parseFromString(s,'text/xml');return (doc&&doc.documentElement&&doc.documentElement.nodeName!=='parsererror')?doc:null;};var httpData=function(xhr,type,s){var ct=xhr.getResponseHeader('content-type')||'',xml=((type==='xml'||!type)&&ct.indexOf('xml')>=0),data=xml?xhr.responseXML:xhr.responseText;if(xml&&data.documentElement.nodeName==='parsererror')if($.error)$.error('parsererror');if(s&&s.dataFilter)data=s.dataFilter(data,type);if(typeof data==='string')if((type==='json'||!type)&&ct.indexOf('json')>=0)data=JSON.parse(data);else{if((type==='script'||!type)&&ct.indexOf('javascript')>=0)$.globalEval(data);}return data;};return deferred;}};$.fn.ajaxForm=function(options,data,dataType,onSuccess){if(typeof options==='string'||(options===false&&arguments.length>0)){options={'url':options,'data':data,'dataType':dataType};if(typeof onSuccess==='function')options.success=onSuccess;}options=options||{};options.delegation=options.delegation&&typeof $.fn.on==='function';if(!options.delegation&&this.length===0){var o={s:this.selector,c:this.context};if(!$.isReady&&o.s){log('DOM not ready, queuing ajaxForm');$(function(){$(o.s,o.c).ajaxForm(options);});return this;}log('terminating; zero elements found by selector'+($.isReady?'':' (DOM not ready)'));return this;}if(options.delegation){$(document).off('submit.form-plugin',this.selector,doAjaxSubmit).off('click.form-plugin',this.selector,captureSubmittingElement).on('submit.form-plugin',this.selector,options,doAjaxSubmit).on('click.form-plugin',this.selector,options,captureSubmittingElement);return this;}if(options.beforeFormUnbind)options.beforeFormUnbind(this,options);return this.ajaxFormUnbind().on('submit.form-plugin',options,doAjaxSubmit).on('click.form-plugin',options,captureSubmittingElement);};function doAjaxSubmit(e){var options=e.data;if(!e.isDefaultPrevented()){e.preventDefault();$(e.target).closest('form').ajaxSubmit(options);}}function captureSubmittingElement(e){var target=e.target;var $el=$(target);if(!$el.is('[type=submit],[type=image]')){var t=$el.closest('[type=submit]');if(t.length===0)return;target=t[0];}var form=target.form;form.clk=target;if(target.type==='image')if(typeof e.offsetX!=='undefined'){form.clk_x=e.offsetX;form.clk_y=e.offsetY;}else if(typeof $.fn.offset==='function'){var offset=$el.offset();form.clk_x=e.pageX-offset.left;form.clk_y=e.pageY-offset.top;}else{form.clk_x=e.pageX-target.offsetLeft;form.clk_y=e.pageY-target.offsetTop;}setTimeout(function(){form.clk=form.clk_x=form.clk_y=null;},100);}$.fn.ajaxFormUnbind=function(){return this.off('submit.form-plugin click.form-plugin');};$.fn.formToArray=function(semantic,elements,filtering){var a=[];if(this.length===0)return a;var form=this[0];var formId=this.attr('id');var els=(semantic||typeof form.elements==='undefined')?form.getElementsByTagName('*'):form.elements;var els2;if(els)els=$.makeArray(els);if(formId&&(semantic||/(Edge|Trident)\//.test(navigator.userAgent))){els2=$(':input[form="'+formId+'"]').get();if(els2.length)els=(els||[]).concat(els2);}if(!els||!els.length)return a;
301if(typeof (filtering)==="function")els=$.map(els,filtering);var i,j,n,v,el,max,jmax;for(i=0,max=els.length;i<max;i++){el=els[i];n=el.name;if(!n||el.disabled)continue;if(semantic&&form.clk&&el.type==='image'){if(form.clk===el){a.push({name:n,value:$(el).val(),type:el.type});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}continue;}v=$.fieldValue(el,true);if(v&&v.constructor===Array){if(elements)elements.push(el);for(j=0,jmax=v.length;j<jmax;j++)a.push({name:n,value:v[j]});}else if(feature.fileapi&&el.type==='file'){if(elements)elements.push(el);var files=el.files;if(files.length)for(j=0;j<files.length;j++)a.push({name:n,value:files[j],type:el.type});else a.push({name:n,value:'',type:el.type});}else{if(v!==null&&typeof v!=='undefined'){if(elements)elements.push(el);a.push({name:n,value:v,type:el.type,required:el.required});}}}if(!semantic&&form.clk){var $input=$(form.clk),input=$input[0];n=input.name;if(n&&!input.disabled&&input.type==='image'){a.push({name:n,value:$input.val()});a.push({name:n+'.x',value:form.clk_x},{name:n+'.y',value:form.clk_y});}}return a;};$.fn.formSerialize=function(semantic){return $.param(this.formToArray(semantic));};$.fn.fieldSerialize=function(successful){var a=[];this.each(function(){var n=this.name;if(!n)return;var v=$.fieldValue(this,successful);if(v&&v.constructor===Array)for(var i=0,max=v.length;i<max;i++)a.push({name:n,value:v[i]});else{if(v!==null&&typeof v!=='undefined')a.push({name:this.name,value:v});}});return $.param(a);};$.fn.fieldValue=function(successful){for(var val=[],i=0,max=this.length;i<max;i++){var el=this[i];var v=$.fieldValue(el,successful);if(v===null||typeof v==='undefined'||(v.constructor===Array&&!v.length))continue;if(Array.isArray(v))val=val.concat(v);else val.push(v);}return val;};$.fieldValue=function(el,successful){var n=el.name,t=el.type,tag=el.tagName.toLowerCase();if(typeof successful==='undefined')successful=true;if(successful&&(!n||el.disabled||t==='reset'||t==='button'||(t==='checkbox'||t==='radio')&&!el.checked||(t==='submit'||t==='image')&&el.form&&el.form.clk!==el||tag==='select'&&el.selectedIndex===-1))return null;if(tag==='select'){var index=el.selectedIndex;if(index<0)return null;var a=[],ops=el.options;var one=(t==='select-one');var max=(one?index+1:ops.length);for(var i=(one?index:0);i<max;i++){var op=ops[i];if(op.selected&&!op.disabled){var v=op.value;if(!v)v=(op.attributes&&op.attributes.value&&!(op.attributes.value.specified))?op.text:op.value;if(one)return v;a.push(v);}}return a;}return $(el).val().replace(rCRLF,'\r\n');};$.fn.clearForm=function(includeHidden){return this.each(function(){$('input,select,textarea',this).clearFields(includeHidden);});};$.fn.clearFields=$.fn.clearInputs=function(includeHidden){var re=/^(?:color|date|datetime|email|month|number|password|range|search|tel|text|time|url|week)$/i;return this.each(function(){var t=this.type,tag=this.tagName.toLowerCase();if(re.test(t)||tag==='textarea')this.value='';else if(t==='checkbox'||t==='radio')this.checked=false;else if(tag==='select')this.selectedIndex=-1;else if(t==='file')if(/MSIE/.test(navigator.userAgent))$(this).replaceWith($(this).clone(true));else $(this).val('');else{if(includeHidden)if((includeHidden===true&&/hidden/.test(t))||(typeof includeHidden==='string'&&$(this).is(includeHidden)))this.value='';}});};$.fn.resetForm=function(){return this.each(function(){var el=$(this);var tag=this.tagName.toLowerCase();switch(tag){case 'input':this.checked=this.defaultChecked;case 'textarea':this.value=this.defaultValue;return true;case 'option':case 'optgroup':var select=el.parents('select');if(select.length&&select[0].multiple)if(tag==='option')this.selected=this.defaultSelected;else el.find('option').resetForm();else select.resetForm();return true;case 'select':el.find('option').each(function(i){this.selected=this.defaultSelected;if(this.defaultSelected&&!el[0].multiple){el[0].selectedIndex=i;return false;}});return true;case 'label':var forEl=$(el.attr('for'));var list=el.find('input,select,textarea');if(forEl[0])list.unshift(forEl[0]);list.resetForm();return true;case 'form':if(typeof this.reset==='function'||(typeof this.reset==='object'&&!this.reset.nodeType))this.reset();return true;default:el.find('form,input,label,select,textarea').resetForm();return true;}}
301);};$.fn.enable=function(b){if(typeof b==='undefined')b=true;return this.each(function(){this.disabled=!b;});};$.fn.selected=function(select){if(typeof select==='undefined')select=true;return this.each(function(){var t=this.type;if(t==='checkbox'||t==='radio')this.checked=select;else{if(this.tagName.toLowerCase()==='option'){var $sel=$(this).parent('select');if(select&&$sel[0]&&$sel[0].type==='select-one')$sel.find('option').selected(false);this.selected=select;}}});};$.fn.ajaxSubmit.debug=false;function log(){if(!$.fn.ajaxSubmit.debug)return;var msg='[jquery.form] '+Array.prototype.join.call(arguments,'');if(window.console&&window.console.log)window.console.log(msg);else{if(window.opera&&window.opera.postError)window.opera.postError(msg);}}}));; 302/* @license GPL-2.0-or-later https://www.drupal.org/licensing/faq */ 303(function($,Drupal,drupalSettings){Drupal.Views={};Drupal.Views.parseQueryString=function(query){const args={};if(query.includes('?'))query=query.substring(query.indexOf('?')+1);let pair;const pairs=query.split('&');for(let i=0;i<pairs.length;i++){pair=pairs[i].split('=');if(pair[0]!=='q')if(pair[1])args[decodeURIComponent(pair[0].replace(/\+/g,' '))]=decodeURIComponent(pair[1].replace(/\+/g,' '));else args[decodeURIComponent(pair[0].replace(/\+/g,' '))]='';}return args;};Drupal.Views.parseViewArgs=function(href,viewPath){const returnObj={};const path=Drupal.Views.getPath(href);const viewHref=Drupal.url(viewPath).substring(drupalSettings.path.baseUrl.length);if(viewHref&&path.startsWith(`${viewHref}/`)){returnObj.view_args=decodeURIComponent(path.substring(viewHref.length+1,path.length));returnObj.view_path=path;}return returnObj;};Drupal.Views.pathPortion=function(href){const protocol=window.location.protocol;if(href.startsWith(protocol))href=href.substring(href.indexOf('/',protocol.length+2));return href;};Drupal.Views.getPath=function(href){href=Drupal.Views.pathPortion(href);href=href.substring(drupalSettings.path.baseUrl.length,href.length);if(href.startsWith('?q='))href=href.substring(3,href.length);const chars=['#','?','&'];for(let i=0;i<chars.length;i++)if(href.includes(chars[i]))href=href.substring(0,href.indexOf(chars[i]));return href;};})(jQuery,Drupal,drupalSettings);; 304(function($,Drupal,drupalSettings){Drupal.behaviors.ViewsAjaxView={};Drupal.behaviors.ViewsAjaxView.attach=function(context,settings){if(settings?.views?.ajaxViews){const {views:{ajaxViews}}=settings;Object.keys(ajaxViews||{}).forEach((i)=>{Drupal.views.instances[i]=new Drupal.views.ajaxView(ajaxViews[i]);});}};Drupal.behaviors.ViewsAjaxView.detach=(context,settings,trigger)=>{if(trigger==='unload')if(settings?.views?.ajaxViews){const {views:{ajaxViews}}=settings;Object.keys(ajaxViews||{}).forEach((i)=>{const selector=`.js-view-dom-id-${ajaxViews[i].view_dom_id}`;if($(selector,context).length){delete Drupal.views.instances[i];delete settings.views.ajaxViews[i];}});}};Drupal.views={};Drupal.views.instances={};Drupal.views.ajaxView=function(settings){const selector=`.js-view-dom-id-${settings.view_dom_id}`;this.$view=$(selector);this.$exposed_form=$(`form#views-exposed-form-${settings.view_name.replace(/_/g,'-')}-${settings.view_display_id.replace(/_/g,'-')}`);let ajaxPath=drupalSettings.views.ajax_path;if(ajaxPath.constructor.toString().includes('Array'))ajaxPath=ajaxPath[0];let queryString=window.location.search||'';if(queryString!==''){queryString=queryString.slice(1);const params=decodeURI(queryString).split('&').filter((param)=>{const [name,value]=param.split('=');return (this.$exposed_form.find(`input[name="${name}"]`).length===0&&!['page','reset','sort','order','q','render'].includes(name));});queryString=encodeURI(params.join('&'));if(queryString!=='')queryString=(ajaxPath.includes('?')?'&':'?')+queryString;}this.element_settings={url:ajaxPath+queryString,submit:settings,httpMethod:'GET',setClick:true,event:'click',selector,progress:{type:'fullscreen'}};this.settings=settings;once('exposed-form',this.$exposed_form).forEach(this.attachExposedFormAjax.bind(this));once('ajax-pager',this.$view.filter(this.filterNestedViews.bind(this))).forEac
304h(this.attachPagerAjax.bind(this));const selfSettings=$.extend({},this.element_settings,{event:'RefreshView',base:this.selector,httpMethod:'GET',element:this.$view.get(0)});this.refreshViewAjax=Drupal.ajax(selfSettings);};Drupal.views.ajaxView.prototype.attachExposedFormAjax=function(){const that=this;this.exposedFormAjax=[];$('input[type=submit], button[type=submit], input[type=image]',this.$exposed_form).not('[data-drupal-selector=edit-reset]').not('[data-views-ajax-submit-disabled]').each(function(index){const selfSettings=$.extend({},that.element_settings,{base:$(this).attr('id'),element:this});that.exposedFormAjax[index]=Drupal.ajax(selfSettings);});};Drupal.views.ajaxView.prototype.filterNestedViews=function(){return !this.$view.parents('.view').length;};Drupal.views.ajaxView.prototype.attachPagerAjax=function(){this.$view.find('.js-pager__items a, th.views-field a, .attachment .views-summary a').each(this.attachPagerLinkAjax.bind(this));};Drupal.views.ajaxView.prototype.attachPagerLinkAjax=function(id,link){const $link=$(link);const viewData={};const href=$link.attr('href');$.extend(viewData,this.settings,Drupal.Views.parseQueryString(href),Drupal.Views.parseViewArgs(href,this.settings.view_base_path));const selfSettings=$.extend({},this.element_settings,{submit:viewData,base:false,element:link,httpMethod:'GET'});this.pagerAjax=Drupal.ajax(selfSettings);};Drupal.AjaxCommands.prototype.setBrowserUrl=(ajax,response)=>{if(ajax.element&&!ajax.element.closest('.ui-dialog-content'))window.history.replaceState(null,'',response.url);};})(jQuery,Drupal,drupalSettings);; 305(function($,Drupal,debounce){"use strict";var $window=$(window);var scrollThreshold=200;var automaticPagerSelector='[data-drupal-views-infinite-scroll-pager="automatic"]';var pagerSelector='[data-drupal-views-infinite-scroll-pager]';var contentWrapperSelector='[data-drupal-views-infinite-scroll-content-wrapper]';var scrollEvent='scroll.views_infinite_scroll';$.fn.infiniteScrollInsertView=function($newView){var matches=/(js-view-dom-id-\w+)/.exec(this.attr('class'));if(!matches)return;var currentViewId=matches[1].replace('js-view-dom-id-','views_dom_id:');var view=Drupal.views.instances[currentViewId];once.remove('ajax-pager',view.$view);once.remove('exposed-form',view.$exposed_form);var $existingPager=view.$view.find(pagerSelector);once.remove('infinite-scroll',$existingPager);var $newRows=$newView.find(contentWrapperSelector).children();var $newPager=$newView.find(pagerSelector);view.$view.find(contentWrapperSelector).trigger('views_infinite_scroll.new_content',$newRows.clone()).append($newRows);$existingPager.replaceWith($newPager);Drupal.attachBehaviors(view.$view[0]);};Drupal.behaviors.views_infinite_scroll_automatic={attach:function(context,settings){once('infinite-scroll',automaticPagerSelector,context).forEach(function(elem){var $pager=$(elem);$pager.addClass('visually-hidden');var isLoadNeeded=function(){return window.innerHeight+window.pageYOffset>$pager.offset().top-scrollThreshold;};$window.on(scrollEvent,debounce(function(){if(isLoadNeeded()){$pager.find('[rel=next]').click();$window.off(scrollEvent);}},200));if(isLoadNeeded())$window.trigger(scrollEvent);});},detach:function(context,settings,trigger){if(trigger==='unload')if(once.remove('infinite-scroll',automaticPagerSelector,context).length)$window.off(scrollEvent);}};Drupal.views.ajaxView.prototype.filterNestedViews=function(){return this.$view.hasClass('view-eva')||!this.$view.parents('.view').length;};})(jQuery,Drupal,Drupal.debounce);;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.