Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@pelagiccreatures/sargasso

Package Overview
Dependencies
Maintainers
1
Versions
88
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@pelagiccreatures/sargasso - npm Package Compare versions

Comparing version 2.2.6 to 2.3.0

dist/modules/MDCTextField.mjs

14

.eslintrc.json

@@ -1,13 +0,12 @@

{
module.exports = {
"env": {
"browser": true,
"es6": true
"es2021": true
},
"extends": [
"eslint:recommended"
"standard"
],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module",
"allowImportExportEverywhere": true
"ecmaVersion": "latest",
"sourceType": "module"
},

@@ -19,4 +18,5 @@ "rules": {

"no-tabs": 0,
"indent": ["error", "tab"]
"indent": ["error", "tab"],
"quotes": "off"
}
}

@@ -1,2 +0,9 @@

var SargassoModule=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var r="object"==typeof t&&t&&t.Object===Object&&t,s=r,n="object"==typeof self&&self&&self.Object===Object&&self,i=s||n||Function("return this")(),o=i.Symbol;var a=function arrayMap$1(e,t){for(var r=-1,s=null==e?0:e.length,n=Array(s);++r<s;)n[r]=t(e[r],r,e);return n},c=Array.isArray,l=o,u=Object.prototype,h=u.hasOwnProperty,d=u.toString,p=l?l.toStringTag:void 0;var f=function getRawTag$1(e){var t=h.call(e,p),r=e[p];try{e[p]=void 0;var s=!0}catch(e){}var n=d.call(e);return s&&(t?e[p]=r:delete e[p]),n},b=Object.prototype.toString;var g=f,v=function objectToString$1(e){return b.call(e)},m=o?o.toStringTag:void 0;var w=function baseGetTag$5(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":m&&m in Object(e)?g(e):v(e)};var y=function isObjectLike$5(e){return null!=e&&"object"==typeof e},_=w,O=y;var x=function isSymbol$2(e){return"symbol"==typeof e||O(e)&&"[object Symbol]"==_(e)},j=a,S=c,E=x,k=o?o.prototype:void 0,A=k?k.toString:void 0;var C=function baseToString$1(e){if("string"==typeof e)return e;if(S(e))return j(e,baseToString$1)+"";if(E(e))return A?A.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},D=C;var $=function toString$4(e){return null==e?"":D(e)};var M=function baseSlice$1(e,t,r){var s=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(r=r>n?n:r)<0&&(r+=n),n=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(n);++s<n;)i[s]=e[s+t];return i};var P=function castSlice$1(e,t,r){var s=e.length;return r=void 0===r?s:r,!t&&r>=s?e:M(e,t,r)},T=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var F=function hasUnicode$2(e){return T.test(e)};var R=function asciiToArray$1(e){return e.split("")},L="[\\ud800-\\udfff]",z="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",W="\\ud83c[\\udffb-\\udfff]",H="[^\\ud800-\\udfff]",V="(?:\\ud83c[\\udde6-\\uddff]){2}",I="[\\ud800-\\udbff][\\udc00-\\udfff]",N="(?:"+z+"|"+W+")"+"?",q="[\\ufe0e\\ufe0f]?",U=q+N+("(?:\\u200d(?:"+[H,V,I].join("|")+")"+q+N+")*"),B="(?:"+[H+z+"?",z,V,I,L].join("|")+")",Q=RegExp(W+"(?="+W+")|"+B+U,"g");var G=R,Z=F,J=function unicodeToArray$1(e){return e.match(Q)||[]};var Y=P,K=F,X=function stringToArray$1(e){return Z(e)?J(e):G(e)},ee=$;var te=function createCaseFirst$1(e){return function(t){t=ee(t);var r=K(t)?X(t):void 0,s=r?r[0]:t.charAt(0),n=r?Y(r,1).join(""):t.slice(1);return s[e]()+n}}("toUpperCase"),re=$,se=te;var ne=function capitalize$1(e){return se(re(e).toLowerCase())};var ie=function arrayReduce$1(e,t,r,s){var n=-1,i=null==e?0:e.length;for(s&&i&&(r=e[++n]);++n<i;)r=t(r,e[n],n,e);return r};var oe=function basePropertyOf$1(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ae=$,ce=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,le=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var ue=function deburr$1(e){return(e=ae(e))&&e.replace(ce,oe).replace(le,"")},he=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var de=function asciiWords$1(e){return e.match(he)||[]},pe=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var fe=function hasUnicodeWord$1(e){return pe.test(e)},be="\\u2700-\\u27bf",ge="a-z\\xdf-\\xf6\\xf8-\\xff",ve="A-Z\\xc0-\\xd6\\xd8-\\xde",me="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",we="["+me+"]",ye="\\d+",_e="[\\u2700-\\u27bf]",Oe="["+ge+"]",xe="[^\\ud800-\\udfff"+me+ye+be+ge+ve+"]",je="(?:\\ud83c[\\udde6-\\uddff]){2}",Se="[\\ud800-\\udbff][\\udc00-\\udfff]",Ee="["+ve+"]",ke="(?:"+Oe+"|"+xe+")",Ae="(?:"+Ee+"|"+xe+")",Ce="(?:['’](?:d|ll|m|re|s|t|ve))?",De="(?:['’](?:D|LL|M|RE|S|T|VE))?",$e="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Me="[\\ufe0e\\ufe0f]?",Pe=Me+$e+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",je,Se].join("|")+")"+Me+$e+")*"),Te="(?:"+[_e,je,Se].join("|")+")"+Pe,Fe=RegExp([Ee+"?"+Oe+"+"+Ce+"(?="+[we,Ee,"$"].join("|")+")",Ae+"+"+De+"(?="+[we,Ee+ke,"$"].join("|")+")",Ee+"?"+ke+"+"+Ce,Ee+"+"+De,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ye,Te].join("|"),"g");var Re=de,Le=fe,ze=$,We=function unicodeWords$1(e){return e.match(Fe)||[]};var He=ie,Ve=ue,Ie=function words$1(e,t,r){return e=ze(e),void 0===(t=r?void 0:t)?Le(e)?We(e):Re(e):e.match(t)||[]},Ne=RegExp("['’]","g");var qe=function createCompounder$2(e){return function(t){return He(Ie(Ve(t).replace(Ne,"")),e,"")}},Ue=ne,Be=qe((function(e,t,r){return t=t.toLowerCase(),e+(r?Ue(t):t)}));const Qe={},setValidator=(e,t)=>{Qe[e]=t};setValidator("isDefined",(e=>void 0!==e)),setValidator("isUnDefined",(e=>void 0===e)),setValidator("isNull",(e=>null===e)),setValidator("isElement",(e=>e&&(e instanceof Element||e instanceof Window))),setValidator("isEventTarget",(e=>e&&e instanceof EventTarget)),setValidator("isString",(e=>e&&("string"==typeof e||e instanceof String))),setValidator("isArray",(e=>e&&e instanceof Array)),setValidator("notEmpty",(e=>e instanceof Array?0!==e.length:""!==e)),setValidator("isEmpty",(e=>void 0===e||!e||(e instanceof Array?0===e.length:""===e))),setValidator("isObject",(e=>e&&e instanceof Object)),setValidator("isFunction",(e=>e&&"function"==typeof e));const validate=(e,t,r)=>{const s=r.map((e=>{if(e instanceof Array){return-1!==e.map((e=>Qe[e]&&Qe[e](t))).indexOf(!0)}return Qe[e]&&Qe[e](t)}));if(-1!==s.indexOf(!1))throw new Error("call to "+e+" invalid value: "+t+" "+r,0+s)},Ge=new WeakMap,isVisible=e=>(validate("isVisible element",e,["isDefined","isElement"]),!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),setMetaData=(e,t,r)=>{validate("setMetaData element",e,["isDefined","isElement"]),validate("setMetaData k",t,["isDefined","isString"]),validate("setMetaData v",r,[["isUnDefined","isNull","isString","isObject"]]);const s=Ge.get(e)||{};r?s[t]=r:delete s[t],Ge.set(e,s)},getMetaData=(e,t)=>{validate("getMetaData element",e,["isDefined","isElement"]),validate("getMetaData k",t,["isDefined","isString"]);const r=Ge.get(e)||{};return t?r[t]:r},on=function(e,t,r,s,n,i,o){"function"==typeof s&&(o=i,i=n,n=s,s=void 0),validate("on uid",e,["isDefined","notEmpty"]),validate("on container",t,["isDefined","isEventTarget"]),validate("on events",r,["isDefined","isString"]),validate("on fn",n,["isDefined","isFunction"]),validate("on selector",s,[["isEmpty","isString"]]);const a="on:"+e+"-"+r+"-"+s;if(getMetaData(t,a))return void console.error("Error: Sargasso utils.on: duplicate event handler specification. %o %s",t,a);const c={uid:e,events:r,selector:s||void 0,fn:i=>{o&&off(e,t,r,s),s?Array.from(t.querySelectorAll(s)).forEach((e=>{(i.target===e||e.contains(i.target))&&n(i,e)})):n(i)},options:i||!1};setMetaData(t,a,c),r.split(/[\s,]+/).forEach((e=>{t.addEventListener(e.trim(),c.fn,c.options)}))},off=function(e,t,r,s){validate("off uid",e,["isDefined","notEmpty"]),validate("off container",t,["isDefined","isEventTarget"]),validate("off events",r,["isDefined","isString"]),validate("off selector",s,[["isEmpty","isString"]]);const n="on:"+e+"-"+r+"-"+s,i=getMetaData(t,n);i&&(r.split(/[\s,]+/).forEach((e=>{t.removeEventListener(e.trim(),i.fn,i.options)})),setMetaData(t,n))},Ze={hasClass:(e,t)=>{validate("hasClass element",e,["isDefined","isElement"]),validate("hasClass cssClass",t,["isDefined","notEmpty","isString"]);return-1!==(e.className||"").split(/\s+/).indexOf(t)},addClass:(e,t)=>{validate("addClass element",e,["isDefined","isElement"]),validate("addClass addClasses",t,["isDefined","notEmpty",["isString","isArray"]]);const r=(e.className||"").split(/\s+/);Array.isArray(t)||(t=t.split(/[\s,]/)),t.forEach((e=>{e=e.trim(),-1===r.indexOf(e)&&r.push(e)})),e.className=r.join(" ")},removeClass:(e,t)=>{validate("removeClass element",e,["isDefined","isElement"]),validate("removeClass removeClasses",t,["isDefined","notEmpty",["isString","isArray"]]);const r=(e.className||"").split(/\s+/);Array.isArray(t)||(t=t.split(/[\s,]/)),t.forEach((e=>{e=e.trim(),-1!==r.indexOf(e)&&r.splice(r.indexOf(e),1)})),e.className=r.join(" ")},isVisible:isVisible,inViewPort:(e,t=window)=>{validate("inViewPort element",e,["isDefined","isElement"]);const r=e.getBoundingClientRect(),s=isVisible(e),n=r.bottom<0;let i;return i=t.self===window?r.top>(window.innerHeight||document.documentElement.clientHeight):r.top>t.clientHeight,s&&!i&&!n},setCSS:(e,t)=>{validate("css element",e,["isDefined","isElement"]),validate("css css",t,["isDefined",["isObject"]]);for(const r in t)if(Object.prototype.hasOwnProperty.call(t,r)){const s=Be(r);e.style[s]=null!==t[r]?t[r]:null}},setMetaData:setMetaData,getMetaData:getMetaData,on:on,off:off,once:function(e,t,r,s,n,i){"function"==typeof s&&(i=n,n=s,s=void 0),on(e,t,r,s,n,i,!0)},offAll:function(e){validate("offAll container",e,["isDefined","isEventTarget"]);const t=Ge.get(e)||{},r=[];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&e.match(/^on:/)&&r.push(e);r.forEach((r=>{off(t[r].uid,e,t[r].events,t[r].selector)}))}};var Je=function isObject$4(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},Ye=i,Ke=/\s/;var Xe=function trimmedEndIndex$1(e){for(var t=e.length;t--&&Ke.test(e.charAt(t)););return t},et=/^\s+/;var tt=function baseTrim$1(e){return e?e.slice(0,Xe(e)+1).replace(et,""):e},rt=Je,st=x,nt=/^[-+]0x[0-9a-f]+$/i,it=/^0b[01]+$/i,ot=/^0o[0-7]+$/i,at=parseInt;var ct=Je,now=function(){return Ye.Date.now()},lt=function toNumber$1(e){if("number"==typeof e)return e;if(st(e))return NaN;if(rt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=rt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=tt(e);var r=it.test(e);return r||ot.test(e)?at(e.slice(2),r?2:8):nt.test(e)?NaN:+e},ut=Math.max,ht=Math.min;var dt=function debounce(e,t,r){var s,n,i,o,a,c,l=0,u=!1,h=!1,d=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function invokeFunc(t){var r=s,i=n;return s=n=void 0,l=t,o=e.apply(i,r)}function leadingEdge(e){return l=e,a=setTimeout(timerExpired,t),u?invokeFunc(e):o}function shouldInvoke(e){var r=e-c;return void 0===c||r>=t||r<0||h&&e-l>=i}function timerExpired(){var e=now();if(shouldInvoke(e))return trailingEdge(e);a=setTimeout(timerExpired,function remainingWait(e){var r=t-(e-c);return h?ht(r,i-(e-l)):r}(e))}function trailingEdge(e){return a=void 0,d&&s?invokeFunc(e):(s=n=void 0,o)}function debounced(){var e=now(),r=shouldInvoke(e);if(s=arguments,n=this,c=e,r){if(void 0===a)return leadingEdge(c);if(h)return clearTimeout(a),a=setTimeout(timerExpired,t),invokeFunc(c)}return void 0===a&&(a=setTimeout(timerExpired,t)),o}return t=lt(t)||0,ct(r)&&(u=!!r.leading,i=(h="maxWait"in r)?ut(lt(r.maxWait)||0,t):i,d="trailing"in r?!!r.trailing:d),debounced.cancel=function cancel(){void 0!==a&&clearTimeout(a),l=0,s=c=n=a=void 0},debounced.flush=function flush(){return void 0===a?o:trailingEdge(now())},debounced};var pt=function listCacheClear$1(){this.__data__=[],this.size=0};var ft=function eq$2(e,t){return e===t||e!=e&&t!=t},bt=ft;var gt=function assocIndexOf$4(e,t){for(var r=e.length;r--;)if(bt(e[r][0],t))return r;return-1},vt=gt,mt=Array.prototype.splice;var wt=gt;var yt=gt;var _t=gt;var Ot=pt,xt=function listCacheDelete$1(e){var t=this.__data__,r=vt(t,e);return!(r<0)&&(r==t.length-1?t.pop():mt.call(t,r,1),--this.size,!0)},jt=function listCacheGet$1(e){var t=this.__data__,r=wt(t,e);return r<0?void 0:t[r][1]},St=function listCacheHas$1(e){return yt(this.__data__,e)>-1},Et=function listCacheSet$1(e,t){var r=this.__data__,s=_t(r,e);return s<0?(++this.size,r.push([e,t])):r[s][1]=t,this};function ListCache$4(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var s=e[t];this.set(s[0],s[1])}}ListCache$4.prototype.clear=Ot,ListCache$4.prototype.delete=xt,ListCache$4.prototype.get=jt,ListCache$4.prototype.has=St,ListCache$4.prototype.set=Et;var kt=ListCache$4,At=kt;var Ct=function stackClear$1(){this.__data__=new At,this.size=0};var Dt=function stackDelete$1(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r};var $t=function stackGet$1(e){return this.__data__.get(e)};var Mt=function stackHas$1(e){return this.__data__.has(e)},Pt=w,Tt=Je;var Ft,Rt=function isFunction$2(e){if(!Tt(e))return!1;var t=Pt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Lt=i["__core-js_shared__"],zt=(Ft=/[^.]+$/.exec(Lt&&Lt.keys&&Lt.keys.IE_PROTO||""))?"Symbol(src)_1."+Ft:"";var Wt=function isMasked$1(e){return!!zt&&zt in e},Ht=Function.prototype.toString;var Vt=function toSource$2(e){if(null!=e){try{return Ht.call(e)}catch(e){}try{return e+""}catch(e){}}return""},It=Rt,Nt=Wt,qt=Je,Ut=Vt,Bt=/^\[object .+?Constructor\]$/,Qt=Function.prototype,Gt=Object.prototype,Zt=Qt.toString,Jt=Gt.hasOwnProperty,Yt=RegExp("^"+Zt.call(Jt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Kt=function baseIsNative$1(e){return!(!qt(e)||Nt(e))&&(It(e)?Yt:Bt).test(Ut(e))},Xt=function getValue$1(e,t){return null==e?void 0:e[t]};var er=function getNative$6(e,t){var r=Xt(e,t);return Kt(r)?r:void 0},tr=er(i,"Map"),rr=er(Object,"create"),sr=rr;var nr=function hashClear$1(){this.__data__=sr?sr(null):{},this.size=0};var ir=function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},or=rr,ar=Object.prototype.hasOwnProperty;var cr=function hashGet$1(e){var t=this.__data__;if(or){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return ar.call(t,e)?t[e]:void 0},lr=rr,ur=Object.prototype.hasOwnProperty;var hr=rr;var dr=nr,pr=ir,fr=cr,br=function hashHas$1(e){var t=this.__data__;return lr?void 0!==t[e]:ur.call(t,e)},gr=function hashSet$1(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=hr&&void 0===t?"__lodash_hash_undefined__":t,this};function Hash$1(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var s=e[t];this.set(s[0],s[1])}}Hash$1.prototype.clear=dr,Hash$1.prototype.delete=pr,Hash$1.prototype.get=fr,Hash$1.prototype.has=br,Hash$1.prototype.set=gr;var vr=Hash$1,mr=kt,wr=tr;var yr=function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var _r=function getMapData$4(e,t){var r=e.__data__;return yr(t)?r["string"==typeof t?"string":"hash"]:r.map},Or=_r;var xr=_r;var jr=_r;var Sr=_r;var Er=function mapCacheClear$1(){this.size=0,this.__data__={hash:new vr,map:new(wr||mr),string:new vr}},kr=function mapCacheDelete$1(e){var t=Or(this,e).delete(e);return this.size-=t?1:0,t},Ar=function mapCacheGet$1(e){return xr(this,e).get(e)},Cr=function mapCacheHas$1(e){return jr(this,e).has(e)},Dr=function mapCacheSet$1(e,t){var r=Sr(this,e),s=r.size;return r.set(e,t),this.size+=r.size==s?0:1,this};function MapCache$2(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var s=e[t];this.set(s[0],s[1])}}MapCache$2.prototype.clear=Er,MapCache$2.prototype.delete=kr,MapCache$2.prototype.get=Ar,MapCache$2.prototype.has=Cr,MapCache$2.prototype.set=Dr;var $r=MapCache$2,Mr=kt,Pr=tr,Tr=$r;var Fr=kt,Rr=Ct,Lr=Dt,zr=$t,Wr=Mt,Hr=function stackSet$1(e,t){var r=this.__data__;if(r instanceof Mr){var s=r.__data__;if(!Pr||s.length<199)return s.push([e,t]),this.size=++r.size,this;r=this.__data__=new Tr(s)}return r.set(e,t),this.size=r.size,this};function Stack$1(e){var t=this.__data__=new Fr(e);this.size=t.size}Stack$1.prototype.clear=Rr,Stack$1.prototype.delete=Lr,Stack$1.prototype.get=zr,Stack$1.prototype.has=Wr,Stack$1.prototype.set=Hr;var Vr=$r,Ir=function setCacheAdd$1(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},Nr=function setCacheHas$1(e){return this.__data__.has(e)};function SetCache$1(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new Vr;++t<r;)this.add(e[t])}SetCache$1.prototype.add=SetCache$1.prototype.push=Ir,SetCache$1.prototype.has=Nr;i.Uint8Array;var qr=o?o.prototype:void 0;qr&&qr.valueOf;Object.prototype.propertyIsEnumerable,Object.getOwnPropertySymbols;var Ur=w,Br=y;var Qr=function baseIsArguments$1(e){return Br(e)&&"[object Arguments]"==Ur(e)},Gr=y,Zr=Object.prototype,Jr=Zr.hasOwnProperty,Yr=Zr.propertyIsEnumerable,Kr=(Qr(function(){return arguments}()),{});var Xr=function stubFalse(){return!1};!function(e,t){var r=i,s=Xr,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,a=o&&o.exports===n?r.Buffer:void 0,c=(a?a.isBuffer:void 0)||s;e.exports=c}({get exports(){return Kr},set exports(e){Kr=e}},Kr);var es=function isLength$2(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},ts=w,rs=es,ss=y,ns={};ns["[object Float32Array]"]=ns["[object Float64Array]"]=ns["[object Int8Array]"]=ns["[object Int16Array]"]=ns["[object Int32Array]"]=ns["[object Uint8Array]"]=ns["[object Uint8ClampedArray]"]=ns["[object Uint16Array]"]=ns["[object Uint32Array]"]=!0,ns["[object Arguments]"]=ns["[object Array]"]=ns["[object ArrayBuffer]"]=ns["[object Boolean]"]=ns["[object DataView]"]=ns["[object Date]"]=ns["[object Error]"]=ns["[object Function]"]=ns["[object Map]"]=ns["[object Number]"]=ns["[object Object]"]=ns["[object RegExp]"]=ns["[object Set]"]=ns["[object String]"]=ns["[object WeakMap]"]=!1;var is=function baseIsTypedArray$1(e){return ss(e)&&rs(e.length)&&!!ns[ts(e)]};var os=function baseUnary$1(e){return function(t){return e(t)}},as={};!function(e,t){var s=r,n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,o=i&&i.exports===n&&s.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||o&&o.binding&&o.binding("util")}catch(e){}}();e.exports=a}({get exports(){return as},set exports(e){as=e}},as);var cs=is,ls=os,us=as&&as.isTypedArray;us&&ls(us),Object.prototype.hasOwnProperty;Object.prototype;(function overArg$1(e,t){return function(r){return e(t(r))}})(Object.keys,Object),Object.prototype.hasOwnProperty;Object.prototype.hasOwnProperty;var hs=er(i,"DataView"),ds=tr,ps=er(i,"Promise"),fs=er(i,"Set"),bs=er(i,"WeakMap"),gs=w,vs=Vt,ms="[object Map]",ws="[object Promise]",ys="[object Set]",_s="[object WeakMap]",Os="[object DataView]",xs=vs(hs),js=vs(ds),Ss=vs(ps),Es=vs(fs),ks=vs(bs),As=gs;(hs&&As(new hs(new ArrayBuffer(1)))!=Os||ds&&As(new ds)!=ms||ps&&As(ps.resolve())!=ws||fs&&As(new fs)!=ys||bs&&As(new bs)!=_s)&&(As=function(e){var t=gs(e),r="[object Object]"==t?e.constructor:void 0,s=r?vs(r):"";if(s)switch(s){case xs:return Os;case js:return ms;case Ss:return ws;case Es:return ys;case ks:return _s}return t});Object.prototype.hasOwnProperty;var Cs,Ds,$s,Ms,Ps,Ts,Fs={},Rs={get exports(){return Fs},set exports(e){Fs=e}},Ls=(Cs=[],Ds=[],$s=[],Ms=[],Ps=null,Ts=function(e,t,r,s){var n=r||null,i=s||[{target:e,property:""}];Cs.push(i),e instanceof Array&&(e.hasOwnProperty("__length")?e.__length=e.length:Object.defineProperty(e,"__length",{enumerable:!1,value:e.length,writable:!0}));var o=[],_getPath=function(e,t,r){for(var s="",n=null,o=0;o<i.length;o++)n instanceof Array&&!isNaN(i[o].property)&&(i[o].property=n.indexOf(i[o].target)),s=s+"."+i[o].property,n=i[o].target;return s=(s=s+"."+t).substring(2),!0===r&&(s="/"+s.replace(/\./g,"/")),s},_notifyObservers=function(e){if(!0!==n.paused){var r="number"==typeof t;if(r||!0===t)setTimeout((function(){if(e===o.length){var t=o.slice(0);o=[];for(var r=0;r<n.observers.length;r++)n.observers[r](t)}}),r&&t>0?t:10);else{var s=o.slice(0);o=[];for(var i=0;i<n.observers.length;i++)n.observers[i](s)}}},a={get:function(e,r){if("__getTarget"===r)return e;if("__isProxy"===r)return!0;if("__getParent"===r)return function(e){void 0===e&&(e=1);var t=_getPath(0,"__getParent").split(".");return t.splice(-(e+1),e+1),function(e,t){return t.split(".").reduce((function(e,t){return e?e[t]:void 0}),e||self)}(n.parentProxy,t.join("."))};if("__getPath"===r)return _getPath(0,"__getParent").slice(0,-12);var s=e[r];if(e instanceof Date&&s instanceof Function&&null!==s)return s.bind(e);if(s instanceof Object&&null!==s&&e.hasOwnProperty(r)){if(!0===s.__isProxy&&(s=s.__getTarget),s.__targetPosition>-1&&null!==$s[s.__targetPosition])for(var o=Ms[s.__targetPosition],a=0,c=o.length;a<c;a++)if(n===o[a].observable)return o[a].proxy;var l=i.slice(0);return l.push({target:s,property:r}),Ts(s,t,n,l)}return s},deleteProperty:function(e,t){var r=!0;Ps===l&&(r=!1,Ps=null);var s=Object.assign({},e);if(o.push({type:"delete",target:e,property:t,newValue:null,previousValue:s[t],currentPath:_getPath(0,t),jsonPointer:_getPath(0,t,!0),proxy:l}),!0===r){n.changesPaused||delete e[t];for(var i=0,a=$s.length;i<a&&e!==$s[i];i++);for(var c=Ms[i]||[],u=c.length;u--;)c[u].proxy!==l&&(Ps=c[u].proxy,delete c[u].proxy[t])}return _notifyObservers(o.length),!0},set:function(e,t,r,s){r&&r.__isProxy&&(r=r.__getTarget);var i=!0;Ps===l&&(i=!1,Ps=null);var a=e[t];if(a!==r||!1===i||"length"===t&&e instanceof Array&&e.__length!==r){var c=!0,u=typeof a,h="update";if("undefined"===u&&(h="add"),o.push({type:h,target:e,property:t,newValue:r,previousValue:s[t],currentPath:_getPath(0,t),jsonPointer:_getPath(0,t,!0),proxy:l}),"length"===t&&e instanceof Array&&e.__length!==r&&(o[o.length-1].previousValue=e.__length,e.__length=r),!0===i){n.changesPaused||(e[t]=r),c=!1;for(var d=e.__targetPosition,p=Ms[d].length;p--;)if(n===Ms[d][p].observable&&null!==$s[Ms[d][p].observable.parentTarget.__targetPosition]){c=!0;break}if(c){for(var f=Ms[d],b=0,g=f.length;b<g;b++)f[b].proxy!==l&&(Ps=f[b].proxy,f[b].proxy[t]=r);setTimeout((function(){if("object"===u&&null!==a){for(var t=Object.keys(e),r=0,s=t.length;r<s;r++)if(e[t[r]]===a)return;var i=!1;if(function iterate(e){for(var t=Object.keys(e),r=0,s=t.length;r<s;r++){var n=e[t[r]];if(n instanceof Object&&null!==n&&iterate(n),n===a)return void(i=!0)}}(e),!0===i)return;!function iterate(e){for(var t=Object.keys(e),r=0,s=t.length;r<s;r++){var i=e[t[r]];i instanceof Object&&null!==i&&iterate(i)}var o=-1;for(r=0,s=$s.length;r<s;r++)if(e===$s[r]){o=r;break}if(o>-1){for(var a=Ms[o],c=a.length;c--;)if(n===a[c].observable){a.splice(c,1);break}0==a.length&&($s[o]=null)}}(a)}}),1e4)}}c&&_notifyObservers(o.length)}return!0}},c=e.__targetPosition;c>-1||Object.defineProperty(e,"__targetPosition",{value:$s.length,writable:!1,enumerable:!1,configurable:!1});var l=new Proxy(e,a);null===n&&(n={parentTarget:e,domDelay:t,parentProxy:l,observers:[],paused:!1,path:i,changesPaused:!1},Ds.push(n));var u={target:e,proxy:l,observable:n};return c>-1?(null===$s[c]&&($s[c]=e),Ms[c].push(u)):($s.push(e),Ms.push([u])),l},{create:function(e,t,r){!0===e.__isProxy&&(e=e.__getTarget);var s=Ts(e,t);return"function"==typeof r&&this.observe(s,r),function iterate(e){for(var t=e.__getTarget,r=Object.keys(t),s=0,n=r.length;s<n;s++){var i=r[s];t[i]instanceof Object&&null!==t[i]&&iterate(e[i])}}(s),s},observe:function(e,t){for(var r=Ds.length;r--;)if(Ds[r].parentProxy===e){Ds[r].observers.push(t);break}},pause:function(e){for(var t=Ds.length,r=!1;t--;)if(Ds[t].parentProxy===e){Ds[t].paused=!0,r=!0;break}if(0==r)throw new Error("ObseravableSlim could not pause observable -- matching proxy not found.")},resume:function(e){for(var t=Ds.length,r=!1;t--;)if(Ds[t].parentProxy===e){Ds[t].paused=!1,r=!0;break}if(0==r)throw new Error("ObseravableSlim could not resume observable -- matching proxy not found.")},pauseChanges:function(e){for(var t=Ds.length,r=!1;t--;)if(Ds[t].parentProxy===e){Ds[t].changesPaused=!0,r=!0;break}if(0==r)throw new Error("ObseravableSlim could not pause changes on observable -- matching proxy not found.")},resumeChanges:function(e){for(var t=Ds.length,r=!1;t--;)if(Ds[t].parentProxy===e){Ds[t].changesPaused=!1,r=!0;break}if(0==r)throw new Error("ObseravableSlim could not resume changes on observable -- matching proxy not found.")},remove:function(e){for(var t=null,r=!1,s=Ds.length;s--;)if(Ds[s].parentProxy===e){t=Ds[s],r=!0;break}for(var n=Ms.length;n--;)for(var i=Ms[n].length;i--;)Ms[n][i].observable===t&&(Ms[n].splice(i,1),0===Ms[n].length&&($s[n]=null));!0===r&&Ds.splice(s,1)}});try{Rs.exports=Ls}catch(e){}const zs={};class ObservableObject{constructor(e,t={},r={}){if(this.id=e,zs[this.id])throw new Error("ObservableObject "+e+" already exists.");this.bound={},this.data=Fs.create(t,!1,(e=>{this.sync(e)})),this.options=r,zs[this.id]=this}destroy(){Fs.pause(this.data),delete zs[this.id],delete this.data,Object.keys(this.bound).forEach((e=>{Object.keys(this.bound[e]).forEach((t=>{this.unbind(t,e)}))})),Fs.remove(this.data)}getBoundData(){return this.data}bind(e,t,r="*"){this.bound[r]||(this.bound[r]={}),this.bound[r][e]=t,t(this.id,"connect")}unbind(e,t="*"){this.bound[t][e](this.id,"disconnect"),this.bound[t]&&this.bound[t][e]&&delete this.bound[t][e]}sync(e){for(const t of e){const e=t.type,r=t.currentPath,s=t.newValue,n=t.previousValue,i=[];for(const e in this.bound)if("*"===e)i.push(e);else{const t=new RegExp("^"+e.replace(".","\\."));r.match(t)&&i.push(e)}for(const t of i)for(const i in this.bound[t])this.bound[t][i](this.id,e,r,s,n)}}}let Ws,Hs,Vs,Is,Ns,qs;class ObserverSubscriptionManager{constructor(e){this.options=e,this.observers=[],this.pendingAnimationFrame=void 0,this.frameQueue=[],this.sleeping=!0}subscribe(e){!this.observers.length&&this.sleeping&&this.wakeup(),this.observers.push(e)}unSubscribe(e){-1!==this.observers.indexOf(e)&&this.observers.splice(this.observers.indexOf(e),1),this.observers.length||this.sleep()}sleep(){this.sleeping=!0}wakeup(){this.sleeping=!1}notifyObservers(e,t){for(let r=0;r<this.observers.length;r++)this.observers[r][e]&&this.observers[r][e].apply(this.observers[r],t||[])}flushQueue(){this.pendingAnimationFrame&&(cancelAnimationFrame(this.pendingAnimationFrame),this.pendingAnimationFrame=void 0),this.frameQueue=[]}queueFrame(e){this.frameQueue.push(e.bind(this)),this.pendingAnimationFrame||(this.pendingAnimationFrame=requestAnimationFrame((()=>{this.processQueue()})))}processQueue(){this.pendingAnimationFrame=void 0;const e=this.frameQueue.slice(0);this.frameQueue=[];for(let t=0;t<e.length;t++)e[t]()}}class DOMWatcher extends ObserverSubscriptionManager{constructor(e={}){super(e),this.mutationHandler=dt(((e,t)=>{this.observeDOM(this.options.shadowDOM||document.body)}),25,{maxWait:100}),this.mutationObserver=new MutationObserver(this.mutationHandler,!1)}subscribe(e){super.subscribe(e),e.watchDOM(this.options.shadowDOM||document.body)}wakeup(){super.wakeup(),this.mutationObserver.observe(this.options.shadowDOM||document.body,{childList:!0,subtree:!0})}sleep(){super.sleep(),this.mutationObserver.disconnect()}observeDOM(e){this.notifyObservers("watchDOM",[e||this.options.shadowDOM||document.body])}}Ws=new DOMWatcher,Hs=new class ScrollWatcher extends ObserverSubscriptionManager{constructor(e={}){super(e),this.scrollElement=this.options.scrollElement||window,this.lastscroll=0,this.scrolling=!1}trigger(){this.scrolling||this.scrollLoop()}scrollLoop(){if(this.lastscroll!==this.scrollTop()){this.scrolling=!0,this.lastscroll=this.scrollTop(),this.watchScroll();const frame=()=>{this.scrollLoop()};this.queueFrame(frame)}else this.scrolling=!1}setOptions(e={}){this.sleep(),this.scrollElement=e.scrollElement||window,this.wakeup()}subscribe(e){super.subscribe(e),e.watchScroll()}wakeup(){super.wakeup(),Ze.on("theScrollWatcher",this.scrollElement,"scroll",(()=>{this.trigger()}))}sleep(){super.sleep(),Ze.off("theScrollWatcher",this.scrollElement,"scroll")}inViewPort(e){return Ze.inViewPort(e,this.scrollElement)}watchScroll(){this.notifyObservers("watchScroll")}scrollTop(e){if(this.scrollElement===window){if(void 0===e)return window.pageYOffset;window.scrollTo(0,e)}else{if(void 0===e)return this.scrollElement.scrollTop;this.scrollElement.scrollTop=e}}},Vs=new class ResizeWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.debounce=dt((()=>{this.watchResize()}),250)}subscribe(e){super.subscribe(e),e.watchResize()}wakeup(){super.wakeup(),window.addEventListener("resize",this.debounce,!1)}sleep(){super.sleep(),window.removeEventListener("resize",this.debounce)}watchResize(){this.notifyObservers("watchResize")}},Is=new class OrientationWatcher extends ObserverSubscriptionManager{constructor(e){super(e),"onorientationchange"in window?Ze.addClass(document.body,"have-orientation"):Ze.addClass(document.body,"no-orientation"),this.debounce=dt((()=>{this.watchOrientation()}),250)}subscribe(e){super.subscribe(e),e.watchOrientation()}wakeup(){super.wakeup(),"onorientationchange"in window&&window.addEventListener("orientationchange",this.debounce,!1)}sleep(){super.sleep(),"onorientationchange"in window&&window.removeEventListener("orientationchange",this.debounce)}watchOrientation(){this.notifyObservers("watchOrientation")}},Ns=new class WorkerWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.workers={}}registerWorker(e,t){if(!this.workers[e]){let r=t,s=!1;if(!t.match(/^(http|\/)/i)){const e=new Blob([t],{type:"text/javascript"});r=URL.createObjectURL(e),s=!0}this.workers[e]={worker:new Worker(r),observers:[]},s&&URL.revokeObjectURL(r),this.workers[e].worker.onmessage=t=>{this.workerMessage(e,t)}}return this.workers[e].worker}subscribe(e,t){if(!this.workers[t])throw new Error("worker "+t+" does not exist");this.workers[t].observers.push(e),super.subscribe(e)}unSubscribe(e,t){if(!this.workers[t])throw new Error("worker "+t+" does not exist");const r=this.workers[t].observers;-1!==r.indexOf(e)&&r.splice(r.indexOf(e),1),r.length||(this.workers[t].worker.terminate(),delete this.workers[t]),super.unSubscribe(e)}workerMessage(e,t){this.workers[e].observers.forEach((r=>{r.workerMessage&&r.workerMessage(e,t)}))}wakeup(){super.wakeup()}sleep(){super.sleep()}},qs=new class ObservableObjectWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.registeredObservableObjects={}}getObservable(e){return this.registeredObservableObjects[e]?this.registeredObservableObjects[e].observable:void 0}observableStart(e,t){const r=(e=>zs[e])(e);if(r&&void 0!==t)throw new Error("ObservableObject "+e+" already exists, can't build.");return this.registeredObservableObjects[e]||(this.registeredObservableObjects[e]=r?{id:e,observable:r,observers:[],managed:!1}:{id:e,observable:new ObservableObject(e,t),observers:[],managed:!0},this.registeredObservableObjects[e].observable.bind(this.constructor.name,this.notify.bind(this))),this.registeredObservableObjects[e].observable}observableDestroy(e){if(!this.registeredObservableObjects[e])throw new Error("ObservableObject observableDestroy "+e+" does not exist");this.registeredObservableObjects[e].observable.unbind(this.constructor.name),this.registeredObservableObjects[e].observable.destroy(),delete this.registeredObservableObjects[e]}subscribe(e,t,r){this.registeredObservableObjects[t]||this.observableStart(t,r),this.registeredObservableObjects[t].observers.push(e),super.subscribe(e)}unSubscribe(e,t){if(!this.registeredObservableObjects[t])throw new Error("ObservableObject unSubscribe "+t+" does not exist");const r=this.registeredObservableObjects[t].observers;-1!==r.indexOf(e)&&r.splice(r.indexOf(e),1),!r.length&&this.registeredObservableObjects[t].managed&&this.observableDestroy(t),super.unSubscribe(e)}notify(e,t,r,s,n){if(!this.registeredObservableObjects[e])throw new Error("ObservableObject notify "+e+" does not exist");this.registeredObservableObjects[e].observers.forEach((i=>{i.observableChanged&&i.observableChanged(e,t,r,s,n)}))}};var Us=qe((function(e,t,r){return e+(r?"-":"")+t.toLowerCase()}));let Bs=0;const Qs=[],Gs="customElements"in window,Zs={},registerSargassoClass=(e,t)=>{if(Zs[e])throw new Error("Sargasso class "+e+" is already registered.");if(Zs[e]=t,Gs){const t=new Function("registeredClasses",`\n\t\t\treturn class ${e}Element extends HTMLElement {\n\t\t\t\tconstructor(element, options = {}) {\n\t\t\t\t\tsuper()\n\t\t\t\t\tthis.helperClass= '${e}'\n\t\t\t\t\tthis.helpers = []\n\t\t\t\t}\n\n\t\t\t\tconnectedCallback () {\n\t\t\t\t\tthis.helpers.push(new registeredClasses[this.helperClass](this,{isCustomElement:true}))\n\t\t\t\t\tif (this.hasAttributes()) {\n\t\t\t\t\t\tfor(let i = 0; i < this.attributes.length; i++) {\n\t\t\t\t\t\t\tif(this.attributes[i].name.match(/^sargasso-/)) {\n\t\t\t\t\t\t\t\tlet classname = this.attributes[i].name.replace(/^sargasso-/,'').split('-').map(word=> word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join('')\n\t\t\t\t\t\t\t\tif(!registeredClasses[classname]) {\n\t\t\t\t\t\t\t\t\tconsole.log('instantiate by attribute ' + this.attributes[i].name + ' > ' + classname + ' is not a sargasso class')\n\t\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.helpers.push(new registeredClasses[classname](this,{isCustomElement:true}))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.helpers.forEach((helper) => {\n\t\t\t\t\t\thelper.start()\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tdisconnectedCallback () {\n\t\t\t\t\tthis.helpers.forEach((helper) => {\n\t\t\t\t\t\thelper.sleep()\n\t\t\t\t\t\thelper.destroy()\n\t\t\t\t \t})\n\t\t\t\t\tthis.helpers = [] // nuke the reference for trash collection\n\t\t\t\t}\n\t\t\t}`)(Zs),r=window.sargassoOptions||{},s=void 0!==r.customElementPrefix?r.customElementPrefix:"sargasso-";customElements.define(s+Us(e),t)}},Js=["DOMChanged","didScroll","didResize","didBreakpoint","enterViewport","exitViewport","enterFullscreen","exitFullscreen","newPage","elementEvent","workerOnMessage","observableChanged"];class Sargasso{constructor(e,t={}){validate("Sargasso constructor element",e,["isDefined","isElement"]),validate("Sargasso constructor options",t,["isDefined",["isObject"]]),this.uid=++Bs,this.element=e,t.shadowDOM&&(this._shadowDOM=e.attachShadow({mode:"open"}),this._shadowRoot=document.createElement("div"),this._shadowDOM.append(this._shadowRoot),this._hostElement=this.element,this.element=this._shadowRoot),this.options=t,this._pendingAnimationFrame=void 0,this._frameQueue=[],this._isInViewport=!1,this._workers={},this._observables={},this._template=void 0,this._templateArgs={},this._started=!1,this.render=dt((()=>{this._render()}),100,{maxWait:250})}start(){const e=this.getMetaData("registeredResponsiveControllers")||[];e.push(this),this.setMetaData("registeredResponsiveControllers",e),this.setMetaData(this.constructor.name,this),Qs.push(this),this._shadowDOM&&(this._shadowDOMWatcher||(this._shadowDOMWatcher=new DOMWatcher({shadowDOM:this._shadowRoot})),this._shadowDOMWatcher.subscribe(this)),this.options.watchDOM&&Ws.subscribe(this),(this.options.watchScroll||this.options.watchViewport)&&Hs.subscribe(this),(this.options.watchResize||this.options.watchViewport)&&Vs.subscribe(this),(this.options.watchOrientation||this.options.watchViewport)&&Is.subscribe(this),this.elementListener=e=>{e.detail&&e.detail.sargassoEvent&&-1!==Js.indexOf(e.detail.sargassoEvent)?this[e.detail.sargassoEvent].apply(this,e.detail.sargassoEventOptions||[]):this.elementEvent(e)},this.element.addEventListener("sargasso",this.elementListener),this._started=!0}sleep(){this._shadowDOM&&this._shadowDOMWatcher.unSubscribe(this),this.options.watchDOM&&Ws.unSubscribe(this),(this.options.watchScroll||this.options.watchViewport)&&Hs.unSubscribe(this),(this.options.watchResize||this.options.watchViewport)&&Vs.unSubscribe(this),(this.options.watchOrientation||this.options.watchViewport)&&Is.unSubscribe(this),this.element.removeEventListener("sargasso",this.elementListener),Ze.offAll(this.element),this._started=!1}DOMChanged(e){}didScroll(){}didResize(){}didBreakpoint(){}enterViewport(){}exitViewport(){}enterFullscreen(){}exitFullscreen(){}newPage(e,t){}elementEvent(e){}workerOnMessage(e,t){}observableChanged(e,t,r,s,n){this.render()}setMetaData(e,t){Ze.setMetaData(this.element,e,t)}getMetaData(e){return Ze.getMetaData(this.element,e)}on(e,t,r,s){Ze.on(this.constructor.name+"-"+this.uid,this.element,e,t,r,s)}off(e,t){Ze.off(this.constructor.name+"-"+this.uid,this.element,e,t)}once(e,t,r,s){Ze.once(this.constructor.name+"-"+this.uid,this.element,e,t,r,s)}notifyAll(e,t){if(-1===Js.indexOf(e))throw new Error("invalid event name "+e);for(let r=0;r<Qs.length;r++){const s=Qs[r];s!==this&&s[e]&&s[e].apply(s,t)}}notifyElement(e,t,r){if(-1===Js.indexOf(t))throw new Error("invalid event name "+t);const s=this.getMetaData("registeredResponsiveControllers");if(s)for(let e=0;e<s.length;e++){const n=s[e];n!==this&&n[t]&&n[t].apply(n,r)}}queueFrame(e){this._frameQueue.push(e.bind(this)),this._pendingAnimationFrame||(this._pendingAnimationFrame=requestAnimationFrame((()=>{this._processQueue()})))}wantFullscreen(e){e?this.enterFullscreen():this.exitFullscreen()}hasClass(e){return Ze.hasClass(this.element,e)}addClass(e){Ze.addClass(this.element,e)}removeClass(e){Ze.removeClass(this.element,e)}setCSS(e){Ze.setCSS(this.element,e)}isVisible(){return Ze.isVisible(this.element)}workerStart(e,t){return this._workers[e]=Ns.registerWorker(e,t),Ns.subscribe(this,e),this._workers[e]}workerPostMessage(e,t){t.uid||(t.uid=this.uid),this._workers[e]&&this._workers[e].postMessage(t)}getObservable(e){return this._observables[e]}getObservableData(e){return this._observables[e].data}observableStart(e,t){return qs.subscribe(this,e,t),this._observables[e]=qs.getObservable(e),this._observables[e]}observableStop(e){this._observables[e]&&(qs.unSubscribe(this,e),delete this._observables[e])}observableStopAll(){for(const e in this._observables)this.observableStop(e)}setTemplate(e){this._template=e}setRenderer(e){this.renderer=e}setTemplateArgs(e={}){this._templateArgs=e,this.render()}getTemplateArgs(){const e=this._templateArgs||{};return JSON.parse(JSON.stringify(e))}_render(){this._template&&this.renderer&&this.renderer(this._template(this.getTemplateArgs()),this.element)}_flushQueue(){this._pendingAnimationFrame&&(cancelAnimationFrame(this._pendingAnimationFrame),this._pendingAnimationFrame=void 0),this._frameQueue=[]}_processQueue(){this._pendingAnimationFrame=void 0;const e=this._frameQueue.slice(0);this._frameQueue=[];for(let t=0;t<e.length;t++)e[t]()}_stopWorker(e){this._workers[e]&&(Ns.unSubscribe(this,e),delete this._workers[e])}_stopAllWorkers(){for(const e in this._workers)this._stopWorker(e)}destroy(){this._stopAllWorkers(),this.observableStopAll(),this._flushQueue(),this._started&&this.sleep();const e=this.getMetaData("registeredResponsiveControllers");e&&-1!==e.indexOf(this)&&(e.splice(e.indexOf(this),1),this.setMetaData("registeredResponsiveControllers",e)),this.setMetaData(this.constructor.name,null),this.element=null,-1!==Qs.indexOf(this)&&Qs.splice(Qs.indexOf(this),1)}watchDOM(e){e===this._shadowRoot?Ws.observeDOM(this._shadowRoot):this.DOMChanged(e)}watchScroll(){this.options.watchViewport&&this.inViewport(),this.didScroll()}watchResize(){this.options.watchViewport&&this.inViewport(),this.didResize()}watchOrientation(){!window.orientation||90!==window.orientation&&-90!==window.orientation?this.wantFullscreen(!1):this.wantFullscreen(!0)}inViewport(){Hs.inViewPort(this.element)?this._isInViewport||(this.enterViewport(),this._isInViewport=!0):this._isInViewport&&(this.exitViewport(),this._isInViewport=!1)}workerMessage(e,t){t.data.uid===this.uid&&this.workerOnMessage(e,t.data)}nativeRequestFullScreen(){if(document.fullscreenElement){if(document.fullscreenElement===this.element)return;document.exitFullscreen()}this.element.requestFullscreen()}nativeExitFullScreen(){document.fullscreenElement&&document.fullscreenElement===this.element&&document.exitFullscreen()}}registerSargassoClass("Sargasso",Sargasso);class LazyInstantiate extends Sargasso{constructor(e,t={}){t.watchScroll=!0,t.watchResize=!0,t.watchDOM=!0,t.immortal=!0,super(e,t)}didResize(){super.didResize(),this.lazyHandler()}didScroll(){super.didScroll(),this.lazyHandler()}DOMChanged(e){super.DOMChanged(e),this.lazyHandler(e)}lazyHandler(e=document){const t=e.querySelectorAll("[data-lazy-sargasso-class]");for(let e=0;e<t.length;e++){const r=t[e];if(Hs.inViewPort(r)){const s=r.getAttribute("data-lazy-sargasso-class").split(/\s*,\s*/);for(let r=0;r<s.length;r++){new Zs[s[r]](t[e]).start()}r.removeAttribute("data-lazy-sargasso-class")}}}}registerSargassoClass("LazyInstantiate",LazyInstantiate);class SargassoSupervisor extends Sargasso{constructor(e,t={}){super(e,{watchDOM:!0,mortal:!1}),this.lazy=new LazyInstantiate(e,t)}start(){this.lazy.start(),super.start()}instantiate(e){const t=e.getAttribute("data-sargasso-class").split(/\s*,\s*/);for(let r=0;r<t.length;r++)try{new Zs[t[r]](e).start()}catch(e){console.log("error instantiating "+t[r],e,Zs)}e.removeAttribute("data-sargasso-class")}newPage(){this.doIt()}DOMChanged(e){this.doIt(e)}doIt(e=document.body){e.getAttribute("data-sargasso-class")&&this.instantiate(e);const t=e.querySelectorAll("[data-sargasso-class]");for(const e of t)this.instantiate(e);const r=[];for(let e=0;e<Qs.length;e++)Qs[e].options.immortal||Qs[e].options.isCustomElement||document.body.contains(Qs[e].element)||r.push(Qs[e]);for(let e=0;e<r.length;e++)r[e].destroy()}}registerSargassoClass("SargassoSupervisor",SargassoSupervisor);const Ys=window.breakpoints||{widths:[{className:"breakpoint-phone",maxWidth:599},{className:"breakpoint-tablet",maxWidth:904},{className:"breakpoint-desktop",maxWidth:void 0}]};class Breakpoints extends Sargasso{constructor(e,t={}){t.watchResize=!0,super(e,t),this.options.widths=t.widths||Ys,this.scale=void 0,this.widths=[],this.classes=[],this.debouncedDetectGeometry=dt((()=>{this.detectGeometry()}),100,{maxWait:150})}start(){super.start(),this.debouncedDetectGeometry()}didResize(){this.debouncedDetectGeometry()}detectGeometry(){const e=window.doBreakpoints(this.options.widths);if(e!==this.scale){const frame=()=>{this.notifyAll("didBreakpoint",[e])};this.queueFrame(frame)}this.scale=e}}registerSargassoClass("Breakpoints",Breakpoints);class HijaxLoader extends Sargasso{constructor(e,t={}){t.watchDOM=!0,t.immortal=!0,super(e,t),this.excludeRegex=new RegExp("^(//|http|javascript|mailto|#)","i"),this.currentPage=location.pathname+location.search,this.cachedMarkup={}}start(){const e=document.querySelectorAll("[data-hijax-skip-unchanged]");for(let t=0;t<e.length;t++){const r=e[t],s=r.getAttribute("id");this.cachedMarkup[s]=r.innerHTML}super.start(),window.addEventListener("popstate",(e=>{this.watchPopState(e)}),!1)}DOMChanged(e){super.DOMChanged(e),this.hijaxLinks(e)}watchPopState(e){location.pathname+location.search!==this.currentPage&&this.preFlight(location.pathname+location.search)}hijaxLinks(e){const t=e?e.getElementsByTagName("a"):this.element.getElementsByTagName("a");for(let e=0;e<t.length;e++){const r=t[e],s=r.getAttribute("href");!s||r.getAttribute("data-hijaxed")||r.getAttribute("target")||r.hasAttribute("data-no-hijax")||this.excludeRegex.exec(s)||(r.setAttribute("data-hijaxed",!0),r.addEventListener("click",(e=>{e.preventDefault(),this.setPage(s)}),!1))}}setPage(e,t){e===this.currentPage||t?this.preFlight(e):(history.pushState(null,null,e),this.watchPopState())}preFlight(e){if(!this.options.preFlight)return this.loadPage(e);this.options.preFlight(e,((t,r,s)=>{t&&(this.options.onError?this.options.onError("danger",t):alert("Error loading page: "+t)),r?this.currentPage=location.pathname+location.search:this.loadPage(s||e)}))}loadPage(e){this.queueFrame((()=>{Ze.addClass(document.body,"hijax-loading")})),this.options.onExitPage&&this.options.onExitPage();const t=new XMLHttpRequest;t.open("GET",e),t.setRequestHeader("Sargasso-Hijax",1),t.setRequestHeader("x-digitopia-hijax",1),this.options.onLoading&&(this.options.onLoading(),t.onreadystatechange=this.options.onLoading),t.onload=()=>{if(301===t.status||302===t.status||t.getResponseHeader("Sargasso-Location")){const e=t.getResponseHeader("Location")?t.getResponseHeader("Location"):t.getResponseHeader("Sargasso-Location");this.setPage(e)}else if(200===t.status){Hs.scrollTop(0),this.mergePage(t.responseText);const e=this.currentPage,frame=()=>{this.notifyAll("newPage",[e,location.pathname+location.search]),Ze.removeClass(document.body,"hijax-loading")};this.queueFrame(frame),this.currentPage=location.pathname+location.search}else{const e=t.getResponseHeader("Sargasso-Flash-Level")||"danger";let r=t.getResponseHeader("Sargasso-Flash-Message")||t.statusText;r||(r="Could not connect to server."),this.options.onError?this.options.onError(e,r):alert("Error loading page: "+r)}},t.send()}processScripts(e){Array.from(e).forEach((e=>{e.remove();const t=e.getAttribute("id");document.getElementById(t)||document.getElementsByTagName("head")[0].appendChild(e)}))}mergePage(e){const t=document.querySelectorAll("[data-ephemeral]");Array.from(t).forEach((e=>{e.remove()}));const r=e.split(/(<body[^>]*>|<\/body>)/gi),s=makeFragment(r[2]),n=document.querySelectorAll("[data-hijax]");for(let e=0;e<n.length;e++){const t=n[e],r=t.getAttribute("id"),i=s.getElementById(r);if(t.hasAttribute("data-hijax-skip-unchanged")){if(this.cachedMarkup[r]===i.innerHTML)continue;this.cachedMarkup[r]=i.innerHTML}const o=t.getAttribute("data-hijax-cache-key-selector");if(o&&i.querySelector(o)&&t.querySelector(o)&&t.querySelector(o).getAttribute("data-hijax-cache-key")===i.querySelector(o).getAttribute("data-hijax-cache-key"))continue;this.processScripts(i.querySelectorAll("script"));const frame=()=>{t.parentNode.replaceChild(i,t),this.options.onEnterPage&&this.options.onEnterPage(),this.hijaxLinks(i)};this.queueFrame(frame)}}}registerSargassoClass("HijaxLoader",HijaxLoader);const makeFragment=e=>{if(document.createRange&&document.createRange().createContextualFragment)return document.createRange().createContextualFragment(e);const t=document.createDocumentFragment(),r=document.createElement("div");return r.insertAdjacentHTML("afterBegin",e),t.appendChild(r),t};e.loadPageHandler=void 0;const Ks={registerSargassoClass:registerSargassoClass,bootSargasso:(t={})=>{if(t.scrollElement&&Hs.setOptions(t),t.breakpoints){new Breakpoints(document.body,t.breakpoints).start()}if(t.hijax){const r=new HijaxLoader(document.body,t.hijax);r.start(),e.loadPageHandler=r.setPage.bind(r)}else e.loadPageHandler=e=>{document.location.href=e};const r=new SargassoSupervisor(document.body,t);return r.start(t),r},elementTools:Ze,validate:validate,setValidator:setValidator},Xs={theDOMWatcher:Ws,theScrollWatcher:Hs,theResizeWatcher:Vs,theOrientationWatcher:Is,theWorkerWatcher:Ns,theObservableObjectWatcher:qs},en={liveElements:Qs,registeredClasses:Zs,elementMetaData:Ge};return e.ObservableObject=ObservableObject,e.Sargasso=Sargasso,e.services=Xs,e.system=en,e.utils=Ks,e}({});
var SargassoModule=function(e){"use strict";var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};var s="object"==typeof t&&t&&t.Object===Object&&t,i=s,n="object"==typeof self&&self&&self.Object===Object&&self,o=i||n||Function("return this")(),a=o.Symbol;var l=function arrayMap$1(e,t){for(var s=-1,i=null==e?0:e.length,n=Array(i);++s<i;)n[s]=t(e[s],s,e);return n},h=Array.isArray,u=a,p=Object.prototype,f=p.hasOwnProperty,b=p.toString,v=u?u.toStringTag:void 0;var m=function getRawTag$1(e){var t=f.call(e,v),s=e[v];try{e[v]=void 0;var i=!0}catch(e){}var n=b.call(e);return i&&(t?e[v]=s:delete e[v]),n},y=Object.prototype.toString;var _=m,w=function objectToString$1(e){return y.call(e)},O=a?a.toStringTag:void 0;var A=function baseGetTag$5(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":O&&O in Object(e)?_(e):w(e)};var $=function isObjectLike$5(e){return null!=e&&"object"==typeof e},x=A,j=$;var D=function isSymbol$2(e){return"symbol"==typeof e||j(e)&&"[object Symbol]"==x(e)},T=l,R=h,L=D,F=a?a.prototype:void 0,z=F?F.toString:void 0;var W=function baseToString$1(e){if("string"==typeof e)return e;if(R(e))return T(e,baseToString$1)+"";if(L(e))return z?z.call(e):"";var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t},U=W;var B=function toString$4(e){return null==e?"":U(e)};var q=function baseSlice$1(e,t,s){var i=-1,n=e.length;t<0&&(t=-t>n?0:n+t),(s=s>n?n:s)<0&&(s+=n),n=t>s?0:s-t>>>0,t>>>=0;for(var o=Array(n);++i<n;)o[i]=e[i+t];return o};var Q=function castSlice$1(e,t,s){var i=e.length;return s=void 0===s?i:s,!t&&s>=i?e:q(e,t,s)},G=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");var J=function hasUnicode$2(e){return G.test(e)};var Y=function asciiToArray$1(e){return e.split("")},K="[\\ud800-\\udfff]",X="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",ee="\\ud83c[\\udffb-\\udfff]",te="[^\\ud800-\\udfff]",se="(?:\\ud83c[\\udde6-\\uddff]){2}",re="[\\ud800-\\udbff][\\udc00-\\udfff]",ie="(?:"+X+"|"+ee+")"+"?",ne="[\\ufe0e\\ufe0f]?",oe=ne+ie+("(?:\\u200d(?:"+[te,se,re].join("|")+")"+ne+ie+")*"),ae="(?:"+[te+X+"?",X,se,re,K].join("|")+")",le=RegExp(ee+"(?="+ee+")|"+ae+oe,"g");var he=Y,ce=J,ue=function unicodeToArray$1(e){return e.match(le)||[]};var de=Q,pe=J,fe=function stringToArray$1(e){return ce(e)?ue(e):he(e)},be=B;var ge=function createCaseFirst$1(e){return function(t){t=be(t);var s=pe(t)?fe(t):void 0,i=s?s[0]:t.charAt(0),n=s?de(s,1).join(""):t.slice(1);return i[e]()+n}}("toUpperCase"),ve=B,me=ge;var ye=function capitalize$1(e){return me(ve(e).toLowerCase())};var _e=function arrayReduce$1(e,t,s,i){var n=-1,o=null==e?0:e.length;for(i&&o&&(s=e[++n]);++n<o;)s=t(s,e[n],n,e);return s};var we=function basePropertyOf$1(e){return function(t){return null==e?void 0:e[t]}}({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),Oe=B,Ae=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,$e=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g");var xe=function deburr$1(e){return(e=Oe(e))&&e.replace(Ae,we).replace($e,"")},Se=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;var Ee=function asciiWords$1(e){return e.match(Se)||[]},je=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;var Ce=function hasUnicodeWord$1(e){return je.test(e)},ke="\\u2700-\\u27bf",Me="a-z\\xdf-\\xf6\\xf8-\\xff",De="A-Z\\xc0-\\xd6\\xd8-\\xde",Pe="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Te="["+Pe+"]",He="\\d+",Re="[\\u2700-\\u27bf]",Le="["+Me+"]",Fe="[^\\ud800-\\udfff"+Pe+He+ke+Me+De+"]",ze="(?:\\ud83c[\\udde6-\\uddff]){2}",Ne="[\\ud800-\\udbff][\\udc00-\\udfff]",Ie="["+De+"]",We="(?:"+Le+"|"+Fe+")",Ve="(?:"+Ie+"|"+Fe+")",Ue="(?:['’](?:d|ll|m|re|s|t|ve))?",Be="(?:['’](?:D|LL|M|RE|S|T|VE))?",qe="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",Qe="[\\ufe0e\\ufe0f]?",Ge=Qe+qe+("(?:\\u200d(?:"+["[^\\ud800-\\udfff]",ze,Ne].join("|")+")"+Qe+qe+")*"),Ze="(?:"+[Re,ze,Ne].join("|")+")"+Ge,Je=RegExp([Ie+"?"+Le+"+"+Ue+"(?="+[Te,Ie,"$"].join("|")+")",Ve+"+"+Be+"(?="+[Te,Ie+We,"$"].join("|")+")",Ie+"?"+We+"+"+Ue,Ie+"+"+Be,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",He,Ze].join("|"),"g");var Ye=Ee,Ke=Ce,Xe=B,et=function unicodeWords$1(e){return e.match(Je)||[]};var tt=_e,st=xe,rt=function words$1(e,t,s){return e=Xe(e),void 0===(t=s?void 0:t)?Ke(e)?et(e):Ye(e):e.match(t)||[]},it=RegExp("['’]","g");var nt=function createCompounder$2(e){return function(t){return tt(rt(st(t).replace(it,"")),e,"")}},ot=ye,at=nt((function(e,t,s){return t=t.toLowerCase(),e+(s?ot(t):t)}));const lt={},setValidator=(e,t)=>{lt[e]=t};setValidator("isDefined",(e=>void 0!==e)),setValidator("isUnDefined",(e=>void 0===e)),setValidator("isNull",(e=>null===e)),setValidator("isElement",(e=>e&&(e instanceof Element||e instanceof Window))),setValidator("isEventTarget",(e=>e&&e instanceof EventTarget)),setValidator("isString",(e=>e&&("string"==typeof e||e instanceof String))),setValidator("isArray",(e=>e&&e instanceof Array)),setValidator("notEmpty",(e=>e instanceof Array?0!==e.length:""!==e)),setValidator("isEmpty",(e=>void 0===e||!e||(e instanceof Array?0===e.length:""===e))),setValidator("isObject",(e=>e&&e instanceof Object)),setValidator("isFunction",(e=>e&&"function"==typeof e));const validate=(e,t,s)=>{const i=s.map((e=>{if(e instanceof Array){return-1!==e.map((e=>lt[e]&&lt[e](t))).indexOf(!0)}return lt[e]&&lt[e](t)}));if(-1!==i.indexOf(!1))throw new Error("call to "+e+" invalid value: "+t+" "+s,0+i)},ht=new WeakMap,hasClass=(e,t)=>(validate("hasClass element",e,["isDefined","isElement"]),validate("hasClass cssClass",t,["isDefined","notEmpty","isString"]),e.classList.contains(t)),isVisible=e=>(validate("isVisible element",e,["isDefined","isElement"]),!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)),setMetaData=(e,t,s)=>{validate("setMetaData element",e,["isDefined","isElement"]),validate("setMetaData k",t,["isDefined","isString"]),validate("setMetaData v",s,[["isUnDefined","isNull","isString","isObject"]]);const i=ht.get(e)||{};s?i[t]=s:delete i[t],ht.set(e,i)},getMetaData=(e,t)=>{validate("getMetaData element",e,["isDefined","isElement"]),validate("getMetaData k",t,["isDefined","isString"]);const s=ht.get(e)||{};return t?s[t]:s},on=function(e,t,s,i,n,o,a){"function"==typeof i&&(a=o,o=n,n=i,i=void 0),validate("on uid",e,["isDefined","notEmpty"]),validate("on container",t,["isDefined","isEventTarget"]),validate("on events",s,["isDefined","isString"]),validate("on fn",n,["isDefined","isFunction"]),validate("on selector",i,[["isEmpty","isString"]]);const l="on:"+e+"-"+s+"-"+i;if(getMetaData(t,l))return void console.error("Error: Sargasso utils.on: duplicate event handler specification. %o %s",t,l);const h={uid:e,events:s,selector:i||void 0,fn:o=>{a&&off(e,t,s,i),i?Array.from(t.querySelectorAll(i)).forEach((e=>{(o.target===e||e.contains(o.target))&&n(o,e)})):n(o)},options:o||!1};setMetaData(t,l,h),s.split(/[\s,]+/).forEach((e=>{t.addEventListener(e.trim(),h.fn,h.options)}))},off=function(e,t,s,i){validate("off uid",e,["isDefined","notEmpty"]),validate("off container",t,["isDefined","isEventTarget"]),validate("off events",s,["isDefined","isString"]),validate("off selector",i,[["isEmpty","isString"]]);const n="on:"+e+"-"+s+"-"+i,o=getMetaData(t,n);o&&(s.split(/[\s,]+/).forEach((e=>{t.removeEventListener(e.trim(),o.fn,o.options)})),setMetaData(t,n))},ct={hasClass:hasClass,addClass:(e,t)=>{validate("addClass element",e,["isDefined","isElement"]),validate("addClass addClasses",t,["isDefined","notEmpty",["isString","isArray"]]),Array.isArray(t)||(t=t.split(/[\s,]/)),t.forEach((t=>{t=t.trim(),hasClass(e,t)||e.classList.add(t)}))},removeClass:(e,t)=>{validate("removeClass element",e,["isDefined","isElement"]),validate("removeClass removeClasses",t,["isDefined","notEmpty",["isString","isArray"]]),Array.isArray(t)||(t=t.split(/[\s,]/)),t.forEach((t=>{t=t.trim(),hasClass(e,t)&&e.classList.remove(t)}))},isVisible:isVisible,inViewPort:(e,t=window)=>{validate("inViewPort element",e,["isDefined","isElement"]);const s=e.getBoundingClientRect(),i=isVisible(e),n=s.bottom<0;let o;return o=t.self===window?s.top>(window.innerHeight||document.documentElement.clientHeight):s.top>t.clientHeight,i&&!o&&!n},setCSS:(e,t)=>{validate("css element",e,["isDefined","isElement"]),validate("css css",t,["isDefined",["isObject"]]);for(const s in t)if(Object.prototype.hasOwnProperty.call(t,s)){const i=at(s);e.style[i]=null!==t[s]?t[s]:null}},setMetaData:setMetaData,getMetaData:getMetaData,on:on,off:off,once:function(e,t,s,i,n,o){"function"==typeof i&&(o=n,n=i,i=void 0),on(e,t,s,i,n,o,!0)},offAll:function(e){validate("offAll container",e,["isDefined","isEventTarget"]);const t=ht.get(e)||{},s=[];for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&e.match(/^on:/)&&s.push(e);s.forEach((s=>{off(t[s].uid,e,t[s].events,t[s].selector)}))}};var ut=function isObject$4(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},dt=o,pt=/\s/;var ft=function trimmedEndIndex$1(e){for(var t=e.length;t--&&pt.test(e.charAt(t)););return t},bt=/^\s+/;var gt=function baseTrim$1(e){return e?e.slice(0,ft(e)+1).replace(bt,""):e},vt=ut,mt=D,yt=/^[-+]0x[0-9a-f]+$/i,_t=/^0b[01]+$/i,wt=/^0o[0-7]+$/i,Ot=parseInt;var At=ut,now=function(){return dt.Date.now()},$t=function toNumber$1(e){if("number"==typeof e)return e;if(mt(e))return NaN;if(vt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=vt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=gt(e);var s=_t.test(e);return s||wt.test(e)?Ot(e.slice(2),s?2:8):yt.test(e)?NaN:+e},xt=Math.max,St=Math.min;var Et=function debounce(e,t,s){var i,n,o,a,l,h,u=0,p=!1,f=!1,b=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function invokeFunc(t){var s=i,o=n;return i=n=void 0,u=t,a=e.apply(o,s)}function leadingEdge(e){return u=e,l=setTimeout(timerExpired,t),p?invokeFunc(e):a}function shouldInvoke(e){var s=e-h;return void 0===h||s>=t||s<0||f&&e-u>=o}function timerExpired(){var e=now();if(shouldInvoke(e))return trailingEdge(e);l=setTimeout(timerExpired,function remainingWait(e){var s=t-(e-h);return f?St(s,o-(e-u)):s}(e))}function trailingEdge(e){return l=void 0,b&&i?invokeFunc(e):(i=n=void 0,a)}function debounced(){var e=now(),s=shouldInvoke(e);if(i=arguments,n=this,h=e,s){if(void 0===l)return leadingEdge(h);if(f)return clearTimeout(l),l=setTimeout(timerExpired,t),invokeFunc(h)}return void 0===l&&(l=setTimeout(timerExpired,t)),a}return t=$t(t)||0,At(s)&&(p=!!s.leading,o=(f="maxWait"in s)?xt($t(s.maxWait)||0,t):o,b="trailing"in s?!!s.trailing:b),debounced.cancel=function cancel(){void 0!==l&&clearTimeout(l),u=0,i=h=n=l=void 0},debounced.flush=function flush(){return void 0===l?a:trailingEdge(now())},debounced};var jt=function listCacheClear$1(){this.__data__=[],this.size=0};var Ct=function eq$2(e,t){return e===t||e!=e&&t!=t},kt=Ct;var Mt=function assocIndexOf$4(e,t){for(var s=e.length;s--;)if(kt(e[s][0],t))return s;return-1},Dt=Mt,Pt=Array.prototype.splice;var Tt=Mt;var Ht=Mt;var Rt=Mt;var Lt=jt,Ft=function listCacheDelete$1(e){var t=this.__data__,s=Dt(t,e);return!(s<0)&&(s==t.length-1?t.pop():Pt.call(t,s,1),--this.size,!0)},zt=function listCacheGet$1(e){var t=this.__data__,s=Tt(t,e);return s<0?void 0:t[s][1]},Nt=function listCacheHas$1(e){return Ht(this.__data__,e)>-1},It=function listCacheSet$1(e,t){var s=this.__data__,i=Rt(s,e);return i<0?(++this.size,s.push([e,t])):s[i][1]=t,this};function ListCache$4(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}ListCache$4.prototype.clear=Lt,ListCache$4.prototype.delete=Ft,ListCache$4.prototype.get=zt,ListCache$4.prototype.has=Nt,ListCache$4.prototype.set=It;var Wt=ListCache$4,Vt=Wt;var Ut=function stackClear$1(){this.__data__=new Vt,this.size=0};var Bt=function stackDelete$1(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s};var qt=function stackGet$1(e){return this.__data__.get(e)};var Qt=function stackHas$1(e){return this.__data__.has(e)},Gt=A,Zt=ut;var Jt,Yt=function isFunction$2(e){if(!Zt(e))return!1;var t=Gt(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},Kt=o["__core-js_shared__"],Xt=(Jt=/[^.]+$/.exec(Kt&&Kt.keys&&Kt.keys.IE_PROTO||""))?"Symbol(src)_1."+Jt:"";var es=function isMasked$1(e){return!!Xt&&Xt in e},ts=Function.prototype.toString;var ss=function toSource$2(e){if(null!=e){try{return ts.call(e)}catch(e){}try{return e+""}catch(e){}}return""},rs=Yt,is=es,ns=ut,os=ss,as=/^\[object .+?Constructor\]$/,ls=Function.prototype,hs=Object.prototype,cs=ls.toString,us=hs.hasOwnProperty,ds=RegExp("^"+cs.call(us).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var ps=function baseIsNative$1(e){return!(!ns(e)||is(e))&&(rs(e)?ds:as).test(os(e))},fs=function getValue$1(e,t){return null==e?void 0:e[t]};var bs=function getNative$6(e,t){var s=fs(e,t);return ps(s)?s:void 0},gs=bs(o,"Map"),vs=bs(Object,"create"),ms=vs;var ys=function hashClear$1(){this.__data__=ms?ms(null):{},this.size=0};var _s=function hashDelete$1(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ws=vs,Os=Object.prototype.hasOwnProperty;var As=function hashGet$1(e){var t=this.__data__;if(ws){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return Os.call(t,e)?t[e]:void 0},$s=vs,xs=Object.prototype.hasOwnProperty;var Ss=vs;var Es=ys,js=_s,Cs=As,ks=function hashHas$1(e){var t=this.__data__;return $s?void 0!==t[e]:xs.call(t,e)},Ms=function hashSet$1(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=Ss&&void 0===t?"__lodash_hash_undefined__":t,this};function Hash$1(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}Hash$1.prototype.clear=Es,Hash$1.prototype.delete=js,Hash$1.prototype.get=Cs,Hash$1.prototype.has=ks,Hash$1.prototype.set=Ms;var Ds=Hash$1,Ps=Wt,Ts=gs;var Hs=function isKeyable$1(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var Rs=function getMapData$4(e,t){var s=e.__data__;return Hs(t)?s["string"==typeof t?"string":"hash"]:s.map},Ls=Rs;var Fs=Rs;var zs=Rs;var Ns=Rs;var Is=function mapCacheClear$1(){this.size=0,this.__data__={hash:new Ds,map:new(Ts||Ps),string:new Ds}},Ws=function mapCacheDelete$1(e){var t=Ls(this,e).delete(e);return this.size-=t?1:0,t},Vs=function mapCacheGet$1(e){return Fs(this,e).get(e)},Us=function mapCacheHas$1(e){return zs(this,e).has(e)},Bs=function mapCacheSet$1(e,t){var s=Ns(this,e),i=s.size;return s.set(e,t),this.size+=s.size==i?0:1,this};function MapCache$2(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t<s;){var i=e[t];this.set(i[0],i[1])}}MapCache$2.prototype.clear=Is,MapCache$2.prototype.delete=Ws,MapCache$2.prototype.get=Vs,MapCache$2.prototype.has=Us,MapCache$2.prototype.set=Bs;var qs=MapCache$2,Qs=Wt,Gs=gs,Zs=qs;var Js=Wt,Ys=Ut,Ks=Bt,Xs=qt,er=Qt,tr=function stackSet$1(e,t){var s=this.__data__;if(s instanceof Qs){var i=s.__data__;if(!Gs||i.length<199)return i.push([e,t]),this.size=++s.size,this;s=this.__data__=new Zs(i)}return s.set(e,t),this.size=s.size,this};function Stack$1(e){var t=this.__data__=new Js(e);this.size=t.size}Stack$1.prototype.clear=Ys,Stack$1.prototype.delete=Ks,Stack$1.prototype.get=Xs,Stack$1.prototype.has=er,Stack$1.prototype.set=tr;var sr=qs,rr=function setCacheAdd$1(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this},ir=function setCacheHas$1(e){return this.__data__.has(e)};function SetCache$1(e){var t=-1,s=null==e?0:e.length;for(this.__data__=new sr;++t<s;)this.add(e[t])}SetCache$1.prototype.add=SetCache$1.prototype.push=rr,SetCache$1.prototype.has=ir;o.Uint8Array;var nr=a?a.prototype:void 0;nr&&nr.valueOf;Object.prototype.propertyIsEnumerable,Object.getOwnPropertySymbols;var or=A,ar=$;var lr=function baseIsArguments$1(e){return ar(e)&&"[object Arguments]"==or(e)},hr=$,cr=Object.prototype,ur=cr.hasOwnProperty,dr=cr.propertyIsEnumerable,pr=(lr(function(){return arguments}()),{}),fr={get exports(){return pr},set exports(e){pr=e}};var br=function stubFalse(){return!1};!function(e,t){var s=o,i=br,n=t&&!t.nodeType&&t,a=n&&e&&!e.nodeType&&e,l=a&&a.exports===n?s.Buffer:void 0,h=(l?l.isBuffer:void 0)||i;e.exports=h}(fr,pr);var gr=function isLength$2(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991},vr=A,mr=gr,yr=$,_r={};_r["[object Float32Array]"]=_r["[object Float64Array]"]=_r["[object Int8Array]"]=_r["[object Int16Array]"]=_r["[object Int32Array]"]=_r["[object Uint8Array]"]=_r["[object Uint8ClampedArray]"]=_r["[object Uint16Array]"]=_r["[object Uint32Array]"]=!0,_r["[object Arguments]"]=_r["[object Array]"]=_r["[object ArrayBuffer]"]=_r["[object Boolean]"]=_r["[object DataView]"]=_r["[object Date]"]=_r["[object Error]"]=_r["[object Function]"]=_r["[object Map]"]=_r["[object Number]"]=_r["[object Object]"]=_r["[object RegExp]"]=_r["[object Set]"]=_r["[object String]"]=_r["[object WeakMap]"]=!1;var wr=function baseIsTypedArray$1(e){return yr(e)&&mr(e.length)&&!!_r[vr(e)]};var Or=function baseUnary$1(e){return function(t){return e(t)}},Ar={},$r={get exports(){return Ar},set exports(e){Ar=e}};!function(e,t){var i=s,n=t&&!t.nodeType&&t,o=n&&e&&!e.nodeType&&e,a=o&&o.exports===n&&i.process,l=function(){try{var e=o&&o.require&&o.require("util").types;return e||a&&a.binding&&a.binding("util")}catch(e){}}();e.exports=l}($r,Ar);var xr=wr,Sr=Or,Er=Ar&&Ar.isTypedArray;Er&&Sr(Er),Object.prototype.hasOwnProperty;Object.prototype;(function overArg$1(e,t){return function(s){return e(t(s))}})(Object.keys,Object),Object.prototype.hasOwnProperty;Object.prototype.hasOwnProperty;var jr=bs(o,"DataView"),Cr=gs,kr=bs(o,"Promise"),Mr=bs(o,"Set"),Dr=bs(o,"WeakMap"),Pr=A,Tr=ss,Hr="[object Map]",Rr="[object Promise]",Lr="[object Set]",Fr="[object WeakMap]",zr="[object DataView]",Nr=Tr(jr),Ir=Tr(Cr),Wr=Tr(kr),Vr=Tr(Mr),Ur=Tr(Dr),Br=Pr;(jr&&Br(new jr(new ArrayBuffer(1)))!=zr||Cr&&Br(new Cr)!=Hr||kr&&Br(kr.resolve())!=Rr||Mr&&Br(new Mr)!=Lr||Dr&&Br(new Dr)!=Fr)&&(Br=function(e){var t=Pr(e),s="[object Object]"==t?e.constructor:void 0,i=s?Tr(s):"";if(i)switch(i){case Nr:return zr;case Ir:return Hr;case Wr:return Rr;case Vr:return Lr;case Ur:return Fr}return t});Object.prototype.hasOwnProperty;var qr,Qr,Gr,Zr,Jr,Yr,Kr={},Xr={get exports(){return Kr},set exports(e){Kr=e}},ei=(qr=[],Qr=[],Gr=[],Zr=[],Jr=null,Yr=function(e,t,s,i){var n=s||null,o=i||[{target:e,property:""}];qr.push(o),e instanceof Array&&(e.hasOwnProperty("__length")?e.__length=e.length:Object.defineProperty(e,"__length",{enumerable:!1,value:e.length,writable:!0}));var a=[],_getPath=function(e,t,s){for(var i="",n=null,a=0;a<o.length;a++)n instanceof Array&&!isNaN(o[a].property)&&(o[a].property=n.indexOf(o[a].target)),i=i+"."+o[a].property,n=o[a].target;return i=(i=i+"."+t).substring(2),!0===s&&(i="/"+i.replace(/\./g,"/")),i},_notifyObservers=function(e){if(!0!==n.paused){var s="number"==typeof t;if(s||!0===t)setTimeout((function(){if(e===a.length){var t=a.slice(0);a=[];for(var s=0;s<n.observers.length;s++)n.observers[s](t)}}),s&&t>0?t:10);else{var i=a.slice(0);a=[];for(var o=0;o<n.observers.length;o++)n.observers[o](i)}}},l={get:function(e,s){if("__getTarget"===s)return e;if("__isProxy"===s)return!0;if("__getParent"===s)return function(e){void 0===e&&(e=1);var t=_getPath(0,"__getParent").split(".");return t.splice(-(e+1),e+1),function(e,t){return t.split(".").reduce((function(e,t){return e?e[t]:void 0}),e||self)}(n.parentProxy,t.join("."))};if("__getPath"===s)return _getPath(0,"__getParent").slice(0,-12);var i=e[s];if(e instanceof Date&&i instanceof Function&&null!==i)return i.bind(e);if(i instanceof Object&&null!==i&&e.hasOwnProperty(s)){if(!0===i.__isProxy&&(i=i.__getTarget),i.__targetPosition>-1&&null!==Gr[i.__targetPosition])for(var a=Zr[i.__targetPosition],l=0,h=a.length;l<h;l++)if(n===a[l].observable)return a[l].proxy;var u=o.slice(0);return u.push({target:i,property:s}),Yr(i,t,n,u)}return i},deleteProperty:function(e,t){var s=!0;Jr===u&&(s=!1,Jr=null);var i=Object.assign({},e);if(a.push({type:"delete",target:e,property:t,newValue:null,previousValue:i[t],currentPath:_getPath(0,t),jsonPointer:_getPath(0,t,!0),proxy:u}),!0===s){n.changesPaused||delete e[t];for(var o=0,l=Gr.length;o<l&&e!==Gr[o];o++);for(var h=Zr[o]||[],p=h.length;p--;)h[p].proxy!==u&&(Jr=h[p].proxy,delete h[p].proxy[t])}return _notifyObservers(a.length),!0},set:function(e,t,s,i){s&&s.__isProxy&&(s=s.__getTarget);var o=!0;Jr===u&&(o=!1,Jr=null);var l=e[t];if(l!==s||!1===o||"length"===t&&e instanceof Array&&e.__length!==s){var h=!0,p=typeof l,f="update";if("undefined"===p&&(f="add"),a.push({type:f,target:e,property:t,newValue:s,previousValue:i[t],currentPath:_getPath(0,t),jsonPointer:_getPath(0,t,!0),proxy:u}),"length"===t&&e instanceof Array&&e.__length!==s&&(a[a.length-1].previousValue=e.__length,e.__length=s),!0===o){n.changesPaused||(e[t]=s),h=!1;for(var b=e.__targetPosition,v=Zr[b].length;v--;)if(n===Zr[b][v].observable&&null!==Gr[Zr[b][v].observable.parentTarget.__targetPosition]){h=!0;break}if(h){for(var m=Zr[b],y=0,_=m.length;y<_;y++)m[y].proxy!==u&&(Jr=m[y].proxy,m[y].proxy[t]=s);setTimeout((function(){if("object"===p&&null!==l){for(var t=Object.keys(e),s=0,i=t.length;s<i;s++)if(e[t[s]]===l)return;var o=!1;if(function iterate(e){for(var t=Object.keys(e),s=0,i=t.length;s<i;s++){var n=e[t[s]];if(n instanceof Object&&null!==n&&iterate(n),n===l)return void(o=!0)}}(e),!0===o)return;!function iterate(e){for(var t=Object.keys(e),s=0,i=t.length;s<i;s++){var o=e[t[s]];o instanceof Object&&null!==o&&iterate(o)}var a=-1;for(s=0,i=Gr.length;s<i;s++)if(e===Gr[s]){a=s;break}if(a>-1){for(var l=Zr[a],h=l.length;h--;)if(n===l[h].observable){l.splice(h,1);break}0==l.length&&(Gr[a]=null)}}(l)}}),1e4)}}h&&_notifyObservers(a.length)}return!0}},h=e.__targetPosition;h>-1||Object.defineProperty(e,"__targetPosition",{value:Gr.length,writable:!1,enumerable:!1,configurable:!1});var u=new Proxy(e,l);null===n&&(n={parentTarget:e,domDelay:t,parentProxy:u,observers:[],paused:!1,path:o,changesPaused:!1},Qr.push(n));var p={target:e,proxy:u,observable:n};return h>-1?(null===Gr[h]&&(Gr[h]=e),Zr[h].push(p)):(Gr.push(e),Zr.push([p])),u},{create:function(e,t,s){!0===e.__isProxy&&(e=e.__getTarget);var i=Yr(e,t);return"function"==typeof s&&this.observe(i,s),function iterate(e){for(var t=e.__getTarget,s=Object.keys(t),i=0,n=s.length;i<n;i++){var o=s[i];t[o]instanceof Object&&null!==t[o]&&iterate(e[o])}}(i),i},observe:function(e,t){for(var s=Qr.length;s--;)if(Qr[s].parentProxy===e){Qr[s].observers.push(t);break}},pause:function(e){for(var t=Qr.length,s=!1;t--;)if(Qr[t].parentProxy===e){Qr[t].paused=!0,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not pause observable -- matching proxy not found.")},resume:function(e){for(var t=Qr.length,s=!1;t--;)if(Qr[t].parentProxy===e){Qr[t].paused=!1,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not resume observable -- matching proxy not found.")},pauseChanges:function(e){for(var t=Qr.length,s=!1;t--;)if(Qr[t].parentProxy===e){Qr[t].changesPaused=!0,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not pause changes on observable -- matching proxy not found.")},resumeChanges:function(e){for(var t=Qr.length,s=!1;t--;)if(Qr[t].parentProxy===e){Qr[t].changesPaused=!1,s=!0;break}if(0==s)throw new Error("ObseravableSlim could not resume changes on observable -- matching proxy not found.")},remove:function(e){for(var t=null,s=!1,i=Qr.length;i--;)if(Qr[i].parentProxy===e){t=Qr[i],s=!0;break}for(var n=Zr.length;n--;)for(var o=Zr[n].length;o--;)Zr[n][o].observable===t&&(Zr[n].splice(o,1),0===Zr[n].length&&(Gr[n]=null));!0===s&&Qr.splice(i,1)}});try{Xr.exports=ei}catch(e){}const ti={};class ObservableObject{constructor(e,t={},s={}){if(this.id=e,ti[this.id])throw new Error("ObservableObject "+e+" already exists.");this.bound={},this.data=Kr.create(t,!1,(e=>{this.sync(e)})),this.options=s,ti[this.id]=this}destroy(){Kr.pause(this.data),delete ti[this.id],delete this.data,Object.keys(this.bound).forEach((e=>{Object.keys(this.bound[e]).forEach((t=>{this.unbind(t,e)}))})),Kr.remove(this.data)}getBoundData(){return this.data}bind(e,t,s="*"){this.bound[s]||(this.bound[s]={}),this.bound[s][e]=t,t(this.id,"connect")}unbind(e,t="*"){this.bound[t][e](this.id,"disconnect"),this.bound[t]&&this.bound[t][e]&&delete this.bound[t][e]}sync(e){for(const t of e){const e=t.type,s=t.currentPath,i=t.newValue,n=t.previousValue,o=[];for(const e in this.bound)if("*"===e)o.push(e);else{const t=new RegExp("^"+e.replace(".","\\."));s.match(t)&&o.push(e)}for(const t of o)for(const o in this.bound[t])this.bound[t][o](this.id,e,s,i,n)}}}let si,ri,ii,ni,oi,ai;class ObserverSubscriptionManager{constructor(e){this.options=e,this.observers=[],this.pendingAnimationFrame=void 0,this.frameQueue=[],this.sleeping=!0}subscribe(e){!this.observers.length&&this.sleeping&&this.wakeup(),this.observers.push(e)}unSubscribe(e){-1!==this.observers.indexOf(e)&&this.observers.splice(this.observers.indexOf(e),1),this.observers.length||this.sleep()}sleep(){this.sleeping=!0}wakeup(){this.sleeping=!1}notifyObservers(e,t){for(let s=0;s<this.observers.length;s++)this.observers[s][e]&&this.observers[s][e].apply(this.observers[s],t||[])}flushQueue(){this.pendingAnimationFrame&&(cancelAnimationFrame(this.pendingAnimationFrame),this.pendingAnimationFrame=void 0),this.frameQueue=[]}queueFrame(e){this.frameQueue.push(e.bind(this)),this.pendingAnimationFrame||(this.pendingAnimationFrame=requestAnimationFrame((()=>{this.processQueue()})))}processQueue(){this.pendingAnimationFrame=void 0;const e=this.frameQueue.slice(0);this.frameQueue=[];for(let t=0;t<e.length;t++)e[t]()}}class DOMWatcher extends ObserverSubscriptionManager{constructor(e={}){super(e),this.mutationHandler=Et(((e,t)=>{this.observeDOM(this.options.shadowDOM||document.body)}),25,{maxWait:100}),this.mutationObserver=new MutationObserver(this.mutationHandler,!1)}subscribe(e){super.subscribe(e),e.watchDOM(this.options.shadowDOM||document.body)}wakeup(){super.wakeup(),this.mutationObserver.observe(this.options.shadowDOM||document.body,{childList:!0,subtree:!0})}sleep(){super.sleep(),this.mutationObserver.disconnect()}observeDOM(e){this.notifyObservers("watchDOM",[e||this.options.shadowDOM||document.body])}}si=new DOMWatcher,ri=new class ScrollWatcher extends ObserverSubscriptionManager{constructor(e={}){super(e),this.scrollElement=this.options.scrollElement||window,this.lastscroll=0,this.scrolling=!1}trigger(){this.scrolling||this.scrollLoop()}scrollLoop(){if(this.lastscroll!==this.scrollTop()){this.scrolling=!0,this.lastscroll=this.scrollTop(),this.watchScroll();const frame=()=>{this.scrollLoop()};this.queueFrame(frame)}else this.scrolling=!1}setOptions(e={}){this.sleep(),this.scrollElement=e.scrollElement||window,this.wakeup()}subscribe(e){super.subscribe(e),e.watchScroll()}wakeup(){super.wakeup(),ct.on("theScrollWatcher",this.scrollElement,"scroll",(()=>{this.trigger()}))}sleep(){super.sleep(),ct.off("theScrollWatcher",this.scrollElement,"scroll")}inViewPort(e){return ct.inViewPort(e,this.scrollElement)}watchScroll(){this.notifyObservers("watchScroll")}scrollTop(e){if(this.scrollElement===window){if(void 0===e)return window.pageYOffset;window.scrollTo(0,e)}else{if(void 0===e)return this.scrollElement.scrollTop;this.scrollElement.scrollTop=e}}},ii=new class ResizeWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.debounce=Et((()=>{this.watchResize()}),250)}subscribe(e){super.subscribe(e),e.watchResize()}wakeup(){super.wakeup(),window.addEventListener("resize",this.debounce,!1)}sleep(){super.sleep(),window.removeEventListener("resize",this.debounce)}watchResize(){this.notifyObservers("watchResize")}},ni=new class OrientationWatcher extends ObserverSubscriptionManager{constructor(e){super(e),"onorientationchange"in window?ct.addClass(document.body,"have-orientation"):ct.addClass(document.body,"no-orientation"),this.debounce=Et((()=>{this.watchOrientation()}),250)}subscribe(e){super.subscribe(e),e.watchOrientation()}wakeup(){super.wakeup(),"onorientationchange"in window&&window.addEventListener("orientationchange",this.debounce,!1)}sleep(){super.sleep(),"onorientationchange"in window&&window.removeEventListener("orientationchange",this.debounce)}watchOrientation(){this.notifyObservers("watchOrientation")}},oi=new class WorkerWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.workers={}}registerWorker(e,t){if(!this.workers[e]){let s=t,i=!1;if(!t.match(/^(http|\/)/i)){const e=new Blob([t],{type:"text/javascript"});s=URL.createObjectURL(e),i=!0}this.workers[e]={worker:new Worker(s),observers:[]},i&&URL.revokeObjectURL(s),this.workers[e].worker.onmessage=t=>{this.workerMessage(e,t)}}return this.workers[e].worker}subscribe(e,t){if(!this.workers[t])throw new Error("worker "+t+" does not exist");this.workers[t].observers.push(e),super.subscribe(e)}unSubscribe(e,t){if(!this.workers[t])throw new Error("worker "+t+" does not exist");const s=this.workers[t].observers;-1!==s.indexOf(e)&&s.splice(s.indexOf(e),1),s.length||(this.workers[t].worker.terminate(),delete this.workers[t]),super.unSubscribe(e)}workerMessage(e,t){this.workers[e].observers.forEach((s=>{s.workerMessage&&s.workerMessage(e,t)}))}wakeup(){super.wakeup()}sleep(){super.sleep()}},ai=new class ObservableObjectWatcher extends ObserverSubscriptionManager{constructor(e){super(e),this.registeredObservableObjects={}}getObservable(e){return this.registeredObservableObjects[e]?this.registeredObservableObjects[e].observable:void 0}observableStart(e,t){const s=(e=>ti[e])(e);if(s&&void 0!==t)throw new Error("ObservableObject "+e+" already exists, can't build.");return this.registeredObservableObjects[e]||(this.registeredObservableObjects[e]=s?{id:e,observable:s,observers:[],managed:!1}:{id:e,observable:new ObservableObject(e,t),observers:[],managed:!0},this.registeredObservableObjects[e].observable.bind(this.constructor.name,this.notify.bind(this))),this.registeredObservableObjects[e].observable}observableDestroy(e){if(!this.registeredObservableObjects[e])throw new Error("ObservableObject observableDestroy "+e+" does not exist");this.registeredObservableObjects[e].observable.unbind(this.constructor.name),this.registeredObservableObjects[e].observable.destroy(),delete this.registeredObservableObjects[e]}subscribe(e,t,s){this.registeredObservableObjects[t]||this.observableStart(t,s),this.registeredObservableObjects[t].observers.push(e),super.subscribe(e)}unSubscribe(e,t){if(!this.registeredObservableObjects[t])throw new Error("ObservableObject unSubscribe "+t+" does not exist");const s=this.registeredObservableObjects[t].observers;-1!==s.indexOf(e)&&s.splice(s.indexOf(e),1),!s.length&&this.registeredObservableObjects[t].managed&&this.observableDestroy(t),super.unSubscribe(e)}notify(e,t,s,i,n){if(!this.registeredObservableObjects[e])throw new Error("ObservableObject notify "+e+" does not exist");this.registeredObservableObjects[e].observers.forEach((o=>{o.observableChanged&&o.observableChanged(e,t,s,i,n)}))}};var li=nt((function(e,t,s){return e+(s?"-":"")+t.toLowerCase()}));let hi=0;const ci=[],ui="customElements"in window,di={},registerSargassoClass=(e,t)=>{if(di[e])throw new Error("Sargasso class "+e+" is already registered.");if(di[e]=t,ui){const t=new Function("registeredClasses",`\n\t\t\treturn class ${e}Element extends HTMLElement {\n\t\t\t\tconstructor(element, options = {}) {\n\t\t\t\t\tsuper()\n\t\t\t\t\tthis.helperClass= '${e}'\n\t\t\t\t\tthis.helpers = []\n\t\t\t\t}\n\n\t\t\t\tconnectedCallback () {\n\t\t\t\t\tthis.helpers.push(new registeredClasses[this.helperClass](this,{isCustomElement:true}))\n\t\t\t\t\tif (this.hasAttributes()) {\n\t\t\t\t\t\tfor(let i = 0; i < this.attributes.length; i++) {\n\t\t\t\t\t\t\tif(this.attributes[i].name.match(/^sargasso-/)) {\n\t\t\t\t\t\t\t\tlet classname = this.attributes[i].name.replace(/^sargasso-/,'').split('-').map(word=> word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()).join('')\n\t\t\t\t\t\t\t\tif(!registeredClasses[classname]) {\n\t\t\t\t\t\t\t\t\tconsole.log('instantiate by attribute ' + this.attributes[i].name + ' > ' + classname + ' is not a sargasso class')\n\t\t\t\t\t\t\t\t\tcontinue\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tthis.helpers.push(new registeredClasses[classname](this,{isCustomElement:true}))\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.helpers.forEach((helper) => {\n\t\t\t\t\t\thelper.start()\n\t\t\t\t\t})\n\t\t\t\t}\n\n\t\t\t\tdisconnectedCallback () {\n\t\t\t\t\tthis.helpers.forEach((helper) => {\n\t\t\t\t\t\thelper.sleep()\n\t\t\t\t\t\thelper.destroy()\n\t\t\t\t \t})\n\t\t\t\t\tthis.helpers = [] // nuke the reference for trash collection\n\t\t\t\t}\n\t\t\t}`)(di),s=window.sargassoOptions||{},i=void 0!==s.customElementPrefix?s.customElementPrefix:"sargasso-";customElements.define(i+li(e),t)}},pi=["DOMChanged","didScroll","didResize","didBreakpoint","enterViewport","exitViewport","enterFullscreen","exitFullscreen","newPage","elementEvent","workerOnMessage","observableChanged"];class Sargasso{constructor(e,t={}){validate("Sargasso constructor element",e,["isDefined","isElement"]),validate("Sargasso constructor options",t,["isDefined",["isObject"]]),this.uid=++hi,this.element=e,t.shadowDOM&&(this._shadowDOM=e.attachShadow({mode:"open"}),this._shadowRoot=document.createElement("div"),this._shadowDOM.append(this._shadowRoot),this._hostElement=this.element,this.element=this._shadowRoot),this.options=t,this._pendingAnimationFrame=void 0,this._frameQueue=[],this._isInViewport=!1,this._workers={},this._observables={},this._template=void 0,this._templateArgs={},this._started=!1,this.render=Et((()=>{this._render()}),100,{maxWait:250})}start(){const e=this.getMetaData("registeredResponsiveControllers")||[];e.push(this),this.setMetaData("registeredResponsiveControllers",e),this.setMetaData(this.constructor.name,this),ci.push(this),this._shadowDOM&&(this._shadowDOMWatcher||(this._shadowDOMWatcher=new DOMWatcher({shadowDOM:this._shadowRoot})),this._shadowDOMWatcher.subscribe(this)),this.options.watchDOM&&si.subscribe(this),(this.options.watchScroll||this.options.watchViewport)&&ri.subscribe(this),(this.options.watchResize||this.options.watchViewport)&&ii.subscribe(this),(this.options.watchOrientation||this.options.watchViewport)&&ni.subscribe(this),this.elementListener=e=>{e.detail&&e.detail.sargassoEvent&&-1!==pi.indexOf(e.detail.sargassoEvent)?this[e.detail.sargassoEvent].apply(this,e.detail.sargassoEventOptions||[]):this.elementEvent(e)},this.element.addEventListener("sargasso",this.elementListener),this._started=!0}sleep(){this._shadowDOM&&this._shadowDOMWatcher.unSubscribe(this),this.options.watchDOM&&si.unSubscribe(this),(this.options.watchScroll||this.options.watchViewport)&&ri.unSubscribe(this),(this.options.watchResize||this.options.watchViewport)&&ii.unSubscribe(this),(this.options.watchOrientation||this.options.watchViewport)&&ni.unSubscribe(this),this.element.removeEventListener("sargasso",this.elementListener),ct.offAll(this.element),this._started=!1}DOMChanged(e){}didScroll(){}didResize(){}didBreakpoint(){}enterViewport(){}exitViewport(){}enterFullscreen(){}exitFullscreen(){}newPage(e,t){}elementEvent(e){}workerOnMessage(e,t){}observableChanged(e,t,s,i,n){this.render()}setMetaData(e,t){ct.setMetaData(this.element,e,t)}getMetaData(e){return ct.getMetaData(this.element,e)}on(e,t,s,i){ct.on(this.constructor.name+"-"+this.uid,this.element,e,t,s,i)}off(e,t){ct.off(this.constructor.name+"-"+this.uid,this.element,e,t)}once(e,t,s,i){ct.once(this.constructor.name+"-"+this.uid,this.element,e,t,s,i)}notifyAll(e,t){if(-1===pi.indexOf(e))throw new Error("invalid event name "+e);for(let s=0;s<ci.length;s++){const i=ci[s];i!==this&&i[e]&&i[e].apply(i,t)}}notifyElement(e,t,s){if(-1===pi.indexOf(t))throw new Error("invalid event name "+t);const i=this.getMetaData("registeredResponsiveControllers");if(i)for(let e=0;e<i.length;e++){const n=i[e];n!==this&&n[t]&&n[t].apply(n,s)}}queueFrame(e){this._frameQueue.push(e.bind(this)),this._pendingAnimationFrame||(this._pendingAnimationFrame=requestAnimationFrame((()=>{this._processQueue()})))}wantFullscreen(e){e?this.enterFullscreen():this.exitFullscreen()}hasClass(e){return ct.hasClass(this.element,e)}addClass(e){ct.addClass(this.element,e)}removeClass(e){ct.removeClass(this.element,e)}setCSS(e){ct.setCSS(this.element,e)}isVisible(){return ct.isVisible(this.element)}workerStart(e,t){return this._workers[e]=oi.registerWorker(e,t),oi.subscribe(this,e),this._workers[e]}workerPostMessage(e,t){t.uid||(t.uid=this.uid),this._workers[e]&&this._workers[e].postMessage(t)}getObservable(e){return this._observables[e]}getObservableData(e){return this._observables[e].data}observableStart(e,t){return ai.subscribe(this,e,t),this._observables[e]=ai.getObservable(e),this._observables[e]}observableStop(e){this._observables[e]&&(ai.unSubscribe(this,e),delete this._observables[e])}observableStopAll(){for(const e in this._observables)this.observableStop(e)}setTemplate(e){this._template=e}setRenderer(e){this.renderer=e}setTemplateArgs(e={}){this._templateArgs=e,this.render()}getTemplateArgs(){const e=this._templateArgs||{};return JSON.parse(JSON.stringify(e))}_render(){this._template&&this.renderer&&this.renderer(this._template(this.getTemplateArgs()),this.element)}_flushQueue(){this._pendingAnimationFrame&&(cancelAnimationFrame(this._pendingAnimationFrame),this._pendingAnimationFrame=void 0),this._frameQueue=[]}_processQueue(){this._pendingAnimationFrame=void 0;const e=this._frameQueue.slice(0);this._frameQueue=[];for(let t=0;t<e.length;t++)e[t]()}_stopWorker(e){this._workers[e]&&(oi.unSubscribe(this,e),delete this._workers[e])}_stopAllWorkers(){for(const e in this._workers)this._stopWorker(e)}destroy(){this._stopAllWorkers(),this.observableStopAll(),this._flushQueue(),this._started&&this.sleep();const e=this.getMetaData("registeredResponsiveControllers");e&&-1!==e.indexOf(this)&&(e.splice(e.indexOf(this),1),this.setMetaData("registeredResponsiveControllers",e)),this.setMetaData(this.constructor.name,null),this.element=null,-1!==ci.indexOf(this)&&ci.splice(ci.indexOf(this),1)}watchDOM(e){e===this._shadowRoot?si.observeDOM(this._shadowRoot):this.DOMChanged(e)}watchScroll(){this.options.watchViewport&&this.inViewport(),this.didScroll()}watchResize(){this.options.watchViewport&&this.inViewport(),this.didResize()}watchOrientation(){!window.orientation||90!==window.orientation&&-90!==window.orientation?this.wantFullscreen(!1):this.wantFullscreen(!0)}inViewport(){ri.inViewPort(this.element)?this._isInViewport||(this.enterViewport(),this._isInViewport=!0):this._isInViewport&&(this.exitViewport(),this._isInViewport=!1)}workerMessage(e,t){t.data.uid===this.uid&&this.workerOnMessage(e,t.data)}nativeRequestFullScreen(){if(document.fullscreenElement){if(document.fullscreenElement===this.element)return;document.exitFullscreen()}this.element.requestFullscreen()}nativeExitFullScreen(){document.fullscreenElement&&document.fullscreenElement===this.element&&document.exitFullscreen()}}registerSargassoClass("Sargasso",Sargasso);class LazyInstantiate extends Sargasso{constructor(e,t={}){t.watchScroll=!0,t.watchResize=!0,t.watchDOM=!0,t.immortal=!0,super(e,t)}didResize(){super.didResize(),this.lazyHandler()}didScroll(){super.didScroll(),this.lazyHandler()}DOMChanged(e){super.DOMChanged(e),this.lazyHandler(e)}lazyHandler(e=document){const t=e.querySelectorAll("[data-lazy-sargasso-class]");for(let e=0;e<t.length;e++){const s=t[e];if(ri.inViewPort(s)){const i=s.getAttribute("data-lazy-sargasso-class").split(/\s*,\s*/);for(let s=0;s<i.length;s++){new di[i[s]](t[e]).start()}s.removeAttribute("data-lazy-sargasso-class")}}}}registerSargassoClass("LazyInstantiate",LazyInstantiate);class SargassoSupervisor extends Sargasso{constructor(e,t={}){super(e,{watchDOM:!0,mortal:!1}),this.lazy=new LazyInstantiate(e,t)}start(){this.lazy.start(),super.start()}instantiate(e){const t=e.getAttribute("data-sargasso-class").split(/\s*,\s*/);for(let s=0;s<t.length;s++)try{new di[t[s]](e).start()}catch(e){console.log("error instantiating "+t[s],e,di)}e.removeAttribute("data-sargasso-class")}newPage(){this.doIt()}DOMChanged(e){this.doIt(e)}doIt(e=document.body){e.getAttribute("data-sargasso-class")&&this.instantiate(e);const t=e.querySelectorAll("[data-sargasso-class]");for(const e of t)this.instantiate(e);const s=[];for(let e=0;e<ci.length;e++)ci[e].options.immortal||ci[e].options.isCustomElement||document.body.contains(ci[e].element)||s.push(ci[e]);for(let e=0;e<s.length;e++)s[e].destroy()}}registerSargassoClass("SargassoSupervisor",SargassoSupervisor);const fi=window.breakpoints||{widths:[{className:"breakpoint-phone",maxWidth:599},{className:"breakpoint-tablet",maxWidth:904},{className:"breakpoint-desktop",maxWidth:void 0}]};class Breakpoints extends Sargasso{constructor(e,t={}){t.watchResize=!0,super(e,t),this.options.widths=t.widths||fi,this.scale=void 0,this.widths=[],this.classes=[],this.debouncedDetectGeometry=Et((()=>{this.detectGeometry()}),100,{maxWait:150})}start(){super.start(),this.debouncedDetectGeometry()}didResize(){this.debouncedDetectGeometry()}detectGeometry(){const e=window.doBreakpoints(this.options.widths);if(e!==this.scale){const frame=()=>{this.notifyAll("didBreakpoint",[e])};this.queueFrame(frame)}this.scale=e}}registerSargassoClass("Breakpoints",Breakpoints);class HijaxLoader extends Sargasso{constructor(e,t={}){t.watchDOM=!0,t.immortal=!0,super(e,t),this.excludeRegex=new RegExp("^(//|http|javascript|mailto|#)","i"),this.currentPage=location.pathname+location.search,this.cachedMarkup={}}start(){const e=document.querySelectorAll("[data-hijax-skip-unchanged]");for(let t=0;t<e.length;t++){const s=e[t],i=s.getAttribute("id");this.cachedMarkup[i]=s.innerHTML}super.start(),window.addEventListener("popstate",(e=>{this.watchPopState(e)}),!1)}DOMChanged(e){super.DOMChanged(e),this.hijaxLinks(e)}watchPopState(e){location.pathname+location.search!==this.currentPage&&this.preFlight(location.pathname+location.search)}hijaxLinks(e){const t=e?e.getElementsByTagName("a"):this.element.getElementsByTagName("a");for(let e=0;e<t.length;e++){const s=t[e],i=s.getAttribute("href");!i||s.getAttribute("data-hijaxed")||s.getAttribute("target")||s.hasAttribute("data-no-hijax")||this.excludeRegex.exec(i)||(s.setAttribute("data-hijaxed",!0),s.addEventListener("click",(e=>{e.preventDefault(),this.setPage(i)}),!1))}}setPage(e,t){e===this.currentPage||t?this.preFlight(e):(history.pushState(null,null,e),this.watchPopState())}preFlight(e){if(!this.options.preFlight)return this.loadPage(e);this.options.preFlight(e,((t,s,i)=>{t&&(this.options.onError?this.options.onError("danger",t):alert("Error loading page: "+t)),s?this.currentPage=location.pathname+location.search:this.loadPage(i||e)}))}loadPage(e){this.queueFrame((()=>{ct.addClass(document.body,"hijax-loading")})),this.options.onExitPage&&this.options.onExitPage();const t=new XMLHttpRequest;t.open("GET",e),t.setRequestHeader("Sargasso-Hijax",1),t.setRequestHeader("x-digitopia-hijax",1),this.options.onLoading&&(this.options.onLoading(),t.onreadystatechange=this.options.onLoading),t.onload=()=>{if(301===t.status||302===t.status||t.getResponseHeader("Sargasso-Location")){const e=t.getResponseHeader("Location")?t.getResponseHeader("Location"):t.getResponseHeader("Sargasso-Location");this.setPage(e)}else if(200===t.status){ri.scrollTop(0),this.mergePage(t.responseText);const e=this.currentPage,frame=()=>{this.notifyAll("newPage",[e,location.pathname+location.search]),ct.removeClass(document.body,"hijax-loading")};this.queueFrame(frame),this.currentPage=location.pathname+location.search}else{const e=t.getResponseHeader("Sargasso-Flash-Level")||"danger";let s=t.getResponseHeader("Sargasso-Flash-Message")||t.statusText;s||(s="Could not connect to server."),this.options.onError?this.options.onError(e,s):alert("Error loading page: "+s)}},t.send()}processScripts(e){Array.from(e).forEach((e=>{e.remove();const t=e.getAttribute("id");document.getElementById(t)||document.getElementsByTagName("head")[0].appendChild(e)}))}mergePage(e){const t=document.querySelectorAll("[data-ephemeral]");Array.from(t).forEach((e=>{e.remove()}));const s=e.split(/(<body[^>]*>|<\/body>)/gi),i=makeFragment(s[2]),n=document.querySelectorAll("[data-hijax]");for(let e=0;e<n.length;e++){const t=n[e],s=t.getAttribute("id"),o=i.getElementById(s);if(t.hasAttribute("data-hijax-skip-unchanged")){if(this.cachedMarkup[s]===o.innerHTML)continue;this.cachedMarkup[s]=o.innerHTML}const a=t.getAttribute("data-hijax-cache-key-selector");if(a&&o.querySelector(a)&&t.querySelector(a)&&t.querySelector(a).getAttribute("data-hijax-cache-key")===o.querySelector(a).getAttribute("data-hijax-cache-key"))continue;this.processScripts(o.querySelectorAll("script"));const frame=()=>{t.parentNode.replaceChild(o,t),this.options.onEnterPage&&this.options.onEnterPage(),this.hijaxLinks(o)};this.queueFrame(frame)}}}registerSargassoClass("HijaxLoader",HijaxLoader);const makeFragment=e=>{if(document.createRange&&document.createRange().createContextualFragment)return document.createRange().createContextualFragment(e);const t=document.createDocumentFragment(),s=document.createElement("div");return s.insertAdjacentHTML("afterBegin",e),t.appendChild(s),t};e.loadPageHandler=void 0;var bi;const gi=window,vi=gi.trustedTypes,mi=vi?vi.createPolicy("lit-html",{createHTML:e=>e}):void 0,yi=`lit$${(Math.random()+"").slice(9)}$`,_i="?"+yi,wi=`<${_i}>`,Oi=document,r=(e="")=>Oi.createComment(e),d=e=>null===e||"object"!=typeof e&&"function"!=typeof e,Ai=Array.isArray,c=e=>Ai(e)||"function"==typeof(null==e?void 0:e[Symbol.iterator]),$i=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,xi=/-->/g,Si=/>/g,Ei=RegExp(">|[ \t\n\f\r](?:([^\\s\"'>=/]+)([ \t\n\f\r]*=[ \t\n\f\r]*(?:[^ \t\n\f\r\"'`<>=]|(\"|')|))|$)","g"),ji=/'/g,Ci=/"/g,ki=/^(?:script|style|textarea|title)$/i,g=e=>(t,...s)=>({_$litType$:e,strings:t,values:s}),Mi=g(1),Di=(g(2),Symbol.for("lit-noChange")),Pi=Symbol.for("lit-nothing"),Ti=new WeakMap,Hi=Oi.createTreeWalker(Oi,129,null,!1),E=(e,t)=>{const s=e.length-1,i=[];let n,o=2===t?"<svg>":"",a=$i;for(let t=0;t<s;t++){const s=e[t];let l,h,u=-1,p=0;for(;p<s.length&&(a.lastIndex=p,h=a.exec(s),null!==h);)p=a.lastIndex,a===$i?"!--"===h[1]?a=xi:void 0!==h[1]?a=Si:void 0!==h[2]?(ki.test(h[2])&&(n=RegExp("</"+h[2],"g")),a=Ei):void 0!==h[3]&&(a=Ei):a===Ei?">"===h[0]?(a=null!=n?n:$i,u=-1):void 0===h[1]?u=-2:(u=a.lastIndex-h[2].length,l=h[1],a=void 0===h[3]?Ei:'"'===h[3]?Ci:ji):a===Ci||a===ji?a=Ei:a===xi||a===Si?a=$i:(a=Ei,n=void 0);const f=a===Ei&&e[t+1].startsWith("/>")?" ":"";o+=a===$i?s+wi:u>=0?(i.push(l),s.slice(0,u)+"$lit$"+s.slice(u)+yi+f):s+yi+(-2===u?(i.push(void 0),t):f)}const l=o+(e[s]||"<?>")+(2===t?"</svg>":"");if(!Array.isArray(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return[void 0!==mi?mi.createHTML(l):l,i]};class C{constructor({strings:e,_$litType$:t},s){let i;this.parts=[];let n=0,o=0;const a=e.length-1,l=this.parts,[h,u]=E(e,t);if(this.el=C.createElement(h,s),Hi.currentNode=this.el.content,2===t){const e=this.el.content,t=e.firstChild;t.remove(),e.append(...t.childNodes)}for(;null!==(i=Hi.nextNode())&&l.length<a;){if(1===i.nodeType){if(i.hasAttributes()){const e=[];for(const t of i.getAttributeNames())if(t.endsWith("$lit$")||t.startsWith(yi)){const s=u[o++];if(e.push(t),void 0!==s){const e=i.getAttribute(s.toLowerCase()+"$lit$").split(yi),t=/([.?@])?(.*)/.exec(s);l.push({type:1,index:n,name:t[2],strings:e,ctor:"."===t[1]?M:"?"===t[1]?k:"@"===t[1]?H:S})}else l.push({type:6,index:n})}for(const t of e)i.removeAttribute(t)}if(ki.test(i.tagName)){const e=i.textContent.split(yi),t=e.length-1;if(t>0){i.textContent=vi?vi.emptyScript:"";for(let s=0;s<t;s++)i.append(e[s],r()),Hi.nextNode(),l.push({type:2,index:++n});i.append(e[t],r())}}}else if(8===i.nodeType)if(i.data===_i)l.push({type:2,index:n});else{let e=-1;for(;-1!==(e=i.data.indexOf(yi,e+1));)l.push({type:7,index:n}),e+=yi.length-1}n++}}static createElement(e,t){const s=Oi.createElement("template");return s.innerHTML=e,s}}function P(e,t,s=e,i){var n,o,a,l;if(t===Di)return t;let h=void 0!==i?null===(n=s._$Co)||void 0===n?void 0:n[i]:s._$Cl;const u=d(t)?void 0:t._$litDirective$;return(null==h?void 0:h.constructor)!==u&&(null===(o=null==h?void 0:h._$AO)||void 0===o||o.call(h,!1),void 0===u?h=void 0:(h=new u(e),h._$AT(e,s,i)),void 0!==i?(null!==(a=(l=s)._$Co)&&void 0!==a?a:l._$Co=[])[i]=h:s._$Cl=h),void 0!==h&&(t=P(e,h._$AS(e,t.values),h,i)),t}class V{constructor(e,t){this.u=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}v(e){var t;const{el:{content:s},parts:i}=this._$AD,n=(null!==(t=null==e?void 0:e.creationScope)&&void 0!==t?t:Oi).importNode(s,!0);Hi.currentNode=n;let o=Hi.nextNode(),a=0,l=0,h=i[0];for(;void 0!==h;){if(a===h.index){let t;2===h.type?t=new N(o,o.nextSibling,this,e):1===h.type?t=new h.ctor(o,h.name,h.strings,this,e):6===h.type&&(t=new I(o,this,e)),this.u.push(t),h=i[++l]}a!==(null==h?void 0:h.index)&&(o=Hi.nextNode(),a++)}return n}p(e){let t=0;for(const s of this.u)void 0!==s&&(void 0!==s.strings?(s._$AI(e,s,t),t+=s.strings.length-2):s._$AI(e[t])),t++}}class N{constructor(e,t,s,i){var n;this.type=2,this._$AH=Pi,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=s,this.options=i,this._$Cm=null===(n=null==i?void 0:i.isConnected)||void 0===n||n}get _$AU(){var e,t;return null!==(t=null===(e=this._$AM)||void 0===e?void 0:e._$AU)&&void 0!==t?t:this._$Cm}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return void 0!==t&&11===e.nodeType&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=P(this,e,t),d(e)?e===Pi||null==e||""===e?(this._$AH!==Pi&&this._$AR(),this._$AH=Pi):e!==this._$AH&&e!==Di&&this.g(e):void 0!==e._$litType$?this.$(e):void 0!==e.nodeType?this.T(e):c(e)?this.k(e):this.g(e)}O(e,t=this._$AB){return this._$AA.parentNode.insertBefore(e,t)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}g(e){this._$AH!==Pi&&d(this._$AH)?this._$AA.nextSibling.data=e:this.T(Oi.createTextNode(e)),this._$AH=e}$(e){var t;const{values:s,_$litType$:i}=e,n="number"==typeof i?this._$AC(e):(void 0===i.el&&(i.el=C.createElement(i.h,this.options)),i);if((null===(t=this._$AH)||void 0===t?void 0:t._$AD)===n)this._$AH.p(s);else{const e=new V(n,this),t=e.v(this.options);e.p(s),this.T(t),this._$AH=e}}_$AC(e){let t=Ti.get(e.strings);return void 0===t&&Ti.set(e.strings,t=new C(e)),t}k(e){Ai(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let s,i=0;for(const n of e)i===t.length?t.push(s=new N(this.O(r()),this.O(r()),this,this.options)):s=t[i],s._$AI(n),i++;i<t.length&&(this._$AR(s&&s._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){var s;for(null===(s=this._$AP)||void 0===s||s.call(this,!1,!0,t);e&&e!==this._$AB;){const t=e.nextSibling;e.remove(),e=t}}setConnected(e){var t;void 0===this._$AM&&(this._$Cm=e,null===(t=this._$AP)||void 0===t||t.call(this,e))}}class S{constructor(e,t,s,i,n){this.type=1,this._$AH=Pi,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=n,s.length>2||""!==s[0]||""!==s[1]?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=Pi}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(e,t=this,s,i){const n=this.strings;let o=!1;if(void 0===n)e=P(this,e,t,0),o=!d(e)||e!==this._$AH&&e!==Di,o&&(this._$AH=e);else{const i=e;let a,l;for(e=n[0],a=0;a<n.length-1;a++)l=P(this,i[s+a],t,a),l===Di&&(l=this._$AH[a]),o||(o=!d(l)||l!==this._$AH[a]),l===Pi?e=Pi:e!==Pi&&(e+=(null!=l?l:"")+n[a+1]),this._$AH[a]=l}o&&!i&&this.j(e)}j(e){e===Pi?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=e?e:"")}}class M extends S{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Pi?void 0:e}}const Ri=vi?vi.emptyScript:"";class k extends S{constructor(){super(...arguments),this.type=4}j(e){e&&e!==Pi?this.element.setAttribute(this.name,Ri):this.element.removeAttribute(this.name)}}class H extends S{constructor(e,t,s,i,n){super(e,t,s,i,n),this.type=5}_$AI(e,t=this){var s;if((e=null!==(s=P(this,e,t,0))&&void 0!==s?s:Pi)===Di)return;const i=this._$AH,n=e===Pi&&i!==Pi||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,o=e!==Pi&&(i===Pi||n);n&&this.element.removeEventListener(this.name,this,i),o&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){var t,s;"function"==typeof this._$AH?this._$AH.call(null!==(s=null===(t=this.options)||void 0===t?void 0:t.host)&&void 0!==s?s:this.element,e):this._$AH.handleEvent(e)}}class I{constructor(e,t,s){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(e){P(this,e)}}const Li=gi.litHtmlPolyfillSupport;null==Li||Li(C,N),(null!==(bi=gi.litHtmlVersions)&&void 0!==bi?bi:gi.litHtmlVersions=[]).push("2.5.0");const Z=(e,t,s)=>{var i,n;const o=null!==(i=null==s?void 0:s.renderBefore)&&void 0!==i?i:t;let a=o._$litPart$;if(void 0===a){const e=null!==(n=null==s?void 0:s.renderBefore)&&void 0!==n?n:null;o._$litPart$=a=new N(t.insertBefore(r(),e),e,void 0,null!=s?s:{})}return a._$AI(e),a};class SargassoComponent extends Sargasso{constructor(e,t={}){t.shadowDOM=void 0===t.shadowDOM||t.shadowDOM,t.componentOptions=window.sagassoComponentOptions||{},super(e,t),this.templateAttributes=[],this.renderAttributes=[],this.templateOptions={},this.obervableId=(this._hostElement||this.element).getAttribute("data-observable-id"),this.toDestroy=[]}start(){super.start(),this.obervableId&&(this.observableData=this.observableStart(this.obervableId)),this.renderOptions=this.observableStart("SargassoComponent-"+this.uid,{}),this.getAttributes(),this.watchAttributes(),this.setTemplateArgs({options:this.options.componentOptions||{},attributes:this.renderOptions.data,data:this.observableData?this.observableData.data:void 0}),this.buildTemplate(),this._template&&this.setRenderer(Z)}watchAttributes(){this.allAttributes=this.templateAttributes.concat(this.renderAttributes),this.attributeObserver=new MutationObserver((e=>{let t=!1,s=!1;e.forEach((e=>{"attributes"===e.type&&-1!==this.allAttributes.indexOf(e.attributeName)&&(t=!0,-1!==this.templateAttributes.indexOf(e.attributeName)&&(s=!0))})),t&&(this.getAttributes(),s&&(this.buildTemplate(),this.render()))})),this.attributeObserver.observe(this._hostElement||this.element,{attributes:!0})}getAttributes(){for(const e of this.templateAttributes){const t=(this._hostElement||this.element).getAttribute(e)||(this._hostElement||this.element).hasAttribute(e)||void 0;this.templateOptions[e]!==t&&(this.templateOptions[e]=t)}for(const e of this.renderAttributes){const t=(this._hostElement||this.element).getAttribute(e)||(this._hostElement||this.element).hasAttribute(e)||void 0;this.renderOptions.data[e]!==t&&(this.renderOptions.data[e]=t)}}buildTemplate(){this.setTemplate((e=>Mi`
<div class="web-component-body">
<p>using default buildTemplate - override buildTemplate to customize component markup</p>
<pre>${this.obervableId}: ${JSON.stringify(e.data,"",2)}</pre>
<pre>attributes: ${JSON.stringify(e.attributes,"",2)}</pre>
<pre>options: ${JSON.stringify(e.options,"",2)}</pre>
</div>
`))}sleep(){if(this.toDestroy)for(const e of this.toDestroy)e.destroy();this.attributeObserver&&this.attributeObserver.disconnect(),super.sleep()}_render(){super._render(),this.didRender()}didRender(){}}registerSargassoClass("SargassoComponent",SargassoComponent);const Fi={registerSargassoClass:registerSargassoClass,bootSargasso:(t={})=>{if(t.scrollElement&&ri.setOptions(t),t.breakpoints){new Breakpoints(document.body,t.breakpoints).start()}if(t.hijax){const s=new HijaxLoader(document.body,t.hijax);s.start(),e.loadPageHandler=s.setPage.bind(s)}else e.loadPageHandler=e=>{document.location.href=e};const s=new SargassoSupervisor(document.body,t);return s.start(t),s},elementTools:ct,validate:validate,setValidator:setValidator},zi={theDOMWatcher:si,theScrollWatcher:ri,theResizeWatcher:ii,theOrientationWatcher:ni,theWorkerWatcher:oi,theObservableObjectWatcher:ai},Ni={liveElements:ci,registeredClasses:di,elementMetaData:ht};return e.ObservableObject=ObservableObject,e.Sargasso=Sargasso,e.SargassoComponent=SargassoComponent,e.services=zi,e.system=Ni,e.utils=Fi,e}({});
//# sourceMappingURL=sargasso.iife.min.js.map
{
"name": "@pelagiccreatures/sargasso",
"version": "2.2.6",
"version": "2.3.0",
"description": "Simple, Fast, Reactive, Supervised Javascript controllers for custom html elements.",

@@ -5,0 +5,0 @@ "type": "module",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc