Free javascript Hosting


cognigy-plugin-adaptivecards.js

Uploaded on Mar 02 2022 15:10 by cweibelbusiness

parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"JE2T":[function(require,module,exports) {
if(!window.__COGNIGY_WEBCHAT)throw new Error("Cognigy Webchat v2.7 or higher has to be loaded before this plugin");module.exports=window.__COGNIGY_WEBCHAT.React;
},{}],"Nl92":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t,e,n,o,i,r,l,a,p,u,c,s,x,d,f,g,y,A=function(){function t(){}return t.Default="default",t.Positive="positive",t.Destructive="destructive",t}();exports.ActionStyle=A,function(t){t[t.Auto=0]="Auto",t[t.Stretch=1]="Stretch",t[t.Small=2]="Small",t[t.Medium=3]="Medium",t[t.Large=4]="Large"}(t=exports.Size||(exports.Size={})),function(t){t[t.Weight=0]="Weight",t[t.Pixel=1]="Pixel"}(e=exports.SizeUnit||(exports.SizeUnit={})),function(t){t[t.Small=0]="Small",t[t.Default=1]="Default",t[t.Medium=2]="Medium",t[t.Large=3]="Large",t[t.ExtraLarge=4]="ExtraLarge"}(n=exports.TextSize||(exports.TextSize={})),function(t){t[t.Lighter=0]="Lighter",t[t.Default=1]="Default",t[t.Bolder=2]="Bolder"}(o=exports.TextWeight||(exports.TextWeight={})),function(t){t[t.Default=0]="Default",t[t.Monospace=1]="Monospace"}(i=exports.FontType||(exports.FontType={})),function(t){t[t.None=0]="None",t[t.Small=1]="Small",t[t.Default=2]="Default",t[t.Medium=3]="Medium",t[t.Large=4]="Large",t[t.ExtraLarge=5]="ExtraLarge",t[t.Padding=6]="Padding"}(r=exports.Spacing||(exports.Spacing={})),function(t){t[t.Default=0]="Default",t[t.Dark=1]="Dark",t[t.Light=2]="Light",t[t.Accent=3]="Accent",t[t.Good=4]="Good",t[t.Warning=5]="Warning",t[t.Attention=6]="Attention"}(l=exports.TextColor||(exports.TextColor={})),function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right"}(a=exports.HorizontalAlignment||(exports.HorizontalAlignment={})),function(t){t[t.Top=0]="Top",t[t.Center=1]="Center",t[t.Bottom=2]="Bottom"}(p=exports.VerticalAlignment||(exports.VerticalAlignment={})),function(t){t[t.Left=0]="Left",t[t.Center=1]="Center",t[t.Right=2]="Right",t[t.Stretch=3]="Stretch"}(u=exports.ActionAlignment||(exports.ActionAlignment={})),function(t){t[t.Default=0]="Default",t[t.Person=1]="Person"}(c=exports.ImageStyle||(exports.ImageStyle={})),function(t){t[t.Inline=0]="Inline",t[t.Popup=1]="Popup"}(s=exports.ShowCardActionMode||(exports.ShowCardActionMode={})),function(t){t[t.Horizontal=0]="Horizontal",t[t.Vertical=1]="Vertical"}(x=exports.Orientation||(exports.Orientation={})),function(t){t[t.Cover=0]="Cover",t[t.RepeatHorizontally=1]="RepeatHorizontally",t[t.RepeatVertically=2]="RepeatVertically",t[t.Repeat=3]="Repeat"}(d=exports.FillMode||(exports.FillMode={})),function(t){t[t.LeftOfTitle=0]="LeftOfTitle",t[t.AboveTitle=1]="AboveTitle"}(f=exports.ActionIconPlacement||(exports.ActionIconPlacement={})),function(t){t[t.Text=0]="Text",t[t.Tel=1]="Tel",t[t.Url=2]="Url",t[t.Email=3]="Email"}(g=exports.InputTextStyle||(exports.InputTextStyle={})),function(t){t[t.Optional=0]="Optional",t[t.Required=1]="Required",t[t.RequiredWithVisualCue=2]="RequiredWithVisualCue"}(y=exports.InputValidationNecessity||(exports.InputValidationNecessity={}));var m,T,C=function(){function t(){}return t.Default="default",t.Emphasis="emphasis",t.Accent="accent",t.Good="good",t.Attention="attention",t.Warning="warning",t}();exports.ContainerStyle=C,function(t){t[t.Hint=0]="Hint",t[t.ActionTypeNotAllowed=1]="ActionTypeNotAllowed",t[t.CollectionCantBeEmpty=2]="CollectionCantBeEmpty",t[t.Deprecated=3]="Deprecated",t[t.ElementTypeNotAllowed=4]="ElementTypeNotAllowed",t[t.InteractivityNotAllowed=5]="InteractivityNotAllowed",t[t.InvalidPropertyValue=6]="InvalidPropertyValue",t[t.MissingCardType=7]="MissingCardType",t[t.PropertyCantBeNull=8]="PropertyCantBeNull",t[t.TooManyActions=9]="TooManyActions",t[t.UnknownActionType=10]="UnknownActionType",t[t.UnknownElementType=11]="UnknownElementType",t[t.UnsupportedCardVersion=12]="UnsupportedCardVersion",t[t.DuplicateId=13]="DuplicateId"}(m=exports.ValidationError||(exports.ValidationError={})),function(t){t[t.FullyInContainer=0]="FullyInContainer",t[t.Overflowing=1]="Overflowing",t[t.FullyOutOfContainer=2]="FullyOutOfContainer"}(T=exports.ContainerFitStatus||(exports.ContainerFitStatus={}));
},{}],"lmhT":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var t=require("./enums"),i=function(){function t(){}return t.setTabIndexAtCardRoot=!0,t}();exports.GlobalSettings=i,exports.ContentTypes={applicationJson:"application/json",applicationXWwwFormUrlencoded:"application/x-www-form-urlencoded"};var e=function(){function t(){this._isProcessed=!1,this._original=null,this._processed=null}return t.prototype.getReferencedInputs=function(t,i){if(!i)throw new Error("The referencedInputs parameter cannot be null.");for(var e=0,n=t;e<n.length;e++){var o=n[e];null!=new RegExp("\\{{2}("+o.id+").value\\}{2}","gi").exec(this._original)&&(i[o.id]=o)}},t.prototype.substituteInputValues=function(t,i){this._processed=this._original;for(var e,n=/\{{2}([a-z0-9_$@]+).value\}{2}/gi;null!=(e=n.exec(this._original));){for(var o=null,r=0,s=Object.keys(t);r<s.length;r++){var a=s[r];if(a.toLowerCase()==e[1].toLowerCase()){o=t[a];break}}if(o){var u="";o.value&&(u=o.value),i===exports.ContentTypes.applicationJson?u=(u=JSON.stringify(u)).slice(1,-1):i===exports.ContentTypes.applicationXWwwFormUrlencoded&&(u=encodeURIComponent(u)),this._processed=this._processed.replace(e[0],u)}}this._isProcessed=!0},t.prototype.getOriginal=function(){return this._original},t.prototype.get=function(){return this._isProcessed?this._processed:this._original},t.prototype.set=function(t){this._original=t,this._isProcessed=!1},t}();exports.StringWithSubstitutions=e;var n=function(){return function(t,i,e,n){void 0===t&&(t=0),void 0===i&&(i=0),void 0===e&&(e=0),void 0===n&&(n=0),this.left=0,this.top=0,this.right=0,this.bottom=0,this.top=t,this.right=i,this.bottom=e,this.left=n}}();exports.SpacingDefinition=n;var o=function(){return function(i,e,n,o){void 0===i&&(i=t.Spacing.None),void 0===e&&(e=t.Spacing.None),void 0===n&&(n=t.Spacing.None),void 0===o&&(o=t.Spacing.None),this.top=t.Spacing.None,this.right=t.Spacing.None,this.bottom=t.Spacing.None,this.left=t.Spacing.None,this.top=i,this.right=e,this.bottom=n,this.left=o}}();exports.PaddingDefinition=o;var r=function(){function i(t,i){this.physicalSize=t,this.unit=i}return i.parse=function(e,n){void 0===n&&(n=!1);var o=new i(0,t.SizeUnit.Weight);if("number"==typeof e)return o.physicalSize=e,o;if("string"==typeof e){var r=/^([0-9]+)(px|\*)?$/g.exec(e),s=n?3:2;if(r&&r.length>=s)return o.physicalSize=parseInt(r[1]),3==r.length&&"px"==r[2]&&(o.unit=t.SizeUnit.Pixel),o}throw new Error("Invalid size: "+e)},i}();exports.SizeAndUnit=r;var s=function(){function t(){}return t.generate=function(){var i=4294967295*Math.random()|0,e=4294967295*Math.random()|0,n=4294967295*Math.random()|0,o=4294967295*Math.random()|0;return t.lut[255&i]+t.lut[i>>8&255]+t.lut[i>>16&255]+t.lut[i>>24&255]+"-"+t.lut[255&e]+t.lut[e>>8&255]+"-"+t.lut[e>>16&15|64]+t.lut[e>>24&255]+"-"+t.lut[63&n|128]+t.lut[n>>8&255]+"-"+t.lut[n>>16&255]+t.lut[n>>24&255]+t.lut[255&o]+t.lut[o>>8&255]+t.lut[o>>16&255]+t.lut[o>>24&255]},t.initialize=function(){for(var i=0;i<256;i++)t.lut[i]=(i<16?"0":"")+i.toString(16)},t.lut=[],t}();exports.UUID=s,s.initialize();
},{"./enums":"Nl92"}],"zERj":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./enums"),t=require("./shared");function r(){return"__ac-"+t.UUID.generate()}function n(e){return null==e||""===e}function o(e,t){null!=t&&null!=t&&e.appendChild(t)}function i(e,t){return void 0===t&&(t=void 0),"string"==typeof e?e.toString():t}function s(e,t){return void 0===t&&(t=void 0),"number"==typeof e?e:t}function a(e,t){if("boolean"==typeof e)return e;if("string"==typeof e)switch(e.toLowerCase()){case"true":return!0;case"false":return!1;default:return t}return t}function l(e,t,r){if(n(t))return r;for(var o in e){if(parseInt(o,10)>=0){var i=e[o];if(i&&"string"==typeof i&&i.toLowerCase()===t.toLowerCase())return parseInt(o,10)}}return r}function u(e,t,r,n){void 0===n&&(n=void 0),null==r||r===n?delete e[t]:e[t]=r}function p(e,t,r,n){void 0===n&&(n=void 0),null==r||r===n||isNaN(r)?delete e[t]:e[t]=r}function f(e,t,r,n,o){void 0===o&&(o=void 0);var i=t[r],s=null==i||void 0!==e[i];n==o?s&&delete t[r]:null==n?s&&delete t[r]:t[r]=e[n]}function c(e,t,r){var n=[];if(r)for(var o=0,i=r;o<i.length;o++){var s=i[o];n.push(s.toJSON())}0==n.length?e.hasOwnProperty(t)&&Array.isArray(e[t])&&delete e[t]:u(e,t,n)}function g(e,t,r){return"string"==typeof t?l(e,t,r):"number"==typeof t?t:r}function d(t,r,n){if(r.spacing>0||r.lineThickness>0){var o=document.createElement("div");return o.className=t.makeCssClassName("ac-"+(n==e.Orientation.Horizontal?"horizontal":"vertical")+"-separator"),n==e.Orientation.Horizontal?r.lineThickness?(o.style.paddingTop=r.spacing/2+"px",o.style.marginBottom=r.spacing/2+"px",o.style.borderBottom=r.lineThickness+"px solid "+v(r.lineColor)):o.style.height=r.spacing+"px":r.lineThickness?(o.style.paddingLeft=r.spacing/2+"px",o.style.marginRight=r.spacing/2+"px",o.style.borderRight=r.lineThickness+"px solid "+v(r.lineColor)):o.style.width=r.spacing+"px",o.style.overflow="hidden",o}return null}function v(e){var t=/#([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})?/gi.exec(e);if(t&&t[4]){var r=parseInt(t[1],16)/255;return"rgba("+parseInt(t[2],16)+","+parseInt(t[3],16)+","+parseInt(t[4],16)+","+r+")"}return e}function h(e,t,r){var n=function(){return t-e.scrollHeight>=-1};if(!n()){for(var o=e.innerHTML,i=function(t){e.innerHTML=o.substring(0,t)+"..."},s=y(o),a=0,l=s.length,u=0;a<l;){var p=Math.floor((a+l)/2);i(s[p]),n()?(u=s[p],a=p+1):l=p}if(i(u),r&&t-e.scrollHeight>=r-1){for(var f=x(o,u);f<o.length&&(i(f),n());)u=f,f=x(o,f);i(u)}}}function y(e){for(var t=[],r=x(e,-1);r<e.length;)" "==e[r]&&t.push(r),r=x(e,r);return t}function x(e,t){for(t+=1;t<e.length&&"<"==e[t];)for(;t<e.length&&">"!=e[t++];);return t}function m(t,r){var n=t.offsetTop;return n+t.clientHeight<=r?e.ContainerFitStatus.FullyInContainer:n<r?e.ContainerFitStatus.Overflowing:e.ContainerFitStatus.FullyOutOfContainer}exports.generateUniqueId=r,exports.isNullOrEmpty=n,exports.appendChild=o,exports.getStringValue=i,exports.getNumberValue=s,exports.getBoolValue=a,exports.getEnumValue=l,exports.setProperty=u,exports.setNumberProperty=p,exports.setEnumProperty=f,exports.setArrayProperty=c,exports.parseHostConfigEnum=g,exports.renderSeparation=d,exports.stringToCssColor=v,exports.truncate=h,exports.getFitStatus=m;
},{"./enums":"Nl92","./shared":"lmhT"}],"XUvv":[function(require,module,exports) {
"use strict";var t=this&&this.__extends||function(){var t=function(e,i){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])})(e,i)};return function(e,i){function n(){this.constructor=e}t(e,i),e.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)}}();Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./enums"),i=require("./utils"),n=require("./shared"),a=function(){function t(t,e){this.default="#000000",this.subtle="#666666",t&&(this.default=t),e&&(this.subtle=e)}return t.prototype.parse=function(t){t&&(this.default=t.default||this.default,this.subtle=t.subtle||this.subtle)},t}();exports.ColorDefinition=a;var o=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.highlightColors=new a("#22000000","#11000000"),t}return t(i,e),i.prototype.parse=function(t){e.prototype.parse.call(this,t),t&&this.highlightColors.parse(t.highlightColors)},i}(a);exports.TextColorDefinition=o;var s=function(){return function(t){this.allowCustomStyle=!1,t&&(this.allowCustomStyle=t.allowCustomStyle||this.allowCustomStyle)}}();exports.AdaptiveCardConfig=s;var r=function(){function t(t){this.imageSize=e.Size.Medium,this.maxImageHeight=100,t&&(this.imageSize=null!=t.imageSize?t.imageSize:this.imageSize,this.maxImageHeight=i.getNumberValue(t.maxImageHeight,100))}return t.prototype.toJSON=function(){return{imageSize:e.Size[this.imageSize],maxImageHeight:this.maxImageHeight}},t}();exports.ImageSetConfig=r;var l=function(){function t(t){this.allowInlinePlayback=!0,t&&(this.defaultPoster=t.defaultPoster,this.allowInlinePlayback=t.allowInlinePlayback||this.allowInlinePlayback)}return t.prototype.toJSON=function(){return{defaultPoster:this.defaultPoster,allowInlinePlayback:this.allowInlinePlayback}},t}();exports.MediaConfig=l;var h=function(){function t(t){this.size=e.TextSize.Default,this.color=e.TextColor.Default,this.isSubtle=!1,this.weight=e.TextWeight.Default,this.wrap=!0,t&&(this.size=i.parseHostConfigEnum(e.TextSize,t.size,e.TextSize.Default),this.color=i.parseHostConfigEnum(e.TextColor,t.color,e.TextColor.Default),this.isSubtle=t.isSubtle||this.isSubtle,this.weight=i.parseHostConfigEnum(e.TextWeight,t.weight,this.getDefaultWeight()),this.wrap=null!=t.wrap?t.wrap:this.wrap)}return t.prototype.getDefaultWeight=function(){return e.TextWeight.Default},t.prototype.toJSON=function(){return{size:e.TextSize[this.size],color:e.TextColor[this.color],isSubtle:this.isSubtle,weight:e.TextWeight[this.weight],wrap:this.wrap}},t}();exports.FactTextDefinition=h;var p=function(n){function a(t){var a=n.call(this,t)||this;return a.maxWidth=150,a.weight=e.TextWeight.Bolder,t&&(a.maxWidth=null!=t.maxWidth?t.maxWidth:a.maxWidth,a.weight=i.parseHostConfigEnum(e.TextWeight,t.weight,e.TextWeight.Bolder)),a}return t(a,n),a.prototype.getDefaultWeight=function(){return e.TextWeight.Bolder},a}(h);exports.FactTitleDefinition=p;var u=function(){return function(t){this.title=new p,this.value=new h,this.spacing=10,t&&(this.title=new p(t.title),this.value=new h(t.value),this.spacing=t.spacing&&null!=t.spacing?t.spacing&&t.spacing:this.spacing)}}();exports.FactSetConfig=u;var c=function(){function t(t){this.actionMode=e.ShowCardActionMode.Inline,this.inlineTopMargin=16,this.style=e.ContainerStyle.Emphasis,t&&(this.actionMode=i.parseHostConfigEnum(e.ShowCardActionMode,t.actionMode,e.ShowCardActionMode.Inline),this.inlineTopMargin=null!=t.inlineTopMargin?t.inlineTopMargin:this.inlineTopMargin,this.style=t.style&&"string"==typeof t.style?t.style:e.ContainerStyle.Emphasis)}return t.prototype.toJSON=function(){return{actionMode:e.ShowCardActionMode[this.actionMode],inlineTopMargin:this.inlineTopMargin,style:this.style}},t}();exports.ShowCardActionConfig=c;var g=function(){function t(t){if(this.maxActions=5,this.spacing=e.Spacing.Default,this.buttonSpacing=20,this.showCard=new c,this.preExpandSingleShowCardAction=!1,this.actionsOrientation=e.Orientation.Horizontal,this.actionAlignment=e.ActionAlignment.Left,this.iconPlacement=e.ActionIconPlacement.LeftOfTitle,this.allowTitleToWrap=!1,this.iconSize=24,t){this.maxActions=null!=t.maxActions?t.maxActions:this.maxActions,this.spacing=i.parseHostConfigEnum(e.Spacing,t.spacing&&t.spacing,e.Spacing.Default),this.buttonSpacing=null!=t.buttonSpacing?t.buttonSpacing:this.buttonSpacing,this.showCard=new c(t.showCard),this.preExpandSingleShowCardAction=i.getBoolValue(t.preExpandSingleShowCardAction,!1),this.actionsOrientation=i.parseHostConfigEnum(e.Orientation,t.actionsOrientation,e.Orientation.Horizontal),this.actionAlignment=i.parseHostConfigEnum(e.ActionAlignment,t.actionAlignment,e.ActionAlignment.Left),this.iconPlacement=i.parseHostConfigEnum(e.ActionIconPlacement,t.iconPlacement,e.ActionIconPlacement.LeftOfTitle),this.allowTitleToWrap=null!=t.allowTitleToWrap?t.allowTitleToWrap:this.allowTitleToWrap;try{var a=n.SizeAndUnit.parse(t.iconSize);a.unit==e.SizeUnit.Pixel&&(this.iconSize=a.physicalSize)}catch(o){}}}return t.prototype.toJSON=function(){return{maxActions:this.maxActions,spacing:e.Spacing[this.spacing],buttonSpacing:this.buttonSpacing,showCard:this.showCard,preExpandSingleShowCardAction:this.preExpandSingleShowCardAction,actionsOrientation:e.Orientation[this.actionsOrientation],actionAlignment:e.ActionAlignment[this.actionAlignment]}},t}();exports.ActionsConfig=g;var f=function(){function t(t){this.default=new o,this.dark=new o,this.light=new o,this.accent=new o,this.good=new o,this.warning=new o,this.attention=new o,this.parse(t)}return t.prototype.parseSingleColor=function(t,e){t&&this[e].parse(t[e])},t.prototype.parse=function(t){t&&(this.parseSingleColor(t,"default"),this.parseSingleColor(t,"dark"),this.parseSingleColor(t,"light"),this.parseSingleColor(t,"accent"),this.parseSingleColor(t,"good"),this.parseSingleColor(t,"warning"),this.parseSingleColor(t,"attention"))},t}();exports.ColorSetDefinition=f;var S=function(){function t(t){this.foregroundColors=new f({default:{default:"#333333",subtle:"#EE333333"},dark:{default:"#000000",subtle:"#66000000"},light:{default:"#FFFFFF",subtle:"#33000000"},accent:{default:"#2E89FC",subtle:"#882E89FC"},good:{default:"#54A254",subtle:"#DD54A254"},warning:{default:"#E69500",subtle:"#DDE69500"},attention:{default:"#CC3300",subtle:"#DDCC3300"}}),this.parse(t)}return t.prototype.parse=function(t){t&&(this.backgroundColor=t.backgroundColor,this.foregroundColors.parse(t.foregroundColors),this.highlightBackgroundColor=t.highlightBackgroundColor,this.highlightForegroundColor=t.highlightForegroundColor)},Object.defineProperty(t.prototype,"isBuiltIn",{get:function(){return!1},enumerable:!0,configurable:!0}),t}();exports.ContainerStyleDefinition=S;var m=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),Object.defineProperty(i.prototype,"isBuiltIn",{get:function(){return!0},enumerable:!0,configurable:!0}),i}(S),y=function(){function t(t){if(this._allStyles={},this._allStyles[e.ContainerStyle.Default]=new m,this._allStyles[e.ContainerStyle.Emphasis]=new m,this._allStyles[e.ContainerStyle.Accent]=new m,this._allStyles[e.ContainerStyle.Good]=new m,this._allStyles[e.ContainerStyle.Attention]=new m,this._allStyles[e.ContainerStyle.Warning]=new m,t){this._allStyles[e.ContainerStyle.Default].parse(t[e.ContainerStyle.Default]),this._allStyles[e.ContainerStyle.Emphasis].parse(t[e.ContainerStyle.Emphasis]),this._allStyles[e.ContainerStyle.Accent].parse(t[e.ContainerStyle.Accent]),this._allStyles[e.ContainerStyle.Good].parse(t[e.ContainerStyle.Good]),this._allStyles[e.ContainerStyle.Attention].parse(t[e.ContainerStyle.Attention]),this._allStyles[e.ContainerStyle.Warning].parse(t[e.ContainerStyle.Warning]);var i=t.customStyles;if(i&&Array.isArray(i))for(var n=0,a=i;n<a.length;n++){var o=a[n];if(o){var s=o.name;s&&"string"==typeof s&&(this._allStyles.hasOwnProperty(s)?this._allStyles[s].parse(o.style):this._allStyles[s]=new S(o.style))}}}}return t.prototype.toJSON=function(){var t=this,e=[];Object.keys(this._allStyles).forEach(function(i){t._allStyles[i].isBuiltIn||e.push({name:i,style:t._allStyles[i]})});var i={default:this.default,emphasis:this.emphasis};return e.length>0&&(i.customStyles=e),i},t.prototype.getStyleByName=function(t,e){return void 0===e&&(e=null),this._allStyles.hasOwnProperty(t)?this._allStyles[t]:e},Object.defineProperty(t.prototype,"default",{get:function(){return this._allStyles[e.ContainerStyle.Default]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"emphasis",{get:function(){return this._allStyles[e.ContainerStyle.Emphasis]},enumerable:!0,configurable:!0}),t}();exports.ContainerStyleSet=y;var d=function(){function t(t,e,i){void 0===t&&(t=1),void 0===e&&(e=1),this._isValid=!0,this._major=t,this._minor=e,this._label=i}return t.parse=function(i,n){if(!i)return null;var a=new t;a._versionString=i;var o=/(\d+).(\d+)/gi.exec(i);return null!=o&&3==o.length?(a._major=parseInt(o[1]),a._minor=parseInt(o[2])):a._isValid=!1,!a._isValid&&n&&n.push({error:e.ValidationError.InvalidPropertyValue,message:"Invalid version string: "+a._versionString}),a},t.prototype.toString=function(){return this._isValid?this._major+"."+this._minor:this._versionString},t.prototype.compareTo=function(t){if(!this.isValid||!t.isValid)throw new Error("Cannot compare invalid version.");return this.major>t.major?1:this.major<t.major?-1:this.minor>t.minor?1:this.minor<t.minor?-1:0},Object.defineProperty(t.prototype,"label",{get:function(){return this._label?this._label:this.toString()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"major",{get:function(){return this._major},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"minor",{get:function(){return this._minor},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isValid",{get:function(){return this._isValid},enumerable:!0,configurable:!0}),t}();exports.Version=d;var C=function(){function t(){this.capabilities=null}return t.prototype.setCapability=function(t,e){this.capabilities||(this.capabilities={}),this.capabilities[t]=e},t.prototype.parse=function(t,e){if(t)for(var i in t){var n=t[i];if("string"==typeof n)if("*"==n)this.setCapability(i,"*");else{var a=d.parse(n,e);a.isValid&&this.setCapability(i,a)}}},t.prototype.hasCapability=function(t,e){return!(!this.capabilities||!this.capabilities.hasOwnProperty(t))&&("*"==e||"*"==this.capabilities[t]||e.compareTo(this.capabilities[t])<=0)},t.prototype.areAllMet=function(t){if(this.capabilities)for(var e in this.capabilities)if(!t.hasCapability(e,this.capabilities[e]))return!1;return!0},t}();exports.HostCapabilities=C;var w=function(){function t(t){this.fontFamily="Segoe UI,Segoe,Segoe WP,Helvetica Neue,Helvetica,sans-serif",this.fontSizes={small:12,default:14,medium:17,large:21,extraLarge:26},this.fontWeights={lighter:200,default:400,bolder:600},t&&(this.fontFamily=t)}return t.prototype.parse=function(t){this.fontFamily=t.fontFamily||this.fontFamily,this.fontSizes={small:t.fontSizes&&t.fontSizes.small||this.fontSizes.small,default:t.fontSizes&&t.fontSizes.default||this.fontSizes.default,medium:t.fontSizes&&t.fontSizes.medium||this.fontSizes.medium,large:t.fontSizes&&t.fontSizes.large||this.fontSizes.large,extraLarge:t.fontSizes&&t.fontSizes.extraLarge||this.fontSizes.extraLarge},this.fontWeights={lighter:t.fontWeights&&t.fontWeights.lighter||this.fontWeights.lighter,default:t.fontWeights&&t.fontWeights.default||this.fontWeights.default,bolder:t.fontWeights&&t.fontWeights.bolder||this.fontWeights.bolder}},t.monospace=new t("'Courier New', Courier, monospace"),t}();exports.FontTypeDefinition=w;var b=function(){function t(t){this.default=new w,this.monospace=new w("'Courier New', Courier, monospace"),t&&(this.default.parse(t.default),this.monospace.parse(t.monospace))}return t.prototype.getStyleDefinition=function(t){switch(t){case e.FontType.Monospace:return this.monospace;case e.FontType.Default:default:return this.default}},t}();exports.FontTypeSet=b;var x=function(){function t(t){this.hostCapabilities=new C,this.choiceSetInputValueSeparator=",",this.supportsInteractivity=!0,this.fontTypes=null,this.spacing={small:3,default:8,medium:20,large:30,extraLarge:40,padding:15},this.separator={lineThickness:1,lineColor:"#EEEEEE"},this.imageSizes={small:40,medium:80,large:160},this.containerStyles=new y,this.actions=new g,this.adaptiveCard=new s,this.imageSet=new r,this.media=new l,this.factSet=new u,this.cssClassNamePrefix=null,this.alwaysAllowBleed=!1,t&&(("string"==typeof t||t instanceof String)&&(t=JSON.parse(t)),this.choiceSetInputValueSeparator=t&&"string"==typeof t.choiceSetInputValueSeparator?t.choiceSetInputValueSeparator:this.choiceSetInputValueSeparator,this.supportsInteractivity=t&&"boolean"==typeof t.supportsInteractivity?t.supportsInteractivity:this.supportsInteractivity,this._legacyFontType=new w,this._legacyFontType.parse(t),t.fontTypes&&(this.fontTypes=new b(t.fontTypes)),t.lineHeights&&(this.lineHeights={small:t.lineHeights.small,default:t.lineHeights.default,medium:t.lineHeights.medium,large:t.lineHeights.large,extraLarge:t.lineHeights.extraLarge}),this.imageSizes={small:t.imageSizes&&t.imageSizes.small||this.imageSizes.small,medium:t.imageSizes&&t.imageSizes.medium||this.imageSizes.medium,large:t.imageSizes&&t.imageSizes.large||this.imageSizes.large},this.containerStyles=new y(t.containerStyles),this.spacing={small:t.spacing&&t.spacing.small||this.spacing.small,default:t.spacing&&t.spacing.default||this.spacing.default,medium:t.spacing&&t.spacing.medium||this.spacing.medium,large:t.spacing&&t.spacing.large||this.spacing.large,extraLarge:t.spacing&&t.spacing.extraLarge||this.spacing.extraLarge,padding:t.spacing&&t.spacing.padding||this.spacing.padding},this.separator={lineThickness:t.separator&&t.separator.lineThickness||this.separator.lineThickness,lineColor:t.separator&&t.separator.lineColor||this.separator.lineColor},this.actions=new g(t.actions||this.actions),this.adaptiveCard=new s(t.adaptiveCard||this.adaptiveCard),this.imageSet=new r(t.imageSet),this.factSet=new u(t.factSet))}return t.prototype.getFontTypeDefinition=function(t){return this.fontTypes?this.fontTypes.getStyleDefinition(t):t==e.FontType.Monospace?w.monospace:this._legacyFontType},t.prototype.getEffectiveSpacing=function(t){switch(t){case e.Spacing.Small:return this.spacing.small;case e.Spacing.Default:return this.spacing.default;case e.Spacing.Medium:return this.spacing.medium;case e.Spacing.Large:return this.spacing.large;case e.Spacing.ExtraLarge:return this.spacing.extraLarge;case e.Spacing.Padding:return this.spacing.padding;default:return 0}},t.prototype.paddingDefinitionToSpacingDefinition=function(t){return new n.SpacingDefinition(this.getEffectiveSpacing(t.top),this.getEffectiveSpacing(t.right),this.getEffectiveSpacing(t.bottom),this.getEffectiveSpacing(t.left))},t.prototype.makeCssClassNames=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var i=[],n=0,a=t;n<a.length;n++){var o=a[n];i.push((this.cssClassNamePrefix?this.cssClassNamePrefix+"-":"")+o)}return i},t.prototype.makeCssClassName=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var i=this.makeCssClassNames.apply(this,t).join(" ");return i||""},Object.defineProperty(t.prototype,"fontFamily",{get:function(){return this._legacyFontType.fontFamily},set:function(t){this._legacyFontType.fontFamily=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fontSizes",{get:function(){return this._legacyFontType.fontSizes},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"fontWeights",{get:function(){return this._legacyFontType.fontWeights},enumerable:!0,configurable:!0}),t}();exports.HostConfig=x;
},{"./enums":"Nl92","./utils":"zERj","./shared":"lmhT"}],"lzwY":[function(require,module,exports) {
"use strict";var t=this&&this.__extends||function(){var t=function(r,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])})(r,n)};return function(r,n){function e(){this.constructor=r}t(r,n),r.prototype=null===n?Object.create(n):(e.prototype=n.prototype,new e)}}();Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){function t(t){this._regularExpression=t}return t.prototype.format=function(t,r){for(var n,e=r;null!=(n=this._regularExpression.exec(r));)e=e.replace(n[0],this.internalFormat(t,n));return e},t}(),n=function(r){function n(){return null!==r&&r.apply(this,arguments)||this}return t(n,r),n.prototype.internalFormat=function(t,r){var n=new Date(Date.parse(r[1])),e=null!=r[2]?r[2].toLowerCase():"compact";return"compact"!=e?n.toLocaleDateString(t,{day:"numeric",weekday:e,month:e,year:"numeric"}):n.toLocaleDateString()},n}(r),e=function(r){function n(){return null!==r&&r.apply(this,arguments)||this}return t(n,r),n.prototype.internalFormat=function(t,r){return new Date(Date.parse(r[1])).toLocaleTimeString(t,{hour:"numeric",minute:"2-digit"})},n}(r);function o(t,r){for(var o=[new n(/\{{2}DATE\((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|(?:(?:-|\+)\d{2}:\d{2})))(?:, ?(COMPACT|LONG|SHORT))?\)\}{2}/g),new e(/\{{2}TIME\((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|(?:(?:-|\+)\d{2}:\d{2})))\)\}{2}/g)],i=r,a=0;a<o.length;a++)i=o[a].format(t,i);return i}exports.formatText=o;
},{}],"oB1l":[function(require,module,exports) {
"use strict";var t=this&&this.__extends||function(){var t=function(e,n){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(e,n)};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}();Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("./enums"),i=require("./shared"),r=require("./utils"),o=require("./host-config"),s=require("./text-formatters");function a(t,e){t&&t.setCollection(e)}function l(t,e){if(e)for(var n=0;n<e.length;n++)if(t.getJsonTypeName()===e[n])return!1;return!0}function u(t,n,i,o,s,a,l){var p=null;if(n&&"object"==typeof n){var c=!1,h=r.getStringValue(n.type);if(i&&i.indexOf(h)>=0)lt(a(h,e.ForbiddenType),l);else if((p=s(h))?(p.setParent(t),p.parse(n,l),c=p.shouldFallback()&&o):(c=o,lt(a(h,e.UnknownType),l)),c){var d=n.fallback;d||t.setShouldFallback(!0),"string"==typeof d&&"drop"===d.toLowerCase()?p=null:"object"==typeof d&&(p=u(t,d,i,!0,s,a,l))}}return p}function p(t,i,r,o,s){return u(t,i,r,o,function(t){return dt.actionTypeRegistry.createInstance(t)},function(t,i){return i==e.UnknownType?{error:n.ValidationError.UnknownActionType,message:"Unknown action type: "+t+". Fallback will be used if present."}:{error:n.ValidationError.ActionTypeNotAllowed,message:"Action type "+t+" is not allowed in this context."}},s)}function c(t,i,r,o){return u(t,i,[],r,function(t){return dt.elementTypeRegistry.createInstance(t)},function(t,i){return i==e.UnknownType?{error:n.ValidationError.UnknownElementType,message:"Unknown element type: "+t+". Fallback will be used if present."}:{error:n.ValidationError.ElementTypeNotAllowed,message:"Element type "+t+" is not allowed in this context."}},o)}!function(t){t[t.UnknownType=0]="UnknownType",t[t.ForbiddenType=1]="ForbiddenType"}(e||(e={})),exports.createActionInstance=p,exports.createElementInstance=c;var h=function(){function t(){this._rawProperties={}}return t.prototype.parse=function(t,e){this._rawProperties=dt.enableFullJsonRoundTrip?t:{}},t.prototype.toJSON=function(){return dt.enableFullJsonRoundTrip&&this._rawProperties&&"object"==typeof this._rawProperties?this._rawProperties:{}},t.prototype.setCustomProperty=function(t,e){"string"==typeof e&&r.isNullOrEmpty(e)||null==e?delete this._rawProperties[t]:this._rawProperties[t]=e},t.prototype.getCustomProperty=function(t){return this._rawProperties[t]},t}();exports.SerializableObject=h;var d=function(){return function(t){this.cardObject=t,this.errors=[]}}();exports.ValidationFailure=d;var f=function(){function t(){this.allIds={},this.failures=[]}return t.prototype.getFailureIndex=function(t){for(var e=0;e<this.failures.length;e++)if(this.failures[e].cardObject===t)return e;return-1},t.prototype.addFailure=function(t,e){var n,i=this.getFailureIndex(t);i<0?(n=new d(t),this.failures.push(n)):n=this.failures[i],n.errors.push(e)},t}();exports.ValidationResults=f;var g=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.prototype.internalValidateProperties=function(t){r.isNullOrEmpty(this.id)||(t.allIds.hasOwnProperty(this.id)?(1==t.allIds[this.id]&&t.addFailure(this,{error:n.ValidationError.DuplicateId,message:"Duplicate Id: "+this.id}),t.allIds[this.id]+=1):t.allIds[this.id]=1)},i.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.id=r.getStringValue(t.id)},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"type",this.getJsonTypeName()),r.setProperty(t,"id",this.id),t},i.prototype.validateProperties=function(){var t=new f;return this.internalValidateProperties(t),t},i}(h);exports.CardObject=g;var y=function(e){function s(){var t=null!==e&&e.apply(this,arguments)||this;return t._shouldFallback=!1,t._lang=void 0,t._hostConfig=null,t._parent=null,t._renderedElement=null,t._separatorElement=null,t._isVisible=!0,t._truncatedDueToOverflow=!1,t._defaultRenderedElementDisplayMode=null,t._padding=null,t.requires=new o.HostCapabilities,t.horizontalAlignment=null,t.spacing=n.Spacing.Default,t.separator=!1,t.customCssSelector=null,t.height="auto",t.minPixelHeight=null,t}return t(s,e),s.prototype.internalRenderSeparator=function(){var t=r.renderSeparation(this.hostConfig,{spacing:this.hostConfig.getEffectiveSpacing(this.spacing),lineThickness:this.separator?this.hostConfig.separator.lineThickness:null,lineColor:this.separator?this.hostConfig.separator.lineColor:null},this.separatorOrientation);if(dt.alwaysBleedSeparators&&t&&this.separatorOrientation==n.Orientation.Horizontal){var e=this.getParentContainer();if(e&&e.getEffectivePadding()){var i=this.hostConfig.paddingDefinitionToSpacingDefinition(e.getEffectivePadding());t.style.marginLeft="-"+i.left+"px",t.style.marginRight="-"+i.right+"px"}}return t},s.prototype.updateRenderedElementVisibility=function(){var t=this.isDesignMode()||this.isVisible?this._defaultRenderedElementDisplayMode:"none";this._renderedElement&&(this._renderedElement.style.display=t),this._separatorElement&&(this.parent&&this.parent.isFirstElement(this)?this._separatorElement.style.display="none":this._separatorElement.style.display=t)},s.prototype.hideElementDueToOverflow=function(){this._renderedElement&&this.isVisible&&(this._renderedElement.style.visibility="hidden",this.isVisible=!1,ot(this,!1))},s.prototype.showElementHiddenDueToOverflow=function(){this._renderedElement&&!this.isVisible&&(this._renderedElement.style.visibility=null,this.isVisible=!0,ot(this,!1))},s.prototype.handleOverflow=function(t){if(this.isVisible||this.isHiddenDueToOverflow()){var e=this.truncateOverflow(t);this._truncatedDueToOverflow=e||this._truncatedDueToOverflow,e?e&&!this.isVisible&&this.showElementHiddenDueToOverflow():this.hideElementDueToOverflow()}},s.prototype.resetOverflow=function(){var t=!1;return this._truncatedDueToOverflow&&(this.undoOverflowTruncation(),this._truncatedDueToOverflow=!1,t=!0),this.isHiddenDueToOverflow&&this.showElementHiddenDueToOverflow(),t},s.prototype.createPlaceholderElement=function(){var t=document.createElement("div");return t.style.border="1px dashed #DDDDDD",t.style.padding="4px",t.style.minHeight="32px",t.style.fontSize="10px",t.innerText="Empty "+this.getJsonTypeName(),t},s.prototype.adjustRenderedElementSize=function(t){"auto"===this.height?t.style.flex="0 0 auto":t.style.flex="1 1 auto",this.minPixelHeight&&(t.style.minHeight=this.minPixelHeight+"px")},s.prototype.overrideInternalRender=function(){return this.internalRender()},s.prototype.applyPadding=function(){if(this.separatorElement)if(dt.alwaysBleedSeparators&&this.separatorOrientation==n.Orientation.Horizontal&&!this.isBleeding()){var t=new i.PaddingDefinition;this.getImmediateSurroundingPadding(t);var e=this.hostConfig.paddingDefinitionToSpacingDefinition(t);this.separatorElement.style.marginLeft="-"+e.left+"px",this.separatorElement.style.marginRight="-"+e.right+"px"}else this.separatorElement.style.marginRight="0",this.separatorElement.style.marginLeft="0"},s.prototype.truncateOverflow=function(t){return!1},s.prototype.undoOverflowTruncation=function(){},s.prototype.getDefaultPadding=function(){return new i.PaddingDefinition},s.prototype.getHasBackground=function(){return!1},s.prototype.getPadding=function(){return this._padding},s.prototype.setPadding=function(t){this._padding=t},Object.defineProperty(s.prototype,"supportsMinHeight",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"useDefaultSizing",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"allowCustomPadding",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"separatorOrientation",{get:function(){return n.Orientation.Horizontal},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"defaultStyle",{get:function(){return n.ContainerStyle.Default},enumerable:!0,configurable:!0}),s.prototype.asString=function(){return""},s.prototype.isBleeding=function(){return!1},s.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"isVisible",this.isVisible,!0),null!==this.horizontalAlignment&&r.setEnumProperty(n.HorizontalAlignment,t,"horizontalAlignment",this.horizontalAlignment),r.setEnumProperty(n.Spacing,t,"spacing",this.spacing,n.Spacing.Default),r.setProperty(t,"separator",this.separator,!1),r.setProperty(t,"height",this.height,"auto"),this.supportsMinHeight&&r.setProperty(t,"minHeight","number"!=typeof this.minPixelHeight||isNaN(this.minPixelHeight)?void 0:this.minPixelHeight+"px"),t},s.prototype.setParent=function(t){this._parent=t},s.prototype.getEffectiveStyle=function(){return this.parent?this.parent.getEffectiveStyle():this.defaultStyle},s.prototype.getForbiddenElementTypes=function(){return null},s.prototype.getForbiddenActionTypes=function(){return null},s.prototype.getImmediateSurroundingPadding=function(t,e,i,r,o){if(void 0===e&&(e=!0),void 0===i&&(i=!0),void 0===r&&(r=!0),void 0===o&&(o=!0),this.parent){var s=e&&this.parent.isTopElement(this),a=i&&this.parent.isRightMostElement(this),l=r&&this.parent.isBottomElement(this),u=o&&this.parent.isLeftMostElement(this),p=this.parent.getEffectivePadding();p&&(s&&p.top!=n.Spacing.None&&(t.top=p.top,s=!1),a&&p.right!=n.Spacing.None&&(t.right=p.right,a=!1),l&&p.bottom!=n.Spacing.None&&(t.bottom=p.bottom,l=!1),u&&p.left!=n.Spacing.None&&(t.left=p.left,u=!1)),(s||a||l||u)&&this.parent.getImmediateSurroundingPadding(t,s,a,l,u)}},s.prototype.parse=function(t,o){e.prototype.parse.call(this,t,o),st(this,t,o),this.requires.parse(t.requires,o),this.isVisible=r.getBoolValue(t.isVisible,this.isVisible),this.horizontalAlignment=r.getEnumValue(n.HorizontalAlignment,t.horizontalAlignment,this.horizontalAlignment),this.spacing=r.getEnumValue(n.Spacing,t.spacing,n.Spacing.Default),this.separator=r.getBoolValue(t.separator,this.separator);var s=t.separation;void 0!==s&&("none"===s?(this.spacing=n.Spacing.None,this.separator=!1):"strong"===s?(this.spacing=n.Spacing.Large,this.separator=!0):"default"===s&&(this.spacing=n.Spacing.Default,this.separator=!1),lt({error:n.ValidationError.Deprecated,message:'The "separation" property is deprecated and will be removed. Use the "spacing" and "separator" properties instead.'},o));var a=t.height;if("auto"!==a&&"stretch"!==a||(this.height=a),this.supportsMinHeight){var l=t.minHeight;if(l&&"string"==typeof l){var u=!1;try{var p=i.SizeAndUnit.parse(l,!0);p.unit==n.SizeUnit.Pixel&&(this.minPixelHeight=p.physicalSize,u=!0)}catch(c){}u||lt({error:n.ValidationError.InvalidPropertyValue,message:'Invalid "minHeight" value: '+l},o)}}else this.minPixelHeight=null},s.prototype.getActionCount=function(){return 0},s.prototype.getActionAt=function(t){throw new Error("Index out of range.")},s.prototype.remove=function(){return!!(this.parent&&this.parent instanceof S)&&this.parent.removeItem(this)},s.prototype.render=function(){return this._renderedElement=this.overrideInternalRender(),this._separatorElement=this.internalRenderSeparator(),this._renderedElement?(this.customCssSelector&&this._renderedElement.classList.add(this.customCssSelector),this._renderedElement.style.boxSizing="border-box",this._defaultRenderedElementDisplayMode=this._renderedElement.style.display,this.adjustRenderedElementSize(this._renderedElement),this.updateLayout(!1)):this.isDesignMode()&&(this._renderedElement=this.createPlaceholderElement()),this._renderedElement},s.prototype.updateLayout=function(t){void 0===t&&(t=!0),this.updateRenderedElementVisibility(),this.applyPadding()},s.prototype.indexOf=function(t){return-1},s.prototype.isDesignMode=function(){var t=this.getRootElement();return t instanceof dt&&t.designMode},s.prototype.isRendered=function(){return this._renderedElement&&this._renderedElement.offsetHeight>0},s.prototype.isFirstElement=function(t){return!0},s.prototype.isLastElement=function(t){return!0},s.prototype.isAtTheVeryLeft=function(){return!this.parent||this.parent.isLeftMostElement(this)&&this.parent.isAtTheVeryLeft()},s.prototype.isAtTheVeryRight=function(){return!this.parent||this.parent.isRightMostElement(this)&&this.parent.isAtTheVeryRight()},s.prototype.isAtTheVeryTop=function(){return!this.parent||this.parent.isFirstElement(this)&&this.parent.isAtTheVeryTop()},s.prototype.isAtTheVeryBottom=function(){return!this.parent||this.parent.isLastElement(this)&&this.parent.isAtTheVeryBottom()},s.prototype.isBleedingAtTop=function(){return!1},s.prototype.isBleedingAtBottom=function(){return!1},s.prototype.isLeftMostElement=function(t){return!0},s.prototype.isRightMostElement=function(t){return!0},s.prototype.isTopElement=function(t){return this.isFirstElement(t)},s.prototype.isBottomElement=function(t){return this.isLastElement(t)},s.prototype.isHiddenDueToOverflow=function(){return this._renderedElement&&"hidden"==this._renderedElement.style.visibility},s.prototype.getRootElement=function(){for(var t=this;t.parent;)t=t.parent;return t},s.prototype.getParentContainer=function(){for(var t=this.parent;t;){if(t instanceof K)return t;t=t.parent}return null},s.prototype.getAllInputs=function(){return[]},s.prototype.getResourceInformation=function(){return[]},s.prototype.getElementById=function(t){return this.id===t?this:null},s.prototype.getActionById=function(t){return null},s.prototype.shouldFallback=function(){return this._shouldFallback||!this.requires.areAllMet(this.hostConfig.hostCapabilities)},s.prototype.setShouldFallback=function(t){this._shouldFallback=t},s.prototype.getEffectivePadding=function(){var t=this.getPadding();return t&&this.allowCustomPadding?t:this.getDefaultPadding()},Object.defineProperty(s.prototype,"lang",{get:function(){return this._lang?this._lang:this.parent?this.parent.lang:void 0},set:function(t){if(t&&""!=t){if(!/^[a-z]{2,3}$/gi.exec(t))throw new Error("Invalid language identifier: "+t)}this._lang=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hostConfig",{get:function(){return this._hostConfig?this._hostConfig:this.parent?this.parent.hostConfig:gt},set:function(t){this._hostConfig=t},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"index",{get:function(){return this.parent?this.parent.indexOf(this):0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isInteractive",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isStandalone",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isInline",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"isVisible",{get:function(){return this._isVisible},set:function(t){dt.useAdvancedCardBottomTruncation&&!t&&this.undoOverflowTruncation(),this._isVisible!=t&&(this._isVisible=t,this.updateRenderedElementVisibility(),this._renderedElement&&ot(this))},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasVisibleSeparator",{get:function(){return!(!this.parent||!this.separatorElement)&&(!this.parent.isFirstElement(this)&&(this.isVisible||this.isDesignMode()))},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"renderedElement",{get:function(){return this._renderedElement},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"separatorElement",{get:function(){return this._separatorElement},enumerable:!0,configurable:!0}),s}(g);exports.CardElement=y;var m=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectAction=null,t.size=n.TextSize.Default,t.weight=n.TextWeight.Default,t.color=n.TextColor.Default,t.isSubtle=!1,t.fontType=null,t}return t(i,e),i.prototype.getEffectiveStyleDefinition=function(){return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle())},i.prototype.getFontSize=function(t){switch(this.size){case n.TextSize.Small:return t.fontSizes.small;case n.TextSize.Medium:return t.fontSizes.medium;case n.TextSize.Large:return t.fontSizes.large;case n.TextSize.ExtraLarge:return t.fontSizes.extraLarge;default:return t.fontSizes.default}},i.prototype.getColorDefinition=function(t,e){switch(e){case n.TextColor.Accent:return t.accent;case n.TextColor.Dark:return t.dark;case n.TextColor.Light:return t.light;case n.TextColor.Good:return t.good;case n.TextColor.Warning:return t.warning;case n.TextColor.Attention:return t.attention;default:return t.default}},i.prototype.setText=function(t){this._text=t},i.prototype.asString=function(){return this.text},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setEnumProperty(n.TextSize,t,"size",this.size,n.TextSize.Default),r.setEnumProperty(n.TextWeight,t,"weight",this.weight,n.TextWeight.Default),r.setEnumProperty(n.TextColor,t,"color",this.color,n.TextColor.Default),r.setProperty(t,"text",this.text),r.setProperty(t,"isSubtle",this.isSubtle,!1),r.setEnumProperty(n.FontType,t,"fontType",this.fontType,n.FontType.Default),t},i.prototype.applyStylesTo=function(t){var e,i=this.hostConfig.getFontTypeDefinition(this.fontType);switch(i.fontFamily&&(t.style.fontFamily=i.fontFamily),this.size){case n.TextSize.Small:e=i.fontSizes.small;break;case n.TextSize.Medium:e=i.fontSizes.medium;break;case n.TextSize.Large:e=i.fontSizes.large;break;case n.TextSize.ExtraLarge:e=i.fontSizes.extraLarge;break;default:e=i.fontSizes.default}t.style.fontSize=e+"px";var o,s=this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors,this.effectiveColor);switch(t.style.color=r.stringToCssColor(this.isSubtle?s.subtle:s.default),this.weight){case n.TextWeight.Lighter:o=i.fontWeights.lighter;break;case n.TextWeight.Bolder:o=i.fontWeights.bolder;break;default:o=i.fontWeights.default}t.style.fontWeight=o.toString()},i.prototype.parse=function(t,i){e.prototype.parse.call(this,t,i),this.text=r.getStringValue(t.text);var o=r.getStringValue(t.size);o&&"normal"===o.toLowerCase()?(this.size=n.TextSize.Default,lt({error:n.ValidationError.Deprecated,message:'The TextBlock.size value "normal" is deprecated and will be removed. Use "default" instead.'},i)):this.size=r.getEnumValue(n.TextSize,o,this.size);var s=r.getStringValue(t.weight);s&&"normal"===s.toLowerCase()?(this.weight=n.TextWeight.Default,lt({error:n.ValidationError.Deprecated,message:'The TextBlock.weight value "normal" is deprecated and will be removed. Use "default" instead.'},i)):this.weight=r.getEnumValue(n.TextWeight,s,this.weight),this.color=r.getEnumValue(n.TextColor,t.color,this.color),this.isSubtle=r.getBoolValue(t.isSubtle,this.isSubtle),this.fontType=r.getEnumValue(n.FontType,t.fontType,this.fontType)},Object.defineProperty(i.prototype,"effectiveColor",{get:function(){return this.color?this.color:n.TextColor.Default},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"text",{get:function(){return this._text},set:function(t){this.setText(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectAction",{get:function(){return this._selectAction},set:function(t){this._selectAction=t,this._selectAction&&this._selectAction.setParent(this)},enumerable:!0,configurable:!0}),i}(y);exports.BaseTextBlock=m;var v=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._processedText=null,t._treatAsPlainText=!0,t.wrap=!1,t.useMarkdown=!0,t}return t(i,e),i.prototype.restoreOriginalContent=function(){var t=this.maxLines?this._computedLineHeight*this.maxLines+"px":null;this.renderedElement.style.maxHeight=t,this.renderedElement.innerHTML=this._originalInnerHtml},i.prototype.truncateIfSupported=function(t){var e=this.renderedElement.children,n=!e.length;if(n||1==e.length&&"p"==e[0].tagName.toLowerCase()){var i=n?this.renderedElement:e[0];return r.truncate(i,t,this._computedLineHeight),!0}return!1},i.prototype.setText=function(t){e.prototype.setText.call(this,t),this._processedText=null},i.prototype.getRenderedDomElementType=function(){return"div"},i.prototype.internalRender=function(){var t=this;if(this._processedText=null,r.isNullOrEmpty(this.text))return null;var e=this.hostConfig,n=document.createElement(this.getRenderedDomElementType());if(n.classList.add(e.makeCssClassName("ac-textBlock")),n.style.overflow="hidden",this.applyStylesTo(n),this.selectAction&&(n.onclick=function(e){e.preventDefault(),e.cancelBubble=!0,t.selectAction.execute()},e.supportsInteractivity&&(n.tabIndex=0,n.setAttribute("role",this.selectAction.getAriaRole()),n.setAttribute("aria-label",this.selectAction.title),n.classList.add(e.makeCssClassName("ac-selectable")))),!this._processedText){this._treatAsPlainText=!0;var i=s.formatText(this.lang,this.text);if(this.useMarkdown){dt.allowMarkForTextHighlighting&&(i=i.replace(/<mark>/g,"===").replace(/<\/mark>/g,"/=="));var o=dt.applyMarkdown(i);if(o.didProcess&&o.outputHtml){if(this._processedText=o.outputHtml,this._treatAsPlainText=!1,dt.allowMarkForTextHighlighting){var a="",l=this.getEffectiveStyleDefinition();l.highlightBackgroundColor&&(a+="background-color: "+l.highlightBackgroundColor+";"),l.highlightForegroundColor&&(a+="color: "+l.highlightForegroundColor+";"),r.isNullOrEmpty(a)||(a='style="'+a+'"'),this._processedText=this._processedText.replace(/===/g,"<mark "+a+">").replace(/\/==/g,"</mark>")}}else this._processedText=i,this._treatAsPlainText=!0}else this._processedText=i,this._treatAsPlainText=!0}if(this._treatAsPlainText?n.innerText=this._processedText:n.innerHTML=this._processedText,n.firstElementChild instanceof HTMLElement){var u=n.firstElementChild;u.style.marginTop="0px",u.style.width="100%",this.wrap||(u.style.overflow="hidden",u.style.textOverflow="ellipsis")}n.lastElementChild instanceof HTMLElement&&(n.lastElementChild.style.marginBottom="0px");for(var p=n.getElementsByTagName("a"),c=0;c<p.length;c++){var h=p[c];h.classList.add(e.makeCssClassName("ac-anchor")),h.target="_blank",h.onclick=function(e){et(t,e.target)&&(e.preventDefault(),e.cancelBubble=!0)}}return this.wrap?(n.style.wordWrap="break-word",this.maxLines>0&&(n.style.maxHeight=this._computedLineHeight*this.maxLines+"px",n.style.overflow="hidden")):(n.style.whiteSpace="nowrap",n.style.textOverflow="ellipsis"),(dt.useAdvancedTextBlockTruncation||dt.useAdvancedCardBottomTruncation)&&(this._originalInnerHtml=n.innerHTML),n},i.prototype.truncateOverflow=function(t){return t>=this._computedLineHeight&&this.truncateIfSupported(t)},i.prototype.undoOverflowTruncation=function(){if(this.restoreOriginalContent(),dt.useAdvancedTextBlockTruncation&&this.maxLines){var t=this._computedLineHeight*this.maxLines;this.truncateIfSupported(t)}},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"wrap",this.wrap,!1),r.setNumberProperty(t,"maxLines",this.maxLines),t},i.prototype.applyStylesTo=function(t){e.prototype.applyStylesTo.call(this,t);var i=this.getParentContainer(),r=!!i&&i.isRtl();switch(this.horizontalAlignment){case n.HorizontalAlignment.Center:t.style.textAlign="center";break;case n.HorizontalAlignment.Right:t.style.textAlign=r?"left":"right";break;default:t.style.textAlign=r?"right":"left"}var o=this.hostConfig.lineHeights;if(o)switch(this.size){case n.TextSize.Small:this._computedLineHeight=o.small;break;case n.TextSize.Medium:this._computedLineHeight=o.medium;break;case n.TextSize.Large:this._computedLineHeight=o.large;break;case n.TextSize.ExtraLarge:this._computedLineHeight=o.extraLarge;break;default:this._computedLineHeight=o.default}else this._computedLineHeight=1.33*this.getFontSize(this.hostConfig.getFontTypeDefinition(this.fontType));t.style.lineHeight=this._computedLineHeight+"px"},i.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.wrap=r.getBoolValue(t.wrap,this.wrap),this.maxLines=r.getNumberValue(t.maxLines)},i.prototype.getJsonTypeName=function(){return"TextBlock"},i.prototype.updateLayout=function(t){void 0===t&&(t=!1),e.prototype.updateLayout.call(this,t),dt.useAdvancedTextBlockTruncation&&this.maxLines&&this.isRendered()&&(this.restoreOriginalContent(),this.truncateIfSupported(this._computedLineHeight*this.maxLines))},i}(m);exports.TextBlock=v;var b=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.getRenderedDomElementType=function(){return"label"},n.prototype.internalRender=function(){var t=e.prototype.internalRender.call(this);return t&&!r.isNullOrEmpty(this.forElementId)&&(t.htmlFor=this.forElementId),t},n}(v),C=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.italic=!1,t.strikethrough=!1,t.highlight=!1,t}return t(n,e),n.prototype.internalRender=function(){var t=this;if(r.isNullOrEmpty(this.text))return null;var e=this.hostConfig,n=s.formatText(this.lang,this.text),i=document.createElement("span");if(i.classList.add(e.makeCssClassName("ac-textRun")),this.applyStylesTo(i),this.selectAction&&e.supportsInteractivity){var o=document.createElement("a");o.classList.add(e.makeCssClassName("ac-anchor")),o.href=this.selectAction.getHref(),o.target="_blank",o.onclick=function(e){e.preventDefault(),e.cancelBubble=!0,t.selectAction.execute()},o.innerText=n,i.appendChild(o)}else i.innerText=n;return i},n.prototype.applyStylesTo=function(t){if(e.prototype.applyStylesTo.call(this,t),this.italic&&(t.style.fontStyle="italic"),this.strikethrough&&(t.style.textDecoration="line-through"),this.highlight){var n=this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors,this.effectiveColor);t.style.backgroundColor=r.stringToCssColor(this.isSubtle?n.highlightColors.subtle:n.highlightColors.default)}},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"italic",this.italic,!1),r.setProperty(t,"strikethrough",this.strikethrough,!1),r.setProperty(t,"highlight",this.highlight,!1),this.selectAction&&r.setProperty(t,"selectAction",this.selectAction.toJSON()),t},n.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.italic=r.getBoolValue(t.italic,this.italic),this.strikethrough=r.getBoolValue(t.strikethrough,this.strikethrough),this.highlight=r.getBoolValue(t.highlight,this.highlight),this.selectAction=p(this,t.selectAction,[q.JsonTypeName],!this.isDesignMode(),n)},n.prototype.getJsonTypeName=function(){return"TextRun"},Object.defineProperty(n.prototype,"isStandalone",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"isInline",{get:function(){return!0},enumerable:!0,configurable:!0}),n}(m);exports.TextRun=C;var E=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._inlines=[],t}return t(i,e),i.prototype.internalAddInline=function(t,e){if(void 0===e&&(e=!1),!t.isInline)throw new Error("RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline.");if(!(null==t.parent||e)&&t.parent!=this)throw new Error("RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock.");t.setParent(this),this._inlines.push(t)},i.prototype.internalRender=function(){if(this._inlines.length>0){var t=document.createElement("div");t.className=this.hostConfig.makeCssClassName("ac-richTextBlock");var e=this.getParentContainer(),i=!!e&&e.isRtl();switch(this.horizontalAlignment){case n.HorizontalAlignment.Center:t.style.textAlign="center";break;case n.HorizontalAlignment.Right:t.style.textAlign=i?"left":"right";break;default:t.style.textAlign=i?"right":"left"}for(var r=0,o=0,s=this._inlines;o<s.length;o++){var a=s[o].render();a&&(t.appendChild(a),r++)}if(r>0)return t}return null},i.prototype.asString=function(){for(var t="",e=0,n=this._inlines;e<n.length;e++){t+=n[e].asString()}return t},i.prototype.parse=function(t,n){if(e.prototype.parse.call(this,t,n),this._inlines=[],Array.isArray(t.inlines))for(var i=0,r=t.inlines;i<r.length;i++){var o=r[i],s=void 0;if("string"==typeof o){var a=new C;a.text=o,s=a}else s=c(this,o,!1,n);s&&this.internalAddInline(s,!0)}},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);if(this._inlines.length>0){for(var n=[],i=0,o=this._inlines;i<o.length;i++){var s=o[i];n.push(s.toJSON())}r.setProperty(t,"inlines",n)}return t},i.prototype.getJsonTypeName=function(){return"RichTextBlock"},i.prototype.getInlineCount=function(){return this._inlines.length},i.prototype.getInlineAt=function(t){if(t>=0&&t<this._inlines.length)return this._inlines[t];throw new Error("RichTextBlock.getInlineAt: Index out of range ("+t+")")},i.prototype.addInline=function(t){this.internalAddInline(t)},i.prototype.removeInline=function(t){var e=this._inlines.indexOf(t);return e>=0&&(this._inlines[e].setParent(null),this._inlines.splice(e,1),!0)},i}(y);exports.RichTextBlock=E;var x=function(e){function n(t,n){void 0===t&&(t=void 0),void 0===n&&(n=void 0);var i=e.call(this)||this;return i.name=t,i.value=n,i}return t(n,e),n.prototype.parse=function(t){e.prototype.parse.call(this,t),this.name=r.getStringValue(t.title),this.value=r.getStringValue(t.value)},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"title",this.name),r.setProperty(t,"value",this.value),t},n}(h);exports.Fact=x;var _=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.facts=[],t}return t(i,e),Object.defineProperty(i.prototype,"useDefaultSizing",{get:function(){return!1},enumerable:!0,configurable:!0}),i.prototype.internalRender=function(){var t=null,e=this.hostConfig;if(this.facts.length>0){(t=document.createElement("table")).style.borderWidth="0px",t.style.borderSpacing="0px",t.style.borderStyle="none",t.style.borderCollapse="collapse",t.style.display="block",t.style.overflow="hidden",t.classList.add(e.makeCssClassName("ac-factset"));for(var i=0;i<this.facts.length;i++){var o=document.createElement("tr");i>0&&(o.style.marginTop=e.factSet.spacing+"px");var s=document.createElement("td");s.style.padding="0",s.classList.add(e.makeCssClassName("ac-fact-title")),e.factSet.title.maxWidth&&(s.style.maxWidth=e.factSet.title.maxWidth+"px"),s.style.verticalAlign="top";var a=new v;a.setParent(this),a.text=r.isNullOrEmpty(this.facts[i].name)&&this.isDesignMode()?"Title":this.facts[i].name,a.size=e.factSet.title.size,a.color=e.factSet.title.color,a.isSubtle=e.factSet.title.isSubtle,a.weight=e.factSet.title.weight,a.wrap=e.factSet.title.wrap,a.spacing=n.Spacing.None,r.appendChild(s,a.render()),r.appendChild(o,s),(s=document.createElement("td")).style.width="10px",r.appendChild(o,s),(s=document.createElement("td")).style.padding="0",s.style.verticalAlign="top",s.classList.add(e.makeCssClassName("ac-fact-value")),(a=new v).setParent(this),a.text=this.facts[i].value,a.size=e.factSet.value.size,a.color=e.factSet.value.color,a.isSubtle=e.factSet.value.isSubtle,a.weight=e.factSet.value.weight,a.wrap=e.factSet.value.wrap,a.spacing=n.Spacing.None,r.appendChild(s,a.render()),r.appendChild(o,s),r.appendChild(t,o)}}return t},i.prototype.getJsonTypeName=function(){return"FactSet"},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setArrayProperty(t,"facts",this.facts),t},i.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.facts=[];var i=t.facts;if(Array.isArray(i))for(var r=0,o=i;r<o.length;r++){var s=o[r],a=new x;a.parse(s),this.facts.push(a)}},i}(y);exports.FactSet=_;var A=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t.style=n.ImageStyle.Default,t.size=n.Size.Auto,t.pixelWidth=null,t.pixelHeight=null,t.altText="",t}return t(o,e),o.prototype.parseDimension=function(t,e,r){if(e){if("string"==typeof e)try{var o=i.SizeAndUnit.parse(e);if(o.unit==n.SizeUnit.Pixel)return o.physicalSize}catch(s){}lt({error:n.ValidationError.InvalidPropertyValue,message:"Invalid image "+t+": "+e},r)}return 0},o.prototype.applySize=function(t){if(this.pixelWidth||this.pixelHeight)this.pixelWidth&&(t.style.width=this.pixelWidth+"px"),this.pixelHeight&&(t.style.height=this.pixelHeight+"px");else switch(this.size){case n.Size.Stretch:t.style.width="100%";break;case n.Size.Auto:t.style.maxWidth="100%";break;case n.Size.Small:t.style.width=this.hostConfig.imageSizes.small+"px";break;case n.Size.Large:t.style.width=this.hostConfig.imageSizes.large+"px";break;case n.Size.Medium:t.style.width=this.hostConfig.imageSizes.medium+"px"}},Object.defineProperty(o.prototype,"useDefaultSizing",{get:function(){return!1},enumerable:!0,configurable:!0}),o.prototype.internalRender=function(){var t=this,e=null;if(!r.isNullOrEmpty(this.url)){switch((e=document.createElement("div")).style.display="flex",e.style.alignItems="flex-start",e.onkeypress=function(e){!t.selectAction||13!=e.keyCode&&32!=e.keyCode||(e.preventDefault(),e.cancelBubble=!0,t.selectAction.execute())},e.onclick=function(e){t.selectAction&&(e.preventDefault(),e.cancelBubble=!0,t.selectAction.execute())},this.horizontalAlignment){case n.HorizontalAlignment.Center:e.style.justifyContent="center";break;case n.HorizontalAlignment.Right:e.style.justifyContent="flex-end";break;default:e.style.justifyContent="flex-start"}var i=this.hostConfig,o=document.createElement("img");o.onload=function(e){tt(t)},o.onerror=function(e){var n=t.getRootElement();if(t.renderedElement.innerHTML="",n&&n.designMode){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.backgroundColor="#EEEEEE",i.style.color="black",i.innerText=":-(",i.style.padding="10px",t.applySize(i),t.renderedElement.appendChild(i)}tt(t)},o.style.maxHeight="100%",o.style.minWidth="0",o.classList.add(i.makeCssClassName("ac-image")),null!=this.selectAction&&i.supportsInteractivity&&(o.tabIndex=0,o.setAttribute("role",this.selectAction.getAriaRole()),o.setAttribute("aria-label",this.selectAction.title),o.classList.add(i.makeCssClassName("ac-selectable"))),this.applySize(o),this.style===n.ImageStyle.Person&&(o.style.borderRadius="50%",o.style.backgroundPosition="50% 50%",o.style.backgroundRepeat="no-repeat"),r.isNullOrEmpty(this.backgroundColor)||(o.style.backgroundColor=r.stringToCssColor(this.backgroundColor)),o.src=this.url,r.isNullOrEmpty(this.altText)||(o.alt=this.altText),e.appendChild(o)}return e},o.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return this._selectAction&&r.setProperty(t,"selectAction",this._selectAction.toJSON()),r.setEnumProperty(n.ImageStyle,t,"style",this.style,n.ImageStyle.Default),r.setProperty(t,"backgroundColor",this.backgroundColor),r.setProperty(t,"url",this.url),r.setEnumProperty(n.Size,t,"size",this.size,n.Size.Auto),this.pixelWidth&&r.setProperty(t,"width",this.pixelWidth+"px"),this.pixelHeight&&r.setProperty(t,"height",this.pixelHeight+"px"),r.setProperty(t,"altText",this.altText),t},o.prototype.getJsonTypeName=function(){return"Image"},o.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);return!n&&this.selectAction&&(n=this.selectAction.getActionById(t)),n},o.prototype.parse=function(t,i){e.prototype.parse.call(this,t,i),this.url=r.getStringValue(t.url),this.backgroundColor=r.getStringValue(t.backgroundColor);var o=r.getStringValue(t.style);o&&"normal"===o.toLowerCase()?(this.style=n.ImageStyle.Default,lt({error:n.ValidationError.Deprecated,message:'The Image.style value "normal" is deprecated and will be removed. Use "default" instead.'},i)):this.style=r.getEnumValue(n.ImageStyle,o,this.style),this.size=r.getEnumValue(n.Size,t.size,this.size),this.altText=r.getStringValue(t.altText),t.pixelWidth&&"number"==typeof t.pixelWidth&&(this.pixelWidth=t.pixelWidth,lt({error:n.ValidationError.Deprecated,message:"The pixelWidth property is deprecated and will be removed. Use the width property instead."},i)),t.pixelHeight&&"number"==typeof t.pixelHeight&&(this.pixelHeight=t.pixelHeight,lt({error:n.ValidationError.Deprecated,message:"The pixelHeight property is deprecated and will be removed. Use the height property instead."},i));var s=this.parseDimension("width",t.width,i);s>0&&(this.pixelWidth=s),(s=this.parseDimension("height",t.height,i))>0&&(this.pixelHeight=s),this.selectAction=p(this,t.selectAction,[q.JsonTypeName],!this.isDesignMode(),i)},o.prototype.getResourceInformation=function(){return r.isNullOrEmpty(this.url)?[]:[{url:this.url,mimeType:"image"}]},Object.defineProperty(o.prototype,"selectAction",{get:function(){return this._selectAction},set:function(t){this._selectAction=t,this._selectAction&&this._selectAction.setParent(this)},enumerable:!0,configurable:!0}),o}(y);exports.Image=A;var S=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t._selectAction=null,t.allowVerticalOverflow=!1,t}return t(o,e),o.prototype.isElementAllowed=function(t,e){if(!this.hostConfig.supportsInteractivity&&t.isInteractive)return!1;if(e)for(var n=0,i=e;n<i.length;n++){var r=i[n];if(t.getJsonTypeName()===r)return!1}return!0},o.prototype.applyPadding=function(){if(e.prototype.applyPadding.call(this),this.renderedElement){var t=new i.SpacingDefinition;this.getEffectivePadding()&&(t=this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding())),this.renderedElement.style.paddingTop=t.top+"px",this.renderedElement.style.paddingRight=t.right+"px",this.renderedElement.style.paddingBottom=t.bottom+"px",this.renderedElement.style.paddingLeft=t.left+"px",this.renderedElement.style.marginRight="0",this.renderedElement.style.marginLeft="0"}},o.prototype.getSelectAction=function(){return this._selectAction},o.prototype.setSelectAction=function(t){this._selectAction=t,this._selectAction&&this._selectAction.setParent(this)},Object.defineProperty(o.prototype,"isSelectable",{get:function(){return!1},enumerable:!0,configurable:!0}),o.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.isSelectable&&(this._selectAction=p(this,t.selectAction,[q.JsonTypeName],!this.isDesignMode(),n))},o.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return this._selectAction&&this.isSelectable&&r.setProperty(t,"selectAction",this._selectAction.toJSON()),t},o.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t);for(var i=0;i<this.getItemCount();i++){var r=this.getItemAt(i);!this.hostConfig.supportsInteractivity&&r.isInteractive&&t.addFailure(this,{error:n.ValidationError.InteractivityNotAllowed,message:"Interactivity is not allowed."}),this.isElementAllowed(r,this.getForbiddenElementTypes())||t.addFailure(this,{error:n.ValidationError.InteractivityNotAllowed,message:"Elements of type "+r.getJsonTypeName()+" are not allowed in this container."}),r.internalValidateProperties(t)}this._selectAction&&this._selectAction.internalValidateProperties(t)},o.prototype.render=function(){var t=this,n=e.prototype.render.call(this),i=this.hostConfig;return this.allowVerticalOverflow&&(n.style.overflowX="hidden",n.style.overflowY="auto"),n&&this.isSelectable&&this._selectAction&&i.supportsInteractivity&&(n.classList.add(i.makeCssClassName("ac-selectable")),n.tabIndex=0,n.setAttribute("role",this._selectAction.getAriaRole()),n.setAttribute("aria-label",this._selectAction.title),n.onclick=function(e){null!=t._selectAction&&(e.preventDefault(),e.cancelBubble=!0,t._selectAction.execute())},n.onkeypress=function(e){null==t._selectAction||13!=e.keyCode&&32!=e.keyCode||(e.preventDefault(),e.cancelBubble=!0,t._selectAction.execute())}),n},o.prototype.updateLayout=function(t){if(void 0===t&&(t=!0),e.prototype.updateLayout.call(this,t),t)for(var n=0;n<this.getItemCount();n++)this.getItemAt(n).updateLayout()},o.prototype.getAllInputs=function(){for(var t=[],e=0;e<this.getItemCount();e++)t=t.concat(this.getItemAt(e).getAllInputs());return t},o.prototype.getResourceInformation=function(){for(var t=[],e=0;e<this.getItemCount();e++)t=t.concat(this.getItemAt(e).getResourceInformation());return t},o.prototype.getElementById=function(t){var n=e.prototype.getElementById.call(this,t);if(!n)for(var i=0;i<this.getItemCount()&&!(n=this.getItemAt(i).getElementById(t));i++);return n},o}(y);exports.CardElementContainer=S;var I=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._images=[],t.imageSize=n.Size.Medium,t}return t(i,e),i.prototype.internalRender=function(){var t=null;if(this._images.length>0){(t=document.createElement("div")).style.display="flex",t.style.flexWrap="wrap";for(var e=0;e<this._images.length;e++){this._images[e].size=this.imageSize;var n=this._images[e].render();n.style.display="inline-flex",n.style.margin="0px",n.style.marginRight="10px",n.style.maxHeight=this.hostConfig.imageSet.maxImageHeight+"px",r.appendChild(t,n)}}return t},i.prototype.getItemCount=function(){return this._images.length},i.prototype.getItemAt=function(t){return this._images[t]},i.prototype.getFirstVisibleRenderedItem=function(){return this._images&&this._images.length>0?this._images[0]:null},i.prototype.getLastVisibleRenderedItem=function(){return this._images&&this._images.length>0?this._images[this._images.length-1]:null},i.prototype.removeItem=function(t){if(t instanceof A){var e=this._images.indexOf(t);if(e>=0)return this._images.splice(e,1),t.setParent(null),this.updateLayout(),!0}return!1},i.prototype.getJsonTypeName=function(){return"ImageSet"},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);if(r.setEnumProperty(n.Size,t,"imageSize",this.imageSize,n.Size.Medium),this._images.length>0){for(var i=[],o=0,s=this._images;o<s.length;o++){var a=s[o];i.push(a.toJSON())}r.setProperty(t,"images",i)}return t},i.prototype.parse=function(t,i){if(e.prototype.parse.call(this,t,i),this.imageSize=r.getEnumValue(n.Size,t.imageSize,n.Size.Medium),null!=t.images){var o=t.images;this._images=[];for(var s=0;s<o.length;s++){var a=new A;a.parse(o[s],i),this.addImage(a)}}},i.prototype.addImage=function(t){if(t.parent)throw new Error("This image already belongs to another ImageSet");this._images.push(t),t.setParent(this)},i.prototype.indexOf=function(t){return t instanceof A?this._images.indexOf(t):-1},i}(S);exports.ImageSet=I;var w=function(e){function n(t,n){void 0===t&&(t=void 0),void 0===n&&(n=void 0);var i=e.call(this)||this;return i.url=t,i.mimeType=n,i}return t(n,e),n.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.mimeType=r.getStringValue(t.mimeType),this.url=r.getStringValue(t.url)},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"mimeType",this.mimeType),r.setProperty(t,"url",this.url),t},n}(h);exports.MediaSource=w;var P=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.sources=[],t}return t(n,e),n.prototype.getPosterUrl=function(){return this.poster?this.poster:this.hostConfig.media.defaultPoster},n.prototype.processSources=function(){this._selectedSources=[],this._selectedMediaType=void 0;for(var t=0,e=this.sources;t<e.length;t++){var i=e[t],r=i.mimeType?i.mimeType.split("/"):[];if(2==r.length){if(!this._selectedMediaType){var o=n.supportedMediaTypes.indexOf(r[0]);o>=0&&(this._selectedMediaType=n.supportedMediaTypes[o])}r[0]==this._selectedMediaType&&this._selectedSources.push(i)}}},n.prototype.renderPoster=function(){var t=this,e=document.createElement("div");e.className=this.hostConfig.makeCssClassName("ac-media-poster"),e.setAttribute("role","contentinfo"),e.setAttribute("aria-label",this.altText?this.altText:"Media content"),e.style.position="relative",e.style.display="flex";var i=this.getPosterUrl();if(i){var r=document.createElement("img");r.style.width="100%",r.style.height="100%",r.onerror=function(t){r.parentNode.removeChild(r),e.classList.add("empty"),e.style.minHeight="150px"},r.src=i,e.appendChild(r)}else e.classList.add("empty"),e.style.minHeight="150px";if(this.hostConfig.supportsInteractivity&&this._selectedSources.length>0){var o=document.createElement("div");o.setAttribute("role","button"),o.setAttribute("aria-label","Play media"),o.className=this.hostConfig.makeCssClassName("ac-media-playButton"),o.style.display="flex",o.style.alignItems="center",o.style.justifyContent="center",o.onclick=function(e){if(t.hostConfig.media.allowInlinePlayback){e.preventDefault(),e.cancelBubble=!0;var i=t.renderMediaPlayer();t.renderedElement.innerHTML="",t.renderedElement.appendChild(i),i.play()}else n.onPlay&&(e.preventDefault(),e.cancelBubble=!0,n.onPlay(t))};var s=document.createElement("div");s.className=this.hostConfig.makeCssClassName("ac-media-playButton-arrow"),s.style.width="12px",s.style.height="15px",s.style.borderTopWidth="7.5px",s.style.borderBottomWidth="7.5px",s.style.borderLeftWidth="12px",s.style.borderRightWidth="0",s.style.borderStyle="solid",s.style.borderTopColor="transparent",s.style.borderRightColor="transparent",s.style.borderBottomColor="transparent",s.style.transform="translate(1.2px,0px)",o.appendChild(s);var a=document.createElement("div");a.style.position="absolute",a.style.left="0",a.style.top="0",a.style.width="100%",a.style.height="100%",a.style.display="flex",a.style.justifyContent="center",a.style.alignItems="center",a.appendChild(o),e.appendChild(a)}return e},n.prototype.renderMediaPlayer=function(){var t;if("video"==this._selectedMediaType){var e=document.createElement("video"),n=this.getPosterUrl();n&&(e.poster=n),t=e}else t=document.createElement("audio");t.controls=!0,t.preload="none",t.style.width="100%";for(var i=0,r=this.sources;i<r.length;i++){var o=r[i],s=document.createElement("source");s.src=o.url,s.type=o.mimeType,t.appendChild(s)}return t},n.prototype.internalRender=function(){var t=document.createElement("div");return t.className=this.hostConfig.makeCssClassName("ac-media"),this.processSources(),t.appendChild(this.renderPoster()),t},n.prototype.parse=function(t,n){if(e.prototype.parse.call(this,t,n),this.poster=r.getStringValue(t.poster),this.altText=r.getStringValue(t.altText),this.sources=[],Array.isArray(t.sources))for(var i=0,o=t.sources;i<o.length;i++){var s=o[i],a=new w;a.parse(s,n),this.sources.push(a)}},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"poster",this.poster),r.setProperty(t,"altText",this.altText),r.setArrayProperty(t,"sources",this.sources),t},n.prototype.getJsonTypeName=function(){return"Media"},n.prototype.getResourceInformation=function(){var t=[],e=this.getPosterUrl();r.isNullOrEmpty(e)||t.push({url:e,mimeType:"image"});for(var n=0,i=this.sources;n<i.length;n++){var o=i[n];r.isNullOrEmpty(o.url)||t.push({url:o.url,mimeType:o.mimeType})}return t},Object.defineProperty(n.prototype,"selectedMediaType",{get:function(){return this._selectedMediaType},enumerable:!0,configurable:!0}),n.supportedMediaTypes=["audio","video"],n}(y);exports.Media=P;var T=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.necessity=n.InputValidationNecessity.Optional,t.errorMessage=void 0,t}return t(i,e),i.prototype.parse=function(t){e.prototype.parse.call(this,t),this.necessity=r.getEnumValue(n.InputValidationNecessity,t.necessity,this.necessity),this.errorMessage=r.getStringValue(t.errorMessage)},i.prototype.toJSON=function(){if(this.necessity==n.InputValidationNecessity.Optional&&r.isNullOrEmpty(this.errorMessage))return null;var t=e.prototype.toJSON.call(this);return r.setEnumProperty(n.InputValidationNecessity,t,"necessity",this.necessity,n.InputValidationNecessity.Optional),r.setProperty(t,"errorMessage",this.errorMessage),t},i}(h);exports.InputValidationOptions=T;var O=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.validation=new T,t}return t(i,e),Object.defineProperty(i.prototype,"isNullable",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"renderedInputControlElement",{get:function(){return this._renderedInputControlElement},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"inputControlContainerElement",{get:function(){return this._inputControlContainerElement},enumerable:!0,configurable:!0}),i.prototype.overrideInternalRender=function(){var t=this.hostConfig;return this._outerContainerElement=document.createElement("div"),this._outerContainerElement.style.display="flex",this._outerContainerElement.style.flexDirection="column",this._inputControlContainerElement=document.createElement("div"),this._inputControlContainerElement.className=t.makeCssClassName("ac-input-container"),this._inputControlContainerElement.style.display="flex",this._renderedInputControlElement=this.internalRender(),this._renderedInputControlElement.style.minWidth="0px",dt.useBuiltInInputValidation&&this.isNullable&&this.validation.necessity==n.InputValidationNecessity.RequiredWithVisualCue&&this._renderedInputControlElement.classList.add(t.makeCssClassName("ac-input-required")),this._inputControlContainerElement.appendChild(this._renderedInputControlElement),this._outerContainerElement.appendChild(this._inputControlContainerElement),this._outerContainerElement},i.prototype.valueChanged=function(){this.resetValidationFailureCue(),this.onValueChanged&&this.onValueChanged(this),rt(this)},i.prototype.resetValidationFailureCue=function(){dt.useBuiltInInputValidation&&this.renderedElement&&(this._renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName("ac-input-validation-failed")),this._errorMessageElement&&(this._outerContainerElement.removeChild(this._errorMessageElement),this._errorMessageElement=null))},i.prototype.showValidationErrorMessage=function(){this.renderedElement&&dt.useBuiltInInputValidation&&dt.displayInputValidationErrors&&!r.isNullOrEmpty(this.validation.errorMessage)&&(this._errorMessageElement=document.createElement("span"),this._errorMessageElement.className=this.hostConfig.makeCssClassName("ac-input-validation-error-message"),this._errorMessageElement.textContent=this.validation.errorMessage,this._outerContainerElement.appendChild(this._errorMessageElement))},i.prototype.parseInputValue=function(t){return t},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"title",this.title),r.setProperty(t,"value",this.renderedElement&&!r.isNullOrEmpty(this.value)?this.value:this.defaultValue),dt.useBuiltInInputValidation&&r.setProperty(t,"validation",this.validation.toJSON()),t},i.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),r.isNullOrEmpty(this.id)&&t.addFailure(this,{error:n.ValidationError.PropertyCantBeNull,message:"All inputs must have a unique Id"})},i.prototype.validateValue=function(){if(dt.useBuiltInInputValidation){this.resetValidationFailureCue();var t=this.validation.necessity==n.InputValidationNecessity.Optional||!r.isNullOrEmpty(this.value);return!t&&this.renderedElement&&(this._renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName("ac-input-validation-failed")),this.showValidationErrorMessage()),t}return!0},i.prototype.parse=function(t,n){if(e.prototype.parse.call(this,t,n),this.id=r.getStringValue(t.id),this.defaultValue=r.getStringValue(t.value),dt.useBuiltInInputValidation){var i=t.validation;i&&this.validation.parse(i)}},i.prototype.getAllInputs=function(){return[this]},Object.defineProperty(i.prototype,"defaultValue",{get:function(){return this._defaultValue},set:function(t){this._defaultValue=this.parseInputValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isInteractive",{get:function(){return!0},enumerable:!0,configurable:!0}),i}(y);exports.Input=O;var k=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMultiline=!1,t.style=n.InputTextStyle.Text,t}return t(i,e),i.prototype.internalRender=function(){var t=this;if(this.isMultiline){var e=document.createElement("textarea");return e.className=this.hostConfig.makeCssClassName("ac-input","ac-textInput","ac-multiline"),e.style.flex="1 1 auto",e.tabIndex=0,r.isNullOrEmpty(this.placeholder)||(e.placeholder=this.placeholder,e.setAttribute("aria-label",this.placeholder)),r.isNullOrEmpty(this.defaultValue)||(e.value=this.defaultValue),this.maxLength&&this.maxLength>0&&(e.maxLength=this.maxLength),e.oninput=function(){t.valueChanged()},e.onkeypress=function(e){10==e.keyCode&&t.inlineAction&&t.inlineAction.execute()},e}var i=document.createElement("input");return i.type=n.InputTextStyle[this.style].toLowerCase(),i.className=this.hostConfig.makeCssClassName("ac-input","ac-textInput"),i.style.flex="1 1 auto",i.tabIndex=0,r.isNullOrEmpty(this.placeholder)||(i.placeholder=this.placeholder,i.setAttribute("aria-label",this.placeholder)),r.isNullOrEmpty(this.defaultValue)||(i.value=this.defaultValue),this.maxLength&&this.maxLength>0&&(i.maxLength=this.maxLength),i.oninput=function(){t.valueChanged()},i.onkeypress=function(e){13==e.keyCode&&t.inlineAction&&t.inlineAction.execute()},i},i.prototype.overrideInternalRender=function(){var t=this,n=e.prototype.overrideInternalRender.call(this);if(this.inlineAction){var i=document.createElement("button");if(i.className=this.hostConfig.makeCssClassName("ac-inlineActionButton"),i.onclick=function(e){e.preventDefault(),e.cancelBubble=!0,t.inlineAction.execute()},r.isNullOrEmpty(this.inlineAction.iconUrl))i.classList.add("textOnly"),i.textContent=r.isNullOrEmpty(this.inlineAction.title)?"Title":this.inlineAction.title;else{i.classList.add("iconOnly");var o=document.createElement("img");o.style.height="100%",o.style.display="none",o.onload=function(){o.style.removeProperty("display")},o.onerror=function(){i.removeChild(o),i.classList.remove("iconOnly"),i.classList.add("textOnly"),i.textContent=r.isNullOrEmpty(t.inlineAction.title)?"Title":t.inlineAction.title},o.src=this.inlineAction.iconUrl,i.appendChild(o),r.isNullOrEmpty(this.inlineAction.title)||(i.title=this.inlineAction.title)}i.style.marginLeft="8px",this.inputControlContainerElement.appendChild(i)}return n},i.prototype.getJsonTypeName=function(){return"Input.Text"},i.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);return!n&&this.inlineAction&&(n=this.inlineAction.getActionById(t)),n},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"placeholder",this.placeholder),r.setNumberProperty(t,"maxLength",this.maxLength),r.setProperty(t,"isMultiline",this.isMultiline,!1),r.setEnumProperty(n.InputTextStyle,t,"style",this.style,n.InputTextStyle.Text),this._inlineAction&&r.setProperty(t,"inlineAction",this._inlineAction.toJSON()),t},i.prototype.parse=function(t,i){e.prototype.parse.call(this,t,i),this.maxLength=r.getNumberValue(t.maxLength),this.isMultiline=r.getBoolValue(t.isMultiline,this.isMultiline),this.placeholder=r.getStringValue(t.placeholder),this.style=r.getEnumValue(n.InputTextStyle,t.style,this.style),this.inlineAction=p(this,t.inlineAction,[q.JsonTypeName],!this.isDesignMode(),i)},Object.defineProperty(i.prototype,"inlineAction",{get:function(){return this._inlineAction},set:function(t){this._inlineAction=t,this._inlineAction&&this._inlineAction.setParent(this)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){return this.renderedInputControlElement?(this.isMultiline,this.renderedInputControlElement.value):null},enumerable:!0,configurable:!0}),i}(O);exports.TextInput=k;var V=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.valueOn="true",t.valueOff="false",t.wrap=!1,t}return t(n,e),n.prototype.internalRender=function(){var t=this,e=document.createElement("div");if(e.className=this.hostConfig.makeCssClassName("ac-input","ac-toggleInput"),e.style.width="100%",e.style.display="flex",e.style.alignItems="center",this._checkboxInputElement=document.createElement("input"),this._checkboxInputElement.id=r.generateUniqueId(),this._checkboxInputElement.type="checkbox",this._checkboxInputElement.style.display="inline-block",this._checkboxInputElement.style.verticalAlign="middle",this._checkboxInputElement.style.margin="0",this._checkboxInputElement.style.flex="0 0 auto",this._checkboxInputElement.setAttribute("aria-label",this.title),this._checkboxInputElement.tabIndex=0,this.defaultValue==this.valueOn&&(this._checkboxInputElement.checked=!0),this._checkboxInputElement.onchange=function(){t.valueChanged()},r.appendChild(e,this._checkboxInputElement),!r.isNullOrEmpty(this.title)||this.isDesignMode()){var n=new b;n.setParent(this),n.forElementId=this._checkboxInputElement.id,n.hostConfig=this.hostConfig,n.text=r.isNullOrEmpty(this.title)?this.getJsonTypeName():this.title,n.useMarkdown=dt.useMarkdownInRadioButtonAndCheckbox,n.wrap=this.wrap;var i=n.render();i.style.display="inline-block",i.style.flex="1 1 auto",i.style.marginLeft="6px",i.style.verticalAlign="middle";var o=document.createElement("div");o.style.width="6px",r.appendChild(e,o),r.appendChild(e,i)}return e},Object.defineProperty(n.prototype,"isNullable",{get:function(){return!1},enumerable:!0,configurable:!0}),n.prototype.getJsonTypeName=function(){return"Input.Toggle"},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"valueOn",this.valueOn,"true"),r.setProperty(t,"valueOff",this.valueOff,"false"),r.setProperty(t,"wrap",this.wrap),t},n.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.title=r.getStringValue(t.title),this.valueOn=r.getStringValue(t.valueOn,this.valueOn),this.valueOff=r.getStringValue(t.valueOff,this.valueOff),this.wrap=r.getBoolValue(t.wrap,this.wrap)},Object.defineProperty(n.prototype,"value",{get:function(){return this._checkboxInputElement?this._checkboxInputElement.checked?this.valueOn:this.valueOff:null},enumerable:!0,configurable:!0}),n}(O);exports.ToggleInput=V;var N=function(e){function n(t,n){void 0===t&&(t=void 0),void 0===n&&(n=void 0);var i=e.call(this)||this;return i.title=t,i.value=n,i}return t(n,e),n.prototype.parse=function(t){e.prototype.parse.call(this,t),this.title=r.getStringValue(t.title,""),this.value=r.getStringValue(t.value,"")},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"title",this.title),r.setProperty(t,"value",this.value),t},n}(h);exports.Choice=N;var B=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.choices=[],t.isCompact=!1,t.isMultiSelect=!1,t.wrap=!1,t}return t(i,e),i.getUniqueCategoryName=function(){var t="__ac-category"+i.uniqueCategoryCounter;return i.uniqueCategoryCounter++,t},i.prototype.internalApplyAriaCurrent=function(){var t=this._selectElement.options;if(t)for(var e=0;e<t.length;e++)t[e].selected?t[e].setAttribute("aria-current","true"):t[e].removeAttribute("aria-current")},i.prototype.internalRender=function(){var t=this;if(this.isMultiSelect){var e=this.defaultValue?this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator):null;(u=document.createElement("div")).className=this.hostConfig.makeCssClassName("ac-input","ac-choiceSetInput-multiSelect"),u.style.width="100%",this._toggleInputs=[];for(var n=0;n<this.choices.length;n++){var o=document.createElement("input");o.id=r.generateUniqueId(),o.type="checkbox",o.style.margin="0",o.style.display="inline-block",o.style.verticalAlign="middle",o.value=this.choices[n].value,o.style.flex="0 0 auto",o.setAttribute("aria-label",this.choices[n].title),e&&e.indexOf(this.choices[n].value)>=0&&(o.checked=!0),o.onchange=function(){t.valueChanged()},this._toggleInputs.push(o),(h=new b).setParent(this),h.forElementId=o.id,h.hostConfig=this.hostConfig,h.text=r.isNullOrEmpty(this.choices[n].title)?"Choice "+n:this.choices[n].title,h.useMarkdown=dt.useMarkdownInRadioButtonAndCheckbox,h.wrap=this.wrap,(d=h.render()).style.display="inline-block",d.style.flex="1 1 auto",d.style.marginLeft="6px",d.style.verticalAlign="middle",(f=document.createElement("div")).style.width="6px",(g=document.createElement("div")).style.display="flex",g.style.alignItems="center",r.appendChild(g,o),r.appendChild(g,f),r.appendChild(g,d),r.appendChild(u,g)}return u}if(this.isCompact){this._selectElement=document.createElement("select"),this._selectElement.className=this.hostConfig.makeCssClassName("ac-input","ac-multichoiceInput","ac-choiceSetInput-compact"),this._selectElement.style.width="100%";var s=document.createElement("option");s.selected=!0,s.disabled=!0,s.hidden=!0,s.value="",this.placeholder&&(s.text=this.placeholder),r.appendChild(this._selectElement,s);for(var a=0;a<this.choices.length;a++){var l=document.createElement("option");l.value=this.choices[a].value,l.text=this.choices[a].title,l.setAttribute("aria-label",this.choices[a].title),this.choices[a].value==this.defaultValue&&(l.selected=!0),r.appendChild(this._selectElement,l)}return this._selectElement.onchange=function(){t.internalApplyAriaCurrent(),t.valueChanged()},this.internalApplyAriaCurrent(),this._selectElement}var u,p=i.getUniqueCategoryName();(u=document.createElement("div")).className=this.hostConfig.makeCssClassName("ac-input","ac-choiceSetInput-expanded"),u.style.width="100%",this._toggleInputs=[];for(var c=0;c<this.choices.length;c++){var h,d,f,g,y=document.createElement("input");y.id=r.generateUniqueId(),y.type="radio",y.style.margin="0",y.style.display="inline-block",y.style.verticalAlign="middle",y.name=r.isNullOrEmpty(this.id)?p:this.id,y.value=this.choices[c].value,y.style.flex="0 0 auto",y.setAttribute("aria-label",this.choices[c].title),this.choices[c].value==this.defaultValue&&(y.checked=!0),y.onchange=function(){t.valueChanged()},this._toggleInputs.push(y),(h=new b).setParent(this),h.forElementId=y.id,h.hostConfig=this.hostConfig,h.text=r.isNullOrEmpty(this.choices[c].title)?"Choice "+c:this.choices[c].title,h.useMarkdown=dt.useMarkdownInRadioButtonAndCheckbox,h.wrap=this.wrap,(d=h.render()).style.display="inline-block",d.style.flex="1 1 auto",d.style.marginLeft="6px",d.style.verticalAlign="middle",(f=document.createElement("div")).style.width="6px",(g=document.createElement("div")).style.display="flex",g.style.alignItems="center",r.appendChild(g,y),r.appendChild(g,f),r.appendChild(g,d),r.appendChild(u,g)}return u},i.prototype.getJsonTypeName=function(){return"Input.ChoiceSet"},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"placeholder",this.placeholder),r.setArrayProperty(t,"choices",this.choices),r.setProperty(t,"style",this.isCompact?null:"expanded"),r.setProperty(t,"isMultiSelect",this.isMultiSelect,!1),r.setProperty(t,"wrap",this.wrap,!1),t},i.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),0==this.choices.length&&t.addFailure(this,{error:n.ValidationError.CollectionCantBeEmpty,message:"An Input.ChoiceSet must have at least one choice defined."});for(var i=0,r=this.choices;i<r.length;i++){var o=r[i];o.title&&o.value||t.addFailure(this,{error:n.ValidationError.PropertyCantBeNull,message:"All choices in an Input.ChoiceSet must have their title and value properties set."})}},i.prototype.parse=function(t,n){if(e.prototype.parse.call(this,t,n),this.isCompact=!("expanded"===t.style),this.isMultiSelect=r.getBoolValue(t.isMultiSelect,this.isMultiSelect),this.placeholder=r.getStringValue(t.placeholder),this.choices=[],Array.isArray(t.choices))for(var i=0,o=t.choices;i<o.length;i++){var s=o[i],a=new N;a.parse(s),this.choices.push(a)}this.wrap=r.getBoolValue(t.wrap,this.wrap)},Object.defineProperty(i.prototype,"value",{get:function(){if(this.isMultiSelect){if(!this._toggleInputs||0==this._toggleInputs.length)return null;var t="";for(e=0;e<this._toggleInputs.length;e++)this._toggleInputs[e].checked&&(""!=t&&(t+=this.hostConfig.choiceSetInputValueSeparator),t+=this._toggleInputs[e].value);return""==t?null:t}if(this.isCompact)return this._selectElement&&this._selectElement.selectedIndex>0?this._selectElement.value:null;if(!this._toggleInputs||0==this._toggleInputs.length)return null;for(var e=0;e<this._toggleInputs.length;e++)if(this._toggleInputs[e].checked)return this._toggleInputs[e].value;return null},enumerable:!0,configurable:!0}),i.uniqueCategoryCounter=0,i}(O);exports.ChoiceSetInput=B;var D=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.internalRender=function(){var t=this;return this._numberInputElement=document.createElement("input"),this._numberInputElement.setAttribute("type","number"),this.min&&this._numberInputElement.setAttribute("min",this.min.toString()),this.max&&this._numberInputElement.setAttribute("max",this.max.toString()),this._numberInputElement.className=this.hostConfig.makeCssClassName("ac-input","ac-numberInput"),this._numberInputElement.style.width="100%",this._numberInputElement.tabIndex=0,r.isNullOrEmpty(this.defaultValue)||(this._numberInputElement.value=this.defaultValue),r.isNullOrEmpty(this.placeholder)||(this._numberInputElement.placeholder=this.placeholder,this._numberInputElement.setAttribute("aria-label",this.placeholder)),this._numberInputElement.oninput=function(){t.valueChanged()},this._numberInputElement},n.prototype.getJsonTypeName=function(){return"Input.Number"},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"placeholder",this.placeholder),r.setNumberProperty(t,"min",this.min),r.setNumberProperty(t,"max",this.max),t},n.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.placeholder=r.getStringValue(t.placeholder),this.min=r.getNumberValue(t.min),this.max=r.getNumberValue(t.max)},Object.defineProperty(n.prototype,"min",{get:function(){return this._min},set:function(t){this._min=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"max",{get:function(){return this._max},set:function(t){this._max=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._numberInputElement?this._numberInputElement.value:void 0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"valueAsNumber",{get:function(){return this._numberInputElement?this._numberInputElement.valueAsNumber:void 0},enumerable:!0,configurable:!0}),n}(O);exports.NumberInput=D;var z=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.internalRender=function(){var t=this;return this._dateInputElement=document.createElement("input"),this._dateInputElement.setAttribute("type","date"),this._dateInputElement.setAttribute("min",this.min),this._dateInputElement.setAttribute("max",this.max),this._dateInputElement.className=this.hostConfig.makeCssClassName("ac-input","ac-dateInput"),this._dateInputElement.style.width="100%",this._dateInputElement.oninput=function(){t.valueChanged()},r.isNullOrEmpty(this.defaultValue)||(this._dateInputElement.value=this.defaultValue),this._dateInputElement},n.prototype.getJsonTypeName=function(){return"Input.Date"},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"min",this.min),r.setProperty(t,"max",this.max),t},n.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.min=r.getStringValue(t.min),this.max=r.getStringValue(t.max)},Object.defineProperty(n.prototype,"min",{get:function(){return this._min},set:function(t){this._min=this.parseInputValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"max",{get:function(){return this._max},set:function(t){this._max=this.parseInputValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._dateInputElement?this._dateInputElement.value:null},enumerable:!0,configurable:!0}),n}(O);exports.DateInput=z;var R,F=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.internalRender=function(){var t=this;return this._timeInputElement=document.createElement("input"),this._timeInputElement.setAttribute("type","time"),this._timeInputElement.setAttribute("min",this.min),this._timeInputElement.setAttribute("max",this.max),this._timeInputElement.className=this.hostConfig.makeCssClassName("ac-input","ac-timeInput"),this._timeInputElement.style.width="100%",this._timeInputElement.oninput=function(){t.valueChanged()},r.isNullOrEmpty(this.defaultValue)||(this._timeInputElement.value=this.defaultValue),this._timeInputElement},n.prototype.parseInputValue=function(t){return/^[0-9]{2}:[0-9]{2}$/.test(t)?t:null},n.prototype.getJsonTypeName=function(){return"Input.Time"},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"min",this.min),r.setProperty(t,"max",this.max),t},n.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.min=r.getStringValue(t.min),this.max=r.getStringValue(t.max)},Object.defineProperty(n.prototype,"min",{get:function(){return this._min},set:function(t){this._min=this.parseInputValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"max",{get:function(){return this._max},set:function(t){this._max=this.parseInputValue(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"value",{get:function(){return this._timeInputElement?this._timeInputElement.value:null},enumerable:!0,configurable:!0}),n}(O);exports.TimeInput=F,function(t){t[t.Normal=0]="Normal",t[t.Expanded=1]="Expanded",t[t.Subdued=2]="Subdued"}(R||(R={}));var M=function(){function t(t,e){this._state=R.Normal,this.onClick=null,this.action=t,this._parentContainerStyle=e}return t.prototype.updateCssStyle=function(){var t,e,i=this.action.parent.hostConfig;switch(this.action.renderedElement.className=i.makeCssClassName("ac-pushButton"),r.isNullOrEmpty(this._parentContainerStyle)||this.action.renderedElement.classList.add("style-"+this._parentContainerStyle),this.action instanceof q&&this.action.renderedElement.classList.add(i.makeCssClassName("expandable")),this.action.renderedElement.classList.remove(i.makeCssClassName("expanded")),this.action.renderedElement.classList.remove(i.makeCssClassName("subdued")),this._state){case R.Expanded:this.action.renderedElement.classList.add(i.makeCssClassName("expanded"));break;case R.Subdued:this.action.renderedElement.classList.add(i.makeCssClassName("subdued"))}r.isNullOrEmpty(this.action.style)||(this.action.style===n.ActionStyle.Positive?(t=this.action.renderedElement.classList).add.apply(t,i.makeCssClassNames("primary","style-positive")):(e=this.action.renderedElement.classList).add.apply(e,i.makeCssClassNames("style-"+this.action.style.toLowerCase())))},t.prototype.render=function(){var t=this;this.action.render(),this.action.renderedElement.onclick=function(e){e.preventDefault(),e.cancelBubble=!0,t.click()},this.updateCssStyle()},t.prototype.click=function(){null!=this.onClick&&this.onClick(this)},Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(t){this._state=t,this.updateCssStyle()},enumerable:!0,configurable:!0}),t}(),L=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._shouldFallback=!1,t._parent=null,t._actionCollection=null,t._renderedElement=null,t.requires=new o.HostCapabilities,t.style=n.ActionStyle.Default,t}return t(i,e),i.prototype.setCollection=function(t){this._actionCollection=t},i.prototype.addCssClasses=function(t){},i.prototype.internalGetReferencedInputs=function(t){return{}},i.prototype.internalPrepareForExecution=function(t){},i.prototype.internalValidateInputs=function(t){var e=[];if(dt.useBuiltInInputValidation&&!this.ignoreInputValidation)for(var n=0,i=Object.keys(t);n<i.length;n++){var r=t[i[n]];r.validateValue()||e.push(r)}return e},i.prototype.getAriaRole=function(){return"button"},i.prototype.getHref=function(){return""},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"type",this.getJsonTypeName()),r.setProperty(t,"title",this.title),r.setProperty(t,"iconUrl",this.iconUrl),r.setProperty(t,"style",this.style,n.ActionStyle.Default),t},i.prototype.render=function(t){void 0===t&&(t="ac-pushButton");var e=this.parent.hostConfig,i=document.createElement("button");this.addCssClasses(i),i.setAttribute("aria-label",this.title),i.type="button",i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.setAttribute("role",this.getAriaRole());var o=!r.isNullOrEmpty(this.title),s=document.createElement("div");if(s.style.overflow="hidden",s.style.textOverflow="ellipsis",e.actions.iconPlacement==n.ActionIconPlacement.AboveTitle||e.actions.allowTitleToWrap||(s.style.whiteSpace="nowrap"),o&&(s.innerText=this.title),r.isNullOrEmpty(this.iconUrl))i.classList.add("noIcon"),i.appendChild(s);else{var a=document.createElement("img");a.src=this.iconUrl,a.style.width=e.actions.iconSize+"px",a.style.height=e.actions.iconSize+"px",a.style.flex="0 0 auto",e.actions.iconPlacement==n.ActionIconPlacement.AboveTitle?(i.classList.add("iconAbove"),i.style.flexDirection="column",o&&(a.style.marginBottom="4px")):(i.classList.add("iconLeft"),o&&(a.style.marginRight="4px")),i.appendChild(a),i.appendChild(s)}this._renderedElement=i},i.prototype.setParent=function(t){this._parent=t},i.prototype.execute=function(){this.onExecute&&this.onExecute(this),nt(this)},i.prototype.prepareForExecution=function(){var t=this.getReferencedInputs();return!(this.internalValidateInputs(t).length>0)&&(this.internalPrepareForExecution(t),!0)},i.prototype.parse=function(t,i){e.prototype.parse.call(this,t,i),at(this,t,i),this.requires.parse(t.requires,i),t.title||""===t.title||lt({error:n.ValidationError.PropertyCantBeNull,message:"Actions should always have a title."},i),this.title=r.getStringValue(t.title),this.iconUrl=r.getStringValue(t.iconUrl),this.style=r.getStringValue(t.style,this.style)},i.prototype.remove=function(){return!!this._actionCollection&&this._actionCollection.removeAction(this)},i.prototype.getAllInputs=function(){return[]},i.prototype.getResourceInformation=function(){return r.isNullOrEmpty(this.iconUrl)?[]:[{url:this.iconUrl,mimeType:"image"}]},i.prototype.getActionById=function(t){if(this.id==t)return this},i.prototype.getReferencedInputs=function(){return this.internalGetReferencedInputs(this.parent.getRootElement().getAllInputs())},i.prototype.validateInputs=function(){return this.internalValidateInputs(this.getReferencedInputs())},i.prototype.shouldFallback=function(){return this._shouldFallback||!this.requires.areAllMet(this.parent.hostConfig.hostCapabilities)},Object.defineProperty(i.prototype,"isPrimary",{get:function(){return this.style==n.ActionStyle.Positive},set:function(t){t?this.style=n.ActionStyle.Positive:this.style==n.ActionStyle.Positive&&(this.style=n.ActionStyle.Default)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"ignoreInputValidation",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"parent",{get:function(){return this._parent},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"renderedElement",{get:function(){return this._renderedElement},enumerable:!0,configurable:!0}),i}(g);exports.Action=L;var J=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t._isPrepared=!1,t._ignoreInputValidation=!1,t}return t(n,e),n.prototype.internalGetReferencedInputs=function(t){for(var e={},n=0,i=t;n<i.length;n++){var r=i[n];e[r.id]=r}return e},n.prototype.internalPrepareForExecution=function(t){this._originalData?this._processedData=JSON.parse(JSON.stringify(this._originalData)):this._processedData={};for(var e=0,n=Object.keys(t);e<n.length;e++){var i=t[n[e]];null!=i.value&&(this._processedData[i.id]=i.value)}this._isPrepared=!0},n.prototype.getJsonTypeName=function(){return n.JsonTypeName},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"ignoreInputValidation",this.ignoreInputValidation,!1),r.setProperty(t,"data",this._originalData),t},n.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this._ignoreInputValidation=r.getBoolValue(t.ignoreInputValidation,this._ignoreInputValidation),this.data=t.data},Object.defineProperty(n.prototype,"ignoreInputValidation",{get:function(){return this._ignoreInputValidation},set:function(t){this._ignoreInputValidation=t},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"data",{get:function(){return this._isPrepared?this._processedData:this._originalData},set:function(t){this._originalData=t,this._isPrepared=!1},enumerable:!0,configurable:!0}),n.JsonTypeName="Action.Submit",n}(L);exports.SubmitAction=J;var H=function(e){function i(){return null!==e&&e.apply(this,arguments)||this}return t(i,e),i.prototype.getJsonTypeName=function(){return i.JsonTypeName},i.prototype.getAriaRole=function(){return"link"},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"url",this.url),t},i.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),r.isNullOrEmpty(this.url)&&t.addFailure(this,{error:n.ValidationError.PropertyCantBeNull,message:"An Action.OpenUrl must have its url property set."})},i.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this.url=r.getStringValue(t.url)},i.prototype.getHref=function(){return this.url},i.JsonTypeName="Action.OpenUrl",i}(L);exports.OpenUrlAction=H;var j=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.targetElements={},t}return t(n,e),n.prototype.getJsonTypeName=function(){return n.JsonTypeName},n.prototype.execute=function(){for(var t=0,e=Object.keys(this.targetElements);t<e.length;t++){var n=e[t],i=this.parent.getRootElement().getElementById(n);i&&("boolean"==typeof this.targetElements[n]?i.isVisible=this.targetElements[n]:i.isVisible=!i.isVisible)}},n.prototype.parse=function(t){e.prototype.parse.call(this,t),this.targetElements={};var n=t.targetElements;if(n&&Array.isArray(n))for(var i=0,o=n;i<o.length;i++){var s=o[i];if("string"==typeof s)this.targetElements[s]=void 0;else if("object"==typeof s){var a=s.elementId;a&&"string"==typeof a&&(this.targetElements[a]=r.getBoolValue(s.isVisible,void 0))}}},n.prototype.toJSON=function(){for(var t=e.prototype.toJSON.call(this),n=[],i=0,r=Object.keys(this.targetElements);i<r.length;i++){var o=r[i];"boolean"==typeof this.targetElements[o]?n.push({elementId:o,isVisible:this.targetElements[o]}):n.push(o)}return t.targetElements=n,t},n.prototype.addTargetElement=function(t,e){void 0===e&&(e=void 0),this.targetElements[t]=e},n.prototype.removeTargetElement=function(t){delete this.targetElements[t]},n.JsonTypeName="Action.ToggleVisibility",n}(L);exports.ToggleVisibilityAction=j;var U=function(e){function n(t,n){void 0===t&&(t=""),void 0===n&&(n="");var r=e.call(this)||this;return r._value=new i.StringWithSubstitutions,r.name=t,r.value=n,r}return t(n,e),n.prototype.parse=function(t){e.prototype.parse.call(this,t),this.name=r.getStringValue(t.name),this.value=r.getStringValue(t.value)},n.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"name",this.name),r.setProperty(t,"value",this._value.getOriginal()),t},n.prototype.getReferencedInputs=function(t,e){this._value.getReferencedInputs(t,e)},n.prototype.prepareForExecution=function(t){this._value.substituteInputValues(t,i.ContentTypes.applicationXWwwFormUrlencoded)},Object.defineProperty(n.prototype,"value",{get:function(){return this._value.get()},set:function(t){this._value.set(t)},enumerable:!0,configurable:!0}),n}(h);exports.HttpHeader=U;var W=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t._url=new i.StringWithSubstitutions,t._body=new i.StringWithSubstitutions,t._headers=[],t._ignoreInputValidation=!1,t}return t(o,e),o.prototype.internalGetReferencedInputs=function(t){var e={};this._url.getReferencedInputs(t,e);for(var n=0,i=this._headers;n<i.length;n++){i[n].getReferencedInputs(t,e)}return this._body.getReferencedInputs(t,e),e},o.prototype.internalPrepareForExecution=function(t){this._url.substituteInputValues(t,i.ContentTypes.applicationXWwwFormUrlencoded);for(var e=i.ContentTypes.applicationJson,n=0,r=this._headers;n<r.length;n++){var o=r[n];o.prepareForExecution(t),o.name&&"content-type"==o.name.toLowerCase()&&(e=o.value)}this._body.substituteInputValues(t,e)},o.prototype.getJsonTypeName=function(){return o.JsonTypeName},o.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"method",this.method),r.setProperty(t,"url",this._url.getOriginal()),r.setProperty(t,"body",this._body.getOriginal()),r.setProperty(t,"ignoreInputValidation",this.ignoreInputValidation,!1),r.setArrayProperty(t,"headers",this.headers),t},o.prototype.internalValidateProperties=function(t){if(e.prototype.internalValidateProperties.call(this,t),r.isNullOrEmpty(this.url)&&t.addFailure(this,{error:n.ValidationError.PropertyCantBeNull,message:"An Action.Http must have its url property set."}),this.headers.length>0)for(var i=0,o=this.headers;i<o.length;i++){o[i].name||t.addFailure(this,{error:n.ValidationError.PropertyCantBeNull,message:"All headers of an Action.Http must have their name and value properties set."})}},o.prototype.parse=function(t,n){if(e.prototype.parse.call(this,t,n),this.url=r.getStringValue(t.url),this.method=r.getStringValue(t.method),this.body=r.getStringValue(t.body),this._ignoreInputValidation=r.getBoolValue(t.ignoreInputValidation,this._ignoreInputValidation),this._headers=[],Array.isArray(t.headers))for(var i=0,o=t.headers;i<o.length;i++){var s=o[i],a=new U;a.parse(s),this.headers.push(a)}},Object.defineProperty(o.prototype,"ignoreInputValidation",{get:function(){return this._ignoreInputValidation},set:function(t){this._ignoreInputValidation=t},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"url",{get:function(){return this._url.get()},set:function(t){this._url.set(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"body",{get:function(){return this._body.get()},set:function(t){this._body.set(t)},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"headers",{get:function(){return this._headers?this._headers:[]},set:function(t){this._headers=t},enumerable:!0,configurable:!0}),o.JsonTypeName="Action.Http",o}(L);exports.HttpAction=W;var q=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.card=new ft,t}return t(i,e),i.prototype.addCssClasses=function(t){e.prototype.addCssClasses.call(this,t),t.classList.add(this.parent.hostConfig.makeCssClassName("expandable"))},i.prototype.getJsonTypeName=function(){return i.JsonTypeName},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return this.card&&r.setProperty(t,"card",this.card.toJSON()),t},i.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this.card.internalValidateProperties(t)},i.prototype.parse=function(t,i){e.prototype.parse.call(this,t,i);var r=t.card;r?this.card.parse(r,i):lt({error:n.ValidationError.PropertyCantBeNull,message:'An Action.ShowCard must have its "card" property set to a valid AdaptiveCard object.'},i)},i.prototype.setParent=function(t){e.prototype.setParent.call(this,t),this.card.setParent(t)},i.prototype.getAllInputs=function(){return this.card.getAllInputs()},i.prototype.getResourceInformation=function(){return e.prototype.getResourceInformation.call(this).concat(this.card.getResourceInformation())},i.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);return n||(n=this.card.getActionById(t)),n},i.JsonTypeName="Action.ShowCard",i}(L);exports.ShowCardAction=q;var G=function(){function t(t){this._expandedAction=null,this._renderedActionCount=0,this._actionCard=null,this.items=[],this.buttons=[],this._owner=t}return t.prototype.refreshContainer=function(){if(this._actionCardContainer.innerHTML="",null!==this._actionCard){this._actionCardContainer.style.marginTop=this._renderedActionCount>0?this._owner.hostConfig.actions.showCard.inlineTopMargin+"px":"0px";var t=this._owner.getEffectivePadding();this._owner.getImmediateSurroundingPadding(t);var e=this._owner.hostConfig.paddingDefinitionToSpacingDefinition(t);null!==this._actionCard&&(this._actionCard.style.paddingLeft=e.left+"px",this._actionCard.style.paddingRight=e.right+"px",this._actionCard.style.marginLeft="-"+e.left+"px",this._actionCard.style.marginRight="-"+e.right+"px",0==e.bottom||this._owner.isDesignMode()||(this._actionCard.style.paddingBottom=e.bottom+"px",this._actionCard.style.marginBottom="-"+e.bottom+"px"),r.appendChild(this._actionCardContainer,this._actionCard))}else this._actionCardContainer.style.marginTop="0px"},t.prototype.layoutChanged=function(){this._owner.getRootElement().updateLayout()},t.prototype.hideActionCard=function(){var t=this._expandedAction;this._expandedAction=null,this._actionCard=null,this.refreshContainer(),t&&(this.layoutChanged(),it(t,!1))},t.prototype.showActionCard=function(t,e,n){if(void 0===e&&(e=!1),void 0===n&&(n=!0),null!=t.card){t.card.suppressStyle=e;var i=t.card.renderedElement?t.card.renderedElement:t.card.render();this._actionCard=i,this._expandedAction=t,this.refreshContainer(),n&&(this.layoutChanged(),it(t,!0))}},t.prototype.collapseExpandedAction=function(){for(var t=0;t<this.buttons.length;t++)this.buttons[t].state=R.Normal;this.hideActionCard()},t.prototype.expandShowCardAction=function(t,e){for(var n=0;n<this.buttons.length;n++)this.buttons[n].action!==t?this.buttons[n].state=R.Subdued:this.buttons[n].state=R.Expanded;this.showActionCard(t,!(this._owner.isAtTheVeryLeft()&&this._owner.isAtTheVeryRight()),e)},t.prototype.actionClicked=function(t){if(t.action instanceof q)this._owner.hostConfig.actions.showCard.actionMode===n.ShowCardActionMode.Popup?t.action.execute():t.action===this._expandedAction?this.collapseExpandedAction():this.expandShowCardAction(t.action,!0);else{for(var e=0;e<this.buttons.length;e++)this.buttons[e].state=R.Normal;this.hideActionCard(),t.action.execute()}},t.prototype.getParentContainer=function(){return this._owner instanceof K?this._owner:this._owner.getParentContainer()},t.prototype.findActionButton=function(t){for(var e=0,n=this.buttons;e<n.length;e++){var i=n[e];if(i.action==t)return i}return null},t.prototype.parse=function(t,e){if(this.clear(),t&&t instanceof Array)for(var n=0,i=t;n<i.length;n++){var r=i[n],o=p(this._owner,r,[],!this._owner.isDesignMode(),e);o&&this.addAction(o)}},t.prototype.toJSON=function(){if(this.items.length>0){for(var t=[],e=0,n=this.items;e<n.length;e++){var i=n[e];t.push(i.toJSON())}return t}return null},t.prototype.getActionById=function(t){for(var e=null,n=0;n<this.items.length&&!(e=this.items[n].getActionById(t));n++);return e},t.prototype.validateProperties=function(t){this._owner.hostConfig.actions.maxActions&&this.items.length>this._owner.hostConfig.actions.maxActions&&t.addFailure(this._owner,{error:n.ValidationError.TooManyActions,message:"A maximum of "+this._owner.hostConfig.actions.maxActions+" actions are allowed."}),this.items.length>0&&!this._owner.hostConfig.supportsInteractivity&&t.addFailure(this._owner,{error:n.ValidationError.InteractivityNotAllowed,message:"Interactivity is not allowed."});for(var e=0,i=this.items;e<i.length;e++){var r=i[e];l(r,this._owner.getForbiddenActionTypes())||t.addFailure(this._owner,{error:n.ValidationError.ActionTypeNotAllowed,message:"Actions of type "+r.getJsonTypeName()+" are not allowe."}),r.internalValidateProperties(t)}},t.prototype.render=function(t,e){var i=this,o=this._owner.hostConfig;if(!o.supportsInteractivity)return null;var s=document.createElement("div"),a=o.actions.maxActions?Math.min(o.actions.maxActions,this.items.length):this.items.length,u=this._owner.getForbiddenActionTypes();if(this._actionCardContainer=document.createElement("div"),this._renderedActionCount=0,o.actions.preExpandSingleShowCardAction&&1==a&&this.items[0]instanceof q&&l(this.items[0],u))this.showActionCard(this.items[0],!0),this._renderedActionCount=1;else{var p=document.createElement("div");if(p.className=o.makeCssClassName("ac-actionSet"),p.style.display="flex",t==n.Orientation.Horizontal)if(p.style.flexDirection="row",this._owner.horizontalAlignment&&o.actions.actionAlignment!=n.ActionAlignment.Stretch)switch(this._owner.horizontalAlignment){case n.HorizontalAlignment.Center:p.style.justifyContent="center";break;case n.HorizontalAlignment.Right:p.style.justifyContent="flex-end";break;default:p.style.justifyContent="flex-start"}else switch(o.actions.actionAlignment){case n.ActionAlignment.Center:p.style.justifyContent="center";break;case n.ActionAlignment.Right:p.style.justifyContent="flex-end";break;default:p.style.justifyContent="flex-start"}else if(p.style.flexDirection="column",this._owner.horizontalAlignment&&o.actions.actionAlignment!=n.ActionAlignment.Stretch)switch(this._owner.horizontalAlignment){case n.HorizontalAlignment.Center:p.style.alignItems="center";break;case n.HorizontalAlignment.Right:p.style.alignItems="flex-end";break;default:p.style.alignItems="flex-start"}else switch(o.actions.actionAlignment){case n.ActionAlignment.Center:p.style.alignItems="center";break;case n.ActionAlignment.Right:p.style.alignItems="flex-end";break;case n.ActionAlignment.Stretch:p.style.alignItems="stretch";break;default:p.style.alignItems="flex-start"}for(var c=this.getParentContainer().getEffectiveStyle(),h=0;h<this.items.length;h++)if(l(this.items[h],u)){var d=this.findActionButton(this.items[h]);if(d||((d=new M(this.items[h],c)).onClick=function(t){i.actionClicked(t)},this.buttons.push(d)),d.render(),o.actions.actionsOrientation==n.Orientation.Horizontal&&o.actions.actionAlignment==n.ActionAlignment.Stretch?d.action.renderedElement.style.flex="0 1 100%":d.action.renderedElement.style.flex="0 1 auto",p.appendChild(d.action.renderedElement),this._renderedActionCount++,this._renderedActionCount>=o.actions.maxActions||h==this.items.length-1)break;if(o.actions.buttonSpacing>0){var f=document.createElement("div");t===n.Orientation.Horizontal?(f.style.flex="0 0 auto",f.style.width=o.actions.buttonSpacing+"px"):f.style.height=o.actions.buttonSpacing+"px",r.appendChild(p,f)}}var g=document.createElement("div");g.style.overflow="hidden",g.appendChild(p),r.appendChild(s,g)}r.appendChild(s,this._actionCardContainer);for(h=0;h<this.buttons.length;h++)if(this.buttons[h].state==R.Expanded){this.expandShowCardAction(this.buttons[h].action,!1);break}return this._renderedActionCount>0?s:null},t.prototype.addAction=function(t){if(!t)throw new Error("The action parameter cannot be null.");if(t.parent&&t.parent!==this._owner||!(this.items.indexOf(t)<0))throw new Error("The action already belongs to another element.");this.items.push(t),t.parent||t.setParent(this._owner),a(t,this)},t.prototype.removeAction=function(t){this.expandedAction&&this._expandedAction==t&&this.collapseExpandedAction();var e=this.items.indexOf(t);if(e>=0){this.items.splice(e,1),t.setParent(null),a(t,null);for(var n=0;n<this.buttons.length;n++)if(this.buttons[n].action==t){this.buttons.splice(n,1);break}return!0}return!1},t.prototype.clear=function(){this.items=[],this.buttons=[],this._expandedAction=null,this._renderedActionCount=0},t.prototype.getAllInputs=function(){for(var t=[],e=0;e<this.items.length;e++){var n=this.items[e];t=t.concat(n.getAllInputs())}return t},t.prototype.getResourceInformation=function(){for(var t=[],e=0;e<this.items.length;e++)t=t.concat(this.items[e].getResourceInformation());return t},Object.defineProperty(t.prototype,"renderedActionCount",{get:function(){return this._renderedActionCount},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"expandedAction",{get:function(){return this._expandedAction},enumerable:!0,configurable:!0}),t}(),X=function(e){function i(){var t=e.call(this)||this;return t.orientation=null,t._actionCollection=new G(t),t}return t(i,e),i.prototype.internalRender=function(){return this._actionCollection.render(this.orientation?this.orientation:this.hostConfig.actions.actionsOrientation,this.isDesignMode())},i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setEnumProperty(n.Orientation,t,"orientation",this.orientation),r.setProperty(t,"actions",this._actionCollection.toJSON()),t},i.prototype.isBleedingAtBottom=function(){return 0==this._actionCollection.renderedActionCount?e.prototype.isBleedingAtBottom.call(this):1==this._actionCollection.items.length?null!=this._actionCollection.expandedAction&&!this.hostConfig.actions.preExpandSingleShowCardAction:null!=this._actionCollection.expandedAction},i.prototype.getJsonTypeName=function(){return"ActionSet"},i.prototype.getActionCount=function(){return this._actionCollection.items.length},i.prototype.getActionAt=function(t){if(t>=0&&t<this.getActionCount())return this._actionCollection.items[t];e.prototype.getActionAt.call(this,t)},i.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this._actionCollection.validateProperties(t)},i.prototype.parse=function(t,i){e.prototype.parse.call(this,t,i);var o=t.orientation;o&&(this.orientation=r.getEnumValue(n.Orientation,o,n.Orientation.Horizontal)),this._actionCollection.parse(t.actions,i)},i.prototype.addAction=function(t){this._actionCollection.addAction(t)},i.prototype.getAllInputs=function(){return this._actionCollection.getAllInputs()},i.prototype.getResourceInformation=function(){return this._actionCollection.getResourceInformation()},Object.defineProperty(i.prototype,"isInteractive",{get:function(){return!0},enumerable:!0,configurable:!0}),i}(y);exports.ActionSet=X;var Y=function(e){function o(){var t=null!==e&&e.apply(this,arguments)||this;return t._style=null,t._bleed=!1,t}return t(o,e),o.prototype.applyBackground=function(){var t=this.hostConfig.containerStyles.getStyleByName(this.style,this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));r.isNullOrEmpty(t.backgroundColor)||(this.renderedElement.style.backgroundColor=r.stringToCssColor(t.backgroundColor))},o.prototype.applyPadding=function(){if(e.prototype.applyPadding.call(this),this.renderedElement){var t=new i.SpacingDefinition;if(this.getEffectivePadding()&&(t=this.hostConfig.paddingDefinitionToSpacingDefinition(this.getEffectivePadding())),this.renderedElement.style.paddingTop=t.top+"px",this.renderedElement.style.paddingRight=t.right+"px",this.renderedElement.style.paddingBottom=t.bottom+"px",this.renderedElement.style.paddingLeft=t.left+"px",this.isBleeding()){var r=new i.PaddingDefinition;this.getImmediateSurroundingPadding(r);var o=this.hostConfig.paddingDefinitionToSpacingDefinition(r);this.renderedElement.style.marginRight="-"+o.right+"px",this.renderedElement.style.marginLeft="-"+o.left+"px",this.isDesignMode()||(this.renderedElement.style.marginTop="-"+o.top+"px",this.renderedElement.style.marginBottom="-"+o.bottom+"px"),this.separatorElement&&this.separatorOrientation==n.Orientation.Horizontal&&(this.separatorElement.style.marginLeft="-"+o.left+"px",this.separatorElement.style.marginRight="-"+o.right+"px")}else this.renderedElement.style.marginRight="0",this.renderedElement.style.marginLeft="0",this.renderedElement.style.marginTop="0",this.renderedElement.style.marginBottom="0",this.separatorElement&&(this.separatorElement.style.marginRight="0",this.separatorElement.style.marginLeft="0")}},o.prototype.getHasBackground=function(){for(var t=this.parent;t;){var e=t instanceof K&&t.backgroundImage.isValid();if(t instanceof o&&this.hasExplicitStyle&&(t.getEffectiveStyle()!=this.getEffectiveStyle()||e))return!0;t=t.parent}return!1},o.prototype.getDefaultPadding=function(){return this.getHasBackground()?new i.PaddingDefinition(n.Spacing.Padding,n.Spacing.Padding,n.Spacing.Padding,n.Spacing.Padding):e.prototype.getDefaultPadding.call(this)},o.prototype.getHasExpandedAction=function(){return!1},o.prototype.getBleed=function(){return this._bleed},o.prototype.setBleed=function(t){this._bleed=t},Object.defineProperty(o.prototype,"renderedActionCount",{get:function(){return 0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"hasExplicitStyle",{get:function(){return null!=this._style},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"allowCustomStyle",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"supportsMinHeight",{get:function(){return!0},enumerable:!0,configurable:!0}),o.prototype.isBleeding=function(){return(this.getHasBackground()||this.hostConfig.alwaysAllowBleed)&&this.getBleed()},o.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"style",this.style),t},o.prototype.internalValidateProperties=function(t){(e.prototype.internalValidateProperties.call(this,t),this._style)&&(this.hostConfig.containerStyles.getStyleByName(this._style)||t.addFailure(this,{error:n.ValidationError.InvalidPropertyValue,message:"Unknown container style: "+this._style}))},o.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this._style=r.getStringValue(t.style)},o.prototype.render=function(){var t=e.prototype.render.call(this);return t&&this.getHasBackground()&&this.applyBackground(),t},o.prototype.getEffectiveStyle=function(){var t=this.style;return t||e.prototype.getEffectiveStyle.call(this)},Object.defineProperty(o.prototype,"style",{get:function(){return this.allowCustomStyle&&this._style&&this.hostConfig.containerStyles.getStyleByName(this._style)?this._style:null},set:function(t){this._style=t},enumerable:!0,configurable:!0}),o}(S);exports.StylableCardElementContainer=Y;var $=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.fillMode=i.defaultFillMode,t.horizontalAlignment=i.defaultHorizontalAlignment,t.verticalAlignment=i.defaultVerticalAlignment,t}return t(i,e),i.prototype.reset=function(){this.url=void 0,this.fillMode=i.defaultFillMode,this.horizontalAlignment=i.defaultHorizontalAlignment,this.verticalAlignment=i.defaultVerticalAlignment},i.prototype.parse=function(t,i){e.prototype.parse.call(this,t,i),this.url=r.getStringValue(t.url),this.fillMode=r.getEnumValue(n.FillMode,t.fillMode,this.fillMode),this.horizontalAlignment=r.getEnumValue(n.HorizontalAlignment,t.horizontalAlignment,this.horizontalAlignment),this.verticalAlignment=r.getEnumValue(n.VerticalAlignment,t.verticalAlignment,this.verticalAlignment)},i.prototype.toJSON=function(){if(!this.isValid())return null;if(this.fillMode==i.defaultFillMode&&this.horizontalAlignment==i.defaultHorizontalAlignment&&this.verticalAlignment==i.defaultVerticalAlignment)return this.url;var t=e.prototype.toJSON.call(this);return r.setProperty(t,"url",this.url),r.setEnumProperty(n.FillMode,t,"fillMode",this.fillMode,i.defaultFillMode),r.setEnumProperty(n.HorizontalAlignment,t,"horizontalAlignment",this.horizontalAlignment,i.defaultHorizontalAlignment),r.setEnumProperty(n.VerticalAlignment,t,"verticalAlignment",this.verticalAlignment,i.defaultVerticalAlignment),t},i.prototype.apply=function(t){if(this.url){switch(t.style.backgroundImage="url('"+this.url+"')",this.fillMode){case n.FillMode.Repeat:t.style.backgroundRepeat="repeat";break;case n.FillMode.RepeatHorizontally:t.style.backgroundRepeat="repeat-x";break;case n.FillMode.RepeatVertically:t.style.backgroundRepeat="repeat-y";break;case n.FillMode.Cover:default:t.style.backgroundRepeat="no-repeat",t.style.backgroundSize="cover"}switch(this.horizontalAlignment){case n.HorizontalAlignment.Center:t.style.backgroundPositionX="center";break;case n.HorizontalAlignment.Right:t.style.backgroundPositionX="right"}switch(this.verticalAlignment){case n.VerticalAlignment.Center:t.style.backgroundPositionY="center";break;case n.VerticalAlignment.Bottom:t.style.backgroundPositionY="bottom"}}},i.prototype.isValid=function(){return!r.isNullOrEmpty(this.url)},i.defaultFillMode=n.FillMode.Cover,i.defaultHorizontalAlignment=n.HorizontalAlignment.Left,i.defaultVerticalAlignment=n.VerticalAlignment.Top,i}(h);exports.BackgroundImage=$;var K=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t._items=[],t._renderedItems=[],t.backgroundImage=new $,t.verticalContentAlignment=n.VerticalAlignment.Top,t.rtl=null,t}return t(i,e),i.prototype.insertItemAt=function(t,e,n){if(t.parent&&!n)throw new Error("The element already belongs to another container.");if(!t.isStandalone)throw new Error("Elements of type "+t.getJsonTypeName()+" cannot be used as standalone elements.");e<0||e>=this._items.length?this._items.push(t):this._items.splice(e,0,t),t.setParent(this)},i.prototype.supportsExcplitiHeight=function(){return!0},i.prototype.getItemsCollectionPropertyName=function(){return"items"},i.prototype.applyBackground=function(){this.backgroundImage.isValid()&&this.backgroundImage.apply(this.renderedElement),e.prototype.applyBackground.call(this)},i.prototype.internalRender=function(){this._renderedItems=[];var t=this.hostConfig,e=document.createElement("div");switch(null!=this.rtl&&this.rtl&&(e.dir="rtl"),e.classList.add(t.makeCssClassName("ac-container")),e.style.display="flex",e.style.flexDirection="column",dt.useAdvancedCardBottomTruncation&&(e.style.minHeight="-webkit-min-content"),this.verticalContentAlignment){case n.VerticalAlignment.Center:e.style.justifyContent="center";break;case n.VerticalAlignment.Bottom:e.style.justifyContent="flex-end";break;default:e.style.justifyContent="flex-start"}if(this._items.length>0)for(var i=0;i<this._items.length;i++){var o=this.isElementAllowed(this._items[i],this.getForbiddenElementTypes())?this._items[i].render():null;o&&(this._renderedItems.length>0&&this._items[i].separatorElement&&(this._items[i].separatorElement.style.flex="0 0 auto",r.appendChild(e,this._items[i].separatorElement)),r.appendChild(e,o),this._renderedItems.push(this._items[i]))}else if(this.isDesignMode()){var s=this.createPlaceholderElement();s.style.width="100%",s.style.height="100%",e.appendChild(s)}return e},i.prototype.truncateOverflow=function(t){for(var e=this.renderedElement.offsetTop+t+1,i=function(t){var o=t.renderedElement;if(o)switch(r.getFitStatus(o,e)){case n.ContainerFitStatus.FullyInContainer:t.resetOverflow()&&i(t);break;case n.ContainerFitStatus.Overflowing:var s=e-o.offsetTop;t.handleOverflow(s);break;case n.ContainerFitStatus.FullyOutOfContainer:t.handleOverflow(0)}},o=0,s=this._items;o<s.length;o++){var a=s[o];i(a)}return!0},i.prototype.undoOverflowTruncation=function(){for(var t=0,e=this._items;t<e.length;t++){e[t].resetOverflow()}},i.prototype.getHasBackground=function(){return this.backgroundImage.isValid()||e.prototype.getHasBackground.call(this)},Object.defineProperty(i.prototype,"isSelectable",{get:function(){return!0},enumerable:!0,configurable:!0}),i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);if(r.setProperty(t,"backgroundImage",this.backgroundImage.toJSON()),r.setEnumProperty(n.VerticalAlignment,t,"verticalContentAlignment",this.verticalContentAlignment,n.VerticalAlignment.Top),this._items.length>0){for(var i=[],o=0,s=this._items;o<s.length;o++){var a=s[o];i.push(a.toJSON())}r.setProperty(t,this.getItemsCollectionPropertyName(),i)}return r.setProperty(t,"bleed",this.bleed,!1),t},i.prototype.getItemCount=function(){return this._items.length},i.prototype.getItemAt=function(t){return this._items[t]},i.prototype.getFirstVisibleRenderedItem=function(){if(this.renderedElement&&this._renderedItems&&this._renderedItems.length>0)for(var t=0,e=this._renderedItems;t<e.length;t++){var n=e[t];if(n.isVisible)return n}return null},i.prototype.getLastVisibleRenderedItem=function(){if(this.renderedElement&&this._renderedItems&&this._renderedItems.length>0)for(var t=this._renderedItems.length-1;t>=0;t--)if(this._renderedItems[t].isVisible)return this._renderedItems[t];return null},i.prototype.getJsonTypeName=function(){return"Container"},i.prototype.isFirstElement=function(t){for(var e=this.isDesignMode(),n=0;n<this._items.length;n++)if(this._items[n].isVisible||e)return this._items[n]==t;return!1},i.prototype.isLastElement=function(t){for(var e=this.isDesignMode(),n=this._items.length-1;n>=0;n--)if(this._items[n].isVisible||e)return this._items[n]==t;return!1},i.prototype.isRtl=function(){if(null!=this.rtl)return this.rtl;var t=this.getParentContainer();return!!t&&t.isRtl()},i.prototype.isBleedingAtTop=function(){var t=this.getFirstVisibleRenderedItem();return this.isBleeding()||!!t&&t.isBleedingAtTop()},i.prototype.isBleedingAtBottom=function(){var t=this.getLastVisibleRenderedItem();return this.isBleeding()||!!t&&(t.isBleedingAtBottom()&&t.getEffectiveStyle()==this.getEffectiveStyle())},i.prototype.parse=function(t,i){e.prototype.parse.call(this,t,i),this.setShouldFallback(!1),this._items=[],this._renderedItems=[],this.backgroundImage.reset();var o=t.backgroundImage;if(o&&("string"==typeof o?(this.backgroundImage.url=o,this.backgroundImage.fillMode=n.FillMode.Cover):"object"==typeof o&&this.backgroundImage.parse(o,i)),this.verticalContentAlignment=r.getEnumValue(n.VerticalAlignment,t.verticalContentAlignment,this.verticalContentAlignment),null!=t[this.getItemsCollectionPropertyName()]){var s=t[this.getItemsCollectionPropertyName()];this.clear();for(var a=0;a<s.length;a++){var l=c(this,s[a],!this.isDesignMode(),i);l&&this.insertItemAt(l,-1,!0)}}this.bleed=r.getBoolValue(t.bleed,this.bleed)},i.prototype.indexOf=function(t){return this._items.indexOf(t)},i.prototype.addItem=function(t){this.insertItemAt(t,-1,!1)},i.prototype.insertItemBefore=function(t,e){this.insertItemAt(t,this._items.indexOf(e),!1)},i.prototype.insertItemAfter=function(t,e){this.insertItemAt(t,this._items.indexOf(e)+1,!1)},i.prototype.removeItem=function(t){var e=this._items.indexOf(t);return e>=0&&(this._items.splice(e,1),t.setParent(null),this.updateLayout(),!0)},i.prototype.clear=function(){this._items=[]},i.prototype.getResourceInformation=function(){var t=e.prototype.getResourceInformation.call(this);return this.backgroundImage.isValid()&&t.push({url:this.backgroundImage.url,mimeType:"image"}),t},i.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);if(!n&&(this.selectAction&&(n=this.selectAction.getActionById(t)),!n))for(var i=0;i<this._items.length&&!(n=this._items[i].getActionById(t));i++);return n},Object.defineProperty(i.prototype,"padding",{get:function(){return this.getPadding()},set:function(t){this.setPadding(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectAction",{get:function(){return this.getSelectAction()},set:function(t){this.setSelectAction(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"bleed",{get:function(){return this.getBleed()},set:function(t){this.setBleed(t)},enumerable:!0,configurable:!0}),i}(Y);exports.Container=K;var Q=function(e){function o(t){void 0===t&&(t="stretch");var n=e.call(this)||this;return n._computedWeight=0,n.width="stretch",n.width=t,n}return t(o,e),o.prototype.adjustRenderedElementSize=function(t){if(this.isDesignMode()?(t.style.minWidth="20px",t.style.minHeight=(this.minPixelHeight?Math.max(this.minPixelHeight,20):20)+"px"):(t.style.minWidth="0",this.minPixelHeight&&(t.style.minHeight=this.minPixelHeight+"px")),"auto"===this.width)t.style.flex="0 1 auto";else if("stretch"===this.width)t.style.flex="1 1 50px";else{var e=this.width;e.unit==n.SizeUnit.Pixel?(t.style.flex="0 0 auto",t.style.width=e.physicalSize+"px"):t.style.flex="1 1 "+(this._computedWeight>0?this._computedWeight:e.physicalSize)+"%"}},Object.defineProperty(o.prototype,"separatorOrientation",{get:function(){return n.Orientation.Vertical},enumerable:!0,configurable:!0}),o.prototype.getJsonTypeName=function(){return"Column"},o.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return this.width instanceof i.SizeAndUnit?this.width.unit==n.SizeUnit.Pixel?r.setProperty(t,"width",this.width.physicalSize+"px"):r.setNumberProperty(t,"width",this.width.physicalSize):r.setProperty(t,"width",this.width),t},o.prototype.parse=function(t,r){e.prototype.parse.call(this,t,r);var o=t.width;if(void 0===o&&void 0!==(o=t.size)&&lt({error:n.ValidationError.Deprecated,message:'The "Column.size" property is deprecated and will be removed. Use the "Column.width" property instead.'},r),o){var s=!1;try{this.width=i.SizeAndUnit.parse(o)}catch(a){"string"!=typeof o||"auto"!==o&&"stretch"!==o?s=!0:this.width=o}s&&lt({error:n.ValidationError.InvalidPropertyValue,message:"Invalid column width:"+o+' - defaulting to "auto"'},r)}},Object.defineProperty(o.prototype,"hasVisibleSeparator",{get:function(){return!!(this.parent&&this.parent instanceof Z)&&(this.separatorElement&&!this.parent.isLeftMostElement(this))},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"isStandalone",{get:function(){return!1},enumerable:!0,configurable:!0}),o}(K);exports.Column=Q;var Z=function(o){function s(){var t=null!==o&&o.apply(this,arguments)||this;return t._columns=[],t}return t(s,o),s.prototype.createColumnInstance=function(t,i){return u(this,t,[],!this.isDesignMode(),function(t){return t&&"Column"!==t?null:new Q},function(t,i){return i==e.UnknownType?{error:n.ValidationError.UnknownElementType,message:"Unknown element type: "+t+". Fallback will be used if present."}:{error:n.ValidationError.ElementTypeNotAllowed,message:"Element type "+t+" isn't allowed in a ColumnSet."}},i)},s.prototype.internalRender=function(){if(this._renderedColumns=[],this._columns.length>0){var t=this.hostConfig,e=document.createElement("div");switch(e.className=t.makeCssClassName("ac-columnSet"),e.style.display="flex",dt.useAdvancedCardBottomTruncation&&(e.style.minHeight="-webkit-min-content"),this.horizontalAlignment){case n.HorizontalAlignment.Center:e.style.justifyContent="center";break;case n.HorizontalAlignment.Right:e.style.justifyContent="flex-end";break;default:e.style.justifyContent="flex-start"}for(var o=0,s=0,a=this._columns;s<a.length;s++){(p=a[s]).width instanceof i.SizeAndUnit&&p.width.unit==n.SizeUnit.Weight&&(o+=p.width.physicalSize)}for(var l=0,u=this._columns;l<u.length;l++){var p;if((p=u[l]).width instanceof i.SizeAndUnit&&p.width.unit==n.SizeUnit.Weight&&o>0){var c=100/o*p.width.physicalSize;p._computedWeight=c}var h=p.render();h&&(this._renderedColumns.length>0&&p.separatorElement&&(p.separatorElement.style.flex="0 0 auto",r.appendChild(e,p.separatorElement)),r.appendChild(e,h),this._renderedColumns.push(p))}return this._renderedColumns.length>0?e:null}return null},s.prototype.truncateOverflow=function(t){for(var e=0,n=this._columns;e<n.length;e++){n[e].handleOverflow(t)}return!0},s.prototype.undoOverflowTruncation=function(){for(var t=0,e=this._columns;t<e.length;t++){e[t].resetOverflow()}},Object.defineProperty(s.prototype,"isSelectable",{get:function(){return!0},enumerable:!0,configurable:!0}),s.prototype.toJSON=function(){var t=o.prototype.toJSON.call(this);if(this._columns.length>0){for(var e=[],n=0,i=this._columns;n<i.length;n++){var s=i[n];e.push(s.toJSON())}r.setProperty(t,"columns",e)}return r.setProperty(t,"bleed",this.bleed,!1),t},s.prototype.isFirstElement=function(t){for(var e=0;e<this._columns.length;e++)if(this._columns[e].isVisible)return this._columns[e]==t;return!1},s.prototype.isBleedingAtTop=function(){if(this.isBleeding())return!0;if(this._renderedColumns&&this._renderedColumns.length>0)for(var t=0,e=this._columns;t<e.length;t++){if(e[t].isBleedingAtTop())return!0}return!1},s.prototype.isBleedingAtBottom=function(){if(this.isBleeding())return!0;if(this._renderedColumns&&this._renderedColumns.length>0)for(var t=0,e=this._columns;t<e.length;t++){if(e[t].isBleedingAtBottom())return!0}return!1},s.prototype.getCount=function(){return this._columns.length},s.prototype.getItemCount=function(){return this.getCount()},s.prototype.getFirstVisibleRenderedItem=function(){return this.renderedElement&&this._renderedColumns&&this._renderedColumns.length>0?this._renderedColumns[0]:null},s.prototype.getLastVisibleRenderedItem=function(){return this.renderedElement&&this._renderedColumns&&this._renderedColumns.length>0?this._renderedColumns[this._renderedColumns.length-1]:null},s.prototype.getColumnAt=function(t){return this._columns[t]},s.prototype.getItemAt=function(t){return this.getColumnAt(t)},s.prototype.getJsonTypeName=function(){return"ColumnSet"},s.prototype.parse=function(t,e){if(o.prototype.parse.call(this,t,e),null!=t.columns){var n=t.columns;this._columns=[];for(var i=0;i<n.length;i++){var s=this.createColumnInstance(n[i],e);s&&this._columns.push(s)}}this.bleed=r.getBoolValue(t.bleed,this.bleed)},s.prototype.internalValidateProperties=function(t){o.prototype.internalValidateProperties.call(this,t);for(var e=0,i=0,r=0,s=this._columns;r<s.length;r++){var a=s[r];"number"==typeof a.width?e++:"stretch"===a.width&&i++}e>0&&i>0&&t.addFailure(this,{error:n.ValidationError.Hint,message:"It is not recommended to use weighted and stretched columns in the same ColumnSet, because in such a situation stretched columns will always get the minimum amount of space."})},s.prototype.addColumn=function(t){if(t.parent)throw new Error("This column already belongs to another ColumnSet.");this._columns.push(t),t.setParent(this)},s.prototype.removeItem=function(t){if(t instanceof Q){var e=this._columns.indexOf(t);if(e>=0)return this._columns.splice(e,1),t.setParent(null),this.updateLayout(),!0}return!1},s.prototype.indexOf=function(t){return t instanceof Q?this._columns.indexOf(t):-1},s.prototype.isLeftMostElement=function(t){return 0==this._columns.indexOf(t)},s.prototype.isRightMostElement=function(t){return this._columns.indexOf(t)==this._columns.length-1},s.prototype.isTopElement=function(t){return this._columns.indexOf(t)>=0},s.prototype.isBottomElement=function(t){return this._columns.indexOf(t)>=0},s.prototype.getActionById=function(t){for(var e=null,n=0;n<this._columns.length&&!(e=this._columns[n].getActionById(t));n++);return e},Object.defineProperty(s.prototype,"bleed",{get:function(){return this.getBleed()},set:function(t){this.setBleed(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"padding",{get:function(){return this.getPadding()},set:function(t){this.setPadding(t)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"selectAction",{get:function(){return this.getSelectAction()},set:function(t){this.setSelectAction(t)},enumerable:!0,configurable:!0}),s}(Y);function tt(t){var e=t.getRootElement(),n=e&&e.onImageLoaded?e.onImageLoaded:dt.onImageLoaded;n&&n(t)}function et(t,e){var n=t.getRootElement(),i=n&&n.onAnchorClicked?n.onAnchorClicked:dt.onAnchorClicked;return null!=i&&i(t,e)}function nt(t){var e=t.parent.getRootElement(),n=e&&e.onExecuteAction?e.onExecuteAction:dt.onExecuteAction;n&&t.prepareForExecution()&&n(t)}function it(t,e){var n=t.parent.getRootElement(),i=n&&n.onInlineCardExpanded?n.onInlineCardExpanded:dt.onInlineCardExpanded;i&&i(t,e)}function rt(t){var e=t.getRootElement(),n=e&&e.onInputValueChanged?e.onInputValueChanged:dt.onInputValueChanged;n&&n(t)}function ot(t,e){void 0===e&&(e=!0);var n=t.getRootElement();e&&n.updateLayout();var i=n,r=i&&i.onElementVisibilityChanged?i.onElementVisibilityChanged:dt.onElementVisibilityChanged;null!=r&&r(t)}function st(t,e,n){var i=t.getRootElement(),r=i&&i.onParseElement?i.onParseElement:dt.onParseElement;null!=r&&r(t,e,n)}function at(t,e,n){var i=t.parent?t.parent.getRootElement():null,r=i&&i.onParseAction?i.onParseAction:dt.onParseAction;null!=r&&r(t,e,n)}function lt(t,e){e&&e.push(t),null!=dt.onParseError&&dt.onParseError(t)}exports.ColumnSet=Z;var ut=function(e){function i(){var t=e.call(this)||this;return t._actionCollection=new G(t),t}return t(i,e),i.prototype.internalRender=function(){var t=e.prototype.internalRender.call(this),i=this._actionCollection.render(this.hostConfig.actions.actionsOrientation,!1);return i&&(r.appendChild(t,r.renderSeparation(this.hostConfig,{spacing:this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing),lineThickness:null,lineColor:null},n.Orientation.Horizontal)),r.appendChild(t,i)),this.renderIfEmpty?t:t.children.length>0?t:null},i.prototype.getHasExpandedAction=function(){return 0!=this.renderedActionCount&&(1==this.renderedActionCount?null!=this._actionCollection.expandedAction&&!this.hostConfig.actions.preExpandSingleShowCardAction:null!=this._actionCollection.expandedAction)},Object.defineProperty(i.prototype,"renderedActionCount",{get:function(){return this._actionCollection.renderedActionCount},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"renderIfEmpty",{get:function(){return!1},enumerable:!0,configurable:!0}),i.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"actions",this._actionCollection.toJSON()),t},i.prototype.getActionCount=function(){return this._actionCollection.items.length},i.prototype.getActionAt=function(t){if(t>=0&&t<this.getActionCount())return this._actionCollection.items[t];e.prototype.getActionAt.call(this,t)},i.prototype.getActionById=function(t){var n=this._actionCollection.getActionById(t);return n||e.prototype.getActionById.call(this,t)},i.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n),this._actionCollection.parse(t.actions,n)},i.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this._actionCollection&&this._actionCollection.validateProperties(t)},i.prototype.isLastElement=function(t){return e.prototype.isLastElement.call(this,t)&&0==this._actionCollection.items.length},i.prototype.addAction=function(t){this._actionCollection.addAction(t)},i.prototype.clear=function(){e.prototype.clear.call(this),this._actionCollection.clear()},i.prototype.getAllInputs=function(){return e.prototype.getAllInputs.call(this).concat(this._actionCollection.getAllInputs())},i.prototype.getResourceInformation=function(){return e.prototype.getResourceInformation.call(this).concat(this._actionCollection.getResourceInformation())},i.prototype.isBleedingAtBottom=function(){return 0==this._actionCollection.renderedActionCount?e.prototype.isBleedingAtBottom.call(this):1==this._actionCollection.items.length?null!=this._actionCollection.expandedAction&&!this.hostConfig.actions.preExpandSingleShowCardAction:null!=this._actionCollection.expandedAction},Object.defineProperty(i.prototype,"isStandalone",{get:function(){return!1},enumerable:!0,configurable:!0}),i}(K);exports.ContainerWithActions=ut;var pt=function(){function t(){this._items=[],this.reset()}return t.prototype.findTypeRegistration=function(t){for(var e=0;e<this._items.length;e++)if(this._items[e].typeName===t)return this._items[e];return null},t.prototype.clear=function(){this._items=[]},t.prototype.registerType=function(t,e){var n=this.findTypeRegistration(t);null!=n?n.createInstance=e:(n={typeName:t,createInstance:e},this._items.push(n))},t.prototype.unregisterType=function(t){for(var e=0;e<this._items.length;e++)if(this._items[e].typeName===t)return void this._items.splice(e,1)},t.prototype.createInstance=function(t){var e=this.findTypeRegistration(t);return e?e.createInstance():null},t.prototype.getItemCount=function(){return this._items.length},t.prototype.getItemAt=function(t){return this._items[t]},t}();exports.TypeRegistry=pt;var ct=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.reset=function(){this.clear(),this.registerType("Container",function(){return new K}),this.registerType("TextBlock",function(){return new v}),this.registerType("RichTextBlock",function(){return new E}),this.registerType("TextRun",function(){return new C}),this.registerType("Image",function(){return new A}),this.registerType("ImageSet",function(){return new I}),this.registerType("Media",function(){return new P}),this.registerType("FactSet",function(){return new _}),this.registerType("ColumnSet",function(){return new Z}),this.registerType("ActionSet",function(){return new X}),this.registerType("Input.Text",function(){return new k}),this.registerType("Input.Date",function(){return new z}),this.registerType("Input.Time",function(){return new F}),this.registerType("Input.Number",function(){return new D}),this.registerType("Input.ChoiceSet",function(){return new B}),this.registerType("Input.Toggle",function(){return new V})},n}(pt);exports.ElementTypeRegistry=ct;var ht=function(e){function n(){return null!==e&&e.apply(this,arguments)||this}return t(n,e),n.prototype.reset=function(){this.clear(),this.registerType(H.JsonTypeName,function(){return new H}),this.registerType(J.JsonTypeName,function(){return new J}),this.registerType(q.JsonTypeName,function(){return new q}),this.registerType(j.JsonTypeName,function(){return new j})},n}(pt);exports.ActionTypeRegistry=ht;var dt=function(e){function s(){var t=null!==e&&e.apply(this,arguments)||this;return t._cardTypeName="AdaptiveCard",t._fallbackCard=null,t.onAnchorClicked=null,t.onExecuteAction=null,t.onElementVisibilityChanged=null,t.onImageLoaded=null,t.onInlineCardExpanded=null,t.onInputValueChanged=null,t.onParseElement=null,t.onParseAction=null,t.version=new o.Version(1,0),t.designMode=!1,t}return t(s,e),Object.defineProperty(s,"processMarkdown",{get:function(){throw new Error("The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.")},set:function(t){throw new Error("The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead.")},enumerable:!0,configurable:!0}),s.applyMarkdown=function(t){var e={didProcess:!1};return s.onProcessMarkdown?s.onProcessMarkdown(t,e):window.markdownit?(e.outputHtml=window.markdownit().render(t),e.didProcess=!0):console.warn("Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown"),e},s.prototype.isVersionSupported=function(){return!!this.bypassVersionCheck||!(!this.version||!this.version.isValid||s.currentVersion.major<this.version.major||s.currentVersion.major==this.version.major&&s.currentVersion.minor<this.version.minor)},s.prototype.getItemsCollectionPropertyName=function(){return"body"},s.prototype.internalRender=function(){var t=e.prototype.internalRender.call(this);return s.useAdvancedCardBottomTruncation&&(t.style.minHeight=null),t},s.prototype.getHasBackground=function(){return!0},s.prototype.getDefaultPadding=function(){return new i.PaddingDefinition(n.Spacing.Padding,n.Spacing.Padding,n.Spacing.Padding,n.Spacing.Padding)},Object.defineProperty(s.prototype,"renderIfEmpty",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"bypassVersionCheck",{get:function(){return!1},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"allowCustomStyle",{get:function(){return this.hostConfig.adaptiveCard&&this.hostConfig.adaptiveCard.allowCustomStyle},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hasBackground",{get:function(){return!0},enumerable:!0,configurable:!0}),s.prototype.getJsonTypeName=function(){return"AdaptiveCard"},s.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return r.setProperty(t,"$schema","http://adaptivecards.io/schemas/adaptive-card.json"),!this.bypassVersionCheck&&this.version&&r.setProperty(t,"version",this.version.toString()),r.setProperty(t,"fallbackText",this.fallbackText),r.setProperty(t,"lang",this.lang),r.setProperty(t,"speak",this.speak),t},s.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),"AdaptiveCard"!=this._cardTypeName&&t.addFailure(this,{error:n.ValidationError.MissingCardType,message:'Invalid or missing card type. Make sure the card\'s type property is set to "AdaptiveCard".'}),this.bypassVersionCheck||this.version?this.isVersionSupported()||t.addFailure(this,{error:n.ValidationError.UnsupportedCardVersion,message:"The specified card version ("+this.version+") is not supported. The maximum supported card version is "+s.currentVersion}):t.addFailure(this,{error:n.ValidationError.PropertyCantBeNull,message:"The version property must be specified."})},s.prototype.parse=function(t,i){this._fallbackCard=null,this._cardTypeName=r.getStringValue(t.type),this.speak=r.getStringValue(t.speak);var a=r.getStringValue(t.lang);if(a&&"string"==typeof a)try{this.lang=a}catch(u){lt({error:n.ValidationError.InvalidPropertyValue,message:u.message},i)}this.version=o.Version.parse(t.version,i),this.fallbackText=r.getStringValue(t.fallbackText);var l=c(null,t.fallback,!this.isDesignMode(),i);l&&(this._fallbackCard=new s,this._fallbackCard.addItem(l)),e.prototype.parse.call(this,t,i)},s.prototype.render=function(t){var n;return this.shouldFallback()&&this._fallbackCard?(this._fallbackCard.hostConfig=this.hostConfig,n=this._fallbackCard.render()):(n=e.prototype.render.call(this))&&(n.classList.add(this.hostConfig.makeCssClassName("ac-adaptiveCard")),i.GlobalSettings.setTabIndexAtCardRoot&&(n.tabIndex=0),r.isNullOrEmpty(this.speak)||n.setAttribute("aria-label",this.speak)),t&&(t.appendChild(n),this.updateLayout()),n},s.prototype.updateLayout=function(t){if(void 0===t&&(t=!0),e.prototype.updateLayout.call(this,t),s.useAdvancedCardBottomTruncation&&this.isRendered()){var i=this.renderedElement,r=this.hostConfig.getEffectiveSpacing(n.Spacing.Default);this.handleOverflow(i.offsetHeight-r)}},s.prototype.shouldFallback=function(){return e.prototype.shouldFallback.call(this)||!this.isVersionSupported()},Object.defineProperty(s.prototype,"hasVisibleSeparator",{get:function(){return!1},enumerable:!0,configurable:!0}),s.currentVersion=new o.Version(1,2),s.useAdvancedTextBlockTruncation=!0,s.useAdvancedCardBottomTruncation=!1,s.useMarkdownInRadioButtonAndCheckbox=!0,s.allowMarkForTextHighlighting=!1,s.alwaysBleedSeparators=!1,s.enableFullJsonRoundTrip=!1,s.useBuiltInInputValidation=!0,s.displayInputValidationErrors=!0,s.elementTypeRegistry=new ct,s.actionTypeRegistry=new ht,s.onAnchorClicked=null,s.onExecuteAction=null,s.onElementVisibilityChanged=null,s.onImageLoaded=null,s.onInlineCardExpanded=null,s.onInputValueChanged=null,s.onParseElement=null,s.onParseAction=null,s.onParseError=null,s.onProcessMarkdown=null,s}(ut);exports.AdaptiveCard=dt;var ft=function(e){function r(){var t=null!==e&&e.apply(this,arguments)||this;return t.suppressStyle=!1,t}return t(r,e),r.prototype.getDefaultPadding=function(){return new i.PaddingDefinition(this.suppressStyle?n.Spacing.None:n.Spacing.Padding,n.Spacing.Padding,this.suppressStyle?n.Spacing.None:n.Spacing.Padding,n.Spacing.Padding)},Object.defineProperty(r.prototype,"bypassVersionCheck",{get:function(){return!0},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"defaultStyle",{get:function(){return this.suppressStyle?n.ContainerStyle.Default:this.hostConfig.actions.showCard.style?this.hostConfig.actions.showCard.style:n.ContainerStyle.Emphasis},enumerable:!0,configurable:!0}),r.prototype.render=function(t){var n=e.prototype.render.call(this,t);return n.setAttribute("aria-live","polite"),n.removeAttribute("tabindex"),n},r.prototype.getForbiddenActionTypes=function(){return[q]},r}(dt),gt=new o.HostConfig({supportsInteractivity:!0,spacing:{small:10,default:20,medium:30,large:40,extraLarge:50,padding:20},separator:{lineThickness:1,lineColor:"#EEEEEE"},fontTypes:{default:{fontFamily:"'Segoe UI', Tahoma, Geneva, Verdana, sans-serif",fontSizes:{small:12,default:14,medium:17,large:21,extraLarge:26},fontWeights:{lighter:200,default:400,bolder:600}},monospace:{fontFamily:"'Courier New', Courier, monospace",fontSizes:{small:12,default:14,medium:17,large:21,extraLarge:26},fontWeights:{lighter:200,default:400,bolder:600}}},imageSizes:{small:40,medium:80,large:160},containerStyles:{default:{backgroundColor:"#FFFFFF",foregroundColors:{default:{default:"#333333",subtle:"#EE333333"},dark:{default:"#000000",subtle:"#66000000"},light:{default:"#FFFFFF",subtle:"#33000000"},accent:{default:"#2E89FC",subtle:"#882E89FC"},attention:{default:"#cc3300",subtle:"#DDcc3300"},good:{default:"#54a254",subtle:"#DD54a254"},warning:{default:"#e69500",subtle:"#DDe69500"}}},emphasis:{backgroundColor:"#08000000",foregroundColors:{default:{default:"#333333",subtle:"#EE333333"},dark:{default:"#000000",subtle:"#66000000"},light:{default:"#FFFFFF",subtle:"#33000000"},accent:{default:"#2E89FC",subtle:"#882E89FC"},attention:{default:"#cc3300",subtle:"#DDcc3300"},good:{default:"#54a254",subtle:"#DD54a254"},warning:{default:"#e69500",subtle:"#DDe69500"}}},accent:{backgroundColor:"#C7DEF9",foregroundColors:{default:{default:"#333333",subtle:"#EE333333"},dark:{default:"#000000",subtle:"#66000000"},light:{default:"#FFFFFF",subtle:"#33000000"},accent:{default:"#2E89FC",subtle:"#882E89FC"},attention:{default:"#cc3300",subtle:"#DDcc3300"},good:{default:"#54a254",subtle:"#DD54a254"},warning:{default:"#e69500",subtle:"#DDe69500"}}},good:{backgroundColor:"#CCFFCC",foregroundColors:{default:{default:"#333333",subtle:"#EE333333"},dark:{default:"#000000",subtle:"#66000000"},light:{default:"#FFFFFF",subtle:"#33000000"},accent:{default:"#2E89FC",subtle:"#882E89FC"},attention:{default:"#cc3300",subtle:"#DDcc3300"},good:{default:"#54a254",subtle:"#DD54a254"},warning:{default:"#e69500",subtle:"#DDe69500"}}},attention:{backgroundColor:"#FFC5B2",foregroundColors:{default:{default:"#333333",subtle:"#EE333333"},dark:{default:"#000000",subtle:"#66000000"},light:{default:"#FFFFFF",subtle:"#33000000"},accent:{default:"#2E89FC",subtle:"#882E89FC"},attention:{default:"#cc3300",subtle:"#DDcc3300"},good:{default:"#54a254",subtle:"#DD54a254"},warning:{default:"#e69500",subtle:"#DDe69500"}}},warning:{backgroundColor:"#FFE2B2",foregroundColors:{default:{default:"#333333",subtle:"#EE333333"},dark:{default:"#000000",subtle:"#66000000"},light:{default:"#FFFFFF",subtle:"#33000000"},accent:{default:"#2E89FC",subtle:"#882E89FC"},attention:{default:"#cc3300",subtle:"#DDcc3300"},good:{default:"#54a254",subtle:"#DD54a254"},warning:{default:"#e69500",subtle:"#DDe69500"}}}},actions:{maxActions:5,spacing:n.Spacing.Default,buttonSpacing:10,showCard:{actionMode:n.ShowCardActionMode.Inline,inlineTopMargin:16},actionsOrientation:n.Orientation.Horizontal,actionAlignment:n.ActionAlignment.Left},adaptiveCard:{allowCustomStyle:!1},imageSet:{imageSize:n.Size.Medium,maxImageHeight:100},factSet:{title:{color:n.TextColor.Default,size:n.TextSize.Default,isSubtle:!1,weight:n.TextWeight.Bolder,wrap:!0,maxWidth:150},value:{color:n.TextColor.Default,size:n.TextSize.Default,isSubtle:!1,weight:n.TextWeight.Default,wrap:!0},spacing:10}});
},{"./enums":"Nl92","./shared":"lmhT","./utils":"zERj","./host-config":"XUvv","./text-formatters":"lzwY"}],"j4Qh":[function(require,module,exports) {
"use strict";function e(e){for(var r in e)exports.hasOwnProperty(r)||(exports[r]=e[r])}Object.defineProperty(exports,"__esModule",{value:!0}),e(require("./card-elements")),e(require("./enums")),e(require("./host-config")),e(require("./shared")),e(require("./utils"));
},{"./card-elements":"oB1l","./enums":"Nl92","./host-config":"XUvv","./shared":"lmhT","./utils":"zERj"}],"Asjh":[function(require,module,exports) {
"use strict";var _="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";module.exports=_;
},{}],"wVGV":[function(require,module,exports) {
"use strict";var e=require("./lib/ReactPropTypesSecret");function r(){}function t(){}t.resetWarningCache=r,module.exports=function(){function n(r,t,n,o,a,p){if(p!==e){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}function o(){return n}n.isRequired=n;var a={array:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:o,element:n,elementType:n,instanceOf:o,node:n,objectOf:o,oneOf:o,oneOfType:o,shape:o,exact:o,checkPropTypes:t,resetWarningCache:r};return a.PropTypes=a,a};
},{"./lib/ReactPropTypesSecret":"Asjh"}],"5D9O":[function(require,module,exports) {
var r,e;module.exports=require("./factoryWithThrowingShims")();
},{"./factoryWithThrowingShims":"wVGV"}],"EXVD":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r};function t(o,e){if(o===e)return!0;if(!(o instanceof Object&&e instanceof Object))return!1;if(o.constructor!==e.constructor)return!1;for(var n in o)if(o.hasOwnProperty(n)){if(!e.hasOwnProperty(n))return!1;if(o[n]!==e[n]){if("object"!==r(o[n]))return!1;if(!t(o[n],e[n]))return!1}}for(n in e)if(e.hasOwnProperty(n)&&!o.hasOwnProperty(n))return!1;return!0}exports.default=t;
},{}],"ymwN":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=function(){var e="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103;return function(t,o,r,n){var i=t&&t.defaultProps,a=arguments.length-3;if(o||0===a||(o={}),o&&i)for(var u in i)void 0===o[u]&&(o[u]=i[u]);else o||(o=i||{});if(1===a)o.children=n;else if(a>1){for(var p=Array(a),l=0;l<a;l++)p[l]=arguments[l+3];o.children=p}return{$$typeof:e,type:t,key:void 0===r?null:""+r,ref:null,props:o,_owner:null}}}(),t=function(){function e(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,o,r){return o&&e(t.prototype,o),r&&e(t,r),t}}(),o=require("adaptivecards"),r=c(o),n=require("react"),i=s(n),a=require("prop-types"),u=s(a),p=require("./compare"),l=s(p);function s(e){return e&&e.__esModule?e:{default:e}}function c(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t.default=e,t}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function h(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y="Action.OpenUrl",b="Action.ShowCard",v="Action.Submit",A=function(o){function n(e){f(this,n);var t=d(this,(n.__proto__||Object.getPrototypeOf(n)).call(this,e));return t.adaptiveCard=new r.AdaptiveCard,t}return h(n,i.default.Component),t(n,[{key:"componentWillUnmount",value:function(){delete this.adaptiveCard}},{key:"shouldComponentUpdate",value:function(e){return!!(0,l.default)(e.hostConfig,this.props.hostConfig)||(!!(0,l.default)(e.payload,this.props.payload)||!!(0,l.default)(e.onExecuteAction,this.props.onExecuteAction))}},{key:"executeAction",value:function(e){switch(e.getJsonTypeName()){case y:this.props.onActionOpenUrl?this.props.onActionOpenUrl(e):this.defaultOpenUrlHandler(e);break;case b:this.props.onActionShowCard&&this.props.onActionShowCard(e);break;case v:this.props.onActionSubmit&&this.props.onActionSubmit(e)}this.props.onExecuteAction&&this.props.onExecuteAction(e)}},{key:"defaultOpenUrlHandler",value:function(e){window.open(e.url,e.title||"_blank")}},{key:"render",value:function(){this.props.hostConfig&&(this.adaptiveCard.hostConfig=new r.HostConfig(this.props.hostConfig)),this.adaptiveCard.onExecuteAction=this.executeAction.bind(this);try{this.adaptiveCard.parse(this.props.payload);var t=this.adaptiveCard.render();return i.default.createElement("div",{style:this.props.style,role:"img","aria-label":this.props.altText,ref:function(e){e&&e.appendChild(t)}})}catch(o){return console.error(o),this.props.onError?this.props.onError(o):e("div",{style:{color:"red"}},void 0,o.message)}}}]),n}();A.propTypes={hostConfig:u.default.object,payload:u.default.object.isRequired,onExecuteAction:u.default.func,onActionSubmit:u.default.func,onActionOpenUrl:u.default.func,onActionShowCard:u.default.func,onError:u.default.func,style:u.default.object},exports.default=A;
},{"adaptivecards":"j4Qh","react":"JE2T","prop-types":"5D9O","./compare":"EXVD"}],"xHCB":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var r=Number.isNaN||function(r){return"number"==typeof r&&r!=r};function t(t,e){return t===e||!(!r(t)||!r(e))}function e(r,e){if(r.length!==e.length)return!1;for(var n=0;n<r.length;n++)if(!t(r[n],e[n]))return!1;return!0}function n(r,t){var n;void 0===t&&(t=e);var u,i=[],o=!1;return function(){for(var e=[],f=0;f<arguments.length;f++)e[f]=arguments[f];return o&&n===this&&t(e,i)?u:(u=r.apply(this,e),o=!0,n=this,i=e,u)}}var u=n;exports.default=u;
},{}],"XEZO":[function(require,module,exports) {
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.updateAdaptiveCardCSSCheaply=exports.getAdaptiveCardCSS=void 0;var n=e(require("memoize-one"));function e(n){return n&&n.__esModule?n:{default:n}}var t=document.createElement("style");t.type="text/css",t.id="accss";var a=document.head||document.getElementsByTagName("head")[0];a.appendChild(t);var r=function(n){return"\n.ac-pushbutton,\n.ac-pushbutton.subdued {\n background-color: transparent;\n border: 1px solid ".concat(n.primaryColor,";\n color: ").concat(n.primaryColor,";\n\n cursor: pointer;\n height: 40px;\n\n padding: ").concat(n.unitSize,"px ").concat(2*n.unitSize,"px;\n border-radius: ").concat(2*n.unitSize,"px;\n}\n\n.ac-pushbutton.style-default.expandable.expanded {\n background: ").concat(n.primaryGradient,";\n color: ").concat(n.primaryContrastColor,";\n border: 1px solid ").concat(n.primaryColor,";\n\n cursor: pointer;\n height: 40px;\n\n padding: ").concat(n.unitSize,"px ").concat(2*n.unitSize,"px;\n border-radius: ").concat(2*n.unitSize,"px;\n}\n\n/*.ac-input {\n border: 1px solid ").concat(n.primaryColor,";\n height: 40;\n padding: ").concat(n.unitSize,"px ").concat(2*n.unitSize,"px;\n}*/\n\n.adaptivecard-wrapper {\n width: 100%;\n padding-left: ").concat(2*n.unitSize,"px;\n padding-right: ").concat(2*n.unitSize,"px;\n box-sizing: border-box;\n}\n\n.adaptivecard-wrapper > * {\n background-color: white;\n border-radius: ").concat(n.unitSize,"px;\n box-shadow: ").concat(n.shadow,";\n}\n")};exports.getAdaptiveCardCSS=r;var o=function(n){t.innerHTML=r(n)},i=(0,n.default)(o);exports.updateAdaptiveCardCSSCheaply=i;
},{"memoize-one":"xHCB"}],"/deH":[function(require,module,exports) {
"use strict";var e=i(require("react")),t=r(require("react-adaptivecards")),a=require("./styles");function r(e){return e&&e.__esModule?e:{default:e}}function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(n=function(e){return e?a:t})(e)}function i(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var a=n(t);if(a&&a.has(e))return a.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=i?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(r,o,u):r[o]=e[o]}return r.default=e,a&&a.set(e,r),r}var o=function(r){var n=r.theme,i=r.onSendMessage,o=r.message;e.useEffect(function(){(0,a.updateAdaptiveCardCSSCheaply)(n)},[]);var u=o.data._plugin.payload,c=u.fallbackText,s=e.useMemo(function(){var a={fontFamily:n.fontFamily};return e.createElement(t.default,{payload:u,onActionSubmit:function(e){i("",{adaptivecards:e&&e.data})},hostConfig:a,altText:c})},[u]);return e.createElement("div",{className:"adaptivecard-wrapper"},s)},u={match:"adaptivecards",component:o,options:{fullwidth:!0}};window.cognigyWebchatMessagePlugins||(window.cognigyWebchatMessagePlugins=[]),window.cognigyWebchatMessagePlugins.push(u);
},{"react":"JE2T","react-adaptivecards":"ymwN","./styles":"XEZO"}]},{},["/deH"], null)
//# sourceMappingURL=/adaptivecards.webchat-plugin.js.map

Back to list