@sitecore-feaas/clientside 0.6.4 → 0.6.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/build/cdn.js.map +1 -1
  2. package/build/components/FEAASComponent.js +1 -2
  3. package/build/components/FEAASComponent.js.map +1 -1
  4. package/build/components/FEAASElement.js.map +1 -1
  5. package/build/components/FEAASLoader.js +1 -2
  6. package/build/components/FEAASLoader.js.map +1 -1
  7. package/build/components/FEAASReactElement.js +1 -2
  8. package/build/components/FEAASReactElement.js.map +1 -1
  9. package/build/components/FEAASStylesheet.js.map +1 -1
  10. package/build/dom/component.js.map +1 -1
  11. package/build/dom/html.js.map +1 -1
  12. package/build/dom/rendering.js.map +1 -1
  13. package/build/dom/scripts.js.map +1 -1
  14. package/build/dom/stylesheet.js.map +1 -1
  15. package/build/dom/thumbnail.js.map +1 -1
  16. package/build/fetch.js +6 -2
  17. package/build/fetch.js.map +1 -1
  18. package/build/headless.js.map +1 -1
  19. package/build/ui/FEAASContext.js +1 -2
  20. package/build/ui/FEAASContext.js.map +1 -1
  21. package/build/ui/FEAASEditor.js +1 -2
  22. package/build/ui/FEAASEditor.js.map +1 -1
  23. package/build/ui/FEAASExternal.js.map +1 -1
  24. package/build/ui/FEAASPicker.js +1 -2
  25. package/build/ui/FEAASPicker.js.map +1 -1
  26. package/build/ui/react.js.map +1 -1
  27. package/build/utils/data.js.map +1 -1
  28. package/build/utils/settings.js.map +1 -1
  29. package/dist/browser/headless.cjs +8 -9
  30. package/dist/browser/headless.cjs.map +4 -4
  31. package/dist/browser/headless.esm.js +8 -9
  32. package/dist/browser/headless.esm.js.map +1 -1
  33. package/dist/browser/index.cjs +10 -11
  34. package/dist/browser/index.cjs.map +4 -4
  35. package/dist/browser/index.esm.js +10 -11
  36. package/dist/browser/index.esm.js.map +1 -1
  37. package/dist/browser/react.cjs +11 -12
  38. package/dist/browser/react.cjs.map +4 -4
  39. package/dist/browser/react.esm.js +11 -12
  40. package/dist/browser/react.esm.js.map +1 -1
  41. package/dist/node/headless.cjs +8 -7
  42. package/dist/node/headless.cjs.map +4 -4
  43. package/dist/node/headless.esm.js +8 -7
  44. package/dist/node/headless.esm.js.map +4 -4
  45. package/dist/node/index.cjs +7 -6
  46. package/dist/node/index.cjs.map +4 -4
  47. package/dist/node/index.esm.js +7 -6
  48. package/dist/node/index.esm.js.map +4 -4
  49. package/dist/node/react.cjs +11 -10
  50. package/dist/node/react.cjs.map +4 -4
  51. package/dist/node/react.esm.js +11 -10
  52. package/dist/node/react.esm.js.map +4 -4
  53. package/headless.cjs +8 -7
  54. package/headless.cjs.map +4 -4
  55. package/headless.js +8 -7
  56. package/headless.js.map +4 -4
  57. package/package.json +3 -4
  58. package/react.cjs +11 -12
  59. package/react.cjs.map +4 -4
  60. package/react.js +11 -12
  61. package/react.js.map +4 -4
  62. package/src/fetch.ts +7 -2
  63. package/test/FEAASBase.test.tsx +4 -4
  64. package/test/FEAASComponent.react.test.tsx +1 -1
  65. package/test/FEAASComponent.test.tsx +1 -1
  66. package/test/FEAASExternal.test.tsx +29 -12
  67. package/test/FEAASStylesheet.test.tsx +1 -1
  68. package/test/fetch.ts +21 -5
  69. package/types/fetch.d.ts +1 -1
  70. package/types/fetch.d.ts.map +1 -1
  71. package/types/utils/settings.d.ts +5 -5
