@atomic.io/action-cards-web-sdk-cdn-icons 24.2.1
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.
- package/README.md +1766 -0
- package/package.json +88 -0
- package/public/LICENSES.txt +236 -0
- package/public/iframe-manager.js +9 -0
- package/public/sdk.d.ts +1233 -0
- package/public/sdk.js +9 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/*! For license information please see iframe-manager-cdn-icons.js.LICENSE.txt */
|
|
2
|
+
/*!
|
|
3
|
+
* @license
|
|
4
|
+
* Atomic Web SDK 24.2.1
|
|
5
|
+
* Copyright 2022 Atomic.io Limited.
|
|
6
|
+
* For licenses of open source libraries used by the Atomic SDK, please
|
|
7
|
+
* see https://downloads.atomic.io/web-sdk/release/24.2.1/LICENSES.txt.
|
|
8
|
+
*/
|
|
9
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.AtomicSDK=t():e.AtomicSDK=t()}(globalThis,(()=>(()=>{var e={4963:e=>{e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},7722:(e,t,n)=>{var r=n(6314)("unscopables"),a=Array.prototype;null==a[r]&&n(7728)(a,r,{}),e.exports=function(e){a[r][e]=!0}},7007:(e,t,n)=>{var r=n(5286);e.exports=function(e){if(!r(e))throw TypeError(e+" is not an object!");return e}},9315:(e,t,n)=>{var r=n(2110),a=n(875),o=n(2337);e.exports=function(e){return function(t,n,i){var s,l=r(t),c=a(l.length),d=o(i,c);if(e&&n!=n){for(;c>d;)if((s=l[d++])!=s)return!0}else for(;c>d;d++)if((e||d in l)&&l[d]===n)return e||d||0;return!e&&-1}}},2032:e=>{var t={}.toString;e.exports=function(e){return t.call(e).slice(8,-1)}},5645:e=>{var t=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=t)},741:(e,t,n)=>{var r=n(4963);e.exports=function(e,t,n){if(r(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,r){return e.call(t,n,r)};case 3:return function(n,r,a){return e.call(t,n,r,a)}}return function(){return e.apply(t,arguments)}}},1355:e=>{e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},7057:(e,t,n)=>{e.exports=!n(4253)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},2457:(e,t,n)=>{var r=n(5286),a=n(3816).document,o=r(a)&&r(a.createElement);e.exports=function(e){return o?a.createElement(e):{}}},4430:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},2985:(e,t,n)=>{var r=n(3816),a=n(5645),o=n(7728),i=n(3415),s=n(741),l="prototype",c=function(e,t,n){var d,u,h,p,m=e&c.F,g=e&c.G,v=e&c.S,f=e&c.P,b=e&c.B,y=g?r:v?r[t]||(r[t]={}):(r[t]||{})[l],w=g?a:a[t]||(a[t]={}),S=w[l]||(w[l]={});for(d in g&&(n=t),n)h=((u=!m&&y&&void 0!==y[d])?y:n)[d],p=b&&u?s(h,r):f&&"function"==typeof h?s(Function.call,h):h,y&&i(y,d,h,e&c.U),w[d]!=h&&o(w,d,p),f&&S[d]!=h&&(S[d]=h)};r.core=a,c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,e.exports=c},4253:e=>{e.exports=function(e){try{return!!e()}catch(e){return!0}}},18:(e,t,n)=>{e.exports=n(3825)("native-function-to-string",Function.toString)},3816:e=>{var t=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=t)},9181:e=>{var t={}.hasOwnProperty;e.exports=function(e,n){return t.call(e,n)}},7728:(e,t,n)=>{var r=n(9275),a=n(681);e.exports=n(7057)?function(e,t,n){return r.f(e,t,a(1,n))}:function(e,t,n){return e[t]=n,e}},639:(e,t,n)=>{var r=n(3816).document;e.exports=r&&r.documentElement},1734:(e,t,n)=>{e.exports=!n(7057)&&!n(4253)((function(){return 7!=Object.defineProperty(n(2457)("div"),"a",{get:function(){return 7}}).a}))},9797:(e,t,n)=>{var r=n(2032);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==r(e)?e.split(""):Object(e)}},5286:e=>{e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},9988:(e,t,n)=>{"use strict";var r=n(2503),a=n(681),o=n(2943),i={};n(7728)(i,n(6314)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(i,{next:a(1,n)}),o(e,t+" Iterator")}},2923:(e,t,n)=>{"use strict";var r=n(4461),a=n(2985),o=n(3415),i=n(7728),s=n(7234),l=n(9988),c=n(2943),d=n(468),u=n(6314)("iterator"),h=!([].keys&&"next"in[].keys()),p="keys",m="values",g=function(){return this};e.exports=function(e,t,n,v,f,b,y){l(n,t,v);var w,S,k,C=function(e){if(!h&&e in T)return T[e];switch(e){case p:case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},x=t+" Iterator",I=f==m,O=!1,T=e.prototype,M=T[u]||T["@@iterator"]||f&&T[f],_=M||C(f),j=f?I?C("entries"):_:void 0,D="Array"==t&&T.entries||M;if(D&&(k=d(D.call(new e)))!==Object.prototype&&k.next&&(c(k,x,!0),r||"function"==typeof k[u]||i(k,u,g)),I&&M&&M.name!==m&&(O=!0,_=function(){return M.call(this)}),r&&!y||!h&&!O&&T[u]||i(T,u,_),s[t]=_,s[x]=g,f)if(w={values:I?_:C(m),keys:b?_:C(p),entries:j},y)for(S in w)S in T||o(T,S,w[S]);else a(a.P+a.F*(h||O),t,w);return w}},5436:e=>{e.exports=function(e,t){return{value:t,done:!!e}}},7234:e=>{e.exports={}},4461:e=>{e.exports=!1},2503:(e,t,n)=>{var r=n(7007),a=n(5588),o=n(4430),i=n(9335)("IE_PROTO"),s=function(){},l="prototype",c=function(){var e,t=n(2457)("iframe"),r=o.length;for(t.style.display="none",n(639).appendChild(t),t.src="javascript:",(e=t.contentWindow.document).open(),e.write("<script>document.F=Object<\/script>"),e.close(),c=e.F;r--;)delete c[l][o[r]];return c()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=r(e),n=new s,s[l]=null,n[i]=e):n=c(),void 0===t?n:a(n,t)}},9275:(e,t,n)=>{var r=n(7007),a=n(1734),o=n(1689),i=Object.defineProperty;t.f=n(7057)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),a)try{return i(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},5588:(e,t,n)=>{var r=n(9275),a=n(7007),o=n(7184);e.exports=n(7057)?Object.defineProperties:function(e,t){a(e);for(var n,i=o(t),s=i.length,l=0;s>l;)r.f(e,n=i[l++],t[n]);return e}},468:(e,t,n)=>{var r=n(9181),a=n(508),o=n(9335)("IE_PROTO"),i=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=a(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?i:null}},189:(e,t,n)=>{var r=n(9181),a=n(2110),o=n(9315)(!1),i=n(9335)("IE_PROTO");e.exports=function(e,t){var n,s=a(e),l=0,c=[];for(n in s)n!=i&&r(s,n)&&c.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~o(c,n)||c.push(n));return c}},7184:(e,t,n)=>{var r=n(189),a=n(4430);e.exports=Object.keys||function(e){return r(e,a)}},681:e=>{e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},3415:(e,t,n)=>{var r=n(3816),a=n(7728),o=n(9181),i=n(3953)("src"),s=n(18),l="toString",c=(""+s).split(l);n(5645).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var l="function"==typeof n;l&&(o(n,"name")||a(n,"name",t)),e[t]!==n&&(l&&(o(n,i)||a(n,i,e[t]?""+e[t]:c.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:a(e,t,n):(delete e[t],a(e,t,n)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[i]||s.call(this)}))},2943:(e,t,n)=>{var r=n(9275).f,a=n(9181),o=n(6314)("toStringTag");e.exports=function(e,t,n){e&&!a(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},9335:(e,t,n)=>{var r=n(3825)("keys"),a=n(3953);e.exports=function(e){return r[e]||(r[e]=a(e))}},3825:(e,t,n)=>{var r=n(5645),a=n(3816),o="__core-js_shared__",i=a[o]||(a[o]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:r.version,mode:n(4461)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},2337:(e,t,n)=>{var r=n(1467),a=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?a(e+t,0):o(e,t)}},1467:e=>{var t=Math.ceil,n=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?n:t)(e)}},2110:(e,t,n)=>{var r=n(9797),a=n(1355);e.exports=function(e){return r(a(e))}},875:(e,t,n)=>{var r=n(1467),a=Math.min;e.exports=function(e){return e>0?a(r(e),9007199254740991):0}},508:(e,t,n)=>{var r=n(1355);e.exports=function(e){return Object(r(e))}},1689:(e,t,n)=>{var r=n(5286);e.exports=function(e,t){if(!r(e))return e;var n,a;if(t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;if("function"==typeof(n=e.valueOf)&&!r(a=n.call(e)))return a;if(!t&&"function"==typeof(n=e.toString)&&!r(a=n.call(e)))return a;throw TypeError("Can't convert object to primitive value")}},3953:e=>{var t=0,n=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++t+n).toString(36))}},6314:(e,t,n)=>{var r=n(3825)("wks"),a=n(3953),o=n(3816).Symbol,i="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=i&&o[e]||(i?o:a)("Symbol."+e))}).store=r},6997:(e,t,n)=>{"use strict";var r=n(7722),a=n(5436),o=n(7234),i=n(2110);e.exports=n(2923)(Array,"Array",(function(e,t){this._t=i(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,a(1)):a(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},1181:(e,t,n)=>{for(var r=n(6997),a=n(7184),o=n(3415),i=n(3816),s=n(7728),l=n(7234),c=n(6314),d=c("iterator"),u=c("toStringTag"),h=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},m=a(p),g=0;g<m.length;g++){var v,f=m[g],b=p[f],y=i[f],w=y&&y.prototype;if(w&&(w[d]||s(w,d,h),w[u]||s(w,u,f),l[f]=h,b))for(v in r)w[v]||o(w,v,r[v],!0)}},3561:e=>{e.exports=function(e){var t=new Date(e.getTime()),n=t.getTimezoneOffset();return t.setSeconds(0,0),6e4*n+t.getTime()%6e4}},4844:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setDate(n.getDate()+a),n}},2680:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,36e5*n)}},7538:(e,t,n)=>{var r=n(2385),a=n(1138);e.exports=function(e,t){var n=Number(t);return a(e,r(e)+n)}},2951:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),a=Number(t);return new Date(n+a)}},1318:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,6e4*n)}},9331:(e,t,n)=>{var r=n(1884),a=n(2807);e.exports=function(e,t){var n=r(e),o=Number(t),i=n.getMonth()+o,s=new Date(0);s.setFullYear(n.getFullYear(),i,1),s.setHours(0,0,0,0);var l=a(s);return n.setMonth(i,Math.min(l,n.getDate())),n}},1482:(e,t,n)=>{var r=n(9331);e.exports=function(e,t){var n=Number(t);return r(e,3*n)}},9723:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,1e3*n)}},5932:(e,t,n)=>{var r=n(4844);e.exports=function(e,t){var n=Number(t);return r(e,7*n)}},6083:(e,t,n)=>{var r=n(9331);e.exports=function(e,t){var n=Number(t);return r(e,12*n)}},6739:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n,a){var o=r(e).getTime(),i=r(t).getTime(),s=r(n).getTime(),l=r(a).getTime();if(o>i||s>l)throw new Error("The start of the range cannot be after the end of the range");return o<l&&s<i}},7886:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){if(!(t instanceof Array))throw new TypeError(toString.call(t)+" is not an instance of Array");var n,a,o=r(e).getTime();return t.forEach((function(e,t){var i=r(e),s=Math.abs(o-i.getTime());(void 0===n||s<a)&&(n=t,a=s)})),n}},3806:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){if(!(t instanceof Array))throw new TypeError(toString.call(t)+" is not an instance of Array");var n,a,o=r(e).getTime();return t.forEach((function(e){var t=r(e),i=Math.abs(o-t.getTime());(void 0===n||i<a)&&(n=t,a=i)})),n}},3374:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),a=r(t).getTime();return n<a?-1:n>a?1:0}},3558:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),a=r(t).getTime();return n>a?-1:n<a?1:0}},6656:(e,t,n)=>{var r=n(6579);e.exports=function(e,t){var n=r(e),a=r(t),o=n.getTime()-6e4*n.getTimezoneOffset(),i=a.getTime()-6e4*a.getTimezoneOffset();return Math.round((o-i)/864e5)}},6554:(e,t,n)=>{var r=n(1971);e.exports=function(e,t){var n=r(e),a=r(t),o=n.getTime()-6e4*n.getTimezoneOffset(),i=a.getTime()-6e4*a.getTimezoneOffset();return Math.round((o-i)/6048e5)}},7051:(e,t,n)=>{var r=n(2385);e.exports=function(e,t){return r(e)-r(t)}},1924:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return 12*(n.getFullYear()-a.getFullYear())+(n.getMonth()-a.getMonth())}},9729:(e,t,n)=>{var r=n(21),a=n(1884);e.exports=function(e,t){var n=a(e),o=a(t);return 4*(n.getFullYear()-o.getFullYear())+(r(n)-r(o))}},9871:(e,t,n)=>{var r=n(5344);e.exports=function(e,t,n){var a=r(e,n),o=r(t,n),i=a.getTime()-6e4*a.getTimezoneOffset(),s=o.getTime()-6e4*o.getTimezoneOffset();return Math.round((i-s)/6048e5)}},8509:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getFullYear()-a.getFullYear()}},6056:(e,t,n)=>{var r=n(1884),a=n(6656),o=n(3374);e.exports=function(e,t){var n=r(e),i=r(t),s=o(n,i),l=Math.abs(a(n,i));return n.setDate(n.getDate()-s*l),s*(l-(o(n,i)===-s))}},298:(e,t,n)=>{var r=n(8081);e.exports=function(e,t){var n=r(e,t)/36e5;return n>0?Math.floor(n):Math.ceil(n)}},9973:(e,t,n)=>{var r=n(1884),a=n(7051),o=n(3374),i=n(9883);e.exports=function(e,t){var n=r(e),s=r(t),l=o(n,s),c=Math.abs(a(n,s));return n=i(n,l*c),l*(c-(o(n,s)===-l))}},8081:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()-a.getTime()}},604:(e,t,n)=>{var r=n(8081);e.exports=function(e,t){var n=r(e,t)/6e4;return n>0?Math.floor(n):Math.ceil(n)}},1387:(e,t,n)=>{var r=n(1884),a=n(1924),o=n(3374);e.exports=function(e,t){var n=r(e),i=r(t),s=o(n,i),l=Math.abs(a(n,i));return n.setMonth(n.getMonth()-s*l),s*(l-(o(n,i)===-s))}},9403:(e,t,n)=>{var r=n(1387);e.exports=function(e,t){var n=r(e,t)/3;return n>0?Math.floor(n):Math.ceil(n)}},7977:(e,t,n)=>{var r=n(8081);e.exports=function(e,t){var n=r(e,t)/1e3;return n>0?Math.floor(n):Math.ceil(n)}},4496:(e,t,n)=>{var r=n(6056);e.exports=function(e,t){var n=r(e,t)/7;return n>0?Math.floor(n):Math.ceil(n)}},760:(e,t,n)=>{var r=n(1884),a=n(8509),o=n(3374);e.exports=function(e,t){var n=r(e),i=r(t),s=o(n,i),l=Math.abs(a(n,i));return n.setFullYear(n.getFullYear()-s*l),s*(l-(o(n,i)===-s))}},3332:(e,t,n)=>{var r=n(3558),a=n(1884),o=n(7977),i=n(1387),s=n(7479),l=43200;e.exports=function(e,t,n){var c=n||{},d=r(e,t),u=c.locale,h=s.distanceInWords.localize;u&&u.distanceInWords&&u.distanceInWords.localize&&(h=u.distanceInWords.localize);var p,m,g={addSuffix:Boolean(c.addSuffix),comparison:d};d>0?(p=a(e),m=a(t)):(p=a(t),m=a(e));var v,f=o(m,p),b=m.getTimezoneOffset()-p.getTimezoneOffset(),y=Math.round(f/60)-b;if(y<2)return c.includeSeconds?f<5?h("lessThanXSeconds",5,g):f<10?h("lessThanXSeconds",10,g):f<20?h("lessThanXSeconds",20,g):f<40?h("halfAMinute",null,g):h(f<60?"lessThanXMinutes":"xMinutes",1,g):0===y?h("lessThanXMinutes",1,g):h("xMinutes",y,g);if(y<45)return h("xMinutes",y,g);if(y<90)return h("aboutXHours",1,g);if(y<1440)return h("aboutXHours",Math.round(y/60),g);if(y<2520)return h("xDays",1,g);if(y<l)return h("xDays",Math.round(y/1440),g);if(y<86400)return h("aboutXMonths",v=Math.round(y/l),g);if((v=i(m,p))<12)return h("xMonths",Math.round(y/l),g);var w=v%12,S=Math.floor(v/12);return w<3?h("aboutXYears",S,g):w<9?h("overXYears",S,g):h("almostXYears",S+1,g)}},7666:(e,t,n)=>{var r=n(3558),a=n(1884),o=n(7977),i=n(7479),s=525600;e.exports=function(e,t,n){var l=n||{},c=r(e,t),d=l.locale,u=i.distanceInWords.localize;d&&d.distanceInWords&&d.distanceInWords.localize&&(u=d.distanceInWords.localize);var h,p,m,g={addSuffix:Boolean(l.addSuffix),comparison:c};c>0?(h=a(e),p=a(t)):(h=a(t),p=a(e));var v=Math[l.partialMethod?String(l.partialMethod):"floor"],f=o(p,h),b=p.getTimezoneOffset()-h.getTimezoneOffset(),y=v(f/60)-b;if("s"===(m=l.unit?String(l.unit):y<1?"s":y<60?"m":y<1440?"h":y<43200?"d":y<s?"M":"Y"))return u("xSeconds",f,g);if("m"===m)return u("xMinutes",y,g);if("h"===m)return u("xHours",v(y/60),g);if("d"===m)return u("xDays",v(y/1440),g);if("M"===m)return u("xMonths",v(y/43200),g);if("Y"===m)return u("xYears",v(y/s),g);throw new Error("Unknown unit: "+m)}},6272:(e,t,n)=>{var r=n(3332);e.exports=function(e,t){return r(Date.now(),e,t)}},5411:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n){var a=r(e),o=void 0!==n?n:1,i=r(t).getTime();if(a.getTime()>i)throw new Error("The first date cannot be after the second date");var s=[],l=a;for(l.setHours(0,0,0,0);l.getTime()<=i;)s.push(r(l)),l.setDate(l.getDate()+o);return s}},549:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setHours(23,59,59,999),t}},2653:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMinutes(59,59,999),t}},6718:(e,t,n)=>{var r=n(1322);e.exports=function(e){return r(e,{weekStartsOn:1})}},5648:(e,t,n)=>{var r=n(2385),a=n(1971);e.exports=function(e){var t=r(e),n=new Date(0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);var o=a(n);return o.setMilliseconds(o.getMilliseconds()-1),o}},9877:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setSeconds(59,999),t}},9356:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(23,59,59,999),t}},5661:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth(),a=n-n%3+3;return t.setMonth(a,0),t.setHours(23,59,59,999),t}},6415:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMilliseconds(999),t}},4404:(e,t,n)=>{var r=n(549);e.exports=function(){return r(new Date)}},7410:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r+1),a.setHours(23,59,59,999),a}},1322:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,a=r(e),o=a.getDay(),i=6+(o<n?-7:0)-(o-n);return a.setDate(a.getDate()+i),a.setHours(23,59,59,999),a}},782:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(23,59,59,999),t}},4106:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r-1),a.setHours(23,59,59,999),a}},5616:(e,t,n)=>{var r=n(8612),a=n(6563),o=n(2385),i=n(1884),s=n(623),l=n(7479);var c={M:function(e){return e.getMonth()+1},MM:function(e){return h(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return h(e.getDate(),2)},DDD:function(e){return r(e)},DDDD:function(e){return h(r(e),3)},d:function(e){return e.getDay()},E:function(e){return e.getDay()||7},W:function(e){return a(e)},WW:function(e){return h(a(e),2)},YY:function(e){return h(e.getFullYear(),4).substr(2)},YYYY:function(e){return h(e.getFullYear(),4)},GG:function(e){return String(o(e)).substr(2)},GGGG:function(e){return o(e)},H:function(e){return e.getHours()},HH:function(e){return h(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(e){return h(c.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return h(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return h(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return h(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return h(e.getMilliseconds(),3)},Z:function(e){return u(e.getTimezoneOffset(),":")},ZZ:function(e){return u(e.getTimezoneOffset())},X:function(e){return Math.floor(e.getTime()/1e3)},x:function(e){return e.getTime()}};function d(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|]$/g,""):e.replace(/\\/g,"")}function u(e,t){t=t||"";var n=e>0?"-":"+",r=Math.abs(e),a=r%60;return n+h(Math.floor(r/60),2)+t+h(a,2)}function h(e,t){for(var n=Math.abs(e).toString();n.length<t;)n="0"+n;return n}e.exports=function(e,t,n){var r=t?String(t):"YYYY-MM-DDTHH:mm:ss.SSSZ",a=(n||{}).locale,o=l.format.formatters,u=l.format.formattingTokensRegExp;a&&a.format&&a.format.formatters&&(o=a.format.formatters,a.format.formattingTokensRegExp&&(u=a.format.formattingTokensRegExp));var h=i(e);return s(h)?function(e,t,n){var r,a,o=e.match(n),i=o.length;for(r=0;r<i;r++)a=t[o[r]]||c[o[r]],o[r]=a||d(o[r]);return function(e){for(var t="",n=0;n<i;n++)o[n]instanceof Function?t+=o[n](e,c):t+=o[n];return t}}(r,o,u)(h):"Invalid Date"}},5540:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getDate()}},2476:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getDay()}},8612:(e,t,n)=>{var r=n(1884),a=n(9834),o=n(6656);e.exports=function(e){var t=r(e);return o(t,a(t))+1}},2807:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear(),a=t.getMonth(),o=new Date(0);return o.setFullYear(n,a+1,0),o.setHours(0,0,0,0),o.getDate()}},4789:(e,t,n)=>{var r=n(1164);e.exports=function(e){return r(e)?366:365}},7921:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getHours()}},6373:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e).getDay();return 0===t&&(t=7),t}},6563:(e,t,n)=>{var r=n(1884),a=n(1971),o=n(3892);e.exports=function(e){var t=r(e),n=a(t).getTime()-o(t).getTime();return Math.round(n/6048e5)+1}},7098:(e,t,n)=>{var r=n(3892),a=n(5932);e.exports=function(e){var t=r(e),n=r(a(t,60)).valueOf()-t.valueOf();return Math.round(n/6048e5)}},2385:(e,t,n)=>{var r=n(1884),a=n(1971);e.exports=function(e){var t=r(e),n=t.getFullYear(),o=new Date(0);o.setFullYear(n+1,0,4),o.setHours(0,0,0,0);var i=a(o),s=new Date(0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);var l=a(s);return t.getTime()>=i.getTime()?n+1:t.getTime()>=l.getTime()?n:n-1}},8597:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getMilliseconds()}},3362:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getMinutes()}},3503:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getMonth()}},5541:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n,a){var o=r(e).getTime(),i=r(t).getTime(),s=r(n).getTime(),l=r(a).getTime();if(o>i||s>l)throw new Error("The start of the range cannot be after the end of the range");if(!(o<l&&s<i))return 0;var c=(l>i?i:l)-(s<o?o:s);return Math.ceil(c/864e5)}},21:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return Math.floor(t.getMonth()/3)+1}},8780:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getSeconds()}},2482:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getTime()}},8194:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getFullYear()}},7292:(e,t,n)=>{e.exports={addDays:n(4844),addHours:n(2680),addISOYears:n(7538),addMilliseconds:n(2951),addMinutes:n(1318),addMonths:n(9331),addQuarters:n(1482),addSeconds:n(9723),addWeeks:n(5932),addYears:n(6083),areRangesOverlapping:n(6739),closestIndexTo:n(7886),closestTo:n(3806),compareAsc:n(3374),compareDesc:n(3558),differenceInCalendarDays:n(6656),differenceInCalendarISOWeeks:n(6554),differenceInCalendarISOYears:n(7051),differenceInCalendarMonths:n(1924),differenceInCalendarQuarters:n(9729),differenceInCalendarWeeks:n(9871),differenceInCalendarYears:n(8509),differenceInDays:n(6056),differenceInHours:n(298),differenceInISOYears:n(9973),differenceInMilliseconds:n(8081),differenceInMinutes:n(604),differenceInMonths:n(1387),differenceInQuarters:n(9403),differenceInSeconds:n(7977),differenceInWeeks:n(4496),differenceInYears:n(760),distanceInWords:n(3332),distanceInWordsStrict:n(7666),distanceInWordsToNow:n(6272),eachDay:n(5411),endOfDay:n(549),endOfHour:n(2653),endOfISOWeek:n(6718),endOfISOYear:n(5648),endOfMinute:n(9877),endOfMonth:n(9356),endOfQuarter:n(5661),endOfSecond:n(6415),endOfToday:n(4404),endOfTomorrow:n(7410),endOfWeek:n(1322),endOfYear:n(782),endOfYesterday:n(4106),format:n(5616),getDate:n(5540),getDay:n(2476),getDayOfYear:n(8612),getDaysInMonth:n(2807),getDaysInYear:n(4789),getHours:n(7921),getISODay:n(6373),getISOWeek:n(6563),getISOWeeksInYear:n(7098),getISOYear:n(2385),getMilliseconds:n(8597),getMinutes:n(3362),getMonth:n(3503),getOverlappingDaysInRanges:n(5541),getQuarter:n(21),getSeconds:n(8780),getTime:n(2482),getYear:n(8194),isAfter:n(2849),isBefore:n(7754),isDate:n(4286),isEqual:n(9601),isFirstDayOfMonth:n(1364),isFriday:n(2350),isFuture:n(9593),isLastDayOfMonth:n(4399),isLeapYear:n(1164),isMonday:n(126),isPast:n(798),isSameDay:n(4801),isSameHour:n(3344),isSameISOWeek:n(8029),isSameISOYear:n(7877),isSameMinute:n(4465),isSameMonth:n(248),isSameQuarter:n(5347),isSameSecond:n(1742),isSameWeek:n(4868),isSameYear:n(2130),isSaturday:n(2687),isSunday:n(2978),isThisHour:n(1587),isThisISOWeek:n(657),isThisISOYear:n(6106),isThisMinute:n(7980),isThisMonth:n(2767),isThisQuarter:n(1687),isThisSecond:n(7391),isThisWeek:n(147),isThisYear:n(576),isThursday:n(7999),isToday:n(5886),isTomorrow:n(7962),isTuesday:n(6330),isValid:n(623),isWednesday:n(5999),isWeekend:n(7455),isWithinRange:n(6254),isYesterday:n(9099),lastDayOfISOWeek:n(1944),lastDayOfISOYear:n(9312),lastDayOfMonth:n(4949),lastDayOfQuarter:n(3146),lastDayOfWeek:n(106),lastDayOfYear:n(2674),max:n(1489),min:n(3185),parse:n(1884),setDate:n(6130),setDay:n(1110),setDayOfYear:n(1418),setHours:n(6574),setISODay:n(8212),setISOWeek:n(570),setISOYear:n(1138),setMilliseconds:n(3934),setMinutes:n(4809),setMonth:n(6059),setQuarter:n(4059),setSeconds:n(1670),setYear:n(3821),startOfDay:n(6579),startOfHour:n(555),startOfISOWeek:n(1971),startOfISOYear:n(3892),startOfMinute:n(5580),startOfMonth:n(5130),startOfQuarter:n(9309),startOfSecond:n(9966),startOfToday:n(9978),startOfTomorrow:n(7743),startOfWeek:n(5344),startOfYear:n(9834),startOfYesterday:n(6441),subDays:n(5627),subHours:n(7413),subISOYears:n(9883),subMilliseconds:n(8502),subMinutes:n(3350),subMonths:n(1141),subQuarters:n(6607),subSeconds:n(9256),subWeeks:n(9862),subYears:n(8524)}},2849:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()>a.getTime()}},7754:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()<a.getTime()}},4286:e=>{e.exports=function(e){return e instanceof Date}},9601:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},1364:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 1===r(e).getDate()}},2350:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 5===r(e).getDay()}},9593:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getTime()>(new Date).getTime()}},4399:(e,t,n)=>{var r=n(1884),a=n(549),o=n(9356);e.exports=function(e){var t=r(e);return a(t).getTime()===o(t).getTime()}},1164:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e).getFullYear();return t%400==0||t%4==0&&t%100!=0}},126:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 1===r(e).getDay()}},798:(e,t,n)=>{var r=n(1884);e.exports=function(e){return r(e).getTime()<(new Date).getTime()}},4801:(e,t,n)=>{var r=n(6579);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},3344:(e,t,n)=>{var r=n(555);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},8029:(e,t,n)=>{var r=n(4868);e.exports=function(e,t){return r(e,t,{weekStartsOn:1})}},7877:(e,t,n)=>{var r=n(3892);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},4465:(e,t,n)=>{var r=n(5580);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},248:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getFullYear()===a.getFullYear()&&n.getMonth()===a.getMonth()}},5347:(e,t,n)=>{var r=n(9309);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},1742:(e,t,n)=>{var r=n(9966);e.exports=function(e,t){var n=r(e),a=r(t);return n.getTime()===a.getTime()}},4868:(e,t,n)=>{var r=n(5344);e.exports=function(e,t,n){var a=r(e,n),o=r(t,n);return a.getTime()===o.getTime()}},2130:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=r(t);return n.getFullYear()===a.getFullYear()}},2687:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 6===r(e).getDay()}},2978:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 0===r(e).getDay()}},1587:(e,t,n)=>{var r=n(3344);e.exports=function(e){return r(new Date,e)}},657:(e,t,n)=>{var r=n(8029);e.exports=function(e){return r(new Date,e)}},6106:(e,t,n)=>{var r=n(7877);e.exports=function(e){return r(new Date,e)}},7980:(e,t,n)=>{var r=n(4465);e.exports=function(e){return r(new Date,e)}},2767:(e,t,n)=>{var r=n(248);e.exports=function(e){return r(new Date,e)}},1687:(e,t,n)=>{var r=n(5347);e.exports=function(e){return r(new Date,e)}},7391:(e,t,n)=>{var r=n(1742);e.exports=function(e){return r(new Date,e)}},147:(e,t,n)=>{var r=n(4868);e.exports=function(e,t){return r(new Date,e,t)}},576:(e,t,n)=>{var r=n(2130);e.exports=function(e){return r(new Date,e)}},7999:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 4===r(e).getDay()}},5886:(e,t,n)=>{var r=n(6579);e.exports=function(e){return r(e).getTime()===r(new Date).getTime()}},7962:(e,t,n)=>{var r=n(6579);e.exports=function(e){var t=new Date;return t.setDate(t.getDate()+1),r(e).getTime()===r(t).getTime()}},6330:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 2===r(e).getDay()}},623:(e,t,n)=>{var r=n(4286);e.exports=function(e){if(r(e))return!isNaN(e);throw new TypeError(toString.call(e)+" is not an instance of Date")}},5999:(e,t,n)=>{var r=n(1884);e.exports=function(e){return 3===r(e).getDay()}},7455:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e).getDay();return 0===t||6===t}},6254:(e,t,n)=>{var r=n(1884);e.exports=function(e,t,n){var a=r(e).getTime(),o=r(t).getTime(),i=r(n).getTime();if(o>i)throw new Error("The start of the range cannot be after the end of the range");return a>=o&&a<=i}},9099:(e,t,n)=>{var r=n(6579);e.exports=function(e){var t=new Date;return t.setDate(t.getDate()-1),r(e).getTime()===r(t).getTime()}},1944:(e,t,n)=>{var r=n(106);e.exports=function(e){return r(e,{weekStartsOn:1})}},9312:(e,t,n)=>{var r=n(2385),a=n(1971);e.exports=function(e){var t=r(e),n=new Date(0);n.setFullYear(t+1,0,4),n.setHours(0,0,0,0);var o=a(n);return o.setDate(o.getDate()-1),o}},4949:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth();return t.setFullYear(t.getFullYear(),n+1,0),t.setHours(0,0,0,0),t}},3146:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth(),a=n-n%3+3;return t.setMonth(a,0),t.setHours(0,0,0,0),t}},106:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,a=r(e),o=a.getDay(),i=6+(o<n?-7:0)-(o-n);return a.setHours(0,0,0,0),a.setDate(a.getDate()+i),a}},2674:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear();return t.setFullYear(n+1,0,0),t.setHours(0,0,0,0),t}},8854:e=>{var t=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];e.exports=function(e){var n=[];for(var r in e)e.hasOwnProperty(r)&&n.push(r);var a=t.concat(n).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+a.join("|")+"|.)","g")}},2894:e=>{e.exports=function(){var e={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};return{localize:function(t,n,r){var a;return r=r||{},a="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"in "+a:a+" ago":a}}}},664:(e,t,n)=>{var r=n(8854);e.exports=function(){var e=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],t=["January","February","March","April","May","June","July","August","September","October","November","December"],n=["Su","Mo","Tu","We","Th","Fr","Sa"],a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],i=["AM","PM"],s=["am","pm"],l=["a.m.","p.m."],c={MMM:function(t){return e[t.getMonth()]},MMMM:function(e){return t[e.getMonth()]},dd:function(e){return n[e.getDay()]},ddd:function(e){return a[e.getDay()]},dddd:function(e){return o[e.getDay()]},A:function(e){return e.getHours()/12>=1?i[1]:i[0]},a:function(e){return e.getHours()/12>=1?s[1]:s[0]},aa:function(e){return e.getHours()/12>=1?l[1]:l[0]}};return["M","D","DDD","d","Q","W"].forEach((function(e){c[e+"o"]=function(t,n){return function(e){var t=e%100;if(t>20||t<10)switch(t%10){case 1:return e+"st";case 2:return e+"nd";case 3:return e+"rd"}return e+"th"}(n[e](t))}})),{formatters:c,formattingTokensRegExp:r(c)}}},7479:(e,t,n)=>{var r=n(2894),a=n(664);e.exports={distanceInWords:r(),format:a()}},1489:(e,t,n)=>{var r=n(1884);e.exports=function(){var e=Array.prototype.slice.call(arguments).map((function(e){return r(e)})),t=Math.max.apply(null,e);return new Date(t)}},3185:(e,t,n)=>{var r=n(1884);e.exports=function(){var e=Array.prototype.slice.call(arguments).map((function(e){return r(e)})),t=Math.min.apply(null,e);return new Date(t)}},1884:(e,t,n)=>{var r=n(3561),a=n(4286),o=36e5,i=6e4,s=/[T ]/,l=/:/,c=/^(\d{2})$/,d=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],u=/^(\d{4})/,h=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],p=/^-(\d{2})$/,m=/^-?(\d{3})$/,g=/^-?(\d{2})-?(\d{2})$/,v=/^-?W(\d{2})$/,f=/^-?W(\d{2})-?(\d{1})$/,b=/^(\d{2}([.,]\d*)?)$/,y=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,w=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,S=/([Z+-].*)$/,k=/^(Z)$/,C=/^([+-])(\d{2})$/,x=/^([+-])(\d{2}):?(\d{2})$/;function I(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var a=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+a),r}e.exports=function(e,t){if(a(e))return new Date(e.getTime());if("string"!=typeof e)return new Date(e);var n=(t||{}).additionalDigits;n=null==n?2:Number(n);var O=function(e){var t,n={},r=e.split(s);l.test(r[0])?(n.date=null,t=r[0]):(n.date=r[0],t=r[1]);if(t){var a=S.exec(t);a?(n.time=t.replace(a[1],""),n.timezone=a[1]):n.time=t}return n}(e),T=function(e,t){var n,r=d[t],a=h[t];if(n=u.exec(e)||a.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=c.exec(e)||r.exec(e)){var i=n[1];return{year:100*parseInt(i,10),restDateString:e.slice(i.length)}}return{year:null}}(O.date,n),M=T.year,_=function(e,t){if(null===t)return null;var n,r,a;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=p.exec(e))return r=new Date(0),a=parseInt(n[1],10)-1,r.setUTCFullYear(t,a),r;if(n=m.exec(e)){r=new Date(0);var o=parseInt(n[1],10);return r.setUTCFullYear(t,0,o),r}if(n=g.exec(e)){r=new Date(0),a=parseInt(n[1],10)-1;var i=parseInt(n[2],10);return r.setUTCFullYear(t,a,i),r}if(n=v.exec(e))return I(t,parseInt(n[1],10)-1);if(n=f.exec(e)){return I(t,parseInt(n[1],10)-1,parseInt(n[2],10)-1)}return null}(T.restDateString,M);if(_){var j,D=_.getTime(),L=0;if(O.time&&(L=function(e){var t,n,r;if(t=b.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*o;if(t=y.exec(e))return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),n%24*o+r*i;if(t=w.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var a=parseFloat(t[3].replace(",","."));return n%24*o+r*i+1e3*a}return null}(O.time)),O.timezone)j=function(e){var t,n;if(t=k.exec(e))return 0;if(t=C.exec(e))return n=60*parseInt(t[2],10),"+"===t[1]?-n:n;if(t=x.exec(e))return n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n;return 0}(O.timezone)*i;else{var F=D+L,A=new Date(F);j=r(A);var H=new Date(F);H.setDate(A.getDate()+1);var E=r(H)-r(A);E>0&&(j+=E)}return new Date(D+L+j)}return new Date(e)}},6130:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setDate(a),n}},1110:(e,t,n)=>{var r=n(1884),a=n(4844);e.exports=function(e,t,n){var o=n&&Number(n.weekStartsOn)||0,i=r(e),s=Number(t),l=i.getDay();return a(i,((s%7+7)%7<o?7:0)+s-l)}},1418:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setMonth(0),n.setDate(a),n}},6574:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setHours(a),n}},8212:(e,t,n)=>{var r=n(1884),a=n(4844),o=n(6373);e.exports=function(e,t){var n=r(e),i=Number(t),s=o(n);return a(n,i-s)}},570:(e,t,n)=>{var r=n(1884),a=n(6563);e.exports=function(e,t){var n=r(e),o=Number(t),i=a(n)-o;return n.setDate(n.getDate()-7*i),n}},1138:(e,t,n)=>{var r=n(1884),a=n(3892),o=n(6656);e.exports=function(e,t){var n=r(e),i=Number(t),s=o(n,a(n)),l=new Date(0);return l.setFullYear(i,0,4),l.setHours(0,0,0,0),(n=a(l)).setDate(n.getDate()+s),n}},3934:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setMilliseconds(a),n}},4809:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setMinutes(a),n}},6059:(e,t,n)=>{var r=n(1884),a=n(2807);e.exports=function(e,t){var n=r(e),o=Number(t),i=n.getFullYear(),s=n.getDate(),l=new Date(0);l.setFullYear(i,o,15),l.setHours(0,0,0,0);var c=a(l);return n.setMonth(o,Math.min(s,c)),n}},4059:(e,t,n)=>{var r=n(1884),a=n(6059);e.exports=function(e,t){var n=r(e),o=Number(t)-(Math.floor(n.getMonth()/3)+1);return a(n,n.getMonth()+3*o)}},1670:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setSeconds(a),n}},3821:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),a=Number(t);return n.setFullYear(a),n}},6579:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setHours(0,0,0,0),t}},555:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMinutes(0,0,0),t}},1971:(e,t,n)=>{var r=n(5344);e.exports=function(e){return r(e,{weekStartsOn:1})}},3892:(e,t,n)=>{var r=n(2385),a=n(1971);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t,0,4),n.setHours(0,0,0,0),a(n)}},5580:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setSeconds(0,0),t}},5130:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setDate(1),t.setHours(0,0,0,0),t}},9309:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getMonth(),a=n-n%3;return t.setMonth(a,1),t.setHours(0,0,0,0),t}},9966:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e);return t.setMilliseconds(0),t}},9978:(e,t,n)=>{var r=n(6579);e.exports=function(){return r(new Date)}},7743:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r+1),a.setHours(0,0,0,0),a}},5344:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,a=r(e),o=a.getDay(),i=(o<n?7:0)+o-n;return a.setDate(a.getDate()-i),a.setHours(0,0,0,0),a}},9834:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=new Date(0);return n.setFullYear(t.getFullYear(),0,1),n.setHours(0,0,0,0),n}},6441:e=>{e.exports=function(){var e=new Date,t=e.getFullYear(),n=e.getMonth(),r=e.getDate(),a=new Date(0);return a.setFullYear(t,n,r-1),a.setHours(0,0,0,0),a}},5627:(e,t,n)=>{var r=n(4844);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},7413:(e,t,n)=>{var r=n(2680);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},9883:(e,t,n)=>{var r=n(7538);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},8502:(e,t,n)=>{var r=n(2951);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},3350:(e,t,n)=>{var r=n(1318);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},1141:(e,t,n)=>{var r=n(9331);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},6607:(e,t,n)=>{var r=n(1482);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},9256:(e,t,n)=>{var r=n(9723);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},9862:(e,t,n)=>{var r=n(5932);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},8524:(e,t,n)=>{var r=n(6083);e.exports=function(e,t){var n=Number(t);return r(e,-n)}},5202:function(){!function(){"use strict";function e(e){var t=!0,n=!1,r=null,a={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function o(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function i(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!a[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}function s(e){e.classList.contains("focus-visible")||(e.classList.add("focus-visible"),e.setAttribute("data-focus-visible-added",""))}function l(e){e.hasAttribute("data-focus-visible-added")&&(e.classList.remove("focus-visible"),e.removeAttribute("data-focus-visible-added"))}function c(n){n.metaKey||n.altKey||n.ctrlKey||(o(e.activeElement)&&s(e.activeElement),t=!0)}function d(e){t=!1}function u(e){o(e.target)&&(t||i(e.target))&&s(e.target)}function h(e){o(e.target)&&(e.target.classList.contains("focus-visible")||e.target.hasAttribute("data-focus-visible-added"))&&(n=!0,window.clearTimeout(r),r=window.setTimeout((function(){n=!1}),100),l(e.target))}function p(e){"hidden"===document.visibilityState&&(n&&(t=!0),m())}function m(){document.addEventListener("mousemove",v),document.addEventListener("mousedown",v),document.addEventListener("mouseup",v),document.addEventListener("pointermove",v),document.addEventListener("pointerdown",v),document.addEventListener("pointerup",v),document.addEventListener("touchmove",v),document.addEventListener("touchstart",v),document.addEventListener("touchend",v)}function g(){document.removeEventListener("mousemove",v),document.removeEventListener("mousedown",v),document.removeEventListener("mouseup",v),document.removeEventListener("pointermove",v),document.removeEventListener("pointerdown",v),document.removeEventListener("pointerup",v),document.removeEventListener("touchmove",v),document.removeEventListener("touchstart",v),document.removeEventListener("touchend",v)}function v(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,g())}document.addEventListener("keydown",c,!0),document.addEventListener("mousedown",d,!0),document.addEventListener("pointerdown",d,!0),document.addEventListener("touchstart",d,!0),document.addEventListener("visibilitychange",p,!0),m(),e.addEventListener("focus",u,!0),e.addEventListener("blur",h,!0),e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&e.host?e.host.setAttribute("data-js-focus-visible",""):e.nodeType===Node.DOCUMENT_NODE&&(document.documentElement.classList.add("js-focus-visible"),document.documentElement.setAttribute("data-js-focus-visible",""))}if("undefined"!=typeof window&&"undefined"!=typeof document){var t;window.applyFocusVisiblePolyfill=e;try{t=new CustomEvent("focus-visible-polyfill-ready")}catch(e){(t=document.createEvent("CustomEvent")).initCustomEvent("focus-visible-polyfill-ready",!1,!1,{})}window.dispatchEvent(t)}"undefined"!=typeof document&&e(document)}()},6400:(e,t,n)=>{"use strict";n.r(t),n.d(t,{Component:()=>w,Fragment:()=>y,_unmount:()=>A,cloneElement:()=>R,createContext:()=>V,createElement:()=>v,createRef:()=>b,h:()=>v,hydrate:()=>P,isValidElement:()=>a,options:()=>r,render:()=>E,toChildArray:()=>O});var r,a,o,i,s,l,c,d,u={},h=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord/i;function m(e,t){for(var n in t)e[n]=t[n];return e}function g(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,a=arguments,o={};for(r in t)"key"!==r&&"ref"!==r&&(o[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(a[r]);if(null!=n&&(o.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===o[r]&&(o[r]=e.defaultProps[r]);return f(e,o,t&&t.key,t&&t.ref,null)}function f(e,t,n,a,o){var i={type:e,props:t,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(i.__v=i),r.vnode&&r.vnode(i),i}function b(){return{}}function y(e){return e.children}function w(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?S(e):null}function k(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return k(e)}}function C(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!i++||l!==r.debounceRendering)&&((l=r.debounceRendering)||s)(x)}function x(){for(var e;i=o.length;)e=o.sort((function(e,t){return e.__v.__b-t.__v.__b})),o=[],e.some((function(e){var t,n,r,a,o,i,s;e.__d&&(i=(o=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=m({},o)).__v=r,a=j(s,o,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==i?S(o):i),D(n,o),a!=i&&k(o)))}))}function I(e,t,n,r,a,o,i,s,l){var c,d,p,m,v,f,b,y=n&&n.__k||h,w=y.length;if(s==u&&(s=null!=o?o[0]:w?S(n,0):null),c=0,t.__k=O(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(p=y[c])||p&&n.key==p.key&&n.type===p.type)y[c]=void 0;else for(d=0;d<w;d++){if((p=y[d])&&n.key==p.key&&n.type===p.type){y[d]=void 0;break}p=null}if(m=j(e,n,p=p||u,r,a,o,i,s,l),(d=n.ref)&&p.ref!=d&&(b||(b=[]),p.ref&&b.push(p.ref,null,n),b.push(d,n.__c||m,n)),null!=m){var h;if(null==f&&(f=m),void 0!==n.__d)h=n.__d,n.__d=void 0;else if(o==p||m!=s||null==m.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(m),h=null;else{for(v=s,d=0;(v=v.nextSibling)&&d<w;d+=2)if(v==m)break e;e.insertBefore(m,s),h=s}"option"==t.type&&(e.value="")}s=void 0!==h?h:m.nextSibling,"function"==typeof t.type&&(t.__d=s)}else s&&p.__e==s&&s.parentNode!=e&&(s=S(p))}return c++,n})),t.__e=f,null!=o&&"function"!=typeof t.type)for(c=o.length;c--;)null!=o[c]&&g(o[c]);for(c=w;c--;)null!=y[c]&&A(y[c],y[c]);if(b)for(c=0;c<b.length;c++)F(b[c],b[++c],b[++c])}function O(e,t,n){if(null==n&&(n=[]),null==e||"boolean"==typeof e)t&&n.push(t(null));else if(Array.isArray(e))for(var r=0;r<e.length;r++)O(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?f(null,e,null,null,e):null!=e.__e||null!=e.__c?f(e.type,e.props,e.key,null,e.__v):e):e);return n}function T(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===p.test(t)?n+"px":null==n?"":n}function M(e,t,n,r,a){var o,i,s,l,c;if(a?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(o=e.style,"string"==typeof n)o.cssText=n;else{if("string"==typeof r&&(o.cssText="",r=null),r)for(l in r)n&&l in n||T(o,l,"");if(n)for(c in n)r&&n[c]===r[c]||T(o,c,n[c])}else"o"===t[0]&&"n"===t[1]?(i=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,_,i),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,_,i)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!a&&t in e?e[t]=null==n?"":n:"function"!=typeof n&&"dangerouslySetInnerHTML"!==t&&(t!==(t=t.replace(/^xlink:?/,""))?null==n||!1===n?e.removeAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase()):e.setAttributeNS("http://www.w3.org/1999/xlink",t.toLowerCase(),n):null==n||!1===n&&!/^ar/.test(t)?e.removeAttribute(t):e.setAttribute(t,n))}function _(e){this.l[e.type](r.event?r.event(e):e)}function j(e,t,n,a,o,i,s,l,c){var d,u,h,p,g,v,f,b,S,k,C=t.type;if(void 0!==t.constructor)return null;(d=r.__b)&&d(t);try{e:if("function"==typeof C){if(b=t.props,S=(d=C.contextType)&&a[d.__c],k=d?S?S.props.value:d.__:a,n.__c?f=(u=t.__c=n.__c).__=u.__E:("prototype"in C&&C.prototype.render?t.__c=u=new C(b,k):(t.__c=u=new w(b,k),u.constructor=C,u.render=H),S&&S.sub(u),u.props=b,u.state||(u.state={}),u.context=k,u.__n=a,h=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=C.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=m({},u.__s)),m(u.__s,C.getDerivedStateFromProps(b,u.__s))),p=u.props,g=u.state,h)null==C.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==C.getDerivedStateFromProps&&b!==p&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(b,k),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(b,u.__s,k)||t.__v===n.__v&&!u.__){for(u.props=b,u.state=u.__s,t.__v!==n.__v&&(u.__d=!1),u.__v=t,t.__e=n.__e,t.__k=n.__k,u.__h.length&&s.push(u),d=0;d<t.__k.length;d++)t.__k[d]&&(t.__k[d].__=t);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(b,u.__s,k),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(p,g,v)}))}u.context=k,u.props=b,u.state=u.__s,(d=r.__r)&&d(t),u.__d=!1,u.__v=t,u.__P=e,d=u.render(u.props,u.state,u.context),t.__k=null!=d&&d.type==y&&null==d.key?d.props.children:Array.isArray(d)?d:[d],null!=u.getChildContext&&(a=m(m({},a),u.getChildContext())),h||null==u.getSnapshotBeforeUpdate||(v=u.getSnapshotBeforeUpdate(p,g)),I(e,t,n,a,o,i,s,l,c),u.base=t.__e,u.__h.length&&s.push(u),f&&(u.__E=u.__=null),u.__e=!1}else null==i&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,a,o,i,s,c);(d=r.diffed)&&d(t)}catch(e){t.__v=null,r.__e(e,t,n)}return t.__e}function D(e,t){r.__c&&r.__c(t,e),e.some((function(t){try{e=t.__h,t.__h=[],e.some((function(e){e.call(t)}))}catch(e){r.__e(e,t.__v)}}))}function L(e,t,n,r,a,o,i,s){var l,c,d,p,m,g=n.props,v=t.props;if(a="svg"===t.type||a,null!=o)for(l=0;l<o.length;l++)if(null!=(c=o[l])&&((null===t.type?3===c.nodeType:c.localName===t.type)||e==c)){e=c,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(v);e=a?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,v.is&&{is:v.is}),o=null,s=!1}if(null===t.type)g!==v&&e.data!=v&&(e.data=v);else{if(null!=o&&(o=h.slice.call(e.childNodes)),d=(g=n.props||u).dangerouslySetInnerHTML,p=v.dangerouslySetInnerHTML,!s){if(g===u)for(g={},m=0;m<e.attributes.length;m++)g[e.attributes[m].name]=e.attributes[m].value;(p||d)&&(p&&d&&p.__html==d.__html||(e.innerHTML=p&&p.__html||""))}(function(e,t,n,r,a){var o;for(o in n)"children"===o||"key"===o||o in t||M(e,o,null,n[o],r);for(o in t)a&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||M(e,o,t[o],n[o],r)})(e,v,g,a,s),p?t.__k=[]:(t.__k=t.props.children,I(e,t,n,r,"foreignObject"!==t.type&&a,o,i,u,s)),s||("value"in v&&void 0!==(l=v.value)&&l!==e.value&&M(e,"value",l,g.value,!1),"checked"in v&&void 0!==(l=v.checked)&&l!==e.checked&&M(e,"checked",l,g.checked,!1))}return e}function F(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){r.__e(e,n)}}function A(e,t,n){var a,o,i;if(r.unmount&&r.unmount(e),(a=e.ref)&&(a.current&&a.current!==e.__e||F(a,null,t)),n||"function"==typeof e.type||(n=null!=(o=e.__e)),e.__e=e.__d=void 0,null!=(a=e.__c)){if(a.componentWillUnmount)try{a.componentWillUnmount()}catch(e){r.__e(e,t)}a.base=a.__P=null}if(a=e.__k)for(i=0;i<a.length;i++)a[i]&&A(a[i],t,n);null!=o&&g(o)}function H(e,t,n){return this.constructor(e,n)}function E(e,t,n){var a,o,i;r.__&&r.__(e,t),o=(a=n===c)?null:n&&n.__k||t.__k,e=v(y,null,[e]),i=[],j(t,(a?t:n||t).__k=e,o||u,u,void 0!==t.ownerSVGElement,n&&!a?[n]:o?null:h.slice.call(t.childNodes),i,n||u,a),D(i,e)}function P(e,t){E(e,t,c)}function R(e,t){var n,r;for(r in t=m(m({},e.props),t),arguments.length>2&&(t.children=h.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return f(e.type,n,t.key||e.key,t.ref||e.ref,null)}function V(e){var t={},n={__c:"__cC"+d++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,a=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=a,t},this.shouldComponentUpdate=function(e){a.props.value!==e.value&&r.some((function(t){t.context=e.value,C(t)}))},this.sub=function(e){r.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){r.splice(r.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Consumer.contextType=n,n.Provider.__=n,n}r={__e:function(e,t){for(var n,r;t=t.__;)if((n=t.__c)&&!n.__)try{if(n.constructor&&null!=n.constructor.getDerivedStateFromError&&(r=!0,n.setState(n.constructor.getDerivedStateFromError(e))),null!=n.componentDidCatch&&(r=!0,n.componentDidCatch(e)),r)return C(n.__E=n)}catch(t){e=t}throw e}},a=function(e){return null!=e&&void 0===e.constructor},w.prototype.setState=function(e,t){var n;n=this.__s!==this.state?this.__s:this.__s=m({},this.state),"function"==typeof e&&(e=e(n,this.props)),e&&m(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),C(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),C(this))},w.prototype.render=y,o=[],i=0,s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,c=u,d=0},4798:e=>{"use strict";var t=function(){return t=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},t.apply(this,arguments)};e.exports=function(e,n){void 0===e&&(e={}),void 0===n&&(n=null);var r=e||{},a=[];function o(){a.forEach((function(e){return e(r)}))}return{middleware:n,setState:function(e){r=t({},r,"function"==typeof e?e(r):e),o()},subscribe:function(e){return a.push(e),function(){a.splice(a.indexOf(e),1)}},getState:function(){return r},reset:function(){r=e,o()}}}},1042:(e,t)=>{"use strict";function n(e,t){if(null!=t){if(t.then)return t.then(e.setState);e.setState(t)}}t.m=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reverse(),function(t,r,a){if(e.length<1)return n(t,r.apply(void 0,[t.getState()].concat(a)));var o=e.map((function(e){return e(t)})).reduce((function(e,t){return t(e,a)}),function(e,t){return function(r){return n(e,r.apply(void 0,[e.getState()].concat(t)))}}(t,a));return o(r)}}},5576:(e,t,n)=>{"use strict";var r=n(6400),a=function(e,t){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},a(e,t)};function o(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},i.apply(this,arguments)};function s(e,t){for(var n in e)if(e[n]!==t[n])return!1;for(var n in t)if(!(n in e))return!1;return!0}function l(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return"function"==typeof t.middleware?t.middleware(t,e,n):function(e,t){if(null!=t){if(t.then)return t.then(e.setState);e.setState(t)}}(t,e.apply(void 0,[t.getState()].concat(n)))}}var c=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.update=function(){var e=r.getProps(r.props,r.context);s(e,r.state)||r.setState(e)},r.state=r.getProps(t,n),r.actions=r.getActions(),r}return o(t,e),t.prototype.componentWillMount=function(){this.unsubscribe=this.context.store.subscribe(this.update)},t.prototype.componentWillUnmount=function(){this.unsubscribe(this.update)},t.prototype.componentWillReceiveProps=function(e,t){var n=this.getProps(e,t);s(n,this.state)||this.setState(n)},t.prototype.getProps=function(e,t){var n=e.mapToProps,r=t.store&&t.store.getState()||{};return n?n(r,e):r},t.prototype.getActions=function(){return function(e,t,n){e="function"==typeof e?e(t,n):e;var r={};for(var a in e){var o=e[a];r[a]=l(o,t)}return r}(this.props.actions,this.context.store,this.props)},t.prototype.render=function(e,t,n){var r=e.children,a=n.store;return(r&&r[0]||r)(i({store:a},t,this.actions))},t}(r.Component),d=c;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t.prototype.getChildContext=function(){return{store:this.props.store}},t.prototype.render=function(){return this.props.children&&this.props.children[0]||this.props.children},t}(r.Component);t.zt=u,t.lj=c},7867:(e,t)=>{"use strict";function n(e,t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return"function"==typeof t.middleware?t.middleware(t,e,n):function(e,t){if(null!=t){if(t.then)return t.then(e.setState);e.setState(t)}}(t,e.apply(void 0,[t.getState()].concat(n)))}}var r=function(){return r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var a in t=arguments[n])Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a]);return e},r.apply(this,arguments)};t.kv=function(e,t,r){e="function"==typeof e?e(t,r):e;var a={};for(var o in e){var i=e[o];a[o]=n(i,t)}return a},t.Y2=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.reduce((function(e,n){return r({},e,"function"==typeof n?n.apply(void 0,t):n)}),{})}}},5877:(e,t,n)=>{var r=n(3570),a=n(1171),o=a;o.v1=r,o.v4=a,e.exports=o},5327:e=>{for(var t=[],n=0;n<256;++n)t[n]=(n+256).toString(16).substr(1);e.exports=function(e,n){var r=n||0,a=t;return[a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],"-",a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]],a[e[r++]]].join("")}},5217:e=>{var t="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(t){var n=new Uint8Array(16);e.exports=function(){return t(n),n}}else{var r=new Array(16);e.exports=function(){for(var e,t=0;t<16;t++)0==(3&t)&&(e=4294967296*Math.random()),r[t]=e>>>((3&t)<<3)&255;return r}}},3570:(e,t,n)=>{var r,a,o=n(5217),i=n(5327),s=0,l=0;e.exports=function(e,t,n){var c=t&&n||0,d=t||[],u=(e=e||{}).node||r,h=void 0!==e.clockseq?e.clockseq:a;if(null==u||null==h){var p=o();null==u&&(u=r=[1|p[0],p[1],p[2],p[3],p[4],p[5]]),null==h&&(h=a=16383&(p[6]<<8|p[7]))}var m=void 0!==e.msecs?e.msecs:(new Date).getTime(),g=void 0!==e.nsecs?e.nsecs:l+1,v=m-s+(g-l)/1e4;if(v<0&&void 0===e.clockseq&&(h=h+1&16383),(v<0||m>s)&&void 0===e.nsecs&&(g=0),g>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");s=m,l=g,a=h;var f=(1e4*(268435455&(m+=122192928e5))+g)%4294967296;d[c++]=f>>>24&255,d[c++]=f>>>16&255,d[c++]=f>>>8&255,d[c++]=255&f;var b=m/4294967296*1e4&268435455;d[c++]=b>>>8&255,d[c++]=255&b,d[c++]=b>>>24&15|16,d[c++]=b>>>16&255,d[c++]=h>>>8|128,d[c++]=255&h;for(var y=0;y<6;++y)d[c+y]=u[y];return t||i(d)}},1171:(e,t,n)=>{var r=n(5217),a=n(5327);e.exports=function(e,t,n){var o=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var i=(e=e||{}).random||(e.rng||r)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t)for(var s=0;s<16;++s)t[o+s]=i[s];return t||a(i)}},1295:e=>{"use strict";let t=0;e.exports={incr:()=>++t,decr:()=>--t,curr:()=>t}},6756:e=>{"use strict";e.exports=(e,t,n="")=>{const r=/url\(['"]?#([\w:.-]+)['"]?\)/g,a=/#([\w:.-]+)/g;return t.match(r)&&(t=t.replace(r,(function(t,n){return e[n]?`url(#${e[n]})`:t}))),["href","xlink:href"].includes(n)&&t.match(a)&&(t=t.replace(a,(function(t,n){return e[n]?`#${e[n]}`:t}))),t}},3054:e=>{"use strict";e.exports=(e,t,n)=>{const r=new RegExp("([^\r\n,{}]+)(,(?=[^}]*{)|s*{)","g");return e=e.replace(r,(function(e,r,a){if(r.match(/^\s*(@media|@.*keyframes|to|from|@font-face|1?[0-9]?[0-9])/))return r+a;const o=r.match(/#(\w+)/);return o&&n[o[1]]&&(r=r.replace(o[0],`#${n[o[1]]}`)),(r=r.replace(/^(\s*)/,"$1"+t+" "))+a}))}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var o=t[r]={exports:{}};return e[r].call(o.exports,o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.d(r,{default:()=>Vl});n(1181);var e=n(6400),t=n(4798),a=n.n(t),o=n(1042);const i={application:{open:!1,windowOrigin:null,streamContainerId:"",isPreview:!1,cardListRefreshInterval:15e3,runtimeVariableResolutionTimeout:5e3,embedMode:"launcher",customStrings:{},firstLoadStyles:{backgroundColor:"#FFFFFF",textColor:"rgba(0,0,0,0.5)",loadingSpinnerColor:"#000000",buttonTextColor:"#000000"},enabledUiElements:{cardListToast:!0,customToastContainer:!1,cardListHeader:!0},interfaceStyle:"automatic"},cardFeed:{lastModified:"",cardInstances:[],runtimeVariables:{},runtimeVariableAnalyticsEnabled:!1,tutorialSeen:!0,status:{loaded:!1}},navigationStack:{items:[]},cardResponses:{},validationStates:{},theme:{},cardStates:{},messages:{lastMessageId:"0"}};let s;const l=(e,t)=>{var n,r,l;let{streamContainerId:c,windowOrigin:d,subviewCardInstance:u,startingLayoutId:h,cardInstances:p,cardListRefreshInterval:m,runtimeVariableResolutionTimeout:g,embedMode:v,customStrings:f,cardListTutorialSeen:b,features:y,firstLoadStyles:w,enabledUiElements:S,interfaceStyle:k}=e;const C=t&&t.length?(0,o.m)(...t):null,x="preview"===v,I=null==y?void 0:y.runtimeVariableAnalytics;return s=a()(Object.assign(Object.assign({},i),{application:Object.assign(Object.assign({},i.application),{isPreview:x,streamContainerId:void 0!==c?c:i.application.streamContainerId,windowOrigin:d||i.application.windowOrigin,cardListRefreshInterval:void 0!==m?m:i.application.cardListRefreshInterval,runtimeVariableResolutionTimeout:void 0!==g?g:i.application.runtimeVariableResolutionTimeout,embedMode:v,customStrings:f||i.application.customStrings,cardLimit:"single-card"===v?1:void 0,firstLoadStyles:{backgroundColor:(null==w?void 0:w.backgroundColor)||i.application.firstLoadStyles.backgroundColor,textColor:(null==w?void 0:w.textColor)||i.application.firstLoadStyles.textColor,loadingSpinnerColor:(null==w?void 0:w.loadingSpinnerColor)||i.application.firstLoadStyles.loadingSpinnerColor,buttonTextColor:(null==w?void 0:w.buttonTextColor)||i.application.firstLoadStyles.buttonTextColor},enabledUiElements:{cardListToast:null===(n=null==S?void 0:S.cardListToast)||void 0===n||n,customToastContainer:null!==(r=null==S?void 0:S.customToastContainer)&&void 0!==r&&r,toastConfig:null==S?void 0:S.toastConfig,cardListHeader:null===(l=null==S?void 0:S.cardListHeader)||void 0===l||l,customContainerHeader:null==S?void 0:S.customContainerHeader},interfaceStyle:void 0!==k?k:"automatic"}),navigationStack:{items:u&&h?[{cardInstance:u,cardInstanceId:u.instance.id,subviewId:h,kind:"subview"}]:i.navigationStack.items},cardFeed:Object.assign(Object.assign({},i.cardFeed),{cardInstances:p||i.cardFeed.cardInstances,tutorialSeen:void 0===b||b,runtimeVariableAnalyticsEnabled:void 0!==I&&I,cardVoting:null==y?void 0:y.cardVoting,cardMinimumHeight:null==y?void 0:y.cardMinimumHeight,horizontalContainerConfig:null==y?void 0:y.horizontalContainerConfig})}),C),s},c=()=>{if(!s)throw new Error("You must initialise the store before accessing it.");return s};var d=n(5576),u=n(7867);const h=n(3054),p=n(6756),m=n(1295),g=[];const v={},f=(e,t,n)=>{const{enableJs:r,disableUniqueIds:a,disableCssScoping:o,spriteIconId:i,replacementColor:s,containerSize:l}=t,c=!!i,d=(new DOMParser).parseFromString(n,"text/html"),u=c?d.getElementById(i):d.querySelector("svg"),f=(()=>{if(g.length)return g;for(const e in document.body)e.startsWith("on")&&g.push(e);return g.push("onbegin","onend","onrepeat"),g.push("onfocusin","onfocusout","onbounce","onfinish","onshow"),g})(),b=v[e.getAttribute("data-id")]||new Set,y=e.getAttribute("data-id")||`svg-loader_${m.incr()}`,w={};if(a||Array.from(u.querySelectorAll("[id]")).forEach((e=>{const t=e.getAttribute("id"),n=`${t}_${m.incr()}`;e.setAttribute("id",n),w[t]=n})),Array.from(u.querySelectorAll("*")).concat(u).forEach((t=>{if("script"===t.tagName){if(t.remove(),!r)return;{const n=document.createElement("script");n.appendChild(t.childNodes[0]),e.appendChild(n)}}const n=[];for(let e=0;e<t.attributes.length;e++){const{name:a,value:o}=t.attributes[e],i=p(w,o,a);o!==i&&t.setAttribute(a,i),!f.includes(a.toLowerCase())||r?["href","xlink:href","values"].includes(a)&&o.startsWith("javascript")&&!r&&n.push(a):n.push(a)}if(n.forEach((e=>t.removeAttribute(e))),"style"===t.tagName&&!o){let e=h(t.innerHTML,`[data-id="${y}"]`,w);e=p(w,e),e!==t.innerHTML&&(t.innerHTML=e)}})),e.innerHTML=i?u.outerHTML:u.innerHTML,!c)for(let t=0;t<u.attributes.length;t++){const{name:n,value:r}=u.attributes[t];e.getAttribute(n)&&!b.has(n)||(b.add(n),e.setAttribute(n,r))}v[y]=b,e.setAttribute("data-id",y),function(e,t){const n=e.querySelectorAll("*"),r=new Map,a=(e,t,n)=>{r.has(e)?r.get(e)?.set(t,n):r.set(e,(new Map).set(t,n))};n.forEach((e=>{const t=e.getAttribute("style");let n,r,o=e.getAttribute("fill"),i=e.getAttribute("stroke");t&&(n=t.match(/fill\s*:\s*([^;]+)/),r=t.match(/stroke\s*:\s*([^;]+)/));const s={...o?{fill:o}:{},...i?{stroke:i}:{},...n?{fillMatch:n}:{},...r?{strokeMatch:r}:{}};o&&a(o,e,s),i&&a(i,e,s),n&&a(n[1],e,s),r&&a(r[1],e,s)})),1===r.size&&t&&r.forEach(((e,n)=>{"currentcolor"===n.toLowerCase()&&e.forEach(((e,n)=>{if(e.fill&&n.setAttribute("fill",t),e.stroke&&n.setAttribute("stroke",t),e.fillMatch){const r=n.getAttribute("style")?.replace(e.fillMatch[0],`fill: ${t}`)??"";n.setAttribute("style",r)}if(e.strokeMatch){const r=n.getAttribute("style")?.replace(e.strokeMatch[0],`stroke: ${t}`)??"";n.setAttribute("style",r)}}))}))}(e,s),function(e,t){const n=e.getBBox({stroke:!0,fill:!0});(t&&n.width>t||t&&n.height>t)&&e.setAttribute("viewBox",`${n.x} ${n.y} ${n.width} ${n.height}`)}(e,l),function(e){const t=e.getBBox({stroke:!0,fill:!0});e.setAttribute("width",t.width),e.setAttribute("height",t.height)}(e);const S=new CustomEvent("iconload",{bubbles:!0});if(e.dispatchEvent(S),e.getAttribute("oniconload")){e.setAttribute("onauxclick",e.getAttribute("oniconload"));const t=new CustomEvent("auxclick",{bubbles:!1,view:window});e.dispatchEvent(t),e.removeAttribute("onauxclick")}},b={},y={},w=async e=>{const t=new URL(e.getAttribute("data-src"),globalThis.location),n=t.toString().replace(t.hash,""),r=t.hash.replace("#",""),a="enabled"===e.getAttribute("data-js"),o="disabled"===e.getAttribute("data-unique-ids"),i="disabled"===e.getAttribute("data-css-scoping"),s=e.getAttribute("data-replacement-color"),l=e.getAttribute("data-container-size"),c=f.bind(self,e,{enableJs:a,disableUniqueIds:o,disableCssScoping:i,spriteIconId:r,replacementColor:s,containerSize:l});if(y[n]){const e=y[n];c(e)}else{if(b[n])return void setTimeout((()=>w(e)),20);b[n]=!0,fetch(n).then((e=>{if(!e.ok)throw Error(`Request for '${n}' returned ${e.status} (${e.statusText})`);return e.text()})).then((e=>{const t=e.toLowerCase().trim();if(!(t.startsWith("<svg")||t.startsWith("<?xml")||t.startsWith("<!doctype")))throw Error(`Resource '${n}' returned an invalid SVG file`);y[n]=e,c(e)})).catch((t=>{console.error(t);const n=new CustomEvent("iconloaderror",{bubbles:!0,detail:t.toString()});if(e.dispatchEvent(n),e.getAttribute("oniconloaderror")){Function("error",e.getAttribute("oniconloaderror"))(t)}})).finally((()=>{delete b[n]}))}};let S;globalThis.IntersectionObserver&&(S=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(w(e.target),S.unobserve(e.target))}))}),{rootMargin:"1200px"}));const k=[];function C(){Array.from(document.querySelectorAll("svg[data-src]:not([data-id])")).forEach((e=>{-1===k.indexOf(e)&&(k.push(e),"lazy"===e.getAttribute("data-loading")?S.observe(e):w(e))}))}let x=!1;if(globalThis.addEventListener){const zl=setInterval((()=>{C()}),100);function $l(){clearInterval(zl),C(),(()=>{if(x)return;x=!0,new MutationObserver((e=>{e.some((e=>Array.from(e.addedNodes).some((e=>e.nodeType===Node.ELEMENT_NODE&&(e.getAttribute("data-src")&&!e.getAttribute("data-id")||e.querySelector("svg[data-src]:not([data-id])"))))))&&C(),e.forEach((e=>{"attributes"===e.type&&w(e.target)}))})).observe(document.documentElement,{attributeFilter:["data-src"],attributes:!0,childList:!0,subtree:!0})})()}"interactive"===document.readyState||"complete"===document.readyState?$l():globalThis.addEventListener("DOMContentLoaded",(()=>{$l()}))}globalThis.SVGLoader={},globalThis.SVGLoader.updateMemoryCache=async(e,t)=>{y[e]=t};var I=0,O=document.head.appendChild(document.createElement("style")).sheet;function T(e,t){var n="p"+I++,r=t+n;return e.forEach((function(e){if(/^@/.test(e)){var t=e.indexOf("{")+1;e=e.slice(0,t)+r+e.slice(t)}else e=r+e;try{O.insertRule(e,O.cssRules.length)}catch(e){}})),n}function M(e,t){return t+"{"+e+"}"}function _(e,t){var n=[""];for(var r in t=t||0,e){var a=e[r];a&&(r=r.replace(/[A-Z]/g,"-$&").toLowerCase(),a.sub||Array.isArray(a)?(a=Array.isArray(a)?a:[a]).forEach((function(e){return n[0]+=r+":"+e+";"})):(r=r.replace(/&/g,""),n.push(M(_(a,!/^@/.test(r)).join(""),r))))}return t||(n[0]=M(n[0],"")),n}const j=function(e,t){var n={};return(t=t||{}).returnObject?{style:r,css:a}:r;function r(t){return function(n){return function(r,o){var i="function"==typeof n?n(r):n;return delete r.theme,r.class=[a(i),r.class].filter(Boolean).join(" "),e(t,r,r.children||[])}}}function a(e){var t=_(e),r=t.join("");return n[r]||(n[r]=T(t,"."))}}(e.h),D=function(e){return T([M(_(e,1).join(""),"")],"@keyframes ")};var L,F,A,H=0,E=[],P=e.options.__r,R=e.options.diffed,V=e.options.__c,z=e.options.unmount;function $(t,n){e.options.__h&&e.options.__h(F,t,H||n),H=0;var r=F.__H||(F.__H={__:[],__h:[]});return t>=r.__.length&&r.__.push({}),r.__[t]}function N(e){return H=1,W(ee,e)}function W(e,t,n){var r=$(L++,2);return r.__c||(r.__c=F,r.__=[n?n(t):ee(void 0,t),function(t){var n=e(r.__[0],t);r.__[0]!==n&&(r.__[0]=n,r.__c.setState({}))}]),r.__}function B(t,n){var r=$(L++,3);!e.options.__s&&Q(r.__H,n)&&(r.__=t,r.__H=n,F.__H.__h.push(r))}function q(t,n){var r=$(L++,4);!e.options.__s&&Q(r.__H,n)&&(r.__=t,r.__H=n,F.__h.push(r))}function Y(e){return H=5,Z((function(){return{current:e}}),[])}function U(e,t,n){H=6,q((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function Z(e,t){var n=$(L++,7);return Q(n.__H,t)?(n.__H=t,n.__h=e,n.__=e()):n.__}function K(e){var t=F.context[e.__c],n=$(L++,9);return n.__c=e,t?(null==n.__&&(n.__=!0,t.sub(F)),t.props.value):e.__}function G(){E.some((function(t){if(t.__P)try{t.__H.__h.forEach(X),t.__H.__h.forEach(J),t.__H.__h=[]}catch(n){return t.__H.__h=[],e.options.__e(n,t.__v),!0}})),E=[]}function X(e){e.t&&e.t()}function J(e){var t=e.__();"function"==typeof t&&(e.t=t)}function Q(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function ee(e,t){return"function"==typeof t?t(e):t}function te(e,t){for(var n in t)e[n]=t[n];return e}function ne(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}e.options.__r=function(e){P&&P(e),L=0,(F=e.__c).__H&&(F.__H.__h.forEach(X),F.__H.__h.forEach(J),F.__H.__h=[])},e.options.diffed=function(t){R&&R(t);var n=t.__c;if(n){var r=n.__H;r&&r.__h.length&&(1!==E.push(n)&&A===e.options.requestAnimationFrame||((A=e.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(G))}},e.options.__c=function(t,n){n.some((function(t){try{t.__h.forEach(X),t.__h=t.__h.filter((function(e){return!e.__||J(e)}))}catch(r){n.some((function(e){e.__h&&(e.__h=[])})),n=[],e.options.__e(r,t.__v)}})),V&&V(t,n)},e.options.unmount=function(t){z&&z(t);var n=t.__c;if(n){var r=n.__H;if(r)try{r.__.forEach((function(e){return e.t&&e.t()}))}catch(t){e.options.__e(t,n.__v)}}};var re=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).isPureReactComponent=!0,n}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,r.prototype.shouldComponentUpdate=function(e,t){return ne(this.props,e)||ne(this.state,t)},r}(e.Component);function ae(t,n){function r(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:ne(this.props,e)}function a(n){return this.shouldComponentUpdate=r,(0,e.createElement)(t,te({},n))}return a.prototype.isReactComponent=!0,a.displayName="Memo("+(t.displayName||t.name)+")",a.t=!0,a}var oe=e.options.__b;e.options.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),oe&&oe(e)};var ie=function(t,n){return t?(0,e.toChildArray)(t).reduce((function(e,t,r){return e.concat(n(t,r))}),[]):null},se={map:ie,forEach:ie,count:function(t){return t?(0,e.toChildArray)(t).length:0},only:function(t){if(1!==(t=(0,e.toChildArray)(t)).length)throw new Error("Children.only() expects only one child.");return t[0]},toArray:e.toChildArray},le=e.options.__e;function ce(e){return e&&((e=te({},e)).__c=null,e.__k=e.__k&&e.__k.map(ce)),e}function de(){this.__u=0,this.o=null,this.__b=null}function ue(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function he(){this.i=null,this.l=null}e.options.__e=function(e,t,n){if(e.then)for(var r,a=t;a=a.__;)if((r=a.__c)&&r.__c)return r.__c(e,t.__c);le(e,t,n)},(de.prototype=new e.Component).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=ue(n.__v),a=!1,o=function(){a||(a=!0,r?r(i):i())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var i=function(){var e;if(! --n.__u)for(n.__v.__k[0]=n.state.u,n.setState({u:n.__b=null});e=n.o.pop();)e.forceUpdate()};n.__u++||n.setState({u:n.__b=n.__v.__k[0]}),e.then(o,o)},de.prototype.render=function(t,n){return this.__b&&(this.__v.__k[0]=ce(this.__b),this.__b=null),[(0,e.createElement)(e.Component,null,n.u?null:t.children),n.u&&t.fallback]};var pe=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};(he.prototype=new e.Component).u=function(e){var t=this,n=ue(t.__v),r=t.l.get(e);return r[0]++,function(a){var o=function(){t.props.revealOrder?(r.push(a),pe(t,e,r)):a()};n?n(o):o()}},he.prototype.render=function(t){this.i=null,this.l=new Map;var n=(0,e.toChildArray)(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&n.reverse();for(var r=n.length;r--;)this.l.set(n[r],this.i=[1,0,this.i]);return t.children},he.prototype.componentDidUpdate=he.prototype.componentDidMount=function(){var e=this;e.l.forEach((function(t,n){pe(e,n,t)}))};var me=function(){function e(){}var t=e.prototype;return t.getChildContext=function(){return this.props.context},t.render=function(e){return e.children},e}();function ge(t){var n=this,r=t.container,a=(0,e.createElement)(me,{context:n.context},t.vnode);return n.s&&n.s!==r&&(n.v.parentNode&&n.s.removeChild(n.v),(0,e._unmount)(n.h),n.p=!1),t.vnode?n.p?(r.__k=n.__k,(0,e.render)(a,r),n.__k=r.__k):(n.v=document.createTextNode(""),(0,e.hydrate)("",r),r.appendChild(n.v),n.p=!0,n.s=r,(0,e.render)(a,r,n.v),n.__k=n.v.__k):n.p&&(n.v.parentNode&&n.s.removeChild(n.v),(0,e._unmount)(n.h)),n.h=a,n.componentWillUnmount=function(){n.v.parentNode&&n.s.removeChild(n.v),(0,e._unmount)(n.h)},null}var ve=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|fill|flood|font|glyph(?!R)|horiz|marker(?!H|W|U)|overline|paint|stop|strikethrough|stroke|text(?!L)|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/;e.Component.prototype.isReactComponent={};var fe="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function be(t,n,r){if(null==n.__k)for(;n.firstChild;)n.removeChild(n.firstChild);return(0,e.render)(t,n),"function"==typeof r&&r(),t?t.__c:null}var ye=e.options.event;function we(e,t){e["UNSAFE_"+t]&&!e[t]&&Object.defineProperty(e,t,{configurable:!1,get:function(){return this["UNSAFE_"+t]},set:function(e){this["UNSAFE_"+t]=e}})}e.options.event=function(e){ye&&(e=ye(e)),e.persist=function(){};var t=!1,n=!1,r=e.stopPropagation;e.stopPropagation=function(){r.call(e),t=!0};var a=e.preventDefault;return e.preventDefault=function(){a.call(e),n=!0},e.isPropagationStopped=function(){return t},e.isDefaultPrevented=function(){return n},e.nativeEvent=e};var Se={configurable:!0,get:function(){return this.class}},ke=e.options.vnode;e.options.vnode=function(t){t.$$typeof=fe;var n=t.type,r=t.props;if(n){if(r.class!=r.className&&(Se.enumerable="className"in r,null!=r.className&&(r.class=r.className),Object.defineProperty(r,"className",Se)),"function"!=typeof n){var a,o,i;for(i in r.defaultValue&&void 0!==r.value&&(r.value||0===r.value||(r.value=r.defaultValue),delete r.defaultValue),Array.isArray(r.value)&&r.multiple&&"select"===n&&((0,e.toChildArray)(r.children).forEach((function(e){-1!=r.value.indexOf(e.props.value)&&(e.props.selected=!0)})),delete r.value),r)if(a=ve.test(i))break;if(a)for(i in o=t.props={},r)o[ve.test(i)?i.replace(/[A-Z0-9]/,"-$&").toLowerCase():i]=r[i]}!function(e){var n=t.type,r=t.props;if(r&&"string"==typeof n){var a={};for(var o in r)/^on(Ani|Tra|Tou)/.test(o)&&(r[o.toLowerCase()]=r[o],delete r[o]),a[o.toLowerCase()]=o;if(a.ondoubleclick&&(r.ondblclick=r[a.ondoubleclick],delete r[a.ondoubleclick]),a.onbeforeinput&&(r.onbeforeinput=r[a.onbeforeinput],delete r[a.onbeforeinput]),a.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var i=a.oninput||"oninput";r[i]||(r[i]=r[a.onchange],delete r[a.onchange])}}}(),"function"==typeof n&&!n.m&&n.prototype&&(we(n.prototype,"componentWillMount"),we(n.prototype,"componentWillReceiveProps"),we(n.prototype,"componentWillUpdate"),n.m=!0)}ke&&ke(t)};function Ce(e){return!!e&&e.$$typeof===fe}const xe={useState:N,useReducer:W,useEffect:B,useLayoutEffect:q,useRef:Y,useImperativeHandle:U,useMemo:Z,useCallback:function(e,t){return H=8,Z((function(){return e}),t)},useContext:K,useDebugValue:function(t,n){e.options.useDebugValue&&e.options.useDebugValue(n?n(t):t)},version:"16.8.0",Children:se,render:be,hydrate:be,unmountComponentAtNode:function(t){return!!t.__k&&((0,e.render)(null,t),!0)},createPortal:function(t,n){return(0,e.createElement)(ge,{vnode:t,container:n})},createElement:e.createElement,createContext:e.createContext,createFactory:function(t){return e.createElement.bind(null,t)},cloneElement:function(t){return Ce(t)?e.cloneElement.apply(null,arguments):t},createRef:e.createRef,Fragment:e.Fragment,isValidElement:Ce,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:e.Component,PureComponent:re,memo:ae,forwardRef:function(e){function t(t){var n=te({},t);return delete n.ref,e(n,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t},unstable_batchedUpdates:function(e,t){return e(t)},Suspense:de,SuspenseList:he,lazy:function(t){var n,r,a;function o(o){if(n||(n=t()).then((function(e){r=e.default||e}),(function(e){a=e})),a)throw a;if(!r)throw n;return(0,e.createElement)(r,o)}return o.displayName="Lazy",o.t=!0,o}},Ie=()=>(0,e.h)("svg",{width:"3",height:"15",viewBox:"0 0 3 15",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M3 1.5C3 2.32843 2.32843 3 1.5 3C0.671573 3 0 2.32843 0 1.5C0 0.671573 0.671573 0 1.5 0C2.32843 0 3 0.671573 3 1.5Z"}),(0,e.h)("path",{d:"M3 7.5C3 8.32843 2.32843 9 1.5 9C0.671573 9 0 8.32843 0 7.5C0 6.67157 0.671573 6 1.5 6C2.32843 6 3 6.67157 3 7.5Z"}),(0,e.h)("path",{d:"M3 13.5C3 14.3284 2.32843 15 1.5 15C0.671573 15 0 14.3284 0 13.5C0 12.6716 0.671573 12 1.5 12C2.32843 12 3 12.6716 3 13.5Z"})),Oe=t=>{let{style:n}=t;return(0,e.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,focusable:"false"},(0,e.h)("path",{d:"M10 7C10 6.44772 9.55228 6 9 6C8.44772 6 8 6.44772 8 7H10ZM9 11H8C8 11.5523 8.44772 12 9 12V11ZM13 12C13.5523 12 14 11.5523 14 11C14 10.4477 13.5523 10 13 10V12ZM10 17C6.13401 17 3 13.866 3 10H1C1 14.9706 5.02944 19 10 19V17ZM17 10C17 13.866 13.866 17 10 17V19C14.9706 19 19 14.9706 19 10H17ZM10 3C13.866 3 17 6.13401 17 10H19C19 5.02944 14.9706 1 10 1V3ZM10 1C5.02944 1 1 5.02944 1 10H3C3 6.13401 6.13401 3 10 3V1ZM8 7V11H10V7H8ZM9 12H13V10H9V12Z"}))},Te=t=>{let{style:n}=t;return(0,e.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n,focusable:"false"},(0,e.h)("path",{d:"M11 13C11 13.5523 11.4477 14 12 14C12.5523 14 13 13.5523 13 13H11ZM13 7C13 6.44772 12.5523 6 12 6C11.4477 6 11 6.44772 11 7H13ZM9 2V1C8.73478 1 8.48043 1.10536 8.29289 1.29289L9 2ZM11 2L11.7071 1.29289C11.5196 1.10536 11.2652 1 11 1V2ZM3 2C2.44772 2 2 2.44772 2 3C2 3.55228 2.44772 4 3 4V2ZM17 4C17.5523 4 18 3.55228 18 3C18 2.44772 17.5523 2 17 2V4ZM5 7C5 6.44772 4.55228 6 4 6C3.44772 6 3 6.44772 3 7H5ZM17 7C17 6.44772 16.5523 6 16 6C15.4477 6 15 6.44772 15 7H17ZM9 7C9 6.44772 8.55228 6 8 6C7.44772 6 7 6.44772 7 7H9ZM7 13C7 13.5523 7.44772 14 8 14C8.55228 14 9 13.5523 9 13H7ZM13 13V7H11V13H13ZM9 3H11V1H9V3ZM15 7V16H17V7H15ZM15 16H5V18H15V16ZM5 16V7H3V16H5ZM3 4H8V2H3V4ZM8.29289 1.29289L7.29289 2.29289L8.70711 3.70711L9.70711 2.70711L8.29289 1.29289ZM8 4H12V2H8V4ZM12 4H17V2H12V4ZM10.2929 2.70711L11.2929 3.70711L12.7071 2.29289L11.7071 1.29289L10.2929 2.70711ZM7 7V13H9V7H7ZM5 16L5 16H3C3 17.1046 3.89543 18 5 18V16ZM15 16L15 16V18C16.1046 18 17 17.1046 17 16H15Z"}))},Me=t=>{let{style:n}=t;return(0,e.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",style:n},(0,e.h)("path",{d:"M11 8V9C10.5955 9 10.2309 8.75636 10.0761 8.38268C9.92134 8.00901 10.0069 7.57889 10.2929 7.29289L11 8ZM10.5 2.5L11.2071 3.20711L10.5 2.5ZM6 8V18H4V8H6ZM5 17H14.3604V19H5V17ZM15.341 16.1961L16.541 10.1961L18.5021 10.5884L17.3021 16.5883L15.341 16.1961ZM11.2071 3.20711L5.70711 8.70711L4.29289 7.29289L9.79289 1.79289L11.2071 3.20711ZM15.5604 9H11V7H15.5604V9ZM10.2929 7.29289L12.7929 4.79289L14.2071 6.20711L11.7071 8.70711L10.2929 7.29289ZM5 9H3V7H5V9ZM2 10V16H0V10H2ZM3 17H5V19H3V17ZM2 16C2 16.5523 2.44771 17 3 17V19C1.34315 19 0 17.6569 0 16H2ZM3 9C2.44772 9 2 9.44772 2 10H0C0 8.34315 1.34315 7 3 7V9ZM12.7929 4.79289C13.2308 4.35499 13.2308 3.64501 12.7929 3.20711L14.2071 1.79289C15.4261 3.01184 15.4261 4.98815 14.2071 6.20711L12.7929 4.79289ZM9.79289 1.79289C11.0118 0.573941 12.9882 0.573942 14.2071 1.79289L12.7929 3.20711C12.355 2.7692 11.645 2.7692 11.2071 3.20711L9.79289 1.79289ZM14.3604 17C14.8371 17 15.2475 16.6635 15.341 16.1961L17.3021 16.5883C17.0217 17.9906 15.7904 19 14.3604 19V17ZM16.541 10.1961C16.6647 9.57732 16.1914 9 15.5604 9V7C17.4535 7 18.8734 8.73198 18.5021 10.5884L16.541 10.1961Z"}))},_e=t=>{let{style:n}=t;return(0,e.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:n},(0,e.h)("path",{d:"M8 11V10C8.40446 10 8.7691 10.2436 8.92388 10.6173C9.07866 10.991 8.9931 11.4211 8.70711 11.7071L8 11ZM8.5 16.5L7.79289 15.7929L8.5 16.5ZM13 11L13 1H15L15 11H13ZM14 2H4.63961V0H14V2ZM3.65903 2.80388L2.45903 8.80388L0.497866 8.41165L1.69787 2.41165L3.65903 2.80388ZM7.79289 15.7929L13.2929 10.2929L14.7071 11.7071L9.20711 17.2071L7.79289 15.7929ZM3.43961 10H8V12H3.43961V10ZM8.70711 11.7071L6.20711 14.2071L4.79289 12.7929L7.29289 10.2929L8.70711 11.7071ZM14 10H16L16 12H14L14 10ZM17 9V3H19L19 9H17ZM16 2L14 2V0L16 0V2ZM17 3C17 2.44771 16.5523 2 16 2V0C17.6569 0 19 1.34315 19 3H17ZM16 10C16.5523 10 17 9.55228 17 9H19C19 10.6569 17.6569 12 16 12L16 10ZM6.20711 14.2071C5.7692 14.645 5.7692 15.355 6.20711 15.7929L4.79289 17.2071C3.57394 15.9882 3.57394 14.0118 4.79289 12.7929L6.20711 14.2071ZM9.20711 17.2071C7.98815 18.4261 6.01184 18.4261 4.79289 17.2071L6.20711 15.7929C6.64501 16.2308 7.35499 16.2308 7.79289 15.7929L9.20711 17.2071ZM4.63961 2C4.16293 2 3.75251 2.33646 3.65903 2.80388L1.69787 2.41165C1.97832 1.00938 3.20956 0 4.63961 0V2ZM2.45903 8.80388C2.33527 9.42268 2.80856 10 3.43961 10V12C1.54647 12 0.126591 10.268 0.497866 8.41165L2.45903 8.80388Z"}))},je=e=>e&&e.current&&e.current.base,De=j("button")((e=>{let{open:t,theme:n}=e;return Object.assign({position:"absolute",top:"10px",right:"10px",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:"10",background:n.getCSSColor(t?"background.optionsActive":"background.options"),"&:hover":{background:n.getCSSColor("background.optionsHover")}," > svg":{fill:n.getCSSColor(t?"icon.optionsActive":"icon.options")},"&:hover > svg":{fill:n.getCSSColor("icon.optionsHover")}},n.getElementFocusCSSProperties())})),Le=j("button")((e=>{let{theme:t}=e;return Object.assign({position:"absolute",top:"10px",right:"10px",width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:"10",background:"transparent"," > svg":{stroke:t.getCSSColor("icon.options")},"&:hover":{background:t.getCSSColor("background.optionsActive")},"&:hover > svg":{stroke:t.getCSSColor("icon.optionsActive")}},t.getElementFocusCSSProperties())})),Fe=t=>{let{theme:n,open:r,feedOrientation:a,children:o,cardRef:i,ariaLabelledBy:s}=t;const l=Y(null);let c={direction:"down",maxHeight:0,maxWidth:0};return r&&(c=((e,t,n)=>{if(je(t)&&je(n)){const r=t.current.base.offsetParent,a=r.offsetParent,o=n.current.base,i=10,s=10;if("horizontal"===e){const e=r.offsetLeft+o.offsetLeft-a.scrollLeft,t=a.clientWidth-e,n=200,i=e>=n||t<n;return{direction:i?"left":"right",maxWidth:i?e:t}}const l=o.offsetTop,c=a.scrollHeight-r.offsetTop-i-l,d=r.offsetTop,u=o.scrollHeight,h=c>=u||d<u;return{direction:h?"down":"up",maxHeight:h?c:d,maxWidth:r.clientWidth-2*s}}return{direction:"down",maxHeight:0,maxWidth:0}})(a,i,l),setTimeout((()=>{if(je(l)){const e=l.current.base.querySelector('[tabindex="0"]');if(e){e.focus()}}}),0)),(0,e.h)(Ae,{maxHeight:`${c.maxHeight}px`,maxWidth:`${c.maxWidth}px`,open:r,theme:n,ref:l,children:o,direction:c.direction,"aria-labelledBy":s})},Ae=j("ul")((e=>{var t;let n,{theme:r,open:a,maxHeight:o,maxWidth:i,direction:s}=e;switch(s){case"up":n="translateY(-100%) translateY(-50px)";break;case"down":case"left":n="translateY(0)";break;case"right":n="translateX(90%)"}return{position:"absolute",top:"50px",right:"10px",width:"300px",flexShrink:"0",background:r.getCSSColor("background.sheet"),display:"flex",flexFlow:"column",boxShadow:"0px 2px 10px rgba(0, 0, 0, 0.2)",borderRadius:null!==(t=r.getShape("borderRadius.sheet",{skipFallback:!0}))&&void 0!==t?t:"5px",padding:"10px 0",overflow:"auto",listStyle:"none",margin:"0",zIndex:"11",maxHeight:a?`${o}`:"0px",maxWidth:a?`${i}`:"0px",visibility:a?"visible":"hidden",transform:n}})),He=j("button")((e=>{let{theme:t}=e;return Object.assign(Object.assign(Object.assign({padding:"15px 20px",cursor:"pointer",display:"flex",flexShrink:"0",alignItems:"center",background:"transparent"},t.getCSSFontProperties("sheetItem")),{color:t.getCSSColor("text.sheetItem"),width:"100%",margin:"0 0 0 0"," svg":{fill:t.getCSSColor("icon.sheetItem")},"&:hover":{background:t.getCSSColor("background.sheetItemActive"),color:t.getCSSColor("text.sheetItemActive")},"&:hover svg":{fill:t.getCSSColor("icon.sheetItemActive")},border:"0px"}),t.getElementFocusCSSProperties())})),Ee=j("span")((()=>({maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),Pe=j("li")((e=>{let{theme:t}=e;return{borderTop:`1px solid ${t.getCSSColor("border.sheetItemDivider")}`,height:"1px",margin:"10px 0"}})),Re=j("li")((()=>({flexShrink:"0"}))),Ve=t=>{let{title:n,icon:r,onClick:a,theme:o,className:i}=t;const s={marginRight:"20px",minWidth:"20px"};return(0,e.h)(Re,{role:"none"},(0,e.h)(He,{theme:o,tabIndex:"-1",onClick:a,className:i},"bin"===r&&(0,e.h)(Te,{style:s}),"clock"===r&&(0,e.h)(Oe,{style:s}),"thumbs-up"===r&&(0,e.h)(Me,{style:s}),"thumbs-down"===r&&(0,e.h)(_e,{style:s}),(0,e.h)(Ee,null,n)))},ze=t=>{let{fillColor:n,className:r,style:a}=t;return(0,e.h)("svg",{width:"14",height:"10",viewBox:"0 0 14 10",class:r,style:a,focusable:"false"},(0,e.h)("path",{d:"M13.7071 0.292893C14.0976 0.683417 14.0976 1.31658 13.7071 1.70711L5.70711 9.70711C5.31658 10.0976 4.68342 10.0976 4.29289 9.70711L0.292893 5.70711C-0.0976311 5.31658 -0.0976311 4.68342 0.292893 4.29289C0.683417 3.90237 1.31658 3.90237 1.70711 4.29289L5 7.58579L12.2929 0.292893C12.6834 -0.0976311 13.3166 -0.0976311 13.7071 0.292893Z",fill:n}))},$e="YYYY-MM-DD[T]HH:mm:ssZZ",Ne=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,We="displayedCards",Be=D({to:{opacity:"0"}}),qe=D({to:{opacity:"1"}}),Ye=D({to:{opacity:"1",width:"400%",paddingTop:"400%"}}),Ue=D({to:{opacity:"0",transform:"scale(0.9)"}}),Ze=D({from:{opacity:"1",transform:"scale(1)"},to:{opacity:"0",transform:"scale(0)"}}),Ke=D({to:{transform:"translateX(-120%)"}}),Ge=D({from:{left:"100%"},to:{left:"50%"}}),Xe=D({from:{},to:{height:"0px"}}),Je=D({from:{},to:{width:"0px"}}),Qe=t=>{let{theme:n,animationState:r}=t;return(0,e.h)(e.Fragment,null,(0,e.h)(tt,{theme:n,class:r}),(0,e.h)(ze,{fillColor:n.getCSSColor("icon.cardCompletion"),className:"tick-icon",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}}))},et=t=>{let{animationState:n,theme:r}=t;return(0,e.h)(e.Fragment,null,(0,e.h)("div",{class:`${n||""} dismiss-icon`,style:{background:r.getCSSColor("background.quickActionPrimary")}},(0,e.h)(Te,{style:{fill:r.getCSSColor("icon.quickActionPrimary")}})),(0,e.h)("div",{class:`${n||""} clock-icon`,style:{background:r.getCSSColor("background.quickActionSecondary")}},(0,e.h)(Oe,{style:{fill:r.getCSSColor("icon.quickActionSecondary")}})))},tt=j("div")((e=>{let{theme:t}=e;return{background:t.getCSSColor("background.cardCompletion"),position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",transformOrigin:"center",borderRadius:"999px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",opacity:"0",width:"0px",paddingTop:"0px",".submitting":{animation:`${Ye} 0.6s ease 0.2s forwards`},".submitted":{animation:`${Ye} 0s ease forwards`},".submitted-subview":{animation:`${Ye} 0.6s ease 0.2s forwards`}}})),nt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vertical";return{cardCompletion:{" .tick-icon":{opacity:"0"},".submitting":{overflow:"hidden",padding:"11px 21px"},".submitting .tick-icon":{animation:`${qe} 0.2s ease 0.2s forwards`},".submitting .card-nodes":{animation:`${Be} 0.2s ease forwards`},".submitted":Object.assign(Object.assign(Object.assign({},"vertical"===e?{animation:`${Ue} 0.4s ease forwards`}:{}),{overflow:"hidden"}),"horizontal"===e?{transform:"translateX(-120%)",opacity:"0"}:{}),".submitted .tick-icon":{animation:`${qe} 0.2s ease forwards`},".submitted .card-nodes":{opacity:"0"},".submitted-subview":Object.assign({animation:`${Ue} 0.4s ease 0.8s forwards`,overflow:"hidden"},"horizontal"===e?{transform:"translateX(-120%)",opacity:"0"}:{}),".submitted-subview .tick-icon":{animation:`${qe} 0.2s ease 0.2s forwards`},".submitted-subview .card-nodes":{animation:`${Be} 0.2s ease forwards`}},dismissal:{".dismissing":{animation:"vertical"===e?`${Ke} 0.4s ease forwards`:`${Be} 0.3s ease forwards`},".dismissed":Object.assign({transform:"translateX(-120%)"},"horizontal"===e?{animation:`${Xe}`,opacity:"0"}:{})},snooze:{".snoozing":{animation:"vertical"===e?`${Ke} 0.4s ease forwards`:`${Be} 0.3s ease forwards`},".snoozed":Object.assign({transform:"translateX(-120%)"},"horizontal"===e?{animation:`${Xe}`,opacity:"0"}:{})}}},rt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"vertical";return{cardCompletion:{".submitted":{animation:`${"vertical"===e?Xe:Je} 0.4s ease 0.2s forwards`},".submitted .clock-icon":Object.assign({},"horizontal"===e?{width:"0"}:{}),".submitted .dismiss-icon":Object.assign({},"horizontal"===e?{width:"0"}:{}),".submitted-subview":{animation:"vertical"===e?`${Xe} 0.4s ease 1.0s forwards`:`${Je} 0.4s ease 0.2s forwards`}},dismissal:{position:"relative"," .dismiss-icon":Object.assign({position:"absolute",left:"vertical"===e?"120%":"50%",top:"50%",width:"50px",height:"50px",margin:"vertical"===e?"-25px 0 0 -25px":"-29px 0 0 -20px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"===e?{}:{opacity:"0"}),".dismissing .dismiss-icon":{animation:"vertical"===e?`${Ge} 0.4s ease forwards`:`${qe} 0.3s ease 0.3s forwards`},".dismissed":{animation:"vertical"===e?`${Xe} 0.4s ease 0.4s forwards`:`${Je} 0.3s ease 0.3s forwards`},".dismissed .dismiss-icon":{left:"50%",animation:"vertical"===e?`${Ze} 0.4s ease forwards`:`${Ze} 0.3s ease forwards`},".dismissed .clock-icon":Object.assign({},"horizontal"===e?{width:"0"}:{})},snooze:{position:"relative"," .clock-icon":Object.assign({position:"absolute",left:"vertical"===e?"120%":"50%",top:"50%",width:"50px",height:"50px",margin:"vertical"===e?"-25px 0 0 -25px":"-29px 0 0 -20px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"===e?{}:{opacity:"0"}),".snoozing .clock-icon":{animation:"vertical"===e?`${Ge} 0.4s ease forwards`:`${qe} 0.3s ease 0.3s forwards`},".snoozed":{animation:"vertical"===e?`${Xe} 0.4s ease 0.4s forwards`:`${Je} 0.3s ease 0.3s forwards`},".snoozed .clock-icon":{left:"50%",animation:"vertical"===e?`${Ze} 0.4s ease forwards`:`${Ze} 0.3s ease forwards`},".snoozed .dismiss-icon":Object.assign({},"horizontal"===e?{width:"0"}:{})},center:{position:"relative",".centering":{position:"relative",left:"50%",transform:"translateX(-50%)",transition:"left 0.4s ease-out"}}}},at=600,ot=600,it=600,st=e=>{switch(e){case"submitted":return 400;case"submitted-subview":return 1200;case"dismissed":case"snoozed":return 800;case"centering":return 500;default:return 0}},lt=32,ct=38,dt=40,ut=13,ht=27,pt=-1,mt=e=>{switch(e){case"ArrowUp":case"Up":return ct;case"ArrowDown":case"Down":return dt;case"Enter":return ut;case"Spacebar":case" ":return lt;case"Escape":return ht;default:return pt}},gt=j("div")((e=>{let{theme:t}=e;return Object.assign({border:"0"},t.getElementFocusCSSProperties())})),vt=(e,t)=>{try{const n=ft(e)[t];return n&&"none"===n.getAttribute("role")&&n.childNodes.length>0?n.childNodes[0]:n}catch(e){return null}},ft=e=>e&&e.current&&e.current.base&&e.current.base.childNodes?[...e.current.base.childNodes].filter((e=>"true"!==e.getAttribute("aria-hidden"))):[],bt=t=>{let{defaultIndex:n,theme:r,children:a}=t;const[o,i]=N(n||0),s=(0,e.createRef)(),l=Y(-1);B((()=>{l.current=o}));const c=l.current;return B((()=>{i(n||0)}),[n]),B((()=>{var e,t,n;-1!==c&&(null===(n=vt(s,c))||void 0===n||n.setAttribute("tabIndex","-1"));null===(e=vt(s,o))||void 0===e||e.setAttribute("tabIndex","0"),null===(t=vt(s,o))||void 0===t||t.focus()}),[o]),(0,e.h)(gt,{theme:r,className:"supports-keyboard-navigation",ref:s,onKeyDown:e=>{var t;let n=null;switch(mt(e.key)){case dt:n=o+1;break;case ct:n=o-1;break;case ut:case lt:null===(t=vt(s,o))||void 0===t||t.click(),e.stopPropagation(),e.preventDefault()}var r,a;null!==n&&(r=n,a=ft(s).length,n=(r+a)%a,i(n),e.view.event.preventDefault())}},a)},yt=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"12",height:"12",viewBox:"0 0 12 12"},(0,e.h)("path",{d:"M1 1L6 6L11 11M1 11L11 1","stroke-width":"2","stroke-linecap":"round",stroke:n}))};var wt=n(7292);const St=()=>({handleSubviewLinkPress:(e,t,n)=>kt(e,t,n),finishSubview:e=>Ct(e),viewMedia(e,t,n){if(e.application.isPreview)return e;if(!n||!n.url||0===n.url.trim().length)return e;return Ot(e,{kind:"media",cardInstanceId:t,item:n})},navigateBack(e){if(e.navigationStack.items.length){const r=e.navigationStack.items[e.navigationStack.items.length-1];let a=e.cardResponses[r.cardInstanceId]?Object.assign({},e.cardResponses[r.cardInstanceId]):void 0,o=e.validationStates[r.cardInstanceId]?Object.assign({},e.validationStates[r.cardInstanceId]):void 0;var t,n;if(r&&"subview"===r.kind)a&&(null===(t=a.subviews)||void 0===t||delete t[r.subviewId]),o&&(null===(n=o.subviews)||void 0===n||delete n[r.subviewId]);return Object.assign(Object.assign({},Tt(e)),{cardResponses:Object.assign(Object.assign({},e.cardResponses),a?{[r.cardInstanceId]:a}:{}),validationStates:Object.assign(Object.assign({},e.validationStates),o?{[r.cardInstanceId]:o}:{}),messages:Object.assign(Object.assign({},e.messages),{subview:void 0})})}return e},clearSubviewsForCardInstance(e,t){const n=e.navigationStack.items.slice().filter((e=>e.cardInstanceId!==t));return Object.assign(Object.assign({},e),{navigationStack:{items:n}})},requestSnooze(e,t,n){if(e.application.isPreview)return e;return Ot(e,{kind:"snooze",cardInstanceId:t,source:n})},requestFeedback(e,t,n){if(e.application.isPreview)return e;return Ot(e,{kind:"feedback",cardInstanceId:t,source:n})}}),kt=(e,t,n)=>{const r=e.cardFeed.cardInstances;if(r){const a=r.find((e=>e.instance.id===t)),o=a&&a.subviews[n];if(a&&o){const t={kind:"subview",cardInstance:a,cardInstanceId:a.instance.id,subviewId:n};return Ot(e,t)}}return e},Ct=e=>{const t=e.cardFeed.cardInstances;return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:t,status:{loaded:!0}}),navigationStack:{items:[]}})};let xt;const It=()=>(xt||(xt=(0,u.kv)((0,u.Y2)(St),c())),xt),Ot=(e,t)=>{let n=e.navigationStack.items.slice();for(const[e,r]of n.entries())switch(r.cardInstanceId!==t.cardInstanceId&&(n=[]),r.kind){case"subview":case"snooze":case"feedback":r.kind===t.kind&&n.splice(e,1);break;case"media":r.kind===t.kind&&r.item.url===t.item.url&&n.splice(e,1)}return Object.assign(Object.assign({},e),{navigationStack:{items:[...n,t]}})},Tt=e=>{const t=e.navigationStack.items.slice();return t.pop(),Object.assign(Object.assign({},e),{navigationStack:{items:t}})},Mt=e=>e.navigationStack.items.length?e.navigationStack.items[e.navigationStack.items.length-1]:null;function _t(e){return void 0!==e&&"subview"===e.kind}function jt(e){return void 0!==e&&"snooze"===e.kind}function Dt(e){return void 0!==e&&"feedback"===e.kind}function Lt(e){return void 0!==e&&"media"===e.kind}var Ft=n(2807),At=n.n(Ft);const Ht=e=>Object.keys(e).filter((t=>e[t])).join(" "),Et=(e,t)=>{const n=((e,t)=>At()(new Date(t,e-1)))(e,t),r=new Date(t,e-1,1).getDay()||7,a=[...Array(n)].map(((n,a)=>({date:new Date(t,e-1,a+1),style:{msGridRow:Math.ceil((r+a)/7),msGridColumn:(r-1+a)%7+1,gridRowStart:Math.ceil((r+a)/7),gridColumnStart:(r-1+a)%7+1}})));return a},Pt=(e,t)=>{let{isMax:n,isMin:r}=t;const a=new Date(e);return n?(0,wt.endOfDay)((0,wt.addMinutes)(a,a.getTimezoneOffset())):r?(0,wt.addMinutes)(a,a.getTimezoneOffset()):a};var Rt=n(5616),Vt=n.n(Rt),zt=n(623),$t=n.n(zt);const Nt={required:(e,t)=>{const n=e.errorMessage||"This field is required";return e.required&&(null==t||null==t||"string"==typeof t&&0==t.length)?{type:"invalid",errorMessage:n}:{type:"valid"}},minimumDate:(e,t)=>{const n=Pt(e.minimumDate,{isMin:!0}),r=e.errorMessage||`Value must be after ${Vt()(n,"DD MMM YYYY")}`;if(null==t||null==t)return{type:"invalid",errorMessage:r};const a=new Date(t);return!$t()(a)||a<n?{type:"invalid",errorMessage:r}:{type:"valid"}},maximumDate:(e,t)=>{const n=Pt(e.maximumDate,{isMax:!0}),r=e.errorMessage||`Value must be before ${Vt()(n,"DD MMM YYYY")}`;if(null==t||null==t)return{type:"invalid",errorMessage:r};const a=new Date(t);return!$t()(a)||a>n?{type:"invalid",errorMessage:r}:{type:"valid"}},regexp:(e,t)=>{const n=e.errorMessage||"Value does not meet requirements";if(null==t||null==t)return{type:"invalid",errorMessage:n};try{if(!new RegExp(e.regexp).test(t))return{type:"invalid",errorMessage:n}}catch(e){}return{type:"valid"}},minimum:(e,t)=>{const n=e.errorMessage||`Value must be at least ${e.minimum}`;return null==t||null==t||t<e.minimum?{type:"invalid",errorMessage:n}:{type:"valid"}},maximum:(e,t)=>{const n=e.errorMessage||`Value must be no more than ${e.maximum}`;return null==t||null==t||t>e.maximum?{type:"invalid",errorMessage:n}:{type:"valid"}},minimumLength:(e,t)=>{const n=e.errorMessage||(1===e.minimumLength?"Value must be at least 1 character":`Value must be at least ${e.minimumLength} characters`);return null==t||null==t||t.length<e.minimumLength?{type:"invalid",errorMessage:n}:{type:"valid"}},maximumLength:(e,t)=>{const n=e.errorMessage||(1===e.maximumLength?"Value must be no more than 1 character":`Value must be no more than ${e.maximumLength} characters`);return null==t||null==t?{type:"valid"}:t.length>e.maximumLength?{type:"invalid",errorMessage:n}:{type:"valid"}}},Wt=["required","minimumLength","maximumLength","minimum","maximum","minimumDate","maximumDate","regexp"],Bt=(e,t)=>{if(!t)return{type:"valid"};for(const n in Wt){const r=Wt[n];if(void 0===t[r])continue;const a=Nt[r];if(a){const n=a(t[r].attributes,e);if("invalid"===n.type)return n}}return{type:"valid"}},qt=()=>({handleImageLinkPress(e,t,n){const r=e.navigationStack.items.length?"subview":"topview",a=Object.assign(Object.assign({},n.currentSubviewId&&{subviewId:n.currentSubviewId}),n.currentSubviewTitle&&{subviewTitle:n.currentSubviewTitle});return n.layoutId?kt(e,t,n.layoutId):n.payload&&!e.application.isPreview?Ut(e,"payload","image",t,r,n.payload,a):e},handleLinkButtonPress(e,t,n,r,a){const o=e.navigationStack.items.length?"subview":"topview";return r?kt(e,t,r):a&&!e.application.isPreview?Ut(e,"payload","linkButton",t,o,a,n):e},handleSubmitButtonPayload(e,t,n,r){const a=e.navigationStack.items.length?"subview":"topview";return Ut(e,"payload","submitButton",t,a,r,n)},openExternalUrl:(e,t,n,r,a,o,i)=>(null==i?void 0:i.url)&&!e.application.isPreview?Zt(e,a,o,t,n,i,r):e,handleFormChange:(e,t,n,r,a)=>Yt(e,t,{[n]:r},a),createResponseWithDefaults:(e,t,n,r)=>Yt(e,t,n,r),validateField(e,t,n,r,a,o){var i,s,l,c;let d=Bt(r,a);const u=d&&!o?{[n]:d}:{},h=d&&o?{[n]:d}:{},p=e.validationStates,m=null!==(i=null===(l=p[t])||void 0===l?void 0:l.validations)&&void 0!==i?i:{},g=null!==(s=null===(c=p[t])||void 0===c?void 0:c.subviews)&&void 0!==s?s:{};return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},p),{[t]:{validations:Object.assign(Object.assign({},m),u),subviews:Object.assign(Object.assign({},g),h&&o?{[o]:Object.assign(Object.assign({},g[o]),h)}:{})}})})},validateCurrentSubview(e,t){const n=Mt(e);if(n&&_t(n)){const r=n.subviewId,a=n.cardInstance.subviews[r],o=Kt(e,a.nodes,t,r);let i=e.validationStates;return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},i),{[t]:Object.assign(Object.assign({},e.validationStates[t]),{subviews:{[r]:o}})})})}return e},validateCardTopLevel(e,t){const[n]=e.cardFeed.cardInstances.filter((e=>e.instance.id===t));let r={};return n&&(r=Kt(e,n.defaultView.nodes,t)),Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},e.validationStates),{[t]:Object.assign(Object.assign({},e.validationStates[t]),{validations:r})})})}}),Yt=(e,t,n,r)=>{var a;const o=e.cardResponses[t]||{},i=r?null===(a=o.subviews)||void 0===a?void 0:a[r]:{};return Object.assign(Object.assign({},e),{cardResponses:Object.assign(Object.assign({},e.cardResponses),{[t]:{responses:Object.assign(Object.assign({},o.responses),r?{}:n),subviews:Object.assign(Object.assign({},o.subviews),r?{[r]:Object.assign(Object.assign({},i),n)}:{})}})})},Ut=(e,t,n,r,a,o,i)=>Object.assign(Object.assign({},e),{externalAction:Object.assign({actionId:(new Date).getTime(),linkMethod:t,trigger:n,cardInstanceId:r,cardViewState:a,subviewData:i},o?{payload:{actionPayload:o,cardInstanceId:r,streamContainerId:e.application.streamContainerId}}:{})}),Zt=(e,t,n,r,a,o,i)=>Object.assign(Object.assign({},e),{externalAction:{actionId:(new Date).getTime(),linkMethod:t,trigger:n,urlLink:o,cardInstanceId:r,cardViewState:a,subviewData:i}}),Kt=(e,t,n,r)=>{var a;const o=fi(t),i=r?null===(a=e.cardResponses[n].subviews)||void 0===a?void 0:a[r]:e.cardResponses[n].responses;let s={};for(const e in o){const t=o[e];t.attributes.name&&i&&(s[t.attributes.name]=Bt(i[t.attributes.name],t.validations))}return s};let Gt;const Xt=()=>(Gt||(Gt=(0,u.kv)((0,u.Y2)(qt),c())),Gt),Jt=(e,t,n)=>{var r,a;const o=c().getState().cardResponses,i=null===(r=o[e])||void 0===r||null===(a=r.responses)||void 0===a?void 0:a[t];return null!=i?i:n?null===(s=o[e])||void 0===s||null===(l=s.subviews)||void 0===l||null===(d=l[n])||void 0===d?void 0:d[t]:void 0;var s,l,d};function Qt(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let en;!function(e){e[e.DISABLED=0]="DISABLED",e[e.TRANSACTIONS=1]="TRANSACTIONS",e[e.PAYLOAD=2]="PAYLOAD",e[e.FULL_DETAIL=3]="FULL_DETAIL"}(en||(en={}));class tn{static debug(e){tn.logLevel!==en.DISABLED&&(e.level1||e.level2||e.level3)&&console.log(...this.constructLogPayload(e))}static warn(e){tn.logLevel!==en.DISABLED&&(e.level1||e.level2||e.level3)&&console.warn(...this.constructLogPayload(e))}static error(e){tn.logLevel!==en.DISABLED&&(e.level1||e.level2||e.level3)&&console.error(...this.constructLogPayload(e))}}Qt(tn,"logLevel",en.DISABLED),Qt(tn,"constructLogPayload",(e=>{const t=["AtomicSDK Web -"];return tn.logLevel>=en.TRANSACTIONS&&e.level1&&t.push(...e.level1),tn.logLevel>=en.PAYLOAD&&e.level2&&t.push(...e.level2),tn.logLevel>=en.FULL_DETAIL&&e.level3&&t.push(...e.level3),t}));var nn=n(5877);const rn=e=>{if(!e)return null;try{const t=Ii(e);let n=t.atomic_sub||t.sub||null;return"number"==typeof n&&(n=String(n)),"string"==typeof n?n:null}catch(e){return null}};const an=function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:window;let r=new CustomEvent(e,{bubbles:!1,cancelable:!1,detail:t});n.dispatchEvent(r)};var on=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};function sn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ln="AACNoInternetError",cn="AACMissingApiHostError",dn="AACApiError",un="AACAuthTokenError",hn="Device is not connected to the internet",pn="API host was not specified for the request.",mn="An API error occurred.",gn="Failed to retrieve an authentication token for request.",vn={method:"GET",mode:"cors"},fn=e=>on(void 0,void 0,void 0,(function*(){const t=yield e.text();try{return{text:t,json:JSON.parse(t)}}catch(e){}return{text:t}})),bn=e=>e<400,yn=(e,t,n,r)=>{var a;const o=null!==(a=rn(n))&&void 0!==a?a:void 0;an("request-failed",{request:{path:e,statusCode:t,streamContainerId:"string"==typeof(null==r?void 0:r.streamContainerId)?null==r?void 0:r.streamContainerId:void 0,cardInstanceId:"string"==typeof(null==r?void 0:r.cardInstanceId)?null==r?void 0:r.cardInstanceId:void 0,endUserId:o}})};class wn{static initialise(e,t,n){this.apiHost=e,this.apiKey=t,this.environmentId=n,this.instanceId=(0,nn.v4)()}static reset(){this.apiHost="https://client-api.atomic.io",this.apiKey=void 0,this.environmentId=void 0}static setTestHostHeader(e){this.testHost=e}static setClientAppVersion(e){this.clientAppVersion=e}static verifyInitialised(){if(!this.isInitialised())throw new Error("The Atomic SDK has not been initialised with an API host, API key and environment ID. Call `AtomicSDK.initialise(apiHost, apiKey, environmentId)` before attempting to use the SDK.")}static isInitialised(){return void 0!==this.apiKey&&void 0!==this.environmentId}static get(e,t,n,r){return on(this,void 0,void 0,(function*(){let a,o;if(this.verifyInitialised(),!navigator.onLine){const e=new Error(hn);return e.name=ln,{response:{error:e}}}{const i=Cn(this.apiHost,e,this.environmentId);if(!i){const e=new Error(pn);return e.name=cn,{response:{error:e}}}let s;if(t)try{s=yield t.requestToken()}catch(e){const t=new Error(`${gn} ${e}`);return t.name=un,{response:{error:t}}}const l=Object.assign(Object.assign({},vn),{headers:Sn({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,lastModified:n,testHost:this.testHost,clientAppVersion:this.clientAppVersion})});try{const t=yield fetch(i,l);o=t.status;const n=yield fn(t);if(n.json&&(a=n.json),!bn(t.status))throw yn(e,o,s,r),new Error(`GET request failed with status code ${t.status}.`);return{data:a,response:{status:t.status,etag:t.headers.get("etag")}}}catch(e){const t=new Error(`${mn} ${e}`);return t.name=dn,{data:a,response:{status:o,error:t}}}}}))}static post(e,t,n,r){return on(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(hn);return e.name=ln,{response:{error:e}}}{let a,o;const i=Cn(this.apiHost,e,this.environmentId);if(!i){const e=new Error(pn);return e.name=cn,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${gn} ${e}`);return t.name=un,{response:{error:t}}}const l=Object.assign(Object.assign({},vn),{method:"POST",headers:Sn({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(i,l);o=t.status;const n=yield fn(t);if(n.json&&(a=n.json),!bn(t.status))throw yn(e,o,s,r),new Error(`POST request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${mn} ${e}`);return t.name=dn,{data:a,response:{status:o,error:t}}}}}))}static put(e,t,n,r){return on(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(hn);return e.name=ln,{response:{error:e}}}{let a,o;const i=Cn(this.apiHost,e,this.environmentId);if(!i){const e=new Error(pn);return e.name=cn,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${gn} ${e}`);return t.name=un,{response:{error:t}}}const l=Object.assign(Object.assign({},vn),{method:"PUT",headers:Sn({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(i,l);o=t.status;const n=yield fn(t);if(n.json&&(a=n.json),!bn(t.status))throw yn(e,o,s,r),new Error(`PUT request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${mn} ${e}`);return t.name=dn,{data:a,response:{status:o,error:t}}}}}))}static delete(e,t,n,r){return on(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(hn);return e.name=ln,{response:{error:e}}}{let a,o;const i=Cn(this.apiHost,e,this.environmentId);if(!i){const e=new Error(pn);return e.name=cn,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${gn} ${e}`);return t.name=un,{response:{error:t}}}const l=Object.assign(Object.assign({},vn),{method:"DELETE",headers:Sn({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(i,l);o=t.status;const n=yield fn(t);if(n.json&&(a=n.json),!bn(t.status))throw yn(e,o,s,r),new Error(`DELETE request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${mn} ${e}`);return t.name=dn,{data:a,response:{status:o,error:t}}}}}))}}sn(wn,"apiHost","https://client-api.atomic.io"),sn(wn,"apiKey",void 0),sn(wn,"environmentId",void 0),sn(wn,"instanceId",void 0),sn(wn,"testHost",void 0),sn(wn,"clientAppVersion","unknown");const Sn=e=>kn("header",Object.assign({},e)),kn=(e,t)=>{const n="header"===e;let r={"x-atomic-sdk-platform":"Web","x-atomic-sdk-version":"24.2.1","x-atomic-sdk-timezone":Intl.DateTimeFormat().resolvedOptions().timeZone,"x-atomic-sdk-device":navigator.userAgent};if(t.instanceId&&(r["x-atomic-sdk-instance-id"]=t.instanceId),n&&(r["Content-Type"]="application/json"),t.apiKey){r["ws"===t.scheme?"api-key":"x-atomic-sdk-api-key"]=t.apiKey}return t.authToken&&(n?r.Authorization=`Bearer ${t.authToken}`:r.Token=t.authToken),t.lastModified&&n&&(r["If-None-Match"]=t.lastModified),t.testHost&&(r["x-atomic-test-host"]=t.testHost),t.clientAppVersion&&(r["x-atomic-sdk-client-app-version"]=t.clientAppVersion),t.error&&(r.error=t.error),r},Cn=(e,t,n)=>{if(!e||0==e.trim().length)return null;return`${e.endsWith("/")?e:`${e}/`}${n&&n.trim().length>0?`${n}/`:""}${t}`};var xn=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const In=(e,t)=>e?Object.keys(e).reduce(((n,r)=>{const a=e[r];return t.includes(a||"")||(n[r]=e[r]),n}),{}):e,On=e=>In(e,["submitted","dismissed","snoozed","submitted-subview","centering"]),Tn=(e,t,n)=>{var r,a;const o=null===(r=e.cardFeed.cardInstances.filter((e=>e.instance.id!==t))[0])||void 0===r||null===(a=r.instance)||void 0===a?void 0:a.id;return Object.assign(Object.assign({},e.cardStates),o&&{[o]:n})},Mn=(e,t,n)=>(e||[]).reduce(((e,r,a)=>(n[r.instance.id]&&void 0===(t||[]).find((e=>e.instance.id===r.instance.id))&&e.splice(a,0,r),e)),[...t]),_n=function(){let e=Number(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0);return""+ ++e},jn=(e,t)=>t&&t.name===ln?"No internet connection":e,Dn=(e,t)=>{var n;return((null===(n=t.application.enabledUiElements.toastConfig)||void 0===n?void 0:n.toastMessages)||{})[e]},Ln=(e,t)=>{switch(t){case"cardList":return Object.assign(Object.assign({},e.messages),{cardList:void 0});case"subview":return Object.assign(Object.assign({},e.messages),{subview:void 0});default:return{lastMessageId:_n(e.messages.lastMessageId),cardList:void 0,subview:void 0}}},Fn=()=>({updateAppOpen(e,t){const n="launcher"===e.application.embedMode&&!0===e.application.open&&!1===t;return Object.assign(Object.assign({},e),{application:Object.assign(Object.assign({},e.application),{open:t}),messages:n?Ln(e):e.messages})},submittingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"submitting"})}),submittedCard(e,t,n){const r=Dn("submittedCard",e),a=_n(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:n?"submitted-subview":"submitted"}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=r?r:"Card submitted",messageId:a,cardInstanceId:t,action:"submitted"},lastMessageId:a})})},failedToSubmitCard(e,t,n,r,a,o){const i=In(e.cardStates,["centering","fixed-position"]),s=_n(e.messages.lastMessageId),l=_n(s);return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},i),{[t]:null}),messages:{cardList:Object.assign({text:n?void 0:jn("Couldn't submit",a),messageId:s,cardInstanceId:t,action:"submit-failed",responseValues:r},o||{}),subview:Object.assign({text:n?jn("Couldn't submit",a):void 0,messageId:l,cardInstanceId:t,action:"submit-failed",responseValues:r},o||{}),lastMessageId:l}})},dismissingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"dismissing"})}),dismissedCard(e,t){const n=Dn("dismissedCard",e),r=_n(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"dismissed"}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=n?n:"Card dismissed",messageId:r,cardInstanceId:t,action:"dismissed"},lastMessageId:r})})},failedToDismissCard(e,t,n,r){const a=In(e.cardStates,["centering","fixed-position"]),o=_n(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},a),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:jn("Couldn't dismiss",r),messageId:o,cardInstanceId:t,action:"dismiss-failed",source:n},lastMessageId:o})})},snoozingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"snoozing"})}),snoozedCard(e,t,n){const r=Dn("snoozedCard",e),a=_n(e.messages.lastMessageId);let o;return o=(0,wt.isToday)(n)?(0,wt.format)(n,"h:mm A"):(0,wt.format)(n,"D MMM YYYY, h:mm A"),Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"snoozed"}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=r?r:`Snoozed until ${o}`,messageId:a,cardInstanceId:t,action:"snoozed"},lastMessageId:a})})},failedToSnoozeCard(e,t,n,r,a){const o=In(e.cardStates,["centering","fixed-position"]),i=_n(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},o),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:jn("Couldn't snooze",a),messageId:i,cardInstanceId:t,action:"snooze-failed",snoozeDate:n,source:r},lastMessageId:i})})},fixPositionRemainingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:e.cardFeed.cardInstances.length<=2?Tn(e,t,"fixed-position"):In(e.cardStates,["centering","fixed-position"])}),centerRemainingCard(e,t){const n=e.cardFeed.cardInstances,r=n.filter((e=>e.instance.id!==t));return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:e.cardFeed.cardInstances.length<=2?r:n,status:{loaded:!0},updateId:(new Date).getTime()}),cardStates:e.cardFeed.cardInstances.length<=2?Tn(e,t,"centering"):In(e.cardStates,["centering","fixed-position"])})},removeCardState:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:null})}),removeCard(e,t){if(e.application.isPreview)return e;const n=e.cardFeed.cardInstances.filter((e=>e.instance.id!==t)),r=Object.assign({},e.cardStates);return delete r[t],Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:n,status:{loaded:!0},updateId:(new Date).getTime()}),cardStates:r})},cardFeedDeltaUpdate(e,t,n,r){return xn(this,void 0,void 0,(function*(){let a=Object.assign({},e),o=!1,i=[];if(t.forEach((e=>{switch(e.type){case"remove-card":{const{cardInstanceId:t,actionType:n}=e.data;if("limit"!==n&&(o=!0),a.application.isPreview)break;const r=a.cardFeed.cardInstances,i=a.application.isPreview?r:r.filter((e=>e.instance.id!==t));a=Object.assign(Object.assign({},a),{cardFeed:Object.assign(Object.assign({},a.cardFeed),{cardInstances:i})});break}case"update-card":{const{cardInstance:t,actionType:n}=e.data;let r=!1;t.runtimeVariables&&i.push(t);const s=a.cardFeed.cardInstances.map((e=>(e.instance.id===t.instance.id&&(r=!0,e=Object.assign({},t)),e)));r||(o=!0,s.push(t)),"unsnooze"===n&&(a.cardStates[t.instance.id]=null),a=Object.assign(Object.assign({},a),{cardFeed:Object.assign(Object.assign({},a.cardFeed),{cardInstances:s})});break}}})),i.length>0){const t=yield r(i),n=e.cardFeed.runtimeVariables.values;a.cardFeed.runtimeVariables={values:new Map([...n||new Map,...(null==t?void 0:t.values)||new Map]),updateId:(new Date).getTime()}}a.cardFeed.cardInstances=(e=>null==e?void 0:e.sort(((e,t)=>{const{priority:n,lastCardActiveTime:r,receivedAt:a}=e.metadata,{priority:o,lastCardActiveTime:i,receivedAt:s}=t.metadata;let l=0;return l=n-o,0===l&&(l=new Date(i).getTime()-new Date(r).getTime()),0===l&&(l=new Date(s).getTime()-new Date(a).getTime()),l})))(a.cardFeed.cardInstances),n(e.cardFeed.cardInstances.length!==a.cardFeed.cardInstances.length||o),"single-card"===e.application.embedMode&&(a.navigationStack={items:[]});const s=In(e.cardStates,["centering","fixed-position"]),l=On(s),c=Mn(e.cardFeed.cardInstances,a.cardFeed.cardInstances,l);return a.cardFeed.cardInstances=c,a.cardFeed.tutorialSeen=e.cardFeed.tutorialSeen||c.length>0,a.cardFeed.updateId=(new Date).getTime(),a.cardFeed.status.loaded=!0,a.cardStates=s,a}))},clearMessage:(e,t)=>Object.assign(Object.assign({},e),{messages:Ln(e,t)}),cardFeedLoading:e=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{status:{loaded:!1}})}),cardFeedLoaded(e,t){if(t.error){let n;if(t.error.name===ln)n="noInternet";else n="apiError";return tn.error({level1:["Error loading card feed"],level2:[n],level3:[t.error]}),Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{status:{loaded:!1,errorState:n}})})}if(!t.cardInstances)return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{status:Object.assign(Object.assign({},e.cardFeed.status),{loaded:!0})})});const n=In(e.cardStates,["centering","fixed-position"]),r=On(n),a=Mn(e.cardFeed.cardInstances,t.cardInstances,r);return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:t.lastModified,cardInstances:a,unfilteredCardInstanceCount:t.unfilteredCardInstanceCount||t.cardInstances.length,runtimeVariables:Object.assign(Object.assign({},t.runtimeVariables),{updateId:(new Date).getTime()}),tutorialSeen:e.cardFeed.tutorialSeen||t.cardInstances.length>0,status:{loaded:!0},updateId:(new Date).getTime(),metadata:t.metadata}),navigationStack:{items:"single-card"===e.application.embedMode?[]:e.navigationStack.items},cardStates:r})},runtimeVariablesResolved:(e,t)=>t.values?Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{runtimeVariables:Object.assign(Object.assign({},e.cardFeed.runtimeVariables),{values:t.values,updateId:(new Date).getTime()})})}):e,runtimeVariableReplacement(e,t){var n,r;const a=null!==(n=null==t?void 0:t.values)&&void 0!==n?n:null===(r=e.cardFeed.runtimeVariables)||void 0===r?void 0:r.values;return e.cardFeed.cardInstances.map((e=>yi(e,(null==a?void 0:a.get(e.instance.id))||new Map([])))),Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{runtimeVariables:null!=t?t:e.cardFeed.runtimeVariables})})},themeLoading:e=>Object.assign(Object.assign({},e),{theme:Object.assign(Object.assign({},e.theme),{status:{loaded:!1}})}),themeLoaded(e,t){if(t.error){let n;if(t.error.name===ln)n="noInternet";else n="apiError";return Object.assign(Object.assign({},e),{theme:Object.assign(Object.assign({},e.theme),{status:{loaded:!1,errorState:n}})})}return t.theme?Object.assign(Object.assign({},e),{theme:{themePayload:t.theme,status:{loaded:!0}}}):e},feedbackReceived(e,t){if(e.application.isPreview)return e;const n=Dn("feedbackReceived",e),r=_n(e.messages.lastMessageId);return Object.assign(Object.assign({},e),{messages:Object.assign(Object.assign({},e.messages),{cardList:{text:null!=n?n:"Feedback received",messageId:r,cardInstanceId:t,action:"other"},lastMessageId:r})})},userLoggedOut:e=>Object.assign(Object.assign({},e),{application:Object.assign(Object.assign({},e.application),{open:!1}),cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:"",cardInstances:[],runtimeVariables:{},status:{loaded:!0}}),navigationStack:{items:[]},cardResponses:{},validationStates:{},cardStates:{},messages:{lastMessageId:"0"}})});let An;const Hn=()=>(An||(An=(0,u.kv)((0,u.Y2)(Fn),c())),An);function En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pn="rgba(0, 0, 0, 1)",Rn="rgba(255, 255, 255, 1)",Vn='-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',zn={colors:{},typography:{},shape:{}},$n={icon:{switchOff:Rn,switchOn:Rn},background:{switchOff:"rgba(128, 128, 128, 1)",switchOn:Pn}};class Nn{constructor(e,t,n,r){En(this,"theme",void 0),En(this,"themeName",void 0),En(this,"fontFamilies",void 0),En(this,"hasSecondaryButtonStyle",!1),En(this,"testSecondaryStyles",((e,t,n)=>{const r=e=>{null===e||"object"!=typeof e||Array.isArray(e)?"string"==typeof e&&e.match(/\w+/g)&&(this.hasSecondaryButtonStyle=!0):Object.values(e).length>0&&(this.hasSecondaryButtonStyle=!0)};for(const[l,c]of Object.entries(e)){switch(l){case"actionSecondary":case"buttonSecondary":case"buttonHoverSecondary":case"buttonActiveSecondary":case"actionIconSecondary":case"buttonIconSecondary":case"actionSecondaryTop":case"actionSecondaryRight":case"actionSecondaryBottom":case"actionSecondaryLeft":case"buttonSecondaryTop":case"buttonSecondaryRight":case"buttonSecondaryBottom":case"buttonSecondaryLeft":case"buttonHoverSecondaryTop":case"buttonHoverSecondaryRight":case"buttonHoverSecondaryBottom":case"buttonHoverSecondaryLeft":case"buttonActiveSecondaryTop":case"buttonActiveSecondaryRight":case"buttonActiveSecondaryBottom":case"buttonActiveSecondaryLeft":case"actionSecondaryShadow":case"buttonSecondaryShadow":case"buttonHoverSecondaryShadow":case"buttonActiveSecondaryShadow":case"actionSecondaryXAxis":case"actionSecondaryYAxis":case"buttonSecondaryXAxis":case"buttonHoverSecondaryXAxis":case"buttonActiveSecondaryXAxis":case"buttonSecondaryYAxis":case"buttonHoverSecondaryYAxis":case"buttonActiveSecondaryYAxis":if(t.includes("shadowOffsets")&&!l.includes("XAxis")&&!l.includes("YAxis")){var a,o;const e="true"===(null==n||null===(a=n.shape)||void 0===a||null===(o=a.equalShadowOffsets)||void 0===o?void 0:o[l]);"string"==typeof c&&c.match(/\w+/g)&&e&&(this.hasSecondaryButtonStyle=!0);break}if(t.includes("equalShadowOffsets")||t.includes("equalPaddings"))break;r(c);break;case"actionSecondaryWidth":case"buttonSecondaryWidth":case"buttonHoverSecondaryWidth":case"buttonActiveSecondaryWidth":{var i,s;const e=l.replace("Width",""),t="true"===(null==n||null===(i=n.shape)||void 0===i||null===(s=i.equalPaddings)||void 0===s?void 0:s[e]);"string"==typeof c&&c.match(/\w+/g)&&t&&(this.hasSecondaryButtonStyle=!0);break}}if(!this.hasSecondaryButtonStyle&&null!==c&&"object"==typeof c&&!Array.isArray(c)){const e=t?t+"."+l:l;this.testSecondaryStyles(c,e,n)}}}));let a,o=!1;switch(r){case"automatic":o="dark"===n&&window.matchMedia("not all and (prefers-color-scheme), (prefers-color-scheme)").matches;break;case"light":o=!1;break;case"dark":o=!0}var i;o?a=(null===(i=e.alternate)||void 0===i?void 0:i.dark)||e.theme||{}:a=e.theme||{};this.testSecondaryStyles(a.feed||{},"",a.feed),this.testSecondaryStyles(a.workflow||{},"",a.workflow),this.themeName=t,this.theme=a[t]||zn,this.fontFamilies=a.fontFamilies||[]}getShape(e,t){return Bn(this.theme.shape,e,(null==t?void 0:t.skipFallback)?null:"")}getCSSShadowProperties(e,t){var n,r;const a=this.getShape(`blur.${e}Shadow`,t),o=this.getShape(`equalShadowOffsets.${e}`,t),i=this.getShape(`shadowOffsets.${e}`,t),s=this.getShape(`shadowOffsets.${e}XAxis`,t),l=this.getShape(`shadowOffsets.${e}YAxis`,t),c=this.getShape(`shadowOffsetType.${e}`,t),d=this.getCSSColor(`shadow.${e}`,{skipFallback:!0}),u="inset"===c?"inset":"",h=null!==(n="true"===o?i:s)&&void 0!==n?n:"0px",p=null!==(r="true"===o?i:l)&&void 0!==r?r:"0px";if(!d||d.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/))return"";return`${u} ${h} ${p} ${a||""} ${d}`.trim()}getPadding(e){var t,n,r,a;const o=null!==(t=null===(r=this.theme.shape)||void 0===r?void 0:r.padding)&&void 0!==t?t:{},i=null!==(n=null===(a=this.theme.shape)||void 0===a?void 0:a.equalPaddings)&&void 0!==n?n:{},s=Bn(i,`${e}`,null),l=Bn(o,`${e}Width`,null),c=Bn(o,`${e}Top`,null),d=Bn(o,`${e}Right`,null),u=Bn(o,`${e}Bottom`,null),h=Bn(o,`${e}Left`,null);return"true"===s&&l?`${l}`:c||d||u||h?`${c||0} ${d||0} ${u||0} ${h||0}`:""}getCSSColor(e,t){const n=Bn(this.theme.colors,e,null);if(n&&!(null==t?void 0:t.skipPrimaryStyle))return Wn(n.color,n.opacity);if(null==t?void 0:t.skipFallback)return null;const r=Bn($n,e,null);return r||("workflow"===this.themeName?e.startsWith("background")?Pn:Rn:e.startsWith("background")?"rgba(0, 0, 0, 0)":Pn)}getFontFamilies(){return this.fontFamilies}getTypographyStyle(e){var t;let n=Bn(this.theme.typography,e,null),r={size:"17px",isDefaultTypography:!0};return null===(t=n)||void 0===t||t.align,n||r}getNumericFontSize(e,t){var n;const r=this.getTypographyStyle(e);return(null==t?void 0:t.skipFallback)&&r.isDefaultTypography?null:(null===(n=r.scaling)||void 0===n?void 0:n.enabled)?this.getNumericScaledFontSize(r):Number(r.size.replace(/px/g,""))}getNumericScaledFontSize(e){const t=Number(window.getComputedStyle(document.documentElement).getPropertyValue("font-size").replace("px","")),n=t?t/16:1,r=Number(e.size.replace(/px/g,"")),a=r*n;if(e.scaling){const t=e.scaling.minimumSize?Number(e.scaling.minimumSize.replace(/px/g,"")):void 0,n=e.scaling.maximumSize?Number(e.scaling.maximumSize.replace(/px/g,"")):void 0;if(void 0===t&&void 0===n)return r;if(t&&a<t)return t;if(n&&a>n)return n}return a}getCSSFontProperties(e,t){var n,r;const a=this.getTypographyStyle(e);if(!a)return{};if((null==t?void 0:t.skipFallback)&&a.isDefaultTypography)return null;const o=a.transform&&"none"!=a.transform?a.transform:"none",i=a.lineHeight||1,s=(null!==(n=this.getNumericFontSize(e,t))&&void 0!==n?n:17)*i+"px",l=(null===(r=a.scaling)||void 0===r?void 0:r.enabled)?`${this.getNumericScaledFontSize(a)}px`:a.size,c=a.fontFamily?`"${a.fontFamily}", ${Vn}`:Vn,d=a.weight||"normal",u=a.style||"normal",h=a.align;return Object.assign({textTransform:o,lineHeight:s,fontSize:l,fontFamily:c,fontWeight:d,fontStyle:u,fontSynthesis:"weight style"},h?{textAlign:h}:{})}getElementFocusCSSProperties(){return{outline:"none","&.focus-visible":{boxShadow:`0 0 0 2px ${this.getCSSColor("border.focus")} inset`}}}}const Wn=(e,t)=>{const n=e.replace("#",""),r=parseInt(n,16);return`rgba(${[r>>16&255,r>>8&255,255&r].join(",")},${t})`},Bn=(e,t,n)=>(e=e[(t=Array.isArray(t)?t:t.split("."))[0]])&&t.length>1?Bn(e,t.slice(1),n):void 0!==e?e:n,qn=(e,t)=>n=>{let{themeMethod:r,primaryAccessor:a,secondaryAccessor:o,fallbackStyle:i,skipThemeHelperFallbacks:s,skipDefaultStyle:l}=n;const c=a?e[r](a,{skipFallback:s}):void 0,d=o?e[r](o,{skipFallback:!0}):void 0;let u="getCSSColor"===r?e.getCSSColor(a||o||"",{skipPrimaryStyle:!0}):e[r]("");return l&&(u=""),"secondary"===t&&d?d:c&&("primary"===t||"secondary"===t&&!e.hasSecondaryButtonStyle)?c:i||u||""},Yn=D({from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}),Un=j("svg")((()=>({animation:`${Yn} 1s infinite linear`}))),Zn=t=>{let{stopColor:n,size:r}=t;return(0,e.h)(Un,{width:r,height:r,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M31 16C31 7.71573 24.2843 1 16 1C7.71573 1 1 7.71573 1 16C1 24.2843 7.71573 31 16 31",stroke:n,"stroke-width":"2","stroke-linecap":"round"}))},Kn=()=>(0,e.h)("style",null,"/*!\n * @license\n * Font Awesome Free 5.15.4 by @fontawesome - https://fontawesome.com\n * License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)\n */\n \n @font-face {\n font-family: 'Font Awesome 5 Free';\n font-style: normal;\n font-weight: 900;\n font-display: block;\n src: url('https://downloads.atomic.io/web-sdk/release/24.2.1/assets/fonts/font-awesome-5-15-4/fa-solid-900.woff');\n }\n "),Gn={"500px":"","accessible-icon":"",accusoft:"","acquisitions-incorporated":"",ad:"","address-book":"","address-card":"",adjust:"",adn:"",adversal:"",affiliatetheme:"","air-freshener":"",airbnb:"",algolia:"","align-center":"","align-justify":"","align-left":"","align-right":"",alipay:"",allergies:"",amazon:"","amazon-pay":"",ambulance:"","american-sign-language-interpreting":"",amilia:"",anchor:"",android:"",angellist:"","angle-double-down":"","angle-double-left":"","angle-double-right":"","angle-double-up":"","angle-down":"","angle-left":"","angle-right":"","angle-up":"",angry:"",angrycreative:"",angular:"",ankh:"","app-store":"","app-store-ios":"",apper:"",apple:"","apple-alt":"","apple-pay":"",archive:"",archway:"","arrow-alt-circle-down":"","arrow-alt-circle-left":"","arrow-alt-circle-right":"","arrow-alt-circle-up":"","arrow-circle-down":"","arrow-circle-left":"","arrow-circle-right":"","arrow-circle-up":"","arrow-down":"","arrow-left":"","arrow-right":"","arrow-up":"","arrows-alt":"","arrows-alt-h":"","arrows-alt-v":"",artstation:"","assistive-listening-systems":"",asterisk:"",asymmetrik:"",at:"",atlas:"",atlassian:"",atom:"",audible:"","audio-description":"",autoprefixer:"",avianex:"",aviato:"",award:"",aws:"",baby:"","baby-carriage":"",backspace:"",backward:"",bacon:"",bacteria:"",bacterium:"",bahai:"","balance-scale":"","balance-scale-left":"","balance-scale-right":"",ban:"","band-aid":"",bandcamp:"",barcode:"",bars:"","baseball-ball":"","basketball-ball":"",bath:"","battery-empty":"","battery-full":"","battery-half":"","battery-quarter":"","battery-three-quarters":"","battle-net":"",bed:"",beer:"",behance:"","behance-square":"",bell:"","bell-slash":"","bezier-curve":"",bible:"",bicycle:"",biking:"",bimobject:"",binoculars:"",biohazard:"","birthday-cake":"",bitbucket:"",bitcoin:"",bity:"","black-tie":"",blackberry:"",blender:"","blender-phone":"",blind:"",blog:"",blogger:"","blogger-b":"",bluetooth:"","bluetooth-b":"",bold:"",bolt:"",bomb:"",bone:"",bong:"",book:"","book-dead":"","book-medical":"","book-open":"","book-reader":"",bookmark:"",bootstrap:"","border-all":"","border-none":"","border-style":"","bowling-ball":"",box:"","box-open":"","box-tissue":"",boxes:"",braille:"",brain:"","bread-slice":"",briefcase:"","briefcase-medical":"","broadcast-tower":"",broom:"",brush:"",btc:"",buffer:"",bug:"",building:"",bullhorn:"",bullseye:"",burn:"",buromobelexperte:"",bus:"","bus-alt":"","business-time":"","buy-n-large":"",buysellads:"",calculator:"",calendar:"","calendar-alt":"","calendar-check":"","calendar-day":"","calendar-minus":"","calendar-plus":"","calendar-times":"","calendar-week":"",camera:"","camera-retro":"",campground:"","canadian-maple-leaf":"","candy-cane":"",cannabis:"",capsules:"",car:"","car-alt":"","car-battery":"","car-crash":"","car-side":"",caravan:"","caret-down":"","caret-left":"","caret-right":"","caret-square-down":"","caret-square-left":"","caret-square-right":"","caret-square-up":"","caret-up":"",carrot:"","cart-arrow-down":"","cart-plus":"","cash-register":"",cat:"","cc-amazon-pay":"","cc-amex":"","cc-apple-pay":"","cc-diners-club":"","cc-discover":"","cc-jcb":"","cc-mastercard":"","cc-paypal":"","cc-stripe":"","cc-visa":"",centercode:"",centos:"",certificate:"",chair:"",chalkboard:"","chalkboard-teacher":"","charging-station":"","chart-area":"","chart-bar":"","chart-line":"","chart-pie":"",check:"","check-circle":"","check-double":"","check-square":"",cheese:"",chess:"","chess-bishop":"","chess-board":"","chess-king":"","chess-knight":"","chess-pawn":"","chess-queen":"","chess-rook":"","chevron-circle-down":"","chevron-circle-left":"","chevron-circle-right":"","chevron-circle-up":"","chevron-down":"","chevron-left":"","chevron-right":"","chevron-up":"",child:"",chrome:"",chromecast:"",church:"",circle:"","circle-notch":"",city:"","clinic-medical":"",clipboard:"","clipboard-check":"","clipboard-list":"",clock:"",clone:"","closed-captioning":"",cloud:"","cloud-download-alt":"","cloud-meatball":"","cloud-moon":"","cloud-moon-rain":"","cloud-rain":"","cloud-showers-heavy":"","cloud-sun":"","cloud-sun-rain":"","cloud-upload-alt":"",cloudflare:"",cloudscale:"",cloudsmith:"",cloudversify:"",cocktail:"",code:"","code-branch":"",codepen:"",codiepie:"",coffee:"",cog:"",cogs:"",coins:"",columns:"",comment:"","comment-alt":"","comment-dollar":"","comment-dots":"","comment-medical":"","comment-slash":"",comments:"","comments-dollar":"","compact-disc":"",compass:"",compress:"","compress-alt":"","compress-arrows-alt":"","concierge-bell":"",confluence:"",connectdevelop:"",contao:"",cookie:"","cookie-bite":"",copy:"",copyright:"","cotton-bureau":"",couch:"",cpanel:"","creative-commons":"","creative-commons-by":"","creative-commons-nc":"","creative-commons-nc-eu":"","creative-commons-nc-jp":"","creative-commons-nd":"","creative-commons-pd":"","creative-commons-pd-alt":"","creative-commons-remix":"","creative-commons-sa":"","creative-commons-sampling":"","creative-commons-sampling-plus":"","creative-commons-share":"","creative-commons-zero":"","credit-card":"","critical-role":"",crop:"","crop-alt":"",cross:"",crosshairs:"",crow:"",crown:"",crutch:"",css3:"","css3-alt":"",cube:"",cubes:"",cut:"",cuttlefish:"","d-and-d":"","d-and-d-beyond":"",dailymotion:"",dashcube:"",database:"",deaf:"",deezer:"",delicious:"",democrat:"",deploydog:"",deskpro:"",desktop:"",dev:"",deviantart:"",dharmachakra:"",dhl:"",diagnoses:"",diaspora:"",dice:"","dice-d20":"","dice-d6":"","dice-five":"","dice-four":"","dice-one":"","dice-six":"","dice-three":"","dice-two":"",digg:"","digital-ocean":"","digital-tachograph":"",directions:"",discord:"",discourse:"",disease:"",divide:"",dizzy:"",dna:"",dochub:"",docker:"",dog:"","dollar-sign":"",dolly:"","dolly-flatbed":"",donate:"","door-closed":"","door-open":"","dot-circle":"",dove:"",download:"",draft2digital:"","drafting-compass":"",dragon:"","draw-polygon":"",dribbble:"","dribbble-square":"",dropbox:"",drum:"","drum-steelpan":"","drumstick-bite":"",drupal:"",dumbbell:"",dumpster:"","dumpster-fire":"",dungeon:"",dyalog:"",earlybirds:"",ebay:"",edge:"","edge-legacy":"",edit:"",egg:"",eject:"",elementor:"","ellipsis-h":"","ellipsis-v":"",ello:"",ember:"",empire:"",envelope:"","envelope-open":"","envelope-open-text":"","envelope-square":"",envira:"",equals:"",eraser:"",erlang:"",ethereum:"",ethernet:"",etsy:"","euro-sign":"",evernote:"","exchange-alt":"",exclamation:"","exclamation-circle":"","exclamation-triangle":"",expand:"","expand-alt":"","expand-arrows-alt":"",expeditedssl:"","external-link-alt":"","external-link-square-alt":"",eye:"","eye-dropper":"","eye-slash":"",facebook:"","facebook-f":"","facebook-messenger":"","facebook-square":"",fan:"","fantasy-flight-games":"","fast-backward":"","fast-forward":"",faucet:"",fax:"",feather:"","feather-alt":"",fedex:"",fedora:"",female:"","fighter-jet":"",figma:"",file:"","file-alt":"","file-archive":"","file-audio":"","file-code":"","file-contract":"","file-csv":"","file-download":"","file-excel":"","file-export":"","file-image":"","file-import":"","file-invoice":"","file-invoice-dollar":"","file-medical":"","file-medical-alt":"","file-pdf":"","file-powerpoint":"","file-prescription":"","file-signature":"","file-upload":"","file-video":"","file-word":"",fill:"","fill-drip":"",film:"",filter:"",fingerprint:"",fire:"","fire-alt":"","fire-extinguisher":"",firefox:"","firefox-browser":"","first-aid":"","first-order":"","first-order-alt":"",firstdraft:"",fish:"","fist-raised":"",flag:"","flag-checkered":"","flag-usa":"",flask:"",flickr:"",flipboard:"",flushed:"",fly:"",folder:"","folder-minus":"","folder-open":"","folder-plus":"",font:"","font-awesome":"","font-awesome-alt":"","font-awesome-flag":"","font-awesome-logo-full":"",fonticons:"","fonticons-fi":"","football-ball":"","fort-awesome":"","fort-awesome-alt":"",forumbee:"",forward:"",foursquare:"","free-code-camp":"",freebsd:"",frog:"",frown:"","frown-open":"",fulcrum:"","funnel-dollar":"",futbol:"","galactic-republic":"","galactic-senate":"",gamepad:"","gas-pump":"",gavel:"",gem:"",genderless:"","get-pocket":"",gg:"","gg-circle":"",ghost:"",gift:"",gifts:"",git:"","git-alt":"","git-square":"",github:"","github-alt":"","github-square":"",gitkraken:"",gitlab:"",gitter:"","glass-cheers":"","glass-martini":"","glass-martini-alt":"","glass-whiskey":"",glasses:"",glide:"","glide-g":"",globe:"","globe-africa":"","globe-americas":"","globe-asia":"","globe-europe":"",gofore:"","golf-ball":"",goodreads:"","goodreads-g":"",google:"","google-drive":"","google-pay":"","google-play":"","google-plus":"","google-plus-g":"","google-plus-square":"","google-wallet":"",gopuram:"","graduation-cap":"",gratipay:"",grav:"","greater-than":"","greater-than-equal":"",grimace:"",grin:"","grin-alt":"","grin-beam":"","grin-beam-sweat":"","grin-hearts":"","grin-squint":"","grin-squint-tears":"","grin-stars":"","grin-tears":"","grin-tongue":"","grin-tongue-squint":"","grin-tongue-wink":"","grin-wink":"","grip-horizontal":"","grip-lines":"","grip-lines-vertical":"","grip-vertical":"",gripfire:"",grunt:"",guilded:"",guitar:"",gulp:"","h-square":"","hacker-news":"","hacker-news-square":"",hackerrank:"",hamburger:"",hammer:"",hamsa:"","hand-holding":"","hand-holding-heart":"","hand-holding-medical":"","hand-holding-usd":"","hand-holding-water":"","hand-lizard":"","hand-middle-finger":"","hand-paper":"","hand-peace":"","hand-point-down":"","hand-point-left":"","hand-point-right":"","hand-point-up":"","hand-pointer":"","hand-rock":"","hand-scissors":"","hand-sparkles":"","hand-spock":"",hands:"","hands-helping":"","hands-wash":"",handshake:"","handshake-alt-slash":"","handshake-slash":"",hanukiah:"","hard-hat":"",hashtag:"","hat-cowboy":"","hat-cowboy-side":"","hat-wizard":"",hdd:"","head-side-cough":"","head-side-cough-slash":"","head-side-mask":"","head-side-virus":"",heading:"",headphones:"","headphones-alt":"",headset:"",heart:"","heart-broken":"",heartbeat:"",helicopter:"",highlighter:"",hiking:"",hippo:"",hips:"","hire-a-helper":"",history:"",hive:"","hockey-puck":"","holly-berry":"",home:"",hooli:"",hornbill:"",horse:"","horse-head":"",hospital:"","hospital-alt":"","hospital-symbol":"","hospital-user":"","hot-tub":"",hotdog:"",hotel:"",hotjar:"",hourglass:"","hourglass-end":"","hourglass-half":"","hourglass-start":"","house-damage":"","house-user":"",houzz:"",hryvnia:"",html5:"",hubspot:"","i-cursor":"","ice-cream":"",icicles:"",icons:"","id-badge":"","id-card":"","id-card-alt":"",ideal:"",igloo:"",image:"",images:"",imdb:"",inbox:"",indent:"",industry:"",infinity:"",info:"","info-circle":"",innosoft:"",instagram:"","instagram-square":"",instalod:"",intercom:"","internet-explorer":"",invision:"",ioxhost:"",italic:"","itch-io":"",itunes:"","itunes-note":"",java:"",jedi:"","jedi-order":"",jenkins:"",jira:"",joget:"",joint:"",joomla:"","journal-whills":"",js:"","js-square":"",jsfiddle:"",kaaba:"",kaggle:"",key:"",keybase:"",keyboard:"",keycdn:"",khanda:"",kickstarter:"","kickstarter-k":"",kiss:"","kiss-beam":"","kiss-wink-heart":"","kiwi-bird":"",korvue:"",landmark:"",language:"",laptop:"","laptop-code":"","laptop-house":"","laptop-medical":"",laravel:"",lastfm:"","lastfm-square":"",laugh:"","laugh-beam":"","laugh-squint":"","laugh-wink":"","layer-group":"",leaf:"",leanpub:"",lemon:"",less:"","less-than":"","less-than-equal":"","level-down-alt":"","level-up-alt":"","life-ring":"",lightbulb:"",line:"",link:"",linkedin:"","linkedin-in":"",linode:"",linux:"","lira-sign":"",list:"","list-alt":"","list-ol":"","list-ul":"","location-arrow":"",lock:"","lock-open":"","long-arrow-alt-down":"","long-arrow-alt-left":"","long-arrow-alt-right":"","long-arrow-alt-up":"","low-vision":"","luggage-cart":"",lungs:"","lungs-virus":"",lyft:"",magento:"",magic:"",magnet:"","mail-bulk":"",mailchimp:"",male:"",mandalorian:"",map:"","map-marked":"","map-marked-alt":"","map-marker":"","map-marker-alt":"","map-pin":"","map-signs":"",markdown:"",marker:"",mars:"","mars-double":"","mars-stroke":"","mars-stroke-h":"","mars-stroke-v":"",mask:"",mastodon:"",maxcdn:"",mdb:"",medal:"",medapps:"",medium:"","medium-m":"",medkit:"",medrt:"",meetup:"",megaport:"",meh:"","meh-blank":"","meh-rolling-eyes":"",memory:"",mendeley:"",menorah:"",mercury:"",meteor:"",microblog:"",microchip:"",microphone:"","microphone-alt":"","microphone-alt-slash":"","microphone-slash":"",microscope:"",microsoft:"",minus:"","minus-circle":"","minus-square":"",mitten:"",mix:"",mixcloud:"",mixer:"",mizuni:"",mobile:"","mobile-alt":"",modx:"",monero:"","money-bill":"","money-bill-alt":"","money-bill-wave":"","money-bill-wave-alt":"","money-check":"","money-check-alt":"",monument:"",moon:"","mortar-pestle":"",mosque:"",motorcycle:"",mountain:"",mouse:"","mouse-pointer":"","mug-hot":"",music:"",napster:"",neos:"","network-wired":"",neuter:"",newspaper:"",nimblr:"",node:"","node-js":"","not-equal":"","notes-medical":"",npm:"",ns8:"",nutritionix:"","object-group":"","object-ungroup":"","octopus-deploy":"",odnoklassniki:"","odnoklassniki-square":"","oil-can":"","old-republic":"",om:"",opencart:"",openid:"",opera:"","optin-monster":"",orcid:"",osi:"",otter:"",outdent:"",page4:"",pagelines:"",pager:"","paint-brush":"","paint-roller":"",palette:"",palfed:"",pallet:"","paper-plane":"",paperclip:"","parachute-box":"",paragraph:"",parking:"",passport:"",pastafarianism:"",paste:"",patreon:"",pause:"","pause-circle":"",paw:"",paypal:"",peace:"",pen:"","pen-alt":"","pen-fancy":"","pen-nib":"","pen-square":"","pencil-alt":"","pencil-ruler":"","penny-arcade":"","people-arrows":"","people-carry":"","pepper-hot":"",perbyte:"",percent:"",percentage:"",periscope:"","person-booth":"",phabricator:"","phoenix-framework":"","phoenix-squadron":"",phone:"","phone-alt":"","phone-slash":"","phone-square":"","phone-square-alt":"","phone-volume":"","photo-video":"",php:"","pied-piper":"","pied-piper-alt":"","pied-piper-hat":"","pied-piper-pp":"","pied-piper-square":"","piggy-bank":"",pills:"",pinterest:"","pinterest-p":"","pinterest-square":"","pizza-slice":"","place-of-worship":"",plane:"","plane-arrival":"","plane-departure":"","plane-slash":"",play:"","play-circle":"",playstation:"",plug:"",plus:"","plus-circle":"","plus-square":"",podcast:"",poll:"","poll-h":"",poo:"","poo-storm":"",poop:"",portrait:"","pound-sign":"","power-off":"",pray:"","praying-hands":"",prescription:"","prescription-bottle":"","prescription-bottle-alt":"",print:"",procedures:"","product-hunt":"","project-diagram":"","pump-medical":"","pump-soap":"",pushed:"","puzzle-piece":"",python:"",qq:"",qrcode:"",question:"","question-circle":"",quidditch:"",quinscape:"",quora:"","quote-left":"","quote-right":"",quran:"","r-project":"",radiation:"","radiation-alt":"",rainbow:"",random:"","raspberry-pi":"",ravelry:"",react:"",reacteurope:"",readme:"",rebel:"",receipt:"","record-vinyl":"",recycle:"","red-river":"",reddit:"","reddit-alien":"","reddit-square":"",redhat:"",redo:"","redo-alt":"",registered:"","remove-format":"",renren:"",reply:"","reply-all":"",replyd:"",republican:"",researchgate:"",resolving:"",restroom:"",retweet:"",rev:"",ribbon:"",ring:"",road:"",robot:"",rocket:"",rocketchat:"",rockrms:"",route:"",rss:"","rss-square":"","ruble-sign":"",ruler:"","ruler-combined":"","ruler-horizontal":"","ruler-vertical":"",running:"","rupee-sign":"",rust:"","sad-cry":"","sad-tear":"",safari:"",salesforce:"",sass:"",satellite:"","satellite-dish":"",save:"",schlix:"",school:"",screwdriver:"",scribd:"",scroll:"","sd-card":"",search:"","search-dollar":"","search-location":"","search-minus":"","search-plus":"",searchengin:"",seedling:"",sellcast:"",sellsy:"",server:"",servicestack:"",shapes:"",share:"","share-alt":"","share-alt-square":"","share-square":"","shekel-sign":"","shield-alt":"","shield-virus":"",ship:"","shipping-fast":"",shirtsinbulk:"","shoe-prints":"",shopify:"","shopping-bag":"","shopping-basket":"","shopping-cart":"",shopware:"",shower:"","shuttle-van":"",sign:"","sign-in-alt":"","sign-language":"","sign-out-alt":"",signal:"",signature:"","sim-card":"",simplybuilt:"",sink:"",sistrix:"",sitemap:"",sith:"",skating:"",sketch:"",skiing:"","skiing-nordic":"",skull:"","skull-crossbones":"",skyatlas:"",skype:"",slack:"","slack-hash":"",slash:"",sleigh:"","sliders-h":"",slideshare:"",smile:"","smile-beam":"","smile-wink":"",smog:"",smoking:"","smoking-ban":"",sms:"",snapchat:"","snapchat-ghost":"","snapchat-square":"",snowboarding:"",snowflake:"",snowman:"",snowplow:"",soap:"",socks:"","solar-panel":"",sort:"","sort-alpha-down":"","sort-alpha-down-alt":"","sort-alpha-up":"","sort-alpha-up-alt":"","sort-amount-down":"","sort-amount-down-alt":"","sort-amount-up":"","sort-amount-up-alt":"","sort-down":"","sort-numeric-down":"","sort-numeric-down-alt":"","sort-numeric-up":"","sort-numeric-up-alt":"","sort-up":"",soundcloud:"",sourcetree:"",spa:"","space-shuttle":"",speakap:"","speaker-deck":"","spell-check":"",spider:"",spinner:"",splotch:"",spotify:"","spray-can":"",square:"","square-full":"","square-root-alt":"",squarespace:"","stack-exchange":"","stack-overflow":"",stackpath:"",stamp:"",star:"","star-and-crescent":"","star-half":"","star-half-alt":"","star-of-david":"","star-of-life":"",staylinked:"",steam:"","steam-square":"","steam-symbol":"","step-backward":"","step-forward":"",stethoscope:"","sticker-mule":"","sticky-note":"",stop:"","stop-circle":"",stopwatch:"","stopwatch-20":"",store:"","store-alt":"","store-alt-slash":"","store-slash":"",strava:"",stream:"","street-view":"",strikethrough:"",stripe:"","stripe-s":"",stroopwafel:"",studiovinari:"",stumbleupon:"","stumbleupon-circle":"",subscript:"",subway:"",suitcase:"","suitcase-rolling":"",sun:"",superpowers:"",superscript:"",supple:"",surprise:"",suse:"",swatchbook:"",swift:"",swimmer:"","swimming-pool":"",symfony:"",synagogue:"",sync:"","sync-alt":"",syringe:"",table:"","table-tennis":"",tablet:"","tablet-alt":"",tablets:"","tachometer-alt":"",tag:"",tags:"",tape:"",tasks:"",taxi:"",teamspeak:"",teeth:"","teeth-open":"",telegram:"","telegram-plane":"","temperature-high":"","temperature-low":"","tencent-weibo":"",tenge:"",terminal:"","text-height":"","text-width":"",th:"","th-large":"","th-list":"","the-red-yeti":"","theater-masks":"",themeco:"",themeisle:"",thermometer:"","thermometer-empty":"","thermometer-full":"","thermometer-half":"","thermometer-quarter":"","thermometer-three-quarters":"","think-peaks":"","thumbs-down":"","thumbs-up":"",thumbtack:"","ticket-alt":"",tiktok:"",times:"","times-circle":"",tint:"","tint-slash":"",tired:"","toggle-off":"","toggle-on":"",toilet:"","toilet-paper":"","toilet-paper-slash":"",toolbox:"",tools:"",tooth:"",torah:"","torii-gate":"",tractor:"","trade-federation":"",trademark:"","traffic-light":"",trailer:"",train:"",tram:"",transgender:"","transgender-alt":"",trash:"","trash-alt":"","trash-restore":"","trash-restore-alt":"",tree:"",trello:"",trophy:"",truck:"","truck-loading":"","truck-monster":"","truck-moving":"","truck-pickup":"",tshirt:"",tty:"",tumblr:"","tumblr-square":"",tv:"",twitch:"",twitter:"","twitter-square":"",typo3:"",uber:"",ubuntu:"",uikit:"",umbraco:"",umbrella:"","umbrella-beach":"",uncharted:"",underline:"",undo:"","undo-alt":"",uniregistry:"",unity:"","universal-access":"",university:"",unlink:"",unlock:"","unlock-alt":"",unsplash:"",untappd:"",upload:"",ups:"",usb:"",user:"","user-alt":"","user-alt-slash":"","user-astronaut":"","user-check":"","user-circle":"","user-clock":"","user-cog":"","user-edit":"","user-friends":"","user-graduate":"","user-injured":"","user-lock":"","user-md":"","user-minus":"","user-ninja":"","user-nurse":"","user-plus":"","user-secret":"","user-shield":"","user-slash":"","user-tag":"","user-tie":"","user-times":"",users:"","users-cog":"","users-slash":"",usps:"",ussunnah:"","utensil-spoon":"",utensils:"",vaadin:"","vector-square":"",venus:"","venus-double":"","venus-mars":"",vest:"","vest-patches":"",viacoin:"",viadeo:"","viadeo-square":"",vial:"",vials:"",viber:"",video:"","video-slash":"",vihara:"",vimeo:"","vimeo-square":"","vimeo-v":"",vine:"",virus:"","virus-slash":"",viruses:"",vk:"",vnv:"",voicemail:"","volleyball-ball":"","volume-down":"","volume-mute":"","volume-off":"","volume-up":"","vote-yea":"","vr-cardboard":"",vuejs:"",walking:"",wallet:"",warehouse:"","watchman-monitoring":"",water:"","wave-square":"",waze:"",weebly:"",weibo:"",weight:"","weight-hanging":"",weixin:"",whatsapp:"","whatsapp-square":"",wheelchair:"",whmcs:"",wifi:"","wikipedia-w":"",wind:"","window-close":"","window-maximize":"","window-minimize":"","window-restore":"",windows:"","wine-bottle":"","wine-glass":"","wine-glass-alt":"",wix:"","wizards-of-the-coast":"",wodu:"","wolf-pack-battalion":"","won-sign":"",wordpress:"","wordpress-simple":"",wpbeginner:"",wpexplorer:"",wpforms:"",wpressr:"",wrench:"","x-ray":"",xbox:"",xing:"","xing-square":"","y-combinator":"",yahoo:"",yammer:"",yandex:"","yandex-international":"",yarn:"",yelp:"","yen-sign":"","yin-yang":"",yoast:"",youtube:"","youtube-square":"",zhihu:""},Xn=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("rect",{x:"11",y:"6",width:"3",height:"3",rx:"1.5",fill:n}),(0,e.h)("path",{d:"M3 16L7.58579 11.4142C8.36683 10.6332 9.63316 10.6332 10.4142 11.4142L16 17M3 16V4C3 3.44772 3.44772 3 4 3H16C16.5523 3 17 3.44772 17 4V16C17 16.5523 16.5523 17 16 17M3 16C3 16.5523 3.44772 17 4 17H16",stroke:n,"stroke-width":"2"}))},Jn=j("i")((e=>{let{size:t,styles:n}=e;return Object.assign({fontFamily:"'Font Awesome 5 Free'",fontWeight:"900",fontSize:`${t}px`,width:`${t}px`,textAlign:"center",fontStyle:"normal",fontVariant:"normal",textRendering:"auto","-moz-osx-font-smoothing":"grayscale","-webkit-font-smoothing":"antialiased"},n)})),Qn=j("div")((e=>{var t;let{color:n,size:r,styles:a}=e;return Object.assign(Object.assign(Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},n?{fill:n}:{}),a),{width:`${r}px`,height:null!==(t=a.lineHeight)&&void 0!==t?t:`${r}px`})})),er=t=>{let{iconName:n,iconUrl:r,size:a,color:o,fallbackColor:i,styles:s={}}=t;const[l,c]=N(!1),d=Y(r);return B((()=>{r&&r!==d.current&&l&&(d.current=r,c(!1))}),[r,l]),r&&!l?(0,e.h)(Qn,{size:a,styles:s},(0,e.h)("svg",{"aria-hidden":"true","data-src":r,"data-replacement-color":o,"data-container-size":a,oniconloaderror:()=>{tn.error({level1:[`Error loading custom icon: ${r}`]}),c(!0)},style:Object.assign({maxWidth:`${a}px`,maxHeight:`${a}px`},o?{color:o}:{})})):n?(o&&(s.color=o),(0,e.h)(Jn,{styles:s,size:a,"aria-hidden":"true"},Gn[n]||"")):(0,e.h)(Qn,{size:a,styles:s},(0,e.h)(Xn,{"aria-hidden":"true",fillColor:null!=o?o:i}))},tr=e=>{let{theme:t,appearance:n}=e;const r=qn(t,n),a=(e,t)=>t?{[e]:t}:{},o=t.getShape("buttonWidth.global"),i=r({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}});return Object.assign(Object.assign(Object.assign({cursor:"pointer",width:"hugsLabel"===o?"auto":"100%",padding:r({themeMethod:"getPadding",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:"10px 20px"}),backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.button",secondaryAccessor:"background.buttonSecondary"}),color:r({themeMethod:"getCSSColor",primaryAccessor:"text.button",secondaryAccessor:"text.buttonSecondary"}),textAlign:"center"},i),{borderStyle:"solid",borderColor:r({themeMethod:"getCSSColor",primaryAccessor:"border.button",secondaryAccessor:"border.buttonSecondary",fallbackStyle:"transparent",skipThemeHelperFallbacks:!0}),borderWidth:r({themeMethod:"getShape",primaryAccessor:"border.button",secondaryAccessor:"border.buttonSecondary",fallbackStyle:"0px"}),borderRadius:r({themeMethod:"getShape",primaryAccessor:"borderRadius.button",secondaryAccessor:"borderRadius.buttonSecondary",fallbackStyle:"0px"}),boxShadow:r({themeMethod:"getCSSShadowProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",skipThemeHelperFallbacks:!0,fallbackStyle:"none"}),display:"flex",alignItems:"center",whiteSpace:"pre-wrap",":hover":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonHover",secondaryAccessor:"text.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("backgroundColor",r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonHover",secondaryAccessor:"background.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonHover",secondaryAccessor:"borderRadius.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),":active":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonActive",secondaryAccessor:"text.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),{backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonActive",secondaryAccessor:"background.buttonActiveSecondary",fallbackStyle:"rgba(0,0,0,0.1)",skipThemeHelperFallbacks:!0})}),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonActive",secondaryAccessor:"borderRadius.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})))}),t.getElementFocusCSSProperties())},nr=j("button")((e=>Object.assign({},tr(e)))),rr=j("a")((e=>Object.assign(Object.assign({},tr(e)),{textDecoration:"none"}))),ar=j("div")((e=>{var t,n;let r,a,{labelAlignment:o,iconAlignment:i}=e;return"right"===i?(r="row-reverse",a=null!==(t=null==o?void 0:o.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"center"):(r="row",a=null!==(n=null==o?void 0:o.replace("left","flex-start").replace("right","flex-end"))&&void 0!==n?n:"center"),{width:"100%",display:"flex",justifyContent:a,alignItems:"center",flexDirection:r}})),or=j("span")((()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),ir=t=>{let{nodeKey:n,clickHandler:r,text:a,icon:o,iconUrl:i,theme:s,appearance:l,loading:c,type:d,urlLink:u}=t;const h=u?rr:nr,p=qn(s,l),m=p({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}}),g=p({themeMethod:"getShape",primaryAccessor:"align.buttonIcon",secondaryAccessor:"align.buttonIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),v=p({themeMethod:"getShape",primaryAccessor:"lineHeight.buttonIcon",secondaryAccessor:"lineHeight.buttonIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),f=p({themeMethod:"getNumericFontSize",primaryAccessor:"button",secondaryAccessor:"buttonSecondary"}),b=Object.assign(Object.assign({},"left"===g?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:f*v+"px",color:p({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),y=p({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary"});return(0,e.h)(h,{key:n,"data-element-key":n,class:"submit-button",onClick:r,theme:s,appearance:l,tabIndex:"0",type:d,href:null==u?void 0:u.url,target:null==u?void 0:u.target},c?(0,e.h)(Zn,{stopColor:s.getCSSColor("text.button"),size:22}):(0,e.h)(ar,{labelAlignment:null==m?void 0:m.textAlign,iconAlignment:g},(o||i)&&(0,e.h)(er,{iconName:o,iconUrl:i,size:f,color:b.color,fallbackColor:y,styles:Object.assign(Object.assign(Object.assign({},b),!a&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,e.h)(or,null,a)))},sr=e=>{let{theme:t,appearance:n}=e;const r=qn(t,n),a=(e,t)=>t?{[e]:t}:{},o=r({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}}),i=t.getShape("buttonWidth.global"),s=t.getShape("buttonLayout.global"),l=r({themeMethod:"getCSSColor",primaryAccessor:"background.action",secondaryAccessor:"background.actionSecondary"}),c="transparent"===l||l.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/);let d="100%";return c&&(d="calc(100% + 40px)"),Object.assign(Object.assign(Object.assign({cursor:"pointer",padding:r({themeMethod:"getPadding",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:"10px 20px"}),margin:c&&"horizontal"!==s?"0 -20px":"0px",color:r({themeMethod:"getCSSColor",primaryAccessor:"text.action",secondaryAccessor:"text.actionSecondary"}),display:"flex",alignItems:"center",textAlign:"left"},o),{maxWidth:d,width:"hugsLabel"===i?"auto":d,backgroundColor:l,borderStyle:"solid",borderColor:r({themeMethod:"getCSSColor",primaryAccessor:"border.action",secondaryAccessor:"border.actionSecondary",fallbackStyle:"transparent",skipThemeHelperFallbacks:!0}),borderWidth:r({themeMethod:"getShape",primaryAccessor:"border.action",secondaryAccessor:"border.actionSecondary",fallbackStyle:"0px"}),borderRadius:r({themeMethod:"getShape",primaryAccessor:"borderRadius.action",secondaryAccessor:"borderRadius.actionSecondary",fallbackStyle:"0px"}),boxShadow:r({themeMethod:"getCSSShadowProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",skipThemeHelperFallbacks:!0,fallbackStyle:"none"}),":hover":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonHover",secondaryAccessor:"text.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),{backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonHover",secondaryAccessor:"background.buttonHoverSecondary",fallbackStyle:"rgba(0,0,0,0.05)",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonHover",secondaryAccessor:"borderRadius.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),":active":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},a("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonActive",secondaryAccessor:"text.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),{backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonActive",secondaryAccessor:"background.buttonActiveSecondary",fallbackStyle:"rgba(0,0,0,0.1)",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),a("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonActive",secondaryAccessor:"borderRadius.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),a("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})))}),t.getElementFocusCSSProperties())},lr=j("button")((e=>Object.assign({},sr(e)))),cr=j("a")((e=>Object.assign(Object.assign({},sr(e)),{textDecoration:"none"}))),dr=j("div")((e=>{var t,n;let r,a,{labelAlignment:o,iconAlignment:i}=e;return"right"===i?(r="row-reverse",a=null!==(t=null==o?void 0:o.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"flex-start"):(r="row",a=null!==(n=null==o?void 0:o.replace("left","flex-start").replace("right","flex-end"))&&void 0!==n?n:"flex-start"),{width:"100%",display:"flex",justifyContent:a,alignItems:"center",flexDirection:r}})),ur=j("span")((()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),hr=t=>{let{nodeKey:n,clickHandler:r,text:a,icon:o,iconUrl:i,theme:s,appearance:l,type:c,urlLink:d}=t;const u=d?cr:lr,h=qn(s,l),p=h({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}}),m=h({themeMethod:"getShape",primaryAccessor:"align.actionIcon",secondaryAccessor:"align.actionIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),g=h({themeMethod:"getShape",primaryAccessor:"lineHeight.actionIcon",secondaryAccessor:"lineHeight.actionIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),v=h({themeMethod:"getNumericFontSize",primaryAccessor:"action",secondaryAccessor:"actionSecondary"}),f=Object.assign(Object.assign({},"left"===m?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:v*g+"px",color:h({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),b=h({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary"});return(0,e.h)(u,{key:n,"data-element-key":n,class:"action-button",onClick:r,theme:s,appearance:l,tabIndex:"0",type:c,href:null==d?void 0:d.url,target:null==d?void 0:d.target},(0,e.h)(dr,{labelAlignment:null==p?void 0:p.textAlign,iconAlignment:m},(o||i)&&(0,e.h)(er,{iconName:o,iconUrl:i,size:v,color:f.color,fallbackColor:b,styles:Object.assign(Object.assign(Object.assign({},f),!a&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,e.h)(ur,null,a)))},pr=t=>t.isWorkflow?(0,e.h)(ir,t):(0,e.h)(hr,t);var mr=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const gr=e=>{switch(e.type){case"string":return e.defaultValue;case"number":return e.defaultValue.toString();case"boolean":return e.defaultValue?"true":"false";case"list":return e.defaultValue.join(", ");case"date":const t=new Date(e.defaultValue);return isNaN(t.getTime())?e.defaultValue:(0,wt.format)(t,e.defaultFormatterOption||"");default:return String(e.defaultValue)}},vr=(e,t,n)=>mr(void 0,void 0,void 0,(function*(){let r=e.filter((e=>e.runtimeVariables&&e.runtimeVariables.length)).map((e=>{const t=e.runtimeVariables||[];return{eventName:e.instance.eventName,lifecycleId:e.instance.lifecycleId,id:e.instance.id,runtimeVariables:new Map(t.map((e=>[e.name,gr(e)])))}}));if(r.length){let e=r;if(n){let a=!1;const o=new Promise((e=>{setTimeout((()=>{a||(console.error(`Resolution of runtime variables exceeded the timeout (${t}ms). Falling back to default values.`),e(r))}),t)})),i=r.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:new Map(e.runtimeVariables)})));e=yield Promise.race([o,n(i).then((e=>(a=!0,e)))])}const a=e.reduce(((e,t)=>(r.filter((e=>e.id===t.id)).length>0&&e.set(t.id,t.runtimeVariables),e)),new Map);return{values:a}}return{}}));let fr;!function(e){e.DISMISSED="dismissed",e.DISMISS_FAILED="dismiss-failed",e.SUBMITTED="submitted",e.SUBMIT_FAILED="submit-failed",e.SNOOZED="snoozed",e.SNOOZE_FAILED="snooze-failed",e.VOTED_USEFUL="voted-useful",e.VOTED_NOT_USEFUL="voted-not-useful"}(fr||(fr={}));const br=(0,e.createContext)({cardEventDispatcher:{dispatchCardEvent:e=>{}},analyticsDispatcher:{sendEvent:e=>{}},authTokenProvider:{requestToken:()=>Promise.resolve(void 0)},runtimeVariableResolver:void 0}),yr="card-displayed",wr="user-redirected",Sr="card-voted-up",kr="card-voted-down",Cr="runtime-vars-updated",xr="stream-displayed",Ir="snooze-options-displayed",Or="snooze-options-canceled",Tr="card-subview-displayed",Mr="card-subview-exited",_r="video-played",jr="video-completed";var Dr=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Lr=(e,t,n,r,a,o)=>Dr(void 0,void 0,void 0,(function*(){const{dismissingCard:i,dismissedCard:s,failedToDismissCard:l}=t;if(e.application.isPreview)return;i(n);const c=new Promise((e=>setTimeout(e,ot)));tn.debug({level1:["Dismiss card sent by HTTP"]});const d=yield((e,t,n)=>mr(void 0,void 0,void 0,(function*(){const r=yield wn.post("dismiss",{streamContainerId:e,cardInstanceId:t},n,{streamContainerId:e,cardInstanceId:t});return{ok:r.data&&1==r.data.ok,event:r.data&&r.data.event,error:r.response.error}})))(e.application.streamContainerId,n,a);yield Promise.allSettled([c,d]),d.ok?(tn.debug({level1:["Dismiss card sent by HTTP: success"]}),s(n),It().clearSubviewsForCardInstance(n),r.dispatchCardEvent({type:fr.DISMISSED,eventPayload:d.event})):(tn.debug({level1:["Dismiss card sent by HTTP: failed"]}),l(n,o,d.error),r.dispatchCardEvent({type:fr.DISMISS_FAILED}))})),Fr=function(e,t,n){return Dr(this,arguments,void 0,(function*(){var r,a,o;let i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4?arguments[4]:void 0,l=arguments.length>5?arguments[5]:void 0,c=arguments.length>6?arguments[6]:void 0,d=arguments.length>7?arguments[7]:void 0;const{submittingCard:u,submittedCard:h,failedToSubmitCard:p,finishSubview:m,openExternalUrl:g,handleSubmitButtonPayload:v}=t,{postSubmissionUrl:f,payload:b,subviewData:y,submitButtonName:w}=d||{};if(e.application.isPreview)return;u(n);const S=new Promise((e=>setTimeout(e,at)));tn.debug({level1:["Submit card sent by HTTP"]});const k=(null==y?void 0:y.subviewId)?null===(r=e.cardResponses[n])||void 0===r||null===(a=r.subviews)||void 0===a?void 0:a[null==y?void 0:y.subviewId]:null===(o=e.cardResponses[n])||void 0===o?void 0:o.responses,C=yield((e,t,n,r)=>mr(void 0,void 0,void 0,(function*(){const a=yield wn.post("response",{streamContainerId:e,cardInstanceId:t,values:n},r,{streamContainerId:e,cardInstanceId:t});return{ok:a.data&&1==a.data.ok,event:a.data&&a.data.event,error:a.response&&a.response.error}})))(e.application.streamContainerId,n,Object.assign(Object.assign(Object.assign({},c),k||{}),w?{[w]:null}:{}),l);yield Promise.allSettled([S,C]),C.ok?(tn.debug({level1:["Submit card sent by HTTP: success"]}),m(),(null==f?void 0:f.url)&&g(n,i?"subview":"topview",y||{},"url","submitButton",f),b&&v(n,y||{},b),h(n,i),It().clearSubviewsForCardInstance(n),s.dispatchCardEvent({type:fr.SUBMITTED,eventPayload:C.event})):(tn.debug({level1:["Submit card sent by HTTP: failed"]}),p(n,i,c,C.error,{postSubmissionUrl:f,subviewData:y,payload:b,submitButtonName:w}),s.dispatchCardEvent({type:fr.SUBMIT_FAILED}))}))},Ar=(e,t,n,r,a,o,i)=>Dr(void 0,void 0,void 0,(function*(){const s=(0,wt.differenceInSeconds)(r,new Date),{snoozingCard:l,snoozedCard:c,failedToSnoozeCard:d}=t;if(e.application.isPreview)return;l(n);const u=new Promise((e=>setTimeout(e,it)));tn.debug({level1:["Snooze card sent by HTTP"]});const h=yield((e,t,n,r)=>mr(void 0,void 0,void 0,(function*(){const a=yield wn.post("snooze",{streamContainerId:e,cardInstanceId:t,interval:`PT${Math.max(0,n)}S`},r,{streamContainerId:e,cardInstanceId:t});return{ok:a.data&&!0===a.data.ok,event:a.data&&a.data.event,error:a.response.error}})))(e.application.streamContainerId,n,s,o);yield Promise.allSettled([u,h]),h.ok?(tn.debug({level1:["Snooze card sent by HTTP: success"]}),c(n,r),It().clearSubviewsForCardInstance(n),a.dispatchCardEvent({type:fr.SNOOZED,eventPayload:h.event})):(tn.debug({level1:["Snooze card sent by HTTP: failed"]}),d(n,r,i,h.error),a.dispatchCardEvent({type:fr.SNOOZE_FAILED}))})),Hr=(e,t,n,r,a)=>{n.sendEvent({cardInstanceId:e,cardViewState:"topview",eventName:Sr,properties:{source:a}}),t.feedbackReceived(e),r.dispatchCardEvent({type:fr.VOTED_USEFUL})};function Er(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let Pr;!function(e){e.STATE="state-update",e.ANALYTICS_EVENT="analytics-event-dispatched"}(Pr||(Pr={}));class Rr{constructor(){Er(this,"channel",void 0),Er(this,"isOpen",!1),Er(this,"eventListeners",new Map),this.channel=new BroadcastChannel("stream-container-broadcast-channel"),this.isOpen=!0,window.addEventListener("pagehide",(()=>{this.close()}))}addEventListener(e,t,n){if(!("BroadcastChannel"in window))return tn.error({level1:["BroadcastChannel API not supported in this browser"]});const r=n=>{n.type===e&&t(n)},a=n||`${e}-${Date.now().toString()}-${this.eventListeners.size}`;return this.channel.addEventListener(e,r),this.eventListeners.set(a,r),a}removeEventListener(e){if(!("BroadcastChannel"in window))return tn.error({level1:["BroadcastChannel API not supported in this browser"]});const t=this.eventListeners.get(e);return!!t&&(this.channel.removeEventListener("message",t),this.eventListeners.delete(e),!0)}postMessage(e){if(!("BroadcastChannel"in window))return tn.error({level1:["BroadcastChannel API not supported in this browser"]});this.channel.postMessage(e)}close(){this.channel.close(),this.isOpen=!1}}var Vr=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};function zr(){return zr=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},zr.apply(this,arguments)}const $r=(e,t,n,r)=>Vr(void 0,void 0,void 0,(function*(){var a;const o=null===(a=(yield vr([n],t,e)).values)||void 0===a?void 0:a.get(n.instance.id);o&&Object.entries(r).forEach((a=>{let[i,s]=a;"string"==typeof s?r[i]=ki(s,o):Mi(s)&&$r(e,t,n,s)}))})),Nr=t=>{let{nodeKey:n,isWorkflow:r,clickHandler:a,text:o,icon:i,iconUrl:s,theme:l,appearance:c,loading:h,type:p,urlLink:m}=t;return(0,e.h)(d.lj,{actions:(0,u.Y2)(qt,St,Fn),mapToProps:()=>{}},(t=>(0,e.h)(pr,zr({},n&&{nodeKey:n},{isWorkflow:r,clickHandler:a(t),text:o,icon:i,iconUrl:s,theme:l,appearance:c,loading:h,type:p,urlLink:m}))))},Wr=j("div")((e=>{let{isWorkflow:t,feedOrientation:n}=e;return Object.assign({},t||"horizontal"!==n?{}:{display:"flex",flexDirection:"column",flexGrow:"1",justifyContent:"flex-end"})})),Br=t=>{let{children:n,isWorkflow:r,feedOrientation:a,initializeFormStore:o}=t;return B((()=>{o()}),[]),(0,e.h)(Wr,{isWorkflow:r,feedOrientation:a},n)},qr=(e,t,n,r)=>()=>{e.createResponseWithDefaults(t,n,r)},Yr=j("div")((e=>{let{theme:t,headlineFontProperties:n}=e;return{color:t.getCSSColor("text.headline"),display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${n.lineHeight} 1fr`,padding:"10px 0"}})),Ur=j("h2")((e=>{let{theme:t}=e;return Object.assign(Object.assign({gridColumnStart:"2",gridRowStart:"span 2"},t.getCSSFontProperties("headline")),{margin:"0",whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"})})),Zr=j("div")((e=>{let{theme:t,mode:n,cursor:r,hPadding:a}=e;return Object.assign(Object.assign({minHeight:"stacked"===n?"70px":"50px",borderRadius:"4px",border:`1px solid ${t.getCSSColor("border.component")}`},t.getElementFocusCSSProperties()),{backgroundColor:t.getCSSColor("background.component"),display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"20px",padding:`10px ${void 0!==a?a:20}px`,flexGrow:"1",cursor:r||"pointer"})})),Kr=t=>{let{nodeKey:n,children:r,mode:a,cursor:o,ref:i,theme:s,onClick:l,tabFocusable:c,innerRef:d,hPadding:u}=t;const h=c?e=>{e.charCode===lt&&l&&(e.preventDefault(),l())}:void 0;return(0,e.h)("div",{ref:i},(0,e.h)(Zr,{key:n,"data-element-key":n,mode:a,theme:s,cursor:o,class:"component-field-wrapper",onClick:l,onKeyPress:h,tabIndex:c?0:void 0,ref:d,hPadding:u},r))},Gr=j("div")((e=>{let{thumbnailUrl:t,theme:n}=e;return{backgroundColor:n.getCSSColor("background.media"),borderRadius:n.getShape("borderRadius.media"),width:"30px",height:"30px",marginRight:"10px",backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",alignSelf:"start"}})),Xr=t=>{let{thumbnailUrl:n,theme:r}=t;return(0,e.h)(Gr,{thumbnailUrl:n,theme:r})},Jr=e=>Object.assign(Object.assign({backgroundColor:e.getCSSColor("background.component"),color:e.getCSSColor("text.primary")},e.getCSSFontProperties("primary")),{border:"none",boxSizing:"border-box",height:"100%",width:"100%",display:"flex",flexGrow:"1",overflow:"hidden",":focus":{outline:"none"},"::placeholder":{color:e.getCSSColor("text.hint")},whiteSpace:"pre-wrap"}),Qr=j("textarea")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},Jr(t)),{resize:"none",boxSizing:"content-box"})})),ea=j("input")((e=>{let t,{theme:n}=e,r=n.getNumericFontSize("primary"),a=n.getCSSFontProperties("primary");if(a&&a.lineHeight&&r){const e=Math.ceil(.05*r);t=Number(a.lineHeight.replace("px",""))+e}return Object.assign(Object.assign({},Jr(n)),t?{lineHeight:`${t}px`}:{})})),ta=(e,t)=>{let n=0;"getComputedStyle"in window&&document.defaultView&&(n=parseInt(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height"))),e.style.height="auto",e.style.height=1===t?"auto":t>0?t*n+"px":`${e.scrollHeight}px`},na=j("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.error")},t.getCSSFontProperties("error")),{margin:"-10px 0 30px 0"})})),ra=t=>{let{theme:n,cardInstanceId:r,subviewId:a,name:o}=t;return(0,e.h)(d.lj,{mapToProps:e=>{let{validationStates:t}=e;return{validationStates:t}}},(t=>{let{validationStates:i}=t;const s=i[r]||{};let l;var c,d,u;a?l=null===(c=s.subviews)||void 0===c||null===(d=c[a])||void 0===d?void 0:d[o]:l=null===(u=s.validations)||void 0===u?void 0:u[o];return l&&l.errorMessage?(0,e.h)(na,{theme:n,role:"alert","data-testid":"validation"},l.errorMessage):null}))};let aa=null;const oa=xe.forwardRef(((t,n)=>{let{nodeKey:r,cardInstanceId:a,subviewId:o,attributes:{defaultValue:i,numberOfLines:s,name:l,thumbnailSrc:c,placeholder:u,maxLength:h},validations:p,theme:m,variableResolver:g,onValueChanged:v}=t;const f=Y(null),b=Y(i),[y,w]=N(g(i)),S=1===s?ea:Qr;B((()=>{const{current:{base:e}}=f;ta(e,s)})),B((()=>{const e=Jt(a,l,o);e?(b.current=e,w(e)):Xt().handleFormChange(a,l,y,o)}),[]),B((()=>{if(i!==b.current){if(y===g(b.current)){const e=g(i);w(e),Xt().handleFormChange(a,l,e,o)}b.current=i}}),[i]);const k=g(u);return(0,e.h)(d.lj,{actions:qt,mapToProps:()=>{}},(t=>(U(n,(()=>({clearInput:()=>{w(""),f.current.base&&ta(f.current.base,s),t.handleFormChange(a,l,"",o)}}))),(0,e.h)(e.Fragment,null,(0,e.h)(Kr,{nodeKey:r,mode:"inline",theme:m},c&&(0,e.h)(Xr,{thumbnailUrl:g(c),theme:m}),(0,e.h)(S,{theme:m,ref:f,placeholder:k,value:y,maxlength:h,className:"input-text",onInput:e=>{const{current:{base:n}}=f,{value:r}=e.target;w(r),ta(n,s),((e,t)=>{null!==aa&&(clearTimeout(aa),aa=null),aa=setTimeout((()=>{t(a,l,null!=e?e:void 0,p,o)}),200)})(r,t.validateField),t.handleFormChange(a,l,r,o),v&&v(r)},rows:"1",title:k})),(0,e.h)(ra,{name:l,cardInstanceId:a,subviewId:o,theme:m})))))})),ia="22px",sa=e=>Object.assign(Object.assign({margin:"0",paddingLeft:"0",listStyleType:"none"},e.getCSSFontProperties("body")),{color:e.getCSSColor("text.body")}),la=e=>{let t;return _i(t)||(t=e.getCSSFontProperties("bullet")),{"> li":{display:"flex",margin:"0 0 5px"},"> li.without-icon:before":Object.assign({content:'"•"',textAlign:"center",flexBasis:ia,minWidth:ia,marginRight:"10px",color:e.getCSSColor("icon.bullet")},t?{fontSize:t.fontSize,lineHeight:t.lineHeight}:{}),"> li.with-icon i":{flexBasis:ia,minWidth:ia,textAlign:"center"},"> li:last-child":{marginBottom:"10px"}}},ca=j("ul")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},sa(t)),la(t))})),da=j("ol")((e=>{let{theme:t}=e;return Object.assign(Object.assign(Object.assign({},sa(t)),la(t)),{counterReset:"item","> li.without-icon:before":Object.assign(Object.assign(Object.assign({},sa(t)["> li.without-icon:before"]),la(t)["> li.without-icon:before"]),{content:'counter(item) "."',counterIncrement:"item"})})})),ua=j("ul")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},sa(t)),{margin:"5px 20px 5px 0"," li":{display:"inline"}," li:before":{content:'", "'}," li:first-child:before":{content:'""'}})})),ha=j("li")((e=>{let{theme:t}=e;return{color:t.getCSSColor("text.body"),whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"}})),pa=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"19",height:"12",viewBox:"0 0 19 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M12 1H2C1.44772 1 1 1.44772 1 2V10C1 10.5523 1.44772 11 2 11H12C12.5523 11 13 10.5523 13 10V2C13 1.44772 12.5523 1 12 1Z",stroke:n,strokeWidth:"2"}),(0,e.h)("path",{d:"M17.1464 1.85355L13.3536 5.64645C13.1583 5.84171 13.1583 6.15829 13.3536 6.35355L17.1464 10.1464C17.4614 10.4614 18 10.2383 18 9.79289V2.20711C18 1.76165 17.4614 1.53857 17.1464 1.85355Z",stroke:n,strokeWidth:"2"}))};class ma extends e.Component{constructor(e){super(e),this.state={imageLoaded:!1,imageLoadFailed:!1}}preloadsImage(){return!0}onImageLoad(e){this.setState((t=>Object.assign(Object.assign({},t),{loadedDimensions:{width:e.naturalWidth,height:e.naturalHeight}})))}preloadImage(){if(this.preloadsImage()){const e=new Image;e.src=this.props.src,e.onload=()=>{this.setState({imageLoaded:!0}),this.onImageLoad(e)},e.onerror=()=>{this.setState({imageLoadFailed:!0})}}}getPreviewIcon(e){switch(e){case"image":case"imageWithoutSrc":return Xn;case"video":case"videoWithoutSrc":return pa;default:return null}}getElementRole(e){switch(e){case"image":case"video":return"button";case"imageWithoutSrc":case"videoWithoutSrc":return"img"}}componentDidMount(){this.props.src&&this.preloadImage()}componentDidUpdate(e){this.props.src&&this.props.src!==e.src&&this.preloadImage()}handleKeyPress(e){e.charCode===lt&&this.props.onClickImage&&(this.props.onClickImage(),e.preventDefault())}}const ga=j("a")((e=>{let{isLinkEnabled:t,theme:n,url:r}=e;return{border:`1px solid ${n.getCSSColor("border.mediaThumb")}`,borderRadius:n.getShape("borderRadius.mediaThumb"),overflow:"hidden",display:"flex",margin:"10px 0",backgroundColor:n.getCSSColor("background.mediaThumbnail"),cursor:t||r?"pointer":"default"}})),va=j("div")((e=>{let{thumbnail:t,theme:n}=e;return{display:"flex",width:"100px",minWidth:"100px",height:"100px",backgroundColor:n.getCSSColor("background.media"),backgroundSize:"cover",backgroundPosition:"center",backgroundImage:`url('${t}')`,alignItems:"center",justifyContent:"center"}})),fa=j("div")((()=>({padding:"12px 15px 10px 15px",display:"flex",flexFlow:"row wrap",minWidth:"0px"}))),ba=j("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("mediaTitle")),{color:t.getCSSColor("text.mediaTitle"),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginBottom:"0px",width:"100%"})})),ya=j("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("mediaSubtitle")),{color:t.getCSSColor("text.mediaSubtitle"),whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",width:"100%"})})),wa=j("a")((e=>{let{isLinkEnabled:t,theme:n}=e;return Object.assign(Object.assign(Object.assign({border:"0px"},n.getElementFocusCSSProperties()),n.getCSSFontProperties("mediaAction")),{color:n.getCSSColor("text.mediaAction"),textDecoration:"none",display:"block",marginTop:"auto",width:"100%",cursor:t?"pointer":"default",visibility:t?"visible":"hidden"})}));class Sa extends ma{render(){const{nodeKey:t,children:n,mediaType:r,src:a,theme:o,label:i,description:s,onClickImage:l,url:c}=this.props,{imageLoaded:d,imageLoadFailed:u}=this.state,h=d?a:"",p=this.getPreviewIcon(r),m=r.includes("video")?"video":"image",g=r.includes("video")&&u;return(0,e.h)(ga,{key:t,"data-element-key":t,theme:o,onClick:l,isLinkEnabled:"image"===r||"video"===r,url:c},(0,e.h)(va,{thumbnail:h,theme:o,role:"img",ariaLabel:this.props.alt||m},!d&&!g&&p&&(0,e.h)(p,{fillColor:o.getCSSColor("icon.mediaBanner")}),(d||u)&&n),(0,e.h)(fa,null,(0,e.h)(ba,{theme:o,title:i,class:"thumbnail-header"},i),(0,e.h)(ya,{theme:o,title:s,class:"thumbnail-format"},s),(0,e.h)(wa,{theme:o,isLinkEnabled:"image"===r||"video"===r,tabIndex:"0",class:"thumbnail-link",onKeyPress:this.handleKeyPress.bind(this)},("image"===r||"imageWithoutSrc"===r)&&"View",("video"===r||"videoWithoutSrc"===r)&&"Watch")))}}const ka=j("div")((e=>{let{backgroundImage:t,theme:n,mediaType:r,dimensions:a,loadedDimensions:o,url:i}=e;const s=`calc(${n.getShape("borderRadius.card")} - ${n.getShape("border.card")})`;return Object.assign(Object.assign({width:"calc(100% + 40px)",border:"0px",borderRadius:`${s} ${s} 0 0`,backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:n.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",margin:"-10px -20px 10px -20px",overflow:"hidden",cursor:"image"===r||"video"===r||i?"pointer":"default"},_a({dimensions:a,naturalDimensions:o})),n.getElementFocusCSSProperties())}));class Ca extends ma{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:t,children:n,mediaType:r,src:a,theme:o,onClickImage:i,dimensions:s,url:l}=this.props,{imageLoaded:c,imageLoadFailed:d}=this.state,u=c?a:"",h=this.getPreviewIcon(r),p=this.getElementRole(r),m=r.includes("video")?"video":"image",g=r.includes("video")&&d;return(0,e.h)(ka,{key:t,"data-element-key":t,backgroundImage:u,theme:o,mediaType:r,url:l,dimensions:s,loadedDimensions:this.state.loadedDimensions,onClick:i,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-banner",role:p,ariaLabel:this.props.alt||m},!c&&!g&&h&&(0,e.h)(h,{fillColor:o.getCSSColor("icon.mediaBanner")}),(c||d)&&n)}}const xa=j("div")((e=>{let{backgroundImage:t,theme:n,mediaType:r,dimensions:a,loadedDimensions:o,url:i}=e;return Object.assign(Object.assign({border:`1px solid ${n.getCSSColor("border.media")}`,borderRadius:`${n.getShape("borderRadius.media")}`,backgroundImage:`url(${t})`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:n.getCSSColor("background.media"),margin:"10px 0",display:"flex",alignItems:"center",justifyContent:"center",cursor:"image"===r||"video"===r||i?"pointer":"default",overflow:"hidden"},_a({dimensions:a,naturalDimensions:o})),n.getElementFocusCSSProperties())}));class Ia extends ma{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:t,children:n,mediaType:r,src:a,dimensions:o,url:i,onClickImage:s,theme:l}=this.props,{imageLoaded:c,imageLoadFailed:d}=this.state,u=c?a:"",h=this.getPreviewIcon(r),p=this.getElementRole(r),m=r.includes("video")?"video":"image",g=r.includes("video")&&d;return(0,e.h)(xa,{key:t,"data-element-key":t,backgroundImage:u,dimensions:o,loadedDimensions:this.state.loadedDimensions,mediaType:r,url:i,onClick:s,onKeyPress:this.handleKeyPress.bind(this),theme:l,tabIndex:"0",className:"image-inline",role:p,ariaLabel:this.props.alt||m},!c&&!g&&h&&(0,e.h)(h,{fillColor:l.getCSSColor("icon.mediaBanner")}),(c||d)&&n)}}const Oa=j("p")({padding:"10px 0",margin:"0"}),Ta=j("a")((e=>{let{theme:t,mediaType:n,url:r}=e;return Object.assign(Object.assign(Object.assign(Object.assign({border:"0px"},t.getElementFocusCSSProperties()),{color:t.getCSSColor("text.link")}),t.getCSSFontProperties("body")),{textDecoration:"none",cursor:"image"===n||"video"===n||r?"pointer":"default","&:hover":{textDecoration:"underline"},whiteSpace:"pre-wrap"})}));class Ma extends ma{preloadsImage(){return!1}render(){const{nodeKey:t,theme:n,label:r,onClickImage:a,mediaType:o,url:i}=this.props;return(0,e.h)(Oa,{key:t,"data-element-key":t},(0,e.h)(Ta,{theme:n,onClick:a,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-text",mediaType:o,url:i},r))}}const _a=e=>{var t,n;let{dimensions:r,naturalDimensions:a}=e;if(null==r?void 0:r.height)switch(null==r?void 0:r.height){case"short":return{height:"50px"};case"medium":return{height:"120px"};case"tall":default:return{height:"200px"};case"original":const e=(null==r||null===(t=r.originalDimensions)||void 0===t?void 0:t.width)||(null==a?void 0:a.width),o=(null==r||null===(n=r.originalDimensions)||void 0===n?void 0:n.height)||(null==a?void 0:a.height);return e&&o?{aspectRatio:`${e} / ${o}`}:{height:"200px"}}return{height:"200px"}},ja=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M6 15.1958V3.80425C6 3.01881 6.86395 2.53997 7.53 2.95625L16.6432 8.652C17.2699 9.04367 17.2699 9.95633 16.6432 10.348L7.53 16.0438C6.86395 16.46 6 15.9812 6 15.1958Z",stroke:n,strokeWidth:"2"}))},Da=j("div")((e=>{let{theme:t}=e;return{borderRadius:"40px",width:"40px",height:"40px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",background:t.getCSSColor("background.mediaControl")}})),La=t=>{let{onClick:n,theme:r}=t;return(0,e.h)(Da,{onClick:n,theme:r},(0,e.h)(ja,{fillColor:r.getCSSColor("icon.mediaControl")}))},Fa={objectFit:"contain",width:"100%",height:"100%",background:"black"},Aa=j("video")(Object.assign({},Fa)),Ha=j("video")((()=>Object.assign({},Fa))),Ea=j("div")((e=>{let{maskRadius:t,dimensions:n,loadedDimensions:r,format:a}=e;return Object.assign({borderRadius:"banner"===a?`${t} ${t} 0 0`:t,overflow:"hidden",margin:"banner"===a?"-10px -20px 10px -20px":"10px 0"},n?_a({dimensions:n,naturalDimensions:r}):{height:"200px"})})),Pa=j("div")((e=>{let{theme:t}=e;return{background:t.getCSSColor("overlay.mediaBanner"),display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"}})),Ra=t=>{let n,{nodeKey:r,cardInstanceId:a,label:o,description:i,format:s,src:l,altText:c,theme:u,thumbnailSrc:h,dimensions:p,setPlaying:m,onLoad:g}=t,v=!1,f=!1;switch(s){case"banner":n=Ca,v=!0,f=!0;break;case"inline":n=Ia,v=!0,f=!0;break;case"thumbnail":n=Sa,v=!0;break;case"text":n=Ma}return(0,e.h)(d.lj,{actions:St},(t=>(0,e.h)(n,{nodeKey:r,theme:u,src:h,dimensions:p,onLoad:g,alt:null==c?void 0:c.thumbnailSrc,label:o,description:i,mediaType:null!==l&&l.length>0?"video":"videoWithoutSrc",onClickImage:()=>{f?m(!0):t.viewMedia(a,{type:"video",url:l,title:o,alt:null==c?void 0:c.src})}},v&&(0,e.h)(Pa,{theme:u},(0,e.h)(La,{onClick:()=>f&&m(!0),theme:u})))))},Va=t=>{var n,r;let{format:a,theme:o,src:i,altText:s,cardInstanceId:l,dimensions:c,loadedDimensions:u,isWorkflow:h}=t;const p=Y(null),m=K(br).analyticsDispatcher,g="string"==typeof i&&null!==(n=null===(r=i.match(/[^\/]*$/))||void 0===r?void 0:r[0])&&void 0!==n?n:"";switch(B((()=>{var e,t,n,r;const a=()=>{m.sendEvent({eventName:_r,cardInstanceId:l,cardViewState:h?"subview":"topview",properties:{media:g,mediaURL:i}})},o=()=>{m.sendEvent({eventName:jr,cardInstanceId:l,cardViewState:h?"subview":"topview",properties:{media:g,mediaURL:i}})};return null===(e=p.current)||void 0===e||null===(t=e.base)||void 0===t||t.addEventListener("play",a),null===(n=p.current)||void 0===n||null===(r=n.base)||void 0===r||r.addEventListener("ended",o),()=>{var e,t,n,r;null===(e=p.current)||void 0===e||null===(t=e.removeEventListener)||void 0===t||t.call(e,"play",a),null===(n=p.current)||void 0===n||null===(r=n.removeEventListener)||void 0===r||r.call(n,"ended",o)}}),[]),a){case"banner":return(0,e.h)(d.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(t=>{var n;let{applicationOpen:r}=t;return!r&&(null==p||null===(n=p.current)||void 0===n?void 0:n.base)&&p.current.base.pause(),(0,e.h)(Ea,{format:a,dimensions:c,loadedDimensions:u,maskRadius:o.getShape("borderRadius.card")},(0,e.h)(Aa,{ref:p,src:i,alt:null==s?void 0:s.src,playsInline:!0,autoplay:!0,controls:!0}))}));case"inline":return(0,e.h)(d.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(t=>{var n;let{applicationOpen:r}=t;return!r&&(null==p||null===(n=p.current)||void 0===n?void 0:n.base)&&p.current.base.pause(),(0,e.h)(Ea,{format:a,dimensions:c,loadedDimensions:u,maskRadius:o.getShape("borderRadius.media")},(0,e.h)(Ha,{ref:p,src:i,alt:null==s?void 0:s.src,playsInline:!0,autoplay:!0,controls:!0}))}));default:return null}};class za{constructor(){this.tagState=new Map,this.tagState.set("__",{open:!1}),this.tagState.set("**",{open:!1}),this.tagState.set("_",{open:!1}),this.tagState.set("*",{open:!1})}toggle(e){const t=this.tagState.get(e);t&&(t.open=!t.open,this.tagState.set(e,t))}}const $a={"":["<em>","</em>"],_:["<strong>","</strong>"],"\n":["</p><p>"]," ":["<br />"]};function Na(e){return(e+"").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")}function Wa(e){return("<p>"+Ba(e)+"</p>").replace(/<p><\/p>/g,"")}function Ba(e,t){const n=new za;let r,a,o,i,s,l=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t| {2,}).+)+\n*)|((?:(?:^|\n)([*+-]|\d+\.)\s+.*)+)|(?:\!\[([^\]]*?)\]\(([^\)]+?)\))|(\[)|(\](?:\(([^\)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(\-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|(__|\*\*|[_*])|( \n\n*|\n{2,})/gm,c=[],d="",u=t||{},h=0;function p(e){var t=$a[e.replace(/\*/g,"_")[1]||""],n=c[c.length-1]==e;return t?t[1]?(c[n?"pop":"push"](e),t[0|n]):t[0]:e}function m(){let e="";for(;c.length;)e+=p(c[c.length-1]);return e}function g(e){return e.replace(/&%[0-9]+%;/g,(e=>String.fromCharCode(+e.substring(2,e.length-2))))}for(e=e.replace(/\\([*_[\]{}`<>()#+\-!|.])/g,(e=>`&%${e.charCodeAt(1)}%;`)),e=e.replace(/^\[(.+?)\]:\s*(.+)$/gm,(function(e,t,n){return u[t.toLowerCase()]=n,""})).replace(/^\n+|\n+$/g,"");o=l.exec(e);){a=e.substring(h,o.index),h=l.lastIndex,r=o[0];let t=!1;if(a.match(/[^\\](\\\\)*\\$/));else if(o[6])s=o[6],s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),i=Ba((f=o[5].replace(/^\s*[>*+.-]/gm,"")).replace(RegExp("^"+(f.match(/^(\t| )+/)||"")[0],"gm"),"")),">"!==s&&(t=!0,s=s.match(/\./)?"ol":"ul",i=i.replace(/^(.*)(\n|$)/gm,"<li><span>$1</span></li>")),r="<"+s+">"+i+"</"+s+">";else if(o[10]){const e=(o[11]||"").match(/subview:(?<viewId>.*)/);if(e){const t=((e||{}).groups||{}).viewId?e.groups.viewId:"";d=d.replace("<a>",`<a tabindex="0" class="md-subview-link" data-subview-id="${t}">`)}else d=d.replace("<a>",'<a tabindex="0" target="_blank" class="md-web-link" href="'+Na(o[11]||u[a.toLowerCase()])+'">');r=m()+"</a>"}else if(o[9])r="<a>";else if(o[12])r="<p>"+o[12]+"\n"+o[13]+"</p>",t=!0;else if(o[14])r="<p>"+o[14]+" "+o[15]+"</p>",t=!0;else if(o[17]){const e=o[17];var v=$a[e.replace(/\*/g,"_")[1]||""];r=n.tagState.has(e)&&n.tagState.get(e).open?v[1]:v[0],n.toggle(e)}else if(o[18]){const e=o[18];r=e?p(e):r}else o[4]&&(r="<p>"+o[4]+"</p>",t=!0);d+=a,d+=t?"</p>"+r+"<p>":r}var f;return n.tagState.forEach(((e,t)=>{if(n.tagState.get(t).open){const e=$a[t.replace(/\*/g,"_")[1]||""][0],n=d.lastIndexOf(e);-1!==n&&(d=d.slice(0,n)+t+d.slice(n+e.length))}})),(g(d)+g(e.substring(h))+m()).trim()}const qa=(e,t)=>{let n;return _i(n)||(n=e.getCSSFontProperties("bullet")),{[`>${t} > li`]:Object.assign({display:"flex",margin:"0 0 5px"},"ol"===t?{counterIncrement:"count"}:{}),[`>${t} > li:before`]:Object.assign({content:"ol"===t?'counter(count)"."':'"•"',textAlign:"center",marginRight:"10px",flexBasis:"22px",minWidth:"22px",color:e.getCSSColor("icon.bullet")},n?{fontSize:n.fontSize,lineHeight:n.lineHeight}:{}),[`>${t} > li:last-child`]:{marginBottom:"10px"}}},Ya=j("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:t.getCSSColor("text.body"),gridColumnStart:"2",gridRowStart:"span 2"},t.getCSSFontProperties("body")),{marginRight:"10px"," em":{fontStyle:"italic"}," strong":{fontWeight:"bold"}," code":{borderRadius:"3px",padding:"5px",backgroundColor:"rgba(0,0,0,0.05)"},"> ul":Object.assign({},{paddingLeft:"0",margin:"0",whiteSpace:"pre-wrap",listStyleType:"none"})}),qa(t,"ul")),{"> ol":Object.assign(Object.assign({},{paddingLeft:"0",margin:"0",whiteSpace:"pre-wrap",listStyleType:"none"}),{counterReset:"count"})}),qa(t,"ol")),{" a":{color:t.getCSSColor("text.link")}," p":Object.assign({margin:"10px 0 0 0",whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"},t.getCSSFontProperties("body"))," p:first-child":{marginTop:"0"}," .md-subview-link":{textDecoration:"underline",cursor:"pointer"}})})),Ua=j("div")((e=>{let{theme:t,bodyFontProperties:n,isWorkflow:r}=e;return{display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${n.lineHeight} 1fr`,color:t.getCSSColor("text.body"),padding:r?"0 0 20px 0":"10px 0px"}})),Za=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M15 10V20M20 15H15H10",stroke:n,"stroke-width":"2","stroke-linecap":"round"}))},Ka=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M20 15H10",stroke:n,"stroke-width":"2","stroke-linecap":"round"}))},Ga=j("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.component"),color:t.getCSSColor("text.primary"),display:"flex",":focus":{outline:"none"},"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}})),Xa=j("button")((e=>{let{theme:t,disabled:n}=e;return Object.assign(Object.assign({backgroundColor:n?t.getCSSColor("background.stepperDisabled"):t.getCSSColor("background.stepper"),border:"0px",borderRadius:"99px",width:"24px",height:"24px",display:"flex",padding:"0",alignItems:"center",cursor:n?"initial":"pointer"},t.getElementFocusCSSProperties()),{" svg":{height:"100%"}})})),Ja=j("input")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.primary")},t.getCSSFontProperties("primary")),{backgroundColor:t.getCSSColor("background.component"),width:"40px",maxWidth:"40px",minWidth:"40px",paddingTop:"1px",textAlign:"center",border:"0","-moz-appearance":"textfield",":focus":{outline:"none"},"::-webkit-inner-spin-button, ::-webkit-outer-spin-button":{"-webkit-appearance":"none",margin:"0"}})})),Qa=j("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("primary")),{color:t.getCSSColor("text.primary"),flexGrow:"1",whiteSpace:"pre-wrap"})})),eo=(e,t,n)=>e-n>=t,to=(e,t,n)=>e+n<=t;let no=null;const ro=j("div")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===n?"pinned":"primary")),{flexGrow:"1",whiteSpace:"pre-wrap",color:"stacked"===n?t.getCSSColor("text.pinned"):t.getCSSColor("text.primary"),paddingBottom:"stacked"===n?"2px":"0px"})})),ao=t=>{let{theme:n,children:r,mode:a,name:o}=t;return(0,e.h)(ro,{theme:n,mode:a,id:o},r)},oo=j("button")((e=>{let{on:t,theme:n}=e;return Object.assign({backgroundColor:n.getCSSColor(t?"background.switchOn":"background.switchOff"),transition:"0.25s ease-in-out",position:"relative",border:"0px",borderRadius:"99px",width:"40px",height:"22px",cursor:"pointer",flexShrink:"0"},n.getElementFocusCSSProperties())})),io=j("div")((e=>{let{on:t,theme:n}=e;return{transition:"0.25s ease-in-out",position:"absolute",top:"2px",left:t?"50%":"2px",backgroundColor:n.getCSSColor(t?"icon.switchOn":"icon.switchOff"),width:"18px",height:"18px",borderRadius:"99px"}})),so=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M1 1L6 6L11 1",stroke:n,"stroke-opacity":"1","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},lo=j("div")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===n?"pinned":"primary")),{display:"stacked"===n?"block":"inherit",flexGrow:"1",cursor:"pointer"})})),co=j("div")((()=>({justifyContent:"space-between",alignItems:"center"}))),uo=j("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),ho=j("div")((e=>{let{open:t,openPosition:n,height:r,theme:a}=e;return Object.assign(Object.assign({position:"absolute",top:`${n}px`,left:t?"20px":"-999px",width:"calc(100% - 40px)",marginBottom:"20px",backgroundColor:"white",boxShadow:"0px 2px 10px 0px rgba(0, 0, 0, 0.2)",cursor:"pointer",height:`${r}px`,maxHeight:"335px",overflow:"auto",zIndex:"40",borderRadius:"5px",color:"black"},a.getCSSFontProperties("primary")),{visibility:t?"visible":"hidden"})})),po=j("div")((e=>{let{theme:t}=e;return Object.assign({padding:"20px",":hover":{backgroundColor:"rgba(0,0,0,0.05)"},":active":{backgroundColor:"rgba(0,0,0,0.1)"},border:"0px"},t.getElementFocusCSSProperties())})),mo=j("div")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===n?"primary":"secondary")),{marginRight:"10px",color:"stacked"===n?t.getCSSColor("text.primary"):t.getCSSColor("text.secondary"),paddingTop:"stacked"===n?"2px":"0px"})})),go=t=>{let{onClick:n,children:r,ref:a,theme:o}=t;return(0,e.h)(po,{onClick:n,ref:a,tabIndex:"-1",theme:o},r)},vo=t=>{let{children:n,mode:r,theme:a}=t;return(0,e.h)(mo,{theme:a,mode:r,class:"dropdown-selected-value"},n)},fo=(e,t,n,r)=>{var a,o,i,s,l,c;let d=0,u=0,h=0,p=0,m=null;const g=null===(s=window.frameElement)||void 0===s?void 0:s.parentElement,v=document.querySelector("#action-cards-sdk-card-container"),f=(null==g?void 0:g.scrollHeight)!==(null==g?void 0:g.clientHeight),b=(null==v?void 0:v.scrollHeight)!==(null==v?void 0:v.clientHeight);if("launcher"!==r&&g&&f&&!b)m=g;else if(n){m=document.querySelector("#action-cards-subview-container")}else null!==v&&(m=v);if(null!==window.frameElement){var y,w;const e=t.getBoundingClientRect(),n=null===(y=m)||void 0===y?void 0:y.getBoundingClientRect();d=e.top-(n?null==n?void 0:n.top:0),u=e.bottom-(n?null==n?void 0:n.top:0),h=null!==(a=null===(w=m)||void 0===w?void 0:w.scrollHeight)&&void 0!==a?a:window.innerHeight}else{const e=document.querySelector("#workbench-card-preview");if(e){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();p=e.scrollTop,d=r.top-n.top-p,u=d+t.offsetHeight,h=e.offsetHeight}}e.style.height="auto";const S=d-20+(m?m.scrollTop:0),k=h-u-20,C=S-(null!==(o=null===(l=m)||void 0===l?void 0:l.scrollTop)&&void 0!==o?o:0),x=(null!==(i=null===(c=m)||void 0===c?void 0:c.offsetHeight)&&void 0!==i?i:h)-C-20-t.offsetHeight,I=e.offsetHeight;e.style.height="";const O=t.offsetTop,T={openPosition:O+t.offsetHeight+10,height:I},M={openPosition:O-I-10,height:I};return I<=x?T:I<=C?M:I<=k?T:I<=S?M:{openPosition:O,height:Math.min(I,k+t.offsetHeight)}},bo=t=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,embedMode:o,attributes:{format:i,defaultValue:s,thumbnailSrc:l,label:c,name:u,values:h,placeholder:p},validations:m,theme:g,variableResolver:v,onValueChanged:f}=t;const[b,y]=N(!1),[w,S]=N(0),[k,C]=N(0),[x,I]=N(s?v(s.toString()):null),[O,T]=N(-1),M=Y(null),_=Y(null),j=Y(null),D=Y(null),L=Y(s?v(s.toString()):null),F=h.find((e=>{let{value:t}=e;return x===t}));return B((()=>{const e=e=>{M.current&&!M.current.base.contains(e.target)&&(b&&Xt().validateField(r,u,x,m),y(!1))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),B((()=>{if(f)f(x);else{const e=Jt(r,u,a);e?(L.current=e.toString(),I(e)):Xt().handleFormChange(r,u,x,a)}j.current&&D.current&&(j.current.base.scrollTop=D.current.base.offsetTop)}),[]),B((()=>{const e=s?v(s.toString()):null;e!==L.current&&(x===L.current&&(f?f(e):Xt().handleFormChange(r,u,e,a),I(e)),L.current=s?v(s.toString()):null)}),[s]),B((()=>{if(b){const e=h.findIndex((e=>x===e.value));T(Math.max(0,e))}else T(-1)}),[b]),(0,e.h)(d.lj,{actions:qt,mapToProps:()=>{}},(t=>(0,e.h)(uo,null,(0,e.h)(Kr,{nodeKey:n,ref:M,innerRef:_,mode:i,theme:g,tabFocusable:!0,onClick:()=>{if(M.current){const{openPosition:e,height:n}=fo(j.current.base,M.current.base,!!a,o);S(e),C(n),y((e=>(e&&t.validateField(r,u,x,m,a),!e)))}}},l&&(0,e.h)(co,null,(0,e.h)(Xr,{thumbnailUrl:v(l),theme:g})),(0,e.h)(lo,{mode:i,theme:g},(0,e.h)(ao,{theme:g,mode:i},v(c)),(0,e.h)(vo,{theme:g,mode:i},F?F.title:v(p))),(0,e.h)(so,{fillColor:g.getCSSColor("icon.dropdown")}),(0,e.h)(ho,{ref:j,open:b,openPosition:w,theme:g,height:k,className:"dropdown-body"},(0,e.h)(bt,{defaultIndex:O,theme:g},h.map(((n,o)=>(0,e.h)(go,{onClick:()=>{I(n.value),f?f(n.value):t.handleFormChange(r,u,n.value,a),t.validateField(r,u,n.value,m,a),_&&_.current&&_.current.base&&_.current.base.focus(),T(o)},ref:n.value===x?D:null,theme:g},n.title)))))),(0,e.h)(ra,{name:u,cardInstanceId:r,subviewId:a,theme:g}))))};var yo=n(6083),wo=n.n(yo),So=n(9331),ko=n.n(So),Co=n(5932),xo=n.n(Co),Io=n(4844),Oo=n.n(Io),To=n(4801),Mo=n.n(To),_o=n(7754),jo=n.n(_o),Do=n(6254),Lo=n.n(Do),Fo=n(5886),Ao=n.n(Fo);const Ho=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"31",height:"30",viewBox:"0 0 31 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M13.8376 10L18.8376 15L13.8376 20",stroke:n,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},Eo=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M6.16235 11L1.16235 6L6.16235 1",stroke:n,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},Po=j("div")({height:"100%",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",justifySelf:"center"}),Ro=j("div")((e=>{var t;let{theme:n}=e;return{"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none",display:"grid",gridTemplate:"auto / 42px 1fr 42px",alignItems:"center",margin:"0 auto",width:"100%",color:null!==(t=n.getCSSColor("text.datePickerCalendarMonthYear",{skipFallback:!0}))&&void 0!==t?t:"black","> h1":{textAlign:"center",textTransform:"none",lineHeight:"30px",margin:"0 0 10px",gridColumn:"2"},"> input":{display:"block",fontSize:"small",fontWeight:"bold",textAlign:"center",lineHeight:"15px",height:"18px",width:"60px",margin:"0 auto",backgroundColor:"transparent",fontFamily:"inherit",border:"1px solid lightgray",paddingLeft:"11px"},"> div:first-of-type":{gridColumn:"1"},"> div:last-of-type":{gridColumn:"3"}}})),Vo=j("span")({fontSize:"15px"}),zo=j("span")({fontSize:"15px",fontWeight:"normal"}),$o=t=>{var n,r;let{theme:a,month:o,year:i="",onBack:s,onForward:l,locale:c}=t;return(0,e.h)(Ro,{theme:a},(0,e.h)(Po,{onClick:s},(0,e.h)(Eo,{fillColor:null!==(n=a.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==n?n:"rgba(0,0,0,0.5)"})),(0,e.h)("h1",{className:"MonthDisplay","aria-live":"assertive"},(0,e.h)(Vo,null,function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return window.months=window.months||[...Array(12)].map(((t,n)=>new Date(2017,n,1).toLocaleDateString(e,{month:"long"}))),window.months}(c)[o-1]+" "),(0,e.h)(zo,null,i)),(0,e.h)(Po,{onClick:l},(0,e.h)(Ho,{fillColor:null!==(r=a.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==r?r:"rgba(0,0,0,0.5)"})))};var No=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};const Wo=j("button")((e=>{var t,n,r,a,o,i,s;let{isDisabled:l,isSelected:c,isToday:d,isFocused:u,theme:h}=e,p=null!==(t=h.getCSSColor("text.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==t?t:"rgba(0, 0, 0, 1)",m=h.getCSSColor("text.datePickerCalendarHoverDateItem",{skipFallback:!0}),g="transparent",v=null!==(n=h.getCSSColor("background.datePickerCalendarHoverDateItem",{skipFallback:!0}))&&void 0!==n?n:"rgba(0, 0, 0, 0.05)";const f="#1E6EFA";d&&!c?p=null!==(r=h.getCSSColor("text.datePickerCalendarCurrentDate",{skipFallback:!0}))&&void 0!==r?r:f:c?(p=null!==(a=h.getCSSColor("text.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==a?a:"white",g=null!==(o=h.getCSSColor("background.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==o?o:f,v=g):u?g="rgba(0, 0, 0, 0.05)":l&&(p="rgba(0, 0, 0, 0.2)",v="transparent");const b=null!==(i=h.getShape("borderRadius.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==i?i:"99px";return{userSelect:"none",display:"flex",justifySelf:"center",alignItems:"center",justifyContent:"center",fontFamily:"inherit",fontSize:"small",lineHeight:"15px",margin:"0",position:"relative",width:"string"==typeof b&&(null===(s=b.match(new RegExp(/([1-9])+/g)))||void 0===s?void 0:s.length)?"40px":"100%",height:"40px",outline:"none",border:"2px solid transparent",cursor:l?"initial":"pointer",backgroundColor:g,borderRadius:b,":hover":Object.assign(Object.assign({},m?{color:m}:{}),{backgroundColor:v}),color:p}})),Bo=t=>{let{theme:n,date:r,dateLabel:a,style:o,onSelect:i,onHover:s,onFocus:l}=t,c=No(t,["theme","date","dateLabel","style","onSelect","onHover","onFocus"]);const d=Y(null);return(0,e.h)(Wo,{ref:d,role:"gridcell",title:a,"aria-label":a,"aria-selected":c.isSelected?"true":"false",key:r,style:o,class:`CalendarDay ${Ht(c)}`,isToday:Ao()(r),isDisabled:c.isDisabled,isSelected:c.isSelected,isFocused:c.isFocused,theme:n,tabIndex:"-1",onMouseUp:e=>{e.stopPropagation(),c.isDisabled||(d.current&&document.activeElement!==d.current&&d.current.base.focus(),i(r))},onMouseEnter:()=>{c.isDisabled||s(r)},onMouseLeave:()=>{c.isDisabled||s(null)},onFocus:()=>{c.isDisabled||l(r)}},r.getDate())},qo=j("div")((e=>{var t;let{theme:n}=e;return{cursor:"default",borderWidth:"1px",backgroundColor:null!==(t=n.getCSSColor("background.datePickerCalendar",{skipFallback:!0}))&&void 0!==t?t:"white",width:"100%",margin:"0",padding:"10px",borderRadius:"5px",boxSizing:"border-box","> div:focus":{outline:"none"},"> .focus-visible":{outline:"none",boxShadow:`0 0 0 2px ${n.getCSSColor("border.focus")} inset`}}})),Yo=j("div")({padding:"5px"}),Uo=j("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)"}),Zo=j("div")((e=>{var t;let{theme:n}=e;return{userSelect:"none",textAlign:"center",textTransform:"none",color:null!==(t=n.getCSSColor("text.datePickerCalendarDaysSubHeading",{skipFallback:!0}))&&void 0!==t?t:"rgba(0,0,0,0.5)",fontSize:"13px"}})),Ko=j("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)","-ms-grid-rows":"auto","-ms-grid-columns":"(1fr)[7]",marginBottom:"5px"}),Go=t=>{const{month:n,year:r,isDateHovered:a,isDateFocused:o,isDateSelected:i,isDateInRange:s,isDateHighlighted:l,isDateEnabled:c,onDateFocused:d,onDateHovered:u,onDateSelected:h,onChangeMonth:p,onChangeYear:m,calendarRef:g,disabled:v,locale:f,theme:b}=t,y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return window.days=window.days||[...Array(7)].map(((t,n)=>({dayName:new Date(Date.UTC(2017,0,n+2)).toLocaleDateString(e,{weekday:"long"}),style:{msGridColumn:n+1,gridColumnStart:n+1}}))),window.days}(f),w=Et(n,r||0);return(0,e.h)(qo,{theme:b},(0,e.h)($o,{theme:b,month:n,year:r,onBack:p(-1),onForward:p(1),onChangeYear:m,locale:f,disabled:v}),(0,e.h)(Yo,{className:"Calendar",role:"grid",ref:g,tabIndex:0},(0,e.h)(Ko,{role:"row"},y.map((t=>{let{dayName:n,style:r}=t;return(0,e.h)(Zo,{key:n,theme:b,style:r,role:"columnheader","aria-label":n},(0,e.h)("abbr",null,n.slice(0,1)))}))),(0,e.h)(Uo,{role:"row"},w.map((t=>{let{date:n,style:r}=t;return(0,e.h)(Bo,{key:n,theme:b,date:n,dateLabel:Vt()(n,"dddd, MMMM D, YYYY"),style:r,isToday:Ao()(n),isHovered:a(n),isFocused:o(n),isSelected:i(n),isInRange:s(n),isHighlighted:l(n),isDisabled:v||!c(n),onSelect:h,onHover:u,onFocus:d})})))))};function Xo(){return Xo=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Xo.apply(this,arguments)}const Jo="DatePicker",Qo="DateRangePicker";class ei extends e.Component{constructor(t){var n,r,a;super(t),a=void 0,(r="calendar")in(n=this)?Object.defineProperty(n,r,{value:a,enumerable:!0,configurable:!0,writable:!0}):n[r]=a;const o=t.date||new Date,i=o.getMonth()+1,s=o.getFullYear();this.state={month:i,year:s,focused:o,hovered:new Date},this.calendar=(0,e.createRef)(),this.handleKeyPress=this.handleKeyPress.bind(this),this.onDateHovered=this.onDateHovered.bind(this),this.onDateSelected=this.onDateSelected.bind(this),this.onDateFocused=this.onDateFocused.bind(this),this.isDateHovered=this.isDateHovered.bind(this),this.isDateFocused=this.isDateFocused.bind(this),this.isDateSelected=this.isDateSelected.bind(this),this.isDateInRange=this.isDateInRange.bind(this),this.isDateEnabled=this.isDateEnabled.bind(this),this.isDateHighlighted=this.isDateHighlighted.bind(this),this.onChangeMonth=this.onChangeMonth.bind(this),this.onChangeYear=this.onChangeYear.bind(this)}componentDidMount(){window.addEventListener("keydown",this.handleKeyPress)}componentWillUnmount(){window.removeEventListener("keydown",this.handleKeyPress)}handleKeyPress(e){var t;if(!(null===(t=this.calendar)||void 0===t?void 0:t.current.base.contains(document.activeElement)))return;if(9===e.keyCode)return;e.preventDefault();const{shiftKey:n,keyCode:r}=e,a=13===r,o=33===r,i=34===r,s=37===r,l=38===r,c=39===r,d=40===r,u=r===lt,{isDateEnabled:h}=this.props;let{focused:p}=this.state;if(a)h(p)&&this.onDateSelected(p);else if(n&&o){const e=wo()(p,-1);h(e)&&this.onDateFocused(e)}else if(n&&i){const e=wo()(p,1);h(e)&&this.onDateFocused(e)}else if(o){const e=ko()(p,-1);h(e)&&this.onDateFocused(e)}else if(i){const e=ko()(p,1);h(e)&&this.onDateFocused(e)}else if(l){const e=xo()(p,-1);h(e)&&this.onDateFocused(e)}else if(d){const e=xo()(p,1);h(e)&&this.onDateFocused(e)}else if(s){const e=Oo()(p,-1);h(e)&&this.onDateFocused(e)}else if(c){const e=Oo()(p,1);h(e)&&this.onDateFocused(e)}else u&&this.onDateSelected(p)}onChangeYear(e){e.preventDefault(),this.setState({year:parseInt(e.target.value)||void 0})}onChangeMonth(e){let{month:t,year:n=0}=this.state,r=t+e,a=n;return r<1&&(r=12+r,a-=1),r>12&&(r-=12,a+=1),()=>{this.setState({month:r,year:a})}}onDateSelected(e){const{type:t,onDateSelected:n,onStartDateSelected:r,onEndDateSelected:a}=this.props;if(t===Jo)n&&n(e);else if(t===Qo){const t=!this.props.startDate,n=this.props.startDate&&this.props.endDate,o=this.props.startDate&&this.props.startDate>e;t||n||o?(r&&r(e),a&&a(null)):a&&a(e)}}onDateHovered(e){const{onDateHovered:t}=this.props;e&&this.state.hovered&&this.state.hovered.getDate()!==e.getDate()&&this.setState({hovered:e},(()=>{t&&t(e)}))}onDateFocused(e){const{onDateFocused:t}=this.props,n=e.getMonth()+1,r=e.getFullYear();this.state.focused&&this.state.focused!==e&&this.setState({focused:e,month:n,year:r},(()=>{t&&t(e)}))}isDateEnabled(e){const{isDateEnabled:t}=this.props;return t(e)}isDateHighlighted(e){const{isDateHighlighted:t}=this.props;return t(e)}isDateFocused(e){return Mo()(e,this.state.focused)}isDateHovered(e){return Mo()(e,this.state.hovered)}isDateSelected(e){return(this.props.type===Jo?[this.props.date]:[this.props.startDate,this.props.endDate]).some((t=>!!t&&Mo()(t,e)))}isDateInRange(e){if(this.props.type===Jo)return!1;const{startDate:t,endDate:n}=this.props,{focused:r,hovered:a}=this.state,o=n||(t&&r&&!Mo()(t,r)?r:a);return!(!t||!o||jo()(o,t))&&Lo()(e,t,o)}componentWillReceiveProps(e){var t;e&&e.open!==this.props.open&&!0===e.open&&((null===(t=this.calendar)||void 0===t?void 0:t.current)&&this.calendar.current.base.focus())}render(){return(0,e.h)(Go,{calendarRef:this.calendar,month:this.state.month,year:this.state.year,isDateHovered:this.isDateHovered,isDateFocused:this.isDateFocused,isDateSelected:this.isDateSelected,isDateInRange:this.isDateInRange,isDateHighlighted:this.isDateHighlighted,isDateEnabled:this.isDateEnabled,onDateSelected:this.onDateSelected,onDateHovered:this.onDateHovered,onDateFocused:this.onDateFocused,onChangeMonth:this.onChangeMonth,onChangeYear:this.onChangeYear,locale:this.props.locale,disabled:this.props.disabled,theme:this.props.theme})}}ei.defaultProps={type:Jo,locale:"en-US",isDateHighlighted:e=>!1,isDateEnabled:e=>!0,disabled:!1};const ti=t=>(0,e.h)(ei,Xo({type:Jo},t)),ni=j("div")((e=>{let{mode:t,theme:n}=e;return Object.assign(Object.assign({},n.getCSSFontProperties("stacked"===t?"pinned":"primary")),{display:"stacked"===t?"block":"inherit",flexGrow:"1",cursor:"pointer"})})),ri=j("div")((()=>({justifyContent:"space-between",alignItems:"center"}))),ai=j("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),oi=t=>{var n,r,a,o,i,s,l,c,u,h,p,m;let{nodeKey:g,cardInstanceId:v,subviewId:f,attributes:{format:b,defaultValue:y,thumbnailSrc:w,label:S,name:k,placeholder:C},validations:x,theme:I,variableResolver:O,onValueChanged:T,embedMode:M}=t;const _=y?new Date(y):void 0,j=Y(_?(0,wt.addMinutes)(_,_.getTimezoneOffset()):null),[D,L]=N(!1),[F,A]=N(0),[H,E]=N(0),[P,R]=N(j.current),V=Y(null),z=Y(null),$=Y(null),W=(null==x||null===(n=x.maximumDate)||void 0===n||null===(r=n.attributes)||void 0===r?void 0:r.maximumDate)?new Date(null==x||null===(a=x.maximumDate)||void 0===a||null===(o=a.attributes)||void 0===o?void 0:o.maximumDate):void 0,q=(null==x||null===(i=x.minimumDate)||void 0===i||null===(s=i.attributes)||void 0===s?void 0:s.minimumDate)?new Date(null==x||null===(l=x.minimumDate)||void 0===l||null===(c=l.attributes)||void 0===c?void 0:c.minimumDate):void 0,U=new Date;let Z=new Date;if(W&&q){if(!(U<=W&&U>=q)){Z=Math.abs((0,wt.differenceInSeconds)(U,W))<Math.abs((0,wt.differenceInSeconds)(U,q))?W:q}}else if(q){U>=q||(Z=q)}else if(W){U<=W||(Z=W)}const K=P?new Date(P):new Date(Z);let G;return K.setHours(0,0,0,0),B((()=>{const e=e=>{$.current&&!$.current.base.contains(e.target)&&V.current&&!V.current.base.contains(e.target)&&(D&&Xt().validateField(v,k,P,x,f),L(!1))};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),B((()=>{const e=P?P.toISOString():void 0,t=P?Vt()(P,$e):null;if(T)T(e);else{const e=Jt(v,k,f);e?(j.current=new Date(e),R(e)):Xt().handleFormChange(v,k,t,f)}}),[]),B((()=>{var e;const t=y?new Date(y):void 0,n=t?(0,wt.addMinutes)(t,t.getTimezoneOffset()):null;if((null==n?void 0:n.toDateString())!==(null===(e=j.current)||void 0===e?void 0:e.toDateString())){if(P===j.current){const e=n?n.toISOString():void 0,t=n?Vt()(n,$e):null;T?T(e):Xt().handleFormChange(v,k,t,f),R(n)}j.current=n}}),[y]),((null==x||null===(u=x.maximumDate)||void 0===u||null===(h=u.attributes)||void 0===h?void 0:h.maximumDate)||(null==x||null===(p=x.minimumDate)||void 0===p||null===(m=p.attributes)||void 0===m?void 0:m.minimumDate))&&(G=e=>{var t,n,r,a;const o=null===(t=x.maximumDate)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.maximumDate,i=null===(r=x.minimumDate)||void 0===r||null===(a=r.attributes)||void 0===a?void 0:a.minimumDate,s=o?Pt(o,{isMax:!0}):void 0,l=i?Pt(i,{isMin:!0}):void 0;return(!s||e<=s)&&(!l||e>=l)}),(0,e.h)(d.lj,{actions:qt,mapToProps:()=>{}},(t=>(0,e.h)(ai,null,(0,e.h)(Kr,{nodeKey:g,ref:V,innerRef:z,mode:b,theme:I,tabFocusable:!0,onClick:()=>{if(V.current){const{openPosition:e,height:n}=fo($.current.base,V.current.base,!!f,M);A(e),E(n),L((e=>(e&&t.validateField(v,k,P,x,f),!e)))}}},w&&(0,e.h)(ri,{mode:b},(0,e.h)(Xr,{thumbnailUrl:O(w),theme:I})),(0,e.h)(ni,{mode:b,theme:I},(0,e.h)(ao,{theme:I,mode:b},O(S)),(0,e.h)(vo,{theme:I,mode:b},P?Vt()(P,"DD MMM YYYY"):O(C))),(0,e.h)(so,{fillColor:I.getCSSColor("icon.dropdown")})),(0,e.h)(ho,{ref:$,open:D,openPosition:F,theme:I,height:H},(0,e.h)(ti,{date:K,open:D,theme:I,onDateSelected:e=>{R(e);const n=e?Vt()(e,$e):void 0,r=e?e.toISOString():void 0;T?T(r):t.handleFormChange(v,k,n,f),t.validateField(v,k,r,x,f),L(!1),z&&z.current&&z.current.base&&z.current.base.focus()},isDateEnabled:G})),(0,e.h)(ra,{theme:I,name:k,cardInstanceId:v,subviewId:f}))))},ii=j("p")((e=>{let{theme:t}=e;return Object.assign(Object.assign({display:"grid",gridTemplateColumns:"auto 1fr",color:t.getCSSColor("text.category")},t.getCSSFontProperties("category")),{padding:"10px 30px 8px 0px",margin:"0",whiteSpace:"pre-wrap"})}));let si=null;const li=j("div")((e=>{var t,n,r,a,o;let{theme:i,feedOrientation:s,isWorkflow:l,transparencies:c}=e;const d=i.getShape("buttonLayout.global"),u=i.getShape("buttonAlignment.global"),h=c.finalButtonTransparent?"0":l?"20px":"10px",p=c.primaryButtonTransparent||c.secondaryButtonTransparent?"0px":"10px",m=!1===c.primaryButtonTransparent,g=!1===c.secondaryButtonTransparent;let v,f;m||g?(v="10px",f="20px"):(v="0px",f="10px");const b=Object.assign({flexGrow:"1",flexDirection:"column"},"horizontal"===d?{alignItems:"flex-end"}:{justifyContent:"flex-end"}),y={paddingBottom:l?f:v,flexDirection:"row",overflowX:"scroll",margin:"0 -20px",paddingLeft:"20px",paddingRight:"20px",marginRight:"-20px","::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none",scrollbarWidth:"none","> button:not(:last-child)":{marginRight:null!==(t=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==t?t:p},"> a:not(:last-child)":{marginRight:null!==(n=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==n?n:p}},w={flexDirection:"column",alignItems:null!==(r={left:"flex-start",center:"center",right:"flex-end"}[u])&&void 0!==r?r:"flex-start","> button:not(:last-child)":{marginBottom:null!==(a=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==a?a:p},"> button:last-child":{marginBottom:h},"> a:not(:last-child)":{marginBottom:null!==(o=i.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==o?o:p},"> a:last-child":{marginBottom:h}};return Object.assign(Object.assign({paddingTop:c.firstButtonTransparent?"0px":"10px",display:"flex",alignItems:"center"},"horizontal"===s?b:{}),"horizontal"===d?y:w)}));function ci(){return ci=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ci.apply(this,arguments)}const di={linkButton:t=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,subviewTitle:o,isWorkflow:i,theme:s,attributes:l,variableResolver:d}=t;const{text:u,icon:h,iconUrl:p,appearance:m}=l,g=l.url,v=l.target,f=Object.assign(Object.assign({},a&&{subviewId:a}),o&&{subviewTitle:o}),b=K(br),y=b.runtimeVariableResolver,w=b.containersBroadcastChannel;return(0,e.h)(Nr,{nodeKey:n,theme:s,appearance:m,isWorkflow:i,text:d(u),icon:h,iconUrl:p,clickHandler:e=>{const t=c().getState();return a=>Vr(void 0,void 0,void 0,(function*(){let o,i,s;if(l.action){s=l.action;const e=t.cardFeed.cardInstances.find((e=>e.instance.id===r));s&&y&&e&&(yield $r(y,t.application.runtimeVariableResolutionTimeout,e,s))}else if(l.layoutId)o=l.layoutId;else if(l.url){if(a.preventDefault(),i={url:d(g),target:a.ctrlKey||a.metaKey?"_blank":null!=v?v:"_blank"},b.analyticsDispatcher.sendEvent({cardInstanceId:r,cardViewState:t.navigationStack.items.length?"subview":"topview",eventName:wr,properties:Object.assign({linkMethod:"url",url:i.url,trigger:"linkButton"},f.subviewId?Object.assign(Object.assign({},f),{subviewLevel:1}):{})}),"_top"===i.target&&w){const e=`${n}-link-button`;return w.addEventListener("message",(t=>{if(t.data.type===Pr.ANALYTICS_EVENT){var n;const a=null===(n=t.data)||void 0===n?void 0:n.eventQueued;a.eventName===wr&&a.cardInstanceId===r&&w&&i&&(w.removeEventListener(e),window.open(i.url,i.target))}}),e)}return window.open(i.url,i.target)}return e.handleLinkButtonPress(r,f,o,s)}))},urlLink:g?{url:d(g),target:v}:void 0})},submitButton:t=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,subviewTitle:o,isWorkflow:i,theme:s,attributes:{name:l,text:d,appearance:u,icon:h,iconUrl:p,values:m,url:g,action:v,target:f},variableResolver:b}=t;const[y,w]=N(!1),S=K(br),k=S.cardEventDispatcher,C=S.authTokenProvider,x=S.analyticsDispatcher,I=S.runtimeVariableResolver;return(0,e.h)(Nr,{nodeKey:n,theme:s,appearance:u,isWorkflow:i,text:b(d),icon:h,iconUrl:p,clickHandler:e=>{const t=c().getState();return()=>Vr(void 0,void 0,void 0,(function*(){var n,s;if(t.application.isPreview)return void e.finishSubview();if(y)return;w(!0);const d=t.cardFeed.cardInstances.find((e=>e.instance.id===r));v&&I&&d&&(yield $r(I,t.application.runtimeVariableResolutionTimeout,d,v));let u={};var h,p;i?(e.validateCurrentSubview(r),u=a&&null!==(n=null===(h=c().getState().validationStates[r])||void 0===h||null===(p=h.subviews)||void 0===p?void 0:p[a])&&void 0!==n?n:{}):(e.validateCardTopLevel(r),u=null!==(s=c().getState().validationStates[r].validations)&&void 0!==s?s:{});const S=c().getState(),O=(e=>!!e.navigationStack.items.length)(t);(e=>{for(var t in e)if("invalid"===e[t].type)return!1;return!0})(u)&&(yield Fr(S,e,r,O,k,C,m,{postSubmissionUrl:g?{url:b(g),target:f}:void 0,payload:v,subviewData:{subviewId:a,subviewTitle:o},submitButtonName:l}),i&&x.sendEvent({cardInstanceId:r,cardViewState:"subview",eventName:Mr,properties:{subviewId:a,subviewTitle:o,subviewLevel:1}})),w(!1)}))},loading:y,type:"submit"})},dismissButton:t=>{let{nodeKey:n,isWorkflow:r,attributes:a,theme:o,cardInstanceId:i,variableResolver:s}=t;const{text:l,icon:d,iconUrl:u,appearance:h}=a,p=K(br);return(0,e.h)(Nr,{nodeKey:n,theme:o,appearance:h,isWorkflow:r,text:s(l),icon:d,iconUrl:u,clickHandler:e=>()=>{Lr(c().getState(),e,i,p.cardEventDispatcher,p.authTokenProvider,"card-button")}})},snoozeButton:t=>{let{nodeKey:n,isWorkflow:r,attributes:a,theme:o,cardInstanceId:i,variableResolver:s}=t;const{text:l,icon:d,iconUrl:u,snoozePeriod:h,appearance:p}=a,m=K(br);return(0,e.h)(Nr,{nodeKey:n,theme:o,appearance:p,isWorkflow:r,text:s(l),icon:d,iconUrl:u,clickHandler:e=>()=>{if(void 0===h)e.requestSnooze(i,"card-button");else{const t=xi(h,new Date);(0,wt.isPast)(t)||Ar(c().getState(),e,i,t,m.cardEventDispatcher,m.authTokenProvider,"card-button")}}})},voteUpButton:t=>{let{nodeKey:n,isWorkflow:r,attributes:a,theme:o,cardInstanceId:i,variableResolver:s}=t;const{text:l,icon:c,iconUrl:d,appearance:u}=a,h=K(br);return(0,e.h)(Nr,{nodeKey:n,theme:o,appearance:u,isWorkflow:r,text:s(l),icon:c,iconUrl:d,clickHandler:e=>()=>{Hr(i,e,h.analyticsDispatcher,h.cardEventDispatcher,"card-button")}})},voteDownButton:t=>{let{nodeKey:n,isWorkflow:r,attributes:a,theme:o,cardInstanceId:i,variableResolver:s}=t;const{text:l,icon:c,iconUrl:d,appearance:u}=a;return(0,e.h)(Nr,{nodeKey:n,theme:o,appearance:u,isWorkflow:r,text:s(l),icon:c,iconUrl:d,clickHandler:e=>()=>{e.requestFeedback(i,"card-button")}})},actionButtonGroup:t=>{let{children:n,theme:r,feedOrientation:a,isWorkflow:o}=t;const i=Y(null),[s,l]=N({primaryButtonTransparent:void 0,secondaryButtonTransparent:void 0,firstButtonTransparent:!1,finalButtonTransparent:!1});return B((()=>{var e,t,n;const r=null===(t=i.current)||void 0===t||null===(n=t.base)||void 0===n?void 0:n.childNodes;if(r)for(let t=0;t<r.length;t++){var a;const n=r[t],o=n.getAttribute("appearance"),i=null!==(e=null===(a=window.getComputedStyle(n).backgroundColor.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/))||void 0===a?void 0:a.length)&&void 0!==e?e:0;"primary"!==o||s.primaryButtonTransparent?"secondary"!==o||s.secondaryButtonTransparent||l((e=>Object.assign(Object.assign({},e),{secondaryButtonTransparent:i>0}))):l((e=>Object.assign(Object.assign({},e),{primaryButtonTransparent:i>0}))),0===t&&l((e=>Object.assign(Object.assign({},e),{firstButtonTransparent:i>0}))),t===r.length-1&&l((e=>Object.assign(Object.assign({},e),{finalButtonTransparent:i>0})))}}),[i]),(0,e.h)(li,{ref:i,theme:r,feedOrientation:a,isWorkflow:o,transparencies:s},n)},form:t=>{let{cardInstanceId:n,subviewId:r,attributes:{defaultValues:a},isWorkflow:o,feedOrientation:i,children:s}=t;return(0,e.h)(d.lj,{actions:qt,mapToProps:()=>{}},(t=>(0,e.h)(Br,{isWorkflow:o,feedOrientation:i,initializeFormStore:qr(t,n,a,r)},s)))},list:t=>{let n,{nodeKey:r,attributes:{type:a},children:o,theme:i}=t;switch(a){case"bullet":n=ca;break;case"number":n=da;break;case"comma":n=ua}return n?(0,e.h)(n,{key:r,"data-element-key":r,theme:i},o):null},headline:t=>{var n;let{nodeKey:r,attributes:{text:a,icon:o,iconUrl:i},theme:s,variableResolver:l}=t;const c=s.getCSSFontProperties("headline"),d=s.getNumericFontSize("headline"),u=s.getCSSColor("icon.headline",{skipFallback:!0}),h=s.getCSSColor("icon.headline");return(0,e.h)(Yr,{theme:s,headlineFontProperties:c},(o||i)&&(0,e.h)(er,{iconName:o,iconUrl:i,size:null!=d?d:20,color:null!==u?u:void 0,fallbackColor:h,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(n=null==c?void 0:c.lineHeight)&&void 0!==n?n:"initial",marginRight:"10px",width:`${d}px`,minWidth:`${d}px`,textAlign:"center"}}),(0,e.h)(Ur,{key:r,theme:s,"data-testid":"card-headline","data-element-key":r},l(a)))},textInput:oa,numberInput:t=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,attributes:{defaultValue:o,thumbnailSrc:i,placeholder:s,name:l},theme:c,validations:u,variableResolver:h}=t;const p=Y(null),m=Y(o&&gi(o.toString())?o.toString():""),[g,v]=N(m.current);B((()=>{const e=Jt(r,l,a);if(e)m.current=e.toString(),v(e.toString());else{const e=gi(g);Xt().handleFormChange(r,l,null!=e?e:void 0,a)}}),[]),B((()=>{const e=o&&gi(o.toString())?o.toString():"";if(e!==m.current){if(g===m.current){const t=gi(e);Xt().handleFormChange(r,l,null!=t?t:void 0,a),v(e)}m.current=e}}),[o]);const f=h(s);return(0,e.h)(d.lj,{actions:qt,mapToProps:()=>{}},(t=>(0,e.h)(e.Fragment,null,(0,e.h)(Kr,{nodeKey:n,mode:"inline",theme:c},i&&(0,e.h)(Xr,{thumbnailUrl:h(i),theme:c}),(0,e.h)(ea,{theme:c,ref:p,placeholder:f,value:g,title:f,className:"input-number",inputmode:"decimal",onInput:e=>{const{value:n}=e.target,o=g;let i;v(n),i=vi(n)?n.trim():o,v(i);const s=gi(i);((e,t)=>{null!==si&&(clearTimeout(si),si=null),si=setTimeout((()=>{t(r,l,null!=e?e:void 0,u,a)}),200)})(s,t.validateField),t.handleFormChange(r,l,null!=s?s:void 0,a)}})),(0,e.h)(ra,{name:l,cardInstanceId:r,subviewId:a,theme:c}))))},listItem:t=>{let n,{nodeKey:r,attributes:{text:a,icon:o},theme:i,variableResolver:s}=t;_i(n)||(n=i.getCSSFontProperties("bullet"));const l=i.getCSSColor("icon.bullet",{skipFallback:!0}),c=i.getCSSColor("icon.bullet");return(0,e.h)(ha,{key:r,"data-element-key":r,theme:i,class:o?"with-icon":"without-icon"},o&&(0,e.h)(er,{iconName:o,size:n?n.fontSize:20,color:null!==l?l:void 0,fallbackColor:c,styles:{lineHeight:n?n.lineHeight:"initial",marginRight:"10px",width:"22px",minWidth:"22px",textAlign:"center"}}),(0,e.h)("span",{class:"list-item-text"},s(a)))},stepper:t=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,attributes:{defaultValue:o,minimumValue:i,maximumValue:s,stepValue:l,thumbnailSrc:c,label:u,name:h},validations:p,theme:m,variableResolver:g}=t;const v=i||0,f=s||100,b=l&&l>0?l:1,y=Y(o&&o>=v&&o<=f?o:v),[w,S]=N(y.current),[k,C]=N(y.current),[x,I]=N(!0),O=m.getCSSColor("icon.stepper"),T=m.getCSSColor("icon.stepperDisabled"),M=null==w||!to(w,f,b)||!x,_=null==w||!eo(w,v,b)||!x;B((()=>{const e=Jt(r,h,a);e?(y.current=e,S(e),C(e)):Xt().handleFormChange(r,h,w,a)}),[]),B((()=>{const e=o&&o>=v&&o<=f?o:v;e!==y.current&&(k===y.current&&(Xt().handleFormChange(r,h,e,a),S(e),C(e)),y.current=e)}),[o]);const j=g(u),D=(e,t)=>{null!==no&&(clearTimeout(no),no=null),no=setTimeout((()=>{t(r,h,null!=e?e:void 0,p,a)}),400)};return(0,e.h)(d.lj,{actions:qt,mapToProps:e=>{let{}=e}},(t=>(0,e.h)(e.Fragment,null,(0,e.h)(Kr,{nodeKey:n,mode:"inline",theme:m,cursor:"default"},c&&(0,e.h)(Xr,{thumbnailUrl:g(c),theme:m}),(0,e.h)(Qa,{theme:m},j),(0,e.h)(Ga,{theme:m},(0,e.h)(Xa,{theme:m,disabled:_,tabIndex:"0","aria-label":`Decrease value by ${b}`,class:"stepper-decrement",onClick:()=>{if(null==w||!eo(w,v,b)||!x)return;const e=((e,t,n)=>e-t<n?n:e-t)(w,b,v);C(e),S(e),t.handleFormChange(r,h,e,a),D(e,t.validateField)}},(0,e.h)(Ka,{fillColor:_?T:O})),(0,e.h)(Ja,{type:"number",theme:m,tabIndex:"0",title:j,className:"stepper-value",onInput:e=>{const{value:n}=e.target,o=k;let i;C(n),i=vi(n)?n.trim():o,I(((e,t,n)=>e>=t&&e<=n)(i,v,f)),C(i);const s=gi(i);S(s),t.handleFormChange(r,h,null!=s?s:void 0,a),D(s,t.validateField)},onBlur:()=>{t.validateField(r,h,w,p,a)},value:k}),(0,e.h)(Xa,{theme:m,disabled:M,tabIndex:"0","aria-label":`Increase value by ${b}`,class:"stepper-increment",onClick:()=>{if(null==w||!to(w,f,b)||!x)return;const e=((e,t,n)=>e+t>n?n:e+t)(w,b,f);C(e),S(e),t.handleFormChange(r,h,e,a),D(e,t.validateField)}},(0,e.h)(Za,{fillColor:M?T:O})))),(0,e.h)(ra,{name:h,cardInstanceId:r,subviewId:a,theme:m}))))},video:t=>{let{nodeKey:n,cardInstanceId:r,attributes:a,theme:o,isWorkflow:i,variableResolver:s}=t;const[l,c]=N(!1),[d,u]=N(void 0);var h,p,m,g;return l?(0,e.h)(Va,{nodeKey:n,cardInstanceId:r,isWorkflow:i,format:a.format,src:s(a.src),thumbnailSrc:s(a.thumbnailSrc),dimensions:a.dimensions,loadedDimensions:d,theme:o,label:s(a.label),description:s(a.description),altText:{src:s(null===(h=a.altText)||void 0===h?void 0:h.src),thumbnailSrc:s(null===(p=a.altText)||void 0===p?void 0:p.thumbnailSrc)}}):(0,e.h)(Ra,{nodeKey:n,cardInstanceId:r,isWorkflow:i,format:a.format,src:s(a.src),thumbnailSrc:s(a.thumbnailSrc),dimensions:a.dimensions,onLoad:u,theme:o,label:s(a.label),description:s(a.description),altText:{src:s(null===(m=a.altText)||void 0===m?void 0:m.src),thumbnailSrc:s(null===(g=a.altText)||void 0===g?void 0:g.thumbnailSrc)},setPlaying:c})},image:t=>{let n,{nodeKey:r,cardInstanceId:a,subviewId:o,subviewTitle:i,theme:s,attributes:{format:l,thumbnailSrc:c,description:h,label:p,src:m,dimensions:g,altText:v,behaviour:f,url:b,target:y,layoutId:w,payload:S},variableResolver:k}=t;const C=K(br),x=C.containersBroadcastChannel;switch(l){case"inline":n=Ia;break;case"banner":n=Ca;break;case"thumbnail":n=Sa;break;case"text":n=Ma}const I=m&&m.length>0?"image":"imageWithoutSrc";return n?(0,e.h)(d.lj,{actions:(0,u.Y2)(St,qt),mapToProps:()=>{}},(t=>{const l=Z((()=>{switch(f){case"url":return b?e=>{e.preventDefault();const t={url:k(b),target:e.ctrlKey||e.metaKey?"_blank":null!=y?y:"_blank"};if(C.analyticsDispatcher.sendEvent({cardInstanceId:a,cardViewState:o?"subview":"topview",eventName:wr,properties:Object.assign({linkMethod:"url",url:t.url,trigger:"image"},o?{subviewId:o,subviewTitle:i,subviewLevel:1}:{})}),"_top"===t.target&&x){const e=`${r}-image-link`;return x.addEventListener("message",(n=>{if(n.data.type===Pr.ANALYTICS_EVENT){var r;const o=null===(r=n.data)||void 0===r?void 0:r.eventQueued;o.eventName===wr&&o.cardInstanceId===a&&x&&t&&(x.removeEventListener(e),window.open(t.url,t.target))}}),e)}return window.open(t.url,t.target)}:()=>{tn.error({level2:[`url type image link for card: ${a} has no url`]})};case"subview":return w?()=>{t.handleImageLinkPress(a,{layoutId:w,currentSubviewId:o,currentSubviewTitle:i})}:()=>{tn.error({level2:[`subview type image link for card: ${a} has no subview id`]})};case"payload":return S?()=>{t.handleImageLinkPress(a,{payload:S,currentSubviewId:o,currentSubviewTitle:i})}:()=>{tn.error({level2:[`payload type image link for card: ${a} has no payload`]})};case"none":return;default:return()=>{t.viewMedia(a,Object.assign({type:I,url:k(m),title:k(p)},(null==v?void 0:v.src)?{alt:k(v.src)}:{}))}}}),[f,a,x]);return(0,e.h)(n,{nodeKey:r,mediaType:I,theme:s,src:k(c),dimensions:g,url:b,label:k(p),description:k(h),alt:k(null==v?void 0:v.thumbnailSrc),onClickImage:l})})):null},text:t=>{var n,r;let{nodeKey:a,theme:o,attributes:{icon:i,iconUrl:s,text:l},isWorkflow:c,variableResolver:d,cardInstanceId:u,subviewId:h,subviewTitle:p}=t;const m=Y((0,nn.v4)()),g=Wa(wi(d(l))),v=K(br).analyticsDispatcher;let f;_i(o.getCSSFontProperties("body"))||(f=o.getCSSFontProperties("body"));const b=o.getNumericFontSize("body"),y=Object.assign(Object.assign(Object.assign({},h&&{subviewId:h}),p&&{subviewTitle:p}),h&&{subviewLevel:1}),w=o.getCSSColor("icon.body",{skipFallback:!0}),S=o.getCSSColor("icon.body");return B((()=>{const e=document.querySelector(`#markdown-${m.current}`);if(e){Array.from(e.querySelectorAll(".md-subview-link")).forEach((e=>{e.addEventListener("click",(()=>{var t;It().handleSubviewLinkPress(u,null==e||null===(t=e.dataset)||void 0===t?void 0:t.subviewId)})),e.addEventListener("keydown",(t=>{var n;mt(t.key)===ut&&It().handleSubviewLinkPress(u,null==e||null===(n=e.dataset)||void 0===n?void 0:n.subviewId)}))}));Array.from(e.querySelectorAll(".md-web-link")).forEach((e=>{e.addEventListener("click",(e=>{var t;const n=null===(t=e.target.attributes.getNamedItem("href"))||void 0===t?void 0:t.value;v.sendEvent({cardInstanceId:u,cardViewState:c?"subview":"topview",eventName:wr,properties:Object.assign({linkMethod:"url",url:null!=n?n:"",detail:"textLink"},y)})}))}))}}),[g]),(0,e.h)(Ua,{key:a,theme:o,bodyFontProperties:f,isWorkflow:c,"data-element-key":a,"data-testid":"text-block"},(i||s)&&(0,e.h)(er,{iconName:i,iconUrl:s,size:null!=b?b:20,color:null!==w?w:void 0,fallbackColor:S,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(n=null===(r=f)||void 0===r?void 0:r.lineHeight)&&void 0!==n?n:"initial",marginRight:"10px",width:`${b}px`,minWidth:`${b}px`,textAlign:"center"}}),(0,e.h)(Ya,{id:`markdown-${m.current}`,theme:o,dangerouslySetInnerHTML:{__html:g}}))},switch:t=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,attributes:{defaultValue:o,thumbnailSrc:i,label:s,name:l},theme:c,variableResolver:u}=t;const h=Y(o),[p,m]=N(h.current);B((()=>{const e=Jt(r,l,a);void 0!==e?(h.current=e,m(e)):Xt().handleFormChange(r,l,p,a)}),[]),B((()=>{o!==h.current&&(p===h.current&&(Xt().handleFormChange(r,l,o,a),m(o)),h.current=o)}),[o]);const g=`switch-label-${l}`;return(0,e.h)(d.lj,{actions:qt,mapToProps:()=>{}},(t=>(0,e.h)(Kr,{nodeKey:n,mode:"inline",theme:c},i&&(0,e.h)(Xr,{thumbnailUrl:u(i),theme:c}),(0,e.h)(ao,{theme:c,name:g},u(s)),(0,e.h)(oo,{on:p,theme:c,tabIndex:"0",role:"switch","aria-checked":p,"aria-labelledby":g,className:"switch-toggle",onClick:()=>{m(!p),t.handleFormChange(r,l,!p,a)}},(0,e.h)(io,{on:p,theme:c})))))},dropdown:bo,datePicker:oi,cardDescription:t=>{var n;let{attributes:{text:r,icon:a,iconUrl:o},theme:i,variableResolver:s}=t;const l=i.getCSSFontProperties("category"),c=i.getNumericFontSize("category"),d=i.getCSSColor("icon.category",{skipFallback:!0}),u=i.getCSSColor("icon.category");return(0,e.h)(ii,{theme:i,"data-testid":"card-category"},(a||o)&&(0,e.h)(er,{iconName:a,iconUrl:o,size:null!=c?c:20,color:null!==d?d:void 0,fallbackColor:u,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(n=null==l?void 0:l.lineHeight)&&void 0!==n?n:"initial",marginRight:"10px",width:`${c}px`,minWidth:`${c}px`,textAlign:"center"}}),s(r))}},ui=["linkButton","submitButton","dismissButton","snoozeButton","voteUpButton","voteDownButton"],hi=t=>{let{node:n,cardInstanceId:r,isWorkflow:a,theme:o,runtimeVariables:i,feedOrientation:s,subviewId:l,subviewTitle:c,embedMode:d}=t;const u=di[n.type];return u?(0,e.h)(u,ci({},n.key&&{nodeKey:n.key},{cardInstanceId:r,subviewId:l,subviewTitle:c,attributes:n.attributes,validations:n.validations,isWorkflow:a,theme:o,variableResolver:e=>ki(e,i),feedOrientation:s,embedMode:d}),n.children&&n.children.map((t=>(0,e.h)(hi,{cardInstanceId:r,subviewId:l,subviewTitle:c,node:t,isWorkflow:a,theme:o,runtimeVariables:i,embedMode:d})))):null},pi={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"},mi=/[&<>"'\/]/g,gi=e=>{if(""===e)return null;const t=Number(e);return Number.isNaN(t)?null:t},vi=e=>null!==gi(e)||""===e||"-"===e,fi=e=>{let t=Array();for(var n in e){const r=e[n];t.push(r),r.children&&(t=t.concat(fi(r.children)))}return t},bi=e=>{const t=[],n=(e,r)=>{const a=[];for(let r=0;r<e.length;r++){var o;const i=e[r];"actionButtonGroup"!==i.type&&i.children&&(null===(o=i.children)||void 0===o?void 0:o.length)>0&&(i.children=n(i.children,i)),ui.includes(i.type)?t.push(i):a.push(i)}if("form"===(null==r?void 0:r.type)){var i;let e=!1;null===(i=r.children)||void 0===i||i.forEach((t=>{"actionButtonGroup"===t.type&&(e=!0)})),!e&&a.push({type:"actionButtonGroup",attributes:{},children:t})}return a};return n(e)},yi=(e,t)=>{const n=e=>{for(let r in e){const a=e[r];"string"==typeof a&&(e[r]=ki(a,t)),"object"==typeof a&&n(a)}},r=e=>{const t=[];for(let o=0;o<e.length;o++){var a;const i=e[o];i.children&&(null===(a=i.children)||void 0===a?void 0:a.length)>0&&(i.children=r(i.children)),i.attributes&&n(i.attributes),t.push(i)}return t};e.defaultView.nodes=r(e.defaultView.nodes);for(let n in e.subviews){const a=e.subviews[n];e.subviews[n].nodes=r(a.nodes),a.title&&(e.subviews[n].title=ki(a.title,t))}},wi=e=>e?e.replace(mi,(e=>pi[e]||e)):"",Si=/!\{([\w\.]+?)\}/g,ki=(e,t)=>e&&t&&"string"==typeof e?e.replace(Si,((e,n)=>t.get(n)||"")):e||"",Ci={years:wt.addYears,months:wt.addMonths,weeks:wt.addWeeks,days:wt.addDays,hours:wt.addHours,minutes:wt.addMinutes,seconds:wt.addSeconds},xi=(e,t)=>{const n=(e=>{const t=e.match(Ne);if(t){const[,,e,n,r,a,o,i,s]=t.map((e=>void 0!==e?Number(e):void 0));return{years:e,months:n,weeks:r,days:a,hours:o,minutes:i,seconds:s}}return null})(e);return n?Object.entries(Ci).reduce(((e,t)=>{let[r,a]=t;const o=n[r];return o?a(e,o):e}),t):t},Ii=e=>{if(!Oi(e))throw new Error("JWT supplied has an incorrect format");try{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/"),n=atob(t);return JSON.parse(n)}catch(e){throw new Error("JWT payload could not be parsed")}},Oi=e=>!!e.match(/^[\w-]+\.[\w-]+\.[\w-]*$/),Ti=e=>{const t=c().getState().application.embedMode;return(null==e?void 0:e.enabled)&&"standalone"===t?"horizontal":"vertical"},Mi=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),_i=e=>e&&Mi(e)&&0===Object.keys(e).length,ji=j("div")((e=>{let{feedOrientation:t}=e;return Object.assign({},"horizontal"===t?{height:"100%",display:"flex",flexDirection:"column"}:{})})),Di=j("div")((e=>{let{theme:t,margin:n,minHeight:r,feedOrientation:a,cardWidth:o}=e;const i={width:`${o}px`,marginLeft:`${n}px`};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({backgroundColor:t.getCSSColor("background.card"),marginBottom:`${n}px`,borderRadius:t.getShape("borderRadius.card"),boxShadow:n>0?`0 ${t.getShape("offset.cardShadow")} ${t.getShape("blur.cardShadow")} ${t.getCSSColor("shadow.card")}`:"none",padding:"10px 20px",border:`${t.getShape("border.card")} solid ${t.getCSSColor("border.card")}`,position:"relative",minHeight:r?`${r}px`:"0px"},"horizontal"===a?i:{}),nt(a).cardCompletion),nt(a).dismissal),nt(a).snooze),{".submitting, .submitted, .submitted-subview":{border:"0"}})})),Li=j("div")((e=>{let{dimensions:t,centerAlign:n,leftPosition:r,feedOrientation:a}=e;const o=Object.assign({width:t.width,display:"flex",flexShrink:"0",scrollSnapAlign:"center",".fixed-position":{position:"unset",left:`${r?r/2+r:0}px`}},n&&{left:"50%",transform:"translateX(-50%)"});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({height:t.height},"horizontal"===a?o:{}),rt(a).cardCompletion),rt(a).dismissal),rt(a).snooze),rt(a).center)})),Fi=j("div")((()=>({})));var Ai;!function(e){e.menu="menu",e.dismiss="dismiss",e.hidden="hidden"}(Ai||(Ai={}));const Hi=ae((t=>{let{cardInstanceId:n,children:r,theme:a,animationState:o,onDismiss:i,onSnooze:s,onFeedbackSelected:l,removeCard:c,customStrings:d,margin:u,centerAlign:h,accessibilityRole:p,actions:m,votingOptions:g,cardMinimumHeight:v,horizontalContainerConfig:f}=t;const[b,y]=N(!1),w=Y(b),S=e=>{w.current=e,y(e)},[k,C]=N({height:"auto",width:"auto"}),[x,I]=N(0),O=Y(null),T=Y(null),M=Y(null),_=`card-overflow-menu-${n}`,j=Ti(f);q((()=>{T.current&&T.current.base&&("submitted"===o||"submitted-subview"===o||"dismissed"===o||"snoozed"===o?(C({height:T.current.base.offsetHeight+u-1+"px",width:`${T.current.base.offsetWidth+u}px`}),"horizontal"===Ti(f)&&"center"===(null==f?void 0:f.lastCardAlignment)?(Hn().fixPositionRemainingCard(n),I(M.current.base.offsetLeft),setTimeout((()=>{Hn().centerRemainingCard(n)}),200),setTimeout((()=>{c()}),st(o))):setTimeout((()=>{c()}),st(o))):C({height:"auto",width:"auto"})),M.current&&M.current.base&&(I("fixed-position"===o?M.current.base.offsetLeft:0),"centering"===o&&setTimeout((()=>{Hn().removeCardState(n)}),st(o)))}),[o,T.current,M.current]),B((()=>{const e=e=>{var t;(null===(t=O.current)||void 0===t?void 0:t.base)&&!O.current.base.contains(e.target)&&S(!1)};document.addEventListener("mousedown",e);const t=e=>{if(w.current&&("Tab"===e.key&&S(!1),"Escape"===e.key&&w.current)){const e=document.getElementById(_);S(!1),null==e||e.focus()}};return document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}}),[n]);const{dismiss:{overflow:D},snooze:{overflow:L},voteUp:{overflow:F},voteDown:{overflow:A}}=m,H={voteUp:!0===(null==g?void 0:g.canVoteUseful)||F,voteDown:!0===(null==g?void 0:g.canVoteNotUseful)||A};let E=Ai.hidden;H.voteUp||H.voteDown||L?E=Ai.menu:D&&(E=Ai.dismiss);const P=(H.voteUp||H.voteDown)&&(D||L);return(0,e.h)(Li,{ref:M,id:n,dimensions:k,feedOrientation:j,centerAlign:h,leftPosition:x,class:o,role:p},(0,e.h)(Di,{theme:a,class:`card-content ${o||""}`,ref:T,margin:u,minHeight:v,feedOrientation:j,cardWidth:null==f?void 0:f.cardWidth},(0,e.h)(ji,{class:"card-nodes",feedOrientation:j},E===Ai.menu&&(0,e.h)(Fi,{ref:O},(0,e.h)(De,{class:"overflow-action",theme:a,open:b,tabIndex:"0",ariaLabel:"Card overflow menu",id:_,ariaHasPopup:"true",ariaExpanded:b,onClick:e=>{e.target&&e.target.focus(),S(!b)}},(0,e.h)(Ie,null)),(0,e.h)(Fe,{theme:a,ariaLabelledBy:_,open:b,feedOrientation:j,cardRef:T},(0,e.h)(bt,{theme:a},H.voteUp&&(0,e.h)(Ve,{onClick:()=>{l(!0),S(!1)},theme:a,title:(null==d?void 0:d.votingUsefulTitle)||"This is useful",icon:"thumbs-up",className:"vote-up-action"}),H.voteDown&&(0,e.h)(Ve,{onClick:()=>{l(!1),S(!1)},theme:a,title:(null==d?void 0:d.votingNotUsefulTitle)||"This isn't useful",icon:"thumbs-down",className:"vote-down-action"}),P&&(0,e.h)(Pe,{theme:a,className:"card-overflow-divider","aria-hidden":"true"}),L&&(0,e.h)(Ve,{onClick:()=>{s(),S(!1)},theme:a,title:(null==d?void 0:d.cardSnoozeTitle)||"Remind me",icon:"clock",className:"snooze-action"}),D&&(0,e.h)(Ve,{onClick:()=>{i(),S(!1)},theme:a,title:"Dismiss",icon:"bin",className:"dismiss-action"})))),E===Ai.dismiss&&(0,e.h)(Le,{ariaLabel:"Dismiss card",theme:a,tabIndex:"0",onClick:i,className:"dismiss-button"},(0,e.h)(yt,null)),r),(0,e.h)(Qe,{theme:a,animationState:o})),(0,e.h)(et,{theme:a,animationState:o}))}),((e,t)=>0==t.isPreview&&e.animationState===t.animationState&&e.cardInstanceId===t.cardInstanceId&&e.runtimeVariables===t.runtimeVariables&&e.theme===t.theme)),Ei=j("div")((e=>{let{feedOrientation:t,snapScroll:n}=e;const r={position:"relative",display:"flex",flexDirection:"row nowrap",alignItems:"stretch",flexShrink:"0",padding:"10px 10px 10px 0",overflowX:"auto",scrollSnapType:n?"x mandatory":"none"};return Object.assign({},"horizontal"===t?r:{})})),Pi=xe.forwardRef(((t,n)=>{let{cardInstances:r,theme:a,isPreview:o,onDismiss:i,onSnooze:s,onFeedbackSelected:l,removeCard:d,cardStates:u,margin:h,runtimeVariables:p,customStrings:m,votingOptions:g,cardMinimumHeight:v,horizontalContainerConfig:f}=t;const b=c().getState();let y=r;b.application.cardLimit&&(y=y.slice(0,b.application.cardLimit));const w=Ti(f);return(0,e.h)(Ei,{feedOrientation:w,snapScroll:"free"!==(null==f?void 0:f.scrollMode),class:"card-list",ref:n},y.map((t=>{if(t.defaultView){var n;let r=null==p||null===(n=p.values)||void 0===n?void 0:n.get(t.instance.id);r=r||new Map;const c=1===y.length&&"horizontal"===w&&"center"===(null==f?void 0:f.lastCardAlignment);return t.defaultView.nodes=bi(t.defaultView.nodes),(0,e.h)(Hi,{key:t.instance.id,cardInstanceId:t.instance.id,theme:a,isPreview:o,animationState:u[t.instance.id],onDismiss:()=>{i(t.instance.id)},onSnooze:()=>{s(t.instance.id)},onFeedbackSelected:e=>{l(e,t.instance.id)},removeCard:()=>{d(t.instance.id)},runtimeVariables:r,customStrings:m,margin:h,centerAlign:c,accessibilityRole:"listitem",actions:t.actions,votingOptions:g,cardMinimumHeight:v,horizontalContainerConfig:f},t.defaultView.nodes.map((n=>(0,e.h)(hi,{cardInstanceId:t.instance.id,node:n,isWorkflow:!1,theme:a,runtimeVariables:r,feedOrientation:w,embedMode:b.application.embedMode}))))}return null})))})),Ri=j("button")((e=>{let{theme:t}=e;return Object.assign({justifySelf:"end",alignSelf:"center",border:"0px",borderRadius:"999px",width:"40px",height:"40px",display:"flex",flexBasis:"40px",flex:"none",alignItems:"center",justifyContent:"center",cursor:"pointer",backgroundColor:"transparent",":hover":{backgroundColor:"rgba(0, 0, 0, 0.05)",transition:"background-color 0.1s ease"},":active":{backgroundColor:"rgba(0, 0, 0, 0.1)"}},t.getElementFocusCSSProperties())})),Vi={settings:t=>{let{fillColor:n}=t;return(0,e.h)("svg",{fill:n,width:"18",height:"14",viewBox:"0 0 18 14"},(0,e.h)("path",{d:"M17 4C17.5523 4 18 3.55228 18 3C18 2.44772 17.5523 2 17 2V4ZM1 2C0.447715 2 0 2.44772 0 3C0 3.55228 0.447715 4 1 4V2ZM17 12C17.5523 12 18 11.5523 18 11C18 10.4477 17.5523 10 17 10V12ZM1 10C0.447715 10 0 10.4477 0 11C0 11.5523 0.447715 12 1 12V10ZM13 3C13 3.55228 12.5523 4 12 4V6C13.6569 6 15 4.65685 15 3H13ZM12 4C11.4477 4 11 3.55228 11 3H9C9 4.65685 10.3431 6 12 6V4ZM11 3C11 2.44772 11.4477 2 12 2V0C10.3431 0 9 1.34315 9 3H11ZM12 2C12.5523 2 13 2.44772 13 3H15C15 1.34315 13.6569 0 12 0V2ZM14 4H17V2H14V4ZM10 2H1V4H10V2ZM7 11C7 11.5523 6.55228 12 6 12V14C7.65685 14 9 12.6569 9 11H7ZM6 12C5.44772 12 5 11.5523 5 11H3C3 12.6569 4.34315 14 6 14V12ZM5 11C5 10.4477 5.44772 10 6 10V8C4.34315 8 3 9.34315 3 11H5ZM6 10C6.55228 10 7 10.4477 7 11H9C9 9.34315 7.65685 8 6 8V10ZM8 12H17V10H8V12ZM4 10H1V12H4V10Z"}))},arrowLeft:t=>{let{fillColor:n}=t;return(0,e.h)("svg",{stroke:n,width:"14",height:"12",viewBox:"0 0 14 12"},(0,e.h)("path",{d:"M6 11L1 6M1 6L6 1M1 6L13 6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},cross:yt},zi=t=>{let{title:n,iconName:r,onClick:a,theme:o}=t;const i=Vi[r];return(0,e.h)(Ri,{onClick:a,tabIndex:"0",ariaLabel:n,theme:o,className:`button-${r}`},(0,e.h)(i,{fillColor:o.getCSSColor("text.navigationAction")}))},$i=j("div")((e=>{let{theme:t,feedOrientation:n}=e;return Object.assign({padding:"10px 20px 10px 15px",display:"flex",alignItems:"center",backgroundColor:t.getCSSColor("background.navigation"),zIndex:"30",boxShadow:`0 ${t.getShape("offset.navigationShadow")} ${t.getShape("blur.navigationShadow")} ${t.getCSSColor("shadow.navigation")}`},"horizontal"===n?{padding:"10px"}:{})})),Ni=j("h1")((e=>{let{theme:t,feedOrientation:n,alignment:r="left"}=e;const a={paddingLeft:"0",textAlign:r};return Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("navigationTitle")),{alignSelf:"center",paddingLeft:"10px",flexGrow:"1",color:t.getCSSColor("text.navigationTitle")}),"horizontal"===n?a:{})})),Wi=xe.forwardRef(((t,n)=>{let{theme:r,title:a,actionHandler:o,feedOrientation:i,alignment:s}=t;return(0,e.h)($i,{theme:r,feedOrientation:i,ref:n},o&&(0,e.h)(zi,{title:"Back",onClick:o,iconName:"arrowLeft",theme:r}),(0,e.h)(Ni,{theme:r,feedOrientation:i,alignment:s},a))})),Bi=t=>{let{theme:n,title:r,actionHandler:a}=t;return(0,e.h)($i,{theme:n},(0,e.h)(Ni,{theme:n},r),a&&(0,e.h)(zi,{title:"Close",onClick:a,iconName:"cross",theme:n}))},qi="action-cards-sdk-toast-wrapper",Yi=j("div")((e=>{let{theme:t,hasRetry:n,feedOrientation:r}=e;const a={maxWidth:"380px",flexGrow:"1"};return Object.assign(Object.assign(Object.assign({},t.getElementFocusCSSProperties()),{margin:"10px",background:t.getCSSColor("background.toast"),padding:"20px",border:"0px",borderRadius:"10px",display:"flex",flexDirection:"row",pointerEvents:"auto",cursor:!n&&"pointer",transform:"translateY(100%) translateY(50px)",transition:"300ms transform ease-in-out 300ms",".visible":{transform:"translateY(0)"}}),"horizontal"===r?a:{})})),Ui=j("div")((e=>{let{feedOrientation:t}=e;return Object.assign({position:"absolute",bottom:"0",left:"0",right:"0",overflow:"hidden",pointerEvents:"none",zIndex:"11"},"horizontal"===t?{display:"flex",justifyContent:"center"}:{})})),Zi=j("p")((e=>{let{theme:t}=e;return Object.assign({flexGrow:"1",margin:"0",userSelect:"none",webkitUserSelect:"none",color:t.getCSSColor("text.toast")},t.getCSSFontProperties("toast"))})),Ki=j("span")((e=>{let{theme:t,hasRetry:n}=e;return Object.assign(Object.assign(Object.assign(Object.assign({border:"0px"},t.getElementFocusCSSProperties()),{color:t.getCSSColor("text.toastAction")}),t.getCSSFontProperties("toastAction")),{cursor:n&&"pointer",background:"transparent",padding:"0",userSelect:"none",webkitUserSelect:"none",display:"flex",alignItems:"center"})})),Gi=(e,t)=>new Promise((n=>{t(setTimeout((()=>{n()}),e))})),Xi=t=>{var n;let{theme:r,feedOrientation:a,message:o,actionTitle:i,actionHandler:s,onDismiss:l,delay:d=0}=t;const[u,h]=N(!1),[p,m]=N(""),[g,v]=N(null),[f,b]=N(""),y=null==o?void 0:o.messageId,w="Try again"===i,S=(null===(n=c().getState().application.enabledUiElements.toastConfig)||void 0===n?void 0:n.timeout)||2e3;B((()=>{null!=(null==o?void 0:o.messageId)&&p!=o.messageId&&(m(o.messageId),o.text&&b(o.text),null!=g&&(clearTimeout(g),v(null)),Gi(d,v).then((()=>(h(!0),Gi(S+600,v)))).then((()=>(h(!1),Gi(600,v)))).then((()=>{l&&(l(),b(""))})))}),[y]);const k=()=>{h(!1),s?s():b("")},C=e=>{const t=e.keyCode;13!==t&&32!==t||k()};return(0,e.h)(Ui,{id:qi,class:"floating",feedOrientation:a},void 0!==o&&(0,e.h)(Yi,{id:"toast-body",theme:r,feedOrientation:a,hasRetry:w,onClick:w?void 0:k,onKeyUp:w?void 0:C,tabIndex:u&&!w?0:-1,class:u?"visible":"",role:u?"alert":void 0},(0,e.h)(Zi,{theme:r,class:"toast-message"},f||""),w&&(0,e.h)(Ki,{theme:r,class:"toast-action",hasRetry:w,onClick:w?k:void 0,onKeyUp:w?C:void 0,tabIndex:u&&w?0:-1},i)))},Ji=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"79",height:"53",viewBox:"0 0 79 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M20.0172 47.9056C20.0172 49.5625 21.3604 50.9056 23.0172 50.9056H73.0172C74.6741 50.9056 76.0172 49.5625 76.0172 47.9056V17.9056C76.0172 16.2488 74.6741 14.9056 73.0172 14.9056V12.9056C75.7786 12.9056 78.0172 15.1442 78.0172 17.9056V47.9056C78.0172 50.667 75.7786 52.9056 73.0172 52.9056H23.0172C20.2558 52.9056 18.0172 50.667 18.0172 47.9056H20.0172Z",fill:n}),(0,e.h)("path",{d:"M68.0172 9.90561H59.5V7.90561H68.0172C70.7786 7.90561 73.0172 10.1442 73.0172 12.9056V42.9056C73.0172 45.667 70.7786 47.9056 68.0172 47.9056H18.0172V45.9056H68.0172C69.6741 45.9056 71.0172 44.5625 71.0172 42.9056V12.9056C71.0172 11.2488 69.6741 9.90561 68.0172 9.90561Z",fill:n}),(0,e.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M54.5117 2.83786L5.27133 11.5203C3.63965 11.808 2.55015 13.3639 2.83786 14.9956L8.0473 44.5399C8.33501 46.1715 9.89098 47.2611 11.5227 46.9733L60.7631 38.2909C62.3947 38.0032 63.4842 36.4472 63.1965 34.8156L57.9871 5.27133C57.6994 3.63965 56.1434 2.55015 54.5117 2.83786ZM4.92404 9.55065C2.20457 10.0302 0.388724 12.6235 0.86824 15.3429L6.07769 44.8872C6.5572 47.6066 9.15049 49.4225 11.87 48.943L61.1104 40.2605C63.8298 39.781 65.6457 37.1877 65.1662 34.4683L59.9567 4.92404C59.4772 2.20457 56.8839 0.388724 54.1644 0.86824L4.92404 9.55065Z",fill:n}),(0,e.h)("path",{d:"M28.2341 24.1607C27.7817 23.8439 27.1582 23.9539 26.8414 24.4063C26.5246 24.8587 26.6346 25.4822 27.087 25.799L28.2341 24.1607ZM32.2944 28.2245L31.7208 29.0436C32.1732 29.3604 32.7967 29.2505 33.1135 28.7981L32.2944 28.2245ZM39.6028 19.5304C39.9196 19.078 39.8096 18.4545 39.3572 18.1377C38.9048 17.8209 38.2813 17.9309 37.9645 18.3833L39.6028 19.5304ZM27.087 25.799L31.7208 29.0436L32.8679 27.4053L28.2341 24.1607L27.087 25.799ZM33.1135 28.7981L39.6028 19.5304L37.9645 18.3833L31.4752 27.6509L33.1135 28.7981Z",fill:n}))},Qi=t=>{let{fillColor:n}=t;return(0,e.h)("svg",{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,e.h)("path",{d:"M40 21C40 31.4934 31.4934 40 21 40V42C32.598 42 42 32.598 42 21H40ZM21 40C10.5066 40 2 31.4934 2 21H0C0 32.598 9.40202 42 21 42V40ZM2 21C2 10.5066 10.5066 2 21 2V0C9.40202 0 0 9.40202 0 21H2ZM21 2C31.4934 2 40 10.5066 40 21H42C42 9.40202 32.598 0 21 0V2Z",fill:n}),(0,e.h)("path",{d:"M16.7071 20.2929C16.3166 19.9024 15.6834 19.9024 15.2929 20.2929C14.9024 20.6834 14.9024 21.3166 15.2929 21.7071L16.7071 20.2929ZM20 25L19.2929 25.7071C19.6834 26.0976 20.3166 26.0976 20.7071 25.7071L20 25ZM28.7071 17.7071C29.0976 17.3166 29.0976 16.6834 28.7071 16.2929C28.3166 15.9024 27.6834 15.9024 27.2929 16.2929L28.7071 17.7071ZM15.2929 21.7071L19.2929 25.7071L20.7071 24.2929L16.7071 20.2929L15.2929 21.7071ZM20.7071 25.7071L28.7071 17.7071L27.2929 16.2929L19.2929 24.2929L20.7071 25.7071Z",fill:n}))},es=j("div")((()=>({width:"100%",display:"flex",flexFlow:"column wrap",alignItems:"center",justifyContent:"center",minHeight:"250px"}))),ts=j("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({padding:"20px 20px 0 20px",color:t.getCSSColor("text.listEmptyState")},t.getCSSFontProperties("listEmptyState")),{textAlign:"center",width:"100%"})})),ns=t=>{let{hasSeenTutorial:n,tutorialMessage:r,emptyMessage:a,theme:o}=t;return(0,e.h)(es,null,n?(0,e.h)(e.Fragment,null,(0,e.h)(Qi,{fillColor:o.getCSSColor("icon.listEmptyState")}),(0,e.h)(ts,{theme:o},a||"All caught up")):(0,e.h)(e.Fragment,null,(0,e.h)(Ji,{fillColor:o.getCSSColor("icon.listEmptyState")}),(0,e.h)(ts,{theme:o},r||"Cards will appear here when there’s something to action.")))},rs=t=>{let{title:n,textColor:r,buttonColor:a,theme:o,onRetry:i,tryAgainTitle:s}=t;return(0,e.h)(e.Fragment,null,(0,e.h)(os,{textColor:r,theme:o},n),(0,e.h)(is,{textColor:a,theme:o,onClick:i},null!=s?s:"Try again"))},as=j("div")((e=>{let{background:t,embedMode:n}=e;return{display:"flex",width:"100%",height:"launcher"===n?"350px":"100%",minHeight:"250px",alignItems:"center",justifyContent:"center",flexFlow:"column nowrap",background:t,font:`16px ${Vn}`}})),os=j("p")((e=>{let{textColor:t,theme:n}=e;return Object.assign(Object.assign({color:(null==n?void 0:n.getCSSColor("text.errorOverlayTitle"))||t},(null==n?void 0:n.getCSSFontProperties("errorOverlayTitle"))||{}),{textAlign:"center"})})),is=j("button")((e=>{let{textColor:t,theme:n}=e;return Object.assign({color:(null==n?void 0:n.getCSSColor("text.errorOverlayAction"))||t,font:`16px ${Vn}`,background:"transparent",border:"0",outline:"none",fontWeight:"bold",cursor:"pointer"},(null==n?void 0:n.getCSSFontProperties("errorOverlayAction"))||{})})),ss=t=>{let{embedMode:n,state:r,onRetry:a,loadingIconColor:o,textColor:i,buttonColor:s,backgroundColor:l,theme:c,noInternetConnectionMessage:d,dataLoadFailedMessage:u,tryAgainTitle:h}=t;return"single-card"===n||"preview"===n||"modal-subview"===n?null:(0,e.h)(as,{background:l,className:"loading-wrapper",embedMode:n},!r&&(0,e.h)(Zn,{stopColor:(null==c?void 0:c.getCSSColor("icon.loadingSpinner"))||o||"#000000",size:32}),"apiError"===r&&(0,e.h)(rs,{title:null!=u?u:"Couldn't load data",textColor:i,buttonColor:s,theme:c,onRetry:a,tryAgainTitle:h}),"noInternet"===r&&(0,e.h)(rs,{title:null!=d?d:"No internet connection",textColor:i,buttonColor:s,theme:c,onRetry:a,tryAgainTitle:h}))};var ls=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const cs="action-cards-sdk-overflow-container",ds=j("div")((e=>{let{theme:t,rendersBackground:n}=e;return{display:"flex",flexDirection:"column",height:"100%",backgroundColor:n?t.getCSSColor("background.default"):"transparent"}})),us=j("div")((e=>{let{embedMode:t}=e;return{width:"100%",position:"absolute",top:"0px",left:"0px",zIndex:"2",overflow:"hidden",borderRadius:"launcher"===t?"20px 20px 0 0":"0"}})),hs=j("div")((e=>{let{scrollPosition:t,scrollbarWidth:n,headerOffset:r}=e;return{width:"100%",marginTop:`${r}px`,paddingRight:`${n}px`,transform:`translateY(-${t}px)`}})),ps=j("div")((e=>{let{embedMode:t,feedOrientation:n,headerPadding:r}=e;return Object.assign(Object.assign(Object.assign({padding:"single-card"===t?"0px":"10px 10px 0 10px"},r?{paddingTop:`${r+10}px`}:{}),{overflowX:"hidden",overflowY:"auto",maxHeight:"100%",height:"standalone"===t?"100%":"auto",position:"relative"}),"horizontal"===n?{padding:"0",overflowY:"auto"}:{})})),ms=j("div")((e=>{let{embedMode:t,feedOrientation:n,horizontalOffset:r}=e;const a={position:"relative",bottom:r&&`${r}px`};return Object.assign({height:"standalone"===t?"100%":"350px",display:"flex",flexFlow:"row wrap",justifyItems:"center",alignItems:"center"},"horizontal"===n?a:{})})),gs={scrollTop:0,lastScrollTimeout:null,lastCardIds:[]},vs=e=>{const t=e.messages.cardList,n=e.cardFeed.cardInstances,r=e.cardStates,{enabled:a,emptyStyle:o}=e.cardFeed.horizontalContainerConfig||{};return t&&1===n.length&&a&&"shrink"===o?0:t&&["submitted-subview"].includes(r[t.cardInstanceId]||"")?1100:800},fs=t=>{let{theme:n,onRetry:r}=t;const a=Y(null),o=Y(null),i=Y(null),s=Y(null),l=Y(null),[c,h]=N(0),[p,m]=N(0),g=K(br),v=g.analyticsDispatcher,f=g.cardEventDispatcher,b=g.authTokenProvider;return B((()=>(l.current=new IntersectionObserver(((e,t)=>{const n=(()=>{const e=sessionStorage.getItem(We),t=e?JSON.parse(e):void 0;return new Set(t)})();let r=[];e.forEach((e=>{if(e.isIntersecting){const t=e.target.id;n.add(t),gs.lastCardIds.includes(t)||r.push(t)}})),r.forEach((e=>{v.sendEvent({cardInstanceId:e,cardViewState:"topview",eventName:yr})}));const a=JSON.stringify(Array.from(n));sessionStorage.setItem(We,a),gs.lastCardIds=r}),{root:null,rootMargin:"0px",threshold:0}),()=>{var e;null===(e=l.current)||void 0===e||e.disconnect()})),[]),(0,e.h)(d.lj,{actions:(0,u.Y2)(qt,St,Fn)},(t=>{var d,u,g,y,w,S,k,C,x,I;const O="preview"===t.application.embedMode,T="single-card"===t.application.embedMode,M="single-card"!==t.application.embedMode,_=t.application.enabledUiElements,j=t.cardFeed.horizontalContainerConfig,D=!("standalone"===t.application.embedMode&&(null==j?void 0:j.enabled)&&"shrink"===(null==j?void 0:j.emptyStyle)),L=Ti(j),F=t.cardFeed.cardInstances.length,A="horizontal"===L&&_.cardListHeader&&"left"===(null==j?void 0:j.headerAlignment)&&(null!==(d=null===(u=o.current)||void 0===u||null===(g=u.base)||void 0===g?void 0:g.scrollHeight)&&void 0!==d?d:0)/2,H=()=>{if(s.current&&s.current.base&&l.current){var e;(null===(e=s.current)||void 0===e?void 0:e.base.childNodes).forEach((e=>{var t;null===(t=l.current)||void 0===t||t.observe(e)}))}};return B((()=>{t.application.open&&H()}),[t.cardFeed.updateId]),B((()=>{t.application.open&&(gs.lastCardIds=[],H(),v.sendEvent({cardViewState:"topview",eventName:xr,properties:{displayMode:T?"single":"stream"}}))}),[t.application.open]),B((()=>{var e,t;m(null==o||null===(e=o.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.scrollHeight)}),[o]),B((()=>{const e=window.frameElement,r=n.getCSSColor("background.default");D||(e.style.backgroundColor=r);const a=()=>{"visible"===document.visibilityState&&t.application.open&&H()};return window.addEventListener("visibilitychange",a),()=>{window.removeEventListener("visibilitychange",a)}}),[]),B((()=>{gs.lastCardIds=[];let e=e=>{let t=!1;t||(window.requestAnimationFrame((()=>{var n;const r=e.target;!1!==(null===(n=_.customContainerHeader)||void 0===n?void 0:n.scrollHeader)&&h(r.scrollTop),t=!1})),t=!0),gs.scrollTop=e.target.scrollTop};return a.current&&a.current.base&&(a.current.base.scrollTop=gs.scrollTop,a.current.base.addEventListener("scroll",e)),()=>{a.current&&a.current.base&&(gs.scrollTop=a.current.base.scrollTop,a.current.base.removeEventListener("scroll",e))}}),[]),(0,e.h)(ds,{theme:n,id:cs,rendersBackground:M},M&&_.cardListHeader&&(0,e.h)(Wi,{title:t.application.customStrings.cardListTitle||"Cards",theme:n,feedOrientation:L,ref:o,alignment:null==j?void 0:j.headerAlignment}),_.customContainerHeader&&("standalone"===t.application.embedMode||"launcher"===t.application.embedMode)&&(0,e.h)(us,{embedMode:t.application.embedMode},(0,e.h)(hs,{ref:i,headerOffset:p,scrollbarWidth:(null==a||null===(y=a.current)||void 0===y||null===(w=y.base)||void 0===w?void 0:w.offsetWidth)-(null==a||null===(S=a.current)||void 0===S||null===(k=S.base)||void 0===k?void 0:k.clientWidth),scrollPosition:c,dangerouslySetInnerHTML:{__html:null===(C=document.getElementById("custom-container-header"))||void 0===C?void 0:C.innerHTML}})),(0,e.h)(ps,{embedMode:t.application.embedMode,feedOrientation:L,headerPadding:null==i||null===(x=i.current)||void 0===x||null===(I=x.base)||void 0===I?void 0:I.scrollHeight,ref:a,cardCount:F,id:"action-cards-sdk-card-container",class:"card-container",role:"list"},!t.cardFeed.status.loaded&&(0,e.h)(ss,{embedMode:t.application.embedMode,state:t.cardFeed.status.errorState,backgroundColor:"transparent",theme:n,onRetry:r,noInternetConnectionMessage:t.application.customStrings.noInternetConnectionMessage,dataLoadFailedMessage:t.application.customStrings.dataLoadFailedMessage,tryAgainTitle:t.application.customStrings.tryAgainTitle}),t.cardFeed.status.loaded&&F>0&&(0,e.h)(Pi,{cardInstances:t.cardFeed.cardInstances,theme:n,isPreview:O,onDismiss:e=>ls(void 0,void 0,void 0,(function*(){Lr(t,t,e,f,b,"overflow-menu")})),onSnooze:e=>{t.requestSnooze(e,"overflow-menu")},onFeedbackSelected:(e,n)=>{e?Hr(n,t,v,f,"overflow-menu"):t.requestFeedback(n,"overflow-menu")},removeCard:e=>{t.removeCard(e)},cardStates:t.cardStates,margin:T?0:10,runtimeVariables:t.cardFeed.runtimeVariables,customStrings:t.application.customStrings,votingOptions:t.cardFeed.cardVoting,cardMinimumHeight:t.cardFeed.cardMinimumHeight,horizontalContainerConfig:j,ref:s}),t.cardFeed.status.loaded&&0===F&&!T&&D&&(0,e.h)(ms,{embedMode:t.application.embedMode,feedOrientation:L,horizontalOffset:A,class:"empty-state-wrapper"},(0,e.h)(ns,{theme:n,hasSeenTutorial:t.cardFeed.tutorialSeen,tutorialMessage:t.application.customStrings.awaitingFirstCard,emptyMessage:t.application.customStrings.allCardsCompleted}))),!t.application.isPreview&&!T&&!0===_.cardListToast&&!_.customToastContainer&&(0,e.h)(Xi,{theme:n,feedOrientation:L,message:t.messages.cardList,delay:vs(t),actionTitle:t.messages.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(t.messages.cardList.action)?"Try again":"Dismiss",actionHandler:()=>ls(void 0,void 0,void 0,(function*(){var e,n,r,a,o,i,s,l,c,d;const u=null===(e=t.messages.cardList)||void 0===e?void 0:e.cardInstanceId,h=null===(n=t.messages.cardList)||void 0===n?void 0:n.action;if(u&&h)switch(h){case"submit-failed":Fr(t,t,u,!1,f,b,(null===(r=t.messages.cardList)||void 0===r?void 0:r.responseValues)||{},{payload:null===(a=t.messages.cardList)||void 0===a?void 0:a.payload,postSubmissionUrl:null===(o=t.messages.cardList)||void 0===o?void 0:o.postSubmissionUrl,subviewData:null===(i=t.messages.cardList)||void 0===i?void 0:i.subviewData,submitButtonName:null===(s=t.messages.cardList)||void 0===s?void 0:s.submitButtonName});break;case"dismiss-failed":const e=null===(l=t.messages.cardList)||void 0===l?void 0:l.source;e&&Lr(t,t,u,f,b,e);break;case"snooze-failed":const n=null===(c=t.messages.cardList)||void 0===c?void 0:c.snoozeDate,h=null===(d=t.messages.cardList)||void 0===d?void 0:d.source;n&&h&&Ar(t,t,u,n,f,b,h)}})),onDismiss:()=>{t.clearMessage("cardList")}}))}))},bs=j("div")((e=>{let{yOffset:t}=e;return{position:"absolute",top:`${t}px`,left:"0",right:"0",zIndex:"20",overflow:"hidden"}})),ys=j("div")((e=>{let{theme:t}=e;return{background:t.getCSSColor("background.banner"),padding:"12px",transform:"translateY(-100%)",transition:"transform 300ms ease-in-out",".visible":{transform:"translateY(0)"}}})),ws=j("p")((e=>{let{theme:t}=e;return Object.assign(Object.assign({flexGrow:"1",margin:"0",color:t.getCSSColor("text.banner")},t.getCSSFontProperties("banner")),{textAlign:"center",overflow:"hidden"})})),Ss=t=>{let{theme:n,message:r,yOffset:a,onDismiss:o}=t;const[i,s]=N(null),[l,c]=N(null),[d,u]=N(!1);return B((()=>{null!=r&&null!=r.text?(null!=l&&(clearTimeout(l),c(null)),null!=i&&(clearTimeout(i),s(null)),u(!0),c(setTimeout((()=>{u(!1),c(null),s(setTimeout((()=>{o&&o(),s(null)}),300))}),3300))):u(!1)}),[r]),(0,e.h)(bs,{theme:n,yOffset:a},(0,e.h)(ys,{theme:n,class:d?"visible":""},(0,e.h)(ws,{theme:n},r?r.text:"")))},ks=j("div")((e=>{let{theme:t,isPreview:n}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:n?"relative":"static"}})),Cs=j("div")((e=>{let{theme:t,isPreview:n}=e;return{background:t.getCSSColor("background.default"),position:"relative",bottom:n?"auto":"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"visible",padding:"0 20px",boxSizing:"border-box",display:"flex",flex:"1"}})),xs=j("div")({paddingTop:"10px"}),Is=t=>{let{theme:n}=t;const r=K(br).analyticsDispatcher;return(0,e.h)(d.lj,{actions:(0,u.Y2)(St,Fn),mapToProps:e=>{const t=Mt(e);return{subview:t&&_t(t)?t:null,isPreview:e.application.isPreview||!1,embedMode:e.application.embedMode,runtimeVariables:e.cardFeed.runtimeVariables,bannerMessage:e.messages.subview}}},(t=>{if(null===t.subview)return null;const{cardInstance:a,subviewId:o}=t.subview;if(a&&o){const s=a.subviews[o],{id:l}=a.instance,c="modal-subview"===t.embedMode?Bi:Wi;if(s){var i;let a=null===(i=t.runtimeVariables.values)||void 0===i?void 0:i.get(l);return a=a||new Map,B((()=>{r.sendEvent({cardInstanceId:l,cardViewState:"subview",eventName:Tr,properties:{subviewId:o,subviewTitle:ki(s.title,a),subviewLevel:1}})}),[o]),s.nodes=bi(s.nodes),(0,e.h)(e.Fragment,null,(0,e.h)(ks,{theme:n,id:cs,isPreview:t.isPreview},(0,e.h)(c,{title:ki(s.title,a),theme:n,actionHandler:()=>{t.navigateBack(),r.sendEvent({cardInstanceId:l,cardViewState:"subview",eventName:Mr,properties:{subviewId:o,subviewTitle:ki(s.title,a),subviewLevel:1}})}}),(0,e.h)(Cs,{theme:n,isPreview:t.isPreview,class:"use-offset",id:"action-cards-subview-container"},(0,e.h)(xs,{class:"offset-child"},s.nodes.map((r=>(0,e.h)(hi,{cardInstanceId:l,node:r,isWorkflow:!0,theme:n,runtimeVariables:a,subviewId:o,subviewTitle:ki(s.title,a),embedMode:t.embedMode})))))),!t.isPreview&&(0,e.h)(Ss,{theme:n,message:t.bannerMessage,yOffset:60,onDismiss:()=>{t.clearMessage("subview")}}))}}return null}))},Os=j("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column"}})),Ts=j("div")({width:"100%",height:"100%",maxWidth:"100%",minHeight:"420px",overflow:"auto",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),Ms=j("div")((e=>{let{autoSizes:t}=e;return{overflow:"auto",flexGrow:t?"0":"1",height:t?"auto":"100%",display:"flex",flexDirection:"column",width:"100%"}})),_s=j("div")((e=>{let{imageLoaded:t,theme:n}=e;return{width:"100%",height:"100%",backgroundColor:t?"":n.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",flexGrow:"1"}})),js=j("video")({maxWidth:"100%"}),Ds=j("img")({maxWidth:"100%",flexShrink:"0"});class Ls extends ma{render(){const{theme:t,src:n,label:r,alt:a}=this.props,{imageLoaded:o}=this.state;return(0,e.h)(e.Fragment,null,!o&&(0,e.h)(_s,{imageLoaded:o,theme:t},(0,e.h)(Xn,{fillColor:t.getCSSColor("icon.mediaBanner")})),o&&(0,e.h)(Ds,{src:n,alt:a||r}))}}const Fs=t=>{var n,r;let{src:a,alt:o,cardInstanceId:i}=t;const s=Y(null),l=K(br).analyticsDispatcher,c="string"==typeof a&&null!==(n=null===(r=a.match(/[^\/]*$/))||void 0===r?void 0:r[0])&&void 0!==n?n:"";return B((()=>{var e,t,n,r;const o=()=>{l.sendEvent({eventName:_r,cardInstanceId:i,cardViewState:"subview",properties:{media:c,mediaURL:a}})},d=()=>{l.sendEvent({eventName:jr,cardInstanceId:i,cardViewState:"subview",properties:{media:c,mediaURL:a}})};return null===(e=s.current)||void 0===e||null===(t=e.base)||void 0===t||t.addEventListener("play",o),null===(n=s.current)||void 0===n||null===(r=n.base)||void 0===r||r.addEventListener("ended",d),()=>{var e,t,n,r;null===(e=s.current)||void 0===e||null===(t=e.removeEventListener)||void 0===t||t.call(e,"play",o),null===(n=s.current)||void 0===n||null===(r=n.removeEventListener)||void 0===r||r.call(n,"ended",d)}}),[]),(0,e.h)(js,{ref:s,src:a,alt:o||"video",autoplay:!0,controls:!0})},As=t=>{let{theme:n}=t;return(0,e.h)(d.lj,{actions:St,mapToProps:e=>{const t=Mt(e);return{embedMode:e.application.embedMode,cardInstanceId:null==t?void 0:t.cardInstanceId,currentMediaItem:t&&Lt(t)?t.item:void 0}}},(t=>{const r=t.currentMediaItem;if(!r)return null;const a="modal-subview"===t.embedMode?Bi:Wi,o="launcher"===t.embedMode;return(0,e.h)(Os,{theme:n,id:cs},(0,e.h)(a,{title:`View ${r.type}`,theme:n,actionHandler:t.navigateBack}),(0,e.h)(Ms,{autoSizes:o},(0,e.h)(Ts,{theme:n},"image"==r.type&&(0,e.h)(Ls,{mediaType:r.type,src:r.url,label:r.title,alt:r.alt,theme:n}),"video"==r.type&&(0,e.h)(Fs,{src:r.url,alt:r.alt,cardInstanceId:t.cardInstanceId}))))}))},Hs=(0,wt.startOfDay)(new Date),Es=[...Array(96).keys()].map((e=>({title:(0,wt.format)((0,wt.addMinutes)(Hs,15*e),"h:mm A"),value:""+15*e}))),Ps=t=>{let{cardInstanceId:n,attributes:{format:r,name:a,label:o,defaultValue:i},validations:s,theme:l,isWorkflow:c,variableResolver:d,onValueChanged:u}=t;const h=new Date(i);return(0,e.h)(bo,{attributes:{name:a,label:o,format:r,values:Es,defaultValue:Rs(h)},cardInstanceId:n,variableResolver:d,theme:l,validations:s,isWorkflow:c,onValueChanged:u})},Rs=e=>15*Math.ceil(((0,wt.differenceInMinutes)(e,(0,wt.startOfDay)(e))+5)/15),Vs=j("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"}})),zs=j("div")((()=>({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0 20px"}))),$s=j("div")({overflow:"auto",paddingTop:"10px","> button":{marginBottom:"20px"}}),Ns=t=>{let{theme:n}=t;const r=K(br),a=r.analyticsDispatcher,o=r.cardEventDispatcher,i=r.authTokenProvider,[s,l]=N(void 0),[h,p]=N(0),m=new Date;return(0,e.h)(d.lj,{actions:(0,u.Y2)(St,Fn),mapToProps:e=>{const t=Mt(e);return{snoozeCardInstanceId:t&&jt(t)?t.cardInstanceId:void 0,screenTitle:e.application.customStrings.cardSnoozeTitle||"Remind me",embedMode:e.application.embedMode,source:t&&jt(t)?t.source:void 0}}},(t=>{const[r,d]=N(m),[u,g]=N(0),v=t.snoozeCardInstanceId,f=t.source;if(!v||!f)return null;const b=t.screenTitle,y="modal-subview"===t.embedMode?Bi:Wi;return B((()=>{a.sendEvent({eventName:Ir,cardInstanceId:v,cardViewState:"subview"})}),[]),(0,e.h)(Vs,{theme:n,id:cs},(0,e.h)(y,{title:b,theme:n,actionHandler:()=>{a.sendEvent({eventName:Or,cardInstanceId:v,cardViewState:"subview"}),t.navigateBack()}}),(0,e.h)(zs,{class:"use-offset"},(0,e.h)($s,{class:"offset-child"},(0,e.h)(oi,{cardInstanceId:v,attributes:{name:"snoozeDate",label:"Date",defaultValue:Vt()(m,"YYYY-MM-DD[T]00:00:00.000[Z]"),format:"inline"},isWorkflow:!0,theme:n,variableResolver:e=>e||"",onValueChanged:e=>{d(new Date(e))}}),(0,e.h)(Ps,{attributes:{name:"snoozeTime",label:"Time",defaultValue:m.toISOString(),format:"inline"},isWorkflow:!0,cardInstanceId:v,theme:n,variableResolver:e=>e||"",onValueChanged:e=>{g(Number.parseInt(e))}}),(0,e.h)(Nr,{isWorkflow:!0,clickHandler:()=>()=>{const e=Ws(r,u);if((0,wt.isPast)(e)){const e=h+1;p(e),l({text:"Date must be in the future",messageId:`${e}`,cardInstanceId:v,action:"other"})}else t.navigateBack(),Ar(c().getState(),t,v,e,o,i,f)},text:"Done",theme:n,appearance:"primary"}))),(0,e.h)(Xi,{theme:n,message:s,actionTitle:"Dismiss",onDismiss:()=>{}}))}))},Ws=(e,t)=>(0,wt.addMinutes)((0,wt.startOfDay)(e),t),Bs=()=>({updateTotalCardCount:(e,t,n)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:null!=n?n:e.cardFeed.lastModified,metadata:Object.assign(Object.assign({},e.cardFeed.metadata),{totalCards:t})})}),setStreamFilter:(e,t)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{streamFilter:t})}),finishExternalAction(e,t){var n;return Object.assign(Object.assign({},e),{externalAction:(null===(n=e.externalAction)||void 0===n?void 0:n.actionId)===t?void 0:e.externalAction})}}),qs=(e,t,n)=>({getTheme:r=>new Nn(e,r,t,n)});var Ys=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Us="theme_cache",Zs=()=>new Promise(((e,t)=>{const n=window.parent.indexedDB.open("AtomicSDK",1);n.onerror=e=>{t(e)},n.onsuccess=()=>{e(n.result)},n.onupgradeneeded=()=>{const r=n.result;n.transaction&&(n.transaction.oncomplete=()=>{e(n.result)},n.transaction.onerror=e=>{t(e)},n.transaction.onabort=e=>{t(e)});r.createObjectStore(Us).createIndex("stream_container_id","stream_container_id",{unique:!0})}}));var Ks=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const Gs=(e,t)=>Ks(void 0,void 0,void 0,(function*(){const n=`theme/${e}`,{data:r,response:a}=yield wn.get(n,void 0,t,{streamContainerId:e});if(200===a.status){if(r&&r.theme){try{yield((e,t,n)=>Ys(void 0,void 0,void 0,(function*(){const r=yield Zs();return new Promise(((a,o)=>{const i=r.transaction(Us,"readwrite").objectStore(Us).put({themePayload:t,eTag:n},e);i.onsuccess=()=>{r.close();const t=i.result;a({streamContainerId:e,themePayload:t.themePayload,eTag:t.eTag})},i.onerror=e=>{r.close(),o(e)}}))})))(e,r,a.etag||"")}catch(e){console.warn("Failed to update cached theme.",e)}return{theme:r||{}}}return{error:new Error("Invalid theme returned. Missing `theme` key in payload.")}}return{error:a.error}})),Xs=e=>Ks(void 0,void 0,void 0,(function*(){try{const t=yield(e=>Ys(void 0,void 0,void 0,(function*(){const t=yield Zs();return new Promise(((n,r)=>{const a=t.transaction(Us,"readonly").objectStore(Us).get(e);a.onsuccess=()=>{t.close(),n(a.result)},a.onerror=e=>{t.close(),r(e)}}))})))(e);return t&&t.themePayload&&t.themePayload.theme?{theme:t.themePayload,eTag:t.eTag}:null}catch(e){return console.warn("Failed to fetch cached theme.",e),null}}));class Js extends e.Component{componentDidCatch(e){this.props.onError?this.props.onError(e):console.error(e)}render(){return this.props.children}}const Qs=t=>{let{fontFamilies:n}=t;return(0,e.h)("style",{dangerouslySetInnerHTML:{__html:n.map((e=>tl(e))).join("\n")}})},el={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"},tl=e=>{let{fontFamily:t,weight:n,style:r,src:a}=e;if(a&&0===a.split(".").length)throw new Error("Invalid file url provided for font.");const o=a?new URL(a).pathname:null;if(!o)return"";const i=o.split("."),s=i[i.length-1],l=el[s];if(!l)return"";if(!t)return"";return`\n @font-face {\n font-family: "${t}";\n ${(a?`src: url('${a}') format('${l}');`:"")||""}\n font-weight: ${n||"normal"};\n font-style: ${r||"normal"};\n font-display: swap;\n }\n `},nl=j("div")((e=>{let{theme:t}=e;return Object.assign({padding:"10px 20px",display:"flex",width:"100%",alignItems:"center",border:"0px"},t.getElementFocusCSSProperties())})),rl=j("p")((e=>{let{theme:t}=e;return Object.assign({padding:"0 10px 0 0",margin:"0",flexGrow:"1",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:t.getCSSColor("text.primary")},t.getCSSFontProperties("primary"))})),al=j("div")((e=>{let{checked:t,theme:n}=e;return{width:"22px",height:"22px",border:t?`7px solid ${n.getCSSColor("icon.selectionIndicatorActive")}`:`1px solid ${n.getCSSColor("icon.selectionIndicator")}`,flexShrink:"0",borderRadius:"100%"}})),ol=t=>{let{title:n,value:r,checked:a,onValueSelected:o,theme:i}=t;return(0,e.h)(nl,{onClick:()=>{o(r)},role:"radio","aria-checked":a,theme:i,tabIndex:"-1"},(0,e.h)(rl,{theme:i},n),(0,e.h)(al,{checked:a,theme:i}))},il=j("div")((e=>{let{}=e;return{display:"flex",flexFlow:"column wrap",width:"100%"}})),sl=j("div")((e=>{let{}=e;return{display:"none"}})),ll=t=>{let{attributes:{items:n,title:r,name:a},theme:o,onValueChanged:i}=t;const[s,l]=N(null),c=`radio-group-${a}`;return(0,e.h)(Kr,{mode:"inline",theme:o,hPadding:0},(0,e.h)(sl,{id:c},r),(0,e.h)(il,{role:"radiogroup","aria-labelledby":c},(0,e.h)(bt,{theme:o},n.map((t=>(0,e.h)(ol,{title:t.title,value:t.value,theme:o,checked:s===t.value,onValueSelected:e=>{l(e),i&&i(e)}}))))))},cl=j("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"}})),dl=j("div")((()=>({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0 20px"}))),ul=j("div")({overflow:"auto",paddingTop:"10px","> button":{marginBottom:"20px"}}),hl=t=>{let{theme:n}=t;const r=K(br),a=r.analyticsDispatcher,o=r.cardEventDispatcher,i=Y(),[s,l]=N(null),[c,h]=N(null);return(0,e.h)(d.lj,{actions:(0,u.Y2)(St,Fn),mapToProps:e=>{const t=Mt(e);return{embedMode:e.application.embedMode,screenTitle:e.application.customStrings.votingFeedbackTitle||"Send feedback",feedbackCardInstanceId:t&&Dt(t)?t.cardInstanceId:void 0,feedbackSource:t&&Dt(t)?t.source:void 0}}},(t=>{const r="modal-subview"===t.embedMode?Bi:Wi,d=t.screenTitle,u=t.feedbackCardInstanceId,p=t.feedbackSource;return u&&p?(0,e.h)(cl,{theme:n,id:cs},(0,e.h)(r,{title:d,theme:n,actionHandler:()=>{t.navigateBack()}}),(0,e.h)(dl,{class:"use-offset"},(0,e.h)(ul,{class:"offset-child"},(0,e.h)(ll,{attributes:{title:d,name:"feedback-reason",items:[{title:"It's not relevant",value:"not-relevant"},{title:"I see this too often",value:"too-often"},{title:"Something else",value:"other"}]},isWorkflow:!0,cardInstanceId:u,theme:n,variableResolver:e=>e||"",onValueChanged:e=>{l(e)}}),"other"===s&&(0,e.h)(oa,{ref:i,attributes:{name:"feedback-message",defaultValue:"",placeholder:"Add your feedback...",numberOfLines:3,maxLength:280},isWorkflow:!0,cardInstanceId:u,theme:n,variableResolver:e=>e||"",onValueChanged:e=>{h(e)}}),(0,e.h)(Nr,{isWorkflow:!0,clickHandler:()=>()=>{var e;if(null===s)return;if("other"===s&&(null===c||null==c||0===c.trim().length))return;const n="other"===s?{message:c}:{};a.sendEvent({cardViewState:"topview",eventName:kr,cardInstanceId:u,properties:Object.assign({reason:s,source:p},n)}),t.feedbackReceived(u),o.dispatchCardEvent({type:fr.VOTED_NOT_USEFUL}),h(null),null===(e=i.current)||void 0===e||e.clearInput(),t.navigateBack()},text:"Submit",theme:n,appearance:"primary"})))):null}))};var pl=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};const ml=()=>window.matchMedia("(prefers-color-scheme: dark)"),gl=j("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.toast")}})),vl=t=>{let{store:n,onAnalyticsEvent:r,onCardEvent:a,onAuthTokenRequested:o,onError:i}=t;const s=Z((()=>({analyticsDispatcher:{sendEvent:(e,t)=>pl(void 0,void 0,void 0,(function*(){r&&(void 0===t?yield r(e):yield r(e,t))}))},cardEventDispatcher:{dispatchCardEvent:e=>{a&&a(e)}},authTokenProvider:{requestToken:()=>pl(void 0,void 0,void 0,(function*(){return yield o()}))},runtimeVariableResolver:void 0})),[r,a,o]);return(0,e.h)(Js,{onError:i},(0,e.h)(br.Provider,{value:s},(0,e.h)(d.zt,{store:n},(0,e.h)(d.lj,{actions:(0,u.Y2)(St,Fn,qt,St)},fl))))},fl=t=>{const{cardFeed:n,messages:r,themeLoading:a,themeLoaded:o,clearMessage:i,application:{interfaceStyle:s,streamContainerId:l},theme:c}=t,[d,u]=N(ml().matches?"dark":"light");if(B((()=>{!function(){pl(this,void 0,void 0,(function*(){const e=yield Xs(l);if(e)o({theme:e.theme}),Gs(l,e.eTag);else{a();const e=yield Gs(l);o(e)}}))}()}),[]),B((()=>{const e=e=>{u(e.matches?"dark":"light")};return ml().addEventListener("change",e),()=>{ml().removeEventListener("change",e)}}),[]),!c.status||!1===c.status.loaded)return null;const h=c.themePayload?qs(c.themePayload,d,s):void 0;if(!h)return null;const p=h.getTheme("feed"),m=K(br),g=m.cardEventDispatcher,v=m.authTokenProvider;return(0,e.h)(gl,{theme:p},(0,e.h)(Xi,{theme:p,feedOrientation:Ti(n.horizontalContainerConfig),message:r.cardList,actionTitle:r.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(r.cardList.action)?"Try again":"Dismiss",actionHandler:()=>{var e,n,a,o,i,s,l,c,d,u;const h=null===(e=r.cardList)||void 0===e?void 0:e.cardInstanceId,p=null===(n=r.cardList)||void 0===n?void 0:n.action;if(h&&p)switch(p){case"submit-failed":Fr(t,t,h,!1,g,v,(null===(a=t.messages.cardList)||void 0===a?void 0:a.responseValues)||{},{payload:null===(o=t.messages.cardList)||void 0===o?void 0:o.payload,postSubmissionUrl:null===(i=t.messages.cardList)||void 0===i?void 0:i.postSubmissionUrl,subviewData:null===(s=t.messages.cardList)||void 0===s?void 0:s.subviewData,submitButtonName:null===(l=t.messages.cardList)||void 0===l?void 0:l.submitButtonName});break;case"dismiss-failed":const e=null===(c=t.messages.cardList)||void 0===c?void 0:c.source;e&&Lr(t,t,h,g,v,e);break;case"snooze-failed":const n=null===(d=t.messages.cardList)||void 0===d?void 0:d.snoozeDate,r=null===(u=t.messages.cardList)||void 0===u?void 0:u.source;n&&r&&Ar(t,t,h,n,g,v,r)}},onDismiss:()=>{i("cardList")},delay:500}))};var bl=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))},yl=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n};function wl(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Sl=()=>window.matchMedia("(prefers-color-scheme: dark)"),kl=()=>window.getComputedStyle(document.documentElement).getPropertyValue("font-size"),Cl=j("div")((e=>{let{embedMode:t,feedOrientation:n}=e;const r={};return"launcher"===t?Object.assign({width:"calc(100% - 40px)",height:"0px",position:"absolute",bottom:"100px",right:"20px",left:"20px",transition:"height 0.2s"},"horizontal"===n?r:{}):{width:"100%",height:"100%"}})),xl={fontFamily:'-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',height:"100%",overflow:"hidden"},Il=j("div")((e=>{let{embedMode:t}=e;return"launcher"===t?Object.assign(Object.assign({},xl),{borderRadius:"20px",boxShadow:"0 2px 20px 0 rgba(0, 0, 0, 0.1)"}):Object.assign({},xl)})),Ol=xe.forwardRef(((t,n)=>{let{store:r,embedMode:a,cardCountChanged:o,onReady:i,runtimeVariableResolver:s,linkButtonPressed:l,submitButtonPressed:c,onCardListTutorialSeen:h,onAnalyticsEvent:p,onCardEvent:m,onError:g,onAuthTokenRequested:v,onCardFeedSubscribe:f,requestWebSocketReconnect:b,webSocketDisabled:y}=t;const[w,S]=N(Sl().matches?"dark":"light"),[,k]=N(kl);B((()=>{const e=e=>{S(e.matches?"dark":"light")};Sl().addEventListener("change",e);const t=()=>{k(kl)};return window.addEventListener("browser-font-changed",t),window.addEventListener("pageshow",(e=>{var t;e.persisted&&!(null===(t=C.containersBroadcastChannel)||void 0===t?void 0:t.isOpen)&&(C.containersBroadcastChannel=new Rr)})),()=>{Sl().removeEventListener("change",e),window.removeEventListener("browser-font-changed",t)}}),[]);const C=Z((()=>({analyticsDispatcher:{sendEvent:(e,t)=>bl(void 0,void 0,void 0,(function*(){p&&(void 0===t?yield p(e):yield p(e,t))}))},cardEventDispatcher:{dispatchCardEvent:e=>{m&&m(e)}},authTokenProvider:{requestToken:()=>bl(void 0,void 0,void 0,(function*(){return yield v()}))},runtimeVariableResolver:s,containersBroadcastChannel:"BroadcastChannel"in window?new Rr:void 0})),[p,m,v]),x=Y();return U(n,(()=>({pollCardList:()=>{var e;tn.debug({level3:["Card feed polling initiated"]}),null===(e=x.current)||void 0===e||e.loadCards(!1)},cancelCardListPolling:()=>{var e;null===(e=x.current)||void 0===e||e.cancelCardListPolling()}}))),"toast"===a?(0,e.h)(vl,{store:r,onAuthTokenRequested:v}):(0,e.h)(Js,{onError:g},(0,e.h)(br.Provider,{value:C},(0,e.h)(d.zt,{store:r},(0,e.h)(d.lj,{actions:(0,u.Y2)(Fn,Bs),mapToProps:e=>{const{cardResponses:t}=e;return yl(e,["cardResponses"])}},(t=>{let{cardFeed:n,navigationStack:r,cardFeedLoading:a,cardFeedLoaded:d,themeLoading:u,themeLoaded:p,finishExternalAction:m,application:{open:g,cardListRefreshInterval:v,streamContainerId:S,runtimeVariableResolutionTimeout:k,isPreview:C,embedMode:I,customStrings:O,cardLimit:T,firstLoadStyles:M,interfaceStyle:_},externalAction:j,theme:{themePayload:D}}=t;const L=r.items.length?r.items[r.items.length-1]:void 0;let F;switch(null==L?void 0:L.kind){case"media":F="Media";break;case"subview":F="Card Subview";break;case"snooze":F="Snooze Date & Time Selector";break;case"feedback":F="Send Feedback"}return(0,e.h)(Cl,{embedMode:I,feedOrientation:Ti(n.horizontalContainerConfig),id:"action-cards-sdk-app-root",class:"atomic-sdk-root","data-contentLabel":F},(0,e.h)(Ml,{ref:x,streamContainerId:S,runtimeVariableResolutionTimeout:k,runtimeVariablesResolver:s,themePayload:D,cardFeed:n,cardLimit:T,onThemeLoading:u,onThemeLoaded:p,onCardFeedLoading:a,onCardFeedLoaded:d,onCardFeedSubscribe:f,streamFilter:n.streamFilter,requestWebSocketReconnect:b,webSocketDisabled:y,currentNavigationItem:L,applicationOpen:g,onReady:i,onCardCountChanged:o,cardListRefreshInterval:v,isPreview:C,cardListTitle:O.cardListTitle,embedMode:I,externalAction:j,finishExternalAction:m,onLinkButtonPressed:l,onSubmitButtonPressed:c,cardListTutorialSeen:n.tutorialSeen,onCardListTutorialSeen:h,firstLoadStyles:M,colourScheme:w,interfaceStyle:_,noInternetConnectionMessage:O.noInternetConnectionMessage,dataLoadFailedMessage:O.dataLoadFailedMessage,tryAgainTitle:O.tryAgainTitle}))})))))})),Tl=e=>"modal-subview"!==e;class Ml extends e.Component{constructor(e){super(e),wl(this,"pollCounter",0),wl(this,"poll",void 0),this.poll=null}componentDidMount(){return bl(this,void 0,void 0,(function*(){this.props.onReady(),Tl(this.props.embedMode)&&this.loadTheme()}))}componentWillUnmount(){this.cancelCardListPolling()}componentDidUpdate(e){var t,n;const{cardFeed:r,externalAction:a}=e,{cardFeed:o,onCardCountChanged:i,externalAction:s,embedMode:l}=this.props;if("modal-subview"===l||"toast"===l)return;var c;((e,t)=>e.length===t.length&&(e.sort(),t.sort(),e.every(((e,n)=>e===t[n]))))(o.cardInstances.map((e=>e.instance.id)),r.cardInstances.map((e=>e.instance.id)))&&(null===(t=r.metadata)||void 0===t?void 0:t.totalCards)===(null===(n=o.metadata)||void 0===n?void 0:n.totalCards)||this.poll&&i&&i(o.cardInstances.length,null===(c=o.metadata)||void 0===c?void 0:c.totalCards);!r.tutorialSeen&&o.tutorialSeen&&this.props.onCardListTutorialSeen&&this.props.onCardListTutorialSeen(),s&&s.actionId!==(null==a?void 0:a.actionId)&&this.handleExternalAction(s),r.runtimeVariables.updateId!==o.runtimeVariables.updateId&&this.trackRuntimeVariablesChanged(o)}trackRuntimeVariablesChanged(e){const t=this.context.analyticsDispatcher,n=!1===e.runtimeVariableAnalyticsEnabled;e.cardInstances.forEach((r=>{if(r.runtimeVariables&&r.runtimeVariables.values){var a;const o=null===(a=e.runtimeVariables.values)||void 0===a?void 0:a.get(r.instance.id);t.sendEvent({cardInstanceId:r.instance.id,cardViewState:"topview",eventName:Cr,properties:{resolvedVariables:r.runtimeVariables.reduce(((e,t)=>(e[t.name]=(null==o?void 0:o.get(t.name))||"",e)),{})}},n)}}))}loadTheme(){return bl(this,void 0,void 0,(function*(){const{streamContainerId:e,onThemeLoading:t,onThemeLoaded:n}=this.props,r=yield Xs(e);if(r)n({theme:r.theme}),Gs(e,r.eTag);else{t();n(yield Gs(e))}const a=c().getState().theme.status;a&&a.loaded&&this.subscribeToCardFeedUpdates()}))}loadCards(e){return bl(this,void 0,void 0,(function*(){const t=this.context,{onCardFeedLoading:n,onCardFeedLoaded:r,streamContainerId:a,runtimeVariableResolutionTimeout:o,cardFeed:i,runtimeVariablesResolver:s,cardLimit:l,streamFilter:d}=this.props;e||n();const u=yield((e,t,n,r,a,o,i)=>mr(void 0,void 0,void 0,(function*(){const s=`feed/${e}${i?"?filters="+JSON.stringify(i):""}`,l=yield wn.get(s,t,r||"",{streamContainerId:e});if(304===l.response.status)return tn.debug({level1:["Feed unchanged response received by HTTP"]}),{};if(200===l.response.status){tn.debug({level1:["Feed update received by HTTP"]});let e=l.data.cardInstances,t=l.data.metadata;const r=e.length;o&&e.length>o&&(e=e.slice(0,o));const i=yield vr(e,n,a);return{lastModified:l.response.etag,cardInstances:e,metadata:t,unfilteredCardInstanceCount:r,runtimeVariables:i}}return{error:l.response.error}})))(a,t.authTokenProvider,o,i.lastModified,s,l,d);e&&u.error||r(u),c().getState().cardFeed.status.loaded&&this.pollForNewCards()}))}handleExternalAction(e){return bl(this,void 0,void 0,(function*(){const t=this.context,n=t.analyticsDispatcher,r=t.containersBroadcastChannel,a=()=>bl(this,void 0,void 0,(function*(){var t;return n.sendEvent({cardInstanceId:e.cardInstanceId,cardViewState:e.cardViewState,eventName:wr,properties:Object.assign(Object.assign(Object.assign(Object.assign({linkMethod:e.linkMethod},(null===(t=e.urlLink)||void 0===t?void 0:t.url)?{url:e.urlLink.url}:{}),e.payload?{payload:e.payload.actionPayload}:{}),e.trigger?{detail:e.trigger}:{}),e.subviewData.subviewId?Object.assign(Object.assign({},e.subviewData),{subviewLevel:1}):{})})})),o=()=>{var t;e.payload?(this.props.finishExternalAction(e.actionId),"linkButton"!==e.trigger&&"image"!==e.trigger||!this.props.onLinkButtonPressed?"submitButton"===e.trigger&&this.props.onSubmitButtonPressed&&this.props.onSubmitButtonPressed(e.payload):this.props.onLinkButtonPressed(e.payload)):e.urlLink&&(this.props.finishExternalAction(e.actionId),window.open(e.urlLink.url,null!==(t=e.urlLink.target)&&void 0!==t?t:"_blank"))};if(r){const t=`${e.actionId}-app-external-action`;r.addEventListener("message",(n=>{var a;if(n.data.type!==Pr.ANALYTICS_EVENT)return;const i=null===(a=n.data)||void 0===a?void 0:a.eventQueued;i.eventName===wr&&i.cardInstanceId===e.cardInstanceId&&r&&(r.removeEventListener(t),o())}),t),yield a()}else yield a(),o()}))}subscribeToCardFeedUpdates(){return this.props.webSocketDisabled?this.loadCards(!1):this.props.onCardFeedSubscribe()}pollForNewCards(){const{isPreview:e,cardListRefreshInterval:t,embedMode:n}=this.props;!e&&0!==t&&Tl(n)&&(this.poll=setTimeout((()=>bl(this,void 0,void 0,(function*(){this.props.webSocketDisabled?yield this.loadCards(!0):this.pollCounter<9?(this.pollCounter++,yield this.loadCards(!0)):(this.pollCounter=0,tn.debug({level3:["Attempt to reconnect websocket initiated"]}),this.props.requestWebSocketReconnect())}))),t))}cancelCardListPolling(){this.poll&&tn.debug({level3:["Card feed polling cancelled"]}),clearTimeout(this.poll),this.poll=null,this.pollCounter=0}render(t){var n;let{currentNavigationItem:r,embedMode:a,cardFeed:o,firstLoadStyles:i,colourScheme:s,interfaceStyle:l,noInternetConnectionMessage:d,dataLoadFailedMessage:u,tryAgainTitle:h}=t;const p=c().getState();if(!p.theme.status)return(0,e.h)(Il,{embedMode:a,id:cs});if(!1===p.theme.status.loaded)return(0,e.h)(Il,{embedMode:a,id:cs},(0,e.h)(ss,{embedMode:a,textColor:i.textColor,loadingIconColor:i.loadingSpinnerColor,buttonColor:i.buttonTextColor,backgroundColor:i.backgroundColor,onRetry:()=>{this.loadTheme()},state:p.theme.status.errorState,noInternetConnectionMessage:d,dataLoadFailedMessage:u,tryAgainTitle:h}));const{applicationOpen:m,themePayload:g}=this.props,v="modal-subview"===a;let f;f="standalone"===a&&(null===(n=o.horizontalContainerConfig)||void 0===n?void 0:n.enabled)||"single-card"===a?"feed":Lt(r)?"media":_t(r)?"subview":jt(r)?"snooze":Dt(r)?"feedback":v?void 0:"feed";const b=g?qs(g,s,l):void 0;if(!f||!b)return null;const y=b.getTheme("feed"),w=b.getTheme("workflow");return(0,e.h)(e.Fragment,null,(0,e.h)(Il,{theme:y,visible:m,embedMode:a,className:"feed-container",role:"main"},"subview"===f&&(0,e.h)(Is,{theme:w}),"media"===f&&(0,e.h)(As,{theme:w}),"feed"===f&&(0,e.h)(fs,{theme:y,onRetry:()=>(this.props.onCardFeedLoading(),this.subscribeToCardFeedUpdates())}),"snooze"===f&&(0,e.h)(Ns,{theme:w}),"feedback"===f&&(0,e.h)(hl,{theme:w})),(0,e.h)(Qs,{fontFamilies:y.getFontFamilies()}),(0,e.h)(Kn,null))}}wl(Ml,"contextType",br);const _l="AtomicStreamContainersTutorialSeen";class jl{static setCardListTutorialSeen(e){const t=this.containersCardListTutorialSeenIn();t.includes(e)||(t.push(e),localStorage.setItem(_l,t.join(",")))}static hasCardListTutorialBeenSeen(e){return this.containersCardListTutorialSeenIn().includes(e)}static containersCardListTutorialSeenIn(){const e=localStorage.getItem(_l);return e?e.split(","):[]}}n(5202);var Dl,Ll,Fl=function(e,t,n,r){return new(n||(n=Promise))((function(a,o){function i(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?a(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(i,s)}l((r=r.apply(e,t||[])).next())}))};function Al(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Hl=120,El=null===(Dl=Array.from(document.getElementsByTagName("script")).filter((e=>{var t;return null==e||null===(t=e.dataset)||void 0===t?void 0:t.config}))[0])||void 0===Dl||null===(Ll=Dl.dataset)||void 0===Ll?void 0:Ll.config,Pl=El?JSON.parse(El):void 0,Rl="onpageshow"in window;class Vl{constructor(){Al(this,"domListener",void 0),Al(this,"messageReceivedCallback",void 0),Al(this,"requestFailedCallback",void 0),Al(this,"resizedCallback",void 0),Al(this,"outsideClickCallback",void 0),Al(this,"keyDownCallback",void 0),Al(this,"containersBroadcastChannel",void 0),Al(this,"variableResolutionRequests",{}),Al(this,"authTokenRequests",{}),Al(this,"lastVariableResolutionRequestId",1),Al(this,"streamContainerId",void 0),Al(this,"feedSubscriptionId",void 0),Al(this,"containerInstanceId",void 0),Al(this,"applicationRef",xe.createRef()),Al(this,"subscriptionRetryCount",0),Al(this,"subscriptionRetryLimit",3)}startCardFeed(t){var n;if(!t.apiHost||!t.apiKey||!t.environmentId)throw new Error("The Atomic SDK must be initialised before launching a stream container. Call `AtomicSDK.initialise` to configure the API host, API key and environment ID.");tn.logLevel=t.logLevel||en.DISABLED,this.containerInstanceId=t.instanceId,wn.initialise(t.apiHost,t.apiKey,t.environmentId),t.testHost&&wn.setTestHostHeader(t.testHost),t.clientAppVersion&&wn.setClientAppVersion(t.clientAppVersion),this.messageReceivedCallback=this.onMessageReceived.bind(this),this.requestFailedCallback=this.onRequestFailed.bind(this);const r=()=>{this.destroy.bind(this)(),window.removeEventListener("pagehide",r)},a=()=>{this.initialiseIframeBroadcastChannel(),window.addEventListener("message",this.messageReceivedCallback),window.addEventListener("request-failed",this.requestFailedCallback),window.addEventListener("pagehide",r)};if(Rl?window.addEventListener("pageshow",a):a(),"launcher"===t.embedMode){this.domListener=new MutationObserver((()=>{this.resizeHandler()}));const e=()=>{this.resizedCallback=this.resizeHandler.bind(this),window.addEventListener("resize",this.resizedCallback),this.outsideClickCallback=this.outsideClickHandler.bind(this),document.addEventListener("mouseup",this.outsideClickCallback),this.keyDownCallback=this.keyDownHandler.bind(this),document.addEventListener("keydown",this.keyDownCallback)};Rl?window.addEventListener("pageshow",e):e()}("single-card"===t.embedMode||"standalone"===t.embedMode&&!0===t.autosizeFrame)&&(this.domListener=new MutationObserver((()=>{var e;this.autoResizingFrameHandler(t.embedMode,null===(e=t.features)||void 0===e?void 0:e.horizontalContainerConfig)})),document.fonts.onloadingdone=()=>{var e;tn.debug({level3:["Font loading completed, resizing frame"]}),this.autoResizingFrameHandler(t.embedMode,null===(e=t.features)||void 0===e?void 0:e.horizontalContainerConfig)}),"modal-subview"===t.embedMode&&(this.domListener=new MutationObserver((()=>{this.modalViewResizeHandler()}))),"toast"===t.embedMode&&(this.domListener=new MutationObserver((()=>{this.toastViewResizeHandler()}))),(null===(n=t.enabledUiElements)||void 0===n?void 0:n.customContainerHeader)&&(t.enabledUiElements.customContainerHeader.headerElement=decodeURI(t.enabledUiElements.customContainerHeader.headerElement)),this.domListener&&this.domListener.observe(document.body,{attributes:!0,childList:!0,characterData:!0,subtree:!0});const o=l(Object.assign(Object.assign({},t),{cardListTutorialSeen:!t.streamContainerId||jl.hasCardListTutorialBeenSeen(t.streamContainerId)}),[(()=>e=>e=>t=>{const n=e(t);return this.synchroniseStores(),n})()]);this.streamContainerId=t.streamContainerId,(0,e.render)((0,e.h)(Ol,{ref:this.applicationRef,store:o,embedMode:t.embedMode,cardCountChanged:this.cardCountChanged.bind(this),linkButtonPressed:this.linkButtonPressed.bind(this),submitButtonPressed:this.submitButtonPressed.bind(this),onReady:this.onReady.bind(this),runtimeVariableResolver:this.runtimeVariablesRequested.bind(this),onCardListTutorialSeen:this.cardListTutorialSeen.bind(this),onAnalyticsEvent:this.sendAnalyticsEvent.bind(this),onCardEvent:this.dispatchCardEvent.bind(this),onError:this.onError.bind(this),onAuthTokenRequested:this.onAuthTokenRequested.bind(this),onCardFeedSubscribe:this.cardFeedSubscribe.bind(this),requestWebSocketReconnect:this.requestWebSocketReconnect.bind(this),webSocketDisabled:t.webSocketDisabled}),document.body)}synchroniseStores(){if(this.containersBroadcastChannel){let e=Object.assign({},c().getState());this.containersBroadcastChannel.postMessage({type:Pr.STATE,state:e,instanceId:this.containerInstanceId})}else tn.error({level1:["BroadcastChannel API unavailable"]})}sendMessageToParent(e,t){const n=window.parent;n&&n.postMessage(Object.assign({action:e},t),c().getState().application.windowOrigin||"")}onReady(){this.sendMessageToParent("io.atomic.events.ready")}cardCountChanged(e,t){this.sendMessageToParent("io.atomic.events.cardCountChanged",{cardCount:e,totalCards:t})}cardFeedSubscribe(){var e;this.subscriptionRetryCount>=this.subscriptionRetryLimit?(null===(e=this.applicationRef.current)||void 0===e||e.pollCardList(),this.sendMessageToParent("io.atomic.events.subscriptionRetryExceeded"),this.subscriptionRetryCount=0):(this.subscriptionRetryCount++,this.sendMessageToParent("io.atomic.events.cardFeedSubscribeRequested",{streamContainerId:this.streamContainerId}))}cardFeedUnsubscribe(){this.sendMessageToParent("io.atomic.events.cardFeedUnsubscribeRequested",{subscriptionId:this.feedSubscriptionId})}checkWebSocketConnection(){this.sendMessageToParent("io.atomic.events.socketConnectionHealthcheck")}requestWebSocketReconnect(){this.sendMessageToParent("io.atomic.events.socketReconnectionRequested")}cardFeedUpdated(e,t){return Fl(this,void 0,void 0,(function*(){const n=c().getState();let r;const a=t.filter((e=>("replace-feed"===e.type&&(r=e),"replace-feed"!==e.type)));if(r){const{instances:t,totalCards:a}=r.data.cardInstances,o=yield vr(t,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this)),i={cardInstances:t,unfilteredCardInstanceCount:t.length,runtimeVariables:o,metadata:{totalCards:a}};e.cardFeedLoaded(i),this.cardCountChanged(i.cardInstances.length,i.metadata.totalCards)}if(a.length){const t=t=>Fl(this,void 0,void 0,(function*(){if(t){const t=yield(r=n.application.streamContainerId,a={requestToken:()=>Fl(this,void 0,void 0,(function*(){return yield this.onAuthTokenRequested()}))},mr(void 0,void 0,void 0,(function*(){const e=yield wn.get(`feed/${r}`,a,void 0,{streamContainerId:r});var t,n;return 200===e.response.status&&e.data&&e.data.metadata?{cardCount:null===(t=e.data.cardInstances)||void 0===t?void 0:t.length,totalCards:null===(n=e.data.metadata)||void 0===n?void 0:n.totalCards,lastModified:e.response.etag}:{error:e.response.error}})));if(t.error)tn.error({level1:["error retrieving total card count after card feed updated"],level2:[t.error]});else{const{cardCount:n,totalCards:r,lastModified:a}=t;r&&e.updateTotalCardCount(r,a),this.cardCountChanged(n,r)}}var r,a})),r=e=>Fl(this,void 0,void 0,(function*(){return yield vr(e,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this))}));yield e.cardFeedDeltaUpdate(a,t,r)}}))}linkButtonPressed(e){this.sendMessageToParent("io.atomic.events.linkButtonPressed",{payload:e}),this.checkWebSocketConnection()}submitButtonPressed(e){this.sendMessageToParent("io.atomic.events.submitButtonPressed",{payload:e}),this.checkWebSocketConnection()}cardListTutorialSeen(){this.streamContainerId&&jl.setCardListTutorialSeen(this.streamContainerId)}onError(e){this.sendMessageToParent("io.atomic.events.errorReceived",{error:{name:e.name,message:e.message,stack:e.stack}})}onAuthTokenRequested(){const e=(0,nn.v4)();return new Promise(((t,n)=>{this.authTokenRequests[e]=(e,r)=>r?n(r):t(e),this.sendMessageToParent("io.atomic.events.authTokenRequested",{requestId:e})}))}runtimeVariablesRequested(e){const t=this.lastVariableResolutionRequestId++;return this.sendMessageToParent("io.atomic.events.resolveRuntimeVariables",{cards:e.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:Array.from(e.runtimeVariables.entries())}))),requestId:t}),new Promise((e=>{this.variableResolutionRequests[t]=t=>{const n=t.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:new Map(e.runtimeVariables)})));e(n)}}).bind(this))}feedOverflowHeight(){const e=window.document.getElementById(cs);return e?Array.from(e.children).reduce(((e,t)=>{const n=t;if(-1!==n.className.indexOf("use-offset"))return e+Array.from(n.querySelectorAll(".offset-child")).reduce(((e,t)=>e+t.offsetHeight),0);const r=t;return e+(r.className.indexOf("floating")>-1?0:r.scrollHeight)}),0):0}toastViewHeight(){const e=window.document.getElementById("toast-body"),t=window.document.getElementById(qi);if(e){return Array.from(e.children).reduce(((e,t)=>t.clientHeight+e),0)?null==t?void 0:t.offsetHeight:0}return 0}resizeHandler(){const e=document.querySelector(".atomic-sdk-root");if(!e)return;const t=this.feedOverflowHeight(),n=t>window.innerHeight-Hl?window.innerHeight-Hl:t,r=60>window.innerHeight-Hl?window.innerHeight-Hl:60;e.style.height=`${n>r?n:r}px`}autoResizingFrameHandler(e,t){const n=document.querySelector(".atomic-sdk-root"),r=window.frameElement;if(r){n.style.height="auto";const o=r.style.display;if(r.style.display="block","standalone"===e&&(null==t?void 0:t.enabled)&&"shrink"===t.emptyStyle&&r.classList.contains("standalone")){var a;!r.classList.contains("shrink")&&r.classList.add("shrink");const e=null===(a=c().getState().cardFeed.cardInstances)||void 0===a?void 0:a.length;e||r.classList.contains("collapsed")?e&&r.classList.contains("collapsed")?(r.classList.remove("collapsed"),r.style.maxHeight="2000px",r.style.height=`${n.scrollHeight}px`):!e&&n.scrollHeight?r.style.maxHeight=`${n.scrollHeight}px`:e?r.style.height=`${n.scrollHeight}px`:r.style.maxHeight="0px":(r.classList.add("collapsed"),r.style.maxHeight=`${n.scrollHeight}px`)}else r.style.height=`${n.scrollHeight}px`;"single-card"===e&&(0===n.scrollHeight?r.classList.remove("has-card"):r.classList.add("has-card")),r.style.display=o,this.sendMessageToParent("io.atomic.events.frameHeightChanged",{height:n.scrollHeight})}}modalViewResizeHandler(){const e=window.frameElement;if(e){var t;const n=document.querySelector(".atomic-sdk-root"),r=e.style.display;e.style.display="block",e.style.height="auto";const a=this.feedOverflowHeight();e.style.height=`${a}px`;const o=null==n||null===(t=n.dataset)||void 0===t?void 0:t.contentlabel;o&&e.setAttribute("title",o),n.children.length?e.classList.contains("has-subview")||(e.classList.add("has-subview"),e.setAttribute("aria-hidden","false"),e.focus()):(e.classList.remove("has-subview"),e.setAttribute("aria-hidden","true"),e.setAttribute("title","Empty Modal"),e.blur()),e.style.display=r}}toastViewResizeHandler(){const e=window.frameElement;if(e){const t=this.toastViewHeight();e.style.height=`${t}px`,t?e.setAttribute("aria-hidden","false"):e.setAttribute("aria-hidden","true")}}outsideClickHandler(e){const t=document.querySelector(".atomic-sdk-root");t&&!t.contains(e.target)&&this.closeLauncher()}keyDownHandler(e){mt(e.key)===ht&&this.closeLauncher()}closeLauncher(){window.postMessage({action:"updateAppOpen",values:{open:!1}},c().getState().application.windowOrigin||"")}sendAnalyticsEvent(e){return Fl(this,arguments,void 0,(function*(){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.checkWebSocketConnection();const n=c().getState(),r=n.cardFeed.cardInstances||[],a=r.filter((t=>t.instance.id===e.cardInstanceId)),o=a.length?a[0]:null,i=o?r.indexOf(o)+1:0;let s;try{s=yield this.onAuthTokenRequested()}catch(e){tn.error({level1:["Error requesting auth token to send analytics event"],level2:[e]})}const l=Object.assign(Object.assign({},e),{endUserId:rn(s)||"",cardInstanceStatus:o?o.instance.status:"",containerId:n.application.streamContainerId,timestamp:new Date,streamCardPosition:i,streamLength:n.cardFeed.unfilteredCardInstanceCount,streamLengthVisible:r.length});this.sendMessageToParent("io.atomic.events.analyticsEventReceived",{event:l,sdkOnlyEvent:t})}))}dispatchCardEvent(e){this.sendMessageToParent("io.atomic.events.cardEventReceived",{event:e,streamContainerId:this.streamContainerId})}onMessageReceived(e){return Fl(this,void 0,void 0,(function*(){var t,n;const r=c().getState(),a=r.application.windowOrigin;if(o=a||"",i=e.origin,"*"===o||o===i){const o=(0,u.kv)((0,u.Y2)(Fn,Bs),c());switch(e.data.action){case"didResolveRuntimeVariables":this.variableResolutionRequests[e.data.values.requestId](e.data.values.cards);break;case"io.atomic.events.requestRuntimeVariables":const i=yield vr(r.cardFeed.cardInstances,r.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this));o.runtimeVariablesResolved(i);break;case"updateAppOpen":this.onUpdateAppOpen(e),parent.postMessage({action:"io.atomic.events.didUpdateAppOpen",values:{open:e.data.values.open}},a||"");break;case"io.atomic.events.authTokenReceived":const s=e.data;if(s.values){const{requestId:e,authToken:t}=s.values;e&&void 0!==this.authTokenRequests[e]&&(this.authTokenRequests[e](t),delete this.authTokenRequests[e])}break;case"io.atomic.events.authTokenError":const l=e.data;if(l.values){const{requestId:e,error:t}=l.values;e&&void 0!==this.authTokenRequests[e]&&(this.authTokenRequests[e](void 0,t),delete this.authTokenRequests[e])}break;case"io.atomic.events.cardFeedSubscriptionId":this.feedSubscriptionId=e.data.values.subscriptionId;break;case"io.atomic.events.cardFeedUpdateReceived":this.subscriptionRetryCount=0;const c=e.data.values.cardFeedUpdates;this.cardFeedUpdated(o,c);break;case"io.atomic.events.pollingFallbackEnabled":null===(t=this.applicationRef.current)||void 0===t||t.pollCardList();break;case"io.atomic.events.pollingFallbackDisabled":null===(n=this.applicationRef.current)||void 0===n||n.cancelCardListPolling();break;case"io.atomic.events.invalidStreamContainerId":case"io.atomic.events.invalidFilter":case"io.atomic.events.invalidToken":case"io.atomic.events.expiredToken":case"io.atomic.events.socketAuthenticationError":case"io.atomic.events.feedSubscribeError":o.cardFeedLoaded({error:e.data.values});break;case"io.atomic.events.streamFilterApplied":o.setStreamFilter(e.data.values.filter);break;case"io.atomic.events.logLevelUpdate":tn.logLevel=e.data.values.logLevel;break;case"io.atomic.events.sdkLogout":this.onLogout()}}var o,i}))}onRequestFailed(e){an("request-failed",e.detail,window.parent)}onUpdateAppOpen(e){this.checkWebSocketConnection(),Hn().updateAppOpen(e.data.values.open)}initialiseIframeBroadcastChannel(){var e;(null===(e=this.containersBroadcastChannel)||void 0===e?void 0:e.isOpen)||(this.containersBroadcastChannel=new Rr,this.containersBroadcastChannel.addEventListener("message",this.onBroadcastChannelMessageReceived.bind(this)))}onBroadcastChannelMessageReceived(e){if(e.data.type!==Pr.STATE)return;const t=c().getState();let n=e.data.state;e.data.instanceId===this.containerInstanceId&&(n=Object.assign(Object.assign({},n),{application:Object.assign(Object.assign({},n.application),{embedMode:t.application.embedMode,cardLimit:t.application.cardLimit})}),n!==t&&c().setState(n))}onLogout(){var e;wn.reset(),window.removeEventListener("request-failed",this.requestFailedCallback),Hn().userLoggedOut(),this.cardCountChanged(0,0),null===(e=this.applicationRef.current)||void 0===e||e.cancelCardListPolling()}destroy(){window.removeEventListener("resize",this.resizedCallback),window.removeEventListener("message",this.messageReceivedCallback),window.removeEventListener("request-failed",this.requestFailedCallback),document.removeEventListener("mouseup",this.outsideClickCallback),document.removeEventListener("keydown",this.keyDownCallback)}}Pl?(new Vl).startCardFeed(Pl):console.error("Error starting stream container, invalid config supplied")})(),r=r.default})()));
|