@atomic.io/action-cards-web-sdk-cdn-icons 25.4.2 → 26.2.0

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.
@@ -1,9 +1,9 @@
1
1
  /*! For license information please see iframe-manager-cdn-icons.js.LICENSE.txt */
2
2
  /*!
3
3
  * @license
4
- * Atomic Web SDK 25.4.2
4
+ * Atomic Web SDK 26.2.0
5
5
  * Copyright 2022 Atomic.io Limited.
6
6
  * For licenses of open source libraries used by the Atomic SDK, please
7
- * see https://downloads.atomic.io/web-sdk/release/25.4.2/LICENSES.txt.
7
+ * see https://downloads.atomic.io/web-sdk/release/26.2.0/LICENSES.txt.
8
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),i=n(2337);e.exports=function(e){return function(t,n,o){var s,l=r(t),d=a(l.length),c=i(o,d);if(e&&n!=n){for(;d>c;)if((s=l[c++])!=s)return!0}else for(;d>c;c++)if((e||c in l)&&l[c]===n)return e||c||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,i=r(a)&&r(a.createElement);e.exports=function(e){return i?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),i=n(7728),o=n(3415),s=n(741),l="prototype",d=function(e,t,n){var c,u,p,h,m=e&d.F,g=e&d.G,v=e&d.S,b=e&d.P,f=e&d.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(c in g&&(n=t),n)p=((u=!m&&y&&void 0!==y[c])?y:n)[c],h=f&&u?s(p,r):b&&"function"==typeof p?s(Function.call,p):p,y&&o(y,c,p,e&d.U),w[c]!=p&&i(w,c,h),b&&S[c]!=p&&(S[c]=p)};r.core=a,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},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),i=n(2943),o={};n(7728)(o,n(6314)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(o,{next:a(1,n)}),i(e,t+" Iterator")}},2923:(e,t,n)=>{"use strict";var r=n(4461),a=n(2985),i=n(3415),o=n(7728),s=n(7234),l=n(9988),d=n(2943),c=n(468),u=n(6314)("iterator"),p=!([].keys&&"next"in[].keys()),h="keys",m="values",g=function(){return this};e.exports=function(e,t,n,v,b,f,y){l(n,t,v);var w,S,C,x=function(e){if(!p&&e in F)return F[e];switch(e){case h:case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},k=t+" Iterator",I=b==m,O=!1,F=e.prototype,M=F[u]||F["@@iterator"]||b&&F[b],T=M||x(b),j=b?I?x("entries"):T:void 0,L="Array"==t&&F.entries||M;if(L&&(C=c(L.call(new e)))!==Object.prototype&&C.next&&(d(C,k,!0),r||"function"==typeof C[u]||o(C,u,g)),I&&M&&M.name!==m&&(O=!0,T=function(){return M.call(this)}),r&&!y||!p&&!O&&F[u]||o(F,u,T),s[t]=T,s[k]=g,b)if(w={values:I?T:x(m),keys:f?T:x(h),entries:j},y)for(S in w)S in F||i(F,S,w[S]);else a(a.P+a.F*(p||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),i=n(4430),o=n(9335)("IE_PROTO"),s=function(){},l="prototype",d=function(){var e,t=n(2457)("iframe"),r=i.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(),d=e.F;r--;)delete d[l][i[r]];return d()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=r(e),n=new s,s[l]=null,n[o]=e):n=d(),void 0===t?n:a(n,t)}},9275:(e,t,n)=>{var r=n(7007),a=n(1734),i=n(1689),o=Object.defineProperty;t.f=n(7057)?Object.defineProperty:function(e,t,n){if(r(e),t=i(t,!0),r(n),a)try{return o(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),i=n(7184);e.exports=n(7057)?Object.defineProperties:function(e,t){a(e);for(var n,o=i(t),s=o.length,l=0;s>l;)r.f(e,n=o[l++],t[n]);return e}},468:(e,t,n)=>{var r=n(9181),a=n(508),i=n(9335)("IE_PROTO"),o=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=a(e),r(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?o:null}},189:(e,t,n)=>{var r=n(9181),a=n(2110),i=n(9315)(!1),o=n(9335)("IE_PROTO");e.exports=function(e,t){var n,s=a(e),l=0,d=[];for(n in s)n!=o&&r(s,n)&&d.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~i(d,n)||d.push(n));return d}},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),i=n(9181),o=n(3953)("src"),s=n(18),l="toString",d=(""+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&&(i(n,"name")||a(n,"name",t)),e[t]!==n&&(l&&(i(n,o)||a(n,o,e[t]?""+e[t]:d.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[o]||s.call(this)}))},2943:(e,t,n)=>{var r=n(9275).f,a=n(9181),i=n(6314)("toStringTag");e.exports=function(e,t,n){e&&!a(e=n?e:e.prototype,i)&&r(e,i,{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),i="__core-js_shared__",o=a[i]||(a[i]={});(e.exports=function(e,t){return o[e]||(o[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,i=Math.min;e.exports=function(e,t){return(e=r(e))<0?a(e+t,0):i(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),i=n(3816).Symbol,o="function"==typeof i;(e.exports=function(e){return r[e]||(r[e]=o&&i[e]||(o?i:a)("Symbol."+e))}).store=r},6997:(e,t,n)=>{"use strict";var r=n(7722),a=n(5436),i=n(7234),o=n(2110);e.exports=n(2923)(Array,"Array",(function(e,t){this._t=o(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"),i.Arguments=i.Array,r("keys"),r("values"),r("entries")},1181:(e,t,n)=>{for(var r=n(6997),a=n(7184),i=n(3415),o=n(3816),s=n(7728),l=n(7234),d=n(6314),c=d("iterator"),u=d("toStringTag"),p=l.Array,h={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(h),g=0;g<m.length;g++){var v,b=m[g],f=h[b],y=o[b],w=y&&y.prototype;if(w&&(w[c]||s(w,c,p),w[u]||s(w,u,b),l[b]=p,f))for(v in r)w[v]||i(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),i=Number(t),o=n.getMonth()+i,s=new Date(0);s.setFullYear(n.getFullYear(),o,1),s.setHours(0,0,0,0);var l=a(s);return n.setMonth(o,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 i=r(e).getTime(),o=r(t).getTime(),s=r(n).getTime(),l=r(a).getTime();if(i>o||s>l)throw new Error("The start of the range cannot be after the end of the range");return i<l&&s<o}},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,i=r(e).getTime();return t.forEach((function(e,t){var o=r(e),s=Math.abs(i-o.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,i=r(e).getTime();return t.forEach((function(e){var t=r(e),o=Math.abs(i-t.getTime());(void 0===n||o<a)&&(n=t,a=o)})),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),i=n.getTime()-6e4*n.getTimezoneOffset(),o=a.getTime()-6e4*a.getTimezoneOffset();return Math.round((i-o)/864e5)}},6554:(e,t,n)=>{var r=n(1971);e.exports=function(e,t){var n=r(e),a=r(t),i=n.getTime()-6e4*n.getTimezoneOffset(),o=a.getTime()-6e4*a.getTimezoneOffset();return Math.round((i-o)/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),i=a(t);return 4*(n.getFullYear()-i.getFullYear())+(r(n)-r(i))}},9871:(e,t,n)=>{var r=n(5344);e.exports=function(e,t,n){var a=r(e,n),i=r(t,n),o=a.getTime()-6e4*a.getTimezoneOffset(),s=i.getTime()-6e4*i.getTimezoneOffset();return Math.round((o-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),i=n(3374);e.exports=function(e,t){var n=r(e),o=r(t),s=i(n,o),l=Math.abs(a(n,o));return n.setDate(n.getDate()-s*l),s*(l-(i(n,o)===-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),i=n(3374),o=n(9883);e.exports=function(e,t){var n=r(e),s=r(t),l=i(n,s),d=Math.abs(a(n,s));return n=o(n,l*d),l*(d-(i(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),i=n(3374);e.exports=function(e,t){var n=r(e),o=r(t),s=i(n,o),l=Math.abs(a(n,o));return n.setMonth(n.getMonth()-s*l),s*(l-(i(n,o)===-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),i=n(3374);e.exports=function(e,t){var n=r(e),o=r(t),s=i(n,o),l=Math.abs(a(n,o));return n.setFullYear(n.getFullYear()-s*l),s*(l-(i(n,o)===-s))}},3332:(e,t,n)=>{var r=n(3558),a=n(1884),i=n(7977),o=n(1387),s=n(7479),l=43200;e.exports=function(e,t,n){var d=n||{},c=r(e,t),u=d.locale,p=s.distanceInWords.localize;u&&u.distanceInWords&&u.distanceInWords.localize&&(p=u.distanceInWords.localize);var h,m,g={addSuffix:Boolean(d.addSuffix),comparison:c};c>0?(h=a(e),m=a(t)):(h=a(t),m=a(e));var v,b=i(m,h),f=m.getTimezoneOffset()-h.getTimezoneOffset(),y=Math.round(b/60)-f;if(y<2)return d.includeSeconds?b<5?p("lessThanXSeconds",5,g):b<10?p("lessThanXSeconds",10,g):b<20?p("lessThanXSeconds",20,g):b<40?p("halfAMinute",null,g):p(b<60?"lessThanXMinutes":"xMinutes",1,g):0===y?p("lessThanXMinutes",1,g):p("xMinutes",y,g);if(y<45)return p("xMinutes",y,g);if(y<90)return p("aboutXHours",1,g);if(y<1440)return p("aboutXHours",Math.round(y/60),g);if(y<2520)return p("xDays",1,g);if(y<l)return p("xDays",Math.round(y/1440),g);if(y<86400)return p("aboutXMonths",v=Math.round(y/l),g);if((v=o(m,h))<12)return p("xMonths",Math.round(y/l),g);var w=v%12,S=Math.floor(v/12);return w<3?p("aboutXYears",S,g):w<9?p("overXYears",S,g):p("almostXYears",S+1,g)}},7666:(e,t,n)=>{var r=n(3558),a=n(1884),i=n(7977),o=n(7479),s=525600;e.exports=function(e,t,n){var l=n||{},d=r(e,t),c=l.locale,u=o.distanceInWords.localize;c&&c.distanceInWords&&c.distanceInWords.localize&&(u=c.distanceInWords.localize);var p,h,m,g={addSuffix:Boolean(l.addSuffix),comparison:d};d>0?(p=a(e),h=a(t)):(p=a(t),h=a(e));var v=Math[l.partialMethod?String(l.partialMethod):"floor"],b=i(h,p),f=h.getTimezoneOffset()-p.getTimezoneOffset(),y=v(b/60)-f;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",b,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),i=void 0!==n?n:1,o=r(t).getTime();if(a.getTime()>o)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()<=o;)s.push(r(l)),l.setDate(l.getDate()+i);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 i=a(n);return i.setMilliseconds(i.getMilliseconds()-1),i}},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),i=a.getDay(),o=6+(i<n?-7:0)-(i-n);return a.setDate(a.getDate()+o),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),i=n(2385),o=n(1884),s=n(623),l=n(7479);var d={M:function(e){return e.getMonth()+1},MM:function(e){return p(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return p(e.getDate(),2)},DDD:function(e){return r(e)},DDDD:function(e){return p(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 p(a(e),2)},YY:function(e){return p(e.getFullYear(),4).substr(2)},YYYY:function(e){return p(e.getFullYear(),4)},GG:function(e){return String(i(e)).substr(2)},GGGG:function(e){return i(e)},H:function(e){return e.getHours()},HH:function(e){return p(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(e){return p(d.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return p(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return p(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return p(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return p(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 c(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+p(Math.floor(r/60),2)+t+p(a,2)}function p(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,i=l.format.formatters,u=l.format.formattingTokensRegExp;a&&a.format&&a.format.formatters&&(i=a.format.formatters,a.format.formattingTokensRegExp&&(u=a.format.formattingTokensRegExp));var p=o(e);return s(p)?function(e,t,n){var r,a,i=e.match(n),o=i.length;for(r=0;r<o;r++)a=t[i[r]]||d[i[r]],i[r]=a||c(i[r]);return function(e){for(var t="",n=0;n<o;n++)i[n]instanceof Function?t+=i[n](e,d):t+=i[n];return t}}(r,i,u)(p):"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),i=n(6656);e.exports=function(e){var t=r(e);return i(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(),i=new Date(0);return i.setFullYear(n,a+1,0),i.setHours(0,0,0,0),i.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),i=n(3892);e.exports=function(e){var t=r(e),n=a(t).getTime()-i(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(),i=new Date(0);i.setFullYear(n+1,0,4),i.setHours(0,0,0,0);var o=a(i),s=new Date(0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);var l=a(s);return t.getTime()>=o.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 i=r(e).getTime(),o=r(t).getTime(),s=r(n).getTime(),l=r(a).getTime();if(i>o||s>l)throw new Error("The start of the range cannot be after the end of the range");if(!(i<l&&s<o))return 0;var d=(l>o?o:l)-(s<i?i:s);return Math.ceil(d/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),i=n(9356);e.exports=function(e){var t=r(e);return a(t).getTime()===i(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),i=r(t,n);return a.getTime()===i.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(),i=r(t).getTime(),o=r(n).getTime();if(i>o)throw new Error("The start of the range cannot be after the end of the range");return a>=i&&a<=o}},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 i=a(n);return i.setDate(i.getDate()-1),i}},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),i=a.getDay(),o=6+(i<n?-7:0)-(i-n);return a.setHours(0,0,0,0),a.setDate(a.getDate()+o),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"],i=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],o=["AM","PM"],s=["am","pm"],l=["a.m.","p.m."],d={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 i[e.getDay()]},A:function(e){return e.getHours()/12>=1?o[1]:o[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){d[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:d,formattingTokensRegExp:r(d)}}},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),i=36e5,o=6e4,s=/[T ]/,l=/:/,d=/^(\d{2})$/,c=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],u=/^(\d{4})/,p=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],h=/^-(\d{2})$/,m=/^-?(\d{3})$/,g=/^-?(\d{2})-?(\d{2})$/,v=/^-?W(\d{2})$/,b=/^-?W(\d{2})-?(\d{1})$/,f=/^(\d{2}([.,]\d*)?)$/,y=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,w=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,S=/([Z+-].*)$/,C=/^(Z)$/,x=/^([+-])(\d{2})$/,k=/^([+-])(\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),F=function(e,t){var n,r=c[t],a=p[t];if(n=u.exec(e)||a.exec(e)){var i=n[1];return{year:parseInt(i,10),restDateString:e.slice(i.length)}}if(n=d.exec(e)||r.exec(e)){var o=n[1];return{year:100*parseInt(o,10),restDateString:e.slice(o.length)}}return{year:null}}(O.date,n),M=F.year,T=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=h.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 i=parseInt(n[1],10);return r.setUTCFullYear(t,0,i),r}if(n=g.exec(e)){r=new Date(0),a=parseInt(n[1],10)-1;var o=parseInt(n[2],10);return r.setUTCFullYear(t,a,o),r}if(n=v.exec(e))return I(t,parseInt(n[1],10)-1);if(n=b.exec(e)){return I(t,parseInt(n[1],10)-1,parseInt(n[2],10)-1)}return null}(F.restDateString,M);if(T){var j,L=T.getTime(),_=0;if(O.time&&(_=function(e){var t,n,r;if(t=f.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*i;if(t=y.exec(e))return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),n%24*i+r*o;if(t=w.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var a=parseFloat(t[3].replace(",","."));return n%24*i+r*o+1e3*a}return null}(O.time)),O.timezone)j=function(e){var t,n;if(t=C.exec(e))return 0;if(t=x.exec(e))return n=60*parseInt(t[2],10),"+"===t[1]?-n:n;if(t=k.exec(e))return n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n;return 0}(O.timezone)*o;else{var D=L+_,A=new Date(D);j=r(A);var E=new Date(D);E.setDate(A.getDate()+1);var H=r(E)-r(A);H>0&&(j+=H)}return new Date(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 i=n&&Number(n.weekStartsOn)||0,o=r(e),s=Number(t),l=o.getDay();return a(o,((s%7+7)%7<i?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),i=n(6373);e.exports=function(e,t){var n=r(e),o=Number(t),s=i(n);return a(n,o-s)}},570:(e,t,n)=>{var r=n(1884),a=n(6563);e.exports=function(e,t){var n=r(e),i=Number(t),o=a(n)-i;return n.setDate(n.getDate()-7*o),n}},1138:(e,t,n)=>{var r=n(1884),a=n(3892),i=n(6656);e.exports=function(e,t){var n=r(e),o=Number(t),s=i(n,a(n)),l=new Date(0);return l.setFullYear(o,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),i=Number(t),o=n.getFullYear(),s=n.getDate(),l=new Date(0);l.setFullYear(o,i,15),l.setHours(0,0,0,0);var d=a(l);return n.setMonth(i,Math.min(s,d)),n}},4059:(e,t,n)=>{var r=n(1884),a=n(6059);e.exports=function(e,t){var n=r(e),i=Number(t)-(Math.floor(n.getMonth()/3)+1);return a(n,n.getMonth()+3*i)}},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),i=a.getDay(),o=(i<n?7:0)+i-n;return a.setDate(a.getDate()-o),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 i(e){return!!(e&&e!==document&&"HTML"!==e.nodeName&&"BODY"!==e.nodeName&&"classList"in e&&"contains"in e.classList)}function o(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 d(n){n.metaKey||n.altKey||n.ctrlKey||(i(e.activeElement)&&s(e.activeElement),t=!0)}function c(e){t=!1}function u(e){i(e.target)&&(t||o(e.target))&&s(e.target)}function p(e){i(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 h(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",d,!0),document.addEventListener("mousedown",c,!0),document.addEventListener("pointerdown",c,!0),document.addEventListener("touchstart",c,!0),document.addEventListener("visibilitychange",h,!0),m(),e.addEventListener("focus",u,!0),e.addEventListener("blur",p,!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:()=>$,createElement:()=>v,createRef:()=>f,h:()=>v,hydrate:()=>P,isValidElement:()=>a,options:()=>r,render:()=>H,toChildArray:()=>O});var r,a,i,o,s,l,d,c,u={},p=[],h=/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,i={};for(r in t)"key"!==r&&"ref"!==r&&(i[r]=t[r]);if(arguments.length>3)for(n=[n],r=3;r<arguments.length;r++)n.push(a[r]);if(null!=n&&(i.children=n),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===i[r]&&(i[r]=e.defaultProps[r]);return b(e,i,t&&t.key,t&&t.ref,null)}function b(e,t,n,a,i){var o={type:e,props:t,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:i};return null==i&&(o.__v=o),r.vnode&&r.vnode(o),o}function f(){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 C(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 C(e)}}function x(e){(!e.__d&&(e.__d=!0)&&i.push(e)&&!o++||l!==r.debounceRendering)&&((l=r.debounceRendering)||s)(k)}function k(){for(var e;o=i.length;)e=i.sort((function(e,t){return e.__v.__b-t.__v.__b})),i=[],e.some((function(e){var t,n,r,a,i,o,s;e.__d&&(o=(i=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=m({},i)).__v=r,a=j(s,i,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==o?S(i):o),L(n,i),a!=o&&C(i)))}))}function I(e,t,n,r,a,i,o,s,l){var d,c,h,m,v,b,f,y=n&&n.__k||p,w=y.length;if(s==u&&(s=null!=i?i[0]:w?S(n,0):null),d=0,t.__k=O(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(h=y[d])||h&&n.key==h.key&&n.type===h.type)y[d]=void 0;else for(c=0;c<w;c++){if((h=y[c])&&n.key==h.key&&n.type===h.type){y[c]=void 0;break}h=null}if(m=j(e,n,h=h||u,r,a,i,o,s,l),(c=n.ref)&&h.ref!=c&&(f||(f=[]),h.ref&&f.push(h.ref,null,n),f.push(c,n.__c||m,n)),null!=m){var p;if(null==b&&(b=m),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(i==h||m!=s||null==m.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(m),p=null;else{for(v=s,c=0;(v=v.nextSibling)&&c<w;c+=2)if(v==m)break e;e.insertBefore(m,s),p=s}"option"==t.type&&(e.value="")}s=void 0!==p?p:m.nextSibling,"function"==typeof t.type&&(t.__d=s)}else s&&h.__e==s&&s.parentNode!=e&&(s=S(h))}return d++,n})),t.__e=b,null!=i&&"function"!=typeof t.type)for(d=i.length;d--;)null!=i[d]&&g(i[d]);for(d=w;d--;)null!=y[d]&&A(y[d],y[d]);if(f)for(d=0;d<f.length;d++)D(f[d],f[++d],f[++d])}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?b(null,e,null,null,e):null!=e.__e||null!=e.__c?b(e.type,e.props,e.key,null,e.__v):e):e);return n}function F(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===h.test(t)?n+"px":null==n?"":n}function M(e,t,n,r,a){var i,o,s,l,d;if(a?"className"===t&&(t="class"):"class"===t&&(t="className"),"style"===t)if(i=e.style,"string"==typeof n)i.cssText=n;else{if("string"==typeof r&&(i.cssText="",r=null),r)for(l in r)n&&l in n||F(i,l,"");if(n)for(d in n)r&&n[d]===r[d]||F(i,d,n[d])}else"o"===t[0]&&"n"===t[1]?(o=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,T,o),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,T,o)):"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 T(e){this.l[e.type](r.event?r.event(e):e)}function j(e,t,n,a,i,o,s,l,d){var c,u,p,h,g,v,b,f,S,C,x=t.type;if(void 0!==t.constructor)return null;(c=r.__b)&&c(t);try{e:if("function"==typeof x){if(f=t.props,S=(c=x.contextType)&&a[c.__c],C=c?S?S.props.value:c.__:a,n.__c?b=(u=t.__c=n.__c).__=u.__E:("prototype"in x&&x.prototype.render?t.__c=u=new x(f,C):(t.__c=u=new w(f,C),u.constructor=x,u.render=E),S&&S.sub(u),u.props=f,u.state||(u.state={}),u.context=C,u.__n=a,p=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=x.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=m({},u.__s)),m(u.__s,x.getDerivedStateFromProps(f,u.__s))),h=u.props,g=u.state,p)null==x.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==x.getDerivedStateFromProps&&f!==h&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(f,C),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(f,u.__s,C)||t.__v===n.__v&&!u.__){for(u.props=f,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),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(f,u.__s,C),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(h,g,v)}))}u.context=C,u.props=f,u.state=u.__s,(c=r.__r)&&c(t),u.__d=!1,u.__v=t,u.__P=e,c=u.render(u.props,u.state,u.context),t.__k=null!=c&&c.type==y&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=u.getChildContext&&(a=m(m({},a),u.getChildContext())),p||null==u.getSnapshotBeforeUpdate||(v=u.getSnapshotBeforeUpdate(h,g)),I(e,t,n,a,i,o,s,l,d),u.base=t.__e,u.__h.length&&s.push(u),b&&(u.__E=u.__=null),u.__e=!1}else null==o&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=_(n.__e,t,n,a,i,o,s,d);(c=r.diffed)&&c(t)}catch(e){t.__v=null,r.__e(e,t,n)}return t.__e}function L(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 _(e,t,n,r,a,i,o,s){var l,d,c,h,m,g=n.props,v=t.props;if(a="svg"===t.type||a,null!=i)for(l=0;l<i.length;l++)if(null!=(d=i[l])&&((null===t.type?3===d.nodeType:d.localName===t.type)||e==d)){e=d,i[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}),i=null,s=!1}if(null===t.type)g!==v&&e.data!=v&&(e.data=v);else{if(null!=i&&(i=p.slice.call(e.childNodes)),c=(g=n.props||u).dangerouslySetInnerHTML,h=v.dangerouslySetInnerHTML,!s){if(g===u)for(g={},m=0;m<e.attributes.length;m++)g[e.attributes[m].name]=e.attributes[m].value;(h||c)&&(h&&c&&h.__html==c.__html||(e.innerHTML=h&&h.__html||""))}(function(e,t,n,r,a){var i;for(i in n)"children"===i||"key"===i||i in t||M(e,i,null,n[i],r);for(i in t)a&&"function"!=typeof t[i]||"children"===i||"key"===i||"value"===i||"checked"===i||n[i]===t[i]||M(e,i,t[i],n[i],r)})(e,v,g,a,s),h?t.__k=[]:(t.__k=t.props.children,I(e,t,n,r,"foreignObject"!==t.type&&a,i,o,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 D(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,i,o;if(r.unmount&&r.unmount(e),(a=e.ref)&&(a.current&&a.current!==e.__e||D(a,null,t)),n||"function"==typeof e.type||(n=null!=(i=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(o=0;o<a.length;o++)a[o]&&A(a[o],t,n);null!=i&&g(i)}function E(e,t,n){return this.constructor(e,n)}function H(e,t,n){var a,i,o;r.__&&r.__(e,t),i=(a=n===d)?null:n&&n.__k||t.__k,e=v(y,null,[e]),o=[],j(t,(a?t:n||t).__k=e,i||u,u,void 0!==t.ownerSVGElement,n&&!a?[n]:i?null:p.slice.call(t.childNodes),o,n||u,a),L(o,e)}function P(e,t){H(e,t,d)}function R(e,t){var n,r;for(r in t=m(m({},e.props),t),arguments.length>2&&(t.children=p.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return b(e.type,n,t.key||e.key,t.ref||e.ref,null)}function $(e){var t={},n={__c:"__cC"+c++,__: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,x(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 x(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),x(this))},w.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x(this))},w.prototype.render=y,i=[],o=0,s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=u,c=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 i(){a.forEach((function(e){return e(r)}))}return{middleware:n,setState:function(e){r=t({},r,"function"==typeof e?e(r):e),i()},subscribe:function(e){return a.push(e),function(){a.splice(a.indexOf(e),1)}},getState:function(){return r},reset:function(){r=e,i()}}}},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 i=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 i(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 i(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var o=function(){return o=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},o.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 d=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 i(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 i=e[a];r[a]=l(i,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)(o({store:a},t,this.actions))},t}(r.Component),c=d;var u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(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=d},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 i in e){var o=e[i];a[i]=n(o,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),i=a;i.v1=r,i.v4=a,e.exports=i},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,i=n(5217),o=n(5327),s=0,l=0;e.exports=function(e,t,n){var d=t&&n||0,c=t||[],u=(e=e||{}).node||r,p=void 0!==e.clockseq?e.clockseq:a;if(null==u||null==p){var h=i();null==u&&(u=r=[1|h[0],h[1],h[2],h[3],h[4],h[5]]),null==p&&(p=a=16383&(h[6]<<8|h[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&&(p=p+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=p;var b=(1e4*(268435455&(m+=122192928e5))+g)%4294967296;c[d++]=b>>>24&255,c[d++]=b>>>16&255,c[d++]=b>>>8&255,c[d++]=255&b;var f=m/4294967296*1e4&268435455;c[d++]=f>>>8&255,c[d++]=255&f,c[d++]=f>>>24&15|16,c[d++]=f>>>16&255,c[d++]=p>>>8|128,c[d++]=255&p;for(var y=0;y<6;++y)c[d+y]=u[y];return t||o(c)}},1171:(e,t,n)=>{var r=n(5217),a=n(5327);e.exports=function(e,t,n){var i=t&&n||0;"string"==typeof e&&(t="binary"===e?new Array(16):null,e=null);var o=(e=e||{}).random||(e.rng||r)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t)for(var s=0;s<16;++s)t[i+s]=o[s];return t||a(o)}},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 i=r.match(/#(\w+)/);return i&&n[i[1]]&&(r=r.replace(i[0],`#${n[i[1]]}`)),(r=r.replace(/^(\s*)/,"$1"+t+" "))+a}))}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.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:()=>Kc});n(1181);var e,t,a,i=n(6400),o=(n(5202),0),s=[],l=i.options.__r,d=i.options.diffed,c=i.options.__c,u=i.options.unmount;function p(e,n){i.options.__h&&i.options.__h(t,e,o||n),o=0;var r=t.__H||(t.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function h(e){return o=1,m(I,e)}function m(n,r,a){var i=p(e++,2);return i.__c||(i.__c=t,i.__=[a?a(r):I(void 0,r),function(e){var t=n(i.__[0],e);i.__[0]!==t&&(i.__[0]=t,i.__c.setState({}))}]),i.__}function g(n,r){var a=p(e++,3);!i.options.__s&&k(a.__H,r)&&(a.__=n,a.__H=r,t.__H.__h.push(a))}function v(n,r){var a=p(e++,4);!i.options.__s&&k(a.__H,r)&&(a.__=n,a.__H=r,t.__h.push(a))}function b(e){return o=5,y((function(){return{current:e}}),[])}function f(e,t,n){o=6,v((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function y(t,n){var r=p(e++,7);return k(r.__H,n)?(r.__H=n,r.__h=t,r.__=t()):r.__}function w(n){var r=t.context[n.__c],a=p(e++,9);return a.__c=n,r?(null==a.__&&(a.__=!0,r.sub(t)),r.props.value):n.__}function S(){s.some((function(e){if(e.__P)try{e.__H.__h.forEach(C),e.__H.__h.forEach(x),e.__H.__h=[]}catch(t){return e.__H.__h=[],i.options.__e(t,e.__v),!0}})),s=[]}function C(e){e.t&&e.t()}function x(e){var t=e.__();"function"==typeof t&&(e.t=t)}function k(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function I(e,t){return"function"==typeof t?t(e):t}function O(e,t){for(var n in t)e[n]=t[n];return e}function F(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}i.options.__r=function(n){l&&l(n),e=0,(t=n.__c).__H&&(t.__H.__h.forEach(C),t.__H.__h.forEach(x),t.__H.__h=[])},i.options.diffed=function(e){d&&d(e);var t=e.__c;if(t){var n=t.__H;n&&n.__h.length&&(1!==s.push(t)&&a===i.options.requestAnimationFrame||((a=i.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(S))}},i.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(C),e.__h=e.__h.filter((function(e){return!e.__||x(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],i.options.__e(n,e.__v)}})),c&&c(e,t)},i.options.unmount=function(e){u&&u(e);var t=e.__c;if(t){var n=t.__H;if(n)try{n.__.forEach((function(e){return e.t&&e.t()}))}catch(e){i.options.__e(e,t.__v)}}};var M=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 F(this.props,e)||F(this.state,t)},r}(i.Component);function T(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:F(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,i.createElement)(e,O({},t))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(e.displayName||e.name)+")",r.t=!0,r}var j=i.options.__b;i.options.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),j&&j(e)};var L=function(e,t){return e?(0,i.toChildArray)(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},_={map:L,forEach:L,count:function(e){return e?(0,i.toChildArray)(e).length:0},only:function(e){if(1!==(e=(0,i.toChildArray)(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:i.toChildArray},D=i.options.__e;function A(e){return e&&((e=O({},e)).__c=null,e.__k=e.__k&&e.__k.map(A)),e}function E(){this.__u=0,this.o=null,this.__b=null}function H(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function P(){this.i=null,this.l=null}i.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);D(e,t,n)},(E.prototype=new i.Component).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=H(n.__v),a=!1,i=function(){a||(a=!0,r?r(o):o())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){i(),t.__c&&t.__c()};var o=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(i,i)},E.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=A(this.__b),this.__b=null),[(0,i.createElement)(i.Component,null,t.u?null:e.children),t.u&&e.fallback]};var R=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]}};(P.prototype=new i.Component).u=function(e){var t=this,n=H(t.__v),r=t.l.get(e);return r[0]++,function(a){var i=function(){t.props.revealOrder?(r.push(a),R(t,e,r)):a()};n?n(i):i()}},P.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,i.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},P.prototype.componentDidUpdate=P.prototype.componentDidMount=function(){var e=this;e.l.forEach((function(t,n){R(e,n,t)}))};var $=function(){function e(){}var t=e.prototype;return t.getChildContext=function(){return this.props.context},t.render=function(e){return e.children},e}();function N(e){var t=this,n=e.container,r=(0,i.createElement)($,{context:t.context},e.vnode);return t.s&&t.s!==n&&(t.v.parentNode&&t.s.removeChild(t.v),(0,i._unmount)(t.h),t.p=!1),e.vnode?t.p?(n.__k=t.__k,(0,i.render)(r,n),t.__k=n.__k):(t.v=document.createTextNode(""),(0,i.hydrate)("",n),n.appendChild(t.v),t.p=!0,t.s=n,(0,i.render)(r,n,t.v),t.__k=t.v.__k):t.p&&(t.v.parentNode&&t.s.removeChild(t.v),(0,i._unmount)(t.h)),t.h=r,t.componentWillUnmount=function(){t.v.parentNode&&t.s.removeChild(t.v),(0,i._unmount)(t.h)},null}var V=/^(?: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]/;i.Component.prototype.isReactComponent={};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function B(e,t,n){if(null==t.__k)for(;t.firstChild;)t.removeChild(t.firstChild);return(0,i.render)(e,t),"function"==typeof n&&n(),e?e.__c:null}var W=i.options.event;function U(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}})}i.options.event=function(e){W&&(e=W(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 q={configurable:!0,get:function(){return this.class}},Y=i.options.vnode;i.options.vnode=function(e){e.$$typeof=z;var t=e.type,n=e.props;if(t){if(n.class!=n.className&&(q.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",q)),"function"!=typeof t){var r,a,o;for(o in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===t&&((0,i.toChildArray)(n.children).forEach((function(e){-1!=n.value.indexOf(e.props.value)&&(e.props.selected=!0)})),delete n.value),n)if(r=V.test(o))break;if(r)for(o in a=e.props={},n)a[V.test(o)?o.replace(/[A-Z0-9]/,"-$&").toLowerCase():o]=n[o]}!function(t){var n=e.type,r=e.props;if(r&&"string"==typeof n){var a={};for(var i in r)/^on(Ani|Tra|Tou)/.test(i)&&(r[i.toLowerCase()]=r[i],delete r[i]),a[i.toLowerCase()]=i;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 o=a.oninput||"oninput";r[o]||(r[o]=r[a.onchange],delete r[a.onchange])}}}(),"function"==typeof t&&!t.m&&t.prototype&&(U(t.prototype,"componentWillMount"),U(t.prototype,"componentWillReceiveProps"),U(t.prototype,"componentWillUpdate"),t.m=!0)}Y&&Y(e)};function Z(e){return!!e&&e.$$typeof===z}const K={useState:h,useReducer:m,useEffect:g,useLayoutEffect:v,useRef:b,useImperativeHandle:f,useMemo:y,useCallback:function(e,t){return o=8,y((function(){return e}),t)},useContext:w,useDebugValue:function(e,t){i.options.useDebugValue&&i.options.useDebugValue(t?t(e):e)},version:"16.8.0",Children:_,render:B,hydrate:B,unmountComponentAtNode:function(e){return!!e.__k&&((0,i.render)(null,e),!0)},createPortal:function(e,t){return(0,i.createElement)(N,{vnode:e,container:t})},createElement:i.createElement,createContext:i.createContext,createFactory:function(e){return i.createElement.bind(null,e)},cloneElement:function(e){return Z(e)?i.cloneElement.apply(null,arguments):e},createRef:i.createRef,Fragment:i.Fragment,isValidElement:Z,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:i.Component,PureComponent:M,memo:T,forwardRef:function(e){function t(t){var n=O({},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:E,SuspenseList:P,lazy:function(e){var t,n,r;function a(a){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,i.createElement)(n,a)}return a.displayName="Lazy",a.t=!0,a}};var G=n(7867),X=n(5877);const Q=()=>({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})}});var J=n(7292);function ee(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let te;!function(e){e[e.DISABLED=0]="DISABLED",e[e.TRANSACTIONS=1]="TRANSACTIONS",e[e.PAYLOAD=2]="PAYLOAD",e[e.FULL_DETAIL=3]="FULL_DETAIL"}(te||(te={}));class ne{static debug(e){ne.logLevel!==te.DISABLED&&(e.level1||e.level2||e.level3)&&console.log(...this.constructLogPayload(e))}static warn(e){ne.logLevel!==te.DISABLED&&(e.level1||e.level2||e.level3)&&console.warn(...this.constructLogPayload(e))}static error(e){ne.logLevel!==te.DISABLED&&(e.level1||e.level2||e.level3)&&console.error(...this.constructLogPayload(e))}}ee(ne,"logLevel",te.DISABLED),ee(ne,"constructLogPayload",(e=>{const t=["AtomicSDK Web -"];return ne.logLevel>=te.TRANSACTIONS&&e.level1&&t.push(...e.level1),ne.logLevel>=te.PAYLOAD&&e.level2&&t.push(...e.level2),ne.logLevel>=te.FULL_DETAIL&&e.level3&&t.push(...e.level3),t}));var re=n(4798),ae=n.n(re),ie=n(1042);const oe={application:{open:!1,windowOrigin:null,streamContainerId:"",containerInstanceId:"",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 se;const le=(e,t)=>{var n,r,a;let{streamContainerId:i,instanceId:o,windowOrigin:s,subviewCardInstance:l,startingLayoutId:d,cardInstances:c,cardListRefreshInterval:u,runtimeVariableResolutionTimeout:p,embedMode:h,customStrings:m,cardListTutorialSeen:g,features:v,firstLoadStyles:b,enabledUiElements:f,interfaceStyle:y,horizontalContainerConfig:w,cardMinimumHeight:S,cardMaximumWidth:C,cardHorizontalAlignment:x,modalContainerPositioning:k,modalContainerVerticalPadding:I}=e;const O=t&&t.length?(0,ie.m)(...t):null,F="preview"===h,M=null==v?void 0:v.runtimeVariableAnalytics;return se=ae()(Object.assign(Object.assign({},oe),{application:Object.assign(Object.assign({},oe.application),{isPreview:F,streamContainerId:void 0!==i?i:oe.application.streamContainerId,containerInstanceId:void 0!==o?o:oe.application.containerInstanceId,windowOrigin:s||oe.application.windowOrigin,cardListRefreshInterval:void 0!==u?u:oe.application.cardListRefreshInterval,runtimeVariableResolutionTimeout:void 0!==p?p:oe.application.runtimeVariableResolutionTimeout,embedMode:h,customStrings:m||oe.application.customStrings,cardLimit:"single-card"===h||"modal-stream"===h?1:void 0,firstLoadStyles:{backgroundColor:(null==b?void 0:b.backgroundColor)||oe.application.firstLoadStyles.backgroundColor,textColor:(null==b?void 0:b.textColor)||oe.application.firstLoadStyles.textColor,loadingSpinnerColor:(null==b?void 0:b.loadingSpinnerColor)||oe.application.firstLoadStyles.loadingSpinnerColor,buttonTextColor:(null==b?void 0:b.buttonTextColor)||oe.application.firstLoadStyles.buttonTextColor},enabledUiElements:{cardListToast:null===(n=null==f?void 0:f.cardListToast)||void 0===n||n,customToastContainer:null!==(r=null==f?void 0:f.customToastContainer)&&void 0!==r&&r,toastConfig:null==f?void 0:f.toastConfig,cardListHeader:null===(a=null==f?void 0:f.cardListHeader)||void 0===a||a,customContainerHeader:null==f?void 0:f.customContainerHeader},interfaceStyle:void 0!==y?y:"automatic"}),navigationStack:{items:l&&d?[{cardInstance:l,cardInstanceId:l.instance.id,subviewId:d,kind:"subview"}]:oe.navigationStack.items},cardFeed:Object.assign(Object.assign({},oe.cardFeed),{cardInstances:c||oe.cardFeed.cardInstances,tutorialSeen:void 0===g||g,runtimeVariableAnalyticsEnabled:void 0!==M&&M,cardVoting:null==v?void 0:v.cardVoting,cardMaximumWidth:Yd(C),cardMinimumHeight:null!=S?S:null==v?void 0:v.cardMinimumHeight,cardHorizontalAlignment:x,horizontalContainerConfig:null!=w?w:null==v?void 0:v.horizontalContainerConfig,modalContainerPositioning:k,modalContainerVerticalPadding:Yd(I)})}),O),se},de=()=>{if(!se)throw new Error("You must initialise the store before accessing it.");return se},ce="YYYY-MM-DD[T]HH:mm:ssZZ",ue=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,pe=20,he=20,me=20,ge=20,ve="displayedCards",be="cardDescription",fe="headline",ye="text",we="list",Se="image",Ce="video",xe="textInput",ke="numberInput",Ie="datePicker",Oe="dropdown",Fe="checkbox",Me="stepper",Te="switch",je="upload",Le="form",_e="actionButtonGroup",De="submitButton",Ae="linkButton",Ee="dismissButton",He="snoozeButton",Pe="voteUpButton",Re="voteDownButton";var $e=n(5576);const Ne=()=>({handleSubviewLinkPress:(e,t,n)=>Ve(e,t,n),finishSubview:e=>ze(e),viewMedia(e,t,n){if(e.application.isPreview)return e;if(!n||!n.url||0===n.url.trim().length)return e;return Ue(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,i=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]),i&&(null===(n=i.subviews)||void 0===n||delete n[r.subviewId]),e.application.isPreview||window.AtomicUploadService.removeFilesForCardSubview(e.application.containerInstanceId,r.cardInstanceId,r.subviewId);return Object.assign(Object.assign({},qe(e)),{cardResponses:Object.assign(Object.assign({},e.cardResponses),a?{[r.cardInstanceId]:a}:{}),validationStates:Object.assign(Object.assign({},e.validationStates),i?{[r.cardInstanceId]:i}:{}),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,r){if(e.application.isPreview)return e;const a=Object.assign({kind:"snooze",cardInstanceId:t,source:n},r?{cardExpiry:r}:{});return Ue(e,a)},requestFeedback(e,t,n){if(e.application.isPreview)return e;const r={kind:"feedback",cardInstanceId:t,sentiment:n.sentiment,textFeedback:n.textFeedback,textFeedbackLabel:n.textFeedbackLabel,source:n.source};return Ue(e,r)}}),Ve=(e,t,n)=>{const r=e.cardFeed.cardInstances;if(r){const a=r.find((e=>e.instance.id===t)),i=a&&a.subviews[n];if(a&&i){const t={kind:"subview",cardInstance:a,cardInstanceId:a.instance.id,subviewId:n};return Ue(e,t)}}return e},ze=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 Be;const We=()=>(Be||(Be=(0,G.kv)((0,G.Y2)(Ne),de())),Be),Ue=(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]}})},qe=e=>{const t=e.navigationStack.items.slice();return t.pop(),Object.assign(Object.assign({},e),{navigationStack:{items:t}})},Ye=e=>e.navigationStack.items.length?e.navigationStack.items[e.navigationStack.items.length-1]:null;function Ze(e){return void 0!==e&&"subview"===e.kind}function Ke(e){return void 0!==e&&"snooze"===e.kind}function Ge(e){return void 0!==e&&"feedback"===e.kind}function Xe(e){return void 0!==e&&"media"===e.kind}var Qe=n(2807),Je=n.n(Qe);const et=e=>Object.keys(e).filter((t=>e[t])).join(" "),tt=(e,t)=>{const n=((e,t)=>Je()(new Date(t,e-1)))(e,t),r=new Date(t,e-1,1).getDay()||7,a={week1:[],week2:[],week3:[],week4:[],week5:[],week6:[]};for(let i=0;i<n;i++){const n=new Date(t,e-1,i+1),o=Math.ceil((r+i)/7)-1,s=(r-1+i)%7+1;a[`week${Math.ceil((r+i)/7)}`].push({date:n,row:o,col:s,style:{gridRowStart:o,gridColumnStart:s}})}return a},nt=(e,t)=>{let{isMax:n,isMin:r}=t;const a=new Date(e);return n?(0,J.endOfDay)((0,J.addMinutes)(a,a.getTimezoneOffset())):r?(0,J.addMinutes)(a,a.getTimezoneOffset()):a};var rt=n(5616),at=n.n(rt),it=n(623),ot=n.n(it);const st={required:"This field is required",minimumDate:e=>`Value must be after ${e}`,maximumDate:e=>`Value must be before ${e}`,regexp:"Value does not meet requirements",minimum:e=>`Value must be at least ${e}`,maximum:e=>`Value must be no more than ${e}`,minimumLength:e=>1===e?"Value must be at least 1 character":`Value must be at least ${e} characters`,maximumLength:e=>1===e?"Value must be no more than 1 character":`Value must be no more than ${e} characters`,minChecked:(e,t)=>1===t?"This option must be checked":1===e?"You must select at least one option":`At least ${e} options must be selected`,maxChecked:e=>1===e?"You cannot select more than one option":`You cannot select more than ${e} options`},lt={required:(e,t)=>{const n=e.errorMessage||st.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=nt(e.minimumDate,{isMin:!0}),r=e.errorMessage||st.minimumDate(at()(n,"DD MMM YYYY"));if(null==t||null==t)return{type:"invalid",errorMessage:r};const a=new Date(t);return!ot()(a)||a<n?{type:"invalid",errorMessage:r}:{type:"valid"}},maximumDate:(e,t)=>{const n=nt(e.maximumDate,{isMax:!0}),r=e.errorMessage||st.maximumDate(at()(n,"DD MMM YYYY"));if(null==t||null==t)return{type:"invalid",errorMessage:r};const a=new Date(t);return!ot()(a)||a>n?{type:"invalid",errorMessage:r}:{type:"valid"}},regexp:(e,t)=>{const n=e.errorMessage||st.regexp;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||st.minimum(e.minimum);return null==t||null==t||t<e.minimum?{type:"invalid",errorMessage:n}:{type:"valid"}},maximum:(e,t)=>{const n=e.errorMessage||st.maximum(e.maximum);return null==t||null==t||t>e.maximum?{type:"invalid",errorMessage:n}:{type:"valid"}},minimumLength:(e,t)=>{const n=e.errorMessage||st.minimumLength(e.minimumLength);return null==t||null==t||t.length<e.minimumLength?{type:"invalid",errorMessage:n}:{type:"valid"}},maximumLength:(e,t)=>{const n=e.errorMessage||st.maximumLength(e.maximumLength);return null==t||null==t?{type:"valid"}:t.length>e.maximumLength?{type:"invalid",errorMessage:n}:{type:"valid"}},minChecked:(e,t)=>{const n=e.errorMessage||st.minChecked(e.minChecked,Object.keys(t).length);return null==t||null==t||Object.values(t).filter((e=>e)).length<e.minChecked?{type:"invalid",errorMessage:n}:{type:"valid"}},maxChecked:(e,t)=>{const n=e.errorMessage||st.maxChecked(e.maxChecked);return null==t||null==t||Object.values(t).filter((e=>e)).length>e.maxChecked?{type:"invalid",errorMessage:n}:{type:"valid"}},maxSizeBytes:(e,t)=>{const n=Math.round(e.maxSizeBytes/1048576),r=e.errorMessage||`File size must be no more than ${n}MB`;return null==t||null==t?{type:"valid"}:t.size&&t.size>e.maxSizeBytes?{type:"invalid",errorMessage:r}:{type:"valid"}}},dt=["required","minimumLength","maximumLength","minimum","maximum","minimumDate","maximumDate","minChecked","maxChecked","maxSizeBytes","regexp"],ct=(e,t)=>{if(!t)return{type:"valid"};for(const n in dt){const r=dt[n],a=t[r];if(void 0===a)continue;const i=lt[r];if(i){const t=i(a.attributes,e);if("invalid"===t.type)return t}}return{type:"valid"}},ut=()=>({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?Ve(e,t,n.layoutId):n.payload&&!e.application.isPreview?ht(e,"payload","image",t,r,n.payload,a):e},handleLinkButtonPress(e,t,n,r,a){const i=e.navigationStack.items.length?"subview":"topview";return r?Ve(e,t,r):a&&!e.application.isPreview?ht(e,"payload","linkButton",t,i,a,n):e},handleSubmitButtonPayload(e,t,n,r){const a=e.navigationStack.items.length?"subview":"topview";return ht(e,"payload","submitButton",t,a,r,n)},openExternalUrl:(e,t,n,r,a,i,o)=>(null==o?void 0:o.url)&&!e.application.isPreview?mt(e,a,i,t,n,o,r):e,handleFormChange:(e,t,n,r,a)=>pt(e,t,{[n]:r},a),createResponseWithDefaults:(e,t,n,r)=>pt(e,t,n,r),clearCardForm(e,t){var n,r;return Object.assign(Object.assign({},e),{cardResponses:Object.assign(Object.assign({},e.cardResponses),{[t]:Object.assign(Object.assign({},(null===(n=e.cardResponses[t])||void 0===n?void 0:n.responses)?{responses:{}}:{}),(null===(r=e.cardResponses[t])||void 0===r?void 0:r.subviews)?{subviews:{}}:{})})})},validateField(e,t,n,r,a,i){var o,s,l,d;let c=ct(r,a);const u=c&&!i?{[n]:c}:{},p=c&&i?{[n]:c}:{},h=e.validationStates,m=null!==(o=null===(l=h[t])||void 0===l?void 0:l.validations)&&void 0!==o?o:{},g=null!==(s=null===(d=h[t])||void 0===d?void 0:d.subviews)&&void 0!==s?s:{};return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},h),{[t]:{validations:Object.assign(Object.assign({},m),u),subviews:Object.assign(Object.assign({},g),p&&i?{[i]:Object.assign(Object.assign({},g[i]),p)}:{})}})})},validateFieldCustomResult(e,t,n,r,a){var i,o,s,l;const d=r&&!a?{[n]:r}:{},c=r&&a?{[n]:r}:{},u=e.validationStates,p=null!==(i=null===(s=u[t])||void 0===s?void 0:s.validations)&&void 0!==i?i:{},h=null!==(o=null===(l=u[t])||void 0===l?void 0:l.subviews)&&void 0!==o?o:{};return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},u),{[t]:{validations:Object.assign(Object.assign({},p),d),subviews:Object.assign(Object.assign({},h),c&&a?{[a]:Object.assign(Object.assign({},h[a]),c)}:{})}})})},validateCurrentSubview(e,t){const n=Ye(e);if(n&&Ze(n)){const r=n.subviewId,a=n.cardInstance.subviews[r],i=gt(e,a.nodes,t,r);let o=e.validationStates;return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},o),{[t]:Object.assign(Object.assign({},e.validationStates[t]),{subviews:{[r]:i}})})})}return e},validateCardTopLevel(e,t){const[n]=e.cardFeed.cardInstances.filter((e=>e.instance.id===t));let r={};return n&&(r=gt(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})})})}}),pt=(e,t,n,r)=>{var a;const i=e.cardResponses[t]||{},o=r?null===(a=i.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({},i.responses),r?{}:n),subviews:Object.assign(Object.assign({},i.subviews),r?{[r]:Object.assign(Object.assign({},o),n)}:{})}})})},ht=(e,t,n,r,a,i,o)=>Object.assign(Object.assign({},e),{externalAction:Object.assign({actionId:(new Date).getTime(),linkMethod:t,trigger:n,cardInstanceId:r,cardViewState:a,subviewData:o},i?{payload:{actionPayload:i,cardInstanceId:r,streamContainerId:e.application.streamContainerId}}:{})}),mt=(e,t,n,r,a,i,o)=>Object.assign(Object.assign({},e),{externalAction:{actionId:(new Date).getTime(),linkMethod:t,trigger:n,urlLink:i,cardInstanceId:r,cardViewState:a,subviewData:o}}),gt=(e,t,n,r)=>{var a;const i=Kd(t),o=r?null===(a=e.cardResponses[n].subviews)||void 0===a?void 0:a[r]:e.cardResponses[n].responses;let s={};for(const e in i){const t=i[e];t.attributes.name&&o&&(s[t.attributes.name]=ct(o[t.attributes.name],t.validations))}return s};let vt;const bt=()=>(vt||(vt=(0,G.kv)((0,G.Y2)(ut),de())),vt),ft=(e,t,n)=>{var r,a;const i=de().getState().cardResponses,o=null===(r=i[e])||void 0===r||null===(a=r.responses)||void 0===a?void 0:a[t];return null!=o?o:n?null===(s=i[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},yt="card-displayed",wt="user-redirected",St="card-voted-up",Ct="card-voted-down",xt="runtime-vars-updated",kt="stream-displayed",It="snooze-options-displayed",Ot="snooze-options-canceled",Ft="card-subview-displayed",Mt="card-subview-exited",Tt="video-played",jt="video-completed",Lt="user-file-uploads-started",_t="user-file-uploads-completed",Dt="user-file-uploads-failed";var At=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))},Et=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 Ht(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Pt="AACUploadFailedError",Rt="AACUploadSignedUrlFailedError",$t="AACNoFileToUploadError",Nt="AACUploadCancelledError",Vt="Couldn't upload file(s)",zt="Couldn't upload file(s)",Bt="No files to upload",Wt="File upload cancelled";class Ut{constructor(){Ht(this,"_fileStorage",void 0),Ht(this,"_uploadQueue",void 0),this._fileStorage=new Map,this._uploadQueue=new Map,Ut._instance=this}static getInstance(){return Ut._instance||(Ut._instance=new Ut),Ut._instance}storeFile(e,t,n,r,a,i,o,s,l){var d,c,u,p;(this._fileStorage.get(a)||this._fileStorage.set(a,new Map),null===(d=this._fileStorage.get(a))||void 0===d?void 0:d.get(r))||(null===(p=this._fileStorage.get(a))||void 0===p||p.set(r,{topLevel:new Map,subviews:{}}));l&&!(null===(c=this._fileStorage.get(a))||void 0===c||null===(u=c.get(r))||void 0===u?void 0:u.subviews[l])&&(this._fileStorage.get(a).get(r).subviews[l]=new Map);const h={file:e,type:t,targetBucketId:n,destinationFilename:i,convertImage:o,size:e.size,uploaded:!1};l?this._fileStorage.get(a).get(r).subviews[l].set(s,h):this._fileStorage.get(a).get(r).topLevel.set(s,h)}getFile(e,t,n,r){var a,i,o,s,l,d;return r?(null===(s=this._fileStorage.get(e))||void 0===s||null===(l=s.get(t))||void 0===l||null===(d=l.subviews[r])||void 0===d?void 0:d.get(n))||null:(null===(a=this._fileStorage.get(e))||void 0===a||null===(i=a.get(t))||void 0===i||null===(o=i.topLevel)||void 0===o?void 0:o.get(n))||null}getAllFilesForCard(e,t){var n;return(null===(n=this._fileStorage.get(e))||void 0===n?void 0:n.get(t))||null}removeFile(e,t,n,r){var a,i,o,s,l,d,c,u;return r?null!==(a=null===(d=this._fileStorage.get(e))||void 0===d||null===(c=d.get(t))||void 0===c||null===(u=c.subviews[r])||void 0===u?void 0:u.delete(n))&&void 0!==a&&a:null!==(i=null===(o=this._fileStorage.get(e))||void 0===o||null===(s=o.get(t))||void 0===s||null===(l=s.topLevel)||void 0===l?void 0:l.delete(n))&&void 0!==i&&i}removeAllFilesForCard(e,t){var n;null===(n=this._fileStorage.get(e))||void 0===n||n.delete(t)}removeFilesForCardSubview(e,t,n){var r,a;null===(r=this._fileStorage.get(e))||void 0===r||(null===(a=r.get(t))||void 0===a||delete a.subviews[n])}removeFilesForContainer(e){this._fileStorage.delete(e)}getIsUploadingStatus(e){var t;const n=null===(t=this._uploadQueue.get(e))||void 0===t?void 0:t.size;return!!n&&n>0}uploadFile(e,t,n,r,a){return At(this,void 0,void 0,(function*(){return new Promise(((i,o)=>At(this,void 0,void 0,(function*(){var s;const{file:l,targetBucketId:d,destinationFilename:c}=n,u=null===(s=this._uploadQueue.get(t))||void 0===s?void 0:s.get(e);let p=!1;const h=new Error(Wt);h.name=Nt,u&&(u.uploadRequests[r]={abort:()=>{p=!0,ne.debug({level1:[`File upload for card: ${e} in container instance: ${t} was cancelled`,c]}),o({error:h,fieldname:r,filename:c})}});let m=`get-file-upload-url?filename=${encodeURIComponent(c)}&targetBucketId=${d}&card_instance_id=${e}`;n.convertImage&&(m+="&jpeg_convert=1");const{data:{uploadUrl:g},response:v}=yield Mc.get(m,a);if(p)return;if(v.error){ne.error({level1:["Failed to get upload URL",v.error]});const e=new Error(zt);return e.name=Rt,o({error:e,fieldname:r,filename:c})}const b=new XMLHttpRequest,f=new Error(Vt);f.name=Pt,b.onload=()=>{b.status>=200&&b.status<300?(ne.debug({level1:[`File upload for card: ${e} in container instance: ${t} was successful`,c]}),i(r)):(ne.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,c]}),o({error:f,fieldname:r,filename:c}))},b.onerror=()=>{ne.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,c]}),o({error:f,fieldname:r,filename:c})},b.onabort=()=>{ne.debug({level1:[`File upload for card: ${e} in container instance: ${t} was cancelled`,c]});const n=new Error(Wt);n.name=Nt,o({error:n,fieldname:r,filename:c})},u&&(u.uploadRequests[r]=b);try{b.open("PUT",g,!0);const e=new FormData;e.append("file",l,c),b.send(e.get("file"))}catch(n){ne.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,n]}),o({error:f,fieldname:r,filename:c})}}))))}))}uploadFilesForCard(e,t,n,r,a){return At(this,void 0,void 0,(function*(){var i,o,s,l,d,c;const u=null==a?void 0:a.subviewData,p=(null==u?void 0:u.subviewId)?null===(i=this._fileStorage.get(t))||void 0===i||null===(o=i.get(e))||void 0===o?void 0:o.subviews[u.subviewId]:null===(s=this._fileStorage.get(t))||void 0===s||null===(l=s.get(e))||void 0===l?void 0:l.topLevel;if(!p){const e=new Error(Bt);return e.name=$t,{success:!1,error:e}}this._uploadQueue.set(t,(new Map).set(e,{cancelSubmitCallback:null==a?void 0:a.cancelSubmitCallback,uploadRequests:[]}));const h=[];for(const[e,t]of p)t.uploaded||h.push(Object.assign(Object.assign({},t),{fieldname:e}));const m=Object.assign({},(null==u?void 0:u.subviewId)?{subviewId:u.subviewId,subviewTitle:u.subviewTitle,subviewLevel:1}:{}),g=Object.assign({},m),v=h.map((r=>{const{fieldname:a}=r,i=Et(r,["fieldname"]);if(g[a]={filename:i.destinationFilename,targetBucketId:i.targetBucketId},"image"===i.type)return this.uploadFile(e,t,i,a,n)})),b={success:!1};return r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Lt,properties:g}),yield Promise.allSettled(v).then((n=>{const a=[],i=[],o=Object.assign({},m),s=Object.assign({},m),l=n=>{var r,a,i,o,s;return(null==u?void 0:u.subviewId)?null===(r=this._fileStorage.get(t))||void 0===r||null===(a=r.get(e))||void 0===a||null===(i=a.subviews[u.subviewId])||void 0===i?void 0:i.get(n):null===(o=this._fileStorage.get(t))||void 0===o||null===(s=o.get(e))||void 0===s?void 0:s.topLevel.get(n)};n.forEach((n=>{var r;if("fulfilled"===n.status&&(null===(r=this._fileStorage.get(t))||void 0===r?void 0:r.get(e))){const e=l(n.value);e&&(e.uploaded=!0),o[n.value]={filename:null==e?void 0:e.destinationFilename,targetBucketId:null==e?void 0:e.targetBucketId}}else if("rejected"===n.status){const e=n.reason;if(e.error.name===Nt)i.push(n.reason);else{a.push(e);const t=l(e.fieldname);s[e.fieldname]={filename:null==t?void 0:t.destinationFilename,targetBucketId:null==t?void 0:t.targetBucketId},b.error=e.error}}})),a.length||i.length||(ne.debug({level1:[`All files successfully uploaded for card: ${e} in container instance: ${t}`]}),r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:_t,properties:o}),b.success=!0),a.length&&(ne.error({level1:[`Failed to upload files for card: ${e} in container instance: ${t}`,...a]}),r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Dt,properties:s}),b.failedUploads=a),i.length&&(b.cancelledUploads=i)})),null===(d=this._uploadQueue.get(t))||void 0===d||d.delete(e),(null===(c=this._uploadQueue.get(t))||void 0===c?void 0:c.size)||this._uploadQueue.delete(t),b}))}cancelUploadForCard(e,t){return At(this,void 0,void 0,(function*(){var n,r,a;const i=null===(n=this._uploadQueue.get(e))||void 0===n?void 0:n.get(t);var o;i&&(Object.values(i.uploadRequests).forEach((e=>{e.abort()})),null===(o=i.cancelSubmitCallback)||void 0===o||o.call(i));null===(r=this._uploadQueue.get(e))||void 0===r||r.delete(t),(null===(a=this._uploadQueue.get(e))||void 0===a?void 0:a.size)||this._uploadQueue.delete(e)}))}cancelUploadsForContainer(e){return At(this,void 0,void 0,(function*(){const t=this._uploadQueue.get(e);t&&(t.forEach((e=>{var t;Object.values(e.uploadRequests).forEach((e=>{e.abort()})),null===(t=e.cancelSubmitCallback)||void 0===t||t.call(e)})),this._uploadQueue.delete(e))}))}}Ht(Ut,"_instance",void 0);Ut.getInstance();var qt=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};const Yt=(e,t)=>e?Object.keys(e).reduce(((n,r)=>{const a=e[r];return t.includes(a||"")||(n[r]=e[r]),n}),{}):e,Zt=e=>Yt(e,["submitted","dismissed","snoozed","submitted-subview","centering"]),Kt=(e,t,n)=>{var r,a;const i=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),i&&{[i]:n})},Gt=(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]),Xt=function(){let e=Number(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0);return""+ ++e},Qt=(e,t,n)=>{var r;if(!n)return e;switch(n.name){case yc.noInternet:return"No internet connection";case Pt:case $t:case Rt:return(null==t||null===(r=t.toastMessages)||void 0===r?void 0:r.fileUploadFailed)||n.message;default:return e}},Jt=(e,t)=>{var n;return((null===(n=t.application.enabledUiElements.toastConfig)||void 0===n?void 0:n.toastMessages)||{})[e]},en=(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:Xt(e.messages.lastMessageId),cardList:void 0,subview:void 0}}},tn=()=>({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?en(e):e.messages})},startCardFileUpload:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"uploading-files"})}),finishCardFileUpload:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:null})}),submittingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"submitting"})}),submittedCard(e,t,n){const r=Jt("submittedCard",e),a=Xt(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,i){const o=Yt(e.cardStates,["centering","fixed-position"]),s=Xt(e.messages.lastMessageId),l=e.application.enabledUiElements.toastConfig,d=Object.assign({text:Qt("Couldn't submit",l,a),messageId:s,cardInstanceId:t,action:"submit-failed",responseValues:r},i||{});return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},o),{[t]:null}),messages:Object.assign(Object.assign({},n?{subview:d}:{cardList:d}),{lastMessageId:s})})},dismissingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"dismissing"})}),dismissedCard(e,t){const n=Jt("dismissedCard",e),r=Xt(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=Yt(e.cardStates,["centering","fixed-position"]),i=Xt(e.messages.lastMessageId),o=e.application.enabledUiElements.toastConfig;return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},a),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:Qt("Couldn't dismiss",o,r),messageId:i,cardInstanceId:t,action:"dismiss-failed",source:n},lastMessageId:i})})},snoozingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"snoozing"})}),snoozedCard(e,t,n){const r=Jt("snoozedCard",e),a=Xt(e.messages.lastMessageId);let i;return i=(0,J.isToday)(n)?(0,J.format)(n,"h:mm A"):(0,J.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 ${i}`,messageId:a,cardInstanceId:t,action:"snoozed"},lastMessageId:a})})},failedToSnoozeCard(e,t,n,r,a){const i=Yt(e.cardStates,["centering","fixed-position"]),o=Xt(e.messages.lastMessageId),s=e.application.enabledUiElements.toastConfig;return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},i),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:Qt("Couldn't snooze",s,a),messageId:o,cardInstanceId:t,action:"snooze-failed",snoozeDate:n,source:r},lastMessageId:o})})},fixPositionRemainingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:e.cardFeed.cardInstances.length<=2?Kt(e,t,"fixed-position"):Yt(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?Kt(e,t,"centering"):Yt(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})},queueCardFeedDeltaUpdate:(e,t)=>Object.assign(Object.assign({},e),{pendingCardFeedUpdates:[...e.pendingCardFeedUpdates||[],...t]}),clearCardFeedDeltaUpdateQueue:e=>Object.assign(Object.assign({},e),{pendingCardFeedUpdates:[]}),applyCardFeedDeltaUpdate(e,t,n,r){return qt(this,void 0,void 0,(function*(){let a={cardFeed:{cardInstances:e.cardFeed.cardInstances,runtimeVariables:e.cardFeed.runtimeVariables},cardStates:e.cardStates,navigationStack:e.navigationStack},i=!1,o=[];if(t.forEach((t=>{switch(t.type){case"remove-card":{const{cardInstanceId:n,actionType:r}=t.data;if("limit"!==r&&(i=!0),e.application.isPreview)break;const o=a.cardFeed.cardInstances,s=e.application.isPreview?o:o.filter((e=>e.instance.id!==n));a.cardFeed.cardInstances=s;break}case"update-card":{const{cardInstance:e,actionType:n}=t.data;let r=!1;e.runtimeVariables&&o.push(e);const s=a.cardFeed.cardInstances.map((t=>(t.instance.id===e.instance.id&&(r=!0,t=Object.assign({},e)),t)));r||(i=!0,s.push(e)),"unsnooze"===n&&(a.cardStates[e.instance.id]=null),a.cardFeed.cardInstances=s;break}}})),o.length>0){const t=yield r(o),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:i,lastCardActiveTime:o,receivedAt:s}=t.metadata;let l=0;return l=n-i,0===l&&(l=new Date(o).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||i),"single-card"===e.application.embedMode&&(a.navigationStack={items:[]});const s=Yt(a.cardStates,["centering","fixed-position"]),l=Zt(s),d=Gt(e.cardFeed.cardInstances,a.cardFeed.cardInstances,l);return a.cardFeed.cardInstances=d,{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:a.cardFeed.cardInstances,runtimeVariables:a.cardFeed.runtimeVariables,tutorialSeen:e.cardFeed.tutorialSeen||d.length>0,updateId:(new Date).getTime(),status:{loaded:!0}}),cardStates:s,navigationStack:a.navigationStack}}))},clearMessage:(e,t)=>Object.assign(Object.assign({},e),{messages:en(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===yc.noInternet)n="noInternet";else n="apiError";return ne.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=Yt(e.cardStates,["centering","fixed-position"]),r=Zt(n),a=Gt(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})},setCardFeedOverlay:(e,t)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{displayingOverlay:t})}),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=>Xd(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===yc.noInternet)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=Jt("feedbackReceived",e),r=Xt(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 nn;const rn=()=>(nn||(nn=(0,G.kv)((0,G.Y2)(tn),de())),nn);var an=0,on=document.head.appendChild(document.createElement("style")).sheet;function sn(e,t){var n="p"+an++,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{on.insertRule(e,on.cssRules.length)}catch(e){}})),n}function ln(e,t){return t+"{"+e+"}"}function dn(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(ln(dn(a,!/^@/.test(r)).join(""),r))))}return t||(n[0]=ln(n[0],"")),n}const cn=function(e,t){var n={};return(t=t||{}).returnObject?{style:r,css:a}:r;function r(t){return function(n){return function(r,i){var o="function"==typeof n?n(r):n;return delete r.theme,r.class=[a(o),r.class].filter(Boolean).join(" "),e(t,r,r.children||[])}}}function a(e){var t=dn(e),r=t.join("");return n[r]||(n[r]=sn(t,"."))}}(i.h),un=function(e){return sn([ln(dn(e,1).join(""),"")],"@keyframes ")};function pn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const hn="rgba(0, 0, 0, 1)",mn="rgba(255, 255, 255, 1)",gn='-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',vn={colors:{},typography:{},shape:{}};class bn{constructor(e,t,n,r){pn(this,"theme",void 0),pn(this,"themeName",void 0),pn(this,"fontFamilies",void 0),pn(this,"hasSecondaryButtonStyle",!1),pn(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,d]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,i;const e="true"===(null==n||null===(a=n.shape)||void 0===a||null===(i=a.equalShadowOffsets)||void 0===i?void 0:i[l]);"string"==typeof d&&d.match(/\w+/g)&&e&&(this.hasSecondaryButtonStyle=!0);break}if(t.includes("equalShadowOffsets")||t.includes("equalPaddings"))break;r(d);break;case"actionSecondaryWidth":case"buttonSecondaryWidth":case"buttonHoverSecondaryWidth":case"buttonActiveSecondaryWidth":{var o,s;const e=l.replace("Width",""),t="true"===(null==n||null===(o=n.shape)||void 0===o||null===(s=o.equalPaddings)||void 0===s?void 0:s[e]);"string"==typeof d&&d.match(/\w+/g)&&t&&(this.hasSecondaryButtonStyle=!0);break}}if(!this.hasSecondaryButtonStyle&&null!==d&&"object"==typeof d&&!Array.isArray(d)){const e=t?t+"."+l:l;this.testSecondaryStyles(d,e,n)}}}));let a,i=!1;switch(r){case"automatic":i="dark"===n&&window.matchMedia("not all and (prefers-color-scheme), (prefers-color-scheme)").matches;break;case"light":i=!1;break;case"dark":i=!0}var o;i?a=(null===(o=e.alternate)||void 0===o?void 0:o.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]||vn,this.fontFamilies=a.fontFamilies||[]}getShape(e,t){return yn(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),i=this.getShape(`equalShadowOffsets.${e}`,t),o=this.getShape(`shadowOffsets.${e}`,t),s=this.getShape(`shadowOffsets.${e}XAxis`,t),l=this.getShape(`shadowOffsets.${e}YAxis`,t),d=this.getShape(`shadowOffsetType.${e}`,t),c=this.getCSSColor(`shadow.${e}`,{skipFallback:!0}),u="inset"===d?"inset":"",p=null!==(n="true"===i?o:s)&&void 0!==n?n:"0px",h=null!==(r="true"===i?o:l)&&void 0!==r?r:"0px";if(!c||c.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/))return"";return`${u} ${p} ${h} ${a||""} ${c}`.trim()}getNumericalPadding(e){var t,n,r,a;const i=null!==(t=null===(r=this.theme.shape)||void 0===r?void 0:r.padding)&&void 0!==t?t:{},o=null!==(n=null===(a=this.theme.shape)||void 0===a?void 0:a.equalPaddings)&&void 0!==n?n:{},s=yn(o,`${e}`,null),l=yn(i,`${e}Width`,null),d=yn(i,`${e}Top`,null),c=yn(i,`${e}Right`,null),u=yn(i,`${e}Bottom`,null),p=yn(i,`${e}Left`,null),h=wn(l);if(!0===s||"true"===s)return{top:h,right:h,bottom:h,left:h};const m=wn(d),g=wn(c),v=wn(u),b=wn(p);return void 0!==m||void 0!==g||void 0!==v||void 0!==b?{top:null!=m?m:0,right:null!=g?g:0,bottom:null!=v?v:0,left:null!=b?b:0}:{top:m,right:g,bottom:v,left:b}}getPadding(e){const{top:t,right:n,bottom:r,left:a}=this.getNumericalPadding(e);return void 0!==t||void 0!==n||void 0!==r||void 0!==a?`${t||0}px ${n||0}px ${r||0}px ${a||0}px`:""}getHorizontalRule(e){const t={enabled:!1,insetLeft:void 0,insetRight:void 0,width:void 0,color:void 0};if(!this.theme.horizontalRule)return t;t.enabled=yn(this.theme.horizontalRule,`${e}.enabled`,!1),t.insetLeft=yn(this.theme.horizontalRule,`${e}.insetLeft`,"0px"),t.insetRight=yn(this.theme.horizontalRule,`${e}.insetRight`,"0px"),t.width=yn(this.theme.horizontalRule,`${e}.width`,"0px");const n={color:yn(this.theme.horizontalRule,`${e}.color`,null),opacity:yn(this.theme.horizontalRule,`${e}.opacity`,null)};return t.color=n&&(null==n?void 0:n.color)?fn(n.color,n.opacity):fn("#000000",0),t}getCSSColor(e,t){const n=yn(this.theme.colors,e,null);if(n&&(null==n?void 0:n.color)&&!(null==t?void 0:t.skipPrimaryStyle))return fn(n.color,n.opacity);if(null==t?void 0:t.skipFallback)return null;const r=yn(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"feed";return{icon:{switchOff:mn,switchOn:mn,selectionIndicator:hn,selectionIndicatorActive:hn},background:Object.assign(Object.assign({switchOff:"rgba(128, 128, 128, 1)",switchOn:hn,modalContainer:"rgba(0, 0, 0, 0.5)",dropdownMenu:mn,dropdownMenuSelectedIcon:hn},"feed"===e?{card:mn}:{}),"workflow"===e?{default:hn}:{}),text:{dropdownMenuItem:hn}}}(this.themeName),e,null);return r||("workflow"===this.themeName?e.startsWith("background")?hn:mn:e.startsWith("background")?"rgba(0, 0, 0, 0)":hn)}getFontFamilies(){return this.fontFamilies}getTypographyStyle(e){var t;let n=yn(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:r&&r.size?(null===(n=r.scaling)||void 0===n?void 0:n.enabled)?this.getNumericScaledFontSize(r):Number(r.size.replace(/px/g,"")):null}getNumericScaledFontSize(e){const t=Number(window.getComputedStyle(document.documentElement).getPropertyValue("font-size").replace("px","")),n=t?t/16:1,r=e.size?Number(e.size.replace(/px/g,"")):17,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 i=a.transform?a.transform:(null==t?void 0:t.skipFontFallbacks)?null:"none",o=a.lineHeight||1,s=(null!==(n=this.getNumericFontSize(e,t))&&void 0!==n?n:17)*o+"px",l=(null===(r=a.scaling)||void 0===r?void 0:r.enabled)?`${this.getNumericScaledFontSize(a)}px`:a.size,d=a.fontFamily?`"${a.fontFamily}", ${gn}`:gn,c=a.weight||((null==t?void 0:t.skipFontFallbacks)?null:"normal"),u=a.style||((null==t?void 0:t.skipFontFallbacks)?null:"normal"),p=a.align;return Object.assign({textTransform:i,lineHeight:s,fontSize:l,fontFamily:d,fontWeight:c,fontStyle:u,fontSynthesis:"weight style"},p?{textAlign:p}:{})}getElementFocusCSSProperties(){return{outline:"none","&.focus-visible":{boxShadow:`0 0 0 2px ${this.getCSSColor("border.focus")} inset`}}}}const fn=(e,t)=>{const n=e.replace("#",""),r=parseInt(n,16);return`rgba(${[r>>16&255,r>>8&255,255&r].join(",")},${t})`},yn=(e,t,n)=>(e=e[(t=Array.isArray(t)?t:t.split("."))[0]])&&t.length>1?yn(e,t.slice(1),n):void 0!==e?e:n,wn=e=>{if(null==e)return;if("number"==typeof e)return e;const t=parseFloat(e.replace(/px/g,""));return isNaN(t)?void 0:t},Sn=(e,t)=>n=>{let{themeMethod:r,primaryAccessor:a,secondaryAccessor:i,fallbackStyle:o,skipThemeHelperFallbacks:s,skipDefaultStyle:l}=n;const d=a?e[r](a,{skipFallback:s}):void 0,c=i?e[r](i,{skipFallback:!0}):void 0;let u="getCSSColor"===r?e.getCSSColor(a||i||"",{skipPrimaryStyle:!0}):e[r]("");return l&&(u=""),"secondary"===t&&c?c:d&&("primary"===t||"secondary"===t&&!e.hasSecondaryButtonStyle)?d:o||u||""},Cn=e=>"string"!=typeof e?(ne.warn({level3:["Expected a string value for RGBA color, but received:",e]}),!1):null!==e.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/),xn=un({from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}),kn=cn("svg")((()=>({animation:`${xn} 1s infinite linear`}))),In=e=>{let{stopColor:t,size:n}=e;return(0,i.h)(kn,{width:n,height:n,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.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:t,"stroke-width":"2","stroke-linecap":"round"}))},On=()=>(0,i.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/25.4.2/assets/fonts/font-awesome-5-15-4/fa-solid-900.woff');\n }\n "),Fn={"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:""},Mn=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,i.h)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":n},(0,i.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 2H2V13.398L9.66274 8.25944C10.1695 7.91961 10.8316 7.92061 11.3374 8.26198L14 10.0593V2ZM14 14H2.89774L10.2197 9.08999C10.3886 8.97671 10.6093 8.97704 10.7779 9.09083L14 11.2657V14ZM2 1C1.44772 1 1 1.44772 1 2V14C1 14.5523 1.44772 15 2 15H14C14.5523 15 15 14.5523 15 14V2C15 1.44772 14.5523 1 14 1H2ZM6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4ZM5 6C5 5.44771 5.44771 5 6 5C6.55229 5 7 5.44771 7 6C7 6.55229 6.55229 7 6 7C5.44771 7 5 6.55229 5 6Z",fill:t}))},Tn=cn("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)})),jn=cn("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`})})),Ln=e=>{let{iconName:t,iconUrl:n,size:r,color:a,fallbackColor:o,styles:s={}}=e;const[l,d]=h(!1),c=b(n);return g((()=>{n&&n!==c.current&&l&&(c.current=n,d(!1))}),[n,l]),n&&!l?(0,i.h)(jn,{size:r,styles:s},(0,i.h)("svg",{"aria-hidden":"true","data-src":n,"data-replacement-color":a,"data-container-size":r,oniconloaderror:()=>{ne.error({level1:[`Error loading custom icon: ${n}`]}),d(!0)},style:Object.assign({maxWidth:`${r}px`,maxHeight:`${r}px`},a?{color:a}:{})})):t?(a&&(s.color=a),(0,i.h)(Tn,{styles:s,size:r,"aria-hidden":"true"},Fn[t]||"")):(0,i.h)(jn,{size:r,styles:s},(0,i.h)(Mn,{ariaHidden:!0,fillColor:null!=a?a:o}))},_n=cn("hr")((e=>{var t,n,r,a,i,o;let{theme:s,ruleStyles:l,isSubview:d,isBetweenButtons:c,translateY:u}=e,p="0px",h="0px",m=0,g=0;if(d){const e=s.getNumericalPadding("stream");m=null!==(t=null==e?void 0:e.left)&&void 0!==t?t:me,g=null!==(n=null==e?void 0:e.right)&&void 0!==n?n:me}else{const e=s.getNumericalPadding("card");m=null!==(r=null==e?void 0:e.left)&&void 0!==r?r:pe,g=null!==(a=null==e?void 0:e.right)&&void 0!==a?a:pe}if(c){const e=s.getNumericalPadding("buttonGroup");m=null!==(i=null==e?void 0:e.left)&&void 0!==i?i:m,g=null!==(o=null==e?void 0:e.right)&&void 0!==o?o:g}return p=(wn(null==l?void 0:l.insetLeft)||0)-m+"px",h=(wn(null==l?void 0:l.insetRight)||0)-g+"px",Object.assign({border:"none",borderBottom:`${(null==l?void 0:l.width)||"0px"} solid ${(null==l?void 0:l.color)||"rgba(0,0,0,0)"}`,margin:"0",width:`calc(100% + ${m-(wn(null==l?void 0:l.insetLeft)||0)}px + ${g-(wn(null==l?void 0:l.insetRight)||0)}px)`,marginLeft:p,marginRight:h},u?{transform:`translateY(${u})`}:{})})),Dn=e=>{let{theme:t,ruleStyles:n,isSubview:r,isBetweenButtons:a,class:o,translateY:s}=e;return(0,i.h)(_n,{"aria-hidden":"true",theme:t,ruleStyles:n,isSubview:r,isBetweenButtons:a,class:o,translateY:s})},An=e=>{let{theme:t,appearance:n}=e;const r=Sn(t,n),a=(e,t)=>t?{[e]:t}:{},i=t.getShape("buttonWidth.global"),o=r({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}});return Object.assign(Object.assign(Object.assign({position:"relative",cursor:"pointer",width:"hugsLabel"===i?"auto":"100%",maxWidth:"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"},o),{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())},En=cn("button")((e=>Object.assign({},An(e)))),Hn=cn("a")((e=>Object.assign(Object.assign({},An(e)),{textDecoration:"none"}))),Pn=cn("div")((e=>{var t,n;let r,a,{labelAlignment:i,iconAlignment:o,visible:s}=e;return"right"===o?(r="row-reverse",a=null!==(t=null==i?void 0:i.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"center"):(r="row",a=null!==(n=null==i?void 0:i.replace("left","flex-start").replace("right","flex-end"))&&void 0!==n?n:"center"),{width:"100%",display:"flex",justifyContent:a,alignItems:"center",flexDirection:r,visibility:s?"visible":"hidden"}})),Rn=cn("div")({display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}),$n=cn("span")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),Nn=e=>{let{nodeKey:t,localIndex:n,clickHandler:r,text:a,icon:o,iconUrl:s,theme:l,appearance:d,loading:c,type:u,urlLink:p}=e;const h=p?Hn:En,m=Sn(l,d),g=m({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}}),v=m({themeMethod:"getShape",primaryAccessor:"align.buttonIcon",secondaryAccessor:"align.buttonIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),b=m({themeMethod:"getShape",primaryAccessor:"lineHeight.buttonIcon",secondaryAccessor:"lineHeight.buttonIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),f=m({themeMethod:"getNumericFontSize",primaryAccessor:"button",secondaryAccessor:"buttonSecondary"}),y=Object.assign(Object.assign({},"left"===v?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:f*b+"px",color:m({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),w=m({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary"}),S=l.getHorizontalRule("buttonGroupBetween"),C=l.getShape("buttonLayout.global"),x=(null==S?void 0:S.enabled)&&"horizontal"!==C&&n&&n>0;return(0,i.h)(i.Fragment,null,x&&(0,i.h)(Dn,{class:"horizontal-rule-between",theme:l,ruleStyles:S,isSubview:!0,isBetweenButtons:!0}),(0,i.h)(h,{key:t,"data-element-key":t,class:"action-button submit-button",onClick:r,theme:l,appearance:d,tabIndex:"0",type:u,href:null==p?void 0:p.url,target:null==p?void 0:p.target},(0,i.h)(i.Fragment,null,c&&(0,i.h)(Rn,null,(0,i.h)(In,{stopColor:l.getCSSColor("text.button"),size:22})),(0,i.h)(Pn,{"data-testid":"button-content-wrapper",labelAlignment:null==g?void 0:g.textAlign,iconAlignment:v,visible:!c},(o||s)&&(0,i.h)(Ln,{iconName:o,iconUrl:s,size:f,color:y.color,fallbackColor:w,styles:Object.assign(Object.assign(Object.assign({},y),!a&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,i.h)($n,null,a)))))},Vn=e=>{let{theme:t,appearance:n}=e;const r=Sn(t,n),a=(e,t)=>t?{[e]:t}:{},i=t.getShape("buttonWidth.global"),o=r({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}});return Object.assign(Object.assign(Object.assign({cursor:"pointer",width:"hugsLabel"===i?"auto":"100%",maxWidth:"100%",padding:r({themeMethod:"getPadding",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:"10px 20px"}),backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.action",secondaryAccessor:"background.actionSecondary"}),color:r({themeMethod:"getCSSColor",primaryAccessor:"text.action",secondaryAccessor:"text.actionSecondary"}),textAlign:"left"},o),{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"}),display:"flex",alignItems:"center",":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())},zn=cn("button")((e=>Object.assign({},Vn(e)))),Bn=cn("a")((e=>Object.assign(Object.assign({},Vn(e)),{textDecoration:"none"}))),Wn=cn("div")((e=>{var t,n;let r,a,{labelAlignment:i,iconAlignment:o}=e;return"right"===o?(r="row-reverse",a=null!==(t=null==i?void 0:i.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"flex-end"):(r="row",a=null!==(n=null==i?void 0:i.replace("left","flex-start").replace("right","flex-end"))&&void 0!==n?n:"flex-start"),{width:"100%",display:"flex",justifyContent:a,alignItems:"center",flexDirection:r}})),Un=cn("span")((()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),qn=e=>{let{nodeKey:t,localIndex:n,clickHandler:r,text:a,icon:o,iconUrl:s,theme:l,appearance:d,type:c,urlLink:u}=e;const p=u?Bn:zn,h=Sn(l,d),m=h({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}}),g=h({themeMethod:"getShape",primaryAccessor:"align.actionIcon",secondaryAccessor:"align.actionIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),v=h({themeMethod:"getShape",primaryAccessor:"lineHeight.actionIcon",secondaryAccessor:"lineHeight.actionIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),b=h({themeMethod:"getNumericFontSize",primaryAccessor:"action",secondaryAccessor:"actionSecondary"}),f=Object.assign(Object.assign({},"left"===g?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:b*v+"px",color:h({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),y=h({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary"}),w=l.getHorizontalRule("buttonGroupBetween"),S=l.getShape("buttonLayout.global"),C=(null==w?void 0:w.enabled)&&"horizontal"!==S&&n&&n>0;return(0,i.h)(i.Fragment,null,C&&(0,i.h)(Dn,{class:"horizontal-rule-between",theme:l,ruleStyles:w,isSubview:!1,isBetweenButtons:!0}),(0,i.h)(p,{key:t,"data-element-key":t,class:"action-button",onClick:r,theme:l,appearance:d,tabIndex:"0",type:c,href:null==u?void 0:u.url,target:null==u?void 0:u.target},(0,i.h)(Wn,{labelAlignment:null==m?void 0:m.textAlign,iconAlignment:g},(o||s)&&(0,i.h)(Ln,{iconName:o,iconUrl:s,size:b,color:f.color,fallbackColor:y,styles:Object.assign(Object.assign(Object.assign({},f),!a&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,i.h)(Un,null,a))))},Yn=e=>e.isWorkflow?(0,i.h)(Nn,e):(0,i.h)(qn,e),Zn=e=>{let{fillColor:t,className:n,style:r,ariaHidden:a=!0}=e;return(0,i.h)("svg",{width:"14",height:"10",viewBox:"0 0 14 10",class:n,style:r,focusable:"false","aria-hidden":a},(0,i.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:t}))},Kn=e=>{let{style:t}=e;return(0,i.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,focusable:"false"},(0,i.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"}))},Gn=e=>{let{style:t}=e;return(0,i.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,focusable:"false"},(0,i.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"}))},Xn=n(3054),Qn=n(6756),Jn=n(1295),er=[];const tr={},nr=(e,t,n)=>{const{enableJs:r,disableUniqueIds:a,disableCssScoping:i,spriteIconId:o,replacementColor:s,containerSize:l}=t,d=!!o,c=(new DOMParser).parseFromString(n,"text/html"),u=d?c.getElementById(o):c.querySelector("svg"),p=(()=>{if(er.length)return er;for(const e in document.body)e.startsWith("on")&&er.push(e);return er.push("onbegin","onend","onrepeat"),er.push("onfocusin","onfocusout","onbounce","onfinish","onshow"),er})(),h=tr[e.getAttribute("data-id")]||new Set,m=e.getAttribute("data-id")||`svg-loader_${Jn.incr()}`,g={};if(a||Array.from(u.querySelectorAll("[id]")).forEach((e=>{const t=e.getAttribute("id"),n=`${t}_${Jn.incr()}`;e.setAttribute("id",n),g[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:i}=t.attributes[e],o=Qn(g,i,a);i!==o&&t.setAttribute(a,o),!p.includes(a.toLowerCase())||r?["href","xlink:href","values"].includes(a)&&i.startsWith("javascript")&&!r&&n.push(a):n.push(a)}if(n.forEach((e=>t.removeAttribute(e))),"style"===t.tagName&&!i){let e=Xn(t.innerHTML,`[data-id="${m}"]`,g);e=Qn(g,e),e!==t.innerHTML&&(t.innerHTML=e)}})),e.innerHTML=o?u.outerHTML:u.innerHTML,!d)for(let t=0;t<u.attributes.length;t++){const{name:n,value:r}=u.attributes[t];e.getAttribute(n)&&!h.has(n)||(h.add(n),e.setAttribute(n,r))}tr[m]=h,e.setAttribute("data-id",m),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,i=e.getAttribute("fill"),o=e.getAttribute("stroke");t&&(n=t.match(/fill\s*:\s*([^;]+)/),r=t.match(/stroke\s*:\s*([^;]+)/));const s={...i?{fill:i}:{},...o?{stroke:o}:{},...n?{fillMatch:n}:{},...r?{strokeMatch:r}:{}};i&&a(i,e,s),o&&a(o,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 v=new CustomEvent("iconload",{bubbles:!0});if(e.dispatchEvent(v),e.getAttribute("oniconload")){e.setAttribute("onauxclick",e.getAttribute("oniconload"));const t=new CustomEvent("auxclick",{bubbles:!1,view:window});e.dispatchEvent(t),e.removeAttribute("onauxclick")}},rr={},ar={},ir=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"),i="disabled"===e.getAttribute("data-unique-ids"),o="disabled"===e.getAttribute("data-css-scoping"),s=e.getAttribute("data-replacement-color"),l=e.getAttribute("data-container-size"),d=nr.bind(self,e,{enableJs:a,disableUniqueIds:i,disableCssScoping:o,spriteIconId:r,replacementColor:s,containerSize:l});if(ar[n]){const e=ar[n];d(e)}else{if(rr[n])return void setTimeout((()=>ir(e)),20);rr[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`);ar[n]=e,d(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 rr[n]}))}};let or;globalThis.IntersectionObserver&&(or=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(ir(e.target),or.unobserve(e.target))}))}),{rootMargin:"1200px"}));const sr=[];function lr(){Array.from(document.querySelectorAll("svg[data-src]:not([data-id])")).forEach((e=>{-1===sr.indexOf(e)&&(sr.push(e),"lazy"===e.getAttribute("data-loading")?or.observe(e):ir(e))}))}let dr=!1;if(globalThis.addEventListener){const Gc=setInterval((()=>{lr()}),100);function Xc(){clearInterval(Gc),lr(),(()=>{if(dr)return;dr=!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])"))))))&&lr(),e.forEach((e=>{"attributes"===e.type&&ir(e.target)}))})).observe(document.documentElement,{attributeFilter:["data-src"],attributes:!0,childList:!0,subtree:!0})})()}"interactive"===document.readyState||"complete"===document.readyState?Xc():globalThis.addEventListener("DOMContentLoaded",(()=>{Xc()}))}globalThis.SVGLoader={},globalThis.SVGLoader.updateMemoryCache=async(e,t)=>{ar[e]=t};const cr=()=>(0,i.h)("svg",{width:"3",height:"15",viewBox:"0 0 3 15",xmlns:"http://www.w3.org/2000/svg"},(0,i.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,i.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,i.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"})),ur=e=>{let{style:t}=e;return(0,i.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",style:t},(0,i.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"}))},pr=e=>{let{style:t}=e;return(0,i.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t},(0,i.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"}))},hr=e=>e&&e.current&&e.current.base,mr=30,gr=10,vr=e=>{var t,n,r,a,i,o,s,l;const d=e.getNumericalPadding("card"),c=e.getNumericalPadding("menuButton"),u=(null!==(t=c.top)&&void 0!==t?t:gr)+mr+(null!==(n=c.bottom)&&void 0!==n?n:gr),p=(null!==(r=c.right)&&void 0!==r?r:gr)+mr+(null!==(a=c.left)&&void 0!==a?a:gr);return{top:u>(null!==(i=d.top)&&void 0!==i?i:he)?u-(null!==(o=d.top)&&void 0!==o?o:he):0,right:p>(null!==(s=d.right)&&void 0!==s?s:pe)?p-(null!==(l=d.right)&&void 0!==l?l:pe):0}},br=e=>{var t,n,r,a;const{top:i,right:o,bottom:s,left:l}=e.getNumericalPadding("menuButton"),d=e.getNumericalPadding("card");return void 0===i&&void 0===o&&void 0===s&&void 0===l?{top:gr-(null!==(t=d.top)&&void 0!==t?t:he),right:gr-(null!==(n=d.right)&&void 0!==n?n:20),bottom:gr,left:gr}:{top:(null!=i?i:0)-(null!==(r=d.top)&&void 0!==r?r:he),right:(null!=o?o:0)-(null!==(a=d.right)&&void 0!==a?a:20),bottom:null!=s?s:0,left:null!=l?l:0}},fr=cn("button")((e=>{let{open:t,theme:n}=e;const{top:r,right:a}=br(n);return Object.assign({cursor:"pointer",position:"absolute",top:`${r}px`,right:`${a}px`,width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:ms.OVERFLOW_MENU_BUTTON,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())})),yr=cn("button")((e=>{let{theme:t}=e;const{top:n,right:r}=br(t);return Object.assign({cursor:"pointer",position:"absolute",top:`${n}px`,right:`${r}px`,width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:ms.OVERFLOW_MENU_BUTTON,background:t.getCSSColor("background.options")," > svg":{stroke:t.getCSSColor("icon.options")},"&:hover":{background:t.getCSSColor("background.optionsHover")},"&:active":{background:t.getCSSColor("background.optionsActive")},"&:hover > svg":{stroke:t.getCSSColor("icon.optionsHover")},"&:active > svg":{stroke:t.getCSSColor("icon.optionsActive")}},t.getElementFocusCSSProperties())})),wr=e=>{let{theme:t,open:n,feedOrientation:r,children:a,cardRef:o,ariaLabelledBy:s}=e;const l=b(null);let d={direction:"down",maxHeight:0,maxWidth:0};if(n){const e=t.getNumericalPadding("card"),n=br(t);d=((e,t,n,r,a)=>{var i,o,s,l;if(hr(t)&&hr(n)){const d=t.current.base,c=t.current.base.offsetParent,u=c.offsetParent,p=n.current.base,h=d.clientWidth-((null!==(i=null==r?void 0:r.left)&&void 0!==i?i:pe)+(null!==(o=null==a?void 0:a.right)&&void 0!==o?o:0));if("horizontal"===e){const e=c.offsetLeft+p.offsetLeft-u.scrollLeft,t=u.clientWidth-(e>0?e:0),n=200,r=e>=n||t<n;return{direction:r?"left":"right",maxWidth:r?h:t}}const m=p.offsetTop,g=u.scrollHeight-c.offsetTop-(null!==(s=r.top)&&void 0!==s?s:he)-(m+(null!==(l=r.top)&&void 0!==l?l:he)),v=c.offsetTop,b=p.scrollHeight,f=g>=b||v<b;return{direction:f?"down":"up",maxHeight:f?g:v,maxWidth:h}}return{direction:"down",maxHeight:0,maxWidth:0}})(r,o,l,e,n),setTimeout((()=>{if(hr(l)){const e=l.current.base.querySelector('[tabindex="0"]');if(e){e.focus()}}}),0)}return(0,i.h)(Sr,{maxHeight:`${d.maxHeight}px`,maxWidth:`${d.maxWidth}px`,open:n,theme:t,ref:l,children:a,direction:d.direction,"aria-labelledBy":s})},Sr=cn("ul")((e=>{var t,n;let{theme:r,open:a,maxHeight:i,maxWidth:o,direction:s}=e;const{top:l,right:d,bottom:c}=br(r),u=r.getNumericalPadding("card");let p;switch(s){case"up":p=`translateY(-100%) translateY(-${(null!=l?l:gr)+(null!==(t=u.top)&&void 0!==t?t:he)+(null!=c?c:gr)+mr}px)`;break;case"down":case"left":p="translateY(0)";break;case"right":p="translateX(90%)"}return{position:"absolute",top:`${(null!=l?l:gr)+(null!=c?c:gr)+mr}px`,right:`${null!=d?d:gr}px`,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!==(n=r.getShape("borderRadius.sheet",{skipFallback:!0}))&&void 0!==n?n:"5px",padding:"10px 0",overflow:"auto",listStyle:"none",margin:"0",zIndex:ms.OVERFLOW_MENU,maxHeight:a?`${i}`:"0px",maxWidth:a?`${o}`:"0px",visibility:a?"visible":"hidden",transform:p}})),Cr=cn("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())})),xr=cn("span")((()=>({maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),kr=cn("li")((e=>{let{theme:t}=e;return{borderTop:`1px solid ${t.getCSSColor("border.sheetItemDivider")}`,height:"1px",margin:"10px 0"}})),Ir=cn("li")((()=>({flexShrink:"0"}))),Or=e=>{let{title:t,icon:n,onClick:r,theme:a,className:o}=e;const s={marginRight:"20px",minWidth:"20px"};return(0,i.h)(Ir,{role:"none"},(0,i.h)(Cr,{theme:a,tabIndex:"-1",onClick:r,className:o},"bin"===n&&(0,i.h)(Kn,{style:s}),"clock"===n&&(0,i.h)(Gn,{style:s}),"thumbs-up"===n&&(0,i.h)(ur,{style:s}),"thumbs-down"===n&&(0,i.h)(pr,{style:s}),(0,i.h)(xr,null,t)))},Fr=32,Mr=38,Tr=40,jr=13,Lr=27,_r=-1,Dr=e=>{switch(e){case"ArrowUp":case"Up":return Mr;case"ArrowDown":case"Down":return Tr;case"Enter":return jr;case"Spacebar":case" ":return Fr;case"Escape":return Lr;default:return _r}},Ar="ArrowUp",Er="ArrowDown",Hr="ArrowLeft",Pr="ArrowRight",Rr="Enter",$r=" ",Nr="Escape",Vr="PageUp",zr="PageDown",Br="Tab",Wr=cn("div")((e=>{let{theme:t}=e;return Object.assign({width:"100%",border:"0"},t.getElementFocusCSSProperties())})),Ur=(e,t)=>{try{const n=qr(e)[t];return n&&"none"===n.getAttribute("role")&&n.childNodes.length>0?n.childNodes[0]:n}catch(e){return null}},qr=e=>e&&e.current&&e.current.base&&e.current.base.childNodes?[...e.current.base.childNodes].filter((e=>"true"!==e.getAttribute("aria-hidden"))):[],Yr=e=>{let{defaultIndex:t,theme:n,children:r}=e;const[a,o]=h(t||0),s=(0,i.createRef)(),l=b(-1);g((()=>{l.current=a}));const d=l.current;return g((()=>{o(t||0)}),[t]),g((()=>{var e,t,n;-1!==d&&(null===(n=Ur(s,d))||void 0===n||n.setAttribute("tabIndex","-1"));null===(e=Ur(s,a))||void 0===e||e.setAttribute("tabIndex","0"),null===(t=Ur(s,a))||void 0===t||t.focus()}),[a]),(0,i.h)(Wr,{theme:n,className:"supports-keyboard-navigation",ref:s,onKeyDown:e=>{var t;let n=null;switch(Dr(e.key)){case Tr:n=a+1;break;case Mr:n=a-1;break;case jr:case Fr:null===(t=Ur(s,a))||void 0===t||t.click(),e.stopPropagation(),e.preventDefault()}var r,i;null!==n&&(r=n,i=qr(s).length,n=(r+i)%i,o(n),e.view.event.preventDefault())}},r)},Zr=e=>{let{fillColor:t}=e;return(0,i.h)("svg",{width:"12",height:"12",viewBox:"0 0 12 12"},(0,i.h)("path",{d:"M1 1L6 6L11 11M1 11L11 1","stroke-width":"2","stroke-linecap":"round",stroke:t}))},Kr=cn("div")((e=>{let{firstChildNodeMargin:t}=e;return Object.assign({position:"relative",height:"100%",display:"flex",flexDirection:"column"},t.right||t.top?{"& > *:nth-child(2)":Object.assign(Object.assign({},null!==t.right?{marginRight:`${t.right}px`}:{}),null!==t.top?{marginTop:`${t.top}px`}:{})}:{})})),Gr=cn("div")((e=>{let{theme:t,embedMode:n,margin:r,minHeight:a,maxWidth:i,feedOrientation:o,cardWidth:s}=e;const l={width:`${s}px`,marginRight:`${r}px`,marginBottom:"0px"};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({backgroundColor:t.getCSSColor("background.card"),marginBottom:`${r}px`,borderRadius:t.getShape("borderRadius.card")||"initial",boxShadow:"single-card"!==n?`0 ${t.getShape("offset.cardShadow")} ${t.getShape("blur.cardShadow")} ${t.getCSSColor("shadow.card")}`:"none",padding:`${t.getPadding("card")||"20px 20px"}`,border:`${t.getShape("border.card")||"0px"} solid ${t.getCSSColor("border.card")}`,position:"relative",minHeight:a?`${a}px`:"0px"},"horizontal"===o?l:{}),"modal-stream"===n?{width:"100%",maxWidth:i?`${i}px`:"initial"}:{}),Ns(t,n,o).cardCompletion),Ns(t,n,o).dismissal),Ns(t,n,o).snooze),{".submitting, .submitted, .submitted-subview":{border:"0"}})})),Xr=cn("div")((e=>{let{theme:t,dimensions:n,horizontalFeedCenterAlign:r,leftPosition:a,feedOrientation:i,embedMode:o,cardHorizontalAlignment:s}=e;const l=t.getNumericalPadding("stream"),d=Object.assign({width:n.width,display:"flex",flexShrink:"0",scrollSnapAlign:"center",".fixed-position":{position:"unset",left:`${a?a/2+a:0}px`}},r&&{left:"50%",transform:"translateX(-50%)"}),c={width:"100%",display:"flex",justifyContent:{leading:"flex-start",center:"center",trailing:"flex-end"}[null!=s?s:"center"],alignItems:"center"};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({height:n.height},"horizontal"===i?d:{}),"modal-stream"===o?c:{}),Vs(l,o,i).cardCompletion),Vs(l,o,i).dismissal),Vs(l,o,i).snooze),Vs(l,o,i).center)})),Qr=cn("div")((()=>({})));var Jr;!function(e){e.menu="menu",e.dismiss="dismiss",e.hidden="hidden"}(Jr||(Jr={}));const ea=T((e=>{let{containerInstanceId:t,cardInstanceId:n,children:r,theme:a,embedMode:o,animationState:s,cardFeedOverlayDisplayed:l,onDismiss:d,onSnooze:c,onFeedbackSelected:u,removeCard:p,customStrings:m,margin:f,horizontalFeedCenterAlign:y,accessibilityRole:w,actions:S,votingOptions:C,cardMinimumHeight:x,cardMaximumWidth:k,cardHorizontalAlignment:I,horizontalContainerConfig:O}=e;const[F,M]=h(!1),T=b(F),j=e=>{T.current=e,M(e)},[L,_]=h({height:"auto",width:"auto"}),[D,A]=h(0),E=b(null),H=b(null),P=b(null),R=`card-overflow-menu-${n}`,$=ic(O);v((()=>{H.current&&H.current.base&&("submitted"===s||"submitted-subview"===s||"dismissed"===s||"snoozed"===s?(_({height:H.current.base.offsetHeight+("horizontal"!==$?f:0)-1+"px",width:`${H.current.base.offsetWidth+f}px`}),"horizontal"===$&&"center"===(null==O?void 0:O.lastCardAlignment)?(rn().fixPositionRemainingCard(n),A(P.current.base.offsetLeft),setTimeout((()=>{rn().centerRemainingCard(n)}),200),setTimeout((()=>{p()}),Us(s))):setTimeout((()=>{p()}),Us(s))):_({height:"auto",width:"auto"})),P.current&&P.current.base&&(A("fixed-position"===s?P.current.base.offsetLeft:0),"centering"===s&&setTimeout((()=>{rn().removeCardState(n)}),Us(s)))}),[s,H.current,P.current]),g((()=>{const e=e=>{var t;(null===(t=E.current)||void 0===t?void 0:t.base)&&!E.current.base.contains(e.target)&&j(!1)};document.addEventListener("mousedown",e);const t=e=>{if(T.current&&("Tab"===e.key&&j(!1),"Escape"===e.key&&T.current)){const e=document.getElementById(R);j(!1),null==e||e.focus()}};return document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}}),[n]);const{dismiss:{overflow:N},snooze:{overflow:V},voteUp:{overflow:z,feedback:B,feedbackLabel:W},voteDown:{overflow:U,feedback:q,feedbackLabel:Y}}=S,Z={voteUp:!0===(null==C?void 0:C.canVoteUseful)||z,voteDown:!0===(null==C?void 0:C.canVoteNotUseful)||U};let K=Jr.hidden;Z.voteUp||Z.voteDown||V?K=Jr.menu:N&&(K=Jr.dismiss);const G=(Z.voteUp||Z.voteDown)&&(N||V),X=((e,t,n)=>{var r,a;if(!n||!t||0===t.length)return{top:0,right:0};const i=t=>{var n;if(!t)return{top:0,right:0};const r=Array.isArray(t)?t[0]:t;switch(null==r?void 0:r.type){case Se:case Ce:const t=null==r||null===(n=r.attributes)||void 0===n?void 0:n.format;return"banner"===t?{top:null,right:null}:"text"===t?{top:0,right:vr(e).right}:{top:vr(e).top,right:0};case xe:case ke:case Ie:case Oe:case Fe:case Me:case Te:case je:case De:case Ae:case Ee:case He:case Pe:case Re:return{top:vr(e).top,right:0};case be:case fe:case ye:case we:return{top:0,right:vr(e).right};case Le:case _e:return i(null==r?void 0:r.children);default:return{top:null,right:null}}},o=null===(r=t[0])||void 0===r||null===(a=r.props)||void 0===a?void 0:a.node;return i(o)})(a,r||[],K!==Jr.hidden);return(0,i.h)(Xr,{theme:a,ref:P,id:n,dimensions:L,feedOrientation:$,embedMode:o,horizontalFeedCenterAlign:y,leftPosition:D,cardHorizontalAlignment:I,class:s,role:w},(0,i.h)(Gr,{theme:a,embedMode:o,class:`card-content ${s||""}`,ref:H,margin:f,minHeight:x,maxWidth:k,feedOrientation:$,cardWidth:null==O?void 0:O.cardWidth,inert:l},(0,i.h)(Kr,{firstChildNodeMargin:X,class:"card-nodes"},K===Jr.menu&&(0,i.h)(Qr,{ref:E},(0,i.h)(fr,{class:"overflow-action",theme:a,open:F,tabIndex:"0",ariaLabel:"Card overflow menu",id:R,ariaHasPopup:"true",ariaExpanded:F,onClick:e=>{e.target&&e.target.focus(),j(!F)}},(0,i.h)(cr,null)),(0,i.h)(wr,{theme:a,ariaLabelledBy:R,open:F,feedOrientation:$,cardRef:H},(0,i.h)(Yr,{theme:a},Z.voteUp&&(0,i.h)(Or,{onClick:()=>{u({sentiment:"positive",textFeedback:B,textFeedbackLabel:W,source:"overflow-menu"}),j(!1)},theme:a,title:(null==m?void 0:m.votingUsefulTitle)||"This is useful",icon:"thumbs-up",className:"vote-up-action"}),Z.voteDown&&(0,i.h)(Or,{onClick:()=>{u({sentiment:"negative",textFeedback:q,textFeedbackLabel:Y,source:"overflow-menu"}),j(!1)},theme:a,title:(null==m?void 0:m.votingNotUsefulTitle)||"This isn't useful",icon:"thumbs-down",className:"vote-down-action"}),G&&(0,i.h)(kr,{theme:a,className:"card-overflow-divider","aria-hidden":"true"}),V&&(0,i.h)(Or,{onClick:()=>{c(),j(!1)},theme:a,title:(null==m?void 0:m.cardSnoozeTitle)||"Remind me",icon:"clock",className:"snooze-action"}),N&&(0,i.h)(Or,{onClick:()=>{d(),j(!1)},theme:a,title:"Dismiss",icon:"bin",className:"dismiss-action"})))),K===Jr.dismiss&&(0,i.h)(yr,{ariaLabel:"Dismiss card",theme:a,tabIndex:"0",onClick:d,className:"dismiss-button"},(0,i.h)(Zr,null)),r),(0,i.h)(Ls,{theme:a,animationState:s})),(0,i.h)(Rs,{viewState:"topview",onCancelUpload:()=>{window.AtomicUploadService.cancelUploadForCard(t,n),rn().finishCardFileUpload(n),!window.AtomicUploadService.getIsUploadingStatus(t)&&rn().setCardFeedOverlay(!1)},theme:a,renderOverlay:"uploading-files"===s,cardMaximumWidth:k,cardHorizontalAlignment:I,spaceBetweenCards:f}),(0,i.h)(_s,{theme:a,animationState:s}))}),((e,t)=>0==t.isPreview&&e.animationState===t.animationState&&e.cardInstanceId===t.cardInstanceId&&e.runtimeVariables===t.runtimeVariables&&e.theme===t.theme)),ta=cn("div")((e=>{let{embedMode:t,feedOrientation:n,snapScroll:r,theme:a}=e;const i={position:"relative",display:"flex",flexDirection:"row nowrap",alignItems:"stretch",flexShrink:"0",padding:a.getPadding("stream")||"10px",overflowX:"auto",scrollSnapType:r?"x mandatory":"none"};return Object.assign(Object.assign({},"modal-stream"===t?{height:"100%",width:"100%",padding:"0"}:{}),"horizontal"===n?i:{})})),na=K.forwardRef(((e,t)=>{let{cardInstances:n,theme:r,isPreview:a,onDismiss:o,onSnooze:s,onFeedbackSelected:l,removeCard:d,cardStates:c,margin:u,runtimeVariables:p,customStrings:h,votingOptions:m,horizontalContainerConfig:g}=e;const v=de().getState();let b=n;v.application.cardLimit&&(b=b.slice(0,v.application.cardLimit));const f=ic(g);return(0,i.h)(ta,{embedMode:v.application.embedMode,feedOrientation:f,snapScroll:"free"!==(null==g?void 0:g.scrollMode),class:"card-list",ref:t,theme:r},b.map(((e,t)=>{if(e.defaultView){var y;let w=null==p||null===(y=p.values)||void 0===y?void 0:y.get(e.instance.id);w=w||new Map;const S=1===b.length&&"horizontal"===f&&"center"===(null==g?void 0:g.lastCardAlignment);e.defaultView.nodes=Gd(e.defaultView.nodes);let C=0;if(b.length>1&&t!==n.length-1){const e=wn(r.getShape("spaceBetweenCards.global",{skipFallback:!0}));C=null!=e?e:u}return(0,i.h)(ea,{key:e.instance.id,cardInstanceId:e.instance.id,containerInstanceId:v.application.containerInstanceId,theme:r,isPreview:a,embedMode:v.application.embedMode,animationState:c[e.instance.id],cardFeedOverlayDisplayed:v.cardFeed.displayingOverlay,onDismiss:()=>{o(e.instance.id)},onSnooze:()=>{s(e.instance.id,e.metadata.expires)},onFeedbackSelected:t=>{l(t,e.instance.id)},removeCard:()=>{d(e.instance.id)},runtimeVariables:w,customStrings:h,margin:C,horizontalFeedCenterAlign:S,accessibilityRole:"listitem",actions:e.actions,votingOptions:m,cardMinimumHeight:v.cardFeed.cardMinimumHeight,cardMaximumWidth:v.cardFeed.cardMaximumWidth,cardHorizontalAlignment:v.cardFeed.cardHorizontalAlignment,horizontalContainerConfig:g},e.defaultView.nodes.map(((t,n)=>{var a,o,s;const l=null===(a=e.defaultView)||void 0===a?void 0:a.nodes[e.defaultView.nodes.length-1],d="form"===l.type?l:void 0,c=null==d||null===(o=d.children)||void 0===o?void 0:o.find((e=>"actionButtonGroup"===e.type));return(0,i.h)(Bd,{cardInstanceId:e.instance.id,cardMetadata:e.metadata,node:t,cardContext:{nodeCount:(null===(s=e.defaultView)||void 0===s?void 0:s.nodes.length)||0,hasButtonFinalNode:void 0!==d,hasButtons:void 0!==(null==c?void 0:c.children)&&c.children.length>0},index:n,isWorkflow:!1,theme:r,runtimeVariables:w,feedOrientation:f,embedMode:v.application.embedMode})})))}return null})))})),ra=cn("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())})),aa={settings:e=>{let{fillColor:t}=e;return(0,i.h)("svg",{fill:t,width:"18",height:"14",viewBox:"0 0 18 14"},(0,i.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:e=>{let{fillColor:t}=e;return(0,i.h)("svg",{stroke:t,width:"14",height:"12",viewBox:"0 0 14 12"},(0,i.h)("path",{d:"M6 11L1 6M1 6L6 1M1 6L13 6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},cross:Zr},ia=e=>{let{title:t,iconName:n,onClick:r,theme:a}=e;const o=aa[n];return(0,i.h)(ra,{onClick:r,tabIndex:"0",ariaLabel:t,theme:a,className:`button-${n}`},(0,i.h)(o,{fillColor:a.getCSSColor("text.navigationAction")}))},oa=cn("div")((e=>{let{theme:t,feedOrientation:n,cardBorderRadius:r}=e;return Object.assign({padding:"10px 20px 10px 15px",display:"flex",alignItems:"center",backgroundColor:t.getCSSColor("background.navigation"),zIndex:ms.HEADER,boxShadow:`0 ${t.getShape("offset.navigationShadow")} ${t.getShape("blur.navigationShadow")} ${t.getCSSColor("shadow.navigation")}`,borderTopLeftRadius:r||"initial",borderTopRightRadius:r||"initial"},"horizontal"===n?{padding:"10px"}:{})})),sa=cn("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:{})})),la=K.forwardRef(((e,t)=>{let{theme:n,title:r,actionHandler:a,feedOrientation:o,alignment:s,inert:l,cardBorderRadius:d}=e;return(0,i.h)(oa,{theme:n,cardBorderRadius:d,feedOrientation:o,ref:t,inert:l},a&&(0,i.h)(ia,{title:"Back",onClick:a,iconName:"arrowLeft",theme:n}),(0,i.h)(sa,{theme:n,feedOrientation:o,alignment:s},r))})),da=e=>{let{theme:t,title:n,actionHandler:r,inert:a}=e;return(0,i.h)(oa,{theme:t,inert:a},(0,i.h)(sa,{theme:t},n),r&&(0,i.h)(ia,{title:"Close",onClick:r,iconName:"cross",theme:t}))},ca="action-cards-sdk-toast-wrapper",ua=cn("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:{})})),pa=cn("div")((e=>{let{feedOrientation:t}=e;return Object.assign({position:"absolute",bottom:"0",left:"0",right:"0",overflow:"hidden",pointerEvents:"none",zIndex:ms.TOAST},"horizontal"===t?{display:"flex",justifyContent:"center"}:{})})),ha=cn("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"))})),ma=cn("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"})})),ga=(e,t)=>new Promise((n=>{t(setTimeout((()=>{n(void 0)}),e))})),va=e=>{var t;let{theme:n,feedOrientation:r,message:a,actionTitle:o,actionHandler:s,onDismiss:l,delay:d=0}=e;const[c,u]=h(!1),[p,m]=h(""),[v,b]=h(null),[f,y]=h(""),w=null==a?void 0:a.messageId,S="Try again"===o,C=(null===(t=de().getState().application.enabledUiElements.toastConfig)||void 0===t?void 0:t.timeout)||2e3;g((()=>{null!=(null==a?void 0:a.messageId)&&p!=a.messageId&&(m(a.messageId),a.text&&y(a.text),null!=v&&(clearTimeout(v),b(null)),ga(d,b).then((()=>(u(!0),ga(C+600,b)))).then((()=>(u(!1),ga(600,b)))).then((()=>{l&&(l(),y(""))})))}),[w]);const x=()=>{u(!1),s?s():y("")},k=e=>{const t=e.keyCode;13!==t&&32!==t||x()};return(0,i.h)(pa,{id:ca,class:"floating",feedOrientation:r},void 0!==a&&(0,i.h)(ua,{id:"toast-body",theme:n,feedOrientation:r,hasRetry:S,onClick:S?void 0:x,onKeyUp:S?void 0:k,tabIndex:c&&!S?0:-1,class:c?"visible":"",role:c?"alert":void 0},(0,i.h)(ha,{theme:n,class:"toast-message"},f||""),S&&(0,i.h)(ma,{theme:n,class:"toast-action",hasRetry:S,onClick:S?x:void 0,onKeyUp:S?k:void 0,tabIndex:c&&S?0:-1},o)))},ba=e=>{let{fillColor:t}=e;return(0,i.h)("svg",{width:"79",height:"53",viewBox:"0 0 79 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.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:t}),(0,i.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:t}),(0,i.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:t}),(0,i.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:t}))},fa=e=>{let{fillColor:t}=e;return(0,i.h)("svg",{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.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:t}),(0,i.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:t}))},ya=cn("div")((()=>({width:"100%",display:"flex",flexFlow:"column wrap",alignItems:"center",justifyContent:"center",minHeight:"250px"}))),wa=cn("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%"})})),Sa=e=>{let{hasSeenTutorial:t,tutorialMessage:n,emptyMessage:r,theme:a}=e;return(0,i.h)(ya,null,t?(0,i.h)(i.Fragment,null,(0,i.h)(fa,{fillColor:a.getCSSColor("icon.listEmptyState")}),(0,i.h)(wa,{theme:a},r||"All caught up")):(0,i.h)(i.Fragment,null,(0,i.h)(ba,{fillColor:a.getCSSColor("icon.listEmptyState")}),(0,i.h)(wa,{theme:a},n||"Cards will appear here when there’s something to action.")))},Ca=e=>{let{title:t,textColor:n,buttonColor:r,theme:a,onRetry:o,tryAgainTitle:s}=e;return(0,i.h)(i.Fragment,null,(0,i.h)(ka,{textColor:n,theme:a},t),(0,i.h)(Ia,{textColor:r,theme:a,onClick:o},null!=s?s:"Try again"))},xa=cn("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 ${gn}`}})),ka=cn("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"})})),Ia=cn("button")((e=>{let{textColor:t,theme:n}=e;return Object.assign({color:(null==n?void 0:n.getCSSColor("text.errorOverlayAction"))||t,font:`16px ${gn}`,background:"transparent",border:"0",outline:"none",fontWeight:"bold",cursor:"pointer"},(null==n?void 0:n.getCSSFontProperties("errorOverlayAction"))||{})})),Oa=e=>{let{embedMode:t,state:n,onRetry:r,loadingIconColor:a,textColor:o,buttonColor:s,backgroundColor:l,theme:d,noInternetConnectionMessage:c,dataLoadFailedMessage:u,tryAgainTitle:p}=e;return"single-card"===t||"preview"===t||"modal-subview"===t?null:(0,i.h)(xa,{background:l,className:"loading-wrapper",embedMode:t},!n&&(0,i.h)(In,{stopColor:(null==d?void 0:d.getCSSColor("icon.loadingSpinner"))||a||"#000000",size:32}),"apiError"===n&&(0,i.h)(Ca,{title:null!=u?u:"Couldn't load data",textColor:o,buttonColor:s,theme:d,onRetry:r,tryAgainTitle:p}),"noInternet"===n&&(0,i.h)(Ca,{title:null!=c?c:"No internet connection",textColor:o,buttonColor:s,theme:d,onRetry:r,tryAgainTitle:p}))};let Fa;!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"}(Fa||(Fa={}));const Ma=(0,i.createContext)({cardEventDispatcher:{dispatchCardEvent:e=>{}},analyticsDispatcher:{sendEvent:e=>{}},authTokenProvider:{requestToken:()=>Promise.resolve(void 0)},runtimeVariableResolver:void 0});var Ta=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};const ja="action-cards-sdk-overflow-container",La=cn("div")((e=>{let{theme:t,rendersBackground:n,embedMode:r}=e;return Object.assign({display:"flex",flexDirection:"column",height:"100%",backgroundColor:n?t.getCSSColor("background.default"):"transparent"},"modal-stream"===r?{width:"100%",height:"auto"}:{})})),_a=cn("div")((e=>{let{embedMode:t}=e;return{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",zIndex:ms.FEED_OVERLAY,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"launcher"===t?"20px":"0"}})),Da=cn("div")((e=>{let{embedMode:t}=e;return{width:"100%",position:"absolute",top:"0px",left:"0px",zIndex:ms.CUSTOM_HEADER,overflow:"hidden",borderRadius:"launcher"===t?"20px 20px 0 0":"0"}})),Aa=cn("div")((e=>{let{scrollPosition:t,scrollbarWidth:n,headerOffset:r}=e;return{width:"100%",marginTop:`${r}px`,paddingRight:`${n}px`,transform:`translateY(-${t}px)`}})),Ea=cn("div")((e=>{let{embedMode:t,feedOrientation:n,headerPadding:r,theme:a,isEmptyState:i,isLoadingState:o}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({padding:"single-card"===t?a.getPadding("stream")||"0px":a.getPadding("stream")||"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"}:{}),i||o?{padding:"10px"}:{}),"modal-stream"===t?{padding:"0px"}:{})})),Ha=cn("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:{})})),Pa={scrollTop:0,lastScrollTimeout:null,lastCardIds:[]},Ra=e=>{const t=e.messages.cardList,n=e.cardFeed.cardInstances,r=e.cardStates,{enabled:a,emptyStyle:i}=e.cardFeed.horizontalContainerConfig||{};return t&&1===n.length&&a&&"shrink"===i?0:t&&["submitted-subview"].includes(r[t.cardInstanceId]||"")?1100:800},$a=e=>{let{theme:t,onRetry:n}=e;const r=b(null),a=b(null),o=b(null),s=b(null),l=b(null),[d,c]=h(0),[u,p]=h(0),m=w(Ma),v=m.analyticsDispatcher,f=m.cardEventDispatcher,y=m.authTokenProvider;return g((()=>(l.current=new IntersectionObserver(((e,t)=>{const n=oc();let r=[];e.forEach((e=>{if(e.isIntersecting){const t=e.target.id;n.add(t),Pa.lastCardIds.includes(t)||r.push(t)}})),r.forEach((e=>{const t=de().getState().cardFeed.cardInstances.find((t=>t.instance.id===e)),n=null==t?void 0:t.metadata.payloadMetadata;v.sendEvent(Object.assign({cardInstanceId:e,cardViewState:"topview",eventName:yt},n?{properties:n}:{}))}));const a=JSON.stringify(Array.from(n));sessionStorage.setItem(ve,a),Pa.lastCardIds=r}),{root:null,rootMargin:"0px",threshold:0}),()=>{var e;null===(e=l.current)||void 0===e||e.disconnect()})),[]),(0,i.h)($e.lj,{actions:(0,G.Y2)(ut,Ne,tn)},(e=>{var h,m,b,w,S,C,x,k,I,O;const{embedMode:F,enabledUiElements:M,customStrings:T,open:j}=e.application,L="preview"===F,_="single-card"===F,D="single-card"!==F&&"modal-stream"!==F,A=("standalone"===F||"launcher"===F)&&e.cardFeed.displayingOverlay,E=e.cardFeed.horizontalContainerConfig,H=!("modal-stream"===F||_||"standalone"===F&&(null==E?void 0:E.enabled)&&"shrink"===(null==E?void 0:E.emptyStyle)),P=!e.application.isPreview&&!_&&"modal-stream"!==F&&!0===M.cardListToast&&!M.customToastContainer,R=ic(E),$=e.cardFeed.cardInstances.length,N="horizontal"===R&&M.cardListHeader&&"left"===(null==E?void 0:E.headerAlignment)&&(null!==(h=null===(m=a.current)||void 0===m||null===(b=m.base)||void 0===b?void 0:b.scrollHeight)&&void 0!==h?h:0)/2,V=()=>{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 g((()=>{j&&V()}),[e.cardFeed.updateId]),g((()=>{j&&(Pa.lastCardIds=[],V(),v.sendEvent({cardViewState:"topview",eventName:kt,properties:{displayMode:_?"single":"stream"}}))}),[j]),g((()=>{var e,t;p(null==a||null===(e=a.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.scrollHeight)}),[a]),g((()=>{const e=window.frameElement,n=t.getCSSColor("background.default");"standalone"===F&&(null==E?void 0:E.enabled)&&"shrink"===(null==E?void 0:E.emptyStyle)&&(e.style.backgroundColor=n);const r=()=>{"visible"===document.visibilityState&&j&&V()};return window.addEventListener("visibilitychange",r),()=>{window.removeEventListener("visibilitychange",r)}}),[]),g((()=>{Pa.lastCardIds=[];let e=e=>{let t=!1;t||(window.requestAnimationFrame((()=>{var n;const r=e.target;!1!==(null===(n=M.customContainerHeader)||void 0===n?void 0:n.scrollHeader)&&c(r.scrollTop),t=!1})),t=!0),Pa.scrollTop=e.target.scrollTop};return r.current&&r.current.base&&(r.current.base.scrollTop=Pa.scrollTop,r.current.base.addEventListener("scroll",e)),()=>{r.current&&r.current.base&&(Pa.scrollTop=r.current.base.scrollTop,r.current.base.removeEventListener("scroll",e))}}),[]),(0,i.h)(La,{theme:t,id:ja,rendersBackground:D,embedMode:F},A&&(0,i.h)(_a,{class:"use-offset",embedMode:F}),D&&M.cardListHeader&&(0,i.h)(la,{title:T.cardListTitle||"Cards",theme:t,feedOrientation:R,ref:a,alignment:null==E?void 0:E.headerAlignment}),M.customContainerHeader&&("standalone"===F||"launcher"===F)&&(0,i.h)(Da,{embedMode:F},(0,i.h)(Aa,{ref:o,headerOffset:u,scrollbarWidth:(null==r||null===(w=r.current)||void 0===w||null===(S=w.base)||void 0===S?void 0:S.offsetWidth)-(null==r||null===(C=r.current)||void 0===C||null===(x=C.base)||void 0===x?void 0:x.clientWidth),scrollPosition:d,dangerouslySetInnerHTML:{__html:null===(k=document.getElementById("custom-container-header"))||void 0===k?void 0:k.innerHTML}})),(0,i.h)(Ea,{theme:t,embedMode:F,feedOrientation:R,headerPadding:null==o||null===(I=o.current)||void 0===I||null===(O=I.base)||void 0===O?void 0:O.scrollHeight,isEmptyState:0===$&&H,isLoadingState:!e.cardFeed.status.loaded,ref:r,cardCount:$,id:"action-cards-sdk-card-container",class:"card-container",role:"list"},!e.cardFeed.status.loaded&&"modal-stream"!==F&&(0,i.h)(Oa,{embedMode:F,state:e.cardFeed.status.errorState,backgroundColor:"transparent",theme:t,onRetry:n,noInternetConnectionMessage:T.noInternetConnectionMessage,dataLoadFailedMessage:T.dataLoadFailedMessage,tryAgainTitle:T.tryAgainTitle}),e.cardFeed.status.loaded&&$>0&&(0,i.h)(na,{cardInstances:e.cardFeed.cardInstances,theme:t,isPreview:L,onDismiss:t=>Ta(void 0,void 0,void 0,(function*(){Ys(e,e,t,f,y,"overflow-menu")})),onSnooze:(t,n)=>{e.requestSnooze(t,"overflow-menu",n)},onFeedbackSelected:(t,n)=>{t.textFeedback||"negative"===t.sentiment?e.requestFeedback(n,t):"positive"===t.sentiment&&Gs(n,e,v,f,t.source)},removeCard:t=>{e.removeCard(t)},cardStates:e.cardStates,margin:_?0:10,runtimeVariables:e.cardFeed.runtimeVariables,customStrings:T,votingOptions:e.cardFeed.cardVoting,horizontalContainerConfig:E,ref:s}),e.cardFeed.status.loaded&&0===$&&H&&(0,i.h)(Ha,{embedMode:F,feedOrientation:R,horizontalOffset:N,class:"empty-state-wrapper"},(0,i.h)(Sa,{theme:t,hasSeenTutorial:e.cardFeed.tutorialSeen,tutorialMessage:T.awaitingFirstCard,emptyMessage:T.allCardsCompleted}))),P&&(0,i.h)(va,{theme:t,feedOrientation:R,message:e.messages.cardList,delay:Ra(e),actionTitle:e.messages.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(e.messages.cardList.action)?"Try again":"Dismiss",actionHandler:()=>Ta(void 0,void 0,void 0,(function*(){var t,n,r,a,i,o,s,l,d,c;const u=null===(t=e.messages.cardList)||void 0===t?void 0:t.cardInstanceId,p=null===(n=e.messages.cardList)||void 0===n?void 0:n.action;if(u&&p)switch(p){case"submit-failed":Zs(e,e,u,!1,f,v,y,(null===(r=e.messages.cardList)||void 0===r?void 0:r.responseValues)||{},{payload:null===(a=e.messages.cardList)||void 0===a?void 0:a.payload,postSubmissionUrl:null===(i=e.messages.cardList)||void 0===i?void 0:i.postSubmissionUrl,subviewData:null===(o=e.messages.cardList)||void 0===o?void 0:o.subviewData,submitButtonName:null===(s=e.messages.cardList)||void 0===s?void 0:s.submitButtonName});break;case"dismiss-failed":const t=null===(l=e.messages.cardList)||void 0===l?void 0:l.source;t&&Ys(e,e,u,f,y,t);break;case"snooze-failed":const n=null===(d=e.messages.cardList)||void 0===d?void 0:d.snoozeDate,p=null===(c=e.messages.cardList)||void 0===c?void 0:c.source;n&&p&&Ks(e,e,u,n,f,y,p)}})),onDismiss:()=>{e.clearMessage("cardList")}}))}))},Na=cn("div")((e=>{let{yOffset:t}=e;return{position:"absolute",top:`${t}px`,left:"0",right:"0",zIndex:ms.BANNER,overflow:"hidden"}})),Va=cn("div")((e=>{let{theme:t}=e;return{position:"absolute",top:"0",left:"0",right:"0",background:t.getCSSColor("background.banner"),padding:"12px",transform:"translateY(-100%)",transition:"transform 300ms ease-in-out",".visible":{transform:"translateY(0)",position:"initial"},".animating":{position:"initial"}}})),za=cn("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"})})),Ba=e=>{let{theme:t,message:n,yOffset:r,onDismiss:a}=e;const[o,s]=h(null),[l,d]=h(null),[c,u]=h(!1);return g((()=>{null!=n&&null!=n.text?(null!=l&&(clearTimeout(l),d(null)),null!=o&&(clearTimeout(o),s(null)),u(!0),d(setTimeout((()=>{u(!1),d(null),s(setTimeout((()=>{a&&a(),s(null)}),300))}),3300))):u(!1)}),[n]),(0,i.h)(Na,{theme:t,yOffset:r},(0,i.h)(Va,{theme:t,class:`${c?"visible":""} ${o?"animating":""}`},(0,i.h)(za,{theme:t},n?n.text:"")))},Wa=cn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,cardMaximumWidth:a}=e;return Object.assign({backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"relative"},"modal-stream"===r?{height:"auto",width:"100%",maxWidth:a?`${a}px`:"initial",borderRadius:n.getShape("borderRadius.card")||"initial",border:`${n.getShape("border.card")||"0px"} solid ${n.getCSSColor("border.card")}`}:{})})),Ua=cn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,isPreview:a}=e;return Object.assign({background:t.getCSSColor("background.default"),position:"relative",bottom:a?"auto":"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"visible",padding:t.getPadding("stream")||"0px 20px 20px",boxSizing:"border-box",display:"flex",flex:"1"},"modal-stream"===r?{borderBottomLeftRadius:n.getShape("borderRadius.card")||"initial",borderBottomRightRadius:n.getShape("borderRadius.card")||"initial"}:{})})),qa=cn("div")({paddingTop:"10px"}),Ya={scrollTop:0,subviewId:""},Za=e=>{let{workflowTheme:t,feedTheme:n}=e;const r=b(null),a=w(Ma).analyticsDispatcher;return(0,i.h)($e.lj,{actions:(0,G.Y2)(Ne,tn),mapToProps:e=>{const t=Ye(e);return{containerInstanceId:e.application.containerInstanceId,cardStates:e.cardStates,cardMaximumWidth:e.cardFeed.cardMaximumWidth,customStrings:e.application.customStrings,subview:t&&Ze(t)?t:null,isPreview:e.application.isPreview||!1,embedMode:e.application.embedMode,runtimeVariables:e.cardFeed.runtimeVariables,bannerMessage:e.messages.subview}}},(e=>{if(null===e.subview)return null;const{cardInstance:o,subviewId:s}=e.subview;if(o&&s){const d=o.subviews[s],{id:c}=o.instance,u=e.cardStates[c],p="modal-subview"===e.embedMode?da:la;if(d){var l;let h=null===(l=e.runtimeVariables.values)||void 0===l?void 0:l.get(c);return h=h||new Map,g((()=>{var e;const t=()=>{let e=!1;e||(window.requestAnimationFrame((()=>{var t;const n=null==r||null===(t=r.current)||void 0===t?void 0:t.base;n&&(Ya.scrollTop=n.scrollTop,Ya.subviewId=s),e=!1})),e=!0)};return(null==r||null===(e=r.current)||void 0===e?void 0:e.base)&&(r.current.base.scrollTop=Ya.subviewId===s?Ya.scrollTop:0,r.current.base.addEventListener("scroll",t)),()=>{var e;(null==r||null===(e=r.current)||void 0===e?void 0:e.base)&&(r.current.base.scrollTop=Ya.subviewId===s?Ya.scrollTop:0,r.current.base.removeEventListener("scroll",t))}}),[]),g((()=>{a.sendEvent({cardInstanceId:c,cardViewState:"subview",eventName:Ft,properties:{subviewId:s,subviewTitle:ec(d.title,h),subviewLevel:1}})}),[s]),d.nodes=Gd(d.nodes),(0,i.h)(i.Fragment,null,(0,i.h)(Wa,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,id:ja,cardMaximumWidth:e.cardMaximumWidth},(0,i.h)(Rs,{viewState:"subview",onCancelUpload:()=>{window.AtomicUploadService.cancelUploadForCard(e.containerInstanceId,c),rn().finishCardFileUpload(c),!window.AtomicUploadService.getIsUploadingStatus(e.containerInstanceId)&&rn().setCardFeedOverlay(!1)},theme:t,renderOverlay:"uploading-files"===u,cardMaximumWidth:e.cardMaximumWidth}),(0,i.h)(p,{title:ec(d.title,h),theme:t,cardBorderRadius:n.getShape("borderRadius.card"),actionHandler:()=>{e.navigateBack(),a.sendEvent({cardInstanceId:c,cardViewState:"subview",eventName:Mt,properties:{subviewId:s,subviewTitle:ec(d.title,h),subviewLevel:1}})},inert:"uploading-files"===u}),(0,i.h)(Ua,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,ref:r,isPreview:e.isPreview,class:"use-offset",id:"action-cards-subview-container",inert:"uploading-files"===u,cardMaximumWidth:e.cardMaximumWidth},(0,i.h)(qa,{class:"offset-child"},d.nodes.map((n=>{var r;const a=d.nodes.find((e=>"form"===e.type)),l=null==a||null===(r=a.children)||void 0===r?void 0:r.find((e=>"actionButtonGroup"===e.type));return(0,i.h)(Bd,{cardInstanceId:c,cardMetadata:o.metadata,node:n,cardContext:{nodeCount:(null==a?void 0:a.children)?a.children.length:0,hasButtonFinalNode:void 0!==l,hasButtons:void 0!==(null==l?void 0:l.children)&&l.children.length>0},isWorkflow:!0,theme:t,runtimeVariables:h,subviewId:s,subviewTitle:ec(d.title,h),embedMode:e.embedMode})}))))),!e.isPreview&&(0,i.h)(Ba,{theme:t,message:e.bannerMessage,yOffset:60,onDismiss:()=>{e.clearMessage("subview")}}))}}return null}))},Ka=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,i.h)("svg",{width:"19",height:"12",viewBox:"0 0 19 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"A blank video icon","aria-hidden":n},(0,i.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:t,strokeWidth:"2"}),(0,i.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:t,strokeWidth:"2"}))};class Ga extends i.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 Mn;case"video":case"videoWithoutSrc":return Ka;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===Fr&&this.props.onClickImage&&(this.props.onClickImage(),e.preventDefault())}}const Xa=cn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,cardMaximumWidth:a}=e;return Object.assign({backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column"},"modal-stream"===r?{height:"auto",width:"100%",maxWidth:a?`${a}px`:"initial",borderRadius:n.getShape("borderRadius.card")||"initial",border:`${n.getShape("border.card")||"0px"} solid ${n.getCSSColor("border.card")}`}:{})})),Qa=cn("div")({width:"100%",height:"100%",maxWidth:"100%",minHeight:"420px",overflow:"auto",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),Ja=cn("div")((e=>{let{autoSizes:t}=e;return{overflow:"auto",flexGrow:t?"0":"1",height:t?"auto":"100%",display:"flex",flexDirection:"column",width:"100%"}})),ei=cn("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"}})),ti=cn("video")({maxWidth:"100%"}),ni=cn("img")({maxWidth:"100%",flexShrink:"0"});class ri extends Ga{render(){const{theme:e,src:t,label:n,alt:r}=this.props,{imageLoaded:a}=this.state;return(0,i.h)(i.Fragment,null,!a&&(0,i.h)(ei,{imageLoaded:a,theme:e},(0,i.h)(Mn,{fillColor:e.getCSSColor("icon.mediaBanner"),ariaHidden:!0})),a&&(0,i.h)(ni,{src:t,alt:r||n}))}}const ai=e=>{var t,n;let{src:r,alt:a,cardInstanceId:o}=e;const s=b(null),l=w(Ma).analyticsDispatcher,d="string"==typeof r&&null!==(t=null===(n=r.match(/[^\/]*$/))||void 0===n?void 0:n[0])&&void 0!==t?t:"";return g((()=>{var e,t,n,a;const i=()=>{l.sendEvent({eventName:Tt,cardInstanceId:o,cardViewState:"subview",properties:{media:d,mediaURL:r}})},c=()=>{l.sendEvent({eventName:jt,cardInstanceId:o,cardViewState:"subview",properties:{media:d,mediaURL:r}})};return null===(e=s.current)||void 0===e||null===(t=e.base)||void 0===t||t.addEventListener("play",i),null===(n=s.current)||void 0===n||null===(a=n.base)||void 0===a||a.addEventListener("ended",c),()=>{var e,t,n,r;null===(e=s.current)||void 0===e||null===(t=e.removeEventListener)||void 0===t||t.call(e,"play",i),null===(n=s.current)||void 0===n||null===(r=n.removeEventListener)||void 0===r||r.call(n,"ended",c)}}),[]),(0,i.h)(ti,{ref:s,src:r,alt:a||"video",autoplay:!0,controls:!0})},ii=e=>{let{workflowTheme:t,feedTheme:n}=e;return(0,i.h)($e.lj,{actions:Ne,mapToProps:e=>{const t=Ye(e);return{embedMode:e.application.embedMode,cardMaximumWidth:e.cardFeed.cardMaximumWidth,cardInstanceId:null==t?void 0:t.cardInstanceId,currentMediaItem:t&&Xe(t)?t.item:void 0}}},(e=>{const r=e.currentMediaItem;if(!r)return null;const a="modal-subview"===e.embedMode?da:la,o="launcher"===e.embedMode;return(0,i.h)(Xa,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,cardMaximumWidth:e.cardMaximumWidth,id:ja},(0,i.h)(a,{title:`View ${r.type}`,theme:t,cardBorderRadius:n.getShape("borderRadius.card"),actionHandler:e.navigateBack}),(0,i.h)(Ja,{autoSizes:o},(0,i.h)(Qa,null,"image"==r.type&&(0,i.h)(ri,{mediaType:r.type,src:r.url,label:r.title,alt:r.alt,theme:t,isFirstCardNode:!1,isFinalCardNode:!1}),"video"==r.type&&(0,i.h)(ai,{src:r.url,alt:r.alt,cardInstanceId:e.cardInstanceId}))))}))};var oi=n(6083),si=n.n(oi),li=n(9331),di=n.n(li),ci=n(5932),ui=n.n(ci),pi=n(4844),hi=n.n(pi),mi=n(4801),gi=n.n(mi),vi=n(7754),bi=n.n(vi),fi=n(6254),yi=n.n(fi),wi=n(5886),Si=n.n(wi);const Ci=e=>{let{fillColor:t}=e;return(0,i.h)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{d:"M1 1L5.96464 5.96464C5.98417 5.98417 5.98417 6.01583 5.96464 6.03536L1 11",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},xi=e=>{let{fillColor:t}=e;return(0,i.h)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{d:"M6.16235 11L1.16235 6L6.16235 1",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},ki=cn("button")((e=>{let{theme:t}=e;return Object.assign({height:"100%",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",justifySelf:"center",border:"none",backgroundColor:"transparent"},t.getElementFocusCSSProperties())})),Ii=cn("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"}}})),Oi=cn("span")({fontSize:"15px"}),Fi=cn("span")({fontSize:"15px",fontWeight:"normal"}),Mi=e=>{var t,n;let{theme:r,month:a,year:o="",onBack:s,onForward:l,locale:d}=e;return(0,i.h)(Ii,{theme:r},(0,i.h)(ki,{theme:r,onClick:s,"aria-label":"previous month"},(0,i.h)(xi,{fillColor:null!==(t=r.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==t?t:"rgba(0,0,0,0.5)"})),(0,i.h)("h1",{className:"MonthDisplay","aria-live":"assertive"},(0,i.h)(Oi,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}(d)[a-1]+" "),(0,i.h)(Fi,null,o)),(0,i.h)(ki,{theme:r,onClick:l,"aria-label":"next month"},(0,i.h)(Ci,{fillColor:null!==(n=r.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==n?n:"rgba(0,0,0,0.5)"})))};var Ti=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 ji=cn("button")((e=>{var t,n,r,a,i,o,s;let{isDisabled:l,isSelected:d,isToday:c,isFocused:u,theme:p}=e,h=null!==(t=p.getCSSColor("text.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==t?t:"rgba(0, 0, 0, 1)",m=p.getCSSColor("text.datePickerCalendarHoverDateItem",{skipFallback:!0}),g="transparent",v=null!==(n=p.getCSSColor("background.datePickerCalendarHoverDateItem",{skipFallback:!0}))&&void 0!==n?n:"rgba(0, 0, 0, 0.05)";const b="#1E6EFA";c&&!d?h=null!==(r=p.getCSSColor("text.datePickerCalendarCurrentDate",{skipFallback:!0}))&&void 0!==r?r:b:d?(h=null!==(a=p.getCSSColor("text.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==a?a:"white",g=null!==(i=p.getCSSColor("background.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==i?i:b,v=g):u?g="rgba(0, 0, 0, 0.05)":l&&(h="rgba(0, 0, 0, 0.2)",v="transparent");const f=null!==(o=p.getShape("borderRadius.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==o?o:"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 f&&(null===(s=f.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:f,":hover":Object.assign(Object.assign({},m?{color:m}:{}),{backgroundColor:v}),color:h}})),Li=e=>{let{theme:t,date:n,dateLabel:r,style:a,col:o,onSelect:s,onHover:l,onFocus:d}=e,c=Ti(e,["theme","date","dateLabel","style","col","onSelect","onHover","onFocus"]);const u=b(null);return(0,i.h)(ji,{"data-testid":"calendar-day-button",ref:u,title:r,"aria-label":r,"aria-selected":c.isSelected?"true":"false","aria-disabled":c.isDisabled?"true":"false","aria-colindex":o,role:"gridcell",key:n,style:a,class:`CalendarDay ${et(c)}`,isToday:Si()(n),isDisabled:c.isDisabled,isSelected:c.isSelected,isFocused:c.isFocused,theme:t,tabIndex:"-1",onMouseDown:e=>{e.stopPropagation(),c.isDisabled||(u.current&&document.activeElement!==u.current&&u.current.base.focus(),s(n))},onMouseEnter:()=>{c.isDisabled||l(n)},onMouseLeave:()=>{c.isDisabled||l(null)},onFocus:()=>{c.isDisabled||d(n)}},n.getDate())},_i=cn("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`}}})),Di=cn("div")({padding:"5px"}),Ai=cn("div")({}),Ei=cn("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)"}),Hi=cn("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"}})),Pi=cn("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)","-ms-grid-rows":"auto","-ms-grid-columns":"(1fr)[7]",marginBottom:"5px"}),Ri=e=>{const{month:t,year:n,isDateHovered:r,isDateFocused:a,isDateSelected:o,isDateInRange:s,isDateEnabled:l,onDateFocused:d,onDateHovered:c,onDateSelected:u,onChangeMonth:p,onChangeYear:h,calendarRef:m,disabled:g,locale:v,theme:b}=e,f=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return window.days=window.days||[...Array(7)].map(((t,n)=>{const r=n+1;return{dayName:new Date(Date.UTC(2017,0,n+2)).toLocaleDateString(e,{weekday:"long"}),col:r,style:{gridColumnStart:r}}})),window.days}(v),y=tt(t,n||0),w=e=>{let{date:t,style:n,col:p}=e;return(0,i.h)(Li,{key:t,theme:b,date:t,col:p,dateLabel:at()(t,"dddd, MMMM D, YYYY"),style:n,isToday:Si()(t),isHovered:r(t),isFocused:a(t),isSelected:o(t),isInRange:s(t),isDisabled:g||!l(t),onSelect:u,onHover:c,onFocus:d})};return(0,i.h)(_i,{theme:b},(0,i.h)(Mi,{theme:b,month:t,year:n,onBack:p(-1),onForward:p(1),onChangeYear:h,locale:v,disabled:g}),(0,i.h)(Di,{className:"Calendar",role:"grid",ref:m,tabIndex:0,"aria-colcount":7,"aria-rowcount":6,"aria-label":"Calendar picker"},(0,i.h)(Pi,{role:"row"},f.map((e=>{let{dayName:t,style:n,col:r}=e;return(0,i.h)(Hi,{key:t,theme:b,style:n,role:"columnheader","aria-colindex":r,"aria-label":t},(0,i.h)("abbr",null,t.slice(0,1)))}))),(0,i.h)(Ai,{role:"rowgroup"},(0,i.h)(Ei,{role:"row","aria-rowIndex":1},y.week1.map(w)),(0,i.h)(Ei,{role:"row","aria-rowIndex":2},y.week2.map(w)),(0,i.h)(Ei,{role:"row","aria-rowIndex":3},y.week3.map(w)),(0,i.h)(Ei,{role:"row","aria-rowIndex":4},y.week4.map(w)),(0,i.h)(Ei,{role:"row","aria-rowIndex":5},y.week5.map(w)),(0,i.h)(Ei,{role:"row","aria-rowIndex":6},y.week6.map(w)))))};function $i(){return $i=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},$i.apply(this,arguments)}const Ni="DatePicker",Vi="DateRangePicker";class zi extends i.Component{constructor(e){var t,n,r;super(e),r=void 0,(n="calendar")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;const a=e.date||new Date,o=a.getMonth()+1,s=a.getFullYear();this.state={month:o,year:s,focused:a,hovered:new Date},this.calendar=(0,i.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.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,n;if(!(null===(n=this.calendar)||void 0===n?void 0:n.current.base.contains(document.activeElement)))return;if(e.key===Br)return void(this.props.onCancel&&this.props.onCancel());e.preventDefault();const{shiftKey:r,key:a}=e,i=a===Rr,o=a===Nr,s=a===Vr,l=a===zr,d=a===Hr,c=a===Ar,u=a===Pr,p=a===Er,h=a===$r,m=null!==(t=this.props.isDateEnabled)&&void 0!==t?t:function(){return!0};let{focused:g}=this.state;if(i)m(g)&&this.onDateSelected(g);else if(r&&s){const e=si()(g,-1);m(e)&&this.onDateFocused(e)}else if(r&&l){const e=si()(g,1);m(e)&&this.onDateFocused(e)}else if(s){const e=di()(g,-1);m(e)&&this.onDateFocused(e)}else if(l){const e=di()(g,1);m(e)&&this.onDateFocused(e)}else if(c){const e=ui()(g,-1);m(e)&&this.onDateFocused(e)}else if(p){const e=ui()(g,1);m(e)&&this.onDateFocused(e)}else if(d){const e=hi()(g,-1);m(e)&&this.onDateFocused(e)}else if(u){const e=hi()(g,1);m(e)&&this.onDateFocused(e)}else h?this.onDateSelected(g):o&&this.props.onCancel&&this.props.onCancel()}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===Ni)n&&n(e);else if(t===Vi){const t=!this.props.startDate,n=this.props.startDate&&this.props.endDate,i=this.props.startDate&&this.props.startDate>e;t||n||i?(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){var t;return(null!==(t=this.props.isDateEnabled)&&void 0!==t?t:function(){return!0})(e)}isDateFocused(e){return gi()(e,this.state.focused)}isDateHovered(e){return gi()(e,this.state.hovered)}isDateSelected(e){return(this.props.type===Ni?[this.props.date]:[this.props.startDate,this.props.endDate]).some((t=>!!t&&gi()(t,e)))}isDateInRange(e){if(this.props.type===Ni)return!1;const{startDate:t,endDate:n}=this.props,{focused:r,hovered:a}=this.state,i=n||(t&&r&&!gi()(t,r)?r:a);return!(!t||!i||bi()(i,t))&&yi()(e,t,i)}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,i.h)(Ri,{calendarRef:this.calendar,month:this.state.month,year:this.state.year,isDateHovered:this.isDateHovered,isDateFocused:this.isDateFocused,isDateSelected:this.isDateSelected,isDateInRange:this.isDateInRange,isDateEnabled:this.isDateEnabled,onDateSelected:this.onDateSelected,onDateHovered:this.onDateHovered,onDateFocused:this.onDateFocused,onChangeMonth:this.onChangeMonth,onChangeYear:this.onChangeYear,locale:this.props.locale||"en-US",disabled:this.props.disabled||!1,theme:this.props.theme})}}const Bi=e=>(0,i.h)(zi,$i({type:Ni},e));function Wi(){return Wi=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},Wi.apply(this,arguments)}const Ui=cn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:a?`0px 0px ${r?"0px":a}`:`${n?0:10}px 0px ${r?0:10}px`}})),qi=cn("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",overflow:"hidden",minWidth:"0",padding:`10px ${void 0!==a?a:20}px`,flexGrow:"1",cursor:r||"pointer"})})),Yi=e=>{let{nodeKey:t,children:n,mode:r,cursor:a,ref:o,theme:s,isFirstCardNode:l,isFinalCardNode:d,onClick:c,tabFocusable:u,innerRef:p,hPadding:h,accessibleAttributes:m}=e;const g=u?e=>{e.charCode===Fr&&c&&(e.preventDefault(),c())}:void 0;return(0,i.h)(Ui,{ref:o,isFirstCardNode:l,isFinalCardNode:d,theme:s},(0,i.h)(qi,Wi({key:t,"data-element-key":t,mode:r,theme:s,cursor:a,class:"component-field-wrapper",onClick:c,onKeyPress:g,tabIndex:u?0:void 0,ref:p,hPadding:h},m),n))},Zi=cn("div")((e=>{let{thumbnailUrl:t,theme:n}=e;return{backgroundColor:n.getCSSColor("background.media"),borderRadius:n.getShape("borderRadius.media")||"initial",width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",marginRight:"10px",backgroundImage:`url('${t}')`,backgroundSize:"cover",backgroundPosition:"center",alignSelf:"start"}})),Ki=e=>{let{thumbnailUrl:t,theme:n}=e;return(0,i.h)(Zi,{thumbnailUrl:t,theme:n})},Gi=cn("div")((e=>{let{theme:t,mode:n,truncateLabel:r,inputHasValue:a}=e;return Object.assign(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"}),"inline"===n&&r?{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",minWidth:"0",flex:"0 1 auto",flexShrink:a?"2":"1",paddingBottom:"0.1em",marginBottom:"-0.1em"}:{})})),Xi=e=>{let{theme:t,children:n,mode:r,name:a,truncateLabel:o,inputHasValue:s}=e;return(0,i.h)(Gi,{theme:t,mode:r,id:a,"aria-hidden":!n,truncateLabel:o,inputHasValue:s},n)},Qi=e=>{let{fillColor:t,ariaHidden:n,styles:r}=e;return(0,i.h)("svg",{width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":n,style:r},(0,i.h)("path",{d:"M1 1L6 6L11 1",stroke:t,"stroke-opacity":"1","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},Ji=cn("div")((e=>{let{theme:t,requiresTopSpacing:n}=e;const r=t.getShape("padding.elementBottom",{skipFallback:!0}),a=r?Number(r.replace("px","")):10;return Object.assign(Object.assign({color:t.getCSSColor("text.error")},t.getCSSFontProperties("error")),{marginTop:`${n?"":"-"}${.5*Math.floor(a)}px`,marginRight:"0px",marginBottom:`${a}px`,marginLeft:"0px"})})),eo=e=>{let{theme:t,isFinalCardNode:n,cardInstanceId:r,subviewId:a,name:o,variableResolver:s}=e;return(0,i.h)($e.lj,{mapToProps:e=>{let{validationStates:t}=e;return{validationStates:t}}},(e=>{let{validationStates:l}=e;const d=l[r]||{};let c;var u,p,h;a?c=null===(u=d.subviews)||void 0===u||null===(p=u[a])||void 0===p?void 0:p[o]:c=null===(h=d.validations)||void 0===h?void 0:h[o];return c&&c.errorMessage?(0,i.h)(Ji,{theme:t,requiresTopSpacing:n,role:"alert","data-testid":"validation"},s(c.errorMessage)):null}))},to=e=>{let{fillColor:t,style:n,ariaHidden:r}=e;return(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",height:"8",viewBox:"0 0 11 8",width:"11",style:n,"aria-hidden":r},(0,i.h)("path",{"clip-rule":"evenodd",d:"m10.7071.292893c.3905.390524.3905 1.023687 0 1.414217l-5.99999 6c-.39053.39052-1.02369.39052-1.41422 0l-2.999997-3c-.3905241-.39053-.3905241-1.02369 0-1.41422.390524-.39052 1.023687-.39052 1.414217 0l2.29289 2.2929 5.29289-5.292897c.39053-.3905241 1.02371-.3905241 1.41421 0z",fill:null!=t?t:"#000","fill-rule":"evenodd"}))},no=cn("div")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===n?"pinned":"primary")),{display:"block",cursor:"pointer"}),"inline"===n?{display:"flex",gap:"5px",flex:"1 1 auto",minWidth:"0"}:{})})),ro=cn("div")((()=>({flex:"0 0 auto",alignItems:"center"}))),ao=cn("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),io=cn("div")((e=>{var t,n,r,a,i;let{open:o,openPosition:s,height:l,theme:d}=e;return Object.assign(Object.assign({position:"absolute",top:`${s}px`,left:o?"0px":"-999px",width:"100%",backgroundColor:d.getCSSColor("background.dropdownMenu"),boxShadow:`${null!==(t=d.getShape("offset.dropdownMenuShadow",{skipFallback:!0}))&&void 0!==t?t:"2px"} ${null!==(n=d.getShape("offset.dropdownMenuShadow",{skipFallback:!0}))&&void 0!==n?n:"2px"} ${null!==(r=d.getShape("blur.dropdownMenuShadow",{skipFallback:!0}))&&void 0!==r?r:"10px"} ${null!==(a=d.getCSSColor("shadow.dropdownMenu",{skipFallback:!0}))&&void 0!==a?a:"rgba(0,0,0,0.2)"}`,cursor:"pointer",height:`${l}px`,maxHeight:"335px",overflow:"auto",zIndex:ms.DROPDOWN,borderRadius:null!==(i=d.getShape("borderRadius.dropdownMenu",{skipFallback:!0}))&&void 0!==i?i:"5px",color:"black"},d.getCSSFontProperties("primary")),{visibility:o?"visible":"hidden"})})),oo=cn("div")((e=>{var t,n;let{theme:r,disabled:a}=e;return Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"space-between",gap:"5px",padding:"20px",":hover":{backgroundColor:null!==(t=r.getCSSColor("background.dropdownMenuItem",{skipFallback:!0}))&&void 0!==t?t:"rgba(0,0,0,0.05)"},":active":{backgroundColor:null!==(n=r.getCSSColor("background.dropdownMenuItem",{skipFallback:!0}))&&void 0!==n?n:"rgba(0,0,0,0.1)"},border:"0px",color:a?"rgba(0,0,0,0.3)":r.getCSSColor("text.dropdownMenuItem")},r.getCSSFontProperties("dropdownMenuItem")),r.getElementFocusCSSProperties())})),so=cn("div")((e=>{let{theme:t,placeholder:n,mode:r}=e;return Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("stacked"===r?"primary":"secondary")),{marginRight:"10px",color:"stacked"===r?t.getCSSColor("text.primary"):t.getCSSColor("text.secondary"),paddingTop:"stacked"===r?"2px":"0px"}),"inline"===r?{maxWidth:"100%",minWidth:"0",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",flex:n?"1 1 0":"1 0 auto",textAlign:"right",paddingBottom:"0.1em",marginBottom:"-0.1em"}:{})})),lo=e=>{let{onClick:t,children:n,ref:r,theme:a,disabled:o,isSelected:s}=e;return(0,i.h)(oo,{onClick:t,ref:r,tabIndex:"-1",theme:a,disabled:o,"aria-disabled":o,"aria-selected":s,role:"option"},n)},co=e=>{let{children:t,mode:n,theme:r,ariaLabel:a,placeholder:o}=e;return(0,i.h)(so,{theme:r,mode:n,class:"dropdown-selected-value",placeholder:o,"aria-label":a},t)},uo=(e,t,n,r)=>{var a,i,o,s,l,d;let c=0,u=0,p=0,h=0,m=null;const g=null===(s=window.frameElement)||void 0===s?void 0:s.parentElement,v=document.querySelector("#action-cards-sdk-card-container"),b=(null==g?void 0:g.scrollHeight)!==(null==g?void 0:g.clientHeight),f=(null==v?void 0:v.scrollHeight)!==(null==v?void 0:v.clientHeight);if("launcher"!==r&&g&&b&&!f)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();c=e.top-(n?null==n?void 0:n.top:0),u=e.bottom-(n?null==n?void 0:n.top:0),p=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();h=e.scrollTop,c=r.top-n.top-h,u=c+t.offsetHeight,p=e.offsetHeight}}e.style.height="auto";const S=c-20+(m?m.scrollTop:0),C=p-u-20,x=S-(null!==(i=null===(l=m)||void 0===l?void 0:l.scrollTop)&&void 0!==i?i:0),k=(null!==(o=null===(d=m)||void 0===d?void 0:d.offsetHeight)&&void 0!==o?o:p)-x-20-t.offsetHeight,I=e.offsetHeight;e.style.height="";const O=t.offsetTop,F={openPosition:O+t.offsetHeight+10,height:I},M={openPosition:O-I-10,height:I};return I<=k?F:I<=x?M:I<=C?F:I<=S?M:{openPosition:O,height:Math.min(I,C+t.offsetHeight)}},po=K.forwardRef(((e,t)=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,embedMode:o,attributes:{format:s,defaultValue:l,thumbnailSrc:d,label:c,name:u,values:p,placeholder:m},validations:v,theme:y,isFinalCardNode:w,variableResolver:S,onValueChanged:C}=e;const[x,k]=h(!1),[I,O]=h(0),[F,M]=h(0),[T,j]=h(l?S(l.toString()):null),[L,_]=h(-1),D=b(null),A=b(null),E=b(null),H=b(null),P=b(l?S(l.toString()):null),R=p.find((e=>{let{value:t}=e;return T===t}));f(t,(()=>({getCurrentValue:()=>T,setCurrentValue:e=>j(e)}))),g((()=>{const e=e=>{D.current&&!D.current.base.contains(e.target)&&(x&&bt().validateField(r,u,T,v),k(!1))},t=e=>{var t,n;(null==E||null===(t=E.current)||void 0===t||null===(n=t.base)||void 0===n?void 0:n.contains(document.activeElement))&&e.key===Nr&&(k(!1),A.current.base.focus())};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}})),g((()=>{if(C)C(T);else{const e=ft(r,u,a);e?(P.current=e.toString(),j(e)):bt().handleFormChange(r,u,T,a)}E.current&&H.current&&(E.current.base.scrollTop=H.current.base.offsetTop)}),[]),g((()=>{const e=l?S(l.toString()):null;e!==P.current&&(T===P.current&&(C?C(e):bt().handleFormChange(r,u,e,a),j(e)),P.current=l?S(l.toString()):null)}),[l]),g((()=>{if(x){const e=p.findIndex((e=>T===e.value));_(Math.max(0,e))}else _(-1)}),[x]);const $=`dropdown-label-${u}`;return(0,i.h)($e.lj,{actions:ut,mapToProps:()=>{}},(e=>(0,i.h)(ao,null,(0,i.h)(Yi,{nodeKey:n,ref:D,innerRef:A,mode:s,theme:y,isFinalCardNode:w,tabFocusable:!0,accessibleAttributes:{role:"combobox","aria-haspopup":"listbox","aria-expanded":x,"aria-controls":`${u}-dropdown-body`,"aria-labelledby":$},onClick:()=>{if(D.current){const{openPosition:t,height:n}=uo(E.current.base,D.current.base,!!a,o);O(t),M(n),k((t=>(t&&e.validateField(r,u,T,v,a),!t)))}}},d&&(0,i.h)(ro,null,(0,i.h)(Ki,{thumbnailUrl:S(d),theme:y})),(0,i.h)(no,{mode:s,theme:y},(0,i.h)(Xi,{theme:y,mode:s,name:$,truncateLabel:"inline"===s,inputHasValue:!!T},S(c)),(0,i.h)(co,{theme:y,mode:s,placeholder:!R},R?R.title:S(m))),(0,i.h)(Qi,{fillColor:y.getCSSColor("icon.dropdown"),styles:{flex:"0 0 auto"},ariaHidden:!0}),(0,i.h)(io,{ref:E,open:x,openPosition:I,theme:y,height:F,className:"dropdown-body",id:`${u}-dropdown-body`,role:"listbox"},(0,i.h)(Yr,{defaultIndex:L,theme:y},p.map(((t,n)=>(0,i.h)(lo,{onClick:()=>{t.disabled||(j(t.value),C?C(t.value):e.handleFormChange(r,u,t.value,a),e.validateField(r,u,t.value,v,a),A&&A.current&&A.current.base&&A.current.base.focus(),_(n))},ref:t.value===T?H:null,theme:y,disabled:t.disabled,isSelected:t.value===T,"data-testid":`option-${t.title}`},t.title,t.value===T&&(0,i.h)(to,{fillColor:y.getCSSColor("background.dropdownMenuSelectedIcon"),style:{flexShrink:0},ariaHidden:!0}))))))),(0,i.h)(eo,{name:u,cardInstanceId:r,subviewId:a,theme:y,isFinalCardNode:w,variableResolver:S}))))})),ho=cn("div")((e=>{let{mode:t,theme:n}=e;return Object.assign(Object.assign({},n.getCSSFontProperties("stacked"===t?"pinned":"primary")),{display:"stacked"===t?"block":"flex",cursor:"pointer",flex:"1 1 auto",gap:"5px",maxWidth:"100%",minWidth:"0"})})),mo=cn("div")((()=>({flex:"0 0 auto",alignItems:"center"}))),go=cn("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),vo=e=>{var t,n,r,a,o,s,l,d,c,u,p,m;let{nodeKey:v,cardInstanceId:f,subviewId:y,attributes:{format:w,defaultValue:S,thumbnailSrc:C,label:x,name:k,placeholder:I},controlledDateValidator:O,validations:F,theme:M,isFinalCardNode:T,variableResolver:j,onValueChanged:L,embedMode:_}=e;const D=S?new Date(S):void 0,A=b(D?(0,J.addMinutes)(D,D.getTimezoneOffset()):null),[E,H]=h(!1),[P,R]=h(0),[$,N]=h(0),[V,z]=h(A.current),B=b(null),W=b(null),U=b(null),q=(null==F||null===(t=F.maximumDate)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.maximumDate)?new Date(null==F||null===(r=F.maximumDate)||void 0===r||null===(a=r.attributes)||void 0===a?void 0:a.maximumDate):void 0,Y=(null==F||null===(o=F.minimumDate)||void 0===o||null===(s=o.attributes)||void 0===s?void 0:s.minimumDate)?new Date(null==F||null===(l=F.minimumDate)||void 0===l||null===(d=l.attributes)||void 0===d?void 0:d.minimumDate):void 0,Z=new Date;let K=new Date;if(q&&Y){if(!(Z<=q&&Z>=Y)){K=Math.abs((0,J.differenceInSeconds)(Z,q))<Math.abs((0,J.differenceInSeconds)(Z,Y))?q:Y}}else if(Y){Z>=Y||(K=Y)}else if(q){Z<=q||(K=q)}const G=V?new Date(V):new Date(K);G.setHours(0,0,0,0);const X=()=>{E&&bt().validateField(f,k,V,F,y),H(!1)};let Q;g((()=>{const e=e=>{U.current&&!U.current.base.contains(e.target)&&B.current&&!B.current.base.contains(e.target)&&X()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),g((()=>{const e=V?V.toISOString():void 0,t=V?at()(V,ce):null;if(L)L(e);else{const e=ft(f,k,y);e?(A.current=new Date(e),z(e)):bt().handleFormChange(f,k,t,y)}}),[]),g((()=>{var e;const t=S?new Date(S):void 0,n=t?(0,J.addMinutes)(t,t.getTimezoneOffset()):null;if((null==n?void 0:n.toDateString())!==(null===(e=A.current)||void 0===e?void 0:e.toDateString())){if(V===A.current){const e=n?n.toISOString():void 0,t=n?at()(n,ce):null;L?L(e):bt().handleFormChange(f,k,t,y),z(n)}A.current=n}}),[S]),O?Q=O:((null==F||null===(c=F.maximumDate)||void 0===c||null===(u=c.attributes)||void 0===u?void 0:u.maximumDate)||(null==F||null===(p=F.minimumDate)||void 0===p||null===(m=p.attributes)||void 0===m?void 0:m.minimumDate))&&(Q=e=>{var t,n,r,a;const i=null===(t=F.maximumDate)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.maximumDate,o=null===(r=F.minimumDate)||void 0===r||null===(a=r.attributes)||void 0===a?void 0:a.minimumDate,s=i?nt(i,{isMax:!0}):void 0,l=o?nt(o,{isMin:!0}):void 0;return(!s||e<=s)&&(!l||e>=l)});const ee=`datepicker-label-${k}`,te=V?at()(V,"DD MMM YYYY"):j(I),ne=()=>{W&&W.current&&W.current.base&&W.current.base.focus()};return(0,i.h)($e.lj,{actions:ut,mapToProps:()=>{}},(e=>(0,i.h)(go,null,(0,i.h)(Yi,{nodeKey:v,ref:B,innerRef:W,mode:w,theme:M,isFinalCardNode:T,tabFocusable:!0,accessibleAttributes:{role:"button","aria-haspopup":"dialog","aria-expanded":E,"aria-labelledby":ee},onClick:()=>{if(B.current){const{openPosition:t,height:n}=uo(U.current.base,B.current.base,!!y,_);R(t),N(n),H((t=>(t&&e.validateField(f,k,V,F,y),!t)))}}},C&&(0,i.h)(mo,{mode:w},(0,i.h)(Ki,{thumbnailUrl:j(C),theme:M})),(0,i.h)(ho,{mode:w,theme:M},(0,i.h)(Xi,{theme:M,mode:w,name:ee,truncateLabel:"inline"===w,inputHasValue:!!V},j(x)),(0,i.h)(co,{theme:M,mode:w,placeholder:!V,ariaLabel:te},te)),(0,i.h)(Qi,{fillColor:M.getCSSColor("icon.dropdown"),styles:{flex:"0 0 auto"},ariaHidden:!0})),(0,i.h)(io,{ref:U,open:E,openPosition:P,theme:M,height:$},(0,i.h)(Bi,{date:G,open:E,theme:M,onDateSelected:t=>{z(t);const n=t?at()(t,ce):void 0,r=t?t.toISOString():void 0;L?L(r):e.handleFormChange(f,k,n,y),e.validateField(f,k,r,F,y),H(!1),ne()},onCancel:()=>{X(),ne()},isDateEnabled:Q})),(0,i.h)(eo,{theme:M,isFinalCardNode:T,name:k,cardInstanceId:f,subviewId:y,variableResolver:j}))))},bo=15,fo=(0,J.startOfDay)(new Date),yo=e=>{let{cardInstanceId:t,attributes:{format:n,name:r,label:a,defaultValue:o},validations:s,theme:l,maxDateTime:d,selectedDate:c,selectedTime:u,isWorkflow:p,variableResolver:m,onValueChanged:v}=e;const f=new Date(o),[y,w]=h(""),S=b(null),C=b([...Array(96).keys()].map((e=>({title:(0,J.format)((0,J.addMinutes)(fo,e*bo),"h:mm A"),value:""+e*bo,disabled:!1})))),x=e=>{let t="";return e.forEach((e=>{e.disabled||(t=e.value)})),t};g((()=>{if(c){const t=C.current.map(((e,t)=>{const n=(0,J.addMinutes)(c,t*bo);return e.disabled=!!(d&&n>=d),e}));if(C.current=t,u&&d){if((0,J.addMinutes)(c,u||0)>d){const t=x(C.current);var e;if(t)null==v||v(t),null===(e=S.current)||void 0===e||e.setCurrentValue(t)}}}}),[d,c]);return(0,i.h)(po,{ref:S,attributes:{name:r,label:a,format:n,values:C.current,defaultValue:(()=>{const e=wo(f);if(d){var t;const n=(0,J.differenceInMinutes)(d,(0,J.startOfDay)(f)),r=x(C.current);if(f>d)return Number(r);if(e<n)return e;const a=(0,J.differenceInMinutes)(d,(0,J.startOfDay)(d));return w((0,J.format)((0,J.addMinutes)(fo,a),"h:mm A")),null===(t=S.current)||void 0===t||t.setCurrentValue(""),null==v||v(a.toString()),a}return e})(),placeholder:y},cardInstanceId:t,variableResolver:m,theme:l,validations:s,isWorkflow:p,onValueChanged:v})},wo=e=>Math.ceil(((0,J.differenceInMinutes)(e,(0,J.startOfDay)(e))+5)/bo)*bo,So=cn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,cardMaximumWidth:a}=e;return Object.assign({backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"},"modal-stream"===r?{position:"relative",height:"auto",width:"100%",maxWidth:a?`${a}px`:"initial",borderRadius:n.getShape("borderRadius.card")||"initial",border:`${n.getShape("border.card")||"0px"} solid ${n.getCSSColor("border.card")}`}:{})})),Co=cn("div")({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0px 20px 20px"}),xo=cn("div")({overflow:"auto",paddingTop:"10px"}),ko=e=>{let{workflowTheme:t,feedTheme:n}=e;const r=w(Ma),a=r.analyticsDispatcher,o=r.cardEventDispatcher,s=r.authTokenProvider,[l,d]=h(void 0),[c,u]=h(0),p=new Date;return(0,i.h)($e.lj,{actions:(0,G.Y2)(Ne,tn),mapToProps:e=>{const t=Ye(e);let n,r,a;return t&&Ke(t)&&(n=t.cardInstanceId,r=t.source,a=t.cardExpiry),{screenTitle:e.application.customStrings.cardSnoozeTitle||"Remind me",embedMode:e.application.embedMode,cardMaximumWidth:e.cardFeed.cardMaximumWidth,snoozeCardInstanceId:n,source:r,snoozeCardExpiry:a}}},(e=>{const[r,m]=h(p),[v,b]=h(0),f=e.snoozeCardInstanceId,y=e.snoozeCardExpiry,w=e.source;if(!f||!w)return null;const S=e.screenTitle,C="modal-subview"===e.embedMode?da:la;g((()=>{a.sendEvent({eventName:It,cardInstanceId:f,cardViewState:"subview"})}),[]);return(0,i.h)(So,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,cardMaximumWidth:e.cardMaximumWidth,id:ja},(0,i.h)(C,{title:S,theme:t,cardBorderRadius:n.getShape("borderRadius.card"),actionHandler:()=>{a.sendEvent({eventName:Ot,cardInstanceId:f,cardViewState:"subview"}),e.navigateBack()}}),(0,i.h)(Co,{class:"use-offset"},(0,i.h)(xo,{class:"offset-child"},(0,i.h)(vo,{cardInstanceId:f,attributes:{name:"snoozeDate",label:"Date",defaultValue:at()(p,"YYYY-MM-DD[T]00:00:00.000[Z]"),format:"inline"},isWorkflow:!0,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{m(new Date(e))},controlledDateValidator:y?e=>{if(y){return e<=new Date(y)}return!0}:void 0}),(0,i.h)(yo,{attributes:{name:"snoozeTime",label:"Time",defaultValue:p.toISOString(),format:"inline"},isWorkflow:!0,cardInstanceId:f,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{b(Number.parseInt(e))},selectedDate:r,selectedTime:v,maxDateTime:y?new Date(y):void 0}),(0,i.h)(el,{isWorkflow:!0,clickHandler:()=>()=>{const t=Io(r,v);if((0,J.isPast)(t)){const e=c+1;u(e),d({text:"Date must be in the future",messageId:`${e}`,cardInstanceId:f,action:"other"})}else e.navigateBack(),Ks(de().getState(),e,f,t,o,s,w)},text:"Done",theme:t,appearance:"primary"}))),(0,i.h)(va,{theme:t,message:l,actionTitle:"Dismiss",onDismiss:()=>{}}))}))},Io=(e,t)=>(0,J.addMinutes)((0,J.startOfDay)(e),t),Oo=(e,t,n)=>({getTheme:r=>new bn(e,r,t,n)});var Fo=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};const Mo="theme_cache",To=()=>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(Mo).createIndex("stream_container_id","stream_container_id",{unique:!0})}}));var jo=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};const Lo=(e,t)=>jo(void 0,void 0,void 0,(function*(){const n=`theme/${e}`,{data:r,response:a}=yield Mc.get(n,void 0,t,{streamContainerId:e});if(200===a.status){if(r&&r.theme){try{yield((e,t,n)=>Fo(void 0,void 0,void 0,(function*(){const r=yield To();return new Promise(((a,i)=>{const o=r.transaction(Mo,"readwrite").objectStore(Mo).put({themePayload:t,eTag:n},e);o.onsuccess=()=>{r.close();const t=o.result;a({streamContainerId:e,themePayload:t.themePayload,eTag:t.eTag})},o.onerror=e=>{r.close(),i(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}})),_o=e=>jo(void 0,void 0,void 0,(function*(){try{const t=yield(e=>Fo(void 0,void 0,void 0,(function*(){const t=yield To();return new Promise(((n,r)=>{const a=t.transaction(Mo,"readonly").objectStore(Mo).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 Do extends i.Component{componentDidCatch(e){this.props.onError?this.props.onError(e):console.error(e)}render(){return this.props.children}}const Ao=e=>{let{fontFamilies:t}=e;return(0,i.h)("style",{dangerouslySetInnerHTML:{__html:t.map((e=>Ho(e))).join("\n")}})},Eo={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"},Ho=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 i=a?new URL(a).pathname:null;if(!i)return"";const o=i.split("."),s=o[o.length-1],l=Eo[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 `},Po=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"}),Ro=cn("textarea")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},Po(t)),{resize:"none",boxSizing:"content-box",paddingLeft:"0px",paddingRight:"0px"})})),$o=cn("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({},Po(n)),t?{lineHeight:`${t}px`}:{})})),No=(e,t,n)=>{let r=0;"getComputedStyle"in window&&document.defaultView&&(r=parseInt(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height"))),e.style.height="auto",n&&(e.style.minHeight=n*r+"px"),1===t?e.style.height="auto":t>0?e.style.height=t*r+"px":(e.style.height=`${e.scrollHeight}px`,e.style.paddingTop="4px")};let Vo=null;const zo=K.forwardRef(((e,t)=>{let{nodeKey:n,cardInstanceId:r,subviewId:a,attributes:{defaultValue:o,numberOfLines:s,name:l,thumbnailSrc:d,placeholder:c,maxLength:u},minimumLines:p,validations:m,theme:v,isFinalCardNode:y,variableResolver:w,onValueChanged:S}=e;const C=b(null),x=b(o),[k,I]=h(w(o)),O=1===s?$o:Ro;g((()=>{const{current:{base:e}}=C;No(e,s,p)})),g((()=>{const e=ft(r,l,a);e?(x.current=e,I(e)):bt().handleFormChange(r,l,k,a)}),[]),g((()=>{if(o!==x.current){if(k===w(x.current)){const e=w(o);I(e),bt().handleFormChange(r,l,e,a)}x.current=o}}),[o]);const F=w(c);return(0,i.h)($e.lj,{actions:ut,mapToProps:()=>{}},(e=>(f(t,(()=>({clearInput:()=>{I(""),C.current.base&&No(C.current.base,s),e.handleFormChange(r,l,"",a)}}))),(0,i.h)(i.Fragment,null,(0,i.h)(Yi,{nodeKey:n,mode:"inline",theme:v,isFinalCardNode:y},d&&(0,i.h)(Ki,{thumbnailUrl:w(d),theme:v}),(0,i.h)(O,{theme:v,ref:C,placeholder:F,value:k,maxlength:u,className:"input-text",onInput:t=>{const{current:{base:n}}=C,{value:i}=t.target;I(i),No(n,s),((e,t)=>{null!==Vo&&(clearTimeout(Vo),Vo=null),Vo=setTimeout((()=>{t(r,l,null!=e?e:void 0,m,a)}),200)})(i,e.validateField),e.handleFormChange(r,l,i,a),S&&S(i)},rows:"1"})),(0,i.h)(eo,{name:l,cardInstanceId:r,subviewId:a,theme:v,isFinalCardNode:y,variableResolver:w})))))})),Bo=cn("div")((e=>{let{theme:t}=e;return Object.assign({padding:"10px 20px",display:"flex",width:"100%",alignItems:"center",border:"0px"},t.getElementFocusCSSProperties())})),Wo=cn("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"))})),Uo=cn("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%"}})),qo=e=>{let{title:t,value:n,checked:r,onValueSelected:a,theme:o}=e;return(0,i.h)(Bo,{onClick:()=>{a(n)},role:"radio","aria-checked":r,theme:o,tabIndex:"-1"},(0,i.h)(Wo,{theme:o},t),(0,i.h)(Uo,{checked:r,theme:o}))},Yo=cn("div")((e=>{let{}=e;return{display:"flex",flexFlow:"column wrap",width:"100%"}})),Zo=cn("div")((e=>{let{}=e;return{display:"none"}})),Ko=e=>{let{attributes:{items:t,title:n,name:r},theme:a,onValueChanged:o}=e;const[s,l]=h(null),d=`radio-group-${r}`;return(0,i.h)(Yi,{mode:"inline",theme:a,hPadding:0},(0,i.h)(Zo,{id:d},n),(0,i.h)(Yo,{role:"radiogroup","aria-labelledby":d},(0,i.h)(Yr,{theme:a},t.map((e=>(0,i.h)(qo,{title:e.title,value:e.value,theme:a,checked:s===e.value,onValueSelected:e=>{l(e),o&&o(e)}}))))))},Go=cn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,cardMaximumWidth:a}=e;return Object.assign({backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"},"modal-stream"===r?{height:"auto",width:"100%",maxWidth:a?`${a}px`:"initial",borderRadius:n.getShape("borderRadius.card")||"initial",border:`${n.getShape("border.card")||"0px"} solid ${n.getCSSColor("border.card")}`}:{})})),Xo=cn("div")({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0px 20px 20px"}),Qo=cn("div")({overflow:"auto",paddingTop:"10px"}),Jo=cn("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.error")},t.getCSSFontProperties("error")),{margin:"-10px 0 30px 0"})})),es=e=>{let{workflowTheme:t,feedTheme:n}=e;const r=w(Ma),a=r.analyticsDispatcher,o=r.cardEventDispatcher,s=b(),[l,d]=h(null),[c,u]=h(null),[p,m]=h(!1);return(0,i.h)($e.lj,{actions:(0,G.Y2)(Ne,tn),mapToProps:e=>{const t=Ye(e),n=t&&Ge(t)?t:void 0;return{embedMode:e.application.embedMode,cardMaximumWidth:e.cardFeed.cardMaximumWidth,screenTitle:e.application.customStrings.votingFeedbackTitle||"Send feedback",validationMessage:e.application.customStrings.votingFeedbackValidationMessage||"Feedback is limited to 280 characters.",feedbackSentiment:null==n?void 0:n.sentiment,feedbackCardInstanceId:null==n?void 0:n.cardInstanceId,feedbackSource:null==n?void 0:n.source,textFeedback:null==n?void 0:n.textFeedback,textFeedbackLabel:null==n?void 0:n.textFeedbackLabel}}},(e=>{const r="modal-subview"===e.embedMode?da:la,h=e.screenTitle,g=e.feedbackCardInstanceId,v=e.feedbackSource,b="positive"===e.feedbackSentiment&&e.textFeedback,f=[{title:"It's not relevant",value:"not-relevant"},{title:"I see this too often",value:"too-often"}];if(e.textFeedback&&f.push({title:"Something else",value:"other"}),!g||!v)return null;const y="positive"===e.feedbackSentiment?"Add optional feedback...":"Add your feedback...";return(0,i.h)(Go,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,cardMaximumWidth:e.cardMaximumWidth,id:ja},(0,i.h)(r,{title:h,theme:t,cardBorderRadius:n.getShape("borderRadius.card"),actionHandler:()=>{var t;u(null),null===(t=s.current)||void 0===t||t.clearInput(),e.navigateBack()}}),(0,i.h)(Xo,{class:"use-offset"},(0,i.h)(Qo,{class:"offset-child"},"negative"===e.feedbackSentiment&&(0,i.h)(Ko,{attributes:{title:h,name:"feedback-reason",items:f},isWorkflow:!0,cardInstanceId:g,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{d(e)}}),("other"===l||b)&&(0,i.h)(i.Fragment,null,(0,i.h)(zo,{ref:s,attributes:{name:"feedback-message",defaultValue:"",placeholder:e.textFeedbackLabel&&e.textFeedbackLabel.length>0?e.textFeedbackLabel:y,numberOfLines:0,maxLength:280},minimumLines:3,isWorkflow:!0,cardInstanceId:g,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{if(e.length>=280)return m(!0);m(!1),u(e)}}),p&&(0,i.h)(Jo,{theme:t,"data-testid":"feedback-validation-error"},e.validationMessage)),(0,i.h)(el,{isWorkflow:!0,clickHandler:()=>()=>{var t;if(!b&&null===l)return;if("other"===l&&(null===c||null==c||0===c.trim().length))return;const n="other"===l||b&&c?{message:c}:{};a.sendEvent({cardViewState:"topview",eventName:b?St:Ct,cardInstanceId:g,properties:Object.assign(Object.assign({source:v},"negative"===e.feedbackSentiment||null!==c?{reason:b?"other":l}:{}),n)}),e.feedbackReceived(g),o.dispatchCardEvent({type:b?Fa.VOTED_USEFUL:Fa.VOTED_NOT_USEFUL}),u(null),null===(t=s.current)||void 0===t||t.clearInput(),e.navigateBack()},text:"Submit",theme:t,appearance:"primary"}))))}))};var ts=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};const ns=()=>window.matchMedia("(prefers-color-scheme: dark)"),rs=cn("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.toast")}})),as=e=>{let{store:t,onAnalyticsEvent:n,onCardEvent:r,onAuthTokenRequested:a,onError:o}=e;const s=y((()=>({analyticsDispatcher:{sendEvent:(e,t)=>ts(void 0,void 0,void 0,(function*(){n&&(void 0===t?yield n(e):yield n(e,t))}))},cardEventDispatcher:{dispatchCardEvent:e=>{r&&r(e)}},authTokenProvider:{requestToken:()=>ts(void 0,void 0,void 0,(function*(){return yield a()}))},runtimeVariableResolver:void 0})),[n,r,a]);return(0,i.h)(Do,{onError:o},(0,i.h)(Ma.Provider,{value:s},(0,i.h)($e.zt,{store:t},(0,i.h)($e.lj,{actions:(0,G.Y2)(Ne,tn,ut,Ne)},is))))},is=e=>{const{cardFeed:t,messages:n,themeLoading:r,themeLoaded:a,clearMessage:o,application:{interfaceStyle:s,streamContainerId:l},theme:d}=e,[c,u]=h(ns().matches?"dark":"light");if(g((()=>{!function(){ts(this,void 0,void 0,(function*(){const e=yield _o(l);if(e)a({theme:e.theme}),Lo(l,e.eTag);else{r();const e=yield Lo(l);a(e)}}))}()}),[]),g((()=>{const e=e=>{u(e.matches?"dark":"light")};return ns().addEventListener("change",e),()=>{ns().removeEventListener("change",e)}}),[]),!d.status||!1===d.status.loaded)return null;const p=d.themePayload?Oo(d.themePayload,c,s):void 0;if(!p)return null;const m=p.getTheme("feed"),v=w(Ma),b=v.cardEventDispatcher,f=v.analyticsDispatcher,y=v.authTokenProvider;return(0,i.h)(rs,{theme:m},(0,i.h)(va,{theme:m,feedOrientation:ic(t.horizontalContainerConfig),message:n.cardList,actionTitle:n.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(n.cardList.action)?"Try again":"Dismiss",actionHandler:()=>{var t,r,a,i,o,s,l,d,c,u;const p=null===(t=n.cardList)||void 0===t?void 0:t.cardInstanceId,h=null===(r=n.cardList)||void 0===r?void 0:r.action;if(p&&h)switch(h){case"submit-failed":Zs(e,e,p,!1,b,f,y,(null===(a=e.messages.cardList)||void 0===a?void 0:a.responseValues)||{},{payload:null===(i=e.messages.cardList)||void 0===i?void 0:i.payload,postSubmissionUrl:null===(o=e.messages.cardList)||void 0===o?void 0:o.postSubmissionUrl,subviewData:null===(s=e.messages.cardList)||void 0===s?void 0:s.subviewData,submitButtonName:null===(l=e.messages.cardList)||void 0===l?void 0:l.submitButtonName});break;case"dismiss-failed":const t=null===(d=e.messages.cardList)||void 0===d?void 0:d.source;t&&Ys(e,e,p,b,y,t);break;case"snooze-failed":const n=null===(c=e.messages.cardList)||void 0===c?void 0:c.snoozeDate,r=null===(u=e.messages.cardList)||void 0===u?void 0:u.source;n&&r&&Ks(e,e,p,n,b,y,r)}},onDismiss:()=>{o("cardList")},delay:500}))};function os(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let ss;!function(e){e.STATE="state-update",e.ANALYTICS_EVENT="analytics-event-dispatched"}(ss||(ss={}));class ls{constructor(){os(this,"channel",void 0),os(this,"isOpen",!1),os(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 ne.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 ne.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 ne.error({level1:["BroadcastChannel API not supported in this browser"]});this.channel.postMessage(e)}close(){this.channel.close(),this.isOpen=!1}}var ds=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))},cs=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 us(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ps=()=>window.matchMedia("(prefers-color-scheme: dark)"),hs=()=>window.getComputedStyle(document.documentElement).getPropertyValue("font-size"),ms={FEED_OVERLAY:"100",CARD_OVERLAY:"110",DROPDOWN:"40",HEADER:"30",BANNER:"20",TOAST:"11",OVERFLOW_MENU:"11",OVERFLOW_MENU_BUTTON:"10",CUSTOM_HEADER:"2"},gs=cn("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%"}})),vs={fontFamily:'-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',height:"100%",overflow:"hidden"},bs=cn("div")((e=>{var t,n,r,a,i,o;let{embedMode:s,feedTheme:l,workFlowTheme:d,renderMode:c,cardHorizontalAlignment:u,modalContainerPositioning:p,modalContainerVerticalPadding:h}=e;const m="feed"===c?null==l?void 0:l.getNumericalPadding("stream"):null==d?void 0:d.getNumericalPadding("stream");return Object.assign(Object.assign(Object.assign({},vs),"launcher"===s?{borderRadius:"20px",boxShadow:"0 2px 20px 0 rgba(0, 0, 0, 0.1)"}:{}),"modal-stream"===s?{display:"flex",justifyContent:{leading:"safe flex-start",center:"safe center",trailing:"safe flex-end"}[null!=u?u:"center"],alignItems:{top:"safe flex-start",center:"safe center",bottom:"safe flex-end"}[null!=p?p:"center"],backgroundColor:`${null==l?void 0:l.getCSSColor("background.modalContainer")}`,paddingTop:`${"top"===p?null!==(t=null!=h?h:null==m?void 0:m.top)&&void 0!==t?t:10:null!==(n=null==m?void 0:m.top)&&void 0!==n?n:10}px`,paddingRight:`${null!==(r=null==m?void 0:m.right)&&void 0!==r?r:10}px`,paddingBottom:`${"bottom"===p?null!==(a=null!=h?h:null==m?void 0:m.bottom)&&void 0!==a?a:10:null!==(i=null==m?void 0:m.bottom)&&void 0!==i?i:10}px`,paddingLeft:`${null!==(o=null==m?void 0:m.left)&&void 0!==o?o:10}px`,overflowY:"auto"}:{})})),fs=K.forwardRef(((e,t)=>{let{store:n,embedMode:r,applyCardFeedDeltaUpdates:a,cardCountChanged:o,onReady:s,runtimeVariableResolver:l,linkButtonPressed:d,submitButtonPressed:c,onCardListTutorialSeen:u,onAnalyticsEvent:p,onCardEvent:m,onError:v,onAuthTokenRequested:w,onCardFeedSubscribe:S,onModalStreamToggled:C,requestWebSocketReconnect:x,webSocketDisabled:k}=e;const[I,O]=h(ps().matches?"dark":"light"),[,F]=h(hs);g((()=>{const e=e=>{O(e.matches?"dark":"light")};ps().addEventListener("change",e);const t=()=>{F(hs)};return window.addEventListener("browser-font-changed",t),window.addEventListener("pageshow",(e=>{var t;e.persisted&&!(null===(t=M.containersBroadcastChannel)||void 0===t?void 0:t.isOpen)&&(M.containersBroadcastChannel=new ls)})),()=>{ps().removeEventListener("change",e),window.removeEventListener("browser-font-changed",t)}}),[]);const M=y((()=>({analyticsDispatcher:{sendEvent:(e,t)=>ds(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:()=>ds(void 0,void 0,void 0,(function*(){return yield w()}))},runtimeVariableResolver:l,containersBroadcastChannel:"BroadcastChannel"in window?new ls:void 0})),[p,m,w]),T=b();return f(t,(()=>({pollCardList:()=>{var e;ne.debug({level3:["Card feed polling initiated"]}),null===(e=T.current)||void 0===e||e.loadCards(!1)},cancelCardListPolling:()=>{var e;null===(e=T.current)||void 0===e||e.cancelCardListPolling()}}))),"toast"===r?(0,i.h)(as,{store:n,onAuthTokenRequested:w}):(0,i.h)(Do,{onError:v},(0,i.h)(Ma.Provider,{value:M},(0,i.h)($e.zt,{store:n},(0,i.h)($e.lj,{actions:(0,G.Y2)(tn,Q),mapToProps:e=>{const{cardResponses:t}=e;return cs(e,["cardResponses"])}},(e=>{let{cardFeed:t,pendingCardFeedUpdates:n,cardStates:r,navigationStack:p,cardFeedLoading:h,cardFeedLoaded:m,themeLoading:g,themeLoaded:v,finishExternalAction:b,application:{cardListRefreshInterval:f,streamContainerId:y,runtimeVariableResolutionTimeout:w,isPreview:O,embedMode:F,customStrings:M,cardLimit:j,firstLoadStyles:L,interfaceStyle:_},externalAction:D,theme:{themePayload:A}}=e;const E=p.items.length?p.items[p.items.length-1]:void 0;let H;switch(null==E?void 0:E.kind){case"media":H="Media";break;case"subview":H="Card Subview";break;case"snooze":H="Snooze Date & Time Selector";break;case"feedback":H="Send Feedback"}return(0,i.h)(gs,{embedMode:F,feedOrientation:ic(t.horizontalContainerConfig),id:"action-cards-sdk-app-root",class:"atomic-sdk-root","data-contentLabel":H},(0,i.h)(ws,{ref:T,streamContainerId:y,runtimeVariableResolutionTimeout:w,runtimeVariablesResolver:l,themePayload:A,cardFeed:t,pendingCardFeedUpdates:n,cardStates:r,cardLimit:j,onThemeLoading:g,onThemeLoaded:v,onCardFeedLoading:h,onCardFeedLoaded:m,onCardFeedSubscribe:S,onModalStreamToggled:C,streamFilter:t.streamFilter,requestWebSocketReconnect:x,webSocketDisabled:k,currentNavigationItem:E,onReady:s,onCardCountChanged:o,applyCardFeedDeltaUpdates:a,cardListRefreshInterval:f,isPreview:O,cardListTitle:M.cardListTitle,embedMode:F,externalAction:D,finishExternalAction:b,onLinkButtonPressed:d,onSubmitButtonPressed:c,cardListTutorialSeen:t.tutorialSeen,onCardListTutorialSeen:u,firstLoadStyles:L,colourScheme:I,interfaceStyle:_,noInternetConnectionMessage:M.noInternetConnectionMessage,dataLoadFailedMessage:M.dataLoadFailedMessage,tryAgainTitle:M.tryAgainTitle}))})))))})),ys=e=>"modal-subview"!==e;class ws extends i.Component{constructor(e){super(e),us(this,"pollCounter",0),us(this,"poll",void 0),this.poll=null}componentDidMount(){return ds(this,void 0,void 0,(function*(){this.props.onReady(),ys(this.props.embedMode)&&this.loadTheme()}))}componentWillUnmount(){this.cancelCardListPolling()}componentDidUpdate(e){var t,n;const{cardFeed:r,externalAction:a}=e,{cardFeed:i,pendingCardFeedUpdates:o,cardStates:s,onCardCountChanged:l,externalAction:d,embedMode:c}=this.props;if("modal-subview"===c||"toast"===c)return;if("modal-stream"===c){var u,p,h,m,g,v;if(0===i.cardInstances.length)null===(u=window.frameElement)||void 0===u||u.classList.add("closed");else null===(p=window.frameElement)||void 0===p||p.classList.remove("closed");if(0===r.cardInstances.length&&i.cardInstances.length>0)null===(h=(m=this.props).onModalStreamToggled)||void 0===h||h.call(m,!0);if(r.cardInstances.length>0&&0===i.cardInstances.length)null===(g=(v=this.props).onModalStreamToggled)||void 0===g||g.call(v,!1)}const b=i.cardInstances.map((e=>e.instance.id)),f=r.cardInstances.map((e=>e.instance.id));var y;dc(b,f)&&(null===(t=r.metadata)||void 0===t?void 0:t.totalCards)===(null===(n=i.metadata)||void 0===n?void 0:n.totalCards)||this.poll&&l&&l(i.cardInstances.length,null===(y=i.metadata)||void 0===y?void 0:y.totalCards);if(!r.tutorialSeen&&i.tutorialSeen&&this.props.onCardListTutorialSeen&&this.props.onCardListTutorialSeen(),d&&d.actionId!==(null==a?void 0:a.actionId)&&this.handleExternalAction(d),r.runtimeVariables.updateId!==i.runtimeVariables.updateId&&this.trackRuntimeVariablesChanged(i),Object.values(s).every((e=>null===e))&&o&&o.length>0){const e=(0,G.kv)((0,G.Y2)(tn,Q),de());this.props.applyCardFeedDeltaUpdates(e,o)}}trackRuntimeVariablesChanged(e){const t=this.context.analyticsDispatcher,n=!1===e.runtimeVariableAnalyticsEnabled;e.cardInstances.forEach((r=>{if(r.runtimeVariables){var a;const i=null===(a=e.runtimeVariables.values)||void 0===a?void 0:a.get(r.instance.id);t.sendEvent({cardInstanceId:r.instance.id,cardViewState:"topview",eventName:xt,properties:{resolvedVariables:r.runtimeVariables.reduce(((e,t)=>(e[t.name]=(null==i?void 0:i.get(t.name))||"",e)),{})}},n)}}))}loadTheme(){return ds(this,void 0,void 0,(function*(){const{streamContainerId:e,onThemeLoading:t,onThemeLoaded:n}=this.props,r=yield _o(e);if(r)n({theme:r.theme}),Lo(e,r.eTag);else{t();n(yield Lo(e))}const a=de().getState().theme.status;a&&a.loaded&&this.subscribeToCardFeedUpdates()}))}loadCards(e){return ds(this,void 0,void 0,(function*(){const t=this.context,{onCardFeedLoading:n,onCardFeedLoaded:r,streamContainerId:a,runtimeVariableResolutionTimeout:i,cardFeed:o,runtimeVariablesResolver:s,cardLimit:l,streamFilter:d}=this.props;e||n();const c=yield Ac(a,t.authTokenProvider,i,o.lastModified,s,l,d);e&&c.error||r(c),de().getState().cardFeed.status.loaded&&this.pollForNewCards()}))}handleExternalAction(e){return ds(this,void 0,void 0,(function*(){const t=this.context,n=t.analyticsDispatcher,r=t.containersBroadcastChannel,a=()=>ds(this,void 0,void 0,(function*(){var t;return n.sendEvent({cardInstanceId:e.cardInstanceId,cardViewState:e.cardViewState,eventName:wt,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}):{})})})),i=()=>{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!==ss.ANALYTICS_EVENT)return;const o=null===(a=n.data)||void 0===a?void 0:a.eventQueued;o.eventName===wt&&o.cardInstanceId===e.cardInstanceId&&r&&(r.removeEventListener(t),i())}),t),yield a()}else yield a(),i()}))}subscribeToCardFeedUpdates(){return this.props.webSocketDisabled?this.loadCards(!1):this.props.onCardFeedSubscribe()}pollForNewCards(){const{isPreview:e,cardListRefreshInterval:t,embedMode:n}=this.props;!e&&0!==t&&ys(n)&&(this.poll=setTimeout((()=>ds(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,ne.debug({level3:["Attempt to reconnect websocket initiated"]}),this.props.requestWebSocketReconnect())}))),t))}cancelCardListPolling(){this.poll&&ne.debug({level3:["Card feed polling cancelled"]}),clearTimeout(this.poll),this.poll=null,this.pollCounter=0}render(e){var t;let{currentNavigationItem:n,embedMode:r,cardFeed:a,firstLoadStyles:o,colourScheme:s,interfaceStyle:l,noInternetConnectionMessage:d,dataLoadFailedMessage:c,tryAgainTitle:u}=e;const p=de().getState(),h="modal-subview"===r;if(!p.theme.status)return h?null:(0,i.h)(bs,{embedMode:r,id:ja});if(!1===p.theme.status.loaded)return h?null:(0,i.h)(bs,{embedMode:r,id:ja},(0,i.h)(Oa,{embedMode:r,textColor:o.textColor,loadingIconColor:o.loadingSpinnerColor,buttonColor:o.buttonTextColor,backgroundColor:o.backgroundColor,onRetry:()=>{this.loadTheme()},state:p.theme.status.errorState,noInternetConnectionMessage:d,dataLoadFailedMessage:c,tryAgainTitle:u}));const{themePayload:m}=this.props;let g;g="standalone"===r&&(null===(t=a.horizontalContainerConfig)||void 0===t?void 0:t.enabled)||"single-card"===r?"feed":Xe(n)?"media":Ze(n)?"subview":Ke(n)?"snooze":Ge(n)?"feedback":h?void 0:"feed";const v=m?Oo(m,s,l):void 0;if(!g||!v)return null;const b=v.getTheme("feed"),f=v.getTheme("workflow");return(0,i.h)(i.Fragment,null,(0,i.h)(bs,{embedMode:r,feedTheme:b,workFlowTheme:f,renderMode:g,cardHorizontalAlignment:a.cardHorizontalAlignment,modalContainerPositioning:a.modalContainerPositioning,modalContainerVerticalPadding:a.modalContainerVerticalPadding,className:"feed-container",role:"main"},"subview"===g&&(0,i.h)(Za,{workflowTheme:f,feedTheme:b}),"media"===g&&(0,i.h)(ii,{workflowTheme:f,feedTheme:b}),"feed"===g&&(0,i.h)($a,{theme:b,onRetry:()=>(this.props.onCardFeedLoading(),this.subscribeToCardFeedUpdates())}),"snooze"===g&&(0,i.h)(ko,{workflowTheme:f,feedTheme:b}),"feedback"===g&&(0,i.h)(es,{workflowTheme:f,feedTheme:b})),(0,i.h)(Ao,{fontFamilies:b.getFontFamilies()}),(0,i.h)(On,null))}}us(ws,"contextType",Ma);const Ss=new Map,Cs=un({to:{opacity:"0"}}),xs=un({to:{opacity:"1"}}),ks=un({to:{opacity:"1",width:"400%",paddingTop:"400%"}}),Is=un({to:{opacity:"0",transform:"scale(0.9)"}}),Os=un({from:{opacity:"1",transform:"scale(1)"},to:{opacity:"0",transform:"scale(0)"}}),Fs=e=>{if(Ss.has(`slideOutleftPadding-${e}`))return Ss.get(`slideOutleftPadding-${e}`);const t=un({to:{transform:`translateX(calc(-120% - ${e}px))`}});return Ss.set(`slideOutleftPadding-${e}`,t),t},Ms=un({from:{left:"100%"},to:{left:"50%"}}),Ts=un({from:{},to:{height:"0px"}}),js=un({from:{},to:{width:"0px"}}),Ls=e=>{let{theme:t,animationState:n}=e;return(0,i.h)(i.Fragment,null,(0,i.h)($s,{theme:t,class:n,"aria-hidden":"true"}),(0,i.h)(Zn,{fillColor:t.getCSSColor("icon.cardCompletion"),className:"tick-icon",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},"aria-hidden":!0}))},_s=e=>{let{animationState:t,theme:n}=e;return(0,i.h)(i.Fragment,null,(0,i.h)("div",{class:`${t||""} dismiss-icon`,style:{background:n.getCSSColor("background.quickActionPrimary"),pointerEvents:"none"},"aria-hidden":"true"},(0,i.h)(Kn,{style:{fill:n.getCSSColor("icon.quickActionPrimary")}})),(0,i.h)("div",{class:`${t||""} clock-icon`,style:{background:n.getCSSColor("background.quickActionSecondary"),pointerEvents:"none"},"aria-hidden":"true"},(0,i.h)(Gn,{style:{fill:n.getCSSColor("icon.quickActionSecondary")}})))},Ds=cn("div")((e=>{let{theme:t,topAlign:n,viewState:r,embedMode:a,useHorizontalStyles:i,spaceBetweenCards:o,cardMaximumWidth:s,cardHorizontalAlignment:l}=e,d="rgba(255,255,255,1)";return"subview"===r?d=(Cn(t.getCSSColor("background.default")),t.getCSSColor("background.default")):Cn(t.getCSSColor("background.card"))&&!Cn(t.getCSSColor("background.default"))?d=t.getCSSColor("background.default"):Cn(t.getCSSColor("background.card"))||(d=t.getCSSColor("background.card")),d=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(\d*(?:\.\d+)?)?\s*\)$/);if(t){const[,e,n,r]=t;return`rgba(${e},${n},${r},1)`}return ne.warn({level3:["Expected a valid RGBA color string, but received:",e,"Returning the original value."]}),e})(d),Object.assign(Object.assign(Object.assign({position:"absolute",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",pointerEvents:"all",top:"0",bottom:"0",zIndex:ms.CARD_OVERLAY,padding:"15px 10px",backgroundColor:d,border:`${t.getShape("border.card")} solid ${t.getCSSColor("border.card")}`,borderRadius:t.getShape("borderRadius.card")||"initial"},n?{}:{display:"flex"}),i?{width:`calc(100% - ${o}px)`}:{}),"modal-stream"===a?{maxWidth:s?`${s}px`:"initial",margin:"0 auto",left:"leading"===l?"0px":"initial",right:"trailing"===l?"0px":"initial"}:{})})),As=cn("div")((e=>{let{topAlign:t}=e;return Object.assign({width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},t?{marginTop:"15vh"}:{})})),Es=cn("div")({}),Hs=cn("div")((e=>{let{theme:t,maxLines:n}=e;return Object.assign({width:"100%",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:`${n}`,textAlign:"center",marginTop:"20px",color:t.getCSSColor("text.processingStateMessage")},t.getCSSFontProperties("processingStateMessage",{skipFallback:!0})||{})})),Ps=cn("button")((e=>{let{theme:t}=e;return Object.assign({width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"15px",padding:"8px",background:"transparent",border:"0",outline:"none",fontWeight:"bold",cursor:"pointer",color:t.getCSSColor("text.processingStateButtonLabel")},t.getCSSFontProperties("processingStateButtonLabel",{skipFallback:!0})||{})})),Rs=e=>{let{viewState:t,onCancelUpload:n,theme:r,renderOverlay:a,cardMaximumWidth:o,cardHorizontalAlignment:s,spaceBetweenCards:l}=e;return a?(0,i.h)($e.lj,{mapToProps:e=>{var t;const n=Ye(e),r=n&&Ze(n);return{customStrings:e.application.customStrings,embedMode:e.application.embedMode,presentingSubview:r,horizontalStreamContainer:!!(null===(t=e.cardFeed.horizontalContainerConfig)||void 0===t?void 0:t.enabled)}}},(e=>{var a,d,c,u;const p=b(null),m=b(null),v=b(null),f=b(null),[y,w]=h(0),S=null!==(a=null===(c=e.customStrings)||void 0===c?void 0:c.processingStateMessage)&&void 0!==a?a:"Sending, please wait...",C=null!==(d=null===(u=e.customStrings)||void 0===u?void 0:u.processingStateCancelButtonTitle)&&void 0!==d?d:"Cancel process";if(g((()=>{var e,t,n,r,a,i,o,s;const l=null===(e=p.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.clientHeight,d=null===(n=m.current)||void 0===n||null===(r=n.base)||void 0===r?void 0:r.clientHeight,c=null===(a=v.current)||void 0===a||null===(i=a.base)||void 0===i?void 0:i.clientHeight,u=null===(o=f.current)||void 0===o||null===(s=o.base)||void 0===s?void 0:s.clientHeight;if(l&&d&&c&&u){const e=l-d-u-30-20-15,t=parseFloat(getComputedStyle(v.current.base).lineHeight),n=Math.floor(e/t);w(n)}}),[S,C]),"single-card"===e.embedMode&&e.presentingSubview)return null;if("standalone"===e.embedMode&&e.horizontalStreamContainer&&e.presentingSubview)return null;const x="subview"===t&&"standalone"===e.embedMode;return(0,i.h)(Ds,{theme:r,class:"subview"===t?"use-offset":"",topAlign:x,viewState:t,embedMode:e.embedMode,useHorizontalStyles:e.horizontalStreamContainer&&!e.presentingSubview,spaceBetweenCards:l,cardMaximumWidth:o,cardHorizontalAlignment:s},(0,i.h)(As,{ref:p,theme:r,topAlign:x},(0,i.h)(Es,{ref:m},(0,i.h)(In,{stopColor:r.getCSSColor("icon.processingStateSpinner"),size:30})),(0,i.h)(Hs,{ref:v,theme:r,maxLines:Math.max(1,y)},S),(0,i.h)(Ps,{ref:f,theme:r,onClick:n},C)))})):null},$s=cn("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:`${ks} 0.6s ease 0.2s forwards`},".submitted":{animation:`${ks} 0s ease forwards`},".submitted-subview":{animation:`${ks} 0.6s ease 0.2s forwards`}}})),Ns=function(e,t){var n,r,a,i,o;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const l=e.getNumericalPadding("card"),d=null!==(n=e.getNumericalPadding("stream").left)&&void 0!==n?n:10;return{cardCompletion:{" .tick-icon":{opacity:"0"},".submitting":{overflow:"hidden",padding:`${null!==(r=l.top)&&void 0!==r?r:he}px ${(null!==(a=l.right)&&void 0!==a?a:pe)+1}px ${null!==(i=l.bottom)&&void 0!==i?i:he}px ${(null!==(o=l.left)&&void 0!==o?o:pe)+1}px`},".submitting .tick-icon":{animation:`${xs} 0.2s ease 0.2s forwards`},".submitting .card-nodes":{animation:`${Cs} 0.2s ease forwards`},".submitted":Object.assign({overflow:"hidden"},"vertical"!==s?{transform:`translateX(calc(-120% - ${d}px))`,opacity:"0"}:{animation:`${Is} 0.4s ease forwards`}),".submitted .tick-icon":{animation:`${xs} 0.2s ease forwards`},".submitted .card-nodes":{opacity:"0"},".submitted-subview":Object.assign({animation:`${Is} 0.4s ease 0.8s forwards`,overflow:"hidden"},"vertical"!==s?{transform:`translateX(calc(-120% - ${d}px))`,opacity:"0"}:{}),".submitted-subview .tick-icon":{animation:`${xs} 0.2s ease 0.2s forwards`},".submitted-subview .card-nodes":{animation:`${Cs} 0.2s ease forwards`}},dismissal:{".dismissing":Object.assign({},"vertical"!==s||"modal-stream"===t?{animation:`${Cs} 0.3s ease forwards`}:{animation:`${Fs(d)} 0.4s ease forwards`}),".dismissed":Object.assign({transform:`translateX(calc(-120% - ${d}px))`},"vertical"!==s||"modal-stream"===t?{animation:`${Ts}`,opacity:"0"}:{})},snooze:{".snoozing":Object.assign({},"vertical"!==s||"modal-stream"===t?{animation:`${Cs} 0.3s ease forwards`}:{animation:`${Fs(d)} 0.4s ease forwards`}),".snoozed":Object.assign({transform:`translateX(calc(-120% - ${d}px))`},"vertical"!==s||"modal-stream"===t?{animation:`${Ts}`,opacity:"0"}:{})}}},Vs=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const a=null!==(n=e.right)&&void 0!==n?n:10;return{cardCompletion:{".submitted":Object.assign({overflow:"hidden"},"vertical"===r?{animation:`${Ts} 0.4s ease 0.2s forwards`}:{animation:`${js} 0.4s ease 0.2s forwards`}),".submitted .clock-icon":Object.assign({},"horizontal"===r?{width:"0"}:{}),".submitted .dismiss-icon":Object.assign({},"horizontal"===r?{width:"0"}:{}),".submitted-subview":Object.assign({overflow:"hidden"},"vertical"===r?{animation:`${Ts} 0.4s ease 1.0s forwards`}:{animation:`${js} 0.4s ease 0.2s forwards`})},dismissal:{position:"relative"," .dismiss-icon":Object.assign({position:"absolute",top:"50%",width:"50px",height:"50px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"!==r||"modal-stream"===t?{opacity:"0",left:"50%",margin:"-29px 0 0 -20px"}:{left:`calc(120% + ${a+25}px)`,margin:"-25px 0 0 -25px"}),".dismissing .dismiss-icon":Object.assign({},"vertical"!==r||"modal-stream"===t?{animation:`${xs} 0.3s ease 0.3s forwards`}:{animation:`${Ms} 0.4s ease forwards`}),".dismissed":Object.assign({overflow:"hidden"},"vertical"!==r||"modal-stream"===t?{animation:`${js} 0.3s ease 0.3s forwards`}:{animation:`${Ts} 0.4s ease 0.4s forwards`}),".dismissed .dismiss-icon":Object.assign({left:"50%"},"vertical"!==r||"modal-stream"===t?{animation:`${Os} 0.3s ease forwards`}:{animation:`${Os} 0.4s ease forwards`}),".dismissed .clock-icon":Object.assign({},"vertical"!==r?{width:"0"}:{})},snooze:{position:"relative"," .clock-icon":Object.assign({position:"absolute",top:"50%",width:"50px",height:"50px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"!==r||"modal-stream"===t?{opacity:"0",left:"50%",margin:"-29px 0 0 -20px"}:{left:`calc(120% + ${a+25}px)`,margin:"-25px 0 0 -25px"}),".snoozing .clock-icon":Object.assign({},"vertical"!==r||"modal-stream"===t?{animation:`${xs} 0.3s ease 0.3s forwards`}:{animation:`${Ms} 0.4s ease forwards`}),".snoozed":Object.assign({overflow:"hidden"},"vertical"!==r||"modal-stream"===t?{animation:`${js} 0.3s ease 0.3s forwards`}:{animation:`${Ts} 0.4s ease 0.4s forwards`}),".snoozed .clock-icon":Object.assign({left:"50%"},"vertical"!==r?{animation:`${Os} 0.3s ease forwards`}:{animation:`${Os} 0.4s ease forwards`}),".snoozed .dismiss-icon":Object.assign({},"vertical"!==r?{width:"0"}:{})},center:{position:"relative",".centering":{position:"relative",left:"50%",transform:"translateX(-50%)",transition:"left 0.4s ease-out"}}}},zs=600,Bs=600,Ws=600,Us=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}};var qs=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};const Ys=(e,t,n,r,a,i)=>qs(void 0,void 0,void 0,(function*(){const{dismissingCard:o,dismissedCard:s,failedToDismissCard:l}=t;if(e.application.isPreview)return;o(n);const d=new Promise((e=>setTimeout(e,Bs)));ne.debug({level1:["Dismiss card sent by HTTP"]});const c=yield Hc(e.application.streamContainerId,n,a);yield Promise.allSettled([d,c]),c.ok?(ne.debug({level1:["Dismiss card sent by HTTP: success"]}),s(n),We().clearSubviewsForCardInstance(n),window.AtomicUploadService.cancelUploadForCard(e.application.containerInstanceId,n),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),r.dispatchCardEvent({type:Fa.DISMISSED,eventPayload:c.event})):(ne.error({level1:["Dismiss card sent by HTTP: failed"]}),l(n,i,c.error),r.dispatchCardEvent({type:Fa.DISMISS_FAILED}))})),Zs=function(e,t,n){var r=arguments;return qs(this,void 0,void 0,(function*(){var a,i,o;let s=r.length>3&&void 0!==r[3]&&r[3],l=r.length>4?r[4]:void 0,d=r.length>5?r[5]:void 0,c=r.length>6?r[6]:void 0,u=r.length>7?r[7]:void 0,p=r.length>8?r[8]:void 0;const{submittingCard:h,submittedCard:m,failedToSubmitCard:g,finishSubview:v,openExternalUrl:b,handleSubmitButtonPayload:f}=t,{postSubmissionUrl:y,payload:w,subviewData:S,submitButtonName:C,cancelSubmitCallback:x}=p||{};if(e.application.isPreview)return;const k=e=>{g(n,s,u,e,{postSubmissionUrl:y,subviewData:S,payload:w,submitButtonName:C}),l.dispatchCardEvent({type:Fa.SUBMIT_FAILED})};let I=!1;const O=(null==S?void 0:S.subviewId)?null===(a=e.cardResponses[n])||void 0===a||null===(i=a.subviews)||void 0===i?void 0:i[null==S?void 0:S.subviewId]:null===(o=e.cardResponses[n])||void 0===o?void 0:o.responses,F=Object.assign(Object.assign({},u),O||{});for(const[e,t]of Object.entries(O||{}))t&&"object"==typeof t&&"image"===t.type&&"string"==typeof t.destinationFilename&&"string"==typeof t.targetBucketId&&(I=!0,F&&(F[e]={filename:t.destinationFilename,targetBucketId:t.targetBucketId}));if(I){const r=window.frameElement,a=r.classList.contains("modal-subview");a&&r.classList.add("uploading-files"),t.startCardFileUpload(n),t.setCardFeedOverlay(!0);const i=yield window.AtomicUploadService.uploadFilesForCard(n,e.application.containerInstanceId,c,d,{subviewData:S,cancelSubmitCallback:x});if(t.finishCardFileUpload(n),!window.AtomicUploadService.getIsUploadingStatus(e.application.containerInstanceId)&&t.setCardFeedOverlay(!1),a&&r.classList.remove("uploading-files"),!i.success)return i.cancelledUploads?null:(ne.error({level1:[`Submit of card ${n} failed due to file upload failure`]}),k(i.error))}h(n);const M=new Promise((e=>setTimeout(e,zs)));ne.debug({level1:["Submit card sent by HTTP"]});const T=yield Ec(e.application.streamContainerId,n,Object.assign(Object.assign({},F),C?{[C]:null}:{}),c);yield Promise.allSettled([M,T]),T.ok?(ne.debug({level1:["Submit card sent by HTTP: success"]}),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),v(),(null==y?void 0:y.url)&&b(n,s?"subview":"topview",S||{},"url","submitButton",y),w&&f(n,S||{},w),m(n,s),We().clearSubviewsForCardInstance(n),l.dispatchCardEvent({type:Fa.SUBMITTED,eventPayload:T.event})):(ne.error({level1:["Submit card sent by HTTP: failed"]}),k(T.error))}))},Ks=(e,t,n,r,a,i,o)=>qs(void 0,void 0,void 0,(function*(){const s=(0,J.differenceInSeconds)(r,new Date),{snoozingCard:l,snoozedCard:d,failedToSnoozeCard:c}=t;if(e.application.isPreview)return;l(n);const u=new Promise((e=>setTimeout(e,Ws)));ne.debug({level1:["Snooze card sent by HTTP"]});const p=yield Pc(e.application.streamContainerId,n,s,i);yield Promise.allSettled([u,p]),p.ok?(ne.debug({level1:["Snooze card sent by HTTP: success"]}),d(n,r),We().clearSubviewsForCardInstance(n),bt().clearCardForm(n),window.AtomicUploadService.cancelUploadForCard(e.application.containerInstanceId,n),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),a.dispatchCardEvent({type:Fa.SNOOZED,eventPayload:p.event})):(ne.error({level1:["Snooze card sent by HTTP: failed"]}),c(n,r,o,p.error),a.dispatchCardEvent({type:Fa.SNOOZE_FAILED}))})),Gs=(e,t,n,r,a)=>{n.sendEvent({cardInstanceId:e,cardViewState:"topview",eventName:St,properties:{source:a}}),t.feedbackReceived(e),r.dispatchCardEvent({type:Fa.VOTED_USEFUL})};var Xs=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};function Qs(){return Qs=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},Qs.apply(this,arguments)}const Js=(e,t,n,r)=>Xs(void 0,void 0,void 0,(function*(){var a;const i=null===(a=(yield Rc([n],t,e)).values)||void 0===a?void 0:a.get(n.instance.id);i&&Object.entries(r).forEach((a=>{let[o,s]=a;"string"==typeof s?r[o]=ec(s,i):sc(s)&&Js(e,t,n,s)}))})),el=e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:a,clickHandler:o,text:s,icon:l,iconUrl:d,theme:c,appearance:u,loading:p,type:h,urlLink:m}=e;return(0,i.h)($e.lj,{actions:(0,G.Y2)(ut,Ne,tn),mapToProps:()=>{}},(e=>(0,i.h)(Yn,Qs({},t&&{nodeKey:t},n&&{index:n},r&&{localIndex:r},{isWorkflow:a,clickHandler:o(e),text:s,icon:l,iconUrl:d,theme:c,appearance:u,loading:p,type:h,urlLink:m}))))},tl=cn("div")((e=>{let{isWorkflow:t,feedOrientation:n}=e;return Object.assign(Object.assign({},t?{position:"relative"}:{}),t||"horizontal"!==n?{}:{display:"flex",flexDirection:"column",flexGrow:"1",justifyContent:"flex-end"})})),nl=e=>{let{children:t,isWorkflow:n,feedOrientation:r,initializeFormStore:a}=e;return g((()=>{a()}),[]),(0,i.h)(tl,{isWorkflow:n,feedOrientation:r},t)},rl=(e,t,n,r)=>()=>{e.createResponseWithDefaults(t,n,r)},al=cn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r,headlineFontProperties:a}=e;const i=t.getShape("padding.elementBottom",{skipFallback:!0});return{color:t.getCSSColor("text.headline"),display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${a.lineHeight} 1fr`,padding:i?`0px 0px ${r?"0px":i}`:`${n?0:10}px 0px ${r?0:10}px`}})),il=cn("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"})})),ol="22px",sl=e=>Object.assign(Object.assign({margin:"0",paddingLeft:"0",listStyleType:"none"},e.getCSSFontProperties("body")),{color:e.getCSSColor("text.body")}),ll=e=>{let t;return lc(t)||(t=e.getCSSFontProperties("bullet")),{"> li":{display:"flex",margin:"0 0 5px"},"> li.without-icon:before":Object.assign({content:'"•"',textAlign:"center",flexBasis:ol,minWidth:ol,marginRight:"10px",color:e.getCSSColor("icon.bullet")},t?{fontSize:t.fontSize,lineHeight:t.lineHeight}:{}),"> li.with-icon i":{flexBasis:ol,minWidth:ol,textAlign:"center"},"> li:last-child":{marginBottom:"0px"}}},dl=cn("ul")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return Object.assign(Object.assign(Object.assign({},sl(t)),ll(t)),{padding:a?`0px 0px ${r?"0px":a} 0px`:`${n?0:10}px 0px ${r?0:10}px 0px`})})),cl=cn("ol")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return Object.assign(Object.assign(Object.assign({},sl(t)),ll(t)),{padding:a?`0px 0px ${r?"0px":a} 5px`:`${n?0:10}px 20px ${r?0:10}px 0px`,counterReset:"item","> li.without-icon:before":Object.assign(Object.assign(Object.assign({},sl(t)["> li.without-icon:before"]),ll(t)["> li.without-icon:before"]),{content:'counter(item) "."',counterIncrement:"item"})})})),ul=cn("ul")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return Object.assign(Object.assign({},sl(t)),{padding:a?`0px 0px ${r?"0px":a} 5px`:`${n?0:10}px 20px ${r?0:10}px 0px`," li":{display:"inline"}," li:before":{content:'", "'}," li:first-child:before":{content:'""'}})}));class pl{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 hl={"":["<em>","</em>"],_:["<strong>","</strong>"],"\n":["</p><p>"]," ":["<br />"]};function ml(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function gl(e){return("<p>"+vl(e)+"</p>").replace(/<p><\/p>/g,"")}function vl(e,t){const n=new pl;let r,a,i,o,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,d=[],c="",u=t||{},p=0;function h(e){var t=hl[e.replace(/\*/g,"_")[1]||""],n=d[d.length-1]==e;return t?t[1]?(d[n?"pop":"push"](e),t[0|n]):t[0]:e}function m(){let e="";for(;d.length;)e+=h(d[d.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,"");i=l.exec(e);){a=e.substring(p,i.index),p=l.lastIndex,r=i[0];let t=!1;if(a.match(/[^\\](\\\\)*\\$/));else if(i[6])s=i[6],s.match(/\./)&&(i[5]=i[5].replace(/^\d+/gm,"")),o=vl((b=i[5].replace(/^\s*[>*+.-]/gm,"")).replace(RegExp("^"+(b.match(/^(\t| )+/)||"")[0],"gm"),"")),">"!==s&&(t=!0,s=s.match(/\./)?"ol":"ul",o=o.replace(/^(.*)(\n|$)/gm,"<li><span>$1</span></li>")),r="<"+s+">"+o+"</"+s+">";else if(i[10]){const e=(i[11]||"").match(/subview:(?<viewId>.*)/);if(e){const t=((e||{}).groups||{}).viewId?e.groups.viewId:"";c=c.replace("<a>",`<a tabindex="0" class="md-subview-link" data-subview-id="${t}">`)}else c=c.replace("<a>",'<a tabindex="0" target="_blank" class="md-web-link" href="'+ml(i[11]||u[a.toLowerCase()])+'">');r=m()+"</a>"}else if(i[9])r="<a>";else if(i[12])r="<p>"+i[12]+"\n"+i[13]+"</p>",t=!0;else if(i[14])r="<p>"+i[14]+" "+i[15]+"</p>",t=!0;else if(i[17]){const e=i[17];var v=hl[e.replace(/\*/g,"_")[1]||""];r=n.tagState.has(e)&&n.tagState.get(e).open?v[1]:v[0],n.toggle(e)}else if(i[18]){const e=i[18],t=(i[18].match(/\n/g)||[]).length,n=/[ ]{2}\n/.test(e);r=t>=2?'</p><p class="md-line-break">&nbsp;</p><p>':n?"<br />":h(e)}else i[4]&&(r="<p>"+i[4]+"</p>",t=!0);c+=a,c+=t?"</p>"+r+"<p>":r}var b;return n.tagState.forEach(((e,t)=>{if(n.tagState.get(t).open){const e=hl[t.replace(/\*/g,"_")[1]||""][0],n=c.lastIndexOf(e);-1!==n&&(c=c.slice(0,n)+t+c.slice(n+e.length))}})),(g(c)+g(e.substring(p))+m()).trim()}const bl=cn("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"}})),fl=cn("span")((e=>{let{theme:t}=e;return{" p":{margin:"0",display:"inline"}," a":{color:t.getCSSColor("text.link")}," em":{fontStyle:"italic"}," strong":{fontWeight:"bold"}," .md-subview-link":{textDecoration:"underline",cursor:"pointer"}}})),yl=cn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:a?`0px 0px ${r?"0px":a}`:`${n?0:10}px 0px ${r?0:10}px`}})),wl=cn("a")((e=>{let{isLinkEnabled:t,theme:n,url:r}=e;return{border:`1px solid ${n.getCSSColor("border.mediaThumb")}`,borderRadius:n.getShape("borderRadius.mediaThumb")||"0px",overflow:"hidden",display:"flex",backgroundColor:n.getCSSColor("background.mediaThumbnail"),cursor:t||r?"pointer":"default"}})),Sl=cn("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"}})),Cl=cn("div")((()=>({padding:"12px 15px 10px 15px",display:"flex",flexFlow:"row wrap",minWidth:"0px"}))),xl=cn("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%"})})),kl=cn("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%"})})),Il=cn("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",userSelect:"none"})}));class Ol extends Ga{render(){const{nodeKey:e,isFinalCardNode:t,isFirstCardNode:n,children:r,mediaType:a,src:o,theme:s,label:l,description:d,customStrings:c,onClickImage:u,url:p,alt:h}=this.props,{imageLoaded:m,imageLoadFailed:g}=this.state,v=m?o:"",b=this.getPreviewIcon(a),f=a.includes("video"),y=f&&g,w="image"===a||"video"===a,S=this.getElementRole(a),C=f?(null==c?void 0:c.thumbnailVideoActionLinkTitle)||"Watch":(null==c?void 0:c.thumbnailImageActionLinkTitle)||"View",x=f?"A video":"An image";let k="";return w&&(k=(f?"Plays a video":"Displays an image")+": "),k=`${k}${h?h+".":""}`,(0,i.h)(yl,{theme:s,isFirstCardNode:n,isFinalCardNode:t},(0,i.h)(wl,{key:e,"data-element-key":e,"data-testid":"image-wrapper",theme:s,onClick:u,isLinkEnabled:w,url:p},(0,i.h)(Sl,{thumbnail:v,theme:s,role:S,"aria-label":k||x},!m&&!y&&b&&(0,i.h)(b,{fillColor:s.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(m||g)&&r),(0,i.h)(Cl,null,(0,i.h)(xl,{theme:s,class:"thumbnail-header","aria-label":`${l}.`},l),(0,i.h)(kl,{theme:s,class:"thumbnail-format","aria-label":`${d}.`},d),(0,i.h)(Il,{theme:s,isLinkEnabled:"image"===a||"video"===a,tabIndex:"0",class:"thumbnail-link",onKeyPress:this.handleKeyPress.bind(this)},C))))}}const Fl=cn("div")((e=>{var t,n,r,a,i,o;let{backgroundImage:s,theme:l,isFinalCardNode:d,dimensions:c,loadedDimensions:u,url:p,isLinkEnabled:h}=e;const m=`calc(${l.getShape("borderRadius.card")} - ${l.getShape("border.card")})`,g=l.getNumericalPadding("card");return Object.assign(Object.assign({width:`calc(100% + ${(null!==(t=g.left)&&void 0!==t?t:pe)+(null!==(n=g.right)&&void 0!==n?n:pe)}px)`,border:"0px",borderRadius:`${m} ${m} 0 0`,backgroundImage:`url('${s}')`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:l.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",marginTop:`-${null!==(r=g.top)&&void 0!==r?r:he}px`,marginRight:`-${null!==(a=g.right)&&void 0!==a?a:pe}px`,marginBottom:`${d?"0px":null!==(i=l.getShape("padding.elementBottom",{skipFallback:!0}))&&void 0!==i?i:"10px"}`,marginLeft:`-${null!==(o=g.left)&&void 0!==o?o:pe}px`,overflow:"hidden",cursor:h||p?"pointer":"default"},El({dimensions:c,naturalDimensions:u})),l.getElementFocusCSSProperties())}));class Ml extends Ga{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:e,children:t,isFinalCardNode:n,mediaType:r,src:a,theme:o,onClickImage:s,dimensions:l,url:d,alt:c}=this.props,{imageLoaded:u,imageLoadFailed:p}=this.state,h=u?a:"",m=this.getPreviewIcon(r),g=r.includes("video")&&p,v="image"===r||"video"===r,b=this.getElementRole(r),f=r.includes("video")?"A banner video":"A banner image";let y="";return v&&(y=(r.includes("video")?"Plays a video":"Displays an image")+": "),y+=c,(0,i.h)(Fl,{key:e,"data-element-key":e,"data-testid":"image-wrapper",backgroundImage:h,theme:o,isFinalCardNode:n,mediaType:r,url:d,dimensions:l,loadedDimensions:this.state.loadedDimensions,onClick:s,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-banner",role:b,isLinkEnabled:v,"aria-label":y||f},!u&&!g&&m&&(0,i.h)(m,{fillColor:o.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(u||p)&&t)}}const Tl=cn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:a?`0px 0px ${r?"0px":a}`:`${n?0:10}px 0px ${r?0:10}px`}})),jl=cn("div")((e=>{let{backgroundImage:t,theme:n,dimensions:r,loadedDimensions:a,url:i,isLinkEnabled:o}=e;const s=n.getCSSColor("border.media");return Object.assign(Object.assign(Object.assign(Object.assign({},Cn(s)?{}:{border:`1px solid ${n.getCSSColor("border.media")}`}),{borderRadius:`${n.getShape("borderRadius.media")}`,backgroundImage:`url('${t}')`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundColor:n.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",cursor:o||i?"pointer":"default",overflow:"hidden"}),El({dimensions:r,naturalDimensions:a})),n.getElementFocusCSSProperties())}));class Ll extends Ga{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:e,children:t,isFirstCardNode:n,isFinalCardNode:r,mediaType:a,src:o,dimensions:s,url:l,onClickImage:d,theme:c,alt:u}=this.props,{imageLoaded:p,imageLoadFailed:h}=this.state,m=p?o:"",g=this.getPreviewIcon(a),v=a.includes("video")&&h,b="image"===a||"video"===a,f=this.getElementRole(a),y=a.includes("video")?"A video":"An image";let w="";return b&&(w=(a.includes("video")?"Plays a video":"Displays an image")+": "),w+=u,(0,i.h)(Tl,{theme:c,isFirstCardNode:n,isFinalCardNode:r},(0,i.h)(jl,{key:e,"data-element-key":e,"data-testid":"image-wrapper",backgroundImage:m,dimensions:s,loadedDimensions:this.state.loadedDimensions,mediaType:a,url:l,onClick:d,onKeyPress:this.handleKeyPress.bind(this),theme:c,tabIndex:"0",className:"image-inline",role:f,isLinkEnabled:b,ariaLabel:w||y},!p&&!v&&g&&(0,i.h)(g,{fillColor:c.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(p||h)&&t))}}const _l=cn("p")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:a?`0px 0px ${r?"0px":a}`:`${n?0:10}px 0px ${r?0:10}px`,margin:"0",overflow:"hidden",textOverflow:"ellipsis"}})),Dl=cn("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 Al extends Ga{preloadsImage(){return!1}render(){const{nodeKey:e,theme:t,isFirstCardNode:n,isFinalCardNode:r,label:a,onClickImage:o,mediaType:s,url:l}=this.props;return(0,i.h)(_l,{key:e,"data-element-key":e,theme:t,isFirstCardNode:n,isFinalCardNode:r},(0,i.h)(Dl,{theme:t,onClick:o,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-text",mediaType:s,url:l},a))}}const El=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),i=(null==r||null===(n=r.originalDimensions)||void 0===n?void 0:n.height)||(null==a?void 0:a.height);return e&&i?{aspectRatio:`${e} / ${i}`}:{height:"200px"}}return{height:"200px"}},Hl=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,i.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"A play button icon","aria-hidden":n},(0,i.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:t,strokeWidth:"2"}))},Pl=cn("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")}})),Rl=e=>{let{onClick:t,theme:n}=e;return(0,i.h)(Pl,{onClick:t,theme:n},(0,i.h)(Hl,{fillColor:n.getCSSColor("icon.mediaControl"),ariaHidden:!0}))},$l={objectFit:"contain",width:"100%",height:"100%",background:"black"},Nl=cn("video")(Object.assign({},$l)),Vl=cn("video")((()=>Object.assign({},$l))),zl=cn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:a?`0px 0px ${r?"0px":a}`:`${n?0:10}px 0px ${r?0:10}px`}})),Bl=cn("div")((e=>{var t,n,r;let{theme:a,isFinalCardNode:i,dimensions:o,loadedDimensions:s,format:l}=e;const d=a.getNumericalPadding("card"),c=a.getShape("padding.elementBottom",{skipFallback:!0}),u=`calc(${a.getShape("borderRadius.card")||"0px"} - ${a.getShape("border.card")})`;return Object.assign(Object.assign({borderRadius:"banner"===l?`${u} ${u} 0 0`:u,overflow:"hidden"},"banner"===l?{margin:`-${null!==(t=d.top)&&void 0!==t?t:he}px -${null!==(n=d.right)&&void 0!==n?n:pe}px ${i?"0px":null!=c?c:"10px"} -${null!==(r=d.left)&&void 0!==r?r:pe}px`}:{}),o?El({dimensions:o,naturalDimensions:s}):{height:"200px"})})),Wl=cn("div")((e=>{let{theme:t}=e;return{background:t.getCSSColor("overlay.mediaBanner"),display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"}})),Ul=e=>{let t,{nodeKey:n,cardInstanceId:r,label:a,description:o,format:s,src:l,altText:d,theme:c,isFirstCardNode:u,isFinalCardNode:p,thumbnailSrc:h,dimensions:m,setPlaying:g,onLoad:v}=e,b=!1,f=!1;switch(s){case"banner":t=Ml,b=!0,f=!0;break;case"inline":t=Ll,b=!0,f=!0;break;case"thumbnail":t=Ol,b=!0;break;case"text":t=Al}return(0,i.h)($e.lj,{actions:Ne,mapToProps:e=>({customStrings:e.application.customStrings})},(e=>(0,i.h)(t,{nodeKey:n,theme:c,isFirstCardNode:u,isFinalCardNode:p,customStrings:e.customStrings,src:h,dimensions:m,onLoad:v,alt:null==d?void 0:d.src,label:a,description:o,mediaType:null!==l&&l.length>0?"video":"videoWithoutSrc",onClickImage:()=>{f?g(!0):e.viewMedia(r,{type:"video",url:l,title:a,alt:null==d?void 0:d.src})}},b&&(0,i.h)(Wl,{theme:c},(0,i.h)(Rl,{onClick:()=>f&&g(!0),theme:c})))))},ql=e=>{var t,n;let{format:r,theme:a,isFirstCardNode:o,isFinalCardNode:s,src:l,cardInstanceId:d,dimensions:c,loadedDimensions:u,isWorkflow:p}=e;const h=b(null),m=w(Ma).analyticsDispatcher,v="string"==typeof l&&null!==(t=null===(n=l.match(/[^\/]*$/))||void 0===n?void 0:n[0])&&void 0!==t?t:"";switch(g((()=>{var e,t,n,r;const a=()=>{m.sendEvent({eventName:Tt,cardInstanceId:d,cardViewState:p?"subview":"topview",properties:{media:v,mediaURL:l}})},i=()=>{m.sendEvent({eventName:jt,cardInstanceId:d,cardViewState:p?"subview":"topview",properties:{media:v,mediaURL:l}})};return null===(e=h.current)||void 0===e||null===(t=e.base)||void 0===t||t.addEventListener("play",a),null===(n=h.current)||void 0===n||null===(r=n.base)||void 0===r||r.addEventListener("ended",i),()=>{var e,t,n,r;null===(e=h.current)||void 0===e||null===(t=e.removeEventListener)||void 0===t||t.call(e,"play",a),null===(n=h.current)||void 0===n||null===(r=n.removeEventListener)||void 0===r||r.call(n,"ended",i)}}),[]),r){case"banner":return(0,i.h)($e.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(e=>{var t;let{applicationOpen:n}=e;return!n&&(null==h||null===(t=h.current)||void 0===t?void 0:t.base)&&h.current.base.pause(),(0,i.h)(Bl,{theme:a,isFinalCardNode:s,format:r,dimensions:c,loadedDimensions:u},(0,i.h)(Nl,{ref:h,src:l,playsInline:!0,autoplay:!0,controls:!0}))}));case"inline":return(0,i.h)($e.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(e=>{var t;let{applicationOpen:n}=e;return!n&&(null==h||null===(t=h.current)||void 0===t?void 0:t.base)&&h.current.base.pause(),(0,i.h)(zl,{theme:a,isFirstCardNode:o,isFinalCardNode:s},(0,i.h)(Bl,{theme:a,isFinalCardNode:s,format:r,dimensions:c,loadedDimensions:u},(0,i.h)(Vl,{ref:h,src:l,playsInline:!0,autoplay:!0,controls:!0})))}));default:return null}},Yl=(e,t)=>{let n;return lc(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:`${ol}`,minWidth:`${ol}`,color:e.getCSSColor("icon.bullet")},n?{fontSize:n.fontSize,lineHeight:n.lineHeight}:{}),[`>${t} > li:last-child`]:{marginBottom:"0px"}}},Zl=e=>{var t;let{theme:n,styles:r}=e;const a=null!==(t=n.getShape("padding.elementBottom",{skipFallback:!0}))&&void 0!==t?t:"20px";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:n.getCSSColor("text.body"),gridColumnStart:"2",gridRowStart:"span 2"},n.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",listStyleType:"none"})}),Yl(n,"ul")),{"> ol":Object.assign(Object.assign({},{paddingLeft:"0",margin:"0",listStyleType:"none"}),{counterReset:"count"}),"> ul:not(:first-child)":{marginTop:a},"> ol:not(:first-child)":{marginTop:a},"> ul:not(:last-child)":{marginBottom:a},"> ol:not(:last-child)":{marginBottom:a},"> ul:has(+ p.md-line-break)":{marginBottom:"0px"},"> ol:has(+ p.md-line-break)":{marginBottom:"0px"}}),Yl(n,"ol")),{" a":{color:n.getCSSColor("text.link")}," p":Object.assign(Object.assign({margin:"0px 0 0 0",whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"},n.getCSSFontProperties("body")),{overflow:"hidden"})," p:not(:first-child)":{marginTop:a}," p:not(:last-child)":{marginBottom:a}," p:has(+ p.md-line-break)":{marginBottom:"0px"}," p.md-line-break + p":{marginTop:"0px"}," p.md-line-break + ul":{marginTop:"0px"}," p.md-line-break + ol":{marginTop:"0px"}," p:not(:first-child).md-line-break":{marginTop:"0px"}," p:not(:last-child).md-line-break":{marginBottom:"0px"}," .md-subview-link":{textDecoration:"underline",cursor:"pointer"}}),r)},Kl=cn("div")((e=>{let{theme:t}=e;return Zl({theme:t})})),Gl=cn("div")({position:"absolute",top:"-1000px",left:"-1000px",width:"1px",height:"1px",overflow:"hidden"}),Xl=cn("div")((e=>{let{bodyFontProperties:t}=e;return{position:"absolute",width:"100%",visibility:"hidden",pointerEvents:"none",display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${t.lineHeight} 1fr`}})),Ql=cn("div")((e=>{let{theme:t}=e;return Zl({theme:t,styles:{"& *":{marginTop:"0!important",marginBottom:"0!important"}}})})),Jl=cn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r,bodyFontProperties:a}=e;const i=t.getShape("padding.elementBottom",{skipFallback:!0}),o=i?`0px 0px ${r?"0px":i}`:`${n?0:10}px 0px ${r?0:10}px`;return{display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${a.lineHeight} 1fr`,color:t.getCSSColor("text.body"),padding:o}})),ed=()=>window.matchMedia("(prefers-color-scheme: dark)");function td(){var e;const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);const n=document.createElement("div");t.appendChild(n);const r=t.offsetWidth-n.offsetWidth;return null===(e=t.parentNode)||void 0===e||e.removeChild(t),r}function nd(e,t,n,r,a){var i,o,s,l,d,c,u,p,h,m,g,v;const b=document.createElement("button"),f=document.createElement("span"),y=document.createElement("span");y.innerHTML="&#8230; ";const w=t.getCSSFontProperties("expandCollapse",{skipFallback:!0,skipFontFallbacks:!0}),S=t.getCSSFontProperties("body"),C=t.getShape("padding.expandCollapseLeft")||"0px",x="expand"===n?"Show more":"Show less",k="expand"===n;return b.style.fontFamily="inherit",b.style.fontSize="inherit",b.style.lineHeight="inherit",f.style.paddingLeft=k?C:"0px",f.style.color=null!==(i=t.getCSSColor("text.expandCollapse",{skipFallback:!0}))&&void 0!==i?i:t.getCSSColor("text.body"),b.style.color=null!==(o=t.getCSSColor("text.expandCollapse",{skipFallback:!0}))&&void 0!==o?o:t.getCSSColor("text.body"),f.style.fontWeight=null!==(s=null==w?void 0:w.fontWeight)&&void 0!==s?s:null==S?void 0:S.fontWeight,b.style.fontWeight=null!==(l=null==w?void 0:w.fontWeight)&&void 0!==l?l:null==S?void 0:S.fontWeight,f.style.fontStyle=null!==(d=null==w?void 0:w.fontStyle)&&void 0!==d?d:null==S?void 0:S.fontStyle,b.style.fontStyle=null!==(c=null==w?void 0:w.fontStyle)&&void 0!==c?c:null==S?void 0:S.fontStyle,f.style.textTransform=null!==(u=null==w?void 0:w.textTransform)&&void 0!==u?u:null==S?void 0:S.textTransform,b.style.textTransform=null!==(p=null==w?void 0:w.textTransform)&&void 0!==p?p:null==S?void 0:S.textTransform,f.style.fontSynthesis=null!==(h=null==w?void 0:w.fontSynthesis)&&void 0!==h?h:null==S?void 0:S.fontSynthesis,b.style.fontSynthesis=null!==(m=null==w?void 0:w.fontSynthesis)&&void 0!==m?m:null==S?void 0:S.fontSynthesis,f.textContent=e&&e.length?e:x,y.style.color=t.getCSSColor("text.body"),y.style.fontWeight=null!==(g=null==S?void 0:S.fontWeight)&&void 0!==g?g:"normal",y.style.fontStyle=null!==(v=null==S?void 0:S.fontStyle)&&void 0!==v?v:"normal",b.innerHTML=`${k?y.outerHTML:""}${f.outerHTML}`,b.style.display="inline",b.style.border="none",b.style.background="none",b.style.margin="0",b.style.padding="0",b.style.cursor="pointer",b.style.maxWidth=a,b.style.textAlign="left",k&&(b.style.whiteSpace="nowrap",b.style.overflow="hidden",b.style.textOverflow="ellipsis"),b.id=r,b.setAttribute("data-testid","text-expand-collapse-button"),b}function rd(e){let t=e.nextSibling;for(;t;){const e=t;t=t.nextSibling,e.remove()}}function ad(e,t,n,r,a,i){var o,s;if(!e)return!1;const l=nd(null!=i?i:"Show more",a,"expand",`expand-text-${r}`,t.getBoundingClientRect().width+"px");l.style.marginRight=td()+"px";const d=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),c=[];let u;for(;u=d.nextNode();){const e=null!==(o=u.textContent)&&void 0!==o?o:"",t=/\u00A0/.test(e);(e.trim().length>0||t)&&c.push(u)}let p=null,h=0,m=!1;for(let r=c.length-1;r>=0;r--){var g,v;const a=c[r],i=a.nodeValue||"";let o=0,s=i.length;null===(g=a.parentElement)||void 0===g||g.appendChild(l);const d=a.parentElement;if(!d)continue;for(;o<=s;){const e=Math.floor((o+s)/2);" "===i?a.nodeValue=e>0?" ":"":i.startsWith(" ")?a.nodeValue=0===e?"":" "+i.slice(1,e):a.nodeValue=i.slice(0,e);Math.ceil(t.getBoundingClientRect().height)<=n?(h=e,o=e+1):s=e-1}l.remove();const u=d.closest("li");if(u&&!(null===(v=u.textContent)||void 0===v?void 0:v.trim())){u.remove();continue}const b="p"===e.tagName.toLowerCase()&&"a"===d.tagName.toLowerCase();if(b&&0===h&&d.remove(),0===r||h>0){p=a,m=!b&&h<4;break}}if(p){var b,f;const e=null!==(s=p.textContent)&&void 0!==s?s:"";p.textContent=e.slice(0,m?4:h).trimEnd(),rd(p);const n=null===(b=p.parentElement)||void 0===b?void 0:b.closest("a");n&&rd(n);const o=null===(f=p.parentElement)||void 0===f?void 0:f.closest("li");o&&rd(o);let l=0;if(m){var y;const t=document.createElement("span");t.textContent=e.slice(0,4).trimEnd(),null===(y=p.parentElement)||void 0===y||y.appendChild(t),l=t.getBoundingClientRect().width,t.remove()}const d=nd(null!=i?i:"Show more",a,"expand",`expand-text-${r}`,t.getBoundingClientRect().width-l-td()+"px"),c=p.parentElement;return"p"===(null==c?void 0:c.tagName.toLowerCase())&&c.classList.contains("md-line-break")?(c.style.marginTop="0px",c.after(d)):"a"===(null==c?void 0:c.tagName.toLowerCase())&&c.parentElement?c.parentElement.insertBefore(d,c.nextSibling):null==c||c.appendChild(d),!0}return!1}const id=e=>{let{fillColor:t}=e;return(0,i.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{d:"M15 10V20M20 15H15H10",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},od=e=>{let{fillColor:t}=e;return(0,i.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,i.h)("path",{d:"M20 15H10",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},sd=cn("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"}})),ld=cn("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%"}})})),dd=cn("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"}})})),cd=cn("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({},t.getCSSFontProperties("primary")),{color:t.getCSSColor("text.primary"),flexGrow:"1",whiteSpace:"pre-wrap"})})),ud=(e,t,n)=>e-n>=t,pd=(e,t,n)=>e+n<=t;let hd=null;const md=cn("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())})),gd=cn("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"}})),vd=cn("p")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return Object.assign(Object.assign({display:"grid",gridTemplateColumns:"auto minmax(0,1fr)",color:t.getCSSColor("text.category")},t.getCSSFontProperties("category")),{padding:a?`0px 0px ${r?"0px":a}`:`${n?0:10}px 0px ${r?0:10}px`,margin:"0"})})),bd=cn("span")({whiteSpace:"pre-wrap",overflow:"hidden",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"});let fd=null;const yd=e=>{let{fillColor:t,ariaHidden:n}=e;return(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":null!=n&&n},(0,i.h)("path",{d:"M12 13V7M3 3H8M17 3H12M4 7V16C4 16.5523 4.44772 17 5 17H15C15.5523 17 16 16.5523 16 16V7M8 3L9 2H11L12 3M8 3H12M8 7V13",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},wd=e=>{let{fillColor:t,ariaHidden:n}=e;return(0,i.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":null!=n&&n},(0,i.h)("path",{d:"M15 7V13.5C15 15.9853 12.9853 18 10.5 18V18C8.01472 18 6 15.9853 6 13.5V5C6 3.34315 7.34315 2 9 2V2C10.6569 2 12 3.34315 12 5V13.5C12 14.3284 11.3284 15 10.5 15V15C9.67157 15 9 14.3284 9 13.5V7",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))};var Sd=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};const Cd={jpeg:{signatures:[[255,216,255]],offset:0},png:{signatures:[[137,80,78,71,13,10,26,10]],offset:0},webp:{signatures:[[82,73,70,70,,,,,87,69,66,80]],offset:0},avif:{signatures:[[32,102,116,121,112,97,118,105,102]],offset:3}},xd={tif:{signatures:[[73,73,42,0],[77,77,0,42]],offset:0},tiff:{signatures:[[73,73,43,0],[73,73,0,43]],offset:0},heic:{signatures:[[102,116,121,112,104,101,105,99]],offset:4}};var kd=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};const Id=cn("label")((()=>({position:"relative",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",display:"flex",alignItems:"center",width:"100%",cursor:"pointer"}))),Od=cn("div")((e=>{let{theme:t,enabledThumbnailIcon:n,preview:r}=e;const a=n||(null==r?void 0:r.url)?"30px":"0",i={background:`url(${null==r?void 0:r.url})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"};return Object.assign({width:a,height:a,minWidth:a,minHeight:a,padding:n||(null==r?void 0:r.url)?"7px":"0",marginRight:n||(null==r?void 0:r.url)?"10px":"0",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:t.getShape("borderRadius.uploadPlaceholder")||"0px",backgroundColor:t.getCSSColor("background.uploadPlaceholder")},(null==r?void 0:r.url)&&r.webCompatible?i:{})})),Fd=cn("span")((e=>{let{theme:t,placeholder:n,yPadding:r}=e;return Object.assign(Object.assign({width:"100%",overflow:"hidden",textOverflow:"ellipsis",padding:`${r}px 0`,color:n?t.getCSSColor("text.hint"):t.getCSSColor("text.secondary")},t.getCSSFontProperties("secondary")),{userSelect:"none","-webkit-user-select":"none","-moz-user-select":"none"})})),Md=cn("input")({position:"absolute",visibility:"hidden",width:"100%",height:"100%"}),Td=cn("button")((()=>({display:"flex",justifyContent:"center",alignItems:"center",border:"0",padding:"0",margin:"0",textDecoration:"none",cursor:"pointer",textAlign:"center",background:"none","-webkit-appearance":"none","-moz-appearance":"none"}))),jd=cn("button")((()=>({display:"flex",justifyContent:"center",alignItems:"center",border:"0",padding:"0",margin:"0",textDecoration:"none",cursor:"pointer",textAlign:"center",background:"none","-webkit-appearance":"none","-moz-appearance":"none"}))),Ld=e=>{let{theme:t,cardInstanceId:n,subviewId:r,name:a,label:o,validations:s,enabledThumbnailIcon:l,targetBucketId:d,variableResolver:c}=e;const u=b(null),p=b(null),m=ft(n,a,r),[v,f]=h(null),[y,w]=h(null),[S,C]=h(0),x=de().getState();g((()=>{if(x.application.isPreview)return;const e=window.AtomicUploadService.getFile(x.application.containerInstanceId,n,a);m&&e?(I(e),w(m.filename)):bt().handleFormChange(n,a,void 0,r)}),[]),g((()=>{if(u.current&&p.current&&!S){var e,t,n,r;const a=(null===(e=u.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.offsetHeight)||0,i=(null===(n=p.current)||void 0===n||null===(r=n.base)||void 0===r?void 0:r.offsetHeight)||0;if(a>0&&i>0&&a>i){const e=Math.round((a-i)/2);C(e)}}}),[u]);const k=(e,t)=>{f({url:URL.createObjectURL(e),webCompatible:!t})},I=e=>{const t=u.current.base;if(t){k(e.file,e.convertImage);const n=new DataTransfer;n.items.add(e.file),t.files=n.files}},O=()=>{x.application.isPreview||(window.AtomicUploadService.removeFile(x.application.containerInstanceId,n,a,r),bt().handleFormChange(n,a,void 0,r),bt().validateField(n,a,void 0,s,r),u.current&&(f(null),w(null),u.current.base.value=null))},F=`upload-label=${n}-${a}`;return(0,i.h)(i.Fragment,null,(0,i.h)(Od,{theme:t,enabledThumbnailIcon:l,preview:v},!v&&l&&(0,i.h)(Mn,{fillColor:t.getCSSColor("icon.uploadPlaceholder"),ariaHidden:!0}),v&&!v.webCompatible&&(0,i.h)(Zn,{fillColor:t.getCSSColor("icon.uploadPlaceholder"),ariaHidden:!0})),(0,i.h)(Id,{htmlFor:F},(0,i.h)(Fd,{ref:p,theme:t,placeholder:!y,yPadding:S},y||c(o.length?o:"")),(0,i.h)(Md,{id:F,ref:u,type:"file",accept:"image/jpeg, image/png, image/webp, image/avif",onChange:e=>kd(void 0,void 0,void 0,(function*(){if(x.application.isPreview)return;const t=e.target;if(t.files&&t.files.length){f(null),w(null);const[e]=Array.from(t.files),i=yield(e=>Sd(void 0,void 0,void 0,(function*(){const t=yield e.slice(0,(()=>{const e=Object.assign(Object.assign({},Cd),xd);return Object.values(e).reduce(((e,t)=>{let n=0;return t.signatures.forEach((e=>n=Math.max(n,e.length))),n+=t.offset,Math.max(e,n)}),0)})()).arrayBuffer(),n=new Uint8Array(t),r=(e,t)=>e.every(((e,r)=>n[t+r]===e||void 0===e));for(const{signatures:e,offset:t}of Object.values(Cd))for(const n of e)if(r(n,t))return{requiresConversion:!1,isValidImage:!0};for(const{signatures:e,offset:t}of Object.values(xd))for(const n of e)if(r(n,t))return{requiresConversion:!0,isValidImage:!0};return{requiresConversion:!1,isValidImage:!1}})))(e);if(!i.isValidImage)return O(),void bt().validateFieldCustomResult(n,a,{type:"invalid",errorMessage:"Invalid file or unsupported image format selected"},r);const o=`${(0,X.v4)()}_${e.name}`,l={filename:e.name,destinationFilename:o,size:e.size,type:"image",targetBucketId:d};window.AtomicUploadService.storeFile(e,"image",d,n,x.application.containerInstanceId,o,i.requiresConversion,a,r),bt().handleFormChange(n,a,l,r),k(e,i.requiresConversion),w(e.name),bt().validateField(n,a,l,s,r)}}))})),y?(0,i.h)(jd,{onClick:O,"aria-label":"remove image"},(0,i.h)(yd,{fillColor:t.getCSSColor("icon.inputButton"),ariaHidden:!0})):(0,i.h)(Td,{onClick:()=>{var e,t;return null==u||null===(e=u.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.click()},"aria-label":"attach image"},(0,i.h)(wd,{fillColor:t.getCSSColor("icon.inputButton"),ariaHidden:!0})))},_d=T((e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{label:a,name:o,type:s,enabledThumbnailIcon:l,targetBucketId:d},theme:c,isFinalCardNode:u,validations:p,variableResolver:h}=e;const m="image"===s?(0,i.h)(Ld,{theme:c,cardInstanceId:n,subviewId:r,name:o,validations:p,label:a,enabledThumbnailIcon:l,targetBucketId:d||"DEFAULT",variableResolver:h}):null;return(0,i.h)(i.Fragment,null,(0,i.h)(Yi,{nodeKey:t,theme:c,isFinalCardNode:u,cursor:"default",mode:"inline"},m),(0,i.h)(eo,{name:o,cardInstanceId:n,subviewId:r,theme:c,isFinalCardNode:u,variableResolver:h}))}),((e,t)=>e.nodeKey===t.nodeKey&&e.cardInstanceId===t.cardInstanceId&&e.subviewId===t.subviewId&&e.attributes===t.attributes&&e.theme===t.theme&&e.validations===t.validations)),Dd=cn("div")((e=>{var t,n,r,a,i,o,s,l,d,c,u,p,h;let{theme:m,paddingValues:g,feedOrientation:v,isFirstCardNode:b,ruleBetween:f,buttonLayout:y}=e;const{containerPadding:w,containerHorizontalPaddingFallback:S,containerVerticalPaddingFallback:C,buttonGroupPadding:x,buttonGroupVerticalPaddingFallback:k}=g;let I=f?"0px":null!==(t=m.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==t?t:"10px";const O=m.getShape("buttonAlignment.global"),F=Object.assign({flexGrow:"1",flexDirection:"column"},"horizontal"===y?{alignItems:"flex-end"}:{justifyContent:"flex-end"}),M={flexDirection:"row",overflowX:"scroll","::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none",scrollbarWidth:"none",marginLeft:`-${null!==(n=w.left)&&void 0!==n?n:S}px`,marginRight:`-${null!==(r=w.right)&&void 0!==r?r:S}px`,paddingLeft:`${null!==(a=x.left)&&void 0!==a?a:S}px`,paddingRight:`${null!==(i=x.right)&&void 0!==i?i:S}px`,"> button:not(:last-child)":{marginRight:I},"> a:not(:last-child)":{marginRight:I}},T={flexDirection:"column",alignItems:null!==(o={left:"flex-start",center:"center",right:"flex-end"}[O])&&void 0!==o?o:"flex-start","> button:not(:last-child)":{marginBottom:I},"> a:not(:last-child)":{marginBottom:I}};return Object.assign(Object.assign({position:"relative",paddingTop:`${null!==(s=x.top)&&void 0!==s?s:b?0:k}px`,paddingBottom:`${null!==(l=x.bottom)&&void 0!==l?l:0}px`,paddingLeft:`${null!==(d=x.left)&&void 0!==d?d:0}px`,paddingRight:`${null!==(c=x.right)&&void 0!==c?c:0}px`,marginTop:"0px",marginBottom:`-${void 0!==x.bottom?null!==(u=w.bottom)&&void 0!==u?u:C:0}px`,marginLeft:`-${void 0!==x.left?null!==(p=w.left)&&void 0!==p?p:S:0}px`,marginRight:`-${void 0!==x.right?null!==(h=w.right)&&void 0!==h?h:S:0}px`,display:"flex",alignItems:"center"},"horizontal"===v?F:{}),"horizontal"===y?M:T)})),Ad=cn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:a?`0px 0px ${r?"0px":a}`:`${n?0:10}px 0px ${r?0:10}px`}})),Ed=cn("ul")({listStyle:"none",padding:"0",margin:"0","> li":{marginBottom:"10px"},"> :last-child":{marginBottom:"0"}}),Hd=cn("label")((e=>{let{labelFontProperties:t}=e;return{cursor:"pointer",display:"grid",gridTemplateColumns:"auto minmax(0, 1fr)",gridTemplateRows:`${(null==t?void 0:t.lineHeight)||"auto"} 1fr`,alignItems:"center",width:"fit-content",userSelect:"none"}})),Pd=cn("input")((e=>{let{theme:t}=e;return{position:"absolute",appearance:"none","&:focus-visible + span":{boxShadow:`0 0 0 2px ${t.getCSSColor("border.focus")} inset`}}})),Rd=cn("span")((e=>{let{theme:t,isChecked:n}=e;const r={backgroundColor:t.getCSSColor("background.checkedCheckbox",{skipFallback:!0})||"#000",borderColor:t.getCSSColor("border.checkedCheckbox",{skipFallback:!0})||"#000",borderWidth:t.getShape("border.checkedCheckbox")||"1px",borderStyle:"solid",borderRadius:t.getShape("borderRadius.checkedCheckbox",{skipFallback:!0})||"4px"},a={backgroundColor:t.getCSSColor("background.uncheckedCheckbox",{skipFallback:!0})||"#FFF",borderColor:t.getCSSColor("border.uncheckedCheckbox",{skipFallback:!0})||"#000",borderWidth:t.getShape("border.uncheckedCheckbox")||"1px",borderStyle:"solid",borderRadius:t.getShape("borderRadius.uncheckedCheckbox",{skipFallback:!0})||"4px"};return Object.assign({height:"20px",width:"20px",padding:"6px 4px 6px 5px",position:"relative",marginRight:"10px",display:"inline-block"},n?r:a)})),$d=cn("span")((e=>{let{theme:t,labelFontProperties:n}=e;return Object.assign(Object.assign({},n||{}),{gridColumnStart:"2",gridRowStart:"span 2",whiteSpace:"pre-wrap",color:t.getCSSColor("text.primary"),cursor:"pointer",userSelect:"none",webkitUserSelect:"none",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"})}));function Nd(){return Nd=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},Nd.apply(this,arguments)}const Vd={linkButton:e=>{let{nodeKey:t,index:n,localIndex:r,cardInstanceId:a,subviewId:o,subviewTitle:s,isWorkflow:l,theme:d,attributes:c,variableResolver:u}=e;const{text:p,icon:h,iconUrl:m,appearance:g}=c,v=c.url,b=c.target,f=Object.assign(Object.assign({},o&&{subviewId:o}),s&&{subviewTitle:s}),y=w(Ma),S=y.runtimeVariableResolver,C=y.containersBroadcastChannel;return(0,i.h)(el,{nodeKey:t,index:n,localIndex:r,theme:d,appearance:g,isWorkflow:l,text:u(p),icon:h,iconUrl:m,clickHandler:e=>{const n=de().getState();return r=>Xs(void 0,void 0,void 0,(function*(){let i,o,s;if(c.action){s=c.action;const e=n.cardFeed.cardInstances.find((e=>e.instance.id===a));s&&S&&e&&(yield Js(S,n.application.runtimeVariableResolutionTimeout,e,s))}else if(c.layoutId)i=c.layoutId;else if(c.url){if(r.preventDefault(),o={url:u(v),target:r.ctrlKey||r.metaKey?"_blank":null!=b?b:"_blank"},y.analyticsDispatcher.sendEvent({cardInstanceId:a,cardViewState:n.navigationStack.items.length?"subview":"topview",eventName:wt,properties:Object.assign({linkMethod:"url",url:o.url,trigger:"linkButton"},f.subviewId?Object.assign(Object.assign({},f),{subviewLevel:1}):{})}),"_top"===o.target&&C){const e=`${t}-link-button`;return C.addEventListener("message",(t=>{if(t.data.type===ss.ANALYTICS_EVENT){var n;const r=null===(n=t.data)||void 0===n?void 0:n.eventQueued;r.eventName===wt&&r.cardInstanceId===a&&C&&o&&(C.removeEventListener(e),window.open(o.url,o.target))}}),e)}return window.open(o.url,o.target)}return e.handleLinkButtonPress(a,f,i,s)}))},urlLink:v?{url:u(v),target:b}:void 0})},submitButton:e=>{let{nodeKey:t,index:n,localIndex:r,cardInstanceId:a,subviewId:o,subviewTitle:s,isWorkflow:l,theme:d,attributes:{name:c,text:u,appearance:p,icon:m,iconUrl:g,values:v,url:b,action:f,target:y},variableResolver:S}=e;const[C,x]=h(!1),k=w(Ma),I=k.cardEventDispatcher,O=k.authTokenProvider,F=k.analyticsDispatcher,M=k.runtimeVariableResolver;return(0,i.h)(el,{nodeKey:t,index:n,localIndex:r,theme:d,appearance:p,isWorkflow:l,text:S(u),icon:m,iconUrl:g,clickHandler:e=>{const t=de().getState();return()=>Xs(void 0,void 0,void 0,(function*(){var n,r;if(t.application.isPreview)return void e.finishSubview();if(C)return;x(!0);const i=t.cardFeed.cardInstances.find((e=>e.instance.id===a));f&&M&&i&&(yield Js(M,t.application.runtimeVariableResolutionTimeout,i,f));let d={};var u,p;l?(e.validateCurrentSubview(a),d=o&&null!==(n=null===(u=de().getState().validationStates[a])||void 0===u||null===(p=u.subviews)||void 0===p?void 0:p[o])&&void 0!==n?n:{}):(e.validateCardTopLevel(a),d=null!==(r=de().getState().validationStates[a].validations)&&void 0!==r?r:{});const h=de().getState(),m=(e=>!!e.navigationStack.items.length)(t);(e=>{for(var t in e)if("invalid"===e[t].type)return!1;return!0})(d)&&(yield Zs(h,e,a,m,I,F,O,v,{postSubmissionUrl:b?{url:S(b),target:y}:void 0,payload:f,subviewData:{subviewId:o,subviewTitle:s},submitButtonName:c,cancelSubmitCallback:()=>x(!1)}),l&&F.sendEvent({cardInstanceId:a,cardViewState:"subview",eventName:Mt,properties:{subviewId:o,subviewTitle:s,subviewLevel:1}})),x(!1)}))},loading:C,type:"submit"})},dismissButton:e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:a,attributes:o,theme:s,cardInstanceId:l,variableResolver:d}=e;const{text:c,icon:u,iconUrl:p,appearance:h}=o,m=w(Ma);return(0,i.h)(el,{nodeKey:t,index:n,localIndex:r,theme:s,appearance:h,isWorkflow:a,text:d(c),icon:u,iconUrl:p,clickHandler:e=>()=>{Ys(de().getState(),e,l,m.cardEventDispatcher,m.authTokenProvider,"card-button")}})},snoozeButton:e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:a,attributes:o,theme:s,cardInstanceId:l,cardMetadata:d,variableResolver:c}=e;const{text:u,icon:p,iconUrl:h,snoozePeriod:m,appearance:g}=o,v=w(Ma);return(0,i.h)(el,{nodeKey:t,index:n,localIndex:r,theme:s,appearance:g,isWorkflow:a,text:c(u),icon:p,iconUrl:h,clickHandler:e=>()=>{if(void 0===m||null===nc(m))e.requestSnooze(l,"card-button",null==d?void 0:d.expires);else{const t=rc(m,new Date);(0,J.isPast)(t)||Ks(de().getState(),e,l,t,v.cardEventDispatcher,v.authTokenProvider,"card-button")}}})},voteUpButton:e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:a,attributes:o,theme:s,cardInstanceId:l,variableResolver:d}=e;const{text:c,icon:u,iconUrl:p,appearance:h}=o,m=w(Ma);return(0,i.h)(el,{nodeKey:t,index:n,localIndex:r,theme:s,appearance:h,isWorkflow:a,text:d(c),icon:u,iconUrl:p,clickHandler:e=>()=>{Gs(l,e,m.analyticsDispatcher,m.cardEventDispatcher,"card-button")}})},voteDownButton:e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:a,attributes:o,theme:s,cardInstanceId:l,variableResolver:d}=e;const{text:c,icon:u,iconUrl:p,appearance:h}=o;return(0,i.h)(el,{nodeKey:t,index:n,localIndex:r,theme:s,appearance:h,isWorkflow:a,text:d(c),icon:u,iconUrl:p,clickHandler:e=>()=>{e.requestFeedback(l,{sentiment:"negative",source:"card-button",textFeedback:!0})}})},actionButtonGroup:e=>{var t,n,r,a,o,s,l;let{children:d,theme:c,feedOrientation:u,isWorkflow:p,isFirstCardNode:h}=e;const m=b(null);if(!d||!d.length)return null;const g=c.getShape("buttonLayout.global"),v={top:c.getHorizontalRule("buttonGroupTop"),between:c.getHorizontalRule("buttonGroupBetween"),bottom:c.getHorizontalRule("buttonGroupBottom")},f=c.getShape("padding.elementBottom",{skipFallback:!0}),y={containerPadding:p?c.getNumericalPadding("stream"):c.getNumericalPadding("card"),containerHorizontalPaddingFallback:p?me:pe,containerVerticalPaddingFallback:p?me:he,buttonGroupPadding:c.getNumericalPadding("buttonGroup"),buttonGroupVerticalPaddingFallback:null!==(t=wn(f))&&void 0!==t?t:ge};let w="0px";if(void 0!==y.buttonGroupPadding.bottom){const e=null!==(n=y.containerPadding.bottom)&&void 0!==n?n:y.containerVerticalPaddingFallback;w=y.buttonGroupPadding.bottom>e?`-${y.buttonGroupPadding.bottom-e}px`:(null!==(r=y.containerPadding.bottom)&&void 0!==r?r:y.containerVerticalPaddingFallback)-y.buttonGroupPadding.bottom+"px"}return(0,i.h)(i.Fragment,null,(null===(o=v.top)||void 0===o?void 0:o.enabled)&&(0,i.h)(Dn,{theme:c,ruleStyles:v.top,isSubview:p,translateY:`${null!==(a=y.buttonGroupPadding.top)&&void 0!==a?a:h?0:y.buttonGroupVerticalPaddingFallback}px`}),(0,i.h)(Dd,{ref:m,theme:c,paddingValues:y,isFirstCardNode:h,feedOrientation:u,buttonLayout:g,ruleBetween:(null===(s=v.between)||void 0===s?void 0:s.enabled)&&"horizontal"!==g},d),(null===(l=v.bottom)||void 0===l?void 0:l.enabled)&&(0,i.h)(Dn,{theme:c,isSubview:p,ruleStyles:v.bottom,translateY:w}))},cardDescription:e=>{var t;let{nodeKey:n,isFirstCardNode:r,isFinalCardNode:a,attributes:{text:o,icon:s,iconUrl:l},theme:d,variableResolver:c}=e;const u=d.getCSSFontProperties("category"),p=d.getNumericFontSize("category"),h=d.getCSSColor("icon.category",{skipFallback:!0}),m=d.getCSSColor("icon.category");return(0,i.h)(vd,{theme:d,"data-testid":"card-category",isFirstCardNode:r,isFinalCardNode:a},(s||l)&&(0,i.h)(Ln,{iconName:s,iconUrl:l,size:null!=p?p:20,color:null!==h?h:void 0,fallbackColor:m,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null==u?void 0:u.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${p}px`,minWidth:`${p}px`,textAlign:"center"}}),(0,i.h)(bd,{key:n},c(o)))},headline:e=>{var t;let{nodeKey:n,isFirstCardNode:r,isFinalCardNode:a,attributes:{text:o,icon:s,iconUrl:l},theme:d,variableResolver:c}=e;const u=d.getCSSFontProperties("headline"),p=d.getNumericFontSize("headline"),h=d.getCSSColor("icon.headline",{skipFallback:!0}),m=d.getCSSColor("icon.headline");return(0,i.h)(al,{theme:d,isFirstCardNode:r,isFinalCardNode:a,headlineFontProperties:u},(s||l)&&(0,i.h)(Ln,{iconName:s,iconUrl:l,size:null!=p?p:20,color:null!==h?h:void 0,fallbackColor:m,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null==u?void 0:u.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${p}px`,minWidth:`${p}px`,textAlign:"center"}}),(0,i.h)(il,{key:n,theme:d,"data-testid":"card-headline","data-element-key":n},c(o)))},text:e=>{var t,n,r,a,o,s;let{nodeKey:l,isFirstCardNode:d,isFinalCardNode:c,theme:u,attributes:{icon:p,iconUrl:m,text:v,clickToExpandEnabled:f,maxDisplayLines:y,showTextLabel:S,hideTextLabel:C},isWorkflow:x,variableResolver:k,cardInstanceId:I,subviewId:O,subviewTitle:F}=e;const M=b(null),T=b(null),[j,L]=h(!1),[_,D]=h(null),[A,E]=h(null),[H,P]=h(ed().matches?"dark":"light"),R=b((0,X.v4)()),$=null===(r=M.current)||void 0===r?void 0:r.base.querySelector(`#expand-text-${R.current}`),N=null===(a=M.current)||void 0===a?void 0:a.base.querySelector(`#collapse-text-${R.current}`),V=gl(Qd(k(v))),z=w(Ma).analyticsDispatcher;let B;lc(u.getCSSFontProperties("body"))||(B=u.getCSSFontProperties("body"));const W=u.getNumericFontSize("body"),U=Object.assign(Object.assign(Object.assign({},O&&{subviewId:O}),F&&{subviewTitle:F}),O&&{subviewLevel:1}),q=u.getCSSColor("icon.body",{skipFallback:!0}),Y=u.getCSSColor("icon.body"),Z=()=>{if(!(M.current&&T.current&&y&&f))return D(null),L(!1),E(!1);const e=T.current.base;e.innerHTML="";const t=getComputedStyle(M.current.base),n=parseFloat(t.lineHeight),r=parseFloat(t.fontSize),a=Math.ceil((isNaN(n)?r:n)*y),i=document.createElement("div");i.innerHTML=V;const o=Array.from(i.children);let s=!1;for(let t=0;t<o.length;t++){e.appendChild(o[t]);const n=Math.ceil(e.getBoundingClientRect().height);if(n<a)continue;const r=t<o.length-1;if(n===a&&r){s=ad(o[t],e,a,R.current,u,S);break}if(n>a){s=ad(o[t],e,a,R.current,u,S);break}}s?(D(e.innerHTML),E(!0)):E(!1)};g((()=>{let e;if(f){const t=()=>{Z()};document.fonts.onloadingdone=t,"ResizeObserver"in window&&(e=new ResizeObserver(Z),e.observe(document.body))}const t=e=>{P(e.matches?"dark":"light")};return ed().addEventListener("change",t),()=>{var n;null===(n=e)||void 0===n||n.disconnect(),document.fonts.onloadingdone=null,ed().removeEventListener("change",t)}}),[V]),g(Z,[V,y,f,H,S,C]),g((()=>{const e=()=>L(!0),t=()=>L(!1),n=M.current.base;if(!n)return;const r=n.querySelector(`#expand-text-${R.current}`),a=n.querySelector(`#collapse-text-${R.current}`);return r&&r.addEventListener("click",e),a&&a.addEventListener("click",t),()=>{r&&r.removeEventListener("click",e),a&&a.removeEventListener("click",t)}}),[$,N,_,j,A]),g((()=>{const e=document.querySelector(`#markdown-${R.current}`);if(e){Array.from(e.querySelectorAll(".md-subview-link")).forEach((e=>{e.addEventListener("click",(()=>{var t;L(!1),E(!1),D(null),We().handleSubviewLinkPress(I,null==e||null===(t=e.dataset)||void 0===t?void 0:t.subviewId)})),e.addEventListener("keydown",(t=>{var n;Dr(t.key)===jr&&(L(!1),E(!1),D(null),We().handleSubviewLinkPress(I,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;z.sendEvent({cardInstanceId:I,cardViewState:x?"subview":"topview",eventName:wt,properties:Object.assign({linkMethod:"url",url:null!=n?n:"",detail:"textLink"},U)})}))}))}}),[V,A,j]);return(0,i.h)(i.Fragment,null,(0,i.h)(Jl,{key:l,isFirstCardNode:d,isFinalCardNode:c,theme:u,bodyFontProperties:B,"data-element-key":l,"data-testid":"text-block"},(p||m)&&(0,i.h)(Ln,{iconName:p,iconUrl:m,size:null!=W?W:20,color:null!==q?q:void 0,fallbackColor:Y,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null===(o=B)||void 0===o?void 0:o.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${W}px`,minWidth:`${W}px`,textAlign:"center"}}),(0,i.h)(Kl,{id:`markdown-${R.current}`,"data-testid":"text-markdown",theme:u,ref:M,"aria-hidden":"true",dangerouslySetInnerHTML:{__html:V&&0!==V.length&&null!==A?j||!_?function(e,t,n,r){if(!t||!n||!r)return e;const a=n.cloneNode(!0);a.innerHTML=e;const i=document.createTreeWalker(a,NodeFilter.SHOW_TEXT),o=[];let s=null;for(;s=i.nextNode();){var l;s&&(null===(l=s.textContent)||void 0===l?void 0:l.trim())&&o.push(s)}if(o.length>0){const e=o[o.length-1],t=e.parentElement;"a"===(null==t?void 0:t.tagName.toLowerCase())&&t.parentElement?(r.style.paddingLeft="5px",t.parentElement.insertBefore(r,t.nextSibling)):(e.textContent=e.textContent+" ",null==t||t.appendChild(r))}return a.innerHTML}(V,A,null===(K=T.current)||void 0===K?void 0:K.base,nd(null!=C?C:"Show less",u,"collapse",`collapse-text-${R.current}`,(null===(G=M.current)||void 0===G?void 0:G.base.getBoundingClientRect().width)+"px")):_:"<p></p>"}}),(0,i.h)(Gl,{dangerouslySetInnerHTML:{__html:V}})),(0,i.h)(Xl,{bodyFontProperties:B,isWorkflow:x,"aria-hidden":"true"},(p||m)&&(0,i.h)(Ln,{iconName:p,iconUrl:m,size:null!=W?W:20,color:null!==q?q:void 0,fallbackColor:Y,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(n=null===(s=B)||void 0===s?void 0:s.lineHeight)&&void 0!==n?n:"initial",marginRight:"10px",width:`${W}px`,minWidth:`${W}px`,textAlign:"center"}}),(0,i.h)(Ql,{theme:u,ref:T})));var K,G},list:e=>{let t,{nodeKey:n,isFirstCardNode:r,isFinalCardNode:a,attributes:{type:o},children:s,theme:l}=e;switch(o){case"bullet":t=dl;break;case"number":t=cl;break;case"comma":t=ul}return t?(0,i.h)(t,{key:n,"data-element-key":n,theme:l,isFirstCardNode:r,isFinalCardNode:a},s):null},listItem:e=>{let{nodeKey:t,attributes:{text:n,icon:r},theme:a,isWorkflow:o,variableResolver:s,cardInstanceId:l,subviewId:d,subviewTitle:c}=e;const u=b((0,X.v4)()),p=w(Ma).analyticsDispatcher,h=gl(Qd(s(n))),m=Object.assign(Object.assign(Object.assign({},d&&{subviewId:d}),c&&{subviewTitle:s(c)}),d&&{subviewLevel:1});let v;g((()=>{const e=document.querySelector(`#markdown-${u.current}`);if(e){Array.from(e.querySelectorAll(".md-subview-link")).forEach((e=>{const t=()=>{var t,n;We().handleSubviewLinkPress(l,null==e||null===(t=e.dataset)||void 0===t?void 0:t.subviewId),d&&(null==e||null===(n=e.dataset)||void 0===n?void 0:n.subviewId)!==d&&p.sendEvent({cardInstanceId:l,cardViewState:"subview",eventName:Mt,properties:m})};e.addEventListener("click",t),e.addEventListener("keydown",(e=>{Dr(e.key)===jr&&t()}))}));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;p.sendEvent({cardInstanceId:l,cardViewState:o?"subview":"topview",eventName:wt,properties:Object.assign({linkMethod:"url",url:null!=n?n:"",detail:"textLink"},m)})}))}))}}),[h]),lc(v)||(v=a.getCSSFontProperties("bullet"));const f=a.getCSSColor("icon.bullet",{skipFallback:!0}),y=a.getCSSColor("icon.bullet");return(0,i.h)(bl,{key:t,"data-element-key":t,theme:a,class:r?"with-icon":"without-icon"},r&&(0,i.h)(Ln,{iconName:r,size:v?v.fontSize:20,color:null!==f?f:void 0,fallbackColor:y,styles:{lineHeight:v?v.lineHeight:"initial",marginRight:"10px",width:"22px",minWidth:"22px",textAlign:"center"}}),(0,i.h)(fl,{id:`markdown-${u.current}`,theme:a,"data-testid":"list-item-text",dangerouslySetInnerHTML:{__html:h}}))},image:e=>{let t,{nodeKey:n,cardInstanceId:r,subviewId:a,subviewTitle:o,theme:s,isFirstCardNode:l,isFinalCardNode:d,attributes:{format:c,thumbnailSrc:u,description:p,label:h,src:m,dimensions:g,altText:v,behaviour:b,url:f,target:S,layoutId:C,payload:x},variableResolver:k}=e;const I=w(Ma),O=I.containersBroadcastChannel;switch(c){case"inline":t=Ll;break;case"banner":t=Ml;break;case"thumbnail":t=Ol;break;case"text":t=Al}const F=m&&m.length>0?"image":"imageWithoutSrc";return t?(0,i.h)($e.lj,{actions:(0,G.Y2)(Ne,ut),mapToProps:e=>({customStrings:e.application.customStrings})},(e=>{const c=y((()=>{switch(b){case"url":return f?e=>{e.preventDefault();const t={url:k(f),target:e.ctrlKey||e.metaKey?"_blank":null!=S?S:"_blank"};if(I.analyticsDispatcher.sendEvent({cardInstanceId:r,cardViewState:a?"subview":"topview",eventName:wt,properties:Object.assign({linkMethod:"url",url:t.url,trigger:"image"},a?{subviewId:a,subviewTitle:o,subviewLevel:1}:{})}),"_top"===t.target&&O){const e=`${n}-image-link`;return O.addEventListener("message",(n=>{if(n.data.type===ss.ANALYTICS_EVENT){var a;const i=null===(a=n.data)||void 0===a?void 0:a.eventQueued;i.eventName===wt&&i.cardInstanceId===r&&O&&t&&(O.removeEventListener(e),window.open(t.url,t.target))}}),e)}return window.open(t.url,t.target)}:()=>{ne.error({level2:[`url type image link for card: ${r} has no url`]})};case"subview":return C?()=>{e.handleImageLinkPress(r,{layoutId:C,currentSubviewId:a,currentSubviewTitle:o})}:()=>{ne.error({level2:[`subview type image link for card: ${r} has no subview id`]})};case"payload":return x?()=>{e.handleImageLinkPress(r,{payload:x,currentSubviewId:a,currentSubviewTitle:o})}:()=>{ne.error({level2:[`payload type image link for card: ${r} has no payload`]})};case"none":return;default:return()=>{e.viewMedia(r,Object.assign({type:F,url:k(m),title:k(h)},(null==v?void 0:v.src)?{alt:k(v.src)}:{}))}}}),[b,r,O]);return(0,i.h)(t,{nodeKey:n,mediaType:F,theme:s,isFirstCardNode:l,isFinalCardNode:d,customStrings:e.customStrings,src:k(u),dimensions:g,url:f,label:k(h),description:k(p),alt:k(null==v?void 0:v.thumbnailSrc),onClickImage:c})})):null},video:e=>{let{nodeKey:t,cardInstanceId:n,attributes:r,theme:a,isFirstCardNode:o,isFinalCardNode:s,isWorkflow:l,variableResolver:d}=e;const[c,u]=h(!1),[p,m]=h(void 0);return c?(0,i.h)(ql,{nodeKey:t,cardInstanceId:n,isWorkflow:l,format:r.format,src:d(r.src),thumbnailSrc:d(r.thumbnailSrc),dimensions:r.dimensions,loadedDimensions:p,theme:a,isFirstCardNode:o,isFinalCardNode:s,label:d(r.label),description:d(r.description)}):(0,i.h)(Ul,{nodeKey:t,cardInstanceId:n,isWorkflow:l,format:r.format,src:d(r.src),thumbnailSrc:d(r.thumbnailSrc),dimensions:r.dimensions,onLoad:m,theme:a,isFirstCardNode:o,isFinalCardNode:s,label:d(r.label),description:d(r.description),altText:{src:d(null===(g=r.altText)||void 0===g?void 0:g.src),thumbnailSrc:d(null===(v=r.altText)||void 0===v?void 0:v.thumbnailSrc)},setPlaying:u});var g,v},form:e=>{let{cardInstanceId:t,subviewId:n,attributes:{defaultValues:r},theme:a,isWorkflow:o,feedOrientation:s,children:l}=e;return(0,i.h)($e.lj,{actions:ut,mapToProps:()=>{}},(e=>(0,i.h)(nl,{theme:a,isWorkflow:o,feedOrientation:s,initializeFormStore:rl(e,t,r,n)},l)))},textInput:zo,numberInput:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{defaultValue:a,thumbnailSrc:o,placeholder:s,name:l},theme:d,isFinalCardNode:c,validations:u,variableResolver:p}=e;const m=b(null),v=b(a&&qd(a.toString())?a.toString():""),[f,y]=h(v.current);g((()=>{const e=ft(n,l,r);if(e)v.current=e.toString(),y(e.toString());else{const e=qd(f);bt().handleFormChange(n,l,null!=e?e:void 0,r)}}),[]),g((()=>{const e=a&&qd(a.toString())?a.toString():"";if(e!==v.current){if(f===v.current){const t=qd(e);bt().handleFormChange(n,l,null!=t?t:void 0,r),y(e)}v.current=e}}),[a]);const w=p(s);return(0,i.h)($e.lj,{actions:ut,mapToProps:()=>{}},(e=>(0,i.h)(i.Fragment,null,(0,i.h)(Yi,{nodeKey:t,mode:"inline",theme:d,isFinalCardNode:c},o&&(0,i.h)(Ki,{thumbnailUrl:p(o),theme:d}),(0,i.h)($o,{theme:d,ref:m,placeholder:w,value:f,title:w,className:"input-number",inputmode:"decimal",onInput:t=>{const{value:a}=t.target,i=f;let o;y(a),o=Zd(a)?a.trim():i,y(o);const s=qd(o);((e,t)=>{null!==fd&&(clearTimeout(fd),fd=null),fd=setTimeout((()=>{t(n,l,null!=e?e:void 0,u,r)}),200)})(s,e.validateField),e.handleFormChange(n,l,null!=s?s:void 0,r)}})),(0,i.h)(eo,{name:l,cardInstanceId:n,subviewId:r,theme:d,isFinalCardNode:c,variableResolver:p}))))},stepper:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{defaultValue:a,minimumValue:o,maximumValue:s,stepValue:l,thumbnailSrc:d,label:c,name:u},validations:p,theme:m,isFinalCardNode:v,variableResolver:f}=e;const y=o||0,w=s||100,S=l&&l>0?l:1,C=b(a&&a>=y&&a<=w?a:y),[x,k]=h(C.current),[I,O]=h(C.current),[F,M]=h(!0),T=m.getCSSColor("icon.stepper"),j=m.getCSSColor("icon.stepperDisabled"),L=null==x||!pd(x,w,S)||!F,_=null==x||!ud(x,y,S)||!F;g((()=>{const e=ft(n,u,r);e?(C.current=e,k(e),O(e)):bt().handleFormChange(n,u,x,r)}),[]),g((()=>{const e=a&&a>=y&&a<=w?a:y;e!==C.current&&(I===C.current&&(bt().handleFormChange(n,u,e,r),k(e),O(e)),C.current=e)}),[a]);const D=f(c),A=(e,t)=>{null!==hd&&(clearTimeout(hd),hd=null),hd=setTimeout((()=>{t(n,u,null!=e?e:void 0,p,r)}),400)};return(0,i.h)($e.lj,{actions:ut,mapToProps:e=>{let{}=e}},(e=>(0,i.h)(i.Fragment,null,(0,i.h)(Yi,{nodeKey:t,mode:"inline",theme:m,isFinalCardNode:v,cursor:"default"},d&&(0,i.h)(Ki,{thumbnailUrl:f(d),theme:m}),(0,i.h)(cd,{theme:m},D),(0,i.h)(sd,{theme:m},(0,i.h)(ld,{theme:m,disabled:_,tabIndex:"0","aria-label":`Decrease value by ${S}`,class:"stepper-decrement",onClick:()=>{if(null==x||!ud(x,y,S)||!F)return;const t=((e,t,n)=>e-t<n?n:e-t)(x,S,y);O(t),k(t),e.handleFormChange(n,u,t,r),A(t,e.validateField)}},(0,i.h)(od,{fillColor:_?j:T})),(0,i.h)(dd,{type:"number",theme:m,tabIndex:"0",title:D,className:"stepper-value",onInput:t=>{const{value:a}=t.target,i=I;let o;O(a),o=Zd(a)?a.trim():i,M(((e,t,n)=>e>=t&&e<=n)(o,y,w)),O(o);const s=qd(o);k(s),e.handleFormChange(n,u,null!=s?s:void 0,r),A(s,e.validateField)},onBlur:()=>{e.validateField(n,u,x,p,r)},value:I}),(0,i.h)(ld,{theme:m,disabled:L,tabIndex:"0","aria-label":`Increase value by ${S}`,class:"stepper-increment",onClick:()=>{if(null==x||!pd(x,w,S)||!F)return;const t=((e,t,n)=>e+t>n?n:e+t)(x,S,w);O(t),k(t),e.handleFormChange(n,u,t,r),A(t,e.validateField)}},(0,i.h)(id,{fillColor:L?j:T})))),(0,i.h)(eo,{name:u,cardInstanceId:n,subviewId:r,theme:m,isFinalCardNode:v,variableResolver:f}))))},checkbox:e=>{let{nodeKey:t,children:n,cardInstanceId:r,subviewId:a,attributes:{name:o},theme:s,isFirstCardNode:l,isFinalCardNode:d,variableResolver:c}=e;return(0,i.h)(i.Fragment,null,(0,i.h)(Ad,{theme:s,isFirstCardNode:l,isFinalCardNode:d,key:t,"data-element-key":t,role:"group"},(0,i.h)(Ed,{"aria-label":"checkbox group"},n)),(0,i.h)(eo,{name:o,cardInstanceId:r,subviewId:a,theme:s,isFinalCardNode:d,variableResolver:c}))},checkboxItem:e=>{var t,n;let{nodeKey:r,cardInstanceId:a,subviewId:o,attributes:{label:s,key:l,checked:d},theme:c,variableResolver:u,parentFieldName:p,parentValidations:m}=e;const v=b(d),f=b(`${a}-${l}`),[y,w]=h(null!==(t=v.current)&&void 0!==t&&t),S=null!==(n=c.getCSSColor("icon.checkedCheckbox",{skipFallback:!0}))&&void 0!==n?n:"#FFF";let C;lc(C)||(C=c.getCSSFontProperties("primary"),parseInt(C.lineHeight)<20&&(C.lineHeight="20px"));const x=e=>{const t=ft(a,p,o)||{};return bt().handleFormChange(a,p,Object.assign(Object.assign({},t),{[l]:e}),o),Object.assign(Object.assign({},t),{[l]:e})};return g((()=>{const e=ft(a,p,o);void 0!==e&&void 0!==e[l]?(v.current=e[l],w(e[l])):x(y)}),[]),g((()=>{void 0!==d&&d!==v.current&&(y===v.current&&(w(d),x(d)),v.current=d)}),[d]),(0,i.h)("li",null,(0,i.h)(Hd,{key:r,"data-element-key":r,labelFontProperties:C,role:"checkbox","aria-labelledby":f.current,"aria-checked":y},(0,i.h)(Pd,{type:"checkbox",checked:y,theme:c,onChange:()=>{w(!y);const e=x(!y);bt().validateField(a,p,e,m,o)},"aria-hidden":"true"}),(0,i.h)(Rd,{theme:c,isChecked:y},y&&(0,i.h)(to,{fillColor:S,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},ariaHidden:!0})),(0,i.h)($d,{theme:c,id:f.current,"data-testid":"checkbox-label",labelFontProperties:C,"aria-hidden":"true"},u(s))))},switch:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{defaultValue:a,thumbnailSrc:o,label:s,name:l},theme:d,isFinalCardNode:c,variableResolver:u}=e;const p=b(a),[m,v]=h(p.current);g((()=>{const e=ft(n,l,r);void 0!==e?(p.current=e,v(e)):bt().handleFormChange(n,l,m,r)}),[]),g((()=>{a!==p.current&&(m===p.current&&(bt().handleFormChange(n,l,a,r),v(a)),p.current=a)}),[a]);const f=`switch-label-${l}`;return(0,i.h)($e.lj,{actions:ut,mapToProps:()=>{}},(e=>(0,i.h)(Yi,{nodeKey:t,mode:"inline",theme:d,isFinalCardNode:c},o&&(0,i.h)(Ki,{thumbnailUrl:u(o),theme:d}),(0,i.h)(Xi,{theme:d,name:f,mode:"inline",truncateLabel:!0},u(s)),(0,i.h)(md,{on:m,theme:d,tabIndex:"0",role:"switch","aria-checked":m,"aria-labelledby":f,className:"switch-toggle",onClick:()=>{v(!m),e.handleFormChange(n,l,!m,r)}},(0,i.h)(gd,{on:m,theme:d})))))},dropdown:po,datePicker:vo,upload:_d},zd=["linkButton","submitButton","dismissButton","snoozeButton","voteUpButton","voteDownButton"],Bd=e=>{let{node:t,cardContext:n,cardInstanceId:r,cardMetadata:a,isWorkflow:o,theme:s,runtimeVariables:l,feedOrientation:d,subviewId:c,subviewTitle:u,embedMode:p,parentNodeType:h,parentFieldName:m,parentValidations:g,index:v,localIndex:b}=e;const f=Vd[t.type];if(f){let e=0===v,y=v===n.nodeCount-(1+(n.hasButtonFinalNode?1:0));return o&&(e="form"===h&&0===b,y="form"===h&&b===n.nodeCount-(1+(n.hasButtonFinalNode?1:0))),(0,i.h)(f,Nd({},t.key&&{nodeKey:t.key},{isFirstCardNode:e,isFinalCardNode:y,cardInstanceId:r,cardMetadata:a,subviewId:c,subviewTitle:u,attributes:t.attributes,validations:t.validations,isWorkflow:o,theme:s,variableResolver:e=>ec(e,l),feedOrientation:d,embedMode:p,parentNodeType:h,parentFieldName:m,parentValidations:g,index:v,localIndex:null!=b?b:v}),t.children&&t.children.map(((e,d)=>{var h;return(0,i.h)(Bd,{cardInstanceId:r,cardMetadata:a,subviewId:c,subviewTitle:u,node:e,index:v,localIndex:d,isWorkflow:o,cardContext:n,theme:s,runtimeVariables:l,embedMode:p,parentNodeType:t.type,parentFieldName:null===(h=t.attributes)||void 0===h?void 0:h.name,parentValidations:t.validations})})))}return null},Wd={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"},Ud=/[&<>"'\/]/g,qd=e=>{if(""===e)return null;const t=Number(e);return Number.isNaN(t)?null:t},Yd=e=>{let t;return"string"!=typeof e&&"number"!=typeof e||("string"==typeof e&&(t=null!==qd(e)?qd(e):void 0),"number"==typeof e&&(t=e),void 0!==t&&(t=t>=0?Math.round(t):void 0)),t},Zd=e=>null!==qd(e)||""===e||"-"===e,Kd=e=>{let t=Array();for(var n in e){const r=e[n];t.push(r),r.children&&(t=t.concat(Kd(r.children)))}return t},Gd=e=>{const t=[],n=(e,r)=>{const a=[];for(let r=0;r<e.length;r++){var i;const o=e[r];"actionButtonGroup"!==o.type&&o.children&&(null===(i=o.children)||void 0===i?void 0:i.length)>0&&(o.children=n(o.children,o)),zd.includes(o.type)?t.push(o):a.push(o)}if("form"===(null==r?void 0:r.type)){var o;let e=!1;null===(o=r.children)||void 0===o||o.forEach((t=>{"actionButtonGroup"===t.type&&(e=!0)})),!e&&a.push({type:"actionButtonGroup",attributes:{},children:t})}return a};return n(e)},Xd=(e,t)=>{const n=e=>{for(let r in e){const a=e[r];"string"==typeof a&&(e[r]=ec(a,t)),"object"==typeof a&&n(a)}},r=e=>{const t=[];for(let i=0;i<e.length;i++){var a;const o=e[i];o.children&&(null===(a=o.children)||void 0===a?void 0:a.length)>0&&(o.children=r(o.children)),o.attributes&&n(o.attributes),t.push(o)}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=ec(a.title,t))}},Qd=e=>e?e.replace(Ud,(e=>Wd[e]||e)):"",Jd=/!\{([\w\.]+?)\}/g,ec=(e,t)=>e&&t&&"string"==typeof e?e.replace(Jd,((e,n)=>t.get(n)||"")):e||"",tc={years:J.addYears,months:J.addMonths,weeks:J.addWeeks,days:J.addDays,hours:J.addHours,minutes:J.addMinutes,seconds:J.addSeconds},nc=e=>{if("string"!=typeof e)return null;const t=e.match(ue);if(t){const[,,e,n,r,a,i,o,s]=t.map((e=>void 0!==e?Number(e):void 0));return{years:e,months:n,weeks:r,days:a,hours:i,minutes:o,seconds:s}}return null},rc=(e,t)=>{const n=nc(e);return n?Object.entries(tc).reduce(((e,t)=>{let[r,a]=t;const i=n[r];return i?a(e,i):e}),t):t},ac=e=>!!e.match(/^[\w-]+\.[\w-]+\.[\w-]*$/),ic=e=>{const t=de().getState().application.embedMode;return(null==e?void 0:e.enabled)&&"standalone"===t?"horizontal":"vertical"},oc=()=>{const e=sessionStorage.getItem(ve),t=e?JSON.parse(e):void 0;return new Set(t)},sc=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),lc=e=>e&&sc(e)&&0===Object.keys(e).length,dc=(e,t)=>e.length===t.length&&(e.sort(),t.sort(),e.every(((e,n)=>e===t[n])));const cc="stream",uc="single",pc="launcher",hc="horizontal",mc="modal",gc=(e,t)=>{if(!e)return null;let n;try{n=(e=>{if(!ac(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")}})(e)}catch(e){return null}if(t)return n[t]&&["number","string"].includes(typeof n[t])?String(n[t]):null;const r=["atomic_sub","atomic_id","sub","id"];for(const e of r)if(n[e]&&["number","string"].includes(typeof n[e]))return String(n[e]);return null};const vc=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 bc=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};function fc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const yc={noInternet:"AACNoInternetError",missingApiHost:"AACMissingApiHostError",apiError:"AACApiError",invalidParameters:"AACInvalidParametersError",notPermitted:"AACOperationNotPermittedError",authTokenError:"AACAuthTokenError"},wc="Device is not connected to the internet",Sc="API host was not specified for the request.",Cc="An API error occurred.",xc="Failed to retrieve an authentication token for request.",kc={method:"GET",mode:"cors"},Ic=e=>bc(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}})),Oc=e=>e<400,Fc=(e,t,n,r,a)=>{var i,o;const s=null!==(i=gc(n,a))&&void 0!==i?i:void 0;vc("request-failed",{request:{path:e,statusCode:t,streamContainerId:"string"==typeof(null==r?void 0:r.streamContainerId)?null==r?void 0:r.streamContainerId:void 0,streamContainerIds:null==r||null===(o=r.streamContainerIds)||void 0===o?void 0:o.filter((e=>"string"==typeof e)),cardInstanceId:"string"==typeof(null==r?void 0:r.cardInstanceId)?null==r?void 0:r.cardInstanceId:void 0,endUserId:s}})};class Mc{static initialise(e,t,n){this.apiHost=e,this.apiKey=t,this.environmentId=n,this.instanceId=(0,X.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 setTokenUserIdAttribute(e){this.tokenUserIdAttribute=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 bc(this,void 0,void 0,(function*(){let a,i;if(this.verifyInitialised(),!navigator.onLine){const e=new Error(wc);return e.name=yc.noInternet,{response:{error:e}}}{const o=Lc(this.apiHost,e,this.environmentId);if(!o){const e=new Error(Sc);return e.name=yc.missingApiHost,{response:{error:e}}}let s;if(t)try{s=yield t.requestToken()}catch(e){const t=new Error(`${xc} ${e}`);return t.name=yc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},kc),{headers:Tc({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,lastModified:n,testHost:this.testHost,clientAppVersion:this.clientAppVersion})});try{const t=yield fetch(o,l);i=t.status;const n=yield Ic(t);if(n.json&&(a=n.json),!Oc(t.status))throw Fc(e,i,s,r,this.tokenUserIdAttribute),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(`${Cc} ${e}`);return t.name=yc.apiError,{data:a,response:{status:i,error:t}}}}}))}static post(e,t,n,r){return bc(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(wc);return e.name=yc.noInternet,{response:{error:e}}}{let a,i;const o=Lc(this.apiHost,e,this.environmentId);if(!o){const e=new Error(Sc);return e.name=yc.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${xc} ${e}`);return t.name=yc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},kc),{method:"POST",headers:Tc({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(o,l);i=t.status;const n=yield Ic(t);if(n.json&&(a=n.json),!Oc(t.status))throw Fc(e,i,s,r,this.tokenUserIdAttribute),new Error(`POST request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${Cc} ${e}`);return t.name=yc.apiError,{data:a,response:{status:i,error:t}}}}}))}static put(e,t,n,r){return bc(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(wc);return e.name=yc.noInternet,{response:{error:e}}}{let a,i;const o=Lc(this.apiHost,e,this.environmentId);if(!o){const e=new Error(Sc);return e.name=yc.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${xc} ${e}`);return t.name=yc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},kc),{method:"PUT",headers:Tc({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(o,l);i=t.status;const n=yield Ic(t);if(n.json&&(a=n.json),!Oc(t.status))throw Fc(e,i,s,r,this.tokenUserIdAttribute),new Error(`PUT request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${Cc} ${e}`);return t.name=yc.apiError,{data:a,response:{status:i,error:t}}}}}))}static delete(e,t,n,r){return bc(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(wc);return e.name=yc.noInternet,{response:{error:e}}}{let a,i;const o=Lc(this.apiHost,e,this.environmentId);if(!o){const e=new Error(Sc);return e.name=yc.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${xc} ${e}`);return t.name=yc.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},kc),{method:"DELETE",headers:Tc({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(o,l);i=t.status;const n=yield Ic(t);if(n.json&&(a=n.json),!Oc(t.status))throw Fc(e,i,s,r,this.tokenUserIdAttribute),new Error(`DELETE request failed with status code ${t.status}.`);return{data:a,response:{status:t.status}}}catch(e){const t=new Error(`${Cc} ${e}`);return t.name=yc.apiError,{data:a,response:{status:i,error:t}}}}}))}}fc(Mc,"apiHost","https://client-api.atomic.io"),fc(Mc,"apiKey",void 0),fc(Mc,"environmentId",void 0),fc(Mc,"instanceId",void 0),fc(Mc,"testHost",void 0),fc(Mc,"clientAppVersion","unknown"),fc(Mc,"tokenUserIdAttribute",void 0);const Tc=e=>jc("header",Object.assign({},e)),jc=(e,t)=>{const n="header"===e;let r={"x-atomic-sdk-platform":"Web","x-atomic-sdk-version":"25.4.2","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},Lc=(e,t,n)=>{if(!e||0==e.trim().length)return null;return`${e.endsWith("/")?e:`${e}/`}${n&&n.trim().length>0?`${n}/`:""}${t}`};var _c=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};const Dc=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,J.format)(t,e.defaultFormatterOption||"");default:return String(e.defaultValue)}},Ac=(e,t,n,r,a,i,o)=>_c(void 0,void 0,void 0,(function*(){const s=`feed/${e}${o?"?filters="+JSON.stringify(o):""}`,l=yield Mc.get(s,t,r||"",{streamContainerId:e});if(304===l.response.status)return ne.debug({level1:["Feed unchanged response received by HTTP"]}),{};if(200===l.response.status){ne.debug({level1:["Feed update received by HTTP"]});let e=l.data.cardInstances,t=l.data.metadata;const r=e.length;i&&e.length>i&&(e=e.slice(0,i));const o=yield Rc(e,n,a);return{lastModified:l.response.etag,cardInstances:e,metadata:t,unfilteredCardInstanceCount:r,runtimeVariables:o}}return{error:l.response.error}})),Ec=(e,t,n,r)=>_c(void 0,void 0,void 0,(function*(){const a=yield Mc.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}})),Hc=(e,t,n)=>_c(void 0,void 0,void 0,(function*(){const r=yield Mc.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}})),Pc=(e,t,n,r)=>_c(void 0,void 0,void 0,(function*(){const a=yield Mc.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}})),Rc=(e,t,n)=>_c(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,Dc(e)])))}}));if(r.length){let e=r;if(n){let a=!1;const i=new Promise((e=>{setTimeout((()=>{a||(console.error(`Resolution of runtime variables exceeded the timeout (${t}ms). Falling back to default values.`),e(r))}),t)})),o=r.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:new Map(e.runtimeVariables)})));e=yield Promise.race([i,n(o).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{}})),$c="AtomicStreamContainersTutorialSeen";class Nc{static setCardListTutorialSeen(e){const t=this.containersCardListTutorialSeenIn();t.includes(e)||(t.push(e),localStorage.setItem($c,t.join(",")))}static hasCardListTutorialBeenSeen(e){return this.containersCardListTutorialSeenIn().includes(e)}static containersCardListTutorialSeenIn(){const e=localStorage.getItem($c);return e?e.split(","):[]}}var Vc,zc,Bc=function(e,t,n,r){return new(n||(n=Promise))((function(a,i){function o(e){try{l(r.next(e))}catch(e){i(e)}}function s(e){try{l(r.throw(e))}catch(e){i(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(o,s)}l((r=r.apply(e,t||[])).next())}))};function Wc(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const Uc=120,qc=null===(Vc=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===Vc||null===(zc=Vc.dataset)||void 0===zc?void 0:zc.config,Yc=qc?JSON.parse(qc):void 0,Zc="onpageshow"in window;class Kc{constructor(){Wc(this,"domListener",void 0),Wc(this,"resizeObserver",void 0),Wc(this,"messageReceivedCallback",void 0),Wc(this,"requestFailedCallback",void 0),Wc(this,"resizedCallback",void 0),Wc(this,"outsideClickCallback",void 0),Wc(this,"keyDownCallback",void 0),Wc(this,"containersBroadcastChannel",void 0),Wc(this,"variableResolutionRequests",{}),Wc(this,"authTokenRequests",{}),Wc(this,"lastVariableResolutionRequestId",1),Wc(this,"streamContainerId",void 0),Wc(this,"feedSubscriptionId",void 0),Wc(this,"containerInstanceId",void 0),Wc(this,"applicationRef",K.createRef()),Wc(this,"subscriptionRetryCount",0),Wc(this,"subscriptionRetryLimit",3)}startCardFeed(e){var t;if(!e.apiHost||!e.apiKey||!e.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.");window.AtomicUploadService||(window.AtomicUploadService=window.parent.AtomicUploadService),ne.logLevel=e.logLevel||te.DISABLED,this.containerInstanceId=e.instanceId,Mc.initialise(e.apiHost,e.apiKey,e.environmentId);const{testHost:n,clientAppVersion:r,tokenUserIdAttribute:a}=e;n&&Mc.setTestHostHeader(n),r&&Mc.setClientAppVersion(r),a&&Mc.setTokenUserIdAttribute(a),this.messageReceivedCallback=this.onMessageReceived.bind(this),this.requestFailedCallback=this.onRequestFailed.bind(this);const o=()=>{this.destroy.bind(this)(),window.removeEventListener("pagehide",o),this.containerInstanceId&&(window.AtomicUploadService.cancelUploadsForContainer(this.containerInstanceId),window.AtomicUploadService.removeFilesForContainer(this.containerInstanceId))},s=()=>{this.initialiseIframeBroadcastChannel(),window.addEventListener("message",this.messageReceivedCallback),window.addEventListener("request-failed",this.requestFailedCallback),window.addEventListener("pagehide",o)};if(Zc?window.addEventListener("pageshow",s):s(),"launcher"===e.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("mousedown",this.outsideClickCallback),this.keyDownCallback=this.keyDownHandler.bind(this),document.addEventListener("keydown",this.keyDownCallback)};Zc?window.addEventListener("pageshow",e):e()}if(("single-card"===e.embedMode||"standalone"===e.embedMode&&!0===e.autosizeFrame)&&(this.domListener=new MutationObserver((()=>{var t,n;this.autoResizingFrameHandler(e.embedMode,null!==(t=e.horizontalContainerConfig)&&void 0!==t?t:null===(n=e.features)||void 0===n?void 0:n.horizontalContainerConfig)})),document.fonts.onloadingdone=()=>{var t,n;ne.debug({level3:["Font loading completed, resizing frame"]}),this.autoResizingFrameHandler(e.embedMode,null!==(t=e.horizontalContainerConfig)&&void 0!==t?t:null===(n=e.features)||void 0===n?void 0:n.horizontalContainerConfig)},"ResizeObserver"in window)){const t=window.parent.document;t&&(this.resizeObserver=new ResizeObserver((()=>{var t,n;this.autoResizingFrameHandler(e.embedMode,null!==(t=e.horizontalContainerConfig)&&void 0!==t?t:null===(n=e.features)||void 0===n?void 0:n.horizontalContainerConfig)})),this.resizeObserver.observe(t.body))}"modal-subview"===e.embedMode&&(this.domListener=new MutationObserver((()=>{this.modalViewResizeHandler()}))),"toast"===e.embedMode&&(this.domListener=new MutationObserver((()=>{this.toastViewResizeHandler()}))),(null===(t=e.enabledUiElements)||void 0===t?void 0:t.customContainerHeader)&&(e.enabledUiElements.customContainerHeader.headerElement=decodeURI(e.enabledUiElements.customContainerHeader.headerElement)),this.domListener&&this.domListener.observe(document.body,{attributes:!0,childList:!0,characterData:!0,subtree:!0});const l=le(Object.assign(Object.assign({},e),{cardListTutorialSeen:!e.streamContainerId||Nc.hasCardListTutorialBeenSeen(e.streamContainerId)}),[(()=>e=>e=>t=>{const n=e(t);return this.synchroniseStores(),n})()]);this.streamContainerId=e.streamContainerId,(0,i.render)((0,i.h)(fs,{ref:this.applicationRef,store:l,embedMode:e.embedMode,applyCardFeedDeltaUpdates:this.applyCardFeedDeltaUpdates.bind(this),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),onModalStreamToggled:this.onModalStreamToggled.bind(this),requestWebSocketReconnect:this.requestWebSocketReconnect.bind(this),webSocketDisabled:e.webSocketDisabled}),document.body)}synchroniseStores(){if(this.containersBroadcastChannel){let e=Object.assign({},de().getState());this.containersBroadcastChannel.postMessage({type:ss.STATE,state:e,instanceId:this.containerInstanceId})}else ne.error({level1:["BroadcastChannel API unavailable"]})}sendMessageToParent(e,t){const n=window.parent;n&&n.postMessage(Object.assign({action:e},t),de().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 Bc(this,void 0,void 0,(function*(){const n=de().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,i=yield Rc(t,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this)),o={cardInstances:t,unfilteredCardInstanceCount:t.length,runtimeVariables:i,metadata:{totalCards:a}};e.cardFeedLoaded(o),this.cardCountChanged(o.cardInstances.length,o.metadata.totalCards)}a.length&&(Object.values(n.cardStates).length?e.queueCardFeedDeltaUpdate(a):yield this.applyCardFeedDeltaUpdates(e,a))}))}applyCardFeedDeltaUpdates(e,t){return Bc(this,void 0,void 0,(function*(){const n=de().getState();e.clearCardFeedDeltaUpdateQueue(),yield e.applyCardFeedDeltaUpdate(t,(t=>Bc(this,void 0,void 0,(function*(){if(t){const t=yield(r=n.application.streamContainerId,a={requestToken:()=>Bc(this,void 0,void 0,(function*(){return yield this.onAuthTokenRequested()}))},_c(void 0,void 0,void 0,(function*(){const e=yield Mc.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)ne.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}))),(e=>Bc(this,void 0,void 0,(function*(){return yield Rc(e,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this))}))))}))}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&&Nc.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,X.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(ja);return e?Array.from(e.children).reduce(((e,t)=>{const n=t;if(-1!==n.className.indexOf("use-offset")){const t=window.getComputedStyle(n),r=(null==t?void 0:t.paddingTop)?parseFloat(t.paddingTop):0,a=(null==t?void 0:t.paddingBottom)?parseFloat(t.paddingBottom):0;return e+Array.from(n.querySelectorAll(".offset-child")).reduce(((e,t)=>e+t.offsetHeight),0)+r+a}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(ca);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-Uc?window.innerHeight-Uc:t,r=60>window.innerHeight-Uc?window.innerHeight-Uc: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 i=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=de().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=i,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 i=null==n||null===(t=n.dataset)||void 0===t?void 0:t.contentlabel;i&&e.setAttribute("title",i),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){Dr(e.key)===Lr&&this.closeLauncher()}onModalStreamToggled(e){this.sendMessageToParent("io.atomic.events.didUpdateModalStreamVisibility",{visible:e}),window.postMessage({action:"updateAppOpen",values:{open:e}},de().getState().application.windowOrigin||"")}closeLauncher(){window.postMessage({action:"updateAppOpen",values:{open:!1}},de().getState().application.windowOrigin||"")}sendAnalyticsEvent(e){var t=arguments;return Bc(this,void 0,void 0,(function*(){var n;let r=t.length>1&&void 0!==t[1]&&t[1];this.checkWebSocketConnection();const a=de().getState(),i=a.cardFeed.cardInstances||[],o=i.filter((t=>t.instance.id===e.cardInstanceId)),s=o.length?o[0]:null,l=s?i.indexOf(s)+1:0;let d,c;switch(a.application.embedMode){case"standalone":d=(null===(n=a.cardFeed.horizontalContainerConfig)||void 0===n?void 0:n.enabled)?hc:cc;break;case"launcher":d=pc;break;case"single-card":d=uc;break;case"modal-stream":d=mc;break;default:d=void 0}try{c=yield this.onAuthTokenRequested()}catch(e){ne.error({level1:["Error requesting auth token to send analytics event"],level2:[e]})}const u=gc(c,Mc.tokenUserIdAttribute);if(!u)return ne.error({level1:["No user ID found in auth token for analytics event: ",e.eventName]});const p=Object.assign(Object.assign({},e),{endUserId:u,cardInstanceStatus:s?s.instance.status:"",containerId:a.application.streamContainerId,timestamp:new Date,streamCardPosition:l,streamLength:a.cardFeed.unfilteredCardInstanceCount,streamLengthVisible:i.length,displayMode:d});this.sendMessageToParent("io.atomic.events.analyticsEventReceived",{event:p,sdkOnlyEvent:r})}))}dispatchCardEvent(e){this.sendMessageToParent("io.atomic.events.cardEventReceived",{event:e,streamContainerId:this.streamContainerId})}onMessageReceived(e){return Bc(this,void 0,void 0,(function*(){var t,n;const r=de().getState(),a=r.application.windowOrigin;if(i=a||"",o=e.origin,"*"===i||i===o){const i=(0,G.kv)((0,G.Y2)(tn,Q),de());switch(e.data.action){case"didResolveRuntimeVariables":this.variableResolutionRequests[e.data.values.requestId](e.data.values.cards);break;case"io.atomic.events.requestRuntimeVariables":const o=yield Rc(r.cardFeed.cardInstances,r.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this));i.runtimeVariablesResolved(o);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 d=e.data.values.cardFeedUpdates;this.cardFeedUpdated(i,d);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":i.cardFeedLoaded({error:e.data.values});break;case"io.atomic.events.streamFilterApplied":i.setStreamFilter(e.data.values.filter);break;case"io.atomic.events.logLevelUpdate":ne.logLevel=e.data.values.logLevel;break;case"io.atomic.events.sdkLogout":this.onLogout()}}var i,o}))}onRequestFailed(e){vc("request-failed",e.detail,window.parent)}onUpdateAppOpen(e){this.checkWebSocketConnection(),rn().updateAppOpen(e.data.values.open)}initialiseIframeBroadcastChannel(){var e;(null===(e=this.containersBroadcastChannel)||void 0===e?void 0:e.isOpen)||(this.containersBroadcastChannel=new ls,this.containersBroadcastChannel.addEventListener("message",this.onBroadcastChannelMessageReceived.bind(this)))}onBroadcastChannelMessageReceived(e){if(e.data.type!==ss.STATE)return;const t=de().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&&de().setState(n))}onLogout(){var e;Mc.reset(),window.removeEventListener("request-failed",this.requestFailedCallback),rn().userLoggedOut(),this.cardCountChanged(0,0),null===(e=this.applicationRef.current)||void 0===e||e.cancelCardListPolling()}destroy(){var e;window.removeEventListener("resize",this.resizedCallback),window.removeEventListener("message",this.messageReceivedCallback),window.removeEventListener("request-failed",this.requestFailedCallback),document.removeEventListener("mousedown",this.outsideClickCallback),document.removeEventListener("keydown",this.keyDownCallback),null===(e=this.resizeObserver)||void 0===e||e.disconnect()}}if(Yc)try{(new Kc).startCardFeed(Yc)}catch(Qc){console.error("Could not initialize IframeManager",Qc)}else console.error("Error starting stream container, invalid config supplied")})(),r=r.default})()));
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"),i=Array.prototype;null==i[r]&&n(7728)(i,r,{}),e.exports=function(e){i[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),i=n(875),o=n(2337);e.exports=function(e){return function(t,n,a){var s,l=r(t),d=i(l.length),c=o(a,d);if(e&&n!=n){for(;d>c;)if((s=l[c++])!=s)return!0}else for(;d>c;c++)if((e||c in l)&&l[c]===n)return e||c||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,i){return e.call(t,n,r,i)}}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),i=n(3816).document,o=r(i)&&r(i.createElement);e.exports=function(e){return o?i.createElement(e):{}}},4430:e=>{e.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},2985:(e,t,n)=>{var r=n(3816),i=n(5645),o=n(7728),a=n(3415),s=n(741),l="prototype",d=function(e,t,n){var c,u,p,h,m=e&d.F,g=e&d.G,f=e&d.S,v=e&d.P,b=e&d.B,S=g?r:f?r[t]||(r[t]={}):(r[t]||{})[l],y=g?i:i[t]||(i[t]={}),w=y[l]||(y[l]={});for(c in g&&(n=t),n)p=((u=!m&&S&&void 0!==S[c])?S:n)[c],h=b&&u?s(p,r):v&&"function"==typeof p?s(Function.call,p):p,S&&a(S,c,p,e&d.U),y[c]!=p&&o(y,c,h),v&&w[c]!=p&&(w[c]=p)};r.core=i,d.F=1,d.G=2,d.S=4,d.P=8,d.B=16,d.W=32,d.U=64,d.R=128,e.exports=d},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),i=n(681);e.exports=n(7057)?function(e,t,n){return r.f(e,t,i(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),i=n(681),o=n(2943),a={};n(7728)(a,n(6314)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=r(a,{next:i(1,n)}),o(e,t+" Iterator")}},2923:(e,t,n)=>{"use strict";var r=n(4461),i=n(2985),o=n(3415),a=n(7728),s=n(7234),l=n(9988),d=n(2943),c=n(468),u=n(6314)("iterator"),p=!([].keys&&"next"in[].keys()),h="keys",m="values",g=function(){return this};e.exports=function(e,t,n,f,v,b,S){l(n,t,f);var y,w,x,k=function(e){if(!p&&e in I)return I[e];switch(e){case h:case m:return function(){return new n(this,e)}}return function(){return new n(this,e)}},C=t+" Iterator",O=v==m,M=!1,I=e.prototype,N=I[u]||I["@@iterator"]||v&&I[v],F=N||k(v),L=v?O?k("entries"):F:void 0,T="Array"==t&&I.entries||N;if(T&&(x=c(T.call(new e)))!==Object.prototype&&x.next&&(d(x,C,!0),r||"function"==typeof x[u]||a(x,u,g)),O&&N&&N.name!==m&&(M=!0,F=function(){return N.call(this)}),r&&!S||!p&&!M&&I[u]||a(I,u,F),s[t]=F,s[C]=g,v)if(y={values:O?F:k(m),keys:b?F:k(h),entries:L},S)for(w in y)w in I||o(I,w,y[w]);else i(i.P+i.F*(p||M),t,y);return y}},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),i=n(5588),o=n(4430),a=n(9335)("IE_PROTO"),s=function(){},l="prototype",d=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(),d=e.F;r--;)delete d[l][o[r]];return d()};e.exports=Object.create||function(e,t){var n;return null!==e?(s[l]=r(e),n=new s,s[l]=null,n[a]=e):n=d(),void 0===t?n:i(n,t)}},9275:(e,t,n)=>{var r=n(7007),i=n(1734),o=n(1689),a=Object.defineProperty;t.f=n(7057)?Object.defineProperty:function(e,t,n){if(r(e),t=o(t,!0),r(n),i)try{return a(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),i=n(7007),o=n(7184);e.exports=n(7057)?Object.defineProperties:function(e,t){i(e);for(var n,a=o(t),s=a.length,l=0;s>l;)r.f(e,n=a[l++],t[n]);return e}},468:(e,t,n)=>{var r=n(9181),i=n(508),o=n(9335)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=i(e),r(e,o)?e[o]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},189:(e,t,n)=>{var r=n(9181),i=n(2110),o=n(9315)(!1),a=n(9335)("IE_PROTO");e.exports=function(e,t){var n,s=i(e),l=0,d=[];for(n in s)n!=a&&r(s,n)&&d.push(n);for(;t.length>l;)r(s,n=t[l++])&&(~o(d,n)||d.push(n));return d}},7184:(e,t,n)=>{var r=n(189),i=n(4430);e.exports=Object.keys||function(e){return r(e,i)}},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),i=n(7728),o=n(9181),a=n(3953)("src"),s=n(18),l="toString",d=(""+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")||i(n,"name",t)),e[t]!==n&&(l&&(o(n,a)||i(n,a,e[t]?""+e[t]:d.join(String(t)))),e===r?e[t]=n:s?e[t]?e[t]=n:i(e,t,n):(delete e[t],i(e,t,n)))})(Function.prototype,l,(function(){return"function"==typeof this&&this[a]||s.call(this)}))},2943:(e,t,n)=>{var r=n(9275).f,i=n(9181),o=n(6314)("toStringTag");e.exports=function(e,t,n){e&&!i(e=n?e:e.prototype,o)&&r(e,o,{configurable:!0,value:t})}},9335:(e,t,n)=>{var r=n(3825)("keys"),i=n(3953);e.exports=function(e){return r[e]||(r[e]=i(e))}},3825:(e,t,n)=>{var r=n(5645),i=n(3816),o="__core-js_shared__",a=i[o]||(i[o]={});(e.exports=function(e,t){return a[e]||(a[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),i=Math.max,o=Math.min;e.exports=function(e,t){return(e=r(e))<0?i(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),i=n(1355);e.exports=function(e){return r(i(e))}},875:(e,t,n)=>{var r=n(1467),i=Math.min;e.exports=function(e){return e>0?i(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,i;if(t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;if("function"==typeof(n=e.valueOf)&&!r(i=n.call(e)))return i;if(!t&&"function"==typeof(n=e.toString)&&!r(i=n.call(e)))return i;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"),i=n(3953),o=n(3816).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},6997:(e,t,n)=>{"use strict";var r=n(7722),i=n(5436),o=n(7234),a=n(2110);e.exports=n(2923)(Array,"Array",(function(e,t){this._t=a(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,i(1)):i(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),i=n(7184),o=n(3415),a=n(3816),s=n(7728),l=n(7234),d=n(6314),c=d("iterator"),u=d("toStringTag"),p=l.Array,h={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=i(h),g=0;g<m.length;g++){var f,v=m[g],b=h[v],S=a[v],y=S&&S.prototype;if(y&&(y[c]||s(y,c,p),y[u]||s(y,u,v),l[v]=p,b))for(f in r)y[f]||o(y,f,r[f],!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),i=Number(t);return n.setDate(n.getDate()+i),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),i=n(1138);e.exports=function(e,t){var n=Number(t);return i(e,r(e)+n)}},2951:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),i=Number(t);return new Date(n+i)}},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),i=n(2807);e.exports=function(e,t){var n=r(e),o=Number(t),a=n.getMonth()+o,s=new Date(0);s.setFullYear(n.getFullYear(),a,1),s.setHours(0,0,0,0);var l=i(s);return n.setMonth(a,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,i){var o=r(e).getTime(),a=r(t).getTime(),s=r(n).getTime(),l=r(i).getTime();if(o>a||s>l)throw new Error("The start of the range cannot be after the end of the range");return o<l&&s<a}},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,i,o=r(e).getTime();return t.forEach((function(e,t){var a=r(e),s=Math.abs(o-a.getTime());(void 0===n||s<i)&&(n=t,i=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,i,o=r(e).getTime();return t.forEach((function(e){var t=r(e),a=Math.abs(o-t.getTime());(void 0===n||a<i)&&(n=t,i=a)})),n}},3374:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),i=r(t).getTime();return n<i?-1:n>i?1:0}},3558:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e).getTime(),i=r(t).getTime();return n>i?-1:n<i?1:0}},6656:(e,t,n)=>{var r=n(6579);e.exports=function(e,t){var n=r(e),i=r(t),o=n.getTime()-6e4*n.getTimezoneOffset(),a=i.getTime()-6e4*i.getTimezoneOffset();return Math.round((o-a)/864e5)}},6554:(e,t,n)=>{var r=n(1971);e.exports=function(e,t){var n=r(e),i=r(t),o=n.getTime()-6e4*n.getTimezoneOffset(),a=i.getTime()-6e4*i.getTimezoneOffset();return Math.round((o-a)/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),i=r(t);return 12*(n.getFullYear()-i.getFullYear())+(n.getMonth()-i.getMonth())}},9729:(e,t,n)=>{var r=n(21),i=n(1884);e.exports=function(e,t){var n=i(e),o=i(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 i=r(e,n),o=r(t,n),a=i.getTime()-6e4*i.getTimezoneOffset(),s=o.getTime()-6e4*o.getTimezoneOffset();return Math.round((a-s)/6048e5)}},8509:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=r(t);return n.getFullYear()-i.getFullYear()}},6056:(e,t,n)=>{var r=n(1884),i=n(6656),o=n(3374);e.exports=function(e,t){var n=r(e),a=r(t),s=o(n,a),l=Math.abs(i(n,a));return n.setDate(n.getDate()-s*l),s*(l-(o(n,a)===-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),i=n(7051),o=n(3374),a=n(9883);e.exports=function(e,t){var n=r(e),s=r(t),l=o(n,s),d=Math.abs(i(n,s));return n=a(n,l*d),l*(d-(o(n,s)===-l))}},8081:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=r(t);return n.getTime()-i.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),i=n(1924),o=n(3374);e.exports=function(e,t){var n=r(e),a=r(t),s=o(n,a),l=Math.abs(i(n,a));return n.setMonth(n.getMonth()-s*l),s*(l-(o(n,a)===-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),i=n(8509),o=n(3374);e.exports=function(e,t){var n=r(e),a=r(t),s=o(n,a),l=Math.abs(i(n,a));return n.setFullYear(n.getFullYear()-s*l),s*(l-(o(n,a)===-s))}},3332:(e,t,n)=>{var r=n(3558),i=n(1884),o=n(7977),a=n(1387),s=n(7479),l=43200;e.exports=function(e,t,n){var d=n||{},c=r(e,t),u=d.locale,p=s.distanceInWords.localize;u&&u.distanceInWords&&u.distanceInWords.localize&&(p=u.distanceInWords.localize);var h,m,g={addSuffix:Boolean(d.addSuffix),comparison:c};c>0?(h=i(e),m=i(t)):(h=i(t),m=i(e));var f,v=o(m,h),b=m.getTimezoneOffset()-h.getTimezoneOffset(),S=Math.round(v/60)-b;if(S<2)return d.includeSeconds?v<5?p("lessThanXSeconds",5,g):v<10?p("lessThanXSeconds",10,g):v<20?p("lessThanXSeconds",20,g):v<40?p("halfAMinute",null,g):p(v<60?"lessThanXMinutes":"xMinutes",1,g):0===S?p("lessThanXMinutes",1,g):p("xMinutes",S,g);if(S<45)return p("xMinutes",S,g);if(S<90)return p("aboutXHours",1,g);if(S<1440)return p("aboutXHours",Math.round(S/60),g);if(S<2520)return p("xDays",1,g);if(S<l)return p("xDays",Math.round(S/1440),g);if(S<86400)return p("aboutXMonths",f=Math.round(S/l),g);if((f=a(m,h))<12)return p("xMonths",Math.round(S/l),g);var y=f%12,w=Math.floor(f/12);return y<3?p("aboutXYears",w,g):y<9?p("overXYears",w,g):p("almostXYears",w+1,g)}},7666:(e,t,n)=>{var r=n(3558),i=n(1884),o=n(7977),a=n(7479),s=525600;e.exports=function(e,t,n){var l=n||{},d=r(e,t),c=l.locale,u=a.distanceInWords.localize;c&&c.distanceInWords&&c.distanceInWords.localize&&(u=c.distanceInWords.localize);var p,h,m,g={addSuffix:Boolean(l.addSuffix),comparison:d};d>0?(p=i(e),h=i(t)):(p=i(t),h=i(e));var f=Math[l.partialMethod?String(l.partialMethod):"floor"],v=o(h,p),b=h.getTimezoneOffset()-p.getTimezoneOffset(),S=f(v/60)-b;if("s"===(m=l.unit?String(l.unit):S<1?"s":S<60?"m":S<1440?"h":S<43200?"d":S<s?"M":"Y"))return u("xSeconds",v,g);if("m"===m)return u("xMinutes",S,g);if("h"===m)return u("xHours",f(S/60),g);if("d"===m)return u("xDays",f(S/1440),g);if("M"===m)return u("xMonths",f(S/43200),g);if("Y"===m)return u("xYears",f(S/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 i=r(e),o=void 0!==n?n:1,a=r(t).getTime();if(i.getTime()>a)throw new Error("The first date cannot be after the second date");var s=[],l=i;for(l.setHours(0,0,0,0);l.getTime()<=a;)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),i=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=i(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(),i=n-n%3+3;return t.setMonth(i,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(),i=new Date(0);return i.setFullYear(t,n,r+1),i.setHours(23,59,59,999),i}},1322:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,i=r(e),o=i.getDay(),a=6+(o<n?-7:0)-(o-n);return i.setDate(i.getDate()+a),i.setHours(23,59,59,999),i}},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(),i=new Date(0);return i.setFullYear(t,n,r-1),i.setHours(23,59,59,999),i}},5616:(e,t,n)=>{var r=n(8612),i=n(6563),o=n(2385),a=n(1884),s=n(623),l=n(7479);var d={M:function(e){return e.getMonth()+1},MM:function(e){return p(e.getMonth()+1,2)},Q:function(e){return Math.ceil((e.getMonth()+1)/3)},D:function(e){return e.getDate()},DD:function(e){return p(e.getDate(),2)},DDD:function(e){return r(e)},DDDD:function(e){return p(r(e),3)},d:function(e){return e.getDay()},E:function(e){return e.getDay()||7},W:function(e){return i(e)},WW:function(e){return p(i(e),2)},YY:function(e){return p(e.getFullYear(),4).substr(2)},YYYY:function(e){return p(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 p(e.getHours(),2)},h:function(e){var t=e.getHours();return 0===t?12:t>12?t%12:t},hh:function(e){return p(d.h(e),2)},m:function(e){return e.getMinutes()},mm:function(e){return p(e.getMinutes(),2)},s:function(e){return e.getSeconds()},ss:function(e){return p(e.getSeconds(),2)},S:function(e){return Math.floor(e.getMilliseconds()/100)},SS:function(e){return p(Math.floor(e.getMilliseconds()/10),2)},SSS:function(e){return p(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 c(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),i=r%60;return n+p(Math.floor(r/60),2)+t+p(i,2)}function p(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",i=(n||{}).locale,o=l.format.formatters,u=l.format.formattingTokensRegExp;i&&i.format&&i.format.formatters&&(o=i.format.formatters,i.format.formattingTokensRegExp&&(u=i.format.formattingTokensRegExp));var p=a(e);return s(p)?function(e,t,n){var r,i,o=e.match(n),a=o.length;for(r=0;r<a;r++)i=t[o[r]]||d[o[r]],o[r]=i||c(o[r]);return function(e){for(var t="",n=0;n<a;n++)o[n]instanceof Function?t+=o[n](e,d):t+=o[n];return t}}(r,o,u)(p):"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),i=n(9834),o=n(6656);e.exports=function(e){var t=r(e);return o(t,i(t))+1}},2807:(e,t,n)=>{var r=n(1884);e.exports=function(e){var t=r(e),n=t.getFullYear(),i=t.getMonth(),o=new Date(0);return o.setFullYear(n,i+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),i=n(1971),o=n(3892);e.exports=function(e){var t=r(e),n=i(t).getTime()-o(t).getTime();return Math.round(n/6048e5)+1}},7098:(e,t,n)=>{var r=n(3892),i=n(5932);e.exports=function(e){var t=r(e),n=r(i(t,60)).valueOf()-t.valueOf();return Math.round(n/6048e5)}},2385:(e,t,n)=>{var r=n(1884),i=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 a=i(o),s=new Date(0);s.setFullYear(n,0,4),s.setHours(0,0,0,0);var l=i(s);return t.getTime()>=a.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,i){var o=r(e).getTime(),a=r(t).getTime(),s=r(n).getTime(),l=r(i).getTime();if(o>a||s>l)throw new Error("The start of the range cannot be after the end of the range");if(!(o<l&&s<a))return 0;var d=(l>a?a:l)-(s<o?o:s);return Math.ceil(d/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),i=r(t);return n.getTime()>i.getTime()}},7754:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=r(t);return n.getTime()<i.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),i=r(t);return n.getTime()===i.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),i=n(549),o=n(9356);e.exports=function(e){var t=r(e);return i(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),i=r(t);return n.getTime()===i.getTime()}},3344:(e,t,n)=>{var r=n(555);e.exports=function(e,t){var n=r(e),i=r(t);return n.getTime()===i.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),i=r(t);return n.getTime()===i.getTime()}},4465:(e,t,n)=>{var r=n(5580);e.exports=function(e,t){var n=r(e),i=r(t);return n.getTime()===i.getTime()}},248:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=r(t);return n.getFullYear()===i.getFullYear()&&n.getMonth()===i.getMonth()}},5347:(e,t,n)=>{var r=n(9309);e.exports=function(e,t){var n=r(e),i=r(t);return n.getTime()===i.getTime()}},1742:(e,t,n)=>{var r=n(9966);e.exports=function(e,t){var n=r(e),i=r(t);return n.getTime()===i.getTime()}},4868:(e,t,n)=>{var r=n(5344);e.exports=function(e,t,n){var i=r(e,n),o=r(t,n);return i.getTime()===o.getTime()}},2130:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=r(t);return n.getFullYear()===i.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 i=r(e).getTime(),o=r(t).getTime(),a=r(n).getTime();if(o>a)throw new Error("The start of the range cannot be after the end of the range");return i>=o&&i<=a}},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),i=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=i(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(),i=n-n%3+3;return t.setMonth(i,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,i=r(e),o=i.getDay(),a=6+(o<n?-7:0)-(o-n);return i.setHours(0,0,0,0),i.setDate(i.getDate()+a),i}},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 i=t.concat(n).sort().reverse();return new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+i.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 i;return r=r||{},i="string"==typeof e[t]?e[t]:1===n?e[t].one:e[t].other.replace("{{count}}",n),r.addSuffix?r.comparison>0?"in "+i:i+" ago":i}}}},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"],i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],o=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],a=["AM","PM"],s=["am","pm"],l=["a.m.","p.m."],d={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 i[e.getDay()]},dddd:function(e){return o[e.getDay()]},A:function(e){return e.getHours()/12>=1?a[1]:a[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){d[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:d,formattingTokensRegExp:r(d)}}},7479:(e,t,n)=>{var r=n(2894),i=n(664);e.exports={distanceInWords:r(),format:i()}},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),i=n(4286),o=36e5,a=6e4,s=/[T ]/,l=/:/,d=/^(\d{2})$/,c=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],u=/^(\d{4})/,p=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],h=/^-(\d{2})$/,m=/^-?(\d{3})$/,g=/^-?(\d{2})-?(\d{2})$/,f=/^-?W(\d{2})$/,v=/^-?W(\d{2})-?(\d{1})$/,b=/^(\d{2}([.,]\d*)?)$/,S=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,y=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,w=/([Z+-].*)$/,x=/^(Z)$/,k=/^([+-])(\d{2})$/,C=/^([+-])(\d{2}):?(\d{2})$/;function O(e,t,n){t=t||0,n=n||0;var r=new Date(0);r.setUTCFullYear(e,0,4);var i=7*t+n+1-(r.getUTCDay()||7);return r.setUTCDate(r.getUTCDate()+i),r}e.exports=function(e,t){if(i(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 M=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 i=w.exec(t);i?(n.time=t.replace(i[1],""),n.timezone=i[1]):n.time=t}return n}(e),I=function(e,t){var n,r=c[t],i=p[t];if(n=u.exec(e)||i.exec(e)){var o=n[1];return{year:parseInt(o,10),restDateString:e.slice(o.length)}}if(n=d.exec(e)||r.exec(e)){var a=n[1];return{year:100*parseInt(a,10),restDateString:e.slice(a.length)}}return{year:null}}(M.date,n),N=I.year,F=function(e,t){if(null===t)return null;var n,r,i;if(0===e.length)return(r=new Date(0)).setUTCFullYear(t),r;if(n=h.exec(e))return r=new Date(0),i=parseInt(n[1],10)-1,r.setUTCFullYear(t,i),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),i=parseInt(n[1],10)-1;var a=parseInt(n[2],10);return r.setUTCFullYear(t,i,a),r}if(n=f.exec(e))return O(t,parseInt(n[1],10)-1);if(n=v.exec(e)){return O(t,parseInt(n[1],10)-1,parseInt(n[2],10)-1)}return null}(I.restDateString,N);if(F){var L,T=F.getTime(),A=0;if(M.time&&(A=function(e){var t,n,r;if(t=b.exec(e))return(n=parseFloat(t[1].replace(",",".")))%24*o;if(t=S.exec(e))return n=parseInt(t[1],10),r=parseFloat(t[2].replace(",",".")),n%24*o+r*a;if(t=y.exec(e)){n=parseInt(t[1],10),r=parseInt(t[2],10);var i=parseFloat(t[3].replace(",","."));return n%24*o+r*a+1e3*i}return null}(M.time)),M.timezone)L=function(e){var t,n;if(t=x.exec(e))return 0;if(t=k.exec(e))return n=60*parseInt(t[2],10),"+"===t[1]?-n:n;if(t=C.exec(e))return n=60*parseInt(t[2],10)+parseInt(t[3],10),"+"===t[1]?-n:n;return 0}(M.timezone)*a;else{var j=T+A,_=new Date(j);L=r(_);var E=new Date(j);E.setDate(_.getDate()+1);var D=r(E)-r(_);D>0&&(L+=D)}return new Date(T+A+L)}return new Date(e)}},6130:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=Number(t);return n.setDate(i),n}},1110:(e,t,n)=>{var r=n(1884),i=n(4844);e.exports=function(e,t,n){var o=n&&Number(n.weekStartsOn)||0,a=r(e),s=Number(t),l=a.getDay();return i(a,((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),i=Number(t);return n.setMonth(0),n.setDate(i),n}},6574:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=Number(t);return n.setHours(i),n}},8212:(e,t,n)=>{var r=n(1884),i=n(4844),o=n(6373);e.exports=function(e,t){var n=r(e),a=Number(t),s=o(n);return i(n,a-s)}},570:(e,t,n)=>{var r=n(1884),i=n(6563);e.exports=function(e,t){var n=r(e),o=Number(t),a=i(n)-o;return n.setDate(n.getDate()-7*a),n}},1138:(e,t,n)=>{var r=n(1884),i=n(3892),o=n(6656);e.exports=function(e,t){var n=r(e),a=Number(t),s=o(n,i(n)),l=new Date(0);return l.setFullYear(a,0,4),l.setHours(0,0,0,0),(n=i(l)).setDate(n.getDate()+s),n}},3934:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=Number(t);return n.setMilliseconds(i),n}},4809:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=Number(t);return n.setMinutes(i),n}},6059:(e,t,n)=>{var r=n(1884),i=n(2807);e.exports=function(e,t){var n=r(e),o=Number(t),a=n.getFullYear(),s=n.getDate(),l=new Date(0);l.setFullYear(a,o,15),l.setHours(0,0,0,0);var d=i(l);return n.setMonth(o,Math.min(s,d)),n}},4059:(e,t,n)=>{var r=n(1884),i=n(6059);e.exports=function(e,t){var n=r(e),o=Number(t)-(Math.floor(n.getMonth()/3)+1);return i(n,n.getMonth()+3*o)}},1670:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=Number(t);return n.setSeconds(i),n}},3821:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=r(e),i=Number(t);return n.setFullYear(i),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),i=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),i(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(),i=n-n%3;return t.setMonth(i,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(),i=new Date(0);return i.setFullYear(t,n,r+1),i.setHours(0,0,0,0),i}},5344:(e,t,n)=>{var r=n(1884);e.exports=function(e,t){var n=t&&Number(t.weekStartsOn)||0,i=r(e),o=i.getDay(),a=(o<n?7:0)+o-n;return i.setDate(i.getDate()-a),i.setHours(0,0,0,0),i}},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(),i=new Date(0);return i.setFullYear(t,n,r-1),i.setHours(0,0,0,0),i}},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,i={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 a(e){var t=e.type,n=e.tagName;return!("INPUT"!==n||!i[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 d(n){n.metaKey||n.altKey||n.ctrlKey||(o(e.activeElement)&&s(e.activeElement),t=!0)}function c(e){t=!1}function u(e){o(e.target)&&(t||a(e.target))&&s(e.target)}function p(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 h(e){"hidden"===document.visibilityState&&(n&&(t=!0),m())}function m(){document.addEventListener("mousemove",f),document.addEventListener("mousedown",f),document.addEventListener("mouseup",f),document.addEventListener("pointermove",f),document.addEventListener("pointerdown",f),document.addEventListener("pointerup",f),document.addEventListener("touchmove",f),document.addEventListener("touchstart",f),document.addEventListener("touchend",f)}function g(){document.removeEventListener("mousemove",f),document.removeEventListener("mousedown",f),document.removeEventListener("mouseup",f),document.removeEventListener("pointermove",f),document.removeEventListener("pointerdown",f),document.removeEventListener("pointerup",f),document.removeEventListener("touchmove",f),document.removeEventListener("touchstart",f),document.removeEventListener("touchend",f)}function f(e){e.target.nodeName&&"html"===e.target.nodeName.toLowerCase()||(t=!1,g())}document.addEventListener("keydown",d,!0),document.addEventListener("mousedown",c,!0),document.addEventListener("pointerdown",c,!0),document.addEventListener("touchstart",c,!0),document.addEventListener("visibilitychange",h,!0),m(),e.addEventListener("focus",u,!0),e.addEventListener("blur",p,!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:()=>y,Fragment:()=>S,_unmount:()=>_,cloneElement:()=>P,createContext:()=>R,createElement:()=>f,createRef:()=>b,h:()=>f,hydrate:()=>H,isValidElement:()=>i,options:()=>r,render:()=>D,toChildArray:()=>M});var r,i,o,a,s,l,d,c,u={},p=[],h=/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 f(e,t,n){var r,i=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(i[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 v(e,o,t&&t.key,t&&t.ref,null)}function v(e,t,n,i,o){var a={type:e,props:t,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:o};return null==o&&(a.__v=a),r.vnode&&r.vnode(a),a}function b(){return{}}function S(e){return e.children}function y(e,t){this.props=e,this.context=t}function w(e,t){if(null==t)return e.__?w(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?w(e):null}function x(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 x(e)}}function k(e){(!e.__d&&(e.__d=!0)&&o.push(e)&&!a++||l!==r.debounceRendering)&&((l=r.debounceRendering)||s)(C)}function C(){for(var e;a=o.length;)e=o.sort((function(e,t){return e.__v.__b-t.__v.__b})),o=[],e.some((function(e){var t,n,r,i,o,a,s;e.__d&&(a=(o=(t=e).__v).__e,(s=t.__P)&&(n=[],(r=m({},o)).__v=r,i=L(s,o,r,t.__n,void 0!==s.ownerSVGElement,null,n,null==a?w(o):a),T(n,o),i!=a&&x(o)))}))}function O(e,t,n,r,i,o,a,s,l){var d,c,h,m,f,v,b,S=n&&n.__k||p,y=S.length;if(s==u&&(s=null!=o?o[0]:y?w(n,0):null),d=0,t.__k=M(t.__k,(function(n){if(null!=n){if(n.__=t,n.__b=t.__b+1,null===(h=S[d])||h&&n.key==h.key&&n.type===h.type)S[d]=void 0;else for(c=0;c<y;c++){if((h=S[c])&&n.key==h.key&&n.type===h.type){S[c]=void 0;break}h=null}if(m=L(e,n,h=h||u,r,i,o,a,s,l),(c=n.ref)&&h.ref!=c&&(b||(b=[]),h.ref&&b.push(h.ref,null,n),b.push(c,n.__c||m,n)),null!=m){var p;if(null==v&&(v=m),void 0!==n.__d)p=n.__d,n.__d=void 0;else if(o==h||m!=s||null==m.parentNode){e:if(null==s||s.parentNode!==e)e.appendChild(m),p=null;else{for(f=s,c=0;(f=f.nextSibling)&&c<y;c+=2)if(f==m)break e;e.insertBefore(m,s),p=s}"option"==t.type&&(e.value="")}s=void 0!==p?p:m.nextSibling,"function"==typeof t.type&&(t.__d=s)}else s&&h.__e==s&&s.parentNode!=e&&(s=w(h))}return d++,n})),t.__e=v,null!=o&&"function"!=typeof t.type)for(d=o.length;d--;)null!=o[d]&&g(o[d]);for(d=y;d--;)null!=S[d]&&_(S[d],S[d]);if(b)for(d=0;d<b.length;d++)j(b[d],b[++d],b[++d])}function M(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++)M(e[r],t,n);else n.push(t?t("string"==typeof e||"number"==typeof e?v(null,e,null,null,e):null!=e.__e||null!=e.__c?v(e.type,e.props,e.key,null,e.__v):e):e);return n}function I(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]="number"==typeof n&&!1===h.test(t)?n+"px":null==n?"":n}function N(e,t,n,r,i){var o,a,s,l,d;if(i?"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||I(o,l,"");if(n)for(d in n)r&&n[d]===r[d]||I(o,d,n[d])}else"o"===t[0]&&"n"===t[1]?(a=t!==(t=t.replace(/Capture$/,"")),s=t.toLowerCase(),t=(s in e?s:t).slice(2),n?(r||e.addEventListener(t,F,a),(e.l||(e.l={}))[t]=n):e.removeEventListener(t,F,a)):"list"!==t&&"tagName"!==t&&"form"!==t&&"type"!==t&&"size"!==t&&!i&&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 F(e){this.l[e.type](r.event?r.event(e):e)}function L(e,t,n,i,o,a,s,l,d){var c,u,p,h,g,f,v,b,w,x,k=t.type;if(void 0!==t.constructor)return null;(c=r.__b)&&c(t);try{e:if("function"==typeof k){if(b=t.props,w=(c=k.contextType)&&i[c.__c],x=c?w?w.props.value:c.__:i,n.__c?v=(u=t.__c=n.__c).__=u.__E:("prototype"in k&&k.prototype.render?t.__c=u=new k(b,x):(t.__c=u=new y(b,x),u.constructor=k,u.render=E),w&&w.sub(u),u.props=b,u.state||(u.state={}),u.context=x,u.__n=i,p=u.__d=!0,u.__h=[]),null==u.__s&&(u.__s=u.state),null!=k.getDerivedStateFromProps&&(u.__s==u.state&&(u.__s=m({},u.__s)),m(u.__s,k.getDerivedStateFromProps(b,u.__s))),h=u.props,g=u.state,p)null==k.getDerivedStateFromProps&&null!=u.componentWillMount&&u.componentWillMount(),null!=u.componentDidMount&&u.__h.push(u.componentDidMount);else{if(null==k.getDerivedStateFromProps&&b!==h&&null!=u.componentWillReceiveProps&&u.componentWillReceiveProps(b,x),!u.__e&&null!=u.shouldComponentUpdate&&!1===u.shouldComponentUpdate(b,u.__s,x)||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),c=0;c<t.__k.length;c++)t.__k[c]&&(t.__k[c].__=t);break e}null!=u.componentWillUpdate&&u.componentWillUpdate(b,u.__s,x),null!=u.componentDidUpdate&&u.__h.push((function(){u.componentDidUpdate(h,g,f)}))}u.context=x,u.props=b,u.state=u.__s,(c=r.__r)&&c(t),u.__d=!1,u.__v=t,u.__P=e,c=u.render(u.props,u.state,u.context),t.__k=null!=c&&c.type==S&&null==c.key?c.props.children:Array.isArray(c)?c:[c],null!=u.getChildContext&&(i=m(m({},i),u.getChildContext())),p||null==u.getSnapshotBeforeUpdate||(f=u.getSnapshotBeforeUpdate(h,g)),O(e,t,n,i,o,a,s,l,d),u.base=t.__e,u.__h.length&&s.push(u),v&&(u.__E=u.__=null),u.__e=!1}else null==a&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=A(n.__e,t,n,i,o,a,s,d);(c=r.diffed)&&c(t)}catch(e){t.__v=null,r.__e(e,t,n)}return t.__e}function T(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 A(e,t,n,r,i,o,a,s){var l,d,c,h,m,g=n.props,f=t.props;if(i="svg"===t.type||i,null!=o)for(l=0;l<o.length;l++)if(null!=(d=o[l])&&((null===t.type?3===d.nodeType:d.localName===t.type)||e==d)){e=d,o[l]=null;break}if(null==e){if(null===t.type)return document.createTextNode(f);e=i?document.createElementNS("http://www.w3.org/2000/svg",t.type):document.createElement(t.type,f.is&&{is:f.is}),o=null,s=!1}if(null===t.type)g!==f&&e.data!=f&&(e.data=f);else{if(null!=o&&(o=p.slice.call(e.childNodes)),c=(g=n.props||u).dangerouslySetInnerHTML,h=f.dangerouslySetInnerHTML,!s){if(g===u)for(g={},m=0;m<e.attributes.length;m++)g[e.attributes[m].name]=e.attributes[m].value;(h||c)&&(h&&c&&h.__html==c.__html||(e.innerHTML=h&&h.__html||""))}(function(e,t,n,r,i){var o;for(o in n)"children"===o||"key"===o||o in t||N(e,o,null,n[o],r);for(o in t)i&&"function"!=typeof t[o]||"children"===o||"key"===o||"value"===o||"checked"===o||n[o]===t[o]||N(e,o,t[o],n[o],r)})(e,f,g,i,s),h?t.__k=[]:(t.__k=t.props.children,O(e,t,n,r,"foreignObject"!==t.type&&i,o,a,u,s)),s||("value"in f&&void 0!==(l=f.value)&&l!==e.value&&N(e,"value",l,g.value,!1),"checked"in f&&void 0!==(l=f.checked)&&l!==e.checked&&N(e,"checked",l,g.checked,!1))}return e}function j(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(e){r.__e(e,n)}}function _(e,t,n){var i,o,a;if(r.unmount&&r.unmount(e),(i=e.ref)&&(i.current&&i.current!==e.__e||j(i,null,t)),n||"function"==typeof e.type||(n=null!=(o=e.__e)),e.__e=e.__d=void 0,null!=(i=e.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){r.__e(e,t)}i.base=i.__P=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&_(i[a],t,n);null!=o&&g(o)}function E(e,t,n){return this.constructor(e,n)}function D(e,t,n){var i,o,a;r.__&&r.__(e,t),o=(i=n===d)?null:n&&n.__k||t.__k,e=f(S,null,[e]),a=[],L(t,(i?t:n||t).__k=e,o||u,u,void 0!==t.ownerSVGElement,n&&!i?[n]:o?null:p.slice.call(t.childNodes),a,n||u,i),T(a,e)}function H(e,t){D(e,t,d)}function P(e,t){var n,r;for(r in t=m(m({},e.props),t),arguments.length>2&&(t.children=p.slice.call(arguments,2)),n={},t)"key"!==r&&"ref"!==r&&(n[r]=t[r]);return v(e.type,n,t.key||e.key,t.ref||e.ref,null)}function R(e){var t={},n={__c:"__cC"+c++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var r,i=this;return this.getChildContext||(r=[],this.getChildContext=function(){return t[n.__c]=i,t},this.shouldComponentUpdate=function(e){i.props.value!==e.value&&r.some((function(t){t.context=e.value,k(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 k(n.__E=n)}catch(t){e=t}throw e}},i=function(e){return null!=e&&void 0===e.constructor},y.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),k(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},y.prototype.render=S,o=[],a=0,s="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,d=u,c=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 i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},t.apply(this,arguments)};e.exports=function(e,n){void 0===e&&(e={}),void 0===n&&(n=null);var r=e||{},i=[];function o(){i.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 i.push(e),function(){i.splice(i.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,i){if(e.length<1)return n(t,r.apply(void 0,[t.getState()].concat(i)));var o=e.map((function(e){return e(t)})).reduce((function(e,t){return t(e,i)}),function(e,t){return function(r){return n(e,r.apply(void 0,[e.getState()].concat(t)))}}(t,i));return o(r)}}},5576:(e,t,n)=>{"use strict";var r=n(6400),i=function(e,t){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},i(e,t)};function o(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},a.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 d=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 i in e){var o=e[i];r[i]=l(o,t)}return r}(this.props.actions,this.context.store,this.props)},t.prototype.render=function(e,t,n){var r=e.children,i=n.store;return(r&&r[0]||r)(a({store:i},t,this.actions))},t}(r.Component),c=d;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=d},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 i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)};t.kv=function(e,t,r){e="function"==typeof e?e(t,r):e;var i={};for(var o in e){var a=e[o];i[o]=n(a,t)}return i},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)}),{})}}},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,i=/#([\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(i)&&(t=t.replace(i,(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,i){if(r.match(/^\s*(@media|@.*keyframes|to|from|@font-face|1?[0-9]?[0-9])/))return r+i;const o=r.match(/#(\w+)/);return o&&n[o[1]]&&(r=r.replace(o[0],`#${n[o[1]]}`)),(r=r.replace(/^(\s*)/,"$1"+t+" "))+i}))}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.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:()=>fh});n(1181);var e,t,i,o=n(6400),a=(n(5202),0),s=[],l=o.options.__r,d=o.options.diffed,c=o.options.__c,u=o.options.unmount;function p(e,n){o.options.__h&&o.options.__h(t,e,a||n),a=0;var r=t.__H||(t.__H={__:[],__h:[]});return e>=r.__.length&&r.__.push({}),r.__[e]}function h(e){return a=1,m(O,e)}function m(n,r,i){var o=p(e++,2);return o.__c||(o.__c=t,o.__=[i?i(r):O(void 0,r),function(e){var t=n(o.__[0],e);o.__[0]!==t&&(o.__[0]=t,o.__c.setState({}))}]),o.__}function g(n,r){var i=p(e++,3);!o.options.__s&&C(i.__H,r)&&(i.__=n,i.__H=r,t.__H.__h.push(i))}function f(n,r){var i=p(e++,4);!o.options.__s&&C(i.__H,r)&&(i.__=n,i.__H=r,t.__h.push(i))}function v(e){return a=5,S((function(){return{current:e}}),[])}function b(e,t,n){a=6,f((function(){"function"==typeof e?e(t()):e&&(e.current=t())}),null==n?n:n.concat(e))}function S(t,n){var r=p(e++,7);return C(r.__H,n)?(r.__H=n,r.__h=t,r.__=t()):r.__}function y(n){var r=t.context[n.__c],i=p(e++,9);return i.__c=n,r?(null==i.__&&(i.__=!0,r.sub(t)),r.props.value):n.__}function w(){s.some((function(e){if(e.__P)try{e.__H.__h.forEach(x),e.__H.__h.forEach(k),e.__H.__h=[]}catch(t){return e.__H.__h=[],o.options.__e(t,e.__v),!0}})),s=[]}function x(e){e.t&&e.t()}function k(e){var t=e.__();"function"==typeof t&&(e.t=t)}function C(e,t){return!e||t.some((function(t,n){return t!==e[n]}))}function O(e,t){return"function"==typeof t?t(e):t}function M(e,t){for(var n in t)e[n]=t[n];return e}function I(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}o.options.__r=function(n){l&&l(n),e=0,(t=n.__c).__H&&(t.__H.__h.forEach(x),t.__H.__h.forEach(k),t.__H.__h=[])},o.options.diffed=function(e){d&&d(e);var t=e.__c;if(t){var n=t.__H;n&&n.__h.length&&(1!==s.push(t)&&i===o.options.requestAnimationFrame||((i=o.options.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);"undefined"!=typeof window&&(t=requestAnimationFrame(n))})(w))}},o.options.__c=function(e,t){t.some((function(e){try{e.__h.forEach(x),e.__h=e.__h.filter((function(e){return!e.__||k(e)}))}catch(n){t.some((function(e){e.__h&&(e.__h=[])})),t=[],o.options.__e(n,e.__v)}})),c&&c(e,t)},o.options.unmount=function(e){u&&u(e);var t=e.__c;if(t){var n=t.__H;if(n)try{n.__.forEach((function(e){return e.t&&e.t()}))}catch(e){o.options.__e(e,t.__v)}}};var N=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 I(this.props,e)||I(this.state,t)},r}(o.Component);function F(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:I(this.props,e)}function r(t){return this.shouldComponentUpdate=n,(0,o.createElement)(e,M({},t))}return r.prototype.isReactComponent=!0,r.displayName="Memo("+(e.displayName||e.name)+")",r.t=!0,r}var L=o.options.__b;function T(e){function t(t){var n=M({},t);return delete n.ref,e(n,t.ref)}return t.prototype.isReactComponent=t.t=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}o.options.__b=function(e){e.type&&e.type.t&&e.ref&&(e.props.ref=e.ref,e.ref=null),L&&L(e)};var A=function(e,t){return e?(0,o.toChildArray)(e).reduce((function(e,n,r){return e.concat(t(n,r))}),[]):null},j={map:A,forEach:A,count:function(e){return e?(0,o.toChildArray)(e).length:0},only:function(e){if(1!==(e=(0,o.toChildArray)(e)).length)throw new Error("Children.only() expects only one child.");return e[0]},toArray:o.toChildArray},_=o.options.__e;function E(e){return e&&((e=M({},e)).__c=null,e.__k=e.__k&&e.__k.map(E)),e}function D(){this.__u=0,this.o=null,this.__b=null}function H(e){var t=e.__.__c;return t&&t.u&&t.u(e)}function P(){this.i=null,this.l=null}o.options.__e=function(e,t,n){if(e.then)for(var r,i=t;i=i.__;)if((r=i.__c)&&r.__c)return r.__c(e,t.__c);_(e,t,n)},(D.prototype=new o.Component).__c=function(e,t){var n=this;null==n.o&&(n.o=[]),n.o.push(t);var r=H(n.__v),i=!1,o=function(){i||(i=!0,r?r(a):a())};t.__c=t.componentWillUnmount,t.componentWillUnmount=function(){o(),t.__c&&t.__c()};var a=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)},D.prototype.render=function(e,t){return this.__b&&(this.__v.__k[0]=E(this.__b),this.__b=null),[(0,o.createElement)(o.Component,null,t.u?null:e.children),t.u&&e.fallback]};var R=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]}};(P.prototype=new o.Component).u=function(e){var t=this,n=H(t.__v),r=t.l.get(e);return r[0]++,function(i){var o=function(){t.props.revealOrder?(r.push(i),R(t,e,r)):i()};n?n(o):o()}},P.prototype.render=function(e){this.i=null,this.l=new Map;var t=(0,o.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},P.prototype.componentDidUpdate=P.prototype.componentDidMount=function(){var e=this;e.l.forEach((function(t,n){R(e,n,t)}))};var $=function(){function e(){}var t=e.prototype;return t.getChildContext=function(){return this.props.context},t.render=function(e){return e.children},e}();function B(e){var t=this,n=e.container,r=(0,o.createElement)($,{context:t.context},e.vnode);return t.s&&t.s!==n&&(t.v.parentNode&&t.s.removeChild(t.v),(0,o._unmount)(t.h),t.p=!1),e.vnode?t.p?(n.__k=t.__k,(0,o.render)(r,n),t.__k=n.__k):(t.v=document.createTextNode(""),(0,o.hydrate)("",n),n.appendChild(t.v),t.p=!0,t.s=n,(0,o.render)(r,n,t.v),t.__k=t.v.__k):t.p&&(t.v.parentNode&&t.s.removeChild(t.v),(0,o._unmount)(t.h)),t.h=r,t.componentWillUnmount=function(){t.v.parentNode&&t.s.removeChild(t.v),(0,o._unmount)(t.h)},null}var V=/^(?: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]/;o.Component.prototype.isReactComponent={};var z="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;function W(e,t,n){if(null==t.__k)for(;t.firstChild;)t.removeChild(t.firstChild);return(0,o.render)(e,t),"function"==typeof n&&n(),e?e.__c:null}var U=o.options.event;function q(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}})}o.options.event=function(e){U&&(e=U(e)),e.persist=function(){};var t=!1,n=!1,r=e.stopPropagation;e.stopPropagation=function(){r.call(e),t=!0};var i=e.preventDefault;return e.preventDefault=function(){i.call(e),n=!0},e.isPropagationStopped=function(){return t},e.isDefaultPrevented=function(){return n},e.nativeEvent=e};var Y={configurable:!0,get:function(){return this.class}},Z=o.options.vnode;o.options.vnode=function(e){e.$$typeof=z;var t=e.type,n=e.props;if(t){if(n.class!=n.className&&(Y.enumerable="className"in n,null!=n.className&&(n.class=n.className),Object.defineProperty(n,"className",Y)),"function"!=typeof t){var r,i,a;for(a in n.defaultValue&&void 0!==n.value&&(n.value||0===n.value||(n.value=n.defaultValue),delete n.defaultValue),Array.isArray(n.value)&&n.multiple&&"select"===t&&((0,o.toChildArray)(n.children).forEach((function(e){-1!=n.value.indexOf(e.props.value)&&(e.props.selected=!0)})),delete n.value),n)if(r=V.test(a))break;if(r)for(a in i=e.props={},n)i[V.test(a)?a.replace(/[A-Z0-9]/,"-$&").toLowerCase():a]=n[a]}!function(t){var n=e.type,r=e.props;if(r&&"string"==typeof n){var i={};for(var o in r)/^on(Ani|Tra|Tou)/.test(o)&&(r[o.toLowerCase()]=r[o],delete r[o]),i[o.toLowerCase()]=o;if(i.ondoubleclick&&(r.ondblclick=r[i.ondoubleclick],delete r[i.ondoubleclick]),i.onbeforeinput&&(r.onbeforeinput=r[i.onbeforeinput],delete r[i.onbeforeinput]),i.onchange&&("textarea"===n||"input"===n.toLowerCase()&&!/^fil|che|ra/i.test(r.type))){var a=i.oninput||"oninput";r[a]||(r[a]=r[i.onchange],delete r[i.onchange])}}}(),"function"==typeof t&&!t.m&&t.prototype&&(q(t.prototype,"componentWillMount"),q(t.prototype,"componentWillReceiveProps"),q(t.prototype,"componentWillUpdate"),t.m=!0)}Z&&Z(e)};function K(e){return!!e&&e.$$typeof===z}const G={useState:h,useReducer:m,useEffect:g,useLayoutEffect:f,useRef:v,useImperativeHandle:b,useMemo:S,useCallback:function(e,t){return a=8,S((function(){return e}),t)},useContext:y,useDebugValue:function(e,t){o.options.useDebugValue&&o.options.useDebugValue(t?t(e):e)},version:"16.8.0",Children:j,render:W,hydrate:W,unmountComponentAtNode:function(e){return!!e.__k&&((0,o.render)(null,e),!0)},createPortal:function(e,t){return(0,o.createElement)(B,{vnode:e,container:t})},createElement:o.createElement,createContext:o.createContext,createFactory:function(e){return o.createElement.bind(null,e)},cloneElement:function(e){return K(e)?o.cloneElement.apply(null,arguments):e},createRef:o.createRef,Fragment:o.Fragment,isValidElement:K,findDOMNode:function(e){return e&&(e.base||1===e.nodeType&&e)||null},Component:o.Component,PureComponent:N,memo:F,forwardRef:T,unstable_batchedUpdates:function(e,t){return e(t)},Suspense:D,SuspenseList:P,lazy:function(e){var t,n,r;function i(i){if(t||(t=e()).then((function(e){n=e.default||e}),(function(e){r=e})),r)throw r;if(!n)throw t;return(0,o.createElement)(n,i)}return i.displayName="Lazy",i.t=!0,i}};var X,Q=n(7867),J=new Uint8Array(16);function ee(){if(!X&&!(X="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return X(J)}const te=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const ne=function(e){return"string"==typeof e&&te.test(e)};for(var re=[],ie=0;ie<256;++ie)re.push((ie+256).toString(16).substr(1));const oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(re[e[t+0]]+re[e[t+1]]+re[e[t+2]]+re[e[t+3]]+"-"+re[e[t+4]]+re[e[t+5]]+"-"+re[e[t+6]]+re[e[t+7]]+"-"+re[e[t+8]]+re[e[t+9]]+"-"+re[e[t+10]]+re[e[t+11]]+re[e[t+12]]+re[e[t+13]]+re[e[t+14]]+re[e[t+15]]).toLowerCase();if(!ne(n))throw TypeError("Stringified UUID is invalid");return n};const ae=function(e,t,n){var r=(e=e||{}).random||(e.rng||ee)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return oe(r)},se=()=>({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})}});var le=n(7292);function de(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let ce;!function(e){e[e.DISABLED=0]="DISABLED",e[e.TRANSACTIONS=1]="TRANSACTIONS",e[e.PAYLOAD=2]="PAYLOAD",e[e.FULL_DETAIL=3]="FULL_DETAIL"}(ce||(ce={}));class ue{static debug(e){ue.logLevel!==ce.DISABLED&&(e.level1||e.level2||e.level3)&&console.log(...this.constructLogPayload(e))}static warn(e){ue.logLevel!==ce.DISABLED&&(e.level1||e.level2||e.level3)&&console.warn(...this.constructLogPayload(e))}static error(e){ue.logLevel!==ce.DISABLED&&(e.level1||e.level2||e.level3)&&console.error(...this.constructLogPayload(e))}}de(ue,"logLevel",ce.DISABLED),de(ue,"constructLogPayload",(e=>{const t=["AtomicSDK Web -"];return ue.logLevel>=ce.TRANSACTIONS&&e.level1&&t.push(...e.level1),ue.logLevel>=ce.PAYLOAD&&e.level2&&t.push(...e.level2),ue.logLevel>=ce.FULL_DETAIL&&e.level3&&t.push(...e.level3),t}));var pe=n(4798),he=n.n(pe),me=n(1042);const ge={application:{open:!1,windowOrigin:null,streamContainerId:"",containerInstanceId:"",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 fe;const ve=(e,t)=>{var n,r,i;let{streamContainerId:o,instanceId:a,windowOrigin:s,subviewCardInstance:l,startingLayoutId:d,cardInstances:c,cardListRefreshInterval:u,runtimeVariableResolutionTimeout:p,embedMode:h,customStrings:m,cardListTutorialSeen:g,features:f,firstLoadStyles:v,enabledUiElements:b,interfaceStyle:S,horizontalContainerConfig:y,cardMinimumHeight:w,cardMaximumWidth:x,cardHorizontalAlignment:k,modalContainerPositioning:C,modalContainerVerticalPadding:O}=e;const M=t&&t.length?(0,me.m)(...t):null,I="preview"===h,N=null==f?void 0:f.runtimeVariableAnalytics;return fe=he()(Object.assign(Object.assign({},ge),{application:Object.assign(Object.assign({},ge.application),{isPreview:I,streamContainerId:void 0!==o?o:ge.application.streamContainerId,containerInstanceId:void 0!==a?a:ge.application.containerInstanceId,windowOrigin:s||ge.application.windowOrigin,cardListRefreshInterval:void 0!==u?u:ge.application.cardListRefreshInterval,runtimeVariableResolutionTimeout:void 0!==p?p:ge.application.runtimeVariableResolutionTimeout,embedMode:h,customStrings:m||ge.application.customStrings,cardLimit:"single-card"===h||"modal-stream"===h?1:void 0,firstLoadStyles:{backgroundColor:(null==v?void 0:v.backgroundColor)||ge.application.firstLoadStyles.backgroundColor,textColor:(null==v?void 0:v.textColor)||ge.application.firstLoadStyles.textColor,loadingSpinnerColor:(null==v?void 0:v.loadingSpinnerColor)||ge.application.firstLoadStyles.loadingSpinnerColor,buttonTextColor:(null==v?void 0:v.buttonTextColor)||ge.application.firstLoadStyles.buttonTextColor},enabledUiElements:{cardListToast:null===(n=null==b?void 0:b.cardListToast)||void 0===n||n,customToastContainer:null!==(r=null==b?void 0:b.customToastContainer)&&void 0!==r&&r,toastConfig:null==b?void 0:b.toastConfig,cardListHeader:null===(i=null==b?void 0:b.cardListHeader)||void 0===i||i,customContainerHeader:null==b?void 0:b.customContainerHeader},interfaceStyle:void 0!==S?S:"automatic"}),navigationStack:{items:l&&d?[{cardInstance:l,cardInstanceId:l.instance.id,subviewId:d,kind:"subview"}]:ge.navigationStack.items},cardFeed:Object.assign(Object.assign({},ge.cardFeed),{cardInstances:c||ge.cardFeed.cardInstances,tutorialSeen:void 0===g||g,runtimeVariableAnalyticsEnabled:void 0!==N&&N,cardVoting:null==f?void 0:f.cardVoting,cardMaximumWidth:hp(x),cardMinimumHeight:null!=w?w:null==f?void 0:f.cardMinimumHeight,cardHorizontalAlignment:k,horizontalContainerConfig:null!=y?y:null==f?void 0:f.horizontalContainerConfig,modalContainerPositioning:C,modalContainerVerticalPadding:hp(O)})}),M),fe},be=()=>{if(!fe)throw new Error("You must initialise the store before accessing it.");return fe},Se="YYYY-MM-DD[T]HH:mm:ssZZ",ye=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,we=20,xe=20,ke=20,Ce=20,Oe="displayedCards",Me="cardDescription",Ie="headline",Ne="text",Fe="list",Le="image",Te="video",Ae="textInput",je="numberInput",_e="datePicker",Ee="dropdown",De="checkbox",He="stepper",Pe="switch",Re="upload",$e="form",Be="actionButtonGroup",Ve="submitButton",ze="linkButton",We="dismissButton",Ue="snoozeButton",qe="voteUpButton",Ye="voteDownButton";var Ze=n(5576);const Ke=()=>({handleSubviewLinkPress:(e,t,n)=>Ge(e,t,n),finishSubview:e=>Xe(e),viewMedia(e,t,n){if(e.application.isPreview)return e;if(!n||!n.url||0===n.url.trim().length)return e;return et(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 i=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)i&&(null===(t=i.subviews)||void 0===t||delete t[r.subviewId]),o&&(null===(n=o.subviews)||void 0===n||delete n[r.subviewId]),e.application.isPreview||window.AtomicUploadService.removeFilesForCardSubview(e.application.containerInstanceId,r.cardInstanceId,r.subviewId);return Object.assign(Object.assign({},tt(e)),{cardResponses:Object.assign(Object.assign({},e.cardResponses),i?{[r.cardInstanceId]:i}:{}),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,r){if(e.application.isPreview)return e;const i=Object.assign({kind:"snooze",cardInstanceId:t,source:n},r?{cardExpiry:r}:{});return et(e,i)},requestFeedback(e,t,n){if(e.application.isPreview)return e;const r={kind:"feedback",cardInstanceId:t,sentiment:n.sentiment,textFeedback:n.textFeedback,textFeedbackLabel:n.textFeedbackLabel,source:n.source};return et(e,r)}}),Ge=(e,t,n)=>{const r=e.cardFeed.cardInstances;if(r){const i=r.find((e=>e.instance.id===t)),o=i&&i.subviews[n];if(i&&o){const t={kind:"subview",cardInstance:i,cardInstanceId:i.instance.id,subviewId:n};return et(e,t)}}return e},Xe=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 Qe;const Je=()=>(Qe||(Qe=(0,Q.kv)((0,Q.Y2)(Ke),be())),Qe),et=(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}})},nt=e=>e.navigationStack.items.length?e.navigationStack.items[e.navigationStack.items.length-1]:null;function rt(e){return void 0!==e&&"subview"===e.kind}function it(e){return void 0!==e&&"snooze"===e.kind}function ot(e){return void 0!==e&&"feedback"===e.kind}function at(e){return void 0!==e&&"media"===e.kind}var st=n(2807),lt=n.n(st);const dt=e=>Object.keys(e).filter((t=>e[t])).join(" "),ct=(e,t)=>{const n=((e,t)=>lt()(new Date(t,e-1)))(e,t),r=new Date(t,e-1,1).getDay()||7,i={week1:[],week2:[],week3:[],week4:[],week5:[],week6:[]};for(let o=0;o<n;o++){const n=new Date(t,e-1,o+1),a=Math.ceil((r+o)/7)-1,s=(r-1+o)%7+1;i[`week${Math.ceil((r+o)/7)}`].push({date:n,row:a,col:s,style:{gridRowStart:a,gridColumnStart:s}})}return i},ut=(e,t)=>{let{isMax:n,isMin:r}=t;const i=new Date(e);return n?(0,le.endOfDay)((0,le.addMinutes)(i,i.getTimezoneOffset())):r?(0,le.addMinutes)(i,i.getTimezoneOffset()):i};var pt=n(5616),ht=n.n(pt),mt=n(623),gt=n.n(mt);const ft={required:"This field is required",minimumDate:e=>`Value must be after ${e}`,maximumDate:e=>`Value must be before ${e}`,regexp:"Value does not meet requirements",minimum:e=>`Value must be at least ${e}`,maximum:e=>`Value must be no more than ${e}`,minimumLength:e=>1===e?"Value must be at least 1 character":`Value must be at least ${e} characters`,maximumLength:e=>1===e?"Value must be no more than 1 character":`Value must be no more than ${e} characters`,minChecked:(e,t)=>1===t?"This option must be checked":1===e?"You must select at least one option":`At least ${e} options must be selected`,maxChecked:e=>1===e?"You cannot select more than one option":`You cannot select more than ${e} options`},vt={required:(e,t)=>{const n=e.errorMessage||ft.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=ut(e.minimumDate,{isMin:!0}),r=e.errorMessage||ft.minimumDate(ht()(n,"DD MMM YYYY"));if(null==t||null==t)return{type:"invalid",errorMessage:r};const i=new Date(t);return!gt()(i)||i<n?{type:"invalid",errorMessage:r}:{type:"valid"}},maximumDate:(e,t)=>{const n=ut(e.maximumDate,{isMax:!0}),r=e.errorMessage||ft.maximumDate(ht()(n,"DD MMM YYYY"));if(null==t||null==t)return{type:"invalid",errorMessage:r};const i=new Date(t);return!gt()(i)||i>n?{type:"invalid",errorMessage:r}:{type:"valid"}},regexp:(e,t)=>{const n=e.errorMessage||ft.regexp;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||ft.minimum(e.minimum);return null==t||null==t||t<e.minimum?{type:"invalid",errorMessage:n}:{type:"valid"}},maximum:(e,t)=>{const n=e.errorMessage||ft.maximum(e.maximum);return null==t||null==t||t>e.maximum?{type:"invalid",errorMessage:n}:{type:"valid"}},minimumLength:(e,t)=>{const n=e.errorMessage||ft.minimumLength(e.minimumLength);return null==t||null==t||t.length<e.minimumLength?{type:"invalid",errorMessage:n}:{type:"valid"}},maximumLength:(e,t)=>{const n=e.errorMessage||ft.maximumLength(e.maximumLength);return null==t||null==t?{type:"valid"}:t.length>e.maximumLength?{type:"invalid",errorMessage:n}:{type:"valid"}},minChecked:(e,t)=>{const n=e.errorMessage||ft.minChecked(e.minChecked,Object.keys(t).length);return null==t||null==t||Object.values(t).filter((e=>e)).length<e.minChecked?{type:"invalid",errorMessage:n}:{type:"valid"}},maxChecked:(e,t)=>{const n=e.errorMessage||ft.maxChecked(e.maxChecked);return null==t||null==t||Object.values(t).filter((e=>e)).length>e.maxChecked?{type:"invalid",errorMessage:n}:{type:"valid"}},maxSizeBytes:(e,t)=>{const n=Math.round(e.maxSizeBytes/1048576),r=e.errorMessage||`File size must be no more than ${n}MB`;return null==t||null==t?{type:"valid"}:t.size&&t.size>e.maxSizeBytes?{type:"invalid",errorMessage:r}:{type:"valid"}}},bt=["required","minimumLength","maximumLength","minimum","maximum","minimumDate","maximumDate","minChecked","maxChecked","maxSizeBytes","regexp"],St=(e,t)=>{if(!t)return{type:"valid"};for(const n in bt){const r=bt[n],i=t[r];if(void 0===i)continue;const o=vt[r];if(o){const t=o(i.attributes,e);if("invalid"===t.type)return t}}return{type:"valid"}},yt=()=>({handleImageLinkPress(e,t,n){const r=e.navigationStack.items.length?"subview":"topview",i=Object.assign(Object.assign({},n.currentSubviewId&&{subviewId:n.currentSubviewId}),n.currentSubviewTitle&&{subviewTitle:n.currentSubviewTitle});return n.layoutId?Ge(e,t,n.layoutId):n.payload&&!e.application.isPreview?xt(e,"payload","image",t,r,n.payload,i):e},handleLinkButtonPress(e,t,n,r,i){const o=e.navigationStack.items.length?"subview":"topview";return r?Ge(e,t,r):i&&!e.application.isPreview?xt(e,"payload","linkButton",t,o,i,n):e},handleSubmitButtonPayload(e,t,n,r){const i=e.navigationStack.items.length?"subview":"topview";return xt(e,"payload","submitButton",t,i,r,n)},openExternalUrl:(e,t,n,r,i,o,a)=>(null==a?void 0:a.url)&&!e.application.isPreview?kt(e,i,o,t,n,a,r):e,handleFormChange:(e,t,n,r,i)=>wt(e,t,{[n]:r},i),createResponseWithDefaults:(e,t,n,r)=>wt(e,t,n,r),clearCardForm(e,t){var n,r;return Object.assign(Object.assign({},e),{cardResponses:Object.assign(Object.assign({},e.cardResponses),{[t]:Object.assign(Object.assign({},(null===(n=e.cardResponses[t])||void 0===n?void 0:n.responses)?{responses:{}}:{}),(null===(r=e.cardResponses[t])||void 0===r?void 0:r.subviews)?{subviews:{}}:{})})})},validateField(e,t,n,r,i,o){var a,s,l,d;let c=St(r,i);const u=c&&!o?{[n]:c}:{},p=c&&o?{[n]:c}:{},h=e.validationStates,m=null!==(a=null===(l=h[t])||void 0===l?void 0:l.validations)&&void 0!==a?a:{},g=null!==(s=null===(d=h[t])||void 0===d?void 0:d.subviews)&&void 0!==s?s:{};return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},h),{[t]:{validations:Object.assign(Object.assign({},m),u),subviews:Object.assign(Object.assign({},g),p&&o?{[o]:Object.assign(Object.assign({},g[o]),p)}:{})}})})},validateFieldCustomResult(e,t,n,r,i){var o,a,s,l;const d=r&&!i?{[n]:r}:{},c=r&&i?{[n]:r}:{},u=e.validationStates,p=null!==(o=null===(s=u[t])||void 0===s?void 0:s.validations)&&void 0!==o?o:{},h=null!==(a=null===(l=u[t])||void 0===l?void 0:l.subviews)&&void 0!==a?a:{};return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},u),{[t]:{validations:Object.assign(Object.assign({},p),d),subviews:Object.assign(Object.assign({},h),c&&i?{[i]:Object.assign(Object.assign({},h[i]),c)}:{})}})})},validateCurrentSubview(e,t){const n=nt(e);if(n&&rt(n)){const r=n.subviewId,i=n.cardInstance.subviews[r],o=Ct(e,i.nodes,t,r);let a=e.validationStates;return Object.assign(Object.assign({},e),{validationStates:Object.assign(Object.assign({},a),{[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=Ct(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})})})}}),wt=(e,t,n,r)=>{var i;const o=e.cardResponses[t]||{},a=r?null===(i=o.subviews)||void 0===i?void 0:i[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({},a),n)}:{})}})})},xt=(e,t,n,r,i,o,a)=>Object.assign(Object.assign({},e),{externalAction:Object.assign({actionId:(new Date).getTime(),linkMethod:t,trigger:n,cardInstanceId:r,cardViewState:i,subviewData:a},o?{payload:{actionPayload:o,cardInstanceId:r,streamContainerId:e.application.streamContainerId}}:{})}),kt=(e,t,n,r,i,o,a)=>Object.assign(Object.assign({},e),{externalAction:{actionId:(new Date).getTime(),linkMethod:t,trigger:n,urlLink:o,cardInstanceId:r,cardViewState:i,subviewData:a}}),Ct=(e,t,n,r)=>{var i;const o=gp(t),a=r?null===(i=e.cardResponses[n].subviews)||void 0===i?void 0:i[r]:e.cardResponses[n].responses;let s={};for(const e in o){const t=o[e];t.attributes.name&&a&&(s[t.attributes.name]=St(a[t.attributes.name],t.validations))}return s};let Ot;const Mt=()=>(Ot||(Ot=(0,Q.kv)((0,Q.Y2)(yt),be())),Ot),It=(e,t,n)=>{var r,i;const o=be().getState().cardResponses,a=null===(r=o[e])||void 0===r||null===(i=r.responses)||void 0===i?void 0:i[t];return null!=a?a: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},Nt="card-displayed",Ft="user-redirected",Lt="card-voted-up",Tt="card-voted-down",At="runtime-vars-updated",jt="stream-displayed",_t="snooze-options-displayed",Et="snooze-options-canceled",Dt="card-subview-displayed",Ht="card-subview-exited",Pt="video-played",Rt="video-completed",$t="user-file-uploads-started",Bt="user-file-uploads-completed",Vt="user-file-uploads-failed";var zt=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Wt=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function Ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const qt="AACUploadFailedError",Yt="AACUploadSignedUrlFailedError",Zt="AACNoFileToUploadError",Kt="AACUploadCancelledError",Gt="Couldn't upload file(s)",Xt="Couldn't upload file(s)",Qt="No files to upload",Jt="File upload cancelled";class en{constructor(){Ut(this,"_fileStorage",void 0),Ut(this,"_uploadQueue",void 0),this._fileStorage=new Map,this._uploadQueue=new Map,en._instance=this}static getInstance(){return en._instance||(en._instance=new en),en._instance}storeFile(e,t,n,r,i,o,a,s,l){var d,c,u,p;(this._fileStorage.get(i)||this._fileStorage.set(i,new Map),null===(d=this._fileStorage.get(i))||void 0===d?void 0:d.get(r))||(null===(p=this._fileStorage.get(i))||void 0===p||p.set(r,{topLevel:new Map,subviews:{}}));l&&!(null===(c=this._fileStorage.get(i))||void 0===c||null===(u=c.get(r))||void 0===u?void 0:u.subviews[l])&&(this._fileStorage.get(i).get(r).subviews[l]=new Map);const h={file:e,type:t,targetBucketId:n,destinationFilename:o,convertImage:a,size:e.size,uploaded:!1};l?this._fileStorage.get(i).get(r).subviews[l].set(s,h):this._fileStorage.get(i).get(r).topLevel.set(s,h)}getFile(e,t,n,r){var i,o,a,s,l,d;return r?(null===(s=this._fileStorage.get(e))||void 0===s||null===(l=s.get(t))||void 0===l||null===(d=l.subviews[r])||void 0===d?void 0:d.get(n))||null:(null===(i=this._fileStorage.get(e))||void 0===i||null===(o=i.get(t))||void 0===o||null===(a=o.topLevel)||void 0===a?void 0:a.get(n))||null}getAllFilesForCard(e,t){var n;return(null===(n=this._fileStorage.get(e))||void 0===n?void 0:n.get(t))||null}removeFile(e,t,n,r){var i,o,a,s,l,d,c,u;return r?null!==(i=null===(d=this._fileStorage.get(e))||void 0===d||null===(c=d.get(t))||void 0===c||null===(u=c.subviews[r])||void 0===u?void 0:u.delete(n))&&void 0!==i&&i:null!==(o=null===(a=this._fileStorage.get(e))||void 0===a||null===(s=a.get(t))||void 0===s||null===(l=s.topLevel)||void 0===l?void 0:l.delete(n))&&void 0!==o&&o}removeAllFilesForCard(e,t){var n;null===(n=this._fileStorage.get(e))||void 0===n||n.delete(t)}removeFilesForCardSubview(e,t,n){var r,i;null===(r=this._fileStorage.get(e))||void 0===r||(null===(i=r.get(t))||void 0===i||delete i.subviews[n])}removeFilesForContainer(e){this._fileStorage.delete(e)}getIsUploadingStatus(e){var t;const n=null===(t=this._uploadQueue.get(e))||void 0===t?void 0:t.size;return!!n&&n>0}uploadFile(e,t,n,r,i){return zt(this,void 0,void 0,(function*(){return new Promise(((o,a)=>zt(this,void 0,void 0,(function*(){var s;const{file:l,targetBucketId:d,destinationFilename:c}=n,u=null===(s=this._uploadQueue.get(t))||void 0===s?void 0:s.get(e);let p=!1;const h=new Error(Jt);h.name=Kt,u&&(u.uploadRequests[r]={abort:()=>{p=!0,ue.debug({level1:[`File upload for card: ${e} in container instance: ${t} was cancelled`,c]}),a({error:h,fieldname:r,filename:c})}});let m=`get-file-upload-url?filename=${encodeURIComponent(c)}&targetBucketId=${d}&card_instance_id=${e}`;n.convertImage&&(m+="&jpeg_convert=1");const{data:{uploadUrl:g},response:f}=yield Kp.get(m,i);if(p)return;if(f.error){ue.error({level1:["Failed to get upload URL",f.error]});const e=new Error(Xt);return e.name=Yt,a({error:e,fieldname:r,filename:c})}const v=new XMLHttpRequest,b=new Error(Gt);b.name=qt,v.onload=()=>{v.status>=200&&v.status<300?(ue.debug({level1:[`File upload for card: ${e} in container instance: ${t} was successful`,c]}),o(r)):(ue.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,c]}),a({error:b,fieldname:r,filename:c}))},v.onerror=()=>{ue.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,c]}),a({error:b,fieldname:r,filename:c})},v.onabort=()=>{ue.debug({level1:[`File upload for card: ${e} in container instance: ${t} was cancelled`,c]});const n=new Error(Jt);n.name=Kt,a({error:n,fieldname:r,filename:c})},u&&(u.uploadRequests[r]=v);try{v.open("PUT",g,!0);const e=new FormData;e.append("file",l,c),v.send(e.get("file"))}catch(n){ue.error({level1:[`File upload for card: ${e} in container instance: ${t} has failed`,n]}),a({error:b,fieldname:r,filename:c})}}))))}))}uploadFilesForCard(e,t,n,r,i){return zt(this,void 0,void 0,(function*(){var o,a,s,l,d,c;const u=null==i?void 0:i.subviewData,p=(null==u?void 0:u.subviewId)?null===(o=this._fileStorage.get(t))||void 0===o||null===(a=o.get(e))||void 0===a?void 0:a.subviews[u.subviewId]:null===(s=this._fileStorage.get(t))||void 0===s||null===(l=s.get(e))||void 0===l?void 0:l.topLevel;if(!p){const e=new Error(Qt);return e.name=Zt,{success:!1,error:e}}this._uploadQueue.set(t,(new Map).set(e,{cancelSubmitCallback:null==i?void 0:i.cancelSubmitCallback,uploadRequests:[]}));const h=[];for(const[e,t]of p)t.uploaded||h.push(Object.assign(Object.assign({},t),{fieldname:e}));const m=Object.assign({},(null==u?void 0:u.subviewId)?{subviewId:u.subviewId,subviewTitle:u.subviewTitle,subviewLevel:1}:{}),g=Object.assign({},m),f=h.map((r=>{const{fieldname:i}=r,o=Wt(r,["fieldname"]);if(g[i]={filename:o.destinationFilename,targetBucketId:o.targetBucketId},"image"===o.type)return this.uploadFile(e,t,o,i,n)})),v={success:!1};return r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:$t,properties:g}),yield Promise.allSettled(f).then((n=>{const i=[],o=[],a=Object.assign({},m),s=Object.assign({},m),l=n=>{var r,i,o,a,s;return(null==u?void 0:u.subviewId)?null===(r=this._fileStorage.get(t))||void 0===r||null===(i=r.get(e))||void 0===i||null===(o=i.subviews[u.subviewId])||void 0===o?void 0:o.get(n):null===(a=this._fileStorage.get(t))||void 0===a||null===(s=a.get(e))||void 0===s?void 0:s.topLevel.get(n)};n.forEach((n=>{var r;if("fulfilled"===n.status&&(null===(r=this._fileStorage.get(t))||void 0===r?void 0:r.get(e))){const e=l(n.value);e&&(e.uploaded=!0),a[n.value]={filename:null==e?void 0:e.destinationFilename,targetBucketId:null==e?void 0:e.targetBucketId}}else if("rejected"===n.status){const e=n.reason;if(e.error.name===Kt)o.push(n.reason);else{i.push(e);const t=l(e.fieldname);s[e.fieldname]={filename:null==t?void 0:t.destinationFilename,targetBucketId:null==t?void 0:t.targetBucketId},v.error=e.error}}})),i.length||o.length||(ue.debug({level1:[`All files successfully uploaded for card: ${e} in container instance: ${t}`]}),r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Bt,properties:a}),v.success=!0),i.length&&(ue.error({level1:[`Failed to upload files for card: ${e} in container instance: ${t}`,...i]}),r.sendEvent({cardInstanceId:e,cardViewState:(null==u?void 0:u.subviewId)?"subview":"topview",eventName:Vt,properties:s}),v.failedUploads=i),o.length&&(v.cancelledUploads=o)})),null===(d=this._uploadQueue.get(t))||void 0===d||d.delete(e),(null===(c=this._uploadQueue.get(t))||void 0===c?void 0:c.size)||this._uploadQueue.delete(t),v}))}cancelUploadForCard(e,t){return zt(this,void 0,void 0,(function*(){var n,r,i;const o=null===(n=this._uploadQueue.get(e))||void 0===n?void 0:n.get(t);var a;o&&(Object.values(o.uploadRequests).forEach((e=>{e.abort()})),null===(a=o.cancelSubmitCallback)||void 0===a||a.call(o));null===(r=this._uploadQueue.get(e))||void 0===r||r.delete(t),(null===(i=this._uploadQueue.get(e))||void 0===i?void 0:i.size)||this._uploadQueue.delete(e)}))}cancelUploadsForContainer(e){return zt(this,void 0,void 0,(function*(){const t=this._uploadQueue.get(e);t&&(t.forEach((e=>{var t;Object.values(e.uploadRequests).forEach((e=>{e.abort()})),null===(t=e.cancelSubmitCallback)||void 0===t||t.call(e)})),this._uploadQueue.delete(e))}))}}Ut(en,"_instance",void 0);en.getInstance();var tn=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const nn=(e,t)=>e?Object.keys(e).reduce(((n,r)=>{const i=e[r];return t.includes(i||"")||(n[r]=e[r]),n}),{}):e,rn=e=>nn(e,["submitted","dismissed","snoozed","submitted-subview","centering"]),on=(e,t,n)=>{var r,i;const o=null===(r=e.cardFeed.cardInstances.filter((e=>e.instance.id!==t))[0])||void 0===r||null===(i=r.instance)||void 0===i?void 0:i.id;return Object.assign(Object.assign({},e.cardStates),o&&{[o]:n})},an=(e,t,n)=>(e||[]).reduce(((e,r,i)=>(n[r.instance.id]&&void 0===(t||[]).find((e=>e.instance.id===r.instance.id))&&e.splice(i,0,r),e)),[...t]),sn=function(){let e=Number(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0);return""+ ++e},ln=(e,t,n)=>{var r;if(!n)return e;switch(n.name){case $p.noInternet:return"No internet connection";case qt:case Zt:case Yt:return(null==t||null===(r=t.toastMessages)||void 0===r?void 0:r.fileUploadFailed)||n.message;default:return e}},dn=(e,t)=>{var n;return((null===(n=t.application.enabledUiElements.toastConfig)||void 0===n?void 0:n.toastMessages)||{})[e]},cn=(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:sn(e.messages.lastMessageId),cardList:void 0,subview:void 0}}},un=()=>({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?cn(e):e.messages})},startCardFileUpload:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:"uploading-files"})}),finishCardFileUpload:(e,t)=>Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},e.cardStates),{[t]:null})}),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),i=sn(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:i,cardInstanceId:t,action:"submitted"},lastMessageId:i})})},failedToSubmitCard(e,t,n,r,i,o){const a=nn(e.cardStates,["centering","fixed-position"]),s=sn(e.messages.lastMessageId),l=e.application.enabledUiElements.toastConfig,d=Object.assign({text:ln("Couldn't submit",l,i),messageId:s,cardInstanceId:t,action:"submit-failed",responseValues:r},o||{});return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},a),{[t]:null}),messages:Object.assign(Object.assign({},n?{subview:d}:{cardList:d}),{lastMessageId:s})})},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=sn(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 i=nn(e.cardStates,["centering","fixed-position"]),o=sn(e.messages.lastMessageId),a=e.application.enabledUiElements.toastConfig;return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},i),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:ln("Couldn't dismiss",a,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),i=sn(e.messages.lastMessageId);let o;return o=(0,le.isToday)(n)?(0,le.format)(n,"h:mm A"):(0,le.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:i,cardInstanceId:t,action:"snoozed"},lastMessageId:i})})},failedToSnoozeCard(e,t,n,r,i){const o=nn(e.cardStates,["centering","fixed-position"]),a=sn(e.messages.lastMessageId),s=e.application.enabledUiElements.toastConfig;return Object.assign(Object.assign({},e),{cardStates:Object.assign(Object.assign({},o),{[t]:null}),messages:Object.assign(Object.assign({},e.messages),{cardList:{text:ln("Couldn't snooze",s,i),messageId:a,cardInstanceId:t,action:"snooze-failed",snoozeDate:n,source:r},lastMessageId:a})})},fixPositionRemainingCard:(e,t)=>Object.assign(Object.assign({},e),{cardStates:e.cardFeed.cardInstances.length<=2?on(e,t,"fixed-position"):nn(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?on(e,t,"centering"):nn(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})},queueCardFeedDeltaUpdate:(e,t)=>Object.assign(Object.assign({},e),{pendingCardFeedUpdates:[...e.pendingCardFeedUpdates||[],...t]}),clearCardFeedDeltaUpdateQueue:e=>Object.assign(Object.assign({},e),{pendingCardFeedUpdates:[]}),applyCardFeedDeltaUpdate(e,t,n,r){return tn(this,void 0,void 0,(function*(){let i={cardFeed:{cardInstances:e.cardFeed.cardInstances,runtimeVariables:e.cardFeed.runtimeVariables},cardStates:e.cardStates,navigationStack:e.navigationStack},o=!1,a=[];if(t.forEach((t=>{switch(t.type){case"remove-card":{const{cardInstanceId:n,actionType:r}=t.data;if("limit"!==r&&(o=!0),e.application.isPreview)break;const a=i.cardFeed.cardInstances,s=e.application.isPreview?a:a.filter((e=>e.instance.id!==n));i.cardFeed.cardInstances=s;break}case"update-card":{const{cardInstance:e,actionType:n}=t.data;let r=!1;e.runtimeVariables&&a.push(e);const s=i.cardFeed.cardInstances.map((t=>(t.instance.id===e.instance.id&&(r=!0,t=Object.assign({},e)),t)));r||(o=!0,s.push(e)),"unsnooze"===n&&(i.cardStates[e.instance.id]=null),i.cardFeed.cardInstances=s;break}}})),a.length>0){const t=yield r(a),n=e.cardFeed.runtimeVariables.values;i.cardFeed.runtimeVariables={values:new Map([...n||new Map,...(null==t?void 0:t.values)||new Map]),updateId:(new Date).getTime()}}i.cardFeed.cardInstances=(e=>null==e?void 0:e.sort(((e,t)=>{const{priority:n,lastCardActiveTime:r,receivedAt:i}=e.metadata,{priority:o,lastCardActiveTime:a,receivedAt:s}=t.metadata;let l=0;return l=n-o,0===l&&(l=new Date(a).getTime()-new Date(r).getTime()),0===l&&(l=new Date(s).getTime()-new Date(i).getTime()),l})))(i.cardFeed.cardInstances),n(e.cardFeed.cardInstances.length!==i.cardFeed.cardInstances.length||o),"single-card"===e.application.embedMode&&(i.navigationStack={items:[]});const s=nn(i.cardStates,["centering","fixed-position"]),l=rn(s),d=an(e.cardFeed.cardInstances,i.cardFeed.cardInstances,l);return i.cardFeed.cardInstances=d,{cardFeed:Object.assign(Object.assign({},e.cardFeed),{cardInstances:i.cardFeed.cardInstances,runtimeVariables:i.cardFeed.runtimeVariables,tutorialSeen:e.cardFeed.tutorialSeen||d.length>0,updateId:(new Date).getTime(),status:{loaded:!0}}),cardStates:s,navigationStack:i.navigationStack}}))},clearMessage:(e,t)=>Object.assign(Object.assign({},e),{messages:cn(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===$p.noInternet)n="noInternet";else n="apiError";return ue.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=nn(e.cardStates,["centering","fixed-position"]),r=rn(n),i=an(e.cardFeed.cardInstances,t.cardInstances,r);return Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{lastModified:t.lastModified,cardInstances:i,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})},setCardFeedOverlay:(e,t)=>Object.assign(Object.assign({},e),{cardFeed:Object.assign(Object.assign({},e.cardFeed),{displayingOverlay:t})}),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 i=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=>vp(e,(null==i?void 0:i.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===$p.noInternet)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=sn(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 pn;const hn=()=>(pn||(pn=(0,Q.kv)((0,Q.Y2)(un),be())),pn);var mn=0,gn=document.head.appendChild(document.createElement("style")).sheet;function fn(e,t){var n="p"+mn++,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{gn.insertRule(e,gn.cssRules.length)}catch(e){}})),n}function vn(e,t){return t+"{"+e+"}"}function bn(e,t){var n=[""];for(var r in t=t||0,e){var i=e[r];i&&(r=r.replace(/[A-Z]/g,"-$&").toLowerCase(),i.sub||Array.isArray(i)?(i=Array.isArray(i)?i:[i]).forEach((function(e){return n[0]+=r+":"+e+";"})):(r=r.replace(/&/g,""),n.push(vn(bn(i,!/^@/.test(r)).join(""),r))))}return t||(n[0]=vn(n[0],"")),n}const Sn=function(e,t){var n={};return(t=t||{}).returnObject?{style:r,css:i}:r;function r(t){return function(n){return function(r,o){var a="function"==typeof n?n(r):n;return delete r.theme,r.class=[i(a),r.class].filter(Boolean).join(" "),e(t,r,r.children||[])}}}function i(e){var t=bn(e),r=t.join("");return n[r]||(n[r]=fn(t,"."))}}(o.h),yn=function(e){return fn([vn(bn(e,1).join(""),"")],"@keyframes ")};function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const xn="rgba(0, 0, 0, 1)",kn="rgba(255, 255, 255, 1)",Cn='-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',On={colors:{},typography:{},shape:{}};class Mn{constructor(e,t,n,r){wn(this,"theme",void 0),wn(this,"themeName",void 0),wn(this,"fontFamilies",void 0),wn(this,"hasSecondaryButtonStyle",!1),wn(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,d]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 i,o;const e="true"===(null==n||null===(i=n.shape)||void 0===i||null===(o=i.equalShadowOffsets)||void 0===o?void 0:o[l]);"string"==typeof d&&d.match(/\w+/g)&&e&&(this.hasSecondaryButtonStyle=!0);break}if(t.includes("equalShadowOffsets")||t.includes("equalPaddings"))break;r(d);break;case"actionSecondaryWidth":case"buttonSecondaryWidth":case"buttonHoverSecondaryWidth":case"buttonActiveSecondaryWidth":{var a,s;const e=l.replace("Width",""),t="true"===(null==n||null===(a=n.shape)||void 0===a||null===(s=a.equalPaddings)||void 0===s?void 0:s[e]);"string"==typeof d&&d.match(/\w+/g)&&t&&(this.hasSecondaryButtonStyle=!0);break}}if(!this.hasSecondaryButtonStyle&&null!==d&&"object"==typeof d&&!Array.isArray(d)){const e=t?t+"."+l:l;this.testSecondaryStyles(d,e,n)}}}));let i,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 a;o?i=(null===(a=e.alternate)||void 0===a?void 0:a.dark)||e.theme||{}:i=e.theme||{};this.testSecondaryStyles(i.feed||{},"",i.feed),this.testSecondaryStyles(i.workflow||{},"",i.workflow),this.themeName=t,this.theme=i[t]||On,this.fontFamilies=i.fontFamilies||[]}getShape(e,t){return Nn(this.theme.shape,e,(null==t?void 0:t.skipFallback)?null:"")}getCSSShadowProperties(e,t){var n,r;const i=this.getShape(`blur.${e}Shadow`,t),o=this.getShape(`equalShadowOffsets.${e}`,t),a=this.getShape(`shadowOffsets.${e}`,t),s=this.getShape(`shadowOffsets.${e}XAxis`,t),l=this.getShape(`shadowOffsets.${e}YAxis`,t),d=this.getShape(`shadowOffsetType.${e}`,t),c=this.getCSSColor(`shadow.${e}`,{skipFallback:!0}),u="inset"===d?"inset":"",p=null!==(n="true"===o?a:s)&&void 0!==n?n:"0px",h=null!==(r="true"===o?a:l)&&void 0!==r?r:"0px";if(!c||c.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/))return"";return`${u} ${p} ${h} ${i||""} ${c}`.trim()}getShadowVerticalExtent(e,t){var n,r;const i=this.getCSSColor(`shadow.${e}`,{skipFallback:!0});if(!i||i.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/))return 0;const o=this.getShape(`equalShadowOffsets.${e}`,t),a=this.getShape(`shadowOffsets.${e}`,t),s=this.getShape(`shadowOffsets.${e}YAxis`,t),l="true"===o?a:s,d=this.getShape(`blur.${e}Shadow`,t),c=Math.max(0,null!==(n=Fn(d))&&void 0!==n?n:0),u=null!==(r=Fn(l))&&void 0!==r?r:0;return c+Math.abs(u)}getNumericalPadding(e){var t,n,r,i;const o=null!==(t=null===(r=this.theme.shape)||void 0===r?void 0:r.padding)&&void 0!==t?t:{},a=null!==(n=null===(i=this.theme.shape)||void 0===i?void 0:i.equalPaddings)&&void 0!==n?n:{},s=Nn(a,`${e}`,null),l=Nn(o,`${e}Width`,null),d=Nn(o,`${e}Top`,null),c=Nn(o,`${e}Right`,null),u=Nn(o,`${e}Bottom`,null),p=Nn(o,`${e}Left`,null),h=Fn(l);if(!0===s||"true"===s)return{top:h,right:h,bottom:h,left:h};const m=Fn(d),g=Fn(c),f=Fn(u),v=Fn(p);return void 0!==m||void 0!==g||void 0!==f||void 0!==v?{top:null!=m?m:0,right:null!=g?g:0,bottom:null!=f?f:0,left:null!=v?v:0}:{top:m,right:g,bottom:f,left:v}}getPadding(e){const{top:t,right:n,bottom:r,left:i}=this.getNumericalPadding(e);return void 0!==t||void 0!==n||void 0!==r||void 0!==i?`${t||0}px ${n||0}px ${r||0}px ${i||0}px`:""}getHorizontalRule(e){const t={enabled:!1,insetLeft:void 0,insetRight:void 0,width:void 0,color:void 0};if(!this.theme.horizontalRule)return t;t.enabled=Nn(this.theme.horizontalRule,`${e}.enabled`,!1),t.insetLeft=Nn(this.theme.horizontalRule,`${e}.insetLeft`,"0px"),t.insetRight=Nn(this.theme.horizontalRule,`${e}.insetRight`,"0px"),t.width=Nn(this.theme.horizontalRule,`${e}.width`,"0px");const n={color:Nn(this.theme.horizontalRule,`${e}.color`,null),opacity:Nn(this.theme.horizontalRule,`${e}.opacity`,null)};return t.color=n&&(null==n?void 0:n.color)?In(n.color,n.opacity):In("#000000",0),t}getCSSColor(e,t){const n=Nn(this.theme.colors,e,null);if(n&&(null==n?void 0:n.color)&&!(null==t?void 0:t.skipPrimaryStyle))return In(n.color,n.opacity);if(null==t?void 0:t.skipFallback)return null;const r=Nn(function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"feed";return{icon:{switchOff:kn,switchOn:kn,selectionIndicator:xn,selectionIndicatorActive:xn},background:Object.assign(Object.assign({switchOff:"rgba(128, 128, 128, 1)",switchOn:xn,modalContainer:"rgba(0, 0, 0, 0.5)",dropdownMenu:kn,dropdownMenuSelectedIcon:xn},"feed"===e?{card:kn}:{}),"workflow"===e?{default:xn}:{}),text:{dropdownMenuItem:xn}}}(this.themeName),e,null);return r||("workflow"===this.themeName?e.startsWith("background")?xn:kn:e.startsWith("background")?"rgba(0, 0, 0, 0)":xn)}getFontFamilies(){return this.fontFamilies}getTypographyStyle(e){return Nn(this.theme.typography,e,null)||{size:"17px",isDefaultTypography:!0}}getNumericFontSize(e,t){var n;const r=this.getTypographyStyle(e);return(null==t?void 0:t.skipFallback)&&r.isDefaultTypography?null:r&&r.size?(null===(n=r.scaling)||void 0===n?void 0:n.enabled)?this.getNumericScaledFontSize(r):Number(r.size.replace(/px/g,"")):null}getNumericScaledFontSize(e){const t=Number(window.getComputedStyle(document.documentElement).getPropertyValue("font-size").replace("px","")),n=t?t/16:1,r=e.size?Number(e.size.replace(/px/g,"")):17,i=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&&i<t)return t;if(n&&i>n)return n}return i}getCSSFontProperties(e,t){var n,r;const i=this.getTypographyStyle(e);if(!i)return{};if((null==t?void 0:t.skipFallback)&&i.isDefaultTypography)return null;const o=i.transform?i.transform:(null==t?void 0:t.skipFontFallbacks)?null:"none",a=Math.max(i.lineHeight||1,1),s=(null!==(n=this.getNumericFontSize(e,t))&&void 0!==n?n:17)*a+"px",l=(null===(r=i.scaling)||void 0===r?void 0:r.enabled)?`${this.getNumericScaledFontSize(i)}px`:i.size,d=i.fontFamily?`"${i.fontFamily}", ${Cn}`:Cn,c=i.weight||((null==t?void 0:t.skipFontFallbacks)?null:"normal"),u=i.style||((null==t?void 0:t.skipFontFallbacks)?null:"normal"),p=i.align;return Object.assign({textTransform:o,lineHeight:s,fontSize:l,fontFamily:d,fontWeight:c,fontStyle:u,fontSynthesis:"weight style"},p?{textAlign:p}:{})}getElementFocusCSSProperties(){return{outline:"none","&.focus-visible":{boxShadow:`0 0 0 2px ${this.getCSSColor("border.focus")} inset`}}}}const In=(e,t)=>{const n=e.replace("#",""),r=parseInt(n,16);return`rgba(${[r>>16&255,r>>8&255,255&r].join(",")},${t})`},Nn=(e,t,n)=>(e=e[(t=Array.isArray(t)?t:t.split("."))[0]])&&t.length>1?Nn(e,t.slice(1),n):void 0!==e?e:n,Fn=e=>{if(null==e)return;if("number"==typeof e)return e;const t=parseFloat(e.replace(/px/g,""));return isNaN(t)?void 0:t},Ln=e=>"secondaryVariant"===e?"Secondary":"tertiaryVariant"===e?"Tertiary":"",Tn=e=>"h2"===e?"H2":"h3"===e?"H3":"",An=e=>"secondaryVariant"===e?"Secondary":"tertiaryVariant"===e?"Tertiary":"Primary",jn=(e,t)=>n=>{let{themeMethod:r,primaryAccessor:i,secondaryAccessor:o,fallbackStyle:a,skipThemeHelperFallbacks:s,skipDefaultStyle:l}=n;const d=i?e[r](i,{skipFallback:s}):void 0,c=o?e[r](o,{skipFallback:!0}):void 0;let u="getCSSColor"===r?e.getCSSColor(i||o||"",{skipPrimaryStyle:!0}):e[r]("");return l&&(u=""),"secondary"===t&&c?c:d&&("primary"===t||"secondary"===t&&!e.hasSecondaryButtonStyle)?d:a||u||""},_n=e=>"string"!=typeof e?(ue.warn({level3:["Expected a string value for RGBA color, but received:",e]}),!1):null!==e.replace(/\s/g,"").match(/rgba\(\d+,\d+,\d+,0\)/),En=yn({from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}),Dn=Sn("svg")((()=>({animation:`${En} 1s infinite linear`}))),Hn=e=>{let{stopColor:t,size:n}=e;return(0,o.h)(Dn,{width:n,height:n,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.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:t,"stroke-width":"2","stroke-linecap":"round"}))},Pn=()=>(0,o.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/26.2.0/assets/fonts/font-awesome-5-15-4/fa-solid-900.woff');\n }\n "),Rn={"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:""},$n=e=>{let{fillColor:t,ariaHidden:n=!1,alt:r=""}=e;return(0,o.h)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":n},(0,o.h)("title",null,r),(0,o.h)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 2H2V13.398L9.66274 8.25944C10.1695 7.91961 10.8316 7.92061 11.3374 8.26198L14 10.0593V2ZM14 14H2.89774L10.2197 9.08999C10.3886 8.97671 10.6093 8.97704 10.7779 9.09083L14 11.2657V14ZM2 1C1.44772 1 1 1.44772 1 2V14C1 14.5523 1.44772 15 2 15H14C14.5523 15 15 14.5523 15 14V2C15 1.44772 14.5523 1 14 1H2ZM6 4C4.89543 4 4 4.89543 4 6C4 7.10457 4.89543 8 6 8C7.10457 8 8 7.10457 8 6C8 4.89543 7.10457 4 6 4ZM5 6C5 5.44771 5.44771 5 6 5C6.55229 5 7 5.44771 7 6C7 6.55229 6.55229 7 6 7C5.44771 7 5 6.55229 5 6Z",fill:t}))},Bn=Sn("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)})),Vn=Sn("div")((e=>{var t;let{color:n,size:r,styles:i}=e;return Object.assign(Object.assign(Object.assign({display:"flex",justifyContent:"center",alignItems:"center"},n?{fill:n}:{}),i),{width:`${r}px`,height:null!==(t=i.lineHeight)&&void 0!==t?t:`${r}px`})})),zn=e=>{let{iconName:t,iconUrl:n,iconAltText:r,size:i,color:a,fallbackColor:s,styles:l={},scaleToFit:d=!1}=e;const[c,u]=h(!1),[p,m]=h(!1),f=v(n);g((()=>{n&&n!==f.current&&(f.current=n,u(!1),m(!1))}),[n]);if(n&&c&&!p)return(0,o.h)(Vn,{size:i,styles:l},(0,o.h)("img",{"aria-hidden":!r,"aria-label":r||"",alt:r||"",src:n,onError:()=>{ue.error({level1:[`Error loading custom icon: ${n}`]}),m(!0)},style:{width:"100%",height:"100%",objectFit:"cover"}}));if(n&&!c)return(0,o.h)(Vn,{size:i,styles:l},(0,o.h)("svg",{"aria-hidden":!r,"aria-label":r||"","data-src":n,"data-replacement-color":a,"data-container-size":i,"data-scale-to-fit":d?"enabled":void 0,oniconloaderror:()=>{ue.warn({level1:[`Could not load custom icon via SVG loader: ${n}`]}),u(!0)},style:Object.assign({maxWidth:`${i}px`,maxHeight:`${i}px`},a?{color:a}:{})}));if(t){const e=Rn[t];return a&&(l.color=a),e?(0,o.h)(Bn,{styles:l,size:i,role:"img","aria-hidden":!r,"aria-label":r||""},e):(0,o.h)(Vn,{size:i,styles:l,role:"img","aria-hidden":!r,"aria-label":r||""},t)}return(0,o.h)(Vn,{size:i,styles:l},(0,o.h)($n,{alt:"",fillColor:null!=a?a:s}))},Wn=Sn("hr")((e=>{var t,n,r,i,o,a;let{theme:s,ruleStyles:l,isSubview:d,isBetweenButtons:c,translateY:u}=e,p="0px",h="0px",m=0,g=0;if(d){const e=s.getNumericalPadding("stream");m=null!==(t=null==e?void 0:e.left)&&void 0!==t?t:ke,g=null!==(n=null==e?void 0:e.right)&&void 0!==n?n:ke}else{const e=s.getNumericalPadding("card");m=null!==(r=null==e?void 0:e.left)&&void 0!==r?r:we,g=null!==(i=null==e?void 0:e.right)&&void 0!==i?i:we}if(c){const e=s.getNumericalPadding("buttonGroup");m=null!==(o=null==e?void 0:e.left)&&void 0!==o?o:m,g=null!==(a=null==e?void 0:e.right)&&void 0!==a?a:g}return p=(Fn(null==l?void 0:l.insetLeft)||0)-m+"px",h=(Fn(null==l?void 0:l.insetRight)||0)-g+"px",Object.assign({border:"none",borderBottom:`${(null==l?void 0:l.width)||"0px"} solid ${(null==l?void 0:l.color)||"rgba(0,0,0,0)"}`,margin:"0",width:`calc(100% + ${m-(Fn(null==l?void 0:l.insetLeft)||0)}px + ${g-(Fn(null==l?void 0:l.insetRight)||0)}px)`,marginLeft:p,marginRight:h},u?{transform:`translateY(${u})`}:{})})),Un=e=>{let{theme:t,ruleStyles:n,isSubview:r,isBetweenButtons:i,class:a,translateY:s}=e;return(0,o.h)(Wn,{"aria-hidden":"true",theme:t,ruleStyles:n,isSubview:r,isBetweenButtons:i,class:a,translateY:s})};function qn(){return qn=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},qn.apply(this,arguments)}const Yn=e=>{let{theme:t,appearance:n}=e;const r=jn(t,n),i=(e,t)=>t?{[e]:t}:{},o=t.getShape("buttonWidth.global"),a=r({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}});return Object.assign(Object.assign(Object.assign({position:"relative",cursor:"pointer",width:"hugsLabel"===o?"auto":"100%",maxWidth:"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"},a),{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({},i("color",r({themeMethod:"getCSSColor",primaryAccessor:"text.buttonHover",secondaryAccessor:"text.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("backgroundColor",r({themeMethod:"getCSSColor",primaryAccessor:"background.buttonHover",secondaryAccessor:"background.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonHover",secondaryAccessor:"borderRadius.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("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({},i("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})}),i("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonActive",secondaryAccessor:"borderRadius.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})))}),t.getElementFocusCSSProperties())},Zn=Sn("button")((e=>Object.assign({},Yn(e)))),Kn=Sn("a")((e=>Object.assign(Object.assign({},Yn(e)),{textDecoration:"none"}))),Gn=Sn("div")((e=>{var t,n;let r,i,{labelAlignment:o,iconAlignment:a,visible:s}=e;return"right"===a?(r="row-reverse",i=null!==(t=null==o?void 0:o.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"center"):(r="row",i=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:i,alignItems:"center",flexDirection:r,visibility:s?"visible":"hidden"}})),Xn=Sn("div")({display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"}),Qn=Sn("span")({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),Jn=e=>{let{nodeKey:t,localIndex:n,clickHandler:r,text:i,icon:a,iconUrl:s,iconAltText:l,theme:d,appearance:c,loading:u,type:p,urlLink:h}=e;const m=h?Kn:Zn,g=jn(d,c),f=g({themeMethod:"getCSSFontProperties",primaryAccessor:"button",secondaryAccessor:"buttonSecondary",fallbackStyle:{}}),v=g({themeMethod:"getShape",primaryAccessor:"align.buttonIcon",secondaryAccessor:"align.buttonIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),b=g({themeMethod:"getShape",primaryAccessor:"lineHeight.buttonIcon",secondaryAccessor:"lineHeight.buttonIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),S=g({themeMethod:"getNumericFontSize",primaryAccessor:"button",secondaryAccessor:"buttonSecondary"}),y=Object.assign(Object.assign({},"left"===v?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:S*b+"px",color:g({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),w=g({themeMethod:"getCSSColor",primaryAccessor:"icon.button",secondaryAccessor:"icon.buttonSecondary"}),x=d.getHorizontalRule("buttonGroupBetween"),k=d.getShape("buttonLayout.global"),C=(null==x?void 0:x.enabled)&&"horizontal"!==k&&n&&n>0,O={href:null==h?void 0:h.url,target:null==h?void 0:h.target,role:"button"};return(0,o.h)(o.Fragment,null,C&&(0,o.h)(Un,{class:"horizontal-rule-between",theme:d,ruleStyles:x,isSubview:!0,isBetweenButtons:!0}),(0,o.h)(m,qn({key:t,"data-element-key":t,ariaLabel:Lp({elementName:"button",label:i,iconAltText:l,hasIcon:!(!a&&!s)}),class:"action-button submit-button",onClick:r,theme:d,appearance:c,tabIndex:"0",type:p},h?O:{}),(0,o.h)(o.Fragment,null,u&&(0,o.h)(Xn,null,(0,o.h)(Hn,{stopColor:d.getCSSColor("text.button"),size:22})),(0,o.h)(Gn,{"data-testid":"button-content-wrapper",labelAlignment:null==f?void 0:f.textAlign,iconAlignment:v,visible:!u},(a||s)&&(0,o.h)(zn,{iconName:a,iconUrl:s,size:S,color:y.color,fallbackColor:w,styles:Object.assign(Object.assign(Object.assign({},y),!i&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,o.h)(Qn,null,i)))))};function er(){return er=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},er.apply(this,arguments)}const tr=e=>{let{theme:t,appearance:n}=e;const r=jn(t,n),i=(e,t)=>t?{[e]:t}:{},o=t.getShape("buttonWidth.global"),a=r({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}});return Object.assign(Object.assign(Object.assign({cursor:"pointer",width:"hugsLabel"===o?"auto":"100%",maxWidth:"100%",padding:r({themeMethod:"getPadding",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:"10px 20px"}),backgroundColor:r({themeMethod:"getCSSColor",primaryAccessor:"background.action",secondaryAccessor:"background.actionSecondary"}),color:r({themeMethod:"getCSSColor",primaryAccessor:"text.action",secondaryAccessor:"text.actionSecondary"}),textAlign:"left"},a),{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"}),display:"flex",alignItems:"center",":hover":Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},i("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})}),i("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonHover",secondaryAccessor:"buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonHover",secondaryAccessor:"border.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonHover",secondaryAccessor:"borderRadius.buttonHoverSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("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({},i("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})}),i("borderColor",r({themeMethod:"getCSSColor",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderWidth",r({themeMethod:"getShape",primaryAccessor:"border.buttonActive",secondaryAccessor:"border.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("borderRadius",r({themeMethod:"getShape",primaryAccessor:"borderRadius.buttonActive",secondaryAccessor:"borderRadius.buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("padding",r({themeMethod:"getPadding",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0}))),i("boxShadow",r({themeMethod:"getCSSShadowProperties",primaryAccessor:"buttonActive",secondaryAccessor:"buttonActiveSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})))}),t.getElementFocusCSSProperties())},nr=Sn("button")((e=>Object.assign({},tr(e)))),rr=Sn("a")((e=>Object.assign(Object.assign({},tr(e)),{textDecoration:"none"}))),ir=Sn("div")((e=>{var t,n;let r,i,{labelAlignment:o,iconAlignment:a}=e;return"right"===a?(r="row-reverse",i=null!==(t=null==o?void 0:o.replace("left","flex-end").replace("right","flex-start"))&&void 0!==t?t:"flex-end"):(r="row",i=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:i,alignItems:"center",flexDirection:r}})),or=Sn("span")((()=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),ar=e=>{let{nodeKey:t,localIndex:n,clickHandler:r,text:i,icon:a,iconUrl:s,iconAltText:l,theme:d,appearance:c,type:u,urlLink:p}=e;const h=p?rr:nr,m=jn(d,c),g=m({themeMethod:"getCSSFontProperties",primaryAccessor:"action",secondaryAccessor:"actionSecondary",fallbackStyle:{}}),f=m({themeMethod:"getShape",primaryAccessor:"align.actionIcon",secondaryAccessor:"align.actionIconSecondary",fallbackStyle:"left",skipThemeHelperFallbacks:!0}),v=m({themeMethod:"getShape",primaryAccessor:"lineHeight.actionIcon",secondaryAccessor:"lineHeight.actionIconSecondary",fallbackStyle:"1",skipThemeHelperFallbacks:!0}),b=m({themeMethod:"getNumericFontSize",primaryAccessor:"action",secondaryAccessor:"actionSecondary"}),S=Object.assign(Object.assign({},"left"===f?{marginRight:"10px"}:{marginLeft:"10px"}),{lineHeight:b*v+"px",color:m({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary",skipThemeHelperFallbacks:!0,skipDefaultStyle:!0})}),y=m({themeMethod:"getCSSColor",primaryAccessor:"icon.action",secondaryAccessor:"icon.actionSecondary"}),w=d.getHorizontalRule("buttonGroupBetween"),x=d.getShape("buttonLayout.global"),k=(null==w?void 0:w.enabled)&&"horizontal"!==x&&n&&n>0,C={href:null==p?void 0:p.url,target:null==p?void 0:p.target,role:"button"};return(0,o.h)(o.Fragment,null,k&&(0,o.h)(Un,{class:"horizontal-rule-between",theme:d,ruleStyles:w,isSubview:!1,isBetweenButtons:!0}),(0,o.h)(h,er({key:t,"data-element-key":t,class:"action-button",ariaLabel:Lp({elementName:"button",label:i,iconAltText:l,hasIcon:!(!a&&!s)}),onClick:r,theme:d,appearance:c,tabIndex:"0",type:u},p?C:{}),(0,o.h)(ir,{labelAlignment:null==g?void 0:g.textAlign,iconAlignment:f},(a||s)&&(0,o.h)(zn,{iconName:a,iconUrl:s,size:b,color:S.color,fallbackColor:y,styles:Object.assign(Object.assign(Object.assign({},S),!i&&{marginLeft:0,marginRight:0}),{alignSelf:"center",justifySelf:"start"})}),(0,o.h)(or,{"data-testid":"button-label"},i))))},sr=e=>e.isWorkflow?(0,o.h)(Jn,e):(0,o.h)(ar,e),lr=e=>{let{fillColor:t,className:n,style:r,ariaHidden:i=!0}=e;return(0,o.h)("svg",{width:"14",height:"10",viewBox:"0 0 14 10",class:n,style:r,focusable:"false","aria-hidden":i},(0,o.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:t}))},dr=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,focusable:"false"},(0,o.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"}))},cr=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t,focusable:"false"},(0,o.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"}))},ur=n(3054),pr=n(6756),hr=n(1295),mr=[];const gr={},fr=(e,t,n)=>{const{enableJs:r,disableUniqueIds:i,disableCssScoping:o,spriteIconId:a,replacementColor:s,containerSize:l,scaleToFit:d}=t,c=!!a,u=(new DOMParser).parseFromString(n,"text/html"),p=c?u.getElementById(a):u.querySelector("svg"),h=(()=>{if(mr.length)return mr;for(const e in document.body)e.startsWith("on")&&mr.push(e);return mr.push("onbegin","onend","onrepeat"),mr.push("onfocusin","onfocusout","onbounce","onfinish","onshow"),mr})(),m=gr[e.getAttribute("data-id")]||new Set,g=e.getAttribute("data-id")||`svg-loader_${hr.incr()}`,f={};if(i||Array.from(p.querySelectorAll("[id]")).forEach((e=>{const t=e.getAttribute("id"),n=`${t}_${hr.incr()}`;e.setAttribute("id",n),f[t]=n})),Array.from(p.querySelectorAll("*")).concat(p).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:i,value:o}=t.attributes[e],a=pr(f,o,i);o!==a&&t.setAttribute(i,a),!h.includes(i.toLowerCase())||r?["href","xlink:href","values"].includes(i)&&o.startsWith("javascript")&&!r&&n.push(i):n.push(i)}if(n.forEach((e=>t.removeAttribute(e))),"style"===t.tagName&&!o){let e=ur(t.innerHTML,`[data-id="${g}"]`,f);e=pr(f,e),e!==t.innerHTML&&(t.innerHTML=e)}})),e.innerHTML=a?p.outerHTML:p.innerHTML,!c)for(let t=0;t<p.attributes.length;t++){const{name:n,value:r}=p.attributes[t];e.getAttribute(n)&&!m.has(n)||(m.add(n),e.setAttribute(n,r))}gr[g]=m,e.setAttribute("data-id",g),function(e,t){const n=e.querySelectorAll("*"),r=new Map,i=(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"),a=e.getAttribute("stroke");t&&(n=t.match(/fill\s*:\s*([^;]+)/),r=t.match(/stroke\s*:\s*([^;]+)/));const s={...o?{fill:o}:{},...a?{stroke:a}:{},...n?{fillMatch:n}:{},...r?{strokeMatch:r}:{}};o&&i(o,e,s),a&&i(a,e,s),n&&i(n[1],e,s),r&&i(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,n){if(e.getAttribute("viewBox"))return;const r=e.getBBox({stroke:!0,fill:!0});if(r.width<=0||r.height<=0)return;const i=t&&(r.width>t||r.height>t),o=n&&t&&(r.width<t||r.height<t);(i||o)&&e.setAttribute("viewBox",`${r.x} ${r.y} ${r.width} ${r.height}`)}(e,l,d),function(e,t,n){if(e.getAttribute("viewBox"))return void(n?(e.setAttribute("width","100%"),e.setAttribute("height","100%")):t&&(e.setAttribute("width",t),e.setAttribute("height",t)));const r=e.getBBox({stroke:!0,fill:!0});n&&t&&(r.width<t||r.height<t)?(e.setAttribute("width",t),e.setAttribute("height",t)):(e.setAttribute("width",r.width),e.setAttribute("height",r.height))}(e,l,d);const v=new CustomEvent("iconload",{bubbles:!0});if(e.dispatchEvent(v),e.getAttribute("oniconload")){e.setAttribute("onauxclick",e.getAttribute("oniconload"));const t=new CustomEvent("auxclick",{bubbles:!1,view:window});e.dispatchEvent(t),e.removeAttribute("onauxclick")}},vr={},br={},Sr=async e=>{const t=new URL(e.getAttribute("data-src"),globalThis.location),n=t.toString().replace(t.hash,""),r=t.hash.replace("#",""),i="enabled"===e.getAttribute("data-js"),o="disabled"===e.getAttribute("data-unique-ids"),a="disabled"===e.getAttribute("data-css-scoping"),s=e.getAttribute("data-replacement-color"),l=e.getAttribute("data-container-size"),d="enabled"===e.getAttribute("data-scale-to-fit"),c=fr.bind(self,e,{enableJs:i,disableUniqueIds:o,disableCssScoping:a,spriteIconId:r,replacementColor:s,containerSize:l,scaleToFit:d});if(br[n]){const e=br[n];c(e)}else{if(vr[n])return void setTimeout((()=>Sr(e)),20);vr[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`);br[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 vr[n]}))}};let yr;globalThis.IntersectionObserver&&(yr=new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&(Sr(e.target),yr.unobserve(e.target))}))}),{rootMargin:"1200px"}));const wr=[];function xr(){Array.from(document.querySelectorAll("svg[data-src]:not([data-id])")).forEach((e=>{-1===wr.indexOf(e)&&(wr.push(e),"lazy"===e.getAttribute("data-loading")?yr.observe(e):Sr(e))}))}let kr=!1;if(globalThis.addEventListener){const vh=setInterval((()=>{xr()}),100);function bh(){clearInterval(vh),xr(),(()=>{if(kr)return;kr=!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])"))))))&&xr(),e.forEach((e=>{"attributes"===e.type&&Sr(e.target)}))})).observe(document.documentElement,{attributeFilter:["data-src"],attributes:!0,childList:!0,subtree:!0})})()}"interactive"===document.readyState||"complete"===document.readyState?bh():globalThis.addEventListener("DOMContentLoaded",(()=>{bh()}))}globalThis.SVGLoader={},globalThis.SVGLoader.updateMemoryCache=async(e,t)=>{br[e]=t};const Cr=()=>(0,o.h)("svg",{width:"3",height:"15",viewBox:"0 0 3 15",xmlns:"http://www.w3.org/2000/svg"},(0,o.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,o.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,o.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"})),Or=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",focusable:"false",style:t},(0,o.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"}))},Mr=e=>{let{style:t}=e;return(0,o.h)("svg",{width:"19",height:"19",viewBox:"0 0 19 19",fill:"none",xmlns:"http://www.w3.org/2000/svg",style:t},(0,o.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"}))},Ir=e=>e&&e.current&&e.current.base,Nr=30,Fr=10,Lr=e=>{var t,n,r,i,o,a,s,l;const d=e.getNumericalPadding("card"),c=e.getNumericalPadding("menuButton"),u=(null!==(t=c.top)&&void 0!==t?t:Fr)+Nr+(null!==(n=c.bottom)&&void 0!==n?n:Fr),p=(null!==(r=c.right)&&void 0!==r?r:Fr)+Nr+(null!==(i=c.left)&&void 0!==i?i:Fr);return{top:u>(null!==(o=d.top)&&void 0!==o?o:xe)?u-(null!==(a=d.top)&&void 0!==a?a:xe):0,right:p>(null!==(s=d.right)&&void 0!==s?s:we)?p-(null!==(l=d.right)&&void 0!==l?l:we):0}},Tr=e=>{var t,n,r,i;const{top:o,right:a,bottom:s,left:l}=e.getNumericalPadding("menuButton"),d=e.getNumericalPadding("card");return void 0===o&&void 0===a&&void 0===s&&void 0===l?{top:Fr-(null!==(t=d.top)&&void 0!==t?t:xe),right:Fr-(null!==(n=d.right)&&void 0!==n?n:20),bottom:Fr,left:Fr}:{top:(null!=o?o:0)-(null!==(r=d.top)&&void 0!==r?r:xe),right:(null!=a?a:0)-(null!==(i=d.right)&&void 0!==i?i:20),bottom:null!=s?s:0,left:null!=l?l:0}},Ar=Sn("button")((e=>{let{open:t,theme:n}=e;const{top:r,right:i}=Tr(n);return Object.assign({cursor:"pointer",position:"absolute",top:`${r}px`,right:`${i}px`,width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:Es.OVERFLOW_MENU_BUTTON,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())})),jr=Sn("button")((e=>{let{theme:t}=e;const{top:n,right:r}=Tr(t);return Object.assign({cursor:"pointer",position:"absolute",top:`${n}px`,right:`${r}px`,width:"30px",height:"30px",display:"flex",alignItems:"center",justifyContent:"center",border:"0px",borderRadius:"30px",zIndex:Es.OVERFLOW_MENU_BUTTON,background:t.getCSSColor("background.options")," > svg":{stroke:t.getCSSColor("icon.options")},"&:hover":{background:t.getCSSColor("background.optionsHover")},"&:active":{background:t.getCSSColor("background.optionsActive")},"&:hover > svg":{stroke:t.getCSSColor("icon.optionsHover")},"&:active > svg":{stroke:t.getCSSColor("icon.optionsActive")}},t.getElementFocusCSSProperties())})),_r=e=>{let{theme:t,open:n,feedOrientation:r,children:i,cardRef:a,ariaLabelledBy:s}=e;const l=v(null);let d={direction:"down",maxHeight:0,maxWidth:0};if(n){const e=t.getNumericalPadding("card"),n=Tr(t);d=((e,t,n,r,i)=>{var o,a,s,l;if(Ir(t)&&Ir(n)){const d=t.current.base,c=t.current.base.offsetParent,u=c.offsetParent,p=n.current.base,h=d.clientWidth-((null!==(o=null==r?void 0:r.left)&&void 0!==o?o:we)+(null!==(a=null==i?void 0:i.right)&&void 0!==a?a:0));if("horizontal"===e){const e=c.offsetLeft+p.offsetLeft-u.scrollLeft,t=u.clientWidth-(e>0?e:0),n=200,r=e>=n||t<n;return{direction:r?"left":"right",maxWidth:r?h:t}}const m=p.offsetTop,g=u.scrollHeight-c.offsetTop-(null!==(s=r.top)&&void 0!==s?s:xe)-(m+(null!==(l=r.top)&&void 0!==l?l:xe)),f=c.offsetTop,v=p.scrollHeight,b=g>=v||f<v;return{direction:b?"down":"up",maxHeight:b?g:f,maxWidth:h}}return{direction:"down",maxHeight:0,maxWidth:0}})(r,a,l,e,n),setTimeout((()=>{if(Ir(l)){const e=l.current.base.querySelector('[tabindex="0"]');if(e){e.focus()}}}),0)}return(0,o.h)(Er,{maxHeight:`${d.maxHeight}px`,maxWidth:`${d.maxWidth}px`,open:n,theme:t,ref:l,children:i,direction:d.direction,"aria-labelledBy":s})},Er=Sn("ul")((e=>{var t,n;let{theme:r,open:i,maxHeight:o,maxWidth:a,direction:s}=e;const{top:l,right:d,bottom:c}=Tr(r),u=r.getNumericalPadding("card");let p;switch(s){case"up":p=`translateY(-100%) translateY(-${(null!=l?l:Fr)+(null!==(t=u.top)&&void 0!==t?t:xe)+(null!=c?c:Fr)+Nr}px)`;break;case"down":case"left":p="translateY(0)";break;case"right":p="translateX(90%)"}return{position:"absolute",top:`${(null!=l?l:Fr)+(null!=c?c:Fr)+Nr}px`,right:`${null!=d?d:Fr}px`,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!==(n=r.getShape("borderRadius.sheet",{skipFallback:!0}))&&void 0!==n?n:"5px",padding:"10px 0",overflow:"auto",listStyle:"none",margin:"0",zIndex:Es.OVERFLOW_MENU,maxHeight:i?`${o}`:"0px",maxWidth:i?`${a}`:"0px",visibility:i?"visible":"hidden",transform:p}})),Dr=Sn("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())})),Hr=Sn("span")((()=>({maxWidth:"240px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}))),Pr=Sn("li")((e=>{let{theme:t}=e;return{borderTop:`1px solid ${t.getCSSColor("border.sheetItemDivider")}`,height:"1px",margin:"10px 0"}})),Rr=Sn("li")((()=>({flexShrink:"0"}))),$r=e=>{let{title:t,icon:n,onClick:r,theme:i,className:a}=e;const s={marginRight:"20px",minWidth:"20px"};return(0,o.h)(Rr,{role:"none"},(0,o.h)(Dr,{theme:i,tabIndex:"-1",onClick:r,className:a},"bin"===n&&(0,o.h)(dr,{style:s}),"clock"===n&&(0,o.h)(cr,{style:s}),"thumbs-up"===n&&(0,o.h)(Or,{style:s}),"thumbs-down"===n&&(0,o.h)(Mr,{style:s}),(0,o.h)(Hr,null,t)))},Br=32,Vr=38,zr=40,Wr=13,Ur=27,qr=-1,Yr=e=>{switch(e){case"ArrowUp":case"Up":return Vr;case"ArrowDown":case"Down":return zr;case"Enter":return Wr;case"Spacebar":case" ":return Br;case"Escape":return Ur;default:return qr}},Zr="ArrowUp",Kr="ArrowDown",Gr="ArrowLeft",Xr="ArrowRight",Qr="Enter",Jr=" ",ei="Escape",ti="PageUp",ni="PageDown",ri="Tab",ii=Sn("div")((e=>{let{theme:t}=e;return Object.assign({width:"100%",border:"0"},t.getElementFocusCSSProperties())})),oi=(e,t)=>{try{const n=ai(e)[t];return n&&"none"===n.getAttribute("role")&&n.childNodes.length>0?n.childNodes[0]:n}catch(e){return null}},ai=e=>e&&e.current&&e.current.base&&e.current.base.childNodes?[...e.current.base.childNodes].filter((e=>"true"!==e.getAttribute("aria-hidden"))):[],si=e=>{let{defaultIndex:t,theme:n,children:r}=e;const[i,a]=h(t||0),s=(0,o.createRef)(),l=v(-1);g((()=>{l.current=i}));const d=l.current;return g((()=>{a(t||0)}),[t]),g((()=>{var e,t,n;-1!==d&&(null===(n=oi(s,d))||void 0===n||n.setAttribute("tabIndex","-1"));null===(e=oi(s,i))||void 0===e||e.setAttribute("tabIndex","0"),null===(t=oi(s,i))||void 0===t||t.focus()}),[i]),(0,o.h)(ii,{theme:n,className:"supports-keyboard-navigation",ref:s,onKeyDown:e=>{var t;let n=null;switch(Yr(e.key)){case zr:n=i+1;break;case Vr:n=i-1;break;case Wr:case Br:null===(t=oi(s,i))||void 0===t||t.click(),e.stopPropagation(),e.preventDefault()}var r,o;null!==n&&(r=n,o=ai(s).length,n=(r+o)%o,a(n),e.view.event.preventDefault())}},r)},li=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"12",height:"12",viewBox:"0 0 12 12"},(0,o.h)("path",{d:"M1 1L6 6L11 11M1 11L11 1","stroke-width":"2","stroke-linecap":"round",stroke:t}))},di=Sn("div")((e=>{let{firstChildNodeMargin:t}=e;return Object.assign({position:"relative",height:"100%",display:"flex",flexDirection:"column"},t.right||t.top||t.left?{"& > *:nth-child(2)":Object.assign(Object.assign(Object.assign({},null!==t.right?{marginRight:`${t.right}px`}:{}),null!==t.top?{marginTop:`${t.top}px`}:{}),null!==t.left&&t.left>0?{marginLeft:`min(${t.left}px, 50%)`}:{})}:{})})),ci=Sn("div")((e=>{let{theme:t,embedMode:n,margin:r,minHeight:i,maxWidth:o,feedOrientation:a,cardWidth:s}=e;const l={width:`${s}px`,marginRight:`${r}px`,marginBottom:"0px"};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({backgroundColor:t.getCSSColor("background.card"),marginBottom:`${r}px`,borderRadius:t.getShape("borderRadius.card")||"initial",boxShadow:"single-card"!==n?`0 ${t.getShape("offset.cardShadow")} ${t.getShape("blur.cardShadow")} ${t.getCSSColor("shadow.card")}`:"none",padding:`${t.getPadding("card")||"20px 20px"}`,border:`${t.getShape("border.card")||"0px"} solid ${t.getCSSColor("border.card")}`,position:"relative",minHeight:i?`${i}px`:"0px"},"horizontal"===a?l:{}),"modal-stream"===n?{width:"100%",maxWidth:o?`${o}px`:"initial"}:{}),sl(t,n,a).cardCompletion),sl(t,n,a).dismissal),sl(t,n,a).snooze),{".submitting, .submitted, .submitted-subview":{border:"0"}})})),ui=Sn("div")((e=>{let{theme:t,dimensions:n,horizontalFeedCenterAlign:r,leftPosition:i,feedOrientation:o,embedMode:a,cardHorizontalAlignment:s}=e;const l=t.getNumericalPadding("stream"),d=Object.assign({width:n.width,display:"flex",flexShrink:"0",scrollSnapAlign:"center",".fixed-position":{position:"unset",left:`${i?i/2+i:0}px`}},r&&{left:"50%",transform:"translateX(-50%)"}),c={width:"100%",display:"flex",justifyContent:{leading:"flex-start",center:"center",trailing:"flex-end"}[null!=s?s:"center"],alignItems:"center"};return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({height:n.height},"horizontal"===o?d:{}),"modal-stream"===a?c:{}),ll(l,a,o).cardCompletion),ll(l,a,o).dismissal),ll(l,a,o).snooze),ll(l,a,o).center)})),pi=Sn("div")((()=>({})));var hi;!function(e){e.menu="menu",e.dismiss="dismiss",e.hidden="hidden"}(hi||(hi={}));const mi=F((e=>{let{containerInstanceId:t,cardInstanceId:n,children:r,theme:i,embedMode:a,animationState:s,cardFeedOverlayDisplayed:l,onDismiss:d,onSnooze:c,onFeedbackSelected:u,removeCard:p,customStrings:m,margin:b,horizontalFeedCenterAlign:S,accessibilityRole:y,actions:w,votingOptions:x,cardMinimumHeight:k,cardMaximumWidth:C,cardHorizontalAlignment:O,horizontalContainerConfig:M}=e;const[I,N]=h(!1),F=v(I),L=e=>{F.current=e,N(e)},[T,A]=h({height:"auto",width:"auto"}),[j,_]=h(0),E=v(null),D=v(null),H=v(null),P=`card-overflow-menu-${n}`,R=Op(M);f((()=>{D.current&&D.current.base&&("submitted"===s||"submitted-subview"===s||"dismissed"===s||"snoozed"===s?(A({height:D.current.base.offsetHeight+("horizontal"!==R?b:0)-1+"px",width:`${D.current.base.offsetWidth+b}px`}),"horizontal"===R&&"center"===(null==M?void 0:M.lastCardAlignment)?(hn().fixPositionRemainingCard(n),_(H.current.base.offsetLeft),setTimeout((()=>{hn().centerRemainingCard(n)}),200),setTimeout((()=>{p()}),pl(s))):setTimeout((()=>{p()}),pl(s))):A({height:"auto",width:"auto"})),H.current&&H.current.base&&(_("fixed-position"===s?H.current.base.offsetLeft:0),"centering"===s&&setTimeout((()=>{hn().removeCardState(n)}),pl(s)))}),[s,D.current,H.current]),g((()=>{const e=e=>{var t;(null===(t=E.current)||void 0===t?void 0:t.base)&&!E.current.base.contains(e.target)&&L(!1)};document.addEventListener("mousedown",e);const t=e=>{if(F.current&&("Tab"===e.key&&L(!1),"Escape"===e.key&&F.current)){const e=document.getElementById(P);L(!1),null==e||e.focus()}};return document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}}),[n]);const{dismiss:{overflow:$},snooze:{overflow:B},voteUp:{overflow:V,feedback:z,feedbackLabel:W},voteDown:{overflow:U,feedback:q,feedbackLabel:Y}}=w,Z={voteUp:!0===(null==x?void 0:x.canVoteUseful)||V,voteDown:!0===(null==x?void 0:x.canVoteNotUseful)||U};let K=hi.hidden;Z.voteUp||Z.voteDown||B?K=hi.menu:$&&(K=hi.dismiss);const G=(Z.voteUp||Z.voteDown)&&($||B),X=((e,t,n)=>{var r,i;if(!n||!t||0===t.length)return{top:0,right:0,left:0};const o=t=>{if(!t)return{top:0,right:0,left:0};const n=Array.isArray(t)?t[0]:t;switch(null==n?void 0:n.type){case Le:case Te:{var r;const t=null==n||null===(r=n.attributes)||void 0===r?void 0:r.format;return"banner"===t?{top:null,right:null,left:null}:"text"===t?{top:0,right:Lr(e).right,left:0}:{top:Lr(e).top,right:0,left:0}}case Ae:case je:case _e:case Ee:case De:case He:case Pe:case Re:case Ve:case ze:case We:case Ue:case qe:case Ye:return{top:Lr(e).top,right:0,left:0};case Me:case Fe:return{top:0,right:Lr(e).right,left:0};case Ie:{var i;const t=Lr(e).right,r="h2"===(s=null==n||null===(i=n.attributes)||void 0===i?void 0:i.appearance)?"H2":"h3"===s?"H3":"",o=e.getCSSFontProperties(`headline${r}`);return{top:0,right:t,left:"center"===(null==o?void 0:o.textAlign)?t:0}}case Ne:{var a;const t=Lr(e).right,r=(e=>"secondaryVariant"===e?"Secondary":"tertiaryVariant"===e?"Tertiary":"")(null==n||null===(a=n.attributes)||void 0===a?void 0:a.appearance),i=e.getCSSFontProperties(`body${r}`);return{top:0,right:t,left:"center"===(null==i?void 0:i.textAlign)?t:0}}case $e:case Be:return o(null==n?void 0:n.children);default:return{top:null,right:null,left:null}}var s},a=null===(r=t[0])||void 0===r||null===(i=r.props)||void 0===i?void 0:i.node;return o(a)})(i,r||[],K!==hi.hidden);return(0,o.h)(ui,{theme:i,ref:H,id:n,dimensions:T,feedOrientation:R,embedMode:a,horizontalFeedCenterAlign:S,leftPosition:j,cardHorizontalAlignment:O,class:s,role:y},(0,o.h)(ci,{theme:i,embedMode:a,class:`card-content ${s||""}`,ref:D,margin:b,minHeight:k,maxWidth:C,feedOrientation:R,cardWidth:null==M?void 0:M.cardWidth,inert:l},(0,o.h)(di,{firstChildNodeMargin:X,class:"card-nodes"},K===hi.menu&&(0,o.h)(pi,{ref:E},(0,o.h)(Ar,{class:"overflow-action",theme:i,open:I,tabIndex:"0",ariaLabel:"Card overflow menu",id:P,ariaHasPopup:"true",ariaExpanded:I,onClick:e=>{e.target&&e.target.focus(),L(!I)}},(0,o.h)(Cr,null)),(0,o.h)(_r,{theme:i,ariaLabelledBy:P,open:I,feedOrientation:R,cardRef:D},(0,o.h)(si,{theme:i},Z.voteUp&&(0,o.h)($r,{onClick:()=>{u({sentiment:"positive",textFeedback:z,textFeedbackLabel:W,source:"overflow-menu"}),L(!1)},theme:i,title:(null==m?void 0:m.votingUsefulTitle)||"This is useful",icon:"thumbs-up",className:"vote-up-action"}),Z.voteDown&&(0,o.h)($r,{onClick:()=>{u({sentiment:"negative",textFeedback:q,textFeedbackLabel:Y,source:"overflow-menu"}),L(!1)},theme:i,title:(null==m?void 0:m.votingNotUsefulTitle)||"This isn't useful",icon:"thumbs-down",className:"vote-down-action"}),G&&(0,o.h)(Pr,{theme:i,className:"card-overflow-divider","aria-hidden":"true"}),B&&(0,o.h)($r,{onClick:()=>{c(),L(!1)},theme:i,title:(null==m?void 0:m.cardSnoozeTitle)||"Remind me",icon:"clock",className:"snooze-action"}),$&&(0,o.h)($r,{onClick:()=>{d(),L(!1)},theme:i,title:(null==m?void 0:m.cardDismissTitle)||"Dismiss",icon:"bin",className:"dismiss-action"})))),K===hi.dismiss&&(0,o.h)(jr,{ariaLabel:"Dismiss card",theme:i,tabIndex:"0",onClick:d,className:"dismiss-button"},(0,o.h)(li,null)),r),(0,o.h)(Qs,{theme:i,animationState:s})),(0,o.h)(ol,{viewState:"topview",onCancelUpload:()=>{window.AtomicUploadService.cancelUploadForCard(t,n),hn().finishCardFileUpload(n),!window.AtomicUploadService.getIsUploadingStatus(t)&&hn().setCardFeedOverlay(!1)},theme:i,renderOverlay:"uploading-files"===s,cardMaximumWidth:C,cardHorizontalAlignment:O,spaceBetweenCards:b}),(0,o.h)(Js,{theme:i,animationState:s}))}),((e,t)=>0==t.isPreview&&e.animationState===t.animationState&&e.cardInstanceId===t.cardInstanceId&&e.runtimeVariables===t.runtimeVariables&&e.theme===t.theme)),gi=Sn("div")((e=>{let{embedMode:t,feedOrientation:n,snapScroll:r,theme:i}=e;const o={position:"relative",display:"flex",flexDirection:"row nowrap",alignItems:"stretch",flexShrink:"0",padding:i.getPadding("stream")||"10px",overflowX:"auto",scrollSnapType:r?"x mandatory":"none"};return Object.assign(Object.assign({},"modal-stream"===t?{height:"100%",width:"100%",padding:"0"}:{}),"horizontal"===n?o:{})})),fi=G.forwardRef(((e,t)=>{let{cardInstances:n,theme:r,isPreview:i,onDismiss:a,onSnooze:s,onFeedbackSelected:l,removeCard:d,cardStates:c,margin:u,runtimeVariables:p,customStrings:h,votingOptions:m,horizontalContainerConfig:g}=e;const f=be().getState();let v=n;f.application.cardLimit&&(v=v.slice(0,f.application.cardLimit));const b=Op(g);return(0,o.h)(gi,{embedMode:f.application.embedMode,feedOrientation:b,snapScroll:"free"!==(null==g?void 0:g.scrollMode),class:"card-list",ref:t,theme:r},v.map(((e,t)=>{if(e.defaultView){var S;let y=null==p||null===(S=p.values)||void 0===S?void 0:S.get(e.instance.id);y=y||new Map;const w=1===v.length&&"horizontal"===b&&"center"===(null==g?void 0:g.lastCardAlignment);e.defaultView.nodes=fp(e.defaultView.nodes);let x=0;if(v.length>1&&t!==n.length-1){const e=Fn(r.getShape("spaceBetweenCards.global",{skipFallback:!0}));x=null!=e?e:u}return(0,o.h)(mi,{key:e.instance.id,cardInstanceId:e.instance.id,containerInstanceId:f.application.containerInstanceId,theme:r,isPreview:i,embedMode:f.application.embedMode,animationState:c[e.instance.id],cardFeedOverlayDisplayed:f.cardFeed.displayingOverlay,onDismiss:()=>{a(e.instance.id)},onSnooze:()=>{s(e.instance.id,e.metadata.expires)},onFeedbackSelected:t=>{l(t,e.instance.id)},removeCard:()=>{d(e.instance.id)},runtimeVariables:y,customStrings:h,margin:x,horizontalFeedCenterAlign:w,accessibilityRole:"listitem",actions:e.actions,votingOptions:m,cardMinimumHeight:f.cardFeed.cardMinimumHeight,cardMaximumWidth:f.cardFeed.cardMaximumWidth,cardHorizontalAlignment:f.cardFeed.cardHorizontalAlignment,horizontalContainerConfig:g},e.defaultView.nodes.map(((t,n)=>{var i,a,s;const l=null===(i=e.defaultView)||void 0===i?void 0:i.nodes[e.defaultView.nodes.length-1],d="form"===l.type?l:void 0,c=null==d||null===(a=d.children)||void 0===a?void 0:a.find((e=>"actionButtonGroup"===e.type));return(0,o.h)(dp,{cardInstanceId:e.instance.id,cardMetadata:e.metadata,node:t,cardContext:{nodeCount:(null===(s=e.defaultView)||void 0===s?void 0:s.nodes.length)||0,hasButtonFinalNode:void 0!==d,hasButtons:void 0!==(null==c?void 0:c.children)&&c.children.length>0},index:n,isWorkflow:!1,theme:r,runtimeVariables:y,feedOrientation:b,embedMode:f.application.embedMode})})))}return null})))})),vi=Sn("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())})),bi={settings:e=>{let{fillColor:t}=e;return(0,o.h)("svg",{fill:t,width:"18",height:"14",viewBox:"0 0 18 14"},(0,o.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:e=>{let{fillColor:t}=e;return(0,o.h)("svg",{stroke:t,width:"14",height:"12",viewBox:"0 0 14 12"},(0,o.h)("path",{d:"M6 11L1 6M1 6L6 1M1 6L13 6","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},cross:li},Si=e=>{let{title:t,iconName:n,onClick:r,theme:i}=e;const a=bi[n];return(0,o.h)(vi,{onClick:r,tabIndex:"0",ariaLabel:t,theme:i,className:`button-${n}`},(0,o.h)(a,{fillColor:i.getCSSColor("text.navigationAction")}))},yi=Sn("div")((e=>{let{theme:t,feedOrientation:n,cardBorderRadius:r}=e;return Object.assign({padding:"10px 20px 10px 15px",display:"flex",alignItems:"center",backgroundColor:t.getCSSColor("background.navigation"),zIndex:Es.HEADER,boxShadow:`0 ${t.getShape("offset.navigationShadow")} ${t.getShape("blur.navigationShadow")} ${t.getCSSColor("shadow.navigation")}`,borderTopLeftRadius:r||"initial",borderTopRightRadius:r||"initial"},"horizontal"===n?{padding:"10px"}:{})})),wi=Sn("h1")((e=>{let{theme:t,feedOrientation:n,alignment:r="left"}=e;const i={paddingLeft:"0",textAlign:r};return Object.assign(Object.assign({alignSelf:"center",paddingLeft:"10px",flexGrow:"1",color:t.getCSSColor("text.navigationTitle")},"horizontal"===n?i:{}),t.getCSSFontProperties("navigationTitle"))})),xi=G.forwardRef(((e,t)=>{let{theme:n,title:r,actionHandler:i,feedOrientation:a,alignment:s,inert:l,cardBorderRadius:d}=e;return(0,o.h)(yi,{theme:n,cardBorderRadius:d,feedOrientation:a,ref:t,inert:l},i&&(0,o.h)(Si,{title:"Back",onClick:i,iconName:"arrowLeft",theme:n}),(0,o.h)(wi,{theme:n,feedOrientation:a,alignment:s},r))})),ki=e=>{let{theme:t,title:n,actionHandler:r,inert:i}=e;return(0,o.h)(yi,{theme:t,inert:i},(0,o.h)(wi,{theme:t},n),r&&(0,o.h)(Si,{title:"Close",onClick:r,iconName:"cross",theme:t}))},Ci="action-cards-sdk-toast-wrapper",Oi=Sn("div")((e=>{let{theme:t,hasRetry:n,feedOrientation:r}=e;const i={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?i:{})})),Mi=Sn("div")((e=>{let{feedOrientation:t}=e;return Object.assign({position:"absolute",bottom:"0",left:"0",right:"0",overflow:"hidden",pointerEvents:"none",zIndex:Es.TOAST},"horizontal"===t?{display:"flex",justifyContent:"center"}:{})})),Ii=Sn("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"))})),Ni=Sn("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"})})),Fi=(e,t)=>new Promise((n=>{t(setTimeout((()=>{n(void 0)}),e))})),Li=e=>{var t;let{theme:n,feedOrientation:r,message:i,actionTitle:a,actionHandler:s,onDismiss:l,delay:d=0}=e;const[c,u]=h(!1),[p,m]=h(""),[f,v]=h(null),[b,S]=h(""),y=null==i?void 0:i.messageId,w="Try again"===a,x=(null===(t=be().getState().application.enabledUiElements.toastConfig)||void 0===t?void 0:t.timeout)||2e3;g((()=>{null!=(null==i?void 0:i.messageId)&&p!=i.messageId&&(m(i.messageId),i.text&&S(i.text),null!=f&&(clearTimeout(f),v(null)),Fi(d,v).then((()=>(u(!0),Fi(x+600,v)))).then((()=>(u(!1),Fi(600,v)))).then((()=>{l&&(l(),S(""))})))}),[y]);const k=()=>{u(!1),s?s():S("")},C=e=>{const t=e.keyCode;13!==t&&32!==t||k()};return(0,o.h)(Mi,{id:Ci,class:"floating",feedOrientation:r},void 0!==i&&(0,o.h)(Oi,{id:"toast-body",theme:n,feedOrientation:r,hasRetry:w,onClick:w?void 0:k,onKeyUp:w?void 0:C,tabIndex:c&&!w?0:-1,class:c?"visible":"",role:c?"alert":void 0},(0,o.h)(Ii,{theme:n,class:"toast-message"},b||""),w&&(0,o.h)(Ni,{theme:n,class:"toast-action",hasRetry:w,onClick:w?k:void 0,onKeyUp:w?C:void 0,tabIndex:c&&w?0:-1},a)))},Ti=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"79",height:"53",viewBox:"0 0 79 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.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:t}),(0,o.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:t}),(0,o.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:t}),(0,o.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:t}))},Ai=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"42",height:"42",viewBox:"0 0 42 42",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.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:t}),(0,o.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:t}))},ji=Sn("div")((()=>({width:"100%",display:"flex",flexFlow:"column wrap",alignItems:"center",justifyContent:"center",minHeight:"250px"}))),_i=Sn("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%"})})),Ei=e=>{let{hasSeenTutorial:t,tutorialMessage:n,emptyMessage:r,theme:i}=e;return(0,o.h)(ji,null,t?(0,o.h)(o.Fragment,null,(0,o.h)(Ai,{fillColor:i.getCSSColor("icon.listEmptyState")}),(0,o.h)(_i,{theme:i},r||"All caught up")):(0,o.h)(o.Fragment,null,(0,o.h)(Ti,{fillColor:i.getCSSColor("icon.listEmptyState")}),(0,o.h)(_i,{theme:i},n||"Cards will appear here when there’s something to action.")))},Di=e=>{let{title:t,textColor:n,buttonColor:r,theme:i,onRetry:a,tryAgainTitle:s}=e;return(0,o.h)(o.Fragment,null,(0,o.h)(Pi,{textColor:n,theme:i},t),(0,o.h)(Ri,{textColor:r,theme:i,onClick:a},null!=s?s:"Try again"))},Hi=Sn("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 ${Cn}`}})),Pi=Sn("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"})})),Ri=Sn("button")((e=>{let{textColor:t,theme:n}=e;return Object.assign({color:(null==n?void 0:n.getCSSColor("text.errorOverlayAction"))||t,font:`16px ${Cn}`,background:"transparent",border:"0",outline:"none",fontWeight:"bold",cursor:"pointer"},(null==n?void 0:n.getCSSFontProperties("errorOverlayAction"))||{})})),$i=e=>{let{embedMode:t,state:n,onRetry:r,loadingIconColor:i,textColor:a,buttonColor:s,backgroundColor:l,theme:d,noInternetConnectionMessage:c,dataLoadFailedMessage:u,tryAgainTitle:p}=e;return"single-card"===t||"preview"===t||"modal-subview"===t?null:(0,o.h)(Hi,{background:l,className:"loading-wrapper",embedMode:t},!n&&(0,o.h)(Hn,{stopColor:(null==d?void 0:d.getCSSColor("icon.loadingSpinner"))||i||"#000000",size:32}),"apiError"===n&&(0,o.h)(Di,{title:null!=u?u:"Couldn't load data",textColor:a,buttonColor:s,theme:d,onRetry:r,tryAgainTitle:p}),"noInternet"===n&&(0,o.h)(Di,{title:null!=c?c:"No internet connection",textColor:a,buttonColor:s,theme:d,onRetry:r,tryAgainTitle:p}))};let Bi;!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"}(Bi||(Bi={}));const Vi=(0,o.createContext)({cardEventDispatcher:{dispatchCardEvent:e=>{}},analyticsDispatcher:{sendEvent:e=>{}},authTokenProvider:{requestToken:()=>Promise.resolve(void 0)},runtimeVariableResolver:void 0});var zi=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Wi="action-cards-sdk-overflow-container",Ui=Sn("div")((e=>{let{theme:t,rendersBackground:n,embedMode:r}=e;return Object.assign({display:"flex",flexDirection:"column",height:"100%",backgroundColor:n?t.getCSSColor("background.default"):"transparent"},"modal-stream"===r?{width:"100%",height:"auto"}:{})})),qi=Sn("div")((e=>{let{embedMode:t}=e;return{position:"absolute",top:"0",left:"0",width:"100%",height:"100%",zIndex:Es.FEED_OVERLAY,backgroundColor:"rgba(0, 0, 0, 0.4)",borderRadius:"launcher"===t?"20px":"0"}})),Yi=Sn("div")((e=>{let{embedMode:t}=e;return{width:"100%",position:"absolute",top:"0px",left:"0px",zIndex:Es.CUSTOM_HEADER,overflow:"hidden",borderRadius:"launcher"===t?"20px 20px 0 0":"0"}})),Zi=Sn("div")((e=>{let{scrollPosition:t,scrollbarWidth:n,headerOffset:r}=e;return{width:"100%",marginTop:`${r}px`,paddingRight:`${n}px`,transform:`translateY(-${t}px)`}})),Ki=Sn("div")((e=>{let{embedMode:t,feedOrientation:n,headerPadding:r,theme:i,isEmptyState:o,isLoadingState:a}=e;return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({padding:"single-card"===t?i.getPadding("stream")||"0px":i.getPadding("stream")||"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"}:{}),o||a?{padding:"10px"}:{}),"modal-stream"===t?{padding:"0px"}:{})})),Gi=Sn("div")((e=>{let{embedMode:t,feedOrientation:n,horizontalOffset:r}=e;const i={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?i:{})})),Xi={scrollTop:0,lastScrollTimeout:null,lastCardIds:[]},Qi=e=>{const t=e.messages.cardList,n=e.cardFeed.cardInstances,r=e.cardStates,{enabled:i,emptyStyle:o}=e.cardFeed.horizontalContainerConfig||{};return t&&1===n.length&&i&&"shrink"===o?0:t&&["submitted-subview"].includes(r[t.cardInstanceId]||"")?1100:800},Ji=e=>{let{theme:t,onRetry:n}=e;const r=v(null),i=v(null),a=v(null),s=v(null),l=v(null),[d,c]=h(0),[u,p]=h(0),m=y(Vi),f=m.analyticsDispatcher,b=m.cardEventDispatcher,S=m.authTokenProvider;return g((()=>(l.current=new IntersectionObserver(((e,t)=>{const n=Mp();let r=[];e.forEach((e=>{if(e.isIntersecting){const t=e.target.id;n.add(t),Xi.lastCardIds.includes(t)||r.push(t)}})),r.forEach((e=>{const t=be().getState().cardFeed.cardInstances.find((t=>t.instance.id===e)),n=null==t?void 0:t.metadata.payloadMetadata;f.sendEvent(Object.assign({cardInstanceId:e,cardViewState:"topview",eventName:Nt},n?{properties:n}:{}))}));const i=JSON.stringify(Array.from(n));sessionStorage.setItem(Oe,i),Xi.lastCardIds=r}),{root:null,rootMargin:"0px",threshold:0}),()=>{var e;null===(e=l.current)||void 0===e||e.disconnect()})),[]),(0,o.h)(Ze.lj,{actions:(0,Q.Y2)(yt,Ke,un)},(e=>{var h,m,v,y,w,x,k,C,O,M;const{embedMode:I,enabledUiElements:N,customStrings:F,open:L}=e.application,T="preview"===I,A="single-card"===I,j="single-card"!==I&&"modal-stream"!==I,_=("standalone"===I||"launcher"===I)&&e.cardFeed.displayingOverlay,E=e.cardFeed.horizontalContainerConfig,D=!("modal-stream"===I||A||"standalone"===I&&(null==E?void 0:E.enabled)&&"shrink"===(null==E?void 0:E.emptyStyle)),H=!e.application.isPreview&&!A&&"modal-stream"!==I&&!0===N.cardListToast&&!N.customToastContainer,P=Op(E),R=e.cardFeed.cardInstances.length,$="horizontal"===P&&N.cardListHeader&&"left"===(null==E?void 0:E.headerAlignment)&&(null!==(h=null===(m=i.current)||void 0===m||null===(v=m.base)||void 0===v?void 0:v.scrollHeight)&&void 0!==h?h:0)/2,B=()=>{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 g((()=>{L&&B()}),[e.cardFeed.updateId]),g((()=>{L&&(Xi.lastCardIds=[],B(),f.sendEvent({cardViewState:"topview",eventName:jt,properties:{displayMode:A?"single":"stream"}}))}),[L]),g((()=>{var e,t;p(null==i||null===(e=i.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.scrollHeight)}),[i]),g((()=>{const e=window.frameElement,n=t.getCSSColor("background.default");"standalone"===I&&(null==E?void 0:E.enabled)&&"shrink"===(null==E?void 0:E.emptyStyle)&&(e.style.backgroundColor=n);const r=()=>{"visible"===document.visibilityState&&L&&B()};return window.addEventListener("visibilitychange",r),()=>{window.removeEventListener("visibilitychange",r)}}),[]),g((()=>{Xi.lastCardIds=[];let e=e=>{let t=!1;t||(window.requestAnimationFrame((()=>{var n;const r=e.target;!1!==(null===(n=N.customContainerHeader)||void 0===n?void 0:n.scrollHeader)&&c(r.scrollTop),t=!1})),t=!0),Xi.scrollTop=e.target.scrollTop};return r.current&&r.current.base&&(r.current.base.scrollTop=Xi.scrollTop,r.current.base.addEventListener("scroll",e)),()=>{r.current&&r.current.base&&(Xi.scrollTop=r.current.base.scrollTop,r.current.base.removeEventListener("scroll",e))}}),[]),(0,o.h)(Ui,{theme:t,id:Wi,rendersBackground:j,embedMode:I},_&&(0,o.h)(qi,{class:"use-offset",embedMode:I}),j&&N.cardListHeader&&(0,o.h)(xi,{title:F.cardListTitle||"Cards",theme:t,feedOrientation:P,ref:i,alignment:null==E?void 0:E.headerAlignment}),N.customContainerHeader&&("standalone"===I||"launcher"===I)&&(0,o.h)(Yi,{embedMode:I},(0,o.h)(Zi,{ref:a,headerOffset:u,scrollbarWidth:(null==r||null===(y=r.current)||void 0===y||null===(w=y.base)||void 0===w?void 0:w.offsetWidth)-(null==r||null===(x=r.current)||void 0===x||null===(k=x.base)||void 0===k?void 0:k.clientWidth),scrollPosition:d,dangerouslySetInnerHTML:{__html:null===(C=document.getElementById("custom-container-header"))||void 0===C?void 0:C.innerHTML}})),(0,o.h)(Ki,{theme:t,embedMode:I,feedOrientation:P,headerPadding:null==a||null===(O=a.current)||void 0===O||null===(M=O.base)||void 0===M?void 0:M.scrollHeight,isEmptyState:0===R&&D,isLoadingState:!e.cardFeed.status.loaded,ref:r,cardCount:R,id:"action-cards-sdk-card-container",class:"card-container",role:"list"},!e.cardFeed.status.loaded&&"modal-stream"!==I&&(0,o.h)($i,{embedMode:I,state:e.cardFeed.status.errorState,backgroundColor:"transparent",theme:t,onRetry:n,noInternetConnectionMessage:F.noInternetConnectionMessage,dataLoadFailedMessage:F.dataLoadFailedMessage,tryAgainTitle:F.tryAgainTitle}),e.cardFeed.status.loaded&&R>0&&(0,o.h)(fi,{cardInstances:e.cardFeed.cardInstances,theme:t,isPreview:T,onDismiss:t=>zi(void 0,void 0,void 0,(function*(){ml(e,e,t,b,S,"overflow-menu")})),onSnooze:(t,n)=>{e.requestSnooze(t,"overflow-menu",n)},onFeedbackSelected:(t,n)=>{t.textFeedback||"negative"===t.sentiment?e.requestFeedback(n,t):"positive"===t.sentiment&&vl(n,e,f,b,t.source)},removeCard:t=>{e.removeCard(t)},cardStates:e.cardStates,margin:A?0:10,runtimeVariables:e.cardFeed.runtimeVariables,customStrings:F,votingOptions:e.cardFeed.cardVoting,horizontalContainerConfig:E,ref:s}),e.cardFeed.status.loaded&&0===R&&D&&(0,o.h)(Gi,{embedMode:I,feedOrientation:P,horizontalOffset:$,class:"empty-state-wrapper"},(0,o.h)(Ei,{theme:t,hasSeenTutorial:e.cardFeed.tutorialSeen,tutorialMessage:F.awaitingFirstCard,emptyMessage:F.allCardsCompleted}))),H&&(0,o.h)(Li,{theme:t,feedOrientation:P,message:e.messages.cardList,delay:Qi(e),actionTitle:e.messages.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(e.messages.cardList.action)?"Try again":"Dismiss",actionHandler:()=>zi(void 0,void 0,void 0,(function*(){var t,n,r,i,o,a,s,l,d,c;const u=null===(t=e.messages.cardList)||void 0===t?void 0:t.cardInstanceId,p=null===(n=e.messages.cardList)||void 0===n?void 0:n.action;if(u&&p)switch(p){case"submit-failed":gl(e,e,u,!1,b,f,S,(null===(r=e.messages.cardList)||void 0===r?void 0:r.responseValues)||{},{payload:null===(i=e.messages.cardList)||void 0===i?void 0:i.payload,postSubmissionUrl:null===(o=e.messages.cardList)||void 0===o?void 0:o.postSubmissionUrl,subviewData:null===(a=e.messages.cardList)||void 0===a?void 0:a.subviewData,submitButtonName:null===(s=e.messages.cardList)||void 0===s?void 0:s.submitButtonName});break;case"dismiss-failed":const t=null===(l=e.messages.cardList)||void 0===l?void 0:l.source;t&&ml(e,e,u,b,S,t);break;case"snooze-failed":const n=null===(d=e.messages.cardList)||void 0===d?void 0:d.snoozeDate,p=null===(c=e.messages.cardList)||void 0===c?void 0:c.source;n&&p&&fl(e,e,u,n,b,S,p)}})),onDismiss:()=>{e.clearMessage("cardList")}}))}))},eo=Sn("div")((e=>{let{yOffset:t}=e;return{position:"absolute",top:`${t}px`,left:"0",right:"0",zIndex:Es.BANNER,overflow:"hidden"}})),to=Sn("div")((e=>{let{theme:t}=e;return{position:"absolute",top:"0",left:"0",right:"0",background:t.getCSSColor("background.banner"),padding:"12px",transform:"translateY(-100%)",transition:"transform 300ms ease-in-out",".visible":{transform:"translateY(0)",position:"initial"},".animating":{position:"initial"}}})),no=Sn("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"})})),ro=e=>{let{theme:t,message:n,yOffset:r,onDismiss:i}=e;const[a,s]=h(null),[l,d]=h(null),[c,u]=h(!1);return g((()=>{null!=n&&null!=n.text?(null!=l&&(clearTimeout(l),d(null)),null!=a&&(clearTimeout(a),s(null)),u(!0),d(setTimeout((()=>{u(!1),d(null),s(setTimeout((()=>{i&&i(),s(null)}),300))}),3300))):u(!1)}),[n]),(0,o.h)(eo,{theme:t,yOffset:r},(0,o.h)(to,{theme:t,class:`${c?"visible":""} ${a?"animating":""}`},(0,o.h)(no,{theme:t},n?n.text:"")))},io=Sn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,cardMaximumWidth:i}=e;return Object.assign({backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"relative"},"modal-stream"===r?{height:"auto",width:"100%",maxWidth:i?`${i}px`:"initial",borderRadius:n.getShape("borderRadius.card")||"initial",border:`${n.getShape("border.card")||"0px"} solid ${n.getCSSColor("border.card")}`}:{})})),oo=Sn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,isPreview:i}=e;return Object.assign({background:t.getCSSColor("background.default"),position:"relative",bottom:i?"auto":"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"visible",padding:t.getPadding("stream")||"0px 20px 20px",boxSizing:"border-box",display:"flex",flex:"1"},"modal-stream"===r?{borderBottomLeftRadius:n.getShape("borderRadius.card")||"initial",borderBottomRightRadius:n.getShape("borderRadius.card")||"initial"}:{})})),ao=Sn("div")({paddingTop:"10px"}),so={scrollTop:0,subviewId:""},lo=e=>{let{workflowTheme:t,feedTheme:n}=e;const r=v(null),i=y(Vi).analyticsDispatcher;return(0,o.h)(Ze.lj,{actions:(0,Q.Y2)(Ke,un),mapToProps:e=>{const t=nt(e);return{containerInstanceId:e.application.containerInstanceId,cardStates:e.cardStates,cardMaximumWidth:e.cardFeed.cardMaximumWidth,customStrings:e.application.customStrings,subview:t&&rt(t)?t:null,isPreview:e.application.isPreview||!1,embedMode:e.application.embedMode,runtimeVariables:e.cardFeed.runtimeVariables,bannerMessage:e.messages.subview}}},(e=>{if(null===e.subview)return null;const{cardInstance:a,subviewId:s}=e.subview;if(a&&s){const d=a.subviews[s],{id:c}=a.instance,u=e.cardStates[c],p="modal-subview"===e.embedMode?ki:xi;if(d){var l;let h=null===(l=e.runtimeVariables.values)||void 0===l?void 0:l.get(c);return h=h||new Map,g((()=>{var e;const t=()=>{let e=!1;e||(window.requestAnimationFrame((()=>{var t;const n=null==r||null===(t=r.current)||void 0===t?void 0:t.base;n&&(so.scrollTop=n.scrollTop,so.subviewId=s),e=!1})),e=!0)};return(null==r||null===(e=r.current)||void 0===e?void 0:e.base)&&(r.current.base.scrollTop=so.subviewId===s?so.scrollTop:0,r.current.base.addEventListener("scroll",t)),()=>{var e;(null==r||null===(e=r.current)||void 0===e?void 0:e.base)&&(r.current.base.scrollTop=so.subviewId===s?so.scrollTop:0,r.current.base.removeEventListener("scroll",t))}}),[]),g((()=>{i.sendEvent({cardInstanceId:c,cardViewState:"subview",eventName:Dt,properties:{subviewId:s,subviewTitle:yp(d.title,h),subviewLevel:1}})}),[s]),d.nodes=fp(d.nodes),(0,o.h)(o.Fragment,null,(0,o.h)(io,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,id:Wi,cardMaximumWidth:e.cardMaximumWidth},(0,o.h)(ol,{viewState:"subview",onCancelUpload:()=>{window.AtomicUploadService.cancelUploadForCard(e.containerInstanceId,c),hn().finishCardFileUpload(c),!window.AtomicUploadService.getIsUploadingStatus(e.containerInstanceId)&&hn().setCardFeedOverlay(!1)},theme:t,renderOverlay:"uploading-files"===u,cardMaximumWidth:e.cardMaximumWidth}),(0,o.h)(p,{title:yp(d.title,h),theme:t,cardBorderRadius:n.getShape("borderRadius.card"),actionHandler:()=>{e.navigateBack(),i.sendEvent({cardInstanceId:c,cardViewState:"subview",eventName:Ht,properties:{subviewId:s,subviewTitle:yp(d.title,h),subviewLevel:1}})},inert:"uploading-files"===u}),(0,o.h)(oo,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,ref:r,isPreview:e.isPreview,class:"use-offset",id:"action-cards-subview-container",inert:"uploading-files"===u,cardMaximumWidth:e.cardMaximumWidth},(0,o.h)(ao,{class:"offset-child"},d.nodes.map((n=>{var r;const i=d.nodes.find((e=>"form"===e.type)),l=null==i||null===(r=i.children)||void 0===r?void 0:r.find((e=>"actionButtonGroup"===e.type));return(0,o.h)(dp,{cardInstanceId:c,cardMetadata:a.metadata,node:n,cardContext:{nodeCount:(null==i?void 0:i.children)?i.children.length:0,hasButtonFinalNode:void 0!==l,hasButtons:void 0!==(null==l?void 0:l.children)&&l.children.length>0},isWorkflow:!0,theme:t,runtimeVariables:h,subviewId:s,subviewTitle:yp(d.title,h),embedMode:e.embedMode})}))))),!e.isPreview&&(0,o.h)(ro,{theme:t,message:e.bannerMessage,yOffset:60,onDismiss:()=>{e.clearMessage("subview")}}))}}return null}))},co=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,o.h)("svg",{width:"19",height:"12",viewBox:"0 0 19 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"A blank video icon","aria-hidden":n},(0,o.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:t,strokeWidth:"2"}),(0,o.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:t,strokeWidth:"2"}))};class uo extends o.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 $n;case"video":case"videoWithoutSrc":return co;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===Br&&this.props.onClickImage&&(this.props.onClickImage(),e.preventDefault())}}const po=Sn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,cardMaximumWidth:i}=e;return Object.assign({backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column"},"modal-stream"===r?{height:"auto",width:"100%",maxWidth:i?`${i}px`:"initial",borderRadius:n.getShape("borderRadius.card")||"initial",border:`${n.getShape("border.card")||"0px"} solid ${n.getCSSColor("border.card")}`}:{})})),ho=Sn("div")({width:"100%",height:"100%",maxWidth:"100%",minHeight:"420px",overflow:"auto",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"}),mo=Sn("div")((e=>{let{autoSizes:t}=e;return{overflow:"auto",flexGrow:t?"0":"1",height:t?"auto":"100%",display:"flex",flexDirection:"column",width:"100%"}})),go=Sn("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"}})),fo=Sn("video")({maxWidth:"100%"}),vo=Sn("img")({maxWidth:"100%",flexShrink:"0"});class bo extends uo{render(){const{theme:e,src:t,label:n,alt:r}=this.props,{imageLoaded:i}=this.state;return(0,o.h)(o.Fragment,null,!i&&(0,o.h)(go,{imageLoaded:i,theme:e},(0,o.h)($n,{fillColor:e.getCSSColor("icon.mediaBanner"),ariaHidden:!0})),i&&(0,o.h)(vo,{src:t,alt:r||n}))}}const So=e=>{var t,n;let{src:r,alt:i,cardInstanceId:a}=e;const s=v(null),l=y(Vi).analyticsDispatcher,d="string"==typeof r&&null!==(t=null===(n=r.match(/[^\/]*$/))||void 0===n?void 0:n[0])&&void 0!==t?t:"";return g((()=>{var e,t,n,i;const o=()=>{l.sendEvent({eventName:Pt,cardInstanceId:a,cardViewState:"subview",properties:{media:d,mediaURL:r}})},c=()=>{l.sendEvent({eventName:Rt,cardInstanceId:a,cardViewState:"subview",properties:{media:d,mediaURL:r}})};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===(i=n.base)||void 0===i||i.addEventListener("ended",c),()=>{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",c)}}),[]),(0,o.h)(fo,{ref:s,src:r,alt:i||"video",autoplay:!0,controls:!0})},yo=e=>{let{workflowTheme:t,feedTheme:n}=e;return(0,o.h)(Ze.lj,{actions:Ke,mapToProps:e=>{const t=nt(e);return{embedMode:e.application.embedMode,cardMaximumWidth:e.cardFeed.cardMaximumWidth,cardInstanceId:null==t?void 0:t.cardInstanceId,currentMediaItem:t&&at(t)?t.item:void 0}}},(e=>{const r=e.currentMediaItem;if(!r)return null;const i="modal-subview"===e.embedMode?ki:xi,a="launcher"===e.embedMode;return(0,o.h)(po,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,cardMaximumWidth:e.cardMaximumWidth,id:Wi},(0,o.h)(i,{title:`View ${r.type}`,theme:t,cardBorderRadius:n.getShape("borderRadius.card"),actionHandler:e.navigateBack}),(0,o.h)(mo,{autoSizes:a},(0,o.h)(ho,null,"image"==r.type&&(0,o.h)(bo,{mediaType:r.type,src:r.url,label:r.title,alt:r.alt,theme:t,isFirstCardNode:!1,isFinalCardNode:!1}),"video"==r.type&&(0,o.h)(So,{src:r.url,alt:r.alt,cardInstanceId:e.cardInstanceId}))))}))};var wo=n(6083),xo=n.n(wo),ko=n(9331),Co=n.n(ko),Oo=n(5932),Mo=n.n(Oo),Io=n(4844),No=n.n(Io),Fo=n(4801),Lo=n.n(Fo),To=n(7754),Ao=n.n(To),jo=n(6254),_o=n.n(jo),Eo=n(5886),Do=n.n(Eo);const Ho=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M1 1L5.96464 5.96464C5.98417 5.98417 5.98417 6.01583 5.96464 6.03536L1 11",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},Po=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"8",height:"12",viewBox:"0 0 8 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M6.16235 11L1.16235 6L6.16235 1",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},Ro=Sn("button")((e=>{let{theme:t}=e;return Object.assign({height:"100%",width:"30px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",justifySelf:"center",border:"none",backgroundColor:"transparent"},t.getElementFocusCSSProperties())})),$o=Sn("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"}}})),Bo=Sn("span")({fontSize:"15px"}),Vo=Sn("span")({fontSize:"15px",fontWeight:"normal"}),zo=e=>{var t,n;let{theme:r,month:i,year:a="",onBack:s,onForward:l,locale:d}=e;return(0,o.h)($o,{theme:r},(0,o.h)(Ro,{theme:r,onClick:s,"aria-label":"previous month"},(0,o.h)(Po,{fillColor:null!==(t=r.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==t?t:"rgba(0,0,0,0.5)"})),(0,o.h)("h1",{className:"MonthDisplay","aria-live":"assertive"},(0,o.h)(Bo,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}(d)[i-1]+" "),(0,o.h)(Vo,null,a)),(0,o.h)(Ro,{theme:r,onClick:l,"aria-label":"next month"},(0,o.h)(Ho,{fillColor:null!==(n=r.getCSSColor("background.datePickerCalendarMonthNavArrows",{skipFallback:!0}))&&void 0!==n?n:"rgba(0,0,0,0.5)"})))};var Wo=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};const Uo=Sn("button")((e=>{var t,n,r,i,o,a,s;let{isDisabled:l,isSelected:d,isToday:c,isFocused:u,theme:p}=e,h=null!==(t=p.getCSSColor("text.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==t?t:"rgba(0, 0, 0, 1)",m=p.getCSSColor("text.datePickerCalendarHoverDateItem",{skipFallback:!0}),g="transparent",f=null!==(n=p.getCSSColor("background.datePickerCalendarHoverDateItem",{skipFallback:!0}))&&void 0!==n?n:"rgba(0, 0, 0, 0.05)";const v="#1E6EFA";c&&!d?h=null!==(r=p.getCSSColor("text.datePickerCalendarCurrentDate",{skipFallback:!0}))&&void 0!==r?r:v:d?(h=null!==(i=p.getCSSColor("text.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==i?i:"white",g=null!==(o=p.getCSSColor("background.datePickerCalendarSelectedDateItem",{skipFallback:!0}))&&void 0!==o?o:v,f=g):u?g="rgba(0, 0, 0, 0.05)":l&&(h="rgba(0, 0, 0, 0.2)",f="transparent");const b=null!==(a=p.getShape("borderRadius.datePickerCalendarDateItem",{skipFallback:!0}))&&void 0!==a?a:"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:f}),color:h}})),qo=e=>{let{theme:t,date:n,dateLabel:r,style:i,col:a,onSelect:s,onHover:l,onFocus:d}=e,c=Wo(e,["theme","date","dateLabel","style","col","onSelect","onHover","onFocus"]);const u=v(null);return(0,o.h)(Uo,{"data-testid":"calendar-day-button",ref:u,title:r,"aria-label":r,"aria-selected":c.isSelected?"true":"false","aria-disabled":c.isDisabled?"true":"false","aria-colindex":a,role:"gridcell",key:n,style:i,class:`CalendarDay ${dt(c)}`,isToday:Do()(n),isDisabled:c.isDisabled,isSelected:c.isSelected,isFocused:c.isFocused,theme:t,tabIndex:"-1",onMouseDown:e=>{e.stopPropagation(),c.isDisabled||(u.current&&document.activeElement!==u.current&&u.current.base.focus(),s(n))},onMouseEnter:()=>{c.isDisabled||l(n)},onMouseLeave:()=>{c.isDisabled||l(null)},onFocus:()=>{c.isDisabled||d(n)}},n.getDate())},Yo=Sn("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`}}})),Zo=Sn("div")({padding:"5px"}),Ko=Sn("div")({}),Go=Sn("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)"}),Xo=Sn("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"}})),Qo=Sn("div")({display:"grid",gridTemplate:"auto / repeat(7, 1fr)","-ms-grid-rows":"auto","-ms-grid-columns":"(1fr)[7]",marginBottom:"5px"}),Jo=e=>{const{month:t,year:n,isDateHovered:r,isDateFocused:i,isDateSelected:a,isDateInRange:s,isDateEnabled:l,onDateFocused:d,onDateHovered:c,onDateSelected:u,onChangeMonth:p,onChangeYear:h,calendarRef:m,disabled:g,locale:f,theme:v}=e,b=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en-US";return window.days=window.days||[...Array(7)].map(((t,n)=>{const r=n+1;return{dayName:new Date(Date.UTC(2017,0,n+2)).toLocaleDateString(e,{weekday:"long"}),col:r,style:{gridColumnStart:r}}})),window.days}(f),S=ct(t,n||0),y=e=>{let{date:t,style:n,col:p}=e;return(0,o.h)(qo,{key:t,theme:v,date:t,col:p,dateLabel:ht()(t,"dddd, MMMM D, YYYY"),style:n,isToday:Do()(t),isHovered:r(t),isFocused:i(t),isSelected:a(t),isInRange:s(t),isDisabled:g||!l(t),onSelect:u,onHover:c,onFocus:d})};return(0,o.h)(Yo,{theme:v},(0,o.h)(zo,{theme:v,month:t,year:n,onBack:p(-1),onForward:p(1),onChangeYear:h,locale:f,disabled:g}),(0,o.h)(Zo,{className:"Calendar",role:"grid",ref:m,tabIndex:0,"aria-colcount":7,"aria-rowcount":6,"aria-label":"Calendar picker"},(0,o.h)(Qo,{role:"row"},b.map((e=>{let{dayName:t,style:n,col:r}=e;return(0,o.h)(Xo,{key:t,theme:v,style:n,role:"columnheader","aria-colindex":r,"aria-label":t},(0,o.h)("abbr",null,t.slice(0,1)))}))),(0,o.h)(Ko,{role:"rowgroup"},(0,o.h)(Go,{role:"row","aria-rowIndex":1},S.week1.map(y)),(0,o.h)(Go,{role:"row","aria-rowIndex":2},S.week2.map(y)),(0,o.h)(Go,{role:"row","aria-rowIndex":3},S.week3.map(y)),(0,o.h)(Go,{role:"row","aria-rowIndex":4},S.week4.map(y)),(0,o.h)(Go,{role:"row","aria-rowIndex":5},S.week5.map(y)),(0,o.h)(Go,{role:"row","aria-rowIndex":6},S.week6.map(y)))))};function ea(){return ea=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},ea.apply(this,arguments)}const ta="DatePicker",na="DateRangePicker";class ra extends o.Component{constructor(e){var t,n,r;super(e),r=void 0,(n="calendar")in(t=this)?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r;const i=e.date||new Date,a=i.getMonth()+1,s=i.getFullYear();this.state={month:a,year:s,focused:i,hovered:new Date},this.calendar=(0,o.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.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,n;if(!(null===(n=this.calendar)||void 0===n?void 0:n.current.base.contains(document.activeElement)))return;if(e.key===ri)return void(this.props.onCancel&&this.props.onCancel());e.preventDefault();const{shiftKey:r,key:i}=e,o=i===Qr,a=i===ei,s=i===ti,l=i===ni,d=i===Gr,c=i===Zr,u=i===Xr,p=i===Kr,h=i===Jr,m=null!==(t=this.props.isDateEnabled)&&void 0!==t?t:function(){return!0};let{focused:g}=this.state;if(o)m(g)&&this.onDateSelected(g);else if(r&&s){const e=xo()(g,-1);m(e)&&this.onDateFocused(e)}else if(r&&l){const e=xo()(g,1);m(e)&&this.onDateFocused(e)}else if(s){const e=Co()(g,-1);m(e)&&this.onDateFocused(e)}else if(l){const e=Co()(g,1);m(e)&&this.onDateFocused(e)}else if(c){const e=Mo()(g,-1);m(e)&&this.onDateFocused(e)}else if(p){const e=Mo()(g,1);m(e)&&this.onDateFocused(e)}else if(d){const e=No()(g,-1);m(e)&&this.onDateFocused(e)}else if(u){const e=No()(g,1);m(e)&&this.onDateFocused(e)}else h?this.onDateSelected(g):a&&this.props.onCancel&&this.props.onCancel()}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,i=n;return r<1&&(r=12+r,i-=1),r>12&&(r-=12,i+=1),()=>{this.setState({month:r,year:i})}}onDateSelected(e){const{type:t,onDateSelected:n,onStartDateSelected:r,onEndDateSelected:i}=this.props;if(t===ta)n&&n(e);else if(t===na){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),i&&i(null)):i&&i(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){var t;return(null!==(t=this.props.isDateEnabled)&&void 0!==t?t:function(){return!0})(e)}isDateFocused(e){return Lo()(e,this.state.focused)}isDateHovered(e){return Lo()(e,this.state.hovered)}isDateSelected(e){return(this.props.type===ta?[this.props.date]:[this.props.startDate,this.props.endDate]).some((t=>!!t&&Lo()(t,e)))}isDateInRange(e){if(this.props.type===ta)return!1;const{startDate:t,endDate:n}=this.props,{focused:r,hovered:i}=this.state,o=n||(t&&r&&!Lo()(t,r)?r:i);return!(!t||!o||Ao()(o,t))&&_o()(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,o.h)(Jo,{calendarRef:this.calendar,month:this.state.month,year:this.state.year,isDateHovered:this.isDateHovered,isDateFocused:this.isDateFocused,isDateSelected:this.isDateSelected,isDateInRange:this.isDateInRange,isDateEnabled:this.isDateEnabled,onDateSelected:this.onDateSelected,onDateHovered:this.onDateHovered,onDateFocused:this.onDateFocused,onChangeMonth:this.onChangeMonth,onChangeYear:this.onChangeYear,locale:this.props.locale||"en-US",disabled:this.props.disabled||!1,theme:this.props.theme})}}const ia=e=>(0,o.h)(ra,ea({type:ta},e));function oa(){return oa=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},oa.apply(this,arguments)}const aa="inline",sa="stacked",la="external",da=e=>{let{theme:t,mode:n,yPadding:r,clickable:i,truncateLabel:o,inputHasValue:a,styles:s}=e;const l=Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("pinned")),{color:t.getCSSColor("text.pinned"),paddingBottom:"2px",cursor:"inherit"}),void 0!==r?{paddingTop:`${r}px`}:{}),d=Object.assign(Object.assign(Object.assign({},t.getCSSFontProperties("labelInline",{skipFallback:!0})||t.getCSSFontProperties("primary")),{color:t.getCSSColor("text.labelInline",{skipFallback:!0})||t.getCSSColor("text.primary"),paddingBottom:"0px",cursor:"inherit"}),o?{textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",minWidth:"0",flex:"1 1 auto",flexShrink:a?"2":"1",paddingRight:"0.1em",marginRight:"-0.1em",paddingBottom:"0.1em",marginBottom:"-0.1em"}:{}),c=Object.assign(Object.assign({},t.getCSSFontProperties("labelExternal")),{color:t.getCSSColor("text.labelExternal"),paddingBottom:"8px",cursor:i?"pointer":"inherit"});return Object.assign(Object.assign(Object.assign(Object.assign({display:"block",flexGrow:"1",whiteSpace:"pre-wrap"},n===sa?l:{}),n===aa?d:{}),n===la?c:{}),s)},ca=Sn("label")((e=>{let{theme:t,mode:n,yPadding:r,clickable:i,truncateLabel:o,inputHasValue:a,styles:s}=e;return da({theme:t,mode:n,yPadding:r,clickable:i,truncateLabel:o,inputHasValue:a,styles:s})})),ua=Sn("span")((e=>{let{theme:t,mode:n,yPadding:r,clickable:i,truncateLabel:o,styles:a}=e;return da({theme:t,mode:n,yPadding:r,clickable:i,truncateLabel:o,styles:a})})),pa=e=>{let{theme:t,children:n,useSpanElement:r,clickable:i=!0,mode:a,name:s,id:l,yPadding:d,onClick:c,truncateLabel:u,inputHasValue:p,styles:h}=e;return r?(0,o.h)(ua,oa({theme:t,mode:a||aa,"aria-hidden":!n,yPadding:d,clickable:i,onClick:c,styles:h},s?{for:s}:{},l?{id:l}:{}),n):(0,o.h)(ca,oa({theme:t,mode:a||aa,"aria-hidden":!n,yPadding:d,clickable:i,onClick:c,truncateLabel:u,inputHasValue:p,styles:h},s?{for:s}:{},l?{id:l}:{}),n)};function ha(){return ha=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},ha.apply(this,arguments)}const ma=Sn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const i=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:i?`0px 0px ${r?"0px":i}`:`${n?0:10}px 0px ${r?0:10}px`}})),ga=Sn("div")((e=>{let{theme:t,mode:n,cursor:r,hPadding:i}=e;return Object.assign(Object.assign({minHeight:n===sa?"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",overflow:"hidden",minWidth:"0",padding:`10px ${void 0!==i?i:20}px`,flexGrow:"1",cursor:r||"pointer"})})),fa=e=>{let{nodeKey:t,children:n,label:r,labelFor:i,labelId:a,mode:s,cursor:l,ref:d,theme:c,isFirstCardNode:u,isFinalCardNode:p,onClick:h,clickableLabel:m=!0,tabFocusable:g,innerRef:f,hPadding:v,accessibleAttributes:b}=e;const S=g?e=>{e.charCode===Br&&h&&(e.preventDefault(),h())}:void 0;return(0,o.h)(ma,{ref:d,isFirstCardNode:u,isFinalCardNode:p,theme:c},s===la&&(0,o.h)(pa,{theme:c,mode:s,name:i,id:a,onClick:m?h:e=>null==e?void 0:e.preventDefault(),clickable:m},r),(0,o.h)(ga,ha({key:t,"data-element-key":t,mode:s,theme:c,cursor:l,class:"component-field-wrapper",onClick:h,onKeyPress:S,tabIndex:g?0:void 0,ref:f,hPadding:v},b),n))},va=Sn("div")((e=>{let{thumbnailUrl:t,theme:n}=e;return{backgroundColor:n.getCSSColor("background.media"),borderRadius:n.getShape("borderRadius.media")||"initial",width:"30px",height:"30px",minWidth:"30px",minHeight:"30px",marginRight:"10px",backgroundImage:`url('${t}')`,backgroundSize:"cover",backgroundPosition:"center"}})),ba=e=>{let{thumbnailUrl:t,theme:n,altText:r}=e;return(0,o.h)(va,{role:r?"img":"",ariaLabel:r,thumbnailUrl:t,theme:n})},Sa=e=>{let{fillColor:t,ariaHidden:n,styles:r}=e;return(0,o.h)("svg",{style:r,width:"12",height:"7",viewBox:"0 0 12 7",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":n},(0,o.h)("path",{d:"M1 1L6 6L11 1",stroke:t,"stroke-opacity":"1","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},ya=Sn("div")((e=>{let{theme:t,requiresTopSpacing:n}=e;const r=t.getShape("padding.elementBottom",{skipFallback:!0}),i=r?Number(r.replace("px","")):10;return Object.assign(Object.assign({color:t.getCSSColor("text.error")},t.getCSSFontProperties("error")),{marginTop:`${n?"":"-"}${.5*Math.floor(i)}px`,marginRight:"0px",marginBottom:`${i}px`,marginLeft:"0px"})})),wa=e=>{let{theme:t,isFinalCardNode:n,cardInstanceId:r,subviewId:i,name:a,variableResolver:s}=e;return(0,o.h)(Ze.lj,{mapToProps:e=>{let{validationStates:t}=e;return{validationStates:t}}},(e=>{let{validationStates:l}=e;const d=l[r]||{};let c;var u,p,h;i?c=null===(u=d.subviews)||void 0===u||null===(p=u[i])||void 0===p?void 0:p[a]:c=null===(h=d.validations)||void 0===h?void 0:h[a];return c&&c.errorMessage?(0,o.h)(ya,{theme:t,requiresTopSpacing:n,role:"alert","data-testid":"validation"},s(c.errorMessage)):null}))},xa=e=>{let{fillColor:t,style:n,ariaHidden:r}=e;return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",height:"8",viewBox:"0 0 11 8",width:"11",style:n,"aria-hidden":r},(0,o.h)("path",{"clip-rule":"evenodd",d:"m10.7071.292893c.3905.390524.3905 1.023687 0 1.414217l-5.99999 6c-.39053.39052-1.02369.39052-1.41422 0l-2.999997-3c-.3905241-.39053-.3905241-1.02369 0-1.41422.390524-.39052 1.023687-.39052 1.414217 0l2.29289 2.2929 5.29289-5.292897c.39053-.3905241 1.02371-.3905241 1.41421 0z",fill:null!=t?t:"#000","fill-rule":"evenodd"}))},ka=Sn("div")((e=>{let{mode:t}=e;return Object.assign({display:"block",cursor:"pointer",flex:"1 1 auto",maxWidth:"100%",minWidth:"0"},t===aa?{display:"flex",justifyContent:"space-between",gap:"5px"}:{})})),Ca=Sn("div")((()=>({flex:"0 0 auto",alignItems:"center"}))),Oa=Sn("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),Ma=Sn("div")((e=>{var t,n,r,i,o;let{open:a,openPosition:s,height:l,theme:d,horizontalInset:c}=e;return Object.assign(Object.assign({position:"absolute",top:`${s}px`,left:a?`${null!=c?c:0}px`:"-999px",width:`calc(100% - ${2*(null!=c?c:0)}px)`,backgroundColor:d.getCSSColor("background.dropdownMenu"),boxShadow:`${null!==(t=d.getShape("offset.dropdownMenuShadow",{skipFallback:!0}))&&void 0!==t?t:"2px"} ${null!==(n=d.getShape("offset.dropdownMenuShadow",{skipFallback:!0}))&&void 0!==n?n:"2px"} ${null!==(r=d.getShape("blur.dropdownMenuShadow",{skipFallback:!0}))&&void 0!==r?r:"10px"} ${null!==(i=d.getCSSColor("shadow.dropdownMenu",{skipFallback:!0}))&&void 0!==i?i:"rgba(0,0,0,0.2)"}`,cursor:"pointer",height:`${l}px`,maxHeight:"335px",overflow:"auto",zIndex:Es.DROPDOWN,borderRadius:null!==(o=d.getShape("borderRadius.dropdownMenu",{skipFallback:!0}))&&void 0!==o?o:"5px",color:"black"},d.getCSSFontProperties("primary")),{visibility:a?"visible":"hidden"})})),Ia=Sn("div")((e=>{var t,n;let{theme:r,disabled:i}=e;return Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"space-between",gap:"5px",padding:"20px",":hover":{backgroundColor:null!==(t=r.getCSSColor("background.dropdownMenuItem",{skipFallback:!0}))&&void 0!==t?t:"rgba(0,0,0,0.05)"},":active":{backgroundColor:null!==(n=r.getCSSColor("background.dropdownMenuItem",{skipFallback:!0}))&&void 0!==n?n:"rgba(0,0,0,0.1)"},border:"0px",color:i?"rgba(0,0,0,0.3)":r.getCSSColor("text.dropdownMenuItem")},r.getCSSFontProperties("dropdownMenuItem")),r.getElementFocusCSSProperties())})),Na=Sn("div")((e=>{let{theme:t,mode:n,placeholder:r}=e;const i=Object.assign({paddingTop:"0px",color:t.getCSSColor("text.secondary"),maxWidth:"100%",minWidth:"0",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",flex:r?"1 1 0":"1 0 auto",textAlign:"right",paddingRight:"0.1em",paddingBottom:"0.1em",marginBottom:"-0.1em"},t.getCSSFontProperties("secondary")),o=Object.assign({paddingTop:"2px",color:t.getCSSColor("text.valueStacked",{skipFallback:!0})||t.getCSSColor("text.primary")},t.getCSSFontProperties("valueStacked",{skipFallback:!0})||t.getCSSFontProperties("primary")),a=Object.assign({paddingTop:"0px",color:t.getCSSColor("text.valueStacked")},t.getCSSFontProperties("valueStacked"));return Object.assign(Object.assign(Object.assign(Object.assign({marginRight:"10px"},n===aa?i:{}),n===sa?o:{}),n===la?a:{}),r?{color:t.getCSSColor("text.hint")}:{})})),Fa=e=>{let{onClick:t,children:n,ref:r,theme:i,disabled:a,isSelected:s}=e;return(0,o.h)(Ia,{onClick:t,ref:r,tabIndex:"-1",theme:i,disabled:a,"aria-disabled":a,"aria-selected":s,role:"option"},n)},La=e=>{let{children:t,mode:n,theme:r,placeholder:i,ariaLabel:a}=e;return(0,o.h)(Na,{theme:r,mode:n,placeholder:i,class:"dropdown-selected-value","aria-label":a},t)},Ta=(e,t,n,r)=>{var i,o,a,s,l,d;let c=0,u=0,p=0,h=0,m=null;const g=null===(s=window.frameElement)||void 0===s?void 0:s.parentElement,f=document.querySelector("#action-cards-sdk-card-container"),v=(null==g?void 0:g.scrollHeight)!==(null==g?void 0:g.clientHeight),b=(null==f?void 0:f.scrollHeight)!==(null==f?void 0:f.clientHeight);if("launcher"!==r&&g&&v&&!b)m=g;else if(n){m=document.querySelector("#action-cards-subview-container")}else null!==f&&(m=f);if(null!==window.frameElement){var S,y;const e=t.getBoundingClientRect(),n=null===(S=m)||void 0===S?void 0:S.getBoundingClientRect();c=e.top-(n?null==n?void 0:n.top:0),u=e.bottom-(n?null==n?void 0:n.top:0),p=null!==(i=null===(y=m)||void 0===y?void 0:y.scrollHeight)&&void 0!==i?i:window.innerHeight}else{const e=document.querySelector("#workbench-card-preview");if(e){const n=e.getBoundingClientRect(),r=t.getBoundingClientRect();h=e.scrollTop,c=r.top-n.top-h,u=c+t.offsetHeight,p=e.offsetHeight}}e.style.height="auto";const w=c-20+(m?m.scrollTop:0),x=p-u-20,k=w-(null!==(o=null===(l=m)||void 0===l?void 0:l.scrollTop)&&void 0!==o?o:0),C=(null!==(a=null===(d=m)||void 0===d?void 0:d.offsetHeight)&&void 0!==a?a:p)-k-20-t.offsetHeight,O=e.offsetHeight;e.style.height="";const M=t.offsetTop,I=window.getComputedStyle(t),N=e=>{const t=parseFloat(null!=e?e:"");return Number.isFinite(t)?t:0},F=N(I.paddingTop),L=N(I.paddingBottom),T={openPosition:M+t.offsetHeight+10-L,height:O},A={openPosition:M-O-10+F,height:O};return O<=C?T:O<=k?A:O<=x?T:O<=w?A:{openPosition:M,height:Math.min(O,x+t.offsetHeight)}},Aa=G.forwardRef(((e,t)=>{let{nodeKey:n,cardInstanceId:r,subviewId:i,embedMode:a,attributes:{format:s,defaultValue:l,thumbnailSrc:d,thumbnailAltText:c,label:u,name:p,values:m,placeholder:f},validations:S,theme:y,horizontalInset:w,isFinalCardNode:x,variableResolver:k,onValueChanged:C}=e;const[O,M]=h(!1),[I,N]=h(0),[F,L]=h(0),[T,A]=h(l?k(l.toString()):null),[j,_]=h(-1),E=v(null),D=v(null),H=v(null),P=v(null),R=v(l?k(l.toString()):null),$=m.find((e=>{let{value:t}=e;return T===t}));b(t,(()=>({getCurrentValue:()=>T,setCurrentValue:e=>A(e)}))),g((()=>{const e=e=>{E.current&&!E.current.base.contains(e.target)&&(O&&Mt().validateField(r,p,T,S),M(!1))},t=e=>{var t,n;(null==H||null===(t=H.current)||void 0===t||null===(n=t.base)||void 0===n?void 0:n.contains(document.activeElement))&&e.key===ei&&(M(!1),D.current.base.focus())};return document.addEventListener("mousedown",e),document.addEventListener("keydown",t),()=>{document.removeEventListener("mousedown",e),document.removeEventListener("keydown",t)}})),g((()=>{if(C)C(T);else{const e=It(r,p,i);e?(R.current=e.toString(),A(e)):Mt().handleFormChange(r,p,T,i)}H.current&&P.current&&(H.current.base.scrollTop=P.current.base.offsetTop)}),[]),g((()=>{const e=l?k(l.toString()):null;e!==R.current&&(T===R.current&&(C?C(e):Mt().handleFormChange(r,p,e,i),A(e)),R.current=l?k(l.toString()):null)}),[l]),g((()=>{if(O){const e=m.findIndex((e=>T===e.value));_(Math.max(0,e))}else _(-1)}),[O]);const B=`dropdown-input-${r}-${p}`;return(0,o.h)(Ze.lj,{actions:yt,mapToProps:()=>{}},(e=>(0,o.h)(Oa,null,(0,o.h)(fa,{nodeKey:n,ref:E,innerRef:D,mode:s,label:k(u),labelId:B,theme:y,isFinalCardNode:x,tabFocusable:!0,accessibleAttributes:{role:"combobox","aria-haspopup":"listbox","aria-expanded":O,"aria-controls":`${p}-dropdown-body`,"aria-labelledby":B},clickableLabel:!1,onClick:()=>{if(E.current){const{openPosition:t,height:n}=Ta(H.current.base,E.current.base,!!i,a);N(t),L(n),M((t=>(t&&e.validateField(r,p,T,S,i),!t)))}}},d&&(0,o.h)(Ca,null,(0,o.h)(ba,{thumbnailUrl:k(d),altText:null!=c?c:"",theme:y})),(0,o.h)(ka,{mode:s},u&&s!==la&&(0,o.h)(pa,{theme:y,mode:s,name:B,truncateLabel:s===aa,inputHasValue:!!T,styles:{flex:"0 1 auto"}},k(u)),(0,o.h)(La,{theme:y,mode:s,placeholder:!$},$?$.title:k(f))),(0,o.h)(Sa,{fillColor:y.getCSSColor("icon.dropdown"),styles:{flex:"0 0 auto"},ariaHidden:!0}),(0,o.h)(Ma,{ref:H,open:O,openPosition:I,theme:y,height:F,className:"dropdown-body",id:`${p}-dropdown-body`,role:"listbox",horizontalInset:w},(0,o.h)(si,{defaultIndex:j,theme:y},m.map(((t,n)=>(0,o.h)(Fa,{onClick:()=>{t.disabled||(A(t.value),C?C(t.value):e.handleFormChange(r,p,t.value,i),e.validateField(r,p,t.value,S,i),D&&D.current&&D.current.base&&D.current.base.focus(),_(n))},ref:t.value===T?P:null,theme:y,disabled:t.disabled,isSelected:t.value===T,"data-testid":`option-${t.title}`},t.title,t.value===T&&(0,o.h)(xa,{fillColor:y.getCSSColor("background.dropdownMenuSelectedIcon"),style:{flexShrink:0},ariaHidden:!0}))))))),(0,o.h)(wa,{name:p,cardInstanceId:r,subviewId:i,theme:y,isFinalCardNode:x,variableResolver:k}))))})),ja=Sn("div")((e=>{let{mode:t}=e;return Object.assign(Object.assign({display:"block"},t!==sa?{display:"flex",justifyContent:"space-between",gap:"5px"}:{}),{cursor:"pointer",flex:"1 1 auto",maxWidth:"100%",minWidth:"0"})})),_a=Sn("div")((()=>({flex:"0 0 auto",alignItems:"center"}))),Ea=Sn("div")((()=>({"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}))),Da=e=>{var t,n,r,i,a,s,l,d,c,u,p,m;let{nodeKey:f,cardInstanceId:b,subviewId:S,attributes:{format:y,defaultValue:w,thumbnailSrc:x,thumbnailAltText:k,label:C,name:O,placeholder:M},controlledDateValidator:I,validations:N,theme:F,horizontalInset:L,isFinalCardNode:T,variableResolver:A,onValueChanged:j,embedMode:_}=e;const E=w?new Date(w):void 0,D=v(E?(0,le.addMinutes)(E,E.getTimezoneOffset()):null),H=`datepicker-input-${b}-${O}`,[P,R]=h(!1),[$,B]=h(0),[V,z]=h(0),[W,U]=h(D.current),q=v(null),Y=v(null),Z=v(null),K=(null==N||null===(t=N.maximumDate)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.maximumDate)?new Date(null==N||null===(r=N.maximumDate)||void 0===r||null===(i=r.attributes)||void 0===i?void 0:i.maximumDate):void 0,G=(null==N||null===(a=N.minimumDate)||void 0===a||null===(s=a.attributes)||void 0===s?void 0:s.minimumDate)?new Date(null==N||null===(l=N.minimumDate)||void 0===l||null===(d=l.attributes)||void 0===d?void 0:d.minimumDate):void 0,X=new Date;let Q=new Date;if(K&&G){if(!(X<=K&&X>=G)){Q=Math.abs((0,le.differenceInSeconds)(X,K))<Math.abs((0,le.differenceInSeconds)(X,G))?K:G}}else if(G){X>=G||(Q=G)}else if(K){X<=K||(Q=K)}const J=W?new Date(W):new Date(Q);J.setHours(0,0,0,0);const ee=()=>{P&&Mt().validateField(b,O,W,N,S),R(!1)};let te;g((()=>{const e=e=>{Z.current&&!Z.current.base.contains(e.target)&&q.current&&!q.current.base.contains(e.target)&&ee()};return document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}})),g((()=>{const e=W?W.toISOString():void 0,t=W?ht()(W,Se):null;if(j)j(e);else{const e=It(b,O,S);e?(D.current=new Date(e),U(e)):Mt().handleFormChange(b,O,t,S)}}),[]),g((()=>{var e;const t=w?new Date(w):void 0,n=t?(0,le.addMinutes)(t,t.getTimezoneOffset()):null;if((null==n?void 0:n.toDateString())!==(null===(e=D.current)||void 0===e?void 0:e.toDateString())){if(W===D.current){const e=n?n.toISOString():void 0,t=n?ht()(n,Se):null;j?j(e):Mt().handleFormChange(b,O,t,S),U(n)}D.current=n}}),[w]),I?te=I:((null==N||null===(c=N.maximumDate)||void 0===c||null===(u=c.attributes)||void 0===u?void 0:u.maximumDate)||(null==N||null===(p=N.minimumDate)||void 0===p||null===(m=p.attributes)||void 0===m?void 0:m.minimumDate))&&(te=e=>{var t,n,r,i;const o=null===(t=N.maximumDate)||void 0===t||null===(n=t.attributes)||void 0===n?void 0:n.maximumDate,a=null===(r=N.minimumDate)||void 0===r||null===(i=r.attributes)||void 0===i?void 0:i.minimumDate,s=o?ut(o,{isMax:!0}):void 0,l=a?ut(a,{isMin:!0}):void 0;return(!s||e<=s)&&(!l||e>=l)});const ne=W?ht()(W,"DD MMM YYYY"):A(M),re=()=>{Y&&Y.current&&Y.current.base&&Y.current.base.focus()};return(0,o.h)(Ze.lj,{actions:yt,mapToProps:()=>{}},(e=>(0,o.h)(Ea,null,(0,o.h)(fa,{nodeKey:f,ref:q,innerRef:Y,mode:y,label:A(C),labelId:H,theme:F,isFinalCardNode:T,tabFocusable:!0,accessibleAttributes:{role:"button","aria-haspopup":"dialog","aria-expanded":P,"aria-labelledby":H},clickableLabel:!1,onClick:()=>{if(q.current){const{openPosition:t,height:n}=Ta(Z.current.base,q.current.base,!!S,_);B(t),z(n),R((t=>(t&&e.validateField(b,O,W,N,S),!t)))}}},x&&(0,o.h)(_a,{mode:y},(0,o.h)(ba,{thumbnailUrl:A(x),altText:null!=k?k:"",theme:F})),(0,o.h)(ja,{mode:y},C&&y!==la&&(0,o.h)(pa,{theme:F,mode:y,name:H,truncateLabel:y===aa,styles:{flex:"0 1 auto"}},A(C)),(0,o.h)(La,{theme:F,mode:y,placeholder:!W,ariaLabel:ne},ne)),(0,o.h)(Sa,{fillColor:F.getCSSColor("icon.dropdown"),styles:{flex:"0 0 auto"},ariaHidden:!0})),(0,o.h)(Ma,{ref:Z,open:P,openPosition:$,horizontalInset:L,theme:F,height:V},(0,o.h)(ia,{date:J,open:P,theme:F,onDateSelected:t=>{U(t);const n=t?ht()(t,Se):void 0,r=t?t.toISOString():void 0;j?j(r):e.handleFormChange(b,O,n,S),e.validateField(b,O,r,N,S),R(!1),re()},onCancel:()=>{ee(),re()},isDateEnabled:te})),(0,o.h)(wa,{theme:F,isFinalCardNode:T,name:O,cardInstanceId:b,subviewId:S,variableResolver:A}))))},Ha=15,Pa=(0,le.startOfDay)(new Date),Ra=e=>{let{cardInstanceId:t,attributes:{format:n,name:r,label:i,defaultValue:a},validations:s,theme:l,horizontalInset:d,maxDateTime:c,selectedDate:u,selectedTime:p,isWorkflow:m,variableResolver:f,onValueChanged:b}=e;const S=new Date(a),[y,w]=h(""),x=v(null),k=v([...Array(96).keys()].map((e=>({title:(0,le.format)((0,le.addMinutes)(Pa,e*Ha),"h:mm A"),value:""+e*Ha,disabled:!1})))),C=e=>{let t="";return e.forEach((e=>{e.disabled||(t=e.value)})),t};g((()=>{if(u){const t=k.current.map(((e,t)=>{const n=(0,le.addMinutes)(u,t*Ha);return e.disabled=!!(c&&n>=c),e}));if(k.current=t,p&&c){if((0,le.addMinutes)(u,p||0)>c){const t=C(k.current);var e;if(t)null==b||b(t),null===(e=x.current)||void 0===e||e.setCurrentValue(t)}}}}),[c,u]);return(0,o.h)(Aa,{ref:x,attributes:{name:r,label:i,format:n,values:k.current,defaultValue:(()=>{const e=$a(S);if(c){var t;const n=(0,le.differenceInMinutes)(c,(0,le.startOfDay)(S)),r=C(k.current);if(S>c)return Number(r);if(e<n)return e;const i=(0,le.differenceInMinutes)(c,(0,le.startOfDay)(c));return w((0,le.format)((0,le.addMinutes)(Pa,i),"h:mm A")),null===(t=x.current)||void 0===t||t.setCurrentValue(""),null==b||b(i.toString()),i}return e})(),placeholder:y},cardInstanceId:t,variableResolver:f,theme:l,horizontalInset:d,validations:s,isWorkflow:m,onValueChanged:b})},$a=e=>Math.ceil(((0,le.differenceInMinutes)(e,(0,le.startOfDay)(e))+5)/Ha)*Ha,Ba=Sn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,cardMaximumWidth:i}=e;return Object.assign({backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"},"modal-stream"===r?{position:"relative",height:"auto",width:"100%",maxWidth:i?`${i}px`:"initial",borderRadius:n.getShape("borderRadius.card")||"initial",border:`${n.getShape("border.card")||"0px"} solid ${n.getCSSColor("border.card")}`}:{})})),Va=Sn("div")({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0px 20px 20px"}),za=Sn("div")({overflow:"auto",paddingTop:"10px"}),Wa=e=>{let{workflowTheme:t,feedTheme:n}=e;const r=y(Vi),i=r.analyticsDispatcher,a=r.cardEventDispatcher,s=r.authTokenProvider,[l,d]=h(void 0),[c,u]=h(0),p=new Date;return(0,o.h)(Ze.lj,{actions:(0,Q.Y2)(Ke,un),mapToProps:e=>{const t=nt(e);let n,r,i;return t&&it(t)&&(n=t.cardInstanceId,r=t.source,i=t.cardExpiry),{screenTitle:e.application.customStrings.cardSnoozeTitle||"Remind me",embedMode:e.application.embedMode,cardMaximumWidth:e.cardFeed.cardMaximumWidth,snoozeCardInstanceId:n,source:r,snoozeCardExpiry:i}}},(e=>{const[r,m]=h(p),[f,v]=h(0),b=e.snoozeCardInstanceId,S=e.snoozeCardExpiry,y=e.source;if(!b||!y)return null;const w=e.screenTitle,x="modal-subview"===e.embedMode?ki:xi;g((()=>{i.sendEvent({eventName:_t,cardInstanceId:b,cardViewState:"subview"})}),[]);return(0,o.h)(Ba,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,cardMaximumWidth:e.cardMaximumWidth,id:Wi},(0,o.h)(x,{title:w,theme:t,cardBorderRadius:n.getShape("borderRadius.card"),actionHandler:()=>{i.sendEvent({eventName:Et,cardInstanceId:b,cardViewState:"subview"}),e.navigateBack()}}),(0,o.h)(Va,{class:"use-offset"},(0,o.h)(za,{class:"offset-child"},(0,o.h)(Da,{cardInstanceId:b,attributes:{name:"snoozeDate",label:"Date",defaultValue:ht()(p,"YYYY-MM-DD[T]00:00:00.000[Z]"),format:aa},isWorkflow:!0,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{m(new Date(e))},controlledDateValidator:S?e=>{if(S){return e<=new Date(S)}return!0}:void 0,horizontalInset:ke}),(0,o.h)(Ra,{attributes:{name:"snoozeTime",label:"Time",defaultValue:p.toISOString(),format:aa},isWorkflow:!0,cardInstanceId:b,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{v(Number.parseInt(e))},selectedDate:r,selectedTime:f,maxDateTime:S?new Date(S):void 0,horizontalInset:ke}),(0,o.h)(wl,{isWorkflow:!0,clickHandler:()=>()=>{const t=Ua(r,f);if((0,le.isPast)(t)){const e=c+1;u(e),d({text:"Date must be in the future",messageId:`${e}`,cardInstanceId:b,action:"other"})}else e.navigateBack(),fl(be().getState(),e,b,t,a,s,y)},text:"Done",theme:t,appearance:"primary"}))),(0,o.h)(Li,{theme:t,message:l,actionTitle:"Dismiss",onDismiss:()=>{}}))}))},Ua=(e,t)=>(0,le.addMinutes)((0,le.startOfDay)(e),t),qa=(e,t,n)=>({getTheme:r=>new Mn(e,r,t,n)});var Ya=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Za="theme_cache",Ka=()=>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(Za).createIndex("stream_container_id","stream_container_id",{unique:!0})}}));var Ga=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Xa=(e,t)=>Ga(void 0,void 0,void 0,(function*(){const n=`theme/${e}`,{data:r,response:i}=yield Kp.get(n,void 0,t,{streamContainerId:e});if(200===i.status){if(r&&r.theme){try{yield((e,t,n)=>Ya(void 0,void 0,void 0,(function*(){const r=yield Ka();return new Promise(((i,o)=>{const a=r.transaction(Za,"readwrite").objectStore(Za).put({themePayload:t,eTag:n},e);a.onsuccess=()=>{r.close();const t=a.result;i({streamContainerId:e,themePayload:t.themePayload,eTag:t.eTag})},a.onerror=e=>{r.close(),o(e)}}))})))(e,r,i.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:i.error}})),Qa=e=>Ga(void 0,void 0,void 0,(function*(){try{const t=yield(e=>Ya(void 0,void 0,void 0,(function*(){const t=yield Ka();return new Promise(((n,r)=>{const i=t.transaction(Za,"readonly").objectStore(Za).get(e);i.onsuccess=()=>{t.close(),n(i.result)},i.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 Ja extends o.Component{componentDidCatch(e){this.props.onError?this.props.onError(e):console.error(e)}render(){return this.props.children}}const es=e=>{let{fontFamilies:t}=e;return(0,o.h)("style",{dangerouslySetInnerHTML:{__html:t.map((e=>ns(e))).join("\n")}})},ts={ttf:"truetype",otf:"opentype",woff:"woff",woff2:"woff2"},ns=e=>{let{fontFamily:t,weight:n,style:r,src:i}=e;if(i&&0===i.split(".").length)throw new Error("Invalid file url provided for font.");const o=i?new URL(i).pathname:null;if(!o)return"";const a=o.split("."),s=a[a.length-1],l=ts[s];if(!l)return"";if(!t)return"";return`\n @font-face {\n font-family: "${t}";\n ${(i?`src: url('${i}') format('${l}');`:"")||""}\n font-weight: ${n||"normal"};\n font-style: ${r||"normal"};\n font-display: swap;\n }\n `},rs=e=>{let t,{theme:n,mode:r,singleLine:i}=e,o=n.getNumericFontSize("primary"),a=n.getCSSFontProperties("primary");if(a&&a.lineHeight&&o){const e=Math.ceil(.05*o);t=Number(a.lineHeight.replace("px",""))+e}const s=Object.assign({color:n.getCSSColor("text.secondary"),textOverflow:"ellipsis"},n.getCSSFontProperties("secondary")),l=Object.assign({color:n.getCSSColor("text.valueStacked",{skipFallback:!0})||n.getCSSColor("text.primary")},n.getCSSFontProperties("valueStacked",{skipFallback:!0})||n.getCSSFontProperties("primary")),d=Object.assign({color:n.getCSSColor("text.valueStacked")},n.getCSSFontProperties("valueStacked"));return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({backgroundColor:n.getCSSColor("background.component")},n.getCSSFontProperties("primary")),{border:"none",boxSizing:"border-box",height:"100%",width:"100%",display:"flex",flexGrow:"1",overflow:"hidden !important"}),r===aa?s:{}),r===sa?l:{}),r===la?d:{}),i&&t?{lineHeight:`${t}px`}:{}),{":focus":{outline:"none"},"::placeholder":{color:n.getCSSColor("text.hint")},whiteSpace:"pre-wrap"})},is=Sn("textarea")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign({},rs({theme:t,mode:n})),{resize:"none",boxSizing:"content-box",padding:"0px"})})),os=Sn("input")((e=>{let{theme:t,mode:n}=e;return Object.assign(Object.assign({},rs({theme:t,mode:n,singleLine:!0})),{textOverflow:"ellipsis",paddingLeft:"0px",paddingRight:"0px"})})),as=(e,t,n)=>{const{minimumLines:r,hasContent:i,labelFormat:o}=n||{};let a=0;"getComputedStyle"in window&&document.defaultView&&(a=parseInt(document.defaultView.getComputedStyle(e,null).getPropertyValue("line-height"))),e.style.height="auto",r&&(e.style.minHeight=r*a+"px"),1===t?e.style.height="auto":t>0?e.style.height=t*a+"px":o!==aa||i?e.scrollHeight-e.clientHeight>a/2&&(e.style.height=`${e.scrollHeight}px`):e.style.height="auto"},ss=Sn("div")((e=>{let{mode:t}=e;return{display:t===sa?"block":"flex",flexDirection:"column",flexGrow:"1"}}));let ls=null;const ds=G.forwardRef(((e,t)=>{let{nodeKey:n,cardInstanceId:r,subviewId:i,attributes:{format:a,defaultValue:s,numberOfLines:l,name:d,thumbnailSrc:c,thumbnailAltText:u,label:p,placeholder:m,maxLength:f},minimumLines:S,validations:y,theme:w,isFinalCardNode:x,variableResolver:k,onValueChanged:C}=e;const O=v(null),M=v(s),I=`text-input-${r}-${d}`,[N,F]=h(k(s)),L=1===l?os:is;g((()=>{const{current:{base:e}}=O,t=It(r,d,i),n=!!N||!!t;t?(M.current=t,F(t)):Mt().handleFormChange(r,d,N,i),as(e,l,{minimumLines:S,hasContent:n,labelFormat:a})}),[]),g((()=>{if(s!==M.current){if(N===k(M.current)){const e=k(s);F(e),Mt().handleFormChange(r,d,e,i)}M.current=s}}),[s]);const T=k(m);return(0,o.h)(Ze.lj,{actions:yt,mapToProps:()=>{}},(e=>(b(t,(()=>({clearInput:()=>{F(""),O.current.base&&as(O.current.base,l,{hasContent:!1,labelFormat:a}),e.handleFormChange(r,d,"",i)}}))),(0,o.h)(o.Fragment,null,(0,o.h)(fa,{nodeKey:n,mode:a,label:k(p),labelFor:I,theme:w,isFinalCardNode:x,clickableLabel:!1,onClick:()=>{var e,t;null===(e=O.current)||void 0===e||null===(t=e.base)||void 0===t||t.focus()}},c&&(0,o.h)(ba,{thumbnailUrl:k(c),altText:null!=u?u:"",theme:w}),(0,o.h)(ss,{mode:a},p&&a===sa&&(0,o.h)(pa,{theme:w,mode:a,name:I},k(p)),(0,o.h)(L,{theme:w,mode:a,id:I,ref:O,placeholder:T,value:N,maxlength:f,className:"input-text",onInput:t=>{const{current:{base:n}}=O,{value:o}=t.target;F(o),as(n,l,{hasContent:!!o,labelFormat:a}),((e,t)=>{null!==ls&&(clearTimeout(ls),ls=null),ls=setTimeout((()=>{t(r,d,null!=e?e:void 0,y,i)}),200)})(o,e.validateField),e.handleFormChange(r,d,o,i),C&&C(o)},rows:"1"}))),(0,o.h)(wa,{name:d,cardInstanceId:r,subviewId:i,theme:w,isFinalCardNode:x,variableResolver:k})))))})),cs=Sn("div")((e=>{let{theme:t}=e;return Object.assign({padding:"10px 20px",display:"flex",width:"100%",alignItems:"center",border:"0px"},t.getElementFocusCSSProperties())})),us=Sn("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.labelInline",{skipFallback:!0})||t.getCSSColor("text.primary")},t.getCSSFontProperties("labelInline",{skipFallback:!0})||t.getCSSFontProperties("primary"))})),ps=Sn("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%"}})),hs=e=>{let{title:t,value:n,checked:r,onValueSelected:i,theme:a}=e;return(0,o.h)(cs,{onClick:()=>{i(n)},role:"radio","aria-checked":r,theme:a,tabIndex:"-1"},(0,o.h)(us,{theme:a},t),(0,o.h)(ps,{checked:r,theme:a}))},ms=Sn("div")((e=>{let{}=e;return{display:"flex",flexFlow:"column wrap",width:"100%"}})),gs=Sn("div")((e=>{let{}=e;return{display:"none"}})),fs=e=>{let{attributes:{items:t,title:n,name:r},theme:i,onValueChanged:a}=e;const[s,l]=h(null),d=`radio-group-${r}`;return(0,o.h)(fa,{mode:"inline",theme:i,hPadding:0},(0,o.h)(gs,{id:d},n),(0,o.h)(ms,{role:"radiogroup","aria-labelledby":d},(0,o.h)(si,{theme:i},t.map((e=>(0,o.h)(hs,{title:e.title,value:e.value,theme:i,checked:s===e.value,onValueSelected:e=>{l(e),a&&a(e)}}))))))},vs=Sn("div")((e=>{let{workflowTheme:t,feedTheme:n,embedMode:r,cardMaximumWidth:i}=e;return Object.assign({backgroundColor:t.getCSSColor("background.default"),height:"100%",display:"flex",flexDirection:"column",position:"static"},"modal-stream"===r?{height:"auto",width:"100%",maxWidth:i?`${i}px`:"initial",borderRadius:n.getShape("borderRadius.card")||"initial",border:`${n.getShape("border.card")||"0px"} solid ${n.getCSSColor("border.card")}`}:{})})),bs=Sn("div")({position:"static",top:"60px",bottom:"0px",width:"100%",flexDirection:"column",overflowY:"auto",overflowX:"hidden",padding:"0px 20px 20px"}),Ss=Sn("div")({overflow:"auto",paddingTop:"10px"}),ys=Sn("div")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.error")},t.getCSSFontProperties("error")),{margin:"-10px 0 30px 0"})})),ws=e=>{let{workflowTheme:t,feedTheme:n}=e;const r=y(Vi),i=r.analyticsDispatcher,a=r.cardEventDispatcher,s=v(),[l,d]=h(null),[c,u]=h(null),[p,m]=h(!1);return(0,o.h)(Ze.lj,{actions:(0,Q.Y2)(Ke,un),mapToProps:e=>{const t=nt(e),n=t&&ot(t)?t:void 0;return{embedMode:e.application.embedMode,cardMaximumWidth:e.cardFeed.cardMaximumWidth,screenTitle:e.application.customStrings.votingFeedbackTitle||"Send feedback",validationMessage:e.application.customStrings.votingFeedbackValidationMessage||"Feedback is limited to 280 characters.",feedbackSentiment:null==n?void 0:n.sentiment,feedbackCardInstanceId:null==n?void 0:n.cardInstanceId,feedbackSource:null==n?void 0:n.source,textFeedback:null==n?void 0:n.textFeedback,textFeedbackLabel:null==n?void 0:n.textFeedbackLabel}}},(e=>{const r="modal-subview"===e.embedMode?ki:xi,h=e.screenTitle,g=e.feedbackCardInstanceId,f=e.feedbackSource,v="positive"===e.feedbackSentiment&&e.textFeedback,b=[{title:"It's not relevant",value:"not-relevant"},{title:"I see this too often",value:"too-often"}];if(e.textFeedback&&b.push({title:"Something else",value:"other"}),!g||!f)return null;const S="positive"===e.feedbackSentiment?"Add optional feedback...":"Add your feedback...";return(0,o.h)(vs,{workflowTheme:t,feedTheme:n,embedMode:e.embedMode,cardMaximumWidth:e.cardMaximumWidth,id:Wi},(0,o.h)(r,{title:h,theme:t,cardBorderRadius:n.getShape("borderRadius.card"),actionHandler:()=>{var t;u(null),null===(t=s.current)||void 0===t||t.clearInput(),e.navigateBack()}}),(0,o.h)(bs,{class:"use-offset"},(0,o.h)(Ss,{class:"offset-child"},"negative"===e.feedbackSentiment&&(0,o.h)(fs,{attributes:{title:h,name:"feedback-reason",items:b},isWorkflow:!0,cardInstanceId:g,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{d(e)}}),("other"===l||v)&&(0,o.h)(o.Fragment,null,(0,o.h)(ds,{ref:s,attributes:{name:"feedback-message",defaultValue:"",placeholder:e.textFeedbackLabel&&e.textFeedbackLabel.length>0?e.textFeedbackLabel:S,numberOfLines:0,maxLength:280,format:sa},minimumLines:3,isWorkflow:!0,cardInstanceId:g,theme:t,variableResolver:e=>e||"",onValueChanged:e=>{if(e.length>=280)return m(!0);m(!1),u(e)}}),p&&(0,o.h)(ys,{theme:t,"data-testid":"feedback-validation-error"},e.validationMessage)),(0,o.h)(wl,{isWorkflow:!0,clickHandler:()=>()=>{var t;if(!v&&null===l)return;if("other"===l&&(null===c||null==c||0===c.trim().length))return;const n="other"===l||v&&c?{message:c}:{};i.sendEvent({cardViewState:"topview",eventName:v?Lt:Tt,cardInstanceId:g,properties:Object.assign(Object.assign({source:f},"negative"===e.feedbackSentiment||null!==c?{reason:v?"other":l}:{}),n)}),e.feedbackReceived(g),a.dispatchCardEvent({type:v?Bi.VOTED_USEFUL:Bi.VOTED_NOT_USEFUL}),u(null),null===(t=s.current)||void 0===t||t.clearInput(),e.navigateBack()},text:"Submit",theme:t,appearance:"primary"}))))}))};var xs=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const ks=()=>window.matchMedia("(prefers-color-scheme: dark)"),Cs=Sn("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.toast")}})),Os=e=>{let{store:t,onAnalyticsEvent:n,onCardEvent:r,onAuthTokenRequested:i,onError:a}=e;const s=S((()=>({analyticsDispatcher:{sendEvent:(e,t)=>xs(void 0,void 0,void 0,(function*(){n&&(void 0===t?yield n(e):yield n(e,t))}))},cardEventDispatcher:{dispatchCardEvent:e=>{r&&r(e)}},authTokenProvider:{requestToken:()=>xs(void 0,void 0,void 0,(function*(){return yield i()}))},runtimeVariableResolver:void 0})),[n,r,i]);return(0,o.h)(Ja,{onError:a},(0,o.h)(Vi.Provider,{value:s},(0,o.h)(Ze.zt,{store:t},(0,o.h)(Ze.lj,{actions:(0,Q.Y2)(Ke,un,yt,Ke)},Ms))))},Ms=e=>{const{cardFeed:t,messages:n,themeLoading:r,themeLoaded:i,clearMessage:a,application:{interfaceStyle:s,streamContainerId:l},theme:d}=e,[c,u]=h(ks().matches?"dark":"light");if(g((()=>{!function(){xs(this,void 0,void 0,(function*(){const e=yield Qa(l);if(e)i({theme:e.theme}),Xa(l,e.eTag);else{r();const e=yield Xa(l);i(e)}}))}()}),[]),g((()=>{const e=e=>{u(e.matches?"dark":"light")};return ks().addEventListener("change",e),()=>{ks().removeEventListener("change",e)}}),[]),!d.status||!1===d.status.loaded)return null;const p=d.themePayload?qa(d.themePayload,c,s):void 0;if(!p)return null;const m=p.getTheme("feed"),f=y(Vi),v=f.cardEventDispatcher,b=f.analyticsDispatcher,S=f.authTokenProvider;return(0,o.h)(Cs,{theme:m},(0,o.h)(Li,{theme:m,feedOrientation:Op(t.horizontalContainerConfig),message:n.cardList,actionTitle:n.cardList&&["submit-failed","dismiss-failed","snooze-failed"].includes(n.cardList.action)?"Try again":"Dismiss",actionHandler:()=>{var t,r,i,o,a,s,l,d,c,u;const p=null===(t=n.cardList)||void 0===t?void 0:t.cardInstanceId,h=null===(r=n.cardList)||void 0===r?void 0:r.action;if(p&&h)switch(h){case"submit-failed":gl(e,e,p,!1,v,b,S,(null===(i=e.messages.cardList)||void 0===i?void 0:i.responseValues)||{},{payload:null===(o=e.messages.cardList)||void 0===o?void 0:o.payload,postSubmissionUrl:null===(a=e.messages.cardList)||void 0===a?void 0:a.postSubmissionUrl,subviewData:null===(s=e.messages.cardList)||void 0===s?void 0:s.subviewData,submitButtonName:null===(l=e.messages.cardList)||void 0===l?void 0:l.submitButtonName});break;case"dismiss-failed":const t=null===(d=e.messages.cardList)||void 0===d?void 0:d.source;t&&ml(e,e,p,v,S,t);break;case"snooze-failed":const n=null===(c=e.messages.cardList)||void 0===c?void 0:c.snoozeDate,r=null===(u=e.messages.cardList)||void 0===u?void 0:u.source;n&&r&&fl(e,e,p,n,v,S,r)}},onDismiss:()=>{a("cardList")},delay:500}))};function Is(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let Ns;!function(e){e.STATE="state-update",e.ANALYTICS_EVENT="analytics-event-dispatched"}(Ns||(Ns={}));class Fs{constructor(){Is(this,"channel",void 0),Is(this,"isOpen",!1),Is(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 ue.error({level1:["BroadcastChannel API not supported in this browser"]});const r=n=>{n.type===e&&t(n)},i=n||`${e}-${Date.now().toString()}-${this.eventListeners.size}`;return this.channel.addEventListener(e,r),this.eventListeners.set(i,r),i}removeEventListener(e){if(!("BroadcastChannel"in window))return ue.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 ue.error({level1:["BroadcastChannel API not supported in this browser"]});this.channel.postMessage(e)}close(){this.channel.close(),this.isOpen=!1}}var Ls=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))},Ts=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 i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n};function As(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const js=()=>window.matchMedia("(prefers-color-scheme: dark)"),_s=()=>window.getComputedStyle(document.documentElement).getPropertyValue("font-size"),Es={FEED_OVERLAY:"100",CARD_OVERLAY:"110",DROPDOWN:"40",HEADER:"30",BANNER:"20",TOAST:"11",OVERFLOW_MENU:"11",OVERFLOW_MENU_BUTTON:"10",CUSTOM_HEADER:"2"},Ds=Sn("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%"}})),Hs={fontFamily:'-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',height:"100%",overflow:"hidden"},Ps=Sn("div")((e=>{var t,n,r,i,o,a;let{embedMode:s,feedTheme:l,workFlowTheme:d,renderMode:c,cardHorizontalAlignment:u,modalContainerPositioning:p,modalContainerVerticalPadding:h}=e;const m="feed"===c?null==l?void 0:l.getNumericalPadding("stream"):null==d?void 0:d.getNumericalPadding("stream");return Object.assign(Object.assign(Object.assign({},Hs),"launcher"===s?{borderRadius:"20px",boxShadow:"0 2px 20px 0 rgba(0, 0, 0, 0.1)"}:{}),"modal-stream"===s?{display:"flex",justifyContent:{leading:"safe flex-start",center:"safe center",trailing:"safe flex-end"}[null!=u?u:"center"],alignItems:{top:"safe flex-start",center:"safe center",bottom:"safe flex-end"}[null!=p?p:"center"],backgroundColor:`${null==l?void 0:l.getCSSColor("background.modalContainer")}`,paddingTop:`${"top"===p?null!==(t=null!=h?h:null==m?void 0:m.top)&&void 0!==t?t:10:null!==(n=null==m?void 0:m.top)&&void 0!==n?n:10}px`,paddingRight:`${null!==(r=null==m?void 0:m.right)&&void 0!==r?r:10}px`,paddingBottom:`${"bottom"===p?null!==(i=null!=h?h:null==m?void 0:m.bottom)&&void 0!==i?i:10:null!==(o=null==m?void 0:m.bottom)&&void 0!==o?o:10}px`,paddingLeft:`${null!==(a=null==m?void 0:m.left)&&void 0!==a?a:10}px`,overflowY:"auto"}:{})})),Rs=G.forwardRef(((e,t)=>{let{store:n,embedMode:r,applyCardFeedDeltaUpdates:i,cardCountChanged:a,onReady:s,runtimeVariableResolver:l,linkButtonPressed:d,submitButtonPressed:c,onCardListTutorialSeen:u,onAnalyticsEvent:p,onCardEvent:m,onError:f,onAuthTokenRequested:y,onCardFeedSubscribe:w,onModalStreamToggled:x,requestWebSocketReconnect:k,webSocketDisabled:C}=e;const[O,M]=h(js().matches?"dark":"light"),[,I]=h(_s);g((()=>{const e=e=>{M(e.matches?"dark":"light")};js().addEventListener("change",e);const t=()=>{I(_s)};return window.addEventListener("browser-font-changed",t),window.addEventListener("pageshow",(e=>{var t;e.persisted&&!(null===(t=N.containersBroadcastChannel)||void 0===t?void 0:t.isOpen)&&(N.containersBroadcastChannel=new Fs)})),()=>{js().removeEventListener("change",e),window.removeEventListener("browser-font-changed",t)}}),[]);const N=S((()=>({analyticsDispatcher:{sendEvent:(e,t)=>Ls(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:()=>Ls(void 0,void 0,void 0,(function*(){return yield y()}))},runtimeVariableResolver:l,containersBroadcastChannel:"BroadcastChannel"in window?new Fs:void 0})),[p,m,y]),F=v();return b(t,(()=>({pollCardList:()=>{var e;ue.debug({level3:["Card feed polling initiated"]}),null===(e=F.current)||void 0===e||e.loadCards(!1)},cancelCardListPolling:()=>{var e;null===(e=F.current)||void 0===e||e.cancelCardListPolling()}}))),"toast"===r?(0,o.h)(Os,{store:n,onAuthTokenRequested:y}):(0,o.h)(Ja,{onError:f},(0,o.h)(Vi.Provider,{value:N},(0,o.h)(Ze.zt,{store:n},(0,o.h)(Ze.lj,{actions:(0,Q.Y2)(un,se),mapToProps:e=>{const{cardResponses:t}=e;return Ts(e,["cardResponses"])}},(e=>{let{cardFeed:t,pendingCardFeedUpdates:n,cardStates:r,navigationStack:p,cardFeedLoading:h,cardFeedLoaded:m,themeLoading:g,themeLoaded:f,finishExternalAction:v,application:{cardListRefreshInterval:b,streamContainerId:S,runtimeVariableResolutionTimeout:y,isPreview:M,embedMode:I,customStrings:N,cardLimit:L,firstLoadStyles:T,interfaceStyle:A},externalAction:j,theme:{themePayload:_}}=e;const E=p.items.length?p.items[p.items.length-1]:void 0;let D;switch(null==E?void 0:E.kind){case"media":D="Media";break;case"subview":D="Card Subview";break;case"snooze":D="Snooze Date & Time Selector";break;case"feedback":D="Send Feedback"}return(0,o.h)(Ds,{embedMode:I,feedOrientation:Op(t.horizontalContainerConfig),id:"action-cards-sdk-app-root",class:"atomic-sdk-root","data-contentLabel":D},(0,o.h)(Bs,{ref:F,streamContainerId:S,runtimeVariableResolutionTimeout:y,runtimeVariablesResolver:l,themePayload:_,cardFeed:t,pendingCardFeedUpdates:n,cardStates:r,cardLimit:L,onThemeLoading:g,onThemeLoaded:f,onCardFeedLoading:h,onCardFeedLoaded:m,onCardFeedSubscribe:w,onModalStreamToggled:x,streamFilter:t.streamFilter,requestWebSocketReconnect:k,webSocketDisabled:C,currentNavigationItem:E,onReady:s,onCardCountChanged:a,applyCardFeedDeltaUpdates:i,cardListRefreshInterval:b,isPreview:M,cardListTitle:N.cardListTitle,embedMode:I,externalAction:j,finishExternalAction:v,onLinkButtonPressed:d,onSubmitButtonPressed:c,cardListTutorialSeen:t.tutorialSeen,onCardListTutorialSeen:u,firstLoadStyles:T,colourScheme:O,interfaceStyle:A,noInternetConnectionMessage:N.noInternetConnectionMessage,dataLoadFailedMessage:N.dataLoadFailedMessage,tryAgainTitle:N.tryAgainTitle}))})))))})),$s=e=>"modal-subview"!==e;class Bs extends o.Component{constructor(e){super(e),As(this,"pollCounter",0),As(this,"poll",void 0),this.poll=null}componentDidMount(){return Ls(this,void 0,void 0,(function*(){this.props.onReady(),$s(this.props.embedMode)&&this.loadTheme()}))}componentWillUnmount(){this.cancelCardListPolling()}componentDidUpdate(e){var t,n;const{cardFeed:r,externalAction:i}=e,{cardFeed:o,pendingCardFeedUpdates:a,cardStates:s,onCardCountChanged:l,externalAction:d,embedMode:c}=this.props;if("modal-subview"===c||"toast"===c)return;if("modal-stream"===c){var u,p,h,m,g,f;if(0===o.cardInstances.length)null===(u=window.frameElement)||void 0===u||u.classList.add("closed");else null===(p=window.frameElement)||void 0===p||p.classList.remove("closed");if(0===r.cardInstances.length&&o.cardInstances.length>0)null===(h=(m=this.props).onModalStreamToggled)||void 0===h||h.call(m,!0);if(r.cardInstances.length>0&&0===o.cardInstances.length)null===(g=(f=this.props).onModalStreamToggled)||void 0===g||g.call(f,!1)}const v=o.cardInstances.map((e=>e.instance.id)),b=r.cardInstances.map((e=>e.instance.id));var S;Fp(v,b)&&(null===(t=r.metadata)||void 0===t?void 0:t.totalCards)===(null===(n=o.metadata)||void 0===n?void 0:n.totalCards)||this.poll&&l&&l(o.cardInstances.length,null===(S=o.metadata)||void 0===S?void 0:S.totalCards);if(!r.tutorialSeen&&o.tutorialSeen&&this.props.onCardListTutorialSeen&&this.props.onCardListTutorialSeen(),d&&d.actionId!==(null==i?void 0:i.actionId)&&this.handleExternalAction(d),r.runtimeVariables.updateId!==o.runtimeVariables.updateId&&this.trackRuntimeVariablesChanged(o),Object.values(s).every((e=>null===e))&&a&&a.length>0){const e=(0,Q.kv)((0,Q.Y2)(un,se),be());this.props.applyCardFeedDeltaUpdates(e,a)}}trackRuntimeVariablesChanged(e){const t=this.context.analyticsDispatcher,n=!1===e.runtimeVariableAnalyticsEnabled;e.cardInstances.forEach((r=>{if(r.runtimeVariables){var i;const o=null===(i=e.runtimeVariables.values)||void 0===i?void 0:i.get(r.instance.id);t.sendEvent({cardInstanceId:r.instance.id,cardViewState:"topview",eventName:At,properties:{resolvedVariables:r.runtimeVariables.reduce(((e,t)=>(e[t.name]=(null==o?void 0:o.get(t.name))||"",e)),{})}},n)}}))}loadTheme(){return Ls(this,void 0,void 0,(function*(){const{streamContainerId:e,onThemeLoading:t,onThemeLoaded:n}=this.props,r=yield Qa(e);if(r)n({theme:r.theme}),Xa(e,r.eTag);else{t();n(yield Xa(e))}const i=be().getState().theme.status;i&&i.loaded&&this.subscribeToCardFeedUpdates()}))}loadCards(e){return Ls(this,void 0,void 0,(function*(){const t=this.context,{onCardFeedLoading:n,onCardFeedLoaded:r,streamContainerId:i,runtimeVariableResolutionTimeout:o,cardFeed:a,runtimeVariablesResolver:s,cardLimit:l,streamFilter:d}=this.props;e||n();const c=yield th(i,t.authTokenProvider,o,a.lastModified,s,l,d);e&&c.error||r(c),be().getState().cardFeed.status.loaded&&this.pollForNewCards()}))}handleExternalAction(e){return Ls(this,void 0,void 0,(function*(){const t=this.context,n=t.analyticsDispatcher,r=t.containersBroadcastChannel,i=()=>Ls(this,void 0,void 0,(function*(){var t;return n.sendEvent({cardInstanceId:e.cardInstanceId,cardViewState:e.cardViewState,eventName:Ft,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 i;if(n.data.type!==Ns.ANALYTICS_EVENT)return;const a=null===(i=n.data)||void 0===i?void 0:i.eventQueued;a.eventName===Ft&&a.cardInstanceId===e.cardInstanceId&&r&&(r.removeEventListener(t),o())}),t),yield i()}else yield i(),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&&$s(n)&&(this.poll=setTimeout((()=>Ls(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,ue.debug({level3:["Attempt to reconnect websocket initiated"]}),this.props.requestWebSocketReconnect())}))),t))}cancelCardListPolling(){this.poll&&ue.debug({level3:["Card feed polling cancelled"]}),clearTimeout(this.poll),this.poll=null,this.pollCounter=0}render(e){var t;let{currentNavigationItem:n,embedMode:r,cardFeed:i,firstLoadStyles:a,colourScheme:s,interfaceStyle:l,noInternetConnectionMessage:d,dataLoadFailedMessage:c,tryAgainTitle:u}=e;const p=be().getState(),h="modal-subview"===r;if(!p.theme.status)return h?null:(0,o.h)(Ps,{embedMode:r,id:Wi});if(!1===p.theme.status.loaded)return h?null:(0,o.h)(Ps,{embedMode:r,id:Wi},(0,o.h)($i,{embedMode:r,textColor:a.textColor,loadingIconColor:a.loadingSpinnerColor,buttonColor:a.buttonTextColor,backgroundColor:a.backgroundColor,onRetry:()=>{this.loadTheme()},state:p.theme.status.errorState,noInternetConnectionMessage:d,dataLoadFailedMessage:c,tryAgainTitle:u}));const{themePayload:m}=this.props;let g;g="standalone"===r&&(null===(t=i.horizontalContainerConfig)||void 0===t?void 0:t.enabled)||"single-card"===r?"feed":at(n)?"media":rt(n)?"subview":it(n)?"snooze":ot(n)?"feedback":h?void 0:"feed";const f=m?qa(m,s,l):void 0;if(!g||!f)return null;const v=f.getTheme("feed"),b=f.getTheme("workflow");return(0,o.h)(o.Fragment,null,(0,o.h)(Ps,{embedMode:r,feedTheme:v,workFlowTheme:b,renderMode:g,cardHorizontalAlignment:i.cardHorizontalAlignment,modalContainerPositioning:i.modalContainerPositioning,modalContainerVerticalPadding:i.modalContainerVerticalPadding,className:"feed-container",role:"main"},"subview"===g&&(0,o.h)(lo,{workflowTheme:b,feedTheme:v}),"media"===g&&(0,o.h)(yo,{workflowTheme:b,feedTheme:v}),"feed"===g&&(0,o.h)(Ji,{theme:v,onRetry:()=>(this.props.onCardFeedLoading(),this.subscribeToCardFeedUpdates())}),"snooze"===g&&(0,o.h)(Wa,{workflowTheme:b,feedTheme:v}),"feedback"===g&&(0,o.h)(ws,{workflowTheme:b,feedTheme:v})),(0,o.h)(es,{fontFamilies:v.getFontFamilies()}),(0,o.h)(Pn,null))}}As(Bs,"contextType",Vi);const Vs=new Map,zs=yn({to:{opacity:"0"}}),Ws=yn({to:{opacity:"1"}}),Us=yn({to:{opacity:"1",width:"400%",paddingTop:"400%"}}),qs=yn({to:{opacity:"0",transform:"scale(0.9)"}}),Ys=yn({from:{opacity:"1",transform:"scale(1)"},to:{opacity:"0",transform:"scale(0)"}}),Zs=e=>{if(Vs.has(`slideOutleftPadding-${e}`))return Vs.get(`slideOutleftPadding-${e}`);const t=yn({to:{transform:`translateX(calc(-120% - ${e}px))`}});return Vs.set(`slideOutleftPadding-${e}`,t),t},Ks=yn({from:{left:"100%"},to:{left:"50%"}}),Gs=yn({from:{},to:{height:"0px"}}),Xs=yn({from:{},to:{width:"0px"}}),Qs=e=>{let{theme:t,animationState:n}=e;return(0,o.h)(o.Fragment,null,(0,o.h)(al,{theme:t,class:n,"aria-hidden":"true"}),(0,o.h)(lr,{fillColor:t.getCSSColor("icon.cardCompletion"),className:"tick-icon",style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)",pointerEvents:"none"},"aria-hidden":!0}))},Js=e=>{let{animationState:t,theme:n}=e;return(0,o.h)(o.Fragment,null,(0,o.h)("div",{class:`${t||""} dismiss-icon`,style:{background:n.getCSSColor("background.quickActionPrimary"),pointerEvents:"none"},"aria-hidden":"true"},(0,o.h)(dr,{style:{fill:n.getCSSColor("icon.quickActionPrimary")}})),(0,o.h)("div",{class:`${t||""} clock-icon`,style:{background:n.getCSSColor("background.quickActionSecondary"),pointerEvents:"none"},"aria-hidden":"true"},(0,o.h)(cr,{style:{fill:n.getCSSColor("icon.quickActionSecondary")}})))},el=Sn("div")((e=>{let{theme:t,topAlign:n,viewState:r,embedMode:i,useHorizontalStyles:o,spaceBetweenCards:a,cardMaximumWidth:s,cardHorizontalAlignment:l}=e,d="rgba(255,255,255,1)";return"subview"===r?d=(_n(t.getCSSColor("background.default")),t.getCSSColor("background.default")):_n(t.getCSSColor("background.card"))&&!_n(t.getCSSColor("background.default"))?d=t.getCSSColor("background.default"):_n(t.getCSSColor("background.card"))||(d=t.getCSSColor("background.card")),d=(e=>{const t=e.match(/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,?\s*(\d*(?:\.\d+)?)?\s*\)$/);if(t){const[,e,n,r]=t;return`rgba(${e},${n},${r},1)`}return ue.warn({level3:["Expected a valid RGBA color string, but received:",e,"Returning the original value."]}),e})(d),Object.assign(Object.assign(Object.assign({position:"absolute",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",width:"100%",pointerEvents:"all",top:"0",bottom:"0",zIndex:Es.CARD_OVERLAY,padding:"15px 10px",backgroundColor:d,border:`${t.getShape("border.card")} solid ${t.getCSSColor("border.card")}`,borderRadius:t.getShape("borderRadius.card")||"initial"},n?{}:{display:"flex"}),o?{width:`calc(100% - ${a}px)`}:{}),"modal-stream"===i?{maxWidth:s?`${s}px`:"initial",margin:"0 auto",left:"leading"===l?"0px":"initial",right:"trailing"===l?"0px":"initial"}:{})})),tl=Sn("div")((e=>{let{topAlign:t}=e;return Object.assign({width:"100%",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},t?{marginTop:"15vh"}:{})})),nl=Sn("div")({}),rl=Sn("div")((e=>{let{theme:t,maxLines:n}=e;return Object.assign({width:"100%",overflow:"hidden",display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:`${n}`,textAlign:"center",marginTop:"20px",color:t.getCSSColor("text.processingStateMessage")},t.getCSSFontProperties("processingStateMessage",{skipFallback:!0})||{})})),il=Sn("button")((e=>{let{theme:t}=e;return Object.assign({width:"100%",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",marginTop:"15px",padding:"8px",background:"transparent",border:"0",outline:"none",fontWeight:"bold",cursor:"pointer",color:t.getCSSColor("text.processingStateButtonLabel")},t.getCSSFontProperties("processingStateButtonLabel",{skipFallback:!0})||{})})),ol=e=>{let{viewState:t,onCancelUpload:n,theme:r,renderOverlay:i,cardMaximumWidth:a,cardHorizontalAlignment:s,spaceBetweenCards:l}=e;return i?(0,o.h)(Ze.lj,{mapToProps:e=>{var t;const n=nt(e),r=n&&rt(n);return{customStrings:e.application.customStrings,embedMode:e.application.embedMode,presentingSubview:r,horizontalStreamContainer:!!(null===(t=e.cardFeed.horizontalContainerConfig)||void 0===t?void 0:t.enabled)}}},(e=>{var i,d,c,u;const p=v(null),m=v(null),f=v(null),b=v(null),[S,y]=h(0),w=null!==(i=null===(c=e.customStrings)||void 0===c?void 0:c.processingStateMessage)&&void 0!==i?i:"Sending, please wait...",x=null!==(d=null===(u=e.customStrings)||void 0===u?void 0:u.processingStateCancelButtonTitle)&&void 0!==d?d:"Cancel process";if(g((()=>{var e,t,n,r,i,o,a,s;const l=null===(e=p.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.clientHeight,d=null===(n=m.current)||void 0===n||null===(r=n.base)||void 0===r?void 0:r.clientHeight,c=null===(i=f.current)||void 0===i||null===(o=i.base)||void 0===o?void 0:o.clientHeight,u=null===(a=b.current)||void 0===a||null===(s=a.base)||void 0===s?void 0:s.clientHeight;if(l&&d&&c&&u){const e=l-d-u-30-20-15,t=parseFloat(getComputedStyle(f.current.base).lineHeight),n=Math.floor(e/t);y(n)}}),[w,x]),"single-card"===e.embedMode&&e.presentingSubview)return null;if("standalone"===e.embedMode&&e.horizontalStreamContainer&&e.presentingSubview)return null;const k="subview"===t&&"standalone"===e.embedMode;return(0,o.h)(el,{theme:r,class:"subview"===t?"use-offset":"",topAlign:k,viewState:t,embedMode:e.embedMode,useHorizontalStyles:e.horizontalStreamContainer&&!e.presentingSubview,spaceBetweenCards:l,cardMaximumWidth:a,cardHorizontalAlignment:s},(0,o.h)(tl,{ref:p,theme:r,topAlign:k},(0,o.h)(nl,{ref:m},(0,o.h)(Hn,{stopColor:r.getCSSColor("icon.processingStateSpinner"),size:30})),(0,o.h)(rl,{ref:f,theme:r,maxLines:Math.max(1,S)},w),(0,o.h)(il,{ref:b,theme:r,onClick:n},x)))})):null},al=Sn("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:`${Us} 0.6s ease 0.2s forwards`},".submitted":{animation:`${Us} 0s ease forwards`},".submitted-subview":{animation:`${Us} 0.6s ease 0.2s forwards`}}})),sl=function(e,t){var n,r,i,o,a;let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const l=e.getNumericalPadding("card"),d=null!==(n=e.getNumericalPadding("stream").left)&&void 0!==n?n:10;return{cardCompletion:{" .tick-icon":{opacity:"0"},".submitting":{overflow:"hidden",padding:`${null!==(r=l.top)&&void 0!==r?r:xe}px ${(null!==(i=l.right)&&void 0!==i?i:we)+1}px ${null!==(o=l.bottom)&&void 0!==o?o:xe}px ${(null!==(a=l.left)&&void 0!==a?a:we)+1}px`},".submitting .tick-icon":{animation:`${Ws} 0.2s ease 0.2s forwards`},".submitting .card-nodes":{animation:`${zs} 0.2s ease forwards`},".submitted":Object.assign({overflow:"hidden"},"vertical"!==s?{transform:`translateX(calc(-120% - ${d}px))`,opacity:"0"}:{animation:`${qs} 0.4s ease forwards`}),".submitted .tick-icon":{animation:`${Ws} 0.2s ease forwards`},".submitted .card-nodes":{opacity:"0"},".submitted-subview":Object.assign({animation:`${qs} 0.4s ease 0.8s forwards`,overflow:"hidden"},"vertical"!==s?{transform:`translateX(calc(-120% - ${d}px))`,opacity:"0"}:{}),".submitted-subview .tick-icon":{animation:`${Ws} 0.2s ease 0.2s forwards`},".submitted-subview .card-nodes":{animation:`${zs} 0.2s ease forwards`}},dismissal:{".dismissing":Object.assign({},"vertical"!==s||"modal-stream"===t?{animation:`${zs} 0.3s ease forwards`}:{animation:`${Zs(d)} 0.4s ease forwards`}),".dismissed":Object.assign({transform:`translateX(calc(-120% - ${d}px))`},"vertical"!==s||"modal-stream"===t?{animation:`${Gs}`,opacity:"0"}:{})},snooze:{".snoozing":Object.assign({},"vertical"!==s||"modal-stream"===t?{animation:`${zs} 0.3s ease forwards`}:{animation:`${Zs(d)} 0.4s ease forwards`}),".snoozed":Object.assign({transform:`translateX(calc(-120% - ${d}px))`},"vertical"!==s||"modal-stream"===t?{animation:`${Gs}`,opacity:"0"}:{})}}},ll=function(e,t){var n;let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"vertical";const i=null!==(n=e.right)&&void 0!==n?n:10;return{cardCompletion:{".submitted":Object.assign({overflow:"hidden"},"vertical"===r?{animation:`${Gs} 0.4s ease 0.2s forwards`}:{animation:`${Xs} 0.4s ease 0.2s forwards`}),".submitted .clock-icon":Object.assign({},"horizontal"===r?{width:"0"}:{}),".submitted .dismiss-icon":Object.assign({},"horizontal"===r?{width:"0"}:{}),".submitted-subview":Object.assign({overflow:"hidden"},"vertical"===r?{animation:`${Gs} 0.4s ease 1.0s forwards`}:{animation:`${Xs} 0.4s ease 0.2s forwards`})},dismissal:{position:"relative"," .dismiss-icon":Object.assign({position:"absolute",top:"50%",width:"50px",height:"50px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"!==r||"modal-stream"===t?{opacity:"0",left:"50%",margin:"-29px 0 0 -20px"}:{left:`calc(120% + ${i+25}px)`,margin:"-25px 0 0 -25px"}),".dismissing .dismiss-icon":Object.assign({},"vertical"!==r||"modal-stream"===t?{animation:`${Ws} 0.3s ease 0.3s forwards`}:{animation:`${Ks} 0.4s ease forwards`}),".dismissed":Object.assign({overflow:"hidden"},"vertical"!==r||"modal-stream"===t?{animation:`${Xs} 0.3s ease 0.3s forwards`}:{animation:`${Gs} 0.4s ease 0.4s forwards`}),".dismissed .dismiss-icon":Object.assign({left:"50%"},"vertical"!==r||"modal-stream"===t?{animation:`${Ys} 0.3s ease forwards`}:{animation:`${Ys} 0.4s ease forwards`}),".dismissed .clock-icon":Object.assign({},"vertical"!==r?{width:"0"}:{})},snooze:{position:"relative"," .clock-icon":Object.assign({position:"absolute",top:"50%",width:"50px",height:"50px",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"50px"},"vertical"!==r||"modal-stream"===t?{opacity:"0",left:"50%",margin:"-29px 0 0 -20px"}:{left:`calc(120% + ${i+25}px)`,margin:"-25px 0 0 -25px"}),".snoozing .clock-icon":Object.assign({},"vertical"!==r||"modal-stream"===t?{animation:`${Ws} 0.3s ease 0.3s forwards`}:{animation:`${Ks} 0.4s ease forwards`}),".snoozed":Object.assign({overflow:"hidden"},"vertical"!==r||"modal-stream"===t?{animation:`${Xs} 0.3s ease 0.3s forwards`}:{animation:`${Gs} 0.4s ease 0.4s forwards`}),".snoozed .clock-icon":Object.assign({left:"50%"},"vertical"!==r?{animation:`${Ys} 0.3s ease forwards`}:{animation:`${Ys} 0.4s ease forwards`}),".snoozed .dismiss-icon":Object.assign({},"vertical"!==r?{width:"0"}:{})},center:{position:"relative",".centering":{position:"relative",left:"50%",transform:"translateX(-50%)",transition:"left 0.4s ease-out"}}}},dl=600,cl=600,ul=600,pl=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}};var hl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const ml=(e,t,n,r,i,o)=>hl(void 0,void 0,void 0,(function*(){const{dismissingCard:a,dismissedCard:s,failedToDismissCard:l}=t;if(e.application.isPreview)return;a(n);const d=new Promise((e=>setTimeout(e,cl)));ue.debug({level1:["Dismiss card sent by HTTP"]});const c=yield rh(e.application.streamContainerId,n,i);yield Promise.allSettled([d,c]),c.ok?(ue.debug({level1:["Dismiss card sent by HTTP: success"]}),s(n),Je().clearSubviewsForCardInstance(n),window.AtomicUploadService.cancelUploadForCard(e.application.containerInstanceId,n),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),r.dispatchCardEvent({type:Bi.DISMISSED,eventPayload:c.event})):(ue.error({level1:["Dismiss card sent by HTTP: failed"]}),l(n,o,c.error),r.dispatchCardEvent({type:Bi.DISMISS_FAILED}))})),gl=function(e,t,n){var r=arguments;return hl(this,void 0,void 0,(function*(){var i,o,a;let s=r.length>3&&void 0!==r[3]&&r[3],l=r.length>4?r[4]:void 0,d=r.length>5?r[5]:void 0,c=r.length>6?r[6]:void 0,u=r.length>7?r[7]:void 0,p=r.length>8?r[8]:void 0;const{submittingCard:h,submittedCard:m,failedToSubmitCard:g,finishSubview:f,openExternalUrl:v,handleSubmitButtonPayload:b}=t,{postSubmissionUrl:S,payload:y,subviewData:w,submitButtonName:x,cancelSubmitCallback:k}=p||{};if(e.application.isPreview)return;const C=e=>{g(n,s,u,e,{postSubmissionUrl:S,subviewData:w,payload:y,submitButtonName:x}),l.dispatchCardEvent({type:Bi.SUBMIT_FAILED})};let O=!1;const M=(null==w?void 0:w.subviewId)?null===(i=e.cardResponses[n])||void 0===i||null===(o=i.subviews)||void 0===o?void 0:o[null==w?void 0:w.subviewId]:null===(a=e.cardResponses[n])||void 0===a?void 0:a.responses,I=Object.assign(Object.assign({},u),M||{});for(const[e,t]of Object.entries(M||{}))t&&"object"==typeof t&&"image"===t.type&&"string"==typeof t.destinationFilename&&"string"==typeof t.targetBucketId&&(O=!0,I&&(I[e]={filename:t.destinationFilename,targetBucketId:t.targetBucketId}));if(O){const r=window.frameElement,i=r.classList.contains("modal-subview");i&&r.classList.add("uploading-files"),t.startCardFileUpload(n),t.setCardFeedOverlay(!0);const o=yield window.AtomicUploadService.uploadFilesForCard(n,e.application.containerInstanceId,c,d,{subviewData:w,cancelSubmitCallback:k});if(t.finishCardFileUpload(n),!window.AtomicUploadService.getIsUploadingStatus(e.application.containerInstanceId)&&t.setCardFeedOverlay(!1),i&&r.classList.remove("uploading-files"),!o.success)return o.cancelledUploads?null:(ue.error({level1:[`Submit of card ${n} failed due to file upload failure`]}),C(o.error))}h(n);const N=new Promise((e=>setTimeout(e,dl)));ue.debug({level1:["Submit card sent by HTTP"]});const F=yield nh(e.application.streamContainerId,n,Object.assign(Object.assign({},I),x?{[x]:null}:{}),c);yield Promise.allSettled([N,F]),F.ok?(ue.debug({level1:["Submit card sent by HTTP: success"]}),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),f(),(null==S?void 0:S.url)&&v(n,s?"subview":"topview",w||{},"url","submitButton",S),y&&b(n,w||{},y),m(n,s),Je().clearSubviewsForCardInstance(n),l.dispatchCardEvent({type:Bi.SUBMITTED,eventPayload:F.event})):(ue.error({level1:["Submit card sent by HTTP: failed"]}),C(F.error))}))},fl=(e,t,n,r,i,o,a)=>hl(void 0,void 0,void 0,(function*(){const s=(0,le.differenceInSeconds)(r,new Date),{snoozingCard:l,snoozedCard:d,failedToSnoozeCard:c}=t;if(e.application.isPreview)return;l(n);const u=new Promise((e=>setTimeout(e,ul)));ue.debug({level1:["Snooze card sent by HTTP"]});const p=yield ih(e.application.streamContainerId,n,s,o);yield Promise.allSettled([u,p]),p.ok?(ue.debug({level1:["Snooze card sent by HTTP: success"]}),d(n,r),Je().clearSubviewsForCardInstance(n),Mt().clearCardForm(n),window.AtomicUploadService.cancelUploadForCard(e.application.containerInstanceId,n),window.AtomicUploadService.removeAllFilesForCard(e.application.containerInstanceId,n),i.dispatchCardEvent({type:Bi.SNOOZED,eventPayload:p.event})):(ue.error({level1:["Snooze card sent by HTTP: failed"]}),c(n,r,a,p.error),i.dispatchCardEvent({type:Bi.SNOOZE_FAILED}))})),vl=(e,t,n,r,i)=>{n.sendEvent({cardInstanceId:e,cardViewState:"topview",eventName:Lt,properties:{source:i}}),t.feedbackReceived(e),r.dispatchCardEvent({type:Bi.VOTED_USEFUL})};var bl=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function Sl(){return Sl=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},Sl.apply(this,arguments)}const yl=(e,t,n,r)=>bl(void 0,void 0,void 0,(function*(){var i;const o=null===(i=(yield oh([n],t,e)).values)||void 0===i?void 0:i.get(n.instance.id);o&&Object.entries(r).forEach((i=>{let[a,s]=i;"string"==typeof s?r[a]=yp(s,o):Ip(s)&&yl(e,t,n,s)}))})),wl=e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:i,clickHandler:a,text:s,icon:l,iconUrl:d,iconAltText:c,theme:u,appearance:p,loading:h,type:m,urlLink:g}=e;return(0,o.h)(Ze.lj,{actions:(0,Q.Y2)(yt,Ke,un),mapToProps:()=>{}},(e=>(0,o.h)(sr,Sl({},t&&{nodeKey:t},n&&{index:n},r&&{localIndex:r},{isWorkflow:i,clickHandler:a(e),text:s,icon:l,iconUrl:d,iconAltText:c,theme:u,appearance:p,loading:h,type:m,urlLink:g}))))},xl=Sn("div")((e=>{let{isWorkflow:t,feedOrientation:n}=e;return Object.assign(Object.assign({},t?{position:"relative"}:{}),t||"horizontal"!==n?{}:{display:"flex",flexDirection:"column",flexGrow:"1",justifyContent:"flex-end"})})),kl=e=>{let{children:t,isWorkflow:n,feedOrientation:r,initializeFormStore:i}=e;return g((()=>{i()}),[]),(0,o.h)(xl,{isWorkflow:n,feedOrientation:r},t)},Cl=(e,t,n,r)=>()=>{e.createResponseWithDefaults(t,n,r)},Ol=Sn("div")((e=>{let{theme:t,appearance:n,isFirstCardNode:r,isFinalCardNode:i,headlineFontProperties:o}=e;const a=Tn(n),s=t.getShape("padding.elementBottom",{skipFallback:!0});return{color:t.getCSSColor(`text.headline${a}`),display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${o.lineHeight} 1fr`,padding:s?`0px 0px ${i?"0px":s}`:`${r?0:10}px 0px ${i?0:10}px`}})),Ml=Sn("h2")((e=>{let{theme:t,appearance:n}=e;return Object.assign(Object.assign({gridColumnStart:"2",gridRowStart:"span 2"},t.getCSSFontProperties(`headline${Tn(n)}`)),{margin:"0",whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"})})),Il="22px",Nl=(e,t)=>{const n=Ln(t);return Object.assign(Object.assign({margin:"0",paddingLeft:"0",listStyleType:"none"},e.getCSSFontProperties(`body${n}`)),{color:e.getCSSColor(`text.body${n}`)})},Fl=(e,t)=>{const n=Ln(t);let r;return Np(r)||(r=e.getCSSFontProperties(`bullet${n}`)),{"> li":{display:"flex",margin:"0 0 5px"},"> li.without-icon:before":Object.assign({content:'"•"',textAlign:"center",flexBasis:Il,minWidth:Il,marginRight:"10px",color:e.getCSSColor(`icon.bullet${n}`)},r?{fontSize:r.fontSize,lineHeight:r.lineHeight}:{}),"> li.with-icon i":{flexBasis:Il,minWidth:Il,textAlign:"center"},"> li:last-child":{marginBottom:"0px"}}},Ll=Sn("ul")((e=>{let{theme:t,appearance:n,isFirstCardNode:r,isFinalCardNode:i}=e;const o=t.getShape("padding.elementBottom",{skipFallback:!0});return Object.assign(Object.assign(Object.assign(Object.assign({},Nl(t,n)),{textAlign:"left"}),Fl(t,n)),{padding:o?`0px 0px ${i?"0px":o} 0px`:`${r?0:10}px 0px ${i?0:10}px 0px`})})),Tl=Sn("ol")((e=>{let{theme:t,appearance:n,isFirstCardNode:r,isFinalCardNode:i}=e;const o=t.getShape("padding.elementBottom",{skipFallback:!0});return Object.assign(Object.assign(Object.assign(Object.assign({},Nl(t,n)),{textAlign:"left"}),Fl(t,n)),{padding:o?`0px 0px ${i?"0px":o} 5px`:`${r?0:10}px 20px ${i?0:10}px 0px`,counterReset:"item","> li.without-icon:before":Object.assign(Object.assign(Object.assign({},Nl(t,n)["> li.without-icon:before"]),Fl(t,n)["> li.without-icon:before"]),{content:'counter(item) "."',counterIncrement:"item"})})})),Al=Sn("ul")((e=>{let{theme:t,appearance:n,isFirstCardNode:r,isFinalCardNode:i}=e;const o=t.getShape("padding.elementBottom",{skipFallback:!0});return Object.assign(Object.assign({},Nl(t,n)),{padding:o?`0px 0px ${i?"0px":o} 5px`:`${r?0:10}px 20px ${i?0:10}px 0px`," li":{display:"inline"}," li:before":{content:'", "'}," li:first-child:before":{content:'""'}})}));class jl{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 _l={"":["<em>","</em>"],_:["<strong>","</strong>"],"\n":["</p><p>"]," ":["<br />"]};function El(e){return(e+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function Dl(e){return("<p>"+Hl(e)+"</p>").replace(/<p><\/p>/g,"")}function Hl(e,t){const n=new jl;let r,i,o,a,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,d=[],c="",u=t||{},p=0;function h(e){var t=_l[e.replace(/\*/g,"_")[1]||""],n=d[d.length-1]==e;return t?t[1]?(d[n?"pop":"push"](e),t[0|n]):t[0]:e}function m(){let e="";for(;d.length;)e+=h(d[d.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);){i=e.substring(p,o.index),p=l.lastIndex,r=o[0];let t=!1;if(i.match(/[^\\](\\\\)*\\$/));else if(o[6])s=o[6],s.match(/\./)&&(o[5]=o[5].replace(/^\d+/gm,"")),a=Hl((v=o[5].replace(/^\s*[>*+.-]/gm,"")).replace(RegExp("^"+(v.match(/^(\t| )+/)||"")[0],"gm"),"")),">"!==s&&(t=!0,s=s.match(/\./)?"ol":"ul",a=a.replace(/^(.*)(\n|$)/gm,"<li><span>$1</span></li>")),r="<"+s+">"+a+"</"+s+">";else if(o[10]){const e=(o[11]||"").match(/subview:(?<viewId>.*)/);if(e){const t=((e||{}).groups||{}).viewId?e.groups.viewId:"";c=c.replace("<a>",`<a tabindex="0" class="md-subview-link" data-subview-id="${t}">`)}else c=c.replace("<a>",'<a tabindex="0" target="_blank" class="md-web-link" href="'+El(o[11]||u[i.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 f=_l[e.replace(/\*/g,"_")[1]||""];r=n.tagState.has(e)&&n.tagState.get(e).open?f[1]:f[0],n.toggle(e)}else if(o[18]){const e=o[18],t=(o[18].match(/\n/g)||[]).length,n=/[ ]{2}\n/.test(e);r=t>=2?'</p><p class="md-line-break">&nbsp;</p><p>':n?"<br />":h(e)}else o[4]&&(r="<p>"+o[4]+"</p>",t=!0);c+=i,c+=t?"</p>"+r+"<p>":r}var v;return n.tagState.forEach(((e,t)=>{if(n.tagState.get(t).open){const e=_l[t.replace(/\*/g,"_")[1]||""][0],n=c.lastIndexOf(e);-1!==n&&(c=c.slice(0,n)+t+c.slice(n+e.length))}})),(g(c)+g(e.substring(p))+m()).trim()}const Pl=Sn("li")({whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"}),Rl=Sn("span")((e=>{let{theme:t}=e;return{" p":{margin:"0",display:"inline"}," a":{color:t.getCSSColor("text.link")}," em":{fontStyle:"italic"}," strong":{fontWeight:"bold"}," .md-subview-link":{textDecoration:"underline",cursor:"pointer"}}})),$l=Sn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const i=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:i?`0px 0px ${r?"0px":i}`:`${n?0:10}px 0px ${r?0:10}px`}})),Bl=Sn("a")((e=>{let{isLinkEnabled:t,theme:n,url:r}=e;return{border:`1px solid ${n.getCSSColor("border.mediaThumb")}`,borderRadius:n.getShape("borderRadius.mediaThumb")||"0px",overflow:"hidden",display:"flex",backgroundColor:n.getCSSColor("background.mediaThumbnail"),cursor:t||r?"pointer":"default"}})),Vl=Sn("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"}})),zl=Sn("div")((()=>({padding:"12px 15px 10px 15px",display:"flex",flexFlow:"row wrap",minWidth:"0px"}))),Wl=Sn("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%"})})),Ul=Sn("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%"})})),ql=Sn("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",userSelect:"none"})}));class Yl extends uo{render(){const{nodeKey:e,isFinalCardNode:t,isFirstCardNode:n,children:r,mediaType:i,src:a,theme:s,label:l,description:d,customStrings:c,onClickImage:u,url:p,alt:h}=this.props,{imageLoaded:m,imageLoadFailed:g}=this.state,f=m?a:"",v=this.getPreviewIcon(i),b=i.includes("video"),S=b&&g,y="image"===i||"video"===i,w=this.getElementRole(i),x=b?(null==c?void 0:c.thumbnailVideoActionLinkTitle)||"Watch":(null==c?void 0:c.thumbnailImageActionLinkTitle)||"View",k=b?"A video":"An image";let C="";return y&&(C=(b?"Plays a video":"Displays an image")+": "),C=`${C}${h?h+".":""}`,(0,o.h)($l,{theme:s,isFirstCardNode:n,isFinalCardNode:t},(0,o.h)(Bl,{key:e,"data-element-key":e,"data-testid":"image-wrapper",theme:s,onClick:u,isLinkEnabled:y,url:p},(0,o.h)(Vl,{thumbnail:f,theme:s,role:w,"aria-label":C||k},!m&&!S&&v&&(0,o.h)(v,{fillColor:s.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(m||g)&&r),(0,o.h)(zl,null,(0,o.h)(Wl,{theme:s,class:"thumbnail-header","aria-label":`${l}.`},l),(0,o.h)(Ul,{theme:s,class:"thumbnail-format","aria-label":`${d}.`},d),(0,o.h)(ql,{theme:s,isLinkEnabled:"image"===i||"video"===i,tabIndex:"0",class:"thumbnail-link",onKeyPress:this.handleKeyPress.bind(this)},x))))}}const Zl=Sn("div")((e=>{var t,n,r,i,o,a;let{backgroundImage:s,theme:l,isFinalCardNode:d,dimensions:c,loadedDimensions:u,url:p,isLinkEnabled:h}=e;const m=`calc(${l.getShape("borderRadius.card")} - ${l.getShape("border.card")})`,g=l.getNumericalPadding("card");return Object.assign(Object.assign({width:`calc(100% + ${(null!==(t=g.left)&&void 0!==t?t:we)+(null!==(n=g.right)&&void 0!==n?n:we)}px)`,border:"0px",borderRadius:`${m} ${m} 0 0`,backgroundImage:`url('${s}')`,backgroundSize:"cover",backgroundPosition:"center",backgroundColor:l.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",marginTop:`-${null!==(r=g.top)&&void 0!==r?r:xe}px`,marginRight:`-${null!==(i=g.right)&&void 0!==i?i:we}px`,marginBottom:`${d?"0px":null!==(o=l.getShape("padding.elementBottom",{skipFallback:!0}))&&void 0!==o?o:"10px"}`,marginLeft:`-${null!==(a=g.left)&&void 0!==a?a:we}px`,overflow:"hidden",cursor:h||p?"pointer":"default"},nd({dimensions:c,naturalDimensions:u})),l.getElementFocusCSSProperties())}));class Kl extends uo{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:e,children:t,isFinalCardNode:n,mediaType:r,src:i,theme:a,onClickImage:s,dimensions:l,url:d,alt:c}=this.props,{imageLoaded:u,imageLoadFailed:p}=this.state,h=u?i:"",m=this.getPreviewIcon(r),g=r.includes("video")&&p,f="image"===r||"video"===r,v=this.getElementRole(r),b=r.includes("video")?"A banner video":"A banner image";let S="";return f&&(S=(r.includes("video")?"Plays a video":"Displays an image")+": "),S+=c,(0,o.h)(Zl,{key:e,"data-element-key":e,"data-testid":"image-wrapper",backgroundImage:h,theme:a,isFinalCardNode:n,mediaType:r,url:d,dimensions:l,loadedDimensions:this.state.loadedDimensions,onClick:s,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-banner",role:v,isLinkEnabled:f,"aria-label":S||b},!u&&!g&&m&&(0,o.h)(m,{fillColor:a.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(u||p)&&t)}}const Gl=Sn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const i=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:i?`0px 0px ${r?"0px":i}`:`${n?0:10}px 0px ${r?0:10}px`}})),Xl=Sn("div")((e=>{let{backgroundImage:t,theme:n,dimensions:r,loadedDimensions:i,url:o,isLinkEnabled:a}=e;const s=n.getCSSColor("border.media");return Object.assign(Object.assign(Object.assign(Object.assign({},_n(s)?{}:{border:`1px solid ${n.getCSSColor("border.media")}`}),{borderRadius:`${n.getShape("borderRadius.media")}`,backgroundImage:`url('${t}')`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundColor:n.getCSSColor("background.media"),display:"flex",alignItems:"center",justifyContent:"center",cursor:a||o?"pointer":"default",overflow:"hidden"}),nd({dimensions:r,naturalDimensions:i})),n.getElementFocusCSSProperties())}));class Ql extends uo{onImageLoad(e){super.onImageLoad(e),this.props.onLoad&&this.props.onLoad({width:e.naturalWidth,height:e.naturalHeight})}render(){const{nodeKey:e,children:t,isFirstCardNode:n,isFinalCardNode:r,mediaType:i,src:a,dimensions:s,url:l,onClickImage:d,theme:c,alt:u}=this.props,{imageLoaded:p,imageLoadFailed:h}=this.state,m=p?a:"",g=this.getPreviewIcon(i),f=i.includes("video")&&h,v="image"===i||"video"===i,b=this.getElementRole(i),S=i.includes("video")?"A video":"An image";let y="";return v&&(y=(i.includes("video")?"Plays a video":"Displays an image")+": "),y+=u,(0,o.h)(Gl,{theme:c,isFirstCardNode:n,isFinalCardNode:r},(0,o.h)(Xl,{key:e,"data-element-key":e,"data-testid":"image-wrapper",backgroundImage:m,dimensions:s,loadedDimensions:this.state.loadedDimensions,mediaType:i,url:l,onClick:d,onKeyPress:this.handleKeyPress.bind(this),theme:c,tabIndex:"0",className:"image-inline",role:b,isLinkEnabled:v,ariaLabel:y||S},!p&&!f&&g&&(0,o.h)(g,{fillColor:c.getCSSColor("icon.mediaBanner"),ariaHidden:!0}),(p||h)&&t))}}const Jl=Sn("p")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const i=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:i?`0px 0px ${r?"0px":i}`:`${n?0:10}px 0px ${r?0:10}px`,margin:"0",overflow:"hidden",textOverflow:"ellipsis"}})),ed=Sn("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 td extends uo{preloadsImage(){return!1}render(){const{nodeKey:e,theme:t,isFirstCardNode:n,isFinalCardNode:r,label:i,onClickImage:a,mediaType:s,url:l}=this.props;return(0,o.h)(Jl,{key:e,"data-element-key":e,theme:t,isFirstCardNode:n,isFinalCardNode:r},(0,o.h)(ed,{theme:t,onClick:a,onKeyPress:this.handleKeyPress.bind(this),tabIndex:"0",className:"image-text",mediaType:s,url:l},i))}}const nd=e=>{var t,n;let{dimensions:r,naturalDimensions:i}=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==i?void 0:i.width),o=(null==r||null===(n=r.originalDimensions)||void 0===n?void 0:n.height)||(null==i?void 0:i.height);return e&&o?{aspectRatio:`${e} / ${o}`}:{height:"200px"}}return{height:"200px"}},rd=e=>{let{fillColor:t,ariaHidden:n=!1}=e;return(0,o.h)("svg",{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",role:"img","aria-label":"A play button icon","aria-hidden":n},(0,o.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:t,strokeWidth:"2"}))},id=Sn("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")}})),od=e=>{let{onClick:t,theme:n}=e;return(0,o.h)(id,{onClick:t,theme:n},(0,o.h)(rd,{fillColor:n.getCSSColor("icon.mediaControl"),ariaHidden:!0}))},ad={objectFit:"contain",width:"100%",height:"100%",background:"black"},sd=Sn("video")(Object.assign({},ad)),ld=Sn("video")((()=>Object.assign({},ad))),dd=Sn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const i=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:i?`0px 0px ${r?"0px":i}`:`${n?0:10}px 0px ${r?0:10}px`}})),cd=Sn("div")((e=>{var t,n,r;let{theme:i,isFinalCardNode:o,dimensions:a,loadedDimensions:s,format:l}=e;const d=i.getNumericalPadding("card"),c=i.getShape("padding.elementBottom",{skipFallback:!0}),u=`calc(${i.getShape("borderRadius.card")||"0px"} - ${i.getShape("border.card")})`;return Object.assign(Object.assign({borderRadius:"banner"===l?`${u} ${u} 0 0`:u,overflow:"hidden"},"banner"===l?{margin:`-${null!==(t=d.top)&&void 0!==t?t:xe}px -${null!==(n=d.right)&&void 0!==n?n:we}px ${o?"0px":null!=c?c:"10px"} -${null!==(r=d.left)&&void 0!==r?r:we}px`}:{}),a?nd({dimensions:a,naturalDimensions:s}):{height:"200px"})})),ud=Sn("div")((e=>{let{theme:t}=e;return{background:t.getCSSColor("overlay.mediaBanner"),display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"}})),pd=e=>{let t,{nodeKey:n,cardInstanceId:r,label:i,description:a,format:s,src:l,altText:d,theme:c,isFirstCardNode:u,isFinalCardNode:p,thumbnailSrc:h,dimensions:m,setPlaying:g,onLoad:f}=e,v=!1,b=!1;switch(s){case"banner":t=Kl,v=!0,b=!0;break;case"inline":t=Ql,v=!0,b=!0;break;case"thumbnail":t=Yl,v=!0;break;case"text":t=td}return(0,o.h)(Ze.lj,{actions:Ke,mapToProps:e=>({customStrings:e.application.customStrings})},(e=>(0,o.h)(t,{nodeKey:n,theme:c,isFirstCardNode:u,isFinalCardNode:p,customStrings:e.customStrings,src:h,dimensions:m,onLoad:f,alt:null==d?void 0:d.src,label:i,description:a,mediaType:null!==l&&l.length>0?"video":"videoWithoutSrc",onClickImage:()=>{b?g(!0):e.viewMedia(r,{type:"video",url:l,title:i,alt:null==d?void 0:d.src})}},v&&(0,o.h)(ud,{theme:c},(0,o.h)(od,{onClick:()=>b&&g(!0),theme:c})))))},hd=e=>{var t,n;let{format:r,theme:i,isFirstCardNode:a,isFinalCardNode:s,src:l,cardInstanceId:d,dimensions:c,loadedDimensions:u,isWorkflow:p}=e;const h=v(null),m=y(Vi).analyticsDispatcher,f="string"==typeof l&&null!==(t=null===(n=l.match(/[^\/]*$/))||void 0===n?void 0:n[0])&&void 0!==t?t:"";switch(g((()=>{var e,t,n,r;const i=()=>{m.sendEvent({eventName:Pt,cardInstanceId:d,cardViewState:p?"subview":"topview",properties:{media:f,mediaURL:l}})},o=()=>{m.sendEvent({eventName:Rt,cardInstanceId:d,cardViewState:p?"subview":"topview",properties:{media:f,mediaURL:l}})};return null===(e=h.current)||void 0===e||null===(t=e.base)||void 0===t||t.addEventListener("play",i),null===(n=h.current)||void 0===n||null===(r=n.base)||void 0===r||r.addEventListener("ended",o),()=>{var e,t,n,r;null===(e=h.current)||void 0===e||null===(t=e.removeEventListener)||void 0===t||t.call(e,"play",i),null===(n=h.current)||void 0===n||null===(r=n.removeEventListener)||void 0===r||r.call(n,"ended",o)}}),[]),r){case"banner":return(0,o.h)(Ze.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(e=>{var t;let{applicationOpen:n}=e;return!n&&(null==h||null===(t=h.current)||void 0===t?void 0:t.base)&&h.current.base.pause(),(0,o.h)(cd,{theme:i,isFinalCardNode:s,format:r,dimensions:c,loadedDimensions:u},(0,o.h)(sd,{ref:h,src:l,playsInline:!0,autoplay:!0,controls:!0}))}));case"inline":return(0,o.h)(Ze.lj,{mapToProps:e=>({applicationOpen:e.application.open})},(e=>{var t;let{applicationOpen:n}=e;return!n&&(null==h||null===(t=h.current)||void 0===t?void 0:t.base)&&h.current.base.pause(),(0,o.h)(dd,{theme:i,isFirstCardNode:a,isFinalCardNode:s},(0,o.h)(cd,{theme:i,isFinalCardNode:s,format:r,dimensions:c,loadedDimensions:u},(0,o.h)(ld,{ref:h,src:l,playsInline:!0,autoplay:!0,controls:!0})))}));default:return null}},md=(e,t,n)=>{const r=Ln(n);let i;return Np(i)||(i=e.getCSSFontProperties(`bullet${r}`)),{[`>${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:`${Il}`,minWidth:`${Il}`,color:e.getCSSColor(`icon.bullet${r}`)},i?{fontSize:i.fontSize,lineHeight:i.lineHeight}:{}),[`>${t} > li:last-child`]:{marginBottom:"0px"}}},gd=e=>{var t;let{theme:n,appearance:r,styles:i}=e;const o=Ln(r),a=null!==(t=n.getShape("padding.elementBottom",{skipFallback:!0}))&&void 0!==t?t:"20px";return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({color:n.getCSSColor(`text.body${o}`),gridColumnStart:"2",gridRowStart:"span 2"},n.getCSSFontProperties(`body${o}`)),{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",listStyleType:"none",textAlign:"left"})}),md(n,"ul",r)),{"> ol":Object.assign(Object.assign({},{paddingLeft:"0",margin:"0",listStyleType:"none",textAlign:"left"}),{counterReset:"count"}),"> ul:not(:first-child)":{marginTop:a},"> ol:not(:first-child)":{marginTop:a},"> ul:not(:last-child)":{marginBottom:a},"> ol:not(:last-child)":{marginBottom:a},"> ul:has(+ p.md-line-break)":{marginBottom:"0px"},"> ol:has(+ p.md-line-break)":{marginBottom:"0px"}}),md(n,"ol",r)),{" a":{color:n.getCSSColor(`text.link${o}`)}," p":Object.assign(Object.assign({margin:"0px 0 0 0",whiteSpace:"pre-wrap","overflow-wrap":"break-word","word-wrap":"break-word","word-break":"break-word"},n.getCSSFontProperties(`body${o}`)),{overflow:"hidden"})," p:not(:first-child)":{marginTop:a}," p:not(:last-child)":{marginBottom:a}," p:has(+ p.md-line-break)":{marginBottom:"0px"}," p.md-line-break + p":{marginTop:"0px"}," p.md-line-break + ul":{marginTop:"0px"}," p.md-line-break + ol":{marginTop:"0px"}," p:not(:first-child).md-line-break":{marginTop:"0px"}," p:not(:last-child).md-line-break":{marginBottom:"0px"}," .md-subview-link":{textDecoration:"underline",cursor:"pointer"}}),i)},fd=Sn("div")((e=>{let{theme:t,appearance:n}=e;return gd({theme:t,appearance:n})})),vd=Sn("div")((e=>{let{bodyFontProperties:t}=e;return{position:"absolute",width:"100%",visibility:"hidden",pointerEvents:"none",display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${t.lineHeight} 1fr`}})),bd=Sn("div")((e=>{let{theme:t,appearance:n}=e;return gd({theme:t,appearance:n,styles:{"& *":{marginTop:"0!important",marginBottom:"0!important"}}})})),Sd=Sn("div")((e=>{let{theme:t,appearance:n,isFirstCardNode:r,isFinalCardNode:i,bodyFontProperties:o}=e;const a=Ln(n),s=t.getShape("padding.elementBottom",{skipFallback:!0}),l=s?`0px 0px ${i?"0px":s}`:`${r?0:10}px 0px ${i?0:10}px`;return{position:"relative",display:"grid",gridTemplateColumns:"auto 1fr",gridTemplateRows:`${o.lineHeight} 1fr`,color:t.getCSSColor(`text.body${a}`),padding:l}})),yd=e=>{const t=document.createElement("div");return t.innerHTML=e,t},wd=()=>window.matchMedia("(prefers-color-scheme: dark)");function xd(){var e;const t=document.createElement("div");t.style.visibility="hidden",t.style.overflow="scroll",document.body.appendChild(t);const n=document.createElement("div");t.appendChild(n);const r=t.offsetWidth-n.offsetWidth;return null===(e=t.parentNode)||void 0===e||e.removeChild(t),r}function kd(e,t,n,r,i,o){var a,s,l,d,c,u,p,h,m,g,f,v,b,S;const y=Ln(o),w=document.createElement("button"),x=document.createElement("span"),k=document.createElement("span");k.innerHTML="&#8230; ";const C=t.getCSSFontProperties(`expandCollapse${y}`,{skipFallback:!0,skipFontFallbacks:!0}),O=t.getCSSFontProperties(`body${y}`),M=t.getShape("padding.expandCollapseLeft")||"0px",I="expand"===n?"Show more":"Show less",N="expand"===n;return w.style.fontFamily="inherit",w.style.fontSize="inherit",w.style.lineHeight="inherit",x.style.paddingLeft=N?M:"0px",x.style.color=null!==(a=t.getCSSColor(`text.expandCollapse${y}`,{skipFallback:!0}))&&void 0!==a?a:t.getCSSColor(`text.body${y}`),w.style.color=null!==(s=t.getCSSColor(`text.expandCollapse${y}`,{skipFallback:!0}))&&void 0!==s?s:t.getCSSColor(`text.body${y}`),x.style.fontWeight=null!==(l=null==C?void 0:C.fontWeight)&&void 0!==l?l:null==O?void 0:O.fontWeight,w.style.fontWeight=null!==(d=null==C?void 0:C.fontWeight)&&void 0!==d?d:null==O?void 0:O.fontWeight,x.style.fontStyle=null!==(c=null==C?void 0:C.fontStyle)&&void 0!==c?c:null==O?void 0:O.fontStyle,w.style.fontStyle=null!==(u=null==C?void 0:C.fontStyle)&&void 0!==u?u:null==O?void 0:O.fontStyle,x.style.textTransform=null!==(p=null==C?void 0:C.textTransform)&&void 0!==p?p:null==O?void 0:O.textTransform,w.style.textTransform=null!==(h=null==C?void 0:C.textTransform)&&void 0!==h?h:null==O?void 0:O.textTransform,x.style.fontSynthesis=null!==(m=null==C?void 0:C.fontSynthesis)&&void 0!==m?m:null==O?void 0:O.fontSynthesis,w.style.fontSynthesis=null!==(g=null==C?void 0:C.fontSynthesis)&&void 0!==g?g:null==O?void 0:O.fontSynthesis,x.textContent=e&&e.length?e:I,k.style.color=t.getCSSColor(`text.body${y}`),k.style.fontWeight=null!==(f=null==O?void 0:O.fontWeight)&&void 0!==f?f:"normal",k.style.fontStyle=null!==(v=null==O?void 0:O.fontStyle)&&void 0!==v?v:"normal",w.innerHTML=`${N?k.outerHTML:""}${x.outerHTML}`,w.style.display="inline",w.style.border="none",w.style.background="none",w.style.margin="0",w.style.padding="0",w.style.cursor="pointer",w.style.maxWidth=i,w.style.textAlign=null!==(b=null===(S=O)||void 0===S?void 0:S.textAlign)&&void 0!==b?b:"left",N&&(w.style.whiteSpace="nowrap",w.style.overflow="hidden",w.style.textOverflow="ellipsis"),w.id=r,w.setAttribute("data-testid","text-expand-collapse-button"),w}function Cd(e){let t=e.nextSibling;for(;t;){const e=t;t=t.nextSibling,e.remove()}}function Od(e,t,n,r,i,o,a){var s,l;if(!e)return!1;const d=kd(null!=o?o:"Show more",i,"expand",`expand-text-${r}`,t.getBoundingClientRect().width+"px",a);d.style.marginRight=xd()+"px";const c=document.createTreeWalker(e,NodeFilter.SHOW_TEXT),u=[];let p;for(;p=c.nextNode();){const e=null!==(s=p.textContent)&&void 0!==s?s:"",t=/\u00A0/.test(e);(e.trim().length>0||t)&&u.push(p)}let h=null,m=0,g=!1;for(let r=u.length-1;r>=0;r--){var f,v;const i=u[r],o=i.nodeValue||"";let a=0,s=o.length,l=!1;null===(f=i.parentElement)||void 0===f||f.appendChild(d);const c=i.parentElement;if(!c)continue;for(;a<=s;){const e=Math.floor((a+s)/2);" "===o?i.nodeValue=e>0?" ":"":o.startsWith(" ")?i.nodeValue=0===e?"":" "+o.slice(1,e):i.nodeValue=o.slice(0,e);Math.ceil(t.getBoundingClientRect().height)<=n?(m=e,l=!0,a=e+1):s=e-1}d.remove();const p=c.closest("li");if(p&&!(null===(v=p.textContent)||void 0===v?void 0:v.trim())){p.remove();continue}const b="p"===e.tagName.toLowerCase()&&"a"===c.tagName.toLowerCase();if(b&&0===m&&c.remove(),0===r||m>0){if(0===r&&!l){i.nodeValue=o;break}h=i,g=!b&&m<4;break}}if(h){var b,S;const e=null!==(l=h.textContent)&&void 0!==l?l:"";h.textContent=e.slice(0,g?4:m).trimEnd(),Cd(h);const n=null===(b=h.parentElement)||void 0===b?void 0:b.closest("a");n&&Cd(n);const s=null===(S=h.parentElement)||void 0===S?void 0:S.closest("li");s&&Cd(s);let d=0;if(g){var y;const t=document.createElement("span");t.textContent=e.slice(0,4).trimEnd(),null===(y=h.parentElement)||void 0===y||y.appendChild(t),d=t.getBoundingClientRect().width,t.remove()}const c=kd(null!=o?o:"Show more",i,"expand",`expand-text-${r}`,t.getBoundingClientRect().width-d-xd()+"px",a),u=h.parentElement;return"p"===(null==u?void 0:u.tagName.toLowerCase())&&u.classList.contains("md-line-break")?(u.style.marginTop="0px",u.after(c)):"a"===(null==u?void 0:u.tagName.toLowerCase())&&u.parentElement?u.parentElement.insertBefore(c,u.nextSibling):null==u||u.appendChild(c),!0}return!1}const Md=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M15 10V20M20 15H15H10",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},Id=e=>{let{fillColor:t}=e;return(0,o.h)("svg",{width:"30",height:"30",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg"},(0,o.h)("path",{d:"M20 15H10",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))},Nd=Sn("div")((e=>{let{theme:t}=e;return{backgroundColor:t.getCSSColor("background.component"),color:t.getCSSColor("text.secondary"),display:"flex",":focus":{outline:"none"},"-webkit-user-select":"none","-moz-user-select":"none",userSelect:"none"}})),Fd=Sn("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%"}})})),Ld=Sn("input")((e=>{let{theme:t}=e;return Object.assign(Object.assign({color:t.getCSSColor("text.secondary",{skipFallback:!0})||t.getCSSColor("text.primary")},t.getCSSFontProperties("secondary")),{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"}})})),Td=(e,t,n)=>e-n>=t,Ad=(e,t,n)=>e+n<=t;let jd=null;const _d=Sn("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())})),Ed=Sn("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"}})),Dd=["BN","BN","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],Hd=[[697,698,"ON"],[706,719,"ON"],[722,735,"ON"],[741,749,"ON"],[751,767,"ON"],[768,879,"NSM"],[884,885,"ON"],[894,894,"ON"],[900,901,"ON"],[903,903,"ON"],[1014,1014,"ON"],[1155,1161,"NSM"],[1418,1418,"ON"],[1421,1422,"ON"],[1423,1423,"ET"],[1424,1424,"R"],[1425,1469,"NSM"],[1470,1470,"R"],[1471,1471,"NSM"],[1472,1472,"R"],[1473,1474,"NSM"],[1475,1475,"R"],[1476,1477,"NSM"],[1478,1478,"R"],[1479,1479,"NSM"],[1480,1535,"R"],[1536,1541,"AN"],[1542,1543,"ON"],[1544,1544,"AL"],[1545,1546,"ET"],[1547,1547,"AL"],[1548,1548,"CS"],[1549,1549,"AL"],[1550,1551,"ON"],[1552,1562,"NSM"],[1563,1610,"AL"],[1611,1631,"NSM"],[1632,1641,"AN"],[1642,1642,"ET"],[1643,1644,"AN"],[1645,1647,"AL"],[1648,1648,"NSM"],[1649,1749,"AL"],[1750,1756,"NSM"],[1757,1757,"AN"],[1758,1758,"ON"],[1759,1764,"NSM"],[1765,1766,"AL"],[1767,1768,"NSM"],[1769,1769,"ON"],[1770,1773,"NSM"],[1774,1775,"AL"],[1776,1785,"EN"],[1786,1808,"AL"],[1809,1809,"NSM"],[1810,1839,"AL"],[1840,1866,"NSM"],[1867,1957,"AL"],[1958,1968,"NSM"],[1969,1983,"AL"],[1984,2026,"R"],[2027,2035,"NSM"],[2036,2037,"R"],[2038,2041,"ON"],[2042,2044,"R"],[2045,2045,"NSM"],[2046,2069,"R"],[2070,2073,"NSM"],[2074,2074,"R"],[2075,2083,"NSM"],[2084,2084,"R"],[2085,2087,"NSM"],[2088,2088,"R"],[2089,2093,"NSM"],[2094,2136,"R"],[2137,2139,"NSM"],[2140,2143,"R"],[2144,2191,"AL"],[2192,2193,"AN"],[2194,2198,"AL"],[2199,2207,"NSM"],[2208,2249,"AL"],[2250,2273,"NSM"],[2274,2274,"AN"],[2275,2306,"NSM"],[2362,2362,"NSM"],[2364,2364,"NSM"],[2369,2376,"NSM"],[2381,2381,"NSM"],[2385,2391,"NSM"],[2402,2403,"NSM"],[2433,2433,"NSM"],[2492,2492,"NSM"],[2497,2500,"NSM"],[2509,2509,"NSM"],[2530,2531,"NSM"],[2546,2547,"ET"],[2555,2555,"ET"],[2558,2558,"NSM"],[2561,2562,"NSM"],[2620,2620,"NSM"],[2625,2626,"NSM"],[2631,2632,"NSM"],[2635,2637,"NSM"],[2641,2641,"NSM"],[2672,2673,"NSM"],[2677,2677,"NSM"],[2689,2690,"NSM"],[2748,2748,"NSM"],[2753,2757,"NSM"],[2759,2760,"NSM"],[2765,2765,"NSM"],[2786,2787,"NSM"],[2801,2801,"ET"],[2810,2815,"NSM"],[2817,2817,"NSM"],[2876,2876,"NSM"],[2879,2879,"NSM"],[2881,2884,"NSM"],[2893,2893,"NSM"],[2901,2902,"NSM"],[2914,2915,"NSM"],[2946,2946,"NSM"],[3008,3008,"NSM"],[3021,3021,"NSM"],[3059,3064,"ON"],[3065,3065,"ET"],[3066,3066,"ON"],[3072,3072,"NSM"],[3076,3076,"NSM"],[3132,3132,"NSM"],[3134,3136,"NSM"],[3142,3144,"NSM"],[3146,3149,"NSM"],[3157,3158,"NSM"],[3170,3171,"NSM"],[3192,3198,"ON"],[3201,3201,"NSM"],[3260,3260,"NSM"],[3276,3277,"NSM"],[3298,3299,"NSM"],[3328,3329,"NSM"],[3387,3388,"NSM"],[3393,3396,"NSM"],[3405,3405,"NSM"],[3426,3427,"NSM"],[3457,3457,"NSM"],[3530,3530,"NSM"],[3538,3540,"NSM"],[3542,3542,"NSM"],[3633,3633,"NSM"],[3636,3642,"NSM"],[3647,3647,"ET"],[3655,3662,"NSM"],[3761,3761,"NSM"],[3764,3772,"NSM"],[3784,3790,"NSM"],[3864,3865,"NSM"],[3893,3893,"NSM"],[3895,3895,"NSM"],[3897,3897,"NSM"],[3898,3901,"ON"],[3953,3966,"NSM"],[3968,3972,"NSM"],[3974,3975,"NSM"],[3981,3991,"NSM"],[3993,4028,"NSM"],[4038,4038,"NSM"],[4141,4144,"NSM"],[4146,4151,"NSM"],[4153,4154,"NSM"],[4157,4158,"NSM"],[4184,4185,"NSM"],[4190,4192,"NSM"],[4209,4212,"NSM"],[4226,4226,"NSM"],[4229,4230,"NSM"],[4237,4237,"NSM"],[4253,4253,"NSM"],[4957,4959,"NSM"],[5008,5017,"ON"],[5120,5120,"ON"],[5760,5760,"WS"],[5787,5788,"ON"],[5906,5908,"NSM"],[5938,5939,"NSM"],[5970,5971,"NSM"],[6002,6003,"NSM"],[6068,6069,"NSM"],[6071,6077,"NSM"],[6086,6086,"NSM"],[6089,6099,"NSM"],[6107,6107,"ET"],[6109,6109,"NSM"],[6128,6137,"ON"],[6144,6154,"ON"],[6155,6157,"NSM"],[6158,6158,"BN"],[6159,6159,"NSM"],[6277,6278,"NSM"],[6313,6313,"NSM"],[6432,6434,"NSM"],[6439,6440,"NSM"],[6450,6450,"NSM"],[6457,6459,"NSM"],[6464,6464,"ON"],[6468,6469,"ON"],[6622,6655,"ON"],[6679,6680,"NSM"],[6683,6683,"NSM"],[6742,6742,"NSM"],[6744,6750,"NSM"],[6752,6752,"NSM"],[6754,6754,"NSM"],[6757,6764,"NSM"],[6771,6780,"NSM"],[6783,6783,"NSM"],[6832,6877,"NSM"],[6880,6891,"NSM"],[6912,6915,"NSM"],[6964,6964,"NSM"],[6966,6970,"NSM"],[6972,6972,"NSM"],[6978,6978,"NSM"],[7019,7027,"NSM"],[7040,7041,"NSM"],[7074,7077,"NSM"],[7080,7081,"NSM"],[7083,7085,"NSM"],[7142,7142,"NSM"],[7144,7145,"NSM"],[7149,7149,"NSM"],[7151,7153,"NSM"],[7212,7219,"NSM"],[7222,7223,"NSM"],[7376,7378,"NSM"],[7380,7392,"NSM"],[7394,7400,"NSM"],[7405,7405,"NSM"],[7412,7412,"NSM"],[7416,7417,"NSM"],[7616,7679,"NSM"],[8125,8125,"ON"],[8127,8129,"ON"],[8141,8143,"ON"],[8157,8159,"ON"],[8173,8175,"ON"],[8189,8190,"ON"],[8192,8202,"WS"],[8203,8205,"BN"],[8207,8207,"R"],[8208,8231,"ON"],[8232,8232,"WS"],[8233,8233,"B"],[8234,8238,"BN"],[8239,8239,"CS"],[8240,8244,"ET"],[8245,8259,"ON"],[8260,8260,"CS"],[8261,8286,"ON"],[8287,8287,"WS"],[8288,8303,"BN"],[8304,8304,"EN"],[8308,8313,"EN"],[8314,8315,"ES"],[8316,8318,"ON"],[8320,8329,"EN"],[8330,8331,"ES"],[8332,8334,"ON"],[8352,8399,"ET"],[8400,8432,"NSM"],[8448,8449,"ON"],[8451,8454,"ON"],[8456,8457,"ON"],[8468,8468,"ON"],[8470,8472,"ON"],[8478,8483,"ON"],[8485,8485,"ON"],[8487,8487,"ON"],[8489,8489,"ON"],[8494,8494,"ET"],[8506,8507,"ON"],[8512,8516,"ON"],[8522,8525,"ON"],[8528,8543,"ON"],[8585,8587,"ON"],[8592,8721,"ON"],[8722,8722,"ES"],[8723,8723,"ET"],[8724,9013,"ON"],[9083,9108,"ON"],[9110,9257,"ON"],[9280,9290,"ON"],[9312,9351,"ON"],[9352,9371,"EN"],[9450,9899,"ON"],[9901,10239,"ON"],[10496,11123,"ON"],[11126,11263,"ON"],[11493,11498,"ON"],[11503,11505,"NSM"],[11513,11519,"ON"],[11647,11647,"NSM"],[11744,11775,"NSM"],[11776,11869,"ON"],[11904,11929,"ON"],[11931,12019,"ON"],[12032,12245,"ON"],[12272,12287,"ON"],[12288,12288,"WS"],[12289,12292,"ON"],[12296,12320,"ON"],[12330,12333,"NSM"],[12336,12336,"ON"],[12342,12343,"ON"],[12349,12351,"ON"],[12441,12442,"NSM"],[12443,12444,"ON"],[12448,12448,"ON"],[12539,12539,"ON"],[12736,12773,"ON"],[12783,12783,"ON"],[12829,12830,"ON"],[12880,12895,"ON"],[12924,12926,"ON"],[12977,12991,"ON"],[13004,13007,"ON"],[13175,13178,"ON"],[13278,13279,"ON"],[13311,13311,"ON"],[19904,19967,"ON"],[42128,42182,"ON"],[42509,42511,"ON"],[42607,42610,"NSM"],[42611,42611,"ON"],[42612,42621,"NSM"],[42622,42623,"ON"],[42654,42655,"NSM"],[42736,42737,"NSM"],[42752,42785,"ON"],[42888,42888,"ON"],[43010,43010,"NSM"],[43014,43014,"NSM"],[43019,43019,"NSM"],[43045,43046,"NSM"],[43048,43051,"ON"],[43052,43052,"NSM"],[43064,43065,"ET"],[43124,43127,"ON"],[43204,43205,"NSM"],[43232,43249,"NSM"],[43263,43263,"NSM"],[43302,43309,"NSM"],[43335,43345,"NSM"],[43392,43394,"NSM"],[43443,43443,"NSM"],[43446,43449,"NSM"],[43452,43453,"NSM"],[43493,43493,"NSM"],[43561,43566,"NSM"],[43569,43570,"NSM"],[43573,43574,"NSM"],[43587,43587,"NSM"],[43596,43596,"NSM"],[43644,43644,"NSM"],[43696,43696,"NSM"],[43698,43700,"NSM"],[43703,43704,"NSM"],[43710,43711,"NSM"],[43713,43713,"NSM"],[43756,43757,"NSM"],[43766,43766,"NSM"],[43882,43883,"ON"],[44005,44005,"NSM"],[44008,44008,"NSM"],[44013,44013,"NSM"],[64285,64285,"R"],[64286,64286,"NSM"],[64287,64296,"R"],[64297,64297,"ES"],[64298,64335,"R"],[64336,64450,"AL"],[64451,64466,"ON"],[64467,64829,"AL"],[64830,64847,"ON"],[64848,64911,"AL"],[64912,64913,"ON"],[64914,64967,"AL"],[64968,64975,"ON"],[64976,65007,"BN"],[65008,65020,"AL"],[65021,65023,"ON"],[65024,65039,"NSM"],[65040,65049,"ON"],[65056,65071,"NSM"],[65072,65103,"ON"],[65104,65104,"CS"],[65105,65105,"ON"],[65106,65106,"CS"],[65108,65108,"ON"],[65109,65109,"CS"],[65110,65118,"ON"],[65119,65119,"ET"],[65120,65121,"ON"],[65122,65123,"ES"],[65124,65126,"ON"],[65128,65128,"ON"],[65129,65130,"ET"],[65131,65131,"ON"],[65136,65278,"AL"],[65279,65279,"BN"],[65281,65282,"ON"],[65283,65285,"ET"],[65286,65290,"ON"],[65291,65291,"ES"],[65292,65292,"CS"],[65293,65293,"ES"],[65294,65295,"CS"],[65296,65305,"EN"],[65306,65306,"CS"],[65307,65312,"ON"],[65339,65344,"ON"],[65371,65381,"ON"],[65504,65505,"ET"],[65506,65508,"ON"],[65509,65510,"ET"],[65512,65518,"ON"],[65520,65528,"BN"],[65529,65533,"ON"],[65534,65535,"BN"],[65793,65793,"ON"],[65856,65932,"ON"],[65936,65948,"ON"],[65952,65952,"ON"],[66045,66045,"NSM"],[66272,66272,"NSM"],[66273,66299,"EN"],[66422,66426,"NSM"],[67584,67870,"R"],[67871,67871,"ON"],[67872,68096,"R"],[68097,68099,"NSM"],[68100,68100,"R"],[68101,68102,"NSM"],[68103,68107,"R"],[68108,68111,"NSM"],[68112,68151,"R"],[68152,68154,"NSM"],[68155,68158,"R"],[68159,68159,"NSM"],[68160,68324,"R"],[68325,68326,"NSM"],[68327,68408,"R"],[68409,68415,"ON"],[68416,68863,"R"],[68864,68899,"AL"],[68900,68903,"NSM"],[68904,68911,"AL"],[68912,68921,"AN"],[68922,68927,"AL"],[68928,68937,"AN"],[68938,68968,"R"],[68969,68973,"NSM"],[68974,68974,"ON"],[68975,69215,"R"],[69216,69246,"AN"],[69247,69290,"R"],[69291,69292,"NSM"],[69293,69311,"R"],[69312,69327,"AL"],[69328,69336,"ON"],[69337,69369,"AL"],[69370,69375,"NSM"],[69376,69423,"R"],[69424,69445,"AL"],[69446,69456,"NSM"],[69457,69487,"AL"],[69488,69505,"R"],[69506,69509,"NSM"],[69510,69631,"R"],[69633,69633,"NSM"],[69688,69702,"NSM"],[69714,69733,"ON"],[69744,69744,"NSM"],[69747,69748,"NSM"],[69759,69761,"NSM"],[69811,69814,"NSM"],[69817,69818,"NSM"],[69826,69826,"NSM"],[69888,69890,"NSM"],[69927,69931,"NSM"],[69933,69940,"NSM"],[70003,70003,"NSM"],[70016,70017,"NSM"],[70070,70078,"NSM"],[70089,70092,"NSM"],[70095,70095,"NSM"],[70191,70193,"NSM"],[70196,70196,"NSM"],[70198,70199,"NSM"],[70206,70206,"NSM"],[70209,70209,"NSM"],[70367,70367,"NSM"],[70371,70378,"NSM"],[70400,70401,"NSM"],[70459,70460,"NSM"],[70464,70464,"NSM"],[70502,70508,"NSM"],[70512,70516,"NSM"],[70587,70592,"NSM"],[70606,70606,"NSM"],[70608,70608,"NSM"],[70610,70610,"NSM"],[70625,70626,"NSM"],[70712,70719,"NSM"],[70722,70724,"NSM"],[70726,70726,"NSM"],[70750,70750,"NSM"],[70835,70840,"NSM"],[70842,70842,"NSM"],[70847,70848,"NSM"],[70850,70851,"NSM"],[71090,71093,"NSM"],[71100,71101,"NSM"],[71103,71104,"NSM"],[71132,71133,"NSM"],[71219,71226,"NSM"],[71229,71229,"NSM"],[71231,71232,"NSM"],[71264,71276,"ON"],[71339,71339,"NSM"],[71341,71341,"NSM"],[71344,71349,"NSM"],[71351,71351,"NSM"],[71453,71453,"NSM"],[71455,71455,"NSM"],[71458,71461,"NSM"],[71463,71467,"NSM"],[71727,71735,"NSM"],[71737,71738,"NSM"],[71995,71996,"NSM"],[71998,71998,"NSM"],[72003,72003,"NSM"],[72148,72151,"NSM"],[72154,72155,"NSM"],[72160,72160,"NSM"],[72193,72198,"NSM"],[72201,72202,"NSM"],[72243,72248,"NSM"],[72251,72254,"NSM"],[72263,72263,"NSM"],[72273,72278,"NSM"],[72281,72283,"NSM"],[72330,72342,"NSM"],[72344,72345,"NSM"],[72544,72544,"NSM"],[72546,72548,"NSM"],[72550,72550,"NSM"],[72752,72758,"NSM"],[72760,72765,"NSM"],[72850,72871,"NSM"],[72874,72880,"NSM"],[72882,72883,"NSM"],[72885,72886,"NSM"],[73009,73014,"NSM"],[73018,73018,"NSM"],[73020,73021,"NSM"],[73023,73029,"NSM"],[73031,73031,"NSM"],[73104,73105,"NSM"],[73109,73109,"NSM"],[73111,73111,"NSM"],[73459,73460,"NSM"],[73472,73473,"NSM"],[73526,73530,"NSM"],[73536,73536,"NSM"],[73538,73538,"NSM"],[73562,73562,"NSM"],[73685,73692,"ON"],[73693,73696,"ET"],[73697,73713,"ON"],[78912,78912,"NSM"],[78919,78933,"NSM"],[90398,90409,"NSM"],[90413,90415,"NSM"],[92912,92916,"NSM"],[92976,92982,"NSM"],[94031,94031,"NSM"],[94095,94098,"NSM"],[94178,94178,"ON"],[94180,94180,"NSM"],[113821,113822,"NSM"],[113824,113827,"BN"],[117760,117973,"ON"],[118e3,118009,"EN"],[118010,118012,"ON"],[118016,118451,"ON"],[118458,118480,"ON"],[118496,118512,"ON"],[118528,118573,"NSM"],[118576,118598,"NSM"],[119143,119145,"NSM"],[119155,119162,"BN"],[119163,119170,"NSM"],[119173,119179,"NSM"],[119210,119213,"NSM"],[119273,119274,"ON"],[119296,119361,"ON"],[119362,119364,"NSM"],[119365,119365,"ON"],[119552,119638,"ON"],[120513,120513,"ON"],[120539,120539,"ON"],[120571,120571,"ON"],[120597,120597,"ON"],[120629,120629,"ON"],[120655,120655,"ON"],[120687,120687,"ON"],[120713,120713,"ON"],[120745,120745,"ON"],[120771,120771,"ON"],[120782,120831,"EN"],[121344,121398,"NSM"],[121403,121452,"NSM"],[121461,121461,"NSM"],[121476,121476,"NSM"],[121499,121503,"NSM"],[121505,121519,"NSM"],[122880,122886,"NSM"],[122888,122904,"NSM"],[122907,122913,"NSM"],[122915,122916,"NSM"],[122918,122922,"NSM"],[123023,123023,"NSM"],[123184,123190,"NSM"],[123566,123566,"NSM"],[123628,123631,"NSM"],[123647,123647,"ET"],[124140,124143,"NSM"],[124398,124399,"NSM"],[124643,124643,"NSM"],[124646,124646,"NSM"],[124654,124655,"NSM"],[124661,124661,"NSM"],[124928,125135,"R"],[125136,125142,"NSM"],[125143,125251,"R"],[125252,125258,"NSM"],[125259,126063,"R"],[126064,126143,"AL"],[126144,126207,"R"],[126208,126287,"AL"],[126288,126463,"R"],[126464,126703,"AL"],[126704,126705,"ON"],[126706,126719,"AL"],[126720,126975,"R"],[126976,127019,"ON"],[127024,127123,"ON"],[127136,127150,"ON"],[127153,127167,"ON"],[127169,127183,"ON"],[127185,127221,"ON"],[127232,127242,"EN"],[127243,127247,"ON"],[127279,127279,"ON"],[127338,127343,"ON"],[127405,127405,"ON"],[127584,127589,"ON"],[127744,128728,"ON"],[128732,128748,"ON"],[128752,128764,"ON"],[128768,128985,"ON"],[128992,129003,"ON"],[129008,129008,"ON"],[129024,129035,"ON"],[129040,129095,"ON"],[129104,129113,"ON"],[129120,129159,"ON"],[129168,129197,"ON"],[129200,129211,"ON"],[129216,129217,"ON"],[129232,129240,"ON"],[129280,129623,"ON"],[129632,129645,"ON"],[129648,129660,"ON"],[129664,129674,"ON"],[129678,129734,"ON"],[129736,129736,"ON"],[129741,129756,"ON"],[129759,129770,"ON"],[129775,129784,"ON"],[129792,129938,"ON"],[129940,130031,"ON"],[130032,130041,"EN"],[130042,130042,"ON"],[131070,131071,"BN"],[196606,196607,"BN"],[262142,262143,"BN"],[327678,327679,"BN"],[393214,393215,"BN"],[458750,458751,"BN"],[524286,524287,"BN"],[589822,589823,"BN"],[655358,655359,"BN"],[720894,720895,"BN"],[786430,786431,"BN"],[851966,851967,"BN"],[917502,917759,"BN"],[917760,917999,"NSM"],[918e3,921599,"BN"],[983038,983039,"BN"],[1048574,1048575,"BN"],[1114110,1114111,"BN"]];function Pd(e){if(e<=255)return Dd[e];let t=0,n=Hd.length-1;for(;t<=n;){const r=t+n>>1,i=Hd[r];if(e<i[0])n=r-1;else{if(!(e>i[1]))return i[2];t=r+1}}return"L"}function Rd(e,t){const n=function(e){const t=e.length;if(0===t)return null;const n=new Array(t);let r=!1;for(let i=0;i<t;){const o=e.charCodeAt(i);let a=o,s=1;if(o>=55296&&o<=56319&&i+1<t){const t=e.charCodeAt(i+1);t>=56320&&t<=57343&&(a=t-56320+(o-55296<<10)+65536,s=2)}const l=Pd(a);"R"!==l&&"AL"!==l&&"AN"!==l||(r=!0);for(let e=0;e<s;e++)n[i+e]=l;i+=s}if(!r)return null;let i=0;for(let e=0;e<t;e++){const t=n[e];if("L"===t){i=0;break}if("R"===t||"AL"===t){i=1;break}}const o=new Int8Array(t);for(let e=0;e<t;e++)o[e]=i;const a=1&i?"R":"L",s=a;let l=s;for(let e=0;e<t;e++)"NSM"===n[e]?n[e]=l:l=n[e];l=s;for(let e=0;e<t;e++){const t=n[e];"EN"===t?n[e]="AL"===l?"AN":"EN":"R"!==t&&"L"!==t&&"AL"!==t||(l=t)}for(let e=0;e<t;e++)"AL"===n[e]&&(n[e]="R");for(let e=1;e<t-1;e++)"ES"===n[e]&&"EN"===n[e-1]&&"EN"===n[e+1]&&(n[e]="EN"),"CS"!==n[e]||"EN"!==n[e-1]&&"AN"!==n[e-1]||n[e+1]!==n[e-1]||(n[e]=n[e-1]);for(let e=0;e<t;e++){if("EN"!==n[e])continue;let r;for(r=e-1;r>=0&&"ET"===n[r];r--)n[r]="EN";for(r=e+1;r<t&&"ET"===n[r];r++)n[r]="EN"}for(let e=0;e<t;e++){const t=n[e];"WS"!==t&&"ES"!==t&&"ET"!==t&&"CS"!==t||(n[e]="ON")}l=s;for(let e=0;e<t;e++){const t=n[e];"EN"===t?n[e]="L"===l?"L":"EN":"R"!==t&&"L"!==t||(l=t)}for(let e=0;e<t;e++){if("ON"!==n[e])continue;let r=e+1;for(;r<t&&"ON"===n[r];)r++;const i="L"!==(e>0?n[e-1]:s)?"R":"L";if(i===("L"!==(r<t?n[r]:s)?"R":"L"))for(let t=e;t<r;t++)n[t]=i;e=r-1}for(let e=0;e<t;e++)"ON"===n[e]&&(n[e]=a);for(let e=0;e<t;e++){const t=n[e];0==(1&o[e])?"R"===t?o[e]++:"AN"!==t&&"EN"!==t||(o[e]+=2):"L"!==t&&"AN"!==t&&"EN"!==t||o[e]++}return o}(e);if(null===n)return null;const r=new Int8Array(t.length);for(let e=0;e<t.length;e++)r[e]=n[t[e]];return r}const $d=/[ \t\n\r\f]+/g,Bd=/[\t\n\r\f]| {2,}|^ | $/;let Vd,zd=null;const Wd=/\p{Script=Arabic}/u,Ud=/\p{M}/u,qd=/\p{Nd}/u;function Yd(e){return Wd.test(e)}function Zd(e){return e>=19968&&e<=40959||e>=13312&&e<=19903||e>=131072&&e<=173791||e>=173824&&e<=177983||e>=177984&&e<=178207||e>=178208&&e<=183983||e>=183984&&e<=191471||e>=191472&&e<=192093||e>=194560&&e<=195103||e>=196608&&e<=201551||e>=201552&&e<=205743||e>=205744&&e<=210041||e>=63744&&e<=64255||e>=12288&&e<=12351||e>=12352&&e<=12447||e>=12448&&e<=12543||e>=12592&&e<=12687||e>=44032&&e<=55215||e>=65280&&e<=65519}function Kd(e){for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(!(n<12288)){if(n>=55296&&n<=56319&&t+1<e.length){const r=e.charCodeAt(t+1);if(r>=56320&&r<=57343){if(Zd(r-56320+(n-55296<<10)+65536))return!0;t++;continue}}if(Zd(n))return!0}}return!1}const Gd=new Set([" "," ","⁠","\ufeff"]),Xd=new Set(["-","‐","–","—"]);function Qd(e,t){return!function(e){const t=uc(e);return null!==t&&Gd.has(t)}(e)&&(!t||!function(e){const t=uc(e);return null!==t&&(Jd.has(t)||nc.has(t))}(e)&&!function(e){const t=uc(e);return null!==t&&Xd.has(t)}(e))}const Jd=new Set([",",".","!",":",";","?","、","。","・",")","〕","〉","》","」","』","】","〗","〙","〛","ー","々","〻","ゝ","ゞ","ヽ","ヾ"]),ec=new Set(['"',"(","[","{","¡","¿","“","‘","‚","„","«","‹","⸘","(","〔","〈","《","「","『","【","〖","〘","〚"]),tc=new Set(["'","’"]),nc=new Set([".",",","!","?",":",";","،","؛","؟","।","॥","၊","။","၌","၍","၏",")","]","}","%",'"',"”","’","»","›","…"]),rc=new Set([":",".","،","؛"]),ic=new Set(["၏"]),oc=new Set(["”","’","»","›","」","』","】","》","〉","〕",")"]);function ac(e){if(dc(e))return!0;let t=!1;for(const n of e)if(nc.has(n)||hc(n))t=!0;else if(!t||!Ud.test(n))return!1;return t}function sc(e){for(const t of e)if(!Jd.has(t)&&!nc.has(t))return!1;return e.length>0}function lc(e){if(dc(e))return!0;for(const t of e)if(!(ec.has(t)||tc.has(t)||Ud.test(t)||hc(t)))return!1;return e.length>0}function dc(e){let t=!1;for(const n of e)if("\\"!==n&&!Ud.test(n)){if(!(ec.has(n)||nc.has(n)||tc.has(n)))return!1;t=!0}return t}function cc(e,t){const n=t-1;if(n<=0)return Math.max(n,0);const r=e.charCodeAt(n);if(r<56320||r>57343)return n;const i=n-1;if(i<0)return n;const o=e.charCodeAt(i);return o>=55296&&o<=56319?i:n}function uc(e){if(0===e.length)return null;const t=cc(e,e.length);return e.slice(t)}const pc=[36,37,43,43,92,92,162,165,176,177,1423,1423,1545,1547,1642,1642,2046,2047,2546,2547,2553,2555,2801,2801,3065,3065,3449,3449,3647,3647,6107,6107,8240,8247,8279,8279,8352,8399,8451,8451,8457,8457,8470,8470,8722,8723,43064,43064,65020,65020,65129,65130,65284,65285,65504,65505,65509,65510,73693,73696,123647,123647,126124,126124,126128,126128];function hc(e){const t=e.codePointAt(0);return void 0!==t&&function(e,t){for(let n=0;n<t.length;n+=2)if(e>=t[n]&&e<=t[n+1])return!0;return!1}(t,pc)}function mc(e){const t=function(e){for(let t=e.length;t>0;){const n=cc(e,t),r=e.slice(n,t);if(!Ud.test(r))return r;t=n}return null}(e);return null!==t&&hc(t)}function gc(e){const t=function(e){for(const t of e)if(!Ud.test(t))return t;return null}(e);return null!==t&&qd.test(t)}function fc(e){const t=Array.from(e);let n=t.length;for(;n>0;){const e=t[n-1];if(Ud.test(e))n--;else{if(!ec.has(e)&&!tc.has(e))break;n--}}return n<=0||n===t.length?null:{head:t.slice(0,n).join(""),tail:t.slice(n).join("")}}function vc(e,t,n,r){const i=t[r],o=e[r];if(null==i)return o;const a=n[r];if(o.length===a)return o;const s=i.repeat(a);return e[r]=s,s}function bc(e,t){return e&&null!==t&&rc.has(t)}function Sc(e){const t=uc(e);return null!==t&&ic.has(t)}function yc(e){if(e.length<2||" "!==e[0])return null;const t=e.slice(1);return/^\p{M}+$/u.test(t)?{space:" ",marks:t}:null}function wc(e){let t=e.length;for(;t>0;){const n=cc(e,t),r=e.slice(n,t);if(oc.has(r))return!0;if(!nc.has(r))return!1;t=n}return!1}function xc(e,t){if(t.preserveOrdinarySpaces||t.preserveHardBreaks){if(" "===e)return"preserved-space";if("\t"===e)return"tab";if(t.preserveHardBreaks&&"\n"===e)return"hard-break"}return" "===e?"space":" "===e||" "===e||"⁠"===e||"\ufeff"===e?"glue":"​"===e?"zero-width-break":"­"===e?"soft-hyphen":"text"}const kc=/[\x20\t\n\xA0\xAD\u200B\u202F\u2060\uFEFF]/;function Cc(e){return 1===e.length?e[0]:e.join("")}function Oc(e,t){const n=[];for(let t=e.length-1;t>=0;t--)n.push(e[t]);return n.push(t),Cc(n)}function Mc(e,t,n,r){if(!kc.test(e))return[{text:e,isWordLike:t,kind:"text",start:n}];const i=[];let o=null,a=[],s=n,l=!1,d=0;for(const c of e){const e=xc(c,r),u="text"===e&&t;null===o||e!==o||u!==l?(null!==o&&i.push({text:Cc(a),isWordLike:l,kind:o,start:s}),o=e,a=[c],s=n+d,l=u,d+=c.length):(a.push(c),d+=c.length)}return null!==o&&i.push({text:Cc(a),isWordLike:l,kind:o,start:s}),i}function Ic(e){return"space"===e||"preserved-space"===e||"zero-width-break"===e||"hard-break"===e}const Nc=/^[A-Za-z][A-Za-z0-9+.-]*:$/;function Fc(e,t){const n=e.texts[t];return!!n.startsWith("www.")||Nc.test(n)&&t+1<e.len&&"text"===e.kinds[t+1]&&"//"===e.texts[t+1]}function Lc(e){return e.includes("?")&&(e.includes("://")||e.startsWith("www."))}const Tc=new Set([":","-","/","×",",",".","+","–","—"]),Ac=new Set([".",",",":",";"]);function jc(e){for(let t=e.length;t>0;){const n=cc(e,t),r=e.slice(n,t);if(!Ud.test(r))return Ac.has(r)||hc(r);t=n}return!1}function _c(e,t){return t&&!Kd(e)}function Ec(e){for(const t of e)if(qd.test(t))return!0;return!1}function Dc(e){if(0===e.length)return!1;for(const t of e)if(!qd.test(t)&&!Tc.has(t))return!1;return!0}function Hc(e,t,n){const r=(null===zd&&(zd=new Intl.Segmenter(Vd,{granularity:"word"})),zd);let i=0;const o=[],a=[],s=[],l=[],d=[],c=[],u=[],p=[],h=[],m=[],g=[],f=[];for(const C of r.segment(e))for(const O of Mc(C.segment,C.isWordLike??!1,C.index,n)){const M="text"===O.kind,I=(v=O.text,b=O.isWordLike,"text"!==O.kind||b||1!==v.length||"-"===v||"—"===v?null:v),N=Kd(O.text),F=Yd(O.text),L=uc(O.text),T=wc(O.text),A=Sc(O.text),j=i-1;function _(){null!==c[j]&&(a[j]=[vc(o,c,u,j)],c[j]=null),a[j].push(O.text),s[j]=s[j]||O.isWordLike,p[j]=p[j]||N,h[j]=h[j]||F,m[j]=T,g[j]=A,f[j]=bc(h[j],L)}t.carryCJKAfterClosingQuote&&M&&i>0&&"text"===l[j]&&N&&p[j]&&m[j]||M&&i>0&&"text"===l[j]&&sc(O.text)&&p[j]||M&&i>0&&"text"===l[j]&&g[j]?_():M&&i>0&&"text"===l[j]&&O.isWordLike&&F&&f[j]?(_(),s[j]=!0):null!==I&&i>0&&"text"===l[j]&&c[j]===I?u[j]=(u[j]??1)+1:M&&!O.isWordLike&&i>0&&"text"===l[j]&&!p[j]&&(ac(O.text)||"-"===O.text&&s[j])?_():(o[i]=O.text,a[i]=[O.text],s[i]=O.isWordLike,l[i]=O.kind,d[i]=O.start,c[i]=I,u[i]=null===I?0:1,p[i]=N,h[i]=F,m[i]=T,g[i]=A,f[i]=bc(F,L),i++)}var v,b;for(let E=0;E<i;E++)null===c[E]?o[E]=Cc(a[E]):o[E]=vc(o,c,u,E);for(let D=1;D<i;D++)"text"!==l[D]||s[D]||!dc(o[D])||"text"!==l[D-1]||p[D-1]||(o[D-1]+=o[D],s[D-1]=s[D-1]||s[D],o[D]="");const S=Array.from({length:i},(()=>null));let y=-1;for(let H=i-1;H>=0;H--){const P=o[H];if(0!==P.length)if("text"===l[H]&&!s[H]&&y>=0&&"text"===l[y]&&(lc(P)||"-"===P&&gc(o[y]))){const R=S[y]??[];R.push(P),S[y]=R,d[y]=d[H],o[H]=""}else y=H}for(let $=0;$<i;$++){const B=S[$];null!=B&&(o[$]=Oc(B,o[$]))}let w=0;for(let V=0;V<i;V++){const z=o[V];0!==z.length&&(w!==V&&(o[w]=z,s[w]=s[V],l[w]=l[V],d[w]=d[V]),w++)}o.length=w,s.length=w,l.length=w,d.length=w;const x=function(e){const t=[],n=[],r=[],i=[];let o=0;for(;o<e.len;){const a=[e.texts[o]];let s=e.isWordLike[o],l=e.kinds[o],d=e.starts[o];if("glue"===l){const c=[a[0]],u=d;for(o++;o<e.len&&"glue"===e.kinds[o];)c.push(e.texts[o]),o++;const p=Cc(c);if(!(o<e.len&&"text"===e.kinds[o])){t.push(p),n.push(!1),r.push("glue"),i.push(u);continue}a[0]=p,a.push(e.texts[o]),s=e.isWordLike[o],l="text",d=u,o++}else o++;if("text"===l)for(;o<e.len&&"glue"===e.kinds[o];){const t=[];for(;o<e.len&&"glue"===e.kinds[o];)t.push(e.texts[o]),o++;const n=Cc(t);o<e.len&&"text"===e.kinds[o]?(a.push(n,e.texts[o]),s=s||e.isWordLike[o],o++):a.push(n)}t.push(Cc(a)),n.push(s),r.push(l),i.push(d)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}({len:w,texts:o,isWordLike:s,kinds:l,starts:d}),k=function(e){const t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let e=0;e<t.length-1;e++){if("text"!==r[e]||"text"!==r[e+1])continue;if(!Kd(t[e])||!Kd(t[e+1]))continue;const n=fc(t[e]);null!==n&&(t[e]=n.head,t[e+1]=n.tail+t[e+1],i[e+1]=i[e]+n.head.length)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.len;o++){const a=e.texts[o],s=e.kinds[o],l=e.isWordLike[o];if("text"!==s||!jc(a)||!l&&!mc(a)||Kd(a))t.push(a),n.push(l),r.push(s),i.push(e.starts[o]);else{const s=[a];let l=!0,d=o+1;for(;l&&d<e.len&&"text"===e.kinds[d]&&_c(e.texts[d],e.isWordLike[d]);){const t=e.texts[d];s.push(t),l=jc(t),d++}t.push(Cc(s)),n.push(!0),r.push("text"),i.push(e.starts[o]),o=d-1}}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.len;o++){const a=e.texts[o];if("text"===e.kinds[o]&&a.includes("-")){const s=a.split("-");let l=s.length>1;for(let e=0;e<s.length;e++){const t=s[e];if(!l)break;0!==t.length&&Ec(t)&&Dc(t)||(l=!1)}if(l){let a=0;for(let l=0;l<s.length;l++){const d=s[l],c=l<s.length-1?`${d}-`:d;t.push(c),n.push(!0),r.push("text"),i.push(e.starts[o]+a),a+=c.length}continue}}t.push(a),n.push(e.isWordLike[o]),r.push(e.kinds[o]),i.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.len;o++){const a=e.texts[o],s=e.kinds[o];if("text"===s&&Dc(a)&&Ec(a)){const s=[a];let l=o+1;for(;l<e.len&&"text"===e.kinds[l]&&Dc(e.texts[l]);)s.push(e.texts[l]),l++;t.push(Cc(s)),n.push(!0),r.push("text"),i.push(e.starts[o]),o=l-1}else t.push(a),n.push(e.isWordLike[o]),r.push(s),i.push(e.starts[o])}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){const t=[],n=[],r=[],i=[];for(let o=0;o<e.len;o++){const a=e.texts[o];if(t.push(a),n.push(e.isWordLike[o]),r.push(e.kinds[o]),i.push(e.starts[o]),!Lc(a))continue;const s=o+1;if(s>=e.len||Ic(e.kinds[s]))continue;const l=[],d=e.starts[s];let c=s;for(;c<e.len&&!Ic(e.kinds[c]);)l.push(e.texts[c]),c++;l.length>0&&(t.push(Cc(l)),n.push(!0),r.push("text"),i.push(d),o=c-1)}return{len:t.length,texts:t,isWordLike:n,kinds:r,starts:i}}(function(e){const t=e.texts.slice(),n=e.isWordLike.slice(),r=e.kinds.slice(),i=e.starts.slice();for(let i=0;i<e.len;i++){if("text"!==r[i]||!Fc(e,i))continue;const o=[t[i]];let a=i+1;for(;a<e.len&&!Ic(r[a]);){o.push(t[a]),n[i]=!0;const e=t[a].includes("?");if(r[a]="text",t[a]="",a++,e)break}t[i]=Cc(o)}let o=0;for(let e=0;e<t.length;e++){const a=t[e];0!==a.length&&(o!==e&&(t[o]=a,n[o]=n[e],r[o]=r[e],i[o]=i[e]),o++)}return t.length=o,n.length=o,r.length=o,i.length=o,{len:o,texts:t,isWordLike:n,kinds:r,starts:i}}(x))))));for(let W=0;W<k.len-1;W++){const U=yc(k.texts[W]);null!==U&&("space"!==k.kinds[W]&&"preserved-space"!==k.kinds[W]||"text"!==k.kinds[W+1]||!Yd(k.texts[W+1])||(k.texts[W]=U.space,k.isWordLike[W]=!1,k.kinds[W]="preserved-space"===k.kinds[W]?"preserved-space":"space",k.texts[W+1]=U.marks+k.texts[W+1],k.starts[W+1]=k.starts[W]+U.space.length))}return k}function Pc(e,t){if(0===e.len)return[];if(!t.preserveHardBreaks)return[{startSegmentIndex:0,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}];const n=[];let r=0;for(let t=0;t<e.len;t++)"hard-break"===e.kinds[t]&&(n.push({startSegmentIndex:r,endSegmentIndex:t,consumedEndSegmentIndex:t+1}),r=t+1);return r<e.len&&n.push({startSegmentIndex:r,endSegmentIndex:e.len,consumedEndSegmentIndex:e.len}),n}function Rc(e,t,n){if(t.len<=1)return t;const r=[],i=[],o=[],a=[];let s=-1,l=!1;function d(e){r.push(t.texts[e]),i.push(t.isWordLike[e]),o.push("text"),a.push(t.starts[e])}function c(n){if(!(s<0)){if(l)s+1===n?d(s):function(n,s){let l=!1;for(let e=n;e<s;e++)l=l||t.isWordLike[e];const d=t.starts[n],c=s<t.len?t.starts[s]:e.length;r.push(e.slice(d,c)),i.push(l),o.push("text"),a.push(d)}(s,n);else for(let e=s;e<n;e++)d(e);s=-1,l=!1}}for(let e=0;e<t.len;e++){const d=t.texts[e],u=t.kinds[e];"text"!==u?(c(e),r.push(d),i.push(t.isWordLike[e]),o.push(u),a.push(t.starts[e])):(s>=0&&!Qd(t.texts[e-1],n)&&c(e),s<0&&(s=e),l=l||Kd(d))}return c(t.len),{len:r.length,texts:r,isWordLike:i,kinds:o,starts:a}}function $c(e,t,n="normal",r="normal"){const i=function(e){const t=e??"normal";return"pre-wrap"===t?{mode:t,preserveOrdinarySpaces:!0,preserveHardBreaks:!0}:{mode:t,preserveOrdinarySpaces:!1,preserveHardBreaks:!1}}(n),o="pre-wrap"===i.mode?function(e){return/[\r\f]/.test(e)?e.replace(/\r\n/g,"\n").replace(/[\r\f]/g,"\n"):e}(e):function(e){if(!Bd.test(e))return e;let t=e.replace($d," ");return 32===t.charCodeAt(0)&&(t=t.slice(1)),t.length>0&&32===t.charCodeAt(t.length-1)&&(t=t.slice(0,-1)),t}(e);if(0===o.length)return{normalized:o,chunks:[],len:0,texts:[],isWordLike:[],kinds:[],starts:[]};const a=Hc(o,t,i),s="keep-all"===r?Rc(o,a,t.breakKeepAllAfterPunctuation):a;return{normalized:o,chunks:Pc(s,i),...s}}let Bc=null;const Vc=new Map;let zc=null;const Wc=96,Uc=/\p{Emoji_Presentation}/u,qc=/[\p{Emoji_Presentation}\p{Extended_Pictographic}\p{Regional_Indicator}\uFE0F\u20E3]/u;let Yc=null;const Zc=new Map;function Kc(){if(null!==Bc)return Bc;if("undefined"!=typeof OffscreenCanvas)return Bc=new OffscreenCanvas(1,1).getContext("2d"),Bc;if("undefined"!=typeof document)return Bc=document.createElement("canvas").getContext("2d"),Bc;throw new Error("Text measurement requires OffscreenCanvas or a DOM canvas context.")}function Gc(e,t){let n=t.get(e);if(void 0===n){n={width:Kc().measureText(e).width,containsCJK:Kd(e)},t.set(e,n)}return n}function Xc(){if(null!==zc)return zc;if("undefined"==typeof navigator)return zc={lineFitEpsilon:.005,carryCJKAfterClosingQuote:!1,breakKeepAllAfterPunctuation:!0,preferPrefixWidthsForBreakableRuns:!1,preferEarlySoftHyphenBreak:!1},zc;const e=navigator.userAgent,t="Apple Computer, Inc."===navigator.vendor&&e.includes("Safari/")&&!e.includes("Chrome/")&&!e.includes("Chromium/")&&!e.includes("CriOS/")&&!e.includes("FxiOS/")&&!e.includes("EdgiOS/"),n=e.includes("Chrome/")||e.includes("Chromium/")||e.includes("CriOS/")||e.includes("Edg/");return zc={lineFitEpsilon:t?1/64:.005,carryCJKAfterClosingQuote:n,breakKeepAllAfterPunctuation:!t,preferPrefixWidthsForBreakableRuns:t,preferEarlySoftHyphenBreak:t},zc}function Qc(){return null===Yc&&(Yc=new Intl.Segmenter(void 0,{granularity:"grapheme"})),Yc}function Jc(e){return Uc.test(e)||e.includes("️")}function eu(e,t){return void 0===t.emojiCount&&(t.emojiCount=function(e){let t=0;const n=Qc();for(const r of n.segment(e))Jc(r.segment)&&t++;return t}(e)),t.emojiCount}function tu(e,t,n){return 0===n?t.width:t.width-eu(e,t)*n}function nu(e,t){Kc().font=e;const n=function(e){let t=Vc.get(e);return t||(t=new Map,Vc.set(e,t)),t}(e),r=function(e){const t=e.match(/(\d+(?:\.\d+)?)\s*px/);return t?parseFloat(t[1]):16}(e),i=t?function(e,t){let n=Zc.get(e);if(void 0!==n)return n;const r=Kc();r.font=e;const i=r.measureText("😀").width;if(n=0,i>t+.5&&"undefined"!=typeof document&&null!==document.body){const t=document.createElement("span");t.style.font=e,t.style.display="inline-block",t.style.visibility="hidden",t.style.position="absolute",t.textContent="😀",document.body.appendChild(t);const r=t.getBoundingClientRect().width;document.body.removeChild(t),i-r>.5&&(n=i-r)}return Zc.set(e,n),n}(e,r):0;return{cache:n,fontSize:r,emojiCorrection:i}}function ru(e){return"space"===e||"zero-width-break"===e||"soft-hyphen"===e}function iu(e){return"space"===e||"preserved-space"===e||"tab"===e||"zero-width-break"===e||"soft-hyphen"===e}function ou(e,t,n=e.widths.length){for(;t<n;){if(!ru(e.kinds[t]))break;t++}return t}function au(e,t){if(t<=0)return 0;const n=e%t;return Math.abs(n)<=1e-6?t:t-n}function su(e,t,n){return 0!==e.letterSpacing&&t&&e.spacingGraphemeCounts[n]>0?e.letterSpacing:0}function lu(e,t){return 0===t?0:e+t}function du(e,t,n,r,i){return lu(r,"tab"===t?i+function(e,t){return 0!==e.letterSpacing&&e.spacingGraphemeCounts[t]>0?e.letterSpacing:0}(e,n):e.lineEndFitAdvances[n])}function cu(e,t,n,r){return lu(r,"tab"===t?0:e.lineEndFitAdvances[n])}function uu(e,t,n,r,i){return lu(r,"tab"===t?i:e.lineEndPaintAdvances[n])}function pu(e,t,n){return 0!==e.letterSpacing&&t?n+e.letterSpacing:n}function hu(e,t){return 0===e.letterSpacing?t:t+e.letterSpacing}function mu(e,t,n,r,i,o){return t+function(e,t,n,r,i){if(0===e.letterSpacing)return 0;if(i>0)return e.spacingGraphemeCounts[r]>0?e.letterSpacing:0;for(let i=r-1;i>=t;i--){const o=e.kinds[i];if("space"!==o&&"zero-width-break"!==o&&"hard-break"!==o){if("soft-hyphen"!==o)return i===t&&n>0||e.spacingGraphemeCounts[i]>0?e.letterSpacing:0;if(i===r-1)return 0}}return 0}(e,n,r,i,o)}function gu(e,t,n){const{widths:r,kinds:i,breakableFitAdvances:o}=e;if(0===r.length)return 0;const a=t+Xc().lineFitEpsilon;let s=0,l=0,d=!1,c=0,u=0,p=0,h=0,m=-1,g=0;function f(e=p,t=h,r=l){s++,n?.(r,c,u,e,t),l=0,d=!1,m=-1,g=0}function v(e,t){d=!0,c=e,u=0,p=e+1,h=0,l=t}function b(e,t,n){d=!0,c=e,u=t,p=e,h=t+1,l=n}function S(e,t){d?(l+=t,p=e+1,h=0):v(e,t)}function y(e,t){const n=o[e];for(let r=t;r<n.length;r++){const t=n[r];d?l+t>a?(f(),b(e,r,t)):(l+=t,p=e,h=r+1):b(e,r,t)}d&&p===e&&h===n.length&&(p=e+1,h=0)}let w=0;for(;w<r.length&&(d||(w=ou(e,w),!(w>=r.length)));){const e=r[w],t=iu(i[w]);if(!d){e>a&&null!==o[w]?y(w,0):v(w,e),t&&(m=w+1,g=l-e),w++;continue}if(l+e>a){if(t){S(w,e),f(w+1,0,l-e),w++;continue}if(m>=0){if(p>m||p===m&&h>0){f();continue}f(m,0,g);continue}if(e>a&&null!==o[w]){f(),y(w,0),w++;continue}f()}else S(w,e),t&&(m=w+1,g=l-e),w++}return d&&f(),s}function fu(e,t,n){if(e.simpleLineWalkFastPath)return gu(e,t,n);const{widths:r,kinds:i,breakableFitAdvances:o,discretionaryHyphenWidth:a,chunks:s}=e;if(0===r.length||0===s.length)return 0;const l=Xc(),d=t+l.lineFitEpsilon;let c=0,u=0,p=!1,h=0,m=0,g=0,f=0,v=-1,b=0,S=0,y=null;function w(){v=-1,b=0,S=0,y=null}function x(t=g,r=f,i){c++,void 0!==n&&n(mu(e,i??("soft-hyphen"===y&&v===g&&0===f?S:u),h,m,t,r),h,m,t,r),u=0,p=!1,w()}function k(e,t){p=!0,h=e,m=0,g=e+1,f=0,u=t}function C(e,t,n){p=!0,h=e,m=t,g=e,f=t+1,u=n}function O(e,t){p?(u+=t,g=e+1,f=0):k(e,t)}function M(t,n,r,i,o,a){if(!n)return;const s=cu(e,t,r,o),l=uu(e,t,r,o,i);v=r+1,b=u-a+s,S=u-a+l,y=t}function I(t,n){const r=o[t];for(let i=n;i<r.length;i++){const n=r[i];if(p){const r=pu(e,!0,n),o=u+r;hu(e,o)>d?(x(),C(t,i,n)):(u=o,g=t,f=i+1)}else C(t,i,n)}p&&g===t&&f===r.length&&(g=t+1,f=0)}function N(e){c++,n?.(0,e.startSegmentIndex,0,e.consumedEndSegmentIndex,0),w()}for(let t=0;t<s.length;t++){const n=s[t];if(n.startSegmentIndex===n.endSegmentIndex){N(n);continue}p=!1,u=0,h=n.startSegmentIndex,m=0,g=n.startSegmentIndex,f=0,w();let c=n.startSegmentIndex;for(;c<n.endSegmentIndex&&(p||(c=ou(e,c,n.endSegmentIndex),!(c>=n.endSegmentIndex)));){const t=i[c],n=iu(t),s=su(e,p,c),h="tab"===t?au(u+s,e.tabStopAdvance):r[c],m=s+h,w=du(e,t,c,s,h);if("soft-hyphen"===t){p&&(g=c+1,f=0,v=c+1,b=u+a,S=u+a,y=t),c++;continue}if(!p){w>d&&null!==o[c]?I(c,0):k(c,h),M(t,n,c,h,s,m),c++;continue}if(u+w>d){const r=u+cu(e,t,c,s),i=u+uu(e,t,c,s,h);if("soft-hyphen"===y&&l.preferEarlySoftHyphenBreak&&b<=d){x(v,0,S);continue}if(n&&r<=d){O(c,m),x(c+1,0,i),c++;continue}if(v>=0&&b<=d){if(g>v||g===v&&f>0){x();continue}const e=v;x(e,0,S),c=e;continue}if(w>d&&null!==o[c]){x(),I(c,0),c++;continue}x()}else O(c,m),M(t,n,c,h,s,m),c++}if(p){const e=v===n.consumedEndSegmentIndex?S:u;x(n.consumedEndSegmentIndex,0,e)}}return c}let vu=null;function bu(){return null===vu&&(vu=new Intl.Segmenter(void 0,{granularity:"grapheme"})),vu}function Su(e,t){const n=[];let r=[],i=0,o=!1,a=!1,s=!1;function l(){0!==r.length&&(n.push({text:1===r.length?r[0]:r.join(""),start:i}),r=[],o=!1,a=!1,s=!1)}function d(e,t,n){r=[e],i=t,o=n,a=wc(e),s=ec.has(e)}function c(e,t){r.push(e),o=o||t;const n=wc(e);a=1===e.length&&nc.has(e)&&a||n,s=!1}for(const n of bu().segment(e)){const e=n.segment,i=Kd(e);0!==r.length?s||Jd.has(e)||nc.has(e)||t.carryCJKAfterClosingQuote&&i&&a?c(e,i):o||i?(l(),d(e,n.index,i)):c(e,i):d(e,n.index,i)}return l(),n}function yu(e,t,n){if(t.length<=1)return t;const r=[];let i=-1,o=!1;function a(n){if(!(i<0)){if(o)i+1===n?r.push(t[i]):function(n,i){const o=t[n].start,a=i<t.length?t[i].start:e.length;r.push({text:e.slice(o,a),start:o})}(i,n);else for(let e=i;e<n;e++)r.push(t[e]);i=-1,o=!1}}for(let e=0;e<t.length;e++){const r=t[e];i>=0&&!Qd(t[e-1].text,n)&&a(e),i<0&&(i=e),o=o||Kd(r.text)}return a(t.length),r}function wu(e,t){if("zero-width-break"===t||"soft-hyphen"===t||"hard-break"===t)return 0;if("tab"===t)return 1;let n=0;const r=bu();for(const t of r.segment(e))n++;return n}function xu(e,t,n,r,i){const o=Xc(),{cache:a,emojiCorrection:s}=nu(t,(l=e.normalized,qc.test(l)));var l;const d=tu("-",Gc("-",a),s)+(0===i?0:2*i),c=8*tu(" ",Gc(" ",a),s),u=0!==i;if(0===e.len)return function(e){return e?{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[],segments:[]}:{widths:[],lineEndFitAdvances:[],lineEndPaintAdvances:[],kinds:[],simpleLineWalkFastPath:!0,segLevels:null,breakableFitAdvances:[],letterSpacing:0,spacingGraphemeCounts:[],discretionaryHyphenWidth:0,tabStopAdvance:0,chunks:[]}}(n);const p=[],h=[],m=[],g=[];let f=e.chunks.length<=1&&!u;const v=n?[]:null,b=[],S=[],y=n?[]:null,w=Array.from({length:e.len});function x(e,t,n,r,i,o,a,s){"text"!==i&&"space"!==i&&"zero-width-break"!==i&&(f=!1),p.push(t),h.push(n),m.push(r),g.push(i),v?.push(o),b.push(a),u&&S.push(s),null!==y&&y.push(e)}function k(e,t,n,r,l){const d=Gc(e,a),c=u?wu(e,t):0,p=function(e,t,n){return t>1?e+(t-1)*n:e}(tu(e,d,s),c,i),h="space"===t||"preserved-space"===t||"zero-width-break"===t?0:p,m=0===h?0:h+(c>0?i:0),g="space"===t||"zero-width-break"===t?0:p;if(l&&r&&e.length>1){let r="sum-graphemes";0!==i?r="segment-prefixes":Dc(e)?r="pair-context":o.preferPrefixWidthsForBreakableRuns&&(r="segment-prefixes");const l=function(e,t,n,r,i){if(void 0!==t.breakableFitAdvances&&t.breakableFitMode===i)return t.breakableFitAdvances;t.breakableFitMode=i;const o=Qc(),a=[];for(const t of o.segment(e))a.push(t.segment);if(a.length<=1)return t.breakableFitAdvances=null,t.breakableFitAdvances;if("sum-graphemes"===i){const e=[];for(const t of a){const i=Gc(t,n);e.push(tu(t,i,r))}return t.breakableFitAdvances=e,t.breakableFitAdvances}if("pair-context"===i||a.length>Wc){const e=[];let i=null,o=0;for(const t of a){const a=tu(t,Gc(t,n),r);if(null===i)e.push(a);else{const a=i+t,s=Gc(a,n);e.push(tu(a,s,r)-o)}i=t,o=a}return t.breakableFitAdvances=e,t.breakableFitAdvances}const s=[];let l="",d=0;for(const e of a){l+=e;const t=tu(l,Gc(l,n),r);s.push(t-d),d=t}return t.breakableFitAdvances=s,t.breakableFitAdvances}(e,d,a,s,r);x(e,p,m,g,t,n,l,c)}else x(e,p,m,g,t,n,null,c)}for(let t=0;t<e.len;t++){w[t]=p.length;const n=e.texts[t],i=e.isWordLike[t],s=e.kinds[t],l=e.starts[t];if("soft-hyphen"===s){x(n,0,d,d,s,l,null,0);continue}if("hard-break"===s){x(n,0,0,0,s,l,null,0);continue}if("tab"===s){x(n,0,0,0,s,l,null,u?wu(n,s):0);continue}const c=Gc(n,a);if("text"===s&&c.containsCJK){const e=Su(n,o),t="keep-all"===r?yu(n,e,o.breakKeepAllAfterPunctuation):e;for(let e=0;e<t.length;e++){const n=t[e];k(n.text,"text",l+n.start,i,"keep-all"===r||!Kd(n.text))}}else k(n,s,l,i,!0)}const C=function(e,t,n){const r=[];for(let i=0;i<e.length;i++){const o=e[i],a=o.startSegmentIndex<t.length?t[o.startSegmentIndex]:n,s=o.endSegmentIndex<t.length?t[o.endSegmentIndex]:n,l=o.consumedEndSegmentIndex<t.length?t[o.consumedEndSegmentIndex]:n;r.push({startSegmentIndex:a,endSegmentIndex:s,consumedEndSegmentIndex:l})}return r}(e.chunks,w,p.length),O=null===v?null:Rd(e.normalized,v);return null!==y?{widths:p,lineEndFitAdvances:h,lineEndPaintAdvances:m,kinds:g,simpleLineWalkFastPath:f,segLevels:O,breakableFitAdvances:b,letterSpacing:i,spacingGraphemeCounts:S,discretionaryHyphenWidth:d,tabStopAdvance:c,chunks:C,segments:y}:{widths:p,lineEndFitAdvances:h,lineEndPaintAdvances:m,kinds:g,simpleLineWalkFastPath:f,segLevels:O,breakableFitAdvances:b,letterSpacing:i,spacingGraphemeCounts:S,discretionaryHyphenWidth:d,tabStopAdvance:c,chunks:C}}function ku(e,t,n,r){const i=r?.wordBreak??"normal",o=r?.letterSpacing??0;return xu($c(e,Xc(),r?.whiteSpace,i),t,n,i,o)}function Cu(e,t,n){return ku(e,t,!1,n)}function Ou(e,t,n){const r=function(e,t){return fu(e,t)}(e,t);return{lineCount:r,height:r*n}}function Mu(e){let{containerWidth:t,iconSpacing:n,headerText:r,headerFont:i,headerLineHeight:o,subText:a,subTextFont:s,subTextLineHeight:l,textsSpacing:d,initialSize:c}=e;if(t<=0)return c;const u=Cu(r,i),p=a&&s?Cu(a,s):null;let h=c;for(let e=0;e<10;e++){const e=t-h-n;if(e<=0)return c;let r=Ou(u,e,o).height;if(p&&l&&(r+=Ou(p,e,l).height+d),Math.abs(r-h)<.5)return Math.round(r);h=r}return c}function Iu(e,t,n,r){const i=null!=e?e:"17px",o=null!=t?t:'-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif',a=[];return r&&"normal"!==r&&a.push(r),n&&"normal"!==n&&a.push(n),a.push(i),a.push(o),a.join(" ")}function Nu(e,t){return t&&"none"!==t?"uppercase"===t?e.toUpperCase():"lowercase"===t?e.toLowerCase():"capitalize"===t?e.replace(/\b\w/g,(e=>e.toUpperCase())):e:e}function Fu(){return Fu=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},Fu.apply(this,arguments)}const Lu=Sn("p")((e=>{let{theme:t,fontProperties:n,isFirstCardNode:r,isFinalCardNode:i,iconAlignment:o}=e;const a=t.getShape("padding.elementBottom",{skipFallback:!0});return Object.assign(Object.assign({display:"grid",gridTemplateColumns:"auto minmax(0,1fr)",alignItems:"center"===o?"center":"start",color:t.getCSSColor("text.category")},null!=n?n:{}),{padding:a?`0px 0px ${i?"0px":a}`:`${r?0:10}px 0px ${i?0:10}px`,margin:"0"})})),Tu=Sn("span")({whiteSpace:"pre-wrap",overflow:"hidden",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"}),Au=Sn("span")((e=>{var t;let{theme:n,fontProperties:r}=e;return Object.assign(Object.assign({display:"block",whiteSpace:"pre-wrap",overflow:"hidden",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word",color:null!==(t=n.getCSSColor("text.categorySubText",{skipFallback:!0}))&&void 0!==t?t:n.getCSSColor("text.category")},null!=r?r:{}),"italic"===(null==r?void 0:r.fontStyle)?{paddingRight:"0.2em"}:{})})),ju=Sn("span")((e=>{let{theme:t,iconSpacing:n,iconAlignment:r,iconSize:i,iconVerticalOffset:o}=e;const a=t.getCSSColor("background.categoryIcon",{skipFallback:!0}),s=t.getCSSColor("border.categoryIcon",{skipFallback:!0}),l=t.getShape("border.categoryIcon",{skipFallback:!0}),d=t.getShape("borderRadius.categoryIcon",{skipFallback:!0}),c=t.getCSSShadowProperties("categoryIcon",{skipFallback:!0});return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({display:"flex",alignItems:"center",justifyContent:"center",alignSelf:"top"===r?"flex-start":"center",boxSizing:"border-box",width:`${i}px`,height:`${i}px`,minWidth:`${i}px`,overflow:"hidden",marginRight:n},o>0?{marginTop:`${o}px`}:{}),a&&i>0?{backgroundColor:a}:{}),s&&l&&i>0?{border:`${l} solid ${s}`}:{}),d&&i>0?{borderRadius:d}:{}),c&&i>0?{boxShadow:c}:{})}));let _u=null;const Eu=Sn("div")((e=>{let{mode:t}=e;return{display:t===sa?"block":"flex",flexDirection:"column",flexGrow:"1"}})),Du=e=>{let{fillColor:t,ariaHidden:n}=e;return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":null!=n&&n},(0,o.h)("path",{d:"M12 13V7M3 3H8M17 3H12M4 7V16C4 16.5523 4.44772 17 5 17H15C15.5523 17 16 16.5523 16 16V7M8 3L9 2H11L12 3M8 3H12M8 7V13",stroke:t,"stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"}))},Hu=e=>{let{fillColor:t,ariaHidden:n}=e;return(0,o.h)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 20 20",fill:"none","aria-hidden":null!=n&&n},(0,o.h)("path",{d:"M15 7V13.5C15 15.9853 12.9853 18 10.5 18V18C8.01472 18 6 15.9853 6 13.5V5C6 3.34315 7.34315 2 9 2V2C10.6569 2 12 3.34315 12 5V13.5C12 14.3284 11.3284 15 10.5 15V15C9.67157 15 9 14.3284 9 13.5V7",stroke:t,"stroke-width":"2","stroke-linecap":"round"}))};var Pu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Ru={jpeg:{signatures:[[255,216,255]],offset:0},png:{signatures:[[137,80,78,71,13,10,26,10]],offset:0},webp:{signatures:[[82,73,70,70,,,,,87,69,66,80]],offset:0},avif:{signatures:[[32,102,116,121,112,97,118,105,102]],offset:3}},$u={tif:{signatures:[[73,73,42,0],[77,77,0,42]],offset:0},tiff:{signatures:[[73,73,43,0],[73,73,0,43]],offset:0},heic:{signatures:[[102,116,121,112,104,101,105,99]],offset:4}};var Bu=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const Vu=Sn("label")((()=>({position:"relative",alignSelf:"stretch",overflow:"hidden",whiteSpace:"nowrap",display:"flex",alignItems:"center",width:"100%",cursor:"pointer"}))),zu=Sn("div")((e=>{let{theme:t,enabledThumbnailIcon:n,preview:r}=e;const i=n||(null==r?void 0:r.url)?"30px":"0",o={background:`url(${null==r?void 0:r.url})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"};return Object.assign({width:i,height:i,minWidth:i,minHeight:i,padding:n||(null==r?void 0:r.url)?"7px":"0",marginRight:n||(null==r?void 0:r.url)?"10px":"0",display:"flex",justifyContent:"center",alignItems:"center",borderRadius:t.getShape("borderRadius.uploadPlaceholder")||"0px",backgroundColor:t.getCSSColor("background.uploadPlaceholder")},(null==r?void 0:r.url)&&r.webCompatible?o:{})})),Wu=Sn("span")((e=>{let{theme:t,mode:n,placeholder:r,yPadding:i}=e;const o=Object.assign({overflow:"hidden",textOverflow:"ellipsis",color:t.getCSSColor("text.secondary")},t.getCSSFontProperties("secondary")),a=Object.assign(Object.assign({whiteSpace:"normal",color:t.getCSSColor("text.valueStacked",{skipFallback:!0})||t.getCSSColor("text.primary")},t.getCSSFontProperties("valueStacked",{skipFallback:!0})||t.getCSSFontProperties("primary")),i?{paddingBottom:`${i}px`}:{}),s=Object.assign({whiteSpace:"normal",color:t.getCSSColor("text.valueStacked")},t.getCSSFontProperties("valueStacked"));return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({width:"100%"},n===aa?o:{}),n===sa?a:{}),n===la?s:{}),r?{color:t.getCSSColor("text.hint")}:{}),{userSelect:"none","-webkit-user-select":"none","-moz-user-select":"none"})})),Uu=Sn("div")({display:"flex",flexDirection:"column",flexGrow:"1",minWidth:"0"}),qu=Sn("input")({position:"absolute",visibility:"hidden",width:"100%",height:"100%"}),Yu=Sn("button")((()=>({display:"flex",justifyContent:"center",alignItems:"center",border:"0",padding:"0",margin:"0",textDecoration:"none",cursor:"pointer",textAlign:"center",background:"none","-webkit-appearance":"none","-moz-appearance":"none"}))),Zu=Sn("button")((()=>({display:"flex",justifyContent:"center",alignItems:"center",border:"0",padding:"0",margin:"0",textDecoration:"none",cursor:"pointer",textAlign:"center",background:"none","-webkit-appearance":"none","-moz-appearance":"none"}))),Ku=T(((e,t)=>{let{theme:n,cardInstanceId:r,subviewId:i,format:a,name:s,label:l,placeholder:d,validations:c,enabledThumbnailIcon:u,targetBucketId:p}=e;const m=v(null),f=v(null),b=It(r,s,i),[S,y]=h(null),[w,x]=h(null),[k,C]=h(0),O=be().getState();g((()=>{if(O.application.isPreview)return;const e=window.AtomicUploadService.getFile(O.application.containerInstanceId,r,s);b&&e?(I(e),x(b.filename)):Mt().handleFormChange(r,s,void 0,i)}),[]),g((()=>{if(m.current&&f.current&&!k){var e,t,n,r;const i=(null===(e=m.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.offsetHeight)||0,o=(null===(n=f.current)||void 0===n||null===(r=n.base)||void 0===r?void 0:r.offsetHeight)||0;if(i>0&&o>0&&i>o){const e=Math.round((i-o)/2);C(e>0?e:0)}}}),[m]);const M=(e,t)=>{y({url:URL.createObjectURL(e),webCompatible:!t})},I=e=>{var t;const n=null===(t=m.current)||void 0===t?void 0:t.base;if(n){M(e.file,e.convertImage);const t=new DataTransfer;t.items.add(e.file),n.files=t.files}},N=()=>{O.application.isPreview||(window.AtomicUploadService.removeFile(O.application.containerInstanceId,r,s,i),Mt().handleFormChange(r,s,void 0,i),Mt().validateField(r,s,void 0,c,i),m.current&&(y(null),x(null),m.current.base.value=null))},F=`upload-input-${r}-${s}`;let L=(null==d?void 0:d.length)&&"\n"!==d?d:"";return a!==aa||L.length||(L=l),(0,o.h)(o.Fragment,null,(0,o.h)(zu,{theme:n,enabledThumbnailIcon:u,preview:S},!S&&u&&(0,o.h)($n,{fillColor:n.getCSSColor("icon.uploadPlaceholder"),ariaHidden:!0}),S&&!S.webCompatible&&(0,o.h)(lr,{fillColor:n.getCSSColor("icon.uploadPlaceholder"),ariaHidden:!0})),(0,o.h)(Vu,{htmlFor:F},(0,o.h)(Uu,{ref:f},a===sa&&(0,o.h)(pa,{theme:n,mode:a,yPadding:k,useSpanElement:!0},l),(0,o.h)(Wu,{theme:n,mode:a,placeholder:!w,yPadding:k},w||L)),(0,o.h)(qu,{id:F,ref:e=>{m.current=e,"function"==typeof t?t(e):t&&(t.current=e)},type:"file",accept:"image/jpeg, image/png, image/webp, image/avif",onChange:e=>Bu(void 0,void 0,void 0,(function*(){if(O.application.isPreview)return;const t=e.target;if(t.files&&t.files.length){y(null),x(null);const[e]=Array.from(t.files),n=yield(e=>Pu(void 0,void 0,void 0,(function*(){const t=yield e.slice(0,(()=>{const e=Object.assign(Object.assign({},Ru),$u);return Object.values(e).reduce(((e,t)=>{let n=0;return t.signatures.forEach((e=>n=Math.max(n,e.length))),n+=t.offset,Math.max(e,n)}),0)})()).arrayBuffer(),n=new Uint8Array(t),r=(e,t)=>e.every(((e,r)=>n[t+r]===e||void 0===e));for(const{signatures:e,offset:t}of Object.values(Ru))for(const n of e)if(r(n,t))return{requiresConversion:!1,isValidImage:!0};for(const{signatures:e,offset:t}of Object.values($u))for(const n of e)if(r(n,t))return{requiresConversion:!0,isValidImage:!0};return{requiresConversion:!1,isValidImage:!1}})))(e);if(!n.isValidImage)return N(),void Mt().validateFieldCustomResult(r,s,{type:"invalid",errorMessage:"Invalid file or unsupported image format selected"},i);const o=`${ae()}_${e.name}`,a={filename:e.name,destinationFilename:o,size:e.size,type:"image",targetBucketId:p};window.AtomicUploadService.storeFile(e,"image",p,r,O.application.containerInstanceId,o,n.requiresConversion,s,i),Mt().handleFormChange(r,s,a,i),M(e,n.requiresConversion),x(e.name),Mt().validateField(r,s,a,c,i)}}))})),w?(0,o.h)(Zu,{onClick:N,"aria-label":"remove image"},(0,o.h)(Du,{fillColor:n.getCSSColor("icon.inputButton"),ariaHidden:!0})):(0,o.h)(Yu,{onClick:()=>{var e,t;return null==m||null===(e=m.current)||void 0===e||null===(t=e.base)||void 0===t?void 0:t.click()},"aria-label":`attach image ${a===aa&&d||l}`},(0,o.h)(Hu,{fillColor:n.getCSSColor("icon.inputButton"),ariaHidden:!0})))})),Gu=F((e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{format:i,label:a,placeholder:s,name:l,type:d,enabledThumbnailIcon:c,targetBucketId:u},theme:p,isFinalCardNode:h,validations:m,variableResolver:g}=e;const f=`upload-label-${n}-${l}`,b=g(a),S=g(s||""),y=v(null),w="image"===d?(0,o.h)(Ku,{ref:y,theme:p,cardInstanceId:n,subviewId:r,format:i,name:l,validations:m,label:b,placeholder:S,enabledThumbnailIcon:c,targetBucketId:u||"DEFAULT"}):null;return(0,o.h)(o.Fragment,null,(0,o.h)(fa,{nodeKey:t,theme:p,isFinalCardNode:h,mode:i,label:b,labelId:f,onClick:e=>{const t=e.target;t.closest("label")||t.closest("button")||y.current.base.click()},clickableLabel:!1},w),(0,o.h)(wa,{name:l,cardInstanceId:n,subviewId:r,theme:p,isFinalCardNode:h,variableResolver:g}))}),((e,t)=>e.nodeKey===t.nodeKey&&e.cardInstanceId===t.cardInstanceId&&e.subviewId===t.subviewId&&e.attributes===t.attributes&&e.theme===t.theme&&e.validations===t.validations)),Xu={left:"flex-start",center:"center",right:"flex-end"},Qu=Sn("div")((e=>{var t,n,r,i,o,a,s,l,d,c,u,p,h;let{theme:m,paddingValues:g,feedOrientation:f,isFirstCardNode:v,ruleBetween:b,buttonLayout:S,buttonWidth:y,shadowVerticalExtent:w}=e;const{containerPadding:x,containerHorizontalPaddingFallback:k,containerVerticalPaddingFallback:C,buttonGroupPadding:O,buttonGroupVerticalPaddingFallback:M}=g;let I=b?"0px":null!==(t=m.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==t?t:"10px";const N=m.getShape("buttonAlignment.global"),F=Object.assign({flexGrow:"1",flexDirection:"column"},"horizontal"===S?{alignItems:"flex-end"}:{justifyContent:"flex-end"}),L={flexDirection:"row",overflowX:"scroll","::-webkit-scrollbar":{display:"none"},"-ms-overflow-style":"none",scrollbarWidth:"none",marginLeft:`-${null!==(n=x.left)&&void 0!==n?n:k}px`,marginRight:`-${null!==(r=x.right)&&void 0!==r?r:k}px`,paddingLeft:`${null!==(i=O.left)&&void 0!==i?i:k}px`,paddingRight:`${null!==(o=O.right)&&void 0!==o?o:k}px`},T={flexDirection:"row"},A={flexDirection:"column",alignItems:null!==(a=Xu[N])&&void 0!==a?a:"flex-start","> button:not(:last-child)":{marginBottom:I},"> a:not(:last-child)":{marginBottom:I}},j="horizontal"===S&&"fillsContainer"!==y?w:0,_=null!==(s=O.top)&&void 0!==s?s:v?0:M,E=null!==(l=O.bottom)&&void 0!==l?l:0,D=void 0!==O.bottom?null!==(d=x.bottom)&&void 0!==d?d:C:0;return Object.assign(Object.assign({position:"relative",paddingTop:`${_+j}px`,paddingBottom:`${E+j}px`,paddingLeft:`${null!==(c=O.left)&&void 0!==c?c:0}px`,paddingRight:`${null!==(u=O.right)&&void 0!==u?u:0}px`,marginTop:-j+"px",marginBottom:-(D+j)+"px",marginLeft:`-${void 0!==O.left?null!==(p=x.left)&&void 0!==p?p:k:0}px`,marginRight:`-${void 0!==O.right?null!==(h=x.right)&&void 0!==h?h:k:0}px`,display:"flex",alignItems:"center"},"horizontal"===f?F:{}),"horizontal"!==S?A:"fillsContainer"===y?T:L)})),Ju=Sn("div")((e=>{let{buttonAlignment:t,spaceBetweenButtons:n,fillsContainer:r}=e;if(r){const e={flex:"1",minWidth:"0",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"};return{display:"flex",width:"100%",alignItems:"center",gap:n,"> button":e,"> a":e}}let i={};return"center"===t?i={marginLeft:"auto",marginRight:"auto"}:"right"===t&&(i={marginLeft:"auto"}),Object.assign({display:"flex",flexShrink:"0",alignItems:"center","> button:not(:last-child)":{marginRight:n},"> a:not(:last-child)":{marginRight:n}},i)})),ep=Sn("div")((e=>{let{theme:t,isFirstCardNode:n,isFinalCardNode:r}=e;const i=t.getShape("padding.elementBottom",{skipFallback:!0});return{padding:i?`0px 0px ${r?"0px":i}`:`${n?0:10}px 0px ${r?0:10}px`}})),tp=Sn("ul")({listStyle:"none",padding:"0",margin:"0","> li":{marginBottom:"10px"},"> :last-child":{marginBottom:"0"}}),np=Sn("label")((e=>{let{labelFontProperties:t}=e;return{cursor:"pointer",display:"grid",gridTemplateColumns:"auto minmax(0, 1fr)",gridTemplateRows:`${(null==t?void 0:t.lineHeight)||"auto"} 1fr`,alignItems:"center",width:"fit-content",userSelect:"none"}})),rp=Sn("input")((e=>{let{theme:t}=e;return{position:"absolute",appearance:"none","&:focus-visible + span":{boxShadow:`0 0 0 2px ${t.getCSSColor("border.focus")} inset`}}})),ip=Sn("span")((e=>{let{theme:t,isChecked:n}=e;const r={backgroundColor:t.getCSSColor("background.checkedCheckbox",{skipFallback:!0})||"#000",borderColor:t.getCSSColor("border.checkedCheckbox",{skipFallback:!0})||"#000",borderWidth:t.getShape("border.checkedCheckbox")||"1px",borderStyle:"solid",borderRadius:t.getShape("borderRadius.checkedCheckbox",{skipFallback:!0})||"4px"},i={backgroundColor:t.getCSSColor("background.uncheckedCheckbox",{skipFallback:!0})||"#FFF",borderColor:t.getCSSColor("border.uncheckedCheckbox",{skipFallback:!0})||"#000",borderWidth:t.getShape("border.uncheckedCheckbox")||"1px",borderStyle:"solid",borderRadius:t.getShape("borderRadius.uncheckedCheckbox",{skipFallback:!0})||"4px"};return Object.assign({height:"20px",width:"20px",padding:"6px 4px 6px 5px",position:"relative",marginRight:"10px",display:"inline-block"},n?r:i)})),op=Sn("span")((e=>{let{theme:t,labelFontProperties:n}=e;return Object.assign(Object.assign({},n||{}),{gridColumnStart:"2",gridRowStart:"span 2",whiteSpace:"pre-wrap",color:t.getCSSColor("text.labelInline",{skipFallback:!0})||t.getCSSColor("text.primary"),cursor:"pointer",userSelect:"none",webkitUserSelect:"none",overflowWrap:"break-word",wordWrap:"break-word",wordBreak:"break-word"})}));function ap(){return ap=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},ap.apply(this,arguments)}const sp={linkButton:e=>{let{nodeKey:t,index:n,localIndex:r,cardInstanceId:i,subviewId:a,subviewTitle:s,isWorkflow:l,theme:d,attributes:c,variableResolver:u}=e;const{text:p,icon:h,iconUrl:m,iconAltText:g,appearance:f}=c,v=c.url,b=c.target,S=Object.assign(Object.assign({},a&&{subviewId:a}),s&&{subviewTitle:s}),w=y(Vi),x=w.runtimeVariableResolver,k=w.containersBroadcastChannel;return(0,o.h)(wl,{nodeKey:t,index:n,localIndex:r,theme:d,appearance:f,isWorkflow:l,text:u(p),icon:h,iconUrl:m,iconAltText:g,clickHandler:e=>{const n=be().getState();return r=>bl(void 0,void 0,void 0,(function*(){let o,a,s;if(c.action){s=c.action;const e=n.cardFeed.cardInstances.find((e=>e.instance.id===i));s&&x&&e&&(yield yl(x,n.application.runtimeVariableResolutionTimeout,e,s))}else if(c.layoutId)o=c.layoutId;else if(c.url){if(r.preventDefault(),a={url:u(v),target:r.ctrlKey||r.metaKey?"_blank":null!=b?b:"_blank"},w.analyticsDispatcher.sendEvent({cardInstanceId:i,cardViewState:n.navigationStack.items.length?"subview":"topview",eventName:Ft,properties:Object.assign({linkMethod:"url",url:a.url,trigger:"linkButton"},S.subviewId?Object.assign(Object.assign({},S),{subviewLevel:1}):{})}),"_top"===a.target&&k){const e=`${t}-link-button`;return k.addEventListener("message",(t=>{if(t.data.type===Ns.ANALYTICS_EVENT){var n;const r=null===(n=t.data)||void 0===n?void 0:n.eventQueued;r.eventName===Ft&&r.cardInstanceId===i&&k&&a&&(k.removeEventListener(e),window.open(a.url,a.target))}}),e)}return window.open(a.url,a.target)}return e.handleLinkButtonPress(i,S,o,s)}))},urlLink:v?{url:u(v),target:b}:void 0})},submitButton:e=>{let{nodeKey:t,index:n,localIndex:r,cardInstanceId:i,subviewId:a,subviewTitle:s,isWorkflow:l,theme:d,attributes:{name:c,text:u,appearance:p,icon:m,iconUrl:g,iconAltText:f,values:v,url:b,action:S,target:w},variableResolver:x}=e;const[k,C]=h(!1),O=y(Vi),M=O.cardEventDispatcher,I=O.authTokenProvider,N=O.analyticsDispatcher,F=O.runtimeVariableResolver;return(0,o.h)(wl,{nodeKey:t,index:n,localIndex:r,theme:d,appearance:p,isWorkflow:l,text:x(u),icon:m,iconUrl:g,iconAltText:f,clickHandler:e=>{const t=be().getState();return()=>bl(void 0,void 0,void 0,(function*(){var n,r;if(t.application.isPreview)return void e.finishSubview();if(k)return;C(!0);const o=t.cardFeed.cardInstances.find((e=>e.instance.id===i));S&&F&&o&&(yield yl(F,t.application.runtimeVariableResolutionTimeout,o,S));let d={};var u,p;l?(e.validateCurrentSubview(i),d=a&&null!==(n=null===(u=be().getState().validationStates[i])||void 0===u||null===(p=u.subviews)||void 0===p?void 0:p[a])&&void 0!==n?n:{}):(e.validateCardTopLevel(i),d=null!==(r=be().getState().validationStates[i].validations)&&void 0!==r?r:{});const h=be().getState(),m=(e=>!!e.navigationStack.items.length)(t);(e=>{for(var t in e)if("invalid"===e[t].type)return!1;return!0})(d)&&(yield gl(h,e,i,m,M,N,I,v,{postSubmissionUrl:b?{url:x(b),target:w}:void 0,payload:S,subviewData:{subviewId:a,subviewTitle:s},submitButtonName:c,cancelSubmitCallback:()=>C(!1)}),l&&N.sendEvent({cardInstanceId:i,cardViewState:"subview",eventName:Ht,properties:{subviewId:a,subviewTitle:s,subviewLevel:1}})),C(!1)}))},loading:k,type:"submit"})},dismissButton:e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:i,attributes:a,theme:s,cardInstanceId:l,variableResolver:d}=e;const{text:c,icon:u,iconUrl:p,iconAltText:h,appearance:m}=a,g=y(Vi);return(0,o.h)(wl,{nodeKey:t,index:n,localIndex:r,theme:s,appearance:m,isWorkflow:i,text:d(c),icon:u,iconUrl:p,iconAltText:h,clickHandler:e=>()=>{ml(be().getState(),e,l,g.cardEventDispatcher,g.authTokenProvider,"card-button")}})},snoozeButton:e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:i,attributes:a,theme:s,cardInstanceId:l,cardMetadata:d,variableResolver:c}=e;const{text:u,icon:p,iconUrl:h,iconAltText:m,snoozePeriod:g,appearance:f}=a,v=y(Vi);return(0,o.h)(wl,{nodeKey:t,index:n,localIndex:r,theme:s,appearance:f,isWorkflow:i,text:c(u),icon:p,iconUrl:h,iconAltText:m,clickHandler:e=>()=>{if(void 0===g||null===xp(g))e.requestSnooze(l,"card-button",null==d?void 0:d.expires);else{const t=kp(g,new Date);(0,le.isPast)(t)||fl(be().getState(),e,l,t,v.cardEventDispatcher,v.authTokenProvider,"card-button")}}})},voteUpButton:e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:i,attributes:a,theme:s,cardInstanceId:l,variableResolver:d}=e;const{text:c,icon:u,iconUrl:p,iconAltText:h,appearance:m}=a,g=y(Vi);return(0,o.h)(wl,{nodeKey:t,index:n,localIndex:r,theme:s,appearance:m,isWorkflow:i,text:d(c),icon:u,iconUrl:p,iconAltText:h,clickHandler:e=>()=>{vl(l,e,g.analyticsDispatcher,g.cardEventDispatcher,"card-button")}})},voteDownButton:e=>{let{nodeKey:t,index:n,localIndex:r,isWorkflow:i,attributes:a,theme:s,cardInstanceId:l,variableResolver:d}=e;const{text:c,icon:u,iconUrl:p,iconAltText:h,appearance:m}=a;return(0,o.h)(wl,{nodeKey:t,index:n,localIndex:r,theme:s,appearance:m,isWorkflow:i,text:d(c),icon:u,iconUrl:p,iconAltText:h,clickHandler:e=>()=>{e.requestFeedback(l,{sentiment:"negative",source:"card-button",textFeedback:!0})}})},actionButtonGroup:e=>{var t,n,r,i,a,s,l,d;let{children:c,theme:u,feedOrientation:p,isWorkflow:h,isFirstCardNode:m,subviewId:f}=e;const b=v(null),S=u.getShape("buttonLayout.global"),y=u.getShape("buttonWidth.global"),w=u.getShape("buttonAlignment.global"),x=h?["button","buttonSecondary"]:["action","actionSecondary"],k=Math.max(...x.map((e=>u.getShadowVerticalExtent(e))));if(g((()=>{var e;if("horizontal"!==S||"fillsContainer"===y||!b.current)return;const t=null===(e=b.current)||void 0===e?void 0:e.base;"right"===w?t.scrollLeft=t.scrollWidth-t.clientWidth:"center"===w&&(t.scrollLeft=Math.round((t.scrollWidth-t.clientWidth)/2))}),[f]),!c||!c.length)return null;const C=null!==(t=u.getShape("buttonSpacingAfter.global",{skipFallback:!0}))&&void 0!==t?t:"10px",O={top:u.getHorizontalRule("buttonGroupTop"),between:u.getHorizontalRule("buttonGroupBetween"),bottom:u.getHorizontalRule("buttonGroupBottom")},M=u.getShape("padding.elementBottom",{skipFallback:!0}),I={containerPadding:h?u.getNumericalPadding("stream"):u.getNumericalPadding("card"),containerHorizontalPaddingFallback:h?ke:we,containerVerticalPaddingFallback:h?ke:xe,buttonGroupPadding:u.getNumericalPadding("buttonGroup"),buttonGroupVerticalPaddingFallback:null!==(n=Fn(M))&&void 0!==n?n:Ce};let N="0px";if(void 0!==I.buttonGroupPadding.bottom){const e=null!==(r=I.containerPadding.bottom)&&void 0!==r?r:I.containerVerticalPaddingFallback;N=I.buttonGroupPadding.bottom>e?`-${I.buttonGroupPadding.bottom-e}px`:(null!==(i=I.containerPadding.bottom)&&void 0!==i?i:I.containerVerticalPaddingFallback)-I.buttonGroupPadding.bottom+"px"}return(0,o.h)(o.Fragment,null,(null===(s=O.top)||void 0===s?void 0:s.enabled)&&(0,o.h)(Un,{theme:u,ruleStyles:O.top,isSubview:h,translateY:`${null!==(a=I.buttonGroupPadding.top)&&void 0!==a?a:m?0:I.buttonGroupVerticalPaddingFallback}px`}),(0,o.h)(Qu,{ref:b,theme:u,paddingValues:I,isFirstCardNode:m,feedOrientation:p,buttonLayout:S,buttonWidth:y,shadowVerticalExtent:k,ruleBetween:(null===(l=O.between)||void 0===l?void 0:l.enabled)&&"horizontal"!==S},"horizontal"===S?(0,o.h)(Ju,{buttonAlignment:w,spaceBetweenButtons:C,fillsContainer:"fillsContainer"===y},c):c),(null===(d=O.bottom)||void 0===d?void 0:d.enabled)&&(0,o.h)(Un,{theme:u,isSubview:h,ruleStyles:O.bottom,translateY:N}))},cardDescription:e=>{var t,n,r,i,a,s,l,d,c,u,p;let{nodeKey:m,isFirstCardNode:f,isFinalCardNode:b,attributes:{text:y,subText:w,elementsOrder:x=["text","subText"],icon:k,iconUrl:C,iconAltText:O,iconAttributes:M},theme:I,variableResolver:N}=e;const F=I.getCSSFontProperties("category"),L=I.getNumericFontSize("category"),T=null!==(t=I.getCSSFontProperties("categorySubText",{skipFallback:!0}))&&void 0!==t?t:I.getCSSFontProperties("category");F.textAlign="left",T&&(T.textAlign="left");const A=null!==(n=x[0])&&void 0!==n?n:"text",j=I.getCSSColor("icon.category",{skipFallback:!0}),_=I.getCSSColor("icon.category"),E=null!==(r=I.getShape("padding.categoryTextsIconSpacing",{skipFallback:!0}))&&void 0!==r?r:"0px",D=I.getShape("padding.categoryTextsSpacing",{skipFallback:!0}),H=I.getShape("border.categoryIcon",{skipFallback:!0}),P=v(null),R=v(null),$=v(null),[B,V]=h(0),[z,W]=h(1),[U,q]=h(!1);g((()=>{document.fonts.ready.then((()=>q(!0)))}),[]);const Y=!(!k&&!C),Z=!!y,K=!!w,G=Z||K,X=null==M?void 0:M.displaySize,Q=("matchTextBlockHeight"!==X||G)&&null!=X?X:"matchHeaderHeight";g((()=>{var e;if(!Y||!("matchTextBlockHeight"===Q||"fixedSize"===Q))return;const t=null===(e=$.current)||void 0===e?void 0:e.base;if(!t)return;const n=()=>{const e=t.offsetWidth;e>0&&V(e)};n();const r=new ResizeObserver((()=>{n()}));return r.observe(t),()=>{r.disconnect()}}),[Y,Q]);const J=null!==(i=N(y))&&void 0!==i?i:"",ee=null!==(a=N(w))&&void 0!==a?a:"",te=F.textTransform,ne=null==T?void 0:T.textTransform,re=Nu(J,te),ie=Nu(ee,ne),oe=Iu(F.fontSize,F.fontFamily,F.fontWeight,F.fontStyle),ae=F.lineHeight?parseFloat(F.lineHeight):null!=L?L:20,se=T?Iu(T.fontSize,T.fontFamily,T.fontWeight,T.fontStyle):void 0,le=(null==T?void 0:T.lineHeight)?parseFloat(T.lineHeight):void 0,de=parseFloat(E)||0,ce=H?parseFloat(H):0,ue=D?parseFloat(D):0,pe=S((()=>"matchTextBlockHeight"!==Q||B<=0||!re&&!ie||!U?null:!re&&ie&&se&&le?Mu({containerWidth:B,iconSpacing:de,headerText:ie,headerFont:se,headerLineHeight:le,textsSpacing:0,initialSize:le}):re?Mu({containerWidth:B,iconSpacing:de,headerText:re,headerFont:oe,headerLineHeight:ae,subText:ie||void 0,subTextFont:se,subTextLineHeight:le,textsSpacing:ue,initialSize:ae}):null),[Q,B,re,ie,oe,ae,se,le,de,ue,U]),he="fixedSize"===Q&&B>0?Math.max(0,.9*(B-de)):1/0,me=Math.max(0,"fixedSize"===Q?Math.min(null!==(l=null!==(s=null==M||null===(p=M.dimension)||void 0===p?void 0:p.height)&&void 0!==s?s:L)&&void 0!==l?l:20,he):"matchTextBlockHeight"===Q?null!==(c=null!==(d=null!=pe?pe:le)&&void 0!==d?d:L)&&void 0!==c?c:20:ae),ge=Math.max(0,me-2*ce);g((()=>{if(!Y||ge<=0)return void W(1);if(!!k&&!C){const e=Rn[k];if(e){const t=document.createElement("canvas").getContext("2d");if(t){t.font=`900 ${ge}px 'Font Awesome 5 Free'`;const n=t.measureText(e).width;return void W(n>ge?ge/n:1)}}}if(R.current){const e=R.current.firstElementChild;if(e){const t=e.scrollWidth,n=e.scrollHeight,r=Math.max(t,n);W(r>ge?ge/r:1)}}}),[Y,me,k,C,U]);const fe="matchHeaderHeight"===Q?"top":null!==(u=null==M?void 0:M.alignment)&&void 0!==u?u:"center",ve="matchHeaderHeight"===Q&&K&&(!Z||"subText"===A),be=ve&&(le||0)>me?((le||0)-me)/2:0,Se=ve&&me>(le||0)?(me-(le||0))/2:0,ye=Lp({elementName:"card title",label:[N(y),N(w)],iconAltText:O,hasIcon:Y}),we=Z?(0,o.h)(Tu,{"data-testid":"category-text"},N(y)):null,xe=K?(0,o.h)(Au,{theme:I,fontProperties:T,"data-testid":"category-subtext"},N(w)):null,ke=x.map((e=>"text"===e?we:xe)).filter(Boolean),Ce=z<1?Math.round(ge*z):ge,Oe=Y?(0,o.h)(ju,{theme:I,iconSpacing:E,iconAlignment:fe,iconSize:me,iconVerticalOffset:be,"data-testid":"category-icon-wrapper"},(0,o.h)("span",{ref:R,style:{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100%"}},(0,o.h)(zn,{iconName:k,iconUrl:C,size:Ce,color:null!==j?j:void 0,fallbackColor:_,scaleToFit:!0,styles:{alignSelf:"top"===fe?"flex-start":"center",lineHeight:"matchHeaderHeight"===Q?ae:`${ge}px`,width:`${ge}px`,maxWidth:`${ge}px`,maxHeight:`${ge}px`,textAlign:"center"}}))):null;return(0,o.h)(Lu,{ref:$,theme:I,fontProperties:F,"data-testid":"card-category",isFirstCardNode:f,isFinalCardNode:b,iconAlignment:fe},Oe,G&&(0,o.h)("span",Fu({ref:P,role:"text",key:m,"data-testid":"category-text-block"},ye?{"aria-label":ye}:{},{style:Object.assign(Object.assign({display:"flex",flexDirection:"column",overflow:"hidden"},D?{gap:D}:{}),Se>0?{marginTop:`${Se}px`}:{})}),ke))},headline:e=>{var t,n;let{nodeKey:r,isFirstCardNode:i,isFinalCardNode:a,attributes:{text:s,icon:l,iconUrl:d,iconAltText:c,appearance:u},theme:p,variableResolver:h}=e;const m=Tn(u),g=p.getCSSFontProperties(`headline${m}`),f=p.getNumericFontSize(`headline${m}`),v=p.getCSSColor(`icon.headline${m}`,{skipFallback:!0}),b=p.getCSSColor(`icon.headline${m}`),S=!(!l&&!d),y=null===(n=g)||void 0===n?void 0:n.textAlign,w=S&&"center"!==y&&"right"!==y,x=(e=>"h2"===e?"Secondary":"h3"===e?"Tertiary":"Primary")(u),k=`${x} Heading. ${w?Lp({elementName:"card headline",label:h(s),iconAltText:c,hasIcon:!0}):h(s)}.`;return(0,o.h)(Ol,{theme:p,appearance:u,isFirstCardNode:i,isFinalCardNode:a,headlineFontProperties:g},w&&(0,o.h)(zn,{iconName:l,iconUrl:d,size:null!=f?f:20,color:null!==v?v:void 0,fallbackColor:b,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null==g?void 0:g.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${f}px`,minWidth:`${f}px`,textAlign:"center"}}),(0,o.h)(Ml,{key:r,theme:p,appearance:u,"data-testid":"card-headline","data-element-key":r,"aria-label":k},h(s)))},text:e=>{var t,n,r,i,a,s,l,d;let{nodeKey:c,isFirstCardNode:u,isFinalCardNode:p,theme:m,attributes:{icon:f,iconUrl:b,iconAltText:S,text:w,clickToExpandEnabled:x,maxDisplayLines:k,showTextLabel:C,hideTextLabel:O,appearance:M},isWorkflow:I,variableResolver:N,cardInstanceId:F,subviewId:L,subviewTitle:T}=e;const A=v(null),j=v(null),[_,E]=h(!1),[D,H]=h(null),[P,R]=h(null),[$,B]=h(wd().matches?"dark":"light"),V=v(ae()),z=v(!1),W=null===(r=A.current)||void 0===r?void 0:r.base.querySelector(`#expand-text-${V.current}`),U=null===(i=A.current)||void 0===i?void 0:i.base.querySelector(`#collapse-text-${V.current}`),q=Dl(bp(N(w))),Y=y(Vi).analyticsDispatcher,Z=Ln(M);let K;Np(m.getCSSFontProperties(`body${Z}`))||(K=m.getCSSFontProperties(`body${Z}`));const G=m.getNumericFontSize(`body${Z}`),X=Object.assign(Object.assign(Object.assign({},L&&{subviewId:L}),T&&{subviewTitle:T}),L&&{subviewLevel:1}),Q=null===(a=K)||void 0===a?void 0:a.textAlign,J="center"===Q||"right"===Q,ee=null===(s=yd(q).firstElementChild)||void 0===s?void 0:s.tagName.toLowerCase(),te=!(!f&&!b)&&(!J||("ul"===ee||"ol"===ee)),ne=m.getCSSColor(`icon.body${Z}`,{skipFallback:!0}),re=m.getCSSColor(`icon.body${Z}`),ie=An(M);let oe;oe=te&&S?`${ie} text block. With an icon, ${S}.`:te?`${ie} text block. With an icon.`:`${ie} text block.`;const se=()=>{if(!(A.current&&j.current&&k&&x))return H(null),E(!1),R(!1);const e=j.current.base;e.innerHTML="";const t=getComputedStyle(A.current.base),n=parseFloat(t.lineHeight),r=parseFloat(t.fontSize),i=Math.ceil((isNaN(n)?r:n)*k),o=document.createElement("div");o.innerHTML=q;const a=Array.from(o.children);let s=!1;for(let t=0;t<a.length;t++){e.appendChild(a[t]);const n=Math.ceil(e.getBoundingClientRect().height);if(n<i)continue;const r=t<a.length-1;if(n===i&&r){s=Od(a[t],e,i,V.current,m,C,M);break}if(n>i){s=Od(a[t],e,i,V.current,m,C,M),!s&&t>0&&(a[t].remove(),s=Od(a[t-1],e,i,V.current,m,C,M));break}}s?(H(e.innerHTML),R(!0)):R(!1)};g((()=>{let e;if(x){const t=()=>{se()};document.fonts.onloadingdone=t,"ResizeObserver"in window&&(e=new ResizeObserver(se),e.observe(document.body))}const t=e=>{B(e.matches?"dark":"light")};return wd().addEventListener("change",t),()=>{var n;null===(n=e)||void 0===n||n.disconnect(),document.fonts.onloadingdone=null,wd().removeEventListener("change",t)}}),[q]),g(se,[q,k,x,$,C,O,M]),g((()=>{var e;z.current&&(null===(e=A.current)||void 0===e?void 0:e.base)&&(A.current.base.focus(),z.current=!1)}),[_]),g((()=>{const e=()=>{z.current=!0,E(!0)},t=()=>{z.current=!0,E(!1)},n=A.current.base;if(!n)return;const r=n.querySelector(`#expand-text-${V.current}`),i=n.querySelector(`#collapse-text-${V.current}`);return r&&r.addEventListener("click",e),i&&i.addEventListener("click",t),()=>{r&&r.removeEventListener("click",e),i&&i.removeEventListener("click",t)}}),[W,U,D,_,P]),g((()=>{const e=document.querySelector(`#markdown-${V.current}`);if(e){Array.from(e.querySelectorAll(".md-subview-link")).forEach((e=>{e.addEventListener("click",(()=>{var t;E(!1),R(!1),H(null),Je().handleSubviewLinkPress(F,null==e||null===(t=e.dataset)||void 0===t?void 0:t.subviewId)})),e.addEventListener("keydown",(t=>{var n;Yr(t.key)===Wr&&(E(!1),R(!1),H(null),Je().handleSubviewLinkPress(F,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;Y.sendEvent({cardInstanceId:F,cardViewState:I?"subview":"topview",eventName:Ft,properties:Object.assign({linkMethod:"url",url:null!=n?n:"",detail:"textLink"},X)})}))}))}}),[q,P,_]);const le=e=>{const t=yd(e),n=t.querySelector("p, li");if(n){const e=document.createElement("span");e.setAttribute("data-sr-prefix","true"),e.style.cssText="position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0;",e.textContent=oe.trimEnd()+" ",n.insertBefore(e,n.firstChild)}return t.innerHTML};return(0,o.h)(o.Fragment,null,(0,o.h)(Sd,{key:c,appearance:M,isFirstCardNode:u,isFinalCardNode:p,theme:m,bodyFontProperties:K,"data-element-key":c,"data-testid":"text-block"},te&&(0,o.h)(zn,{iconName:f,iconUrl:b,size:null!=G?G:20,color:null!==ne?ne:void 0,fallbackColor:re,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(t=null===(l=K)||void 0===l?void 0:l.lineHeight)&&void 0!==t?t:"initial",marginRight:"10px",width:`${G}px`,minWidth:`${G}px`,textAlign:"center"}}),(0,o.h)(fd,{id:`markdown-${V.current}`,"data-testid":"text-markdown",theme:m,appearance:M,ref:A,tabIndex:P?-1:void 0,dangerouslySetInnerHTML:{__html:q&&0!==q.length&&null!==P?le(_||!D?function(e,t,n,r){if(!t||!n||!r)return e;const i=n.cloneNode(!0);i.innerHTML=e;const o=document.createTreeWalker(i,NodeFilter.SHOW_TEXT),a=[];let s=null;for(;s=o.nextNode();){var l;s&&(null===(l=s.textContent)||void 0===l?void 0:l.trim())&&a.push(s)}if(a.length>0){const e=a[a.length-1],t=e.parentElement;"a"===(null==t?void 0:t.tagName.toLowerCase())&&t.parentElement?(r.style.paddingLeft="5px",t.parentElement.insertBefore(r,t.nextSibling)):(e.textContent=e.textContent+" ",null==t||t.appendChild(r))}return i.innerHTML}(q,P,null===(de=j.current)||void 0===de?void 0:de.base,kd(null!=O?O:"Show less",m,"collapse",`collapse-text-${V.current}`,(null===(ce=A.current)||void 0===ce?void 0:ce.base.getBoundingClientRect().width)+"px",M)):D):"<p></p>"}})),(0,o.h)(vd,{bodyFontProperties:K,isWorkflow:I,"aria-hidden":"true"},te&&(0,o.h)(zn,{iconName:f,iconUrl:b,size:null!=G?G:20,color:null!==ne?ne:void 0,fallbackColor:re,styles:{gridArea:"1",alignSelf:"center",lineHeight:null!==(n=null===(d=K)||void 0===d?void 0:d.lineHeight)&&void 0!==n?n:"initial",marginRight:"10px",width:`${G}px`,minWidth:`${G}px`,textAlign:"center"}}),(0,o.h)(bd,{theme:m,appearance:M,ref:j})));var de,ce},list:e=>{let t,{nodeKey:n,isFirstCardNode:r,isFinalCardNode:i,attributes:{type:a,appearance:s},children:l,theme:d}=e;switch(a){case"bullet":t=Ll;break;case"number":t=Tl;break;case"comma":t=Al}return t?(0,o.h)(t,{key:n,"data-element-key":n,theme:d,appearance:s,isFirstCardNode:r,isFinalCardNode:i,"aria-label":`${An(s)} list`},l):null},listItem:e=>{let{nodeKey:t,attributes:{text:n,icon:r},theme:i,isWorkflow:a,variableResolver:s,cardInstanceId:l,subviewId:d,subviewTitle:c}=e;const u=v(ae()),p=y(Vi).analyticsDispatcher,h=Dl(bp(s(n))),m=Object.assign(Object.assign(Object.assign({},d&&{subviewId:d}),c&&{subviewTitle:s(c)}),d&&{subviewLevel:1});let f;g((()=>{const e=document.querySelector(`#markdown-${u.current}`);if(e){Array.from(e.querySelectorAll(".md-subview-link")).forEach((e=>{const t=()=>{var t,n;Je().handleSubviewLinkPress(l,null==e||null===(t=e.dataset)||void 0===t?void 0:t.subviewId),d&&(null==e||null===(n=e.dataset)||void 0===n?void 0:n.subviewId)!==d&&p.sendEvent({cardInstanceId:l,cardViewState:"subview",eventName:Ht,properties:m})};e.addEventListener("click",t),e.addEventListener("keydown",(e=>{Yr(e.key)===Wr&&t()}))}));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;p.sendEvent({cardInstanceId:l,cardViewState:a?"subview":"topview",eventName:Ft,properties:Object.assign({linkMethod:"url",url:null!=n?n:"",detail:"textLink"},m)})}))}))}}),[h]),Np(f)||(f=i.getCSSFontProperties("bullet"));const b=i.getCSSColor("icon.bullet",{skipFallback:!0}),S=i.getCSSColor("icon.bullet");return(0,o.h)(Pl,{key:t,"data-element-key":t,class:r?"with-icon":"without-icon"},r&&(0,o.h)(zn,{iconName:r,size:f?f.fontSize:20,color:null!==b?b:void 0,fallbackColor:S,styles:{lineHeight:f?f.lineHeight:"initial",marginRight:"10px",width:"22px",minWidth:"22px",textAlign:"center"}}),(0,o.h)(Rl,{id:`markdown-${u.current}`,theme:i,"data-testid":"list-item-text",dangerouslySetInnerHTML:{__html:h}}))},image:e=>{let t,{nodeKey:n,cardInstanceId:r,subviewId:i,subviewTitle:a,theme:s,isFirstCardNode:l,isFinalCardNode:d,attributes:{format:c,thumbnailSrc:u,description:p,label:h,src:m,dimensions:g,altText:f,behaviour:v,url:b,target:w,layoutId:x,payload:k},variableResolver:C}=e;const O=y(Vi),M=O.containersBroadcastChannel;switch(c){case"inline":t=Ql;break;case"banner":t=Kl;break;case"thumbnail":t=Yl;break;case"text":t=td}const I=m&&m.length>0?"image":"imageWithoutSrc";return t?(0,o.h)(Ze.lj,{actions:(0,Q.Y2)(Ke,yt),mapToProps:e=>({customStrings:e.application.customStrings})},(e=>{const c=S((()=>{switch(v){case"url":return b?e=>{e.preventDefault();const t={url:C(b),target:e.ctrlKey||e.metaKey?"_blank":null!=w?w:"_blank"};if(O.analyticsDispatcher.sendEvent({cardInstanceId:r,cardViewState:i?"subview":"topview",eventName:Ft,properties:Object.assign({linkMethod:"url",url:t.url,trigger:"image"},i?{subviewId:i,subviewTitle:a,subviewLevel:1}:{})}),"_top"===t.target&&M){const e=`${n}-image-link`;return M.addEventListener("message",(n=>{if(n.data.type===Ns.ANALYTICS_EVENT){var i;const o=null===(i=n.data)||void 0===i?void 0:i.eventQueued;o.eventName===Ft&&o.cardInstanceId===r&&M&&t&&(M.removeEventListener(e),window.open(t.url,t.target))}}),e)}return window.open(t.url,t.target)}:()=>{ue.error({level2:[`url type image link for card: ${r} has no url`]})};case"subview":return x?()=>{e.handleImageLinkPress(r,{layoutId:x,currentSubviewId:i,currentSubviewTitle:a})}:()=>{ue.error({level2:[`subview type image link for card: ${r} has no subview id`]})};case"payload":return k?()=>{e.handleImageLinkPress(r,{payload:k,currentSubviewId:i,currentSubviewTitle:a})}:()=>{ue.error({level2:[`payload type image link for card: ${r} has no payload`]})};case"none":return;default:return()=>{e.viewMedia(r,Object.assign({type:I,url:C(m),title:C(h)},(null==f?void 0:f.src)?{alt:C(f.src)}:{}))}}}),[v,r,M]);return(0,o.h)(t,{nodeKey:n,mediaType:I,theme:s,isFirstCardNode:l,isFinalCardNode:d,customStrings:e.customStrings,src:C(u),dimensions:g,url:b,label:C(h),description:C(p),alt:C(null==f?void 0:f.thumbnailSrc),onClickImage:c})})):null},video:e=>{let{nodeKey:t,cardInstanceId:n,attributes:r,theme:i,isFirstCardNode:a,isFinalCardNode:s,isWorkflow:l,variableResolver:d}=e;const[c,u]=h(!1),[p,m]=h(void 0);return c?(0,o.h)(hd,{nodeKey:t,cardInstanceId:n,isWorkflow:l,format:r.format,src:d(r.src),thumbnailSrc:d(r.thumbnailSrc),dimensions:r.dimensions,loadedDimensions:p,theme:i,isFirstCardNode:a,isFinalCardNode:s,label:d(r.label),description:d(r.description)}):(0,o.h)(pd,{nodeKey:t,cardInstanceId:n,isWorkflow:l,format:r.format,src:d(r.src),thumbnailSrc:d(r.thumbnailSrc),dimensions:r.dimensions,onLoad:m,theme:i,isFirstCardNode:a,isFinalCardNode:s,label:d(r.label),description:d(r.description),altText:{src:d(null===(g=r.altText)||void 0===g?void 0:g.src),thumbnailSrc:d(null===(f=r.altText)||void 0===f?void 0:f.thumbnailSrc)},setPlaying:u});var g,f},form:e=>{let{cardInstanceId:t,subviewId:n,attributes:{defaultValues:r},theme:i,isWorkflow:a,feedOrientation:s,children:l}=e;return(0,o.h)(Ze.lj,{actions:yt,mapToProps:()=>{}},(e=>(0,o.h)(kl,{theme:i,isWorkflow:a,feedOrientation:s,initializeFormStore:Cl(e,t,r,n)},l)))},textInput:ds,numberInput:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{format:i,defaultValue:a,thumbnailSrc:s,thumbnailAltText:l,placeholder:d,name:c,label:u},theme:p,isFinalCardNode:m,validations:f,variableResolver:b}=e;const S=v(null),y=v(a&&pp(a.toString())?a.toString():""),w=`number-input-${n}-${c}`,[x,k]=h(y.current);g((()=>{const e=It(n,c,r);if(e)y.current=e.toString(),k(e.toString());else{const e=pp(x);Mt().handleFormChange(n,c,null!=e?e:void 0,r)}}),[]),g((()=>{const e=a&&pp(a.toString())?a.toString():"";if(e!==y.current){if(x===y.current){const t=pp(e);Mt().handleFormChange(n,c,null!=t?t:void 0,r),k(e)}y.current=e}}),[a]);const C=b(d);return(0,o.h)(Ze.lj,{actions:yt,mapToProps:()=>{}},(e=>(0,o.h)(o.Fragment,null,(0,o.h)(fa,{nodeKey:t,mode:i,label:b(u),labelFor:w,theme:p,isFinalCardNode:m,clickableLabel:!1,onClick:()=>{var e,t;null===(e=S.current)||void 0===e||null===(t=e.base)||void 0===t||t.focus()}},s&&(0,o.h)(ba,{thumbnailUrl:b(s),altText:null!=l?l:"",theme:p}),(0,o.h)(Eu,{mode:i},u&&i===sa&&(0,o.h)(pa,{theme:p,mode:i,name:w},b(u)),(0,o.h)(os,{theme:p,mode:i,id:w,ref:S,placeholder:C,value:x,title:C,className:"input-number",inputmode:"decimal",onInput:t=>{const{value:i}=t.target,o=x;let a;k(i),a=mp(i)?i.trim():o,k(a);const s=pp(a);((e,t)=>{null!==_u&&(clearTimeout(_u),_u=null),_u=setTimeout((()=>{t(n,c,null!=e?e:void 0,f,r)}),200)})(s,e.validateField),e.handleFormChange(n,c,null!=s?s:void 0,r)}}))),(0,o.h)(wa,{name:c,cardInstanceId:n,subviewId:r,theme:p,isFinalCardNode:m,variableResolver:b}))))},stepper:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{format:i,defaultValue:a,minimumValue:s,maximumValue:l,stepValue:d,thumbnailSrc:c,thumbnailAltText:u,label:p,name:m},validations:f,theme:b,isFinalCardNode:S,variableResolver:y}=e;const w=s||0,x=l||100,k=d&&d>0?d:1,C=v(a&&a>=w&&a<=x?a:w),[O,M]=h(C.current),[I,N]=h(C.current),[F,L]=h(!0),T=b.getCSSColor("icon.stepper"),A=b.getCSSColor("icon.stepperDisabled"),j=null==O||!Ad(O,x,k)||!F,_=null==O||!Td(O,w,k)||!F;g((()=>{const e=It(n,m,r);e?(C.current=e,M(e),N(e)):Mt().handleFormChange(n,m,O,r)}),[]),g((()=>{const e=a&&a>=w&&a<=x?a:w;e!==C.current&&(I===C.current&&(Mt().handleFormChange(n,m,e,r),M(e),N(e)),C.current=e)}),[a]);const E=y(p),D=(e,t)=>{null!==jd&&(clearTimeout(jd),jd=null),jd=setTimeout((()=>{t(n,m,null!=e?e:void 0,f,r)}),400)},H=`stepper-input-${n}-${m}`;return(0,o.h)(Ze.lj,{actions:yt,mapToProps:e=>{let{}=e}},(e=>(0,o.h)(o.Fragment,null,(0,o.h)(fa,{nodeKey:t,mode:null!=i?i:aa,theme:b,isFinalCardNode:S,cursor:"default"},c&&(0,o.h)(ba,{thumbnailUrl:y(c),altText:null!=u?u:"",theme:b}),(0,o.h)(pa,{theme:b,mode:null!=i?i:aa,name:H},E),(0,o.h)(Nd,{theme:b},(0,o.h)(Fd,{theme:b,disabled:_,tabIndex:"0","aria-label":`Decrease value by ${k}`,class:"stepper-decrement",onClick:()=>{if(null==O||!Td(O,w,k)||!F)return;const t=((e,t,n)=>e-t<n?n:e-t)(O,k,w);N(t),M(t),e.handleFormChange(n,m,t,r),D(t,e.validateField)}},(0,o.h)(Id,{fillColor:_?A:T})),(0,o.h)(Ld,{type:"number",theme:b,tabIndex:"0",title:E,className:"stepper-value",onInput:t=>{const{value:i}=t.target,o=I;let a;N(i),a=mp(i)?i.trim():o,L(((e,t,n)=>e>=t&&e<=n)(a,w,x)),N(a);const s=pp(a);M(s),e.handleFormChange(n,m,null!=s?s:void 0,r),D(s,e.validateField)},onBlur:()=>{e.validateField(n,m,O,f,r)},value:I}),(0,o.h)(Fd,{theme:b,disabled:j,tabIndex:"0","aria-label":`Increase value by ${k}`,class:"stepper-increment",onClick:()=>{if(null==O||!Ad(O,x,k)||!F)return;const t=((e,t,n)=>e+t>n?n:e+t)(O,k,x);N(t),M(t),e.handleFormChange(n,m,t,r),D(t,e.validateField)}},(0,o.h)(Md,{fillColor:j?A:T})))),(0,o.h)(wa,{name:m,cardInstanceId:n,subviewId:r,theme:b,isFinalCardNode:S,variableResolver:y}))))},checkbox:e=>{let{nodeKey:t,children:n,cardInstanceId:r,subviewId:i,attributes:{name:a},theme:s,isFirstCardNode:l,isFinalCardNode:d,variableResolver:c}=e;return(0,o.h)(o.Fragment,null,(0,o.h)(ep,{theme:s,isFirstCardNode:l,isFinalCardNode:d,key:t,"data-element-key":t,role:"group"},(0,o.h)(tp,{"aria-label":"checkbox group"},n)),(0,o.h)(wa,{name:a,cardInstanceId:r,subviewId:i,theme:s,isFinalCardNode:d,variableResolver:c}))},checkboxItem:e=>{var t,n;let{nodeKey:r,cardInstanceId:i,subviewId:a,attributes:{label:s,key:l,checked:d},theme:c,variableResolver:u,parentFieldName:p,parentValidations:m}=e;const f=v(d),b=v(`${i}-${l}`),[S,y]=h(null!==(t=f.current)&&void 0!==t&&t),w=null!==(n=c.getCSSColor("icon.checkedCheckbox",{skipFallback:!0}))&&void 0!==n?n:"#FFF";let x;Np(x)||(x=c.getCSSFontProperties("labelInline",{skipFallback:!0})||c.getCSSFontProperties("primary"),parseInt(x.lineHeight)<20&&(x.lineHeight="20px"));const k=e=>{const t=It(i,p,a)||{};return Mt().handleFormChange(i,p,Object.assign(Object.assign({},t),{[l]:e}),a),Object.assign(Object.assign({},t),{[l]:e})};return g((()=>{const e=It(i,p,a);void 0!==e&&void 0!==e[l]?(f.current=e[l],y(e[l])):k(S)}),[]),g((()=>{void 0!==d&&d!==f.current&&(S===f.current&&(y(d),k(d)),f.current=d)}),[d]),(0,o.h)("li",null,(0,o.h)(np,{key:r,"data-element-key":r,labelFontProperties:x,role:"checkbox","aria-labelledby":b.current,"aria-checked":S},(0,o.h)(rp,{type:"checkbox",checked:S,theme:c,onChange:()=>{y(!S);const e=k(!S);Mt().validateField(i,p,e,m,a)},"aria-hidden":"true"}),(0,o.h)(ip,{theme:c,isChecked:S},S&&(0,o.h)(xa,{fillColor:w,style:{position:"absolute",top:"50%",left:"50%",transform:"translate(-50%, -50%)"},ariaHidden:!0})),(0,o.h)(op,{theme:c,id:b.current,"data-testid":"checkbox-label",labelFontProperties:x,"aria-hidden":"true"},u(s))))},switch:e=>{let{nodeKey:t,cardInstanceId:n,subviewId:r,attributes:{format:i,defaultValue:a,thumbnailSrc:s,thumbnailAltText:l,label:d,name:c},theme:u,isFinalCardNode:p,variableResolver:m}=e;const f=v(a),[b,S]=h(f.current);g((()=>{const e=It(n,c,r);void 0!==e?(f.current=e,S(e)):Mt().handleFormChange(n,c,b,r)}),[]),g((()=>{a!==f.current&&(b===f.current&&(Mt().handleFormChange(n,c,a,r),S(a)),f.current=a)}),[a]);const y=`switch-input-${n}-${c}`;return(0,o.h)(Ze.lj,{actions:yt,mapToProps:()=>{}},(e=>(0,o.h)(fa,{nodeKey:t,mode:null!=i?i:aa,theme:u,isFinalCardNode:p},s&&(0,o.h)(ba,{thumbnailUrl:m(s),altText:null!=l?l:"",theme:u}),(0,o.h)(pa,{theme:u,mode:null!=i?i:aa,name:y,truncateLabel:!i||i===aa},m(d)),(0,o.h)(_d,{on:b,theme:u,tabIndex:"0",role:"switch","aria-checked":b,"aria-labelledby":y,className:"switch-toggle",onClick:()=>{S(!b),e.handleFormChange(n,c,!b,r)}},(0,o.h)(Ed,{on:b,theme:u})))))},dropdown:Aa,datePicker:Da,upload:Gu},lp=["linkButton","submitButton","dismissButton","snoozeButton","voteUpButton","voteDownButton"],dp=e=>{let{node:t,cardContext:n,cardInstanceId:r,cardMetadata:i,isWorkflow:a,theme:s,runtimeVariables:l,feedOrientation:d,subviewId:c,subviewTitle:u,embedMode:p,parentNodeType:h,parentFieldName:m,parentValidations:g,index:f,localIndex:v}=e;const b=sp[t.type];if(b){let e=0===f,S=f===n.nodeCount-(1+(n.hasButtonFinalNode?1:0));return a&&(e="form"===h&&0===v,S="form"===h&&v===n.nodeCount-(1+(n.hasButtonFinalNode?1:0))),(0,o.h)(b,ap({},t.key&&{nodeKey:t.key},{isFirstCardNode:e,isFinalCardNode:S,cardInstanceId:r,cardMetadata:i,subviewId:c,subviewTitle:u,attributes:t.attributes,validations:t.validations,isWorkflow:a,theme:s,variableResolver:e=>yp(e,l),feedOrientation:d,embedMode:p,parentNodeType:h,parentFieldName:m,parentValidations:g,index:f,localIndex:null!=v?v:f}),t.children&&t.children.map(((e,d)=>{var h;return(0,o.h)(dp,{cardInstanceId:r,cardMetadata:i,subviewId:c,subviewTitle:u,node:e,index:f,localIndex:d,isWorkflow:a,cardContext:n,theme:s,runtimeVariables:l,embedMode:p,parentNodeType:t.type,parentFieldName:null===(h=t.attributes)||void 0===h?void 0:h.name,parentValidations:t.validations})})))}return null},cp={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"},up=/[&<>"'\/]/g,pp=e=>{if(""===e)return null;const t=Number(e);return Number.isNaN(t)?null:t},hp=e=>{let t;return"string"!=typeof e&&"number"!=typeof e||("string"==typeof e&&(t=null!==pp(e)?pp(e):void 0),"number"==typeof e&&(t=e),void 0!==t&&(t=t>=0?Math.round(t):void 0)),t},mp=e=>null!==pp(e)||""===e||"-"===e,gp=e=>{let t=Array();for(var n in e){const r=e[n];t.push(r),r.children&&(t=t.concat(gp(r.children)))}return t},fp=e=>{const t=[],n=(e,r)=>{const i=[];for(let r=0;r<e.length;r++){var o;const a=e[r];"actionButtonGroup"!==a.type&&a.children&&(null===(o=a.children)||void 0===o?void 0:o.length)>0&&(a.children=n(a.children,a)),lp.includes(a.type)?t.push(a):i.push(a)}if("form"===(null==r?void 0:r.type)){var a;let e=!1;null===(a=r.children)||void 0===a||a.forEach((t=>{"actionButtonGroup"===t.type&&(e=!0)})),!e&&i.push({type:"actionButtonGroup",attributes:{},children:t})}return i};return n(e)},vp=(e,t)=>{const n=e=>{for(let r in e){const i=e[r];"string"==typeof i&&(e[r]=yp(i,t)),"object"==typeof i&&n(i)}},r=e=>{const t=[];for(let o=0;o<e.length;o++){var i;const a=e[o];a.children&&(null===(i=a.children)||void 0===i?void 0:i.length)>0&&(a.children=r(a.children)),a.attributes&&n(a.attributes),t.push(a)}return t};e.defaultView.nodes=r(e.defaultView.nodes);for(let n in e.subviews){const i=e.subviews[n];e.subviews[n].nodes=r(i.nodes),i.title&&(e.subviews[n].title=yp(i.title,t))}},bp=e=>e?e.replace(up,(e=>cp[e]||e)):"",Sp=/!\{([\w\.]+?)\}/g,yp=(e,t)=>e&&t&&"string"==typeof e?e.replace(Sp,((e,n)=>t.get(n)||"")):e||"",wp={years:le.addYears,months:le.addMonths,weeks:le.addWeeks,days:le.addDays,hours:le.addHours,minutes:le.addMinutes,seconds:le.addSeconds},xp=e=>{if("string"!=typeof e)return null;const t=e.match(ye);if(t){const[,,e,n,r,i,o,a,s]=t.map((e=>void 0!==e?Number(e):void 0));return{years:e,months:n,weeks:r,days:i,hours:o,minutes:a,seconds:s}}return null},kp=(e,t)=>{const n=xp(e);return n?Object.entries(wp).reduce(((e,t)=>{let[r,i]=t;const o=n[r];return o?i(e,o):e}),t):t},Cp=e=>!!e.match(/^[\w-]+\.[\w-]+\.[\w-]*$/),Op=e=>{const t=be().getState().application.embedMode;return(null==e?void 0:e.enabled)&&"standalone"===t?"horizontal":"vertical"},Mp=()=>{const e=sessionStorage.getItem(Oe),t=e?JSON.parse(e):void 0;return new Set(t)},Ip=e=>"object"==typeof e&&null!==e&&!Array.isArray(e),Np=e=>e&&Ip(e)&&0===Object.keys(e).length,Fp=(e,t)=>e.length===t.length&&(e.sort(),t.sort(),e.every(((e,n)=>e===t[n]))),Lp=e=>{let{elementName:t,label:n,iconAltText:r,hasIcon:i}=e;const o=e=>e.charAt(0).toUpperCase()+e.slice(1),a=(Array.isArray(n)?n:[n]).filter(Boolean).join(", ");return o(a&&!i||i&&a&&!r?a:i&&a&&r?`${t} with an icon, ${r}, ${a}`:i&&!a&&r?`${t} with an icon, ${r}`:!i||a||r?`${t}.`:`${t} with an icon.`)};const Tp="stream",Ap="single",jp="launcher",_p="horizontal",Ep="modal",Dp=(e,t)=>{if(!e)return null;let n;try{n=(e=>{if(!Cp(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")}})(e)}catch(e){return null}if(t)return n[t]&&["number","string"].includes(typeof n[t])?String(n[t]):null;const r=["atomic_sub","atomic_id","sub","id"];for(const e of r)if(n[e]&&["number","string"].includes(typeof n[e]))return String(n[e]);return null};const Hp=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 Pp=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function Rp(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const $p={noInternet:"AACNoInternetError",missingApiHost:"AACMissingApiHostError",apiError:"AACApiError",invalidParameters:"AACInvalidParametersError",notPermitted:"AACOperationNotPermittedError",authTokenError:"AACAuthTokenError"},Bp="Device is not connected to the internet",Vp="API host was not specified for the request.",zp="An API error occurred.",Wp="Failed to retrieve an authentication token for request.",Up={method:"GET",mode:"cors"},qp=e=>Pp(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}})),Yp=e=>e<400,Zp=(e,t,n,r,i)=>{var o,a;const s=null!==(o=Dp(n,i))&&void 0!==o?o:void 0;Hp("request-failed",{request:{path:e,statusCode:t,streamContainerId:"string"==typeof(null==r?void 0:r.streamContainerId)?null==r?void 0:r.streamContainerId:void 0,streamContainerIds:null==r||null===(a=r.streamContainerIds)||void 0===a?void 0:a.filter((e=>"string"==typeof e)),cardInstanceId:"string"==typeof(null==r?void 0:r.cardInstanceId)?null==r?void 0:r.cardInstanceId:void 0,endUserId:s}})};class Kp{static initialise(e,t,n){this.apiHost=e,this.apiKey=t,this.environmentId=n,this.instanceId=ae()}static reset(){this.apiHost="https://client-api.atomic.io",this.apiKey=void 0,this.environmentId=void 0}static setTestHostHeader(e){this.testHost=e}static setTokenUserIdAttribute(e){this.tokenUserIdAttribute=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 Pp(this,void 0,void 0,(function*(){let i,o;if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Bp);return e.name=$p.noInternet,{response:{error:e}}}{const a=Qp(this.apiHost,e,this.environmentId);if(!a){const e=new Error(Vp);return e.name=$p.missingApiHost,{response:{error:e}}}let s;if(t)try{s=yield t.requestToken()}catch(e){const t=new Error(`${Wp} ${e}`);return t.name=$p.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},Up),{headers:Gp({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,lastModified:n,testHost:this.testHost,clientAppVersion:this.clientAppVersion})});try{const t=yield fetch(a,l);o=t.status;const n=yield qp(t);if(n.json&&(i=n.json),!Yp(t.status))throw Zp(e,o,s,r,this.tokenUserIdAttribute),new Error(`GET request failed with status code ${t.status}.`);return{data:i,response:{status:t.status,etag:t.headers.get("etag")}}}catch(e){const t=new Error(`${zp} ${e}`);return t.name=$p.apiError,{data:i,response:{status:o,error:t}}}}}))}static post(e,t,n,r){return Pp(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Bp);return e.name=$p.noInternet,{response:{error:e}}}{let i,o;const a=Qp(this.apiHost,e,this.environmentId);if(!a){const e=new Error(Vp);return e.name=$p.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${Wp} ${e}`);return t.name=$p.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},Up),{method:"POST",headers:Gp({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(a,l);o=t.status;const n=yield qp(t);if(n.json&&(i=n.json),!Yp(t.status))throw Zp(e,o,s,r,this.tokenUserIdAttribute),new Error(`POST request failed with status code ${t.status}.`);return{data:i,response:{status:t.status}}}catch(e){const t=new Error(`${zp} ${e}`);return t.name=$p.apiError,{data:i,response:{status:o,error:t}}}}}))}static put(e,t,n,r){return Pp(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Bp);return e.name=$p.noInternet,{response:{error:e}}}{let i,o;const a=Qp(this.apiHost,e,this.environmentId);if(!a){const e=new Error(Vp);return e.name=$p.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${Wp} ${e}`);return t.name=$p.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},Up),{method:"PUT",headers:Gp({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(a,l);o=t.status;const n=yield qp(t);if(n.json&&(i=n.json),!Yp(t.status))throw Zp(e,o,s,r,this.tokenUserIdAttribute),new Error(`PUT request failed with status code ${t.status}.`);return{data:i,response:{status:t.status}}}catch(e){const t=new Error(`${zp} ${e}`);return t.name=$p.apiError,{data:i,response:{status:o,error:t}}}}}))}static delete(e,t,n,r){return Pp(this,void 0,void 0,(function*(){if(this.verifyInitialised(),!navigator.onLine){const e=new Error(Bp);return e.name=$p.noInternet,{response:{error:e}}}{let i,o;const a=Qp(this.apiHost,e,this.environmentId);if(!a){const e=new Error(Vp);return e.name=$p.missingApiHost,{response:{error:e}}}let s;if(n)try{s=yield n.requestToken()}catch(e){const t=new Error(`${Wp} ${e}`);return t.name=$p.authTokenError,{response:{error:t}}}const l=Object.assign(Object.assign({},Up),{method:"DELETE",headers:Gp({instanceId:this.instanceId,apiKey:this.apiKey,authToken:s,testHost:this.testHost,clientAppVersion:this.clientAppVersion}),body:JSON.stringify(t)});try{const t=yield fetch(a,l);o=t.status;const n=yield qp(t);if(n.json&&(i=n.json),!Yp(t.status))throw Zp(e,o,s,r,this.tokenUserIdAttribute),new Error(`DELETE request failed with status code ${t.status}.`);return{data:i,response:{status:t.status}}}catch(e){const t=new Error(`${zp} ${e}`);return t.name=$p.apiError,{data:i,response:{status:o,error:t}}}}}))}}Rp(Kp,"apiHost","https://client-api.atomic.io"),Rp(Kp,"apiKey",void 0),Rp(Kp,"environmentId",void 0),Rp(Kp,"instanceId",void 0),Rp(Kp,"testHost",void 0),Rp(Kp,"clientAppVersion","unknown"),Rp(Kp,"tokenUserIdAttribute",void 0);const Gp=e=>Xp("header",Object.assign({},e)),Xp=(e,t)=>{const n="header"===e;let r={"x-atomic-sdk-platform":"Web","x-atomic-sdk-version":"26.2.0","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},Qp=(e,t,n)=>{if(!e||0==e.trim().length)return null;return`${e.endsWith("/")?e:`${e}/`}${n&&n.trim().length>0?`${n}/`:""}${t}`};var Jp=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};const eh=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,le.format)(t,e.defaultFormatterOption||"");default:return String(e.defaultValue)}},th=(e,t,n,r,i,o,a)=>Jp(void 0,void 0,void 0,(function*(){const s=`feed/${e}${a?"?filters="+JSON.stringify(a):""}`,l=yield Kp.get(s,t,r||"",{streamContainerId:e});if(304===l.response.status)return ue.debug({level1:["Feed unchanged response received by HTTP"]}),{};if(200===l.response.status){ue.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 a=yield oh(e,n,i);return{lastModified:l.response.etag,cardInstances:e,metadata:t,unfilteredCardInstanceCount:r,runtimeVariables:a}}return{error:l.response.error}})),nh=(e,t,n,r)=>Jp(void 0,void 0,void 0,(function*(){const i=yield Kp.post("response",{streamContainerId:e,cardInstanceId:t,values:n},r,{streamContainerId:e,cardInstanceId:t});return{ok:i.data&&1==i.data.ok,event:i.data&&i.data.event,error:i.response&&i.response.error}})),rh=(e,t,n)=>Jp(void 0,void 0,void 0,(function*(){const r=yield Kp.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}})),ih=(e,t,n,r)=>Jp(void 0,void 0,void 0,(function*(){const i=yield Kp.post("snooze",{streamContainerId:e,cardInstanceId:t,interval:`PT${Math.max(0,n)}S`},r,{streamContainerId:e,cardInstanceId:t});return{ok:i.data&&!0===i.data.ok,event:i.data&&i.data.event,error:i.response.error}})),oh=(e,t,n)=>Jp(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,eh(e)])))}}));if(r.length){let e=r;if(n){let i=!1;const o=new Promise((e=>{setTimeout((()=>{i||(console.error(`Resolution of runtime variables exceeded the timeout (${t}ms). Falling back to default values.`),e(r))}),t)})),a=r.map((e=>Object.assign(Object.assign({},e),{runtimeVariables:new Map(e.runtimeVariables)})));e=yield Promise.race([o,n(a).then((e=>(i=!0,e)))])}const i=e.reduce(((e,t)=>(r.filter((e=>e.id===t.id)).length>0&&e.set(t.id,t.runtimeVariables),e)),new Map);return{values:i}}return{}})),ah="AtomicStreamContainersTutorialSeen";class sh{static setCardListTutorialSeen(e){const t=this.containersCardListTutorialSeenIn();t.includes(e)||(t.push(e),localStorage.setItem(ah,t.join(",")))}static hasCardListTutorialBeenSeen(e){return this.containersCardListTutorialSeenIn().includes(e)}static containersCardListTutorialSeenIn(){const e=localStorage.getItem(ah);return e?e.split(","):[]}}var lh,dh,ch=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(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?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))};function uh(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}const ph=120,hh=null===(lh=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===lh||null===(dh=lh.dataset)||void 0===dh?void 0:dh.config,mh=hh?JSON.parse(hh):void 0,gh="onpageshow"in window;class fh{constructor(){uh(this,"domListener",void 0),uh(this,"resizeObserver",void 0),uh(this,"messageReceivedCallback",void 0),uh(this,"requestFailedCallback",void 0),uh(this,"resizedCallback",void 0),uh(this,"outsideClickCallback",void 0),uh(this,"keyDownCallback",void 0),uh(this,"containersBroadcastChannel",void 0),uh(this,"variableResolutionRequests",{}),uh(this,"authTokenRequests",{}),uh(this,"lastVariableResolutionRequestId",1),uh(this,"streamContainerId",void 0),uh(this,"feedSubscriptionId",void 0),uh(this,"containerInstanceId",void 0),uh(this,"applicationRef",G.createRef()),uh(this,"subscriptionRetryCount",0),uh(this,"subscriptionRetryLimit",3)}startCardFeed(e){var t;if(!e.apiHost||!e.apiKey||!e.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.");window.AtomicUploadService||(window.AtomicUploadService=window.parent.AtomicUploadService),ue.logLevel=e.logLevel||ce.DISABLED,this.containerInstanceId=e.instanceId,Kp.initialise(e.apiHost,e.apiKey,e.environmentId);const{testHost:n,clientAppVersion:r,tokenUserIdAttribute:i}=e;n&&Kp.setTestHostHeader(n),r&&Kp.setClientAppVersion(r),i&&Kp.setTokenUserIdAttribute(i),this.messageReceivedCallback=this.onMessageReceived.bind(this),this.requestFailedCallback=this.onRequestFailed.bind(this);const a=()=>{this.destroy.bind(this)(),window.removeEventListener("pagehide",a),this.containerInstanceId&&(window.AtomicUploadService.cancelUploadsForContainer(this.containerInstanceId),window.AtomicUploadService.removeFilesForContainer(this.containerInstanceId))},s=()=>{this.initialiseIframeBroadcastChannel(),window.addEventListener("message",this.messageReceivedCallback),window.addEventListener("request-failed",this.requestFailedCallback),window.addEventListener("pagehide",a)};if(gh?window.addEventListener("pageshow",s):s(),"launcher"===e.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("mousedown",this.outsideClickCallback),this.keyDownCallback=this.keyDownHandler.bind(this),document.addEventListener("keydown",this.keyDownCallback)};gh?window.addEventListener("pageshow",e):e()}if(("single-card"===e.embedMode||"standalone"===e.embedMode&&!0===e.autosizeFrame)&&(this.domListener=new MutationObserver((()=>{var t,n;this.autoResizingFrameHandler(e.embedMode,null!==(t=e.horizontalContainerConfig)&&void 0!==t?t:null===(n=e.features)||void 0===n?void 0:n.horizontalContainerConfig)})),document.fonts.onloadingdone=()=>{var t,n;ue.debug({level3:["Font loading completed, resizing frame"]}),this.autoResizingFrameHandler(e.embedMode,null!==(t=e.horizontalContainerConfig)&&void 0!==t?t:null===(n=e.features)||void 0===n?void 0:n.horizontalContainerConfig)},"ResizeObserver"in window)){const t=window.parent.document;t&&(this.resizeObserver=new ResizeObserver((()=>{var t,n;this.autoResizingFrameHandler(e.embedMode,null!==(t=e.horizontalContainerConfig)&&void 0!==t?t:null===(n=e.features)||void 0===n?void 0:n.horizontalContainerConfig)})),this.resizeObserver.observe(t.body))}"modal-subview"===e.embedMode&&(this.domListener=new MutationObserver((()=>{this.modalViewResizeHandler()}))),"toast"===e.embedMode&&(this.domListener=new MutationObserver((()=>{this.toastViewResizeHandler()}))),(null===(t=e.enabledUiElements)||void 0===t?void 0:t.customContainerHeader)&&(e.enabledUiElements.customContainerHeader.headerElement=decodeURI(e.enabledUiElements.customContainerHeader.headerElement)),this.domListener&&this.domListener.observe(document.body,{attributes:!0,childList:!0,characterData:!0,subtree:!0});const l=ve(Object.assign(Object.assign({},e),{cardListTutorialSeen:!e.streamContainerId||sh.hasCardListTutorialBeenSeen(e.streamContainerId)}),[(()=>e=>e=>t=>{const n=e(t);return this.synchroniseStores(),n})()]);this.streamContainerId=e.streamContainerId,(0,o.render)((0,o.h)(Rs,{ref:this.applicationRef,store:l,embedMode:e.embedMode,applyCardFeedDeltaUpdates:this.applyCardFeedDeltaUpdates.bind(this),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),onModalStreamToggled:this.onModalStreamToggled.bind(this),requestWebSocketReconnect:this.requestWebSocketReconnect.bind(this),webSocketDisabled:e.webSocketDisabled}),document.body)}synchroniseStores(){if(this.containersBroadcastChannel){let e=Object.assign({},be().getState());this.containersBroadcastChannel.postMessage({type:Ns.STATE,state:e,instanceId:this.containerInstanceId})}else ue.error({level1:["BroadcastChannel API unavailable"]})}sendMessageToParent(e,t){const n=window.parent;n&&n.postMessage(Object.assign({action:e},t),be().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 ch(this,void 0,void 0,(function*(){const n=be().getState();let r;const i=t.filter((e=>("replace-feed"===e.type&&(r=e),"replace-feed"!==e.type)));if(r){const{instances:t,totalCards:i}=r.data.cardInstances,o=yield oh(t,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this)),a={cardInstances:t,unfilteredCardInstanceCount:t.length,runtimeVariables:o,metadata:{totalCards:i}};e.cardFeedLoaded(a),this.cardCountChanged(a.cardInstances.length,a.metadata.totalCards)}i.length&&(Object.values(n.cardStates).length?e.queueCardFeedDeltaUpdate(i):yield this.applyCardFeedDeltaUpdates(e,i))}))}applyCardFeedDeltaUpdates(e,t){return ch(this,void 0,void 0,(function*(){const n=be().getState();e.clearCardFeedDeltaUpdateQueue(),yield e.applyCardFeedDeltaUpdate(t,(t=>ch(this,void 0,void 0,(function*(){if(t){const t=yield(r=n.application.streamContainerId,i={requestToken:()=>ch(this,void 0,void 0,(function*(){return yield this.onAuthTokenRequested()}))},Jp(void 0,void 0,void 0,(function*(){const e=yield Kp.get(`feed/${r}`,i,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)ue.error({level1:["error retrieving total card count after card feed updated"],level2:[t.error]});else{const{cardCount:n,totalCards:r,lastModified:i}=t;r&&e.updateTotalCardCount(r,i),this.cardCountChanged(n,r)}}var r,i}))),(e=>ch(this,void 0,void 0,(function*(){return yield oh(e,n.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this))}))))}))}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&&sh.setCardListTutorialSeen(this.streamContainerId)}onError(e){this.sendMessageToParent("io.atomic.events.errorReceived",{error:{name:e.name,message:e.message,stack:e.stack}})}onAuthTokenRequested(){const e=ae();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(Wi);return e?Array.from(e.children).reduce(((e,t)=>{const n=t;if(-1!==n.className.indexOf("use-offset")){const t=window.getComputedStyle(n),r=(null==t?void 0:t.paddingTop)?parseFloat(t.paddingTop):0,i=(null==t?void 0:t.paddingBottom)?parseFloat(t.paddingBottom):0;return e+Array.from(n.querySelectorAll(".offset-child")).reduce(((e,t)=>e+t.offsetHeight),0)+r+i}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(Ci);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-ph?window.innerHeight-ph:t,r=60>window.innerHeight-ph?window.innerHeight-ph: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 i;!r.classList.contains("shrink")&&r.classList.add("shrink");const e=null===(i=be().getState().cardFeed.cardInstances)||void 0===i?void 0:i.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 i=this.feedOverflowHeight();e.style.height=`${i}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){Yr(e.key)===Ur&&this.closeLauncher()}onModalStreamToggled(e){this.sendMessageToParent("io.atomic.events.didUpdateModalStreamVisibility",{visible:e}),window.postMessage({action:"updateAppOpen",values:{open:e}},be().getState().application.windowOrigin||"")}closeLauncher(){window.postMessage({action:"updateAppOpen",values:{open:!1}},be().getState().application.windowOrigin||"")}sendAnalyticsEvent(e){var t=arguments;return ch(this,void 0,void 0,(function*(){var n;let r=t.length>1&&void 0!==t[1]&&t[1];this.checkWebSocketConnection();const i=be().getState(),o=i.cardFeed.cardInstances||[],a=o.filter((t=>t.instance.id===e.cardInstanceId)),s=a.length?a[0]:null,l=s?o.indexOf(s)+1:0;let d,c;switch(i.application.embedMode){case"standalone":d=(null===(n=i.cardFeed.horizontalContainerConfig)||void 0===n?void 0:n.enabled)?_p:Tp;break;case"launcher":d=jp;break;case"single-card":d=Ap;break;case"modal-stream":d=Ep;break;default:d=void 0}try{c=yield this.onAuthTokenRequested()}catch(e){ue.error({level1:["Error requesting auth token to send analytics event"],level2:[e]})}const u=Dp(c,Kp.tokenUserIdAttribute);if(!u)return ue.error({level1:["No user ID found in auth token for analytics event: ",e.eventName]});const p=Object.assign(Object.assign({},e),{endUserId:u,cardInstanceStatus:s?s.instance.status:"",containerId:i.application.streamContainerId,timestamp:new Date,streamCardPosition:l,streamLength:i.cardFeed.unfilteredCardInstanceCount,streamLengthVisible:o.length,displayMode:d});this.sendMessageToParent("io.atomic.events.analyticsEventReceived",{event:p,sdkOnlyEvent:r})}))}dispatchCardEvent(e){this.sendMessageToParent("io.atomic.events.cardEventReceived",{event:e,streamContainerId:this.streamContainerId})}onMessageReceived(e){return ch(this,void 0,void 0,(function*(){var t,n;const r=be().getState(),i=r.application.windowOrigin;if(o=i||"",a=e.origin,"*"===o||o===a){const o=(0,Q.kv)((0,Q.Y2)(un,se),be());switch(e.data.action){case"didResolveRuntimeVariables":this.variableResolutionRequests[e.data.values.requestId](e.data.values.cards);break;case"io.atomic.events.requestRuntimeVariables":const a=yield oh(r.cardFeed.cardInstances,r.application.runtimeVariableResolutionTimeout,this.runtimeVariablesRequested.bind(this));o.runtimeVariablesResolved(a);break;case"updateAppOpen":this.onUpdateAppOpen(e),parent.postMessage({action:"io.atomic.events.didUpdateAppOpen",values:{open:e.data.values.open}},i||"");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 d=e.data.values.cardFeedUpdates;this.cardFeedUpdated(o,d);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":ue.logLevel=e.data.values.logLevel;break;case"io.atomic.events.sdkLogout":this.onLogout()}}var o,a}))}onRequestFailed(e){Hp("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 Fs,this.containersBroadcastChannel.addEventListener("message",this.onBroadcastChannelMessageReceived.bind(this)))}onBroadcastChannelMessageReceived(e){if(e.data.type!==Ns.STATE)return;const t=be().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&&be().setState(n))}onLogout(){var e;Kp.reset(),window.removeEventListener("request-failed",this.requestFailedCallback),hn().userLoggedOut(),this.cardCountChanged(0,0),null===(e=this.applicationRef.current)||void 0===e||e.cancelCardListPolling()}destroy(){var e;window.removeEventListener("resize",this.resizedCallback),window.removeEventListener("message",this.messageReceivedCallback),window.removeEventListener("request-failed",this.requestFailedCallback),document.removeEventListener("mousedown",this.outsideClickCallback),document.removeEventListener("keydown",this.keyDownCallback),null===(e=this.resizeObserver)||void 0===e||e.disconnect()}}if(mh)try{(new fh).startCardFeed(mh)}catch(Sh){console.error("Could not initialize IframeManager",Sh)}else console.error("Error starting stream container, invalid config supplied")})(),r=r.default})()));