@@ -1,8 +1,9 @@
1
- var Oe=Object.defineProperty;var j=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enumerable:!0})};function x(e,t=r=>{}){var r;let n=()=>{var i,s;let o=new Promise((l,c)=>{i=d=>{e==null||e(d),l(d)},s=c});var a=Object.assign(o,{resolve:i,reject:s,restart:n,first:r});return r=a,a.catch(t),a};return n()}var De=typeof HTMLElement=="undefined"?typeof windowJSDOM!="undefined"?windowJSDOM.HTMLElement:class{}:HTMLElement,S=class extends De{getProps(t){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=x(t=>{this.payload=t}),this.whenRendered=x(()=>this.initialized=!0,()=>this.cancelRender()),this.addEventListener("feaasMount",this),this.addEventListener("feaasUnmount",this)}getRoot(){return this}attributeChangedCallback(t,r,n){this.set()}connectedCallback(){this.mount()}disconnectedCallback(){this.unmount()}mount(){try{let t=this.getParent();if(t&&!t.connected||this.connected)return;this.connected=!0,this.log("FEAAS: Mount",this.tagName,this),this.dispatchEventIndirectly(new Event("feaasMount",{bubbles:!0,composed:!0})),this.getElements().map(r=>{var n;return(n=r.mount)===null||n===void 0?void 0:n.call(r)}),this.set()}catch(t){this.onError(t)}}dispatchEventIndirectly(t){this.dispatchEvent(t);let r=this.getParent();r&&!r.contains(this)&&(Object.defineProperty(t,"target",{value:this,writable:!1}),Object.defineProperty(t,"composedPath",{value:()=>[this],writable:!1}),r.handleEvent(t))}isJSONAttribute(t){return!1}log(...t){let r=t[0];(typeof location!="undefined"&&(location!=null&&location.hostname.startsWith("components-"))||localStorage["Sitecore.Components.Debug"])&&console.log(r+" "+t.slice(1).map(n=>n&&typeof n=="object"?"%O":"%s").join(" "),...t.slice(1))}unmount(){this.connected&&(this.log("FEAAS: Unmount",this),this.dispatchEventIndirectly(new Event("feaasUnmount",{bubbles:!0,composed:!0})),this.connected&&this.initialized&&this.render&&this.update(),this.cancelRender(),this.connected=!1,this.initialized&&this.render&&this.update())}getParent(t=!0){for(var r=this;r=r.parentElement||(r.parentNode instanceof ShadowRoot?r.parentNode.host:null);)if(!t||r.tagName.startsWith("FEAAS-"))return r;if(this.tagName!="FEAAS-CONTEXT")return document.querySelector("feaas-context")}getElements(t=this.getRoot(),r=!0){return Array.from(t.querySelectorAll("*")).map(n=>[!r||n.tagName.startsWith("FEAAS-")?n:null,n.shadowRoot?this.getElements(n.shadowRoot,r):null]).flat().filter(Boolean)}handleEvent(t){let r=t.composedPath()[0];switch(t.type){case"feaasMount":r!=this&&this.nestedCallback(r);break;case"feaasUnmount":r!=this&&this.unnestedCallback(r);break}}unnestedCallback(t){let r=this.descendants.indexOf(t);r!=-1&&(this.log("FEAAS: Unnest",this,t),this.descendants.splice(r,1),this.refs[t.getComponentName()]=null,t.refs.parent==this&&(t.refs.parent=null),t.refs.top==this&&(t.refs.top=t.refs.parent))}nestedCallback(t){var r,n;if(this.descendants.indexOf(t)==-1&&(this.descendants.push(t),this.log("FEAAS: Nest",this,t),this.refs[t.getComponentName()]=t,t.refs.top=this,(r=t.refs).parent||(r.parent=this),t.render))for(var s=t.refs.parent;s;s=s.refs.parent)s.render&&((n=t.refs).parentReact||(n.parentReact=s),t.refs.topReact=s)}getComponentName(){return this.tagName.replace("FEAAS-","").toLowerCase()}isReadyToLoad(){return this.payload===void 0&&this.getAttribute("hidden")==null}onError(t,r="uncaught",n=!1){let i=new CustomEvent("feaasError",{bubbles:!0,composed:!0,detail:t});if(this.dispatchEventIndirectly(i),this.whenLoaded.reject(t),!i.defaultPrevented&&!n){this.whenRendered.reject(t);try{this.unmount()}catch(s){}return!0}return!1}shouldUpdateOnLoad(){return!0}async advance(){try{if(this.payload===void 0){if(!this.isReadyToLoad())return;this.payload=null,this.dispatchEventIndirectly(new Event("feaasLoad",{bubbles:!0,composed:!0}));let t=await this.load().catch(r=>{throw this.payload=void 0,r});if(this.whenLoaded.resolve(t),this.onLoad)return}else if(this.payload==null)return;this.flush(),this.whenRendered.resolve(this)}catch(t){this.onError(t)}}flush(){var t,r;if(!this.connected)return;let n=(r=(t=this.payload)===null||t===void 0?void 0:t.ReactDOM)===null||r===void 0?void 0:r.flushSync;n?n(()=>this.update()):this.update()}load(){return Promise.resolve(null)}update(){var t,r,n;if(this.payload==null||!this.render)return;let{React:i,ReactDOM:s,ReactDOMClient:o}=this.payload||{};if(!i)throw new Error(`${this.tagName}: React is not present in payload`);if(!s)throw new Error(`${this.tagName}: ReactDOM is not present in payload`);this.getAttribute("hydrate")=="false"&&this.firstElementChild||(!this.refs.topReact&&!this.forceUpdateReact?(this.reactRoot||(this.reactRoot=o.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())):this.forceUpdateReact&&this.connected?(t=this.forceUpdateReact)===null||t===void 0||t.call(this):(n=(r=this.refs.topReact)===null||r===void 0?void 0:r.forceUpdateReact)===null||n===void 0||n.call(r))}invokeReactRendering(){let{React:t,ReactDOM:r}=this.payload||{};if(!this.connected)return null;let n=this.descendants.filter(i=>i.refs.parentReact==this&&i.payload&&i.connected).map((i,s)=>this.getReactElement(i));return this.render({...this.props,children:n},this.payload)}getReactErrorBoundary(t=this,r=t.tagName){if(this.reactErrorBoundary)return this.reactErrorBoundary;let{React:n,ReactDOM:i}=t.payload||{};return this.reactErrorBoundary||(this.reactErrorBoundary=class extends n.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromError(o){return{error:o}}componentDidCatch(o,a){console.error(`FEAAS: ${t.tagName} Error:`,o,a),t.onError(o,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(t=this,r){let{React:n,ReactDOM:i}=t.payload||{},s=this.getReactErrorBoundary(),o=this.getReactWrapper(t);return n.createElement(s,{key:t.tagName+"-"+t.getUID(),slot:t.getAttribute("slot")},n.createElement(o,null))}getReactWrapper(t=this,r=t.tagName){if(t.reactWrapper)return t.reactWrapper;let{React:n,ReactDOM:i}=t.payload||{};return t.reactWrapper=s=>{if(t.render){let[o,a]=n.useReducer(l=>l+1,0);return t.forceUpdateReact=a,i.createPortal(n.createElement(n.Fragment,null,t.invokeReactRendering()),t.getReactRootElement())}else return t.update()},Object.assign(t.reactWrapper,{key:t.tagName+"-"+t.getUID(),displayName:r}),t.reactWrapper}getUID(){return this.uid||(this.uid=String(Math.random()))}getShadowRoot(){return this.shadowRoot||this.attachShadow({mode:"open"}),this.shadowRoot}getReactRootElement(){return this.useShadowRoot?this.getShadowRoot():this.getRoot()}set(t){try{this.scheduleRender(),this.overrides={...this.overrides,...t},this.props={...this.getProps(),...this.overrides};for(var r in this.props){let i=this.isJSONAttribute(r),s=this.props[r],o=i?JSON.stringify(s):String(s),a=this.defaultProps[r],l=i?JSON.stringify(a):String(a),c=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),d=this.getAttribute(c);try{var n=i?JSON.stringify(JSON.parse(d)):d}catch(p){var n=null}s==null||o===l?this.removeAttribute(c):(typeof s=="string"||typeof s=="number"||typeof s=="boolean"||i)&&n!=o&&this.setAttribute(c,o)}}catch(i){this.whenRendered.reject(i),this.onError(i,"set")}return this}import(t){return import( /*@vite-ignore*/ /* webpackIgnore: true */ t)}scheduleRender(){this.nextRender==null&&(this.whenRendered=this.whenRendered.restart()),this.cancelRender(),this.nextRender=requestAnimationFrame(()=>{this.nextRender=null,this.advance().catch(t=>{})})}cancelRender(){cancelAnimationFrame(this.nextRender)}formatURL(t,r){return typeof t=="string"&&t.match(/^\/[^\/]/)?r+t:t}getContextAttribute(t,r=this){for(var n=this;n=n.parentElement||(n.parentNode instanceof ShadowRoot?n.parentNode.host:null);)if(n.getAttribute(t)!=null)return n.getAttribute(t);return this.getAttribute(t)}static register(t,r){r==null&&(r=typeof window!="undefined"?window:null),r&&!r.customElements.get(t)&&r.customElements.define(t,this)}};var T=class extends S{load(){return Promise.all([import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom/client")]).then(([t,r,n])=>({React:t,ReactDOM:r,ReactDOMClient:n}))}render({},{React:t}){return t.createElement(t.Fragment,null)}},G=class extends T{constructor(){super(...arguments),this.useShadowRoot=!0}getProps(){return{counter:parseFloat(this.getAttribute("counter"))}}render({counter:t},{React:r}){let[n,i]=r.useState(0);return r.useEffect(()=>{i(s=>s+1)},[t]),r.createElement(r.Fragment,null,r.createElement("p",null,"Rendering attribute: ",t),r.createElement("p",null,"Triggered updates: ",n))}};G.observedAttributes=["counter"];var ne={};j(ne,{renderDOMContent:()=>O,renderDOMElement:()=>w,renderHTMLContent:()=>Ve,setDOMAttribute:()=>N});var Q={};j(Q,{JSONPath:()=>m,queryObject:()=>M,queryObjectRaw:()=>fe,queryScopes:()=>U,serializeCH1RichText:()=>$});import Pe from"vm";var{hasOwnProperty:A}=Object.prototype;function R(e,t){return e=e.slice(),e.push(t),e}function K(e,t){return t=t.slice(),t.unshift(e),t}var Y=class extends Error{constructor(t){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=t,this.name="NewError"}};function m(e,t,r,n,i){if(!(this instanceof m))try{return new m(e,t,r,n,i)}catch(o){if(!o.avoidNew)throw o;return o.value}typeof e=="string"&&(i=n,n=r,r=t,t=e,e=null);let s=e&&typeof e=="object";if(e=e||{},this.json=e.json||r,this.path=e.path||t,this.resultType=e.resultType||"value",this.flatten=e.flatten||!1,this.wrap=A.call(e,"wrap")?e.wrap:!0,this.sandbox=e.sandbox||{},this.preventEval=e.preventEval||!1,this.parent=e.parent||null,this.parentProperty=e.parentProperty||null,this.callback=e.callback||n||null,this.otherTypeCallback=e.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},e.autostart!==!1){let o={path:s?e.path:t};s?"json"in e&&(o.json=e.json):o.json=r;let a=this.evaluate(o);if(!a||typeof a!="object")throw new Y(a);return a}}m.prototype.evaluate=function(e,t,r,n){let i=this.parent,s=this.parentProperty,{flatten:o,wrap:a}=this;if(this.currResultType=this.resultType,this.currPreventEval=this.preventEval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,t=t||this.json,e=e||this.path,e&&typeof e=="object"&&!Array.isArray(e)){if(!e.path&&e.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!A.call(e,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:t}=e),o=A.call(e,"flatten")?e.flatten:o,this.currResultType=A.call(e,"resultType")?e.resultType:this.currResultType,this.currSandbox=A.call(e,"sandbox")?e.sandbox:this.currSandbox,a=A.call(e,"wrap")?e.wrap:a,this.currPreventEval=A.call(e,"preventEval")?e.preventEval:this.currPreventEval,r=A.call(e,"callback")?e.callback:r,this.currOtherTypeCallback=A.call(e,"otherTypeCallback")?e.otherTypeCallback:this.currOtherTypeCallback,i=A.call(e,"parent")?e.parent:i,s=A.call(e,"parentProperty")?e.parentProperty:s,e=e.path}if(i=i||null,s=s||null,Array.isArray(e)&&(e=m.toPathString(e)),!e&&e!==""||!t)return;let l=m.toPathArray(e);l[0]==="$"&&l.length>1&&l.shift(),this._hasParentSelector=null;let c=this._trace(l,t,["$"],i,s,r).filter(function(d){return d&&!d.isParentSelector});return c.length?!a&&c.length===1&&!c[0].hasArrExpr?this._getPreferredOutput(c[0]):c.reduce((d,p)=>{let f=this._getPreferredOutput(p);return o&&Array.isArray(f)?d=d.concat(f):d.push(f),d},[]):a?[]:void 0};m.prototype._getPreferredOutput=function(e){let t=this.currResultType;switch(t){case"all":{let r=Array.isArray(e.path)?e.path:m.toPathArray(e.path);return e.pointer=m.toPointer(r),e.path=typeof e.path=="string"?e.path:m.toPathString(e.path),e}case"value":case"parent":case"parentProperty":return e[t];case"path":return m.toPathString(e[t]);case"pointer":return m.toPointer(e.path);default:throw new TypeError("Unknown result type")}};m.prototype._handleCallback=function(e,t,r){if(t){let n=this._getPreferredOutput(e);e.path=typeof e.path=="string"?e.path:m.toPathString(e.path),t(n,r,e)}};m.prototype._trace=function(e,t,r,n,i,s,o,a){let l;if(!e.length)return l={path:r,value:t,parent:n,parentProperty:i,hasArrExpr:o},this._handleCallback(l,s,"value"),l;let c=e[0],d=e.slice(1),p=[];function f(u){Array.isArray(u)?u.forEach(h=>{p.push(h)}):p.push(u)}if((typeof c!="string"||a)&&t&&A.call(t,c))f(this._trace(d,t[c],R(r,c),t,c,s,o));else if(c==="*")this._walk(t,u=>{f(this._trace(d,t[u],R(r,u),t,u,s,!0,!0))});else if(c==="..")f(this._trace(d,t,r,n,i,s,o)),this._walk(t,u=>{typeof t[u]=="object"&&f(this._trace(e.slice(),t[u],R(r,u),t,u,s,!0))});else{if(c==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:d,isParentSelector:!0};if(c==="~")return l={path:R(r,c),value:i,parent:n,parentProperty:null},this._handleCallback(l,s,"property"),l;if(c==="$")f(this._trace(d,t,r,null,null,s,o));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(c))f(this._slice(c,d,t,r,n,i,s));else if(c.indexOf("?(")===0){if(this.currPreventEval)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");let u=c.replace(/^\?\((.*?)\)$/u,"$1");this._walk(t,h=>{this._eval(u,t[h],h,r,n,i)&&f(this._trace(d,t[h],R(r,h),t,h,s,!0))})}else if(c[0]==="("){if(this.currPreventEval)throw new Error("Eval [(expr)] prevented in JSONPath expression.");f(this._trace(K(this._eval(c,t,r[r.length-1],r.slice(0,-1),n,i),d),t,r,n,i,s,o))}else if(c[0]==="@"){let u=!1,h=c.slice(1,-2);switch(h){case"scalar":(!t||!["object","function"].includes(typeof t))&&(u=!0);break;case"boolean":case"string":case"undefined":case"function":typeof t===h&&(u=!0);break;case"integer":Number.isFinite(t)&&!(t%1)&&(u=!0);break;case"number":Number.isFinite(t)&&(u=!0);break;case"nonFinite":typeof t=="number"&&!Number.isFinite(t)&&(u=!0);break;case"object":t&&typeof t===h&&(u=!0);break;case"array":Array.isArray(t)&&(u=!0);break;case"other":u=this.currOtherTypeCallback(t,r,n,i);break;case"null":t===null&&(u=!0);break;default:throw new TypeError("Unknown value type "+h)}if(u)return l={path:r,value:t,parent:n,parentProperty:i},this._handleCallback(l,s,"value"),l}else if(c[0]==="`"&&t&&A.call(t,c.slice(1))){let u=c.slice(1);f(this._trace(d,t[u],R(r,u),t,u,s,o,!0))}else if(c.includes(",")){let u=c.split(",");for(let h of u)f(this._trace(K(h,d),t,r,n,i,s,!0))}else!a&&t&&A.call(t,c)&&f(this._trace(d,t[c],R(r,c),t,c,s,o,!0))}if(this._hasParentSelector)for(let u=0;u<p.length;u++){let h=p[u];if(h&&h.isParentSelector){let y=this._trace(h.expr,t,h.path,n,i,s,o);if(Array.isArray(y)){p[u]=y[0];let g=y.length;for(let v=1;v<g;v++)u++,p.splice(u,0,y[v])}else p[u]=y}}return p};m.prototype._walk=function(e,t){if(Array.isArray(e)){let r=e.length;for(let n=0;n<r;n++)t(n)}else e&&typeof e=="object"&&Object.keys(e).forEach(r=>{t(r)})};m.prototype._slice=function(e,t,r,n,i,s,o){if(!Array.isArray(r))return;let a=r.length,l=e.split(":"),c=l[2]&&Number.parseInt(l[2])||1,d=l[0]&&Number.parseInt(l[0])||0,p=l[1]&&Number.parseInt(l[1])||a;d=d<0?Math.max(0,d+a):Math.min(a,d),p=p<0?Math.max(0,p+a):Math.min(a,p);let f=[];for(let u=d;u<p;u+=c)this._trace(K(u,t),r,n,i,s,o,!0).forEach(y=>{f.push(y)});return f};m.prototype._eval=function(e,t,r,n,i,s){this.currSandbox._$_parentProperty=s,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=t;let o=e.includes("@path");o&&(this.currSandbox._$_path=m.toPathString(n.concat([r])));let a="script:"+e;if(!m.cache[a]){let l=e.replace(/@parentProperty/gu,"_$_parentProperty").replace(/@parent/gu,"_$_parent").replace(/@property/gu,"_$_property").replace(/@root/gu,"_$_root").replace(/@([.\s)[])/gu,"_$_v$1");o&&(l=l.replace(/@path/gu,"_$_path")),m.cache[a]=new this.vm.Script(l)}try{return m.cache[a].runInNewContext(this.currSandbox)}catch(l){throw new Error("jsonPath: "+l.message+": "+e)}};m.cache={};m.toPathString=function(e){let t=e,r=t.length,n="$";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(n+=/^[0-9*]+$/u.test(t[i])?"["+t[i]+"]":"['"+t[i]+"']");return n};m.toPointer=function(e){let t=e,r=t.length,n="";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(t[i])||(n+="/"+t[i].toString().replace(/~/gu,"~0").replace(/\//gu,"~1"));return n};m.toPathArray=function(e){let{cache:t}=m;if(t[e])return t[e].concat();let r=[],i=e.replace(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replace(/[['](\??\(.*?\))[\]']/gu,function(s,o){return"[#"+(r.push(o)-1)+"]"}).replace(/\[['"]([^'\]]*)['"]\]/gu,function(s,o){return"['"+o.replace(/\./gu,"%@%").replace(/~/gu,"%%@@%%")+"']"}).replace(/~/gu,";~;").replace(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replace(/%@%/gu,".").replace(/%%@@%%/gu,"~").replace(/(?:;)?(\^+)(?:;)?/gu,function(s,o){return";"+o.split("").join(";")+";"}).replace(/;;;|;;/gu,";..;").replace(/;$|'?\]|'$/gu,"").split(";").map(function(s){let o=s.match(/#(\d+)/u);return!o||!o[1]?s:r[o[1]]});return t[e]=i,t[e].concat()};m.prototype.vm=Pe;function fe(e,t){try{return m({path:t,json:e})}catch(r){return[]}}function M(e,t,r=!0){let n=fe(e,t)||[];return r?n.flat(1/0):n}function U(e,t,r=!1,n=e,i=!0){var s=t;let o=Object.keys(e).sort((l,c)=>c.length-l.length);for(let l of o)if(t.startsWith(l)){if(l==t){if(r)return e[l];continue}s=t.substring(l.length+1),n=e[l];break}var a=M(n,s,i);return a.length==0&&(a=[s.replace(/^.*?\./,"_."),s.replace(/^.*?\./,""),s.replace(/^([^.]+).*?\.\$([\.\[])/,"$1$2"),s.replace(/^.*?\.\$([\.\[])/,"_$1"),s.replace(/^.*?\.\$([\.\[])/,"$$$1"),s.replace(/^[^.]+$/,"_")].filter((l,c,d)=>d.indexOf(l)===c).reduce((l,c)=>l.length>0?l:M(n,c,i),[])),r?a[0]:a}function X(e,t={},r){return r?`<${r}${Object.entries(t).map(([n,i])=>i!=null&&` ${n}="${i}"`).filter(Boolean).join("")}>${$(e)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):$(e)}function $(e){var t;if(Array.isArray(e))return e.map($).join(`
2
- `).trim();if(typeof e=="string")return e;if(e==null)return"";switch(e.type){case"heading":let{level:r,...n}=e.attrs;return X(e.content,n,"h"+r);case"text":return(e.marks||[]).reduce((i,s)=>X(i,s.attrs,{link:"a",bold:"strong",italic:"em",strike:"s",underline:"u"}[s.type]),(t=e.text)===null||t===void 0?void 0:t.replace(/\s+/," "));default:return X(e.content||e.text,e.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[e.type])}}var C=class{constructor(t,r=1,n){this.ownerDocument={createElement(i){return new C(i)},createDocumentFragment(){return new C(null,11)}},this.nodeName=t,this.nodeType=r,this.textContent=n,this.attributes=[],this.childNodes=[]}setAttribute(t,r){let n=this.attributes.find(i=>i.name===t);n?n.value=r:this.attributes.push({name:t,value:r})}getAttribute(t){let r=this.attributes.find(n=>n.name===t);return r?r.value:void 0}insertBefore(t,r){if(t.parentNode=this,r===null)this.childNodes.push(t);else{let n=this.childNodes.indexOf(r);n!==-1&&this.childNodes.splice(n,0,t)}}removeAttribute(t){let r=this.attributes.findIndex(n=>n.name===t);r!==-1&&this.attributes.splice(r,1)}appendChild(t){t.parentNode=this,this.childNodes.push(t)}get tagName(){var t;return(t=this.nodeName)===null||t===void 0?void 0:t.toUpperCase()}get localName(){var t;return(t=this.nodeName)===null||t===void 0?void 0:t.toLowerCase()}get innerHTML(){return Z(this.childNodes)}set innerHTML(t){this.childNodes=ee(String(t!=null?t:""))}get outerHTML(){return Z([this])}get children(){return this.childNodes.filter(t=>t.nodeType==1)}closest(t){let r=this;for(;r;){if(pe(t,r))return r;r=r.parentNode}return null}querySelectorAll(t){let r=t.split(/\s*,\s*/),n=[],i=s=>{for(let o of r)if(pe(o,s)){n.push(s);break}for(let o of s.childNodes)i(o)};for(let s of this.childNodes)i(s);return n}querySelector(t){return this.querySelectorAll(t)[0]}findSibling(t,r){if(!this.parentNode)return null;let n=this.parentNode.childNodes,i=n.indexOf(this);if(i===-1)return null;for(let s=i+t;s>=0&&s<n.length;s+=t){let o=n[s];if(!r||o.nodeType===1)return o}return null}removeChild(t){let r=this.childNodes.indexOf(t);if(r!==-1)return this.childNodes.splice(r,1),t.parentNode=void 0,t}get previousSibling(){return this.findSibling(-1)}get nextSibling(){return this.findSibling(1)}get previousElementSibling(){return this.findSibling(-1,!0)}get nextElementSibling(){return this.findSibling(1,!0)}cloneNode(t=!1){let r=new C(this.nodeName,this.nodeType);if(r.attributes=JSON.parse(JSON.stringify(this.attributes)),this.textContent&&(r.textContent=this.textContent),t)for(let n of this.childNodes){let i=n.cloneNode(!0);r.appendChild(i)}return r}get parentElement(){var t;return((t=this.parentNode)===null||t===void 0?void 0:t.nodeType)==1?this.parentNode:null}};function pe(e,t){let r=e.match(/([.#]?[\w-]+|\[([\w-]+)(="([^"]*)")?\])/g);if(!r)return!1;for(let n of r)if(n.startsWith("#")){if(t.getAttribute("id")!==n.slice(1))return!1}else if(n.startsWith(".")){if(!(t.getAttribute("class")||"").split(" ").includes(n.slice(1)))return!1}else if(n.startsWith("[")){let i=n.match(/^\[([\w-]+)(="([^"]*)")?\]$/);if(i){let s=i[1],o=i[3],a=t.getAttribute(s);if(typeof o=="undefined"){if(a===void 0)return!1}else if(a!==o)return!1}else return!1}else if(t.nodeName!==n)return!1;return!0}function ee(e){var t;let r=[],n=[];for(;e;){let i=e.match(/^<([\w-]+)(\s[^>]*)?>/),s=e.match(/^<\/([\w-]+)>/);if(i){let o=i[1].toLowerCase(),l=((t=(i[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||t===void 0?void 0:t.map(d=>{let[p,f,,u]=d.match(/([\w-]+)(="([^"]*)")?/);return{name:f,value:Le(u||"")}}))||[],c=new C(o,1);if(c.attributes=l,n.length>0){let d=n[n.length-1];d.childNodes.push(c),c.parentNode=d}else r.push(c);["img","input","br"].includes(o)||n.push(c),e=e.slice(i[0].length)}else if(s)n.pop(),e=e.slice(s[0].length);else{let o=e.indexOf("<"),a=e.slice(0,o!==-1?o:void 0),l=new C("#text",3);if(l.textContent=a,n.length>0){let c=n[n.length-1];c.childNodes.push(l),l.parentNode=c}else r.push(l);e=e.slice(a.length)}}return r}function Me(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Le(e){return e.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'")}function Z(e){return e.map(t=>{if(t.nodeType===3)return t.textContent||"";let{nodeName:r,attributes:n}=t,i=n.map(({name:o,value:a})=>` ${o}="${Me(String(a))}"`).join(""),s=Z(t.childNodes);return["img","input","br"].includes(r)?`<${r}${i} />`:`<${r}${i}>${s}</${r}>`}).join("")}function ke(e){let t=new e.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(n=>{let i=n.target,s=i.getAttribute("data-embed-src");s&&F(i,s),n.addedNodes&&n.addedNodes.forEach(o=>{o.nodeType==1&&je(o,!1)})})});return t.observe(e,{attributes:!0,subtree:!0,childList:!0}),t}function je(e,t=!0){let r=e.querySelectorAll("[data-embed-src]");for(var n=0;n<r.length;n++){let i=r[n];F(i,i.getAttribute("data-embed-src"))}if(t)return ke(e)}function F(e,t){for(var r=e;r;r=r.parentElement)if(!r.parentElement){let i=r.querySelectorAll("script");for(var n=0;n<i.length;n++)if(i[n].getAttribute("src")==t)return!0;r.tagName=="HTML"&&(r=r.querySelector("head")||r);let s=r.ownerDocument.createElement("script");s.setAttribute("type","module"),s.setAttribute("src",t),r.appendChild(s);break}}var re={};j(re,{adjustNumbers:()=>We,cleanCollectionBit:()=>I,getHumanizedLabel:()=>He,getLastPathBit:()=>Be,getQualifier:()=>Ie,normalizeCollectionScope:()=>te,parseLimit:()=>Ue,parseRange:()=>Fe});var Ue=e=>{var t;let r=parseInt((t=e==null?void 0:e.match(/\[0:(\d+)\]/))===null||t===void 0?void 0:t[1],10);return!isNaN(r)&&r>0?String(r):null},Fe=e=>{var t;let r=(t=e==null?void 0:e.match(/\[([^\]]+)\]/))===null||t===void 0?void 0:t[1].split(/\s*,\s*/g).filter(Boolean).map(n=>{if(n.match(/^-?\d+$/))return n;let i=n.match(/^(\d+):(\d+)$/);return i&&parseInt(i[1],10)<parseInt(i[2],10)?i[1]+"-"+i[2]:null});return r!=null&&r.every(Boolean)?r.join(","):null},Ie=e=>{var t;return(t=e==null?void 0:e.match(/(\.\*|\[[^\]]*\])$/))===null||t===void 0?void 0:t[0]};function I(e){return e.replace(/(\.?\[[^\]\[]*\]|\.\*)$/g,"")}function te(e){return I(e)+".*"}function We(e,t){return e==null?void 0:e.replace(/(.|^)(\d+)/g,(r,n,i)=>n+(n==":"?i:String(parseInt(i)+t)))}function He(e,t=2){var r=I(e).split(/]\.|\.\*\./g).pop().split(/\./g).slice(-3);return r=r.filter(n=>isNaN(parseInt(n))),r.map(n=>n.charAt(0).toUpperCase()+n.slice(1)).slice(-t).join(" ")}function Be(e){return I(e).split(".").pop()}var Je=["January","February","March","April","May","June","July","August","September","October","November","December"],me=e=>{if(!e||typeof e.getDay!="function")return;let t=e.getFullYear(),r=Je[e.getMonth()],n=e.getDate();return`${r} ${n}, ${t}`},ye=function(e){return String(new Date(e))!=="Invalid Date"&&!isNaN(Number(new Date(e)))};function ve(e){let t=e.getAttribute("data-path-scope");for(var r=0,n=e;n=n.previousElementSibling;)n.getAttribute("data-path-scope")==t&&r++;return r}function ze(e,t,r){let n=e.getAttribute("data-path-scope");if(n==null)return;var i=ve(e);if(i!=0)return;let s=e.parentNode;if(s!=null){t==0?e.setAttribute("hidden","hidden"):e.getAttribute("hidden")!=null&&e.removeAttribute("hidden");for(var o=i+1,a=e,l=e;l=l.nextElementSibling;)l.getAttribute("data-path-scope")==n&&(o++,a=l);for(var c=o;c<t;c++)s.insertBefore(a.cloneNode(!0),a.nextElementSibling);for(var c=Math.max(1,t);c<o;c++)a=a.previousElementSibling,s.removeChild(a.nextElementSibling)}}function N(e,t,r,n,i=!0){var s,o,a;if(!e)return;var l=e;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=$(r)),n!=null&&n.processValue&&(r=n==null?void 0:n.processValue(e,t,r));var c=t.replace("data-path-","");if(t=="data-path-src"||t=="data-path-alt"){let v=Array.from(e.children).find(_=>_.localName=="picture")||e;l=e.localName=="img"?e:v.querySelector("img, video")}else if(t=="data-path-href")l=e.querySelector("a")||e.closest("a");else if(t=="data-path-hidden")r=r?null:!0;else if(t=="data-path"||t=="data-embed-html"||t=="html")c="innerHTML";else if(t=="data-embed-src"&&i)F(e,r);else if(t=="data-path-attributes"){if(!Array.isArray(r)){let v=((s=e.getAttribute("data-attributes-keys"))===null||s===void 0?void 0:s.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var d in r){var p=r[d];N(e,d,typeof p=="object"&&p?JSON.stringify(p):p,n,i)}for(var f=0;f<v.length;f++)(r==null||!(v[f]in r))&&N(e,v[f],null,n,i);N(e,"data-attributes-keys",Object.keys(r||{}).join(","),{},i)}if(e.tagName=="FEAAS-EXTERNAL"){let v=String(e.getAttribute("data-path-attributes")||"").slice(0,-1).split(".")[0]||"_";N(e,"datasources",JSON.stringify({[v]:r}),{},i)}return}if(typeof r=="boolean"&&c!=="hidden"&&(r=r?"":null),!l)return;if((c=="innerHTML"||c=="src")&&(r==null||r==="")){var h=String((a=(o=e.getAttribute("data-path-placeholder")||l[c])!==null&&o!==void 0?o:l.getAttribute(c))!==null&&a!==void 0?a:"");c=="innerHTML"?l.innerHTML=h:h?l.setAttribute(c,h):l.removeAttribute(c)}else if(r!=null)if(c=="innerHTML"){for(var y=String(r),g=l;g.parentElement&&g.localName.match(/^(a|var|strong|em|i|b)$/);)g=g.parentElement;g.localName.match(/p|h\d|button|time|li/)&&(y=y.replace(/<(p|h\d|li|ul)[^>]*?>|<\/(p|h\d|li|ul)[^>]*?>/g," ").trim().replace(/\s+/g," ")),String(g.getAttribute("class")).includes("-inline--time")&&ye(y)&&(y=me(new Date(y))),l.innerHTML!=y&&(l.innerHTML=y)}else l.getAttribute(c)!=r&&l.setAttribute(c,r);else l.removeAttribute(c)}var ge=["data-attributes-keys","data-path-attributes","data-path-scope"];function w(e,t,r,n,i=!0){var s,o,a;let l=e;if(n||(t=((s=r==null?void 0:r.processData)===null||s===void 0?void 0:s.call(r,l,t))||t),l.nodeType==1){let p=l.getAttribute("data-path-scope");if(p){let u=ve(l),h=U(t,p,!1);u==0&&ze(l,((o=r==null?void 0:r.shouldRepeat)===null||o===void 0?void 0:o.call(r,l,h))===!1?1:h.length,r),t={...t,[te(p)]:h[u]}}let f=Array.prototype.slice.call(l.attributes).sort((u,h)=>ge.indexOf(u.name)-ge.indexOf(h.name));for(var c=0;c<f.length;c++){let{name:u,value:h}=f[c];u.startsWith("data-path")&&u!="data-path-scope"&&N(l,u,U(t,h,!0,void 0,l.tagName!="FEAAS-EXTERNAL"),r,i),u=="data-embed-src"&&N(l,u,l.getAttribute(u),r,i)}}for(var c=0,d;d=l.childNodes[c++];)be(d)&&w(d,t,r,!0,i);return n||(a=r==null?void 0:r.onRender)===null||a===void 0||a.call(r,l,t),l}function be(e){return e.nodeType==1}function O(e,t,r,n,i=!0){var s;let o=((s=n==null?void 0:n.processTemplate)===null||s===void 0?void 0:s.call(n,e,t,r))||t;if(e.innerHTML=o,e.classList.add("-feaas"),(e.closest(".component.feaas")||e).className.includes("-theme--"))for(var l=0,c;c=e.childNodes[l++];)be(c)&&(c.className=c.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return w(e,r,n,null,i)}function Ve(e,t,r,n=!1,i=!0){var s;let o=((s=r==null?void 0:r.processTemplate)===null||s===void 0?void 0:s.call(r,null,e,t))||e;if(typeof document=="undefined"||n){let a=ee(o);return w(a[0],t,r,null,i).outerHTML}else{let a=document.createElement("div");return a.innerHTML=o,w(a,t,r,null,i),a.innerHTML}}var Ae=["initial","check","updated"],W={};function _t(){W={}}async function H(e,t,r,n,i=W){return D({url:e,options:t,validator:r,callback:n,cache:i}).then(B).then(s=>s.response)}async function D({url:e,options:t,validator:r,callback:n,cache:i},s="initial"){let o=new Date;if(i!=null){var a=qe(e);if(Ae.indexOf(a.phase)>=Ae.indexOf(s))var l=a[s];else a.phase=s}let c=await(l||fetch(e,t));if(!l&&a&&(c.ok?a[s].resolve(c):a[s].reject(new Error("Fetch failed"))),!c.ok)throw new Error("Fetch failed");let d=new Date(c.headers.get("date"))<o||l&&s=="initial"&&(a.phase=="updated"||a.phase=="check");if((r==null?void 0:r(c,d))===!1)throw new ie("Response is not valid");return await(n==null?void 0:n(c,s,d)),{url:e,options:t,isCached:d,response:c,validator:r,callback:n,cache:i}}function qe(e,t=!1){let r=String(e).replace("?head","");var n=W[r];return!n&&!t&&(n=W[r]={phase:null,initial:x(),check:x(),updated:x(),final:x()}),n}var ie=class extends Error{};async function B(e){let{url:t,isCached:r,options:n,validator:i,response:s,cache:o}=e;if(r){let{response:a}=await D({url:t+(t.toString().includes("?")?"&":"?")+"head",options:{...n,method:"HEAD",cache:"no-cache"},validator:i,cache:o},"check");if(a.headers.get("last-modified")!=s.headers.get("last-modified"))return se(e)}return e}async function se(e){return D({...e,options:{...e.options,cache:"reload"}},"updated")}var E="https://feaas.blob.core.windows.net";function J(e){let t=e==null?void 0:e.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(t){var[,r,n,i,s,o]=t;return{cdn:r,library:n,component:i,version:s,revision:o}}}function Ot(e){if(!e||!e.library||!e.component)throw new Error("Component requires `library` and `component` properties");return`${e.cdn&&e.cdn!=E?`${e.cdn}/components`:""}/${e.library}/${e.component}/${!e.version||e.version=="responsive"&&(!e.revision||e.revision=="published")?"":e.version}/${!e.revision||e.revision=="published"?"":e.revision}`.replace(/(^\/|\/$|\/\/)(?!.+\/components\/)/g,"")}function Dt(e){return`${e.cdn&&e.cdn!=E?`${e.cdn}/styles/`:""}${e.library}/${!e.revision||e.revision=="published"?"":e.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function L(e){let t=e==null?void 0:e.match(/^(?:(.*?)\/styles\/)?([^\/]+)(?:\/(published|staged|saved|\d+)(?:.css)?)?$/);if(t){var[,r,n,i]=t;return{cdn:r,library:n,revision:i}}else{let s=J(e);if(s){var{cdn:r,library:n,revision:i}=s;return i!=null&&i.match(/\d/)&&(i=void 0),{cdn:r,library:n,revision:i}}}}function we(e){return typeof e=="string"&&(e={src:e}),"src"in e&&e.src?e={...J(e.src)}:e={...e},`${e.cdn||e.hostname||E}/components/${e.library}/${e.component}/${e.version||"responsive"}/${e.revision||"published"}.html`}function z(e){if(typeof e=="string"&&(e={src:e}),"src"in e){if(String(e.src).includes("v1/files/components/styles"))return e.src;e={...L(e.src)}}else e={...e};return`${e.cdn||e.hostname||E}/styles/${e.library}/${e.revision=="staged"?"staged":e.revision=="saved"?"saved":"published"}.css`}async function k(e,t,r=!1){let n=a=>a.headers.get("x-ms-meta-versionDeletedAt")==null,i=a=>a.clone().text().then(t),s=await Promise.all([e.instance&&D({options:{headers:{Accept:"text/html"},credentials:"omit"},url:we({...e,version:e.instance}),validator:n}).catch(a=>a),D({url:we(e),validator:n}).catch(a=>a)]),o=s.find(a=>a&&"isCached"in a&&a);if(!o||o instanceof Error)throw s.find(l=>l&&l instanceof Error)||new Error("Can not fetch component");return s[0]==o&&console.log("Using fork!",s),await i(o.response),r?o:B({...o,callback:i}).catch(a=>{if(s[0]==o&&(se({...o,callback:null,validator:null}),console.log("Fork was deleted"),!(s[1]instanceof Error)))return i(s[1].response),B({...s[1],callback:i});throw a})}async function Pt(e){typeof e=="string"&&(e={src:e});var t;let{response:r}=await k(e,n=>{t=n},!0);return{...e,template:t,lastModified:r.headers.get("last-modified")}}async function oe(e,t){return H(z(e),{headers:{Accept:"text/css"},credentials:"omit"},r=>r.headers.get("x-ms-meta-deletedAt")==null,(r,n)=>r.clone().text().then(i=>t(i,n)))}function kt(e,t){return Ge(e,t||(t=document.createElement("style"))),t}function Ge(e,t){return t||(t=document.createElement("style")),oe(e,(r,n)=>{t.textContent=r}).then(()=>t)}var Ke=new WeakSet;function ae(e,t){var r,n=Ye(e);if(n){if(Ke.has(n))return Promise.resolve(n);e=n.getAttribute("data-href")||n.getAttribute("href")}return oe(e,(i,s)=>{s=="initial"&&n||(r||(r=!n||n.tagName=="LINK"?Xe(e):n),r.textContent=i),t==null||t(i,s)}).then(()=>r||n)}function xe(e){return new Promise((t,r)=>{ae(e,t).catch(r)})}function Ye(e){let t=z(e),{library:r}=L(t),n=`/files/components/styles/${r}.css`;return document.querySelector(`style[data-href="${t}"],
3
- link[rel="stylesheet"][href="${t}"],
1
+ var Be=Object.defineProperty;var B=(t,e)=>{for(var r in e)Be(t,r,{get:e[r],enumerable:!0})};function w(t,e=r=>{}){var r;let n=()=>{var i,s;let o=new Promise((l,h)=>{i=d=>{t==null||t(d),l(d)},s=h});var c=Object.assign(o,{resolve:i,reject:s,restart:n,first:r});return r=c,c.catch(e),c};return n()}var Fe=typeof HTMLElement=="undefined"?typeof windowJSDOM!="undefined"?windowJSDOM.HTMLElement:class{}:HTMLElement,C=class extends Fe{getProps(e){return{}}constructor(){super(),this.defaultProps={},this.connected=!1,this.refs={},this.descendants=[],this.whenLoaded=w(e=>{this.payload=e}),this.whenRendered=w(()=>this.initialized=!0,()=>this.cancelRender()),this.addEventListener("feaasMount",this),this.addEventListener("feaasUnmount",this)}getRoot(){return this}attributeChangedCallback(e,r,n){this.set()}connectedCallback(){this.mount()}disconnectedCallback(){this.unmount()}mount(){try{let e=this.getParent();if(e&&!e.connected||this.connected)return;this.connected=!0,this.log("FEAAS: Mount",this.tagName,this),this.dispatchEventIndirectly(new Event("feaasMount",{bubbles:!0,composed:!0})),this.getElements().map(r=>{var n;return(n=r.mount)===null||n===void 0?void 0:n.call(r)}),this.set()}catch(e){this.onError(e)}}dispatchEventIndirectly(e){this.dispatchEvent(e);let r=this.getParent();r&&!r.contains(this)&&(Object.defineProperty(e,"target",{value:this,writable:!1}),Object.defineProperty(e,"composedPath",{value:()=>[this],writable:!1}),r.handleEvent(e))}isJSONAttribute(e){return!1}log(...e){let r=e[0];(typeof location!="undefined"&&(location!=null&&location.hostname.startsWith("components-"))||localStorage["Sitecore.Components.Debug"])&&console.log(r+" "+e.slice(1).map(n=>n&&typeof n=="object"?"%O":"%s").join(" "),...e.slice(1))}unmount(){this.connected&&(this.log("FEAAS: Unmount",this),this.dispatchEventIndirectly(new Event("feaasUnmount",{bubbles:!0,composed:!0})),this.connected&&this.initialized&&this.render&&this.update(),this.cancelRender(),this.connected=!1,this.initialized&&this.render&&this.update())}getParent(e=!0){for(var r=this;r=r.parentElement||(r.parentNode instanceof ShadowRoot?r.parentNode.host:null);)if(!e||r.tagName.startsWith("FEAAS-"))return r;if(this.tagName!="FEAAS-CONTEXT")return document.querySelector("feaas-context")}getElements(e=this.getRoot(),r=!0){return Array.from(e.querySelectorAll("*")).map(n=>[!r||n.tagName.startsWith("FEAAS-")?n:null,n.shadowRoot?this.getElements(n.shadowRoot,r):null]).flat().filter(Boolean)}handleEvent(e){let r=e.composedPath()[0];switch(e.type){case"feaasMount":r!=this&&this.nestedCallback(r);break;case"feaasUnmount":r!=this&&this.unnestedCallback(r);break}}unnestedCallback(e){let r=this.descendants.indexOf(e);r!=-1&&(this.log("FEAAS: Unnest",this,e),this.descendants.splice(r,1),this.refs[e.getComponentName()]=null,e.refs.parent==this&&(e.refs.parent=null),e.refs.top==this&&(e.refs.top=e.refs.parent))}nestedCallback(e){var r,n;if(this.descendants.indexOf(e)==-1&&(this.descendants.push(e),this.log("FEAAS: Nest",this,e),this.refs[e.getComponentName()]=e,e.refs.top=this,(r=e.refs).parent||(r.parent=this),e.render))for(var s=e.refs.parent;s;s=s.refs.parent)s.render&&((n=e.refs).parentReact||(n.parentReact=s),e.refs.topReact=s)}getComponentName(){return this.tagName.replace("FEAAS-","").toLowerCase()}isReadyToLoad(){return this.payload===void 0&&this.getAttribute("hidden")==null}onError(e,r="uncaught",n=!1){let i=new CustomEvent("feaasError",{bubbles:!0,composed:!0,detail:e});if(this.dispatchEventIndirectly(i),this.whenLoaded.reject(e),!i.defaultPrevented&&!n){this.whenRendered.reject(e);try{this.unmount()}catch(s){}return!0}return!1}shouldUpdateOnLoad(){return!0}async advance(){try{if(this.payload===void 0){if(!this.isReadyToLoad())return;this.payload=null,this.dispatchEventIndirectly(new Event("feaasLoad",{bubbles:!0,composed:!0}));let e=await this.load().catch(r=>{throw this.payload=void 0,r});if(this.whenLoaded.resolve(e),this.onLoad)return}else if(this.payload==null)return;this.flush(),this.whenRendered.resolve(this)}catch(e){this.onError(e)}}flush(){var e,r;if(!this.connected)return;let n=(r=(e=this.payload)===null||e===void 0?void 0:e.ReactDOM)===null||r===void 0?void 0:r.flushSync;n?n(()=>this.update()):this.update()}load(){return Promise.resolve(null)}update(){var e,r,n;if(this.payload==null||!this.render)return;let{React:i,ReactDOM:s,ReactDOMClient:o}=this.payload||{};if(!i)throw new Error(`${this.tagName}: React is not present in payload`);if(!s)throw new Error(`${this.tagName}: ReactDOM is not present in payload`);this.getAttribute("hydrate")=="false"&&this.firstElementChild||(!this.refs.topReact&&!this.forceUpdateReact?(this.reactRoot||(this.reactRoot=o.createRoot(this.getReactRootElement())),this.reactRoot.render(this.getReactElement())):this.forceUpdateReact&&this.connected?(e=this.forceUpdateReact)===null||e===void 0||e.call(this):(n=(r=this.refs.topReact)===null||r===void 0?void 0:r.forceUpdateReact)===null||n===void 0||n.call(r))}invokeReactRendering(){let{React:e,ReactDOM:r}=this.payload||{};if(!this.connected)return null;let n=this.descendants.filter(i=>i.refs.parentReact==this&&i.payload&&i.connected).map((i,s)=>this.getReactElement(i));return this.render({...this.props,children:n},this.payload)}getReactErrorBoundary(e=this,r=e.tagName){if(this.reactErrorBoundary)return this.reactErrorBoundary;let{React:n,ReactDOM:i}=e.payload||{};return this.reactErrorBoundary||(this.reactErrorBoundary=class extends n.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromError(o){return{error:o}}componentDidCatch(o,c){console.error(`FEAAS: ${e.tagName} Error:`,o,c),e.onError(o,"react")}render(){if(!this.state.error)return this.props.children}})}getReactElement(e=this,r){let{React:n,ReactDOM:i}=e.payload||{},s=this.getReactErrorBoundary(),o=this.getReactWrapper(e);return n.createElement(s,{key:e.tagName+"-"+e.getUID(),slot:e.getAttribute("slot")},n.createElement(o,null))}getReactWrapper(e=this,r=e.tagName){if(e.reactWrapper)return e.reactWrapper;let{React:n,ReactDOM:i}=e.payload||{};return e.reactWrapper=s=>{if(e.render){let[o,c]=n.useReducer(l=>l+1,0);return e.forceUpdateReact=c,i.createPortal(n.createElement(n.Fragment,null,e.invokeReactRendering()),e.getReactRootElement())}else return e.update()},Object.assign(e.reactWrapper,{key:e.tagName+"-"+e.getUID(),displayName:r}),e.reactWrapper}getUID(){return this.uid||(this.uid=String(Math.random()))}getShadowRoot(){return this.shadowRoot||this.attachShadow({mode:"open"}),this.shadowRoot}getReactRootElement(){return this.useShadowRoot?this.getShadowRoot():this.getRoot()}set(e){try{this.scheduleRender(),this.overrides={...this.overrides,...e},this.props={...this.getProps(),...this.overrides};for(var r in this.props){let i=this.isJSONAttribute(r),s=this.props[r],o=i?JSON.stringify(s):String(s),c=this.defaultProps[r],l=i?JSON.stringify(c):String(c),h=r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),d=this.getAttribute(h);try{var n=i?JSON.stringify(JSON.parse(d)):d}catch(f){var n=null}s==null||o===l?this.removeAttribute(h):(typeof s=="string"||typeof s=="number"||typeof s=="boolean"||i)&&n!=o&&this.setAttribute(h,o)}}catch(i){this.whenRendered.reject(i),this.onError(i,"set")}return this}import(e){return import( /*@vite-ignore*/ /* webpackIgnore: true */ e)}scheduleRender(){this.nextRender==null&&(this.whenRendered=this.whenRendered.restart()),this.cancelRender(),this.nextRender=requestAnimationFrame(()=>{this.nextRender=null,this.advance().catch(e=>{})})}cancelRender(){cancelAnimationFrame(this.nextRender)}formatURL(e,r){return typeof e=="string"&&e.match(/^\/[^\/]/)?r+e:e}getContextAttribute(e,r=this){for(var n=this;n=n.parentElement||(n.parentNode instanceof ShadowRoot?n.parentNode.host:null);)if(n.getAttribute(e)!=null)return n.getAttribute(e);return this.getAttribute(e)}static register(e,r){r==null&&(r=typeof window!="undefined"?window:null),r&&!r.customElements.get(e)&&r.customElements.define(e,this)}};var T=class extends C{load(){return Promise.all([import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom"),import( /*@vite-ignore*/ /* webpackIgnore: true */ "https://cdn.skypack.dev/react-dom/client")]).then(([e,r,n])=>({React:e,ReactDOM:r,ReactDOMClient:n}))}render({},{React:e}){return e.createElement(e.Fragment,null)}},Y=class extends T{constructor(){super(...arguments),this.useShadowRoot=!0}getProps(){return{counter:parseFloat(this.getAttribute("counter"))}}render({counter:e},{React:r}){let[n,i]=r.useState(0);return r.useEffect(()=>{i(s=>s+1)},[e]),r.createElement(r.Fragment,null,r.createElement("p",null,"Rendering attribute: ",e),r.createElement("p",null,"Triggered updates: ",n))}};Y.observedAttributes=["counter"];var he={};B(he,{renderDOMContent:()=>L,renderDOMElement:()=>A,renderHTMLContent:()=>ct,setDOMAttribute:()=>_});var se={};B(se,{JSONPath:()=>y,queryObject:()=>I,queryObjectRaw:()=>ve,queryScopes:()=>F,serializeCH1RichText:()=>k});import He from"vm";var J=class{add(e,r,n){if(typeof arguments[0]!="string")for(let i in arguments[0])this.add(i,arguments[0][i],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(i){this[i]=this[i]||[],r&&this[i][n?"unshift":"push"](r)},this)}run(e,r){this[e]=this[e]||[],this[e].forEach(function(n){n.call(r&&r.context?r.context:r,r)})}},ee=class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(r=>{if(typeof r!="object"||!r.name||!r.init)throw new Error("Invalid JSEP plugin format");this.registered[r.name]||(r.init(this.jsep),this.registered[r.name]=r)})}},a=class{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+a.version}static addUnaryOp(e){return a.max_unop_len=Math.max(e.length,a.max_unop_len),a.unary_ops[e]=1,a}static addBinaryOp(e,r,n){return a.max_binop_len=Math.max(e.length,a.max_binop_len),a.binary_ops[e]=r,n?a.right_associative.add(e):a.right_associative.delete(e),a}static addIdentifierChar(e){return a.additional_identifier_chars.add(e),a}static addLiteral(e,r){return a.literals[e]=r,a}static removeUnaryOp(e){return delete a.unary_ops[e],e.length===a.max_unop_len&&(a.max_unop_len=a.getMaxKeyLen(a.unary_ops)),a}static removeAllUnaryOps(){return a.unary_ops={},a.max_unop_len=0,a}static removeIdentifierChar(e){return a.additional_identifier_chars.delete(e),a}static removeBinaryOp(e){return delete a.binary_ops[e],e.length===a.max_binop_len&&(a.max_binop_len=a.getMaxKeyLen(a.binary_ops)),a.right_associative.delete(e),a}static removeAllBinaryOps(){return a.binary_ops={},a.max_binop_len=0,a}static removeLiteral(e){return delete a.literals[e],a}static removeAllLiterals(){return a.literals={},a}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new a(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(r=>r.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return a.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!a.binary_ops[String.fromCharCode(e)]||a.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return a.isIdentifierStart(e)||a.isDecimalDigit(e)}throwError(e){let r=new Error(e+" at character "+this.index);throw r.index=this.index,r.description=e,r}runHook(e,r){if(a.hooks[e]){let n={context:this,node:r};return a.hooks.run(e,n),n.node}return r}searchHook(e){if(a.hooks[e]){let r={context:this};return a.hooks[e].find(function(n){return n.call(r.context,r),r.node}),r.node}}gobbleSpaces(){let e=this.code;for(;e===a.SPACE_CODE||e===a.TAB_CODE||e===a.LF_CODE||e===a.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),r=e.length===1?e[0]:{type:a.COMPOUND,body:e};return this.runHook("after-all",r)}gobbleExpressions(e){let r=[],n,i;for(;this.index<this.expr.length;)if(n=this.code,n===a.SEMCOL_CODE||n===a.COMMA_CODE)this.index++;else if(i=this.gobbleExpression())r.push(i);else if(this.index<this.expr.length){if(n===e)break;this.throwError('Unexpected "'+this.char+'"')}return r}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,a.max_binop_len),r=e.length;for(;r>0;){if(a.binary_ops.hasOwnProperty(e)&&(!a.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!a.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=r,e;e=e.substr(0,--r)}return!1}gobbleBinaryExpression(){let e,r,n,i,s,o,c,l,h;if(o=this.gobbleToken(),!o||(r=this.gobbleBinaryOp(),!r))return o;for(s={value:r,prec:a.binaryPrecedence(r),right_a:a.right_associative.has(r)},c=this.gobbleToken(),c||this.throwError("Expected expression after "+r),i=[o,s,c];r=this.gobbleBinaryOp();){if(n=a.binaryPrecedence(r),n===0){this.index-=r.length;break}s={value:r,prec:n,right_a:a.right_associative.has(r)},h=r;let d=f=>s.right_a&&f.right_a?n>f.prec:n<=f.prec;for(;i.length>2&&d(i[i.length-2]);)c=i.pop(),r=i.pop().value,o=i.pop(),e={type:a.BINARY_EXP,operator:r,left:o,right:c},i.push(e);e=this.gobbleToken(),e||this.throwError("Expected expression after "+h),i.push(s,e)}for(l=i.length-1,e=i[l];l>1;)e={type:a.BINARY_EXP,operator:i[l-1].value,left:i[l-2],right:e},l-=2;return e}gobbleToken(){let e,r,n,i;if(this.gobbleSpaces(),i=this.searchHook("gobble-token"),i)return this.runHook("after-token",i);if(e=this.code,a.isDecimalDigit(e)||e===a.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===a.SQUOTE_CODE||e===a.DQUOTE_CODE)i=this.gobbleStringLiteral();else if(e===a.OBRACK_CODE)i=this.gobbleArray();else{for(r=this.expr.substr(this.index,a.max_unop_len),n=r.length;n>0;){if(a.unary_ops.hasOwnProperty(r)&&(!a.isIdentifierStart(this.code)||this.index+r.length<this.expr.length&&!a.isIdentifierPart(this.expr.charCodeAt(this.index+r.length)))){this.index+=n;let s=this.gobbleToken();return s||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:a.UNARY_EXP,operator:r,argument:s,prefix:!0})}r=r.substr(0,--n)}a.isIdentifierStart(e)?(i=this.gobbleIdentifier(),a.literals.hasOwnProperty(i.name)?i={type:a.LITERAL,value:a.literals[i.name],raw:i.name}:i.name===a.this_str&&(i={type:a.THIS_EXP})):e===a.OPAREN_CODE&&(i=this.gobbleGroup())}return i?(i=this.gobbleTokenProperty(i),this.runHook("after-token",i)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let r=this.code;for(;r===a.PERIOD_CODE||r===a.OBRACK_CODE||r===a.OPAREN_CODE||r===a.QUMARK_CODE;){let n;if(r===a.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==a.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),r=this.code}this.index++,r===a.OBRACK_CODE?(e={type:a.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()},e.property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),r=this.code,r!==a.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):r===a.OPAREN_CODE?e={type:a.CALL_EXP,arguments:this.gobbleArguments(a.CPAREN_CODE),callee:e}:(r===a.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:a.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),r=this.code}return e}gobbleNumericLiteral(){let e="",r,n;for(;a.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===a.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);a.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(r=this.char,r==="e"||r==="E"){for(e+=this.expr.charAt(this.index++),r=this.char,(r==="+"||r==="-")&&(e+=this.expr.charAt(this.index++));a.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);a.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,a.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===a.PERIOD_CODE||e.length===1&&e.charCodeAt(0)===a.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:a.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",r=this.index,n=this.expr.charAt(this.index++),i=!1;for(;this.index<this.expr.length;){let s=this.expr.charAt(this.index++);if(s===n){i=!0;break}else if(s==="\\")switch(s=this.expr.charAt(this.index++),s){case"n":e+=`
2
+ `;break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=s}else e+=s}return i||this.throwError('Unclosed quote after "'+e+'"'),{type:a.LITERAL,value:e,raw:this.expr.substring(r,this.index)}}gobbleIdentifier(){let e=this.code,r=this.index;for(a.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length&&(e=this.code,a.isIdentifierPart(e));)this.index++;return{type:a.IDENTIFIER,name:this.expr.slice(r,this.index)}}gobbleArguments(e){let r=[],n=!1,i=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let s=this.code;if(s===e){n=!0,this.index++,e===a.CPAREN_CODE&&i&&i>=r.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}else if(s===a.COMMA_CODE){if(this.index++,i++,i!==r.length){if(e===a.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===a.CBRACK_CODE)for(let o=r.length;o<i;o++)r.push(null)}}else if(r.length!==i&&i!==0)this.throwError("Expected comma");else{let o=this.gobbleExpression();(!o||o.type===a.COMPOUND)&&this.throwError("Expected comma"),r.push(o)}}return n||this.throwError("Expected "+String.fromCharCode(e)),r}gobbleGroup(){this.index++;let e=this.gobbleExpressions(a.CPAREN_CODE);if(this.code===a.CPAREN_CODE)return this.index++,e.length===1?e[0]:e.length?{type:a.SEQUENCE_EXP,expressions:e}:!1;this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:a.ARRAY_EXP,elements:this.gobbleArguments(a.CBRACK_CODE)}}},We=new J;Object.assign(a,{hooks:We,plugins:new ee(a),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"});a.max_unop_len=a.getMaxKeyLen(a.unary_ops);a.max_binop_len=a.getMaxKeyLen(a.binary_ops);var O=t=>new a(t).parse(),Ke=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(a).filter(t=>!Ke.includes(t)&&O[t]===void 0).forEach(t=>{O[t]=a[t]});O.Jsep=a;var ze="ConditionalExpression",Xe={name:"ternary",init(t){t.hooks.add("after-expression",function(r){if(r.node&&this.code===t.QUMARK_CODE){this.index++;let n=r.node,i=this.gobbleExpression();if(i||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===t.COLON_CODE){this.index++;let s=this.gobbleExpression();if(s||this.throwError("Expected expression"),r.node={type:ze,test:n,consequent:i,alternate:s},n.operator&&t.binary_ops[n.operator]<=.9){let o=n;for(;o.right.operator&&t.binary_ops[o.right.operator]<=.9;)o=o.right;r.node.test=o.right,o.right=r.node,r.node=n}}else this.throwError("Expected :")}})}};O.plugins.register(Xe);var xe=47,qe=92,Ve={name:"regex",init(t){t.hooks.add("gobble-token",function(r){if(this.code===xe){let n=++this.index,i=!1;for(;this.index<this.expr.length;){if(this.code===xe&&!i){let s=this.expr.slice(n,this.index),o="";for(;++this.index<this.expr.length;){let l=this.code;if(l>=97&&l<=122||l>=65&&l<=90||l>=48&&l<=57)o+=this.char;else break}let c;try{c=new RegExp(s,o)}catch(l){this.throwError(l.message)}return r.node={type:t.LITERAL,value:c,raw:this.expr.slice(n-1,this.index)},r.node=this.gobbleTokenProperty(r.node),r.node}this.code===t.OBRACK_CODE?i=!0:i&&this.code===t.CBRACK_CODE&&(i=!1),this.index+=this.code===qe?2:1}this.throwError("Unclosed Regex")}})}},Z=43,Ge=45,P={name:"assignment",assignmentOperators:new Set(["=","*=","**=","/=","%=","+=","-=","<<=",">>=",">>>=","&=","^=","|=","||=","&&=","??="]),updateOperators:[Z,Ge],assignmentPrecedence:.9,init(t){let e=[t.IDENTIFIER,t.MEMBER_EXP];P.assignmentOperators.forEach(n=>t.addBinaryOp(n,P.assignmentPrecedence,!0)),t.hooks.add("gobble-token",function(i){let s=this.code;P.updateOperators.some(o=>o===s&&o===this.expr.charCodeAt(this.index+1))&&(this.index+=2,i.node={type:"UpdateExpression",operator:s===Z?"++":"--",argument:this.gobbleTokenProperty(this.gobbleIdentifier()),prefix:!0},(!i.node.argument||!e.includes(i.node.argument.type))&&this.throwError(`Unexpected ${i.node.operator}`))}),t.hooks.add("after-token",function(i){if(i.node){let s=this.code;P.updateOperators.some(o=>o===s&&o===this.expr.charCodeAt(this.index+1))&&(e.includes(i.node.type)||this.throwError(`Unexpected ${i.node.operator}`),this.index+=2,i.node={type:"UpdateExpression",operator:s===Z?"++":"--",argument:i.node,prefix:!1})}}),t.hooks.add("after-expression",function(i){i.node&&r(i.node)});function r(n){P.assignmentOperators.has(n.operator)?(n.type="AssignmentExpression",r(n.left),r(n.right)):n.operator||Object.values(n).forEach(i=>{i&&typeof i=="object"&&r(i)})}}};O.plugins.register(Ve,P);O.addUnaryOp("typeof");O.addLiteral("null",null);O.addLiteral("undefined",void 0);var Qe=new Set(["constructor","__proto__","__defineGetter__","__defineSetter__"]),b={evalAst(t,e){switch(t.type){case"BinaryExpression":case"LogicalExpression":return b.evalBinaryExpression(t,e);case"Compound":return b.evalCompound(t,e);case"ConditionalExpression":return b.evalConditionalExpression(t,e);case"Identifier":return b.evalIdentifier(t,e);case"Literal":return b.evalLiteral(t,e);case"MemberExpression":return b.evalMemberExpression(t,e);case"UnaryExpression":return b.evalUnaryExpression(t,e);case"ArrayExpression":return b.evalArrayExpression(t,e);case"CallExpression":return b.evalCallExpression(t,e);case"AssignmentExpression":return b.evalAssignmentExpression(t,e);default:throw SyntaxError("Unexpected expression",t)}},evalBinaryExpression(t,e){return{"||":(n,i)=>n||i(),"&&":(n,i)=>n&&i(),"|":(n,i)=>n|i(),"^":(n,i)=>n^i(),"&":(n,i)=>n&i(),"==":(n,i)=>n==i(),"!=":(n,i)=>n!=i(),"===":(n,i)=>n===i(),"!==":(n,i)=>n!==i(),"<":(n,i)=>n<i(),">":(n,i)=>n>i(),"<=":(n,i)=>n<=i(),">=":(n,i)=>n>=i(),"<<":(n,i)=>n<<i(),">>":(n,i)=>n>>i(),">>>":(n,i)=>n>>>i(),"+":(n,i)=>n+i(),"-":(n,i)=>n-i(),"*":(n,i)=>n*i(),"/":(n,i)=>n/i(),"%":(n,i)=>n%i()}[t.operator](b.evalAst(t.left,e),()=>b.evalAst(t.right,e))},evalCompound(t,e){let r;for(let n=0;n<t.body.length;n++){t.body[n].type==="Identifier"&&["var","let","const"].includes(t.body[n].name)&&t.body[n+1]&&t.body[n+1].type==="AssignmentExpression"&&(n+=1);let i=t.body[n];r=b.evalAst(i,e)}return r},evalConditionalExpression(t,e){return b.evalAst(t.test,e)?b.evalAst(t.consequent,e):b.evalAst(t.alternate,e)},evalIdentifier(t,e){if(Object.hasOwn(e,t.name))return e[t.name];throw ReferenceError(`${t.name} is not defined`)},evalLiteral(t){return t.value},evalMemberExpression(t,e){let r=t.computed?b.evalAst(t.property):t.property.name,n=b.evalAst(t.object,e);if(n==null)throw TypeError(`Cannot read properties of ${n} (reading '${r}')`);if(!Object.hasOwn(n,r)&&Qe.has(r))throw TypeError(`Cannot read properties of ${n} (reading '${r}')`);let i=n[r];return typeof i=="function"?i.bind(n):i},evalUnaryExpression(t,e){return{"-":n=>-b.evalAst(n,e),"!":n=>!b.evalAst(n,e),"~":n=>~b.evalAst(n,e),"+":n=>+b.evalAst(n,e),typeof:n=>typeof b.evalAst(n,e)}[t.operator](t.argument)},evalArrayExpression(t,e){return t.elements.map(r=>b.evalAst(r,e))},evalCallExpression(t,e){let r=t.arguments.map(i=>b.evalAst(i,e));return b.evalAst(t.callee,e)(...r)},evalAssignmentExpression(t,e){if(t.left.type!=="Identifier")throw SyntaxError("Invalid left-hand side in assignment");let r=t.left.name,n=b.evalAst(t.right,e);return e[r]=n,e[r]}},te=class{constructor(e){this.code=e,this.ast=O(this.code)}runInNewContext(e){let r=Object.assign(Object.create(null),e);return b.evalAst(this.ast,r)}};function R(t,e){return t=t.slice(),t.push(e),t}function re(t,e){return e=e.slice(),e.unshift(t),e}var ne=class extends Error{constructor(e){super('JSONPath should not be called with "new" (it prevents return of (unwrapped) scalar values)'),this.avoidNew=!0,this.value=e,this.name="NewError"}};function y(t,e,r,n,i){if(!(this instanceof y))try{return new y(t,e,r,n,i)}catch(o){if(!o.avoidNew)throw o;return o.value}typeof t=="string"&&(i=n,n=r,r=e,e=t,t=null);let s=t&&typeof t=="object";if(t=t||{},this.json=t.json||r,this.path=t.path||e,this.resultType=t.resultType||"value",this.flatten=t.flatten||!1,this.wrap=Object.hasOwn(t,"wrap")?t.wrap:!0,this.sandbox=t.sandbox||{},this.eval=t.eval===void 0?"safe":t.eval,this.ignoreEvalErrors=typeof t.ignoreEvalErrors>"u"?!1:t.ignoreEvalErrors,this.parent=t.parent||null,this.parentProperty=t.parentProperty||null,this.callback=t.callback||n||null,this.otherTypeCallback=t.otherTypeCallback||i||function(){throw new TypeError("You must supply an otherTypeCallback callback option with the @other() operator.")},t.autostart!==!1){let o={path:s?t.path:e};s?"json"in t&&(o.json=t.json):o.json=r;let c=this.evaluate(o);if(!c||typeof c!="object")throw new ne(c);return c}}y.prototype.evaluate=function(t,e,r,n){let i=this.parent,s=this.parentProperty,{flatten:o,wrap:c}=this;if(this.currResultType=this.resultType,this.currEval=this.eval,this.currSandbox=this.sandbox,r=r||this.callback,this.currOtherTypeCallback=n||this.otherTypeCallback,e=e||this.json,t=t||this.path,t&&typeof t=="object"&&!Array.isArray(t)){if(!t.path&&t.path!=="")throw new TypeError('You must supply a "path" property when providing an object argument to JSONPath.evaluate().');if(!Object.hasOwn(t,"json"))throw new TypeError('You must supply a "json" property when providing an object argument to JSONPath.evaluate().');({json:e}=t),o=Object.hasOwn(t,"flatten")?t.flatten:o,this.currResultType=Object.hasOwn(t,"resultType")?t.resultType:this.currResultType,this.currSandbox=Object.hasOwn(t,"sandbox")?t.sandbox:this.currSandbox,c=Object.hasOwn(t,"wrap")?t.wrap:c,this.currEval=Object.hasOwn(t,"eval")?t.eval:this.currEval,r=Object.hasOwn(t,"callback")?t.callback:r,this.currOtherTypeCallback=Object.hasOwn(t,"otherTypeCallback")?t.otherTypeCallback:this.currOtherTypeCallback,i=Object.hasOwn(t,"parent")?t.parent:i,s=Object.hasOwn(t,"parentProperty")?t.parentProperty:s,t=t.path}if(i=i||null,s=s||null,Array.isArray(t)&&(t=y.toPathString(t)),!t&&t!==""||!e)return;let l=y.toPathArray(t);l[0]==="$"&&l.length>1&&l.shift(),this._hasParentSelector=null;let h=this._trace(l,e,["$"],i,s,r).filter(function(d){return d&&!d.isParentSelector});return h.length?!c&&h.length===1&&!h[0].hasArrExpr?this._getPreferredOutput(h[0]):h.reduce((d,f)=>{let p=this._getPreferredOutput(f);return o&&Array.isArray(p)?d=d.concat(p):d.push(p),d},[]):c?[]:void 0};y.prototype._getPreferredOutput=function(t){let e=this.currResultType;switch(e){case"all":{let r=Array.isArray(t.path)?t.path:y.toPathArray(t.path);return t.pointer=y.toPointer(r),t.path=typeof t.path=="string"?t.path:y.toPathString(t.path),t}case"value":case"parent":case"parentProperty":return t[e];case"path":return y.toPathString(t[e]);case"pointer":return y.toPointer(t.path);default:throw new TypeError("Unknown result type")}};y.prototype._handleCallback=function(t,e,r){if(e){let n=this._getPreferredOutput(t);t.path=typeof t.path=="string"?t.path:y.toPathString(t.path),e(n,r,t)}};y.prototype._trace=function(t,e,r,n,i,s,o,c){let l;if(!t.length)return l={path:r,value:e,parent:n,parentProperty:i,hasArrExpr:o},this._handleCallback(l,s,"value"),l;let h=t[0],d=t.slice(1),f=[];function p(u){Array.isArray(u)?u.forEach(m=>{f.push(m)}):f.push(u)}if((typeof h!="string"||c)&&e&&Object.hasOwn(e,h))p(this._trace(d,e[h],R(r,h),e,h,s,o));else if(h==="*")this._walk(e,u=>{p(this._trace(d,e[u],R(r,u),e,u,s,!0,!0))});else if(h==="..")p(this._trace(d,e,r,n,i,s,o)),this._walk(e,u=>{typeof e[u]=="object"&&p(this._trace(t.slice(),e[u],R(r,u),e,u,s,!0))});else{if(h==="^")return this._hasParentSelector=!0,{path:r.slice(0,-1),expr:d,isParentSelector:!0};if(h==="~")return l={path:R(r,h),value:i,parent:n,parentProperty:null},this._handleCallback(l,s,"property"),l;if(h==="$")p(this._trace(d,e,r,null,null,s,o));else if(/^(-?\d*):(-?\d*):?(\d*)$/u.test(h))p(this._slice(h,d,e,r,n,i,s));else if(h.indexOf("?(")===0){if(this.currEval===!1)throw new Error("Eval [?(expr)] prevented in JSONPath expression.");let u=h.replace(/^\?\((.*?)\)$/u,"$1"),m=/@.?([^?]*)[['](\??\(.*?\))(?!.\)\])[\]']/gu.exec(u);m?this._walk(e,g=>{let E=[m[2]],x=m[1]?e[g][m[1]]:e[g];this._trace(E,x,r,n,i,s,!0).length>0&&p(this._trace(d,e[g],R(r,g),e,g,s,!0))}):this._walk(e,g=>{this._eval(u,e[g],g,r,n,i)&&p(this._trace(d,e[g],R(r,g),e,g,s,!0))})}else if(h[0]==="("){if(this.currEval===!1)throw new Error("Eval [(expr)] prevented in JSONPath expression.");p(this._trace(re(this._eval(h,e,r.at(-1),r.slice(0,-1),n,i),d),e,r,n,i,s,o))}else if(h[0]==="@"){let u=!1,m=h.slice(1,-2);switch(m){case"scalar":(!e||!["object","function"].includes(typeof e))&&(u=!0);break;case"boolean":case"string":case"undefined":case"function":typeof e===m&&(u=!0);break;case"integer":Number.isFinite(e)&&!(e%1)&&(u=!0);break;case"number":Number.isFinite(e)&&(u=!0);break;case"nonFinite":typeof e=="number"&&!Number.isFinite(e)&&(u=!0);break;case"object":e&&typeof e===m&&(u=!0);break;case"array":Array.isArray(e)&&(u=!0);break;case"other":u=this.currOtherTypeCallback(e,r,n,i);break;case"null":e===null&&(u=!0);break;default:throw new TypeError("Unknown value type "+m)}if(u)return l={path:r,value:e,parent:n,parentProperty:i},this._handleCallback(l,s,"value"),l}else if(h[0]==="`"&&e&&Object.hasOwn(e,h.slice(1))){let u=h.slice(1);p(this._trace(d,e[u],R(r,u),e,u,s,o,!0))}else if(h.includes(",")){let u=h.split(",");for(let m of u)p(this._trace(re(m,d),e,r,n,i,s,!0))}else!c&&e&&Object.hasOwn(e,h)&&p(this._trace(d,e[h],R(r,h),e,h,s,o,!0))}if(this._hasParentSelector)for(let u=0;u<f.length;u++){let m=f[u];if(m&&m.isParentSelector){let g=this._trace(m.expr,e,m.path,n,i,s,o);if(Array.isArray(g)){f[u]=g[0];let E=g.length;for(let x=1;x<E;x++)u++,f.splice(u,0,g[x])}else f[u]=g}}return f};y.prototype._walk=function(t,e){if(Array.isArray(t)){let r=t.length;for(let n=0;n<r;n++)e(n)}else t&&typeof t=="object"&&Object.keys(t).forEach(r=>{e(r)})};y.prototype._slice=function(t,e,r,n,i,s,o){if(!Array.isArray(r))return;let c=r.length,l=t.split(":"),h=l[2]&&Number.parseInt(l[2])||1,d=l[0]&&Number.parseInt(l[0])||0,f=l[1]&&Number.parseInt(l[1])||c;d=d<0?Math.max(0,d+c):Math.min(c,d),f=f<0?Math.max(0,f+c):Math.min(c,f);let p=[];for(let u=d;u<f;u+=h)this._trace(re(u,e),r,n,i,s,o,!0).forEach(g=>{p.push(g)});return p};y.prototype._eval=function(t,e,r,n,i,s){this.currSandbox._$_parentProperty=s,this.currSandbox._$_parent=i,this.currSandbox._$_property=r,this.currSandbox._$_root=this.json,this.currSandbox._$_v=e;let o=t.includes("@path");o&&(this.currSandbox._$_path=y.toPathString(n.concat([r])));let c=this.currEval+"Script:"+t;if(!y.cache[c]){let l=t.replaceAll("@parentProperty","_$_parentProperty").replaceAll("@parent","_$_parent").replaceAll("@property","_$_property").replaceAll("@root","_$_root").replaceAll(/@([.\s)[])/gu,"_$_v$1");if(o&&(l=l.replaceAll("@path","_$_path")),this.currEval==="safe"||this.currEval===!0||this.currEval===void 0)y.cache[c]=new this.safeVm.Script(l);else if(this.currEval==="native")y.cache[c]=new this.vm.Script(l);else if(typeof this.currEval=="function"&&this.currEval.prototype&&Object.hasOwn(this.currEval.prototype,"runInNewContext")){let h=this.currEval;y.cache[c]=new h(l)}else if(typeof this.currEval=="function")y.cache[c]={runInNewContext:h=>this.currEval(l,h)};else throw new TypeError(`Unknown "eval" property "${this.currEval}"`)}try{return y.cache[c].runInNewContext(this.currSandbox)}catch(l){if(this.ignoreEvalErrors)return!1;throw new Error("jsonPath: "+l.message+": "+t)}};y.cache={};y.toPathString=function(t){let e=t,r=e.length,n="$";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(e[i])||(n+=/^[0-9*]+$/u.test(e[i])?"["+e[i]+"]":"['"+e[i]+"']");return n};y.toPointer=function(t){let e=t,r=e.length,n="";for(let i=1;i<r;i++)/^(~|\^|@.*?\(\))$/u.test(e[i])||(n+="/"+e[i].toString().replaceAll("~","~0").replaceAll("/","~1"));return n};y.toPathArray=function(t){let{cache:e}=y;if(e[t])return e[t].concat();let r=[],i=t.replaceAll(/@(?:null|boolean|number|string|integer|undefined|nonFinite|scalar|array|object|function|other)\(\)/gu,";$&;").replaceAll(/[['](\??\(.*?\))[\]'](?!.\])/gu,function(s,o){return"[#"+(r.push(o)-1)+"]"}).replaceAll(/\[['"]([^'\]]*)['"]\]/gu,function(s,o){return"['"+o.replaceAll(".","%@%").replaceAll("~","%%@@%%")+"']"}).replaceAll("~",";~;").replaceAll(/['"]?\.['"]?(?![^[]*\])|\[['"]?/gu,";").replaceAll("%@%",".").replaceAll("%%@@%%","~").replaceAll(/(?:;)?(\^+)(?:;)?/gu,function(s,o){return";"+o.split("").join(";")+";"}).replaceAll(/;;;|;;/gu,";..;").replaceAll(/;$|'?\]|'$/gu,"").split(";").map(function(s){let o=s.match(/#(\d+)/u);return!o||!o[1]?s:r[o[1]]});return e[t]=i,e[t].concat()};y.prototype.safeVm={Script:te};y.prototype.vm=He;function ve(t,e){try{return y({path:e,json:t})}catch(r){return[]}}function I(t,e,r=!0){let n=ve(t,e)||[];return r?n.flat(1/0):n}function F(t,e,r=!1,n=t,i=!0){var s=e;let o=Object.keys(t).sort((l,h)=>h.length-l.length);for(let l of o)if(e.startsWith(l)){if(l==e){if(r)return t[l];continue}s=e.substring(l.length+1),n=t[l];break}var c=I(n,s,i);return c.length==0&&(c=[s.replace(/^.*?\./,"_."),s.replace(/^.*?\./,""),s.replace(/^([^.]+).*?\.\$([\.\[])/,"$1$2"),s.replace(/^.*?\.\$([\.\[])/,"_$1"),s.replace(/^.*?\.\$([\.\[])/,"$$$1"),s.replace(/^[^.]+$/,"_")].filter((l,h,d)=>d.indexOf(l)===h).reduce((l,h)=>l.length>0?l:I(n,h,i),[])),r?c[0]:c}function ie(t,e={},r){return r?`<${r}${Object.entries(e).map(([n,i])=>i!=null&&` ${n}="${i}"`).filter(Boolean).join("")}>${k(t)}</${r}>`.replace(/^<([a-z0-9][^>]*)><\/[^>]+>$/,"<$1 />"):k(t)}function k(t){var e;if(Array.isArray(t))return t.map(k).join(`
3
+ `).trim();if(typeof t=="string")return t;if(t==null)return"";switch(t.type){case"heading":let{level:r,...n}=t.attrs;return ie(t.content,n,"h"+r);case"text":return(t.marks||[]).reduce((i,s)=>ie(i,s.attrs,{link:"a",bold:"strong",italic:"em",strike:"s",underline:"u"}[s.type]),(e=t.text)===null||e===void 0?void 0:e.replace(/\s+/," "));default:return ie(t.content||t.text,t.attrs,{bulletList:"ul",orderedList:"ol",listItem:"li",horizontalRule:"hr",paragraph:"p",codeBlock:"code",blockquote:"blockquote"}[t.type])}}var D=class{constructor(e,r=1,n){this.ownerDocument={createElement(i){return new D(i)},createDocumentFragment(){return new D(null,11)}},this.nodeName=e,this.nodeType=r,this.textContent=n,this.attributes=[],this.childNodes=[]}setAttribute(e,r){let n=this.attributes.find(i=>i.name===e);n?n.value=r:this.attributes.push({name:e,value:r})}getAttribute(e){let r=this.attributes.find(n=>n.name===e);return r?r.value:void 0}insertBefore(e,r){if(e.parentNode=this,r===null)this.childNodes.push(e);else{let n=this.childNodes.indexOf(r);n!==-1&&this.childNodes.splice(n,0,e)}}removeAttribute(e){let r=this.attributes.findIndex(n=>n.name===e);r!==-1&&this.attributes.splice(r,1)}appendChild(e){e.parentNode=this,this.childNodes.push(e)}get tagName(){var e;return(e=this.nodeName)===null||e===void 0?void 0:e.toUpperCase()}get localName(){var e;return(e=this.nodeName)===null||e===void 0?void 0:e.toLowerCase()}get innerHTML(){return oe(this.childNodes)}set innerHTML(e){this.childNodes=ae(String(e!=null?e:""))}get outerHTML(){return oe([this])}get children(){return this.childNodes.filter(e=>e.nodeType==1)}closest(e){let r=this;for(;r;){if(Ae(e,r))return r;r=r.parentNode}return null}querySelectorAll(e){let r=e.split(/\s*,\s*/),n=[],i=s=>{for(let o of r)if(Ae(o,s)){n.push(s);break}for(let o of s.childNodes)i(o)};for(let s of this.childNodes)i(s);return n}querySelector(e){return this.querySelectorAll(e)[0]}findSibling(e,r){if(!this.parentNode)return null;let n=this.parentNode.childNodes,i=n.indexOf(this);if(i===-1)return null;for(let s=i+e;s>=0&&s<n.length;s+=e){let o=n[s];if(!r||o.nodeType===1)return o}return null}removeChild(e){let r=this.childNodes.indexOf(e);if(r!==-1)return this.childNodes.splice(r,1),e.parentNode=void 0,e}get previousSibling(){return this.findSibling(-1)}get nextSibling(){return this.findSibling(1)}get previousElementSibling(){return this.findSibling(-1,!0)}get nextElementSibling(){return this.findSibling(1,!0)}cloneNode(e=!1){let r=new D(this.nodeName,this.nodeType);if(r.attributes=JSON.parse(JSON.stringify(this.attributes)),this.textContent&&(r.textContent=this.textContent),e)for(let n of this.childNodes){let i=n.cloneNode(!0);r.appendChild(i)}return r}get parentElement(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.nodeType)==1?this.parentNode:null}};function Ae(t,e){let r=t.match(/([.#]?[\w-]+|\[([\w-]+)(="([^"]*)")?\])/g);if(!r)return!1;for(let n of r)if(n.startsWith("#")){if(e.getAttribute("id")!==n.slice(1))return!1}else if(n.startsWith(".")){if(!(e.getAttribute("class")||"").split(" ").includes(n.slice(1)))return!1}else if(n.startsWith("[")){let i=n.match(/^\[([\w-]+)(="([^"]*)")?\]$/);if(i){let s=i[1],o=i[3],c=e.getAttribute(s);if(typeof o=="undefined"){if(c===void 0)return!1}else if(c!==o)return!1}else return!1}else if(e.nodeName!==n)return!1;return!0}function ae(t){var e;let r=[],n=[];for(;t;){let i=t.match(/^<([\w-]+)(\s[^>]*)?>/),s=t.match(/^<\/([\w-]+)>/);if(i){let o=i[1].toLowerCase(),l=((e=(i[2]||"").match(/([\w-]+)(="([^"]*)")?/g))===null||e===void 0?void 0:e.map(d=>{let[f,p,,u]=d.match(/([\w-]+)(="([^"]*)")?/);return{name:p,value:Ze(u||"")}}))||[],h=new D(o,1);if(h.attributes=l,n.length>0){let d=n[n.length-1];d.childNodes.push(h),h.parentNode=d}else r.push(h);["img","input","br"].includes(o)||n.push(h),t=t.slice(i[0].length)}else if(s)n.pop(),t=t.slice(s[0].length);else{let o=t.indexOf("<"),c=t.slice(0,o!==-1?o:void 0),l=new D("#text",3);if(l.textContent=c,n.length>0){let h=n[n.length-1];h.childNodes.push(l),l.parentNode=h}else r.push(l);t=t.slice(c.length)}}return r}function Ye(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function Ze(t){return t.replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'")}function oe(t){return t.map(e=>{if(e.nodeType===3)return e.textContent||"";let{nodeName:r,attributes:n}=e,i=n.map(({name:o,value:c})=>` ${o}="${Ye(String(c))}"`).join(""),s=oe(e.childNodes);return["img","input","br"].includes(r)?`<${r}${i} />`:`<${r}${i}>${s}</${r}>`}).join("")}function Je(t){let e=new t.ownerDocument.defaultView.MutationObserver(r=>{r.forEach(n=>{let i=n.target,s=i.getAttribute("data-embed-src");s&&H(i,s),n.addedNodes&&n.addedNodes.forEach(o=>{o.nodeType==1&&et(o,!1)})})});return e.observe(t,{attributes:!0,subtree:!0,childList:!0}),e}function et(t,e=!0){let r=t.querySelectorAll("[data-embed-src]");for(var n=0;n<r.length;n++){let i=r[n];H(i,i.getAttribute("data-embed-src"))}if(e)return Je(t)}function H(t,e){for(var r=t;r;r=r.parentElement)if(!r.parentElement){let i=r.querySelectorAll("script");for(var n=0;n<i.length;n++)if(i[n].getAttribute("src")==e)return!0;r.tagName=="HTML"&&(r=r.querySelector("head")||r);let s=r.ownerDocument.createElement("script");s.setAttribute("type","module"),s.setAttribute("src",e),r.appendChild(s);break}}var ce={};B(ce,{adjustNumbers:()=>it,cleanCollectionBit:()=>W,getHumanizedLabel:()=>st,getLastPathBit:()=>ot,getQualifier:()=>nt,normalizeCollectionScope:()=>le,parseLimit:()=>tt,parseRange:()=>rt});var tt=t=>{var e;let r=parseInt((e=t==null?void 0:t.match(/\[0:(\d+)\]/))===null||e===void 0?void 0:e[1],10);return!isNaN(r)&&r>0?String(r):null},rt=t=>{var e;let r=(e=t==null?void 0:t.match(/\[([^\]]+)\]/))===null||e===void 0?void 0:e[1].split(/\s*,\s*/g).filter(Boolean).map(n=>{if(n.match(/^-?\d+$/))return n;let i=n.match(/^(\d+):(\d+)$/);return i&&parseInt(i[1],10)<parseInt(i[2],10)?i[1]+"-"+i[2]:null});return r!=null&&r.every(Boolean)?r.join(","):null},nt=t=>{var e;return(e=t==null?void 0:t.match(/(\.\*|\[[^\]]*\])$/))===null||e===void 0?void 0:e[0]};function W(t){return t.replace(/(\.?\[[^\]\[]*\]|\.\*)$/g,"")}function le(t){return W(t)+".*"}function it(t,e){return t==null?void 0:t.replace(/(.|^)(\d+)/g,(r,n,i)=>n+(n==":"?i:String(parseInt(i)+e)))}function st(t,e=2){var r=W(t).split(/]\.|\.\*\./g).pop().split(/\./g).slice(-3);return r=r.filter(n=>isNaN(parseInt(n))),r.map(n=>n.charAt(0).toUpperCase()+n.slice(1)).slice(-e).join(" ")}function ot(t){return W(t).split(".").pop()}var at=["January","February","March","April","May","June","July","August","September","October","November","December"],we=t=>{if(!t||typeof t.getDay!="function")return;let e=t.getFullYear(),r=at[t.getMonth()],n=t.getDate();return`${r} ${n}, ${e}`},Ce=function(t){return String(new Date(t))!=="Invalid Date"&&!isNaN(Number(new Date(t)))};function Se(t){let e=t.getAttribute("data-path-scope");for(var r=0,n=t;n=n.previousElementSibling;)n.getAttribute("data-path-scope")==e&&r++;return r}function lt(t,e,r){let n=t.getAttribute("data-path-scope");if(n==null)return;var i=Se(t);if(i!=0)return;let s=t.parentNode;if(s!=null){e==0?t.setAttribute("hidden","hidden"):t.getAttribute("hidden")!=null&&t.removeAttribute("hidden");for(var o=i+1,c=t,l=t;l=l.nextElementSibling;)l.getAttribute("data-path-scope")==n&&(o++,c=l);for(var h=o;h<e;h++)s.insertBefore(c.cloneNode(!0),c.nextElementSibling);for(var h=Math.max(1,e);h<o;h++)c=c.previousElementSibling,s.removeChild(c.nextElementSibling)}}function _(t,e,r,n,i=!0){var s,o,c;if(!t)return;var l=t;(r==null?void 0:r.type)=="doc"&&Array.isArray(r.content)&&(r=k(r)),n!=null&&n.processValue&&(r=n==null?void 0:n.processValue(t,e,r));var h=e.replace("data-path-","");if(e=="data-path-src"||e=="data-path-alt"){let x=Array.from(t.children).find(N=>N.localName=="picture")||t;l=t.localName=="img"?t:x.querySelector("img, video")}else if(e=="data-path-href")l=t.querySelector("a")||t.closest("a");else if(e=="data-path-hidden")r=r?null:!0;else if(e=="data-path"||e=="data-embed-html"||e=="html")h="innerHTML";else if(e=="data-embed-src"&&i)H(t,r);else if(e=="data-path-attributes"){if(!Array.isArray(r)){let x=((s=t.getAttribute("data-attributes-keys"))===null||s===void 0?void 0:s.split(",").filter(Boolean))||[];if(!Array.isArray(r))for(var d in r){var f=r[d];_(t,d,typeof f=="object"&&f?JSON.stringify(f):f,n,i)}for(var p=0;p<x.length;p++)(r==null||!(x[p]in r))&&_(t,x[p],null,n,i);_(t,"data-attributes-keys",Object.keys(r||{}).join(","),{},i)}if(t.tagName=="FEAAS-EXTERNAL"){let x=String(t.getAttribute("data-path-attributes")||"").slice(0,-1).split(".")[0]||"_";_(t,"datasources",JSON.stringify({[x]:r}),{},i)}return}if(typeof r=="boolean"&&h!=="hidden"&&(r=r?"":null),!l)return;if((h=="innerHTML"||h=="src")&&(r==null||r==="")){var m=String((c=(o=t.getAttribute("data-path-placeholder")||l[h])!==null&&o!==void 0?o:l.getAttribute(h))!==null&&c!==void 0?c:"");h=="innerHTML"?l.innerHTML=m:m?l.setAttribute(h,m):l.removeAttribute(h)}else if(r!=null)if(h=="innerHTML"){for(var g=String(r),E=l;E.parentElement&&E.localName.match(/^(a|var|strong|em|i|b)$/);)E=E.parentElement;E.localName.match(/p|h\d|button|time|li/)&&(g=g.replace(/<(p|h\d|li|ul)[^>]*?>|<\/(p|h\d|li|ul)[^>]*?>/g," ").trim().replace(/\s+/g," ")),String(E.getAttribute("class")).includes("-inline--time")&&Ce(g)&&(g=we(new Date(g))),l.innerHTML!=g&&(l.innerHTML=g)}else l.getAttribute(h)!=r&&l.setAttribute(h,r);else l.removeAttribute(h)}var Oe=["data-attributes-keys","data-path-attributes","data-path-scope"];function A(t,e,r,n,i=!0){var s,o,c;let l=t;if(n||(e=((s=r==null?void 0:r.processData)===null||s===void 0?void 0:s.call(r,l,e))||e),l.nodeType==1){let f=l.getAttribute("data-path-scope");if(f){let u=Se(l),m=F(e,f,!1);u==0&&lt(l,((o=r==null?void 0:r.shouldRepeat)===null||o===void 0?void 0:o.call(r,l,m))===!1?1:m.length,r),e={...e,[le(f)]:m[u]}}let p=Array.prototype.slice.call(l.attributes).sort((u,m)=>Oe.indexOf(u.name)-Oe.indexOf(m.name));for(var h=0;h<p.length;h++){let{name:u,value:m}=p[h];u.startsWith("data-path")&&u!="data-path-scope"&&_(l,u,F(e,m,!0,void 0,l.tagName!="FEAAS-EXTERNAL"),r,i),u=="data-embed-src"&&_(l,u,l.getAttribute(u),r,i)}}for(var h=0,d;d=l.childNodes[h++];)Re(d)&&A(d,e,r,!0,i);return n||(c=r==null?void 0:r.onRender)===null||c===void 0||c.call(r,l,e),l}function Re(t){return t.nodeType==1}function L(t,e,r,n,i=!0){var s;let o=((s=n==null?void 0:n.processTemplate)===null||s===void 0?void 0:s.call(n,t,e,r))||e;if(t.innerHTML=o,t.classList.add("-feaas"),(t.closest(".component.feaas")||t).className.includes("-theme--"))for(var l=0,h;h=t.childNodes[l++];)Re(h)&&(h.className=h.className.replace(/(\s|^)-theme--[^\s]+\s*/g,"$1"));return A(t,r,n,null,i)}function ct(t,e,r,n=!1,i=!0){var s;let o=((s=r==null?void 0:r.processTemplate)===null||s===void 0?void 0:s.call(r,null,t,e))||t;if(typeof document=="undefined"||n){let c=ae(o);return A(c[0],e,r,null,i).outerHTML}else{let c=document.createElement("div");return c.innerHTML=o,A(c,e,r,null,i),c.innerHTML}}var De=["initial","check","updated"];function Ne(){return Object.create(null)}var K=Ne();function Xt(){K=Ne()}async function z(t,e,r,n,i=K){return M({url:t,options:e,validator:r,callback:n,cache:i}).then(X).then(s=>s.response)}async function M({url:t,options:e,validator:r,callback:n,cache:i},s="initial"){let o=new Date;if(i!=null){var c=ht(t);if(De.indexOf(c.phase)>=De.indexOf(s))var l=c[s];else c.phase=s}let h=await(l||fetch(t,e));if(!l&&c&&(h.ok?c[s].resolve(h):c[s].reject(new Error("Fetch failed"))),!h.ok)throw new Error("Fetch failed");let d=new Date(h.headers.get("date"))<o||l&&s=="initial"&&(c.phase=="updated"||c.phase=="check");if((r==null?void 0:r(h,d))===!1)throw new de("Response is not valid");return await(n==null?void 0:n(h,s,d)),{url:t,options:e,isCached:d,response:h,validator:r,callback:n,cache:i}}function ht(t,e=!1){let r=String(t).replace("?head","");var n=K[r];return!n&&!e&&(n=K[r]={phase:null,initial:w(),check:w(),updated:w(),final:w()}),n}var de=class extends Error{};async function X(t){let{url:e,isCached:r,options:n,validator:i,response:s,cache:o}=t;if(r){let{response:c}=await M({url:e+(e.toString().includes("?")?"&":"?")+"head",options:{...n,method:"HEAD",cache:"no-cache"},validator:i,cache:o},"check");if(c.headers.get("last-modified")!=s.headers.get("last-modified"))return ue(t)}return t}async function ue(t){return M({...t,options:{...t.options,cache:"reload"}},"updated")}var S="https://feaas.blob.core.windows.net";function q(t){let e=t==null?void 0:t.match(/^(?:(.*?)\/components)?\/?([^\/]+)\/([^\/]+)(?:\/([^\/]+)(?:\/(published|staged|saved|\d+)(?:\.html?)?)?)?$/);if(e){var[,r,n,i,s,o]=e;return{cdn:r,library:n,component:i,version:s,revision:o}}}function Gt(t){if(!t||!t.library||!t.component)throw new Error("Component requires `library` and `component` properties");return`${t.cdn&&t.cdn!=S?`${t.cdn}/components`:""}/${t.library}/${t.component}/${!t.version||t.version=="responsive"&&(!t.revision||t.revision=="published")?"":t.version}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/(^\/|\/$|\/\/)(?!.+\/components\/)/g,"")}function Qt(t){return`${t.cdn&&t.cdn!=S?`${t.cdn}/styles/`:""}${t.library}/${!t.revision||t.revision=="published"?"":t.revision}`.replace(/\/$|\/\/(?!.+\/styles\/)/g,"")}function U(t){let e=t==null?void 0:t.match(/^(?:(.*?)\/styles\/)?([^\/]+)(?:\/(published|staged|saved|\d+)(?:.css)?)?$/);if(e){var[,r,n,i]=e;return{cdn:r,library:n,revision:i}}else{let s=q(t);if(s){var{cdn:r,library:n,revision:i}=s;return i!=null&&i.match(/\d/)&&(i=void 0),{cdn:r,library:n,revision:i}}}}function _e(t){return typeof t=="string"&&(t={src:t}),"src"in t&&t.src?t={...q(t.src)}:t={...t},`${t.cdn||t.hostname||S}/components/${t.library}/${t.component}/${t.version||"responsive"}/${t.revision||"published"}.html`}function V(t){if(typeof t=="string"&&(t={src:t}),"src"in t){if(String(t.src).includes("v1/files/components/styles"))return t.src;t={...U(t.src)}}else t={...t};return`${t.cdn||t.hostname||S}/styles/${t.library}/${t.revision=="staged"?"staged":t.revision=="saved"?"saved":"published"}.css`}async function j(t,e,r=!1){let n=c=>c.headers.get("x-ms-meta-versionDeletedAt")==null,i=c=>c.clone().text().then(e),s=await Promise.all([t.instance&&M({options:{headers:{Accept:"text/html"},credentials:"omit"},url:_e({...t,version:t.instance}),validator:n}).catch(c=>c),M({url:_e(t),validator:n}).catch(c=>c)]),o=s.find(c=>c&&"isCached"in c&&c);if(!o||o instanceof Error)throw s.find(l=>l&&l instanceof Error)||new Error("Can not fetch component");return s[0]==o&&console.log("Using fork!",s),await i(o.response),r?o:X({...o,callback:i}).catch(c=>{if(s[0]==o&&(ue({...o,callback:null,validator:null}),console.log("Fork was deleted"),!(s[1]instanceof Error)))return i(s[1].response),X({...s[1],callback:i});throw c})}async function Yt(t){typeof t=="string"&&(t={src:t});var e;let{response:r}=await j(t,n=>{e=n},!0);return{...t,template:e,lastModified:r.headers.get("last-modified")}}async function fe(t,e){return z(V(t),{headers:{Accept:"text/css"},credentials:"omit"},r=>r.headers.get("x-ms-meta-deletedAt")==null,(r,n)=>r.clone().text().then(i=>e(i,n)))}function er(t,e){return dt(t,e||(e=document.createElement("style"))),e}function dt(t,e){return e||(e=document.createElement("style")),fe(t,(r,n)=>{e.textContent=r}).then(()=>e)}var ut=new WeakSet;function pe(t,e){var r,n=ft(t);if(n){if(ut.has(n))return Promise.resolve(n);t=n.getAttribute("data-href")||n.getAttribute("href")}return fe(t,(i,s)=>{s=="initial"&&n||(r||(r=!n||n.tagName=="LINK"?pt(t):n),r.textContent=i),e==null||e(i,s)}).then(()=>r||n)}function Te(t){return new Promise((e,r)=>{pe(t,e).catch(r)})}function ft(t){let e=V(t),{library:r}=U(e),n=`/files/components/styles/${r}.css`;return document.querySelector(`style[data-href="${e}"],
4
+ link[rel="stylesheet"][href="${e}"],
4
5
  style[data-href*="${n}"],
5
- link[rel="stylesheet"][href*="${n}"]`)}function Xe(e){let t=z(e),r=document.createElement("style");return r.setAttribute("data-href",t),document.head.appendChild(r),r}function It(e,t){let r=document.createElement("div");r.innerHTML=e;let n=document.createDocumentFragment();for(;r.firstChild;)n.appendChild(r.firstChild);return w(n,t),r}function Se(e,t,r=!0){return Qe(e,t||(t=document.createElement("div")),r),t}async function Qe(e,t,r=!0){return t||(t=document.createElement("div")),t.childNodes.length?w(t,e.data,e,null,r):"template"in e?O(t,e.template,e.data,e,r):k(e,n=>O(t,n,e.data,e,r)).then(()=>t)}import{customizeDataSettings as Ze}from"@sitecore/byoc";function et(e){let{params:t,method:r,headers:n,body:i,url:s}=b(e);var o={url:s},a={...n};return n["Content-Type"]==="application/json"&&delete a["Content-Type"],n.Accept==="application/json"&&delete a.Accept,Object.keys(a).length>0&&(o.headers=a),r!=="GET"&&(o.method=r),r==="GET"||r==="HEAD"||Object.keys(i).length===0||(o.body=i),Object.keys(t).length>0&&(o={...o,params:t}),o}var P=e=>{if(!e||typeof e.url!="string")return!1;for(var t in e)if(!(t=="body"||t=="params"||t=="headers"||t=="url"||t==="method"||t=="jsonpath"&&typeof e[t]=="string"))return!1;return!0};function Ee(e){let{url:t,headers:r,params:n,method:i,body:s}=b(e),o,a=r["Content-Type"];i!="GET"&&i!="HEAD"&&(a==="application/json"&&(o=JSON.stringify(s)),a==="multipart/form-data"&&(o=Object.keys(s).reduce((c,d)=>(c.append(d,s[d]),c),new FormData)),a==="application/x-www-form-urlencoded"&&(o=new URLSearchParams(s)));let l=Object.keys(n).length?`?${new URLSearchParams(n)}`:"";return[`${t}${l}`,{headers:r,body:o,method:i}]}function b(e){let t={};for(let r in(e==null?void 0:e.headers)||{})if(e.headers.hasOwnProperty(r)){let n=r.replace(/^[a-z]|\-[a-z]/g,i=>i.toUpperCase());t[n]=e.headers[r]}return t.Accept||(t.Accept="application/json"),{params:(e==null?void 0:e.params)||{},headers:t,jsonpath:String((e==null?void 0:e.jsonpath)||"$"),method:((e==null?void 0:e.method)||"GET").toUpperCase(),body:(e==null?void 0:e.body)||{},url:String((e==null?void 0:e.url)||"")}}var le=async(e,t)=>{let r=Ze(t,e);if(r instanceof Promise)return r;let n=e;r&&(n=b(r));try{let[i,s]=Ee(n),a=await(await b.fetchImplementation(i,{...s,method:s.method.toLowerCase()})).json();return n.jsonpath&&n.jsonpath!="$"?M(a,n.jsonpath):a}catch(i){return{}}};async function Ce(e){if(!e)return e;if(P(e))return le(e);let t=Object.keys(e),r=await Promise.all(t.map(n=>P(e[n])?le(e[n],n):null).filter(Boolean));return t.reduce((n,i)=>({...n,[i]:P(e[i])?r.shift():e[i]}),{})}function tt(e){return e?P(e)||Object.values(e).some(P):!1}b.clean=et;b.toFetchArguments=Ee;b.fetchOne=le;b.fetch=Ce;b.isDataSettings=P;b.hasDataSettings=tt;b.fetchImplementation=(...e)=>fetch(...e);function rt(e){var t,r,n,i,s,o,a,l;let c,d=e.getAttribute("src");if(d){let _=J(d);if(!_)throw new Error(`Could not parse FEAAS Component source: ${d}`);var{cdn:p,library:f,component:u,version:h,revision:y}=_}let g=e.getAttribute("data");if(g!=null&&g!="")try{c=typeof g=="string"?JSON.parse(g):{}}catch(_){console.error(_)}let v=e.getAttribute("fetch");return{data:c||{},cdn:(r=(t=e.getContextAttribute("cdn"))!==null&&t!==void 0?t:p)!==null&&r!==void 0?r:E,library:(n=e.getAttribute("library"))!==null&&n!==void 0?n:f,component:(i=e.getAttribute("component"))!==null&&i!==void 0?i:u,version:(o=(s=e.getAttribute("version"))!==null&&s!==void 0?s:h)!==null&&o!==void 0?o:"responsive",revision:(l=(a=e.getAttribute("revision"))!==null&&a!==void 0?a:y)!==null&&l!==void 0?l:"published",hostname:e.getAttribute("hostname"),template:e.getAttribute("template"),instance:e.getAttribute("instance"),editable:e.getAttribute("editable")!=null,suspended:e.getAttribute("suspended")!=null,lastModified:e.getAttribute("last-modified"),fetch:v=="false"||v==null&&e.hasAttribute("fetch")?[]:v==null||v=="true"?["data","template","stylesheet"]:v.split(/(\s+|\-)+/g).filter(Boolean)}}var V=class extends S{setData(t){this.set({data:t})}getProps(){return rt(this)}isJSONAttribute(t){return t=="data"}attributeChangedCallback(t,r,n){r!==n&&((t=="library"||t=="component"||t=="revision"||t=="version")&&(this.payload=void 0,this.alreadyRendered&&this.connected&&(this.needsRefresh=!0,this.needsToFetchTemplate=!0)),super.attributeChangedCallback(t,r,n),t=="data"&&(this.needsRefresh=!0,(this.props.fetch.includes("data")||this.alreadyRendered||!b.hasDataSettings(this.props.data))&&this.fetchData()))}async fetchData(){this.readyData=void 0,this.whenDataReady=this.whenDataReady.restart();let t=await b.fetch(this.props.data),r=this.alreadyRendered;await this.whenDataReady.resolve(t),r&&this.advance()}getEditor(){var t;return(t=document.querySelector("feaas-context"))===null||t===void 0?void 0:t.refs.editor}constructor(){super(),this.readyData={},this.whenDataReady=x(r=>this.readyData=r,r=>this.onError(r)),this.defaultProps={cdn:E,revision:"published",version:"responsive",editable:!1,suspended:!1,data:{}},this.onLoad=r=>{this.payload=r,this.advance()};let t=this.getAttribute("data");this.getAttribute("data")||this.whenDataReady.resolve({}),this.addEventListener("click",()=>{this.props.editable&&this.edit()})}edit(){let t=this.getEditor();if(t!=null&&t.setTarget(this))return t.open(),!0}getOriginal(){let t=this.getAttribute("data-path-scope");if(t){for(var r=this;(r=r.previousElementSibling)&&r.getAttribute("data-path-scope")==t;)var n=r;return n}}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null&&this.props.component!=null&&this.props.version!=null}async load(){var t;if(this.getOriginal())return;let r=()=>{this.payload!=null&&(n||this.readyData&&this.onLoad(this.payload))};if(this.props.fetch.includes("stylesheet"))var n=xe({...this.props}).then(()=>{n=null,r()});if(this.props.fetch.includes("template")||this.needsToFetchTemplate){this.needsToFetchTemplate=!1;var i=k(this.props,s=>{this.payload=s,this.needsRefresh=!0,r()})}else this.payload=(t=this.props.template)!==null&&t!==void 0?t:this.innerHTML;return Promise.all([n,this.whenDataReady.then(()=>r()),i]).then(()=>this.payload)}flush(){this.readyData&&super.flush()}update(){if(this.alreadyRendered=!0,!(!this.props.fetch.includes("data")&&!this.props.fetch.includes("template")&&this.firstElementChild&&!this.needsRefresh))if(Array.from(this.children).filter(t=>t.tagName!="BR").length>0&&!this.needsRefresh)w(this,this.readyData);else{if(this.needsRefresh=!1,this.getOriginal())return;O(this,this.payload,this.readyData)}}};V.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet","fetch"];V.register("feaas-component");function nt(e){return{opacity:e!=null&&e.getAttribute("opacity")?parseFloat(e==null?void 0:e.getAttribute("opacity")):1,hidden:(e==null?void 0:e.getAttribute("hidden"))!=null}}var q=class extends S{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return nt(this)}attributeChangedCallback(t,r,n){if(r!==n)return t=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),n?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(t,r,n)}connectedCallback(){this.payload=null,super.connectedCallback(),this.attributeChangedCallback("hidden",this.getAttribute("hidden"),this.getAttribute("hidden")),this.stylesheet=document.createElement("style"),this.stylesheet.textContent=`
6
+ link[rel="stylesheet"][href*="${n}"]`)}function pt(t){let e=V(t),r=document.createElement("style");return r.setAttribute("data-href",e),document.head.appendChild(r),r}function ir(t,e){let r=document.createElement("div");r.innerHTML=t;let n=document.createDocumentFragment();for(;r.firstChild;)n.appendChild(r.firstChild);return A(n,e),r}function Pe(t,e,r=!0){return mt(t,e||(e=document.createElement("div")),r),e}async function mt(t,e,r=!0){return e||(e=document.createElement("div")),e.childNodes.length?A(e,t.data,t,null,r):"template"in t?L(e,t.template,t.data,t,r):j(t,n=>L(e,n,t.data,t,r)).then(()=>e)}import{customizeDataSettings as yt}from"@sitecore/byoc";function gt(t){let{params:e,method:r,headers:n,body:i,url:s}=v(t);var o={url:s},c={...n};return n["Content-Type"]==="application/json"&&delete c["Content-Type"],n.Accept==="application/json"&&delete c.Accept,Object.keys(c).length>0&&(o.headers=c),r!=="GET"&&(o.method=r),r==="GET"||r==="HEAD"||Object.keys(i).length===0||(o.body=i),Object.keys(e).length>0&&(o={...o,params:e}),o}var $=t=>{if(!t||typeof t.url!="string")return!1;for(var e in t)if(!(e=="body"||e=="params"||e=="headers"||e=="url"||e==="method"||e=="jsonpath"&&typeof t[e]=="string"))return!1;return!0};function ke(t){let{url:e,headers:r,params:n,method:i,body:s}=v(t),o,c=r["Content-Type"];i!="GET"&&i!="HEAD"&&(c==="application/json"&&(o=JSON.stringify(s)),c==="multipart/form-data"&&(o=Object.keys(s).reduce((h,d)=>(h.append(d,s[d]),h),new FormData)),c==="application/x-www-form-urlencoded"&&(o=new URLSearchParams(s)));let l=Object.keys(n).length?`?${new URLSearchParams(n)}`:"";return[`${e}${l}`,{headers:r,body:o,method:i}]}function v(t){let e={};for(let r in(t==null?void 0:t.headers)||{})if(t.headers.hasOwnProperty(r)){let n=r.replace(/^[a-z]|\-[a-z]/g,i=>i.toUpperCase());e[n]=t.headers[r]}return e.Accept||(e.Accept="application/json"),{params:(t==null?void 0:t.params)||{},headers:e,jsonpath:String((t==null?void 0:t.jsonpath)||"$"),method:((t==null?void 0:t.method)||"GET").toUpperCase(),body:(t==null?void 0:t.body)||{},url:String((t==null?void 0:t.url)||"")}}var me=async(t,e)=>{let r=yt(e,t);if(r instanceof Promise)return r;let n=t;r&&(n=v(r));try{let[i,s]=ke(n),c=await(await v.fetchImplementation(i,{...s,method:s.method.toLowerCase()})).json();return n.jsonpath&&n.jsonpath!="$"?I(c,n.jsonpath):c}catch(i){return{}}};async function Le(t){if(!t)return t;if($(t))return me(t);let e=Object.keys(t),r=await Promise.all(e.map(n=>$(t[n])?me(t[n],n):null).filter(Boolean));return e.reduce((n,i)=>({...n,[i]:$(t[i])?r.shift():t[i]}),{})}function bt(t){return t?$(t)||Object.values(t).some($):!1}v.clean=gt;v.toFetchArguments=ke;v.fetchOne=me;v.fetch=Le;v.isDataSettings=$;v.hasDataSettings=bt;v.fetchImplementation=(...t)=>fetch(...t);function Et(t){var e,r,n,i,s,o,c,l;let h,d=t.getAttribute("src");if(d){let N=q(d);if(!N)throw new Error(`Could not parse FEAAS Component source: ${d}`);var{cdn:f,library:p,component:u,version:m,revision:g}=N}let E=t.getAttribute("data");if(E!=null&&E!="")try{h=typeof E=="string"?JSON.parse(E):{}}catch(N){console.error(N)}let x=t.getAttribute("fetch");return{data:h||{},cdn:(r=(e=t.getContextAttribute("cdn"))!==null&&e!==void 0?e:f)!==null&&r!==void 0?r:S,library:(n=t.getAttribute("library"))!==null&&n!==void 0?n:p,component:(i=t.getAttribute("component"))!==null&&i!==void 0?i:u,version:(o=(s=t.getAttribute("version"))!==null&&s!==void 0?s:m)!==null&&o!==void 0?o:"responsive",revision:(l=(c=t.getAttribute("revision"))!==null&&c!==void 0?c:g)!==null&&l!==void 0?l:"published",hostname:t.getAttribute("hostname"),template:t.getAttribute("template"),instance:t.getAttribute("instance"),editable:t.getAttribute("editable")!=null,suspended:t.getAttribute("suspended")!=null,lastModified:t.getAttribute("last-modified"),fetch:x=="false"||x==null&&t.hasAttribute("fetch")?[]:x==null||x=="true"?["data","template","stylesheet"]:x.split(/(\s+|\-)+/g).filter(Boolean)}}var G=class extends C{setData(e){this.set({data:e})}getProps(){return Et(this)}isJSONAttribute(e){return e=="data"}attributeChangedCallback(e,r,n){r!==n&&((e=="library"||e=="component"||e=="revision"||e=="version")&&(this.payload=void 0,this.alreadyRendered&&this.connected&&(this.needsRefresh=!0,this.needsToFetchTemplate=!0)),super.attributeChangedCallback(e,r,n),e=="data"&&(this.needsRefresh=!0,(this.props.fetch.includes("data")||this.alreadyRendered||!v.hasDataSettings(this.props.data))&&this.fetchData()))}async fetchData(){this.readyData=void 0,this.whenDataReady=this.whenDataReady.restart();let e=await v.fetch(this.props.data),r=this.alreadyRendered;await this.whenDataReady.resolve(e),r&&this.advance()}getEditor(){var e;return(e=document.querySelector("feaas-context"))===null||e===void 0?void 0:e.refs.editor}constructor(){super(),this.readyData={},this.whenDataReady=w(r=>this.readyData=r,r=>this.onError(r)),this.defaultProps={cdn:S,revision:"published",version:"responsive",editable:!1,suspended:!1,data:{}},this.onLoad=r=>{this.payload=r,this.advance()};let e=this.getAttribute("data");this.getAttribute("data")||this.whenDataReady.resolve({}),this.addEventListener("click",()=>{this.props.editable&&this.edit()})}edit(){let e=this.getEditor();if(e!=null&&e.setTarget(this))return e.open(),!0}getOriginal(){let e=this.getAttribute("data-path-scope");if(e){for(var r=this;(r=r.previousElementSibling)&&r.getAttribute("data-path-scope")==e;)var n=r;return n}}isReadyToLoad(){return super.isReadyToLoad()&&this.props.library!=null&&this.props.component!=null&&this.props.version!=null}async load(){var e;if(this.getOriginal())return;let r=()=>{this.payload!=null&&(n||this.readyData&&this.onLoad(this.payload))};if(this.props.fetch.includes("stylesheet"))var n=Te({...this.props}).then(()=>{n=null,r()});if(this.props.fetch.includes("template")||this.needsToFetchTemplate){this.needsToFetchTemplate=!1;var i=j(this.props,s=>{this.payload=s,this.needsRefresh=!0,r()})}else this.payload=(e=this.props.template)!==null&&e!==void 0?e:this.innerHTML;return Promise.all([n,this.whenDataReady.then(()=>r()),i]).then(()=>this.payload)}flush(){this.readyData&&super.flush()}update(){if(this.alreadyRendered=!0,!(!this.props.fetch.includes("data")&&!this.props.fetch.includes("template")&&this.firstElementChild&&!this.needsRefresh))if(Array.from(this.children).filter(e=>e.tagName!="BR").length>0&&!this.needsRefresh)A(this,this.readyData);else{if(this.needsRefresh=!1,this.getOriginal())return;L(this,this.payload,this.readyData)}}};G.observedAttributes=["library","component","version","revision","hostname","cdn","template","data","instance","editable","with-stylesheet","fetch"];G.register("feaas-component");function xt(t){return{opacity:t!=null&&t.getAttribute("opacity")?parseFloat(t==null?void 0:t.getAttribute("opacity")):1,hidden:(t==null?void 0:t.getAttribute("hidden"))!=null}}var Q=class extends C{constructor(){super(...arguments),this.defaultProps={hidden:!1}}getProps(){return xt(this)}attributeChangedCallback(e,r,n){if(r!==n)return e=="hidden"&&(this.style.setProperty("display","block","important"),this.style.setProperty("transition","opacity 0.3s","important"),n?(this.style.setProperty("opacity","0","important"),this.style.pointerEvents="none"):(this.style.setProperty("opacity","1","important"),this.style.pointerEvents="all")),super.attributeChangedCallback(e,r,n)}connectedCallback(){this.payload=null,super.connectedCallback(),this.attributeChangedCallback("hidden",this.getAttribute("hidden"),this.getAttribute("hidden")),this.stylesheet=document.createElement("style"),this.stylesheet.textContent=`
6
7
  #loader {
7
8
  position: absolute;
8
9
  top: 0;
@@ -66,10 +67,10 @@ var Oe=Object.defineProperty;var j=(e,t)=>{for(var r in t)Oe(e,r,{get:t[r],enume
66
67
  style="animation: 1.5s linear 0s infinite normal none running loader-circular-track"
67
68
  ></circle>
68
69
  </svg>
69
- </div>`,this.getRoot().appendChild(this.stylesheet),this.getRoot().appendChild(this.loader)}update(){this.loader.style.opacity=String(this.props.opacity)}};q.observedAttributes=["hidden","opacity"];q.register("feaas-loader");function it(e){var t,r,n,i;let s=e.getAttribute("src");if(s)var{cdn:o,library:a,revision:l}=L(s);return{library:e==null?void 0:e.getContextAttribute("library"),revision:(r=(t=e==null?void 0:e.getAttribute("revision"))!==null&&t!==void 0?t:l)!==null&&r!==void 0?r:"published",cdn:(i=(n=e==null?void 0:e.getContextAttribute("cdn"))!==null&&n!==void 0?n:e==null?void 0:e.getContextAttribute("hostname"))!==null&&i!==void 0?i:E}}var ce=class extends S{constructor(){super(...arguments),this.onLoad=t=>{this.payload=t,this.advance()}}getProps(){return it(this)}isReadyToLoad(){return this.props.library!=null&&this.props.revision!=null&&this.props.cdn!=null}load(){return ae(this.props,this.onLoad)}};ce.register("feaas-stylesheet");var ue={};j(ue,{convertBase64toBlob:()=>Re,generate:()=>Te,get:()=>st,getVersionForThumbnail:()=>Ne,load:()=>_e,responseToImage:()=>de,upload:()=>$e});var Re=e=>fetch(e).then(t=>t.blob()),de=e=>e.blob().then(t=>new Promise((r,n)=>{let i=new Image;i.onerror=n,i.onload=()=>{r(i)},i.src=URL.createObjectURL(t)}));async function Ne(e){return e.versions.length||await e.versions.fetch(),e.getVersionForWidth(800)}async function st(e,t,r){try{if(!e.isNew)return await _e(e,t,r)}catch(i){e.sdk.log(`FEAAS: Thumbnail ${e.id}, version: ${(t==null?void 0:t.id)||"responsive"}, status: generating ${status}, reason: ${i}`)}let n=await Te(e,t);return r==null||r(n,!1),n&&!e.isNew&&Re(n.src).then(i=>$e(e,t,i)),n}async function _e(e,t,r){let n=t?t.getThumbnailURL():e.getThumbnailURL(),i=e.library.stylesheet,s=new Date(Math.max(Number(e.modifiedAt),Number(i.modifiedAt)));e.sdk.log(`FEAAS: Thumbnail ${e.id}/${(t==null?void 0:t.id)||"responsive"}, loading`);var o;return await H(n,{},(a,l)=>{let c=Math.abs(Number(new Date(a.headers.get("x-ms-meta-componentRenderedAt")))-Number(s))<2e3;return l&&!c&&de(a).then(d=>{o=d,r(d,l)}),c},(a,l,c)=>{e.sdk.log(`FEAAS: Thumbnail ${e.id}/${(t==null?void 0:t.id)||"responsive"}, status: ${l}`),de(a).then(d=>{o=d,r(d,c)})},null),o}async function Te(e,t,r){let n=t||(e.isNew?null:await Ne(e));if(!n||n.isViewEmpty())return null;let i=r||e.library.stylesheets.first,{datasources:s}=e.sdk;return await ot(n.classList,i.getBreakpointForWidth(800,n.getBreakpoints()),n.view,s.reduce((a,l)=>Object.assign(a,{[l.id]:l.sample}),{}),i.css,e.sdk)}function ot(e,t,r,n,i,s){let o=document.createElement("iframe");return o.style.position="absolute",o.style.top="-2000px",o.style.left="-2000px",o.style.width=t.props.minWidth+"px",o.style.height="720px",o.style.zIndex="100011",document.body.appendChild(o),new Promise((a,l)=>{let c=document.createElement("script");c.onerror=l,c.src=s.frontend+"/assets/html2canvas.js",c.onload=()=>{var u;(((u=o.contentWindow.document.fonts)===null||u===void 0?void 0:u.ready)||Promise.resolve()).then(function(){return o.contentWindow.html2canvas(f,{scale:Math.max(1.1,1e3/Math.min(1401,Math.max(320,t.props.minWidth))),width:Math.min(1401,Math.max(320,t.props.minWidth)),height:Math.max(1,Math.min(2e3,f.offsetHeight)),windowWidth:t.props.minWidth||t.props.maxWidth+"px",windowHeight:1e3,proxy:s.backend+"/proxy/media",backgroundColor:"#ffffff"}).then(h=>{let y=h.toDataURL("image/jpeg",.6);o.parentElement.removeChild(o);let g=new Image;g.onload=()=>{a(g)},g.onerror=l,g.src=y})})},o.contentWindow.document.head.appendChild(c);let d=o.contentWindow.document.createElement("style");d.textContent=`
70
+ </div>`,this.getRoot().appendChild(this.stylesheet),this.getRoot().appendChild(this.loader)}update(){this.loader.style.opacity=String(this.props.opacity)}};Q.observedAttributes=["hidden","opacity"];Q.register("feaas-loader");function vt(t){var e,r,n,i;let s=t.getAttribute("src");if(s)var{cdn:o,library:c,revision:l}=U(s);return{library:t==null?void 0:t.getContextAttribute("library"),revision:(r=(e=t==null?void 0:t.getAttribute("revision"))!==null&&e!==void 0?e:l)!==null&&r!==void 0?r:"published",cdn:(i=(n=t==null?void 0:t.getContextAttribute("cdn"))!==null&&n!==void 0?n:t==null?void 0:t.getContextAttribute("hostname"))!==null&&i!==void 0?i:S}}var ye=class extends C{constructor(){super(...arguments),this.onLoad=e=>{this.payload=e,this.advance()}}getProps(){return vt(this)}isReadyToLoad(){return this.props.library!=null&&this.props.revision!=null&&this.props.cdn!=null}load(){return pe(this.props,this.onLoad)}};ye.register("feaas-stylesheet");var be={};B(be,{convertBase64toBlob:()=>Me,generate:()=>Ue,get:()=>At,getVersionForThumbnail:()=>$e,load:()=>Ie,responseToImage:()=>ge,upload:()=>je});var Me=t=>fetch(t).then(e=>e.blob()),ge=t=>t.blob().then(e=>new Promise((r,n)=>{let i=new Image;i.onerror=n,i.onload=()=>{r(i)},i.src=URL.createObjectURL(e)}));async function $e(t){return t.versions.length||await t.versions.fetch(),t.getVersionForWidth(800)}async function At(t,e,r){try{if(!t.isNew)return await Ie(t,e,r)}catch(i){t.sdk.log(`FEAAS: Thumbnail ${t.id}, version: ${(e==null?void 0:e.id)||"responsive"}, status: generating ${status}, reason: ${i}`)}let n=await Ue(t,e);return r==null||r(n,!1),n&&!t.isNew&&Me(n.src).then(i=>je(t,e,i)),n}async function Ie(t,e,r){let n=e?e.getThumbnailURL():t.getThumbnailURL(),i=t.library.stylesheet,s=new Date(Math.max(Number(t.modifiedAt),Number(i.modifiedAt)));t.sdk.log(`FEAAS: Thumbnail ${t.id}/${(e==null?void 0:e.id)||"responsive"}, loading`);var o;return await z(n,{},(c,l)=>{let h=Math.abs(Number(new Date(c.headers.get("x-ms-meta-componentRenderedAt")))-Number(s))<2e3;return l&&!h&&ge(c).then(d=>{o=d,r(d,l)}),h},(c,l,h)=>{t.sdk.log(`FEAAS: Thumbnail ${t.id}/${(e==null?void 0:e.id)||"responsive"}, status: ${l}`),ge(c).then(d=>{o=d,r(d,h)})},null),o}async function Ue(t,e,r){let n=e||(t.isNew?null:await $e(t));if(!n||n.isViewEmpty())return null;let i=r||t.library.stylesheets.first,{datasources:s}=t.sdk;return await wt(n.classList,i.getBreakpointForWidth(800,n.getBreakpoints()),n.view,s.reduce((c,l)=>Object.assign(c,{[l.id]:l.sample}),{}),i.css,t.sdk)}function wt(t,e,r,n,i,s){let o=document.createElement("iframe");return o.style.position="absolute",o.style.top="-2000px",o.style.left="-2000px",o.style.width=e.props.minWidth+"px",o.style.height="720px",o.style.zIndex="100011",document.body.appendChild(o),new Promise((c,l)=>{let h=document.createElement("script");h.onerror=l,h.src=s.frontend+"/assets/html2canvas.js",h.onload=()=>{var u;(((u=o.contentWindow.document.fonts)===null||u===void 0?void 0:u.ready)||Promise.resolve()).then(function(){return o.contentWindow.html2canvas(p,{scale:Math.max(1.1,1e3/Math.min(1401,Math.max(320,e.props.minWidth))),width:Math.min(1401,Math.max(320,e.props.minWidth)),height:Math.max(1,Math.min(2e3,p.offsetHeight)),windowWidth:e.props.minWidth||e.props.maxWidth+"px",windowHeight:1e3,proxy:s.backend+"/proxy/media",backgroundColor:"#ffffff"}).then(m=>{let g=m.toDataURL("image/jpeg",.6);o.parentElement.removeChild(o);let E=new Image;E.onload=()=>{c(E)},E.onerror=l,E.src=g})})},o.contentWindow.document.head.appendChild(h);let d=o.contentWindow.document.createElement("style");d.textContent=`
70
71
  ${i}
71
72
  body, html { padding: 0; margin: 0; overflow: hidden }
72
- `;let p=o.contentWindow.document.createElement("style");p.textContent=`
73
+ `;let f=o.contentWindow.document.createElement("style");f.textContent=`
73
74
  body, html { padding: 0; margin: 0; overflow: hidden }
74
- `,o.contentWindow.document.head.appendChild(d),o.contentWindow.document.head.appendChild(p);let f=Se({template:r,data:n},null,!1);f.classList.add(...e,"-feaas--preview","-emulate--"+t.details.slug),o.contentWindow.document.body.appendChild(f)})}async function $e(e,t,r){let n=t?t.getThumbnailURL():e.getThumbnailURL(),i=new Date(Math.max(Number(e.modifiedAt),Number(e.library.stylesheet.modifiedAt)));try{await e.sdk.uploadBlob("thumbnails",n.split(/\/thumbnails\//)[1],r,{headers:{"x-ms-blob-content-type":"image/jpg","x-ms-blob-cache-control":"public,max-age=31536000,immutable","x-ms-meta-versionId":t?t.id:null,"x-ms-meta-versionRevision":t?t.revision.toString():null,"x-ms-meta-componentId":e.id,"x-ms-meta-componentRenderedAt":i.toUTCString(),"x-ms-meta-componentModifiedAt":e.modifiedAt.toUTCString(),"x-ms-meta-componentCreatedAt":e.createdAt.toUTCString(),"x-ms-meta-modifiedAt":e.modifiedAt.toUTCString()}}),fetch(n,{cache:"no-cache"}).then(()=>{e.sdk.log("FEAAS: Thumbnail uploaded",n)})}catch(s){e.sdk.log("FEAAS: Thumbnail failed to upload",n,s)}return n}import{registerDatasource as Er,registerComponent as Cr,getComponent as Rr,customizeDataSettings as Nr}from"@sitecore/byoc";var he;typeof window!="undefined"&&(window.FEAASReactElement=T,(he=window.FEAASLoading)!==null&&he!==void 0||(window.FEAASLoading=Promise.resolve()));export{V as Component,rt as ComponentProps,x as ControlledPromise,E as DEFAULT_CDN_URL,ne as DOM,re as DataPath,Q as DataScope,b as DataSettings,S as Element,V as FEAASComponent,rt as FEAASComponentsProps,S as FEAASElement,q as FEAASLoader,nt as FEAASLoaderProps,ce as FEAASStylesheet,it as FEAASStylesheetProps,ie as InvalidResponse,m as JSONPath,q as Loader,G as MyComponent,ce as Stylesheet,ue as Thumbnail,De as WebComponent,We as adjustNumbers,je as autoloadScripts,I as cleanCollectionBit,_t as clearFetchCache,Xe as createStylesheet,Nr as customizeDataSettings,H as fetchAndRevalidate,k as fetchAndRevalidateComponent,oe as fetchAndRevalidateStylesheet,se as fetchBypassingCache,W as fetchCache,Pt as fetchComponent,Ce as fetchData,B as fetchToValidateCache,D as fetchWithCacheAwareness,Ye as findStylesheet,Rr as getComponent,Ot as getComponentSource,we as getComponentURL,qe as getFetchCache,He as getHumanizedLabel,Be as getLastPathBit,Ie as getQualifier,Dt as getStylesheetSource,z as getStylesheetURL,F as loadScript,ae as loadStylesheet,xe as loadStylesheetAllowStale,te as normalizeCollectionScope,ke as observeDOMElement,J as parseComponentSource,Ue as parseLimit,Fe as parseRange,L as parseStylesheetSource,M as queryObject,fe as queryObjectRaw,U as queryScopes,Cr as registerComponent,Er as registerDatasource,Se as renderComponent,It as renderComponentElement,Qe as renderComponentPromise,O as renderDOMContent,w as renderDOMElement,Ve as renderHTMLContent,kt as renderStylesheet,Ge as renderStylesheetPromise,$ as serializeCH1RichText,N as setDOMAttribute};
75
+ `,o.contentWindow.document.head.appendChild(d),o.contentWindow.document.head.appendChild(f);let p=Pe({template:r,data:n},null,!1);p.classList.add(...t,"-feaas--preview","-emulate--"+e.details.slug),o.contentWindow.document.body.appendChild(p)})}async function je(t,e,r){let n=e?e.getThumbnailURL():t.getThumbnailURL(),i=new Date(Math.max(Number(t.modifiedAt),Number(t.library.stylesheet.modifiedAt)));try{await t.sdk.uploadBlob("thumbnails",n.split(/\/thumbnails\//)[1],r,{headers:{"x-ms-blob-content-type":"image/jpg","x-ms-blob-cache-control":"public,max-age=31536000,immutable","x-ms-meta-versionId":e?e.id:null,"x-ms-meta-versionRevision":e?e.revision.toString():null,"x-ms-meta-componentId":t.id,"x-ms-meta-componentRenderedAt":i.toUTCString(),"x-ms-meta-componentModifiedAt":t.modifiedAt.toUTCString(),"x-ms-meta-componentCreatedAt":t.createdAt.toUTCString(),"x-ms-meta-modifiedAt":t.modifiedAt.toUTCString()}}),fetch(n,{cache:"no-cache"}).then(()=>{t.sdk.log("FEAAS: Thumbnail uploaded",n)})}catch(s){t.sdk.log("FEAAS: Thumbnail failed to upload",n,s)}return n}import{registerDatasource as Hr,registerComponent as Wr,getComponent as Kr,customizeDataSettings as zr}from"@sitecore/byoc";var Ee;typeof window!="undefined"&&(window.FEAASReactElement=T,(Ee=window.FEAASLoading)!==null&&Ee!==void 0||(window.FEAASLoading=Promise.resolve()));export{G as Component,Et as ComponentProps,w as ControlledPromise,S as DEFAULT_CDN_URL,he as DOM,ce as DataPath,se as DataScope,v as DataSettings,C as Element,G as FEAASComponent,Et as FEAASComponentsProps,C as FEAASElement,Q as FEAASLoader,xt as FEAASLoaderProps,ye as FEAASStylesheet,vt as FEAASStylesheetProps,de as InvalidResponse,y as JSONPath,Q as Loader,Y as MyComponent,ye as Stylesheet,be as Thumbnail,Fe as WebComponent,it as adjustNumbers,et as autoloadScripts,W as cleanCollectionBit,Xt as clearFetchCache,pt as createStylesheet,zr as customizeDataSettings,z as fetchAndRevalidate,j as fetchAndRevalidateComponent,fe as fetchAndRevalidateStylesheet,ue as fetchBypassingCache,K as fetchCache,Yt as fetchComponent,Le as fetchData,X as fetchToValidateCache,M as fetchWithCacheAwareness,ft as findStylesheet,Kr as getComponent,Gt as getComponentSource,_e as getComponentURL,ht as getFetchCache,st as getHumanizedLabel,ot as getLastPathBit,nt as getQualifier,Qt as getStylesheetSource,V as getStylesheetURL,H as loadScript,pe as loadStylesheet,Te as loadStylesheetAllowStale,le as normalizeCollectionScope,Je as observeDOMElement,q as parseComponentSource,tt as parseLimit,rt as parseRange,U as parseStylesheetSource,I as queryObject,ve as queryObjectRaw,F as queryScopes,Wr as registerComponent,Hr as registerDatasource,Pe as renderComponent,ir as renderComponentElement,mt as renderComponentPromise,L as renderDOMContent,A as renderDOMElement,ct as renderHTMLContent,er as renderStylesheet,dt as renderStylesheetPromise,k as serializeCH1RichText,_ as setDOMAttribute};
75
76
  //# sourceMappingURL=headless.esm.js.map