@telia-ace/knowledge-widget-types-grid 1.0.54 → 1.1.1-rc.2

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.
@@ -0,0 +1,1258 @@
1
+ "use strict";var As=Object.defineProperty;var Ms=(t,e,n)=>e in t?As(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var x=(t,e,n)=>(Ms(t,typeof e!="symbol"?e+"":e,n),n);const h=require("react/jsx-runtime"),b=require("@emotion/styled"),k=require("@emotion/react"),p=require("react"),Rt=require("react-transition-group"),Rs=require("react-dom"),bt=require("react-router-dom"),Be=require("react-router"),xt=(t,e,n,...s)=>{const r=`[${t.get("$environment").name||"webprovisions"}] ${n}`;switch(e){case"info":console.info(r,...s);break;case"warning":console.warn(r,...s);break;case"error":console.error(r,...s);break}},Ps=t=>{const e=t.container||t;return{info:(n,...s)=>xt(e,"info",n,...s),warn:(n,...s)=>xt(e,"warning",n,...s),error:(n,...s)=>xt(e,"error",n,...s)}};var Ae=(t=>(t.Implementation="implementation",t.Widget="widget",t))(Ae||{}),ae=(t=>(t.Pre="pre",t.Post="post",t))(ae||{});const Ds=(t,e,n,s)=>{try{const r=new e(n,s);return{name:t,invoke:(i,o)=>{let a;return r[i]&&(a=r[i].call(r,o)),Promise.resolve(a)},getInstance:()=>r}}catch(r){if(r.message&&r.message.indexOf("is not a constructor")>=0)return{name:t,invoke:i=>{let o;return i==="initialize"&&(o=e(n,s)),Promise.resolve(o)},getInstance:()=>e};throw r}};function pn(t,e){return typeof t>"u"?e:t}class Ts{constructor(e={}){this.part=e}createCommand(e,n,s){let r;typeof n=="function"?r={scope:Ae.Widget,stage:ae.Post,defaultArgs:void 0,handlerResolver:n}:r={scope:pn(n.scope,Ae.Widget),stage:pn(n.stage,ae.Post),defaultArgs:n.defaultArgs,handlerResolver:s};let i=this.part;const o=e.split(".");return o.forEach((a,c)=>{c===o.length-1?i[a]||(i[a]=()=>r):i=this.part[a]=this.part[a]||{}}),this}get(){return this.part}}const jn=t=>{const e=new Ts({});return t(e),e.get()};jn(t=>{t.createCommand("types.register",{scope:Ae.Implementation,stage:ae.Pre},e=>(n,s)=>{e.container.get("$types")[n]=s}).createCommand("type",{stage:ae.Pre},e=>n=>{e.container.register("$type",n)}).createCommand("settings",{stage:ae.Pre,defaultArgs:[null]},e=>n=>{e.events.dispatch("settings:change",n,{bubbles:!0}),e.container.register("$settings",n)}).createCommand("plugin",{stage:ae.Pre},e=>(n,s,r)=>{const{container:i}=e;let o=null,a=n,c=s;typeof n=="string"&&(o=n,a=s,c=r);const u=l=>{const{transformPluginSettings:d}=e.container.get("$environmentOptions"),f=d?d(c||{},o,e.container,a):s;try{const m=Ds(o,a,i,f);i.get("$plugins").push(m),l&&m.invoke("initialize",null)}catch(m){Ps(e).warn("Error when initializing plugin",m)}};e.container.get("$instance")?u(!0):e.events.subscribeOnce("widget:instance-created",()=>u(!1))}).createCommand("container.register",e=>(n,s)=>{e.container.register(n,s)}).createCommand("container.registerAsync",e=>(n,s)=>{e.container.registerAsync(n,s)}).createCommand("container.registerFactory",e=>(n,s)=>{e.container.registerFactory(n,s)}).createCommand("container.touch",e=>(n,s)=>{e.container.touch(n,s)}).createCommand("csp",{},e=>n=>{e.container.register("csp",n)})});function Is(t){const e={};return[].filter.call(t.attributes,n=>/^data-/.test(n.name)).map(n=>n.name).forEach(n=>e[n.substr(5)]=t.getAttribute(n)),e}const mn=(t,e,n)=>{const s=Is(t);n({sourceDOMElement:t,eventType:e,data:s})};function gn(t,e,n){t.forEach(s=>{s.dataset.attached!=="true"&&(e==="load"?mn(s,e,n):s.addEventListener(e,r=>{r.preventDefault(),mn(s,e,n)}),s.dataset.monitored="true")})}function zs(t,e,n){const s=t.container.get("bootstrapping.monitor");s&&s.events.subscribe("bootstrap:trigger-elements-updated",(i,o)=>{gn(o.triggerElements,e,n)});const r=t.container.get("triggerElements");r&&gn(r,e,n)}jn(t=>{t.createCommand("ready",{scope:Ae.Implementation,stage:ae.Pre},e=>n=>{const{container:s}=e,r=s.owner;s.get("bootstrapping").ready?n(r):r.events.subscribeOnce("bootstrap:ready",()=>{n(r)})})});const wt=new WeakMap;function Vs(){return t=>(wt.has(t)||wt.set(t,{}),wt.get(t))}const Ct=(t,e,n,...s)=>{const r=`[${t.get("$environment").name||"webprovisions"}] ${n}`;switch(e){case"info":console.info(r,...s);break;case"warning":console.warn(r,...s);break;case"error":console.error(r,...s);break}},me=t=>{const e=t.container||t;return{info:(n,...s)=>Ct(e,"info",n,...s),warn:(n,...s)=>Ct(e,"warning",n,...s),error:(n,...s)=>Ct(e,"error",n,...s)}},z=Vs(),Ft=(()=>{let t=0;return()=>++t})(),Wt=(t,e,n)=>{const s=z(t).touchQueue.get(e);s&&s.forEach(r=>{r(n,t)})};class Hs{constructor(e,n,s,r){this.key=e,this.factory=n,this.parent=s,this.container=r,this.id=Ft(),this.resolved=!1,this.constructed=!1,this.async=!0}resolve(){if(!this.constructed){const e=this.factory(this.parent,this.container);return this.constructed=!0,this.value=Promise.resolve(e).then(n=>(this.resolved=!0,Wt(this.container,this.key,n),n))}return this.value}}class Bs{constructor(e,n,s,r){this.key=e,this.value=n,this.parent=s,this.container=r,this.id=Ft(),this.async=!1,this.resolved=!1,this.constructed=!0,this.resolve=()=>(this.resolved=!0,Wt(this.container,this.key,this.value),this.value)}}class _s{constructor(e,n,s,r){this.key=e,this.value=n,this.parent=s,this.container=r,this.id=Ft(),this.async=!1,this.resolved=!1,this.constructed=!1,this.resolve=()=>{this.resolved=!0,this.constructed=!0;const i=this.value(this.parent,this.container);return Wt(this.container,this.key,this.value),i}}}class Ut{constructor(e,n,s){this.owner=e,this.name=n,this.parent=s,z(this).resolvers=new Map,z(this).touchQueue=new Map,z(this).children=[]}delete(e){const n=z(this).resolvers,s=Array.from(n.values()).find(r=>r.id===e);return s?(z(this).touchQueue.delete(s.key),Promise.resolve(n.delete(s.key))):this.parent?this.parent.delete(e):Promise.resolve(!1)}clear(){const e=z(this).resolvers,n=Array.from(e.values());return Promise.all(n.map(s=>{if(s.constructed)return Promise.resolve(s.resolve()).then(r=>{if(r!==null&&typeof r=="object"&&typeof r.dispose=="function")return r.dispose.call(r,this,s)})})).then(()=>{n.forEach(s=>this.delete(s.id)),z(this).children.forEach(s=>s.clear())})}detach(){if(this.parent){const e=z(this.parent).children,n=e.indexOf(this);n>-1&&(e.splice(n,1),delete this.parent)}}touch(e,n){const s=z(this).resolvers.get(e);if(s&&s.constructed)Promise.resolve(s.resolve()).then(r=>{n(r,this)});else{const r=z(this).touchQueue;let i=r.get(e);i||(i=[],r.set(e,i)),i.push(n)}return this.parent&&!s?this.parent.touch(e,n):Promise.resolve()}registerAsync(e,n){const s=z(this).resolvers.get(e);s&&!s.async&&process.env.NODE_ENV!=="production"&&me(this).warn(`Mismatching resolver type. You are registering an async resolver with a key ('${e}') previously used by a non-async resolver.`);const r=new Hs(e,n,s,this);return z(this).resolvers.set(e,r),r.id}registerFactory(e,n){const s=z(this).resolvers.get(e);s&&s.async&&process.env.NODE_ENV!=="production"&&me(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${e}') previously used by an async resolver.`);const r=new _s(e,n,s,this);return z(this).resolvers.set(e,r),r.id}register(e,n){const s=z(this).resolvers.get(e);s&&s.async&&process.env.NODE_ENV!=="production"&&me(this).warn(`Mismatching resolver type. You are registering a non-async resolver with a key ('${e}') previously used by an async resolver.`);const r=new Bs(e,n,s,this);return z(this).resolvers.set(e,r),r.id}get(e){const n=z(this).resolvers.get(e);if(n)return n.async&&process.env.NODE_ENV!=="production"&&me(this).warn(`You are retrieving an async value (with key '${e}') by the non-async function 'container.get(key)'. This will not be supported in future versions. Use 'container.getAsync(key) instead.'`),n.resolve();if(this.parent)return this.parent.get(e)}getAsync(e){const n=z(this).resolvers.get(e);if(n){if(!n.async)throw process.env.NODE_ENV!=="production"&&me(this).warn(`You are retrieving a non-async value (with key '${e}') by the async function 'container.getAsync(key)'.Use 'container.get(key) instead.'`),"Mismatching resolver type";return n.resolve()}return this.parent?this.parent.getAsync(e):Promise.resolve(void 0)}getMany(...e){const n={};return e.forEach(s=>n[s]=this.get(s)),n}getManyAsync(...e){const n={};return Promise.all(e.map(s=>this.getAsync(s).then(r=>n[s]=r))).then(()=>n)}createChild(e,n){const s=new Ut(e,n,this);return z(this).children.push(s),s}}var Je=(t=>(t.Implementation="implementation",t.Widget="widget",t))(Je||{}),le=(t=>(t.Pre="pre",t.Post="post",t))(le||{});const qs=(t,e,n,s)=>{try{const r=new e(n,s);return{name:t,invoke:(i,o)=>{let a;return r[i]&&(a=r[i].call(r,o)),Promise.resolve(a)},getInstance:()=>r}}catch(r){if(r.message&&r.message.indexOf("is not a constructor")>=0)return{name:t,invoke:i=>{let o;return i==="initialize"&&(o=e(n,s)),Promise.resolve(o)},getInstance:()=>e};throw r}};function yn(t,e){return typeof t>"u"?e:t}class Fs{constructor(e={}){this.part=e}createCommand(e,n,s){let r;typeof n=="function"?r={scope:Je.Widget,stage:le.Post,defaultArgs:void 0,handlerResolver:n}:r={scope:yn(n.scope,Je.Widget),stage:yn(n.stage,le.Post),defaultArgs:n.defaultArgs,handlerResolver:s};let i=this.part;const o=e.split(".");return o.forEach((a,c)=>{c===o.length-1?i[a]||(i[a]=()=>r):i=this.part[a]=this.part[a]||{}}),this}get(){return this.part}}const rt=t=>{const e=new Fs({});return t(e),e.get()};rt(t=>{t.createCommand("types.register",{scope:Je.Implementation,stage:le.Pre},e=>(n,s)=>{e.container.get("$types")[n]=s}).createCommand("type",{stage:le.Pre},e=>n=>{e.container.register("$type",n)}).createCommand("settings",{stage:le.Pre,defaultArgs:[null]},e=>n=>{e.events.dispatch("settings:change",n,{bubbles:!0}),e.container.register("$settings",n)}).createCommand("plugin",{stage:le.Pre},e=>(n,s,r)=>{const{container:i}=e;let o=null,a=n,c=s;typeof n=="string"&&(o=n,a=s,c=r);const u=l=>{const{transformPluginSettings:d}=e.container.get("$environmentOptions"),f=d?d(c||{},o,e.container,a):s;try{const m=qs(o,a,i,f);i.get("$plugins").push(m),l&&m.invoke("initialize",null)}catch(m){me(e).warn("Error when initializing plugin",m)}};e.container.get("$instance")?u(!0):e.events.subscribeOnce("widget:instance-created",()=>u(!1))}).createCommand("container.register",e=>(n,s)=>{e.container.register(n,s)}).createCommand("container.registerAsync",e=>(n,s)=>{e.container.registerAsync(n,s)}).createCommand("container.registerFactory",e=>(n,s)=>{e.container.registerFactory(n,s)}).createCommand("container.touch",e=>(n,s)=>{e.container.touch(n,s)}).createCommand("csp",{},e=>n=>{e.container.register("csp",n)})});var Zt=(t=>(t.Activating="activating",t.Loading="loading",t.Activated="activated",t.Deactivating="deactivating",t.Deactivated="deactivated",t))(Zt||{});class Ws{constructor(e){this.container=e,this.widget=e.get("$widget"),this.settings=e.get("$settings"),this.events=this.widget.events,this.widget.events.subscribe("settings:change",(n,s)=>{this.settings=s})}}const Ln=t=>{const e=[];return[(s,r)=>{e.push(t.subscribe(s,r))},()=>{e.forEach(s=>{s()})}]};class it{constructor(e,n=[]){this.platform=e,this.rules=n}match(e){return this.rules.every(n=>!(n.id&&n.id!==e.id||n.type&&n.type!==e.type))}ofType(e){return this.rules.push({type:e}),this}withId(e){return this.rules.push({id:e}),this}select(){return new Us(this.platform,this)}}class On{constructor(e,n,s){x(this,"actions");x(this,"subscribe");x(this,"unsubscribe");this.platform=e,this.node=n,this.actions=new ot(e,new it(e).withId(n.id),s);const[r,i]=Ln(this.platform.events);this.subscribe=r,this.unsubscribe=i}properties(e){return e&&this.node.touchProperties(n=>e(n)),this.node.attributes.properties}context(e){return e&&this.subscribe("components:context-changed",(n,{node:s})=>{s===this.node&&e(this.node.attributes.context)}),this.node.attributes.context}layout(e){return e&&this.subscribe("components:layout-changed",(n,{node:s})=>{s===this.node&&e(this.node.attributes.layout)}),this.node.attributes.layout}writeProperties(e,n){this.node.writeProperties(e,n)}writeContext(e,n){this.node.writeProperties(e,n)}writeLayout(e,n){this.node.writeLayout(e,n)}dispose(){this.unsubscribe(),this.actions.dispose()}}class Us{constructor(e,n,s=!0){x(this,"actions");x(this,"removes",[]);this.platform=e,this.target=n,this.clearOnDispose=s,this.actions=new ot(this.platform,this.target)}writeProperties(e,n){this.removes.push(this.platform.write({options:n,attributes:{properties:e},target:this.target,removable:this.clearOnDispose}))}writeContext(e,n){this.removes.push(this.platform.write({options:n,attributes:{context:e},target:this.target,removable:this.clearOnDispose}))}writeLayout(e,n){this.removes.push(this.platform.write({options:n,attributes:{layout:e},target:this.target,removable:this.clearOnDispose}))}dispose(){this.removes.forEach(e=>{e()}),this.actions.dispose()}}const Zs=(t,e,n)=>{const s=t.concat(),r=(i,o,a)=>{let c=!0;if(s.length){const u=s.shift(),l=(d,f)=>(c=!1,r(d,Object.assign({},o,f),a));return Promise.resolve(u(i,l,a)).then(d=>({...d,cancelled:c}))}return Promise.resolve({data:i,cancelled:!1,options:o})};return r(e,{},n)};class ot{constructor(e,n,s){x(this,"subscriptions",[]);this.platform=e,this.target=n,this.ns=s,this.create=this.create.bind(this)}create(e,n=()=>{}){const s={key:e,fn:n,target:this.target,ns:this.ns};this.platform.actionsState.handlers.push(s);const r=()=>{const i=this.platform.actionsState.handlers.indexOf(s);i>-1&&this.platform.actionsState.handlers.splice(i,1)};return this.subscriptions.push(r),r}dispatch(e,n){const s=this.platform.nodes.all.concat(this.platform.nodes.detached),r={},i=this.platform.actionsState.handlers.filter(o=>o.key===e&&(!o.ns||!this.ns||o.ns===this.ns));return Promise.all(i.map(o=>{const a=s.filter(u=>o.target.match(u)&&this.target.match(u)),c=this.platform.actionsState.watchers.filter(u=>u.key===e&&(!u.ns||!this.ns||u.ns===this.ns)&&a.some(l=>u.target.match(l))).map(u=>u.fn);return Promise.all(a.map(u=>{const l=new On(this.platform,u,this.ns);return Zs(c,n,l).then(d=>{const{data:f={},options:m,cancelled:v}=d;return Promise.resolve(v?{}:o.fn(f,m,l)).then(y=>{r[u.id]=y})})}))})).then(()=>r)}watch(e,n){let s=e,r=this.ns;const i=e.split(".");i.length>1&&(r=i[0],s=i.splice(1).join("."));const o={fn:n,target:this.target,key:s,ns:r};this.platform.actionsState.watchers.push(o);const a=()=>{const c=this.platform.actionsState.watchers.indexOf(o);c>-1&&this.platform.actionsState.watchers.splice(c,1)};return this.subscriptions.push(a),a}dispose(){this.subscriptions.forEach(e=>e())}}rt(t=>{t.createCommand("components",e=>n=>{e.events.subscribeOnce("components:platform-created",(s,{platform:r})=>{n.handlers&&n.handlers.forEach(([i,o])=>{r.addComponentHandler(i,o)})})})});function Ks(t){const e=[];return t.forEach(n=>{e.indexOf(n)===-1&&e.push(n)}),e}function Pt(t="",e=""){const n=t.split(" ").concat(e.split(" "));return Ks(n).join(" ").trim()}function Gs(t,e){if(t){if(typeof e=="string")return e;if(Array.isArray(e)){let n="";return e.forEach(s=>n=Pt(n,s)),n}}}function N(...t){let e="";return t.length&&t.forEach(n=>{typeof n=="string"?e=Pt(e,n):Array.isArray(n)?e=Pt(e,Gs(...n)):typeof n<"u"&&n!==null&&process.env.NODE_ENV!=="production"&&T.warn("appendClassNames: arguments either haveto be a string or [boolean, ...string[]]. Passed args:",...t)}),e}function et(t){const e={};if(typeof t=="number"||typeof t=="string")return t;for(const n in t)if(t.hasOwnProperty(n)){const s=t[n],r=n.substring(0,1).toLowerCase()+n.substring(1);if(Object.prototype.toString.call(s)==="[object Array]"){e[r]=[];for(let i=0,o=s.length;i<o;i++)e[r].push(et(s[i]))}else s!==null&&typeof s=="object"?e[r]=et(s):e[r]=s}return e}const _e=(t,e,...n)=>typeof e=="string"?t(`[humany] ${e}`,...n):t(e,...n),ge=class{constructor(){x(this,"keys",[]);x(this,"log",(e,...n)=>this.lookup(e,()=>ge.log(...n)));x(this,"warn",(e,...n)=>this.lookup(e,()=>ge.warn(...n)));x(this,"error",(e,...n)=>this.lookup(e,()=>ge.error(...n)));x(this,"info",(e,...n)=>this.lookup(e,()=>ge.info(...n)))}lookup(e,n){this.keys.indexOf(e)===-1&&(this.keys.push(e),n())}};let T=ge;x(T,"log",(...e)=>_e(console.log,...e)),x(T,"warn",(...e)=>_e(console.warn,...e)),x(T,"error",(...e)=>_e(console.error,...e)),x(T,"info",(...e)=>_e(console.info,...e));const Kt=t=>{let e={},n,s;if(typeof t!="object"||t===null)return t;e=Array.isArray(t)?[]:{};for(s in t)n=t[s],e[s]=typeof n=="object"&&n!==null?Kt(n):n;return e};function vn(t){let e=0;if(t.length===0)return e.toString();for(let n=0;n<t.length;n++){const s=t.charCodeAt(n);e=(e<<5)-e+s,e=e&e}return e.toString()}function Ys(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/\s+/g,"-").toLowerCase()}class Qs{constructor(e,n){x(this,"tasks",[]);x(this,"current",Promise.resolve());this.lockWarningTime=e,this.lockErrorTime=n,this.next=this.next.bind(this)}add(e,n,s,r){this.tasks.push({task:e,resolve:n,reject:s,done:r}),this.next()}next(){this.current=this.current.then(()=>{const e=this.tasks.shift();if(e){let n;const s=setTimeout(()=>{process.env.NODE_ENV!=="production"&&T.warn(`A lock has exceeded ${this.lockWarningTime} ms. Waiting additional ${this.lockErrorTime} ms before rejecting the task.`,e),n=setTimeout(()=>{e.reject("lock timeout exceeded")},this.lockErrorTime)},this.lockWarningTime),r=Promise.resolve(e.task()).then(i=>(clearTimeout(s),clearTimeout(n),i));return Promise.resolve(r).then(this.next).then(()=>r.then(i=>{e.done(),e.resolve(i)})).catch(i=>(e.done(),e.reject(i),this.next()))}return Promise.resolve()})}}const qe=new WeakMap;function J(t,e=5e3,n=1e3){return qe.has(t)||qe.set(t,new Qs(e,n)),s=>new Promise((r,i)=>{const o=qe.get(t);o.add(s,r,i,()=>{o.tasks.length||qe.delete(t)})})}const Xs=(t,e)=>{const n=()=>e.querySelectorAll("[data-loading=true]").length>0,r=(()=>{let o=!1;return()=>{if(o)return;t.get("$widget").events.dispatch("widget:data-loaded",{element:e}),o=!0}})();if(!n())return r();new MutationObserver((o,a)=>{o.find(u=>u.type==="attributes"&&u.attributeName==="data-loading")&&!n()&&(a.disconnect(),r())}).observe(e,{attributes:!0,childList:!0,subtree:!0})},Js=(t,e)=>{t.get("$widget").container.getAsync("components").then(s=>{s.events.subscribeOnce("components:component-model-initialized",()=>{let r=s.nodes.visible.reduce((a,c)=>(!c.name||!c.type||c.type==="view"||c.type==="root"||c.attributes.layout.size==="none"||e.querySelector(`[data-name="${c.name}"]`)||a.push(c.name),a),[]),i=!1;new MutationObserver((a,c)=>{a.forEach(u=>{if(u.addedNodes){const l=Array.from(u.addedNodes).reduce((d,f)=>{const m=f.getAttribute&&f.getAttribute("data-name");return m&&r.indexOf(m)>-1&&d.push(m),d},[]);r=r.filter(d=>l.indexOf(d)===-1),!i&&r.length===0&&(i=!0,Xs(t,e),c.disconnect())}})}).observe(e,{attributes:!1,characterData:!1,childList:!0,subtree:!0,attributeOldValue:!1,characterDataOldValue:!1})})})},ee=(t={})=>(Object.keys(t).forEach(e=>{(t[e]===null||typeof t[e]>"u")&&delete t[e]}),t),Se=(t,e)=>{let n=!0;return Object.keys(t).length!==Object.keys(e).length||Object.keys(t).some(r=>!Object.keys(e).some(o=>r===o))?!1:(Object.keys(t).forEach(r=>{if(n){const i=typeof t[r]>"u"?"":t[r],o=typeof e[r]>"u"?"":e[r];n=i.toString()===o.toString()}}),n)},ie=()=>Math.floor((1+Math.random())*65536).toString(16).substring(1);function Re(){return ie()+ie()+"-"+ie()+"-"+ie()+"-"+ie()+"-"+ie()+ie()+ie()}class Dt{constructor(e,n){x(this,"id");x(this,"type");x(this,"name");x(this,"parent");x(this,"tags",[]);x(this,"children",{});x(this,"changesets",[]);x(this,"attributes");x(this,"mountCount",0);this.events=e,this.id=Re(),this.type=n,this.attributes={context:{},properties:{},layout:{},tags:[]},this.writeLayout({size:"full",indent:0})}mount(e,n){let s=e.get("mounted-nodes");return s||(s=new Map,e.register("mounted-nodes",s)),s.has(this)?(process.env.NODE_ENV!=="production"&&T.error("Trying to mount an already mounted component node.",this),()=>{}):(this.events.dispatch("components:node-mounted",{node:this}),this.mountCount===0&&(this.mountCount=this.mountCount+1,this.events.dispatch("components:node-enter",{node:this})),()=>{s.delete(this),this.events.dispatch("components:node-unmounted",{node:this}),this.mountCount=this.mountCount-1,this.mountCount===0&&this.events.dispatch("components:node-exit",{node:this})})}appendChild(e,n="default"){if(e.parent){if(e.parent===this)return;e.parent.removeChild(e)}e.parent=this,this.children[n]||(this.children[n]=[]),this.children[n].push(e),this.events.dispatch("components:node-appended",{node:e})}prependChild(e,n="default"){if(e.parent){if(e.parent===this)return;e.parent.removeChild(e)}e.parent=this,this.children[n]||(this.children[n]=[]),this.children[n].unshift(e),this.events.dispatch("components:node-appended",{node:e})}touchProperties(e,n={},s){const i=[{properties:e},n];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const o=this.changesets.indexOf(i);o>-1&&(this.changesets.splice(o,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeProperties(e,n={},s){const i=[{properties:e},n];return this.changesets.push(i),this.events.dispatch("components:set-properties",{node:this}),()=>{if(s){const o=this.changesets.indexOf(i);o>-1&&(this.changesets.splice(o,1),this.events.dispatch("components:set-properties",{node:this}))}}}writeLayout(e,n={},s){const i=[{layout:e},n];return this.changesets.push(i),this.events.dispatch("components:set-layout",{node:this}),()=>{if(!s)return;const o=this.changesets.indexOf(i);o>-1&&(this.changesets.splice(o,1),this.events.dispatch("components:set-layout",{node:this}))}}writeContext(e,n={},s){const i=[{context:e},n];return this.changesets.push(i),this.events.dispatch("components:set-context",{node:this}),()=>{if(!s)return;const o=this.changesets.indexOf(i);o>-1&&(this.changesets.splice(o,1),this.events.dispatch("components:set-context",{node:this}))}}getChildren(e="default"){const n=this.children[e]||[];return n.reduce((s,r,i)=>{const{order:o=i}=r.attributes.layout;return s[o]?s.splice(o,0,r):s[o]=r,s},Array(n.length))}remove(){this.parent&&this.parent.removeChild(this)}removeChild(e){Object.keys(this.children).forEach(n=>{const s=this.children[n],r=s.indexOf(e);r>-1&&(s.splice(r,1),this.events.dispatch("components:node-removed",{node:e,parentNode:this}))}),delete e.parent}}const Nn=(t,e,n)=>{for(let s=0,r=t.length;s<r&&n(t[s])!==!0;s++){const i=e[t[s].id]||"default",o=t[s].getChildren(i);Nn(o,e,n)}},at=(t,e,n)=>{if(n(t)!==!0){const s=e[t.id]||"default",r=t.children[s];Nn(r,e,n)}},Ke=(t,e)=>{const n=[];return at(t,e,s=>{n.push(s)}),n},An=(t,e,n)=>{let s;return at(t,e,r=>{if(n(r))return s=r,!0}),s};class er{constructor(e,n,s){x(this,"all",[]);x(this,"visible",[]);x(this,"detached",[]);this.root=e,this.switches=n,s.subscribe("components:node-appended",(r,i)=>{this.all.push(i.node),this.visible=Ke(e,n)}),s.subscribe("components:node-removed",(r,i)=>{let o=this.all.indexOf(i.node);o>-1&&this.all.splice(o,1),o=this.visible.indexOf(i.node),o>-1&&this.visible.splice(o,1),this.visible=Ke(e,n)}),s.subscribe("components:node-switched",(r,i)=>{this.visible=Ke(e,n)})}query(e={}){const n=[];return at(this.root,this.switches,s=>{Object.keys(e).every(i=>e[i]===s[i])&&n.push(s)}),n}get(e){return An(this.root,this.switches,n=>n.id===e)||this.detached.find(n=>n.id===e)}}class tr{constructor(){x(this,"handlers",new Map)}add(e,n){this.handlers.set(e,n)}get(e){return this.handlers.get(e)}}const nr=t=>{let e=t,n=0;for(;e.parent;)n=n+1,e=e.parent;return n},sr=t=>t.map(([n,s])=>[nr(n),n,s]).sort(([n],[s])=>n-s).map(([,n,s])=>[n,s]),$t=t=>t instanceof Date?!1:t&&typeof t=="object"&&!Array.isArray(t),Q=(t,...e)=>{if(!e.length)return t;const n=e.shift();if($t(t)&&$t(n))for(const s in n)$t(n[s])?(t[s]||Object.assign(t,{[s]:{}}),Q(t[s],n[s])):Object.assign(t,{[s]:n[s]});return Q(t,...e)},rr=(t,e)=>!t||t==="all"?!0:t.some(n=>e.indexOf(n)>-1),ir=(t,e)=>{let n=[],s=[],r;const i=()=>{process.env.NODE_ENV!=="production"&&console.time("state-processor.flush");const a=new Map,c=sr(n.map((l,d)=>[l,s[d]])),u=(l,d)=>{var j;const f=a.get(l)||{},m=d.context&&!f.context,v=d.properties&&!f.properties,y=d.layout&&!f.layout;a.set(l,{context:f.context||m,properties:f.properties||v,layout:f.layout||y}),v&&(l.attributes.properties={}),y&&(l.attributes.layout={}),m&&(l.attributes.context=Q({},(j=l.parent)==null?void 0:j.attributes.context));const g=[],w=[],C=[];if(l.changesets.forEach($=>{const[E,H]=$;rr(H.breakpoints,t.breakpoints)&&(v&&(typeof E.properties=="function"?g.push(E.properties):Q(l.attributes.properties,E.properties)),y&&(typeof E.layout=="function"?w.push(E.layout):Q(l.attributes.layout,E.layout)),m&&(typeof E.context=="function"?C.push(E.context):Q(l.attributes.context,E.context)))}),g.forEach($=>{Q(l.attributes.properties,$(l.attributes.properties))}),w.forEach($=>{Q(l.attributes.layout,$(l.attributes.layout))}),C.forEach($=>{Q(l.attributes.context,$(l.attributes.context))}),m||d.recursive){const $=t.getBranch(l),E=d.recursive?d:{context:!!m};l.getChildren($).forEach(H=>{u(H,E)})}};process.env.NODE_ENV!=="production"&&console.timeEnd("state-processor.flush"),c.forEach(([l,d])=>{u(l,d)}),n=[],s=[],e(a)},o=()=>{clearTimeout(r),r=setTimeout(i,0)};return(a,c)=>{const u=n.indexOf(a);if(u>-1){const l=s[u];return c.context&&(l.context=!0),c.properties&&(l.properties=!0),c.layout&&(l.layout=!0),c.recursive&&(l.recursive=!0),o()}return n.push(a),s.push(c),o()}};class Gt{constructor(e,n={}){x(this,"events");x(this,"breakpoints",[]);x(this,"nodes");x(this,"actionsState",{handlers:[],watchers:[]});x(this,"switches",{});x(this,"changesets",[]);x(this,"subscriptions",[]);x(this,"processNode");x(this,"customComponentHandler",new tr);this.providers=n,this.events=e.events.createChild(this);const s=new Dt(this.events,"root");s.name=`root-${e.name}`,this.nodes=new er(s,this.switches,this.events);const r=this.processNode=ir(this,i=>{const o=Array.from(i.keys());process.env.NODE_ENV!=="production"&&console.info(`STATE PROCESSOR: ${o.length} node(s) processed:
2
+ ${o.map(a=>`${a.name||"<no name>"} (${a.id})
3
+ `)}`),o.forEach(a=>{const c=i.get(a);a.parent&&a.parent.type==="root"&&this.events.dispatch("components:root-children-changed",{node:a}),c!=null&&c.context&&this.events.dispatch("components:context-changed",{node:a}),c!=null&&c.properties&&this.events.dispatch("components:properties-changed",{node:a}),c!=null&&c.layout&&this.events.dispatch("components:layout-changed",{node:a})}),this.events.dispatch("components:component-model-initialized",{},{bubbles:!0})});Promise.all(Object.keys(n).map(i=>n[i].load(this))),this.subscriptions.push(this.events.subscribe("components:node-appended",(i,o)=>{const{node:a}=o;this.changesets.forEach(c=>{const{changeset:u,target:l,removes:d}=c,[f,m]=u;l.match(o.node)&&(f.properties&&d.push(a.writeProperties(f.properties,m)),f.context&&d.push(a.writeContext(f.context,m)),f.layout&&d.push(a.writeLayout(f.layout,m)))})})),this.subscriptions.push(this.events.subscribe("components:node-appended",(i,o)=>{r(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-properties",(i,o)=>{r(o.node,{properties:!0})})),this.subscriptions.push(this.events.subscribe("components:set-context",(i,o)=>{r(o.node,{properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:set-indent",(i,o)=>{r(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:set-layout",(i,o)=>{r(o.node,{layout:!0})})),this.subscriptions.push(this.events.subscribe("components:node-switched",(i,{node:o,branch:a})=>{r(o,{layout:!0,recursive:!0,properties:!0,context:!0})})),this.subscriptions.push(this.events.subscribe("components:node-removed",(i,{parentNode:o})=>{r(o,{properties:!0})})),this.events.parent&&this.events.parent.dispatch("components:platform-created",{platform:this})}static getInstance(e){return e.getAsync("components")}addBreakpoint(e){this.breakpoints.indexOf(e)===-1&&(this.breakpoints.push(e),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}removeBreakpoint(e){const n=this.breakpoints.indexOf(e);n>-1&&(this.breakpoints.splice(n,1),this.processNode(this.nodes.root,{context:!0,properties:!0,layout:!0,recursive:!0}))}setSwitch(e,n){this.switches[e.id]=n,this.events.dispatch("components:node-switched",{node:e,branch:n})}getBranch(e){return this.switches[e.id]}createNode(e,n={}){const s=new Dt(this.events,e);return n.detached&&this.nodes.detached.push(s),s}components(){return new it(this)}actions(e,n){return new ot(this,e,n)}write(e){const{provider:n,target:s,attributes:r,options:i={},removable:o}=e,a=e.key||Re(),u={changeset:[r,i],target:s,removes:[]};if(n){const l=this.providers[n];l.write(a,s,r,i),u.removes.push(()=>{l.remove(a)})}return this.changesets.push(u),this.nodes.all.forEach(l=>{if(s.match(l)){let d=()=>{};r.properties&&(d=l.writeProperties(r.properties,i,o)),r.context&&(d=l.writeContext(r.context,i,o)),r.layout&&(d=l.writeContext(r.layout,i,o)),u.removes.push(d)}}),()=>{if(o){u.removes.forEach(d=>d());const l=this.changesets.indexOf(u);l>-1&&this.changesets.splice(l,1)}}}addComponentHandler(e,n){this.customComponentHandler.add(e,n)}getComponentHandler(e){return this.customComponentHandler.get(e)}dispose(){this.subscriptions.forEach(e=>e())}}const or=t=>{if(Array.isArray(t)){const[e,...n]=t;return{definitionId:e,overrides:n}}return{definitionId:t,overrides:[]}},tt=(t,e,n,s,r,i)=>{n.forEach(o=>{const a=or(o),c=s[a.definitionId];if(a.definitionId==="view"){const u=t.createNode("view");u.name="view",Object.keys(r).forEach(l=>{const d=r[l];tt(t,u,[d.entry],s,r,l)}),e.appendChild(u),a.overrides.forEach(l=>{l.properties&&u.writeProperties(l.properties,{breakpoints:l.breakpoints}),l.context&&u.writeContext(l.context,{breakpoints:l.breakpoints}),l.layout&&u.writeLayout(l.layout,{breakpoints:l.breakpoints})})}else if(t.getComponentHandler(c.type)){const u=t.getComponentHandler(c.type);u&&u(a,{platform:t,node:e,references:n,definitions:s,views:r,branch:i})}else{const u=s[a.definitionId];if(process.env.NODE_ENV!=="production"&&!u){T.error(`No definition found for component type '${a.definitionId}'.`);return}const l=t.createNode(u.type);l.name=a.definitionId,l.tags=u.tags||[],u.properties&&l.writeProperties(u.properties),u.context&&l.writeContext(u.context),u.layout&&l.writeLayout(u.layout),e.appendChild(l,i),a.overrides.forEach(d=>{const f={breakpoints:d.breakpoints};d.properties&&l.writeProperties(d.properties,f),d.context&&l.writeContext(d.context,f),d.layout&&l.writeLayout(d.layout,f)}),u.children&&tt(t,l,u.children,s,r)}})},Mn=(t,e)=>{const{entry:n,components:s,breakpoints:r,views:i}=e,o=[];return Object.keys(r).forEach(a=>{const c=r[a],u=window.matchMedia(c);u.matches&&t.breakpoints.push(a);const l=d=>{d.matches?t.addBreakpoint(a):t.removeBreakpoint(a)};u.addListener(l),o.push(()=>u.removeListener(l))}),tt(t,t.nodes.root,[n],s,i),()=>o.forEach(a=>{a()})},Tt=(t,e)=>({id:t.id,type:t.type,name:t.name,branch:e||"default"});var B=(t=>(t.open="open",t.closed="closed",t.hidden="hidden",t))(B||{}),Ge=(t=>(t.guide="guide",t.link="link",t.default="default",t))(Ge||{});const bn=t=>Promise.resolve().then(()=>require("./index-373df3a5.js")).then(({ServiceClient:e,ServiceProxy:n})=>t.get("settings").then(s=>{const{name:r,events:i}=t.get("$widget"),{data:{projection:o="",site:a="current",forceHttps:c=!1}}=s,u=new n(o,{credentials:"same-origin"}),l=new e(u,{funnel:r.replace("_contact-method","").replace("_contact",""),site:ar(a,c)},null,t);return i.subscribe("widget:settings-updated",(d,{data:f})=>{f&&f.projection!==o&&l.proxy.setBaseUrl(f.projection)}),l})),ar=(t,e)=>()=>{const n=r=>{const i=document.createElement("a");return i.href=r,i};let s=window.location;return t==="referrer"&&document.referrer&&(s=n(document.referrer)),[e?"https:":"","//",s.host,s.pathname].join("")};function U(t,e){return t.hints&&t.hints.indexOf(e)>-1}function cr(t){return t.constraints&&t.constraints.verifyValue}function lr(t){return t.constraints&&t.constraints.required}function ur(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="linkText")[0]||null;return e?e.split("=")[1]:null}function dr(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="url")[0]||null;return e?e.split("=")[1]:null}function hr(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="availableHours")[0]||null;return e?e.split("=")[1]||[]:[]}function fr(t){const e=t.hints.filter(n=>n.indexOf("=")>-1&&n.split("=")[0]==="minuteInterval")[0]||null;return e?e.split("=")[1]||[]:[]}function xn(t){return t.components?"Fieldset":U(t,"fullname")?"Name":U(t,"address")?"Address":U(t,"dropdown")?"DropDownList":U(t,"checkbox")?"CheckboxList":U(t,"radio")?"RadioButtonList":U(t,"email")?"Email":U(t,"agreement")?"Agreement":U(t,"phonenumber")?"PhoneNumber":U(t,"date")?"Date":t.type==="text/paragraph"?"Textarea":t.type==="text/number"?"Number":t.type==="text/password"?"Password":t.type==="hidden"?"Hidden":t.type==="file"?"File":t.type==="hwebsite"?"AntiSpam":"Text"}function pr(t){if(t.hints)for(let e=0;e<t.hints.length;e++){const n=t.hints[e];if(n.substr(0,12)==="placeholder=")return n.substr(12)}}function mr(t){return t.children||t.components||t.groups?"object":"string"}let gr=class Rn{constructor(e,n,s,r=s.getErrorMessage,i=s.getGeneralErrors){x(this,"children",[]);x(this,"isValid");x(this,"schema");x(this,"id");if(this.name=e,this.source=n,this.parent=s,this.getErrorMessage=r,this.getGeneralErrors=i,this.isValid=!this.getGeneralErrors(this.source)&&!this.getErrorMessage(this.source),!this.isValid){let o=this.parent;for(;o;)o.isValid=!1,o=o.parent}n.dataPath=s&&s.source?`${s.source.dataPath}.${e}`:e,this.schema={type:"object",actionKey:s?`${s.createSchema().actionKey}.${e}`:e,required:[]}}createChild(e,n){const s=new Rn(e,n,this);return this.children.push(s),s}createSchema(){const e=Object.assign({},this.schema);return this.id&&(e.id=this.id),this.source&&(e.type=mr(this.source),e.title=this.source.title,e.evaluate=this.source.hasDependants,e.isValid=this.isValid,this.source.options&&(U(this.source,"multiple")?(e.type="array",e.items={type:"string",enum:this.source.options.map(n=>n.value)}):e.enum=this.source.options.map(n=>n.value))),this.children&&this.children.length&&(e.properties={},this.children.forEach(n=>{e.properties[n.name]=n.createSchema(),lr(n.source)&&e.required.push(n.name)})),e}createLayout(){const e={};if(this.source){const s=xn(this.source)==="Fieldset";e["ui:component"]=xn(this.source),e["ui:placeholder"]=pr(this.source),e["ui:description"]=this.source.description,e["ui:tags"]=this.source.hints?this.source.hints.filter(r=>r.indexOf("=")===-1):[],e["ui:hidden"]=!this.source.visible,e["ui:error"]=this.getErrorMessage(this.source)||s&&this.getGeneralErrors(this.source),this.source.options&&(e["ui:enumNames"]=this.source.options.map(r=>r.title)),s&&this.schema.required.length&&(e["ui:hasRequiredChildren"]=!0),e["ui:component"]==="Agreement"&&(e["ui:linkText"]=ur(this.source),e["ui:link"]=dr(this.source)),e["ui:component"]==="PhoneNumber"&&(e["ui:options"]=this.source.options),e["ui:component"]==="Date"&&(e["ui:availableHours"]=hr(this.source),e["ui:minuteInterval"]=fr(this.source))}return this.children&&(e["ui:order"]=[],this.children.forEach(n=>{e["ui:order"].push(n.name),e[n.name]=n.createLayout()})),e}createData(){if(this.children.length>0){const e={};return this.children.forEach(n=>{e[n.name]=n.createData()}),e}return this.source.type==="choice"?U(this.source,"multiple")?this.source.options.filter(e=>e.selected).map(e=>e.value):this.source.options.filter(e=>e.selected).map(e=>e.value).join(","):this.source.value}};function yr(t,e,n,s){const r=new gr(t,{title:"",groups:e.groups},null,n,s);return r.id=t,r}let vr=class{constructor(e,n,s){x(this,"root");this.validationSource=s,this.getErrorMessage=this.getErrorMessage.bind(this),this.getGeneralErrors=this.getGeneralErrors.bind(this),this.validationSource=s,this.root=yr(e,{title:"",groups:n.groups},this.getErrorMessage,this.getGeneralErrors)}create(){return{schema:this.root.createSchema(),layout:this.root.createLayout(),data:this.root.createData()}}getGeneralErrors(e){if(this.validationSource&&this.validationSource.generalErrors&&this.validationSource.generalErrors.length>0)return this.validationSource.generalErrors[0]}getErrorMessage(e){if(this.validationSource&&e.name&&this.validationSource.errors&&this.validationSource.errors[e.name])return this.validationSource.errors[e.name]}};const br=(t,e)=>{const n=t.hints.find(s=>s.startsWith(e+"="));if(n)return n.substr(e.length+1)};function xr(t,e,n,s){const r=et(e),i=n?et(n):void 0,o=new vr(t,r,i),a=o.root;return(r.Groups||r.groups).forEach((c,u)=>{const l=c.title||"group",d=c.name||`${l}[${u}]`,f=a.createChild(d,c),m=c.components;m&&m.forEach((v,y)=>{const g=v.name||`${v.title}[${y}]`,w=f.createChild(g,v);if(cr(v)){const C=br(v,"verifyLabel")||`Confirm ${v.title}`;f.createChild(`${g}$VerifyValue`,{...v,name:`${v.name}$VerifyValue`,title:C,value:r.extra&&r.extra[`${v.name}$VerifyValue`]||""})}v.children&&v.children.forEach((C,j)=>{const $=C.name||`${C.title}[${j}]`;w.createChild($,C)})})}),o.create()}let wr=class{constructor(e,n){x(this,"name");x(this,"id");x(this,"type");x(this,"component");x(this,"title");x(this,"evaluate");x(this,"value");x(this,"description");x(this,"placeholder");x(this,"required");x(this,"actionKey");this.part=n;const{schema:s,layout:r,data:i}=n;this.name=e,this.value=i,this.type=s.type,this.title=s.title,this.evaluate=s.evaluate,this.actionKey=s.actionKey,this.component=r["ui:component"],this.description=r["ui:description"],this.placeholder=r["ui:placeholder"],this.required=s.required.indexOf(e)>-1}setData(e){this.part.data=e,this.value=e}};const Fe=(t,e)=>typeof t>"u"?e:t,Cr=(t,e)=>{let n=t["ui:order"];n||(n=[],t["ui:order"]=n),n.push(e)},$r=(t,e)=>`${t.schema.id}$${e}`,kr=(t,e)=>(t.schema.properties=Fe(t.schema.properties,{}),t.schema.properties[e.name]={id:e.id||$r(t,e.name),type:e.type,title:e.title,isValid:!0,required:[],evaluate:Fe(e.evaluate,!1),actionKey:e.actionKey,items:e.items?{type:"string",enum:e.items.map(n=>n.value)}:void 0},e.required===!0&&t.schema.required.push(e.name),Cr(t.layout,e.name),t.layout=Fe(t.layout,{}),t.layout[e.name]={"ui:component":e.component,"ui:description":e.description,"ui:placeholder":e.placeholder,"ui:onClick":e.onClick||void 0,"ui:enumNames":e.items?e.items.map(n=>n.label):void 0},t.data=Fe(t.data,{}),t.data[e.name]=e.type==="object"?{}:e.value,t),Er=(t,e)=>Object.assign({},{schema:t.schema.properties[e],layout:t.layout[e],data:t.data[e]}),Sr=(t,e,n)=>{const s=Er(t,e),r=new X(s);return n(r),r},Pn=(t,e,n,s,r=[])=>{Object.keys(t).forEach(i=>{i===e&&r.indexOf(i)===-1&&(t[i]=n,r.push(i),s&&(t["data:options"]=t["data:options"]||{},t["data:options"][i]=s)),typeof t[i]=="object"&&Pn(t[i],e,n,s,r)})},Dn=(t,e,n,s)=>{t&&t["ui:component"]===e&&(t[`ui:${n}`]=s),t&&Object.keys(t).forEach(r=>{typeof t[r]=="object"&&Dn(t[r],e,n,s)})},Ye=(t,e,n)=>{t!==null&&typeof t=="object"&&e===null&&n(t),t!==null&&typeof t=="object"&&typeof t[e]=="object"?n(t[e]):t!==null&&typeof t=="object"&&Object.keys(t).forEach(s=>{Ye(t[s],e,n)})},Qe=(t,e,n)=>{t&&t.properties&&e&&typeof t.properties[e]=="object"?n(t.properties[e]):t&&t.properties&&Object.keys(t.properties).forEach(s=>{t.properties&&Qe(t.properties[s],e,n)}),e===null&&n(t)};class X{constructor(e){this.form=e}createComponent(e,n){return this.form=kr(this.form,e),n&&Sr(this.form,e.name,n),new X(this.form)}setData(e,n,s){Pn(this.form.data,e,n,s)}setLayout(e,n,s){Dn(this.form.layout,e,n,s)}setMeta(e){return this.form.meta=e,this.form}setValidationErrors(e){if(e){const{general:n,...s}=e;Ye(this.form.layout,null,r=>r["ui:error"]=!1),Qe(this.form.schema,null,r=>r.isValid=!0),this.form.schema.isValid=!1,n&&this.form.layout["group[0]"]&&(this.form.layout["group[0]"]["ui:error"]=n),Object.keys(s).forEach(r=>{Ye(this.form.layout,r,i=>i["ui:error"]=s[r]),Qe(this.form.schema,r,i=>i.isValid=!1)})}else Ye(this.form.layout,null,n=>n["ui:error"]=!1),Qe(this.form.schema,null,n=>n.isValid=!0);return new X(this.form)}get(){return this.form}static create(e){const n={schema:{id:e,type:"object",title:"",isValid:!0,required:[]},layout:{},data:{}};return new X(n)}static fromLegacyForm(e,n,s,r){const i=xr(e,n,s);return new X(i)}}const jr=t=>t==="entering"||t==="entered",Lr=t=>t==="exiting"||t==="exited",ce={fade:{in:"opacity: 1;",out:"opacity: 0;"},"slide-left":{in:"transform: translateX(0);",out:"transform: translateX(-100%);"},"slide-right":{in:"transform: translateX(0);",out:"transform: translateX(100%);"},"slide-up":{in:"transform: translateY(0);",out:"transform: translateY(100%);"},"slide-down":{in:"transform: translateY(0);",out:"transform: translateY(-100%);"},scale:{in:"transform: scale(1);",out:"transform: scale(0);"}},Or=["slide-up","slide-down","slide-left","slide-right","scale"],It={compose:(t="exited",e)=>{const{enter:n,exit:s}=e,r=n.transitionKeys.split(" "),i=Or.indexOf(r[0])>-1?"transform":"opacity";if(jr(t))return r&&r.length>0?k.css`
4
+ ${r&&r.length>0&&r.map(a=>ce[a]?ce[a].in:"")}
5
+ transition: ${i} ${n.duration}ms ${n.easing};
6
+ `:"";const o=r&&r.length>0&&k.css`
7
+ ${r.map(a=>ce[a]?ce[a].out:"")}
8
+ `;if(Lr(t)){const a=s.transitionKeys.split(" ");return a&&a.length>0&&t==="exiting"?k.css`
9
+ ${o};
10
+ ${a.map(c=>ce[c]?ce[c].out:"")}
11
+ transition: ${i} ${s.duration}ms ${s.easing};
12
+ `:o}},composeViewTransition:(t,e,n)=>{if(e==="slide")return It.compose(t,{enter:{transitionKeys:n==="forth"?"slide-right":"slide-left",duration:500},exit:{transitionKeys:n==="forth"?"slide-left":"slide-right",duration:500}});if(e==="fade")return It.compose(t,{enter:{transitionKeys:"fade",duration:500},exit:{transitionKeys:"fade",duration:500}})},get:t=>ce[t]};var zt=(t=>(t.Opera="opera",t.Chrome="chrome",t.Firefox="firefox",t.Safari="safari",t.Edge="edge",t.EdgeChromium="edge-chromium",t.Blink="blink",t.IE="internet-explorer",t))(zt||{});const wn=()=>{const{opr:t,opera:e,InstallTrigger:n,HTMLElement:s,safari:r,documentMode:i,StyleMedia:o,chrome:a,CSS:c}=window,u=!!t&&!!t.addons||!!e||navigator.userAgent.indexOf(" OPR/")>=0;if(u)return"opera";if(n)return"firefox";const l=(m=>m.toString()==="[object SafariRemoteNotification]")(!r||typeof r<"u"&&r.pushNotification);if(/constructor/i.test(s)||l)return"safari";const d=!!i;if(d)return"internet-explorer";if(!d&&o)return"edge";const f=!!a&&(!!a.webstore||!!a.runtime);if(f)return"chrome";if(f&&navigator.userAgent.indexOf("Edg")!==-1)return"edge-chromium";if((f||u)&&c)return"blink"},Nr=["string","number"],W=t=>Object.keys(t).reduce((e,n)=>{const s=typeof t[n]>"u"?"":t[n],r=typeof s;if(Nr.indexOf(r)>-1){const i=n.substring(0,5);i==="data-"||i==="aria-"?e[Ys(n)]=s.toString():n.substring(0,4)!=="css-"&&(e[n]=s.toString())}else e[n]=s;return e},{}),Ar=t=>new RegExp("^#","i").test(t),Mr=t=>({children:e,...n})=>{const{implementation:s,name:r}=t.get("$widget"),{href:i=""}=n;if(Ar(i))return h.jsx(Vr,{smooth:!0,to:i,children:e});const o=s.bindings.map(u=>u.replace(/\./g,"\\.")).join("|"),c=new RegExp(`^((http[s]?:)?//)?(${o})/([^\\s]+)`).exec(i);if(c&&c.length>=4){const u=c[4];if(s.widgets.get(u)&&!u.startsWith("blob?")&&!u.startsWith(r))return h.jsx(Po,{widgetName:u,children:e})}return h.jsx("a",{...n,children:e})},Yt=t=>{const e={};return Object.keys(t).forEach(n=>{n.indexOf("css-")>-1&&(e[n]=t[n])}),e},Tn=t=>{let e="";return Object.keys(Yt(t)).forEach(n=>{n.indexOf("css-")>-1&&(e+=`${n.replace("css-","")}:${t[n]};`)}),k.css`
13
+ ${e}
14
+ `},Rr=(t,e)=>{let n="";const s=()=>{n=""},r=l=>{const d=document.getElementById(n);return d!==null?(l(d),s(),!0):!1},i=l=>(l.preventDefault(),s(),t.onClick&&t.onClick(l),typeof t.to=="string"&&(n=t.to.split("#").slice(1).join("#")),n!==""&&r(t.scroll||(d=>t.smooth?d.scrollIntoView({behavior:"smooth"}):d.scrollIntoView())),!1),{scroll:o,smooth:a,to:c,...u}=t;return e==="a"&&(u.href="javascript:;"),h.jsx(e,{...u,onClick:i,children:t.children})},be=t=>(e,n)=>{let s=e,r="";if(["h1","h2","h3","h4","h5","h6"].includes(e))s=e;else{const a=e.match(/h1|h2|h3|h4|h5|h6/);if(a!=null&&a[0]){s=a[0];const[c]=e.split(s);r=c}}const o=((a,c,u)=>u[a]?`${c}${u[a]}`:`${c}${a}`)(s,r,t.theme.typographyVariantMapping||{});return k.css`
15
+ ${o} {
16
+ ${n}
17
+ }
18
+ `};var Pr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Qt(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function In(t){if(t.__esModule)return t;var e=t.default;if(typeof e=="function"){var n=function s(){if(this instanceof s){var r=[null];r.push.apply(r,arguments);var i=Function.bind.apply(e,r);return new i}return e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(s){var r=Object.getOwnPropertyDescriptor(t,s);Object.defineProperty(n,s,r.get?r:{enumerable:!0,get:function(){return t[s]}})}),n}var zn={exports:{}};(function(t,e){(function(n,s){t.exports=s(p)})(Pr,function(n){function s(d,f,m,v){return f===void 0&&(f={}),Object.keys(f).reduce(function(y,g){if(/^on.*/.test(g))return y;var w=g;/^(data|aria)-/.test(g)||m.filter(function(O){return O instanceof RegExp?O.test(g):O===g}).length===0&&(w=r(g));var C,j,$=v(d,w);if($.name==="style")y[$.name]=(C=f.style,j={},C.split(";").filter(function(O){return O.trim()!==""}).forEach(function(O){var S,P=O.split(":");if(P.length>1){var D=function(I){return/^-ms-/.test(I)&&(I=I.substr(1)),I.startsWith("--")?I:r(I)}(P[0].trim()),A=(S=P.slice(1).join(":").trim(),/^\d+$/.test(S)?Number(S):S.replace(/'/g,'"'));j[D]=A}}),j);else{var E=f[g],H=E===""||String(E).toLowerCase()===w.toLowerCase();y[$.name]=$.isBoolean?H:E}return y},{})}function r(d){return d.replace(/(-|:)(.)/g,function(f,m,v){return v.toUpperCase()})}n=n&&n.hasOwnProperty("default")?n.default:n;var i=["table","tbody","thead","tfoot","tr"],o={for:"htmlFor",class:"className",allowfullscreen:["allowFullScreen","allowFullscreen"],autocomplete:"autoComplete",autofocus:["autoFocus"],contenteditable:"contentEditable",spellcheck:"spellCheck",srcdoc:"srcDoc",srcset:"srcSet",itemscope:"itemScope",itemprop:"itemProp",itemtype:"itemType"};function a(d,f){var m=o[f],v=document.createElement(d);if(m)return{name:Array.isArray(m)?m[0]:m,isBoolean:c(v,Array.isArray(m)?m[1]||f:m)};for(var y in v)if(y.toLowerCase()===f.toLowerCase())return{name:y,isBoolean:c(v,y)};return{name:f,isBoolean:c(v,f)}}function c(d,f){return d.setAttribute(f,""),d[f]===!0||u.indexOf(f)>-1}var u=["itemScope"];function l(d,f,m,v){v===void 0&&(v=null);var y=m[d],g=m._;return y?n.createElement(y,f,v):g?g(d,f,v):n.createElement(d,f,v)}return function(d,f){if(f===void 0&&(f={}),typeof d!="string")throw new TypeError("Expected HTML string");var m=document.createElement("div");m.innerHTML=d.trim();var v=Array.from(m.childNodes).map(function(y,g){return function w(C,j,$){var E=$.transform||{},H=$.preserveAttributes||[],O=$.dangerouslySetChildren||["style"],S=E._;if(C.nodeType===8)return null;if(C.nodeType===3){var P=C.textContent;return S?S(P):P}for(var D={},A=C.attributes,I=0;I<A.length;I++)D[A[I].name]=A[I].value;D.key=j.toString();var G=C.tagName.toLowerCase(),Ee=s(G,D,H,a),Ie=Array.from(C.childNodes).map(function(se,pe){return i.indexOf(G)>-1&&se.nodeType===3&&(se.textContent=se.textContent.trim(),se.textContent==="")?null:w(se,j+"."+pe,$)}).filter(Boolean);if(O.indexOf(G)>-1){var fe=C.innerHTML;return fe&&(G!=="style"&&G!=="script"&&(fe=fe.replace(/"/g,"&quot;")),Ee.dangerouslySetInnerHTML={__html:fe.trim()}),l(G,Ee,E)}var ze=Ie.length===0?null:Ie;return l(G,Ee,E,ze)}(y,String(g),f)}).filter(Boolean);return v.length===1?v[0]:v}})})(zn);var Dr=zn.exports;const Cn=Qt(Dr);function Tr(t,e){return e?Cn(t,e):Cn(t)}const Ir=t=>e=>h.jsx(po,{attrs:e,htmlBody:t}),zr=(t,e)=>({transform:{a:Mr(t),img:Ir(e)}}),Vr=t=>Rr(t,"a"),te=p.forwardRef(({className:t,children:e,...n},s)=>h.jsx(Hr,{type:"button",className:N(t,"humany-button"),...W(n),ref:s,children:e})),Hr=b.button`
19
+ -webkit-appearance: button;
20
+ text-transform: none;
21
+ overflow: visible;
22
+ outline: none;
23
+ border: none;
24
+ background-color: transparent;
25
+ cursor: pointer;
26
+ font-family: inherit;
27
+ font-size: inherit;
28
+ line-height: normal;
29
+ margin: 0;
30
+ padding: 0;
31
+ `,Vn=p.createContext(new Ut),Br=p.createContext(1),Xt=p.createContext({id:"",type:"",name:"",branch:""}),Hn=p.createContext({}),Bn=p.createContext(null);p.createContext(null);const _n=()=>p.useContext(Xt),q=()=>p.useContext(Vn),Pe=t=>{const e=p.useContext(Xt),n=$e(),[s,r]=p.useState();return p.useEffect(()=>{if((t||e.id)&&n){const i=n.nodes.get(t||e.id);r(i)}},[t,e.id,n]),s},he=()=>{const t=p.useRef(!1);return p.useEffect(()=>(t.current=!0,()=>{t.current=!1}),[]),t},$e=t=>{const e=q(),[n,s]=p.useState(null),r=he();return p.useEffect(()=>{Gt.getInstance(t||e).then(i=>{r.current&&s(i)})},[r]),n},_r=()=>p.useContext(Br),qr=(t,e)=>{const n=_n(),s=q(),[r,i]=p.useState(void 0),o=he(),a=t||n.type||"";return p.useEffect(()=>{if(a){let c;return(e||s).getAsync("componentResolver").then(u=>{if(o.current){const l=u.getComponent(a);i(l)}c=u.registerResolver(a,l=>{o.current&&i(l)})}),()=>{c&&c()}}},[o,a,e,s]),r},ct=t=>{const e=Pe(t),n=$e(),[s,r]=p.useState({}),i=he();return p.useEffect(()=>{e&&i.current&&r(e.attributes.context)},[i,e]),p.useEffect(()=>{if(n){const o=n.events.subscribe("components:context-changed",(a,c)=>{e===c.node&&i.current&&r(c.node.attributes.context)});return()=>{o()}}},[i,n,e]),s},ye=(t,e,n=window,s=()=>!0)=>{const r=p.useRef(()=>{});p.useEffect(()=>{r.current=e},[e]),p.useEffect(()=>{if(!(n&&s()))return;const o=a=>r.current(a);return n.addEventListener(t,o),()=>{n.removeEventListener(t,o)}},[t,n])},Fr=t=>{const e=q(),{events:n}=(t||e).get("$widget");return n},Oe=(t,e)=>{const[n,s]=p.useState(!1),r=p.useCallback(o=>{const{key:a}=o;a===t&&(s(!0),e&&e(o))},[s,e]),i=p.useCallback(({key:o})=>{o===t&&s(!1)},[s]);return ye("keydown",r,window),ye("keyup",i,window),n},Wr=t=>{const e=Pe(t),n=$e(),[s,r]=p.useState({}),i=he();return p.useEffect(()=>{e&&i.current&&r(e.attributes.layout)},[e,i]),p.useEffect(()=>{if(n){const o=n.events.subscribe("components:layout-changed",(a,c)=>{e===c.node&&i.current&&r(c.node.attributes.layout)});return()=>{o()}}},[n,i,e]),s},qn=t=>{const e=p.useRef();return p.useEffect(()=>{e.current=t}),e.current},Fn=()=>p.useContext(Hn),Jt=()=>p.useContext(Bn),Wn=t=>{const e=q(),n=Jt(),[s,r]=p.useState({name:"",params:{}}),i=he();return p.useEffect(()=>{const o=(t||e).get("$widget");if(!o)return;const{events:a}=o;return a.subscribe("router:change",(u,{next:{routeData:l}})=>{if(i.current){const{name:d,params:f}=l;ee(f),r({name:d,params:f})}})},[i,t,e]),p.useEffect(()=>{if(n&&n.history&&i.current){const o=n.getRouteData(),{name:a,params:c}=o;ee(c),r({name:a,params:c})}},[n,i]),s},en=t=>{const e=p.useRef(),n=p.useRef(0);let s;const r=p.useCallback(()=>{var u;(u=e.current)==null||u.classList.add("humany-scrolling"),clearTimeout(s),s=setTimeout(()=>{var l;(l=e.current)==null||l.classList.remove("humany-scrolling")},500)},[e]),i=p.useCallback(u=>{n.current=u.touches[0].clientY},[e]),o=u=>a(u)?u===e.current?u:null:u.parentElement?o(u.parentElement):null,a=u=>u.scrollWidth>u.clientWidth||u.scrollHeight>u.clientHeight,c=p.useCallback(u=>{if(!u.cancelable)return;const l=u.touches[0].clientY,d=o(u.target);if(!d)return;const f=d.scrollTop,m=n.current-l<0?"up":"down",v=f<=0&&m==="up",y=f>=d.scrollHeight-d.offsetHeight&&m==="down";(v||y)&&u.preventDefault(),n.current=l},[e,n]);return ye("scroll",r,e.current,()=>e.current&&t),ye("touchstart",i,e.current,()=>e.current&&t),ye("touchmove",c,e.current,()=>e.current&&t),t?[Ur,e]:["",e]},Ur=`
32
+ overflow-y: ${wn()===zt.Chrome||wn()===zt.EdgeChromium?"overlay":"auto"};
33
+ overflow-x: hidden;
34
+ -ms-overflow-style: none; /* IE 10+ */
35
+ scrollbar-width: thin; /* Firefox */
36
+ scrollbar-color: transparent transparent; /* Firefox */
37
+
38
+ ::-webkit-scrollbar {
39
+ width: 3px !important;
40
+ background-color: transparent;
41
+ border-left: none;
42
+ }
43
+ ::-webkit-scrollbar-thumb {
44
+ background-color: transparent;
45
+ }
46
+ ::-webkit-scrollbar-track {
47
+ -webkit-box-shadow: none !important;
48
+ background-color: transparent;
49
+ }
50
+ &.humany-scrolling {
51
+ scrollbar-color: #7F7F7F transparent;
52
+ scrollbar-width: thin; /* Firefox */
53
+ -ms-overflow-style: none; /* IE 10+ */
54
+
55
+ ::-webkit-scrollbar-thumb {
56
+ background-color: #7F7F7F;
57
+ }
58
+ }
59
+ `,Zr=(t=!1)=>{const[e,n]=p.useState(t),s=p.useCallback(r=>{n(typeof r=="boolean"?r:i=>!i)},[]);return[e,s]},tn=(t,e,n=[],s)=>{const r=Fr(s);return p.useEffect(()=>{if(r){const i=r.subscribe(t,e);return()=>{i()}}},[r].concat(n)),i=>r==null?void 0:r.dispatch(t,i)},Un=(t,e)=>{const n=tn("widget:menu-toggled",(s,r)=>{r!==t&&e()});return()=>n(t)},lt=p.forwardRef(({className:t,children:e,...n},s)=>h.jsx("span",{ref:s,className:N(t,"humany-text"),...W(n),children:e})),Zn=t=>k.css`
60
+ display: flex;
61
+ justify-content: center;
62
+ flex-direction: column;
63
+ background: #ffffff;
64
+ border-radius: ${t.theme.borderRadius};
65
+ border: ${t.theme.border};
66
+ box-shadow: ${t.theme.boxShadow||"none"};
67
+ ${t["data-loading"]&&"min-height: 150px;"}
68
+ `,nn=t=>{var e,n,s;return k.css`
69
+ cursor: pointer;
70
+ text-align: center;
71
+ border: none;
72
+ font-weight: 300;
73
+ padding: ${(e=t.theme.sizes)==null?void 0:e.normal};
74
+ border-radius: ${t.theme.borderRadius};
75
+ font-family: ${(n=t.theme.fonts)==null?void 0:n.type};
76
+ font-size: ${(s=t.theme.fonts)==null?void 0:s.normal};
77
+ `},Kr=t=>{var o;const{primaryColor:e,secondaryColor:n,active:s,theme:r,disabled:i}=t;return k.css`
78
+ ${nn(t)}
79
+ border: 1px solid ${s?n:e};
80
+ background-color: ${s?e:n};
81
+
82
+ color: ${s?n:e};
83
+ transition: background-color 200ms ease-out, color 200ms ease-out;
84
+
85
+ span,
86
+ i,
87
+ p,
88
+ a {
89
+ transition: color 200ms ease-out;
90
+ color: ${s?n:e};
91
+ font-size: ${(o=r.fonts)==null?void 0:o.normal};
92
+ }
93
+
94
+ ${!i&&k.css`
95
+ &:hover {
96
+ background-color: ${e};
97
+ color: ${n};
98
+
99
+ span,
100
+ i,
101
+ p,
102
+ a {
103
+ color: ${n};
104
+ }
105
+ }
106
+
107
+ &:focus-visible {
108
+ ${_(t)};
109
+ }
110
+ `}
111
+ `},_=t=>{var e,n,s;return k.css`
112
+ outline: ${(e=t.theme.accessibility)==null?void 0:e.border};
113
+ color: ${(s=(n=t.theme.accessibility)==null?void 0:n.colors)==null?void 0:s.inactiveText};
114
+ border-color: transparent;
115
+ `},Kn=t=>k.css`
116
+ ${_(t)}
117
+ text-decoration: underline;
118
+ `,Gn=t=>{var e;return k.css`
119
+ ${_(t)}
120
+ outline-offset: ${(e=t.theme.sizes)==null?void 0:e.small};
121
+ `},Yn=b(te)`
122
+ position: absolute;
123
+ top: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
124
+ right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
125
+ z-index: 1;
126
+
127
+ svg {
128
+ stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
129
+ }
130
+
131
+ &:focus-visible {
132
+ ${_}
133
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
134
+ height: 15px;
135
+ box-sizing: content-box;
136
+ }
137
+ `,xe=b(lt)`
138
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
139
+ font-weight: normal;
140
+ line-height: 1.2em;
141
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
142
+ `,ut=t=>{var e;return k.css`
143
+ padding: 0;
144
+ margin: 0;
145
+ list-style: none;
146
+ > li {
147
+ margin: 0 0 ${(e=t.theme.sizes)==null?void 0:e.normal};
148
+ white-space: nowrap;
149
+ text-overflow: ellipsis;
150
+ min-width: 0;
151
+ &:focus {
152
+ outline-offset: -2px;
153
+ }
154
+ > a {
155
+ text-decoration: none;
156
+ }
157
+ }
158
+ > li:last-of-type {
159
+ margin: 0;
160
+ }
161
+ `},Gr=t=>{var e,n,s,r;return k.css`
162
+ > div {
163
+ ${be(t)("> h1",k.css`
164
+ margin: 0 0 ${(e=t.theme.sizes)==null?void 0:e.normal};
165
+ font-size: ${(n=t.theme.fonts)==null?void 0:n.medium};
166
+ font-weight: normal;
167
+ line-height: 1.8em;
168
+ color: ${(s=t.theme.colors)==null?void 0:s.text};
169
+ `)}
170
+ }
171
+ > ul {
172
+ ${ut(t)}
173
+ }
174
+ ${be(t)("h1",k.css`
175
+ display: flex;
176
+ align-items: center;
177
+ i {
178
+ margin: 7px ${(r=t.theme.sizes)==null?void 0:r.normal} 0 0;
179
+ width: 24px;
180
+ display: inline-block;
181
+ vertical-align: text-bottom;
182
+ align-self: flex-start;
183
+ min-width: 24px;
184
+ min-height: 24px;
185
+ text-align: center;
186
+ }
187
+ `)}
188
+ `},Yr=t=>{var e,n,s,r,i,o;return k.css`
189
+ font-size: ${(e=t.theme.fonts)==null?void 0:e.normal};
190
+ font-weight: 300;
191
+ line-height: 1.5em;
192
+ color: ${(n=t.theme.colors)==null?void 0:n.text};
193
+
194
+ h1,
195
+ h2,
196
+ h3,
197
+ h4,
198
+ h5,
199
+ h6 {
200
+ word-break: break-word;
201
+ &:first-child {
202
+ margin-top: 0;
203
+ }
204
+ &:only-child {
205
+ margin: 0;
206
+ }
207
+ &:last-child {
208
+ margin-bottom: 0;
209
+ }
210
+ }
211
+
212
+ a {
213
+ color: ${(s=t.theme.colors)==null?void 0:s.link};
214
+ &:focus-visible {
215
+ ${Kn(t)};
216
+ }
217
+ }
218
+
219
+ img {
220
+ max-width: 100% !important;
221
+ height: auto !important;
222
+ }
223
+
224
+ p {
225
+ word-break: break-word;
226
+ margin: ${(r=t.theme.sizes)==null?void 0:r.normal} 0;
227
+ }
228
+
229
+ p:first-child {
230
+ margin: 0 0 ${(i=t.theme.sizes)==null?void 0:i.normal};
231
+ }
232
+
233
+ p:last-child {
234
+ margin: ${(o=t.theme.sizes)==null?void 0:o.normal} 0 0;
235
+ }
236
+
237
+ p:only-child {
238
+ margin: 0;
239
+ }
240
+ `},sn=({elementId:t="humany-portal-elements",parent:e=document.body,children:n})=>{const[s]=p.useState(()=>{const r=document.getElementById(t)||document.createElement("div");return r.id=t,r});return p.useEffect(()=>(e.appendChild(s),()=>{s.childElementCount<=1&&s.remove()}),[s]),Rs.createPortal(n,s)},ke=({text:t="",backgroundSize:e="contain",size:n=12,symbol:s={content:"",type:""},elementStyle:r={},className:i,...o})=>{const{type:a,content:c}=s,u={"aria-label":t,role:"presentation"};switch(a){case"Uri":{const l={backgroundSize:e,backgroundImage:`url('${c}')`,backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundAttachment:"center"};return h.jsx("i",{className:N(i,"humany-icon","humany-custom-icon"),title:t,style:{...l,...r},...u,...o})}case"Svg":{const l={className:N(i,"humany-icon"),width:`${n}`,fill:"none",xmlns:"http://www.w3.org/2000/svg",...o,ref:null},d={minWidth:`${n}`};switch(c){case"search":return h.jsxs("svg",{viewBox:"0 0 32 30",...l,children:[h.jsx("circle",{cx:"14.8457",cy:"14.5175",r:"8.14359",transform:"rotate(45 14.8457 14.5175)"}),h.jsx("line",{x1:"21.1001",y1:"20.4865",x2:"26.5798",y2:"25.9661"})]});case"clear":return h.jsxs("svg",{viewBox:"0 0 27 27",...l,children:[h.jsx("circle",{cx:"13.4351",cy:"13.435",r:"9",transform:"rotate(45 13.4351 13.435)",stroke:"black"}),h.jsx("line",{x1:"16.6172",y1:"10.2531",x2:"10.2533",y2:"16.6171",stroke:"black"}),h.jsx("line",{x1:"16.6171",y1:"16.617",x2:"10.2532",y2:"10.2531",stroke:"black"})]});case"close":return h.jsxs("svg",{viewBox:"0 0 13 13",...l,children:[h.jsx("path",{d:"M12.3068 0.50647L1.27246 11.7273",stroke:"black"}),h.jsx("path",{d:"M12.2812 11.9473L1.24686 0.726451",stroke:"black"})]});case"caret-right":return h.jsxs("svg",{viewBox:"0 0 14 14",style:d,...l,children:[h.jsx("line",{x1:"4.13",y1:"1.05",x2:"10.13",y2:"7.05",stroke:"black"}),h.jsx("line",{x1:"10.13",y1:"6.95",x2:"4.13",y2:"12.95",stroke:"black"})]});case"caret-left":return h.jsxs("svg",{viewBox:"0 0 14 14",style:d,...l,children:[h.jsx("line",{x1:"10.13",y1:"12.95",x2:"4.13",y2:"6.95",stroke:"black"}),h.jsx("line",{x1:"4.13",y1:"7.05",x2:"10.13",y2:"1.05",stroke:"black"})]});case"caret-up":return h.jsxs(Qr,{viewBox:"0 0 14 14",style:d,...l,children:[h.jsx("line",{x1:"13.09",y1:"3.99",x2:"7.1",y2:"9.99",stroke:"black"}),h.jsx("line",{x1:"7.19",y1:"9.99",x2:"1.19",y2:"3.99",stroke:"black"})]});case"caret-down":return h.jsxs("svg",{viewBox:"0 0 14 14",style:d,...l,children:[h.jsx("line",{x1:"13.09",y1:"3.99",x2:"7.1",y2:"9.99",stroke:"black"}),h.jsx("line",{x1:"7.19",y1:"9.99",x2:"1.19",y2:"3.99",stroke:"black"})]});case"back":return h.jsxs("svg",{viewBox:"0 0 18 18",...l,children:[h.jsx("line",{y1:"-0.5",x2:"11.724",y2:"-0.5",transform:"matrix(-0.682355 -0.731021 0.682355 -0.731021 13 16.9999)",stroke:"white"}),h.jsx("line",{y1:"-0.5",x2:"11.724",y2:"-0.5",transform:"matrix(0.682355 -0.731021 0.682355 0.731021 5 9.5705)",stroke:"white"})]});case"alert":return h.jsxs("svg",{viewBox:"0 0 19 19",...l,children:[h.jsx("circle",{cx:"9.5",cy:"9.5",r:"9.5",fill:"#CA0813"}),h.jsx("path",{d:"M10.36 4.878V8.882C10.36 9.30667 10.339 9.72433 10.297 10.135C10.255 10.541 10.199 10.9727 10.129 11.43H8.96C8.89 10.9727 8.834 10.541 8.792 10.135C8.75 9.72433 8.729 9.30667 8.729 8.882V4.878H10.36ZM8.463 14.048C8.463 13.9033 8.48867 13.7657 8.54 13.635C8.596 13.5043 8.67067 13.3923 8.764 13.299C8.862 13.2057 8.97633 13.131 9.107 13.075C9.23767 13.019 9.37767 12.991 9.527 12.991C9.67167 12.991 9.80933 13.019 9.94 13.075C10.0707 13.131 10.1827 13.2057 10.276 13.299C10.3693 13.3923 10.444 13.5043 10.5 13.635C10.556 13.7657 10.584 13.9033 10.584 14.048C10.584 14.1973 10.556 14.3373 10.5 14.468C10.444 14.594 10.3693 14.7037 10.276 14.797C10.1827 14.8903 10.0707 14.9627 9.94 15.014C9.80933 15.07 9.67167 15.098 9.527 15.098C9.37767 15.098 9.23767 15.07 9.107 15.014C8.97633 14.9627 8.862 14.8903 8.764 14.797C8.67067 14.7037 8.596 14.594 8.54 14.468C8.48867 14.3373 8.463 14.1973 8.463 14.048Z",fill:"white"})]});case"send":return h.jsx("svg",{viewBox:"0 0 20 17",...l,children:h.jsx("path",{d:"M18.95 8.56428L0.949951 0.941406V7.02531L13.6351 8.47059L0.950001 9.92276L0.949951 15.9414L18.95 8.56428Z",fill:"#A6A6A6",stroke:"#A6A6A6",strokeWidth:"0.1"})});case"chat":return h.jsxs("svg",{viewBox:"-2 -3 40 40",...l,children:[h.jsx("path",{strokeWidth:"0",fillRule:"evenodd",clipRule:"evenodd",d:"M16.9799 34C21.2676 34 25.1841 32.4256 28.1725 29.8285L34.9534 32.1994C35.7991 32.4951 36.553 31.5778 36.0892 30.8173L32.2559 24.5317C33.3474 22.3103 33.9598 19.8153 33.9598 17.1786C33.9598 7.88838 26.3576 0.357178 16.9799 0.357178C7.60216 0.357178 0 7.88838 0 17.1786C0 26.4688 7.60216 34 16.9799 34ZM30.7031 24.565C31.9094 22.3701 32.5948 19.8536 32.5948 17.1786C32.5948 8.6352 25.6038 1.70942 16.9799 1.70942C8.35601 1.70942 1.36498 8.6352 1.36498 17.1786C1.36498 25.722 8.35601 32.6478 16.9799 32.6478C21.1946 32.6478 25.0193 30.9935 27.8285 28.3047L34.3975 30.5798L30.7031 24.565Z",fill:"currentColor"}),h.jsx("path",{strokeWidth:"0",d:"M12.9395 17.1786C12.9395 18.6079 11.7809 19.7665 10.3516 19.7665C8.92237 19.7665 7.76373 18.6079 7.76373 17.1786C7.76373 15.7493 8.92237 14.5907 10.3516 14.5907C11.7809 14.5907 12.9395 15.7493 12.9395 17.1786Z",fill:"currentColor"}),h.jsx("path",{strokeWidth:"0",d:"M19.4093 17.1786C19.4093 18.6079 18.2507 19.7665 16.8214 19.7665C15.3921 19.7665 14.2335 18.6079 14.2335 17.1786C14.2335 15.7493 15.3921 14.5907 16.8214 14.5907C18.2507 14.5907 19.4093 15.7493 19.4093 17.1786Z",fill:"currentColor"}),h.jsx("path",{strokeWidth:"0",d:"M25.8791 17.1786C25.8791 18.6079 24.7204 19.7665 23.2912 19.7665C21.8619 19.7665 20.7033 18.6079 20.7033 17.1786C20.7033 15.7493 21.8619 14.5907 23.2912 14.5907C24.7204 14.5907 25.8791 15.7493 25.8791 17.1786Z",fill:"currentColor"})]});case"chat-new":return h.jsxs("svg",{viewBox:"0 0 26 24",...l,children:[h.jsx("path",{d:"M22.1109 10.3813C22.3941 10.2876 22.6674 10.1722 22.9288 10.0371C23.1902 10.9797 23.33 11.9734 23.33 13C23.33 19.0751 18.4348 24 12.3962 24C9.6352 24 7.11325 22.9705 5.18893 21.2721L0.82251 22.8226C0.277922 23.0159 -0.207515 22.4161 0.0911259 21.9188L2.55952 17.8084C1.85665 16.3558 1.46233 14.7242 1.46233 13C1.46233 6.92487 6.35758 2 12.3962 2C13.4013 2 14.3747 2.13645 15.2992 2.39193C15.1628 2.65458 15.0464 2.92925 14.9519 3.21394C14.1358 2.99881 13.2793 2.88427 12.3962 2.88427C6.84301 2.88427 2.34128 7.41324 2.34128 13C2.34128 14.7493 2.78263 16.3949 3.5594 17.8302L1.18047 21.7634L5.41046 20.2757C7.21939 22.034 9.68221 23.1157 12.3962 23.1157C17.9493 23.1157 22.451 18.5868 22.451 13C22.451 12.0944 22.3328 11.2165 22.1109 10.3813Z",fill:"currentColor"}),h.jsx("path",{d:"M25.6633 4C25.6633 6.20914 23.8724 8 21.6633 8C19.4541 8 17.6633 6.20914 17.6633 4C17.6633 1.79086 19.4541 0 21.6633 0C23.8724 0 25.6633 1.79086 25.6633 4Z",fill:"currentColor"})]});case"agent":return h.jsxs("svg",{viewBox:"0 0 36 30",...l,children:[h.jsx("path",{d:"M0.900024 15.3887C0.900024 12.9034 2.91474 10.8887 5.40002 10.8887H6.28179V20.0995H5.40002C2.91474 20.0995 0.900024 18.0848 0.900024 15.5995V15.3887Z",stroke:"white"}),h.jsx("path",{d:"M34.65 15.5996C34.65 18.0849 32.6353 20.0996 30.15 20.0996L29.2683 20.0996L29.2683 10.8888L30.15 10.8888C32.6353 10.8888 34.65 12.9035 34.65 15.3888L34.65 15.5996Z",stroke:"white"}),h.jsx("path",{d:"M29.2565 20.5974C29.2565 26.341 22.8747 26.9792 19.6838 26.9792",stroke:"white"}),h.jsx("circle",{cx:"17.4074",cy:"26.9795",r:"2.05271",stroke:"white"}),h.jsx("path",{d:"M6.28467 12.9396C6.28467 11.195 6.28686 18.0452 6.28467 8.47234C6.28248 -1.10049 29.2591 -1.10047 29.259 8.47234C29.259 18.0452 29.2569 11.6631 29.259 12.9396",stroke:"white"})]});case"minimize":return h.jsx("svg",{viewBox:"0 -10 22 22",...l,children:h.jsx("path",{d:"M0 1H22",stroke:"white"})});case"sorting":return h.jsx("svg",{viewBox:"0 0 18 14",...l,children:h.jsx("path",{d:"M18 1H0M8 13H0M13 7H0"})});case"copy":return h.jsxs("svg",{viewBox:"0 0 19 17",...l,children:[h.jsx("rect",{x:"0.5",y:"0.5",width:"11.6667",height:"11.6014",rx:"1.5",fill:"white"}),h.jsx("rect",{x:"6.83301",y:"4.89868",width:"11.6667",height:"11.6014",rx:"1.5",fill:"white"})]});case"print":return h.jsxs("svg",{viewBox:"0 0 16 17",...l,children:[h.jsx("path",{d:"M4.31592 0.999999C4.31592 0.723857 4.53977 0.5 4.81592 0.5H11.1845C11.4606 0.5 11.6845 0.723858 11.6845 1V4.53323H4.31592V0.999999Z",fill:"white",stroke:"black"}),h.jsx("path",{d:"M0.5 4.84595C0.5 4.56981 0.723858 4.34595 1 4.34595H15C15.2761 4.34595 15.5 4.5698 15.5 4.84595V10.8399C15.5 11.116 15.2761 11.3399 15 11.3399H1C0.723858 11.3399 0.5 11.116 0.5 10.8399V4.84595Z",fill:"white",stroke:"black"}),h.jsx("path",{d:"M4.31592 10.0061C4.31592 9.72996 4.53978 9.5061 4.81592 9.5061H11.1845C11.4606 9.5061 11.6845 9.72996 11.6845 10.0061V16.0001C11.6845 16.2762 11.4606 16.5001 11.1845 16.5001H4.81592C4.53978 16.5001 4.31592 16.2762 4.31592 16.0001V10.0061Z",fill:"white",stroke:"black"}),h.jsx("line",{x1:"5.29004",y1:"10.8323",x2:"10.7101",y2:"10.8323",stroke:"black"}),h.jsx("line",{x1:"5.29004",y1:"12.5242",x2:"10.7101",y2:"12.5242",stroke:"black"}),h.jsx("line",{x1:"5.29004",y1:"14.2161",x2:"10.7101",y2:"14.2161",stroke:"black"})]});case"language":return h.jsx("svg",{viewBox:"0 0 19 19",...l,children:h.jsx("path",{d:"M9.5 18C14.1944 18 18 14.1944 18 9.5C18 4.80558 14.1944 1 9.5 1M9.5 18C4.80558 18 1 14.1944 1 9.5C1 4.80558 4.80558 1 9.5 1M9.5 18C11.823 18 13.7062 14.1944 13.7062 9.5C13.7062 4.80558 11.823 1 9.5 1M9.5 18C7.17699 18 5.29381 14.1944 5.29381 9.5C5.29381 4.80558 7.17699 1 9.5 1M1.44333 6.78351H17.4742M1.3088 11.7784H17.6912",stroke:"black"})});case"information":return h.jsxs("svg",{viewBox:"0 0 17 17",...l,children:[h.jsx("path",{d:"M9.72182 5.99993C10.0524 5.99993 10.3203 5.73198 10.3203 5.40145C10.3203 5.07092 10.0524 4.80297 9.72182 4.80297C9.39129 4.80297 9.12335 5.07092 9.12335 5.40145C9.12335 5.73198 9.39129 5.99993 9.72182 5.99993Z",fill:"black"}),h.jsx("path",{d:"M7.21887 6.67639C6.89117 6.71981 6.66072 7.02066 6.70414 7.34836C6.74756 7.67605 7.04841 7.9065 7.3761 7.86308L8.353 7.73364L7.17405 11.3945C7.11289 11.5844 7.15164 11.7825 7.26117 11.932C7.38068 12.1287 7.60875 12.2469 7.85155 12.2147L9.40669 12.0087C9.73436 11.9653 9.96479 11.6645 9.92137 11.3368C9.87795 11.0091 9.57713 10.7787 9.24947 10.8221L8.58762 10.9098L9.76774 7.24534C9.83038 7.05084 9.78821 6.84771 9.67254 6.69702C9.55085 6.50877 9.32791 6.39694 9.09093 6.42834L7.21887 6.67639Z",fill:"black"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17 8.5C17 13.1944 13.1944 17 8.5 17C3.80558 17 0 13.1944 0 8.5C0 3.80558 3.80558 0 8.5 0C13.1944 0 17 3.80558 17 8.5ZM16 8.5C16 12.8454 12.8454 16 8.5 16C4.15461 16 1 12.8454 1 8.5C1 4.15461 4.15461 1 8.5 1C12.8454 1 16 4.15461 16 8.5Z",fill:"black"})]});case"options":return h.jsxs("svg",{viewBox:"0 0 16 2",...l,children:[h.jsx("circle",{cx:"15",cy:"1",r:"1",transform:"rotate(90 15 1)",fill:"black"}),h.jsx("circle",{cx:"1",cy:"1",r:"1",transform:"rotate(90 1 1)",fill:"black"}),h.jsx("circle",{cx:"8",cy:"1",r:"1",transform:"rotate(90 8 1)",fill:"black"})]});case"browse":return h.jsxs("svg",{viewBox:"0 0 24 24",...l,children:[h.jsx("circle",{cx:"12",cy:"12",r:"12",fill:"currentColor"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16663 7.33334C6.16663 6.68901 6.68896 6.16667 7.33329 6.16667H10.25C10.8943 6.16667 11.4166 6.68901 11.4166 7.33334V10.25C11.4166 10.8943 10.8943 11.4167 10.25 11.4167H7.33329C6.68896 11.4167 6.16663 10.8943 6.16663 10.25V7.33334ZM7.33329 7.04167H10.25C10.411 7.04167 10.5416 7.17226 10.5416 7.33334V10.25C10.5416 10.4111 10.411 10.5417 10.25 10.5417H7.33329C7.17221 10.5417 7.04163 10.4111 7.04163 10.25V7.33334C7.04163 7.17226 7.17221 7.04167 7.33329 7.04167Z",fill:"white"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.16663 13.75C6.16663 13.1057 6.68896 12.5833 7.33329 12.5833H10.25C10.8943 12.5833 11.4166 13.1057 11.4166 13.75V16.6667C11.4166 17.311 10.8943 17.8333 10.25 17.8333H7.33329C6.68896 17.8333 6.16663 17.311 6.16663 16.6667V13.75ZM7.33329 13.4583H10.25C10.411 13.4583 10.5416 13.5889 10.5416 13.75V16.6667C10.5416 16.8278 10.411 16.9583 10.25 16.9583H7.33329C7.17221 16.9583 7.04163 16.8278 7.04163 16.6667V13.75C7.04163 13.5889 7.17221 13.4583 7.33329 13.4583Z",fill:"white"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.75 6.16667C13.1056 6.16667 12.5833 6.68901 12.5833 7.33334V10.25C12.5833 10.8943 13.1056 11.4167 13.75 11.4167H16.6666C17.311 11.4167 17.8333 10.8943 17.8333 10.25V7.33334C17.8333 6.68901 17.311 6.16667 16.6666 6.16667H13.75ZM16.6666 7.04167H13.75C13.5889 7.04167 13.4583 7.17226 13.4583 7.33334V10.25C13.4583 10.4111 13.5889 10.5417 13.75 10.5417H16.6666C16.8277 10.5417 16.9583 10.4111 16.9583 10.25V7.33334C16.9583 7.17226 16.8277 7.04167 16.6666 7.04167Z",fill:"white"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.8333 15.2083C17.8333 16.6581 16.658 17.8333 15.2083 17.8333C13.7585 17.8333 12.5833 16.6581 12.5833 15.2083C12.5833 13.7586 13.7585 12.5833 15.2083 12.5833C16.658 12.5833 17.8333 13.7586 17.8333 15.2083ZM16.9583 15.2083C16.9583 16.1748 16.1748 16.9583 15.2083 16.9583C14.2418 16.9583 13.4583 16.1748 13.4583 15.2083C13.4583 14.2418 14.2418 13.4583 15.2083 13.4583C16.1748 13.4583 16.9583 14.2418 16.9583 15.2083Z",fill:"white"})]});case"video":return d.minWidth&&typeof d.minWidth=="number"&&(d.minWidth=`${d.minWidth}px`),h.jsxs("svg",{viewBox:"0 0 25 25",...l,style:d,children:[h.jsx("path",{d:"M16.8245 10.0758C18.7392 8.55799 21.3085 7.08973 21.7947 7.61552C22.5982 8.47863 22.5288 16.6929 21.7947 17.4766C21.3482 17.9627 18.7589 16.4945 16.8245 14.9866",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.61914 12.5385C2.61914 7.12973 4.41578 5.32715 9.80764 5.32715C15.1985 5.32715 16.9952 7.12973 16.9952 12.5385C16.9952 17.9462 15.1985 19.7497 9.80764 19.7497C4.41578 19.7497 2.61914 17.9462 2.61914 12.5385Z",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]});case"star-empty":return h.jsx("svg",{viewBox:"0 0 13 12",...l,children:h.jsx("path",{d:"M2 5.2767L5.11944 4.81796L6.70023 2L7.96487 4.81796L11 5.51699L8.75527 7.64684L9.18735 11L6.42623 9.40534L3.62295 10.7925L4.21311 7.64684L2 5.2767Z",stroke:"black"})});case"star-filled":return h.jsx("svg",{viewBox:"0 0 13 12",...l,children:h.jsx("path",{d:"M2 5.2767L5.11944 4.81796L6.70023 2L7.96487 4.81796L11 5.51699L8.75527 7.64684L9.18735 11L6.42623 9.40534L3.62295 10.7925L4.21311 7.64684L2 5.2767Z",fill:"black",stroke:"black"})});case"cog-wheel":return h.jsx("svg",{viewBox:"0 0 24 24",...l,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.273 2.68498V1C15.273 0.447715 14.8253 0 14.273 0H9.72754C9.17525 0 8.72754 0.447715 8.72754 1V2.6852C8.72754 3.20708 8.09656 3.46843 7.72754 3.09941L6.53588 1.90775C6.14536 1.51723 5.51219 1.51723 5.12167 1.90775L1.90755 5.12187C1.51702 5.5124 1.51702 6.14556 1.90755 6.53609L3.09865 7.72719C3.46767 8.09621 3.20632 8.72719 2.68444 8.72719H1C0.447715 8.72719 0 9.1749 0 9.72719V14.2726C0 14.8249 0.447715 15.2726 1 15.2726H2.68534C3.20722 15.2726 3.46857 15.9036 3.09955 16.2726L1.90793 17.4643C1.51741 17.8548 1.51741 18.488 1.90793 18.8785L5.12205 22.0926C5.51258 22.4831 6.14574 22.4831 6.53627 22.0926L7.72754 20.9013C8.09656 20.5323 8.72754 20.7937 8.72754 21.3155V23C8.72754 23.5523 9.17525 24 9.72754 24H14.273C14.8253 24 15.273 23.5523 15.273 23V21.3158C15.273 20.7939 15.904 20.5325 16.273 20.9015L17.4639 22.0924C17.8544 22.483 18.4876 22.483 18.8781 22.0924L22.0922 18.8783C22.4828 18.4878 22.4828 17.8546 22.0922 17.4641L20.9008 16.2726C20.5317 15.9036 20.7931 15.2726 21.315 15.2726H23C23.5523 15.2726 24 14.8249 24 14.2726V9.72719C24 9.1749 23.5523 8.72719 23 8.72719H21.3159C20.794 8.72719 20.5326 8.09621 20.9017 7.72719L22.0926 6.53625C22.4831 6.14572 22.4831 5.51256 22.0926 5.12203L18.8785 1.90791C18.488 1.51739 17.8548 1.51739 17.4643 1.90791L16.273 3.0992C15.904 3.46822 15.273 3.20686 15.273 2.68498ZM16.5792 4.20716C16.263 4.52345 15.7775 4.58532 15.3687 4.40375C15.2439 4.34832 15.1174 4.29587 14.9895 4.2465C14.5723 4.08555 14.273 3.69861 14.273 3.25149V2C14.273 1.44771 13.8253 1 13.273 1H10.7275C10.1753 1 9.72754 1.44772 9.72754 2V3.25116C9.72754 3.69832 9.42816 4.08528 9.01096 4.2462C8.88288 4.29561 8.75633 4.34809 8.6314 4.40357C8.22262 4.58511 7.73715 4.52323 7.42087 4.20695L6.53588 3.32196C6.14536 2.93144 5.51219 2.93144 5.12167 3.32196L3.32176 5.12187C2.93124 5.5124 2.93124 6.14556 3.32176 6.53609L4.20676 7.42109C4.52303 7.73736 4.58491 8.22283 4.40338 8.63161C4.34797 8.75638 4.29555 8.88276 4.2462 9.01067C4.08526 9.42784 3.69831 9.72719 3.25118 9.72719H2C1.44772 9.72719 1 10.1749 1 10.7272V13.2726C1 13.8249 1.44772 14.2726 2 14.2726H3.2511C3.69825 14.2726 4.0852 14.572 4.24614 14.9892C4.29556 15.1173 4.34807 15.2439 4.40357 15.3688C4.58513 15.7776 4.52327 16.2631 4.20698 16.5794L3.32215 17.4643C2.93162 17.8548 2.93162 18.488 3.32215 18.8785L5.12205 20.6784C5.51258 21.0689 6.14574 21.0689 6.53627 20.6784L7.42136 19.7933C7.73762 19.477 8.22305 19.4151 8.63183 19.5966C8.75662 19.6521 8.88302 19.7045 9.01096 19.7538C9.42816 19.9147 9.72754 20.3017 9.72754 20.7489V22C9.72754 22.5523 10.1753 23 10.7275 23H13.273C13.8253 23 14.273 22.5523 14.273 22V20.7485C14.273 20.3014 14.5723 19.9145 14.9895 19.7535C15.1173 19.7042 15.2436 19.6518 15.3682 19.5965C15.777 19.4149 16.2625 19.4768 16.5788 19.7931L17.4639 20.6782C17.8544 21.0687 18.4876 21.0687 18.8781 20.6782L20.678 18.8783C21.0685 18.4878 21.0685 17.8546 20.678 17.4641L19.7929 16.579C19.4766 16.2627 19.4147 15.7772 19.5963 15.3684C19.6517 15.2436 19.7042 15.1172 19.7535 14.9892C19.9145 14.572 20.3014 14.2726 20.7486 14.2726H22C22.5523 14.2726 23 13.8249 23 13.2726V10.7272C23 10.1749 22.5523 9.72719 22 9.72719H20.7485C20.3013 9.72719 19.9144 9.42784 19.7535 9.01067C19.7042 8.8829 19.6518 8.75665 19.5965 8.63201C19.415 8.22324 19.4768 7.7378 19.7931 7.42154L20.6784 6.53625C21.0689 6.14572 21.0689 5.51256 20.6784 5.12203L18.8785 3.32213C18.488 2.9316 17.8548 2.9316 17.4643 3.32213L16.5792 4.20716ZM16.5999 12.0001C16.5999 14.5406 14.5404 16.6001 11.9999 16.6001C9.45939 16.6001 7.3999 14.5406 7.3999 12.0001C7.3999 9.45958 9.45939 7.40009 11.9999 7.40009C14.5404 7.40009 16.5999 9.45958 16.5999 12.0001ZM17.5999 12.0001C17.5999 15.0929 15.0927 17.6001 11.9999 17.6001C8.90711 17.6001 6.3999 15.0929 6.3999 12.0001C6.3999 8.90729 8.90711 6.40009 11.9999 6.40009C15.0927 6.40009 17.5999 8.90729 17.5999 12.0001Z",fill:"black"})});case"zoom-in":return h.jsxs("svg",{viewBox:"0 0 24 24",...l,children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21.9774 20.8287L17.9149 16.7662C17.8437 16.6957 17.76 16.639 17.668 16.5992C20.7612 12.9331 20.415 7.48045 16.883 4.23507C13.3509 0.989694 7.88848 1.10517 4.49673 4.49691C1.10499 7.88866 0.98951 13.3511 4.23489 16.8831C7.48027 20.4152 12.9329 20.7614 16.599 17.6682C16.6388 17.7601 16.6955 17.8439 16.766 17.9151L20.8285 21.9776C21.1457 22.2948 21.6601 22.2948 21.9774 21.9776C22.2947 21.6603 22.2947 21.1459 21.9774 20.8287ZM10.8404 18.1531C6.80186 18.1531 3.52794 14.8792 3.52794 10.8406C3.52794 6.80204 6.80186 3.52813 10.8404 3.52813C14.879 3.52813 18.1529 6.80204 18.1529 10.8406C18.1483 14.8773 14.8771 18.1484 10.8404 18.1531Z",fill:"white"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.8749 6.75003C11.2892 6.75003 11.6249 7.08581 11.6249 7.50003V14.25C11.6249 14.6642 11.2892 15 10.8749 15C10.4607 15 10.1249 14.6642 10.1249 14.25V7.50003C10.1249 7.08581 10.4607 6.75003 10.8749 6.75003Z",fill:"white"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.74994 10.875C6.74994 10.4608 7.08573 10.125 7.49994 10.125H14.2499C14.6642 10.125 14.9999 10.4608 14.9999 10.875C14.9999 11.2892 14.6642 11.625 14.2499 11.625H7.49994C7.08573 11.625 6.74994 11.2892 6.74994 10.875Z",fill:"white"})]});case"zoom-out":return h.jsxs("svg",{viewBox:"0 0 24 24",...l,children:[h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.1025 20.9536L18.04 16.8911C17.9688 16.8206 17.8851 16.764 17.7931 16.7241C20.8864 13.0581 20.5401 7.60539 17.0081 4.36001C13.476 1.11463 8.0136 1.23011 4.62185 4.62185C1.23011 8.0136 1.11463 13.476 4.36001 17.0081C7.60539 20.5401 13.0581 20.8864 16.7241 17.7931C16.764 17.8851 16.8206 17.9688 16.8911 18.04L20.9536 22.1025C21.2709 22.4198 21.7853 22.4198 22.1025 22.1025C22.4198 21.7853 22.4198 21.2709 22.1025 20.9536ZM10.9656 18.2781C6.92698 18.2781 3.65306 15.0041 3.65306 10.9656C3.65306 6.92698 6.92698 3.65306 10.9656 3.65306C15.0041 3.65306 18.2781 6.92698 18.2781 10.9656C18.2734 15.0022 15.0022 18.2734 10.9656 18.2781Z",fill:"white"}),h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.87506 11C6.87506 10.5858 7.21085 10.25 7.62506 10.25H14.3751C14.7893 10.25 15.1251 10.5858 15.1251 11C15.1251 11.4142 14.7893 11.75 14.3751 11.75H7.62506C7.21085 11.75 6.87506 11.4142 6.87506 11Z",fill:"white"})]});case"download":return h.jsx("svg",{viewBox:"0 0 24 24",...l,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.5 11.1346V18.4038C22.498 20.1873 21.0527 21.6326 19.2692 21.6346H4.73077C2.94731 21.6326 1.50204 20.1873 1.5 18.4038V11.1346C1.5 10.6885 1.86162 10.3269 2.30769 10.3269C2.75377 10.3269 3.11538 10.6885 3.11538 11.1346V18.4038C3.1164 19.2956 3.83904 20.0182 4.73077 20.0192H19.2692C20.161 20.0182 20.8836 19.2956 20.8846 18.4038V11.1346C20.8846 10.6885 21.2462 10.3269 21.6923 10.3269C22.1384 10.3269 22.5 10.6885 22.5 11.1346ZM11.1434 16.2663C11.6167 16.7388 12.3832 16.7388 12.8565 16.2663L17.4172 11.7057C17.7326 11.3903 17.7326 10.8789 17.4172 10.5635C17.1018 10.2481 16.5904 10.2481 16.275 10.5635L12.8076 14.0308V3.05769C12.8076 2.61162 12.446 2.25 11.9999 2.25C11.5539 2.25 11.1923 2.61162 11.1923 3.05769V14.0308L7.72485 10.5636C7.40946 10.2482 6.89812 10.2482 6.58273 10.5636C6.26734 10.8789 6.26734 11.3903 6.58273 11.7057L11.1434 16.2663Z",fill:"white"})});case"lightbox-close":return h.jsx("svg",{viewBox:"0 0 24 24",...l,children:h.jsx("path",{xmlns:"http://www.w3.org/2000/svg",fillRule:"evenodd",clipRule:"evenodd",d:"M19.2621 18.1129C19.4674 18.3182 19.5475 18.6173 19.4724 18.8977C19.3973 19.178 19.1783 19.397 18.8979 19.4721C18.6176 19.5472 18.3184 19.4671 18.1132 19.2619L12.1877 13.3363L6.26214 19.2619C6.0569 19.4671 5.75776 19.5472 5.47741 19.4721C5.19705 19.397 4.97807 19.178 4.90294 18.8977C4.82782 18.6173 4.90798 18.3182 5.11321 18.1129L11.0388 12.1874L5.11321 6.26186C4.90798 6.05663 4.82782 5.75749 4.90294 5.47713C4.97807 5.19678 5.19705 4.97779 5.47741 4.90267C5.75776 4.82755 6.0569 4.9077 6.26214 5.11294L12.1877 11.0385L18.1132 5.11294C18.4305 4.79567 18.9449 4.79567 19.2621 5.11294C19.5794 5.4302 19.5794 5.9446 19.2621 6.26186L13.3366 12.1874L19.2621 18.1129Z",fill:"white"})});case"pagination-left":return h.jsx("svg",{viewBox:"0 0 24 24",...l,children:h.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.7935 18.7087C16.0092 18.9029 16.105 19.1974 16.0447 19.4813C15.9844 19.7652 15.7772 19.9954 15.5012 20.0852C15.2251 20.1749 14.9222 20.1105 14.7065 19.9164L6.58148 12.6039C6.41027 12.4498 6.3125 12.2303 6.3125 12C6.3125 11.7697 6.41027 11.5503 6.58148 11.3962L14.7065 4.08372C15.04 3.78354 15.5536 3.81054 15.8538 4.14402C16.154 4.4775 16.127 4.99119 15.7935 5.29136L8.33939 12L15.7935 18.7087Z",fill:"#222222"})});case"pagination-right":return h.jsx("svg",{viewBox:"0 0 24 24",...l,children:h.jsx("path",{d:"M285.476 272.971L91.132 467.314c-9.373 9.373-24.569 9.373-33.941 0l-22.667-22.667c-9.357-9.357-9.375-24.522-.04-33.901L188.505 256 34.484 101.255c-9.335-9.379-9.317-24.544.04-33.901l22.667-22.667c9.373-9.373 24.569-9.373 33.941 0L285.475 239.03c9.373 9.372 9.373 24.568.001 33.941z"})})}return null}case"FontAwesome":return h.jsx(Xn,{className:i,faIcon:c,title:t,...o});default:case"Text":return t?h.jsx("i",{className:N(i,"humany-letter-symbol"),title:t,...u,...o,children:t.substring(0,2)}):null}},Qr=b.svg`
241
+ transform: rotate(180deg);
242
+ `,Xr={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",p:"p",span:"span"},dt=({variant:t,component:e,className:n,children:s})=>{const{typographyVariantMapping:r={}}=ct(),i={...Xr,...r},o=e||i[t]||"span";return h.jsx(Jr,{className:n,as:o,children:s})},Jr=b.span``,ht=b.div`
243
+ font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
244
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
245
+ position: fixed;
246
+ bottom: 0;
247
+ left: 0;
248
+ border: ${t=>t.theme.border};
249
+ width: 100%;
250
+ box-shadow: ${t=>t.theme.boxShadow};
251
+ background: #ffffff;
252
+ ${t=>t.css&&t.css}
253
+ `;b(dt)`
254
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
255
+ margin: 0;
256
+ text-align: center;
257
+ border-bottom: #eeeeee 1px solid;
258
+ background: #ffffff;
259
+ position: relative;
260
+ display: flex;
261
+ justify-content: center;
262
+ align-items: center;
263
+ font-weight: bold;
264
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
265
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
266
+ line-height: 1.2em;
267
+ `;const ft=t=>k.css`
268
+ transition: ${t.duration}ms;
269
+ `;b(ht)`
270
+ max-height: 0;
271
+ ${ft}
272
+
273
+ &.humany-drawer-transition-enter {
274
+ max-height: 0;
275
+ }
276
+ &.humany-drawer-transition-enter-active,
277
+ &.humany-drawer-transition-enter-done,
278
+ &.humany-drawer-transition-exit {
279
+ max-height: ${t=>t.fullScreen?"100%":"400px"};
280
+ }
281
+
282
+ &.humany-drawer-transition-exit-active,
283
+ &.humany-drawer-transition-exit-done {
284
+ max-height: 0;
285
+ }
286
+ `;b(ht)`
287
+ ${ft}
288
+ transform: translateX(100%);
289
+ height: ${t=>t.fullScreen?"100%":"auto"};
290
+
291
+ &.humany-drawer-transition-enter {
292
+ transform: translateX(100%);
293
+ }
294
+ &.humany-drawer-transition-enter-active,
295
+ &.humany-drawer-transition-enter-done,
296
+ &.humany-drawer-transition-exit {
297
+ transform: translateX(0);
298
+ }
299
+
300
+ &.humany-drawer-transition-exit-active,
301
+ &.humany-drawer-transition-exit-done {
302
+ transform: translateX(100%);
303
+ }
304
+ `;b(ht)`
305
+ ${ft}
306
+ transform: translateX(-100%);
307
+ height: ${t=>t.fullScreen?"100%":"auto"};
308
+
309
+ &.humany-drawer-transition-enter {
310
+ transform: translateX(-100%);
311
+ }
312
+ &.humany-drawer-transition-enter-active,
313
+ &.humany-drawer-transition-enter-done,
314
+ &.humany-drawer-transition-exit {
315
+ transform: translateX(0);
316
+ }
317
+
318
+ &.humany-drawer-transition-exit-active,
319
+ &.humany-drawer-transition-exit-done {
320
+ transform: translateX(-100%);
321
+ }
322
+ `;b(ht)`
323
+ ${ft}
324
+ bottom: unset;
325
+ top: 0;
326
+ height: 0;
327
+
328
+ &.humany-drawer-transition-enter {
329
+ height: 0;
330
+ }
331
+ &.humany-drawer-transition-enter-active,
332
+ &.humany-drawer-transition-enter-done,
333
+ &.humany-drawer-transition-exit {
334
+ height: ${t=>t.clientHeight}px;
335
+ }
336
+
337
+ &.humany-drawer-transition-exit-active,
338
+ &.humany-drawer-transition-exit-done {
339
+ height: 0;
340
+ }
341
+ `;const ei=(t,e,n)=>{const[s,r]=p.useState(0),[i,o]=p.useState(0),a=p.useCallback((c,u)=>{if(c.preventDefault(),u){const l=u.getBoundingClientRect();r(Math.max(document.body.clientWidth-l.right,1)),o(l.bottom+window.scrollY)}},[s,i,r,o]);return p.useEffect(()=>{if(!n||!t)return;const c=n.getBoundingClientRect(),u={x:s,y:i};c.left<0&&(u.x=0),c.bottom>window.innerHeight&&(u.y=0),u.x!==s&&r(u.x),u.y!==i&&o(u.y)},[n,t,e]),[{x:s,y:i},a]};p.forwardRef(({className:t="",children:e=null,trigger:n,closeButtonAriaLabel:s,...r},i)=>{const o=p.useRef(),a=p.useRef(),c=p.useRef();p.useImperativeHandle(i,()=>c.current,[c.current]);const u=p.useRef(Re()),[l,d]=p.useState(!1),f=qn(l),[{x:m,y:v},y]=ei(l,u.current,c.current),g=Oe("Escape");p.useEffect(()=>{g&&d(!1)},[g]),p.useEffect(()=>{l&&o.current?o.current.focus():!l&&a.current&&f&&a.current.focus()},[l,o.current,a.current]),ye("click",j=>{const{target:$}=j;!c.current||!$||c.current!==$&&!c.current.contains($)&&d(!1)},window),tn("router:changed",()=>{d(!1)});const w=Un(u.current,()=>{d(!1)}),C=p.useCallback(j=>{j.stopPropagation(),y(j,a.current),d(!l),w()},[w,y,d]);return h.jsxs(h.Fragment,{children:[l&&h.jsx(sn,{children:h.jsxs(ti,{className:N("humany-dropdown",`humany-dropdown-${u.current}`,t),...r,x:m,y:v,ref:c,children:[h.jsx(Yn,{onClick:()=>d(!1),tabIndex:0,ref:o,"aria-label":s,children:h.jsx(ke,{symbol:{type:"Svg",content:"close"}})}),e]})}),p.cloneElement(n,{onClick:C,ref:a,"aria-label":n.props.title,"aria-expanded":l})]})});const ti=b.div`
342
+ ${Zn}
343
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
344
+ min-width: 150px;
345
+ position: absolute;
346
+ box-shadow: ${t=>t.theme.boxShadow};
347
+
348
+ ${t=>{var n,s,r;let e="";return t.y>0?e+=`top: calc(${((n=t.theme.sizes)==null?void 0:n.small)||"0px"} + ${t.y||"0"}px);`:e+=`bottom: ${((s=t.theme.sizes)==null?void 0:s.normal)||"0px"};`,t.x>0?e+=`right: ${t.x||"0"}px;`:e+=`left: ${((r=t.theme.sizes)==null?void 0:r.normal)||"0px"};`,e}};
349
+ `;b.div`
350
+ display: none;
351
+ `;const Qn=p.forwardRef(({children:t,columns:e,gap:n,className:s,...r},i)=>h.jsx(ni,{className:N(s,"humany-grid"),"data-columns":e,"data-gap":n,...Yt(r),...W(r),ref:i,children:t})),ni=b.div`
352
+ display: grid;
353
+ grid-template-columns: repeat(${t=>t["data-columns"]}, 1fr);
354
+ grid-gap: ${t=>t["data-gap"]};
355
+ justify-content: center;
356
+ grid-auto-rows: max-content;
357
+ ${Tn}
358
+ `,rn=p.forwardRef(({htmlParseInstruction:t=null,className:e,html:n,...s},r)=>{const i=q(),[o,a]=p.useState();return p.useEffect(()=>{const c=zr(i,n),u={...c,...t,transform:{...c.transform,...t==null?void 0:t.transform}},l=Tr(n,u);a(l)},[n,t]),h.jsx("div",{className:N(e,"humany-html"),...W(s),ref:r,children:o})}),Xn=({faIcon:t,title:e,className:n="",role:s="presentation",...r})=>h.jsx("i",{className:N(n,`fa fa-${t}`),title:e,role:s,...W(r)}),si=p.forwardRef(({className:t="",autoFocus:e=!1,onFocusChange:n=()=>{},onEnter:s=()=>{},onEscape:r=()=>{},selectAllOnFocus:i,onChange:o=()=>{},disabled:a=!1,type:c,...u},l)=>{const[d,f]=p.useState(e),m=p.useRef();p.useImperativeHandle(l,()=>m.current),p.useEffect(()=>{var g;e&&((g=m==null?void 0:m.current)==null||g.focus())},[e,l,m]);const v=(g,w)=>{f(g),n&&n(g),i&&g&&w.target.select()},y={...W(u),disabled:a,autoFocus:e,type:c,onKeyDown:g=>{g.key==="Enter"&&d&&s(g),g.key==="Escape"&&d&&r(g)},onFocus:g=>v(!0,g),onBlur:g=>v(!1,g),onChange:g=>o(g.target.value||""),className:N(t,"humany-input"),"data-type":c};return c!=="textarea"?h.jsx("input",{...y,ref:m}):h.jsx("textarea",{...y,ref:m})}),pt=p.forwardRef(({className:t,items:e,renderItem:n,renderLi:s=!1,...r},i)=>h.jsx("ul",{className:N(t,"humany-list"),"data-item-count":e.length,...W(r),ref:i,children:e.map((o,a,c)=>s?h.jsx("li",{className:"humany-list-item",children:n(o,a,c)},o.id||a):n(o,a,c))})),Jn=p.forwardRef(({text:t,html:e,header:n,className:s,htmlParseInstruction:r,symbol:i,...o},a)=>h.jsxs("div",{className:N(s,"humany-paragraph"),...W(o),ref:a,children:[n?h.jsxs(dt,{variant:"h1",children:[i?h.jsx(ke,{symbol:i}):null,n]}):null,e?h.jsx(rn,{html:e,htmlParseInstruction:r}):null,t?h.jsx(lt,{children:t}):null]})),ri=p.forwardRef(({header:t,customHeader:e,text:n,html:s,className:r,children:i,symbol:o,items:a,renderItem:c,renderLi:u,ulProps:l,...d},f)=>h.jsxs("div",{className:N(r,"humany-item-list"),"data-item-count":a.length,...W(d),ref:f,children:[e||(t||n||s?h.jsx(Jn,{symbol:o,header:t,text:n,html:s}):null),a.length?h.jsx(pt,{items:a,renderItem:c,renderLi:u,...l}):null,i]}));var es=function(){};process.env.NODE_ENV!=="production"&&(es=function(t,e,n){var s=arguments.length;n=new Array(s>2?s-2:0);for(var r=2;r<s;r++)n[r-2]=arguments[r];if(e===void 0)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(e.length<10||/^[s\W]*$/.test(e))throw new Error("The warning format should be able to uniquely identify this warning. Please, use a more descriptive format than: "+e);if(!t){var i=0,o="Warning: "+e.replace(/%s/g,function(){return n[i++]});typeof console<"u"&&console.error(o);try{throw new Error(o)}catch{}}});var ts=es;const ii=Qt(ts);var oi=ts,$n=ai(oi);function ai(t){return t&&t.__esModule?t:{default:t}}var ci=function(){var e=null,n=function(c){return(0,$n.default)(e==null,"A history supports only one prompt at a time"),e=c,function(){e===c&&(e=null)}},s=function(c,u,l,d){if(e!=null){var f=typeof e=="function"?e(c,u):e;typeof f=="string"?typeof l=="function"?l(f,d):((0,$n.default)(!1,"A history needs a getUserConfirmation function in order to use a prompt message"),d(!0)):d(f!==!1)}else d(!0)},r=[],i=function(c){var u=!0,l=function(){u&&c.apply(void 0,arguments)};return r.push(l),function(){u=!1,r=r.filter(function(d){return d!==l})}},o=function(){for(var c=arguments.length,u=Array(c),l=0;l<c;l++)u[l]=arguments[l];r.forEach(function(d){return d.apply(void 0,u)})};return{setPrompt:n,confirmTransitionTo:s,appendListener:i,notifyListeners:o}},ns=ci;exports.getConfirmation_1=void 0;exports.getConfirmation_1=function(e,n){return n(window.confirm(e))};function We(t){return t.charAt(0)==="/"}function kt(t,e){for(var n=e,s=n+1,r=t.length;s<r;n+=1,s+=1)t[n]=t[s];t.pop()}function ss(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=t&&t.split("/")||[],s=e&&e.split("/")||[],r=t&&We(t),i=e&&We(e),o=r||i;if(t&&We(t)?s=n:n.length&&(s.pop(),s=s.concat(n)),!s.length)return"/";var a=void 0;if(s.length){var c=s[s.length-1];a=c==="."||c===".."||c===""}else a=!1;for(var u=0,l=s.length;l>=0;l--){var d=s[l];d==="."?kt(s,l):d===".."?(kt(s,l),u++):u&&(kt(s,l),u--)}if(!o)for(;u--;u)s.unshift("..");o&&s[0]!==""&&(!s[0]||!We(s[0]))&&s.unshift("");var f=s.join("/");return a&&f.substr(-1)!=="/"&&(f+="/"),f}const li=Object.freeze(Object.defineProperty({__proto__:null,default:ss},Symbol.toStringTag,{value:"Module"})),ui=In(li);var kn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};function Xe(t,e){if(t===e)return!0;if(t==null||e==null)return!1;if(Array.isArray(t))return Array.isArray(e)&&t.length===e.length&&t.every(function(c,u){return Xe(c,e[u])});var n=typeof t>"u"?"undefined":kn(t),s=typeof e>"u"?"undefined":kn(e);if(n!==s)return!1;if(n==="object"){var r=t.valueOf(),i=e.valueOf();if(r!==t||i!==e)return Xe(r,i);var o=Object.keys(t),a=Object.keys(e);return o.length!==a.length?!1:o.every(function(c){return Xe(t[c],e[c])})}return!1}const di=Object.freeze(Object.defineProperty({__proto__:null,default:Xe},Symbol.toStringTag,{value:"Module"})),hi=In(di);var ne={};exports.createPath_1=void 0;exports.stripTrailingSlash_1=void 0;exports.stripLeadingSlash_1=void 0;exports.addLeadingSlash_1=void 0;ne.__esModule=!0;exports.addLeadingSlash_1=ne.addLeadingSlash=function(e){return e.charAt(0)==="/"?e:"/"+e};exports.stripLeadingSlash_1=ne.stripLeadingSlash=function(e){return e.charAt(0)==="/"?e.substr(1):e};var fi=ne.hasBasename=function(e,n){return new RegExp("^"+n+"(\\/|\\?|#|$)","i").test(e)};ne.stripBasename=function(e,n){return fi(e,n)?e.substr(n.length):e};exports.stripTrailingSlash_1=ne.stripTrailingSlash=function(e){return e.charAt(e.length-1)==="/"?e.slice(0,-1):e};ne.parsePath=function(e){var n=e||"/",s="",r="",i=n.indexOf("#");i!==-1&&(r=n.substr(i),n=n.substr(0,i));var o=n.indexOf("?");return o!==-1&&(s=n.substr(o),n=n.substr(0,o)),{pathname:n,search:s==="?"?"":s,hash:r==="#"?"":r}};exports.createPath_1=ne.createPath=function(e){var n=e.pathname,s=e.search,r=e.hash,i=n||"/";return s&&s!=="?"&&(i+=s.charAt(0)==="?"?s:"?"+s),r&&r!=="#"&&(i+=r.charAt(0)==="#"?r:"#"+r),i};var we;exports.locationsAreEqual_1=we=void 0;var pi=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},mi=ui,gi=rs(mi),yi=hi,vi=rs(yi),bi=ne;function rs(t){return t&&t.__esModule?t:{default:t}}we=function(e,n,s,r){var i=void 0;typeof e=="string"?(i=(0,bi.parsePath)(e),i.state=n):(i=pi({},e),i.pathname===void 0&&(i.pathname=""),i.search?i.search.charAt(0)!=="?"&&(i.search="?"+i.search):i.search="",i.hash?i.hash.charAt(0)!=="#"&&(i.hash="#"+i.hash):i.hash="",n!==void 0&&i.state===void 0&&(i.state=n));try{i.pathname=decodeURI(i.pathname)}catch(o){throw o instanceof URIError?new URIError('Pathname "'+i.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.'):o}return s&&(i.key=s),r?i.pathname?i.pathname.charAt(0)!=="/"&&(i.pathname=(0,gi.default)(i.pathname,r.pathname)):i.pathname=r.pathname:i.pathname||(i.pathname="/"),i};exports.locationsAreEqual_1=function(e,n){return e.pathname===n.pathname&&e.search===n.search&&e.hash===n.hash&&e.key===n.key&&(0,vi.default)(e.state,n.state)};const is="/",os="./",xi=new RegExp(["(\\\\.)","(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?"].join("|"),"g"),as=(t,e)=>{const n=[];let s=0,r=0,i="";const o=e&&e.delimiter||is,a=e&&e.delimiters||os;let c=!1,u;for(;(u=xi.exec(t))!==null;){const l=u[0],d=u[1],f=u.index;if(i+=t.slice(r,f),r=f+l.length,d){i+=d[1],c=!0;continue}let m="";const v=t[r],y=u[2],g=u[3],w=u[4],C=u[5];if(!c&&i.length){const S=i.length-1;a.indexOf(i[S])>-1&&(m=i[S],i=i.slice(0,S))}i&&(n.push(i),i="",c=!1);const j=m!==""&&v!==void 0&&v!==m,$=C==="+"||C==="*",E=C==="?"||C==="*",H=m||o,O=g||w;n.push({delimiter:H,optional:E,repeat:$,partial:j,name:y||s++,prefix:m,pattern:O?$i(O):"[^"+je(H)+"]+?"})}return(i||r<t.length)&&n.push(i+t.substr(r)),n},wi=(t,e)=>Ci(as(t,e)),Ci=t=>{const e=new Array(t.length);for(let n=0;n<t.length;n++)typeof t[n]=="object"&&(e[n]=new RegExp("^(?:"+t[n].pattern+")$"));return function(n,s){let r="";const i=s&&s.encode||encodeURIComponent;for(let o=0;o<t.length;o++){const a=t[o];if(typeof a=="string"){r+=a;continue}const c=n?n[a.name]:void 0;let u;if(Array.isArray(c)){if(!a.repeat)throw new TypeError('Expected "'+a.name+'" to not repeat, but got array');if(c.length===0){if(a.optional)continue;throw new TypeError('Expected "'+a.name+'" to not be empty')}for(let l=0;l<c.length;l++){if(u=i(c[l],a),!e[o].test(u))throw new TypeError('Expected all "'+a.name+'" to match "'+a.pattern+'"');r+=(l===0?a.prefix:a.delimiter)+u}continue}if(typeof c=="string"||typeof c=="number"||typeof c=="boolean"){if(u=i(String(c),a),!e[o].test(u))throw new TypeError('Expected "'+a.name+'" to match "'+a.pattern+'", but got "'+u+'"');r+=a.prefix+u;continue}if(a.optional){a.partial&&(r+=a.prefix);continue}throw new TypeError('Expected "'+a.name+'" to be '+(a.repeat?"an array":"a string"))}return r}},je=t=>t.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),$i=t=>t.replace(/([=!:$/()])/g,"\\$1"),cs=t=>t&&t.sensitive?"":"i",ki=(t,e)=>{if(!e)return t;const n=t.source.match(/\((?!\?)/g);if(n)for(let s=0;s<n.length;s++)e.push({name:s,prefix:"",delimiter:"",optional:!1,repeat:!1,partial:!1,pattern:""});return t},Ei=(t,e,n)=>{const s=[];for(let r=0;r<t.length;r++)s.push(Me(t[r],e,n).source);return new RegExp("(?:"+s.join("|")+")",cs(n))},Si=(t,e,n)=>ji(as(t,n),e,n),ji=(t,e,n)=>{n=n||{};const s=n.strict,r=n.end!==!1,i=je(n.delimiter||is),o=n.delimiters||os,a=[].concat(n.endsWith||[]).map(je).concat("$").join("|");let c="",u=!1;for(let l=0;l<t.length;l++){const d=t[l];if(typeof d=="string")c+=je(d),u=l===t.length-1&&o.indexOf(d[d.length-1])>-1;else{const f=je(d.prefix),m=d.repeat?"(?:"+d.pattern+")(?:"+f+"(?:"+d.pattern+"))*":d.pattern;e&&e.push(d),d.optional?d.partial?c+=f+"("+m+")?":c+="(?:"+f+"("+m+"))?":c+=f+"("+m+")"}}return r?(s||(c+="(?:"+i+")?"),c+=a==="$"?"$":"(?="+a+")"):(s||(c+="(?:"+i+"(?="+a+"))?"),u||(c+="(?="+i+"|"+a+")")),new RegExp("^"+c,cs(n))},Me=(t,e,n)=>t instanceof RegExp?ki(t,e||[]):Array.isArray(t)?Ei(t,e,n):Si(t,e,n);var Ce=(t=>(t.scopedHash="scopedHash",t.hash="hash",t.browser="browser",t.memory="memory",t))(Ce||{}),ls=(t=>(t.storage="storage",t.path="path",t.initialPath="initial",t))(ls||{});const Li=(t,e)=>{const n=[],r=Me(e,n).exec(t);if(!r)return{};const[i,...o]=r;return n.reduce((c,u,l)=>(c[u.name]=o[l],c),{})},Oi=t=>Object.keys(t).reduce((e,n)=>{const s=typeof t[n]=="string"?t[n].replace("&","%20"):t[n];let r=`${n}=${s}`;return e.length>1&&(r="&".concat(r)),e.concat(r)},"?"),Ni=(t,e)=>{const n=e.find(s=>s.name===t);if(!n){process.env.NODE_ENV!=="production"&&T.warn(`Unable to find route with specified name: ${t}`);return}return n},us=t=>t.length?t.slice(1).split("&").map(e=>e.split("=")).reduce((e,n)=>{const[s,r]=n.map(encodeURI).map(decodeURIComponent);return{...e,[s]:decodeURIComponent(r).replace("%20","&")}},{}):{},Ai=(t,e)=>{const n=e.map(s=>ds(t,s)).reduce((s,r)=>{if(r===null)return s;const i=r.split("?")[1];let o=0;if(i){const a=us(`?${i}`);o=Object.keys(a).length}return!s.path||s.count&&o<s.count?{count:o,path:r}:s},{count:void 0,path:void 0});return n?n.path:e[0]},ds=(t,e)=>{const n=ee(t);if(Array.isArray(e)){const c=Ai(n,e);if(!c)throw new Error("Unable to match path.");return c}const s=wi(e);let r=e;try{r=s(n)}catch{return null}const i=[];Me(e,i);const o=Object.keys(n).reduce((c,u)=>(i.find(d=>d.name===u)||c.push(u),c),[]),a={};return o.forEach(c=>a[c]=n[c]),Object.keys(a).forEach(c=>a[c]===null&&delete a[c]),Object.keys(a).length>0?`${r}${Oi(a)}`:r},Mi=(t,e)=>{let n=t;return n.indexOf("?")>-1&&(n=n.substring(0,n.indexOf("?"))),n.indexOf(";")>-1&&(n=n.substring(0,n.indexOf(";"))),n===""&&(n="/"),e.reduce((s,r)=>{if(Array.isArray(r.path))return r.path.reduce((u,l)=>Me(l,[]).exec(n||"")&&!u?n:u,void 0)&&!s?r:s;if(!r.path)return s;const i=[];return Me(r.path,i).exec(n||"")&&!s?r:s},void 0)},Ri=t=>{let e=t.get("historyTransitionManager");return e||(e=ns(),t.parent&&t.parent.register("historyTransitionManager",e)),e},Pi=(t,e=null)=>t?we(e?e(t):t):{pathname:"",search:"",hash:""},hs=(t,e)=>{const n=`humany-${e}=([^&?]+)&?`,s=new RegExp(n,"i"),r=t.match(s);return r&&r[1]||"/"},Di=(t,e)=>{if(ee(t),ee(e),Object.keys(t).length!==Object.keys(e).length)return!1;if(Object.keys(t).length===0&&Object.keys(e).length===0)return!0;let n=!0;return Object.keys(e).forEach(s=>{e[s]!==t[s]&&(n=!1)}),n},Ti=t=>{if(typeof t.mode=="string"){if(t.mode===Ce.memory)return!0}else if(t.mode[1]){const[e,{sticky:n}]=t.mode;if(e===Ce.memory)return typeof n>"u"?!0:n}return!1},Ii=t=>{const{views:e}=t.get("$settings"),n=Object.keys(e).reduce((s,r)=>typeof e[r].path>"u"?r:s,void 0);return n?{name:n,params:{}}:null},zi=(t,e)=>{const n=i=>{function o(a,c){const u={};let l;for(;l=c.exec(a);)u[l[1]]=l[2];return u}return o(i,/([^#?&=]+)=([^&#]*)(?!.*?\#)/gi)||null},s=`humany-${e}`;return n(t)[s]},Vi=()=>{const t=window.location.href,e=t.indexOf("#");return e===-1?"":t.substring(e+1)},Hi=(t="")=>{const e=t.replace(";","?"),n=[{from:/\;+/gi,to:"&"},{from:/:+/gi,to:"="}];let s=e;return n.forEach(({to:r,from:i})=>{s=s.replace(i,r)}),s},Bi=(t,e=null)=>t?we(e?e(t):t):{pathname:"",search:"",hash:""},fs=t=>{const e=Vi(),n=zi(e,t);return Bi(n,Hi)},ps=t=>{const{name:e}=t.get("$widget");return!!fs(e).pathname};rt(t=>{t.createCommand("routing",e=>n=>{const s={mode:n.mode};n.basePath&&(s.basePath=n.basePath),e.container.register("routingSettings",s)})});var M=(t=>(t.Cookie="cookie",t.Local="local",t.Session="session",t))(M||{}),De=(t=>(t.Tenant="tenant",t.Implementation="implementation",t.Widget="widget",t))(De||{}),V=(t=>(t.Necessary="necessary",t.Functional="functional",t.Analytical="analytical",t.Marketing="marketing",t))(V||{});const oe=(t,e,n,s={})=>En(t,n).then(r=>(process.env.NODE_ENV!=="production"&&r&&T.warn(`createStorageWriter: Attempted to create storage writer using unallowed category.
359
+ Key: ${e}
360
+ Category: ${JSON.stringify(n)}
361
+ Options: ${JSON.stringify(s)}`),i=>(cn(t),En(t,n).then(o=>{if(o){process.env.NODE_ENV!=="production"&&T.warn(`storageWriter: Attempted to write to storage using unallowed category.
362
+ Key: ${e}
363
+ Category: ${JSON.stringify(n)}
364
+ Value: ${JSON.stringify(i)}
365
+ Options: ${JSON.stringify(s)}`);return}const{scope:a=De.Widget,medium:c=M.Session,duration:u}=s,l=qi();return l[a][e]=an(i,n,u),c===M.Cookie?Zi(t,l):Gi(t,c,l)})))),K=(t,e,n=M.Session)=>(cn(t),typeof e>"u"?(process.env.NODE_ENV!=="production"&&T.warn("readStorage: Undefined key passed when reading storage. ",e,n),Promise.resolve(void 0)):n===M.Cookie?Ui(t).then(s=>st(s,e)):Ki(t,n).then(s=>st(s,e))),ve=t=>!!Object.entries(t).filter(([e,n])=>typeof n<"u").length,Et=t=>Object.entries(t).filter(([e,n])=>typeof n<"u").forEach(([e,{value:n}])=>{typeof n>"u"&&delete t[e]}),ms=(t,e)=>{const n={tenant:{...t.tenant,...e.tenant},implementation:{...t.implementation,...e.implementation},widget:{...t.widget,...e.widget}};return Et(n.tenant),Et(n.implementation),Et(n.widget),n},_i=t=>Object.entries(t).reduce((n,s)=>{const[r,i]=s;return Object.entries(i).forEach(o=>{const[a,{expiration:c}]=o;c&&n.push(c)}),n},[]).slice().sort((n,s)=>new Date(s).valueOf()-new Date(n).valueOf()).shift()||gt(),mt=t=>{const{name:e,implementation:{name:n,tenant:s}}=t.get("$widget");return[`humany_${s}`,`humany_${vn(s+n)}`,`humany_${vn(s+n+e)}`]},St=t=>{const e=new RegExp(`(?:^|;)\\s?${t}=(.*?)(?:;|$)`,"i"),n=document.cookie.match(e);return n&&n[1]&&JSON.parse(n[1])||void 0},jt=(t,e,n)=>{const s=`${t}=${JSON.stringify(e).trim()}`,r=`expires=${new Date(n).toUTCString()}`,i="path=/",o="SameSite=None;Secure";return document.cookie=`${s}; ${r}; ${i}; ${o}`},on=t=>{const[e,n,s]=mt(t),r=St(e)||{},i=St(n)||{},o=St(s)||{};return{tenant:r,implementation:i,widget:o}},gs=(t,e)=>{const n=on(t),s=ms(n,e),[r,i,o]=mt(t),{tenant:a,implementation:c,widget:u}=s,l=_i(e),d=gt({days:-1});jt(r,a,ve(a)?l:d),jt(i,c,ve(c)?l:d),jt(o,u,ve(u)?l:d)},nt=(t,e)=>{const[n,s,r]=mt(t),i=e.getItem(n)||"{}",o=e.getItem(s)||"{}",a=e.getItem(r)||"{}";return{tenant:JSON.parse(i),implementation:JSON.parse(o),widget:JSON.parse(a)}},Vt=(t,e,n)=>{const s=nt(t,e),r=ms(s,n),[i,o,a]=mt(t),{tenant:c,implementation:u,widget:l}=r;ve(c)?e.setItem(i,JSON.stringify(c)):e.removeItem(i),ve(u)?e.setItem(o,JSON.stringify(u)):e.removeItem(o),ve(l)?e.setItem(a,JSON.stringify(l)):e.removeItem(a)},qi=()=>({tenant:{},implementation:{},widget:{}}),Fi=t=>t?!!t&&new Date>new Date(t):!1,st=(t,e)=>{const n=t.widget[e]||t.implementation[e]||t.tenant[e];return n==null?void 0:n.value},an=(t,e,n)=>n?{value:t,category:e,expiration:typeof n=="object"?gt(n):n}:{value:t,category:e},ys=(t,e)=>{const n=Kt(t);return Object.entries(n).forEach(([s,r])=>{Object.entries(r).forEach(([i,o])=>{const{expiration:a,category:c}=o;(Fi(a)||Wi(e,c))&&(r[i]=an(void 0,c,a))})}),n},En=(t,e)=>K(t,"storagePolicy",M.Cookie).then((n=[V.Necessary])=>!!e&&n.indexOf(e)===-1),Wi=(t=[V.Necessary],e)=>!!e&&t.indexOf(e)===-1,cn=t=>{const e=on(t),n=nt(t,window.localStorage),s=nt(t,sessionStorage),r=st(e,"storagePolicy"),[i,o,a]=[e,n,s].map(c=>ys(c,r));gs(t,i),Vt(t,window.localStorage,o),Vt(t,window.sessionStorage,a)},gt=(t={days:30})=>{const{days:e=0,hours:n=0,minutes:s=0,seconds:r=0}=t,i=new Date;return i.setTime(i.getTime()+n*60*60*1e3),i.setTime(i.getTime()+e*24*60*60*1e3),i.setTime(i.getTime()+s*60*1e3),i.setTime(i.getTime()+r*1e3),i.toISOString()},Ui=t=>J(document)(()=>on(t)),Zi=(t,e)=>J(document)(()=>gs(t,e)),Ki=(t,e)=>{const n=e===M.Local?window.localStorage:window.sessionStorage;return J(n)(()=>nt(t,n))},Gi=(t,e,n)=>{const s=e===M.Local?window.localStorage:window.sessionStorage;return J(s)(()=>Vt(t,s,n))};rt(t=>{t.createCommand("storage",e=>(n={})=>{const{consent:s}=n;if(typeof s<"u"){if(typeof s!="number"&&typeof s!="string"&&!Array.isArray(s)){process.env.NODE_ENV!=="production"&&T.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
366
+ Passed consent: ${JSON.stringify(s)}`);return}if(Array.isArray(s)&&!s.every(i=>typeof i=="number"||typeof i=="string")){process.env.NODE_ENV!=="production"&&T.warn(`storagePolicyConfigurationApi: passed consent is not valid. Consent either has to be a number, a string, an array of strings or an array of numbers.
367
+ Passed consent: ${JSON.stringify(s)}`);return}const r=[V.Necessary,V.Functional,V.Analytical,V.Marketing].filter((i,o,a)=>typeof s=="number"?s>o:typeof s=="string"?a.indexOf(s)+1>o:Array.isArray(s)?s.findIndex(c=>c===o+1||c===i)>-1:!0);return r.indexOf(V.Necessary)===-1&&(process.env.NODE_ENV!=="production"&&T.warn(`storagePolicyConfigurationApi: passed consent does not include category: '${V.Necessary}'. Consent has to atleast include the '${V.Necessary}' category.
368
+ Passed consent: ${JSON.stringify(s)}`),r.unshift(V.Necessary)),oe(e.container,"storagePolicy",V.Necessary,{medium:M.Cookie,scope:De.Tenant,duration:{days:365}}).then(i=>i(r)).then(()=>{cn(e.container),e.events.dispatch("storage:policy-changed",r)})}})});const Yi=p.forwardRef(({className:t,onClick:e=()=>{},name:n="",to:s="",params:r={},children:i,...o},a)=>{const c=Jt(),u=q();if(!c)return null;let l="";const d={onClick:e,className:N(t,"humany-route-link"),to:l,innerRef:a,...o,ref:null};if(n){if(!(c.routes||[]).find(y=>y.name===n))return process.env.NODE_ENV!=="production"&&T.warn(`Unable to create route. No route named "${n}" exist.`),h.jsx(bt.Link,{...d,onClick:y=>{e(y),y.preventDefault(),process.env.NODE_ENV!=="production"&&T.warn(`Unable to navigate. No route named "${n}" exist.`)},children:i});const v=Object.keys(r).reduce((y,g)=>{const w=r[g];if(Array.isArray(w)){if(w.length===0)return y;y[g]=w.map(C=>typeof C=="string"?encodeURIComponent(C):C).join(",")}else y[g]=typeof w=="string"?encodeURIComponent(w):w;return y},{});try{l=c.generate(n,v||{})}catch{return h.jsx(bt.Link,{...d,ref:d.innerRef,children:i})}l&&c.settings.mode&&c.settings.mode===Ce.browser&&l[0]!=="/"&&(l=`/${l}`)}else if(s&&c.history)l=c.history.createHref({hash:"",pathname:s,search:"",state:void 0});else return process.env.NODE_ENV!=="production"&&T.warn('Unable to generate path for route link. Either specify route name or use the "to" prop.'),null;if(c.settings&&c.settings.mode===Ce.scopedHash){const f=u.get("$widget").name;l=hs(l,f)}return d.as?h.jsx(Qi,{...d,as:d.as,children:i}):h.jsx(bt.Link,{...d,to:l,children:i})}),Qi=b.span``,yt=p.forwardRef(({className:t,disabled:e=!1,role:n="link",tabIndex:s=0,onClick:r=()=>{},onKeyDown:i=()=>{},title:o,as:a,href:c,children:u,target:l,routeName:d,params:f,...m},v)=>{const y={title:o,disabled:e,role:n,as:a,tabIndex:s,className:N(t,"humany-link",[!!e,"humany-disabled"]),onClick:g=>{if(g.persist(),e){g.preventDefault();return}r(g)},onKeyDown:g=>{if(g.persist(),e){g.key!=="Tab"&&g.preventDefault();return}i(g)}};return d?h.jsx(Xi,{name:d,params:f,...y,...W(m),ref:v,children:u}):h.jsx(Ji,{href:c,target:l,...y,...W(m),ref:v,children:u})}),Xi=b(Yi)`
369
+ ${t=>t.disabled?`
370
+ pointer-events: none;
371
+ opacity: .7;
372
+ `:"cursor: pointer;"}
373
+ `,Ji=b.a`
374
+ ${t=>t.disabled?`
375
+ pointer-events: none;
376
+ opacity: .7;
377
+ `:"cursor: pointer;"}
378
+ `,vs=({visible:t,duration:e=500,children:n,onClick:s=()=>{},...r})=>{const i=p.useRef(),o=p.useCallback(a=>{a.target===i.current&&s(a)},[s]);return h.jsx(Rt.CSSTransition,{in:t,className:"humany-overlay-transition",classNames:"humany-overlay-transition",unmountOnExit:!0,timeout:e,children:h.jsx(sn,{children:h.jsx(eo,{className:"humany-overlay",duration:e,ref:i,onClick:o,...r,children:n})})})},eo=b.div`
379
+ background: rgba(0, 0, 0, 0.6);
380
+ min-width: 100%;
381
+ min-height: 100%;
382
+ position: fixed;
383
+ top: 0;
384
+ bottom: 0;
385
+ right: 0;
386
+ left: 0;
387
+ display: flex;
388
+ justify-content: center;
389
+ align-items: center;
390
+ z-index: 7;
391
+
392
+ transition: ${t=>t.duration}ms;
393
+ opacity: 0;
394
+
395
+ &.humany-overlay-transition-enter {
396
+ opacity: 0.1;
397
+ }
398
+ &.humany-overlay-transition-enter-active,
399
+ &.humany-overlay-transition-enter-done,
400
+ &.humany-overlay-transition-exit {
401
+ opacity: 1;
402
+ }
403
+
404
+ &.humany-overlay-transition-exit-active,
405
+ &.humany-overlay-transition-exit-done {
406
+ opacity: 0;
407
+ }
408
+ `,to=k.keyframes`
409
+ 100% {
410
+ transform: rotate(360deg);
411
+ }
412
+ `,no=k.keyframes`
413
+ 0% {
414
+ stroke-dasharray: 1, 200;
415
+ stroke-dashoffset: 0;
416
+ }
417
+ 50% {
418
+ stroke-dasharray: 89, 200;
419
+ stroke-dashoffset: -35px;
420
+ }
421
+ 100% {
422
+ stroke-dasharray: 89, 200;
423
+ stroke-dashoffset: -124px;
424
+ }
425
+ `,so=b.svg`
426
+ animation: ${to} 2s linear infinite;
427
+ height: 100%;
428
+ transform-origin: center center;
429
+ width: 100%;
430
+ position: absolute;
431
+ top: 0;
432
+ bottom: 0;
433
+ left: 0;
434
+ right: 0;
435
+ margin: auto;
436
+ transition: 200ms ease-out opacity;
437
+ `,ro=b.div`
438
+ position: absolute;
439
+ top: 0;
440
+ bottom: 0;
441
+ left: 0;
442
+ right: 0;
443
+ height: 100%;
444
+ width: 100%;
445
+ pointer-events: ${t=>t["data-loading"]?"all":"none"};
446
+ display: flex;
447
+ flex-direction: column;
448
+ justify-content: center;
449
+ transition: 200ms ease-out opacity;
450
+ box-sizing: border-box;
451
+ overflow: hidden;
452
+ svg {
453
+ opacity: ${t=>t["data-loading"]?"1":"0"};
454
+ }
455
+ `,io=b.div`
456
+ position: relative;
457
+ margin: 0 auto;
458
+ width: 100px;
459
+ &:before {
460
+ content: '';
461
+ display: block;
462
+ padding-top: 100%;
463
+ }
464
+ `,oo=b.circle`
465
+ stroke-dasharray: 1, 200;
466
+ stroke-dashoffset: 0;
467
+ animation: ${no} 1.5s ease-in-out infinite;
468
+ stroke-linecap: round;
469
+ stroke: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
470
+ stroke-width: 2px;
471
+ `,ao=({className:t,loading:e=!1})=>h.jsx(ro,{className:N("humany-loader",t),"data-loading":e,children:h.jsx(io,{className:"humany-spinner",children:h.jsx(so,{viewBox:"25 25 50 50",children:h.jsx(oo,{cx:"50",cy:"50",r:"20",fill:"none","stroke-width":"2","stroke-miterlimit":"10"})})})}),co=({zoomState:t,image:e,changeZoom:n,...s})=>{var v;const r=p.useRef(null),[i,o]=p.useState(!1),[a,c]=p.useState(!1),{width:u,height:l,...d}=s.style||{},f=p.useCallback(()=>{const y=r.current;if(y){const g=window.innerWidth/y.naturalWidth,w=window.innerHeight/y.naturalHeight,C=Math.min(g,w);return w>=1&&g>=1?1:C}return 1},[i,e.src]),m=p.useMemo(()=>{const y=r.current;if(y&&i){if(!a){c(!0);const g=f();n(g)}return y.naturalWidth>=y.naturalHeight?[`${t*y.naturalWidth}px`,"auto"]:["auto",`${t*y.naturalHeight}px`]}return null},[t,r,i,e.src]);return p.useEffect(()=>(o(!1),function(){c(!1)}),[e.src]),h.jsxs(h.Fragment,{children:[h.jsx(lo,{loading:!i}),h.jsx(uo,{onLoad:()=>{o(!0)},ref:r,imageSize:m,draggable:"false",...s,alt:((v=s.alt)==null?void 0:v.toString())||"",style:d,src:e.src,loaded:i}),h.jsx(ho,{})]})},lo=b(ao)`
472
+ svg circle {
473
+ stroke: #ffffff;
474
+ }
475
+ `,uo=b.img`
476
+ transform: none;
477
+
478
+ ${t=>t.imageSize&&k.css`
479
+ width: ${t.imageSize[0]};
480
+ height: ${t.imageSize[1]};
481
+ display: inline-block;
482
+ `}
483
+ vertical-align: middle;
484
+ position: relative;
485
+ ${t=>!t.loaded&&"display:none;"}
486
+ `,ho=b.div`
487
+ height: 100%;
488
+ display: inline-block;
489
+ vertical-align: middle;
490
+ `,fo=()=>{const t=p.useRef(),[e,n]=p.useState(!0),s=p.useCallback(()=>(e||n(!0),t.current&&clearTimeout(t.current),t.current=setTimeout(()=>{n(!1)},3e3),()=>{t.current&&clearTimeout(t.current)}),[e,t]);return[e,s]},po=({attrs:t,htmlBody:e})=>{var hn;const n=Oe("Escape"),s=Oe("ArrowLeft"),r=Oe("ArrowRight"),[i,o]=p.useState(1),[a,c]=p.useState({top:0,left:0,x:0,y:0}),[u,l]=p.useState(!1),[d,f]=fo(),[m,v]=p.useState(null),[y,g]=p.useState(null),w=p.useRef(null),C=p.useRef(null),j=p.useRef(null),$=p.useRef(null),E=p.useRef(null),[H,O]=p.useState(null);p.useEffect(()=>{n&&v(null)},[n]),p.useEffect(()=>{o(1)},[m]),p.useEffect(()=>{var re,He;if(m===null||C.current===null)return;const L=C.current.firstElementChild,R=(re=j.current)==null?void 0:re.querySelector(".nav-left"),F=(He=j.current)==null?void 0:He.querySelector(".nav-right");if(y==="Right")Ve&&F?F.focus():pe&&R&&R.focus();else if(y==="Left")pe&&R?R.focus():Ve&&F&&F.focus();else{if(!L)return;L.focus()}},[m,C,j,y]),p.useEffect(()=>{if(s){if(pe)return ze()}else if(r&&Ve)return se()},[s,r]),p.useEffect(()=>{var R,F;const L=((F=(R=E.current)==null?void 0:R.style)==null?void 0:F.float)||"";(L==="left"||L==="right")&&O(L)},[]);const S=p.useMemo(()=>{const L=document.createElement("div");L.innerHTML=e||"";const R=L.getElementsByTagName("img");return Array.from(R).reduce((re,He)=>{const fn=He.getAttribute("src");if(fn){const Ns={src:fn};re.push(Ns)}return re},[])},[e]),P=p.useCallback(()=>{const{src:L}=t;if(L){const R=S.findIndex((F,re)=>F.src===L);v(R)}},[S,t]),D=p.useCallback(L=>{v(null)},[]),A=p.useCallback(L=>{o(L?i+i*.25:i-i*.25)},[o,i]),I=p.useCallback(()=>{if(m!==null){const{src:L}=S[m];L&&window.open(L,"_self")}},[S,m]),G=p.useCallback(L=>{const R=$.current;R&&(c({top:R.scrollTop,left:R.scrollLeft,x:L.clientX,y:L.clientY}),l(!0))},[$]),Ee=p.useCallback(L=>{const R=$.current;if(R&&u){const F=L.clientX-a.x,re=L.clientY-a.y;R.scrollTop=a.top-re,R.scrollLeft=a.left-F}},[u,a]),Ie=L=>{L.preventDefault(),l(!1)},fe=p.useMemo(()=>{if($.current){const L=$.current.getElementsByTagName("img");if(L&&L.length){const R=L[0];return R.width>window.innerWidth||R.height>window.innerHeight}}return!1},[$,i]),ze=()=>{m!==null&&(g("Left"),v(m-1))},se=()=>{m!==null&&(g("Right"),v(m+1))},pe=m!==null&&m>0&&S.length>1,Ve=m!==null&&S.length-1>m;return h.jsxs(h.Fragment,{children:[h.jsx(vs,{visible:m!==null,onClick:D,children:h.jsxs(Co,{onMouseDown:()=>f(),onMouseMove:()=>f(),onTouchStart:()=>f(),onKeyDown:()=>f(),children:[h.jsx($o,{show:d.toString(),children:h.jsx(vo,{ref:C,buttons:[{id:"download",onClick:I,icon:"download",ariaLabel:"Download image"},{id:"lightbox-close",onClick:()=>v(null),icon:"lightbox-close",ariaLabel:"Close"}]})}),h.jsx(Eo,{scrolling:u.toString(),isDraggable:fe.toString(),ref:$,onMouseMove:Ee,onMouseDown:G,onMouseUp:Ie,children:m!==null&&h.jsx(co,{changeZoom:L=>{o(L)},zoomState:i,...t,style:{...t.style||{},float:"none"},image:S[m]})}),h.jsx(xo,{ref:j,show:d.toString(),buttons:[{id:"previous",onClick:ze,icon:"caret-left",circle:!0,show:pe,className:"nav-left",ariaLabel:"Navigate to previous image"},{id:"next",onClick:se,icon:"caret-right",circle:!0,show:Ve,className:"nav-right",ariaLabel:"Navigate to next image"}]}),h.jsxs(ko,{show:d.toString(),children:[h.jsx(bo,{buttons:[{id:"zoom-out",onClick:()=>A(!1),icon:"zoom-out",ariaLabel:"Zoom out"},{id:"zoom-in",onClick:()=>A(!0),icon:"zoom-in",ariaLabel:"Zoom in"}]}),h.jsxs(wo,{variant:"span",children:[Math.trunc(i*100),"%"]})]})]})}),h.jsx(mo,{ref:w,onClick:P,onKeyDown:L=>{L.key==="Enter"&&(L.preventDefault(),P())},alignment:H,tabIndex:0,children:h.jsx(So,{...t,alt:((hn=t.alt)==null?void 0:hn.toString())||"",ref:E})})]})},ln=p.forwardRef(({show:t="true",buttons:e,className:n},s)=>h.jsx(go,{ref:s,show:t,className:N("humany-button-set",n),children:e.map(({id:r,circle:i=!1,show:o=!0,ariaLabel:a,onClick:c,icon:u,className:l},d)=>h.jsx(yo,{circle:i.toString(),onClick:c,tabIndex:o?void 0:-1,show:o.toString(),icon:u,className:l,"aria-label":a,children:h.jsx(ke,{size:24,symbol:{type:"Svg",content:u}})},r+d.toString()))})),bs=b.div`
491
+ transition: opacity 0.3s ease 0s;
492
+ z-index: 5;
493
+ ${t=>t.show==="true"?"opacity: 1;":k.css`
494
+ opacity: 0;
495
+ pointer-events: none;
496
+ `}
497
+ `,mo=b(yt)`
498
+ display: inline-block !important;
499
+
500
+ ${t=>(t.alignment==="right"||t.alignment==="left")&&k.css`
501
+ float: ${t.alignment};
502
+ `}
503
+ `,go=b(bs)`
504
+ position: fixed;
505
+ display: flex;
506
+ gap: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
507
+ `,Ht="39px",yo=b(te)`
508
+ width: ${Ht};
509
+ height: ${Ht};
510
+ display: flex;
511
+ justify-content: center;
512
+ align-items: center;
513
+
514
+ ${t=>t.icon==="caret-left"&&k.css`
515
+ svg {
516
+ position: relative;
517
+ left: -2px;
518
+ }
519
+ `}
520
+
521
+ ${t=>{var e;return t.circle==="true"?k.css`
522
+ background-color: #ffffff;
523
+ border-radius: 50%;
524
+
525
+ svg {
526
+ path,
527
+ line {
528
+ stroke: ${(e=t.theme.colors)==null?void 0:e.text};
529
+ }
530
+ }
531
+
532
+ &:focus-visible {
533
+ ${_(t)}
534
+ outline-color: #ffffff;
535
+ background-color: transparent;
536
+
537
+ svg {
538
+ path,
539
+ line {
540
+ stroke: #ffffff;
541
+ }
542
+ }
543
+ }
544
+ `:k.css`
545
+ svg {
546
+ path,
547
+ line {
548
+ stroke: #ffffff;
549
+ }
550
+ }
551
+ &:focus {
552
+ outline-color: #ffffff;
553
+ }
554
+ &:focus-visible {
555
+ ${_(t)}
556
+ }
557
+ `}}
558
+
559
+ ${t=>t.show==="true"?k.css`
560
+ opacity: 0.8;
561
+ transition: opacity 0.3s ease 0s;
562
+ &:hover {
563
+ opacity: 1;
564
+ }
565
+ `:k.css`
566
+ opacity: 0;
567
+ pointer-events: none;
568
+ `}
569
+ `,vo=b(ln)`
570
+ top: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
571
+ right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
572
+ `,bo=b(ln)`
573
+ bottom: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
574
+ width: 100%;
575
+ align-items: center;
576
+ justify-content: center;
577
+ `,xo=b(ln)`
578
+ display: block;
579
+ button {
580
+ position: fixed;
581
+ top: calc(50% - calc(${Ht} / 2));
582
+ &:first-child {
583
+ left: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
584
+ }
585
+ &:last-child {
586
+ right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
587
+ }
588
+ }
589
+ `,wo=b(dt)`
590
+ position: fixed;
591
+ bottom: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
592
+ right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.large}};
593
+ color: #ffffff;
594
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.medium}};
595
+ font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
596
+ `,xs=b(bs)`
597
+ position: absolute;
598
+ width: 100vw;
599
+ height: 88px;
600
+ left: 0px;
601
+ z-index: 5;
602
+ `,Co=b.div`
603
+ width: 100%;
604
+ `,$o=b(xs)`
605
+ top: 0px;
606
+ background-image: linear-gradient(
607
+ to bottom,
608
+ rgb(34, 34, 34, 0.8),
609
+ rgba(34, 34, 34, 0)
610
+ );
611
+ `,ko=b(xs)`
612
+ bottom: 0px;
613
+ background-image: linear-gradient(
614
+ to top,
615
+ rgb(34, 34, 34, 0.8),
616
+ rgba(34, 34, 34, 0)
617
+ );
618
+ `,Eo=b.div`
619
+ width: 100%;
620
+ height: 100vh;
621
+ overflow: auto;
622
+ text-align: center;
623
+ vertical-align: middle;
624
+ white-space: nowrap;
625
+ justify-content: center;
626
+ cursor: ${t=>t.isDraggable==="true"?t.scrolling==="true"?"grabbing":"grab":"auto"};
627
+ `,So=b.img`
628
+ cursor: pointer;
629
+ `,jo=p.forwardRef(({className:t,children:e,trigger:n,onOverlayClick:s=()=>{},close:r=!1,...i},o)=>{const[a,c]=Zr(),[u,l]=en(!0),d=p.useRef(),f=p.useRef(Re()),m=Oe("Escape");p.useEffect(()=>{(m||r)&&c(!1)},[m,r]),p.useEffect(()=>{a&&d.current&&d.current.focus()},[a,d.current]),tn("router:changed",()=>{c(!1)});const v=p.useCallback(g=>{c(!1),s(g)},[s,c]);p.useImperativeHandle(o,()=>({close(){c(!1)}}));const y=p.useCallback(()=>Un(f.current,()=>{c(!1)}),[f.current]);return h.jsxs(h.Fragment,{children:[h.jsx(vs,{visible:a,onClick:v,children:h.jsxs(Lo,{className:N(t,"humany-modal",`humany-modal-${f.current}`),css:u,tabIndex:-1,...i,ref:l,children:[h.jsx(Yn,{onClick:()=>c(!1),tabIndex:0,ref:d,children:h.jsx(ke,{symbol:{type:"Svg",content:"close"}})}),e]})}),p.cloneElement(n,{onClick:g=>{c(),y()}})]})}),Lo=b.div`
630
+ font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
631
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
632
+ position: relative;
633
+ max-width: 50%;
634
+ min-width: 200px;
635
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
636
+ ${t=>Zn(t)}
637
+ ${t=>t.css&&t.css}
638
+ outline: none;
639
+ `,Oo=({className:t,trigger:e,header:n="",text:s="",onCancel:r=()=>{},onConfirm:i=()=>{},cancelLabel:o="",confirmLabel:a=""})=>{const c=p.useRef(),u=p.useCallback(()=>{var d;r(),(d=c==null?void 0:c.current)==null||d.close()},[r]),l=p.useCallback(()=>{var d;i(),(d=c==null?void 0:c.current)==null||d.close()},[i]);return h.jsxs(No,{className:t,trigger:e,ref:c,onOverlayClick:u,children:[n&&h.jsx(xe,{children:n}),s&&h.jsx(xe,{children:s}),a&&h.jsx(Ao,{onClick:l,children:a}),o&&h.jsx(Mo,{onClick:u,children:o})]})},No=b(jo)`
640
+ display: block;
641
+
642
+ span {
643
+ display: block;
644
+ margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
645
+
646
+ &:first-of-type:not(:only-of-type) {
647
+ font-weight: 700;
648
+ margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
649
+ }
650
+ }
651
+ `,Ao=b(te)`
652
+ display: inline-block;
653
+ min-width: 50px;
654
+ ${t=>{var e,n;return`padding: ${(e=t.theme.sizes)==null?void 0:e.small} ${(n=t.theme.sizes)==null?void 0:n.normal};`}}
655
+ ${t=>t.theme.borderRadius&&`border-radius: ${t.theme.borderRadius};`}
656
+ color: #FFFFFF;
657
+ background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
658
+ border: 1px solid ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
659
+
660
+ margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} 0 0;
661
+
662
+ &:focus {
663
+ background-color: transparent;
664
+ }
665
+
666
+ &:focus-visible {
667
+ ${_}
668
+ }
669
+ `,Mo=b(te)`
670
+ display: inline-block;
671
+ min-width: 50px;
672
+ ${t=>{var e,n;return`padding: ${(e=t.theme.sizes)==null?void 0:e.small} ${(n=t.theme.sizes)==null?void 0:n.normal};`}}
673
+ ${t=>t.theme.borderRadius&&`border-radius: ${t.theme.borderRadius};`}
674
+ background-color: transparent;
675
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
676
+ border: 1px solid ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
677
+
678
+ &:focus-visible {
679
+ ${_};
680
+ }
681
+ `;b.div`
682
+ display: flex;
683
+ flex-wrap: wrap;
684
+ `;b.div`
685
+ ${t=>be(t)("h2",k.css`
686
+ padding: 0;
687
+ margin: 0;
688
+ color: gray;
689
+ font-size: 7em;
690
+ `)}
691
+ `;b.div`
692
+ margin-left: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
693
+
694
+ ${t=>{var e;return be(t)("h3",k.css`
695
+ text-transform: uppercase;
696
+ font-size: ${(e=t.theme.fonts)==null?void 0:e.normal};
697
+ `)}}
698
+
699
+ a {
700
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.link}};
701
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.small}};
702
+ }
703
+ `;b.div`
704
+ margin-top: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
705
+ min-width: 100%;
706
+
707
+ span {
708
+ font-weight: bold;
709
+ }
710
+ `;const Ro=p.forwardRef(({className:t,description:e,text:n,children:s,...r},i)=>h.jsxs(yt,{className:N(t,"humany-text-link"),...r,ref:i,children:[s,h.jsx(lt,{children:n}),e?h.jsx(rn,{html:e,className:"humany-description"}):null]}));b.div`
711
+ display: flex;
712
+ align-items: center;
713
+ `;b.div`
714
+ color: #ffffff;
715
+ background: #161616;
716
+ border-radius: ${t=>t.theme.borderRadius};
717
+ padding: calc(${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}} * 2);
718
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
719
+ font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
720
+ position: absolute;
721
+ z-index: 10;
722
+
723
+ a {
724
+ color: ${t=>t.color?t.color:"inherit"};
725
+ text-decoration: none;
726
+ }
727
+
728
+ i,
729
+ svg {
730
+ margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
731
+ }
732
+
733
+ ${t=>{let e="";return t.y>0?e+=`top: calc(2px + ${t.y||"0"}px);`:e+="bottom: 2px;",t.x>0?e+=`right: calc(2px + ${t.x||"0"}px);`:e+="left: 2px;",e}};
734
+ `;const Po=p.forwardRef(({className:t,children:e,onClick:n=()=>{},widgetName:s,activationOptions:r,...i},o)=>{const a=q(),c=()=>{const{implementation:d}=a.get("$widget");return d.widgets.get(s)};p.useEffect(()=>{const d=c();return d==null||d.activate(r).then(()=>d.invoke("attach")),()=>{d==null||d.deactivate()}},[s]);const u=d=>{const f=c(),m=d.currentTarget;if(f){const v=()=>{f.invoke("renderState").then(y=>y===B.open?f.invoke("close"):f.invoke("open")).then(()=>{f.events.subscribeOnce("widget:area-rendered",(y,g)=>{a.get("widgetDOMElement")&&f.events.dispatch("widget:modal-opened",{name:f.name,ref:m})})})};f.state===Zt.Deactivated?f.activate(r).then(()=>f.invoke("attach")).then(v):v()}},l=d=>{d.key==="Enter"&&(d.preventDefault(),u(d))};return h.jsx(yt,{className:N(t,"humany-widget-link"),onKeyDown:l,onClick:d=>{n(d),u(d)},...i,ref:o,children:e})});p.forwardRef(({portalId:t="humany-widget-overlay-portal",className:e,children:n},s)=>{const r=q(),i=p.useMemo(()=>{if(!r)return null;const o=r.get("widgetDOMElement");return!o||!o.childElementCount?null:o.children[0]},[r]);return i?h.jsx(sn,{elementId:t,parent:i,children:h.jsx(Do,{className:N("humany-widget-overlay-outlet",e),ref:s,children:n})}):null});const Do=b.div`
735
+ background-color: #ffffff;
736
+ position: absolute;
737
+ top: 0;
738
+ left: 0;
739
+ bottom: 0;
740
+ right: 0;
741
+ z-index: 10;
742
+ width: 100%;
743
+ height: 100%;
744
+ `;b.div`
745
+ background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
746
+ color: #ffffff;
747
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}};
748
+ margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0;
749
+ border-radius: ${t=>t.theme.borderRadius};
750
+
751
+ ${t=>{var e,n;return be(t)("h3",k.css`
752
+ margin: 0 0 ${(e=t.theme.sizes)==null?void 0:e.normal} 0;
753
+ font-size: ${(n=t.theme.fonts)==null?void 0:n.normal};
754
+ `)}}
755
+ `;b(pt)`
756
+ ${ut}
757
+ li {
758
+ font-weight: 300;
759
+ }
760
+
761
+ > li {
762
+ white-space: normal;
763
+ }
764
+ `;p.createContext(()=>{});b.div`
765
+ textarea:focus-visible,
766
+ input:focus-visible,
767
+ select:focus-visible {
768
+ ${_}
769
+ }
770
+ button:focus-visible {
771
+ ${_}
772
+ background-color: transparent;
773
+ }
774
+ `;b.label`
775
+ display: block;
776
+ position: relative;
777
+ padding-left: 35px;
778
+ margin-bottom: 12px;
779
+ cursor: pointer;
780
+ user-select: none;
781
+ font-weight: 300;
782
+ white-space: normal;
783
+ word-break: break-word;
784
+
785
+ input {
786
+ position: absolute;
787
+ opacity: 0;
788
+ cursor: pointer;
789
+ height: 0;
790
+ width: 0;
791
+
792
+ &:checked {
793
+ ~ .check {
794
+ background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
795
+ border: ${t=>t.theme.inputBorder};
796
+
797
+ &:after {
798
+ display: block;
799
+ }
800
+ }
801
+ }
802
+
803
+ &:focus-visible {
804
+ ~ .check {
805
+ ${_}
806
+ }
807
+ }
808
+ }
809
+
810
+ .check:after {
811
+ content: '';
812
+ position: absolute;
813
+ display: none;
814
+ }
815
+ `;b.span`
816
+ position: absolute;
817
+ top: 0;
818
+ left: 0;
819
+ height: 18px;
820
+ width: 18px;
821
+ background-color: #ffffff;
822
+ border: ${t=>t.theme.inputBorder};
823
+ border-radius: 3px;
824
+
825
+ &:after {
826
+ left: 6px;
827
+ top: 3px;
828
+ width: 4px;
829
+ height: 9px;
830
+ border: solid #ffffff;
831
+ border-width: 0 2px 2px 0;
832
+ transform: rotate(45deg);
833
+ }
834
+
835
+ && {
836
+ box-sizing: content-box;
837
+ }
838
+ `;const To=({isRequired:t})=>t?h.jsx(Ho,{children:"*"}):null,ws=({title:t,required:e,children:n,error:s,elementId:r="",description:i="",className:o="",ui:{component:a,error:c}={}})=>{const u=h.jsx(To,{isRequired:e});return h.jsxs(Io,{className:N(o,"humany-form-component"),"data-type":a,"data-error":s,children:[r.length?h.jsxs("label",{htmlFor:r,className:"humany-form-component-title",children:[t,u]}):h.jsxs(Vo,{className:"humany-form-component-title",children:[t,u]}),n,c&&h.jsxs(Bo,{id:`${r}_error`,children:[h.jsx(ke,{size:19,symbol:{type:"Svg",content:"alert"}}),h.jsx("span",{children:c})]}),i&&h.jsx(zo,{className:"humany-form-component-description",children:i})]})},Io=b.div`
839
+ ${t=>t["data-type"]==="AntiSpam"&&"display: none;"}
840
+ > label {
841
+ display: block;
842
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
843
+ margin: 0 0 10px 0;
844
+ font-weight: normal;
845
+ }
846
+ ${t=>{var e;return t["data-error"]&&k.css`
847
+ > input,
848
+ > textarea,
849
+ > select {
850
+ border-color: ${(e=t.theme.colors)==null?void 0:e.warning};
851
+ }
852
+ `}}
853
+ &:not(:last-child) {
854
+ margin: 0 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}} 0;
855
+ }
856
+ label {
857
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
858
+ }
859
+ `,zo=b(xe)`
860
+ margin: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0 0 0;
861
+ display: block;
862
+ font-weight: 300;
863
+ `,Vo=b(xe)`
864
+ display: block;
865
+ font-size: 18px;
866
+ margin: 0 0 10px 0;
867
+ `,Ho=b.strong`
868
+ margin: 0 0 0 5px;
869
+ display: inline-block;
870
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
871
+ `,Bo=b.div`
872
+ && {
873
+ margin: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}} 0 0 0;
874
+ }
875
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
876
+ display: flex;
877
+ align-items: center;
878
+ font-weight: 300;
879
+
880
+ svg {
881
+ margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.small}};
882
+
883
+ circle {
884
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
885
+ }
886
+ }
887
+ `;b(ws)`
888
+ font-weight: 300;
889
+
890
+ input {
891
+ margin: 0 5px 0 0;
892
+ cursor: pointer;
893
+ vertical-align: middle;
894
+ }
895
+ a {
896
+ text-decoration: none;
897
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.link}};
898
+ }
899
+ label {
900
+ display: inline;
901
+ margin-right: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
902
+ }
903
+ `;const un=t=>{var e,n,s;return k.css`
904
+ border: ${t.theme.inputBorder};
905
+ border-radius: ${t.theme.borderRadius};
906
+ padding: ${(e=t.theme.sizes)==null?void 0:e.normal};
907
+ width: 100%;
908
+ font-size: 16px;
909
+ box-sizing: border-box;
910
+ &:focus {
911
+ border-color: ${(n=t.theme.colors)==null?void 0:n.primary};
912
+ }
913
+ ${t["data-focused"]?`border-color: ${(s=t.theme.colors)==null?void 0:s.primary}`:""}
914
+ `};b(si)`
915
+ ${un}
916
+ ${t=>t["data-type"]==="textarea"&&k.css`
917
+ resize: vertical;
918
+ min-height: 100px;
919
+ `}
920
+ `;b(pt)`
921
+ ${t=>ut(t)}
922
+ li {
923
+ display: flex;
924
+ align-items: center;
925
+ }
926
+
927
+ input {
928
+ margin: 0 5px 0 0;
929
+ cursor: pointer;
930
+ }
931
+
932
+ label {
933
+ cursor: pointer;
934
+ }
935
+ `;b.div`
936
+ margin-top: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
937
+ display: flex;
938
+ flex-direction: row;
939
+ span {
940
+ text-align: center;
941
+ align-self: center;
942
+ margin: 0 5px;
943
+ font-size: 1.5em;
944
+ }
945
+ `;b.select`
946
+ ${t=>un(t)}
947
+ font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
948
+
949
+ option {
950
+ font-weight: 300;
951
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
952
+ }
953
+ `;b.div`
954
+ padding: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
955
+ border: ${t=>t.theme.inputBorder};
956
+ border-radius: ${t=>t.theme.borderRadius};
957
+ `;b.div`
958
+ display: flex;
959
+ flex-direction: row;
960
+ width: 100%;
961
+ justify-content: space-between;
962
+ overflow: hidden;
963
+ text-overflow: ellipsis;
964
+ white-space: nowrap;
965
+ margin-bottom: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
966
+ `;b.div`
967
+ display: flex;
968
+ flex-direction: row;
969
+ width: 100%;
970
+ justify-content: space-between;
971
+ `;b.p`
972
+ margin: 0;
973
+ line-height: 2em;
974
+ border: ${t=>t.theme.inputBorder};
975
+ &:hover {
976
+ background-color: rgba(0, 0, 0, 0.1);
977
+ }
978
+ ${t=>{var e;return t["data-current"]&&`border-color: ${(e=t.theme.colors)==null?void 0:e.link};`}}
979
+ ${t=>{var e,n;return t["data-selected"]&&`
980
+ background-color: ${(e=t.theme.colors)==null?void 0:e.link};
981
+ color: #FFF;
982
+ border-color: ${(n=t.theme.colors)==null?void 0:n.link}
983
+ `}}
984
+ `;b(te)`
985
+ flex: 1 0 0;
986
+ text-align: center;
987
+ margin-top: 5px;
988
+ font-weight: bold;
989
+ text-decoration: none;
990
+ border-radius: 0;
991
+ ${t=>t.disabled&&`
992
+ pointer-events: none;
993
+ opacity: .5;
994
+ `}
995
+ &:first-of-type > .humany-date-picker-week-item-date {
996
+ border-top-left-radius: ${t=>t.theme.borderRadius};
997
+ border-bottom-left-radius: ${t=>t.theme.borderRadius};
998
+ }
999
+ &:last-of-type > .humany-date-picker-week-item-date {
1000
+ border-top-right-radius: ${t=>t.theme.borderRadius};
1001
+ border-bottom-right-radius: ${t=>t.theme.borderRadius};
1002
+ }
1003
+ `;b.p`
1004
+ margin-bottom: 5px;
1005
+ `;b(te)`
1006
+ flex: 1 0 auto;
1007
+ align-self: flex-end;
1008
+ text-align: right;
1009
+ `;b(te)`
1010
+ flex: 1 0 auto;
1011
+ align-self: flex-start;
1012
+ text-align: left;
1013
+ `;b.select`
1014
+ ${t=>un(t)}
1015
+ font-family: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.type}};
1016
+
1017
+ option {
1018
+ font-weight: 300;
1019
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.normal}};
1020
+ }
1021
+ `;b.fieldset`
1022
+ border: none;
1023
+ margin: 0;
1024
+ padding: 0;
1025
+ white-space: normal;
1026
+ legend {
1027
+ display: block;
1028
+ font-size: ${t=>{var e;return(e=t.theme.fonts)==null?void 0:e.medium}};
1029
+ line-height: 29px;
1030
+ margin: 0 0 15px 0;
1031
+ font-weight: normal;
1032
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
1033
+ }
1034
+ > span {
1035
+ margin: 15px 0 0 0;
1036
+ display: block;
1037
+ }
1038
+ &:not(:last-child) {
1039
+ margin: 0 0 15px 0;
1040
+ }
1041
+ ${t=>{var e;return t["data-type"]==="Name"&&t["data-multiline-form"]&&k.css`
1042
+ > div {
1043
+ display: grid;
1044
+ grid-template-columns: repeat(2, 1fr);
1045
+ grid-gap: ${(e=t.theme.sizes)==null?void 0:e.medium};
1046
+ div {
1047
+ margin: 0;
1048
+ }
1049
+ }
1050
+ `}}
1051
+ ${t=>{var e;return t["data-type"]==="Address"&&t["data-multiline-form"]&&k.css`
1052
+ > div {
1053
+ display: grid;
1054
+ grid-template-columns: repeat(8, 1fr);
1055
+ grid-gap: ${(e=t.theme.sizes)==null?void 0:e.medium};
1056
+ div {
1057
+ margin: 0;
1058
+ &:nth-child(1) {
1059
+ grid-column: span 6;
1060
+ }
1061
+ &:nth-child(2) {
1062
+ grid-column: span 2;
1063
+ }
1064
+ &:nth-child(3) {
1065
+ grid-column: span 3;
1066
+ }
1067
+ &:nth-child(4) {
1068
+ grid-column: span 5;
1069
+ }
1070
+ }
1071
+ }
1072
+ `}}
1073
+ `;const _o=1e7,Lt={fileName:null,fileSize:null,fileType:null,error:null},qo=t=>!(t>_o);class Fo extends p.Component{constructor(){super(...arguments);x(this,"state",Lt);x(this,"reader");x(this,"input");x(this,"handleFileLoad",n=>{const s=this.reader.result;this.props.prompt(s,{fileName:this.state.fileName})});x(this,"handleFileChange",n=>{const s=this.input.files[0];if(s){if(!qo(s.size)){const r=this.props.componentInstanceProps?this.props.componentInstanceProps.fileSizeErrorLabel:"Attached file exceeds maximum file size.";this.setState({...Lt,error:r}),this.input.value=null,this.props.prompt("",{fileName:""});return}this.setState({...Lt,fileName:s.name,fileSize:s.size,fileType:s.type},()=>{this.reader.readAsDataURL(s)})}})}componentDidMount(){this.reader=new FileReader,this.reader.addEventListener("load",this.handleFileLoad,!1)}componentWillUnmount(){this.reader.removeEventListener("load",this.handleFileLoad)}render(){const{id:n,required:s,disabled:r,accessibility:i={},className:o="",title:a="",placeholder:c="",value:u="",...l}=this.props,d=this.state.fileName?h.jsx(xe,{children:this.state.fileName}):this.props.componentInstanceProps&&this.props.componentInstanceProps.fileUploadHeader?h.jsx("em",{children:this.props.componentInstanceProps.fileUploadHeader}):null;return h.jsxs(Wo,{elementId:n,title:a,required:s,className:N(o,"humany-form-component-file"),id:n,disabled:r,value:u,...l,children:[this.state.error&&h.jsx(Zo,{className:"humany-file-error",children:this.state.error}),h.jsx(Uo,{id:n,type:"file",placeholder:c,"aria-label":c,disabled:r,ref:f=>{this.input=f},onChange:this.handleFileChange,...i}),h.jsx(Ko,{htmlFor:n,role:"button",children:a}),d]})}}x(Fo,"contextTypes",{texts:()=>null});const Wo=b(ws)`
1074
+ font-weight: 300;
1075
+ em {
1076
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.text}};
1077
+ }
1078
+ `,Uo=b.input`
1079
+ width: 0px;
1080
+ height: 0.1px;
1081
+ opacity: 0;
1082
+ overflow: hidden;
1083
+ position: absolute;
1084
+ z-index: -1;
1085
+
1086
+ &:focus-visible + label {
1087
+ ${_}
1088
+ background-color: transparent;
1089
+ }
1090
+ `,Zo=b.div`
1091
+ color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.warning}};
1092
+ padding-bottom: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
1093
+ `,Ko=b.label`
1094
+ ${nn}
1095
+ && {
1096
+ display: inline-block;
1097
+ margin: 0 ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.medium}} 0 0;
1098
+ color: #ffffff;
1099
+ }
1100
+ background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1101
+ min-width: 100px;
1102
+ `;b.div`
1103
+ display: flex;
1104
+ align-items: center;
1105
+ flex-flow: row nowrap;
1106
+
1107
+ > span {
1108
+ z-index: 3;
1109
+ white-space: nowrap;
1110
+ width: 100%;
1111
+ padding-left: ${t=>{var e;return(e=t.theme.sizes)==null?void 0:e.normal}};
1112
+ pointer-events: none;
1113
+ color: rgba(0, 0, 0, 0.4);
1114
+ }
1115
+
1116
+ input {
1117
+ flex: none;
1118
+ margin-left: -100%;
1119
+ text-indent: 50px;
1120
+ }
1121
+ `;b.label`
1122
+ display: block;
1123
+ position: relative;
1124
+ padding-left: 35px;
1125
+ margin-bottom: 12px;
1126
+ cursor: pointer;
1127
+ user-select: none;
1128
+ font-weight: 300;
1129
+ white-space: normal;
1130
+ word-break: break-word;
1131
+
1132
+ input {
1133
+ position: absolute;
1134
+ opacity: 0;
1135
+ cursor: pointer;
1136
+
1137
+ &:checked {
1138
+ ~ .check {
1139
+ background-color: #ffffff;
1140
+ border: 1px solid ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1141
+
1142
+ &:after {
1143
+ display: block;
1144
+ }
1145
+ }
1146
+ }
1147
+
1148
+ &:focus-visible {
1149
+ ~ .check {
1150
+ ${_}
1151
+ }
1152
+ }
1153
+ }
1154
+ `;b.span`
1155
+ position: absolute;
1156
+ top: 0;
1157
+ left: 0;
1158
+ height: 18px;
1159
+ width: 18px;
1160
+ border-radius: 50%;
1161
+ border: ${t=>t.theme.inputBorder};
1162
+
1163
+ &:after {
1164
+ content: '';
1165
+ position: absolute;
1166
+ display: none;
1167
+ }
1168
+
1169
+ &:after {
1170
+ top: 5px;
1171
+ left: 5px;
1172
+ width: 8px;
1173
+ height: 8px;
1174
+ border-radius: 50%;
1175
+ background: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1176
+ }
1177
+
1178
+ && {
1179
+ box-sizing: content-box;
1180
+ }
1181
+ `;b(te)`
1182
+ ${nn}
1183
+ display: block;
1184
+ background-color: ${t=>{var e;return(e=t.theme.colors)==null?void 0:e.primary}};
1185
+ color: #ffffff;
1186
+ margin: 0 0 0 auto;
1187
+ min-width: 100px;
1188
+ `;const de=t=>{if(t){const{Type:e,Content:n}=t;if(e&&n)return{type:e,content:n}}},Bt=t=>t.map(e=>{const n={id:e.Id.toString(),title:e.Name,symbol:de(e.DefaultIcon),activeSymbol:e.ActiveIcon&&de(e.ActiveIcon),description:e.Description||e.Attributes&&e.Attributes.description||"",matches:e.GuidesCount};return e.Children&&e.Children.length&&(n.items=Bt(e.Children)),n}),Y=(t,e)=>t.filter(({Type:n})=>n===e).map(({Id:n,Title:s,Body:r})=>({id:n.toString(),title:s,body:r})),Ot=t=>t.map(({Id:e,Title:n,DefaultIcon:s,ListNotices:r,Notices:i})=>({id:e.toString(),title:n,symbol:de(s),defaultHeaderOptions:{visible:!!r.length},notifications:(r||[]).concat(i||[]).map(({Id:o,Title:a,Body:c,Type:u,Modified:l})=>({id:o.toString(),title:a,body:c,modified:l,expandable:u==="listNotice"}))})),Nt=({Id:t,Title:e,DefaultIcon:n,Exits:[s],ExitType:r,ConfirmationText:i,ExpandFormAutomatically:o,Form:a,Description:c},u)=>{const{Adapter:l}=s||{Adapter:{}},{ClientName:d="",Settings:f={},CustomClientName:m=""}=l,v={id:t.toString(),title:e,description:c,symbol:de(n),clientName:d==="custom.adapter"?m:d,expanded:!0,inline:!0,body:{}};if(d.indexOf("phone")>-1||d.indexOf("freetext")>-1){const{displayTextBeforeClick:y,textBeforeClick:g}=f;y==="true"&&(v.expanded=!1,v.title=g),d.indexOf("phone.text")>-1?v.body.phoneNumber=f.phoneNumber:v.body.freetext=f.freetext}return(d.indexOf("chat.popup")>-1||d.indexOf("link")>-1||d==="custom.adapter"&&r==="custom")&&(v.body=f,v.body.confirmationFallback=i),d.indexOf("ace")>-1&&(v.body=f),a&&a.HasValueComponents&&(u?v.body.form=X.fromLegacyForm(t.toString(),a,u).get():v.body.form=X.fromLegacyForm(t.toString(),a).get(),o||(v.expanded=v.inline=!1)),v},Le=(t=[])=>t.map(({Id:e,Title:n,TotalMatches:s,Symbol:r,DefaultIcon:i,ActiveIcon:o})=>({id:e.toString(),title:n,matches:s,symbol:de(i||r),defaultIcon:de(i),activeIcon:de(o)})),At=t=>t.map(({Id:e,Title:n,Tags:s,FirstPublishedDate:r,Modified:i})=>({id:e.toString(),title:n,tags:Le(s),published:r,modified:i})),Cs=(t,e)=>{switch(t){case Z.MatchByCategory:case Z.Match:{const n={guides:[],matches:0,topNotifications:[],middleNotifications:[],bottomNotifications:[],notificationLists:[],tags:[],byCategory:[]},{Matches:s,TotalMatches:r,Notices:i,NoticeLists:o,Tags:a,ByCategory:c}=e;return n.guides=At(s),n.matches=r,n.byCategory=(c||[]).map(({Id:u,Matches:l,TotalMatches:d})=>({id:u,guides:At(l),matches:d})),n.tags=Le(a),n.notificationLists=Ot(o||[]),n.topNotifications=Y(i||[],"noticeRowTop"),n.middleNotifications=Y(i||[],"noticeRowMiddle"),n.bottomNotifications=Y(i||[],"footerNotice"),n}case Z.Categories:{const{Children:n,GuidesCountTotal:s}=e;return{categories:Bt(n||[]),matches:s}}case Z.Guide:{const{Id:n,Title:s,Body:r,Related:i,Options:o,ConnectionId:a,ContactMethods:c,EnableFeedback:u,HandoverExists:l,FirstPublishedDate:d,Modified:f,ModifiedByDisplayName:m,FirstPublishedByDisplayName:v,Categories:y,Tags:g,SeoMetaDescription:w,SeoAllowIndex:C,Perspectives:j,PerspectiveKey:$,Translations:E}=e,H=$||Object.values(j).find(S=>S===a)||j.Default||null,O={guide:{id:n.toString(),title:s,body:r,modified:f,published:d,modifiedBy:m,publishedBy:v,connection:a,categories:y,hasHandover:l,allowFeedback:u,seoMetaDescription:w,seoAllowIndex:C,perspectives:j,perspective:H,translations:Object.keys(E||{}).reduce((S,P)=>(S[P]=E[P].toString(),S),{})},related:At(i||[]),dialog:[],contactMethods:(c||[]).map(S=>Nt(S)),tags:Le(g)};return(o||[]).forEach(({CanAccess:S,Description:P,ConnectionId:D,Properties:A})=>{if(!S)return;const I={id:n.toString(),title:P,connection:D,connectionKey:A.ConnectionKey,type:Ge.default,parent:{id:n.toString(),title:s,tags:Le(g)}};if(A.Type==="Guide"||A.Type==="Link")switch(A.Id&&(I.id=A.Id.toString()),A.Uri&&(I.href=A.Uri),A.Target&&(I.target=A.Target),A.Type){case"Guide":I.type=Ge.guide;break;case"Link":I.type=Ge.link;break}O.dialog.push(I)}),O}case Z.Contacts:{const{Children:n,Matches:s,Notices:r,NoticeLists:i}=e;return{contactMethods:(s||[]).map(a=>Nt(a)),categories:Bt(n||[]),topNotifications:Y(r||[],"noticeRowTop"),middleNotifications:Y(r||[],"noticeRowMiddle"),bottomNotifications:Y(r||[],"footerNotice"),notificationLists:Ot(i||[])}}case Z.ContactMethod:{const{ContactMethod:n}=e;return Nt(n||{})}case Z.Tags:case Z.TagsOnGuides:return Le(e||[]);case Z.Notifications:{const{Notices:n,NoticeLists:s}=e;return{topNotifications:Y(n||[],"noticeRowTop"),middleNotifications:Y(n||[],"noticeRowMiddle"),bottomNotifications:Y(n||[],"footerNotice"),notificationLists:Ot(s||[])}}default:return{}}};var $s=(t=>(t.Guide="guide",t.Guides="guides",t.GuidesByCategory="guides-by-category",t.RowNotifications="row-notices",t.NotificationLists="notification-lists",t.GuideCategories="guide-categories",t.ContactMethodCategories="contact-method-categories",t.ContactMethod="contact-method",t.ContactMethods="contact-methods",t.Tags="tags",t.TagsOnGuides="tagsonguides",t))($s||{}),Z=(t=>(t.Match="match",t.Categories="categories",t.Guide="guide",t.Contacts="contacts",t.ContactMethod="contact-method",t.MatchByCategory="match-by-category",t.Tags="tags",t.TagsOnGuides="tagsonguides",t.Notifications="notifications",t))(Z||{}),ks=(t=>(t.Positive="Positive",t.Negative="Negative",t))(ks||{}),Es=(t=>(t.POPULARITY_DESCENDING="popularity-descending",t.ALPHABETIC_ASCENDING="alphabetic-ascending",t.ALPHABETIC_DESCENDING="alphabetic-descending",t.MODIFIED_ASCENDING="modified-ascending",t.MODIFIED_DESCENDING="modified-descending",t.PUBLISHED_ASCENDING="published-ascending",t.PUBLISHED_DESCENDING="published-descending",t))(Es||{});const _t=t=>{switch(t){case"guides":return"match";case"guides-by-category":return"match-by-category";case"guide":return"guide";case"guide-categories":return"categories";case"contact-method-categories":case"contact-methods":return"contacts";case"contact-method":return"contact-method";case"tags":return"tags";case"tagsonguides":return"tagsonguides";case"notification-lists":case"row-notices":return"notifications";default:throw"error"}},Go=async t=>{const{invoke:e}=t.get("$widget");return await e("renderState")===B.hidden};class Ne{constructor(e,n){x(this,"queries",new Map);x(this,"lastTake",0);x(this,"events");x(this,"getUnresolvedQueries",()=>{let e=0;return this.queries.forEach((n,s)=>{n.some(i=>!i.resolved)&&(e=1)}),e});this.container=e,this.matchingClient=n,this.events=e.get("$widget").events,this.events.subscribe("widget:settings-updated",()=>this.queries=new Map),this.events.subscribe("widget:render-state-changed",(s,{next:r,previous:i})=>{i===B.hidden&&r===B.open&&this.fetchAllUnresolvedQueries()})}static getInstance(e,n="dataClient"){return J(this)(()=>e.getAsync(n).then(async s=>{let r=await e.getAsync("matchingClient");r||(r=await bn(e),e.registerAsync("matchingClient",()=>r));let i=s;return i||(i=new Ne(e,r),e.registerAsync(n,()=>i)),i}))}fetch(e,n,s){return new Promise((r,i)=>{n.take&&(this.lastTake=+(n.take||0)),ee(n);const o=_t(e);let a=this.queries.get(o)||[],c=a.find(u=>Se(u.params,n))||null;if(c&&(s!=null&&s.noCache)){const u=a.findIndex(l=>Se(l.params,n));a=[...a.slice(0,u),...a.slice(u+1)],c=null}if(c){const u=a.indexOf(c);if(c.resolved?(this.events.dispatch("data-client:fetched",{params:n,type:o,response:c.data,unresolvedQueries:this.getUnresolvedQueries()}),this.track(c.data,o,c.error),c.data&&c.error?i({error:c.error}):r(c.data)):c.resolvers.push({resolve:r,reject:i}),a.splice(u,1),a.push(c),this.queries.set(o,a),!c.loading&&!c.resolved)return this.runQuery(o,n)}else return a.push({params:n,resolved:!1,loading:!0,data:{},resolvers:[{resolve:r,reject:i}]}),this.queries.set(o,a),this.runQuery(o,n)}).then(r=>Kt(r))}read(e,n){const{select:s}=n,r=_t(e);return(this.queries.get(r)||[]).reduce((a,c)=>{if(typeof s=="function"){const u=s(c.data);u&&a.push(u)}else a.push(c.data);return a},[])}feedback(e,n,s){return this.matchingClient.giveFeedback(e,n,s)}setLoadingStatus(e,n,s){const r=this.queries.get(e)||[],i=r.find(o=>Se(o.params,n));i&&(i.loading=s),this.queries.set(e,r)}async runQuery(e,n){const{searchPhrase:s="",categories:r="0",contactMethodCategoryId:i="0",contactMethodId:o="0",tagId:a=void 0,take:c=5,connection:u="",guideId:l,expandCategories:d="descendants",currentCategory:f,sorting:m="popularity-descending",guideIds:v=[]}=n,y=s.toString().trim();if(await Go(this.container))return Promise.resolve();switch(e){case"match":{const g=w=>{const[C,j]=w.split("-");return{type:new Map([["popularity","popularity"],["alphabetic","title"],["modified","lastModified"],["published","firstPublished"]]).get(C),direction:j}};return v.length?this.matchingClient.customRequest("guides","POST",{configuration:{ids:v,take:+c}}).then(w=>w&&this.handleResponse(w,e,n)):this.matchingClient.match(y,{categories:r==="0"?[]:Array.isArray(r)?r:[+r],take:+c,tags:a,sorting:g(m),ids:v}).then(w=>w&&this.handleResponse(w,e,n))}case"match-by-category":return this.matchingClient.match(y,{groupByCategory:!0,categories:r==="0"?[]:Array.isArray(r)?r:[+r],take:+c,tags:a}).then(g=>g&&this.handleResponse(g,e,n));case"guide":return this.matchingClient.getGuide(l,{connectionId:u}).then(g=>{g&&this.handleResponse(g,e,n)}).catch(g=>{const w={message:"Something went wrong.",status:g.status||400};w.status===404&&(w.message="The guide could not be found."),this.handleResponse({},e,n,w)});case"categories":return this.matchingClient.getCategories({phrase:y,expand:d,tags:a}).then(g=>g&&this.handleResponse(g,e,n));case"contacts":return l?this.matchingClient.contactMethods(+l,{phrase:y}).then(g=>g&&this.handleResponse(g,e,n)):this.matchingClient.contacts(+i,{phrase:y}).then(g=>g&&this.handleResponse(g,e,n));case"contact-method":return this.matchingClient.getContactMethod(+o,{guideId:l,currentCategory:f}).then(g=>g&&this.handleResponse(g,e,n));case"tags":return this.matchingClient.customRequest("tags","GET",{configuration:{take:999999,phrase:y,categories:r==="0"?[]:Array.isArray(r)?r:[+r]}}).then(g=>g&&this.handleResponse(g,e,n));case"tagsonguides":return this.matchingClient.customRequest("tagsonguides","GET",{configuration:{take:999999,phrase:y,categories:r==="0"?[]:Array.isArray(r)?r:[+r],tags:a}}).then(g=>g&&this.handleResponse(g,e,n));case"notifications":return this.matchingClient.customRequest("notices","GET",{configuration:{phrase:y,categories:r==="0"?[]:Array.isArray(r)?r:[+r]}}).then(g=>g&&this.handleResponse(g,e,n))}}handleResponse(e={},n,s,r){const i=this.queries.get(n)||[],o=i.find(a=>Se(a.params,s));if(o){const a=r||Cs(n,e);this.track(a,n,r),o.resolvers.forEach(u=>{r?u.reject({error:a}):u.resolve(a)});const c=i.indexOf(o);c>-1&&i.splice(c,1),i.push({...o,error:r,resolvers:[],data:a,resolved:!0}),this.setLoadingStatus(n,s,!1),this.queries.set(n,i),r||this.events.dispatch("data-client:fetched",{type:n,params:s,response:a,unresolvedQueries:this.getUnresolvedQueries()})}}fetchAllUnresolvedQueries(){for(const[e,n]of this.queries)n.filter(s=>!s.resolved).forEach(s=>{this.runQuery(e,s.params)})}track(e={},n,s){const r=this.container.get("$widget");r&&!s?r.events.dispatch("tracking:service-client-response",{type:n,data:e}):r&&r.events.dispatch("tracking:service-client-error",{type:n,error:s})}static create(e){return e.getAsync("matchingClient").then(async n=>{if(n)return new Ne(e,n);const s=await bn(e);return e.registerAsync("matchingClient",()=>s),new Ne(e,s)})}getClient(){return this.matchingClient}}var qt=(t=>(t.back="back",t.forth="forth",t))(qt||{});const Yo=(t,e,n)=>typeof n[t]=="number"&&typeof n[e]=="number"&&n[t]>n[e]?"back":"forth",Ss=({views:t,location:e,render:n})=>h.jsx(Be.Switch,{location:e&&{...e,pathname:e.pathname.split("?")[0]},children:[...Object.keys(t).filter(s=>!!t[s].path),...Object.keys(t).filter(s=>!t[s].path)].map(s=>{const{path:r}=t[s];return r?Array.isArray(r)?r.map(i=>h.jsx(Be.Route,{exact:!0,path:i,render:()=>n(s)},s)):h.jsx(Be.Route,{exact:!0,path:r,render:()=>n(s)},s):h.jsx(Be.Route,{render:()=>n(s)},s)})}),Qo=b.div`
1189
+ position: relative;
1190
+ width: 100%;
1191
+ flex: 1;
1192
+ `,Xo=b(Qn)`
1193
+ position: absolute;
1194
+ left: 0;
1195
+ right: 0;
1196
+ ${t=>!!t.animationCss&&t.animationCss}
1197
+ ${t=>!!t.scrollableCss&&t.scrollableCss}
1198
+ `,Jo={index:1,search:2,browse:3,guide:4,contact:5,"contact-method":6,conversation:7},ea=({className:t="",...e})=>{const[n,s]=p.useState("index"),[r,i]=p.useState(qt.forth),o=Wn(),a=Jt(),c=Fn(),u=ct(),l=q(),d=Pe(),{gap:f="0"}=u,{columns:m=1,animation:v="none",scrollable:y=!1,...g}=c,[w,C]=en(y);if(!d||!a)return null;const{location:j}=a;o.name!==n&&o.name!==""&&v&&(i(Yo(n,o.name,Jo)),s(o.name));const{views:$}=l.get("$settings");if(!Object.keys($).length)return null;const E=(O,S,P)=>{const D=H(S,P),A=d.getChildren(O)[0];return h.jsx(Xo,{...e,...g,scrollableCss:w,ref:C,columns:m,gap:f,...D,className:N(t,"humany-view"),children:h.jsx(vt,{id:A.id,branch:"default"})})},H=(O,S)=>{if(v==="slide"||v==="fade")return{animationCss:It.composeViewTransition(O,v,S),"data-state":O}};return h.jsx(Qo,{className:"humany-animated-view",children:h.jsx(Rt.TransitionGroup,{component:null,childFactory:O=>p.cloneElement(O,{direction:r}),children:h.jsx(Rt.Transition,{timeout:{enter:500,exit:500},onEnter:O=>O==null?void 0:O.clientHeight,unmountOnExit:!0,direction:qt.forth,children:(O,{direction:S})=>h.jsx(Ss,{views:$,location:j,render:P=>E(P,O,S)})},n)})})},ta=b(Qn)`
1199
+ ${t=>!!t.scrollableCss&&t.scrollableCss}
1200
+ `,na=({className:t="",...e})=>{const n=Fn(),s=ct(),r=q(),i=Pe(),{views:o}=r.get("$settings"),{gap:a="0"}=s,{columns:c=1,animation:u="none",scrollable:l=!1,...d}=n,[f,m]=en(l);return i?h.jsx(ta,{...e,...d,scrollableCss:f,ref:m,columns:c,gap:a,className:N(t,"humany-view"),children:h.jsx(Ss,{views:o,render:v=>{const y=i.getChildren(v)[0];return h.jsx(vt,{id:y.id,node:y,branch:"default"})}})}):null},Te=t=>{var e,n;return k.css`
1201
+ outline: none;
1202
+ box-sizing: border-box;
1203
+ * {
1204
+ box-sizing: border-box;
1205
+ outline: none;
1206
+ }
1207
+
1208
+ grid-column: ${t["data-indent"]?`${t["data-indent"]+1} / ${t["data-indent"]+(t["data-width"]||0)+1}`:`span ${t["data-width"]}`};
1209
+
1210
+ ${((e=t.theme.fonts)==null?void 0:e.type)&&`
1211
+ font-family: ${t.theme.fonts.type};
1212
+
1213
+ input, textarea {
1214
+ font-family: ${t.theme.fonts.type};
1215
+ }
1216
+ `}
1217
+
1218
+ ${((n=t.theme.fonts)==null?void 0:n.base)&&`
1219
+ font-size: ${t.theme.fonts.base};
1220
+ `}
1221
+
1222
+ &:focus-visible {
1223
+ ${Gn(t)};
1224
+ }
1225
+ `},sa=b(na)`
1226
+ ${t=>Te(t)}
1227
+ `,ra=b(ea)`
1228
+ ${t=>Te(t)}
1229
+ `,ia=b.div`
1230
+ text-align: center;
1231
+ ${t=>{var e,n,s;return typeof((e=t.theme.colors)==null?void 0:e.warning)<"u"&&k.css`
1232
+ color: ${(n=t.theme.colors)==null?void 0:n.warning};
1233
+ border: 2px dashed ${(s=t.theme.colors)==null?void 0:s.warning};
1234
+ `}}
1235
+ ${t=>typeof t.theme.borderRadius<"u"&&`border-radius: ${t.theme.borderRadius};`}
1236
+ ${t=>Te(t)}
1237
+ `,oa=p.forwardRef(({className:t="",children:e,...n},s)=>{const r=qr(),{name:i,type:o,id:a}=_n(),c=p.useMemo(()=>r?b(r)`
1238
+ ${Te}
1239
+ ${Tn}
1240
+ `:null,[r]);return typeof r>"u"?null:r===null||c===null?process.env.NODE_ENV!=="production"?h.jsx(ia,{...n,title:`type: ${o}, definition-id: ${i}, instance-id: ${a}`,className:N(t,"humany-non-resolved-component"),children:h.jsx(dt,{variant:"h5",children:"Non Resolved Component Type"})}):null:h.jsx(p.Suspense,{fallback:null,children:h.jsx(c,{ref:s,...n,className:N(t,"humany-component",`humany-component-${i}`),children:e})})}),aa=t=>{const e=Pe(t),n=$e(),[s,r]=p.useState({}),i=he();return p.useEffect(()=>{e&&i.current&&r(e.attributes.properties)},[e,t,i]),p.useEffect(()=>{if(n){const o=n.events.subscribe("components:properties-changed",(a,c)=>{e===c.node&&i.current&&r(c.node.attributes.properties)});return()=>{o()}}},[n,i,t,e]),s},ca=(t,e)=>e?!0:typeof t=="string"?t==="full":t>0,vt=p.forwardRef(({className:t="",id:e,branch:n,node:s,ariaLabel:r,tabIndex:i,context:o,...a},c)=>{const u=$e(),l=q(),[d,f]=p.useState(),m=_r(),v=ct(e),y=aa(e),{size:g="none",indent:w=0}=Wr(e),C=ca(g,s);if(p.useEffect(()=>{if(u){if(e&&!s){const D=u.nodes.get(e);if(D&&(f(Tt(D,n)),C)){const A=D.mount(l);return()=>{A()}}}else if(s){f(Tt(s,n));const D=s.mount(l);return()=>{D()}}}},[u,e,s,C]),!d||!C)return null;const j={...v,...o||{}},{cardinal:$,fonts:E={},accessibility:H={},...O}=j,S={type:E.type,base:E.base||"16px",small:E.small||"0.8em",normal:E.normal||"1em",medium:E.medium||"1.2em",large:E.large||"1.6em",huge:E.huge||"2.5em"},P={...O,fonts:S,accessibility:{...H}};return typeof $=="number"&&(P.sizes={cardinal:$,small:`${$}px`,normal:`${$*3}px`,medium:`${$*5}px`,large:`${$*8}px`}),h.jsx(k.ThemeProvider,{theme:P,children:h.jsx(Xt.Provider,{value:d,children:h.jsx(Hn.Provider,{value:y,children:(()=>{const D={"data-width":g==="full"?m:Math.min(g,m),"data-indent":w,"data-name":d.name,"data-node-id":d.id,"data-component-type":d.type,"aria-label":r,tabIndex:i,id:d.id,role:y&&y.role,...a};switch(d.type){case"view":return typeof y.animation=="string"&&y.animation!=="none"?h.jsx(ra,{...D,className:t}):h.jsx(sa,{...D,className:t});default:{const A=Yt(y);return h.jsx(oa,{ref:c,...D,...A,className:t})}}})()})})})}),js=({builder:t})=>{const e=q(),[n,s]=p.useState(null);return p.useEffect(()=>{e.getAsync("components").then(r=>t(r).then(i=>{s(i)}))},[]),p.useEffect(()=>()=>{n&&e.getAsync("components").then(r=>{r.nodes.detached=r.nodes.detached.filter(i=>i.id!==n.id)})},[n]),n?h.jsx(vt,{id:n.id,node:n,branch:"default"}):null},la=Object.freeze(Object.defineProperty({__proto__:null,default:js},Symbol.toStringTag,{value:"Module"})),ua=p.lazy(()=>Promise.resolve().then(()=>la)),da=({showSearch:t=!1})=>{const e=k.useTheme(),n=q();return h.jsx(p.Suspense,{fallback:null,children:h.jsx(ua,{builder:s=>n.get("settings").then(r=>{var u;const{properties:i,context:o}=Object.keys(r.components).reduce((l,d)=>(r.components[d].type==="not-found"&&(l.properties=r.components[d].properties,l.context=r.components[d].context),l),{properties:{},context:{}});i.showSearch=t;const a=s.createNode("area",{detached:!0});if(a.name="not-found-area",a.writeLayout({size:"full"}),t){const l=Object.keys(r.components).reduce((f,m)=>r.components[m].type==="search"?r.components[m].properties:f,{}),d=s.createNode("search",{detached:!0});d.writeLayout({size:"full"}),d.writeProperties({"css-margin-bottom":((u=e==null?void 0:e.sizes)==null?void 0:u.normal)||"15px",...l}),a.appendChild(d)}const c=s.createNode("not-found",{detached:!0});return c.writeLayout({size:"full"}),c.writeProperties(i),c.writeContext(o),a.appendChild(c),a})})})},ha=t=>{if(t){const{type:e,content:n}=t;switch(e){case"FontAwesome":return`<i class="humany-icon fa fa-${n}"></i>`;case"Uri":return`<i class="humany-icon humany-custom-icon" style="background: url(${n}) no-repeat center center;background-size: contain;"></i>`;default:return""}}},fa=t=>{const e=(r,i)=>{r&&(i?r.classList.add("humany-tabbing"):r.classList.remove("humany-tabbing"))},n=r=>{r.key==="Tab"?e(t,!0):r.key==="Enter"&&document.activeElement&&document.activeElement.classList.contains("humany-trigger")||e(t,!1)},s=r=>{document.activeElement&&document.activeElement.classList.contains("humany-trigger")&&document.activeElement.classList.contains("humany-tabbing")||e(t,!1)};return document.addEventListener("keydown",n),document.addEventListener("click",s),()=>{document.removeEventListener("keydown",n),document.removeEventListener("click",s)}};function pa(t,e){const{symbol:n,widgetName:s,label:r="",ariaLabel:i="",tooltip:o=""}=e;t.classList.add("humany-trigger"),t.classList.add(`humany_${s}`),r.length&&t.classList.add("humany-has-text"),i.length&&!t.getAttribute("aria-label")&&t.setAttribute("aria-label",i),i.length&&!t.getAttribute("tabindex")&&t.setAttribute("tabindex","0"),o.length&&!t.getAttribute("title")&&t.setAttribute("title",o);const a=ha(n)||"";return t.innerHTML=`${a}
1241
+ <span class="humany-close">
1242
+ <svg width="18" height="9" viewBox="0 0 18 9" fill="none" xmlns="http://www.w3.org/2000/svg">
1243
+ <path d="M9 9C8.81794 9.00045 8.63759 8.96634 8.46939 8.89965C8.3012 8.83295 8.14851 8.735 8.02015 8.61145L0.194523 1.12367C0.068294 0.99862 -0.00155266 0.831133 2.61958e-05 0.657285C0.00160506 0.483436 0.0744832 0.317136 0.202964 0.194202C0.331445 0.0712675 0.505249 0.00153576 0.686941 2.50649e-05C0.868634 -0.00148563 1.04368 0.0653456 1.17437 0.186125L9 7.6739L16.8256 0.186125C16.9563 0.0653456 17.1314 -0.00148563 17.3131 2.50649e-05C17.4948 0.00153576 17.6686 0.0712675 17.797 0.194202C17.9255 0.317136 17.9984 0.483436 18 0.657285C18.0016 0.831133 17.9317 0.99862 17.8055 1.12367L9.97985 8.61145C9.85149 8.735 9.6988 8.83295 9.53061 8.89965C9.36241 8.96634 9.18206 9.00045 9 9Z" fill="white"/>
1244
+ </svg>
1245
+ </span>
1246
+ <span class="humany-loader">
1247
+ <svg viewBox="25 25 50 50">
1248
+ <circle
1249
+ cx="50"
1250
+ cy="50"
1251
+ r="20"
1252
+ fill="none"
1253
+ stroke="#000"
1254
+ stroke-width="2"
1255
+ stroke-miterlimit="10" />
1256
+ </svg>
1257
+ </span>
1258
+ ${r.length?`<span>${r}</span>`:""}`,setTimeout(()=>t&&t.classList.add("humany-rendered")),fa(t)}function ma(t,e){t instanceof HTMLElement?(e&&t.setAttribute("title",e),t.classList.remove("humany-active"),t.classList.remove("humany-loading")):t instanceof Array&&t.forEach(n=>{e&&n.setAttribute("title",e),n.classList.remove("humany-active"),n.classList.remove("humany-loading")})}function ga(t){t instanceof HTMLElement?(t.classList.remove("humany-active"),t.classList.add("humany-loading")):t instanceof Array&&t.forEach(e=>{e.classList.remove("humany-active"),e.classList.add("humany-loading")})}function Ls(t,e){t instanceof HTMLElement?(e&&t.setAttribute("title",e),t.classList.add("humany-active"),t.classList.remove("humany-loading")):t instanceof Array&&t.forEach(n=>{e&&n.setAttribute("title",e),n.classList.add("humany-active"),n.classList.remove("humany-loading")})}var ue=(t=>(t.Inline="inline",t.Link="link",t.Badge="badge",t.Unsupported="unsupported",t))(ue||{});const ya=(t,e)=>t&&e?"both":t?"widgetDOM":e?"triggerDOM":"none",Os=t=>t?typeof t=="boolean"&&t?"link":typeof t=="object"&&!Array.isArray(t)?"badge":"unsupported":"inline",va=(t,e,n,s,r=!1)=>{var u,l;const i=ya(e,n),o=Os(s),a={widgetDOMElement:e?e.cloneNode(!0):void 0,triggerDOMElement:n?n.cloneNode(!0):void 0},c={triggerType:o,cachedOriginals:a,widgetDOMElement:document.createElement("div")};switch(i){case"both":{c.widgetDOMElement=e||document.createElement("div"),o!=="inline"&&(c.triggerDOMElement=n);break}case"widgetDOM":{if(c.widgetDOMElement=e||document.createElement("div"),o!=="inline"){const d=document.body.appendChild(document.createElement("a"));o==="link"&&(d.innerText=t),c.triggerDOMElement=d}break}case"triggerDOM":{const d=document.createElement("div");c.widgetDOMElement=d,o==="inline"?(d.id=(n==null?void 0:n.id)||"",r?(d.style.display="none",(u=n==null?void 0:n.parentNode)==null||u.appendChild(d),c.callback=()=>{var f;(f=n==null?void 0:n.parentNode)==null||f.replaceChild(d,n),d.style.display=(n==null?void 0:n.style.display)||"block"}):(l=n==null?void 0:n.parentNode)==null||l.replaceChild(d,n),c.cachedOriginals.widgetDOMElement=n,c.cachedOriginals.triggerDOMElement=void 0):(c.widgetDOMElement=document.body.appendChild(d),c.triggerDOMElement=n);break}case"none":{const d=document.body.appendChild(document.createElement("div"));if(c.widgetDOMElement=d,o!=="inline"){const f=document.body.appendChild(document.createElement("a"));o==="link"&&(f.innerText=t),c.triggerDOMElement=f}break}}return c},ba="modals";class xa{constructor(e,n){x(this,"container");x(this,"unsubscribe",[]);this.options=n,this.container=e.createChild(this),this.container.register("widgetDOMElement",this.options.widgetDOMElement),this.container.register("triggerDOMElement",this.options.triggerDOMElement);const s=this.container.get("$widget");this.options.widgetDOMElement.classList.add("humany-widget"),this.options.widgetDOMElement.classList.add(`humany_${s.name}`);const r=e.get("widgetDOMElements")||[];e.register("widgetDOMElements",[...r,this.options.widgetDOMElement])}render(){const{widgetDOMElement:e,triggerDOMElement:n}=this.options,s=this.container.get("$widget");return e.getAttribute("data-rendered")==="true"?Promise.resolve():(n&&this.options.triggerType===ue.Badge&&ga(n),Promise.resolve().then(()=>require("./render-6b17449a.js")).then(r=>r.default(this.container,e)).then(()=>{if(e.setAttribute("data-rendered","true"),n&&this.options.triggerType===ue.Badge){const i=this.options.triggerOptions.openTooltip;Ls(n,i)}Js(this.container,e);const r=this.container.get("$environment").widgets.all();K(this.container,ba,M.Session).then(i=>{i&&i.forEach(o=>{r.find(a=>a.name===o.name&&a.state==="activated")&&s.events.dispatch("widget:modal-opened",o)})})}))}renderBadge(e){const{triggerDOMElement:n}=this.options;if(!n)return;n.getAttribute("role")||n.setAttribute("role","button");const{name:s}=this.container.get("$widget"),{label:r,symbol:i,ariaLabel:o,closedTooltip:a,openTooltip:c}=e,u={closedTooltip:a,openTooltip:c};this.options.triggerOptions=u;const l=pa(n,{label:r,symbol:i,ariaLabel:o,widgetName:s,tooltip:a});this.unsubscribe.push(l)}dispose(){return Promise.resolve().then(()=>require("./unmount-7ebc3b77.js")).then(e=>{var r,i,o,a;const{triggerDOMElement:n,widgetDOMElement:s}=this.options;e.default(s),this.options.cachedOriginals.widgetDOMElement&&s&&((r=s.parentNode)==null||r.replaceChild(this.options.cachedOriginals.widgetDOMElement,s)),this.options.cachedOriginals.triggerDOMElement&&n&&((i=n.parentNode)==null||i.replaceChild(this.options.cachedOriginals.triggerDOMElement,n)),this.unsubscribe.forEach(c=>{c()}),(o=s.parentNode)==null||o.removeChild(s),(a=n==null?void 0:n.parentNode)==null||a.removeChild(n)})}}const Ue="changesets",wa=t=>{const e={tags:t.tags};return t.context&&typeof t.context!="function"&&(e.context=t.context),t.properties&&typeof t.properties!="function"&&(e.properties=t.properties),t.layout&&typeof t.layout!="function"&&(e.layout=t.layout),e};class dn{constructor(e,n){this.container=e,this.storageWriter=n}static create(e){return oe(e,Ue,V.Necessary,{medium:M.Local}).then(n=>new dn(e,n))}write(e,n,s,r){return J(this)(()=>K(this.container,Ue,M.Local).then((i={})=>{const{keys:o=[],items:a={}}=i,c=o.indexOf(e);return c>-1&&o.splice(c,1),o.push(e),a[e]={options:r,attributes:wa(s),rules:n.rules},this.storageWriter({keys:o,items:a})}))}remove(e){return J(this)(()=>K(this.container,Ue,M.Local).then((n={})=>{const{keys:s=[],items:r={}}=n,i=s.indexOf(e);if(i>-1)return s.splice(i,1),delete r[e],this.storageWriter(n)}))}load(e){return J(this)(()=>K(this.container,Ue,M.Local).then((n={})=>{const{keys:s=[],items:r={}}=n;s.forEach(i=>{const o=r[i];if(o){const{rules:a,attributes:c,options:u}=o;e.write({attributes:c,options:u,target:new it(e,a)})}})}))}}const Ca=t=>{const{container:e}=t;return dn.create(e).then(n=>{const s=e.get("$settings"),r={localStorage:n},i=new Gt(t,r),o=Mn(i,s);return t.events.subscribe("widget:state-change",(a,c)=>{c.state===Zt.Deactivating&&o()}),i})},$a=t=>Promise.resolve().then(()=>require("./index-89e0c636.js")).then(({RoutingService:e,HistoryMode:n})=>t.get("settings").then(s=>{const{routing:{initialPath:r="/",mode:i=n.scopedHash,basePath:o},views:a}=s;return new e(t,{initialPath:r,mode:i,routes:Object.keys(a).map(u=>({name:u,path:a[u].path})),basePath:o})})),ka=t=>Promise.resolve().then(()=>require("./index-da27700c.js")).then(({StorageProvider:e})=>new e),Ea=t=>Promise.resolve().then(()=>require("./index-37d41a7c.js")).then(({ActionResolver:e})=>new e(t)),Sa=t=>Promise.resolve().then(()=>require("./index-37d41a7c.js")).then(({ComponentResolver:e})=>new e(t)),ja=t=>Promise.resolve().then(()=>require("./index-37d41a7c.js")).then(({ComponentPlatform:e,createComponentModel:n})=>Ca(t.get("$widget"))),Mt="$settings",Ze="open",Sn="activeStickyWidget";class La extends Ws{constructor(n){super(n);x(this,"outlets",new Map);x(this,"activated");x(this,"subs",[]);x(this,"handleBootstrapping",n=>{const s={triggerDOMElement:n.sourceDOMElement,withRenderState:"storage"};this.container.get("settings").then(r=>{const{activate:i}=r;(typeof i>"u"||i===null||i===!0)&&(this.activated=(this.activated||this.widget.activate()).then(()=>this.attach(s)))})});this.container.registerAsync("storage",()=>ka(this.container)),this.container.registerFactory("settings",()=>K(this.container,Mt,M.Local).then((s={})=>({...this.container.get("$settings"),...s}))),zs(this,"load",this.handleBootstrapping),this.container.registerAsync("componentResolver",()=>Sa(this.container)),this.container.registerAsync("router",()=>$a(this.container)),this.container.registerAsync("actionResolver",()=>Ea(this.container)),this.container.register("matchMedia",window.matchMedia),this.container.registerAsync("components",()=>ja(this.container))}initialize(){const n=this.container.getManyAsync("actionResolver","router","components"),s=this.container.get("csp");return s&&(window.webprovisionsEnvironmentVariables||(window.webprovisionsEnvironmentVariables={}),window.webprovisionsEnvironmentVariables.cspNonce=s.nonce),Promise.all([n,this.container.get("settings")]).then(([{actionResolver:r,router:i,components:o},a])=>{var l;r.subscribe(this.widget.name,(d,f,m)=>this.onAction(f,m));const c=d=>{o.nodes.query({type:"view"}).forEach(f=>{o.setSwitch(f,d)})},u=((l=i.getInitialRoute())==null?void 0:l.name)||"index";return c(u),this.events.subscribe("widget:data-loaded",(d,{element:f})=>{this.widget.container.get("seoConfiguration")&&this.events.dispatch("widget:preloaded-replaced",{element:f})}),this.events.subscribe("router:change",(d,{previous:f={routeData:{}},next:m={routeData:{}}})=>{const{routeData:v}=f,{routeData:y}=m,g=Object.keys(a.views).reduce((w,C)=>typeof a.views[C].path>"u"?C:w,"");!y.name&&g?c(g):c(y.name),ee(v&&v.params),ee(y&&y.params),this.container.getAsync("actionResolver").then(w=>{w.action(this.widget.name,"routeChange",{next:y,previous:v})})}),i.initialize()})}attach(n={}){return this.container.get("settings").then(({trigger:s})=>{var m,v;const{widgetDOMElement:r,key:i=Re(),triggerDOMElement:o,withRenderState:a}=n,u=Os(s)===ue.Inline&&((o==null?void 0:o.childElementCount)||0)>0,l=va(this.widget.name,r,o,s,u);this.outlets.size<1&&!a&&this.setRenderState("unset");const d=()=>{const y=()=>g.querySelectorAll("[data-loading=true]").length===0,[g]=this.widget.container.get("widgetDOMElements"),w=($,E)=>{y()&&(l.callback&&l.callback(),E.disconnect())},C={attributes:!0,subtree:!0,childList:!0};y()&&l.callback&&l.callback(),new MutationObserver(w).observe(g,C)};u&&this.widget.container.getAsync("dataClient").then(({events:y})=>{y.subscribe("data-client:fetched",(g,w)=>{w.unresolvedQueries===0&&d()})});const f=this.getOrCreateViewOutlet(i,l);if(this.outlets.set(i,f),this.widget.events.dispatch("widget:attached",{},{bubbles:!0}),l.triggerType===ue.Badge&&s&&((m=l.triggerDOMElement)==null||m.setAttribute("aria-expanded","false"),f==null||f.renderBadge(s)),l.triggerType!==ue.Inline&&((v=l.triggerDOMElement)==null||v.addEventListener("click",y=>{y.preventDefault(),this.container.get("settings").then(({trigger:g})=>{f.render().then(()=>this.renderState()).then(w=>g&&g.action&&g.action==="hide"?w===B.open?this.hide():this.open():w===B.open?this.close():this.open())})})),this.outlets.size>1)return this.renderState().then(y=>{this.triggerStateIfApplicable(y)});if(a)return a==="storage"?this.renderState().then(y=>{if(l.triggerType===ue.Inline){this.triggerStateIfApplicable("open");return}this.triggerStateIfApplicable(y)}):this.triggerStateIfApplicable(a)})}detach(n){if(n){if(this.outlets.has(n)){const s=this.outlets.get(n);s==null||s.dispose(),this.outlets.delete(n);return}process.env.NODE_ENV!=="production"&&console.warn(`detach(): Could not find View Outlet with key ${n}`);return}this.outlets.forEach(s=>{s.dispose()}),this.outlets.clear()}triggerStateIfApplicable(n){return this.container.getAsync("router").then(s=>{switch(n){case"closed":this.close();break;case"open":this.open();break;case"hidden":this.hide(),s.start();break;default:return}})}getOrCreateViewOutlet(n,s){return this.outlets.has(n)?this.outlets.get(n):new xa(this.container,s)}render(n={}){if(process.env.NODE_ENV!=="production"&&console.warn("widget.render() is deprecated. Use widget.attach() instead."),n.open){const s={...n,withRenderState:"open"};return this.attach(s)}return this.attach(n)}activate(n){n!=null&&n.override&&this.setSettings(()=>n.override),n!=null&&n.apiNotificationPriorityBy&&this.container.register("apiNotificationPriorityBy",n.apiNotificationPriorityBy)}setSettings(n){return Promise.all([this.container.get("settings"),oe(this.container,Mt,V.Necessary,{medium:M.Local})]).then(([s,r])=>Promise.resolve(n(s)).then(i=>r(i).then(()=>{const o={...s,...i};return this.widget.events.dispatch("widget:settings-updated",o),o})))}clearSettings(){return oe(this.container,Mt,V.Necessary,{medium:M.Local}).then(n=>n()).then(()=>this.container.get("settings")).then(n=>{this.widget.events.dispatch("widget:settings-updated",n)})}action({action:n,value:s}){return this.container.getAsync("actionResolver").then(r=>{r.action(this.widget.name,n,s)})}renderState(){if(ps(this.container))return Promise.resolve(B.open);const n=()=>K(this.container,Ze,M.Session).then((r=B.closed)=>r),s=()=>K(this.container,Ze,M.Session).then((r=B.closed)=>r);return this.container.getAsync("router").then(r=>r.isSticky()?s().then(i=>i===B.open?i:n()):n())}hide(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("hide(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(n=>n.render()),this.action({action:"hide"}).then(()=>{this.setTriggerState(!1)}))}open(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("open(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):(this.outlets.forEach(n=>n.render()),this.action({action:"open"}).then(()=>(this.widget.events.dispatch("tracking:widget-rendered",{}),this.onOpen())))}close(){return this.outlets.size<1?(process.env.NODE_ENV!=="production"&&console.warn("close(): No-op as no view outlets are registered. Invoke the attach() command first."),Promise.resolve()):this.action({action:"close"}).then(()=>this.onClose())}show(){return process.env.NODE_ENV!=="production"&&console.warn("show(): Command is deprecated and will be removed in the future. Use open() instead."),this.open()}onAction(n,s){switch(n){case"close":case"open":case"hide":const r=n==="open"?B.open:n==="close"?B.closed:B.hidden;return this.setRenderState(r).then(()=>{this.setTriggerState(r===B.open),r!==B.hidden?r===B.open?this.onOpen():this.onClose():this.outlets.forEach(i=>{var o;return(o=i.options.triggerDOMElement)==null?void 0:o.setAttribute("aria-expanded","false")})})}}setRenderState(n){const{invoke:s,events:r}=this.container.get("$widget");return Promise.all([oe(this.container,Ze,V.Necessary,{medium:M.Session}),oe(this.container,Ze,V.Necessary,{medium:M.Local,duration:{minutes:5}}),this.container.getAsync("router"),s("renderState")]).then(([i,o,a,c])=>{n==="unset"||!n?(o(),i()):(a.isSticky()&&o(n),i(n)),r.dispatch("widget:render-state-changed",{previous:c,next:n})})}onOpen(){return this.container.getAsync("router").then(n=>(this.outlets.forEach(s=>{var r;return(r=s.options.triggerDOMElement)==null?void 0:r.setAttribute("aria-expanded","true")}),n.start()))}onClose(){const n=this.container.getManyAsync("router","components");return(()=>this.container.get("settings").then(r=>{const{activate:i}=this.container.get("$settings");return r.activate!==i?this.setSettings(()=>Promise.resolve({activate:i})):Promise.resolve()}))().then(()=>n).then(({router:r,components:i})=>{const o=i.nodes.visible;return this.outlets.forEach(a=>{var c;return(c=a.options.triggerDOMElement)==null?void 0:c.setAttribute("aria-expanded","false")}),o.filter(a=>a.attributes.properties.animation&&a.attributes.properties.animation!=="none").length?new Promise(a=>{setTimeout(()=>{a(r)},200)}):Promise.resolve(r)}).then(r=>r.stop())}setTriggerState(n){this.outlets.forEach(s=>{const{options:{triggerDOMElement:r,triggerOptions:i}}=s,{openTooltip:o,closedTooltip:a}=i||{};r&&(n?Ls(r,o):ma(r,a))})}deactivate(){this.subs.forEach(s=>s());const n=[];return this.outlets.forEach(s=>n.push(s.dispose())),K(this.container,Sn,M.Local).then(s=>s===this.widget.name?oe(this.container,Sn,V.Necessary,{medium:M.Local,scope:De.Implementation}).then(r=>r()).then(()=>Promise.all(n)):Promise.all(n))}}const Oa=t=>Promise.resolve().then(()=>require("./index-a53df8cf.js")).then(({ContactMethodPlatform:e})=>e.create(t)),Na=t=>Promise.resolve().then(()=>require("./index-83935001.js")).then(({DataClient:e})=>e.create(t));class Aa extends La{constructor(e){super(e),this.container.registerAsync("contactMethods",()=>Oa(this.container)),this.container.registerAsync("dataClient",()=>Na(this.container))}}exports.ActionsController=ot;exports.Button=te;exports.Component=vt;exports.Component$1=wr;exports.ComponentNode=Dt;exports.ComponentNodeController=On;exports.ComponentPlatform=Gt;exports.ComponentQuery=it;exports.Confirm=Oo;exports.ContainerContext=Vn;exports.DataClient=Ne;exports.DataType=$s;exports.DetachedComponent=js;exports.ExtendedWidget=Aa;exports.FeedbackType=ks;exports.FormBuilder=X;exports.HistoryMode=Ce;exports.Html=rn;exports.Icon=Xn;exports.InitializationMode=ls;exports.ItemList=ri;exports.Link=yt;exports.List=pt;exports.Logger=T;exports.NotFound=da;exports.Paragraph=Jn;exports.RoutingContext=Bn;exports.ServiceClientQueryType=Z;exports.SortingType=Es;exports.StorageCategory=V;exports.StorageMedium=M;exports.StorageScope=De;exports.StyledText=xe;exports.SymbolBadge=ke;exports.Text=lt;exports.TextLink=Ro;exports.WidgetRenderState=B;exports._default=ns;exports.appendClassNames=N;exports.asDescriptor=Tt;exports.borderTabStyle=_;exports.compareParams=Di;exports.convertToStringAttributes=W;exports.createChildren=tt;exports.createComponentModel=Mn;exports.createEventSubscriber=Ln;exports.createExpirationDate=gt;exports.createLocation=Pi;exports.createParamsPath=ds;exports.createStorageWriter=oe;exports.createValue=an;exports.determineIfSticky=Ti;exports.determineServiceClientQueryType=_t;exports.findComponent=An;exports.findRoute=Ni;exports.findVisibleComponents=Ke;exports.formatLegacyData=Cs;exports.genericHtml=Yr;exports.getDefaultExportFromCjs=Qt;exports.getNotFoundRoute=Ii;exports.getScopedHashDOMLocation=fs;exports.getSpecificWidgetPath=hs;exports.getTransitionManager=Ri;exports.getValue=st;exports.headingElement=be;exports.invertedHoverButton=Kr;exports.itemList=Gr;exports.linkTabStyle=Kn;exports.list=ut;exports.lock=J;exports.matchParams=Li;exports.matchRoute=Mi;exports.onWidgetUrl=ps;exports.paddedBorderTabStyle=Gn;exports.processStore=ys;exports.queryStringAsObject=us;exports.readStorage=K;exports.removeNullAndUndefinedValues=ee;exports.resolvePathname=ss;exports.shallowCompare=Se;exports.styling=Te;exports.traverseComponents=at;exports.useComponentPlatform=$e;exports.useContainer=q;exports.useIsMounted=he;exports.usePrevious=qn;exports.useRouteData=Wn;exports.warning=ii;