@spteck/react-controls-v2 2.0.13 → 2.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/aiAssistant/AIAssistant.d.ts.map +1 -1
- package/dist/index.js +17 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +68 -14
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
* @license MIT license
|
|
22
22
|
* @link http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/21963136#21963136
|
|
23
23
|
**/
|
|
24
|
-
var s=function(){function e(){}return e.generate=function(){var t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,o=4294967295*Math.random()|0;return e.lut[255&t]+e.lut[t>>8&255]+e.lut[t>>16&255]+e.lut[t>>24&255]+"-"+e.lut[255&n]+e.lut[n>>8&255]+"-"+e.lut[n>>16&15|64]+e.lut[n>>24&255]+"-"+e.lut[63&r|128]+e.lut[r>>8&255]+"-"+e.lut[r>>16&255]+e.lut[r>>24&255]+e.lut[255&o]+e.lut[o>>8&255]+e.lut[o>>16&255]+e.lut[o>>24&255]},e.initialize=function(){for(var t=0;t<256;t++)e.lut[t]=(t<16?"0":"")+t.toString(16)},e.lut=[],e}();e.UUID=s,s.initialize()}(zn);var Ln,Hn={};Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.debounce=Hn.addCancelSelectActionEventHandler=Hn.clearElementChildren=Hn.getScrollY=Hn.getScrollX=Hn.getFitStatus=Hn.truncate=Hn.truncateText=Hn.stringToCssColor=Hn.parseEnum=Hn.getEnumValueByName=Hn.parseBool=Hn.parseNumber=Hn.parseString=Hn.appendChild=Hn.generateUniqueId=Hn.isMobileOS=Hn.isInternetExplorer=void 0;var Fn=Rn,Wn=zn;function $n(e,t){for(var n in e){var r=parseInt(n,10);if(r>=0){var o=e[n];if(o&&"string"==typeof o&&o.toLowerCase()===t.toLowerCase())return r}}}function Un(e,t,n,r,o){var i=function(){return t-e.scrollHeight>=-1};if(!i()){for(var a=function(e){var t=[],n=Gn(e,-1);for(;n<e.length;)" "===e[n]&&t.push(n),n=Gn(e,n);return t}(n),s=0,l=a.length,c=0;s<l;){var u=Math.floor((s+l)/2);r(n,a[u]),i()?(c=a[u],s=u+1):l=u}if(r(n,c),o&&t-e.scrollHeight>=o-1){for(var d=Gn(n,c);d<n.length&&(r(n,d),i());)c=d,d=Gn(n,d);r(n,c)}}}Hn.isInternetExplorer=function(){return void 0!==window.document.documentMode},Hn.isMobileOS=function(){var e=window.navigator.userAgent;return!!e.match(/Android/i)||!!e.match(/iPad/i)||!!e.match(/iPhone/i)},Hn.generateUniqueId=function(){return"__ac-"+Wn.UUID.generate()},Hn.appendChild=function(e,t){t&&e.appendChild(t)},Hn.parseString=function(e,t){return"string"==typeof e?e:t},Hn.parseNumber=function(e,t){return"number"==typeof e?e:t},Hn.parseBool=function(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},Hn.getEnumValueByName=$n,Hn.parseEnum=function(e,t,n){if(!t)return n;var r=$n(e,t);return void 0!==r?r:n},Hn.stringToCssColor=function(e){if(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 n=parseInt(t[1],16)/255;return"rgba("+parseInt(t[2],16)+","+parseInt(t[3],16)+","+parseInt(t[4],16)+","+n+")"}}return e},Hn.truncateText=function(e,t,n){Un(e,t,e.innerText,function(t,n){e.innerText=t.substring(0,n)+"..."},n)};var Jn="undefined"==typeof window||null===(Ln=window.trustedTypes)||void 0===Ln?void 0:Ln.createPolicy("adaptivecards#deprecatedExportedFunctionPolicy",{createHTML:function(e){return e}});function Gn(e,t){for(t+=1;t<e.length&&"<"===e[t];)for(;t<e.length&&">"!==e[t++];);return t}Hn.truncate=function(e,t,n){Un(e,t,e.innerHTML,function(t,n){var r,o=t.substring(0,n)+"...",i=null!==(r=null==Jn?void 0:Jn.createHTML(o))&&void 0!==r?r:o;e.innerHTML=i},n)},Hn.getFitStatus=function(e,t){var n=e.offsetTop;return n+e.clientHeight<=t?Fn.ContainerFitStatus.FullyInContainer:n<t?Fn.ContainerFitStatus.Overflowing:Fn.ContainerFitStatus.FullyOutOfContainer},Hn.getScrollX=function(){return window.pageXOffset},Hn.getScrollY=function(){return window.pageYOffset},Hn.clearElementChildren=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},Hn.addCancelSelectActionEventHandler=function(e){e.onclick=function(e){e.preventDefault(),e.cancelBubble=!0}},Hn.debounce=function(e,t){var n;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n&&clearTimeout(n),n=setTimeout(function(){e.apply(void 0,r)},t)}};var qn={},Xn={},Yn={},Zn={};Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.Strings=void 0;var Qn=function(){function e(){}return e.errors={unknownElementType:function(e){return'Unknown element type "'.concat(e,'". Fallback will be used if present.')},unknownActionType:function(e){return'Unknown action type "'.concat(e,'". Fallback will be used if present.')},elementTypeNotAllowed:function(e){return'Element type "'.concat(e,'" is not allowed in this context.')},actionTypeNotAllowed:function(e){return'Action type "'.concat(e,'" is not allowed in this context.')},invalidPropertyValue:function(e,t){return'Invalid value "'.concat(e,'" for property "').concat(t,'".')},showCardMustHaveCard:function(){return'"An Action.ShowCard must have its "card" property set to a valid AdaptiveCard object.'},invalidColumnWidth:function(e){return'Invalid column width "'.concat(e,'" - defaulting to "auto".')},invalidCardVersion:function(e){return'Invalid card version. Defaulting to "'.concat(e,'".')},invalidVersionString:function(e){return'Invalid version string "'.concat(e,'".')},propertyValueNotSupported:function(e,t,n,r){return'Value "'.concat(e,'" for property "').concat(t,'" is supported in version ').concat(n,", but you are using version ").concat(r,".")},propertyNotSupported:function(e,t,n){return'Property "'.concat(e,'" is supported in version ').concat(t,", but you are using version ").concat(n,".")},indexOutOfRange:function(e){return"Index out of range (".concat(e,").")},elementCannotBeUsedAsInline:function(){return"RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline."},inlineAlreadyParented:function(){return"RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock."},interactivityNotAllowed:function(){return"Interactivity is not allowed."},inputsMustHaveUniqueId:function(){return"All inputs must have a unique Id."},choiceSetMustHaveAtLeastOneChoice:function(){return"An Input.ChoiceSet must have at least one choice defined."},choiceSetChoicesMustHaveTitleAndValue:function(){return"All choices in an Input.ChoiceSet must have their title and value properties set."},propertyMustBeSet:function(e){return'Property "'.concat(e,'" must be set.')},actionHttpHeadersMustHaveNameAndValue:function(){return"All headers of an Action.Http must have their name and value properties set."},tooManyActions:function(e){return"Maximum number of actions exceeded (".concat(e,").")},tooLittleTimeDelay:function(e){return"Autoplay Delay is too short (".concat(e,").")},tooManyCarouselPages:function(e){return"Maximum number of Carousel pages exceeded (".concat(e,").")},invalidInitialPageIndex:function(e){return"InitialPage for carousel is invalid (".concat(e,").")},columnAlreadyBelongsToAnotherSet:function(){return"This column already belongs to another ColumnSet."},invalidCardType:function(){return'Invalid or missing card type. Make sure the card\'s type property is set to "AdaptiveCard".'},unsupportedCardVersion:function(e,t){return"The specified card version (".concat(e,") is not supported or still in preview. The latest released card version is ").concat(t,".")},duplicateId:function(e){return'Duplicate Id "'.concat(e,'".')},markdownProcessingNotEnabled:function(){return"Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown"},processMarkdownEventRemoved:function(){return"The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead."},elementAlreadyParented:function(){return"The element already belongs to another container."},actionAlreadyParented:function(){return"The action already belongs to another element."},elementTypeNotStandalone:function(e){return"Elements of type ".concat(e," cannot be used as standalone elements.")},invalidInputLabelWidth:function(){return"Invalid input label width. Defaulting to label width from host config."}},e.magicCodeInputCard={tryAgain:function(){return"That didn't work... let's try again."},pleaseLogin:function(){return'Please login in the popup. You will obtain a magic code. Paste that code below and select "Submit"'},enterMagicCode:function(){return"Enter magic code"},pleaseEnterMagicCodeYouReceived:function(){return"Please enter the magic code you received."},submit:function(){return"Submit"},cancel:function(){return"Cancel"},somethingWentWrong:function(){return"Something went wrong. This action can't be handled."},authenticationFailed:function(){return"Authentication failed."}},e.runtime={automaticRefreshPaused:function(){return"Automatic refresh paused."},clckToRestartAutomaticRefresh:function(){return"Click to restart."},refreshThisCard:function(){return"Refresh this card"}},e.hints={dontUseWeightedAndStrecthedColumnsInSameSet:function(){return"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."}},e.defaults={inlineActionTitle:function(){return"Inline Action"},overflowButtonText:function(){return"..."},overflowButtonTooltip:function(){return"More options"},emptyElementText:function(e){return"Empty ".concat(e)},mediaPlayerAriaLabel:function(){return"Media content"},mediaPlayerPlayMedia:function(){return"Play media"},youTubeVideoPlayer:function(){return"YouTube video player"},vimeoVideoPlayer:function(){return"Vimeo video player"},dailymotionVideoPlayer:function(){return"Dailymotion video player"},carouselNavigationPreviousTooltip:function(){return"Previous carousel page"},carouselNavigationNextTooltip:function(){return"Next carousel page"}},e}();Zn.Strings=Qn;var Kn=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.SerializableObject=Yn.property=Yn.SerializableObjectSchema=Yn.CustomProperty=Yn.SerializableObjectCollectionProperty=Yn.SerializableObjectProperty=Yn.EnumProperty=Yn.ValueSetProperty=Yn.StringArrayProperty=Yn.PixelSizeProperty=Yn.NumProperty=Yn.BoolProperty=Yn.StringProperty=Yn.PropertyDefinition=Yn.BaseSerializationContext=Yn.isVersionLessOrEqual=Yn.Versions=Yn.Version=void 0;var er=zn,tr=Hn,nr=Rn,rr=Zn,or=function(){function e(e,t,n){void 0===e&&(e=1),void 0===t&&(t=1),this._isValid=!0,this._major=e,this._minor=t,this._label=n}return e.parse=function(t,n){if(t){var r=new e;r._versionString=t;var o=/(\d+).(\d+)/gi.exec(t);return null!=o&&3===o.length?(r._major=parseInt(o[1]),r._minor=parseInt(o[2])):r._isValid=!1,r._isValid||n.logParseEvent(void 0,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidVersionString(r._versionString)),r}},e.prototype.toString=function(){return this._isValid?this._major+"."+this._minor:this._versionString},e.prototype.toJSON=function(){return this.toString()},e.prototype.compareTo=function(e){if(!this.isValid||!e.isValid)throw new Error("Cannot compare invalid version.");return this.major>e.major?1:this.major<e.major?-1:this.minor>e.minor?1:this.minor<e.minor?-1:0},Object.defineProperty(e.prototype,"label",{get:function(){return this._label?this._label:this.toString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"major",{get:function(){return this._major},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minor",{get:function(){return this._minor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isValid",{get:function(){return this._isValid},enumerable:!1,configurable:!0}),e}();Yn.Version=or;var ir=function(){function e(){}return e.getAllDeclaredVersions=function(){var t=e,n=[];for(var r in t)if(r.match(/^v[0-9_]*$/))try{var o=t[r];o instanceof or&&n.push(o)}catch(i){}return n.sort(function(e,t){return e.compareTo(t)})},e.v1_0=new or(1,0),e.v1_1=new or(1,1),e.v1_2=new or(1,2),e.v1_3=new or(1,3),e.v1_4=new or(1,4),e.v1_5=new or(1,5),e.v1_6=new or(1,6,"1.6 Preview"),e.latest=e.v1_5,e}();Yn.Versions=ir,Yn.isVersionLessOrEqual=function(e,t){return!(e instanceof or)||(!(t instanceof or)||t.compareTo(e)>=0)};var ar=function(){function e(e){void 0===e&&(e=ir.latest),this._validationEvents=[],this.targetVersion=e}return e.prototype.isTemplateString=function(e){return"string"==typeof e&&e.startsWith("${")},e.prototype.tryDeleteValue=function(e,t){er.GlobalSettings.enableFullJsonRoundTrip||delete e[t]},e.prototype.tryDeleteDefaultValue=function(e,t){er.GlobalSettings.enableFullJsonRoundTrip&&this.isTemplateString(e[t])||delete e[t]},e.prototype.serializeValue=function(e,t,n,r,o){void 0===r&&(r=void 0),void 0===o&&(o=!1),null==n?er.GlobalSettings.enableFullJsonRoundTrip&&!o||delete e[t]:n===r?er.GlobalSettings.enableFullJsonRoundTrip&&!o&&this.isTemplateString(e[t])||delete e[t]:e[t]=n},e.prototype.serializeString=function(e,t,n,r){null==n?this.tryDeleteValue(e,t):n===r?this.tryDeleteDefaultValue(e,t):e[t]=n},e.prototype.serializeBool=function(e,t,n,r){null==n?this.tryDeleteValue(e,t):n===r?this.tryDeleteDefaultValue(e,t):e[t]=n},e.prototype.serializeNumber=function(e,t,n,r){null==n||isNaN(n)?this.tryDeleteValue(e,t):n===r?this.tryDeleteDefaultValue(e,t):e[t]=n},e.prototype.serializeEnum=function(e,t,n,r,o){void 0===o&&(o=void 0),null==r?this.tryDeleteValue(t,n):r===o?this.tryDeleteDefaultValue(t,n):t[n]=e[r]},e.prototype.serializeArray=function(e,t,n){var r=[];if(n)for(var o=0,i=n;o<i.length;o++){var a=i[o],s=void 0;void 0!==(s=a instanceof xr?a.toJSON(this):a.toJSON?a.toJSON():a)&&r.push(s)}0===r.length?e.hasOwnProperty(t)&&Array.isArray(e[t])&&delete e[t]:this.serializeValue(e,t,r)},e.prototype.clearEvents=function(){this._validationEvents=[]},e.prototype.logEvent=function(e,t,n,r){this._validationEvents.push({source:e,phase:t,event:n,message:r})},e.prototype.logParseEvent=function(e,t,n){this.logEvent(e,nr.ValidationPhase.Parse,t,n)},e.prototype.getEventAt=function(e){return this._validationEvents[e]},Object.defineProperty(e.prototype,"eventCount",{get:function(){return this._validationEvents.length},enumerable:!1,configurable:!0}),e}();Yn.BaseSerializationContext=ar;var sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t}(ar),lr=function(){function e(t,n,r,o){this.targetVersion=t,this.name=n,this.defaultValue=r,this.onGetInitialValue=o,this.isSerializationEnabled=!0,this.sequentialNumber=e._sequentialNumber,e._sequentialNumber++}return e.prototype.getInternalName=function(){return this.name},e.prototype.parse=function(e,t,n){return t[this.name]},e.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,n,this.defaultValue)},e._sequentialNumber=0,e}();Yn.PropertyDefinition=lr;var cr=function(e){function t(t,n,r,o,i,a){void 0===r&&(r=!0);var s=e.call(this,t,n,i,a)||this;return s.targetVersion=t,s.name=n,s.treatEmptyAsUndefined=r,s.regEx=o,s.defaultValue=i,s.onGetInitialValue=a,s}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=tr.parseString(t[this.name],this.defaultValue);if(!(void 0===r||""===r&&this.treatEmptyAsUndefined)&&void 0!==this.regEx&&!this.regEx.exec(r))return void n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(r,this.name));return r},t.prototype.toJSON=function(e,t,n,r){r.serializeString(t,this.name,""===n&&this.treatEmptyAsUndefined?void 0:n,this.defaultValue)},t}(lr);Yn.StringProperty=cr;var ur=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r,o)||this;return i.targetVersion=t,i.name=n,i.defaultValue=r,i.onGetInitialValue=o,i}return Kn(t,e),t.prototype.parse=function(e,t,n){return tr.parseBool(t[this.name],this.defaultValue)},t.prototype.toJSON=function(e,t,n,r){r.serializeBool(t,this.name,n,this.defaultValue)},t}(lr);Yn.BoolProperty=ur;var dr=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r,o)||this;return i.targetVersion=t,i.name=n,i.defaultValue=r,i.onGetInitialValue=o,i}return Kn(t,e),t.prototype.parse=function(e,t,n){return tr.parseNumber(t[this.name],this.defaultValue)},t.prototype.toJSON=function(e,t,n,r){r.serializeNumber(t,this.name,n,this.defaultValue)},t}(lr);Yn.NumProperty=dr;var pr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=void 0,o=t[this.name];if("string"==typeof o){var i=!1;try{var a=er.SizeAndUnit.parse(o,!0);a.unit===nr.SizeUnit.Pixel&&(r=a.physicalSize,i=!0)}catch(s){}i||n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(t[this.name],this.name))}return r},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,"number"!=typeof n||isNaN(n)?void 0:n+"px")},t}(lr);Yn.PixelSizeProperty=pr;var hr=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r,o)||this;return i.targetVersion=t,i.name=n,i.defaultValue=r,i.onGetInitialValue=o,i}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=t[this.name];if(void 0===r||!Array.isArray(r))return this.defaultValue;for(var o=[],i=0,a=r;i<a.length;i++){var s=a[i];"string"==typeof s?o.push(s):n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,'Invalid array value "'.concat(JSON.stringify(s),'" of type "').concat(typeof s,'" ignored for "').concat(this.name,'".'))}return o},t.prototype.toJSON=function(e,t,n,r){r.serializeArray(t,this.name,n)},t}(lr);Yn.StringArrayProperty=hr;var mr=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,o,i)||this;return a.targetVersion=t,a.name=n,a.values=r,a.defaultValue=o,a.onGetInitialValue=i,a}return Kn(t,e),t.prototype.isValidValue=function(e,t){for(var n=0,r=this.values;n<r.length;n++){var o=r[n];if(e.toLowerCase()===o.value.toLowerCase())return(o.targetVersion?o.targetVersion:this.targetVersion).compareTo(t.targetVersion)<=0}return!1},t.prototype.parse=function(e,t,n){var r=t[this.name];if(void 0===r)return this.defaultValue;if("string"==typeof r)for(var o=0,i=this.values;o<i.length;o++){var a=i[o];if(r.toLowerCase()===a.value.toLowerCase()){var s=a.targetVersion?a.targetVersion:this.targetVersion;return s.compareTo(n.targetVersion)<=0?a.value:(n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.propertyValueNotSupported(r,this.name,s.toString(),n.targetVersion.toString())),this.defaultValue)}}return n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(r,this.name)),this.defaultValue},t.prototype.toJSON=function(e,t,n,r){var o=!1;if(void 0!==n){o=!0;for(var i=0,a=this.values;i<a.length;i++){var s=a[i];if(s.value===n){var l=s.targetVersion?s.targetVersion:this.targetVersion;if(l.compareTo(r.targetVersion)<=0){o=!1;break}r.logEvent(e,nr.ValidationPhase.ToJSON,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.propertyValueNotSupported(n,this.name,l.toString(),r.targetVersion.toString()))}}}o||r.serializeValue(t,this.name,n,this.defaultValue,!0)},t}(lr);Yn.ValueSetProperty=mr;var fr=function(e){function t(t,n,r,o,i,a){var s=e.call(this,t,n,o,a)||this;if(s.targetVersion=t,s.name=n,s.enumType=r,s.defaultValue=o,s.onGetInitialValue=a,s._values=[],i)s._values=i;else for(var l in r){var c=parseInt(l,10);c>=0&&s._values.push({value:c})}return s}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=t[this.name];if("string"!=typeof r)return this.defaultValue;var o=tr.getEnumValueByName(this.enumType,r);if(void 0!==o)for(var i=0,a=this.values;i<a.length;i++){var s=a[i];if(s.value===o){var l=s.targetVersion?s.targetVersion:this.targetVersion;return l.compareTo(n.targetVersion)<=0?o:(n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.propertyValueNotSupported(r,this.name,l.toString(),n.targetVersion.toString())),this.defaultValue)}}return n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(r,this.name)),this.defaultValue},t.prototype.toJSON=function(e,t,n,r){var o=!1;if(void 0!==n){o=!0;for(var i=0,a=this.values;i<a.length;i++){var s=a[i];if(s.value===n){if((s.targetVersion?s.targetVersion:this.targetVersion).compareTo(r.targetVersion)<=0){o=!1;break}r.logEvent(e,nr.ValidationPhase.ToJSON,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(n,this.name))}}}o||r.serializeEnum(this.enumType,t,this.name,n,this.defaultValue)},Object.defineProperty(t.prototype,"values",{get:function(){return this._values},enumerable:!1,configurable:!0}),t}(lr);Yn.EnumProperty=fr;var gr=function(e){function t(t,n,r,o,i){void 0===o&&(o=!1);var a=e.call(this,t,n,i,function(e){return a.nullable?void 0:new a.objectType})||this;return a.targetVersion=t,a.name=n,a.objectType=r,a.nullable=o,a}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=t[this.name];if(void 0===r)return this.onGetInitialValue?this.onGetInitialValue(e):this.defaultValue;var o=new this.objectType;return o.parse(r,n),o},t.prototype.toJSON=function(e,t,n,r){var o=void 0;void 0===n||n.hasAllDefaultValues()||(o=n.toJSON(r)),"object"==typeof o&&0===Object.keys(o).length&&(o=void 0),r.serializeValue(t,this.name,o,this.defaultValue,!0)},t}(lr);Yn.SerializableObjectProperty=gr;var yr=function(e){function t(t,n,r,o){var i=e.call(this,t,n,void 0,function(e){return[]})||this;return i.targetVersion=t,i.name=n,i.objectType=r,i.onItemAdded=o,i}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=[],o=t[this.name];if(Array.isArray(o))for(var i=0,a=o;i<a.length;i++){var s=a[i],l=new this.objectType;l.parse(s,n),r.push(l),this.onItemAdded&&this.onItemAdded(e,l)}return r.length>0?r:this.onGetInitialValue?this.onGetInitialValue(e):void 0},t.prototype.toJSON=function(e,t,n,r){r.serializeArray(t,this.name,n)},t}(lr);Yn.SerializableObjectCollectionProperty=yr;var vr=function(e){function t(t,n,r,o,i,a){var s=e.call(this,t,n,i,a)||this;if(s.targetVersion=t,s.name=n,s.onParse=r,s.onToJSON=o,s.defaultValue=i,s.onGetInitialValue=a,!s.onParse)throw new Error("CustomPropertyDefinition instances must have an onParse handler.");if(!s.onToJSON)throw new Error("CustomPropertyDefinition instances must have an onToJSON handler.");return s}return Kn(t,e),t.prototype.parse=function(e,t,n){return this.onParse(e,this,t,n)},t.prototype.toJSON=function(e,t,n,r){this.onToJSON(e,this,t,n,r)},t}(lr);Yn.CustomProperty=vr;var br=function(){function e(){this._properties=[]}return e.prototype.indexOf=function(e){for(var t=0;t<this._properties.length;t++)if(this._properties[t]===e)return t;return-1},e.prototype.add=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var o=r[n];-1===this.indexOf(o)&&this._properties.push(o)}},e.prototype.remove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)for(var o=r[n];;){var i=this.indexOf(o);if(!(i>=0))break;this._properties.splice(i,1)}},e.prototype.getItemAt=function(e){return this._properties[e]},e.prototype.getCount=function(){return this._properties.length},e}();Yn.SerializableObjectSchema=br,Yn.property=function(e){return function(t,n){var r=Object.getOwnPropertyDescriptor(t,n)||{};r.get||r.set||(r.get=function(){return this.getValue(e)},r.set=function(t){this.setValue(e,t)},Object.defineProperty(t,n,r))}};var xr=function(){function e(){this._propertyBag={},this._rawProperties={},this.maxVersion=e.defaultMaxVersion;for(var t=this.getSchema(),n=0;n<t.getCount();n++){var r=t.getItemAt(n);r.onGetInitialValue&&this.setValue(r,r.onGetInitialValue(this))}}return e.prototype.getDefaultSerializationContext=function(){return new sr},e.prototype.populateSchema=function(t){var n=this.constructor,r=[];for(var o in n)try{var i=n[o];i instanceof lr&&r.push(i)}catch(s){}if(r.length>0){var a=r.sort(function(e,t){return e.sequentialNumber>t.sequentialNumber?1:e.sequentialNumber<t.sequentialNumber?-1:0});t.add.apply(t,a)}e.onRegisterCustomProperties&&e.onRegisterCustomProperties(this,t)},e.prototype.getValue=function(e){return this._propertyBag.hasOwnProperty(e.getInternalName())?this._propertyBag[e.getInternalName()]:e.defaultValue},e.prototype.setValue=function(e,t){null==t?delete this._propertyBag[e.getInternalName()]:this._propertyBag[e.getInternalName()]=t},e.prototype.internalParse=function(e,t){if(this._propertyBag={},this._rawProperties=er.GlobalSettings.enableFullJsonRoundTrip&&e||{},e)for(var n=this.getSchema(),r=0;r<n.getCount();r++){var o=n.getItemAt(r);if(o.isSerializationEnabled){var i=o.onGetInitialValue?o.onGetInitialValue(this):void 0;e.hasOwnProperty(o.name)&&(o.targetVersion.compareTo(t.targetVersion)<=0?i=o.parse(this,e,t):t.logParseEvent(this,nr.ValidationEvent.UnsupportedProperty,rr.Strings.errors.propertyNotSupported(o.name,o.targetVersion.toString(),t.targetVersion.toString()))),this.setValue(o,i)}}else this.resetDefaultValues()},e.prototype.internalToJSON=function(e,t){for(var n=this.getSchema(),r=[],o=0;o<n.getCount();o++){var i=n.getItemAt(o);i.isSerializationEnabled&&i.targetVersion.compareTo(t.targetVersion)<=0&&-1===r.indexOf(i.name)&&(i.toJSON(this,e,this.getValue(i),t),r.push(i.name))}},e.prototype.shouldSerialize=function(e){return!0},e.prototype.parse=function(e,t){this.internalParse(e,t||new sr)},e.prototype.toJSON=function(e){var t;if(e&&e instanceof ar?t=e:(t=this.getDefaultSerializationContext()).toJSONOriginalParam=e,this.shouldSerialize(t)){var n=void 0;return n=er.GlobalSettings.enableFullJsonRoundTrip&&this._rawProperties&&"object"==typeof this._rawProperties?this._rawProperties:{},this.internalToJSON(n,t),n}},e.prototype.hasDefaultValue=function(e){return this.getValue(e)===e.defaultValue},e.prototype.hasAllDefaultValues=function(){for(var e=this.getSchema(),t=0;t<e.getCount();t++){var n=e.getItemAt(t);if(!this.hasDefaultValue(n))return!1}return!0},e.prototype.resetDefaultValues=function(){for(var e=this.getSchema(),t=0;t<e.getCount();t++){var n=e.getItemAt(t);this.setValue(n,n.defaultValue)}},e.prototype.setCustomProperty=function(e,t){"string"==typeof t&&!t||null==t?delete this._rawProperties[e]:this._rawProperties[e]=t},e.prototype.getCustomProperty=function(e){return this._rawProperties[e]},e.prototype.getSchema=function(){var t=e._schemaCache[this.getSchemaKey()];return t||(t=new br,this.populateSchema(t),e._schemaCache[this.getSchemaKey()]=t),t},e.defaultMaxVersion=ir.latest,e._schemaCache={},e}();Yn.SerializableObject=xr;var Cr=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.HostCapabilities=void 0;var wr=Yn,Sr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._capabilities={},t}return Cr(t,e),t.prototype.getSchemaKey=function(){return"HostCapabilities"},t.prototype.internalParse=function(t,n){if(e.prototype.internalParse.call(this,t,n),t)for(var r in t){var o=t[r];if("string"==typeof o)if("*"===o)this.addCapability(r,"*");else{var i=wr.Version.parse(o,n);(null==i?void 0:i.isValid)&&this.addCapability(r,i)}}},t.prototype.internalToJSON=function(t,n){for(var r in e.prototype.internalToJSON.call(this,t,n),this._capabilities)t[r]=this._capabilities[r]},t.prototype.addCapability=function(e,t){this._capabilities[e]=t},t.prototype.removeCapability=function(e){delete this._capabilities[e]},t.prototype.clear=function(){this._capabilities={}},t.prototype.hasCapability=function(e,t){return!!this._capabilities.hasOwnProperty(e)&&("*"===t||"*"===this._capabilities[e]||t.compareTo(this._capabilities[e])<=0)},t.prototype.areAllMet=function(e){for(var t in this._capabilities)if(!e.hasCapability(t,this._capabilities[t]))return!1;return!0},t}(wr.SerializableObject);Xn.HostCapabilities=Sr;var kr=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(qn,"__esModule",{value:!0}),qn.defaultHostConfig=qn.HostConfig=qn.CarouselConfig=qn.FontTypeSet=qn.FontTypeDefinition=qn.ContainerStyleSet=qn.ContainerStyleDefinition=qn.ColorSetDefinition=qn.ActionsConfig=qn.ShowCardActionConfig=qn.FactSetConfig=qn.FactTitleDefinition=qn.FactTextDefinition=qn.InputConfig=qn.InputLabelConfig=qn.RequiredInputLabelTextDefinition=qn.TextBlockConfig=qn.TextStyleSet=qn.TextStyleDefinition=qn.BaseTextDefinition=qn.TableConfig=qn.MediaConfig=qn.ImageSetConfig=qn.AdaptiveCardConfig=qn.TextColorDefinition=qn.ColorDefinition=void 0;var Pr=Rn,Er=Hn,Ar=zn,Ir=Xn;function _r(e,t,n){if("string"==typeof t){var r=Er.parseEnum(e,t,n);return void 0!==r?r:n}return"number"==typeof t?t:n}var Tr=function(){function e(e,t){this.default="#000000",this.subtle="#666666",e&&(this.default=e),t&&(this.subtle=t)}return e.prototype.parse=function(e){e&&(this.default=e.default||this.default,this.subtle=e.subtle||this.subtle)},e}();qn.ColorDefinition=Tr;var jr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.highlightColors=new Tr("#22000000","#11000000"),t}return kr(t,e),t.prototype.parse=function(t){e.prototype.parse.call(this,t),t&&this.highlightColors.parse(t.highlightColors)},t}(Tr);qn.TextColorDefinition=jr;var Mr=function(){return function(e){this.allowCustomStyle=!1,e&&(this.allowCustomStyle=e.allowCustomStyle||this.allowCustomStyle)}}();qn.AdaptiveCardConfig=Mr;var Nr=function(){function e(e){this.imageSize=Pr.Size.Medium,this.maxImageHeight=100,e&&(this.imageSize=null!=e.imageSize?e.imageSize:this.imageSize,this.maxImageHeight=Er.parseNumber(e.maxImageHeight,100))}return e.prototype.toJSON=function(){return{imageSize:Pr.Size[this.imageSize],maxImageHeight:this.maxImageHeight}},e}();qn.ImageSetConfig=Nr;var Dr=function(){function e(e){this.allowInlinePlayback=!0,e&&(this.defaultPoster=e.defaultPoster,this.allowInlinePlayback=e.allowInlinePlayback||this.allowInlinePlayback)}return e.prototype.toJSON=function(){return{defaultPoster:this.defaultPoster,allowInlinePlayback:this.allowInlinePlayback}},e}();qn.MediaConfig=Dr;var Or=function(){function e(e){this.cellSpacing=8,e&&(this.cellSpacing=e.cellSpacing&&"number"==typeof e.cellSpacing?e.cellSpacing:this.cellSpacing)}return e.prototype.toJSON=function(){return{cellSpacing:this.cellSpacing}},e}();qn.TableConfig=Or;var Vr=function(){function e(e){this.size=Pr.TextSize.Default,this.color=Pr.TextColor.Default,this.isSubtle=!1,this.weight=Pr.TextWeight.Default,this.parse(e)}return e.prototype.parse=function(e){e&&(this.size=_r(Pr.TextSize,e.size,this.size),this.color=_r(Pr.TextColor,e.color,this.color),this.isSubtle=void 0!==e.isSubtle&&"boolean"==typeof e.isSubtle?e.isSubtle:this.isSubtle,this.weight=_r(Pr.TextWeight,e.weight,this.getDefaultWeight()))},e.prototype.getDefaultWeight=function(){return Pr.TextWeight.Default},e.prototype.toJSON=function(){return{size:Pr.TextSize[this.size],color:Pr.TextColor[this.color],isSubtle:this.isSubtle,weight:Pr.TextWeight[this.weight]}},e}();qn.BaseTextDefinition=Vr;var Br=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fontType=Pr.FontType.Default,t}return kr(t,e),t.prototype.parse=function(t){e.prototype.parse.call(this,t),t&&(this.fontType=_r(Pr.FontType,t.fontType,this.fontType))},t}(Vr);qn.TextStyleDefinition=Br;var Rr=function(){function e(e){this.default=new Br,this.heading=new Br({size:"Large",weight:"Bolder"}),this.columnHeader=new Br({weight:"Bolder"}),e&&(this.heading.parse(e.heading),this.columnHeader.parse(e.columnHeader))}return e.prototype.getStyleByName=function(e){switch(e.toLowerCase()){case"heading":return this.heading;case"columnHeader":return this.columnHeader;default:return this.default}},e}();qn.TextStyleSet=Rr;var zr=function(){return function(e){e&&(this.headingLevel=Er.parseNumber(e.headingLevel))}}();qn.TextBlockConfig=zr;var Lr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.suffix=" *",t.suffixColor=Pr.TextColor.Attention,t}return kr(t,e),t.prototype.parse=function(t){e.prototype.parse.call(this,t),t&&(this.suffix=t.suffix||this.suffix,this.suffixColor=_r(Pr.TextColor,t.suffixColor,this.suffixColor))},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.suffix=this.suffix,t.suffixColor=Pr.TextColor[this.suffixColor],t},t}(Vr);qn.RequiredInputLabelTextDefinition=Lr;var Hr=function(){return function(e){this.inputSpacing=Pr.Spacing.Small,this.width=30,this.requiredInputs=new Lr,this.optionalInputs=new Vr,e&&(this.inputSpacing=_r(Pr.Spacing,e.inputSpacing,this.inputSpacing),this.requiredInputs=new Lr(e.requiredInputs),this.optionalInputs=new Vr(e.optionalInputs),this.width=null!=e.width?e.width:this.width)}}();qn.InputLabelConfig=Hr;var Fr=function(){return function(e){this.label=new Hr,this.errorMessage=new Vr({color:Pr.TextColor.Attention}),this.debounceTimeInMilliSeconds=0,this.allowRevealOnHoverStyle=!1,e&&(this.label=new Hr(e.label),this.errorMessage=new Vr(e.errorMessage),this.allowRevealOnHoverStyle=e.allowRevealOnHoverStyle||this.allowRevealOnHoverStyle,this.debounceTimeInMilliSeconds=e.debounceTimeInMilliSeconds)}}();qn.InputConfig=Fr;var Wr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.wrap=!0,t}return kr(t,e),t.prototype.parse=function(t){e.prototype.parse.call(this,t),t&&(this.wrap=null!=t.wrap?t.wrap:this.wrap)},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.wrap=this.wrap,t},t}(Vr);qn.FactTextDefinition=Wr;var $r=function(e){function t(t){var n=e.call(this,t)||this;return n.maxWidth=150,n.weight=Pr.TextWeight.Bolder,t&&(n.maxWidth=null!=t.maxWidth?t.maxWidth:n.maxWidth,n.weight=_r(Pr.TextWeight,t.weight,Pr.TextWeight.Bolder)),n}return kr(t,e),t.prototype.getDefaultWeight=function(){return Pr.TextWeight.Bolder},t}(Wr);qn.FactTitleDefinition=$r;var Ur=function(){return function(e){this.title=new $r,this.value=new Wr,this.spacing=10,e&&(this.title=new $r(e.title),this.value=new Wr(e.value),this.spacing=e.spacing&&null!=e.spacing?e.spacing&&e.spacing:this.spacing)}}();qn.FactSetConfig=Ur;var Jr=function(){function e(e){this.actionMode=Pr.ShowCardActionMode.Inline,this.inlineTopMargin=16,this.style=Pr.ContainerStyle.Emphasis,e&&(this.actionMode=_r(Pr.ShowCardActionMode,e.actionMode,Pr.ShowCardActionMode.Inline),this.inlineTopMargin=null!=e.inlineTopMargin?e.inlineTopMargin:this.inlineTopMargin,this.style=e.style&&"string"==typeof e.style?e.style:Pr.ContainerStyle.Emphasis)}return e.prototype.toJSON=function(){return{actionMode:Pr.ShowCardActionMode[this.actionMode],inlineTopMargin:this.inlineTopMargin,style:this.style}},e}();qn.ShowCardActionConfig=Jr;var Gr=function(){function e(e){if(this.maxActions=5,this.spacing=Pr.Spacing.Default,this.buttonSpacing=20,this.showCard=new Jr,this.preExpandSingleShowCardAction=!1,this.actionsOrientation=Pr.Orientation.Horizontal,this.actionAlignment=Pr.ActionAlignment.Left,this.iconPlacement=Pr.ActionIconPlacement.LeftOfTitle,this.allowTitleToWrap=!1,this.iconSize=16,e){this.maxActions=null!=e.maxActions?e.maxActions:this.maxActions,this.spacing=_r(Pr.Spacing,e.spacing&&e.spacing,Pr.Spacing.Default),this.buttonSpacing=null!=e.buttonSpacing?e.buttonSpacing:this.buttonSpacing,this.showCard=new Jr(e.showCard),this.preExpandSingleShowCardAction=Er.parseBool(e.preExpandSingleShowCardAction,!1),this.actionsOrientation=_r(Pr.Orientation,e.actionsOrientation,Pr.Orientation.Horizontal),this.actionAlignment=_r(Pr.ActionAlignment,e.actionAlignment,Pr.ActionAlignment.Left),this.iconPlacement=_r(Pr.ActionIconPlacement,e.iconPlacement,Pr.ActionIconPlacement.LeftOfTitle),this.allowTitleToWrap=null!=e.allowTitleToWrap?e.allowTitleToWrap:this.allowTitleToWrap;try{var t=Ar.SizeAndUnit.parse(e.iconSize);t.unit===Pr.SizeUnit.Pixel&&(this.iconSize=t.physicalSize)}catch(n){}}}return e.prototype.toJSON=function(){return{maxActions:this.maxActions,spacing:Pr.Spacing[this.spacing],buttonSpacing:this.buttonSpacing,showCard:this.showCard,preExpandSingleShowCardAction:this.preExpandSingleShowCardAction,actionsOrientation:Pr.Orientation[this.actionsOrientation],actionAlignment:Pr.ActionAlignment[this.actionAlignment]}},e}();qn.ActionsConfig=Gr;var qr=function(){function e(e){this.default=new jr,this.dark=new jr,this.light=new jr,this.accent=new jr,this.good=new jr,this.warning=new jr,this.attention=new jr,this.parse(e)}return e.prototype.parseSingleColor=function(e,t){e&&this[t].parse(e[t])},e.prototype.parse=function(e){e&&(this.parseSingleColor(e,"default"),this.parseSingleColor(e,"dark"),this.parseSingleColor(e,"light"),this.parseSingleColor(e,"accent"),this.parseSingleColor(e,"good"),this.parseSingleColor(e,"warning"),this.parseSingleColor(e,"attention"))},e}();qn.ColorSetDefinition=qr;var Xr=function(){function e(e){this.foregroundColors=new qr({default:{default:"#333333",subtle:"#EE333333"},dark:{default:"#000000",subtle:"#66000000"},light:{default:"#FFFFFF",subtle:"#33000000"},accent:{default:"#2E89FC",subtle:"#882E89FC"},good:{default:"#028A02",subtle:"#DD027502"},warning:{default:"#E69500",subtle:"#DDE69500"},attention:{default:"#CC3300",subtle:"#DDCC3300"}}),this.parse(e)}return e.prototype.parse=function(e){e&&(this.backgroundColor=e.backgroundColor,this.foregroundColors.parse(e.foregroundColors),this.highlightBackgroundColor=e.highlightBackgroundColor,this.highlightForegroundColor=e.highlightForegroundColor,this.borderColor=e.borderColor)},Object.defineProperty(e.prototype,"isBuiltIn",{get:function(){return!1},enumerable:!1,configurable:!0}),e}();qn.ContainerStyleDefinition=Xr;var Yr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kr(t,e),Object.defineProperty(t.prototype,"isBuiltIn",{get:function(){return!0},enumerable:!1,configurable:!0}),t}(Xr),Zr=function(){function e(e){if(this._allStyles={},this._allStyles[Pr.ContainerStyle.Default]=new Yr,this._allStyles[Pr.ContainerStyle.Emphasis]=new Yr,this._allStyles[Pr.ContainerStyle.Accent]=new Yr,this._allStyles[Pr.ContainerStyle.Good]=new Yr,this._allStyles[Pr.ContainerStyle.Attention]=new Yr,this._allStyles[Pr.ContainerStyle.Warning]=new Yr,e){this._allStyles[Pr.ContainerStyle.Default].parse(e[Pr.ContainerStyle.Default]),this._allStyles[Pr.ContainerStyle.Emphasis].parse(e[Pr.ContainerStyle.Emphasis]),this._allStyles[Pr.ContainerStyle.Accent].parse(e[Pr.ContainerStyle.Accent]),this._allStyles[Pr.ContainerStyle.Good].parse(e[Pr.ContainerStyle.Good]),this._allStyles[Pr.ContainerStyle.Attention].parse(e[Pr.ContainerStyle.Attention]),this._allStyles[Pr.ContainerStyle.Warning].parse(e[Pr.ContainerStyle.Warning]);var t=e.customStyles;if(t&&Array.isArray(t))for(var n=0,r=t;n<r.length;n++){var o=r[n];if(o){var i=o.name;i&&"string"==typeof i&&(this._allStyles.hasOwnProperty(i)?this._allStyles[i].parse(o.style):this._allStyles[i]=new Xr(o.style))}}}}return e.prototype.toJSON=function(){var e=this,t=[];Object.keys(this._allStyles).forEach(function(n){e._allStyles[n].isBuiltIn||t.push({name:n,style:e._allStyles[n]})});var n={default:this.default,emphasis:this.emphasis};return t.length>0&&(n.customStyles=t),n},e.prototype.getStyleByName=function(e,t){return e&&this._allStyles.hasOwnProperty(e)?this._allStyles[e]:t||this._allStyles[Pr.ContainerStyle.Default]},Object.defineProperty(e.prototype,"default",{get:function(){return this._allStyles[Pr.ContainerStyle.Default]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"emphasis",{get:function(){return this._allStyles[Pr.ContainerStyle.Emphasis]},enumerable:!1,configurable:!0}),e}();qn.ContainerStyleSet=Zr;var Qr=function(){function e(e){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},e&&(this.fontFamily=e)}return e.prototype.parse=function(e){this.fontFamily=e.fontFamily||this.fontFamily,this.fontSizes={small:e.fontSizes&&e.fontSizes.small||this.fontSizes.small,default:e.fontSizes&&e.fontSizes.default||this.fontSizes.default,medium:e.fontSizes&&e.fontSizes.medium||this.fontSizes.medium,large:e.fontSizes&&e.fontSizes.large||this.fontSizes.large,extraLarge:e.fontSizes&&e.fontSizes.extraLarge||this.fontSizes.extraLarge},this.fontWeights={lighter:e.fontWeights&&e.fontWeights.lighter||this.fontWeights.lighter,default:e.fontWeights&&e.fontWeights.default||this.fontWeights.default,bolder:e.fontWeights&&e.fontWeights.bolder||this.fontWeights.bolder}},e.monospace=new e("'Courier New', Courier, monospace"),e}();qn.FontTypeDefinition=Qr;var Kr=function(){function e(e){this.default=new Qr,this.monospace=new Qr("'Courier New', Courier, monospace"),e&&(this.default.parse(e.default),this.monospace.parse(e.monospace))}return e.prototype.getStyleDefinition=function(e){switch(e){case Pr.FontType.Monospace:return this.monospace;case Pr.FontType.Default:default:return this.default}},e}();qn.FontTypeSet=Kr;var eo=function(){function e(e){this.maxCarouselPages=10,this.minAutoplayDelay=5e3,e&&(this.maxCarouselPages=null!=e.maxCarouselPages?e.maxCarouselPages:this.maxCarouselPages,this.minAutoplayDelay=null!=e.minAutoplayDelay?e.minAutoplayDelay:this.minAutoplayDelay)}return e.prototype.toJSON=function(){return{maxCarouselPages:this.maxCarouselPages,minAutoplayDelay:this.minAutoplayDelay}},e}();qn.CarouselConfig=eo;var to=function(){function e(e){this.hostCapabilities=new Ir.HostCapabilities,this.choiceSetInputValueSeparator=",",this.supportsInteractivity=!0,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 Zr,this.inputs=new Fr,this.actions=new Gr,this.adaptiveCard=new Mr,this.imageSet=new Nr,this.media=new Dr,this.factSet=new Ur,this.table=new Or,this.textStyles=new Rr,this.textBlock=new zr,this.carousel=new eo,this.alwaysAllowBleed=!1,e&&(("string"==typeof e||e instanceof String)&&(e=JSON.parse(e)),this.choiceSetInputValueSeparator=e&&"string"==typeof e.choiceSetInputValueSeparator?e.choiceSetInputValueSeparator:this.choiceSetInputValueSeparator,this.supportsInteractivity=e&&"boolean"==typeof e.supportsInteractivity?e.supportsInteractivity:this.supportsInteractivity,this._legacyFontType=new Qr,this._legacyFontType.parse(e),e.fontTypes&&(this.fontTypes=new Kr(e.fontTypes)),e.lineHeights&&(this.lineHeights={small:e.lineHeights.small,default:e.lineHeights.default,medium:e.lineHeights.medium,large:e.lineHeights.large,extraLarge:e.lineHeights.extraLarge}),this.imageSizes={small:e.imageSizes&&e.imageSizes.small||this.imageSizes.small,medium:e.imageSizes&&e.imageSizes.medium||this.imageSizes.medium,large:e.imageSizes&&e.imageSizes.large||this.imageSizes.large},this.containerStyles=new Zr(e.containerStyles),this.spacing={small:e.spacing&&e.spacing.small||this.spacing.small,default:e.spacing&&e.spacing.default||this.spacing.default,medium:e.spacing&&e.spacing.medium||this.spacing.medium,large:e.spacing&&e.spacing.large||this.spacing.large,extraLarge:e.spacing&&e.spacing.extraLarge||this.spacing.extraLarge,padding:e.spacing&&e.spacing.padding||this.spacing.padding},this.separator={lineThickness:e.separator&&e.separator.lineThickness||this.separator.lineThickness,lineColor:e.separator&&e.separator.lineColor||this.separator.lineColor},this.inputs=new Fr(e.inputs||this.inputs),this.actions=new Gr(e.actions||this.actions),this.adaptiveCard=new Mr(e.adaptiveCard||this.adaptiveCard),this.imageSet=new Nr(e.imageSet),this.factSet=new Ur(e.factSet),this.textStyles=new Rr(e.textStyles),this.textBlock=new zr(e.textBlock),this.carousel=new eo(e.carousel))}return e.prototype.getFontTypeDefinition=function(e){return this.fontTypes?this.fontTypes.getStyleDefinition(e):e===Pr.FontType.Monospace?Qr.monospace:this._legacyFontType},e.prototype.getEffectiveSpacing=function(e){switch(e){case Pr.Spacing.Small:return this.spacing.small;case Pr.Spacing.Default:return this.spacing.default;case Pr.Spacing.Medium:return this.spacing.medium;case Pr.Spacing.Large:return this.spacing.large;case Pr.Spacing.ExtraLarge:return this.spacing.extraLarge;case Pr.Spacing.Padding:return this.spacing.padding;default:return 0}},e.prototype.paddingDefinitionToSpacingDefinition=function(e){return new Ar.SpacingDefinition(this.getEffectiveSpacing(e.top),this.getEffectiveSpacing(e.right),this.getEffectiveSpacing(e.bottom),this.getEffectiveSpacing(e.left))},e.prototype.makeCssClassNames=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push((this.cssClassNamePrefix?this.cssClassNamePrefix+"-":"")+i)}return n},e.prototype.makeCssClassName=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.makeCssClassNames.apply(this,e).join(" ");return n||""},Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this._legacyFontType.fontFamily},set:function(e){this._legacyFontType.fontFamily=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSizes",{get:function(){return this._legacyFontType.fontSizes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontWeights",{get:function(){return this._legacyFontType.fontWeights},enumerable:!1,configurable:!0}),e}();qn.HostConfig=to,qn.defaultHostConfig=new to({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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},warning:{default:"#e69500",subtle:"#DDe69500"}}}},inputs:{label:{requiredInputs:{weight:Pr.TextWeight.Bolder,suffix:" *",suffixColor:Pr.TextColor.Attention},optionalInputs:{weight:Pr.TextWeight.Bolder}},errorMessage:{color:Pr.TextColor.Attention,weight:Pr.TextWeight.Bolder},debounceTimeInMilliSeconds:250},actions:{maxActions:5,spacing:Pr.Spacing.Default,buttonSpacing:10,showCard:{actionMode:Pr.ShowCardActionMode.Inline,inlineTopMargin:16},actionsOrientation:Pr.Orientation.Horizontal,actionAlignment:Pr.ActionAlignment.Left},adaptiveCard:{allowCustomStyle:!1},imageSet:{imageSize:Pr.Size.Medium,maxImageHeight:100},factSet:{title:{color:Pr.TextColor.Default,size:Pr.TextSize.Default,isSubtle:!1,weight:Pr.TextWeight.Bolder,wrap:!0,maxWidth:150},value:{color:Pr.TextColor.Default,size:Pr.TextSize.Default,isSubtle:!1,weight:Pr.TextWeight.Default,wrap:!0},spacing:10},carousel:{maxCarouselPages:10,minAutoplayDuration:5e3},textBlock:{headingLevel:2}});var no={},ro=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(no,"__esModule",{value:!0}),no.formatText=void 0;var oo=function(){function e(e){this._regularExpression=e}return e.prototype.format=function(e,t){var n;if(t){for(var r=t;null!=(n=this._regularExpression.exec(t));)r=r.replace(n[0],this.internalFormat(e,n));return r}return t},e}(),io=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ro(t,e),t.prototype.internalFormat=function(e,t){var n=new Date(Date.parse(t[1])),r=void 0!==t[2]?t[2].toLowerCase():"compact";return"compact"!==r?n.toLocaleDateString(e,{day:"numeric",weekday:r,month:r,year:"numeric"}):n.toLocaleDateString()},t}(oo),ao=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ro(t,e),t.prototype.internalFormat=function(e,t){return new Date(Date.parse(t[1])).toLocaleTimeString(e,{hour:"numeric",minute:"2-digit"})},t}(oo);no.formatText=function(e,t){for(var n=t,r=0,o=[new io(/\{{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 ao(/\{{2}TIME\((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|(?:(?:-|\+)\d{2}:\d{2})))\)\}{2}/g)];r<o.length;r++){n=o[r].format(e,n)}return n};var so={},lo=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),co=Vn&&Vn.__decorate||function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(so,"__esModule",{value:!0}),so.CardObject=so.ValidationResults=void 0;var uo=Rn,po=Zn,ho=zn,mo=Xn,fo=Yn,go=function(){function e(){this.allIds={},this.validationEvents=[]}return e.prototype.addFailure=function(e,t,n){this.validationEvents.push({phase:uo.ValidationPhase.Validation,source:e,event:t,message:n})},e}();so.ValidationResults=go;var yo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._shouldFallback=!1,t}return lo(t,e),t.prototype.getSchemaKey=function(){return this.getJsonTypeName()},Object.defineProperty(t.prototype,"requires",{get:function(){return this.getValue(t.requiresProperty)},enumerable:!1,configurable:!0}),t.prototype.contains=function(e){return!!this._renderedElement&&this._renderedElement.contains(e)},t.prototype.preProcessPropertyValue=function(e,t){var n=void 0===t?this.getValue(e):t;if(ho.GlobalSettings.allowPreProcessingPropertyValues){for(var r=this;r&&!r.onPreProcessPropertyValue;)r=r.parent;if(r&&r.onPreProcessPropertyValue)return r.onPreProcessPropertyValue(this,e,n)}return n},t.prototype.setParent=function(e){this._parent=e},t.prototype.setShouldFallback=function(e){this._shouldFallback=e},t.prototype.shouldFallback=function(){return this._shouldFallback||!this.requires.areAllMet(this.hostConfig.hostCapabilities)},t.prototype.getRootObject=function(){for(var e=this;e.parent;)e=e.parent;return e},t.prototype.internalValidateProperties=function(e){this.id&&(e.allIds.hasOwnProperty(this.id)?(1===e.allIds[this.id]&&e.addFailure(this,uo.ValidationEvent.DuplicateId,po.Strings.errors.duplicateId(this.id)),e.allIds[this.id]+=1):e.allIds[this.id]=1)},t.prototype.validateProperties=function(){var e=new go;return this.internalValidateProperties(e),e},t.prototype.findDOMNodeOwner=function(e){return this.contains(e)?this:void 0},t.prototype.releaseDOMResources=function(){},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedElement",{get:function(){return this._renderedElement},enumerable:!1,configurable:!0}),t.typeNameProperty=new fo.StringProperty(fo.Versions.v1_0,"type",void 0,void 0,void 0,function(e){return e.getJsonTypeName()}),t.idProperty=new fo.StringProperty(fo.Versions.v1_0,"id"),t.requiresProperty=new fo.SerializableObjectProperty(fo.Versions.v1_2,"requires",mo.HostCapabilities,!1,new mo.HostCapabilities),co([(0,fo.property)(t.idProperty)],t.prototype,"id",void 0),co([(0,fo.property)(t.requiresProperty)],t.prototype,"requires",null),t}(fo.SerializableObject);so.CardObject=yo;var vo={};Object.defineProperty(vo,"__esModule",{value:!0}),vo.GlobalRegistry=vo.CardObjectRegistry=void 0;var bo=Yn,xo=function(){function e(){this._items={}}return e.prototype.findByName=function(e){return this._items.hasOwnProperty(e)?this._items[e]:void 0},e.prototype.clear=function(){this._items={}},e.prototype.copyTo=function(e){for(var t=0,n=Object.keys(this._items);t<n.length;t++){var r=n[t],o=this._items[r];e.register(o.typeName,o.objectType,o.schemaVersion)}},e.prototype.register=function(e,t,n){void 0===n&&(n=bo.Versions.v1_0);var r=this.findByName(e);void 0!==r?r.objectType=t:r={typeName:e,objectType:t,schemaVersion:n},this._items[e]=r},e.prototype.unregister=function(e){delete this._items[e]},e.prototype.createInstance=function(e,t){var n=this.findByName(e);return n&&n.schemaVersion.compareTo(t)<=0?new n.objectType:void 0},e.prototype.getItemCount=function(){return Object.keys(this._items).length},e.prototype.getItemAt=function(e){var t=this;return Object.keys(this._items).map(function(e){return t._items[e]})[e]},e}();vo.CardObjectRegistry=xo;var Co=function(){function e(){}return e.populateWithDefaultElements=function(t){t.clear(),e.defaultElements.copyTo(t)},e.populateWithDefaultActions=function(t){t.clear(),e.defaultActions.copyTo(t)},Object.defineProperty(e,"elements",{get:function(){return e._elements||(e._elements=new xo,e.populateWithDefaultElements(e._elements)),e._elements},enumerable:!1,configurable:!0}),Object.defineProperty(e,"actions",{get:function(){return e._actions||(e._actions=new xo,e.populateWithDefaultActions(e._actions)),e._actions},enumerable:!1,configurable:!0}),e.reset=function(){e._elements=void 0,e._actions=void 0},e.defaultElements=new xo,e.defaultActions=new xo,e}();vo.GlobalRegistry=Co;var wo={},So={},ko={};Object.defineProperty(ko,"__esModule",{value:!0}),ko.Constants=void 0;var Po=function(){function e(){}return e.keys={tab:"Tab",enter:"Enter",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",delete:"Delete"},e}();ko.Constants=Po,Object.defineProperty(So,"__esModule",{value:!0}),So.MenuItem=void 0;var Eo=qn,Ao=ko,Io=function(){function e(e,t){this._isEnabled=!0,this.key=e,this._value=t}return e.prototype.click=function(){this.isEnabled&&this.onClick&&this.onClick(this)},e.prototype.updateCssClasses=function(){if(this._element){var e=this._hostConfig?this._hostConfig:Eo.defaultHostConfig;this._element.className=e.makeCssClassName("ac-ctrl"),this._element.classList.add(e.makeCssClassName(this.isEnabled?"ac-ctrl-dropdown-item":"ac-ctrl-dropdown-item-disabled")),this.isEnabled||this._element.classList.add(e.makeCssClassName("ac-disabled"))}},e.prototype.toString=function(){return this.value},e.prototype.render=function(e){var t=this;return this._hostConfig=e,this._element||(this._element=document.createElement("span"),this._element.innerText=this.value,this._element.setAttribute("role","menuitem"),this.isEnabled||this._element.setAttribute("aria-disabled","true"),this._element.setAttribute("aria-current","false"),this._element.onmouseup=function(e){t.click()},this._element.onkeydown=function(e){e.key===Ao.Constants.keys.enter&&(e.cancelBubble=!0,t.click())},this.updateCssClasses()),this._element},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,this._element&&(this._element.innerText=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled!==e&&(this._isEnabled=e,this.updateCssClasses())},enumerable:!1,configurable:!0}),e}();So.MenuItem=Io;var _o={},To={};Object.defineProperty(To,"__esModule",{value:!0}),To.Collection=void 0;var jo=function(){function e(){this._items=[]}return e.prototype.get=function(e){return this._items[e]},e.prototype.add=function(e){this._items.push(e),this.onItemAdded&&this.onItemAdded(e)},e.prototype.remove=function(e){var t=this._items.indexOf(e);t>=0&&(this._items=this._items.splice(t,1),this.onItemRemoved&&this.onItemRemoved(e))},e.prototype.indexOf=function(e){return this._items.indexOf(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),e}();To.Collection=jo;var Mo={};Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.PopupControl=void 0;var No=ko,Do=Hn,Oo=qn,Vo=function(){function e(){this._isOpen=!1}return e.prototype.keyDown=function(e){if(e.key===No.Constants.keys.escape)this.closePopup(!0)},e.prototype.render=function(e){var t=this,n=document.createElement("div");return n.tabIndex=0,n.className=this.hostConfig.makeCssClassName("ac-ctrl","ac-ctrl-popup-container"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.onkeydown=function(e){return t.keyDown(e),!e.cancelBubble},n.appendChild(this.renderContent()),n},e.prototype.focus=function(){this._popupElement&&this._popupElement.firstElementChild.focus()},e.prototype.popup=function(e){var t,n,r,o,i,a=this;if(!this._isOpen){this._overlayElement=document.createElement("div"),this._overlayElement.className=this.hostConfig.makeCssClassName("ac-ctrl-overlay"),this._overlayElement.tabIndex=0,this._overlayElement.style.width=document.documentElement.scrollWidth+"px",this._overlayElement.style.height=document.documentElement.scrollHeight+"px",this._overlayElement.onfocus=function(e){a.closePopup(!0)},document.body.appendChild(this._overlayElement);var s=e.getBoundingClientRect();this._popupElement=this.render(s),(t=this._popupElement.classList).remove.apply(t,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideLeftToRight","ac-ctrl-slideRightToLeft","ac-ctrl-slideTopToBottom","ac-ctrl-slideRightToLeft")),window.addEventListener("resize",function(e){a.closePopup(!0)});var l=e.getAttribute("aria-label");l&&this._popupElement.setAttribute("aria-label",l),this._overlayElement.appendChild(this._popupElement);var c,u=this._popupElement.getBoundingClientRect(),d=window.innerHeight-s.bottom,p=s.top,h=window.innerWidth-s.right,m=s.left,f=s.left+Do.getScrollX();if(p<u.height&&d<u.height){var g=Math.min(u.height,window.innerHeight);if(this._popupElement.style.maxHeight=g+"px",c=g<u.height?Do.getScrollY():Do.getScrollY()+s.top+(s.height-g)/2,m<u.width&&h<u.width){var y=Math.min(u.width,window.innerWidth);this._popupElement.style.maxWidth=y+"px",f=y<u.width?Do.getScrollX():Do.getScrollX()+s.left+(s.width-y)/2}else h>=u.width?(f=Do.getScrollX()+s.right,(n=this._popupElement.classList).add.apply(n,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideLeftToRight"))):(f=Do.getScrollX()+s.left-u.width,(r=this._popupElement.classList).add.apply(r,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideRightToLeft")))}else d>=u.height?(c=Do.getScrollY()+s.bottom,(o=this._popupElement.classList).add.apply(o,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideTopToBottom"))):(c=Do.getScrollY()+s.top-u.height,(i=this._popupElement.classList).add.apply(i,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideBottomToTop"))),h<u.width&&(f=Do.getScrollX()+s.right-u.width);this._popupElement.style.left=f+"px",this._popupElement.style.top=c+"px",this._popupElement.focus(),this._isOpen=!0}},e.prototype.closePopup=function(e){this._isOpen&&(document.body.removeChild(this._overlayElement),this._isOpen=!1,this.onClose&&this.onClose(this,e))},Object.defineProperty(e.prototype,"hostConfig",{get:function(){return this._hostConfig?this._hostConfig:Oo.defaultHostConfig},set:function(e){this._hostConfig=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),e}();Mo.PopupControl=Vo;var Bo=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(_o,"__esModule",{value:!0}),_o.PopupMenu=void 0;var Ro,zo,Lo,Ho=ko,Fo=To,Wo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._items=new Fo.Collection,t._renderedItems=[],t._selectedIndex=-1,t}return Bo(t,e),t.prototype.renderContent=function(){var e=document.createElement("div");e.className=this.hostConfig.makeCssClassName("ac-ctrl ac-popup"),e.setAttribute("role","listbox");for(var t=0;t<this._items.length;t++){var n=this._items.get(t).render(this.hostConfig);n.tabIndex=0,e.appendChild(n),t===this.selectedIndex&&n.focus(),this._renderedItems.push(n)}return e},t.prototype.keyDown=function(t){e.prototype.keyDown.call(this,t);var n=this._selectedIndex;switch(t.key){case Ho.Constants.keys.tab:this.closePopup(!0);break;case Ho.Constants.keys.up:(n<=0||--n<0)&&(n=this._renderedItems.length-1),this.selectedIndex=n,t.cancelBubble=!0;break;case Ho.Constants.keys.down:(n<0||++n>=this._renderedItems.length)&&(n=0),this.selectedIndex=n,t.cancelBubble=!0}},Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){e>=0&&e<this._renderedItems.length&&(this._renderedItems[e].focus(),this._selectedIndex=e)},enumerable:!1,configurable:!0}),t}(Mo.PopupControl);_o.PopupMenu=Wo,Ro=wo,zo=Vn&&Vn.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Lo=Vn&&Vn.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||zo(t,e,n)},Object.defineProperty(Ro,"__esModule",{value:!0}),Lo(So,Ro),Lo(_o,Ro);var $o=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Uo=Vn&&Vn.__decorate||function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Jo=Vn&&Vn.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})},Go=Vn&&Vn.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.BackgroundImage=Bn.ContainerBase=Bn.StylableCardElementContainer=Bn.ContainerStyleProperty=Bn.ActionSet=Bn.ShowCardAction=Bn.HttpAction=Bn.HttpHeader=Bn.ToggleVisibilityAction=Bn.OpenUrlAction=Bn.DataQuery=Bn.ExecuteAction=Bn.UniversalAction=Bn.SubmitAction=Bn.SubmitActionBase=Bn.Action=Bn.TimeInput=Bn.TimeProperty=Bn.DateInput=Bn.NumberInput=Bn.FilteredChoiceSet=Bn.ChoiceSetInput=Bn.ChoiceSetInputDataQuery=Bn.Choice=Bn.ToggleInput=Bn.TextInput=Bn.Input=Bn.Media=Bn.YouTubePlayer=Bn.DailymotionPlayer=Bn.VimeoPlayer=Bn.IFrameMediaMediaPlayer=Bn.CustomMediaPlayer=Bn.HTML5MediaPlayer=Bn.MediaPlayer=Bn.MediaSource=Bn.CaptionSource=Bn.ContentSource=Bn.ImageSet=Bn.CardElementContainer=Bn.Image=Bn.FactSet=Bn.Fact=Bn.RichTextBlock=Bn.TextRun=Bn.TextBlock=Bn.BaseTextBlock=Bn.ActionProperty=Bn.CardElement=Bn.renderSeparation=void 0,Bn.SerializationContext=Bn.AdaptiveCard=Bn.Authentication=Bn.TokenExchangeResource=Bn.AuthCardButton=Bn.RefreshDefinition=Bn.RefreshActionProperty=Bn.ContainerWithActions=Bn.ColumnSet=Bn.Column=Bn.Container=void 0;var qo=Rn,Xo=zn,Yo=Hn,Zo=qn,Qo=no,Ko=so,ei=Yn,ti=vo,ni=Zn,ri=wo;function oi(e){var t,n,r="undefined"==typeof window?"":null!==(n=null===(t=window.trustedTypes)||void 0===t?void 0:t.emptyHTML)&&void 0!==n?n:"";e.innerHTML=r}function ii(e,t,n){if(t.spacing>0||t.lineThickness&&t.lineThickness>0){var r=document.createElement("div");r.className=e.makeCssClassName("ac-"+(n===qo.Orientation.Horizontal?"horizontal":"vertical")+"-separator"),r.setAttribute("aria-hidden","true");var o=t.lineColor?Yo.stringToCssColor(t.lineColor):"";return n===qo.Orientation.Horizontal?t.lineThickness?(r.style.paddingTop=t.spacing/2+"px",r.style.marginBottom=t.spacing/2+"px",r.style.borderBottom=t.lineThickness+"px solid "+o):r.style.height=t.spacing+"px":t.lineThickness?(r.style.paddingLeft=t.spacing/2+"px",r.style.marginRight=t.spacing/2+"px",r.style.borderRight=t.lineThickness+"px solid "+o):r.style.width=t.spacing+"px",r.style.overflow="hidden",r.style.flex="0 0 auto",r}}Bn.renderSeparation=ii;var ai=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._truncatedDueToOverflow=!1,t}return $o(t,e),Object.defineProperty(t.prototype,"lang",{get:function(){var e=this.getValue(t.langProperty);return e||(this.parent?this.parent.lang:void 0)},set:function(e){this.setValue(t.langProperty,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.getValue(t.isVisibleProperty)},set:function(e){Xo.GlobalSettings.useAdvancedCardBottomTruncation&&!e&&this.undoOverflowTruncation(),this.isVisible!==e&&(this.setValue(t.isVisibleProperty,e),this.updateRenderedElementVisibility(),this._renderedElement&&xa(this)),this._renderedElement&&this._renderedElement.setAttribute("aria-expanded",e.toString())},enumerable:!1,configurable:!0}),t.prototype.internalRenderSeparator=function(){var e=ii(this.hostConfig,{spacing:this.hostConfig.getEffectiveSpacing(this.spacing),lineThickness:this.separator?this.hostConfig.separator.lineThickness:void 0,lineColor:this.separator?this.hostConfig.separator.lineColor:void 0},this.separatorOrientation);if(Xo.GlobalSettings.alwaysBleedSeparators&&e&&this.separatorOrientation===qo.Orientation.Horizontal){var t=this.getParentContainer();if(t&&t.getEffectivePadding()){var n=this.hostConfig.paddingDefinitionToSpacingDefinition(t.getEffectivePadding());e.style.marginLeft="-"+n.left+"px",e.style.marginRight="-"+n.right+"px"}}return e},t.prototype.updateRenderedElementVisibility=function(){var e=this.isDesignMode()||this.isVisible?this._defaultRenderedElementDisplayMode:"none";this._renderedElement&&(e?this._renderedElement.style.display=e:this._renderedElement.style.removeProperty("display")),this._separatorElement&&(this.parent&&this.parent.isFirstElement(this)?this._separatorElement.style.display="none":e?this._separatorElement.style.display=e:this._separatorElement.style.removeProperty("display"))},t.prototype.hideElementDueToOverflow=function(){this._renderedElement&&this.isVisible&&(this._renderedElement.style.visibility="hidden",this.isVisible=!1,xa(this,!1))},t.prototype.showElementHiddenDueToOverflow=function(){this._renderedElement&&!this.isVisible&&(this._renderedElement.style.removeProperty("visibility"),this.isVisible=!0,xa(this,!1))},t.prototype.handleOverflow=function(e){if(this.isVisible||this.isHiddenDueToOverflow()){var t=this.truncateOverflow(e);this._truncatedDueToOverflow=t||this._truncatedDueToOverflow,t?t&&!this.isVisible&&this.showElementHiddenDueToOverflow():this.hideElementDueToOverflow()}},t.prototype.resetOverflow=function(){var e=!1;return this._truncatedDueToOverflow&&(this.undoOverflowTruncation(),this._truncatedDueToOverflow=!1,e=!0),this.isHiddenDueToOverflow()&&this.showElementHiddenDueToOverflow(),e},t.prototype.getDefaultSerializationContext=function(){return new Ta},t.prototype.createPlaceholderElement=function(){var e=this.getEffectiveStyleDefinition(),t=Yo.stringToCssColor(e.foregroundColors.default.subtle),n=document.createElement("div");return n.style.border="1px dashed "+t,n.style.padding="4px",n.style.minHeight="32px",n.style.fontSize="10px",t&&(n.style.color=t),n.innerText=ni.Strings.defaults.emptyElementText(this.getJsonTypeName()),n},t.prototype.adjustRenderedElementSize=function(e){"auto"===this.height?e.style.flex="0 0 auto":e.style.flex="1 1 auto"},t.prototype.updateInputsVisualState=function(e){var t=this.getAllInputs(),n=e?Ti.MouseEnterOnCard:Ti.MouseLeaveOnCard;t.forEach(function(e){return e.updateVisualState(n)})},t.prototype.isDisplayed=function(){return void 0!==this._renderedElement&&this.isVisible&&this._renderedElement.offsetHeight>0},t.prototype.overrideInternalRender=function(){return this.internalRender()},t.prototype.applyPadding=function(){if(this.separatorElement&&this.separatorOrientation===qo.Orientation.Horizontal)if(Xo.GlobalSettings.alwaysBleedSeparators&&!this.isBleeding()){var e=new Xo.PaddingDefinition;this.getImmediateSurroundingPadding(e);var t=this.hostConfig.paddingDefinitionToSpacingDefinition(e);this.separatorElement.style.marginLeft="-"+t.left+"px",this.separatorElement.style.marginRight="-"+t.right+"px"}else this.separatorElement.style.marginRight="0",this.separatorElement.style.marginLeft="0"},t.prototype.truncateOverflow=function(e){return!1},t.prototype.undoOverflowTruncation=function(){},t.prototype.getDefaultPadding=function(){return new Xo.PaddingDefinition},t.prototype.getHasBackground=function(e){return!1},t.prototype.getHasBorder=function(){return!1},t.prototype.getPadding=function(){return this._padding},t.prototype.setPadding=function(e){this._padding=e},t.prototype.shouldSerialize=function(e){return void 0!==e.elementRegistry.findByName(this.getJsonTypeName())},Object.defineProperty(t.prototype,"useDefaultSizing",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"separatorOrientation",{get:function(){return qo.Orientation.Horizontal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultStyle",{get:function(){return qo.ContainerStyle.Default},enumerable:!1,configurable:!0}),t.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n||new Ta)},t.prototype.asString=function(){return""},t.prototype.isBleeding=function(){return!1},t.prototype.getEffectiveStyle=function(){return this.parent?this.parent.getEffectiveStyle():this.defaultStyle},t.prototype.getEffectiveStyleDefinition=function(){return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle())},t.prototype.getEffectiveTextStyleDefinition=function(){return this.parent?this.parent.getEffectiveTextStyleDefinition():this.hostConfig.textStyles.default},t.prototype.getForbiddenActionTypes=function(){return[]},t.prototype.getImmediateSurroundingPadding=function(e,t,n,r,o){if(void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===o&&(o=!0),this.parent){var i=t&&this.parent.isTopElement(this),a=n&&this.parent.isRightMostElement(this),s=r&&this.parent.isBottomElement(this),l=o&&this.parent.isLeftMostElement(this),c=this.parent.getEffectivePadding();c&&(i&&c.top!==qo.Spacing.None&&(e.top=c.top,i=!1),a&&c.right!==qo.Spacing.None&&(e.right=c.right,a=!1),s&&c.bottom!==qo.Spacing.None&&(e.bottom=c.bottom,s=!1),l&&c.left!==qo.Spacing.None&&(e.left=c.left,l=!1)),(i||a||s||l)&&this.parent.getImmediateSurroundingPadding(e,i,a,s,l)}},t.prototype.getActionCount=function(){return 0},t.prototype.getActionAt=function(e){throw new Error(ni.Strings.errors.indexOutOfRange(e))},t.prototype.indexOfAction=function(e){for(var t=0;t<this.getActionCount();t++)if(this.getActionAt(t)===e)return t;return-1},t.prototype.remove=function(){return!!(this.parent&&this.parent instanceof yi)&&this.parent.removeItem(this)},t.prototype.render=function(){return this._renderedElement=this.overrideInternalRender(),this._separatorElement=this.internalRenderSeparator(),this._renderedElement?(this.id&&(this._renderedElement.id=this.id),this.customCssSelector&&this._renderedElement.classList.add(this.customCssSelector),this._renderedElement.style.boxSizing="border-box",this._defaultRenderedElementDisplayMode=this._renderedElement.style.display?this._renderedElement.style.display:void 0,this.adjustRenderedElementSize(this._renderedElement),this.updateLayout(!1)):this.isDesignMode()&&(this._renderedElement=this.createPlaceholderElement()),this._renderedElement},t.prototype.updateLayout=function(e){this.updateRenderedElementVisibility(),this.applyPadding()},t.prototype.updateActionsEnabledState=function(){for(var e=0,t=this.getRootElement().getAllActions();e<t.length;e++){t[e].updateEnabledState()}},t.prototype.indexOf=function(e){return-1},t.prototype.isDesignMode=function(){var e=this.getRootElement();return e instanceof Ia&&e.designMode},t.prototype.isFirstElement=function(e){return!0},t.prototype.isLastElement=function(e){return!0},t.prototype.isAtTheVeryLeft=function(){return!this.parent||this.parent.isLeftMostElement(this)&&this.parent.isAtTheVeryLeft()},t.prototype.isAtTheVeryRight=function(){return!this.parent||this.parent.isRightMostElement(this)&&this.parent.isAtTheVeryRight()},t.prototype.isAtTheVeryTop=function(){return!this.parent||this.parent.isFirstElement(this)&&this.parent.isAtTheVeryTop()},t.prototype.isAtTheVeryBottom=function(){return!this.parent||this.parent.isLastElement(this)&&this.parent.isAtTheVeryBottom()},t.prototype.isBleedingAtTop=function(){return!1},t.prototype.isBleedingAtBottom=function(){return!1},t.prototype.isLeftMostElement=function(e){return!0},t.prototype.isRightMostElement=function(e){return!0},t.prototype.isTopElement=function(e){return this.isFirstElement(e)},t.prototype.isBottomElement=function(e){return this.isLastElement(e)},t.prototype.isHiddenDueToOverflow=function(){return void 0!==this._renderedElement&&"hidden"===this._renderedElement.style.visibility},t.prototype.getRootElement=function(){return this.getRootObject()},t.prototype.getParentContainer=function(){for(var e=this.parent;e;){if(e instanceof ma)return e;e=e.parent}},t.prototype.getAllInputs=function(e){return[]},t.prototype.getAllActions=function(){for(var e=[],t=0;t<this.getActionCount();t++){var n=this.getActionAt(t);n&&e.push(n)}return e},t.prototype.getResourceInformation=function(){return[]},t.prototype.getElementById=function(e){return this.id===e?this:void 0},t.prototype.getActionById=function(e){},t.prototype.getElementByIdFromAction=function(e){for(var t=void 0,n=0;n<this.getActionCount();n++){var r=this.getActionAt(n);if(r instanceof ia&&(t=r.card.getElementById(e)))break}return t},t.prototype.getEffectivePadding=function(){var e=this.getPadding();return e||this.getDefaultPadding()},t.prototype.getEffectiveHorizontalAlignment=function(){return void 0!==this.horizontalAlignment?this.horizontalAlignment:this.parent?this.parent.getEffectiveHorizontalAlignment():qo.HorizontalAlignment.Left},Object.defineProperty(t.prototype,"hostConfig",{get:function(){return this._hostConfig?this._hostConfig:this.parent?this.parent.hostConfig:Zo.defaultHostConfig},set:function(e){this._hostConfig=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.parent?this.parent.indexOf(this):0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInteractive",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInline",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasVisibleSeparator",{get:function(){return!(!this.parent||!this.separatorElement)&&(!this.parent.isFirstElement(this)&&(this.isVisible||this.isDesignMode()))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"separatorElement",{get:function(){return this._separatorElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),t.langProperty=new ei.StringProperty(ei.Versions.v1_1,"lang",!0,/^[a-z]{2,3}$/gi),t.isVisibleProperty=new ei.BoolProperty(ei.Versions.v1_2,"isVisible",!0),t.separatorProperty=new ei.BoolProperty(ei.Versions.v1_0,"separator",!1),t.heightProperty=new ei.ValueSetProperty(ei.Versions.v1_1,"height",[{value:"auto"},{value:"stretch"}],"auto"),t.horizontalAlignmentProperty=new ei.EnumProperty(ei.Versions.v1_0,"horizontalAlignment",qo.HorizontalAlignment),t.spacingProperty=new ei.EnumProperty(ei.Versions.v1_0,"spacing",qo.Spacing,qo.Spacing.Default),Uo([(0,ei.property)(t.horizontalAlignmentProperty)],t.prototype,"horizontalAlignment",void 0),Uo([(0,ei.property)(t.spacingProperty)],t.prototype,"spacing",void 0),Uo([(0,ei.property)(t.separatorProperty)],t.prototype,"separator",void 0),Uo([(0,ei.property)(t.heightProperty)],t.prototype,"height",void 0),Uo([(0,ei.property)(t.langProperty)],t.prototype,"lang",null),Uo([(0,ei.property)(t.isVisibleProperty)],t.prototype,"isVisible",null),t}(Ko.CardObject);Bn.CardElement=ai;var si=function(e){function t(t,n,r){void 0===r&&(r=[]);var o=e.call(this,t,n,void 0)||this;return o.targetVersion=t,o.name=n,o.forbiddenActionTypes=r,o}return $o(t,e),t.prototype.parse=function(e,t,n){var r=e;return n.parseAction(r,t[this.name],this.forbiddenActionTypes,r.isDesignMode())},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,n?n.toJSON(r):void 0,void 0,!0)},t}(ei.PropertyDefinition);Bn.ActionProperty=si;var li=function(e){function t(t){var n=e.call(this)||this;return n.ariaHidden=!1,t&&(n.text=t),n}return $o(t,e),t.prototype.populateSchema=function(n){e.prototype.populateSchema.call(this,n),n.remove(t.selectActionProperty)},Object.defineProperty(t.prototype,"text",{get:function(){return this.getValue(t.textProperty)},set:function(e){this.setText(e)},enumerable:!1,configurable:!0}),t.prototype.getFontSize=function(e){switch(this.effectiveSize){case qo.TextSize.Small:return e.fontSizes.small;case qo.TextSize.Medium:return e.fontSizes.medium;case qo.TextSize.Large:return e.fontSizes.large;case qo.TextSize.ExtraLarge:return e.fontSizes.extraLarge;default:return e.fontSizes.default}},t.prototype.getColorDefinition=function(e,t){switch(t){case qo.TextColor.Accent:return e.accent;case qo.TextColor.Dark:return e.dark;case qo.TextColor.Light:return e.light;case qo.TextColor.Good:return e.good;case qo.TextColor.Warning:return e.warning;case qo.TextColor.Attention:return e.attention;default:return e.default}},t.prototype.setText=function(e){this.setValue(t.textProperty,e)},t.prototype.init=function(e){this.size=e.size,this.weight=e.weight,this.color=e.color,this.isSubtle=e.isSubtle},t.prototype.asString=function(){return this.text},t.prototype.applyStylesTo=function(e){var t,n=this.hostConfig.getFontTypeDefinition(this.effectiveFontType);switch(n.fontFamily&&(e.style.fontFamily=n.fontFamily),this.effectiveSize){case qo.TextSize.Small:t=n.fontSizes.small;break;case qo.TextSize.Medium:t=n.fontSizes.medium;break;case qo.TextSize.Large:t=n.fontSizes.large;break;case qo.TextSize.ExtraLarge:t=n.fontSizes.extraLarge;break;default:t=n.fontSizes.default}e.style.fontSize=t+"px";var r,o=this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors,this.effectiveColor),i=Yo.stringToCssColor(this.effectiveIsSubtle?o.subtle:o.default);switch(i&&(e.style.color=i),this.effectiveWeight){case qo.TextWeight.Lighter:r=n.fontWeights.lighter;break;case qo.TextWeight.Bolder:r=n.fontWeights.bolder;break;default:r=n.fontWeights.default}e.style.fontWeight=r.toString(),this.ariaHidden&&e.setAttribute("aria-hidden","true")},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return this.selectAction&&t.push(this.selectAction),t},Object.defineProperty(t.prototype,"effectiveColor",{get:function(){return void 0!==this.color?this.color:this.getEffectiveTextStyleDefinition().color},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"effectiveFontType",{get:function(){return void 0!==this.fontType?this.fontType:this.getEffectiveTextStyleDefinition().fontType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"effectiveIsSubtle",{get:function(){return void 0!==this.isSubtle?this.isSubtle:this.getEffectiveTextStyleDefinition().isSubtle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"effectiveSize",{get:function(){return void 0!==this.size?this.size:this.getEffectiveTextStyleDefinition().size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"effectiveWeight",{get:function(){return void 0!==this.weight?this.weight:this.getEffectiveTextStyleDefinition().weight},enumerable:!1,configurable:!0}),t.textProperty=new ei.StringProperty(ei.Versions.v1_0,"text",!0),t.sizeProperty=new ei.EnumProperty(ei.Versions.v1_0,"size",qo.TextSize),t.weightProperty=new ei.EnumProperty(ei.Versions.v1_0,"weight",qo.TextWeight),t.colorProperty=new ei.EnumProperty(ei.Versions.v1_0,"color",qo.TextColor),t.isSubtleProperty=new ei.BoolProperty(ei.Versions.v1_0,"isSubtle"),t.fontTypeProperty=new ei.EnumProperty(ei.Versions.v1_2,"fontType",qo.FontType),t.selectActionProperty=new si(ei.Versions.v1_1,"selectAction",["Action.ShowCard"]),Uo([(0,ei.property)(t.sizeProperty)],t.prototype,"size",void 0),Uo([(0,ei.property)(t.weightProperty)],t.prototype,"weight",void 0),Uo([(0,ei.property)(t.colorProperty)],t.prototype,"color",void 0),Uo([(0,ei.property)(t.fontTypeProperty)],t.prototype,"fontType",void 0),Uo([(0,ei.property)(t.isSubtleProperty)],t.prototype,"isSubtle",void 0),Uo([(0,ei.property)(t.textProperty)],t.prototype,"text",null),Uo([(0,ei.property)(t.selectActionProperty)],t.prototype,"selectAction",void 0),t}(ai);Bn.BaseTextBlock=li;var ci=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.wrap=!1,t._treatAsPlainText=!0,t.useMarkdown=!0,t}var n,r;return $o(t,e),t.prototype.restoreOriginalContent=function(){var e,n;if(void 0!==this.renderedElement){this.maxLines&&this.maxLines>0&&(this.renderedElement.style.maxHeight=this._computedLineHeight*this.maxLines+"px");var r=null!==(n=null===(e=t._ttRoundtripPolicy)||void 0===e?void 0:e.createHTML(this._originalInnerHtml))&&void 0!==n?n:this._originalInnerHtml;this.renderedElement.innerHTML=r}},t.prototype.truncateIfSupported=function(e){if(void 0!==this.renderedElement){var t=this.renderedElement.children,n=!t.length;if(n||1===t.length&&"p"===t[0].tagName.toLowerCase()&&!t[0].children.length){var r=n?this.renderedElement:t[0];return Yo.truncateText(r,e,this._computedLineHeight),!0}}return!1},t.prototype.setText=function(t){e.prototype.setText.call(this,t),this._processedText=void 0},t.prototype.internalRender=function(){var e,n,r=this;if(this._processedText=void 0,this.text){var o=this.preProcessPropertyValue(li.textProperty),i=this.hostConfig,a=void 0;if(this.forElementId){var s=document.createElement("label");s.htmlFor=this.forElementId,a=s}else a=document.createElement("div");if(a.classList.add(i.makeCssClassName("ac-textBlock")),a.style.overflow="hidden",this.applyStylesTo(a),"heading"===this.style){a.setAttribute("role","heading");var l=this.hostConfig.textBlock.headingLevel;void 0!==l&&l>0&&a.setAttribute("aria-level",l.toString())}if(this.selectAction&&i.supportsInteractivity&&(a.onclick=function(e){r.selectAction&&r.selectAction.isEffectivelyEnabled()&&(e.preventDefault(),e.cancelBubble=!0,r.selectAction.execute())},this.selectAction.setupElementForAccessibility(a),this.selectAction.isEffectivelyEnabled()&&a.classList.add(i.makeCssClassName("ac-selectable"))),!this._processedText){this._treatAsPlainText=!0;var c=Qo.formatText(this.lang,o);if(this.useMarkdown&&c){Xo.GlobalSettings.allowMarkForTextHighlighting&&(c=c.replace(/<mark>/g,"===").replace(/<\/mark>/g,"/==/"));var u=Ia.applyMarkdown(c);if(u.didProcess&&u.outputHtml){if(this._processedText=u.outputHtml,this._treatAsPlainText=!1,Xo.GlobalSettings.allowMarkForTextHighlighting&&this._processedText){var d="",p=this.getEffectiveStyleDefinition();p.highlightBackgroundColor&&(d+="background-color: "+p.highlightBackgroundColor+";"),p.highlightForegroundColor&&(d+="color: "+p.highlightForegroundColor+";"),d&&(d='style="'+d+'"'),this._processedText=this._processedText.replace(/===/g,"<mark "+d+">").replace(/\/==\//g,"</mark>")}}else this._processedText=c,this._treatAsPlainText=!0}else this._processedText=c,this._treatAsPlainText=!0}if(this._processedText||(this._processedText=""),this._treatAsPlainText)a.innerText=this._processedText;else{var h=null!==(n=null===(e=t._ttMarkdownPolicy)||void 0===e?void 0:e.createHTML(this._processedText))&&void 0!==n?n:this._processedText;a.innerHTML=h}if(a.firstElementChild instanceof HTMLElement){var m=a.firstElementChild;m.style.marginTop="0px",m.style.width="100%",this.wrap||(m.style.overflow="hidden",m.style.textOverflow="ellipsis")}a.lastElementChild instanceof HTMLElement&&(a.lastElementChild.style.marginBottom="0px");for(var f=a.getElementsByTagName("a"),g=function(e){e.classList.add(i.makeCssClassName("ac-anchor")),e.target="_blank",e.onclick=function(t){va(r,e,t)&&(t.preventDefault(),t.cancelBubble=!0)},e.oncontextmenu=function(t){return!va(r,e,t)||(t.preventDefault(),t.cancelBubble=!0,!1)}},y=0,v=Array.from(f);y<v.length;y++){g(v[y])}return this.wrap?(a.style.wordWrap="break-word",this.maxLines&&this.maxLines>0&&(a.style.overflow="hidden",Yo.isInternetExplorer()||!Xo.GlobalSettings.useWebkitLineClamp?a.style.maxHeight=this._computedLineHeight*this.maxLines+"px":(a.style.removeProperty("line-height"),a.style.display="-webkit-box",a.style.webkitBoxOrient="vertical",a.style.webkitLineClamp=this.maxLines.toString()))):(a.style.whiteSpace="nowrap",a.style.textOverflow="ellipsis"),(Xo.GlobalSettings.useAdvancedTextBlockTruncation||Xo.GlobalSettings.useAdvancedCardBottomTruncation)&&(this._originalInnerHtml=a.innerHTML),a}},t.prototype.truncateOverflow=function(e){return e>=this._computedLineHeight&&this.truncateIfSupported(e)},t.prototype.undoOverflowTruncation=function(){if(this.restoreOriginalContent(),Xo.GlobalSettings.useAdvancedTextBlockTruncation&&this.maxLines){var e=this._computedLineHeight*this.maxLines;this.truncateIfSupported(e)}},t.prototype.applyStylesTo=function(t){switch(e.prototype.applyStylesTo.call(this,t),this.getEffectiveHorizontalAlignment()){case qo.HorizontalAlignment.Center:t.style.textAlign="center";break;case qo.HorizontalAlignment.Right:t.style.textAlign="end";break;default:t.style.textAlign="start"}var n=this.hostConfig.lineHeights;if(n)switch(this.effectiveSize){case qo.TextSize.Small:this._computedLineHeight=n.small;break;case qo.TextSize.Medium:this._computedLineHeight=n.medium;break;case qo.TextSize.Large:this._computedLineHeight=n.large;break;case qo.TextSize.ExtraLarge:this._computedLineHeight=n.extraLarge;break;default:this._computedLineHeight=n.default}else this._computedLineHeight=1.33*this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType));t.style.lineHeight=this._computedLineHeight+"px"},t.prototype.getJsonTypeName=function(){return"TextBlock"},t.prototype.getEffectiveTextStyleDefinition=function(){return this.style?this.hostConfig.textStyles.getStyleByName(this.style):e.prototype.getEffectiveTextStyleDefinition.call(this)},t.prototype.updateLayout=function(t){void 0===t&&(t=!1),e.prototype.updateLayout.call(this,t),Xo.GlobalSettings.useAdvancedTextBlockTruncation&&this.maxLines&&this.isDisplayed()&&(this.restoreOriginalContent(),this.truncateIfSupported(this._computedLineHeight*this.maxLines))},t.wrapProperty=new ei.BoolProperty(ei.Versions.v1_0,"wrap",!1),t.maxLinesProperty=new ei.NumProperty(ei.Versions.v1_0,"maxLines"),t.styleProperty=new ei.ValueSetProperty(ei.Versions.v1_5,"style",[{value:"default"},{value:"columnHeader"},{value:"heading"}]),t._ttMarkdownPolicy="undefined"==typeof window||null===(n=window.trustedTypes)||void 0===n?void 0:n.createPolicy("adaptivecards#markdownPassthroughPolicy",{createHTML:function(e){return e}}),t._ttRoundtripPolicy="undefined"==typeof window||null===(r=window.trustedTypes)||void 0===r?void 0:r.createPolicy("adaptivecards#restoreContentsPolicy",{createHTML:function(e){return e}}),Uo([(0,ei.property)(t.wrapProperty)],t.prototype,"wrap",void 0),Uo([(0,ei.property)(t.maxLinesProperty)],t.prototype,"maxLines",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),t}(li);Bn.TextBlock=ci;var ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.italic=!1,t.strikethrough=!1,t.highlight=!1,t.underline=!1,t}return $o(t,e),t.prototype.populateSchema=function(t){e.prototype.populateSchema.call(this,t),t.add(li.selectActionProperty)},t.prototype.internalRender=function(){var e=this;if(this.text){var t=this.preProcessPropertyValue(li.textProperty),n=this.hostConfig,r=Qo.formatText(this.lang,t);r||(r="");var o=document.createElement("span");if(o.classList.add(n.makeCssClassName("ac-textRun")),this.applyStylesTo(o),this.selectAction&&n.supportsInteractivity){var i=document.createElement("a");i.classList.add(n.makeCssClassName("ac-anchor"));var a=this.selectAction.getHref();i.href=a||"",i.target="_blank",i.onclick=function(t){e.selectAction&&e.selectAction.isEffectivelyEnabled()&&(t.preventDefault(),t.cancelBubble=!0,e.selectAction.execute())},this.selectAction.setupElementForAccessibility(i),i.innerText=r,o.appendChild(i)}else o.innerText=r;return o}},t.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),r=Yo.stringToCssColor(this.effectiveIsSubtle?n.highlightColors.subtle:n.highlightColors.default);r&&(t.style.backgroundColor=r)}this.underline&&(t.style.textDecoration="underline")},t.prototype.getJsonTypeName=function(){return"TextRun"},Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInline",{get:function(){return!0},enumerable:!1,configurable:!0}),t.italicProperty=new ei.BoolProperty(ei.Versions.v1_2,"italic",!1),t.strikethroughProperty=new ei.BoolProperty(ei.Versions.v1_2,"strikethrough",!1),t.highlightProperty=new ei.BoolProperty(ei.Versions.v1_2,"highlight",!1),t.underlineProperty=new ei.BoolProperty(ei.Versions.v1_3,"underline",!1),Uo([(0,ei.property)(t.italicProperty)],t.prototype,"italic",void 0),Uo([(0,ei.property)(t.strikethroughProperty)],t.prototype,"strikethrough",void 0),Uo([(0,ei.property)(t.highlightProperty)],t.prototype,"highlight",void 0),Uo([(0,ei.property)(t.underlineProperty)],t.prototype,"underline",void 0),t}(li);Bn.TextRun=ui;var di=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._inlines=[],t}return $o(t,e),t.prototype.internalAddInline=function(e,t){if(void 0===t&&(t=!1),!e.isInline)throw new Error(ni.Strings.errors.elementCannotBeUsedAsInline());if(!(void 0===e.parent||t)&&e.parent!==this)throw new Error(ni.Strings.errors.inlineAlreadyParented());e.setParent(this),this._inlines.push(e)},t.prototype.internalParse=function(t,n){if(e.prototype.internalParse.call(this,t,n),this._inlines=[],Array.isArray(t.inlines))for(var r=0,o=t.inlines;r<o.length;r++){var i=o[r],a=void 0;if("string"==typeof i){var s=new ui;s.text=i,a=s}else a=n.parseElement(this,i,[],!1);a&&this.internalAddInline(a,!0)}},t.prototype.internalToJSON=function(t,n){if(e.prototype.internalToJSON.call(this,t,n),this._inlines.length>0){for(var r=[],o=0,i=this._inlines;o<i.length;o++){var a=i[o];r.push(a.toJSON(n))}n.serializeValue(t,"inlines",r)}},t.prototype.internalRender=function(){if(this._inlines.length>0){var e=void 0;if(this.forElementId){var t=document.createElement("label");t.htmlFor=this.forElementId,e=t}else e=document.createElement("div");switch(e.className=this.hostConfig.makeCssClassName("ac-richTextBlock"),this.getEffectiveHorizontalAlignment()){case qo.HorizontalAlignment.Center:e.style.textAlign="center";break;case qo.HorizontalAlignment.Right:e.style.textAlign="end";break;default:e.style.textAlign="start"}for(var n=0,r=0,o=this._inlines;r<o.length;r++){var i=o[r].render();i&&(e.appendChild(i),n++)}if(n>0)return e}},t.prototype.asString=function(){for(var e="",t=0,n=this._inlines;t<n.length;t++){e+=n[t].asString()}return e},t.prototype.getJsonTypeName=function(){return"RichTextBlock"},t.prototype.getInlineCount=function(){return this._inlines.length},t.prototype.getInlineAt=function(e){if(e>=0&&e<this._inlines.length)return this._inlines[e];throw new Error(ni.Strings.errors.indexOutOfRange(e))},t.prototype.addInline=function(e){"string"==typeof e?this.internalAddInline(new ui(e)):this.internalAddInline(e)},t.prototype.removeInline=function(e){var t=this._inlines.indexOf(e);return t>=0&&(this._inlines[t].setParent(void 0),this._inlines.splice(t,1),!0)},t}(ai);Bn.RichTextBlock=di;var pi=function(e){function t(t,n){var r=e.call(this)||this;return r.name=t,r.value=n,r}return $o(t,e),t.prototype.getSchemaKey=function(){return"Fact"},t.titleProperty=new ei.StringProperty(ei.Versions.v1_0,"title"),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"name",void 0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"value",void 0),t}(ei.SerializableObject);Bn.Fact=pi;var hi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),Object.defineProperty(t.prototype,"useDefaultSizing",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.internalRender=function(){var e=void 0,t=this.hostConfig;if(this.facts.length>0){(e=document.createElement("table")).style.borderWidth="0px",e.style.borderSpacing="0px",e.style.borderStyle="none",e.style.borderCollapse="collapse",e.style.display="block",e.style.overflow="hidden",e.classList.add(t.makeCssClassName("ac-factset")),e.setAttribute("role","presentation");for(var n=0;n<this.facts.length;n++){var r=document.createElement("tr");n>0&&(r.style.marginTop=t.factSet.spacing+"px");var o=document.createElement("td");o.style.padding="0",o.classList.add(t.makeCssClassName("ac-fact-title")),t.factSet.title.maxWidth&&(o.style.maxWidth=t.factSet.title.maxWidth+"px"),o.style.verticalAlign="top";var i=new ci;i.setParent(this),i.text=!this.facts[n].name&&this.isDesignMode()?"Title":this.facts[n].name,i.size=t.factSet.title.size,i.color=t.factSet.title.color,i.isSubtle=t.factSet.title.isSubtle,i.weight=t.factSet.title.weight,i.wrap=t.factSet.title.wrap,i.spacing=qo.Spacing.None,Yo.appendChild(o,i.render()),Yo.appendChild(r,o),(o=document.createElement("td")).style.width="10px",Yo.appendChild(r,o),(o=document.createElement("td")).style.padding="0",o.style.verticalAlign="top",o.classList.add(t.makeCssClassName("ac-fact-value")),(i=new ci).setParent(this),i.text=this.facts[n].value,i.size=t.factSet.value.size,i.color=t.factSet.value.color,i.isSubtle=t.factSet.value.isSubtle,i.weight=t.factSet.value.weight,i.wrap=t.factSet.value.wrap,i.spacing=qo.Spacing.None,Yo.appendChild(o,i.render()),Yo.appendChild(r,o),Yo.appendChild(e,r)}}return e},t.prototype.getJsonTypeName=function(){return"FactSet"},t.factsProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_0,"facts",pi),Uo([(0,ei.property)(t.factsProperty)],t.prototype,"facts",void 0),t}(ai);Bn.FactSet=hi;var mi=function(e){function t(t,n,r,o){var i=e.call(this,t,n)||this;return i.targetVersion=t,i.name=n,i.internalName=r,i.fallbackProperty=o,i}return $o(t,e),t.prototype.getInternalName=function(){return this.internalName},t.prototype.parse=function(e,t,n){var r=void 0,o=t[this.name];if(void 0===o)return this.defaultValue;var i=!1;if("string"==typeof o){try{var a=Xo.SizeAndUnit.parse(o,!0);a.unit===qo.SizeUnit.Pixel&&(r=a.physicalSize,i=!0)}catch(s){}!i&&this.fallbackProperty&&(i=this.fallbackProperty.isValidValue(o,n))}return i||n.logParseEvent(e,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidPropertyValue(o,this.name)),r},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,"number"!=typeof n||isNaN(n)?void 0:n+"px")},t}(ei.PropertyDefinition),fi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.size=qo.Size.Auto,t.style=qo.ImageStyle.Default,t}return $o(t,e),t.prototype.populateSchema=function(t){e.prototype.populateSchema.call(this,t),t.remove(ai.heightProperty)},t.prototype.applySize=function(e){if(this.pixelWidth||this.pixelHeight)this.pixelWidth&&(e.style.width=this.pixelWidth+"px"),this.pixelHeight&&(e.style.height=this.pixelHeight+"px");else if(this.maxHeight){switch(this.size){case qo.Size.Small:e.style.height=this.hostConfig.imageSizes.small+"px";break;case qo.Size.Large:e.style.height=this.hostConfig.imageSizes.large+"px";break;default:e.style.height=this.hostConfig.imageSizes.medium+"px"}e.style.maxHeight=this.maxHeight+"px"}else{switch(this.size){case qo.Size.Stretch:e.style.width="100%";break;case qo.Size.Auto:e.style.maxWidth="100%";break;case qo.Size.Small:e.style.width=this.hostConfig.imageSizes.small+"px";break;case qo.Size.Large:e.style.width=this.hostConfig.imageSizes.large+"px";break;case qo.Size.Medium:e.style.width=this.hostConfig.imageSizes.medium+"px"}e.style.maxHeight="100%"}},Object.defineProperty(t.prototype,"useDefaultSizing",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.internalRender=function(){var e=this,n=void 0;if(this.url){(n=document.createElement("div")).style.display="flex",n.style.alignItems="flex-start";var r=this.hostConfig;switch(this.getEffectiveHorizontalAlignment()){case qo.HorizontalAlignment.Center:n.style.justifyContent="center";break;case qo.HorizontalAlignment.Right:n.style.justifyContent="flex-end";break;default:n.style.justifyContent="flex-start"}var o=document.createElement("img");this.renderedImageElement=o,o.onload=function(t){ya(e)},o.onerror=function(t){if(e.renderedElement){var n=e.getRootElement();if(oi(e.renderedElement),n&&n.designMode){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.backgroundColor="#EEEEEE",r.style.color="black",r.innerText=":-(",r.style.padding="10px",e.applySize(r),e.renderedElement.appendChild(r)}}ya(e)},o.style.minWidth="0",o.classList.add(r.makeCssClassName("ac-image")),this.selectAction&&r.supportsInteractivity&&(o.onkeypress=function(t){e.selectAction&&e.selectAction.isEffectivelyEnabled()&&("Enter"===t.code||"Space"===t.code)&&(t.preventDefault(),t.cancelBubble=!0,e.selectAction.execute())},o.onclick=function(t){e.selectAction&&e.selectAction.isEffectivelyEnabled()&&(t.preventDefault(),t.cancelBubble=!0,e.selectAction.execute())},this.selectAction.setupElementForAccessibility(o),this.selectAction.isEffectivelyEnabled()&&o.classList.add(r.makeCssClassName("ac-selectable"))),this.applySize(o),this.style===qo.ImageStyle.Person&&(o.style.borderRadius="50%",o.style.backgroundPosition="50% 50%",o.style.backgroundRepeat="no-repeat");var i=Yo.stringToCssColor(this.backgroundColor);i&&(o.style.backgroundColor=i),this.setImageSource(o);var a=this.preProcessPropertyValue(t.altTextProperty);a&&(o.alt=a),n.appendChild(o)}return n},t.prototype.getJsonTypeName=function(){return"Image"},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return this.selectAction&&t.push(this.selectAction),t},t.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);return!n&&this.selectAction&&(n=this.selectAction.getActionById(t)),n},t.prototype.getResourceInformation=function(){return this.url?[{url:this.url,mimeType:"image"}]:[]},t.prototype.setImageSource=function(e){var n=new gi(this.forceLoad,this.url);n.configureImage(this),e.src=this.preProcessPropertyValue(t.urlProperty),n.resetImage(this)},t.urlProperty=new ei.StringProperty(ei.Versions.v1_0,"url"),t.altTextProperty=new ei.StringProperty(ei.Versions.v1_0,"altText"),t.backgroundColorProperty=new ei.StringProperty(ei.Versions.v1_1,"backgroundColor"),t.styleProperty=new ei.EnumProperty(ei.Versions.v1_0,"style",qo.ImageStyle,qo.ImageStyle.Default),t.sizeProperty=new ei.EnumProperty(ei.Versions.v1_0,"size",qo.Size,qo.Size.Auto),t.pixelWidthProperty=new mi(ei.Versions.v1_1,"width","pixelWidth"),t.pixelHeightProperty=new mi(ei.Versions.v1_1,"height","pixelHeight",ai.heightProperty),t.selectActionProperty=new si(ei.Versions.v1_1,"selectAction",["Action.ShowCard"]),t.shouldForceLoadProperty=new ei.BoolProperty(ei.Versions.v1_6,"forceLoad",!1),Uo([(0,ei.property)(t.urlProperty)],t.prototype,"url",void 0),Uo([(0,ei.property)(t.altTextProperty)],t.prototype,"altText",void 0),Uo([(0,ei.property)(t.backgroundColorProperty)],t.prototype,"backgroundColor",void 0),Uo([(0,ei.property)(t.sizeProperty)],t.prototype,"size",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),Uo([(0,ei.property)(t.pixelWidthProperty)],t.prototype,"pixelWidth",void 0),Uo([(0,ei.property)(t.pixelHeightProperty)],t.prototype,"pixelHeight",void 0),Uo([(0,ei.property)(t.selectActionProperty)],t.prototype,"selectAction",void 0),Uo([(0,ei.property)(t.shouldForceLoadProperty)],t.prototype,"forceLoad",void 0),t}(ai);Bn.Image=fi;var gi=function(){function e(e,t){this.doForceLoad=e,this.url=t,t&&t.length&&e&&(this.uniqueHash="?"+Date.now(),this.urlWithForceLoadOption=t+this.uniqueHash)}return e.prototype.configureImage=function(e){this.urlWithForceLoadOption&&this.urlWithForceLoadOption.length&&(e.url=this.urlWithForceLoadOption)},e.prototype.resetImage=function(e){e.url=this.url},e}(),yi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowVerticalOverflow=!1,t}return $o(t,e),t.prototype.populateSchema=function(n){e.prototype.populateSchema.call(this,n),this.isSelectable||n.remove(t.selectActionProperty)},t.prototype.isElementAllowed=function(e){return this.hostConfig.supportsInteractivity||!e.isInteractive},t.prototype.applyPadding=function(){if(e.prototype.applyPadding.call(this),this.renderedElement){var t=new Xo.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"}},Object.defineProperty(t.prototype,"isSelectable",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.forbiddenChildElements=function(){return[]},t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this);for(var t=0;t<this.getItemCount();t++)this.getItemAt(t).releaseDOMResources()},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t);for(var n=0;n<this.getItemCount();n++){var r=this.getItemAt(n);!this.hostConfig.supportsInteractivity&&r.isInteractive&&t.addFailure(this,qo.ValidationEvent.InteractivityNotAllowed,ni.Strings.errors.interactivityNotAllowed()),this.isElementAllowed(r)||t.addFailure(this,qo.ValidationEvent.InteractivityNotAllowed,ni.Strings.errors.elementTypeNotAllowed(r.getJsonTypeName())),r.internalValidateProperties(t)}this._selectAction&&this._selectAction.internalValidateProperties(t)},t.prototype.render=function(){var t=this,n=e.prototype.render.call(this);if(n){var r=this.hostConfig;this.allowVerticalOverflow&&(n.style.overflowX="hidden",n.style.overflowY="auto"),n&&this.isSelectable&&this._selectAction&&r.supportsInteractivity&&(n.onclick=function(e){t._selectAction&&t._selectAction.isEffectivelyEnabled()&&(e.preventDefault(),e.cancelBubble=!0,t._selectAction.execute())},n.onkeypress=function(e){t._selectAction&&t._selectAction.isEffectivelyEnabled()&&("Enter"===e.code||"Space"===e.code)&&(e.preventDefault(),e.cancelBubble=!0,t._selectAction.execute())},this._selectAction.setupElementForAccessibility(n),this._selectAction.isEffectivelyEnabled()&&n.classList.add(r.makeCssClassName("ac-selectable")))}return n},t.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()},t.prototype.getAllInputs=function(e){void 0===e&&(e=!0);for(var t=[],n=0;n<this.getItemCount();n++)t.push.apply(t,this.getItemAt(n).getAllInputs(e));return t},t.prototype.getAllActions=function(){for(var t=e.prototype.getAllActions.call(this),n=0;n<this.getItemCount();n++)t.push.apply(t,this.getItemAt(n).getAllActions());return this._selectAction&&t.push(this._selectAction),t},t.prototype.getResourceInformation=function(){for(var e=[],t=0;t<this.getItemCount();t++)e.push.apply(e,this.getItemAt(t).getResourceInformation());return e},t.prototype.getElementById=function(t){var n=e.prototype.getElementById.call(this,t);if(!n)for(var r=0;r<this.getItemCount()&&!(n=this.getItemAt(r).getElementById(t));r++);return n},t.prototype.findDOMNodeOwner=function(t){for(var n,r=void 0,o=0;o<this.getItemCount();o++)if(r=this.getItemAt(o).findDOMNodeOwner(t))return r;for(o=0;o<this.getActionCount();o++)if(r=null===(n=this.getActionAt(o))||void 0===n?void 0:n.findDOMNodeOwner(t))return r;return e.prototype.findDOMNodeOwner.call(this,t)},t.selectActionProperty=new si(ei.Versions.v1_1,"selectAction",["Action.ShowCard"]),Uo([(0,ei.property)(t.selectActionProperty)],t.prototype,"_selectAction",void 0),t}(ai);Bn.CardElementContainer=yi;var vi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._images=[],t.imageSize=qo.ImageSize.Medium,t.presentationStyle=qo.ImageSetPresentationStyle.Default,t.pixelOffset=0,t}return $o(t,e),t.prototype.internalRender=function(){var e=void 0;if(this._images.length>0){(e=document.createElement("div")).style.display="flex",e.style.flexWrap="wrap";for(var t=0,n=this._images;t<n.length;t++){var r=n[t];switch(this.imageSize){case qo.ImageSize.Small:r.size=qo.Size.Small;break;case qo.ImageSize.Large:r.size=qo.Size.Large;break;default:r.size=qo.Size.Medium}r.maxHeight=this.hostConfig.imageSet.maxImageHeight;var o=r.render();o&&(o.style.display="inline-flex",o.style.margin="0px",this.presentationStyle==qo.ImageSetPresentationStyle.Default&&(o.style.marginRight="10px"),Yo.appendChild(e,o))}this.presentationStyle==qo.ImageSetPresentationStyle.Stacked&&this.applyStackedPresentationStyle()}return e},t.prototype.applyStackedPresentationStyle=function(){if(this._images[0].renderedImageElement){var e=bi.parseNumericPixelDimension(this._images[0].renderedImageElement.style.height),t=this.getEffectiveBackgroundColor();if(e)new bi(this.pixelOffset,e,t).configureImagesArrayAsStackedLayout(this._images)}},t.prototype.getEffectiveBackgroundColor=function(){var e=this.getParentContainer(),t=null==e?void 0:e.getEffectiveStyle(),n=this.hostConfig.containerStyles.getStyleByName(t,this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));return Yo.stringToCssColor(n.backgroundColor)},t.prototype.getItemCount=function(){return this._images.length},t.prototype.getItemAt=function(e){return this._images[e]},t.prototype.getFirstVisibleRenderedItem=function(){return this._images&&this._images.length>0?this._images[0]:void 0},t.prototype.getLastVisibleRenderedItem=function(){return this._images&&this._images.length>0?this._images[this._images.length-1]:void 0},t.prototype.removeItem=function(e){if(e instanceof fi){var t=this._images.indexOf(e);if(t>=0)return this._images.splice(t,1),e.setParent(void 0),this.updateLayout(),!0}return!1},t.prototype.getJsonTypeName=function(){return"ImageSet"},t.prototype.addImage=function(e){if(e.parent)throw new Error("This image already belongs to another ImageSet");this._images.push(e),e.setParent(this)},t.prototype.indexOf=function(e){return e instanceof fi?this._images.indexOf(e):-1},t.imagesProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_0,"images",fi,function(e,t){t.setParent(e)}),t.imageSizeProperty=new ei.EnumProperty(ei.Versions.v1_0,"imageSize",qo.ImageSize,qo.ImageSize.Medium),t.imagePresentationStyle=new ei.EnumProperty(ei.Versions.v1_6,"style",qo.ImageSetPresentationStyle,qo.ImageSetPresentationStyle.Default),t.pixelOffset=new ei.NumProperty(ei.Versions.v1_6,"offset",0,void 0),Uo([(0,ei.property)(t.imagesProperty)],t.prototype,"_images",void 0),Uo([(0,ei.property)(t.imageSizeProperty)],t.prototype,"imageSize",void 0),Uo([(0,ei.property)(t.imagePresentationStyle)],t.prototype,"presentationStyle",void 0),Uo([(0,ei.property)(t.pixelOffset)],t.prototype,"pixelOffset",void 0),t}(yi);Bn.ImageSet=vi;var bi=function(){function e(e,t,n){this.sign45=.7071,this.maxImageCounts=2,this.offset=0,this.normalizationConstant=0,this.border=5,this.dimension=0,this.dimension=t,this.normalizationConstant=2*(t*this.sign45-.5*t),this.offset=this.sign45*(Math.max(e,-t)-this.normalizationConstant),this.style=n||""}return e.prototype.moveImageRight=function(e){e.style.marginLeft=this.offset+"px"},e.prototype.moveImageUp=function(e){e.style.marginBottom=this.offset+this.dimension+"px"},e.prototype.moveImageDown=function(e){e.style.marginTop=this.offset+this.dimension+"px"},e.prototype.makeImageRound=function(e){e.style.borderRadius="50%",e.style.backgroundPosition="50% 50%",e.style.backgroundRepeat="no-repeat"},e.prototype.applyBorder=function(e){e.style.height=this.dimension+2*this.border+"px",e.style.border=this.border+"px solid "+this.style},e.prototype.configureImageForBottomLeft=function(e){this.moveImageDown(e),this.makeImageRound(e),this.applyBorder(e),e.style.zIndex="2"},e.prototype.configureImageForTopRight=function(e){this.moveImageUp(e),this.moveImageRight(e),this.makeImageRound(e),e.style.zIndex="1"},e.prototype.configureImagesArrayAsStackedLayout=function(e){1==e.length?e[0].renderedImageElement&&this.makeImageRound(e[0].renderedImageElement):e.length<=this.maxImageCounts&&e[0].renderedImageElement&&e[1].renderedImageElement&&(this.configureImageForBottomLeft(e[0].renderedImageElement),this.configureImageForTopRight(e[1].renderedImageElement))},e.parseNumericPixelDimension=function(e){if("px"==(null==e?void 0:e.substring(e.length-2)))return parseInt(e.substring(0,e.length-2))},e}(),xi=function(e){function t(t,n){var r=e.call(this)||this;return r.url=t,r.mimeType=n,r}return $o(t,e),t.prototype.isValid=function(){return!(!this.mimeType||!this.url)},t.mimeTypeProperty=new ei.StringProperty(ei.Versions.v1_1,"mimeType"),t.urlProperty=new ei.StringProperty(ei.Versions.v1_1,"url"),Uo([(0,ei.property)(t.mimeTypeProperty)],t.prototype,"mimeType",void 0),Uo([(0,ei.property)(t.urlProperty)],t.prototype,"url",void 0),t}(ei.SerializableObject);Bn.ContentSource=xi;var Ci=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.label=r,o}return $o(t,e),t.prototype.getSchemaKey=function(){return"CaptionSource"},t.prototype.render=function(){var e=void 0;return this.isValid()&&((e=document.createElement("track")).src=this.url,e.kind="captions",e.label=this.label),e},t.labelProperty=new ei.StringProperty(ei.Versions.v1_6,"label"),Uo([(0,ei.property)(t.labelProperty)],t.prototype,"label",void 0),t}(xi);Bn.CaptionSource=Ci;var wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"MediaSource"},t.prototype.render=function(){var e=void 0;return this.isValid()&&((e=document.createElement("source")).src=this.url,e.type=this.mimeType),e},t}(xi);Bn.MediaSource=wi;var Si=function(){function e(){}return e.prototype.play=function(){},Object.defineProperty(e.prototype,"posterUrl",{get:function(){return this._posterUrl},set:function(e){this._posterUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedMediaType",{get:function(){},enumerable:!1,configurable:!0}),e}();Bn.MediaPlayer=Si;var ki=function(e){function t(t){var n=e.call(this)||this;return n.owner=t,n._selectedSources=[],n._captionSources=[],n.processSources(),n}return $o(t,e),t.prototype.processSources=function(){var e;this._selectedSources=[],this._captionSources=[],this._selectedMediaType=void 0;for(var n=0,r=this.owner.sources;n<r.length;n++){var o=r[n],i=o.mimeType?o.mimeType.split("/"):[];if(2===i.length){if(!this._selectedMediaType){var a=t.supportedMediaTypes.indexOf(i[0]);a>=0&&(this._selectedMediaType=t.supportedMediaTypes[a])}i[0]===this._selectedMediaType&&this._selectedSources.push(o)}}(e=this._captionSources).push.apply(e,this.owner.captionSources)},t.prototype.canPlay=function(){return this._selectedSources.length>0},t.prototype.fetchVideoDetails=function(){return Jo(this,void 0,void 0,function(){return Go(this,function(e){return[2]})})},t.prototype.render=function(){"video"===this._selectedMediaType?this._mediaElement=document.createElement("video"):this._mediaElement=document.createElement("audio"),this._mediaElement.setAttribute("aria-label",this.owner.altText?this.owner.altText:ni.Strings.defaults.mediaPlayerAriaLabel()),this._mediaElement.setAttribute("webkit-playsinline",""),this._mediaElement.setAttribute("playsinline",""),this._mediaElement.setAttribute("crossorigin",""),this._mediaElement.autoplay=!0,this._mediaElement.controls=!0,Yo.isMobileOS()&&(this._mediaElement.muted=!0),this._mediaElement.preload="none",this._mediaElement.style.width="100%";for(var e=0,t=this.owner.sources;e<t.length;e++){var n=t[e].render();Yo.appendChild(this._mediaElement,n)}for(var r=0,o=this.owner.captionSources;r<o.length;r++){var i=o[r];if("vtt"==i.mimeType){var a=i.render();Yo.appendChild(this._mediaElement,a)}}return this._mediaElement},t.prototype.play=function(){this._mediaElement&&this._mediaElement.play()},Object.defineProperty(t.prototype,"selectedMediaType",{get:function(){return this._selectedMediaType},enumerable:!1,configurable:!0}),t.supportedMediaTypes=["audio","video"],t}(Si);Bn.HTML5MediaPlayer=ki;var Pi=function(e){function t(t){return e.call(this)||this}return $o(t,e),t}(Si);Bn.CustomMediaPlayer=Pi;var Ei=function(e){function t(t,n){var r=e.call(this,t)||this;return r.iFrameTitle=n,t.length>=2&&(r._videoId=t[1]),r}return $o(t,e),t.prototype.canPlay=function(){return void 0!==this._videoId},t.prototype.render=function(){var e=document.createElement("div");e.style.position="relative",e.style.width="100%",e.style.height="0",e.style.paddingBottom="56.25%";var t=document.createElement("iframe");return t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.src=this.getEmbedVideoUrl(),t.frameBorder="0",this.iFrameTitle&&(t.title=this.iFrameTitle),t.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",t.allowFullscreen=!0,e.appendChild(t),e},Object.defineProperty(t.prototype,"videoId",{get:function(){return this._videoId},enumerable:!1,configurable:!0}),t}(Pi);Bn.IFrameMediaMediaPlayer=Ei;var Ai=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.fetchVideoDetails=function(){return Jo(this,void 0,void 0,function(){var e,t,n;return Go(this,function(r){switch(r.label){case 0:return e="https://vimeo.com/api/oembed.json?url=".concat(this.getEmbedVideoUrl()),[4,fetch(e)];case 1:return(t=r.sent()).ok?[4,t.json()]:[3,3];case 2:n=r.sent(),this.posterUrl=n.thumbnail_url,r.label=3;case 3:return[2]}})})},t.prototype.getEmbedVideoUrl=function(){return"https://player.vimeo.com/video/".concat(this.videoId,"?autoplay=1")},t}(Ei);Bn.VimeoPlayer=Ai;var Ii=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.fetchVideoDetails=function(){return Jo(this,void 0,void 0,function(){var e,t,n;return Go(this,function(r){switch(r.label){case 0:return e="https://api.dailymotion.com/video/".concat(this.videoId,"?fields=thumbnail_720_url"),[4,fetch(e)];case 1:return(t=r.sent()).ok?[4,t.json()]:[3,3];case 2:n=r.sent(),this.posterUrl=n.thumbnail_720_url,r.label=3;case 3:return[2]}})})},t.prototype.getEmbedVideoUrl=function(){return"https://www.dailymotion.com/embed/video/".concat(this.videoId,"?autoplay=1")},t}(Ei);Bn.DailymotionPlayer=Ii;var _i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.iFrameTitle=n,t.length>=3&&void 0!==t[2]&&(r._startTimeIndex=parseInt(t[2])),r}return $o(t,e),t.prototype.fetchVideoDetails=function(){return Jo(this,void 0,void 0,function(){return Go(this,function(e){return this.posterUrl=this.videoId?"https://img.youtube.com/vi/".concat(this.videoId,"/maxresdefault.jpg"):void 0,[2]})})},t.prototype.getEmbedVideoUrl=function(){var e="https://www.youtube.com/embed/".concat(this.videoId,"?autoplay=1");return void 0!==this._startTimeIndex&&(e+="&start=".concat(this._startTimeIndex)),e},t}(Ei);Bn.YouTubePlayer=_i;var Ti,ji,Mi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sources=[],t.captionSources=[],t}return $o(t,e),t.prototype.createMediaPlayer=function(){for(var e=0,n=t.customMediaPlayers;e<n.length;e++)for(var r=n[e],o=0,i=this.sources;o<i.length;o++){var a=i[o];if(a.url)for(var s=0,l=r.urlPatterns;s<l.length;s++){var c=l[s].exec(a.url);if(null!==c)return r.createMediaPlayer(c)}}return new ki(this)},t.prototype.handlePlayButtonInvoke=function(e){if(this.hostConfig.media.allowInlinePlayback){if(e.preventDefault(),e.cancelBubble=!0,this.renderedElement){var n=this._mediaPlayer.render();oi(this.renderedElement),this.renderedElement.appendChild(n),this._mediaPlayer.play(),n.focus()}}else t.onPlay&&(e.preventDefault(),e.cancelBubble=!0,t.onPlay(this))},t.prototype.displayPoster=function(){return Jo(this,void 0,void 0,function(){var e,t,n,r,o,i,a=this;return Go(this,function(s){return this.renderedElement&&((e=document.createElement("div")).className=this.hostConfig.makeCssClassName("ac-media-poster"),e.setAttribute("role","contentinfo"),e.setAttribute("aria-label",this.altText?this.altText:ni.Strings.defaults.mediaPlayerAriaLabel()),e.style.position="relative",e.style.display="flex",(t=this.poster?this.poster:this._mediaPlayer.posterUrl)||(t=this.hostConfig.media.defaultPoster),t?((n=document.createElement("img")).style.width="100%",n.style.height="100%",n.setAttribute("role","presentation"),n.onerror=function(t){n.parentNode&&n.parentNode.removeChild(n),e.classList.add("empty"),e.style.minHeight="150px"},n.src=t,e.appendChild(n)):(e.classList.add("empty"),e.style.minHeight="150px"),this.hostConfig.supportsInteractivity&&this._mediaPlayer.canPlay()&&((r=document.createElement("div")).tabIndex=0,r.setAttribute("role","button"),r.setAttribute("aria-label",ni.Strings.defaults.mediaPlayerPlayMedia()),r.className=this.hostConfig.makeCssClassName("ac-media-playButton"),r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.onclick=function(e){a.handlePlayButtonInvoke(e)},r.onkeypress=function(e){"Enter"!==e.code&&"Space"!==e.code||a.handlePlayButtonInvoke(e)},(o=document.createElement("div")).className=this.hostConfig.makeCssClassName("ac-media-playButton-arrow"),o.style.width="12px",o.style.height="15px",o.style.borderTopWidth="7.5px",o.style.borderBottomWidth="7.5px",o.style.borderLeftWidth="12px",o.style.borderRightWidth="0",o.style.borderStyle="solid",o.style.borderTopColor="transparent",o.style.borderRightColor="transparent",o.style.borderBottomColor="transparent",o.style.transform="translate(1.2px,0px)",r.appendChild(o),(i=document.createElement("div")).style.position="absolute",i.style.left="0",i.style.top="0",i.style.width="100%",i.style.height="100%",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",i.appendChild(r),e.appendChild(i)),oi(this.renderedElement),this.renderedElement.appendChild(e)),[2]})})},t.prototype.internalRender=function(){var e=document.createElement("div");return e.className=this.hostConfig.makeCssClassName("ac-media"),e},t.prototype.render=function(){var t=this,n=e.prototype.render.call(this);return n&&(this._mediaPlayer=this.createMediaPlayer(),this._mediaPlayer.fetchVideoDetails().then(function(){return t.displayPoster()})),n},t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this),this.displayPoster()},t.prototype.getJsonTypeName=function(){return"Media"},t.prototype.getResourceInformation=function(){var e=[];if(this._mediaPlayer){var t=this.poster?this.poster:this.hostConfig.media.defaultPoster;t&&e.push({url:t,mimeType:"image"})}for(var n=0,r=this.sources;n<r.length;n++){var o=r[n];o.isValid()&&e.push({url:o.url,mimeType:o.mimeType})}for(var i=0,a=this.captionSources;i<a.length;i++){var s=a[i];s.isValid()&&e.push({url:s.url,mimeType:s.mimeType})}return e},Object.defineProperty(t.prototype,"selectedMediaType",{get:function(){return this._mediaPlayer.selectedMediaType},enumerable:!1,configurable:!0}),t.customMediaPlayers=[{urlPatterns:[/^(?:https?:\/\/)?(?:www.)?youtube.com\/watch\?(?=.*v=([\w\d-_]+))(?=(?:.*t=(\d+))?).*/gi,/^(?:https?:\/\/)?youtu.be\/([\w\d-_]+)(?:\?t=(\d+))?/gi],createMediaPlayer:function(e){return new _i(e,ni.Strings.defaults.youTubeVideoPlayer())}},{urlPatterns:[/^(?:https?:\/\/)?vimeo.com\/([\w\d-_]+).*/gi],createMediaPlayer:function(e){return new Ai(e,ni.Strings.defaults.vimeoVideoPlayer())}},{urlPatterns:[/^(?:https?:\/\/)?(?:www.)?dailymotion.com\/video\/([\w\d-_]+).*/gi],createMediaPlayer:function(e){return new Ii(e,ni.Strings.defaults.dailymotionVideoPlayer())}}],t.sourcesProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_1,"sources",wi),t.captionSourcesProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_6,"captionSources",Ci),t.posterProperty=new ei.StringProperty(ei.Versions.v1_1,"poster"),t.altTextProperty=new ei.StringProperty(ei.Versions.v1_1,"altText"),Uo([(0,ei.property)(t.sourcesProperty)],t.prototype,"sources",void 0),Uo([(0,ei.property)(t.captionSourcesProperty)],t.prototype,"captionSources",void 0),Uo([(0,ei.property)(t.posterProperty)],t.prototype,"poster",void 0),Uo([(0,ei.property)(t.altTextProperty)],t.prototype,"altText",void 0),t}(ai);Bn.Media=Mi,(ji=Ti||(Ti={}))[ji.InitialRender=0]="InitialRender",ji[ji.MouseEnterOnCard=1]="MouseEnterOnCard",ji[ji.MouseLeaveOnCard=2]="MouseLeaveOnCard",ji[ji.FocusLeave=3]="FocusLeave";var Ni=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputStyle=qo.InputStyle.Default,t}return $o(t,e),t.prototype.getAllLabelIds=function(){var e=[];return this.labelledBy&&e.push(this.labelledBy),this._renderedLabelElement&&e.push(this._renderedLabelElement.id),this._renderedErrorMessageElement&&e.push(this._renderedErrorMessageElement.id),e},t.prototype.updateInputControlAriaLabelledBy=function(){if(this._renderedInputControlElement){var e=this.getAllLabelIds();e.length>0?this._renderedInputControlElement.setAttribute("aria-labelledby",e.join(" ")):this._renderedInputControlElement.removeAttribute("aria-labelledby")}},Object.defineProperty(t.prototype,"isNullable",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedInputControlElement",{get:function(){return this._renderedInputControlElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputControlContainerElement",{get:function(){return this._inputControlContainerElement},enumerable:!1,configurable:!0}),t.prototype.overrideInternalRender=function(){var e=this,t=this.hostConfig;this._outerContainerElement=document.createElement("div"),this._outerContainerElement.style.display="flex",this.labelPosition===qo.InputLabelPosition.Inline?this._outerContainerElement.style.flexDirection="row":this._outerContainerElement.style.flexDirection="column";var n=Yo.generateUniqueId();if(this.label){var r=new di;r.setParent(this),r.forElementId=n;var o=new ui(this.label);if(r.addInline(o),this.isRequired){o.init(t.inputs.label.requiredInputs);var i=new ui(t.inputs.label.requiredInputs.suffix);i.color=t.inputs.label.requiredInputs.suffixColor,i.ariaHidden=!0,r.addInline(i)}else o.init(t.inputs.label.optionalInputs);this._renderedLabelElement=r.render(),this._renderedLabelElement&&(this._renderedLabelElement.id=Yo.generateUniqueId(),this.labelPosition===qo.InputLabelPosition.Inline?this._renderedLabelElement.style.alignSelf="center":this._renderedLabelElement.style.marginBottom=t.getEffectiveSpacing(t.inputs.label.inputSpacing)+"px",this._outerContainerElement.appendChild(this._renderedLabelElement))}if(this._inputControlContainerElement=document.createElement("div"),this._inputControlContainerElement.className=t.makeCssClassName("ac-input-container"),this._inputControlContainerElement.style.display="flex","stretch"===this.height&&(this._inputControlContainerElement.style.alignItems="stretch",this._inputControlContainerElement.style.flex="1 1 auto"),this._renderedInputControlElement=this.internalRender(),this._renderedInputControlElement){if(this._renderedInputControlElement.id=n,this._renderedInputControlElement.style.minWidth="0px",this.isNullable&&this.isRequired&&(this._renderedInputControlElement.setAttribute("aria-required","true"),this._renderedInputControlElement.classList.add(t.makeCssClassName("ac-input-required"))),this._inputControlContainerElement.appendChild(this._renderedInputControlElement),this._outerContainerElement.appendChild(this._inputControlContainerElement),this._renderedLabelElement&&this.labelPosition===qo.InputLabelPosition.Inline)if(this.labelWidth){if(this.labelWidth.unit==qo.SizeUnit.Weight){var a=this.labelWidth.physicalSize;this._renderedLabelElement.style.width=a.toString()+"%",this._inputControlContainerElement.style.width=(100-a).toString()+"%"}else if(this.labelWidth.unit==qo.SizeUnit.Pixel){var s=this.labelWidth.physicalSize;this._renderedLabelElement.style.width=s.toString()+"px"}}else{var l=t.inputs.label.width;this._renderedLabelElement.style.width=l.toString()+"%",this._inputControlContainerElement.style.width=100-l+"%"}return this.updateVisualState(Ti.InitialRender),this._renderedInputControlElement&&(this._renderedInputControlElement.onblur=function(t){e.updateVisualState(Ti.FocusLeave)}),this.updateInputControlAriaLabelledBy(),this._outerContainerElement}this.resetDirtyState()},t.prototype.valueChanged=function(){var e,t,n;this.getRootElement().updateActionsEnabledState(),this.isValid()&&this.resetValidationFailureCue(),this.onValueChanged&&this.onValueChanged(this),t=(e=this).getRootElement(),(n=t&&t.onInputValueChanged?t.onInputValueChanged:Ia.onInputValueChanged)&&n(e)},t.prototype.resetValidationFailureCue=function(){this.renderedInputControlElement&&(this.renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName("ac-input-validation-failed")),this.updateInputControlAriaLabelledBy(),this._renderedErrorMessageElement&&(this._outerContainerElement.removeChild(this._renderedErrorMessageElement),this._renderedErrorMessageElement=void 0))},t.prototype.showValidationErrorMessage=function(){if(this.renderedElement&&this.errorMessage&&Xo.GlobalSettings.displayInputValidationErrors){var e=new ci;e.setParent(this),e.text=this.errorMessage,e.wrap=!0,e.init(this.hostConfig.inputs.errorMessage),this._renderedErrorMessageElement=e.render(),this._renderedErrorMessageElement&&(this._renderedErrorMessageElement.id=Yo.generateUniqueId(),this._outerContainerElement.appendChild(this._renderedErrorMessageElement),this.updateInputControlAriaLabelledBy())}},Object.defineProperty(t.prototype,"allowRevealOnHoverStyle",{get:function(){return this.hostConfig.inputs&&this.hostConfig.inputs.allowRevealOnHoverStyle},enumerable:!1,configurable:!0}),t.prototype.shouldHideInputAdornersForRevealOnHover=function(e,t){var n=e===document.activeElement,r=this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onhover"),o=e.classList.contains(r);return t===Ti.InitialRender||t===Ti.FocusLeave&&!o||t===Ti.MouseLeaveOnCard&&!n},t.prototype.updateVisualState=function(e){this.allowRevealOnHoverStyle&&this._renderedInputControlElement&&this.inputStyle===qo.InputStyle.RevealOnHover&&(e===Ti.InitialRender?this._renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onrender")):e===Ti.MouseEnterOnCard?this._renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onhover")):e===Ti.MouseLeaveOnCard&&this._renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onhover")))},t.prototype.focus=function(){this._renderedInputControlElement&&this._renderedInputControlElement.focus()},t.prototype.isValid=function(){return!0},t.prototype.isDirty=function(){return this.value!==this._oldValue},t.prototype.resetDirtyState=function(){this._oldValue=this.value},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this.id||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.inputsMustHaveUniqueId()),this.isRequired&&(this.label||t.addFailure(this,qo.ValidationEvent.RequiredInputsShouldHaveLabel,"Required inputs should have a label"),this.errorMessage||t.addFailure(this,qo.ValidationEvent.RequiredInputsShouldHaveErrorMessage,"Required inputs should have an error message"))},t.prototype.validateValue=function(){this.resetValidationFailureCue();var e=this.isRequired?this.isSet()&&this.isValid():this.isValid();return!e&&this.renderedInputControlElement&&(this.renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName("ac-input-validation-failed")),this.showValidationErrorMessage()),e},t.prototype.getAllInputs=function(e){return[this]},t.prototype.render=function(){var t=e.prototype.render.call(this);return this.resetDirtyState(),t},Object.defineProperty(t.prototype,"isInteractive",{get:function(){return!0},enumerable:!1,configurable:!0}),t.labelProperty=new ei.StringProperty(ei.Versions.v1_3,"label",!0),t.isRequiredProperty=new ei.BoolProperty(ei.Versions.v1_3,"isRequired",!1),t.errorMessageProperty=new ei.StringProperty(ei.Versions.v1_3,"errorMessage",!0),t.inputStyleProperty=new ei.EnumProperty(ei.Versions.v1_6,"inputStyle",qo.InputStyle,qo.InputStyle.Default,[{value:qo.InputStyle.RevealOnHover},{value:qo.InputStyle.Default}]),t.labelWidthProperty=new ei.CustomProperty(ei.Versions.v1_6,"labelWidth",function(e,t,n,r){var o=t.defaultValue,i=n[t.name],a=!1;if("number"!=typeof i||isNaN(i))if("string"==typeof i)try{o=Xo.SizeAndUnit.parse(i)}catch(s){a=!0}else a=!0;else((o=new Xo.SizeAndUnit(i,qo.SizeUnit.Weight)).physicalSize<0||o.physicalSize>100)&&(a=!0);return a&&(r.logParseEvent(e,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidInputLabelWidth()),o=void 0),o},function(e,t,n,r,o){r instanceof Xo.SizeAndUnit&&(r.unit===qo.SizeUnit.Pixel?o.serializeValue(n,"labelWidth",r.physicalSize+"px"):o.serializeNumber(n,"labelWidth",r.physicalSize))},void 0),t.labelPositionProperty=new ei.EnumProperty(ei.Versions.v1_6,"labelPosition",qo.InputLabelPosition,qo.InputLabelPosition.Above,[{value:qo.InputLabelPosition.Inline},{value:qo.InputLabelPosition.Above}]),Uo([(0,ei.property)(t.labelProperty)],t.prototype,"label",void 0),Uo([(0,ei.property)(t.isRequiredProperty)],t.prototype,"isRequired",void 0),Uo([(0,ei.property)(t.errorMessageProperty)],t.prototype,"errorMessage",void 0),Uo([(0,ei.property)(t.inputStyleProperty)],t.prototype,"inputStyle",void 0),Uo([(0,ei.property)(t.labelWidthProperty)],t.prototype,"labelWidth",void 0),Uo([(0,ei.property)(t.labelPositionProperty)],t.prototype,"labelPosition",void 0),t}(ai);Bn.Input=Ni;var Di=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMultiline=!1,t.style=qo.InputTextStyle.Text,t}return $o(t,e),t.prototype.setupInput=function(e){var t=this;e.style.flex="1 1 auto",e.tabIndex=this.isDesignMode()?-1:0,this.placeholder&&(e.placeholder=this.placeholder,e.setAttribute("aria-label",this.placeholder)),this.defaultValue&&(e.value=this.defaultValue),this.maxLength&&this.maxLength>0&&(e.maxLength=this.maxLength),e.oninput=function(){t.valueChanged()},e.onkeypress=function(e){e.ctrlKey&&"Enter"===e.code&&t.inlineAction&&t.inlineAction.isEffectivelyEnabled()&&t.inlineAction.execute()}},t.prototype.internalRender=function(){var e;return this.isMultiline&&this.style!==qo.InputTextStyle.Password?((e=document.createElement("textarea")).className=this.hostConfig.makeCssClassName("ac-input","ac-textInput","ac-multiline"),"stretch"===this.height&&(e.style.height="initial")):((e=document.createElement("input")).className=this.hostConfig.makeCssClassName("ac-input","ac-textInput"),e.type=qo.InputTextStyle[this.style].toLowerCase()),this.setupInput(e),e},t.prototype.overrideInternalRender=function(){var t=this,n=e.prototype.overrideInternalRender.call(this);if(this.inlineAction){var r=document.createElement("button");if(r.className=this.hostConfig.makeCssClassName(this.inlineAction.isEffectivelyEnabled()?"ac-inlineActionButton":"ac-inlineActionButton-disabled"),r.onclick=function(e){t.inlineAction&&t.inlineAction.isEffectivelyEnabled()&&(e.preventDefault(),e.cancelBubble=!0,t.inlineAction.execute())},this.inlineAction.iconUrl){r.classList.add("iconOnly");var o=document.createElement("img");o.style.height="100%",o.setAttribute("role","presentation"),o.style.display="none",o.onload=function(){o.style.removeProperty("display")},o.onerror=function(){r.removeChild(o),r.classList.remove("iconOnly"),r.classList.add("textOnly"),r.textContent=t.inlineAction&&t.inlineAction.title?t.inlineAction.title:ni.Strings.defaults.inlineActionTitle()},o.src=this.inlineAction.iconUrl,r.appendChild(o),r.title=this.inlineAction.title?this.inlineAction.title:ni.Strings.defaults.inlineActionTitle()}else r.classList.add("textOnly"),r.textContent=this.inlineAction.title?this.inlineAction.title:ni.Strings.defaults.inlineActionTitle();this.inlineAction.setupElementForAccessibility(r,!0),r.style.marginLeft="8px",this.inputControlContainerElement.appendChild(r)}return n},t.prototype.updateVisualState=function(t){this.allowRevealOnHoverStyle&&(this.inlineAction||this.isMultiline||e.prototype.updateVisualState.call(this,t))},t.prototype.getJsonTypeName=function(){return"Input.Text"},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return this.inlineAction&&t.push(this.inlineAction),t},t.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);return!n&&this.inlineAction&&(n=this.inlineAction.getActionById(t)),n},t.prototype.isSet=function(){return!!this.value},t.prototype.isValid=function(){return!this.value||(!this.regex||new RegExp(this.regex,"g").test(this.value))},Object.defineProperty(t.prototype,"value",{get:function(){return this.renderedInputControlElement?(this.isMultiline,this.renderedInputControlElement.value):void 0},enumerable:!1,configurable:!0}),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),t.maxLengthProperty=new ei.NumProperty(ei.Versions.v1_0,"maxLength"),t.isMultilineProperty=new ei.BoolProperty(ei.Versions.v1_0,"isMultiline",!1),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.styleProperty=new ei.EnumProperty(ei.Versions.v1_0,"style",qo.InputTextStyle,qo.InputTextStyle.Text,[{value:qo.InputTextStyle.Text},{value:qo.InputTextStyle.Tel},{value:qo.InputTextStyle.Url},{value:qo.InputTextStyle.Email},{value:qo.InputTextStyle.Password,targetVersion:ei.Versions.v1_5}]),t.inlineActionProperty=new si(ei.Versions.v1_0,"inlineAction",["Action.ShowCard"]),t.regexProperty=new ei.StringProperty(ei.Versions.v1_3,"regex",!0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.maxLengthProperty)],t.prototype,"maxLength",void 0),Uo([(0,ei.property)(t.isMultilineProperty)],t.prototype,"isMultiline",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),Uo([(0,ei.property)(t.inlineActionProperty)],t.prototype,"inlineAction",void 0),Uo([(0,ei.property)(t.regexProperty)],t.prototype,"regex",void 0),t}(Ni);Bn.TextInput=Di;var Oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.valueOn="true",t.valueOff="false",t.wrap=!1,t}return $o(t,e),t.prototype.updateInputControlAriaLabelledBy=function(){if(this._checkboxInputElement){var e=this.getAllLabelIds().join(" ");this._checkboxInputLabelElement&&this._checkboxInputLabelElement.id&&(e+=" "+this._checkboxInputLabelElement.id),e?this._checkboxInputElement.setAttribute("aria-labelledby",e):this._checkboxInputElement.removeAttribute("aria-labelledby")}},t.prototype.internalRender=function(){var e=this,t=document.createElement("div");if(t.className=this.hostConfig.makeCssClassName("ac-input","ac-toggleInput"),t.style.width="100%",t.style.display="flex",t.style.alignItems="center",this._checkboxInputElement=document.createElement("input"),this._checkboxInputElement.id=Yo.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.title&&this._checkboxInputElement.setAttribute("aria-label",this.title),this.isRequired&&this._checkboxInputElement.setAttribute("aria-required","true"),this._checkboxInputElement.tabIndex=this.isDesignMode()?-1:0,this.defaultValue===this.valueOn&&(this._checkboxInputElement.checked=!0),this._oldCheckboxValue=this._checkboxInputElement.checked,this._checkboxInputElement.onchange=function(){e.valueChanged()},Yo.appendChild(t,this._checkboxInputElement),this.title||this.isDesignMode()){var n=new ci;if(n.setParent(this),n.forElementId=this._checkboxInputElement.id,n.hostConfig=this.hostConfig,n.text=this.title?this.title:this.getJsonTypeName(),n.useMarkdown=Xo.GlobalSettings.useMarkdownInRadioButtonAndCheckbox,n.wrap=this.wrap,this._checkboxInputLabelElement=n.render(),this._checkboxInputLabelElement){this._checkboxInputLabelElement.id=Yo.generateUniqueId(),this._checkboxInputLabelElement.style.display="inline-block",this._checkboxInputLabelElement.style.flex="1 1 auto",this._checkboxInputLabelElement.style.marginLeft="6px",this._checkboxInputLabelElement.style.verticalAlign="middle";var r=document.createElement("div");r.style.width="6px",Yo.appendChild(t,r),Yo.appendChild(t,this._checkboxInputLabelElement)}}return t},Object.defineProperty(t.prototype,"isNullable",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.updateVisualState=function(e){},t.prototype.getJsonTypeName=function(){return"Input.Toggle"},t.prototype.focus=function(){this._checkboxInputElement&&this._checkboxInputElement.focus()},t.prototype.isSet=function(){return this.isRequired?this.value===this.valueOn:!!this.value},t.prototype.isDirty=function(){return!!this._checkboxInputElement&&this._checkboxInputElement.checked!==this._oldCheckboxValue},Object.defineProperty(t.prototype,"value",{get:function(){return this._checkboxInputElement?this._checkboxInputElement.checked?this.valueOn:this.valueOff:void 0},enumerable:!1,configurable:!0}),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),t.titleProperty=new ei.StringProperty(ei.Versions.v1_0,"title"),t.valueOnProperty=new ei.StringProperty(ei.Versions.v1_0,"valueOn",!0,void 0,"true",function(e){return"true"}),t.valueOffProperty=new ei.StringProperty(ei.Versions.v1_0,"valueOff",!0,void 0,"false",function(e){return"false"}),t.wrapProperty=new ei.BoolProperty(ei.Versions.v1_2,"wrap",!1),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"title",void 0),Uo([(0,ei.property)(t.valueOnProperty)],t.prototype,"valueOn",void 0),Uo([(0,ei.property)(t.valueOffProperty)],t.prototype,"valueOff",void 0),Uo([(0,ei.property)(t.wrapProperty)],t.prototype,"wrap",void 0),t}(Ni);Bn.ToggleInput=Oi;var Vi=function(e){function t(t,n){var r=e.call(this)||this;return r.title=t,r.value=n,r}return $o(t,e),t.prototype.getSchemaKey=function(){return"Choice"},t.titleProperty=new ei.StringProperty(ei.Versions.v1_0,"title"),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"title",void 0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"value",void 0),t}(ei.SerializableObject);Bn.Choice=Vi;var Bi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"choices.data"},t.typeProperty=new ei.StringProperty(ei.Versions.v1_6,"type",!0,new RegExp("^Data.Query$")),t.datasetProperty=new ei.StringProperty(ei.Versions.v1_6,"dataset"),t.countProperty=new ei.NumProperty(ei.Versions.v1_6,"count"),t.skipProperty=new ei.NumProperty(ei.Versions.v1_6,"skip"),Uo([(0,ei.property)(t.typeProperty)],t.prototype,"type",void 0),Uo([(0,ei.property)(t.datasetProperty)],t.prototype,"dataset",void 0),Uo([(0,ei.property)(t.countProperty)],t.prototype,"count",void 0),Uo([(0,ei.property)(t.skipProperty)],t.prototype,"skip",void 0),t}(ei.SerializableObject);Bn.ChoiceSetInputDataQuery=Bi;var Ri=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMultiSelect=!1,t.wrap=!1,t.choices=[],t}return $o(t,e),Object.defineProperty(t.prototype,"isCompact",{get:function(){return!this.style||"compact"===this.style},set:function(e){this.style=e?void 0:"expanded"},enumerable:!1,configurable:!0}),t.getUniqueCategoryName=function(){var e="__ac-category"+t._uniqueCategoryCounter;return t._uniqueCategoryCounter++,e},t.prototype.isDynamicTypeahead=function(){return!!this.choicesData&&!!this.choicesData.dataset&&"Data.Query"===this.choicesData.type},t.prototype.getFilterForDynamicSearch=function(){var e,t;return null===(t=null===(e=this._filteredChoiceSet)||void 0===e?void 0:e.textInput)||void 0===t?void 0:t.value},t.prototype.renderChoices=function(e){var t;null===(t=this._filteredChoiceSet)||void 0===t||t.processResponse(e)},t.prototype.showLoadingIndicator=function(){var e;null===(e=this._filteredChoiceSet)||void 0===e||e.showLoadingIndicator()},t.prototype.removeLoadingIndicator=function(){var e;null===(e=this._filteredChoiceSet)||void 0===e||e.removeLoadingIndicator()},t.prototype.showErrorIndicator=function(e){var t;null===(t=this._filteredChoiceSet)||void 0===t||t.showErrorIndicator(e)},t.prototype.createPlaceholderOptionWhenValueDoesNotExist=function(){if(!this.value){var e=document.createElement("option");return e.selected=!0,e.disabled=!0,e.hidden=!0,e.value="",this.placeholder&&(e.text=this.placeholder),e}},t.prototype.internalApplyAriaCurrent=function(){if(this._selectElement){var e=this._selectElement.options;if(e)for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t];r.selected?r.setAttribute("aria-current","true"):r.removeAttribute("aria-current")}}},t.prototype.renderCompoundInput=function(e,t,n){var r=this,o=document.createElement("div");o.className=this.hostConfig.makeCssClassName("ac-input",e),o.style.width="100%",o.tabIndex=this.isDesignMode()?-1:0,this._toggleInputs=[],this._labels=[];for(var i=0,a=this.choices;i<a.length;i++){var s=a[i],l=document.createElement("input");l.id=Yo.generateUniqueId(),l.type=t,l.style.margin="0",l.style.display="inline-block",l.style.verticalAlign="middle",l.style.flex="0 0 auto",l.name=this.id?this.id:this._uniqueCategoryName,this.isRequired&&l.setAttribute("aria-required","true"),l.tabIndex=this.isDesignMode()?-1:0,s.value&&(l.value=s.value),s.title&&l.setAttribute("aria-label",s.title),n&&s.value&&n.indexOf(s.value)>=0&&(l.checked=!0),l.onchange=function(){r.valueChanged()},this._toggleInputs.push(l);var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",Yo.appendChild(c,l);var u=new ci;u.setParent(this),u.forElementId=l.id,u.hostConfig=this.hostConfig,u.text=s.title?s.title:"Choice "+this._toggleInputs.length,u.useMarkdown=Xo.GlobalSettings.useMarkdownInRadioButtonAndCheckbox,u.wrap=this.wrap;var d=u.render();if(this._labels.push(d),d){d.id=Yo.generateUniqueId(),d.style.display="inline-block",d.style.flex="1 1 auto",d.style.marginLeft="6px",d.style.verticalAlign="middle";var p=document.createElement("div");p.style.width="6px",Yo.appendChild(c,p),Yo.appendChild(c,d)}Yo.appendChild(o,c)}return o},t.prototype.updateInputControlAriaLabelledBy=function(){if((this.isMultiSelect||"expanded"===this.style)&&this._toggleInputs&&this._labels)for(var t=this.getAllLabelIds(),n=0;n<this._toggleInputs.length;n++){var r=t.join(" "),o=this._labels[n];o&&o.id&&(r+=" "+o.id),r?this._toggleInputs[n].setAttribute("aria-labelledby",r):this._toggleInputs[n].removeAttribute("aria-labelledby")}else e.prototype.updateInputControlAriaLabelledBy.call(this)},t.prototype.internalRender=function(){var e=this;if(this._uniqueCategoryName=t.getUniqueCategoryName(),this.isDynamicTypeahead()){var n=new zi(t._uniqueCategoryCounter,this.choices,this.hostConfig);if(n.render(),n.textInput){this._textInput=n.textInput,this.defaultValue&&(this._textInput.value=this.defaultValue),this.placeholder&&!this._textInput.value&&(this._textInput.placeholder=this.placeholder,this._textInput.setAttribute("aria-label",this.placeholder)),this._textInput.tabIndex=this.isDesignMode()?-1:0;var r=Yo.debounce(function(){n.processStaticChoices(),e.valueChanged(),e._textInput&&(e.value?(e._textInput.removeAttribute("placeholder"),e._textInput.removeAttribute("aria-label")):e.placeholder&&(e._textInput.placeholder=e.placeholder,e._textInput.setAttribute("aria-label",e.placeholder)))},this.hostConfig.inputs.debounceTimeInMilliSeconds);this._textInput.onclick=r,this._textInput.oninput=r}return n.parent=this,this._filteredChoiceSet=n,n.renderedElement}if(this.isMultiSelect)return this.renderCompoundInput("ac-choiceSetInput-multiSelect","checkbox",this.defaultValue?this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator):void 0);if("expanded"===this.style)return this.renderCompoundInput("ac-choiceSetInput-expanded","radio",this.defaultValue?[this.defaultValue]:void 0);if("filtered"===this.style){var o=document.createElement("div");o.style.width="100%",this._textInput=document.createElement("input"),this._textInput.className=this.hostConfig.makeCssClassName("ac-input","ac-multichoiceInput","ac-choiceSetInput-filtered"),this._textInput.type="text",this._textInput.style.width="100%",this._textInput.oninput=function(){e.valueChanged(),e._textInput&&(e.value?(e._textInput.removeAttribute("placeholder"),e._textInput.removeAttribute("aria-label")):e.placeholder&&(e._textInput.placeholder=e.placeholder,e._textInput.setAttribute("aria-label",e.placeholder)))},this.defaultValue&&(this._textInput.value=this.defaultValue),this.placeholder&&!this._textInput.value&&(this._textInput.placeholder=this.placeholder,this._textInput.setAttribute("aria-label",this.placeholder)),this._textInput.tabIndex=this.isDesignMode()?-1:0;var i=document.createElement("datalist");i.id=Yo.generateUniqueId();for(var a=0,s=this.choices;a<s.length;a++){var l=s[a],c=document.createElement("option");l.title&&(c.value=l.title,c.setAttribute("aria-label",l.title)),c.tabIndex=this.isDesignMode()?-1:0,i.appendChild(c)}return this._textInput.setAttribute("list",i.id),o.append(this._textInput,i),o}this._selectElement=document.createElement("select"),this._selectElement.className=this.hostConfig.makeCssClassName("ac-input","ac-multichoiceInput","ac-choiceSetInput-compact"),this._selectElement.style.width="100%",this._selectElement.tabIndex=this.isDesignMode()?-1:0;var u=this.createPlaceholderOptionWhenValueDoesNotExist();Yo.appendChild(this._selectElement,u);for(var d=0,p=this.choices;d<p.length;d++){l=p[d];(c=document.createElement("option")).value=l.value,l.title&&(c.text=l.title,c.setAttribute("aria-label",l.title)),c.tabIndex=this.isDesignMode()?-1:0,l.value===this.defaultValue&&(c.selected=!0),Yo.appendChild(this._selectElement,c)}return this._selectElement.onchange=function(){e.internalApplyAriaCurrent(),e.valueChanged()},this.internalApplyAriaCurrent(),this._selectElement},t.prototype.updateVisualState=function(t){this.allowRevealOnHoverStyle&&(!this.isMultiSelect&&this.isCompact&&(e.prototype.updateVisualState.call(this,t),this._selectElement&&this.inputStyle===qo.InputStyle.RevealOnHover&&(this.shouldHideInputAdornersForRevealOnHover(this._selectElement,t)?(this._selectElement.style.appearance="none",this._selectElement.classList.remove(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus"))):(this._selectElement.style.appearance="auto",this._selectElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus"))))))},t.prototype.getJsonTypeName=function(){return"Input.ChoiceSet"},t.prototype.focus=function(){this._toggleInputs&&(this.isMultiSelect||"expanded"===this.style)?this._toggleInputs.length>0&&this._toggleInputs[0].focus():this._textInput?this._textInput.focus():e.prototype.focus.call(this)},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),0===this.choices.length&&t.addFailure(this,qo.ValidationEvent.CollectionCantBeEmpty,ni.Strings.errors.choiceSetMustHaveAtLeastOneChoice());for(var n=0,r=this.choices;n<r.length;n++){var o=r[n];o.title&&o.value||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.choiceSetChoicesMustHaveTitleAndValue())}},t.prototype.isSet=function(){return!!this.value},t.prototype.isValid=function(){if(this._textInput){if(""===this.value||this.value===this.placeholder)return!0;for(var t=0,n=this.choices;t<n.length;t++){var r=n[t];if(this.value===r.value)return!0}if(this.dynamicChoices)for(var o=0,i=this.dynamicChoices;o<i.length;o++){r=i[o];if(this.value===r)return!0}return!1}return e.prototype.isValid.call(this)},Object.defineProperty(t.prototype,"value",{get:function(){if(this.isMultiSelect){if(!this._toggleInputs||0===this._toggleInputs.length)return;for(var e="",t=0,n=this._toggleInputs;t<n.length;t++){(l=n[t]).checked&&(""!==e&&(e+=this.hostConfig.choiceSetInputValueSeparator),e+=l.value)}return e||void 0}if(this._selectElement)return this._selectElement.selectedIndex>0?this._selectElement.value:void 0;if(this._textInput){for(var r=0,o=this.choices;r<o.length;r++){var i=o[r];if(i.title&&this._textInput.value===i.title)return i.value}return this._textInput.value}if(this._toggleInputs&&this._toggleInputs.length>0)for(var a=0,s=this._toggleInputs;a<s.length;a++){var l;if((l=s[a]).checked)return l.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dynamicChoices",{get:function(){var e;return null===(e=this._filteredChoiceSet)||void 0===e?void 0:e.dynamicChoices},enumerable:!1,configurable:!0}),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),t.choicesProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_0,"choices",Vi),t.choicesDataProperty=new ei.SerializableObjectProperty(ei.Versions.v1_6,"choices.data",Bi),t.styleProperty=new ei.ValueSetProperty(ei.Versions.v1_0,"style",[{value:"compact"},{value:"expanded"},{value:"filtered",targetVersion:ei.Versions.v1_5}],"compact"),t.isMultiSelectProperty=new ei.BoolProperty(ei.Versions.v1_0,"isMultiSelect",!1),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.wrapProperty=new ei.BoolProperty(ei.Versions.v1_2,"wrap",!1),t._uniqueCategoryCounter=0,Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),Uo([(0,ei.property)(t.isMultiSelectProperty)],t.prototype,"isMultiSelect",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),Uo([(0,ei.property)(t.wrapProperty)],t.prototype,"wrap",void 0),Uo([(0,ei.property)(t.choicesProperty)],t.prototype,"choices",void 0),Uo([(0,ei.property)(t.choicesDataProperty)],t.prototype,"choicesData",void 0),t}(Ni);Bn.ChoiceSetInput=Ri;var zi=function(){function e(e,t,n){this._choiceSetId=e,this._choices=t,this._dynamicChoices=[],this._visibleChoiceCount=0,this._hostConfig=n}return e.prototype.render=function(){var e=this,t=document.createElement("div");t.style.position="relative",t.style.width="100%",this._textInput=document.createElement("input"),this._textInput.className=this.hostConfig.makeCssClassName("ac-input","ac-multichoiceInput","ac-choiceSetInput-filtered"),this._textInput.type="text",this._textInput.style.width="100%",this._textInput.onkeydown=function(t){"ArrowDown"===t.key&&e.focusChoice(0)},this._dropdown=document.createElement("div"),this._dropdown.style.display="none",this._dropdown.className=this.hostConfig.makeCssClassName("ac-input","ac-multichoiceInput","ac-choiceSetInput-filtered-dropdown"),t.append(this._textInput,this._dropdown),document.onclick=function(t){if(e._dropdown){for(var n=e._dropdown.firstChild;n&&t.target!==n;)n=n.nextSibling;(n||t.target!==e._textInput)&&(e._dropdown.style.display="none")}},this._renderedElement=t},e.prototype.createChoice=function(e,t,n){var r=this,o=document.createElement("span");return o.className=this.hostConfig.makeCssClassName("ac-input","ac-choiceSetInput-choice"),o.id="ac-choiceSetInput-".concat(this._choiceSetId,"-choice-").concat(n),o.innerHTML=e.replace(t,"<b>".concat(t,"</b>")),o.tabIndex=-1,o.addEventListener("focusin",function(){o.classList.add("focused")}),o.addEventListener("focusout",function(){o.classList.remove("focused")}),o.onclick=function(){r._textInput&&(r._textInput.value=o.innerText),r._dropdown&&(r._dropdown.style.display="none")},o.onkeydown=function(e){"ArrowDown"===e.key?r.focusChoice(n+1):"ArrowUp"===e.key?r.focusChoice(n-1):"Enter"===e.key&&o.click()},o.onmouseover=function(){r.focusChoice(n)},o},e.prototype.focusChoice=function(e){var t=document.getElementById("ac-choiceSetInput-".concat(this._choiceSetId,"-choice-").concat(e));if(t)t.focus();else if(this._textInput){this._textInput.focus();var n=this._textInput.value.length;this._textInput.setSelectionRange(n,n)}},e.prototype.filterChoices=function(e){var t,n,r=null===(t=this._textInput)||void 0===t?void 0:t.value.toLowerCase();if(r)for(var o=0,i=e?this._dynamicChoices:this._choices;o<i.length;o++){var a=i[o];if(a.title){var s=a.title.toLowerCase().indexOf(r);if(-1!==s){var l=a.title.substring(s,s+r.length),c=this.createChoice(a.title,l,this._visibleChoiceCount++);null===(n=this._dropdown)||void 0===n||n.appendChild(c)}}}},e.prototype.getStatusIndicator=function(e){if(e){if(!this._errorIndicator){var t=document.createElement("div");t.className=this.hostConfig.makeCssClassName("ac-input","ac-choiceSetInput-statusIndicator","ac-choiceSetInput-errorIndicator"),this._errorIndicator=t}return this._errorIndicator.innerText=e,this._errorIndicator}if(!this._loadingIndicator){var n=document.createElement("div");n.className=this.hostConfig.makeCssClassName("ac-input","ac-choiceSetInput-statusIndicator"),this._loadingIndicator=n}return this._loadingIndicator.innerText=0===this._visibleChoiceCount?"Loading...":"Loading more...",this._loadingIndicator},e.prototype.resetDropdown=function(){this._dynamicChoices=[],this._dropdown&&(Yo.clearElementChildren(this._dropdown),this._visibleChoiceCount=0)},e.prototype.showDropdown=function(){var e;(null===(e=this._dropdown)||void 0===e?void 0:e.hasChildNodes)&&(this._dropdown.style.display="block")},e.prototype.processStaticChoices=function(){this.resetDropdown(),this.filterChoices(),this.showDropdown()},e.prototype.processResponse=function(e){this._dynamicChoices=e,this.filterChoices(!0),0===this._visibleChoiceCount&&this.showErrorIndicator("No results found.")},e.prototype.showLoadingIndicator=function(){var e,t=this.getStatusIndicator();null===(e=this._dropdown)||void 0===e||e.appendChild(t),this.showDropdown()},e.prototype.removeLoadingIndicator=function(){var e,t;this._loadingIndicator&&(null===(e=this._dropdown)||void 0===e?void 0:e.contains(this._loadingIndicator))&&(null===(t=this._dropdown)||void 0===t||t.removeChild(this._loadingIndicator))},e.prototype.showErrorIndicator=function(e){var t;this.removeLoadingIndicator();var n=this.getStatusIndicator(e);null===(t=this._dropdown)||void 0===t||t.appendChild(n)},Object.defineProperty(e.prototype,"dynamicChoices",{get:function(){var e;return null===(e=this._dynamicChoices)||void 0===e?void 0:e.map(function(e){return e.title})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hostConfig",{get:function(){return this._hostConfig?this._hostConfig:this.parent?this.parent.hostConfig:Zo.defaultHostConfig},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},set:function(e){this._parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedElement",{get:function(){return this._renderedElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textInput",{get:function(){return this._textInput},enumerable:!1,configurable:!0}),e}();Bn.FilteredChoiceSet=zi;var Li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.internalRender=function(){var e=this;return this._numberInputElement=document.createElement("input"),this._numberInputElement.setAttribute("type","number"),void 0!==this.min&&this._numberInputElement.setAttribute("min",this.min.toString()),void 0!==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=this.isDesignMode()?-1:0,void 0!==this.defaultValue&&(this._numberInputElement.valueAsNumber=this.defaultValue),this.placeholder&&(this._numberInputElement.placeholder=this.placeholder,this._numberInputElement.setAttribute("aria-label",this.placeholder)),this._numberInputElement.oninput=function(){e.valueChanged()},this._numberInputElement},t.prototype.getJsonTypeName=function(){return"Input.Number"},t.prototype.isSet=function(){return void 0!==this.value&&!isNaN(this.value)},t.prototype.isValid=function(){if(void 0===this.value)return!this.isRequired;var e=!0;return void 0!==this.min&&(e=e&&this.value>=this.min),void 0!==this.max&&(e=e&&this.value<=this.max),e},Object.defineProperty(t.prototype,"value",{get:function(){return this._numberInputElement?this._numberInputElement.valueAsNumber:void 0},set:function(e){e&&this._numberInputElement&&(this._numberInputElement.value=e.toString())},enumerable:!1,configurable:!0}),t.valueProperty=new ei.NumProperty(ei.Versions.v1_0,"value"),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.minProperty=new ei.NumProperty(ei.Versions.v1_0,"min"),t.maxProperty=new ei.NumProperty(ei.Versions.v1_0,"max"),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.minProperty)],t.prototype,"min",void 0),Uo([(0,ei.property)(t.maxProperty)],t.prototype,"max",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),t}(Ni);Bn.NumberInput=Li;var Hi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.internalRender=function(){var e=this;return this._dateInputElement=document.createElement("input"),this._dateInputElement.setAttribute("type","date"),this.min&&this._dateInputElement.setAttribute("min",this.min),this.max&&this._dateInputElement.setAttribute("max",this.max),this.placeholder&&(this._dateInputElement.placeholder=this.placeholder,this._dateInputElement.setAttribute("aria-label",this.placeholder)),this._dateInputElement.tabIndex=this.isDesignMode()?-1:0,this._dateInputElement.className=this.hostConfig.makeCssClassName("ac-input","ac-dateInput"),this._dateInputElement.style.width="100%",this._dateInputElement.oninput=function(){e.valueChanged()},this.defaultValue&&(this._dateInputElement.value=this.defaultValue),this._dateInputElement},t.prototype.updateVisualState=function(t){if(this.allowRevealOnHoverStyle&&(e.prototype.updateVisualState.call(this,t),this._dateInputElement&&this.inputStyle===qo.InputStyle.RevealOnHover)){var n=this.shouldHideInputAdornersForRevealOnHover(this._dateInputElement,t);n?this._dateInputElement.classList.remove(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus")):this._dateInputElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus")),Ca(this._dateInputElement,n)}},t.prototype.getJsonTypeName=function(){return"Input.Date"},t.prototype.isSet=function(){return!!this.value},t.prototype.isValid=function(){if(!this.value)return!this.isRequired;var e=new Date(this.value),t=!0;if(this.min){var n=new Date(this.min);t=t&&e>=n}if(this.max){var r=new Date(this.max);t=t&&e<=r}return t},Object.defineProperty(t.prototype,"value",{get:function(){return this._dateInputElement?this._dateInputElement.value:void 0},enumerable:!1,configurable:!0}),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.minProperty=new ei.StringProperty(ei.Versions.v1_0,"min"),t.maxProperty=new ei.StringProperty(ei.Versions.v1_0,"max"),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.minProperty)],t.prototype,"min",void 0),Uo([(0,ei.property)(t.maxProperty)],t.prototype,"max",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),t}(Ni);Bn.DateInput=Hi;var Fi=function(e){function t(t,n){var r=e.call(this,t,n,function(e,t,n,r){var o=n[t.name];if("string"==typeof o&&o&&/^[0-9]{2}:[0-9]{2}$/.test(o))return o},function(e,t,n,r,o){o.serializeValue(n,t.name,r)})||this;return r.targetVersion=t,r.name=n,r}return $o(t,e),t}(ei.CustomProperty);Bn.TimeProperty=Fi;var Wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.convertTimeStringToDate=function(e){return new Date("1973-09-04T"+e+":00Z")},t.prototype.internalRender=function(){var e=this;return this._timeInputElement=document.createElement("input"),this._timeInputElement.setAttribute("type","time"),this.min&&this._timeInputElement.setAttribute("min",this.min),this.max&&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(){e.valueChanged()},this.placeholder&&(this._timeInputElement.placeholder=this.placeholder,this._timeInputElement.setAttribute("aria-label",this.placeholder)),this._timeInputElement.tabIndex=this.isDesignMode()?-1:0,this.defaultValue&&(this._timeInputElement.value=this.defaultValue),this._timeInputElement},t.prototype.updateVisualState=function(t){if(this.allowRevealOnHoverStyle&&(e.prototype.updateVisualState.call(this,t),this._timeInputElement&&this.inputStyle===qo.InputStyle.RevealOnHover)){var n=this.shouldHideInputAdornersForRevealOnHover(this._timeInputElement,t);n?this._timeInputElement.classList.remove(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus")):this._timeInputElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus")),Ca(this._timeInputElement,n)}},t.prototype.getJsonTypeName=function(){return"Input.Time"},t.prototype.isSet=function(){return!!this.value},t.prototype.isValid=function(){if(!this.value)return!this.isRequired;var e=t.convertTimeStringToDate(this.value),n=!0;if(this.min){var r=t.convertTimeStringToDate(this.min);n=n&&e>=r}if(this.max){var o=t.convertTimeStringToDate(this.max);n=n&&e<=o}return n},Object.defineProperty(t.prototype,"value",{get:function(){return this._timeInputElement?this._timeInputElement.value:void 0},enumerable:!1,configurable:!0}),t.valueProperty=new Fi(ei.Versions.v1_0,"value"),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.minProperty=new Fi(ei.Versions.v1_0,"min"),t.maxProperty=new Fi(ei.Versions.v1_0,"max"),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.minProperty)],t.prototype,"min",void 0),Uo([(0,ei.property)(t.maxProperty)],t.prototype,"max",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),t}(Ni);Bn.TimeInput=Wi;var $i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.style=qo.ActionStyle.Default,t.mode=qo.ActionMode.Primary,t._state=0,t._isFocusable=!0,t}return $o(t,e),t.prototype.renderButtonContent=function(){if(this.renderedElement){var e=this.hostConfig,t=document.createElement("div");if(t.style.overflow="hidden",t.style.textOverflow="ellipsis",e.actions.iconPlacement===qo.ActionIconPlacement.AboveTitle||e.actions.allowTitleToWrap||(t.style.whiteSpace="nowrap"),this.title&&(t.innerText=this.title),this.iconUrl){var n=document.createElement("img");n.src=this.iconUrl,n.style.width=e.actions.iconSize+"px",n.style.height=e.actions.iconSize+"px",n.style.flex="0 0 auto",e.actions.iconPlacement===qo.ActionIconPlacement.AboveTitle?(this.renderedElement.classList.add("iconAbove"),this.renderedElement.style.flexDirection="column",this.title&&(n.style.marginBottom="6px")):(this.renderedElement.classList.add("iconLeft"),n.style.maxHeight="100%",this.title&&(n.style.marginRight="6px")),this.renderedElement.appendChild(n),this.renderedElement.appendChild(t)}else this.renderedElement.classList.add("noIcon"),this.renderedElement.appendChild(t)}},t.prototype.getParentContainer=function(){return this.parent instanceof ma?this.parent:this.parent?this.parent.getParentContainer():void 0},t.prototype.isDesignMode=function(){var e=this.getRootObject();return e instanceof ai&&e.isDesignMode()},t.prototype.updateCssClasses=function(){var e,t;if(this.parent&&this.renderedElement){var n=this.parent.hostConfig;this.renderedElement.className=n.makeCssClassName(this.isEffectivelyEnabled()?"ac-pushButton":"ac-pushButton-disabled");var r=this.getParentContainer();if(r){var o=r.getEffectiveStyle();o&&this.renderedElement.classList.add("style-"+o)}switch(this.renderedElement.tabIndex=!this.isDesignMode()&&this.isFocusable?0:-1,this._state){case 0:break;case 1:this.renderedElement.classList.add(n.makeCssClassName("expanded"));break;case 2:this.renderedElement.classList.add(n.makeCssClassName("subdued"))}this.style&&this.isEffectivelyEnabled()&&(this.style===qo.ActionStyle.Positive?(e=this.renderedElement.classList).add.apply(e,n.makeCssClassNames("primary","style-positive")):(t=this.renderedElement.classList).add.apply(t,n.makeCssClassNames("style-"+this.style.toLowerCase())))}},t.prototype.getDefaultSerializationContext=function(){return new Ta},t.prototype.internalGetReferencedInputs=function(){return{}},t.prototype.internalPrepareForExecution=function(e){},t.prototype.internalValidateInputs=function(e){var t=[];if(e)for(var n=0,r=Object.keys(e);n<r.length;n++){var o=e[r[n]];o.validateValue()||t.push(o)}return t},t.prototype.shouldSerialize=function(e){return void 0!==e.actionRegistry.findByName(this.getJsonTypeName())},t.prototype.raiseExecuteActionEvent=function(){var e,t,n;this.onExecute&&this.onExecute(this),t=(e=this).parent?e.parent.getRootElement():void 0,n=t&&t.onExecuteAction?t.onExecuteAction:Ia.onExecuteAction,e.prepareForExecution()&&n&&n(e)},t.prototype.internalAfterExecute=function(){var e=this.getRootObject();e instanceof ai&&e.updateActionsEnabledState()},t.prototype.getHref=function(){return""},t.prototype.getAriaRole=function(){var e=this.getAriaRoleFromEnum();return null!=e?e:"button"},t.prototype.getAriaRoleFromEnum=function(){switch(this.role){case qo.ActionRole.Button:return"button";case qo.ActionRole.Link:return"link";case qo.ActionRole.Menu:return"menu";case qo.ActionRole.MenuItem:return"menuitem";case qo.ActionRole.Tab:return"tab";default:return}},t.prototype.setupElementForAccessibility=function(e,t){void 0===t&&(t=!1),e.tabIndex=this.isEffectivelyEnabled()&&!this.isDesignMode()?0:-1,e.setAttribute("role",this.getAriaRole()),e instanceof HTMLButtonElement&&(e.disabled=!this.isEffectivelyEnabled()),this.isEffectivelyEnabled()?(e.removeAttribute("aria-disabled"),e.classList.add(this.hostConfig.makeCssClassName("ac-selectable"))):e.setAttribute("aria-disabled","true"),this.title?(e.setAttribute("aria-label",this.title),e.title=this.title):(e.removeAttribute("aria-label"),e.removeAttribute("title")),this.tooltip&&(t&&!this.title&&e.setAttribute("aria-label",this.tooltip),e.title=this.tooltip)},t.prototype.parse=function(t,n){return e.prototype.parse.call(this,t,n||new Ta)},t.prototype.render=function(){var e=this,t=document.createElement("button");t.type="button",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.onclick=function(t){e.isEffectivelyEnabled()&&(t.preventDefault(),t.cancelBubble=!0,e.execute())},this._renderedElement=t,this.renderButtonContent(),this.updateCssClasses(),this.setupElementForAccessibility(t)},t.prototype.execute=function(){this._actionCollection&&this._actionCollection.actionExecuted(this),this.raiseExecuteActionEvent(),this.internalAfterExecute()},t.prototype.prepareForExecution=function(){var e=this.getReferencedInputs(),t=this.internalValidateInputs(e);return t.length>0?(t[0].focus(),!1):(this.internalPrepareForExecution(e),!0)},t.prototype.remove=function(){return!!this._actionCollection&&this._actionCollection.removeAction(this)},t.prototype.getAllInputs=function(e){return[]},t.prototype.getAllActions=function(){return[this]},t.prototype.getResourceInformation=function(){return this.iconUrl?[{url:this.iconUrl,mimeType:"image"}]:[]},t.prototype.getActionById=function(e){return this.id===e?this:void 0},t.prototype.getReferencedInputs=function(){return this.internalGetReferencedInputs()},t.prototype.validateInputs=function(){return this.internalValidateInputs(this.getReferencedInputs())},t.prototype.updateEnabledState=function(){},t.prototype.isEffectivelyEnabled=function(){return this.isEnabled},Object.defineProperty(t.prototype,"isPrimary",{get:function(){return this.style===qo.ActionStyle.Positive},set:function(e){e?this.style=qo.ActionStyle.Positive:this.style===qo.ActionStyle.Positive&&(this.style=qo.ActionStyle.Default)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hostConfig",{get:function(){return this.parent?this.parent.hostConfig:Zo.defaultHostConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){this._state!==e&&(this._state=e,this.updateCssClasses())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFocusable",{get:function(){return this._isFocusable},set:function(e){this._isFocusable!==e&&(this._isFocusable=e,this.updateCssClasses())},enumerable:!1,configurable:!0}),t.titleProperty=new ei.StringProperty(ei.Versions.v1_0,"title"),t.iconUrlProperty=new ei.StringProperty(ei.Versions.v1_1,"iconUrl"),t.styleProperty=new ei.ValueSetProperty(ei.Versions.v1_2,"style",[{value:qo.ActionStyle.Default},{value:qo.ActionStyle.Positive},{value:qo.ActionStyle.Destructive}],qo.ActionStyle.Default),t.modeProperty=new ei.ValueSetProperty(ei.Versions.v1_5,"mode",[{value:qo.ActionMode.Primary},{value:qo.ActionMode.Secondary}],qo.ActionMode.Primary),t.tooltipProperty=new ei.StringProperty(ei.Versions.v1_5,"tooltip"),t.isEnabledProperty=new ei.BoolProperty(ei.Versions.v1_5,"isEnabled",!0),t.roleProperty=new ei.EnumProperty(ei.Versions.v1_6,"role",qo.ActionRole),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"title",void 0),Uo([(0,ei.property)(t.iconUrlProperty)],t.prototype,"iconUrl",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),Uo([(0,ei.property)(t.modeProperty)],t.prototype,"mode",void 0),Uo([(0,ei.property)(t.tooltipProperty)],t.prototype,"tooltip",void 0),Uo([(0,ei.property)(t.isEnabledProperty)],t.prototype,"isEnabled",void 0),Uo([(0,ei.property)(t.roleProperty)],t.prototype,"role",void 0),t}(Ko.CardObject);Bn.Action=$i;var Ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabledUnlessAssociatedInputsChange=!1,t._isPrepared=!1,t._areReferencedInputsDirty=!1,t}return $o(t,e),t.prototype.internalGetReferencedInputs=function(){var e={};if("none"!==this.associatedInputs){for(var t=this.parent,n=[];t;)n.push.apply(n,t.getAllInputs(!1)),t=t.parent;for(var r=0,o=n;r<o.length;r++){var i=o[r];i.id&&(e[i.id]=i)}}return e},t.prototype.internalPrepareForExecution=function(e){if(this._originalData?this._processedData=JSON.parse(JSON.stringify(this._originalData)):this._processedData={},this._processedData&&e)for(var t=0,n=Object.keys(e);t<n.length;t++){var r=e[n[t]];r.id&&r.isSet()&&(this._processedData[r.id]="string"==typeof r.value?r.value:r.value.toString())}this._isPrepared=!0},t.prototype.internalAfterExecute=function(){Xo.GlobalSettings.resetInputsDirtyStateAfterActionExecution&&this.resetReferencedInputsDirtyState()},t.prototype.resetReferencedInputsDirtyState=function(){var e=this.getReferencedInputs();if(this._areReferencedInputsDirty=!1,e)for(var t=0,n=Object.keys(e);t<n.length;t++){e[n[t]].resetDirtyState()}},t.prototype.updateEnabledState=function(){this._areReferencedInputsDirty=!1;var e=this.getReferencedInputs();if(e)for(var t=0,n=Object.keys(e);t<n.length;t++){if(e[n[t]].isDirty()){this._areReferencedInputsDirty=!0;break}}this.updateCssClasses(),this._renderedElement&&this.setupElementForAccessibility(this._renderedElement)},t.prototype.isEffectivelyEnabled=function(){var t=e.prototype.isEffectivelyEnabled.call(this);return this.disabledUnlessAssociatedInputsChange?t&&this._areReferencedInputsDirty:t},Object.defineProperty(t.prototype,"data",{get:function(){return this._isPrepared?this._processedData:this._originalData},set:function(e){this._originalData=e,this._isPrepared=!1},enumerable:!1,configurable:!0}),t.dataProperty=new ei.PropertyDefinition(ei.Versions.v1_0,"data"),t.associatedInputsProperty=new ei.CustomProperty(ei.Versions.v1_3,"associatedInputs",function(e,t,n,r){var o=n[t.name];if(void 0!==o&&"string"==typeof o)return"none"===o.toLowerCase()?"none":"auto"},function(e,t,n,r,o){o.serializeValue(n,t.name,r)}),t.disabledUnlessAssociatedInputsChangeProperty=new ei.BoolProperty(ei.Versions.v1_6,"disabledUnlessAssociatedInputsChange",!1),Uo([(0,ei.property)(t.dataProperty)],t.prototype,"_originalData",void 0),Uo([(0,ei.property)(t.associatedInputsProperty)],t.prototype,"associatedInputs",void 0),Uo([(0,ei.property)(t.disabledUnlessAssociatedInputsChangeProperty)],t.prototype,"disabledUnlessAssociatedInputsChange",void 0),t}($i);Bn.SubmitActionBase=Ui;var Ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.JsonTypeName="Action.Submit",t}(Ui),Gi=Bn.SubmitAction=Ji,qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t}(Ui);Bn.UniversalAction=qi;var Xi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.JsonTypeName="Action.Execute",t.verbProperty=new ei.StringProperty(ei.Versions.v1_4,"verb"),Uo([(0,ei.property)(t.verbProperty)],t.prototype,"verb",void 0),t}(qi),Yi=Bn.ExecuteAction=Xi,Zi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getJsonTypeName=function(){return t.JsonTypeName},Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!1},enumerable:!1,configurable:!0}),t.JsonTypeName="Data.Query",t.datasetProperty=new ei.StringProperty(ei.Versions.v1_6,"dataset"),t.filterProperty=new ei.StringProperty(ei.Versions.v1_6,"filter"),t.countProperty=new ei.NumProperty(ei.Versions.v1_6,"count"),t.skipProperty=new ei.NumProperty(ei.Versions.v1_6,"skip"),Uo([(0,ei.property)(t.datasetProperty)],t.prototype,"dataset",void 0),Uo([(0,ei.property)(t.filterProperty)],t.prototype,"filter",void 0),Uo([(0,ei.property)(t.countProperty)],t.prototype,"count",void 0),Uo([(0,ei.property)(t.skipProperty)],t.prototype,"skip",void 0),t}(qi);Bn.DataQuery=Zi;var Qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.prototype.getAriaRole=function(){var e=this.getAriaRoleFromEnum();return null!=e?e:"link"},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this.url||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("url"))},t.prototype.getHref=function(){return this.url},t.urlProperty=new ei.StringProperty(ei.Versions.v1_0,"url"),t.JsonTypeName="Action.OpenUrl",Uo([(0,ei.property)(t.urlProperty)],t.prototype,"url",void 0),t}($i),Ki=Bn.OpenUrlAction=Qi,ea=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.targetElements={},t}return $o(t,e),t.prototype.updateAriaControlsAttribute=function(){if(this.targetElements){var e=Object.keys(this.targetElements);this._renderedElement&&(e.length>0?this._renderedElement.setAttribute("aria-controls",e.join(" ")):this._renderedElement.removeAttribute("aria-controls"))}},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this.targetElements||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("targetElements"))},t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.prototype.render=function(){e.prototype.render.call(this),this.updateAriaControlsAttribute()},t.prototype.execute=function(){if(e.prototype.execute.call(this),this.parent)for(var t=0,n=Object.keys(this.targetElements);t<n.length;t++){var r=n[t],o=this.parent.getRootElement().getElementById(r);o&&("boolean"==typeof this.targetElements[r]?o.isVisible=this.targetElements[r]:o.isVisible=!o.isVisible)}},t.prototype.addTargetElement=function(e,t){void 0===t&&(t=void 0),this.targetElements[e]=t,this.updateAriaControlsAttribute()},t.prototype.removeTargetElement=function(e){delete this.targetElements[e],this.updateAriaControlsAttribute()},t.targetElementsProperty=new ei.CustomProperty(ei.Versions.v1_2,"targetElements",function(e,t,n,r){var o={};if(Array.isArray(n[t.name]))for(var i=0,a=n[t.name];i<a.length;i++){var s=a[i];if("string"==typeof s)o[s]=void 0;else if("object"==typeof s){var l=s.elementId;"string"==typeof l&&(o[l]=Yo.parseBool(s.isVisible))}}return o},function(e,t,n,r,o){for(var i=[],a=0,s=Object.keys(r);a<s.length;a++){var l=s[a];"boolean"==typeof r[l]?i.push({elementId:l,isVisible:r[l]}):i.push(l)}o.serializeArray(n,t.name,i)},{},function(e){return{}}),t.JsonTypeName="Action.ToggleVisibility",Uo([(0,ei.property)(t.targetElementsProperty)],t.prototype,"targetElements",void 0),t}($i),ta=Bn.ToggleVisibilityAction=ea,na=function(e){function t(t,n){var r=e.call(this,t,n,void 0,function(){return new Xo.StringWithSubstitutions})||this;return r.targetVersion=t,r.name=n,r}return $o(t,e),t.prototype.parse=function(e,t,n){var r=new Xo.StringWithSubstitutions;return r.set(Yo.parseString(t[this.name])),r},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,n.getOriginal())},t}(ei.PropertyDefinition),ra=function(e){function t(t,n){void 0===t&&(t=""),void 0===n&&(n="");var r=e.call(this)||this;return r.name=t,r.value=n,r}return $o(t,e),t.prototype.getSchemaKey=function(){return"HttpHeader"},t.prototype.getReferencedInputs=function(e,t){this._value.getReferencedInputs(e,t)},t.prototype.prepareForExecution=function(e){this._value.substituteInputValues(e,Xo.ContentTypes.applicationXWwwFormUrlencoded)},Object.defineProperty(t.prototype,"value",{get:function(){return this._value.get()},set:function(e){this._value.set(e)},enumerable:!1,configurable:!0}),t.nameProperty=new ei.StringProperty(ei.Versions.v1_0,"name"),t.valueProperty=new na(ei.Versions.v1_0,"value"),Uo([(0,ei.property)(t.nameProperty)],t.prototype,"name",void 0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"_value",void 0),t}(ei.SerializableObject);Bn.HttpHeader=ra;var oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._ignoreInputValidation=!1,t}return $o(t,e),t.prototype.internalGetReferencedInputs=function(){var e=this.parent?this.parent.getRootElement().getAllInputs():[],t={};this._url.getReferencedInputs(e,t);for(var n=0,r=this.headers;n<r.length;n++){r[n].getReferencedInputs(e,t)}return this._body.getReferencedInputs(e,t),t},t.prototype.internalPrepareForExecution=function(e){if(e){this._url.substituteInputValues(e,Xo.ContentTypes.applicationXWwwFormUrlencoded);for(var t=Xo.ContentTypes.applicationJson,n=0,r=this.headers;n<r.length;n++){var o=r[n];o.prepareForExecution(e),o.name&&"content-type"===o.name.toLowerCase()&&(t=o.value)}this._body.substituteInputValues(e,t)}},t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.prototype.internalValidateProperties=function(t){if(e.prototype.internalValidateProperties.call(this,t),this.url||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("url")),this.headers.length>0)for(var n=0,r=this.headers;n<r.length;n++){r[n].name||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.actionHttpHeadersMustHaveNameAndValue())}},Object.defineProperty(t.prototype,"ignoreInputValidation",{get:function(){return this._ignoreInputValidation},set:function(e){this._ignoreInputValidation=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._url.get()},set:function(e){this._url.set(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"body",{get:function(){return this._body.get()},set:function(e){this._body.set(e)},enumerable:!1,configurable:!0}),t.urlProperty=new na(ei.Versions.v1_0,"url"),t.bodyProperty=new na(ei.Versions.v1_0,"body"),t.methodProperty=new ei.StringProperty(ei.Versions.v1_0,"method"),t.headersProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_0,"headers",ra),t.ignoreInputValidationProperty=new ei.BoolProperty(ei.Versions.v1_3,"ignoreInputValidation",!1),t.JsonTypeName="Action.Http",Uo([(0,ei.property)(t.urlProperty)],t.prototype,"_url",void 0),Uo([(0,ei.property)(t.bodyProperty)],t.prototype,"_body",void 0),Uo([(0,ei.property)(t.methodProperty)],t.prototype,"method",void 0),Uo([(0,ei.property)(t.headersProperty)],t.prototype,"headers",void 0),Uo([(0,ei.property)(t.ignoreInputValidationProperty)],t.prototype,"_ignoreInputValidation",void 0),t}($i);Bn.HttpAction=oa;var ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.card=new _a,t}return $o(t,e),t.prototype.updateCssClasses=function(){if(e.prototype.updateCssClasses.call(this),this.renderedElement){var t=this.parent?this.parent.hostConfig:Zo.defaultHostConfig;this.renderedElement.classList.add(t.makeCssClassName("expandable")),this.renderedElement.setAttribute("aria-expanded",(1===this.state).toString())}},t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n);var r=t.card;r?this.card.parse(r,n):n.logParseEvent(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.showCardMustHaveCard())},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n),this.card&&n.serializeValue(t,"card",this.card.toJSON(n))},t.prototype.raiseExecuteActionEvent=function(){this.hostConfig.actions.showCard.actionMode===qo.ShowCardActionMode.Popup&&e.prototype.raiseExecuteActionEvent.call(this)},t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this),this.card.releaseDOMResources()},t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this.card.internalValidateProperties(t)},t.prototype.setParent=function(t){e.prototype.setParent.call(this,t),this.card.setParent(t)},t.prototype.getAllInputs=function(e){return void 0===e&&(e=!0),this.card.getAllInputs(e)},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return t.push.apply(t,this.card.getAllActions()),t},t.prototype.getResourceInformation=function(){var t=e.prototype.getResourceInformation.call(this);return t.push.apply(t,this.card.getResourceInformation()),t},t.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);return n||(n=this.card.getActionById(t)),n},t.JsonTypeName="Action.ShowCard",t}($i),aa=Bn.ShowCardAction=ia,sa=function(e){function t(t){var n=e.call(this)||this;return n._actions=t,n.title=ni.Strings.defaults.overflowButtonText(),n.tooltip=ni.Strings.defaults.overflowButtonTooltip(),n}return $o(t,e),t.prototype.getActions=function(){return this._actions},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return t.push.apply(t,this._actions),t},t.prototype.getJsonTypeName=function(){return ia.JsonTypeName},t.prototype.execute=function(){var e,t,n,r,o,i=this;if((t=this,n=this.renderedElement,r=t.parent?t.parent.getRootElement():void 0,!(void 0!==(o=r&&r.onDisplayOverflowActionMenu?r.onDisplayOverflowActionMenu:Ia.onDisplayOverflowActionMenu)&&o(t.getActions(),n)))&&this.renderedElement){var a=new ri.PopupMenu;a.hostConfig=this.hostConfig;for(var s=function(t){var n=new ri.MenuItem(t.toString(),null!==(e=l._actions[t].title)&&void 0!==e?e:"");n.isEnabled=l._actions[t].isEnabled,n.onClick=function(){var e=i._actions[t];a.closePopup(!1),e.isEnabled&&e.execute()},a.items.add(n)},l=this,c=0;c<this._actions.length;c++)s(c);a.onClose=function(){var e;null===(e=i.renderedElement)||void 0===e||e.setAttribute("aria-expanded","false")},this.renderedElement.setAttribute("aria-expanded","true"),a.popup(this.renderedElement)}},t.prototype.setupElementForAccessibility=function(t,n){void 0===n&&(n=!1),e.prototype.setupElementForAccessibility.call(this,t,n),t.setAttribute("aria-label",ni.Strings.defaults.overflowButtonTooltip()),t.setAttribute("aria-expanded","false")},t.JsonTypeName="Action.Overflow",t}($i),la=function(){function e(e){this._items=[],this._renderedActions=[],this._owner=e}return e.prototype.isActionAllowed=function(e){var t=this._owner.getForbiddenActionTypes();if(t)for(var n=0,r=t;n<r.length;n++){var o=r[n];if(e.constructor===o)return!1}return!0},e.prototype.refreshContainer=function(){if(oi(this._actionCardContainer),this._actionCard){this._actionCardContainer.style.marginTop=this.renderedActionCount>0?this._owner.hostConfig.actions.showCard.inlineTopMargin+"px":"0px";var e=this._owner.getEffectivePadding();this._owner.getImmediateSurroundingPadding(e);var t=this._owner.hostConfig.paddingDefinitionToSpacingDefinition(e);this._actionCard&&(this._actionCard.style.paddingLeft=t.left+"px",this._actionCard.style.paddingRight=t.right+"px",this._actionCard.style.marginLeft="-"+t.left+"px",this._actionCard.style.marginRight="-"+t.right+"px",0===t.bottom||this._owner.isDesignMode()||(this._actionCard.style.paddingBottom=t.bottom+"px",this._actionCard.style.marginBottom="-"+t.bottom+"px"),Yo.appendChild(this._actionCardContainer,this._actionCard))}else this._actionCardContainer.style.marginTop="0px"},e.prototype.layoutChanged=function(){this._owner.getRootElement().updateLayout()},e.prototype.showActionCard=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),e.card.suppressStyle=t;var r=e.card.renderedElement&&!this._owner.isDesignMode()?e.card.renderedElement:e.card.render();this._actionCard=r,this._expandedAction=e,this.refreshContainer(),n&&(this.layoutChanged(),ba(e,!0))},e.prototype.collapseExpandedAction=function(){for(var e=0,t=this._renderedActions;e<t.length;e++){t[e].state=0}var n=this._expandedAction;this._expandedAction=void 0,this._actionCard=void 0,this.refreshContainer(),n&&(this.layoutChanged(),ba(n,!1))},e.prototype.expandShowCardAction=function(e,t){for(var n=this,r=!1,o=0,i=this._renderedActions;o<i.length;o++){var a=i[o];this._owner.hostConfig.actions.actionsOrientation==qo.Orientation.Horizontal&&r&&(a.isFocusable=!1),a!==e?a.state=2:(a.state=1,r=!0,a.renderedElement&&(a.renderedElement.onblur=function(e){for(var t=0,r=n._renderedActions;t<r.length;t++){r[t].isFocusable=!0}}))}this.showActionCard(e,!(this._owner.isAtTheVeryLeft()&&this._owner.isAtTheVeryRight()),t)},e.prototype.releaseDOMResources=function(){for(var e=0,t=this._renderedActions;e<t.length;e++){t[e].releaseDOMResources()}},e.prototype.actionExecuted=function(e){e instanceof ia?e===this._expandedAction?this.collapseExpandedAction():this._owner.hostConfig.actions.showCard.actionMode===qo.ShowCardActionMode.Inline&&this.expandShowCardAction(e,!0):this.collapseExpandedAction()},e.prototype.parse=function(e,t){if(this.clear(),Array.isArray(e))for(var n=0,r=e;n<r.length;n++){var o=r[n],i=[];this._owner instanceof wa&&(i=this._owner.getForbiddenActionNames());var a=t.parseAction(this._owner,o,i,!this._owner.isDesignMode());a&&this.addAction(a)}},e.prototype.toJSON=function(e,t,n){n.serializeArray(e,t,this._items)},e.prototype.getActionAt=function(e){return this._items[e]},e.prototype.getActionCount=function(){return this._items.length},e.prototype.getActionById=function(e){for(var t=void 0,n=0,r=this._items;n<r.length;n++){if(t=r[n].getActionById(e))break}return t},e.prototype.validateProperties=function(e){this._owner.hostConfig.actions.maxActions&&this._items.length>this._owner.hostConfig.actions.maxActions&&e.addFailure(this._owner,qo.ValidationEvent.TooManyActions,ni.Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions)),this._items.length>0&&!this._owner.hostConfig.supportsInteractivity&&e.addFailure(this._owner,qo.ValidationEvent.InteractivityNotAllowed,ni.Strings.errors.interactivityNotAllowed());for(var t=0,n=this._items;t<n.length;t++){var r=n[t];this.isActionAllowed(r)||e.addFailure(this._owner,qo.ValidationEvent.ActionTypeNotAllowed,ni.Strings.errors.actionTypeNotAllowed(r.getJsonTypeName())),r.internalValidateProperties(e)}},e.prototype.render=function(e){var t=this._owner.hostConfig;if(t.supportsInteractivity){var n=document.createElement("div"),r=t.actions.maxActions?Math.min(t.actions.maxActions,this._items.length):this._items.length;if(this._actionCardContainer=document.createElement("div"),this._renderedActions=[],t.actions.preExpandSingleShowCardAction&&1===r&&this._items[0]instanceof ia&&this.isActionAllowed(this._items[0]))this.showActionCard(this._items[0],!0),this._renderedActions.push(this._items[0]);else{var o=document.createElement("div");if(o.className=t.makeCssClassName("ac-actionSet"),o.style.display="flex",e===qo.Orientation.Horizontal)if(o.style.flexDirection="row",this._owner.horizontalAlignment&&t.actions.actionAlignment!==qo.ActionAlignment.Stretch)switch(this._owner.horizontalAlignment){case qo.HorizontalAlignment.Center:o.style.justifyContent="center";break;case qo.HorizontalAlignment.Right:o.style.justifyContent="flex-end";break;default:o.style.justifyContent="flex-start"}else switch(t.actions.actionAlignment){case qo.ActionAlignment.Center:o.style.justifyContent="center";break;case qo.ActionAlignment.Right:o.style.justifyContent="flex-end";break;default:o.style.justifyContent="flex-start"}else if(o.style.flexDirection="column",this._owner.horizontalAlignment&&t.actions.actionAlignment!==qo.ActionAlignment.Stretch)switch(this._owner.horizontalAlignment){case qo.HorizontalAlignment.Center:o.style.alignItems="center";break;case qo.HorizontalAlignment.Right:o.style.alignItems="flex-end";break;default:o.style.alignItems="flex-start"}else switch(t.actions.actionAlignment){case qo.ActionAlignment.Center:o.style.alignItems="center";break;case qo.ActionAlignment.Right:o.style.alignItems="flex-end";break;case qo.ActionAlignment.Stretch:o.style.alignItems="stretch";break;default:o.style.alignItems="flex-start"}var i=this._items.filter(this.isActionAllowed.bind(this)),a=[],s=[];if(this._owner.isDesignMode())a=i;else{i.forEach(function(e){return e.mode===qo.ActionMode.Secondary?s.push(e):a.push(e)});var l=a.splice(t.actions.maxActions);Xo.GlobalSettings.allowMoreThanMaxActionsInOverflowMenu&&s.push.apply(s,l);var c=!0;if(s.length>0){this._overflowAction||(this._overflowAction=new sa(s),this._overflowAction.setParent(this._owner),this._overflowAction._actionCollection=this);var u=this._owner instanceof Ia&&!this._owner.parent;c=!function(e,t){var n=e.parent?e.parent.getRootElement():void 0,r=n&&n.onRenderOverflowActions?n.onRenderOverflowActions:Ia.onRenderOverflowActions;return void 0!==r&&r(e.getActions(),t)}(this._overflowAction,u)}this._overflowAction&&c&&a.push(this._overflowAction)}for(var d=0;d<a.length;d++){var p=a[d];if(p.render(),p.renderedElement&&(t.actions.actionsOrientation===qo.Orientation.Horizontal&&t.actions.actionAlignment===qo.ActionAlignment.Stretch?p.renderedElement.style.flex="0 1 100%":p.renderedElement.style.flex="0 1 auto",o.appendChild(p.renderedElement),this._renderedActions.push(p),d<a.length-1&&t.actions.buttonSpacing>0)){var h=document.createElement("div");e===qo.Orientation.Horizontal?(h.style.flex="0 0 auto",h.style.width=t.actions.buttonSpacing+"px"):h.style.height=t.actions.buttonSpacing+"px",Yo.appendChild(o,h)}}var m=document.createElement("div");m.style.overflow="hidden",m.appendChild(o),Yo.appendChild(n,m)}Yo.appendChild(n,this._actionCardContainer);for(var f=0,g=this._renderedActions;f<g.length;f++){var y=g[f];if(1===y.state){this.expandShowCardAction(y,!1);break}}return this._renderedActions.length>0?n:void 0}},e.prototype.addAction=function(e){if(!e)throw new Error("The action parameter cannot be null.");if(e.parent&&e.parent!==this._owner||!(this._items.indexOf(e)<0))throw new Error(ni.Strings.errors.actionAlreadyParented());this._items.push(e),e.parent||e.setParent(this._owner),e._actionCollection=this},e.prototype.removeAction=function(e){this.expandedAction&&this._expandedAction===e&&this.collapseExpandedAction();var t=this._items.indexOf(e);if(t>=0){this._items.splice(t,1),e.setParent(void 0),e._actionCollection=void 0;for(var n=0;n<this._renderedActions.length;n++)if(this._renderedActions[n]===e){this._renderedActions.splice(n,1);break}return!0}return!1},e.prototype.clear=function(){this._items=[],this._renderedActions=[],this._expandedAction=void 0},e.prototype.getAllInputs=function(e){void 0===e&&(e=!0);var t=[];if(e)for(var n=0,r=this._items;n<r.length;n++){var o=r[n];t.push.apply(t,o.getAllInputs())}return t},e.prototype.getResourceInformation=function(){for(var e=[],t=0,n=this._items;t<n.length;t++){var r=n[t];e.push.apply(e,r.getResourceInformation())}return e},Object.defineProperty(e.prototype,"renderedActionCount",{get:function(){return this._renderedActions.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expandedAction",{get:function(){return this._expandedAction},enumerable:!1,configurable:!0}),e}(),ca=function(e){function t(){var t=e.call(this)||this;return t._actionCollection=new la(t),t}return $o(t,e),t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n),this._actionCollection.parse(t.actions,n)},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n),this._actionCollection.toJSON(t,"actions",n)},t.prototype.internalRender=function(){return this._actionCollection.render(void 0!==this.orientation?this.orientation:this.hostConfig.actions.actionsOrientation)},t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this),this._actionCollection.releaseDOMResources()},t.prototype.isBleedingAtBottom=function(){return 0===this._actionCollection.renderedActionCount?e.prototype.isBleedingAtBottom.call(this):1===this._actionCollection.getActionCount()?void 0!==this._actionCollection.expandedAction&&!this.hostConfig.actions.preExpandSingleShowCardAction:void 0!==this._actionCollection.expandedAction},t.prototype.getJsonTypeName=function(){return"ActionSet"},t.prototype.getActionCount=function(){return this._actionCollection.getActionCount()},t.prototype.getActionAt=function(t){return t>=0&&t<this.getActionCount()?this._actionCollection.getActionAt(t):e.prototype.getActionAt.call(this,t)},t.prototype.getActionById=function(t){var n=this._actionCollection.getActionById(t);return n||e.prototype.getActionById.call(this,t)},t.prototype.getAllActions=function(){for(var t=e.prototype.getAllActions.call(this),n=0;n<this.getActionCount();n++){var r=this.getActionAt(n);r&&t.push(r)}return t},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this._actionCollection.validateProperties(t)},t.prototype.addAction=function(e){this._actionCollection.addAction(e)},t.prototype.getAllInputs=function(e){return void 0===e&&(e=!0),e?this._actionCollection.getAllInputs():[]},t.prototype.getResourceInformation=function(){return this._actionCollection.getResourceInformation()},t.prototype.findDOMNodeOwner=function(t){for(var n=void 0,r=0;r<this.getActionCount();r++){var o=this.getActionAt(r);if(o&&(n=o.findDOMNodeOwner(t)))return n}return e.prototype.findDOMNodeOwner.call(this,t)},t.prototype.getElementById=function(t){var n=e.prototype.getElementById.call(this,t);return n||(n=this.getElementByIdFromAction(t)),n},Object.defineProperty(t.prototype,"isInteractive",{get:function(){return!0},enumerable:!1,configurable:!0}),t.orientationProperty=new ei.EnumProperty(ei.Versions.v1_1,"orientation",qo.Orientation),Uo([(0,ei.property)(t.orientationProperty)],t.prototype,"orientation",void 0),t}(ai);Bn.ActionSet=ca;var ua=function(e){function t(t,n,r,o){var i=e.call(this,t,n,[{value:qo.ContainerStyle.Default},{value:qo.ContainerStyle.Emphasis},{targetVersion:ei.Versions.v1_2,value:qo.ContainerStyle.Accent},{targetVersion:ei.Versions.v1_2,value:qo.ContainerStyle.Good},{targetVersion:ei.Versions.v1_2,value:qo.ContainerStyle.Attention},{targetVersion:ei.Versions.v1_2,value:qo.ContainerStyle.Warning}],r,o)||this;return i.targetVersion=t,i.name=n,i.defaultValue=r,i.onGetInitialValue=o,i}return $o(t,e),t}(ei.ValueSetProperty);Bn.ContainerStyleProperty=ua;var da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),Object.defineProperty(t.prototype,"style",{get:function(){if(this.allowCustomStyle){var e=this.getValue(t.styleProperty);if(e&&this.hostConfig.containerStyles.getStyleByName(e))return e}},set:function(e){this.setValue(t.styleProperty,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowCustomStyle",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasExplicitStyle",{get:function(){return void 0!==this.getValue(t.styleProperty)},enumerable:!1,configurable:!0}),t.prototype.applyBorder=function(){},t.prototype.applyBackground=function(){if(this.renderedElement){var e=this.hostConfig.containerStyles.getStyleByName(this.style,this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));if(e.backgroundColor){var t=Yo.stringToCssColor(e.backgroundColor);t&&(this.renderedElement.style.backgroundColor=t)}}},t.prototype.applyPadding=function(){if(e.prototype.applyPadding.call(this),this.renderedElement){var t=new Xo.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 n=new Xo.PaddingDefinition;this.getImmediateSurroundingPadding(n);var r=this.hostConfig.paddingDefinitionToSpacingDefinition(n);this.renderedElement.style.marginRight="-"+r.right+"px",this.renderedElement.style.marginLeft="-"+r.left+"px",this.isDesignMode()||(this.renderedElement.style.marginTop="-"+r.top+"px",this.renderedElement.style.marginBottom="-"+r.bottom+"px"),this.separatorElement&&this.separatorOrientation===qo.Orientation.Horizontal&&(this.separatorElement.style.marginLeft="-"+r.left+"px",this.separatorElement.style.marginRight="-"+r.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.separatorOrientation===qo.Orientation.Horizontal&&(this.separatorElement.style.marginRight="0",this.separatorElement.style.marginLeft="0")}},t.prototype.getHasBackground=function(e){void 0===e&&(e=!1);for(var n=this.parent;n;){var r=!1;if(r=!e&&(n instanceof ma&&n.backgroundImage.isValid()),n instanceof t&&this.hasExplicitStyle&&(n.getEffectiveStyle()!==this.getEffectiveStyle()||r))return!0;n=n.parent}return!1},t.prototype.getDefaultPadding=function(){return this.getHasBackground()||this.getHasBorder()?new Xo.PaddingDefinition(qo.Spacing.Padding,qo.Spacing.Padding,qo.Spacing.Padding,qo.Spacing.Padding):e.prototype.getDefaultPadding.call(this)},t.prototype.internalValidateProperties=function(n){e.prototype.internalValidateProperties.call(this,n);var r=this.getValue(t.styleProperty);void 0!==r&&(this.hostConfig.containerStyles.getStyleByName(r)||n.addFailure(this,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidPropertyValue(r,"style")))},t.prototype.render=function(){var t=e.prototype.render.call(this);return t&&this.getHasBackground()&&this.applyBackground(),this.applyBorder(),t},t.prototype.getEffectiveStyle=function(){var t=this.style;return t||e.prototype.getEffectiveStyle.call(this)},t.styleProperty=new ua(ei.Versions.v1_0,"style"),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",null),t}(yi);Bn.StylableCardElementContainer=da;var pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._bleed=!1,t}return $o(t,e),t.prototype.adjustRenderedElementSize=function(t){e.prototype.adjustRenderedElementSize.call(this,t),this.minPixelHeight&&(t.style.minHeight=this.minPixelHeight+"px")},t.prototype.getHasExpandedAction=function(){return!1},t.prototype.getBleed=function(){return this._bleed},t.prototype.setBleed=function(e){this._bleed=e},Object.defineProperty(t.prototype,"renderedActionCount",{get:function(){return 0},enumerable:!1,configurable:!0}),t.prototype.isBleeding=function(){return(this.getHasBackground()||this.hostConfig.alwaysAllowBleed)&&this.getBleed()},t.bleedProperty=new ei.BoolProperty(ei.Versions.v1_2,"bleed",!1),t.minHeightProperty=new ei.PixelSizeProperty(ei.Versions.v1_2,"minHeight"),Uo([(0,ei.property)(t.bleedProperty)],t.prototype,"_bleed",void 0),Uo([(0,ei.property)(t.minHeightProperty)],t.prototype,"minPixelHeight",void 0),t}(da);Bn.ContainerBase=pa;var ha=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"BackgroundImage"},t.prototype.internalParse=function(t,n){if("string"!=typeof t)return e.prototype.internalParse.call(this,t,n);this.resetDefaultValues(),this.url=t},t.prototype.apply=function(e){if(this.url&&e.renderedElement){switch(e.renderedElement.style.backgroundImage="url('"+e.preProcessPropertyValue(t.urlProperty,this.url)+"')",this.fillMode){case qo.FillMode.Repeat:e.renderedElement.style.backgroundRepeat="repeat";break;case qo.FillMode.RepeatHorizontally:e.renderedElement.style.backgroundRepeat="repeat-x";break;case qo.FillMode.RepeatVertically:e.renderedElement.style.backgroundRepeat="repeat-y";break;case qo.FillMode.Cover:default:e.renderedElement.style.backgroundRepeat="no-repeat",e.renderedElement.style.backgroundSize="cover"}switch(this.horizontalAlignment){case qo.HorizontalAlignment.Left:break;case qo.HorizontalAlignment.Center:e.renderedElement.style.backgroundPositionX="center";break;case qo.HorizontalAlignment.Right:e.renderedElement.style.backgroundPositionX="right"}switch(this.verticalAlignment){case qo.VerticalAlignment.Top:break;case qo.VerticalAlignment.Center:e.renderedElement.style.backgroundPositionY="center";break;case qo.VerticalAlignment.Bottom:e.renderedElement.style.backgroundPositionY="bottom"}}},t.prototype.isValid=function(){return!!this.url},t.urlProperty=new ei.StringProperty(ei.Versions.v1_0,"url"),t.fillModeProperty=new ei.EnumProperty(ei.Versions.v1_2,"fillMode",qo.FillMode,qo.FillMode.Cover),t.horizontalAlignmentProperty=new ei.EnumProperty(ei.Versions.v1_2,"horizontalAlignment",qo.HorizontalAlignment,qo.HorizontalAlignment.Left),t.verticalAlignmentProperty=new ei.EnumProperty(ei.Versions.v1_2,"verticalAlignment",qo.VerticalAlignment,qo.VerticalAlignment.Top),Uo([(0,ei.property)(t.urlProperty)],t.prototype,"url",void 0),Uo([(0,ei.property)(t.fillModeProperty)],t.prototype,"fillMode",void 0),Uo([(0,ei.property)(t.horizontalAlignmentProperty)],t.prototype,"horizontalAlignment",void 0),Uo([(0,ei.property)(t.verticalAlignmentProperty)],t.prototype,"verticalAlignment",void 0),t}(ei.SerializableObject);Bn.BackgroundImage=ha;var ma=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._items=[],t._renderedItems=[],t}return $o(t,e),Object.defineProperty(t.prototype,"backgroundImage",{get:function(){return this.getValue(t.backgroundImageProperty)},enumerable:!1,configurable:!0}),t.prototype.insertItemAt=function(e,t,n){if(e.parent&&!n)throw new Error(ni.Strings.errors.elementAlreadyParented());if(!e.isStandalone)throw new Error(ni.Strings.errors.elementTypeNotStandalone(e.getJsonTypeName()));t<0||t>=this._items.length?this._items.push(e):this._items.splice(t,0,e),e.setParent(this)},t.prototype.getItemsCollectionPropertyName=function(){return"items"},t.prototype.applyBackground=function(){this.backgroundImage.isValid()&&this.renderedElement&&this.backgroundImage.apply(this),e.prototype.applyBackground.call(this)},t.prototype.applyRTL=function(e){void 0!==this.rtl&&(e.dir=this.rtl?"rtl":"ltr")},t.prototype.internalRender=function(){this._renderedItems=[];var e=this.hostConfig,t=document.createElement("div");switch(this.applyRTL(t),t.classList.add(e.makeCssClassName("ac-container")),t.style.display="flex",t.style.flexDirection="column",Xo.GlobalSettings.useAdvancedCardBottomTruncation&&(t.style.minHeight="-webkit-min-content"),this.getEffectiveVerticalContentAlignment()){case qo.VerticalAlignment.Center:t.style.justifyContent="center";break;case qo.VerticalAlignment.Bottom:t.style.justifyContent="flex-end";break;default:t.style.justifyContent="flex-start"}if(this._items.length>0)for(var n=0,r=this._items;n<r.length;n++){var o=r[n],i=this.isElementAllowed(o)?o.render():void 0;i&&(this._renderedItems.length>0&&o.separatorElement&&(o.separatorElement.style.flex="0 0 auto",Yo.appendChild(t,o.separatorElement)),Yo.appendChild(t,i),this._renderedItems.push(o))}else if(this.isDesignMode()){var a=this.createPlaceholderElement();a.style.width="100%",a.style.height="100%",t.appendChild(a)}return t},t.prototype.truncateOverflow=function(e){if(this.renderedElement){for(var t=this.renderedElement.offsetTop+e+1,n=function(e){var r=e.renderedElement;if(r)switch(Yo.getFitStatus(r,t)){case qo.ContainerFitStatus.FullyInContainer:e.resetOverflow()&&n(e);break;case qo.ContainerFitStatus.Overflowing:var o=t-r.offsetTop;e.handleOverflow(o);break;case qo.ContainerFitStatus.FullyOutOfContainer:e.handleOverflow(0)}},r=0,o=this._items;r<o.length;r++){var i=o[r];n(i)}return!0}return!1},t.prototype.undoOverflowTruncation=function(){for(var e=0,t=this._items;e<t.length;e++){t[e].resetOverflow()}},t.prototype.getHasBackground=function(t){return void 0===t&&(t=!1),!t&&this.backgroundImage.isValid()||e.prototype.getHasBackground.call(this,t)},t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n),this.clear(),this.setShouldFallback(!1);var r=t[this.getItemsCollectionPropertyName()];if(Array.isArray(r))for(var o=0,i=r;o<i.length;o++){var a=i[o],s=n.parseElement(this,a,this.forbiddenChildElements(),!this.isDesignMode());s&&this.insertItemAt(s,-1,!0)}},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n);var r=this.getItemsCollectionPropertyName();n.serializeArray(t,r,this._items)},Object.defineProperty(t.prototype,"isSelectable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getEffectivePadding=function(){return Xo.GlobalSettings.removePaddingFromContainersWithBackgroundImage&&!this.getHasBackground(!0)?new Xo.PaddingDefinition:e.prototype.getEffectivePadding.call(this)},t.prototype.getEffectiveVerticalContentAlignment=function(){if(void 0!==this.verticalContentAlignment)return this.verticalContentAlignment;var e=this.getParentContainer();return e?e.getEffectiveVerticalContentAlignment():qo.VerticalAlignment.Top},t.prototype.getItemCount=function(){return this._items.length},t.prototype.getItemAt=function(e){return this._items[e]},t.prototype.getFirstVisibleRenderedItem=function(){if(this.renderedElement&&this._renderedItems&&this._renderedItems.length>0)for(var e=0,t=this._renderedItems;e<t.length;e++){var n=t[e];if(n.isVisible)return n}},t.prototype.getLastVisibleRenderedItem=function(){if(this.renderedElement&&this._renderedItems&&this._renderedItems.length>0)for(var e=this._renderedItems.length-1;e>=0;e--)if(this._renderedItems[e].isVisible)return this._renderedItems[e]},t.prototype.getJsonTypeName=function(){return"Container"},t.prototype.isFirstElement=function(e){for(var t=this.isDesignMode(),n=0,r=this._items;n<r.length;n++){var o=r[n];if(o.isVisible||t)return o===e}return!1},t.prototype.isLastElement=function(e){for(var t=this.isDesignMode(),n=this._items.length-1;n>=0;n--)if(this._items[n].isVisible||t)return this._items[n]===e;return!1},t.prototype.isRtl=function(){if(void 0!==this.rtl)return this.rtl;var e=this.getParentContainer();return!!e&&e.isRtl()},t.prototype.isBleedingAtTop=function(){var e=this.getFirstVisibleRenderedItem();return this.isBleeding()||!!e&&e.isBleedingAtTop()},t.prototype.isBleedingAtBottom=function(){var e=this.getLastVisibleRenderedItem();return this.isBleeding()||!!e&&(e.isBleedingAtBottom()&&e.getEffectiveStyle()===this.getEffectiveStyle())},t.prototype.indexOf=function(e){return this._items.indexOf(e)},t.prototype.addItem=function(e){this.insertItemAt(e,-1,!1)},t.prototype.insertItemBefore=function(e,t){this.insertItemAt(e,this._items.indexOf(t),!1)},t.prototype.insertItemAfter=function(e,t){this.insertItemAt(e,this._items.indexOf(t)+1,!1)},t.prototype.removeItem=function(e){var t=this._items.indexOf(e);return t>=0&&(this._items.splice(t,1),e.setParent(void 0),this.updateLayout(),!0)},t.prototype.clear=function(){this._items=[],this._renderedItems=[]},t.prototype.getResourceInformation=function(){var t=e.prototype.getResourceInformation.call(this);return this.backgroundImage.isValid()&&t.push({url:this.backgroundImage.url,mimeType:"image"}),t},t.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);if(!n&&(this.selectAction&&(n=this.selectAction.getActionById(t)),!n))for(var r=0,o=this._items;r<o.length;r++){if(n=o[r].getActionById(t))break}return n},Object.defineProperty(t.prototype,"padding",{get:function(){return this.getPadding()},set:function(e){this.setPadding(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectAction",{get:function(){return this._selectAction},set:function(e){this._selectAction=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bleed",{get:function(){return this.getBleed()},set:function(e){this.setBleed(e)},enumerable:!1,configurable:!0}),t.backgroundImageProperty=new ei.SerializableObjectProperty(ei.Versions.v1_0,"backgroundImage",ha),t.verticalContentAlignmentProperty=new ei.EnumProperty(ei.Versions.v1_1,"verticalContentAlignment",qo.VerticalAlignment),t.rtlProperty=new ei.BoolProperty(ei.Versions.v1_0,"rtl"),Uo([(0,ei.property)(t.backgroundImageProperty)],t.prototype,"backgroundImage",null),Uo([(0,ei.property)(t.verticalContentAlignmentProperty)],t.prototype,"verticalContentAlignment",void 0),Uo([(0,ei.property)(t.rtlProperty)],t.prototype,"rtl",void 0),t}(pa);Bn.Container=ma;var fa=function(e){function t(t){void 0===t&&(t="stretch");var n=e.call(this)||this;return n.width="stretch",n._computedWeight=0,n.width=t,n}return $o(t,e),t.prototype.adjustRenderedElementSize=function(e){this.isDesignMode()?(e.style.minWidth="20px",e.style.minHeight=(this.minPixelHeight?Math.max(this.minPixelHeight,20):20)+"px"):(e.style.minWidth="0",this.minPixelHeight&&(e.style.minHeight=this.minPixelHeight+"px")),"auto"===this.width?e.style.flex="0 1 auto":"stretch"===this.width?e.style.flex="1 1 50px":this.width instanceof Xo.SizeAndUnit&&(this.width.unit===qo.SizeUnit.Pixel?(e.style.flex="0 0 auto",e.style.width=this.width.physicalSize+"px"):e.style.flex="1 1 "+(this._computedWeight>0?this._computedWeight:this.width.physicalSize)+"%")},t.prototype.shouldSerialize=function(e){return!0},Object.defineProperty(t.prototype,"separatorOrientation",{get:function(){return qo.Orientation.Vertical},enumerable:!1,configurable:!0}),t.prototype.getJsonTypeName=function(){return"Column"},Object.defineProperty(t.prototype,"hasVisibleSeparator",{get:function(){return!!(this.parent&&this.parent instanceof ga)&&(void 0!==this.separatorElement&&!this.parent.isLeftMostElement(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!1},enumerable:!1,configurable:!0}),t.widthProperty=new ei.CustomProperty(ei.Versions.v1_0,"width",function(e,t,n,r){var o=t.defaultValue,i=n[t.name],a=!1;if("number"!=typeof i||isNaN(i))if("auto"===i||"stretch"===i)o=i;else if("string"==typeof i)try{(o=Xo.SizeAndUnit.parse(i)).unit===qo.SizeUnit.Pixel&&t.targetVersion.compareTo(r.targetVersion)>0&&(a=!0)}catch(s){a=!0}else a=!0;else o=new Xo.SizeAndUnit(i,qo.SizeUnit.Weight);return a&&(r.logParseEvent(e,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidColumnWidth(i)),o="auto"),o},function(e,t,n,r,o){r instanceof Xo.SizeAndUnit?r.unit===qo.SizeUnit.Pixel?o.serializeValue(n,"width",r.physicalSize+"px"):o.serializeNumber(n,"width",r.physicalSize):o.serializeValue(n,"width",r)},"stretch"),Uo([(0,ei.property)(t.widthProperty)],t.prototype,"width",void 0),t}(ma);Bn.Column=fa;var ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._columns=[],t}return $o(t,e),t.prototype.createColumnInstance=function(e,t){return t.parseCardObject(this,e,[],!this.isDesignMode(),function(e){return e&&"Column"!==e?void 0:new fa},function(e,n){t.logParseEvent(void 0,qo.ValidationEvent.ElementTypeNotAllowed,ni.Strings.errors.elementTypeNotAllowed(e))})},t.prototype.internalRender=function(){if(this._renderedColumns=[],this._columns.length>0){var e=this.hostConfig,t=document.createElement("div");switch(t.className=e.makeCssClassName("ac-columnSet"),t.style.display="flex",Xo.GlobalSettings.useAdvancedCardBottomTruncation&&(t.style.minHeight="-webkit-min-content"),this.getEffectiveHorizontalAlignment()){case qo.HorizontalAlignment.Center:t.style.justifyContent="center";break;case qo.HorizontalAlignment.Right:t.style.justifyContent="flex-end";break;default:t.style.justifyContent="flex-start"}for(var n=0,r=0,o=this._columns;r<o.length;r++){(s=o[r]).width instanceof Xo.SizeAndUnit&&s.width.unit===qo.SizeUnit.Weight&&(n+=s.width.physicalSize)}for(var i=0,a=this._columns;i<a.length;i++){var s;if((s=a[i]).width instanceof Xo.SizeAndUnit&&s.width.unit===qo.SizeUnit.Weight&&n>0){var l=100/n*s.width.physicalSize;s._computedWeight=l}var c=s.render();c&&(this._renderedColumns.length>0&&s.separatorElement&&(s.separatorElement.style.flex="0 0 auto",Yo.appendChild(t,s.separatorElement)),Yo.appendChild(t,c),this._renderedColumns.push(s))}return this._renderedColumns.length>0?t:void 0}},t.prototype.truncateOverflow=function(e){for(var t=0,n=this._columns;t<n.length;t++){n[t].handleOverflow(e)}return!0},t.prototype.undoOverflowTruncation=function(){for(var e=0,t=this._columns;e<t.length;e++){t[e].resetOverflow()}},Object.defineProperty(t.prototype,"isSelectable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n),this._columns=[],this._renderedColumns=[];var r=t.columns;if(Array.isArray(r))for(var o=0,i=r;o<i.length;o++){var a=i[o],s=this.createColumnInstance(a,n);s&&this._columns.push(s)}},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n),n.serializeArray(t,"columns",this._columns)},t.prototype.isFirstElement=function(e){for(var t=0,n=this._columns;t<n.length;t++){var r=n[t];if(r.isVisible)return r===e}return!1},t.prototype.isBleedingAtTop=function(){if(this.isBleeding())return!0;if(this._renderedColumns&&this._renderedColumns.length>0)for(var e=0,t=this._columns;e<t.length;e++){if(t[e].isBleedingAtTop())return!0}return!1},t.prototype.isBleedingAtBottom=function(){if(this.isBleeding())return!0;if(this._renderedColumns&&this._renderedColumns.length>0)for(var e=0,t=this._columns;e<t.length;e++){if(t[e].isBleedingAtBottom())return!0}return!1},t.prototype.getItemCount=function(){return this._columns.length},t.prototype.getFirstVisibleRenderedItem=function(){return this.renderedElement&&this._renderedColumns&&this._renderedColumns.length>0?this._renderedColumns[0]:void 0},t.prototype.getLastVisibleRenderedItem=function(){return this.renderedElement&&this._renderedColumns&&this._renderedColumns.length>0?this._renderedColumns[this._renderedColumns.length-1]:void 0},t.prototype.getColumnAt=function(e){return this._columns[e]},t.prototype.getItemAt=function(e){return this.getColumnAt(e)},t.prototype.getJsonTypeName=function(){return"ColumnSet"},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t);for(var n=0,r=0,o=0,i=this._columns;o<i.length;o++){var a=i[o];"number"==typeof a.width?n++:"stretch"===a.width&&r++}n>0&&r>0&&t.addFailure(this,qo.ValidationEvent.Hint,ni.Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet())},t.prototype.addColumn=function(e){if(e.parent)throw new Error(ni.Strings.errors.columnAlreadyBelongsToAnotherSet());this._columns.push(e),e.setParent(this)},t.prototype.removeItem=function(e){if(e instanceof fa){var t=this._columns.indexOf(e);if(t>=0)return this._columns.splice(t,1),e.setParent(void 0),this.updateLayout(),!0}return!1},t.prototype.indexOf=function(e){return e instanceof fa?this._columns.indexOf(e):-1},t.prototype.isLeftMostElement=function(e){return 0===this._columns.indexOf(e)},t.prototype.isRightMostElement=function(e){return this._columns.indexOf(e)===this._columns.length-1},t.prototype.isTopElement=function(e){return this._columns.indexOf(e)>=0},t.prototype.isBottomElement=function(e){return this._columns.indexOf(e)>=0},t.prototype.getActionById=function(e){for(var t=void 0,n=0,r=this._columns;n<r.length;n++){if(t=r[n].getActionById(e))break}return t},Object.defineProperty(t.prototype,"bleed",{get:function(){return this.getBleed()},set:function(e){this.setBleed(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this.getPadding()},set:function(e){this.setPadding(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectAction",{get:function(){return this._selectAction},set:function(e){this._selectAction=e},enumerable:!1,configurable:!0}),t}(pa);function ya(e){var t=e.getRootElement(),n=t&&t.onImageLoaded?t.onImageLoaded:Ia.onImageLoaded;n&&n(e)}function va(e,t,n){var r=e.getRootElement(),o=r&&r.onAnchorClicked?r.onAnchorClicked:Ia.onAnchorClicked;return void 0!==o&&o(e,t,n)}function ba(e,t){var n=e.parent?e.parent.getRootElement():void 0,r=n&&n.onInlineCardExpanded?n.onInlineCardExpanded:Ia.onInlineCardExpanded;r&&r(e,t)}function xa(e,t){void 0===t&&(t=!0);var n=e.getRootElement();t&&n.updateLayout();var r=n,o=r&&r.onElementVisibilityChanged?r.onElementVisibilityChanged:Ia.onElementVisibilityChanged;void 0!==o&&o(e)}function Ca(e,t){t?(e.readOnly=!0,e.required=!0):(e.readOnly=!1,e.required=!1)}Bn.ColumnSet=ga;var wa=function(e){function t(){var t=e.call(this)||this;return t._actionCollection=new la(t),t}return $o(t,e),t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n),this.parseActions(t,n)},t.prototype.parseActions=function(e,t){this._actionCollection.parse(e.actions,t)},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n),this._actionCollection.toJSON(t,"actions",n)},t.prototype.internalRender=function(){var t=e.prototype.internalRender.call(this);if(t){var n=this._actionCollection.render(this.hostConfig.actions.actionsOrientation);return n&&(Yo.appendChild(t,ii(this.hostConfig,{spacing:this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing)},qo.Orientation.Horizontal)),Yo.appendChild(t,n)),this.renderIfEmpty||t.children.length>0?t:void 0}},t.prototype.getHasExpandedAction=function(){return 0!==this.renderedActionCount&&(1===this.renderedActionCount?void 0!==this._actionCollection.expandedAction&&!this.hostConfig.actions.preExpandSingleShowCardAction:void 0!==this._actionCollection.expandedAction)},Object.defineProperty(t.prototype,"renderedActionCount",{get:function(){return this._actionCollection.renderedActionCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderIfEmpty",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this),this._actionCollection.releaseDOMResources()},t.prototype.getActionCount=function(){return this._actionCollection.getActionCount()},t.prototype.getActionAt=function(t){return t>=0&&t<this.getActionCount()?this._actionCollection.getActionAt(t):e.prototype.getActionAt.call(this,t)},t.prototype.getActionById=function(t){var n=this._actionCollection.getActionById(t);return n||e.prototype.getActionById.call(this,t)},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this._actionCollection&&this._actionCollection.validateProperties(t)},t.prototype.isLastElement=function(t){return e.prototype.isLastElement.call(this,t)&&0===this._actionCollection.getActionCount()},t.prototype.addAction=function(e){this._actionCollection.addAction(e)},t.prototype.clear=function(){e.prototype.clear.call(this),this._actionCollection.clear()},t.prototype.getAllInputs=function(t){void 0===t&&(t=!0);var n=e.prototype.getAllInputs.call(this,t);return t&&n.push.apply(n,this._actionCollection.getAllInputs(t)),n},t.prototype.getResourceInformation=function(){var t=e.prototype.getResourceInformation.call(this);return t.push.apply(t,this._actionCollection.getResourceInformation()),t},t.prototype.isBleedingAtBottom=function(){return 0===this._actionCollection.renderedActionCount?e.prototype.isBleedingAtBottom.call(this):1===this._actionCollection.getActionCount()?void 0!==this._actionCollection.expandedAction&&!this.hostConfig.actions.preExpandSingleShowCardAction:void 0!==this._actionCollection.expandedAction},t.prototype.getForbiddenActionNames=function(){return[]},t.prototype.getElementById=function(t){var n=e.prototype.getElementById.call(this,t);return n||(n=this.getElementByIdFromAction(t)),n},Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!1},enumerable:!1,configurable:!0}),t}(ma);Bn.ContainerWithActions=wa;var Sa=function(e){function t(t,n){var r=e.call(this,t,n,void 0)||this;return r.targetVersion=t,r.name=n,r}return $o(t,e),t.prototype.parse=function(e,t,n){var r=n.parseAction(e.parent,t[this.name],[],!1);if(void 0!==r){if(r instanceof Xi)return r;n.logParseEvent(e,qo.ValidationEvent.ActionTypeNotAllowed,ni.Strings.errors.actionTypeNotAllowed(r.getJsonTypeName()))}n.logParseEvent(e,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("action"))},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,n?n.toJSON(r):void 0,void 0,!0)},t}(ei.PropertyDefinition);Bn.RefreshActionProperty=Sa;var ka=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),Object.defineProperty(t.prototype,"action",{get:function(){return this.getValue(t.actionProperty)},set:function(e){this.setValue(t.actionProperty,e),e&&e.setParent(this.parent)},enumerable:!1,configurable:!0}),t.prototype.getSchemaKey=function(){return"RefreshDefinition"},t.actionProperty=new Sa(ei.Versions.v1_4,"action"),t.userIdsProperty=new ei.StringArrayProperty(ei.Versions.v1_4,"userIds"),Uo([(0,ei.property)(t.actionProperty)],t.prototype,"action",null),Uo([(0,ei.property)(t.userIdsProperty)],t.prototype,"userIds",void 0),t}(ei.SerializableObject);Bn.RefreshDefinition=ka;var Pa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"AuthCardButton"},t.typeProperty=new ei.StringProperty(ei.Versions.v1_4,"type"),t.titleProperty=new ei.StringProperty(ei.Versions.v1_4,"title"),t.imageProperty=new ei.StringProperty(ei.Versions.v1_4,"image"),t.valueProperty=new ei.StringProperty(ei.Versions.v1_4,"value"),Uo([(0,ei.property)(t.typeProperty)],t.prototype,"type",void 0),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"title",void 0),Uo([(0,ei.property)(t.imageProperty)],t.prototype,"image",void 0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"value",void 0),t}(ei.SerializableObject);Bn.AuthCardButton=Pa;var Ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"TokenExchangeResource"},t.idProperty=new ei.StringProperty(ei.Versions.v1_4,"id"),t.uriProperty=new ei.StringProperty(ei.Versions.v1_4,"uri"),t.providerIdProperty=new ei.StringProperty(ei.Versions.v1_4,"providerId"),Uo([(0,ei.property)(t.idProperty)],t.prototype,"id",void 0),Uo([(0,ei.property)(t.uriProperty)],t.prototype,"uri",void 0),Uo([(0,ei.property)(t.providerIdProperty)],t.prototype,"providerId",void 0),t}(ei.SerializableObject);Bn.TokenExchangeResource=Ea;var Aa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"Authentication"},t.textProperty=new ei.StringProperty(ei.Versions.v1_4,"text"),t.connectionNameProperty=new ei.StringProperty(ei.Versions.v1_4,"connectionName"),t.buttonsProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_4,"buttons",Pa),t.tokenExchangeResourceProperty=new ei.SerializableObjectProperty(ei.Versions.v1_4,"tokenExchangeResource",Ea,!0),Uo([(0,ei.property)(t.textProperty)],t.prototype,"text",void 0),Uo([(0,ei.property)(t.connectionNameProperty)],t.prototype,"connectionName",void 0),Uo([(0,ei.property)(t.buttonsProperty)],t.prototype,"buttons",void 0),Uo([(0,ei.property)(t.tokenExchangeResourceProperty)],t.prototype,"tokenExchangeResource",void 0),t}(ei.SerializableObject);Bn.Authentication=Aa;var Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.designMode=!1,t}return $o(t,e),Object.defineProperty(t.prototype,"refresh",{get:function(){return this.getValue(t.refreshProperty)},set:function(e){this.setValue(t.refreshProperty,e),e&&(e.parent=this)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"processMarkdown",{get:function(){throw new Error(ni.Strings.errors.processMarkdownEventRemoved())},set:function(e){throw new Error(ni.Strings.errors.processMarkdownEventRemoved())},enumerable:!1,configurable:!0}),t.applyMarkdown=function(e){var n={didProcess:!1};if(t.onProcessMarkdown)t.onProcessMarkdown(e,n);else if(window.markdownit){var r=window.markdownit;n.outputHtml=r().render(e),n.didProcess=!0}else t._haveWarnedAboutNoMarkdownProcessing||(console.warn(ni.Strings.errors.markdownProcessingNotEnabled),t._haveWarnedAboutNoMarkdownProcessing=!0);return n},t.prototype.isVersionSupported=function(){return!!this.bypassVersionCheck||!(!this.version||!this.version.isValid||this.maxVersion.major<this.version.major||this.maxVersion.major===this.version.major&&this.maxVersion.minor<this.version.minor)},t.prototype.getDefaultSerializationContext=function(){return new Ta(this.version)},t.prototype.getItemsCollectionPropertyName=function(){return"body"},t.prototype.internalParse=function(n,r){this._fallbackCard=void 0;var o=r.parseElement(void 0,n.fallback,this.forbiddenChildElements(),!this.isDesignMode());o&&(this._fallbackCard=new t,this._fallbackCard.addItem(o)),e.prototype.internalParse.call(this,n,r)},t.prototype.internalToJSON=function(n,r){this.setValue(t.versionProperty,r.targetVersion),e.prototype.internalToJSON.call(this,n,r)},t.prototype.internalRender=function(){var t=e.prototype.internalRender.call(this);return Xo.GlobalSettings.useAdvancedCardBottomTruncation&&t&&t.style.removeProperty("minHeight"),t},t.prototype.getHasBackground=function(e){return!0},t.prototype.getDefaultPadding=function(){return new Xo.PaddingDefinition(qo.Spacing.Padding,qo.Spacing.Padding,qo.Spacing.Padding,qo.Spacing.Padding)},t.prototype.shouldSerialize=function(e){return!0},Object.defineProperty(t.prototype,"renderIfEmpty",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bypassVersionCheck",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowCustomStyle",{get:function(){return this.hostConfig.adaptiveCard&&this.hostConfig.adaptiveCard.allowCustomStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasBackground",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getJsonTypeName=function(){return"AdaptiveCard"},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),"AdaptiveCard"!==this.getValue(ai.typeNameProperty)&&t.addFailure(this,qo.ValidationEvent.MissingCardType,ni.Strings.errors.invalidCardType()),this.bypassVersionCheck||this.version?this.isVersionSupported()||t.addFailure(this,qo.ValidationEvent.UnsupportedCardVersion,ni.Strings.errors.unsupportedCardVersion(this.version.toString(),this.maxVersion.toString())):t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("version"))},t.prototype.render=function(t){var n,r=this;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")),Xo.GlobalSettings.setTabIndexAtCardRoot&&(n.tabIndex=0),this.speak&&n.setAttribute("aria-label",this.speak),n.onmouseenter=function(e){r.updateInputsVisualState(!0)},n.onmouseleave=function(e){r.updateInputsVisualState(!1)},this.getRootElement().updateActionsEnabledState()),t&&(Yo.appendChild(t,n),this.updateLayout()),n},t.prototype.updateLayout=function(t){if(void 0===t&&(t=!0),e.prototype.updateLayout.call(this,t),Xo.GlobalSettings.useAdvancedCardBottomTruncation&&this.isDisplayed()){var n=this.hostConfig.getEffectiveSpacing(qo.Spacing.Default);this.handleOverflow(this.renderedElement.offsetHeight-n)}},t.prototype.shouldFallback=function(){return e.prototype.shouldFallback.call(this)||!this.isVersionSupported()},Object.defineProperty(t.prototype,"hasVisibleSeparator",{get:function(){return!1},enumerable:!1,configurable:!0}),t.schemaUrl="http://adaptivecards.io/schemas/adaptive-card.json",t.$schemaProperty=new ei.CustomProperty(ei.Versions.v1_0,"$schema",function(e,n,r,o){return t.schemaUrl},function(e,n,r,o,i){i.serializeValue(r,n.name,t.schemaUrl)}),t.versionProperty=new ei.CustomProperty(ei.Versions.v1_0,"version",function(e,t,n,r){var o=ei.Version.parse(n[t.name],r);return void 0===o&&(o=ei.Versions.latest,r.logParseEvent(e,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidCardVersion(o.toString()))),o},function(e,t,n,r,o){void 0!==r&&o.serializeValue(n,t.name,r.toString())},ei.Versions.v1_0),t.fallbackTextProperty=new ei.StringProperty(ei.Versions.v1_0,"fallbackText"),t.speakProperty=new ei.StringProperty(ei.Versions.v1_0,"speak"),t.refreshProperty=new ei.SerializableObjectProperty(ei.Versions.v1_4,"refresh",ka,!0),t.authenticationProperty=new ei.SerializableObjectProperty(ei.Versions.v1_4,"authentication",Aa,!0),t._haveWarnedAboutNoMarkdownProcessing=!1,Uo([(0,ei.property)(t.versionProperty)],t.prototype,"version",void 0),Uo([(0,ei.property)(t.fallbackTextProperty)],t.prototype,"fallbackText",void 0),Uo([(0,ei.property)(t.speakProperty)],t.prototype,"speak",void 0),Uo([(0,ei.property)(t.refreshProperty)],t.prototype,"refresh",null),Uo([(0,ei.property)(t.authenticationProperty)],t.prototype,"authentication",void 0),t}(wa);Bn.AdaptiveCard=Ia;var _a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.suppressStyle=!1,t}return $o(t,e),t.prototype.getSchemaKey=function(){return"InlineAdaptiveCard"},t.prototype.populateSchema=function(t){e.prototype.populateSchema.call(this,t),t.remove(Ia.$schemaProperty,Ia.versionProperty)},t.prototype.getDefaultPadding=function(){return new Xo.PaddingDefinition(this.suppressStyle?qo.Spacing.None:qo.Spacing.Padding,qo.Spacing.Padding,this.suppressStyle?qo.Spacing.None:qo.Spacing.Padding,qo.Spacing.Padding)},Object.defineProperty(t.prototype,"bypassVersionCheck",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultStyle",{get:function(){return this.suppressStyle?qo.ContainerStyle.Default:this.hostConfig.actions.showCard.style?this.hostConfig.actions.showCard.style:qo.ContainerStyle.Emphasis},enumerable:!1,configurable:!0}),t.prototype.render=function(t){var n=e.prototype.render.call(this,t);return n&&(n.setAttribute("aria-live","polite"),n.removeAttribute("tabindex")),n},t}(Ia),Ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._forbiddenTypes=new Set,t}return $o(t,e),t.prototype.internalParseCardObject=function(e,t,n,r,o,i){var a=this,s=void 0;if(t&&"object"==typeof t){var l=new Set;this._forbiddenTypes.forEach(function(e){l.add(e)}),n.forEach(function(e){a._forbiddenTypes.add(e)});var c=Yo.parseString(t.type);if(c&&this._forbiddenTypes.has(c))i(c,qo.TypeErrorType.ForbiddenType);else{var u=!1;if((s=o(c))?(s.setParent(e),s.parse(t,this),u=Xo.GlobalSettings.enableFallback&&r&&s.shouldFallback()):(u=Xo.GlobalSettings.enableFallback&&r,i(c,qo.TypeErrorType.UnknownType)),u){var d=t.fallback;!d&&e&&e.setShouldFallback(!0),"string"==typeof d&&"drop"===d.toLowerCase()?s=void 0:"object"==typeof d&&(s=this.internalParseCardObject(e,d,n,!0,o,i))}}this._forbiddenTypes=l}return s},t.prototype.cardObjectParsed=function(e,t){e instanceof $i&&this.onParseAction?this.onParseAction(e,t,this):e instanceof ai&&this.onParseElement&&this.onParseElement(e,t,this)},t.prototype.shouldSerialize=function(e){return e instanceof $i?void 0!==this.actionRegistry.findByName(e.getJsonTypeName()):!(e instanceof ai)||void 0!==this.elementRegistry.findByName(e.getJsonTypeName())},t.prototype.parseCardObject=function(e,t,n,r,o,i){var a=new Set(n),s=this.internalParseCardObject(e,t,a,r,o,i);return void 0!==s&&this.cardObjectParsed(s,t),s},t.prototype.parseElement=function(e,t,n,r){var o=this;return this.parseCardObject(e,t,n,r,function(e){return o.elementRegistry.createInstance(e,o.targetVersion)},function(e,t){t===qo.TypeErrorType.UnknownType?o.logParseEvent(void 0,qo.ValidationEvent.UnknownElementType,ni.Strings.errors.unknownElementType(e)):o.logParseEvent(void 0,qo.ValidationEvent.ElementTypeNotAllowed,ni.Strings.errors.elementTypeNotAllowed(e))})},t.prototype.parseAction=function(e,t,n,r){var o=this;return this.parseCardObject(e,t,n,r,function(e){return o.actionRegistry.createInstance(e,o.targetVersion)},function(e,t){t===qo.TypeErrorType.UnknownType?o.logParseEvent(void 0,qo.ValidationEvent.UnknownActionType,ni.Strings.errors.unknownActionType(e)):o.logParseEvent(void 0,qo.ValidationEvent.ActionTypeNotAllowed,ni.Strings.errors.actionTypeNotAllowed(e))})},Object.defineProperty(t.prototype,"elementRegistry",{get:function(){var e;return null!==(e=this._elementRegistry)&&void 0!==e?e:ti.GlobalRegistry.elements},enumerable:!1,configurable:!0}),t.prototype.setElementRegistry=function(e){this._elementRegistry=e},Object.defineProperty(t.prototype,"actionRegistry",{get:function(){var e;return null!==(e=this._actionRegistry)&&void 0!==e?e:ti.GlobalRegistry.actions},enumerable:!1,configurable:!0}),t.prototype.setActionRegistry=function(e){this._actionRegistry=e},t}(ei.BaseSerializationContext);Bn.SerializationContext=Ta,ti.GlobalRegistry.defaultElements.register("Container",ma),ti.GlobalRegistry.defaultElements.register("TextBlock",ci),ti.GlobalRegistry.defaultElements.register("RichTextBlock",di,ei.Versions.v1_2),ti.GlobalRegistry.defaultElements.register("TextRun",ui,ei.Versions.v1_2),ti.GlobalRegistry.defaultElements.register("Image",fi),ti.GlobalRegistry.defaultElements.register("ImageSet",vi),ti.GlobalRegistry.defaultElements.register("Media",Mi,ei.Versions.v1_1),ti.GlobalRegistry.defaultElements.register("FactSet",hi),ti.GlobalRegistry.defaultElements.register("ColumnSet",ga),ti.GlobalRegistry.defaultElements.register("ActionSet",ca,ei.Versions.v1_2),ti.GlobalRegistry.defaultElements.register("Input.Text",Di),ti.GlobalRegistry.defaultElements.register("Input.Date",Hi),ti.GlobalRegistry.defaultElements.register("Input.Time",Wi),ti.GlobalRegistry.defaultElements.register("Input.Number",Li),ti.GlobalRegistry.defaultElements.register("Input.ChoiceSet",Ri),ti.GlobalRegistry.defaultElements.register("Input.Toggle",Oi),ti.GlobalRegistry.defaultActions.register(Qi.JsonTypeName,Qi),ti.GlobalRegistry.defaultActions.register(Ji.JsonTypeName,Ji),ti.GlobalRegistry.defaultActions.register(ia.JsonTypeName,ia),ti.GlobalRegistry.defaultActions.register(ea.JsonTypeName,ea,ei.Versions.v1_2),ti.GlobalRegistry.defaultActions.register(Xi.JsonTypeName,Xi,ei.Versions.v1_4);const ja=e=>{let t;return t=e.iconUrl?c.jsx(p.Button,{className:e.className,onClick:e.actionClickHandler,appearance:"primary",children:c.jsxs("div",{style:{display:"flex",flexDirection:e.iconPlacement===Rn.ActionIconPlacement.LeftOfTitle?"row":"column",justifyContent:"center",alignItems:"center"},children:[c.jsx("img",{src:e.iconUrl,style:{width:e.iconSize,height:e.iconSize,flexShrink:0,marginRight:e.iconPlacement===Rn.ActionIconPlacement.LeftOfTitle?4:0,marginBottom:e.iconPlacement!==Rn.ActionIconPlacement.LeftOfTitle?4:0},alt:""}),c.jsx("span",{children:e.text})]})}):"positive"===e.style.toLocaleLowerCase().trim()||"destructive"===e.style.toLocaleLowerCase().trim()?c.jsx(p.Button,{className:e.className,onClick:e.actionClickHandler,appearance:"primary",children:e.text}):c.jsx(p.Button,{className:e.className,onClick:e.actionClickHandler,children:e.text}),t},Ma=(e,t,n,r,o,i,a,s)=>{const l=document.createElement("div");return l.className="fluentUI",H.render(c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:s,children:c.jsx(ja,{text:e,className:n,iconUrl:t,iconPlacement:r,iconSize:o,actionClickHandler:i,style:a,theme:s})})}),l),l.addEventListener("DOMNodeRemoved",()=>{H.unmountComponentAtNode(l)}),l};class Na extends Yi{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){}render(e){var t,n;const r=this.hostConfig.hostCapabilities.getCustomProperty(Nn),o=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title??"",this.iconUrl||"",e||"",o.iconPlacement,o.iconSize,this.actionClickHandler,this.style,r)}}class Da extends Ki{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){}render(e){var t,n;const r=this.hostConfig.hostCapabilities.getCustomProperty(Nn),o=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title??"",this.iconUrl||"",e||"",o.iconPlacement,o.iconSize,this.actionClickHandler,this.style,r)}}class Oa extends aa{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){if(this.renderedElement){const e=1===this.state;this.renderedElement.setAttribute("aria-expanded",e.toString())}}render(e){var t,n;const r=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title||"Default Title",this.iconUrl||"",this.iconUrl??"",r.iconPlacement,r.iconSize,this.actionClickHandler,this.style)}}class Va extends Gi{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){}render(e){var t,n;const r=this.hostConfig.hostCapabilities.getCustomProperty(Nn),o=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title??"",this.iconUrl??"",e||"",o.iconPlacement,o.iconSize,this.actionClickHandler,this.style,r)}}class Ba extends ta{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){if(this.renderedElement){const e=1===this.state;this.renderedElement.setAttribute("aria-expanded",e.toString())}}render(e){var t,n;const r=this.hostConfig.hostCapabilities.getCustomProperty(Nn),o=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title??"",this.iconUrl??"",e||"",o.iconPlacement,o.iconSize,this.actionClickHandler,this.style,r)}}const Ra=e=>{const t=document.createElement("div");return H.render(e(),t),t};var za=Object.defineProperty,La=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&za(t,n,i),i};const Ha=(e=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"style"),s(this,"isMultiSelect",!1),s(this,"placeholder"),s(this,"wrap",!1),s(this,"choices",[]),s(this,"element"),s(this,"refControl"),s(this,"selectedValues",[]),s(this,"defaultSelectedValues",[]),s(this,"updateSelectedValues",(e,t,n)=>{t?n?this.selectedValues.includes(e)||this.selectedValues.push(e):this.removeItemFromArray(this.selectedValues,e):this.selectedValues=[e]}),s(this,"removeItemFromArray",(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)})}get isCompact(){return!this.style||"compact"===this.style}set isCompact(e){this.style=e?void 0:"expanded"}internalRender(){const e=Dn(this.hostConfig),t=this.choices?this.choices.map(e=>({key:e.value,text:e.title})):[];this.defaultValue&&(this.defaultSelectedValues=this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator),this.selectedValues=[...this.defaultSelectedValues]);const n=()=>{var e;const[n,r]=L.useState(this.selectedValues);return L.useEffect(()=>{r(this.selectedValues)},[this.selectedValues.join(this.hostConfig.choiceSetInputValueSeparator)]),c.jsx(p.Combobox,{style:{width:"100%"},placeholder:this.placeholder,multiselect:this.isMultiSelect,value:this.isMultiSelect?n.map(e=>{var n;return null==(n=t.find(t=>t.key===e))?void 0:n.text}).join(this.hostConfig.choiceSetInputValueSeparator):null==(e=t.find(e=>n[0]===e.key))?void 0:e.text,selectedOptions:this.isMultiSelect?n:[n[0]],autoComplete:"filtered"===this.style?"on":"off",onOptionSelect:(e,t)=>{if(this.isMultiSelect)r(t.selectedOptions),this.selectedValues=t.selectedOptions;else{const e=t.optionValue??"";r([e]),this.selectedValues=[e]}this.valueChanged()},ref:e=>{this.refControl=e},children:t.map(e=>c.jsx(p.Option,{value:e.key,children:e.text??""},e.key))})};return this.element=Ra(()=>c.jsxs(c.Fragment,{children:[!this.isMultiSelect&&"expanded"===this.style&&c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(p.RadioGroup,{defaultValue:this.defaultValue,onChange:(e,t)=>{this.updateSelectedValues(t.value,this.isMultiSelect,!0),this.valueChanged()},ref:e=>{this.refControl=e},children:this.choices.map((e,t)=>c.jsx(p.Radio,{value:e.value,label:e.title,style:{marginTop:t>0?this.hostConfig.spacing.default:0}},e.value))})})}),this.isMultiSelect&&"expanded"===this.style&&c.jsx("div",{style:{display:"flex",gap:this.hostConfig.spacing.default},children:this.choices.map((t,n)=>{const r=this.defaultSelectedValues.indexOf(t.value??"")>-1;return c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(p.Checkbox,{label:t.title,defaultChecked:r,onChange:(e,n)=>{this.updateSelectedValues(t.value??"",this.isMultiSelect,!!n),this.valueChanged()},ref:e=>{0===n&&(this.refControl=e)}})})},t.value)})}),("compact"===this.style||"filtered"===this.style)&&c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(n,{})})})]})),this.element.style.width="100%",this.element}getJsonTypeName(){return"Input.ChoiceSet"}focus(){this.refControl&&this.refControl.focus&&this.refControl.focus()}internalValidateProperties(e){super.internalValidateProperties(e),0===this.choices.length&&e.addFailure(this,A.ValidationEvent.CollectionCantBeEmpty,A.Strings.errors.choiceSetMustHaveAtLeastOneChoice());for(const t of this.choices)t.title&&t.value||e.addFailure(this,A.ValidationEvent.PropertyCantBeNull,A.Strings.errors.choiceSetChoicesMustHaveTitleAndValue())}isSet(){return!!this.value}isValid(){return!!this.value||!this.isRequired}get value(){if(this.selectedValues)return this.selectedValues.join(this.hostConfig.choiceSetInputValueSeparator)}},s(e,"valueProperty",new A.StringProperty(A.Versions.v1_5,"value")),s(e,"choicesProperty",new A.SerializableObjectCollectionProperty(A.Versions.v1_5,"choices",A.Choice)),s(e,"styleProperty",new A.ValueSetProperty(A.Versions.v1_5,"style",[{value:"compact"},{value:"expanded"},{value:"filtered",targetVersion:A.Versions.v1_5}],"compact")),s(e,"isMultiSelectProperty",new A.BoolProperty(A.Versions.v1_5,"isMultiSelect",!1)),s(e,"placeholderProperty",new A.StringProperty(A.Versions.v1_5,"placeholder")),s(e,"wrapProperty",new A.BoolProperty(A.Versions.v1_5,"wrap",!1)),e);La([A.property(Ha.valueProperty)],Ha.prototype,"defaultValue"),La([A.property(Ha.styleProperty)],Ha.prototype,"style"),La([A.property(Ha.isMultiSelectProperty)],Ha.prototype,"isMultiSelect"),La([A.property(Ha.placeholderProperty)],Ha.prototype,"placeholder"),La([A.property(Ha.wrapProperty)],Ha.prototype,"wrap"),La([A.property(Ha.choicesProperty)],Ha.prototype,"choices");let Fa=Ha;var Wa=Object.defineProperty,$a=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&Wa(t,n,i),i};const Ua=(t=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"min"),s(this,"max"),s(this,"placeholder"),s(this,"_value"),s(this,"refControl"),s(this,"element")}internalRender(){const e=Dn(this.hostConfig);return this.element=Ra(()=>c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(T.DatePicker,{id:this.id,placeholder:this.placeholder,minDate:this.convertStringToDate(this.min),maxDate:this.convertStringToDate(this.max),onSelectDate:e=>{this._value=e??void 0,this.valueChanged()},ref:e=>{this.refControl=e},style:{width:"100%"}})})})),this.element.style.width="100%",this.element}convertStringToDate(e){if(e)try{const t=new Date(e);return isNaN(t.getTime())?void 0:t}catch{return}}getJsonTypeName(){return"Input.Date"}focus(){var e;null==(e=this.refControl)||e.focus()}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}isSet(){return!!this.value}isValid(){if(!this.value)return!this.isRequired;const e=new Date(this.value);let t=!0;if(this.min){const n=new Date(this.min);t=t&&e>=n}if(this.max){const n=new Date(this.max);t=t&&e<=n}return t}get value(){if(this._value){const e=this._value.getTimezoneOffset();return new Date(this._value.getTime()-60*e*1e3).toISOString().split("T")[0]}}},s(t,"valueProperty",new A.StringProperty(A.Versions.v1_5,"value")),s(t,"placeholderProperty",new A.StringProperty(A.Versions.v1_5,"placeholder")),s(t,"minProperty",new A.StringProperty(A.Versions.v1_0,"min")),s(t,"maxProperty",new A.StringProperty(A.Versions.v1_0,"max")),t);$a([A.property(Ua.valueProperty)],Ua.prototype,"defaultValue"),$a([A.property(Ua.minProperty)],Ua.prototype,"min"),$a([A.property(Ua.maxProperty)],Ua.prototype,"max"),$a([A.property(Ua.placeholderProperty)],Ua.prototype,"placeholder");let Ja=Ua;var Ga=Object.defineProperty,qa=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&Ga(t,n,i),i};const Xa=(n=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"min"),s(this,"max"),s(this,"placeholder"),s(this,"refControl",null),s(this,"element")}internalRender(){const e=Dn(this.hostConfig);return this.element=Ra(()=>c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(p.SpinButton,{style:{width:"calc(100% - 10px)"},id:this.id,defaultValue:void 0!==this.defaultValue?this.defaultValue:void 0,placeholder:this.placeholder,min:this.min,max:this.max,onChange:()=>{this.valueChanged()},ref:e=>{this.refControl=e}})})})),this.element.style.width="100%",this.element}getJsonTypeName(){return"Input.Number"}focus(){var e;null==(e=this.refControl)||e.focus()}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}isSet(){const e=this.value;return void 0!==e&&!isNaN(e)}isValid(){const e=this.value;if(void 0===e)return!this.isRequired;let t=!0;return void 0!==this.min&&(t=t&&e>=this.min),void 0!==this.max&&(t=t&&e<=this.max),t}get value(){return this.refControl?Number(this.refControl.value):void 0}},s(n,"valueProperty",new A.NumProperty(A.Versions.v1_5,"value")),s(n,"placeholderProperty",new A.StringProperty(A.Versions.v1_5,"placeholder")),s(n,"minProperty",new A.NumProperty(A.Versions.v1_0,"min")),s(n,"maxProperty",new A.NumProperty(A.Versions.v1_0,"max")),n);qa([A.property(Xa.valueProperty)],Xa.prototype,"defaultValue"),qa([A.property(Xa.minProperty)],Xa.prototype,"min"),qa([A.property(Xa.maxProperty)],Xa.prototype,"max"),qa([A.property(Xa.placeholderProperty)],Xa.prototype,"placeholder");let Ya=Xa;const Za=e=>{const{ariaLabel:t,iconProps:n,styles:r,className:o,onClick:i,...a}=e;return c.jsx(p.Button,{appearance:"transparent","aria-label":t,className:o,onClick:i,style:r,...a,children:c.jsx("img",{src:n.src,alt:t,style:{height:n.height||"100%",width:n.width||"auto"}})})},Qa={marginLeft:8};var Ka=Object.defineProperty,es=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&Ka(t,n,i),i};const ts=(r=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"maxLength"),s(this,"isMultiline",!1),s(this,"placeholder"),s(this,"style",A.InputTextStyle.Text),s(this,"inlineAction"),s(this,"regex"),s(this,"refControl",null),s(this,"element"),s(this,"_value",this.defaultValue||""),s(this,"handleKeyDown",e=>{var t;"Enter"===e.key&&this.inlineAction&&(null==(t=this.inlineAction)||t.execute())}),s(this,"buildInlineActionButton",()=>{var e;return Ra((null==(e=this.inlineAction)?void 0:e.iconUrl)?this.inlineIconActionButton:this.buildTextOnlyInlineActionActionButton)}),s(this,"inlineActionClickHandler",e=>{var t;e.stopPropagation(),e.preventDefault(),null==(t=this.inlineAction)||t.execute()}),s(this,"inlineIconActionButton",()=>{var e,t;const n=this.hostConfig.hostCapabilities.getCustomProperty(Nn);return c.jsx(p.FluentProvider,{theme:n,children:c.jsx(Za,{ariaLabel:(null==(e=this.inlineAction)?void 0:e.title)||"Inline action",className:this.hostConfig.makeCssClassName("ac-inlineActionButton","iconOnly"),iconProps:{src:(null==(t=this.inlineAction)?void 0:t.iconUrl)??""},onClick:this.inlineActionClickHandler,styles:Qa})})}),s(this,"buildTextOnlyInlineActionActionButton",()=>{var e;const t=this.hostConfig.hostCapabilities.getCustomProperty(Nn);return c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:t,children:c.jsx(p.Button,{appearance:"primary",className:this.hostConfig.makeCssClassName("ac-inlineActionButton","textOnly"),onClick:this.inlineActionClickHandler,style:Qa,children:(null==(e=this.inlineAction)?void 0:e.title)??""})})})})}internalRender(){const e=Dn(this.hostConfig);return this.element=Ra(()=>c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:this.isMultiline?c.jsx(p.Textarea,{resize:"vertical",style:{width:"100%"},id:this.id,defaultValue:this.defaultValue,placeholder:this.placeholder,maxLength:this.maxLength,onChange:(e,t)=>{this._value=t.value,this.valueChanged()},onKeyDown:this.handleKeyDown,ref:e=>{this.refControl=e}}):c.jsx(p.Input,{id:this.id,style:{width:"100%"},type:A.InputTextStyle[this.style].toLowerCase(),defaultValue:this.defaultValue,placeholder:this.placeholder,maxLength:this.maxLength,onChange:(e,t)=>{this._value=t.value,this.valueChanged()},onKeyDown:this.handleKeyDown,ref:e=>{this.refControl=e?e.inputElement:null}})})})),this.element.style.width="100%",this.element}overrideInternalRender(){const e=super.overrideInternalRender();return this.inlineAction&&this.inputControlContainerElement.appendChild(this.buildInlineActionButton()),e||document.createElement("div")}getJsonTypeName(){return"Input.Text"}focus(){var e;null==(e=this.refControl)||e.focus()}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}getActionById(e){let t=super.getActionById(e);if(!t&&this.inlineAction&&(t=this.inlineAction.getActionById(e)),!t)throw new Error(`Action with id '${e}' not found.`);return t}isSet(){return!!this.value}isValid(){return this.value?!this.regex||new RegExp(this.regex,"g").test(this.value):!this.isRequired}get value(){if(this._value)return this._value}},s(r,"valueProperty",new A.StringProperty(A.Versions.v1_0,"value")),s(r,"maxLengthProperty",new A.NumProperty(A.Versions.v1_0,"maxLength")),s(r,"isMultilineProperty",new A.BoolProperty(A.Versions.v1_0,"isMultiline",!1)),s(r,"placeholderProperty",new A.StringProperty(A.Versions.v1_0,"placeholder")),s(r,"styleProperty",new A.EnumProperty(A.Versions.v1_0,"style",A.InputTextStyle,A.InputTextStyle.Text)),s(r,"inlineActionProperty",new A.ActionProperty(A.Versions.v1_0,"inlineAction",["Action.ShowCard"])),s(r,"regexProperty",new A.StringProperty(A.Versions.v1_3,"regex",!0)),r);es([A.property(ts.valueProperty)],ts.prototype,"defaultValue"),es([A.property(ts.maxLengthProperty)],ts.prototype,"maxLength"),es([A.property(ts.isMultilineProperty)],ts.prototype,"isMultiline"),es([A.property(ts.placeholderProperty)],ts.prototype,"placeholder"),es([A.property(ts.styleProperty)],ts.prototype,"style"),es([A.property(ts.inlineActionProperty)],ts.prototype,"inlineAction"),es([A.property(ts.regexProperty)],ts.prototype,"regex");let ns=ts;var rs=Object.defineProperty,os=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&rs(t,n,i),i};const is=e=>{const{id:t,defaultTime:n,minTime:r,maxTime:o,placeholder:i,theme:a,onTimeChange:s}=e,[l,u]=L.useState(n),[d,h]=L.useState(n?j.formatDateToTimeString(n??new Date):"");return c.jsx(p.IdPrefixProvider,{value:t,children:c.jsx(p.FluentProvider,{theme:a,children:c.jsx(j.TimePicker,{style:{width:"100%"},expandIcon:c.jsx(v.ClockRegular,{}),id:t,freeform:!0,min:r?j.formatDateToTimeString(r):void 0,max:o?j.formatDateToTimeString(o):void 0,placeholder:i,value:l?j.formatDateToTimeString(l):d,onTimeChange:(e,t)=>{const n=t.selectedTime??void 0,r=t.selectedTimeText??"";u(n),h(r),s&&n&&s(n,r)},onInput:e=>{h(e.target.value)}})})})},as=(o=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"min"),s(this,"max"),s(this,"placeholder"),s(this,"_time"),s(this,"element")}static convertTimeStringToDate(e){return new Date("1973-09-04T"+e+":00Z")}internalRender(){const e=Dn(this.hostConfig),t=this.defaultValue?o.convertTimeStringToDate(this.defaultValue):void 0,n=this.min?o.convertTimeStringToDate(this.min):void 0,r=this.max?o.convertTimeStringToDate(this.max):void 0;return this.element=Ra(()=>c.jsx(is,{id:A.generateUniqueId(),defaultTime:t,minTime:n,maxTime:r,placeholder:this.placeholder,theme:e,onTimeChange:e=>{this._time=e,this.valueChanged()}})),this.element.style.width="100%",this.element}getJsonTypeName(){return"Input.Time"}focus(){}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}isSet(){return!!this.value}isValid(){if(!this.value)return!this.isRequired;if(!this._time)return!1;let e=!0;if(this.min){const t=o.convertTimeStringToDate(this.min);e=e&&this._time>=t}if(this.max){const t=o.convertTimeStringToDate(this.max);e=e&&this._time<=t}return e}get value(){return this._time?j.formatDateToTimeString(this._time):void 0}},s(o,"valueProperty",new A.TimeProperty(A.Versions.v1_0,"value")),s(o,"placeholderProperty",new A.StringProperty(A.Versions.v1_0,"placeholder")),s(o,"minProperty",new A.TimeProperty(A.Versions.v1_0,"min")),s(o,"maxProperty",new A.TimeProperty(A.Versions.v1_0,"max")),o);os([A.property(as.valueProperty)],as.prototype,"defaultValue"),os([A.property(as.minProperty)],as.prototype,"min"),os([A.property(as.maxProperty)],as.prototype,"max"),os([A.property(as.placeholderProperty)],as.prototype,"placeholder");let ss=as;var ls=Object.defineProperty,cs=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&ls(t,n,i),i};const us=(i=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"title"),s(this,"valueOn","true"),s(this,"valueOff","false"),s(this,"wrap",!1),s(this,"_value"),s(this,"refControl",null),s(this,"element")}internalRender(){const e=Dn(this.hostConfig);return this.element=Ra(()=>c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,style:{backgroundColor:"transparent"},children:c.jsx(p.Switch,{id:this.id,label:this.title,onChange:(e,t)=>{this._value=t.checked,this.valueChanged()},defaultChecked:this.defaultValue===this.valueOn,style:{marginBottom:0,marginTop:0},ref:e=>{this.refControl=e}})})})),this.element.style.width="100%",this.element}get isNullable(){return!1}getJsonTypeName(){return"Input.Toggle"}focus(){var e;null==(e=this.refControl)||e.focus()}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}isSet(){return this.isRequired?this.value===this.valueOn:!!this.value}get value(){return null!==this._value&&void 0!==this._value?this._value?this.valueOn:this.valueOff:this.isRequired?void 0:this.valueOff}},s(i,"valueProperty",new A.StringProperty(A.Versions.v1_5,"value")),s(i,"titleProperty",new A.StringProperty(A.Versions.v1_5,"title")),s(i,"valueOnProperty",new A.StringProperty(A.Versions.v1_5,"valueOn",!0,void 0,"true",e=>"true")),s(i,"valueOffProperty",new A.StringProperty(A.Versions.v1_5,"valueOff",!0,void 0,"false",e=>"false")),s(i,"wrapProperty",new A.BoolProperty(A.Versions.v1_2,"wrap",!1)),i);cs([A.property(us.valueProperty)],us.prototype,"defaultValue"),cs([A.property(us.titleProperty)],us.prototype,"title"),cs([A.property(us.valueOnProperty)],us.prototype,"valueOn"),cs([A.property(us.valueOffProperty)],us.prototype,"valueOff"),cs([A.property(us.wrapProperty)],us.prototype,"wrap");let ds=us;console.log("expression:",N.Expression);const ps=e=>{switch(e){case jn.SharePoint:return p.webLightTheme;case jn.Teams:return p.teamsLightTheme;case jn.TeamsDark:return p.teamsDarkTheme;case jn.TeamsHighContrast:return p.teamsHighContrastTheme;default:return p.webLightTheme}};var hs=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),ms="-ms-",fs="-moz-",gs="-webkit-",ys="comm",vs="rule",bs="decl",xs="@keyframes",Cs=Math.abs,ws=String.fromCharCode,Ss=Object.assign;function ks(e){return e.trim()}function Ps(e,t,n){return e.replace(t,n)}function Es(e,t){return e.indexOf(t)}function As(e,t){return 0|e.charCodeAt(t)}function Is(e,t,n){return e.slice(t,n)}function _s(e){return e.length}function Ts(e){return e.length}function js(e,t){return t.push(e),e}var Ms=1,Ns=1,Ds=0,Os=0,Vs=0,Bs="";function Rs(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ms,column:Ns,length:a,return:""}}function zs(e,t){return Ss(Rs("",null,null,"",null,null,0),e,{length:-e.length},t)}function Ls(){return Vs=Os>0?As(Bs,--Os):0,Ns--,10===Vs&&(Ns=1,Ms--),Vs}function Hs(){return Vs=Os<Ds?As(Bs,Os++):0,Ns++,10===Vs&&(Ns=1,Ms++),Vs}function Fs(){return As(Bs,Os)}function Ws(){return Os}function $s(e,t){return Is(Bs,e,t)}function Us(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Js(e){return Ms=Ns=1,Ds=_s(Bs=e),Os=0,[]}function Gs(e){return Bs="",e}function qs(e){return ks($s(Os-1,Zs(91===e?e+2:40===e?e+1:e)))}function Xs(e){for(;(Vs=Fs())&&Vs<33;)Hs();return Us(e)>2||Us(Vs)>3?"":" "}function Ys(e,t){for(;--t&&Hs()&&!(Vs<48||Vs>102||Vs>57&&Vs<65||Vs>70&&Vs<97););return $s(e,Ws()+(t<6&&32==Fs()&&32==Hs()))}function Zs(e){for(;Hs();)switch(Vs){case e:return Os;case 34:case 39:34!==e&&39!==e&&Zs(Vs);break;case 40:41===e&&Zs(e);break;case 92:Hs()}return Os}function Qs(e,t){for(;Hs()&&e+Vs!==57&&(e+Vs!==84||47!==Fs()););return"/*"+$s(t,Os-1)+"*"+ws(47===e?e:Hs())}function Ks(e){for(;!Us(Fs());)Hs();return $s(e,Os)}function el(e){return Gs(tl("",null,null,null,[""],e=Js(e),0,[0],e))}function tl(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,h=0,m=0,f=1,g=1,y=1,v=0,b="",x=o,C=i,w=r,S=b;g;)switch(m=v,v=Hs()){case 40:if(108!=m&&58==As(S,d-1)){-1!=Es(S+=Ps(qs(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:S+=qs(v);break;case 9:case 10:case 13:case 32:S+=Xs(m);break;case 92:S+=Ys(Ws()-1,7);continue;case 47:switch(Fs()){case 42:case 47:js(rl(Qs(Hs(),Ws()),t,n),l);break;default:S+="/"}break;case 123*f:s[c++]=_s(S)*y;case 125*f:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(S=Ps(S,/\f/g,"")),h>0&&_s(S)-d&&js(h>32?ol(S+";",r,n,d-1):ol(Ps(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(js(w=nl(S,t,n,c,u,o,s,b,x=[],C=[],d),i),123===v)if(0===u)tl(S,t,w,w,x,i,d,s,C);else switch(99===p&&110===As(S,3)?100:p){case 100:case 108:case 109:case 115:tl(e,w,w,r&&js(nl(e,w,w,0,0,o,s,b,o,x=[],d),C),o,C,d,s,r?x:C);break;default:tl(S,w,w,w,[""],C,0,s,C)}}c=u=h=0,f=y=1,b=S="",d=a;break;case 58:d=1+_s(S),h=m;default:if(f<1)if(123==v)--f;else if(125==v&&0==f++&&125==Ls())continue;switch(S+=ws(v),v*f){case 38:y=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(_s(S)-1)*y,y=1;break;case 64:45===Fs()&&(S+=qs(Hs())),p=Fs(),u=d=_s(b=S+=Ks(Ws())),v++;break;case 45:45===m&&2==_s(S)&&(f=0)}}return i}function nl(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],h=Ts(p),m=0,f=0,g=0;m<r;++m)for(var y=0,v=Is(e,d+1,d=Cs(f=a[m])),b=e;y<h;++y)(b=ks(f>0?p[y]+" "+v:Ps(v,/&\f/g,p[y])))&&(l[g++]=b);return Rs(e,t,n,0===o?vs:s,l,c,u)}function rl(e,t,n){return Rs(e,t,n,ys,ws(Vs),Is(e,2,-2),0)}function ol(e,t,n,r){return Rs(e,t,n,bs,Is(e,0,r),Is(e,r+1,-1),r)}function il(e,t){for(var n="",r=Ts(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function al(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case bs:return e.return=e.return||e.value;case ys:return"";case xs:return e.return=e.value+"{"+il(e.children,r)+"}";case vs:e.value=e.props.join(",")}return _s(n=il(e.children,r))?e.return=e.value+"{"+n+"}":""}function sl(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var ll=function(e,t,n){for(var r=0,o=0;r=o,o=Fs(),38===r&&12===o&&(t[n]=1),!Us(o);)Hs();return $s(e,Os)},cl=function(e,t){return Gs(function(e,t){var n=-1,r=44;do{switch(Us(r)){case 0:38===r&&12===Fs()&&(t[n]=1),e[n]+=ll(Os-1,t,n);break;case 2:e[n]+=qs(r);break;case 4:if(44===r){e[++n]=58===Fs()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=ws(r)}}while(r=Hs());return e}(Js(e),t))},ul=new WeakMap,dl=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||ul.get(n))&&!r){ul.set(e,!0);for(var o=[],i=cl(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},pl=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function hl(e,t){switch(function(e,t){return 45^As(e,0)?(((t<<2^As(e,0))<<2^As(e,1))<<2^As(e,2))<<2^As(e,3):0}(e,t)){case 5103:return gs+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return gs+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return gs+e+fs+e+ms+e+e;case 6828:case 4268:return gs+e+ms+e+e;case 6165:return gs+e+ms+"flex-"+e+e;case 5187:return gs+e+Ps(e,/(\w+).+(:[^]+)/,gs+"box-$1$2"+ms+"flex-$1$2")+e;case 5443:return gs+e+ms+"flex-item-"+Ps(e,/flex-|-self/,"")+e;case 4675:return gs+e+ms+"flex-line-pack"+Ps(e,/align-content|flex-|-self/,"")+e;case 5548:return gs+e+ms+Ps(e,"shrink","negative")+e;case 5292:return gs+e+ms+Ps(e,"basis","preferred-size")+e;case 6060:return gs+"box-"+Ps(e,"-grow","")+gs+e+ms+Ps(e,"grow","positive")+e;case 4554:return gs+Ps(e,/([^-])(transform)/g,"$1"+gs+"$2")+e;case 6187:return Ps(Ps(Ps(e,/(zoom-|grab)/,gs+"$1"),/(image-set)/,gs+"$1"),e,"")+e;case 5495:case 3959:return Ps(e,/(image-set\([^]*)/,gs+"$1$`$1");case 4968:return Ps(Ps(e,/(.+:)(flex-)?(.*)/,gs+"box-pack:$3"+ms+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+gs+e+e;case 4095:case 3583:case 4068:case 2532:return Ps(e,/(.+)-inline(.+)/,gs+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(_s(e)-1-t>6)switch(As(e,t+1)){case 109:if(45!==As(e,t+4))break;case 102:return Ps(e,/(.+:)(.+)-([^]+)/,"$1"+gs+"$2-$3$1"+fs+(108==As(e,t+3)?"$3":"$2-$3"))+e;case 115:return~Es(e,"stretch")?hl(Ps(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==As(e,t+1))break;case 6444:switch(As(e,_s(e)-3-(~Es(e,"!important")&&10))){case 107:return Ps(e,":",":"+gs)+e;case 101:return Ps(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+gs+(45===As(e,14)?"inline-":"")+"box$3$1"+gs+"$2$3$1"+ms+"$2box$3")+e}break;case 5936:switch(As(e,t+11)){case 114:return gs+e+ms+Ps(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return gs+e+ms+Ps(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return gs+e+ms+Ps(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return gs+e+ms+e+e}return e}var ml,fl=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case bs:e.return=hl(e.value,e.length);break;case xs:return il([zs(e,{value:Ps(e.value,"@","@"+gs)})],r);case vs:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return il([zs(e,{props:[Ps(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return il([zs(e,{props:[Ps(t,/:(plac\w+)/,":"+gs+"input-$1")]}),zs(e,{props:[Ps(t,/:(plac\w+)/,":-moz-$1")]}),zs(e,{props:[Ps(t,/:(plac\w+)/,ms+"input-$1")]})],r)}return""})}}],gl=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||fl,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u,d,p=[al,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],h=(c=[dl,pl].concat(i,p),u=Ts(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,il(el(e?e+"{"+t.styles+"}":t.styles),h),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new hs({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return m.sheet.hydrate(s),m},yl={exports:{}},vl={};var bl,xl={};
|
|
24
|
+
var s=function(){function e(){}return e.generate=function(){var t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0,o=4294967295*Math.random()|0;return e.lut[255&t]+e.lut[t>>8&255]+e.lut[t>>16&255]+e.lut[t>>24&255]+"-"+e.lut[255&n]+e.lut[n>>8&255]+"-"+e.lut[n>>16&15|64]+e.lut[n>>24&255]+"-"+e.lut[63&r|128]+e.lut[r>>8&255]+"-"+e.lut[r>>16&255]+e.lut[r>>24&255]+e.lut[255&o]+e.lut[o>>8&255]+e.lut[o>>16&255]+e.lut[o>>24&255]},e.initialize=function(){for(var t=0;t<256;t++)e.lut[t]=(t<16?"0":"")+t.toString(16)},e.lut=[],e}();e.UUID=s,s.initialize()}(zn);var Ln,Hn={};Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.debounce=Hn.addCancelSelectActionEventHandler=Hn.clearElementChildren=Hn.getScrollY=Hn.getScrollX=Hn.getFitStatus=Hn.truncate=Hn.truncateText=Hn.stringToCssColor=Hn.parseEnum=Hn.getEnumValueByName=Hn.parseBool=Hn.parseNumber=Hn.parseString=Hn.appendChild=Hn.generateUniqueId=Hn.isMobileOS=Hn.isInternetExplorer=void 0;var Fn=Rn,Wn=zn;function $n(e,t){for(var n in e){var r=parseInt(n,10);if(r>=0){var o=e[n];if(o&&"string"==typeof o&&o.toLowerCase()===t.toLowerCase())return r}}}function Un(e,t,n,r,o){var i=function(){return t-e.scrollHeight>=-1};if(!i()){for(var a=function(e){var t=[],n=Gn(e,-1);for(;n<e.length;)" "===e[n]&&t.push(n),n=Gn(e,n);return t}(n),s=0,l=a.length,c=0;s<l;){var u=Math.floor((s+l)/2);r(n,a[u]),i()?(c=a[u],s=u+1):l=u}if(r(n,c),o&&t-e.scrollHeight>=o-1){for(var d=Gn(n,c);d<n.length&&(r(n,d),i());)c=d,d=Gn(n,d);r(n,c)}}}Hn.isInternetExplorer=function(){return void 0!==window.document.documentMode},Hn.isMobileOS=function(){var e=window.navigator.userAgent;return!!e.match(/Android/i)||!!e.match(/iPad/i)||!!e.match(/iPhone/i)},Hn.generateUniqueId=function(){return"__ac-"+Wn.UUID.generate()},Hn.appendChild=function(e,t){t&&e.appendChild(t)},Hn.parseString=function(e,t){return"string"==typeof e?e:t},Hn.parseNumber=function(e,t){return"number"==typeof e?e:t},Hn.parseBool=function(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},Hn.getEnumValueByName=$n,Hn.parseEnum=function(e,t,n){if(!t)return n;var r=$n(e,t);return void 0!==r?r:n},Hn.stringToCssColor=function(e){if(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 n=parseInt(t[1],16)/255;return"rgba("+parseInt(t[2],16)+","+parseInt(t[3],16)+","+parseInt(t[4],16)+","+n+")"}}return e},Hn.truncateText=function(e,t,n){Un(e,t,e.innerText,function(t,n){e.innerText=t.substring(0,n)+"..."},n)};var Jn="undefined"==typeof window||null===(Ln=window.trustedTypes)||void 0===Ln?void 0:Ln.createPolicy("adaptivecards#deprecatedExportedFunctionPolicy",{createHTML:function(e){return e}});function Gn(e,t){for(t+=1;t<e.length&&"<"===e[t];)for(;t<e.length&&">"!==e[t++];);return t}Hn.truncate=function(e,t,n){Un(e,t,e.innerHTML,function(t,n){var r,o=t.substring(0,n)+"...",i=null!==(r=null==Jn?void 0:Jn.createHTML(o))&&void 0!==r?r:o;e.innerHTML=i},n)},Hn.getFitStatus=function(e,t){var n=e.offsetTop;return n+e.clientHeight<=t?Fn.ContainerFitStatus.FullyInContainer:n<t?Fn.ContainerFitStatus.Overflowing:Fn.ContainerFitStatus.FullyOutOfContainer},Hn.getScrollX=function(){return window.pageXOffset},Hn.getScrollY=function(){return window.pageYOffset},Hn.clearElementChildren=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},Hn.addCancelSelectActionEventHandler=function(e){e.onclick=function(e){e.preventDefault(),e.cancelBubble=!0}},Hn.debounce=function(e,t){var n;return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n&&clearTimeout(n),n=setTimeout(function(){e.apply(void 0,r)},t)}};var qn={},Xn={},Yn={},Zn={};Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.Strings=void 0;var Qn=function(){function e(){}return e.errors={unknownElementType:function(e){return'Unknown element type "'.concat(e,'". Fallback will be used if present.')},unknownActionType:function(e){return'Unknown action type "'.concat(e,'". Fallback will be used if present.')},elementTypeNotAllowed:function(e){return'Element type "'.concat(e,'" is not allowed in this context.')},actionTypeNotAllowed:function(e){return'Action type "'.concat(e,'" is not allowed in this context.')},invalidPropertyValue:function(e,t){return'Invalid value "'.concat(e,'" for property "').concat(t,'".')},showCardMustHaveCard:function(){return'"An Action.ShowCard must have its "card" property set to a valid AdaptiveCard object.'},invalidColumnWidth:function(e){return'Invalid column width "'.concat(e,'" - defaulting to "auto".')},invalidCardVersion:function(e){return'Invalid card version. Defaulting to "'.concat(e,'".')},invalidVersionString:function(e){return'Invalid version string "'.concat(e,'".')},propertyValueNotSupported:function(e,t,n,r){return'Value "'.concat(e,'" for property "').concat(t,'" is supported in version ').concat(n,", but you are using version ").concat(r,".")},propertyNotSupported:function(e,t,n){return'Property "'.concat(e,'" is supported in version ').concat(t,", but you are using version ").concat(n,".")},indexOutOfRange:function(e){return"Index out of range (".concat(e,").")},elementCannotBeUsedAsInline:function(){return"RichTextBlock.addInline: the specified card element cannot be used as a RichTextBlock inline."},inlineAlreadyParented:function(){return"RichTextBlock.addInline: the specified inline already belongs to another RichTextBlock."},interactivityNotAllowed:function(){return"Interactivity is not allowed."},inputsMustHaveUniqueId:function(){return"All inputs must have a unique Id."},choiceSetMustHaveAtLeastOneChoice:function(){return"An Input.ChoiceSet must have at least one choice defined."},choiceSetChoicesMustHaveTitleAndValue:function(){return"All choices in an Input.ChoiceSet must have their title and value properties set."},propertyMustBeSet:function(e){return'Property "'.concat(e,'" must be set.')},actionHttpHeadersMustHaveNameAndValue:function(){return"All headers of an Action.Http must have their name and value properties set."},tooManyActions:function(e){return"Maximum number of actions exceeded (".concat(e,").")},tooLittleTimeDelay:function(e){return"Autoplay Delay is too short (".concat(e,").")},tooManyCarouselPages:function(e){return"Maximum number of Carousel pages exceeded (".concat(e,").")},invalidInitialPageIndex:function(e){return"InitialPage for carousel is invalid (".concat(e,").")},columnAlreadyBelongsToAnotherSet:function(){return"This column already belongs to another ColumnSet."},invalidCardType:function(){return'Invalid or missing card type. Make sure the card\'s type property is set to "AdaptiveCard".'},unsupportedCardVersion:function(e,t){return"The specified card version (".concat(e,") is not supported or still in preview. The latest released card version is ").concat(t,".")},duplicateId:function(e){return'Duplicate Id "'.concat(e,'".')},markdownProcessingNotEnabled:function(){return"Markdown processing isn't enabled. Please see https://www.npmjs.com/package/adaptivecards#supporting-markdown"},processMarkdownEventRemoved:function(){return"The processMarkdown event has been removed. Please update your code and set onProcessMarkdown instead."},elementAlreadyParented:function(){return"The element already belongs to another container."},actionAlreadyParented:function(){return"The action already belongs to another element."},elementTypeNotStandalone:function(e){return"Elements of type ".concat(e," cannot be used as standalone elements.")},invalidInputLabelWidth:function(){return"Invalid input label width. Defaulting to label width from host config."}},e.magicCodeInputCard={tryAgain:function(){return"That didn't work... let's try again."},pleaseLogin:function(){return'Please login in the popup. You will obtain a magic code. Paste that code below and select "Submit"'},enterMagicCode:function(){return"Enter magic code"},pleaseEnterMagicCodeYouReceived:function(){return"Please enter the magic code you received."},submit:function(){return"Submit"},cancel:function(){return"Cancel"},somethingWentWrong:function(){return"Something went wrong. This action can't be handled."},authenticationFailed:function(){return"Authentication failed."}},e.runtime={automaticRefreshPaused:function(){return"Automatic refresh paused."},clckToRestartAutomaticRefresh:function(){return"Click to restart."},refreshThisCard:function(){return"Refresh this card"}},e.hints={dontUseWeightedAndStrecthedColumnsInSameSet:function(){return"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."}},e.defaults={inlineActionTitle:function(){return"Inline Action"},overflowButtonText:function(){return"..."},overflowButtonTooltip:function(){return"More options"},emptyElementText:function(e){return"Empty ".concat(e)},mediaPlayerAriaLabel:function(){return"Media content"},mediaPlayerPlayMedia:function(){return"Play media"},youTubeVideoPlayer:function(){return"YouTube video player"},vimeoVideoPlayer:function(){return"Vimeo video player"},dailymotionVideoPlayer:function(){return"Dailymotion video player"},carouselNavigationPreviousTooltip:function(){return"Previous carousel page"},carouselNavigationNextTooltip:function(){return"Next carousel page"}},e}();Zn.Strings=Qn;var Kn=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.SerializableObject=Yn.property=Yn.SerializableObjectSchema=Yn.CustomProperty=Yn.SerializableObjectCollectionProperty=Yn.SerializableObjectProperty=Yn.EnumProperty=Yn.ValueSetProperty=Yn.StringArrayProperty=Yn.PixelSizeProperty=Yn.NumProperty=Yn.BoolProperty=Yn.StringProperty=Yn.PropertyDefinition=Yn.BaseSerializationContext=Yn.isVersionLessOrEqual=Yn.Versions=Yn.Version=void 0;var er=zn,tr=Hn,nr=Rn,rr=Zn,or=function(){function e(e,t,n){void 0===e&&(e=1),void 0===t&&(t=1),this._isValid=!0,this._major=e,this._minor=t,this._label=n}return e.parse=function(t,n){if(t){var r=new e;r._versionString=t;var o=/(\d+).(\d+)/gi.exec(t);return null!=o&&3===o.length?(r._major=parseInt(o[1]),r._minor=parseInt(o[2])):r._isValid=!1,r._isValid||n.logParseEvent(void 0,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidVersionString(r._versionString)),r}},e.prototype.toString=function(){return this._isValid?this._major+"."+this._minor:this._versionString},e.prototype.toJSON=function(){return this.toString()},e.prototype.compareTo=function(e){if(!this.isValid||!e.isValid)throw new Error("Cannot compare invalid version.");return this.major>e.major?1:this.major<e.major?-1:this.minor>e.minor?1:this.minor<e.minor?-1:0},Object.defineProperty(e.prototype,"label",{get:function(){return this._label?this._label:this.toString()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"major",{get:function(){return this._major},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"minor",{get:function(){return this._minor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isValid",{get:function(){return this._isValid},enumerable:!1,configurable:!0}),e}();Yn.Version=or;var ir=function(){function e(){}return e.getAllDeclaredVersions=function(){var t=e,n=[];for(var r in t)if(r.match(/^v[0-9_]*$/))try{var o=t[r];o instanceof or&&n.push(o)}catch(i){}return n.sort(function(e,t){return e.compareTo(t)})},e.v1_0=new or(1,0),e.v1_1=new or(1,1),e.v1_2=new or(1,2),e.v1_3=new or(1,3),e.v1_4=new or(1,4),e.v1_5=new or(1,5),e.v1_6=new or(1,6,"1.6 Preview"),e.latest=e.v1_5,e}();Yn.Versions=ir,Yn.isVersionLessOrEqual=function(e,t){return!(e instanceof or)||(!(t instanceof or)||t.compareTo(e)>=0)};var ar=function(){function e(e){void 0===e&&(e=ir.latest),this._validationEvents=[],this.targetVersion=e}return e.prototype.isTemplateString=function(e){return"string"==typeof e&&e.startsWith("${")},e.prototype.tryDeleteValue=function(e,t){er.GlobalSettings.enableFullJsonRoundTrip||delete e[t]},e.prototype.tryDeleteDefaultValue=function(e,t){er.GlobalSettings.enableFullJsonRoundTrip&&this.isTemplateString(e[t])||delete e[t]},e.prototype.serializeValue=function(e,t,n,r,o){void 0===r&&(r=void 0),void 0===o&&(o=!1),null==n?er.GlobalSettings.enableFullJsonRoundTrip&&!o||delete e[t]:n===r?er.GlobalSettings.enableFullJsonRoundTrip&&!o&&this.isTemplateString(e[t])||delete e[t]:e[t]=n},e.prototype.serializeString=function(e,t,n,r){null==n?this.tryDeleteValue(e,t):n===r?this.tryDeleteDefaultValue(e,t):e[t]=n},e.prototype.serializeBool=function(e,t,n,r){null==n?this.tryDeleteValue(e,t):n===r?this.tryDeleteDefaultValue(e,t):e[t]=n},e.prototype.serializeNumber=function(e,t,n,r){null==n||isNaN(n)?this.tryDeleteValue(e,t):n===r?this.tryDeleteDefaultValue(e,t):e[t]=n},e.prototype.serializeEnum=function(e,t,n,r,o){void 0===o&&(o=void 0),null==r?this.tryDeleteValue(t,n):r===o?this.tryDeleteDefaultValue(t,n):t[n]=e[r]},e.prototype.serializeArray=function(e,t,n){var r=[];if(n)for(var o=0,i=n;o<i.length;o++){var a=i[o],s=void 0;void 0!==(s=a instanceof xr?a.toJSON(this):a.toJSON?a.toJSON():a)&&r.push(s)}0===r.length?e.hasOwnProperty(t)&&Array.isArray(e[t])&&delete e[t]:this.serializeValue(e,t,r)},e.prototype.clearEvents=function(){this._validationEvents=[]},e.prototype.logEvent=function(e,t,n,r){this._validationEvents.push({source:e,phase:t,event:n,message:r})},e.prototype.logParseEvent=function(e,t,n){this.logEvent(e,nr.ValidationPhase.Parse,t,n)},e.prototype.getEventAt=function(e){return this._validationEvents[e]},Object.defineProperty(e.prototype,"eventCount",{get:function(){return this._validationEvents.length},enumerable:!1,configurable:!0}),e}();Yn.BaseSerializationContext=ar;var sr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t}(ar),lr=function(){function e(t,n,r,o){this.targetVersion=t,this.name=n,this.defaultValue=r,this.onGetInitialValue=o,this.isSerializationEnabled=!0,this.sequentialNumber=e._sequentialNumber,e._sequentialNumber++}return e.prototype.getInternalName=function(){return this.name},e.prototype.parse=function(e,t,n){return t[this.name]},e.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,n,this.defaultValue)},e._sequentialNumber=0,e}();Yn.PropertyDefinition=lr;var cr=function(e){function t(t,n,r,o,i,a){void 0===r&&(r=!0);var s=e.call(this,t,n,i,a)||this;return s.targetVersion=t,s.name=n,s.treatEmptyAsUndefined=r,s.regEx=o,s.defaultValue=i,s.onGetInitialValue=a,s}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=tr.parseString(t[this.name],this.defaultValue);if(!(void 0===r||""===r&&this.treatEmptyAsUndefined)&&void 0!==this.regEx&&!this.regEx.exec(r))return void n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(r,this.name));return r},t.prototype.toJSON=function(e,t,n,r){r.serializeString(t,this.name,""===n&&this.treatEmptyAsUndefined?void 0:n,this.defaultValue)},t}(lr);Yn.StringProperty=cr;var ur=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r,o)||this;return i.targetVersion=t,i.name=n,i.defaultValue=r,i.onGetInitialValue=o,i}return Kn(t,e),t.prototype.parse=function(e,t,n){return tr.parseBool(t[this.name],this.defaultValue)},t.prototype.toJSON=function(e,t,n,r){r.serializeBool(t,this.name,n,this.defaultValue)},t}(lr);Yn.BoolProperty=ur;var dr=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r,o)||this;return i.targetVersion=t,i.name=n,i.defaultValue=r,i.onGetInitialValue=o,i}return Kn(t,e),t.prototype.parse=function(e,t,n){return tr.parseNumber(t[this.name],this.defaultValue)},t.prototype.toJSON=function(e,t,n,r){r.serializeNumber(t,this.name,n,this.defaultValue)},t}(lr);Yn.NumProperty=dr;var pr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=void 0,o=t[this.name];if("string"==typeof o){var i=!1;try{var a=er.SizeAndUnit.parse(o,!0);a.unit===nr.SizeUnit.Pixel&&(r=a.physicalSize,i=!0)}catch(s){}i||n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(t[this.name],this.name))}return r},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,"number"!=typeof n||isNaN(n)?void 0:n+"px")},t}(lr);Yn.PixelSizeProperty=pr;var hr=function(e){function t(t,n,r,o){var i=e.call(this,t,n,r,o)||this;return i.targetVersion=t,i.name=n,i.defaultValue=r,i.onGetInitialValue=o,i}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=t[this.name];if(void 0===r||!Array.isArray(r))return this.defaultValue;for(var o=[],i=0,a=r;i<a.length;i++){var s=a[i];"string"==typeof s?o.push(s):n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,'Invalid array value "'.concat(JSON.stringify(s),'" of type "').concat(typeof s,'" ignored for "').concat(this.name,'".'))}return o},t.prototype.toJSON=function(e,t,n,r){r.serializeArray(t,this.name,n)},t}(lr);Yn.StringArrayProperty=hr;var mr=function(e){function t(t,n,r,o,i){var a=e.call(this,t,n,o,i)||this;return a.targetVersion=t,a.name=n,a.values=r,a.defaultValue=o,a.onGetInitialValue=i,a}return Kn(t,e),t.prototype.isValidValue=function(e,t){for(var n=0,r=this.values;n<r.length;n++){var o=r[n];if(e.toLowerCase()===o.value.toLowerCase())return(o.targetVersion?o.targetVersion:this.targetVersion).compareTo(t.targetVersion)<=0}return!1},t.prototype.parse=function(e,t,n){var r=t[this.name];if(void 0===r)return this.defaultValue;if("string"==typeof r)for(var o=0,i=this.values;o<i.length;o++){var a=i[o];if(r.toLowerCase()===a.value.toLowerCase()){var s=a.targetVersion?a.targetVersion:this.targetVersion;return s.compareTo(n.targetVersion)<=0?a.value:(n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.propertyValueNotSupported(r,this.name,s.toString(),n.targetVersion.toString())),this.defaultValue)}}return n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(r,this.name)),this.defaultValue},t.prototype.toJSON=function(e,t,n,r){var o=!1;if(void 0!==n){o=!0;for(var i=0,a=this.values;i<a.length;i++){var s=a[i];if(s.value===n){var l=s.targetVersion?s.targetVersion:this.targetVersion;if(l.compareTo(r.targetVersion)<=0){o=!1;break}r.logEvent(e,nr.ValidationPhase.ToJSON,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.propertyValueNotSupported(n,this.name,l.toString(),r.targetVersion.toString()))}}}o||r.serializeValue(t,this.name,n,this.defaultValue,!0)},t}(lr);Yn.ValueSetProperty=mr;var fr=function(e){function t(t,n,r,o,i,a){var s=e.call(this,t,n,o,a)||this;if(s.targetVersion=t,s.name=n,s.enumType=r,s.defaultValue=o,s.onGetInitialValue=a,s._values=[],i)s._values=i;else for(var l in r){var c=parseInt(l,10);c>=0&&s._values.push({value:c})}return s}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=t[this.name];if("string"!=typeof r)return this.defaultValue;var o=tr.getEnumValueByName(this.enumType,r);if(void 0!==o)for(var i=0,a=this.values;i<a.length;i++){var s=a[i];if(s.value===o){var l=s.targetVersion?s.targetVersion:this.targetVersion;return l.compareTo(n.targetVersion)<=0?o:(n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.propertyValueNotSupported(r,this.name,l.toString(),n.targetVersion.toString())),this.defaultValue)}}return n.logParseEvent(e,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(r,this.name)),this.defaultValue},t.prototype.toJSON=function(e,t,n,r){var o=!1;if(void 0!==n){o=!0;for(var i=0,a=this.values;i<a.length;i++){var s=a[i];if(s.value===n){if((s.targetVersion?s.targetVersion:this.targetVersion).compareTo(r.targetVersion)<=0){o=!1;break}r.logEvent(e,nr.ValidationPhase.ToJSON,nr.ValidationEvent.InvalidPropertyValue,rr.Strings.errors.invalidPropertyValue(n,this.name))}}}o||r.serializeEnum(this.enumType,t,this.name,n,this.defaultValue)},Object.defineProperty(t.prototype,"values",{get:function(){return this._values},enumerable:!1,configurable:!0}),t}(lr);Yn.EnumProperty=fr;var gr=function(e){function t(t,n,r,o,i){void 0===o&&(o=!1);var a=e.call(this,t,n,i,function(e){return a.nullable?void 0:new a.objectType})||this;return a.targetVersion=t,a.name=n,a.objectType=r,a.nullable=o,a}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=t[this.name];if(void 0===r)return this.onGetInitialValue?this.onGetInitialValue(e):this.defaultValue;var o=new this.objectType;return o.parse(r,n),o},t.prototype.toJSON=function(e,t,n,r){var o=void 0;void 0===n||n.hasAllDefaultValues()||(o=n.toJSON(r)),"object"==typeof o&&0===Object.keys(o).length&&(o=void 0),r.serializeValue(t,this.name,o,this.defaultValue,!0)},t}(lr);Yn.SerializableObjectProperty=gr;var yr=function(e){function t(t,n,r,o){var i=e.call(this,t,n,void 0,function(e){return[]})||this;return i.targetVersion=t,i.name=n,i.objectType=r,i.onItemAdded=o,i}return Kn(t,e),t.prototype.parse=function(e,t,n){var r=[],o=t[this.name];if(Array.isArray(o))for(var i=0,a=o;i<a.length;i++){var s=a[i],l=new this.objectType;l.parse(s,n),r.push(l),this.onItemAdded&&this.onItemAdded(e,l)}return r.length>0?r:this.onGetInitialValue?this.onGetInitialValue(e):void 0},t.prototype.toJSON=function(e,t,n,r){r.serializeArray(t,this.name,n)},t}(lr);Yn.SerializableObjectCollectionProperty=yr;var vr=function(e){function t(t,n,r,o,i,a){var s=e.call(this,t,n,i,a)||this;if(s.targetVersion=t,s.name=n,s.onParse=r,s.onToJSON=o,s.defaultValue=i,s.onGetInitialValue=a,!s.onParse)throw new Error("CustomPropertyDefinition instances must have an onParse handler.");if(!s.onToJSON)throw new Error("CustomPropertyDefinition instances must have an onToJSON handler.");return s}return Kn(t,e),t.prototype.parse=function(e,t,n){return this.onParse(e,this,t,n)},t.prototype.toJSON=function(e,t,n,r){this.onToJSON(e,this,t,n,r)},t}(lr);Yn.CustomProperty=vr;var br=function(){function e(){this._properties=[]}return e.prototype.indexOf=function(e){for(var t=0;t<this._properties.length;t++)if(this._properties[t]===e)return t;return-1},e.prototype.add=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++){var o=r[n];-1===this.indexOf(o)&&this._properties.push(o)}},e.prototype.remove=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=0,r=e;n<r.length;n++)for(var o=r[n];;){var i=this.indexOf(o);if(!(i>=0))break;this._properties.splice(i,1)}},e.prototype.getItemAt=function(e){return this._properties[e]},e.prototype.getCount=function(){return this._properties.length},e}();Yn.SerializableObjectSchema=br,Yn.property=function(e){return function(t,n){var r=Object.getOwnPropertyDescriptor(t,n)||{};r.get||r.set||(r.get=function(){return this.getValue(e)},r.set=function(t){this.setValue(e,t)},Object.defineProperty(t,n,r))}};var xr=function(){function e(){this._propertyBag={},this._rawProperties={},this.maxVersion=e.defaultMaxVersion;for(var t=this.getSchema(),n=0;n<t.getCount();n++){var r=t.getItemAt(n);r.onGetInitialValue&&this.setValue(r,r.onGetInitialValue(this))}}return e.prototype.getDefaultSerializationContext=function(){return new sr},e.prototype.populateSchema=function(t){var n=this.constructor,r=[];for(var o in n)try{var i=n[o];i instanceof lr&&r.push(i)}catch(s){}if(r.length>0){var a=r.sort(function(e,t){return e.sequentialNumber>t.sequentialNumber?1:e.sequentialNumber<t.sequentialNumber?-1:0});t.add.apply(t,a)}e.onRegisterCustomProperties&&e.onRegisterCustomProperties(this,t)},e.prototype.getValue=function(e){return this._propertyBag.hasOwnProperty(e.getInternalName())?this._propertyBag[e.getInternalName()]:e.defaultValue},e.prototype.setValue=function(e,t){null==t?delete this._propertyBag[e.getInternalName()]:this._propertyBag[e.getInternalName()]=t},e.prototype.internalParse=function(e,t){if(this._propertyBag={},this._rawProperties=er.GlobalSettings.enableFullJsonRoundTrip&&e||{},e)for(var n=this.getSchema(),r=0;r<n.getCount();r++){var o=n.getItemAt(r);if(o.isSerializationEnabled){var i=o.onGetInitialValue?o.onGetInitialValue(this):void 0;e.hasOwnProperty(o.name)&&(o.targetVersion.compareTo(t.targetVersion)<=0?i=o.parse(this,e,t):t.logParseEvent(this,nr.ValidationEvent.UnsupportedProperty,rr.Strings.errors.propertyNotSupported(o.name,o.targetVersion.toString(),t.targetVersion.toString()))),this.setValue(o,i)}}else this.resetDefaultValues()},e.prototype.internalToJSON=function(e,t){for(var n=this.getSchema(),r=[],o=0;o<n.getCount();o++){var i=n.getItemAt(o);i.isSerializationEnabled&&i.targetVersion.compareTo(t.targetVersion)<=0&&-1===r.indexOf(i.name)&&(i.toJSON(this,e,this.getValue(i),t),r.push(i.name))}},e.prototype.shouldSerialize=function(e){return!0},e.prototype.parse=function(e,t){this.internalParse(e,t||new sr)},e.prototype.toJSON=function(e){var t;if(e&&e instanceof ar?t=e:(t=this.getDefaultSerializationContext()).toJSONOriginalParam=e,this.shouldSerialize(t)){var n=void 0;return n=er.GlobalSettings.enableFullJsonRoundTrip&&this._rawProperties&&"object"==typeof this._rawProperties?this._rawProperties:{},this.internalToJSON(n,t),n}},e.prototype.hasDefaultValue=function(e){return this.getValue(e)===e.defaultValue},e.prototype.hasAllDefaultValues=function(){for(var e=this.getSchema(),t=0;t<e.getCount();t++){var n=e.getItemAt(t);if(!this.hasDefaultValue(n))return!1}return!0},e.prototype.resetDefaultValues=function(){for(var e=this.getSchema(),t=0;t<e.getCount();t++){var n=e.getItemAt(t);this.setValue(n,n.defaultValue)}},e.prototype.setCustomProperty=function(e,t){"string"==typeof t&&!t||null==t?delete this._rawProperties[e]:this._rawProperties[e]=t},e.prototype.getCustomProperty=function(e){return this._rawProperties[e]},e.prototype.getSchema=function(){var t=e._schemaCache[this.getSchemaKey()];return t||(t=new br,this.populateSchema(t),e._schemaCache[this.getSchemaKey()]=t),t},e.defaultMaxVersion=ir.latest,e._schemaCache={},e}();Yn.SerializableObject=xr;var Cr=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.HostCapabilities=void 0;var wr=Yn,Sr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._capabilities={},t}return Cr(t,e),t.prototype.getSchemaKey=function(){return"HostCapabilities"},t.prototype.internalParse=function(t,n){if(e.prototype.internalParse.call(this,t,n),t)for(var r in t){var o=t[r];if("string"==typeof o)if("*"===o)this.addCapability(r,"*");else{var i=wr.Version.parse(o,n);(null==i?void 0:i.isValid)&&this.addCapability(r,i)}}},t.prototype.internalToJSON=function(t,n){for(var r in e.prototype.internalToJSON.call(this,t,n),this._capabilities)t[r]=this._capabilities[r]},t.prototype.addCapability=function(e,t){this._capabilities[e]=t},t.prototype.removeCapability=function(e){delete this._capabilities[e]},t.prototype.clear=function(){this._capabilities={}},t.prototype.hasCapability=function(e,t){return!!this._capabilities.hasOwnProperty(e)&&("*"===t||"*"===this._capabilities[e]||t.compareTo(this._capabilities[e])<=0)},t.prototype.areAllMet=function(e){for(var t in this._capabilities)if(!e.hasCapability(t,this._capabilities[t]))return!1;return!0},t}(wr.SerializableObject);Xn.HostCapabilities=Sr;var kr=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(qn,"__esModule",{value:!0}),qn.defaultHostConfig=qn.HostConfig=qn.CarouselConfig=qn.FontTypeSet=qn.FontTypeDefinition=qn.ContainerStyleSet=qn.ContainerStyleDefinition=qn.ColorSetDefinition=qn.ActionsConfig=qn.ShowCardActionConfig=qn.FactSetConfig=qn.FactTitleDefinition=qn.FactTextDefinition=qn.InputConfig=qn.InputLabelConfig=qn.RequiredInputLabelTextDefinition=qn.TextBlockConfig=qn.TextStyleSet=qn.TextStyleDefinition=qn.BaseTextDefinition=qn.TableConfig=qn.MediaConfig=qn.ImageSetConfig=qn.AdaptiveCardConfig=qn.TextColorDefinition=qn.ColorDefinition=void 0;var Pr=Rn,Er=Hn,Ar=zn,Ir=Xn;function _r(e,t,n){if("string"==typeof t){var r=Er.parseEnum(e,t,n);return void 0!==r?r:n}return"number"==typeof t?t:n}var Tr=function(){function e(e,t){this.default="#000000",this.subtle="#666666",e&&(this.default=e),t&&(this.subtle=t)}return e.prototype.parse=function(e){e&&(this.default=e.default||this.default,this.subtle=e.subtle||this.subtle)},e}();qn.ColorDefinition=Tr;var jr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.highlightColors=new Tr("#22000000","#11000000"),t}return kr(t,e),t.prototype.parse=function(t){e.prototype.parse.call(this,t),t&&this.highlightColors.parse(t.highlightColors)},t}(Tr);qn.TextColorDefinition=jr;var Mr=function(){return function(e){this.allowCustomStyle=!1,e&&(this.allowCustomStyle=e.allowCustomStyle||this.allowCustomStyle)}}();qn.AdaptiveCardConfig=Mr;var Nr=function(){function e(e){this.imageSize=Pr.Size.Medium,this.maxImageHeight=100,e&&(this.imageSize=null!=e.imageSize?e.imageSize:this.imageSize,this.maxImageHeight=Er.parseNumber(e.maxImageHeight,100))}return e.prototype.toJSON=function(){return{imageSize:Pr.Size[this.imageSize],maxImageHeight:this.maxImageHeight}},e}();qn.ImageSetConfig=Nr;var Dr=function(){function e(e){this.allowInlinePlayback=!0,e&&(this.defaultPoster=e.defaultPoster,this.allowInlinePlayback=e.allowInlinePlayback||this.allowInlinePlayback)}return e.prototype.toJSON=function(){return{defaultPoster:this.defaultPoster,allowInlinePlayback:this.allowInlinePlayback}},e}();qn.MediaConfig=Dr;var Or=function(){function e(e){this.cellSpacing=8,e&&(this.cellSpacing=e.cellSpacing&&"number"==typeof e.cellSpacing?e.cellSpacing:this.cellSpacing)}return e.prototype.toJSON=function(){return{cellSpacing:this.cellSpacing}},e}();qn.TableConfig=Or;var Vr=function(){function e(e){this.size=Pr.TextSize.Default,this.color=Pr.TextColor.Default,this.isSubtle=!1,this.weight=Pr.TextWeight.Default,this.parse(e)}return e.prototype.parse=function(e){e&&(this.size=_r(Pr.TextSize,e.size,this.size),this.color=_r(Pr.TextColor,e.color,this.color),this.isSubtle=void 0!==e.isSubtle&&"boolean"==typeof e.isSubtle?e.isSubtle:this.isSubtle,this.weight=_r(Pr.TextWeight,e.weight,this.getDefaultWeight()))},e.prototype.getDefaultWeight=function(){return Pr.TextWeight.Default},e.prototype.toJSON=function(){return{size:Pr.TextSize[this.size],color:Pr.TextColor[this.color],isSubtle:this.isSubtle,weight:Pr.TextWeight[this.weight]}},e}();qn.BaseTextDefinition=Vr;var Br=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.fontType=Pr.FontType.Default,t}return kr(t,e),t.prototype.parse=function(t){e.prototype.parse.call(this,t),t&&(this.fontType=_r(Pr.FontType,t.fontType,this.fontType))},t}(Vr);qn.TextStyleDefinition=Br;var Rr=function(){function e(e){this.default=new Br,this.heading=new Br({size:"Large",weight:"Bolder"}),this.columnHeader=new Br({weight:"Bolder"}),e&&(this.heading.parse(e.heading),this.columnHeader.parse(e.columnHeader))}return e.prototype.getStyleByName=function(e){switch(e.toLowerCase()){case"heading":return this.heading;case"columnHeader":return this.columnHeader;default:return this.default}},e}();qn.TextStyleSet=Rr;var zr=function(){return function(e){e&&(this.headingLevel=Er.parseNumber(e.headingLevel))}}();qn.TextBlockConfig=zr;var Lr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.suffix=" *",t.suffixColor=Pr.TextColor.Attention,t}return kr(t,e),t.prototype.parse=function(t){e.prototype.parse.call(this,t),t&&(this.suffix=t.suffix||this.suffix,this.suffixColor=_r(Pr.TextColor,t.suffixColor,this.suffixColor))},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.suffix=this.suffix,t.suffixColor=Pr.TextColor[this.suffixColor],t},t}(Vr);qn.RequiredInputLabelTextDefinition=Lr;var Hr=function(){return function(e){this.inputSpacing=Pr.Spacing.Small,this.width=30,this.requiredInputs=new Lr,this.optionalInputs=new Vr,e&&(this.inputSpacing=_r(Pr.Spacing,e.inputSpacing,this.inputSpacing),this.requiredInputs=new Lr(e.requiredInputs),this.optionalInputs=new Vr(e.optionalInputs),this.width=null!=e.width?e.width:this.width)}}();qn.InputLabelConfig=Hr;var Fr=function(){return function(e){this.label=new Hr,this.errorMessage=new Vr({color:Pr.TextColor.Attention}),this.debounceTimeInMilliSeconds=0,this.allowRevealOnHoverStyle=!1,e&&(this.label=new Hr(e.label),this.errorMessage=new Vr(e.errorMessage),this.allowRevealOnHoverStyle=e.allowRevealOnHoverStyle||this.allowRevealOnHoverStyle,this.debounceTimeInMilliSeconds=e.debounceTimeInMilliSeconds)}}();qn.InputConfig=Fr;var Wr=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.wrap=!0,t}return kr(t,e),t.prototype.parse=function(t){e.prototype.parse.call(this,t),t&&(this.wrap=null!=t.wrap?t.wrap:this.wrap)},t.prototype.toJSON=function(){var t=e.prototype.toJSON.call(this);return t.wrap=this.wrap,t},t}(Vr);qn.FactTextDefinition=Wr;var $r=function(e){function t(t){var n=e.call(this,t)||this;return n.maxWidth=150,n.weight=Pr.TextWeight.Bolder,t&&(n.maxWidth=null!=t.maxWidth?t.maxWidth:n.maxWidth,n.weight=_r(Pr.TextWeight,t.weight,Pr.TextWeight.Bolder)),n}return kr(t,e),t.prototype.getDefaultWeight=function(){return Pr.TextWeight.Bolder},t}(Wr);qn.FactTitleDefinition=$r;var Ur=function(){return function(e){this.title=new $r,this.value=new Wr,this.spacing=10,e&&(this.title=new $r(e.title),this.value=new Wr(e.value),this.spacing=e.spacing&&null!=e.spacing?e.spacing&&e.spacing:this.spacing)}}();qn.FactSetConfig=Ur;var Jr=function(){function e(e){this.actionMode=Pr.ShowCardActionMode.Inline,this.inlineTopMargin=16,this.style=Pr.ContainerStyle.Emphasis,e&&(this.actionMode=_r(Pr.ShowCardActionMode,e.actionMode,Pr.ShowCardActionMode.Inline),this.inlineTopMargin=null!=e.inlineTopMargin?e.inlineTopMargin:this.inlineTopMargin,this.style=e.style&&"string"==typeof e.style?e.style:Pr.ContainerStyle.Emphasis)}return e.prototype.toJSON=function(){return{actionMode:Pr.ShowCardActionMode[this.actionMode],inlineTopMargin:this.inlineTopMargin,style:this.style}},e}();qn.ShowCardActionConfig=Jr;var Gr=function(){function e(e){if(this.maxActions=5,this.spacing=Pr.Spacing.Default,this.buttonSpacing=20,this.showCard=new Jr,this.preExpandSingleShowCardAction=!1,this.actionsOrientation=Pr.Orientation.Horizontal,this.actionAlignment=Pr.ActionAlignment.Left,this.iconPlacement=Pr.ActionIconPlacement.LeftOfTitle,this.allowTitleToWrap=!1,this.iconSize=16,e){this.maxActions=null!=e.maxActions?e.maxActions:this.maxActions,this.spacing=_r(Pr.Spacing,e.spacing&&e.spacing,Pr.Spacing.Default),this.buttonSpacing=null!=e.buttonSpacing?e.buttonSpacing:this.buttonSpacing,this.showCard=new Jr(e.showCard),this.preExpandSingleShowCardAction=Er.parseBool(e.preExpandSingleShowCardAction,!1),this.actionsOrientation=_r(Pr.Orientation,e.actionsOrientation,Pr.Orientation.Horizontal),this.actionAlignment=_r(Pr.ActionAlignment,e.actionAlignment,Pr.ActionAlignment.Left),this.iconPlacement=_r(Pr.ActionIconPlacement,e.iconPlacement,Pr.ActionIconPlacement.LeftOfTitle),this.allowTitleToWrap=null!=e.allowTitleToWrap?e.allowTitleToWrap:this.allowTitleToWrap;try{var t=Ar.SizeAndUnit.parse(e.iconSize);t.unit===Pr.SizeUnit.Pixel&&(this.iconSize=t.physicalSize)}catch(n){}}}return e.prototype.toJSON=function(){return{maxActions:this.maxActions,spacing:Pr.Spacing[this.spacing],buttonSpacing:this.buttonSpacing,showCard:this.showCard,preExpandSingleShowCardAction:this.preExpandSingleShowCardAction,actionsOrientation:Pr.Orientation[this.actionsOrientation],actionAlignment:Pr.ActionAlignment[this.actionAlignment]}},e}();qn.ActionsConfig=Gr;var qr=function(){function e(e){this.default=new jr,this.dark=new jr,this.light=new jr,this.accent=new jr,this.good=new jr,this.warning=new jr,this.attention=new jr,this.parse(e)}return e.prototype.parseSingleColor=function(e,t){e&&this[t].parse(e[t])},e.prototype.parse=function(e){e&&(this.parseSingleColor(e,"default"),this.parseSingleColor(e,"dark"),this.parseSingleColor(e,"light"),this.parseSingleColor(e,"accent"),this.parseSingleColor(e,"good"),this.parseSingleColor(e,"warning"),this.parseSingleColor(e,"attention"))},e}();qn.ColorSetDefinition=qr;var Xr=function(){function e(e){this.foregroundColors=new qr({default:{default:"#333333",subtle:"#EE333333"},dark:{default:"#000000",subtle:"#66000000"},light:{default:"#FFFFFF",subtle:"#33000000"},accent:{default:"#2E89FC",subtle:"#882E89FC"},good:{default:"#028A02",subtle:"#DD027502"},warning:{default:"#E69500",subtle:"#DDE69500"},attention:{default:"#CC3300",subtle:"#DDCC3300"}}),this.parse(e)}return e.prototype.parse=function(e){e&&(this.backgroundColor=e.backgroundColor,this.foregroundColors.parse(e.foregroundColors),this.highlightBackgroundColor=e.highlightBackgroundColor,this.highlightForegroundColor=e.highlightForegroundColor,this.borderColor=e.borderColor)},Object.defineProperty(e.prototype,"isBuiltIn",{get:function(){return!1},enumerable:!1,configurable:!0}),e}();qn.ContainerStyleDefinition=Xr;var Yr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return kr(t,e),Object.defineProperty(t.prototype,"isBuiltIn",{get:function(){return!0},enumerable:!1,configurable:!0}),t}(Xr),Zr=function(){function e(e){if(this._allStyles={},this._allStyles[Pr.ContainerStyle.Default]=new Yr,this._allStyles[Pr.ContainerStyle.Emphasis]=new Yr,this._allStyles[Pr.ContainerStyle.Accent]=new Yr,this._allStyles[Pr.ContainerStyle.Good]=new Yr,this._allStyles[Pr.ContainerStyle.Attention]=new Yr,this._allStyles[Pr.ContainerStyle.Warning]=new Yr,e){this._allStyles[Pr.ContainerStyle.Default].parse(e[Pr.ContainerStyle.Default]),this._allStyles[Pr.ContainerStyle.Emphasis].parse(e[Pr.ContainerStyle.Emphasis]),this._allStyles[Pr.ContainerStyle.Accent].parse(e[Pr.ContainerStyle.Accent]),this._allStyles[Pr.ContainerStyle.Good].parse(e[Pr.ContainerStyle.Good]),this._allStyles[Pr.ContainerStyle.Attention].parse(e[Pr.ContainerStyle.Attention]),this._allStyles[Pr.ContainerStyle.Warning].parse(e[Pr.ContainerStyle.Warning]);var t=e.customStyles;if(t&&Array.isArray(t))for(var n=0,r=t;n<r.length;n++){var o=r[n];if(o){var i=o.name;i&&"string"==typeof i&&(this._allStyles.hasOwnProperty(i)?this._allStyles[i].parse(o.style):this._allStyles[i]=new Xr(o.style))}}}}return e.prototype.toJSON=function(){var e=this,t=[];Object.keys(this._allStyles).forEach(function(n){e._allStyles[n].isBuiltIn||t.push({name:n,style:e._allStyles[n]})});var n={default:this.default,emphasis:this.emphasis};return t.length>0&&(n.customStyles=t),n},e.prototype.getStyleByName=function(e,t){return e&&this._allStyles.hasOwnProperty(e)?this._allStyles[e]:t||this._allStyles[Pr.ContainerStyle.Default]},Object.defineProperty(e.prototype,"default",{get:function(){return this._allStyles[Pr.ContainerStyle.Default]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"emphasis",{get:function(){return this._allStyles[Pr.ContainerStyle.Emphasis]},enumerable:!1,configurable:!0}),e}();qn.ContainerStyleSet=Zr;var Qr=function(){function e(e){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},e&&(this.fontFamily=e)}return e.prototype.parse=function(e){this.fontFamily=e.fontFamily||this.fontFamily,this.fontSizes={small:e.fontSizes&&e.fontSizes.small||this.fontSizes.small,default:e.fontSizes&&e.fontSizes.default||this.fontSizes.default,medium:e.fontSizes&&e.fontSizes.medium||this.fontSizes.medium,large:e.fontSizes&&e.fontSizes.large||this.fontSizes.large,extraLarge:e.fontSizes&&e.fontSizes.extraLarge||this.fontSizes.extraLarge},this.fontWeights={lighter:e.fontWeights&&e.fontWeights.lighter||this.fontWeights.lighter,default:e.fontWeights&&e.fontWeights.default||this.fontWeights.default,bolder:e.fontWeights&&e.fontWeights.bolder||this.fontWeights.bolder}},e.monospace=new e("'Courier New', Courier, monospace"),e}();qn.FontTypeDefinition=Qr;var Kr=function(){function e(e){this.default=new Qr,this.monospace=new Qr("'Courier New', Courier, monospace"),e&&(this.default.parse(e.default),this.monospace.parse(e.monospace))}return e.prototype.getStyleDefinition=function(e){switch(e){case Pr.FontType.Monospace:return this.monospace;case Pr.FontType.Default:default:return this.default}},e}();qn.FontTypeSet=Kr;var eo=function(){function e(e){this.maxCarouselPages=10,this.minAutoplayDelay=5e3,e&&(this.maxCarouselPages=null!=e.maxCarouselPages?e.maxCarouselPages:this.maxCarouselPages,this.minAutoplayDelay=null!=e.minAutoplayDelay?e.minAutoplayDelay:this.minAutoplayDelay)}return e.prototype.toJSON=function(){return{maxCarouselPages:this.maxCarouselPages,minAutoplayDelay:this.minAutoplayDelay}},e}();qn.CarouselConfig=eo;var to=function(){function e(e){this.hostCapabilities=new Ir.HostCapabilities,this.choiceSetInputValueSeparator=",",this.supportsInteractivity=!0,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 Zr,this.inputs=new Fr,this.actions=new Gr,this.adaptiveCard=new Mr,this.imageSet=new Nr,this.media=new Dr,this.factSet=new Ur,this.table=new Or,this.textStyles=new Rr,this.textBlock=new zr,this.carousel=new eo,this.alwaysAllowBleed=!1,e&&(("string"==typeof e||e instanceof String)&&(e=JSON.parse(e)),this.choiceSetInputValueSeparator=e&&"string"==typeof e.choiceSetInputValueSeparator?e.choiceSetInputValueSeparator:this.choiceSetInputValueSeparator,this.supportsInteractivity=e&&"boolean"==typeof e.supportsInteractivity?e.supportsInteractivity:this.supportsInteractivity,this._legacyFontType=new Qr,this._legacyFontType.parse(e),e.fontTypes&&(this.fontTypes=new Kr(e.fontTypes)),e.lineHeights&&(this.lineHeights={small:e.lineHeights.small,default:e.lineHeights.default,medium:e.lineHeights.medium,large:e.lineHeights.large,extraLarge:e.lineHeights.extraLarge}),this.imageSizes={small:e.imageSizes&&e.imageSizes.small||this.imageSizes.small,medium:e.imageSizes&&e.imageSizes.medium||this.imageSizes.medium,large:e.imageSizes&&e.imageSizes.large||this.imageSizes.large},this.containerStyles=new Zr(e.containerStyles),this.spacing={small:e.spacing&&e.spacing.small||this.spacing.small,default:e.spacing&&e.spacing.default||this.spacing.default,medium:e.spacing&&e.spacing.medium||this.spacing.medium,large:e.spacing&&e.spacing.large||this.spacing.large,extraLarge:e.spacing&&e.spacing.extraLarge||this.spacing.extraLarge,padding:e.spacing&&e.spacing.padding||this.spacing.padding},this.separator={lineThickness:e.separator&&e.separator.lineThickness||this.separator.lineThickness,lineColor:e.separator&&e.separator.lineColor||this.separator.lineColor},this.inputs=new Fr(e.inputs||this.inputs),this.actions=new Gr(e.actions||this.actions),this.adaptiveCard=new Mr(e.adaptiveCard||this.adaptiveCard),this.imageSet=new Nr(e.imageSet),this.factSet=new Ur(e.factSet),this.textStyles=new Rr(e.textStyles),this.textBlock=new zr(e.textBlock),this.carousel=new eo(e.carousel))}return e.prototype.getFontTypeDefinition=function(e){return this.fontTypes?this.fontTypes.getStyleDefinition(e):e===Pr.FontType.Monospace?Qr.monospace:this._legacyFontType},e.prototype.getEffectiveSpacing=function(e){switch(e){case Pr.Spacing.Small:return this.spacing.small;case Pr.Spacing.Default:return this.spacing.default;case Pr.Spacing.Medium:return this.spacing.medium;case Pr.Spacing.Large:return this.spacing.large;case Pr.Spacing.ExtraLarge:return this.spacing.extraLarge;case Pr.Spacing.Padding:return this.spacing.padding;default:return 0}},e.prototype.paddingDefinitionToSpacingDefinition=function(e){return new Ar.SpacingDefinition(this.getEffectiveSpacing(e.top),this.getEffectiveSpacing(e.right),this.getEffectiveSpacing(e.bottom),this.getEffectiveSpacing(e.left))},e.prototype.makeCssClassNames=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=[],r=0,o=e;r<o.length;r++){var i=o[r];n.push((this.cssClassNamePrefix?this.cssClassNamePrefix+"-":"")+i)}return n},e.prototype.makeCssClassName=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=this.makeCssClassNames.apply(this,e).join(" ");return n||""},Object.defineProperty(e.prototype,"fontFamily",{get:function(){return this._legacyFontType.fontFamily},set:function(e){this._legacyFontType.fontFamily=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontSizes",{get:function(){return this._legacyFontType.fontSizes},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fontWeights",{get:function(){return this._legacyFontType.fontWeights},enumerable:!1,configurable:!0}),e}();qn.HostConfig=to,qn.defaultHostConfig=new to({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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},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:"#028A02",subtle:"#DD027502"},warning:{default:"#e69500",subtle:"#DDe69500"}}}},inputs:{label:{requiredInputs:{weight:Pr.TextWeight.Bolder,suffix:" *",suffixColor:Pr.TextColor.Attention},optionalInputs:{weight:Pr.TextWeight.Bolder}},errorMessage:{color:Pr.TextColor.Attention,weight:Pr.TextWeight.Bolder},debounceTimeInMilliSeconds:250},actions:{maxActions:5,spacing:Pr.Spacing.Default,buttonSpacing:10,showCard:{actionMode:Pr.ShowCardActionMode.Inline,inlineTopMargin:16},actionsOrientation:Pr.Orientation.Horizontal,actionAlignment:Pr.ActionAlignment.Left},adaptiveCard:{allowCustomStyle:!1},imageSet:{imageSize:Pr.Size.Medium,maxImageHeight:100},factSet:{title:{color:Pr.TextColor.Default,size:Pr.TextSize.Default,isSubtle:!1,weight:Pr.TextWeight.Bolder,wrap:!0,maxWidth:150},value:{color:Pr.TextColor.Default,size:Pr.TextSize.Default,isSubtle:!1,weight:Pr.TextWeight.Default,wrap:!0},spacing:10},carousel:{maxCarouselPages:10,minAutoplayDuration:5e3},textBlock:{headingLevel:2}});var no={},ro=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(no,"__esModule",{value:!0}),no.formatText=void 0;var oo=function(){function e(e){this._regularExpression=e}return e.prototype.format=function(e,t){var n;if(t){for(var r=t;null!=(n=this._regularExpression.exec(t));)r=r.replace(n[0],this.internalFormat(e,n));return r}return t},e}(),io=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ro(t,e),t.prototype.internalFormat=function(e,t){var n=new Date(Date.parse(t[1])),r=void 0!==t[2]?t[2].toLowerCase():"compact";return"compact"!==r?n.toLocaleDateString(e,{day:"numeric",weekday:r,month:r,year:"numeric"}):n.toLocaleDateString()},t}(oo),ao=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ro(t,e),t.prototype.internalFormat=function(e,t){return new Date(Date.parse(t[1])).toLocaleTimeString(e,{hour:"numeric",minute:"2-digit"})},t}(oo);no.formatText=function(e,t){for(var n=t,r=0,o=[new io(/\{{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 ao(/\{{2}TIME\((\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:Z|(?:(?:-|\+)\d{2}:\d{2})))\)\}{2}/g)];r<o.length;r++){n=o[r].format(e,n)}return n};var so={},lo=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),co=Vn&&Vn.__decorate||function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};Object.defineProperty(so,"__esModule",{value:!0}),so.CardObject=so.ValidationResults=void 0;var uo=Rn,po=Zn,ho=zn,mo=Xn,fo=Yn,go=function(){function e(){this.allIds={},this.validationEvents=[]}return e.prototype.addFailure=function(e,t,n){this.validationEvents.push({phase:uo.ValidationPhase.Validation,source:e,event:t,message:n})},e}();so.ValidationResults=go;var yo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._shouldFallback=!1,t}return lo(t,e),t.prototype.getSchemaKey=function(){return this.getJsonTypeName()},Object.defineProperty(t.prototype,"requires",{get:function(){return this.getValue(t.requiresProperty)},enumerable:!1,configurable:!0}),t.prototype.contains=function(e){return!!this._renderedElement&&this._renderedElement.contains(e)},t.prototype.preProcessPropertyValue=function(e,t){var n=void 0===t?this.getValue(e):t;if(ho.GlobalSettings.allowPreProcessingPropertyValues){for(var r=this;r&&!r.onPreProcessPropertyValue;)r=r.parent;if(r&&r.onPreProcessPropertyValue)return r.onPreProcessPropertyValue(this,e,n)}return n},t.prototype.setParent=function(e){this._parent=e},t.prototype.setShouldFallback=function(e){this._shouldFallback=e},t.prototype.shouldFallback=function(){return this._shouldFallback||!this.requires.areAllMet(this.hostConfig.hostCapabilities)},t.prototype.getRootObject=function(){for(var e=this;e.parent;)e=e.parent;return e},t.prototype.internalValidateProperties=function(e){this.id&&(e.allIds.hasOwnProperty(this.id)?(1===e.allIds[this.id]&&e.addFailure(this,uo.ValidationEvent.DuplicateId,po.Strings.errors.duplicateId(this.id)),e.allIds[this.id]+=1):e.allIds[this.id]=1)},t.prototype.validateProperties=function(){var e=new go;return this.internalValidateProperties(e),e},t.prototype.findDOMNodeOwner=function(e){return this.contains(e)?this:void 0},t.prototype.releaseDOMResources=function(){},Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedElement",{get:function(){return this._renderedElement},enumerable:!1,configurable:!0}),t.typeNameProperty=new fo.StringProperty(fo.Versions.v1_0,"type",void 0,void 0,void 0,function(e){return e.getJsonTypeName()}),t.idProperty=new fo.StringProperty(fo.Versions.v1_0,"id"),t.requiresProperty=new fo.SerializableObjectProperty(fo.Versions.v1_2,"requires",mo.HostCapabilities,!1,new mo.HostCapabilities),co([(0,fo.property)(t.idProperty)],t.prototype,"id",void 0),co([(0,fo.property)(t.requiresProperty)],t.prototype,"requires",null),t}(fo.SerializableObject);so.CardObject=yo;var vo={};Object.defineProperty(vo,"__esModule",{value:!0}),vo.GlobalRegistry=vo.CardObjectRegistry=void 0;var bo=Yn,xo=function(){function e(){this._items={}}return e.prototype.findByName=function(e){return this._items.hasOwnProperty(e)?this._items[e]:void 0},e.prototype.clear=function(){this._items={}},e.prototype.copyTo=function(e){for(var t=0,n=Object.keys(this._items);t<n.length;t++){var r=n[t],o=this._items[r];e.register(o.typeName,o.objectType,o.schemaVersion)}},e.prototype.register=function(e,t,n){void 0===n&&(n=bo.Versions.v1_0);var r=this.findByName(e);void 0!==r?r.objectType=t:r={typeName:e,objectType:t,schemaVersion:n},this._items[e]=r},e.prototype.unregister=function(e){delete this._items[e]},e.prototype.createInstance=function(e,t){var n=this.findByName(e);return n&&n.schemaVersion.compareTo(t)<=0?new n.objectType:void 0},e.prototype.getItemCount=function(){return Object.keys(this._items).length},e.prototype.getItemAt=function(e){var t=this;return Object.keys(this._items).map(function(e){return t._items[e]})[e]},e}();vo.CardObjectRegistry=xo;var Co=function(){function e(){}return e.populateWithDefaultElements=function(t){t.clear(),e.defaultElements.copyTo(t)},e.populateWithDefaultActions=function(t){t.clear(),e.defaultActions.copyTo(t)},Object.defineProperty(e,"elements",{get:function(){return e._elements||(e._elements=new xo,e.populateWithDefaultElements(e._elements)),e._elements},enumerable:!1,configurable:!0}),Object.defineProperty(e,"actions",{get:function(){return e._actions||(e._actions=new xo,e.populateWithDefaultActions(e._actions)),e._actions},enumerable:!1,configurable:!0}),e.reset=function(){e._elements=void 0,e._actions=void 0},e.defaultElements=new xo,e.defaultActions=new xo,e}();vo.GlobalRegistry=Co;var wo={},So={},ko={};Object.defineProperty(ko,"__esModule",{value:!0}),ko.Constants=void 0;var Po=function(){function e(){}return e.keys={tab:"Tab",enter:"Enter",escape:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",delete:"Delete"},e}();ko.Constants=Po,Object.defineProperty(So,"__esModule",{value:!0}),So.MenuItem=void 0;var Eo=qn,Ao=ko,Io=function(){function e(e,t){this._isEnabled=!0,this.key=e,this._value=t}return e.prototype.click=function(){this.isEnabled&&this.onClick&&this.onClick(this)},e.prototype.updateCssClasses=function(){if(this._element){var e=this._hostConfig?this._hostConfig:Eo.defaultHostConfig;this._element.className=e.makeCssClassName("ac-ctrl"),this._element.classList.add(e.makeCssClassName(this.isEnabled?"ac-ctrl-dropdown-item":"ac-ctrl-dropdown-item-disabled")),this.isEnabled||this._element.classList.add(e.makeCssClassName("ac-disabled"))}},e.prototype.toString=function(){return this.value},e.prototype.render=function(e){var t=this;return this._hostConfig=e,this._element||(this._element=document.createElement("span"),this._element.innerText=this.value,this._element.setAttribute("role","menuitem"),this.isEnabled||this._element.setAttribute("aria-disabled","true"),this._element.setAttribute("aria-current","false"),this._element.onmouseup=function(e){t.click()},this._element.onkeydown=function(e){e.key===Ao.Constants.keys.enter&&(e.cancelBubble=!0,t.click())},this.updateCssClasses()),this._element},Object.defineProperty(e.prototype,"value",{get:function(){return this._value},set:function(e){this._value=e,this._element&&(this._element.innerText=e)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isEnabled",{get:function(){return this._isEnabled},set:function(e){this._isEnabled!==e&&(this._isEnabled=e,this.updateCssClasses())},enumerable:!1,configurable:!0}),e}();So.MenuItem=Io;var _o={},To={};Object.defineProperty(To,"__esModule",{value:!0}),To.Collection=void 0;var jo=function(){function e(){this._items=[]}return e.prototype.get=function(e){return this._items[e]},e.prototype.add=function(e){this._items.push(e),this.onItemAdded&&this.onItemAdded(e)},e.prototype.remove=function(e){var t=this._items.indexOf(e);t>=0&&(this._items=this._items.splice(t,1),this.onItemRemoved&&this.onItemRemoved(e))},e.prototype.indexOf=function(e){return this._items.indexOf(e)},Object.defineProperty(e.prototype,"length",{get:function(){return this._items.length},enumerable:!1,configurable:!0}),e}();To.Collection=jo;var Mo={};Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.PopupControl=void 0;var No=ko,Do=Hn,Oo=qn,Vo=function(){function e(){this._isOpen=!1}return e.prototype.keyDown=function(e){if(e.key===No.Constants.keys.escape)this.closePopup(!0)},e.prototype.render=function(e){var t=this,n=document.createElement("div");return n.tabIndex=0,n.className=this.hostConfig.makeCssClassName("ac-ctrl","ac-ctrl-popup-container"),n.setAttribute("role","dialog"),n.setAttribute("aria-modal","true"),n.onkeydown=function(e){return t.keyDown(e),!e.cancelBubble},n.appendChild(this.renderContent()),n},e.prototype.focus=function(){this._popupElement&&this._popupElement.firstElementChild.focus()},e.prototype.popup=function(e){var t,n,r,o,i,a=this;if(!this._isOpen){this._overlayElement=document.createElement("div"),this._overlayElement.className=this.hostConfig.makeCssClassName("ac-ctrl-overlay"),this._overlayElement.tabIndex=0,this._overlayElement.style.width=document.documentElement.scrollWidth+"px",this._overlayElement.style.height=document.documentElement.scrollHeight+"px",this._overlayElement.onfocus=function(e){a.closePopup(!0)},document.body.appendChild(this._overlayElement);var s=e.getBoundingClientRect();this._popupElement=this.render(s),(t=this._popupElement.classList).remove.apply(t,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideLeftToRight","ac-ctrl-slideRightToLeft","ac-ctrl-slideTopToBottom","ac-ctrl-slideRightToLeft")),window.addEventListener("resize",function(e){a.closePopup(!0)});var l=e.getAttribute("aria-label");l&&this._popupElement.setAttribute("aria-label",l),this._overlayElement.appendChild(this._popupElement);var c,u=this._popupElement.getBoundingClientRect(),d=window.innerHeight-s.bottom,p=s.top,h=window.innerWidth-s.right,m=s.left,f=s.left+Do.getScrollX();if(p<u.height&&d<u.height){var g=Math.min(u.height,window.innerHeight);if(this._popupElement.style.maxHeight=g+"px",c=g<u.height?Do.getScrollY():Do.getScrollY()+s.top+(s.height-g)/2,m<u.width&&h<u.width){var y=Math.min(u.width,window.innerWidth);this._popupElement.style.maxWidth=y+"px",f=y<u.width?Do.getScrollX():Do.getScrollX()+s.left+(s.width-y)/2}else h>=u.width?(f=Do.getScrollX()+s.right,(n=this._popupElement.classList).add.apply(n,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideLeftToRight"))):(f=Do.getScrollX()+s.left-u.width,(r=this._popupElement.classList).add.apply(r,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideRightToLeft")))}else d>=u.height?(c=Do.getScrollY()+s.bottom,(o=this._popupElement.classList).add.apply(o,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideTopToBottom"))):(c=Do.getScrollY()+s.top-u.height,(i=this._popupElement.classList).add.apply(i,this.hostConfig.makeCssClassNames("ac-ctrl-slide","ac-ctrl-slideBottomToTop"))),h<u.width&&(f=Do.getScrollX()+s.right-u.width);this._popupElement.style.left=f+"px",this._popupElement.style.top=c+"px",this._popupElement.focus(),this._isOpen=!0}},e.prototype.closePopup=function(e){this._isOpen&&(document.body.removeChild(this._overlayElement),this._isOpen=!1,this.onClose&&this.onClose(this,e))},Object.defineProperty(e.prototype,"hostConfig",{get:function(){return this._hostConfig?this._hostConfig:Oo.defaultHostConfig},set:function(e){this._hostConfig=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),e}();Mo.PopupControl=Vo;var Bo=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(_o,"__esModule",{value:!0}),_o.PopupMenu=void 0;var Ro,zo,Lo,Ho=ko,Fo=To,Wo=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._items=new Fo.Collection,t._renderedItems=[],t._selectedIndex=-1,t}return Bo(t,e),t.prototype.renderContent=function(){var e=document.createElement("div");e.className=this.hostConfig.makeCssClassName("ac-ctrl ac-popup"),e.setAttribute("role","listbox");for(var t=0;t<this._items.length;t++){var n=this._items.get(t).render(this.hostConfig);n.tabIndex=0,e.appendChild(n),t===this.selectedIndex&&n.focus(),this._renderedItems.push(n)}return e},t.prototype.keyDown=function(t){e.prototype.keyDown.call(this,t);var n=this._selectedIndex;switch(t.key){case Ho.Constants.keys.tab:this.closePopup(!0);break;case Ho.Constants.keys.up:(n<=0||--n<0)&&(n=this._renderedItems.length-1),this.selectedIndex=n,t.cancelBubble=!0;break;case Ho.Constants.keys.down:(n<0||++n>=this._renderedItems.length)&&(n=0),this.selectedIndex=n,t.cancelBubble=!0}},Object.defineProperty(t.prototype,"items",{get:function(){return this._items},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectedIndex",{get:function(){return this._selectedIndex},set:function(e){e>=0&&e<this._renderedItems.length&&(this._renderedItems[e].focus(),this._selectedIndex=e)},enumerable:!1,configurable:!0}),t}(Mo.PopupControl);_o.PopupMenu=Wo,Ro=wo,zo=Vn&&Vn.__createBinding||(Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]}),Lo=Vn&&Vn.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||zo(t,e,n)},Object.defineProperty(Ro,"__esModule",{value:!0}),Lo(So,Ro),Lo(_o,Ro);var $o=Vn&&Vn.__extends||function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Uo=Vn&&Vn.__decorate||function(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},Jo=Vn&&Vn.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})},Go=Vn&&Vn.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(s){i=[6,s],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.BackgroundImage=Bn.ContainerBase=Bn.StylableCardElementContainer=Bn.ContainerStyleProperty=Bn.ActionSet=Bn.ShowCardAction=Bn.HttpAction=Bn.HttpHeader=Bn.ToggleVisibilityAction=Bn.OpenUrlAction=Bn.DataQuery=Bn.ExecuteAction=Bn.UniversalAction=Bn.SubmitAction=Bn.SubmitActionBase=Bn.Action=Bn.TimeInput=Bn.TimeProperty=Bn.DateInput=Bn.NumberInput=Bn.FilteredChoiceSet=Bn.ChoiceSetInput=Bn.ChoiceSetInputDataQuery=Bn.Choice=Bn.ToggleInput=Bn.TextInput=Bn.Input=Bn.Media=Bn.YouTubePlayer=Bn.DailymotionPlayer=Bn.VimeoPlayer=Bn.IFrameMediaMediaPlayer=Bn.CustomMediaPlayer=Bn.HTML5MediaPlayer=Bn.MediaPlayer=Bn.MediaSource=Bn.CaptionSource=Bn.ContentSource=Bn.ImageSet=Bn.CardElementContainer=Bn.Image=Bn.FactSet=Bn.Fact=Bn.RichTextBlock=Bn.TextRun=Bn.TextBlock=Bn.BaseTextBlock=Bn.ActionProperty=Bn.CardElement=Bn.renderSeparation=void 0,Bn.SerializationContext=Bn.AdaptiveCard=Bn.Authentication=Bn.TokenExchangeResource=Bn.AuthCardButton=Bn.RefreshDefinition=Bn.RefreshActionProperty=Bn.ContainerWithActions=Bn.ColumnSet=Bn.Column=Bn.Container=void 0;var qo=Rn,Xo=zn,Yo=Hn,Zo=qn,Qo=no,Ko=so,ei=Yn,ti=vo,ni=Zn,ri=wo;function oi(e){var t,n,r="undefined"==typeof window?"":null!==(n=null===(t=window.trustedTypes)||void 0===t?void 0:t.emptyHTML)&&void 0!==n?n:"";e.innerHTML=r}function ii(e,t,n){if(t.spacing>0||t.lineThickness&&t.lineThickness>0){var r=document.createElement("div");r.className=e.makeCssClassName("ac-"+(n===qo.Orientation.Horizontal?"horizontal":"vertical")+"-separator"),r.setAttribute("aria-hidden","true");var o=t.lineColor?Yo.stringToCssColor(t.lineColor):"";return n===qo.Orientation.Horizontal?t.lineThickness?(r.style.paddingTop=t.spacing/2+"px",r.style.marginBottom=t.spacing/2+"px",r.style.borderBottom=t.lineThickness+"px solid "+o):r.style.height=t.spacing+"px":t.lineThickness?(r.style.paddingLeft=t.spacing/2+"px",r.style.marginRight=t.spacing/2+"px",r.style.borderRight=t.lineThickness+"px solid "+o):r.style.width=t.spacing+"px",r.style.overflow="hidden",r.style.flex="0 0 auto",r}}Bn.renderSeparation=ii;var ai=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._truncatedDueToOverflow=!1,t}return $o(t,e),Object.defineProperty(t.prototype,"lang",{get:function(){var e=this.getValue(t.langProperty);return e||(this.parent?this.parent.lang:void 0)},set:function(e){this.setValue(t.langProperty,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isVisible",{get:function(){return this.getValue(t.isVisibleProperty)},set:function(e){Xo.GlobalSettings.useAdvancedCardBottomTruncation&&!e&&this.undoOverflowTruncation(),this.isVisible!==e&&(this.setValue(t.isVisibleProperty,e),this.updateRenderedElementVisibility(),this._renderedElement&&xa(this)),this._renderedElement&&this._renderedElement.setAttribute("aria-expanded",e.toString())},enumerable:!1,configurable:!0}),t.prototype.internalRenderSeparator=function(){var e=ii(this.hostConfig,{spacing:this.hostConfig.getEffectiveSpacing(this.spacing),lineThickness:this.separator?this.hostConfig.separator.lineThickness:void 0,lineColor:this.separator?this.hostConfig.separator.lineColor:void 0},this.separatorOrientation);if(Xo.GlobalSettings.alwaysBleedSeparators&&e&&this.separatorOrientation===qo.Orientation.Horizontal){var t=this.getParentContainer();if(t&&t.getEffectivePadding()){var n=this.hostConfig.paddingDefinitionToSpacingDefinition(t.getEffectivePadding());e.style.marginLeft="-"+n.left+"px",e.style.marginRight="-"+n.right+"px"}}return e},t.prototype.updateRenderedElementVisibility=function(){var e=this.isDesignMode()||this.isVisible?this._defaultRenderedElementDisplayMode:"none";this._renderedElement&&(e?this._renderedElement.style.display=e:this._renderedElement.style.removeProperty("display")),this._separatorElement&&(this.parent&&this.parent.isFirstElement(this)?this._separatorElement.style.display="none":e?this._separatorElement.style.display=e:this._separatorElement.style.removeProperty("display"))},t.prototype.hideElementDueToOverflow=function(){this._renderedElement&&this.isVisible&&(this._renderedElement.style.visibility="hidden",this.isVisible=!1,xa(this,!1))},t.prototype.showElementHiddenDueToOverflow=function(){this._renderedElement&&!this.isVisible&&(this._renderedElement.style.removeProperty("visibility"),this.isVisible=!0,xa(this,!1))},t.prototype.handleOverflow=function(e){if(this.isVisible||this.isHiddenDueToOverflow()){var t=this.truncateOverflow(e);this._truncatedDueToOverflow=t||this._truncatedDueToOverflow,t?t&&!this.isVisible&&this.showElementHiddenDueToOverflow():this.hideElementDueToOverflow()}},t.prototype.resetOverflow=function(){var e=!1;return this._truncatedDueToOverflow&&(this.undoOverflowTruncation(),this._truncatedDueToOverflow=!1,e=!0),this.isHiddenDueToOverflow()&&this.showElementHiddenDueToOverflow(),e},t.prototype.getDefaultSerializationContext=function(){return new Ta},t.prototype.createPlaceholderElement=function(){var e=this.getEffectiveStyleDefinition(),t=Yo.stringToCssColor(e.foregroundColors.default.subtle),n=document.createElement("div");return n.style.border="1px dashed "+t,n.style.padding="4px",n.style.minHeight="32px",n.style.fontSize="10px",t&&(n.style.color=t),n.innerText=ni.Strings.defaults.emptyElementText(this.getJsonTypeName()),n},t.prototype.adjustRenderedElementSize=function(e){"auto"===this.height?e.style.flex="0 0 auto":e.style.flex="1 1 auto"},t.prototype.updateInputsVisualState=function(e){var t=this.getAllInputs(),n=e?Ti.MouseEnterOnCard:Ti.MouseLeaveOnCard;t.forEach(function(e){return e.updateVisualState(n)})},t.prototype.isDisplayed=function(){return void 0!==this._renderedElement&&this.isVisible&&this._renderedElement.offsetHeight>0},t.prototype.overrideInternalRender=function(){return this.internalRender()},t.prototype.applyPadding=function(){if(this.separatorElement&&this.separatorOrientation===qo.Orientation.Horizontal)if(Xo.GlobalSettings.alwaysBleedSeparators&&!this.isBleeding()){var e=new Xo.PaddingDefinition;this.getImmediateSurroundingPadding(e);var t=this.hostConfig.paddingDefinitionToSpacingDefinition(e);this.separatorElement.style.marginLeft="-"+t.left+"px",this.separatorElement.style.marginRight="-"+t.right+"px"}else this.separatorElement.style.marginRight="0",this.separatorElement.style.marginLeft="0"},t.prototype.truncateOverflow=function(e){return!1},t.prototype.undoOverflowTruncation=function(){},t.prototype.getDefaultPadding=function(){return new Xo.PaddingDefinition},t.prototype.getHasBackground=function(e){return!1},t.prototype.getHasBorder=function(){return!1},t.prototype.getPadding=function(){return this._padding},t.prototype.setPadding=function(e){this._padding=e},t.prototype.shouldSerialize=function(e){return void 0!==e.elementRegistry.findByName(this.getJsonTypeName())},Object.defineProperty(t.prototype,"useDefaultSizing",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"separatorOrientation",{get:function(){return qo.Orientation.Horizontal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultStyle",{get:function(){return qo.ContainerStyle.Default},enumerable:!1,configurable:!0}),t.prototype.parse=function(t,n){e.prototype.parse.call(this,t,n||new Ta)},t.prototype.asString=function(){return""},t.prototype.isBleeding=function(){return!1},t.prototype.getEffectiveStyle=function(){return this.parent?this.parent.getEffectiveStyle():this.defaultStyle},t.prototype.getEffectiveStyleDefinition=function(){return this.hostConfig.containerStyles.getStyleByName(this.getEffectiveStyle())},t.prototype.getEffectiveTextStyleDefinition=function(){return this.parent?this.parent.getEffectiveTextStyleDefinition():this.hostConfig.textStyles.default},t.prototype.getForbiddenActionTypes=function(){return[]},t.prototype.getImmediateSurroundingPadding=function(e,t,n,r,o){if(void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=!0),void 0===o&&(o=!0),this.parent){var i=t&&this.parent.isTopElement(this),a=n&&this.parent.isRightMostElement(this),s=r&&this.parent.isBottomElement(this),l=o&&this.parent.isLeftMostElement(this),c=this.parent.getEffectivePadding();c&&(i&&c.top!==qo.Spacing.None&&(e.top=c.top,i=!1),a&&c.right!==qo.Spacing.None&&(e.right=c.right,a=!1),s&&c.bottom!==qo.Spacing.None&&(e.bottom=c.bottom,s=!1),l&&c.left!==qo.Spacing.None&&(e.left=c.left,l=!1)),(i||a||s||l)&&this.parent.getImmediateSurroundingPadding(e,i,a,s,l)}},t.prototype.getActionCount=function(){return 0},t.prototype.getActionAt=function(e){throw new Error(ni.Strings.errors.indexOutOfRange(e))},t.prototype.indexOfAction=function(e){for(var t=0;t<this.getActionCount();t++)if(this.getActionAt(t)===e)return t;return-1},t.prototype.remove=function(){return!!(this.parent&&this.parent instanceof yi)&&this.parent.removeItem(this)},t.prototype.render=function(){return this._renderedElement=this.overrideInternalRender(),this._separatorElement=this.internalRenderSeparator(),this._renderedElement?(this.id&&(this._renderedElement.id=this.id),this.customCssSelector&&this._renderedElement.classList.add(this.customCssSelector),this._renderedElement.style.boxSizing="border-box",this._defaultRenderedElementDisplayMode=this._renderedElement.style.display?this._renderedElement.style.display:void 0,this.adjustRenderedElementSize(this._renderedElement),this.updateLayout(!1)):this.isDesignMode()&&(this._renderedElement=this.createPlaceholderElement()),this._renderedElement},t.prototype.updateLayout=function(e){this.updateRenderedElementVisibility(),this.applyPadding()},t.prototype.updateActionsEnabledState=function(){for(var e=0,t=this.getRootElement().getAllActions();e<t.length;e++){t[e].updateEnabledState()}},t.prototype.indexOf=function(e){return-1},t.prototype.isDesignMode=function(){var e=this.getRootElement();return e instanceof Ia&&e.designMode},t.prototype.isFirstElement=function(e){return!0},t.prototype.isLastElement=function(e){return!0},t.prototype.isAtTheVeryLeft=function(){return!this.parent||this.parent.isLeftMostElement(this)&&this.parent.isAtTheVeryLeft()},t.prototype.isAtTheVeryRight=function(){return!this.parent||this.parent.isRightMostElement(this)&&this.parent.isAtTheVeryRight()},t.prototype.isAtTheVeryTop=function(){return!this.parent||this.parent.isFirstElement(this)&&this.parent.isAtTheVeryTop()},t.prototype.isAtTheVeryBottom=function(){return!this.parent||this.parent.isLastElement(this)&&this.parent.isAtTheVeryBottom()},t.prototype.isBleedingAtTop=function(){return!1},t.prototype.isBleedingAtBottom=function(){return!1},t.prototype.isLeftMostElement=function(e){return!0},t.prototype.isRightMostElement=function(e){return!0},t.prototype.isTopElement=function(e){return this.isFirstElement(e)},t.prototype.isBottomElement=function(e){return this.isLastElement(e)},t.prototype.isHiddenDueToOverflow=function(){return void 0!==this._renderedElement&&"hidden"===this._renderedElement.style.visibility},t.prototype.getRootElement=function(){return this.getRootObject()},t.prototype.getParentContainer=function(){for(var e=this.parent;e;){if(e instanceof ma)return e;e=e.parent}},t.prototype.getAllInputs=function(e){return[]},t.prototype.getAllActions=function(){for(var e=[],t=0;t<this.getActionCount();t++){var n=this.getActionAt(t);n&&e.push(n)}return e},t.prototype.getResourceInformation=function(){return[]},t.prototype.getElementById=function(e){return this.id===e?this:void 0},t.prototype.getActionById=function(e){},t.prototype.getElementByIdFromAction=function(e){for(var t=void 0,n=0;n<this.getActionCount();n++){var r=this.getActionAt(n);if(r instanceof ia&&(t=r.card.getElementById(e)))break}return t},t.prototype.getEffectivePadding=function(){var e=this.getPadding();return e||this.getDefaultPadding()},t.prototype.getEffectiveHorizontalAlignment=function(){return void 0!==this.horizontalAlignment?this.horizontalAlignment:this.parent?this.parent.getEffectiveHorizontalAlignment():qo.HorizontalAlignment.Left},Object.defineProperty(t.prototype,"hostConfig",{get:function(){return this._hostConfig?this._hostConfig:this.parent?this.parent.hostConfig:Zo.defaultHostConfig},set:function(e){this._hostConfig=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"index",{get:function(){return this.parent?this.parent.indexOf(this):0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInteractive",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInline",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasVisibleSeparator",{get:function(){return!(!this.parent||!this.separatorElement)&&(!this.parent.isFirstElement(this)&&(this.isVisible||this.isDesignMode()))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"separatorElement",{get:function(){return this._separatorElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),t.langProperty=new ei.StringProperty(ei.Versions.v1_1,"lang",!0,/^[a-z]{2,3}$/gi),t.isVisibleProperty=new ei.BoolProperty(ei.Versions.v1_2,"isVisible",!0),t.separatorProperty=new ei.BoolProperty(ei.Versions.v1_0,"separator",!1),t.heightProperty=new ei.ValueSetProperty(ei.Versions.v1_1,"height",[{value:"auto"},{value:"stretch"}],"auto"),t.horizontalAlignmentProperty=new ei.EnumProperty(ei.Versions.v1_0,"horizontalAlignment",qo.HorizontalAlignment),t.spacingProperty=new ei.EnumProperty(ei.Versions.v1_0,"spacing",qo.Spacing,qo.Spacing.Default),Uo([(0,ei.property)(t.horizontalAlignmentProperty)],t.prototype,"horizontalAlignment",void 0),Uo([(0,ei.property)(t.spacingProperty)],t.prototype,"spacing",void 0),Uo([(0,ei.property)(t.separatorProperty)],t.prototype,"separator",void 0),Uo([(0,ei.property)(t.heightProperty)],t.prototype,"height",void 0),Uo([(0,ei.property)(t.langProperty)],t.prototype,"lang",null),Uo([(0,ei.property)(t.isVisibleProperty)],t.prototype,"isVisible",null),t}(Ko.CardObject);Bn.CardElement=ai;var si=function(e){function t(t,n,r){void 0===r&&(r=[]);var o=e.call(this,t,n,void 0)||this;return o.targetVersion=t,o.name=n,o.forbiddenActionTypes=r,o}return $o(t,e),t.prototype.parse=function(e,t,n){var r=e;return n.parseAction(r,t[this.name],this.forbiddenActionTypes,r.isDesignMode())},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,n?n.toJSON(r):void 0,void 0,!0)},t}(ei.PropertyDefinition);Bn.ActionProperty=si;var li=function(e){function t(t){var n=e.call(this)||this;return n.ariaHidden=!1,t&&(n.text=t),n}return $o(t,e),t.prototype.populateSchema=function(n){e.prototype.populateSchema.call(this,n),n.remove(t.selectActionProperty)},Object.defineProperty(t.prototype,"text",{get:function(){return this.getValue(t.textProperty)},set:function(e){this.setText(e)},enumerable:!1,configurable:!0}),t.prototype.getFontSize=function(e){switch(this.effectiveSize){case qo.TextSize.Small:return e.fontSizes.small;case qo.TextSize.Medium:return e.fontSizes.medium;case qo.TextSize.Large:return e.fontSizes.large;case qo.TextSize.ExtraLarge:return e.fontSizes.extraLarge;default:return e.fontSizes.default}},t.prototype.getColorDefinition=function(e,t){switch(t){case qo.TextColor.Accent:return e.accent;case qo.TextColor.Dark:return e.dark;case qo.TextColor.Light:return e.light;case qo.TextColor.Good:return e.good;case qo.TextColor.Warning:return e.warning;case qo.TextColor.Attention:return e.attention;default:return e.default}},t.prototype.setText=function(e){this.setValue(t.textProperty,e)},t.prototype.init=function(e){this.size=e.size,this.weight=e.weight,this.color=e.color,this.isSubtle=e.isSubtle},t.prototype.asString=function(){return this.text},t.prototype.applyStylesTo=function(e){var t,n=this.hostConfig.getFontTypeDefinition(this.effectiveFontType);switch(n.fontFamily&&(e.style.fontFamily=n.fontFamily),this.effectiveSize){case qo.TextSize.Small:t=n.fontSizes.small;break;case qo.TextSize.Medium:t=n.fontSizes.medium;break;case qo.TextSize.Large:t=n.fontSizes.large;break;case qo.TextSize.ExtraLarge:t=n.fontSizes.extraLarge;break;default:t=n.fontSizes.default}e.style.fontSize=t+"px";var r,o=this.getColorDefinition(this.getEffectiveStyleDefinition().foregroundColors,this.effectiveColor),i=Yo.stringToCssColor(this.effectiveIsSubtle?o.subtle:o.default);switch(i&&(e.style.color=i),this.effectiveWeight){case qo.TextWeight.Lighter:r=n.fontWeights.lighter;break;case qo.TextWeight.Bolder:r=n.fontWeights.bolder;break;default:r=n.fontWeights.default}e.style.fontWeight=r.toString(),this.ariaHidden&&e.setAttribute("aria-hidden","true")},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return this.selectAction&&t.push(this.selectAction),t},Object.defineProperty(t.prototype,"effectiveColor",{get:function(){return void 0!==this.color?this.color:this.getEffectiveTextStyleDefinition().color},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"effectiveFontType",{get:function(){return void 0!==this.fontType?this.fontType:this.getEffectiveTextStyleDefinition().fontType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"effectiveIsSubtle",{get:function(){return void 0!==this.isSubtle?this.isSubtle:this.getEffectiveTextStyleDefinition().isSubtle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"effectiveSize",{get:function(){return void 0!==this.size?this.size:this.getEffectiveTextStyleDefinition().size},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"effectiveWeight",{get:function(){return void 0!==this.weight?this.weight:this.getEffectiveTextStyleDefinition().weight},enumerable:!1,configurable:!0}),t.textProperty=new ei.StringProperty(ei.Versions.v1_0,"text",!0),t.sizeProperty=new ei.EnumProperty(ei.Versions.v1_0,"size",qo.TextSize),t.weightProperty=new ei.EnumProperty(ei.Versions.v1_0,"weight",qo.TextWeight),t.colorProperty=new ei.EnumProperty(ei.Versions.v1_0,"color",qo.TextColor),t.isSubtleProperty=new ei.BoolProperty(ei.Versions.v1_0,"isSubtle"),t.fontTypeProperty=new ei.EnumProperty(ei.Versions.v1_2,"fontType",qo.FontType),t.selectActionProperty=new si(ei.Versions.v1_1,"selectAction",["Action.ShowCard"]),Uo([(0,ei.property)(t.sizeProperty)],t.prototype,"size",void 0),Uo([(0,ei.property)(t.weightProperty)],t.prototype,"weight",void 0),Uo([(0,ei.property)(t.colorProperty)],t.prototype,"color",void 0),Uo([(0,ei.property)(t.fontTypeProperty)],t.prototype,"fontType",void 0),Uo([(0,ei.property)(t.isSubtleProperty)],t.prototype,"isSubtle",void 0),Uo([(0,ei.property)(t.textProperty)],t.prototype,"text",null),Uo([(0,ei.property)(t.selectActionProperty)],t.prototype,"selectAction",void 0),t}(ai);Bn.BaseTextBlock=li;var ci=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.wrap=!1,t._treatAsPlainText=!0,t.useMarkdown=!0,t}var n,r;return $o(t,e),t.prototype.restoreOriginalContent=function(){var e,n;if(void 0!==this.renderedElement){this.maxLines&&this.maxLines>0&&(this.renderedElement.style.maxHeight=this._computedLineHeight*this.maxLines+"px");var r=null!==(n=null===(e=t._ttRoundtripPolicy)||void 0===e?void 0:e.createHTML(this._originalInnerHtml))&&void 0!==n?n:this._originalInnerHtml;this.renderedElement.innerHTML=r}},t.prototype.truncateIfSupported=function(e){if(void 0!==this.renderedElement){var t=this.renderedElement.children,n=!t.length;if(n||1===t.length&&"p"===t[0].tagName.toLowerCase()&&!t[0].children.length){var r=n?this.renderedElement:t[0];return Yo.truncateText(r,e,this._computedLineHeight),!0}}return!1},t.prototype.setText=function(t){e.prototype.setText.call(this,t),this._processedText=void 0},t.prototype.internalRender=function(){var e,n,r=this;if(this._processedText=void 0,this.text){var o=this.preProcessPropertyValue(li.textProperty),i=this.hostConfig,a=void 0;if(this.forElementId){var s=document.createElement("label");s.htmlFor=this.forElementId,a=s}else a=document.createElement("div");if(a.classList.add(i.makeCssClassName("ac-textBlock")),a.style.overflow="hidden",this.applyStylesTo(a),"heading"===this.style){a.setAttribute("role","heading");var l=this.hostConfig.textBlock.headingLevel;void 0!==l&&l>0&&a.setAttribute("aria-level",l.toString())}if(this.selectAction&&i.supportsInteractivity&&(a.onclick=function(e){r.selectAction&&r.selectAction.isEffectivelyEnabled()&&(e.preventDefault(),e.cancelBubble=!0,r.selectAction.execute())},this.selectAction.setupElementForAccessibility(a),this.selectAction.isEffectivelyEnabled()&&a.classList.add(i.makeCssClassName("ac-selectable"))),!this._processedText){this._treatAsPlainText=!0;var c=Qo.formatText(this.lang,o);if(this.useMarkdown&&c){Xo.GlobalSettings.allowMarkForTextHighlighting&&(c=c.replace(/<mark>/g,"===").replace(/<\/mark>/g,"/==/"));var u=Ia.applyMarkdown(c);if(u.didProcess&&u.outputHtml){if(this._processedText=u.outputHtml,this._treatAsPlainText=!1,Xo.GlobalSettings.allowMarkForTextHighlighting&&this._processedText){var d="",p=this.getEffectiveStyleDefinition();p.highlightBackgroundColor&&(d+="background-color: "+p.highlightBackgroundColor+";"),p.highlightForegroundColor&&(d+="color: "+p.highlightForegroundColor+";"),d&&(d='style="'+d+'"'),this._processedText=this._processedText.replace(/===/g,"<mark "+d+">").replace(/\/==\//g,"</mark>")}}else this._processedText=c,this._treatAsPlainText=!0}else this._processedText=c,this._treatAsPlainText=!0}if(this._processedText||(this._processedText=""),this._treatAsPlainText)a.innerText=this._processedText;else{var h=null!==(n=null===(e=t._ttMarkdownPolicy)||void 0===e?void 0:e.createHTML(this._processedText))&&void 0!==n?n:this._processedText;a.innerHTML=h}if(a.firstElementChild instanceof HTMLElement){var m=a.firstElementChild;m.style.marginTop="0px",m.style.width="100%",this.wrap||(m.style.overflow="hidden",m.style.textOverflow="ellipsis")}a.lastElementChild instanceof HTMLElement&&(a.lastElementChild.style.marginBottom="0px");for(var f=a.getElementsByTagName("a"),g=function(e){e.classList.add(i.makeCssClassName("ac-anchor")),e.target="_blank",e.onclick=function(t){va(r,e,t)&&(t.preventDefault(),t.cancelBubble=!0)},e.oncontextmenu=function(t){return!va(r,e,t)||(t.preventDefault(),t.cancelBubble=!0,!1)}},y=0,v=Array.from(f);y<v.length;y++){g(v[y])}return this.wrap?(a.style.wordWrap="break-word",this.maxLines&&this.maxLines>0&&(a.style.overflow="hidden",Yo.isInternetExplorer()||!Xo.GlobalSettings.useWebkitLineClamp?a.style.maxHeight=this._computedLineHeight*this.maxLines+"px":(a.style.removeProperty("line-height"),a.style.display="-webkit-box",a.style.webkitBoxOrient="vertical",a.style.webkitLineClamp=this.maxLines.toString()))):(a.style.whiteSpace="nowrap",a.style.textOverflow="ellipsis"),(Xo.GlobalSettings.useAdvancedTextBlockTruncation||Xo.GlobalSettings.useAdvancedCardBottomTruncation)&&(this._originalInnerHtml=a.innerHTML),a}},t.prototype.truncateOverflow=function(e){return e>=this._computedLineHeight&&this.truncateIfSupported(e)},t.prototype.undoOverflowTruncation=function(){if(this.restoreOriginalContent(),Xo.GlobalSettings.useAdvancedTextBlockTruncation&&this.maxLines){var e=this._computedLineHeight*this.maxLines;this.truncateIfSupported(e)}},t.prototype.applyStylesTo=function(t){switch(e.prototype.applyStylesTo.call(this,t),this.getEffectiveHorizontalAlignment()){case qo.HorizontalAlignment.Center:t.style.textAlign="center";break;case qo.HorizontalAlignment.Right:t.style.textAlign="end";break;default:t.style.textAlign="start"}var n=this.hostConfig.lineHeights;if(n)switch(this.effectiveSize){case qo.TextSize.Small:this._computedLineHeight=n.small;break;case qo.TextSize.Medium:this._computedLineHeight=n.medium;break;case qo.TextSize.Large:this._computedLineHeight=n.large;break;case qo.TextSize.ExtraLarge:this._computedLineHeight=n.extraLarge;break;default:this._computedLineHeight=n.default}else this._computedLineHeight=1.33*this.getFontSize(this.hostConfig.getFontTypeDefinition(this.effectiveFontType));t.style.lineHeight=this._computedLineHeight+"px"},t.prototype.getJsonTypeName=function(){return"TextBlock"},t.prototype.getEffectiveTextStyleDefinition=function(){return this.style?this.hostConfig.textStyles.getStyleByName(this.style):e.prototype.getEffectiveTextStyleDefinition.call(this)},t.prototype.updateLayout=function(t){void 0===t&&(t=!1),e.prototype.updateLayout.call(this,t),Xo.GlobalSettings.useAdvancedTextBlockTruncation&&this.maxLines&&this.isDisplayed()&&(this.restoreOriginalContent(),this.truncateIfSupported(this._computedLineHeight*this.maxLines))},t.wrapProperty=new ei.BoolProperty(ei.Versions.v1_0,"wrap",!1),t.maxLinesProperty=new ei.NumProperty(ei.Versions.v1_0,"maxLines"),t.styleProperty=new ei.ValueSetProperty(ei.Versions.v1_5,"style",[{value:"default"},{value:"columnHeader"},{value:"heading"}]),t._ttMarkdownPolicy="undefined"==typeof window||null===(n=window.trustedTypes)||void 0===n?void 0:n.createPolicy("adaptivecards#markdownPassthroughPolicy",{createHTML:function(e){return e}}),t._ttRoundtripPolicy="undefined"==typeof window||null===(r=window.trustedTypes)||void 0===r?void 0:r.createPolicy("adaptivecards#restoreContentsPolicy",{createHTML:function(e){return e}}),Uo([(0,ei.property)(t.wrapProperty)],t.prototype,"wrap",void 0),Uo([(0,ei.property)(t.maxLinesProperty)],t.prototype,"maxLines",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),t}(li);Bn.TextBlock=ci;var ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.italic=!1,t.strikethrough=!1,t.highlight=!1,t.underline=!1,t}return $o(t,e),t.prototype.populateSchema=function(t){e.prototype.populateSchema.call(this,t),t.add(li.selectActionProperty)},t.prototype.internalRender=function(){var e=this;if(this.text){var t=this.preProcessPropertyValue(li.textProperty),n=this.hostConfig,r=Qo.formatText(this.lang,t);r||(r="");var o=document.createElement("span");if(o.classList.add(n.makeCssClassName("ac-textRun")),this.applyStylesTo(o),this.selectAction&&n.supportsInteractivity){var i=document.createElement("a");i.classList.add(n.makeCssClassName("ac-anchor"));var a=this.selectAction.getHref();i.href=a||"",i.target="_blank",i.onclick=function(t){e.selectAction&&e.selectAction.isEffectivelyEnabled()&&(t.preventDefault(),t.cancelBubble=!0,e.selectAction.execute())},this.selectAction.setupElementForAccessibility(i),i.innerText=r,o.appendChild(i)}else o.innerText=r;return o}},t.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),r=Yo.stringToCssColor(this.effectiveIsSubtle?n.highlightColors.subtle:n.highlightColors.default);r&&(t.style.backgroundColor=r)}this.underline&&(t.style.textDecoration="underline")},t.prototype.getJsonTypeName=function(){return"TextRun"},Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isInline",{get:function(){return!0},enumerable:!1,configurable:!0}),t.italicProperty=new ei.BoolProperty(ei.Versions.v1_2,"italic",!1),t.strikethroughProperty=new ei.BoolProperty(ei.Versions.v1_2,"strikethrough",!1),t.highlightProperty=new ei.BoolProperty(ei.Versions.v1_2,"highlight",!1),t.underlineProperty=new ei.BoolProperty(ei.Versions.v1_3,"underline",!1),Uo([(0,ei.property)(t.italicProperty)],t.prototype,"italic",void 0),Uo([(0,ei.property)(t.strikethroughProperty)],t.prototype,"strikethrough",void 0),Uo([(0,ei.property)(t.highlightProperty)],t.prototype,"highlight",void 0),Uo([(0,ei.property)(t.underlineProperty)],t.prototype,"underline",void 0),t}(li);Bn.TextRun=ui;var di=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._inlines=[],t}return $o(t,e),t.prototype.internalAddInline=function(e,t){if(void 0===t&&(t=!1),!e.isInline)throw new Error(ni.Strings.errors.elementCannotBeUsedAsInline());if(!(void 0===e.parent||t)&&e.parent!==this)throw new Error(ni.Strings.errors.inlineAlreadyParented());e.setParent(this),this._inlines.push(e)},t.prototype.internalParse=function(t,n){if(e.prototype.internalParse.call(this,t,n),this._inlines=[],Array.isArray(t.inlines))for(var r=0,o=t.inlines;r<o.length;r++){var i=o[r],a=void 0;if("string"==typeof i){var s=new ui;s.text=i,a=s}else a=n.parseElement(this,i,[],!1);a&&this.internalAddInline(a,!0)}},t.prototype.internalToJSON=function(t,n){if(e.prototype.internalToJSON.call(this,t,n),this._inlines.length>0){for(var r=[],o=0,i=this._inlines;o<i.length;o++){var a=i[o];r.push(a.toJSON(n))}n.serializeValue(t,"inlines",r)}},t.prototype.internalRender=function(){if(this._inlines.length>0){var e=void 0;if(this.forElementId){var t=document.createElement("label");t.htmlFor=this.forElementId,e=t}else e=document.createElement("div");switch(e.className=this.hostConfig.makeCssClassName("ac-richTextBlock"),this.getEffectiveHorizontalAlignment()){case qo.HorizontalAlignment.Center:e.style.textAlign="center";break;case qo.HorizontalAlignment.Right:e.style.textAlign="end";break;default:e.style.textAlign="start"}for(var n=0,r=0,o=this._inlines;r<o.length;r++){var i=o[r].render();i&&(e.appendChild(i),n++)}if(n>0)return e}},t.prototype.asString=function(){for(var e="",t=0,n=this._inlines;t<n.length;t++){e+=n[t].asString()}return e},t.prototype.getJsonTypeName=function(){return"RichTextBlock"},t.prototype.getInlineCount=function(){return this._inlines.length},t.prototype.getInlineAt=function(e){if(e>=0&&e<this._inlines.length)return this._inlines[e];throw new Error(ni.Strings.errors.indexOutOfRange(e))},t.prototype.addInline=function(e){"string"==typeof e?this.internalAddInline(new ui(e)):this.internalAddInline(e)},t.prototype.removeInline=function(e){var t=this._inlines.indexOf(e);return t>=0&&(this._inlines[t].setParent(void 0),this._inlines.splice(t,1),!0)},t}(ai);Bn.RichTextBlock=di;var pi=function(e){function t(t,n){var r=e.call(this)||this;return r.name=t,r.value=n,r}return $o(t,e),t.prototype.getSchemaKey=function(){return"Fact"},t.titleProperty=new ei.StringProperty(ei.Versions.v1_0,"title"),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"name",void 0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"value",void 0),t}(ei.SerializableObject);Bn.Fact=pi;var hi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),Object.defineProperty(t.prototype,"useDefaultSizing",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.internalRender=function(){var e=void 0,t=this.hostConfig;if(this.facts.length>0){(e=document.createElement("table")).style.borderWidth="0px",e.style.borderSpacing="0px",e.style.borderStyle="none",e.style.borderCollapse="collapse",e.style.display="block",e.style.overflow="hidden",e.classList.add(t.makeCssClassName("ac-factset")),e.setAttribute("role","presentation");for(var n=0;n<this.facts.length;n++){var r=document.createElement("tr");n>0&&(r.style.marginTop=t.factSet.spacing+"px");var o=document.createElement("td");o.style.padding="0",o.classList.add(t.makeCssClassName("ac-fact-title")),t.factSet.title.maxWidth&&(o.style.maxWidth=t.factSet.title.maxWidth+"px"),o.style.verticalAlign="top";var i=new ci;i.setParent(this),i.text=!this.facts[n].name&&this.isDesignMode()?"Title":this.facts[n].name,i.size=t.factSet.title.size,i.color=t.factSet.title.color,i.isSubtle=t.factSet.title.isSubtle,i.weight=t.factSet.title.weight,i.wrap=t.factSet.title.wrap,i.spacing=qo.Spacing.None,Yo.appendChild(o,i.render()),Yo.appendChild(r,o),(o=document.createElement("td")).style.width="10px",Yo.appendChild(r,o),(o=document.createElement("td")).style.padding="0",o.style.verticalAlign="top",o.classList.add(t.makeCssClassName("ac-fact-value")),(i=new ci).setParent(this),i.text=this.facts[n].value,i.size=t.factSet.value.size,i.color=t.factSet.value.color,i.isSubtle=t.factSet.value.isSubtle,i.weight=t.factSet.value.weight,i.wrap=t.factSet.value.wrap,i.spacing=qo.Spacing.None,Yo.appendChild(o,i.render()),Yo.appendChild(r,o),Yo.appendChild(e,r)}}return e},t.prototype.getJsonTypeName=function(){return"FactSet"},t.factsProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_0,"facts",pi),Uo([(0,ei.property)(t.factsProperty)],t.prototype,"facts",void 0),t}(ai);Bn.FactSet=hi;var mi=function(e){function t(t,n,r,o){var i=e.call(this,t,n)||this;return i.targetVersion=t,i.name=n,i.internalName=r,i.fallbackProperty=o,i}return $o(t,e),t.prototype.getInternalName=function(){return this.internalName},t.prototype.parse=function(e,t,n){var r=void 0,o=t[this.name];if(void 0===o)return this.defaultValue;var i=!1;if("string"==typeof o){try{var a=Xo.SizeAndUnit.parse(o,!0);a.unit===qo.SizeUnit.Pixel&&(r=a.physicalSize,i=!0)}catch(s){}!i&&this.fallbackProperty&&(i=this.fallbackProperty.isValidValue(o,n))}return i||n.logParseEvent(e,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidPropertyValue(o,this.name)),r},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,"number"!=typeof n||isNaN(n)?void 0:n+"px")},t}(ei.PropertyDefinition),fi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.size=qo.Size.Auto,t.style=qo.ImageStyle.Default,t}return $o(t,e),t.prototype.populateSchema=function(t){e.prototype.populateSchema.call(this,t),t.remove(ai.heightProperty)},t.prototype.applySize=function(e){if(this.pixelWidth||this.pixelHeight)this.pixelWidth&&(e.style.width=this.pixelWidth+"px"),this.pixelHeight&&(e.style.height=this.pixelHeight+"px");else if(this.maxHeight){switch(this.size){case qo.Size.Small:e.style.height=this.hostConfig.imageSizes.small+"px";break;case qo.Size.Large:e.style.height=this.hostConfig.imageSizes.large+"px";break;default:e.style.height=this.hostConfig.imageSizes.medium+"px"}e.style.maxHeight=this.maxHeight+"px"}else{switch(this.size){case qo.Size.Stretch:e.style.width="100%";break;case qo.Size.Auto:e.style.maxWidth="100%";break;case qo.Size.Small:e.style.width=this.hostConfig.imageSizes.small+"px";break;case qo.Size.Large:e.style.width=this.hostConfig.imageSizes.large+"px";break;case qo.Size.Medium:e.style.width=this.hostConfig.imageSizes.medium+"px"}e.style.maxHeight="100%"}},Object.defineProperty(t.prototype,"useDefaultSizing",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.internalRender=function(){var e=this,n=void 0;if(this.url){(n=document.createElement("div")).style.display="flex",n.style.alignItems="flex-start";var r=this.hostConfig;switch(this.getEffectiveHorizontalAlignment()){case qo.HorizontalAlignment.Center:n.style.justifyContent="center";break;case qo.HorizontalAlignment.Right:n.style.justifyContent="flex-end";break;default:n.style.justifyContent="flex-start"}var o=document.createElement("img");this.renderedImageElement=o,o.onload=function(t){ya(e)},o.onerror=function(t){if(e.renderedElement){var n=e.getRootElement();if(oi(e.renderedElement),n&&n.designMode){var r=document.createElement("div");r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.style.backgroundColor="#EEEEEE",r.style.color="black",r.innerText=":-(",r.style.padding="10px",e.applySize(r),e.renderedElement.appendChild(r)}}ya(e)},o.style.minWidth="0",o.classList.add(r.makeCssClassName("ac-image")),this.selectAction&&r.supportsInteractivity&&(o.onkeypress=function(t){e.selectAction&&e.selectAction.isEffectivelyEnabled()&&("Enter"===t.code||"Space"===t.code)&&(t.preventDefault(),t.cancelBubble=!0,e.selectAction.execute())},o.onclick=function(t){e.selectAction&&e.selectAction.isEffectivelyEnabled()&&(t.preventDefault(),t.cancelBubble=!0,e.selectAction.execute())},this.selectAction.setupElementForAccessibility(o),this.selectAction.isEffectivelyEnabled()&&o.classList.add(r.makeCssClassName("ac-selectable"))),this.applySize(o),this.style===qo.ImageStyle.Person&&(o.style.borderRadius="50%",o.style.backgroundPosition="50% 50%",o.style.backgroundRepeat="no-repeat");var i=Yo.stringToCssColor(this.backgroundColor);i&&(o.style.backgroundColor=i),this.setImageSource(o);var a=this.preProcessPropertyValue(t.altTextProperty);a&&(o.alt=a),n.appendChild(o)}return n},t.prototype.getJsonTypeName=function(){return"Image"},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return this.selectAction&&t.push(this.selectAction),t},t.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);return!n&&this.selectAction&&(n=this.selectAction.getActionById(t)),n},t.prototype.getResourceInformation=function(){return this.url?[{url:this.url,mimeType:"image"}]:[]},t.prototype.setImageSource=function(e){var n=new gi(this.forceLoad,this.url);n.configureImage(this),e.src=this.preProcessPropertyValue(t.urlProperty),n.resetImage(this)},t.urlProperty=new ei.StringProperty(ei.Versions.v1_0,"url"),t.altTextProperty=new ei.StringProperty(ei.Versions.v1_0,"altText"),t.backgroundColorProperty=new ei.StringProperty(ei.Versions.v1_1,"backgroundColor"),t.styleProperty=new ei.EnumProperty(ei.Versions.v1_0,"style",qo.ImageStyle,qo.ImageStyle.Default),t.sizeProperty=new ei.EnumProperty(ei.Versions.v1_0,"size",qo.Size,qo.Size.Auto),t.pixelWidthProperty=new mi(ei.Versions.v1_1,"width","pixelWidth"),t.pixelHeightProperty=new mi(ei.Versions.v1_1,"height","pixelHeight",ai.heightProperty),t.selectActionProperty=new si(ei.Versions.v1_1,"selectAction",["Action.ShowCard"]),t.shouldForceLoadProperty=new ei.BoolProperty(ei.Versions.v1_6,"forceLoad",!1),Uo([(0,ei.property)(t.urlProperty)],t.prototype,"url",void 0),Uo([(0,ei.property)(t.altTextProperty)],t.prototype,"altText",void 0),Uo([(0,ei.property)(t.backgroundColorProperty)],t.prototype,"backgroundColor",void 0),Uo([(0,ei.property)(t.sizeProperty)],t.prototype,"size",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),Uo([(0,ei.property)(t.pixelWidthProperty)],t.prototype,"pixelWidth",void 0),Uo([(0,ei.property)(t.pixelHeightProperty)],t.prototype,"pixelHeight",void 0),Uo([(0,ei.property)(t.selectActionProperty)],t.prototype,"selectAction",void 0),Uo([(0,ei.property)(t.shouldForceLoadProperty)],t.prototype,"forceLoad",void 0),t}(ai);Bn.Image=fi;var gi=function(){function e(e,t){this.doForceLoad=e,this.url=t,t&&t.length&&e&&(this.uniqueHash="?"+Date.now(),this.urlWithForceLoadOption=t+this.uniqueHash)}return e.prototype.configureImage=function(e){this.urlWithForceLoadOption&&this.urlWithForceLoadOption.length&&(e.url=this.urlWithForceLoadOption)},e.prototype.resetImage=function(e){e.url=this.url},e}(),yi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.allowVerticalOverflow=!1,t}return $o(t,e),t.prototype.populateSchema=function(n){e.prototype.populateSchema.call(this,n),this.isSelectable||n.remove(t.selectActionProperty)},t.prototype.isElementAllowed=function(e){return this.hostConfig.supportsInteractivity||!e.isInteractive},t.prototype.applyPadding=function(){if(e.prototype.applyPadding.call(this),this.renderedElement){var t=new Xo.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"}},Object.defineProperty(t.prototype,"isSelectable",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.forbiddenChildElements=function(){return[]},t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this);for(var t=0;t<this.getItemCount();t++)this.getItemAt(t).releaseDOMResources()},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t);for(var n=0;n<this.getItemCount();n++){var r=this.getItemAt(n);!this.hostConfig.supportsInteractivity&&r.isInteractive&&t.addFailure(this,qo.ValidationEvent.InteractivityNotAllowed,ni.Strings.errors.interactivityNotAllowed()),this.isElementAllowed(r)||t.addFailure(this,qo.ValidationEvent.InteractivityNotAllowed,ni.Strings.errors.elementTypeNotAllowed(r.getJsonTypeName())),r.internalValidateProperties(t)}this._selectAction&&this._selectAction.internalValidateProperties(t)},t.prototype.render=function(){var t=this,n=e.prototype.render.call(this);if(n){var r=this.hostConfig;this.allowVerticalOverflow&&(n.style.overflowX="hidden",n.style.overflowY="auto"),n&&this.isSelectable&&this._selectAction&&r.supportsInteractivity&&(n.onclick=function(e){t._selectAction&&t._selectAction.isEffectivelyEnabled()&&(e.preventDefault(),e.cancelBubble=!0,t._selectAction.execute())},n.onkeypress=function(e){t._selectAction&&t._selectAction.isEffectivelyEnabled()&&("Enter"===e.code||"Space"===e.code)&&(e.preventDefault(),e.cancelBubble=!0,t._selectAction.execute())},this._selectAction.setupElementForAccessibility(n),this._selectAction.isEffectivelyEnabled()&&n.classList.add(r.makeCssClassName("ac-selectable")))}return n},t.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()},t.prototype.getAllInputs=function(e){void 0===e&&(e=!0);for(var t=[],n=0;n<this.getItemCount();n++)t.push.apply(t,this.getItemAt(n).getAllInputs(e));return t},t.prototype.getAllActions=function(){for(var t=e.prototype.getAllActions.call(this),n=0;n<this.getItemCount();n++)t.push.apply(t,this.getItemAt(n).getAllActions());return this._selectAction&&t.push(this._selectAction),t},t.prototype.getResourceInformation=function(){for(var e=[],t=0;t<this.getItemCount();t++)e.push.apply(e,this.getItemAt(t).getResourceInformation());return e},t.prototype.getElementById=function(t){var n=e.prototype.getElementById.call(this,t);if(!n)for(var r=0;r<this.getItemCount()&&!(n=this.getItemAt(r).getElementById(t));r++);return n},t.prototype.findDOMNodeOwner=function(t){for(var n,r=void 0,o=0;o<this.getItemCount();o++)if(r=this.getItemAt(o).findDOMNodeOwner(t))return r;for(o=0;o<this.getActionCount();o++)if(r=null===(n=this.getActionAt(o))||void 0===n?void 0:n.findDOMNodeOwner(t))return r;return e.prototype.findDOMNodeOwner.call(this,t)},t.selectActionProperty=new si(ei.Versions.v1_1,"selectAction",["Action.ShowCard"]),Uo([(0,ei.property)(t.selectActionProperty)],t.prototype,"_selectAction",void 0),t}(ai);Bn.CardElementContainer=yi;var vi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._images=[],t.imageSize=qo.ImageSize.Medium,t.presentationStyle=qo.ImageSetPresentationStyle.Default,t.pixelOffset=0,t}return $o(t,e),t.prototype.internalRender=function(){var e=void 0;if(this._images.length>0){(e=document.createElement("div")).style.display="flex",e.style.flexWrap="wrap";for(var t=0,n=this._images;t<n.length;t++){var r=n[t];switch(this.imageSize){case qo.ImageSize.Small:r.size=qo.Size.Small;break;case qo.ImageSize.Large:r.size=qo.Size.Large;break;default:r.size=qo.Size.Medium}r.maxHeight=this.hostConfig.imageSet.maxImageHeight;var o=r.render();o&&(o.style.display="inline-flex",o.style.margin="0px",this.presentationStyle==qo.ImageSetPresentationStyle.Default&&(o.style.marginRight="10px"),Yo.appendChild(e,o))}this.presentationStyle==qo.ImageSetPresentationStyle.Stacked&&this.applyStackedPresentationStyle()}return e},t.prototype.applyStackedPresentationStyle=function(){if(this._images[0].renderedImageElement){var e=bi.parseNumericPixelDimension(this._images[0].renderedImageElement.style.height),t=this.getEffectiveBackgroundColor();if(e)new bi(this.pixelOffset,e,t).configureImagesArrayAsStackedLayout(this._images)}},t.prototype.getEffectiveBackgroundColor=function(){var e=this.getParentContainer(),t=null==e?void 0:e.getEffectiveStyle(),n=this.hostConfig.containerStyles.getStyleByName(t,this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));return Yo.stringToCssColor(n.backgroundColor)},t.prototype.getItemCount=function(){return this._images.length},t.prototype.getItemAt=function(e){return this._images[e]},t.prototype.getFirstVisibleRenderedItem=function(){return this._images&&this._images.length>0?this._images[0]:void 0},t.prototype.getLastVisibleRenderedItem=function(){return this._images&&this._images.length>0?this._images[this._images.length-1]:void 0},t.prototype.removeItem=function(e){if(e instanceof fi){var t=this._images.indexOf(e);if(t>=0)return this._images.splice(t,1),e.setParent(void 0),this.updateLayout(),!0}return!1},t.prototype.getJsonTypeName=function(){return"ImageSet"},t.prototype.addImage=function(e){if(e.parent)throw new Error("This image already belongs to another ImageSet");this._images.push(e),e.setParent(this)},t.prototype.indexOf=function(e){return e instanceof fi?this._images.indexOf(e):-1},t.imagesProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_0,"images",fi,function(e,t){t.setParent(e)}),t.imageSizeProperty=new ei.EnumProperty(ei.Versions.v1_0,"imageSize",qo.ImageSize,qo.ImageSize.Medium),t.imagePresentationStyle=new ei.EnumProperty(ei.Versions.v1_6,"style",qo.ImageSetPresentationStyle,qo.ImageSetPresentationStyle.Default),t.pixelOffset=new ei.NumProperty(ei.Versions.v1_6,"offset",0,void 0),Uo([(0,ei.property)(t.imagesProperty)],t.prototype,"_images",void 0),Uo([(0,ei.property)(t.imageSizeProperty)],t.prototype,"imageSize",void 0),Uo([(0,ei.property)(t.imagePresentationStyle)],t.prototype,"presentationStyle",void 0),Uo([(0,ei.property)(t.pixelOffset)],t.prototype,"pixelOffset",void 0),t}(yi);Bn.ImageSet=vi;var bi=function(){function e(e,t,n){this.sign45=.7071,this.maxImageCounts=2,this.offset=0,this.normalizationConstant=0,this.border=5,this.dimension=0,this.dimension=t,this.normalizationConstant=2*(t*this.sign45-.5*t),this.offset=this.sign45*(Math.max(e,-t)-this.normalizationConstant),this.style=n||""}return e.prototype.moveImageRight=function(e){e.style.marginLeft=this.offset+"px"},e.prototype.moveImageUp=function(e){e.style.marginBottom=this.offset+this.dimension+"px"},e.prototype.moveImageDown=function(e){e.style.marginTop=this.offset+this.dimension+"px"},e.prototype.makeImageRound=function(e){e.style.borderRadius="50%",e.style.backgroundPosition="50% 50%",e.style.backgroundRepeat="no-repeat"},e.prototype.applyBorder=function(e){e.style.height=this.dimension+2*this.border+"px",e.style.border=this.border+"px solid "+this.style},e.prototype.configureImageForBottomLeft=function(e){this.moveImageDown(e),this.makeImageRound(e),this.applyBorder(e),e.style.zIndex="2"},e.prototype.configureImageForTopRight=function(e){this.moveImageUp(e),this.moveImageRight(e),this.makeImageRound(e),e.style.zIndex="1"},e.prototype.configureImagesArrayAsStackedLayout=function(e){1==e.length?e[0].renderedImageElement&&this.makeImageRound(e[0].renderedImageElement):e.length<=this.maxImageCounts&&e[0].renderedImageElement&&e[1].renderedImageElement&&(this.configureImageForBottomLeft(e[0].renderedImageElement),this.configureImageForTopRight(e[1].renderedImageElement))},e.parseNumericPixelDimension=function(e){if("px"==(null==e?void 0:e.substring(e.length-2)))return parseInt(e.substring(0,e.length-2))},e}(),xi=function(e){function t(t,n){var r=e.call(this)||this;return r.url=t,r.mimeType=n,r}return $o(t,e),t.prototype.isValid=function(){return!(!this.mimeType||!this.url)},t.mimeTypeProperty=new ei.StringProperty(ei.Versions.v1_1,"mimeType"),t.urlProperty=new ei.StringProperty(ei.Versions.v1_1,"url"),Uo([(0,ei.property)(t.mimeTypeProperty)],t.prototype,"mimeType",void 0),Uo([(0,ei.property)(t.urlProperty)],t.prototype,"url",void 0),t}(ei.SerializableObject);Bn.ContentSource=xi;var Ci=function(e){function t(t,n,r){var o=e.call(this,t,n)||this;return o.label=r,o}return $o(t,e),t.prototype.getSchemaKey=function(){return"CaptionSource"},t.prototype.render=function(){var e=void 0;return this.isValid()&&((e=document.createElement("track")).src=this.url,e.kind="captions",e.label=this.label),e},t.labelProperty=new ei.StringProperty(ei.Versions.v1_6,"label"),Uo([(0,ei.property)(t.labelProperty)],t.prototype,"label",void 0),t}(xi);Bn.CaptionSource=Ci;var wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"MediaSource"},t.prototype.render=function(){var e=void 0;return this.isValid()&&((e=document.createElement("source")).src=this.url,e.type=this.mimeType),e},t}(xi);Bn.MediaSource=wi;var Si=function(){function e(){}return e.prototype.play=function(){},Object.defineProperty(e.prototype,"posterUrl",{get:function(){return this._posterUrl},set:function(e){this._posterUrl=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selectedMediaType",{get:function(){},enumerable:!1,configurable:!0}),e}();Bn.MediaPlayer=Si;var ki=function(e){function t(t){var n=e.call(this)||this;return n.owner=t,n._selectedSources=[],n._captionSources=[],n.processSources(),n}return $o(t,e),t.prototype.processSources=function(){var e;this._selectedSources=[],this._captionSources=[],this._selectedMediaType=void 0;for(var n=0,r=this.owner.sources;n<r.length;n++){var o=r[n],i=o.mimeType?o.mimeType.split("/"):[];if(2===i.length){if(!this._selectedMediaType){var a=t.supportedMediaTypes.indexOf(i[0]);a>=0&&(this._selectedMediaType=t.supportedMediaTypes[a])}i[0]===this._selectedMediaType&&this._selectedSources.push(o)}}(e=this._captionSources).push.apply(e,this.owner.captionSources)},t.prototype.canPlay=function(){return this._selectedSources.length>0},t.prototype.fetchVideoDetails=function(){return Jo(this,void 0,void 0,function(){return Go(this,function(e){return[2]})})},t.prototype.render=function(){"video"===this._selectedMediaType?this._mediaElement=document.createElement("video"):this._mediaElement=document.createElement("audio"),this._mediaElement.setAttribute("aria-label",this.owner.altText?this.owner.altText:ni.Strings.defaults.mediaPlayerAriaLabel()),this._mediaElement.setAttribute("webkit-playsinline",""),this._mediaElement.setAttribute("playsinline",""),this._mediaElement.setAttribute("crossorigin",""),this._mediaElement.autoplay=!0,this._mediaElement.controls=!0,Yo.isMobileOS()&&(this._mediaElement.muted=!0),this._mediaElement.preload="none",this._mediaElement.style.width="100%";for(var e=0,t=this.owner.sources;e<t.length;e++){var n=t[e].render();Yo.appendChild(this._mediaElement,n)}for(var r=0,o=this.owner.captionSources;r<o.length;r++){var i=o[r];if("vtt"==i.mimeType){var a=i.render();Yo.appendChild(this._mediaElement,a)}}return this._mediaElement},t.prototype.play=function(){this._mediaElement&&this._mediaElement.play()},Object.defineProperty(t.prototype,"selectedMediaType",{get:function(){return this._selectedMediaType},enumerable:!1,configurable:!0}),t.supportedMediaTypes=["audio","video"],t}(Si);Bn.HTML5MediaPlayer=ki;var Pi=function(e){function t(t){return e.call(this)||this}return $o(t,e),t}(Si);Bn.CustomMediaPlayer=Pi;var Ei=function(e){function t(t,n){var r=e.call(this,t)||this;return r.iFrameTitle=n,t.length>=2&&(r._videoId=t[1]),r}return $o(t,e),t.prototype.canPlay=function(){return void 0!==this._videoId},t.prototype.render=function(){var e=document.createElement("div");e.style.position="relative",e.style.width="100%",e.style.height="0",e.style.paddingBottom="56.25%";var t=document.createElement("iframe");return t.style.position="absolute",t.style.top="0",t.style.left="0",t.style.width="100%",t.style.height="100%",t.src=this.getEmbedVideoUrl(),t.frameBorder="0",this.iFrameTitle&&(t.title=this.iFrameTitle),t.allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",t.allowFullscreen=!0,e.appendChild(t),e},Object.defineProperty(t.prototype,"videoId",{get:function(){return this._videoId},enumerable:!1,configurable:!0}),t}(Pi);Bn.IFrameMediaMediaPlayer=Ei;var Ai=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.fetchVideoDetails=function(){return Jo(this,void 0,void 0,function(){var e,t,n;return Go(this,function(r){switch(r.label){case 0:return e="https://vimeo.com/api/oembed.json?url=".concat(this.getEmbedVideoUrl()),[4,fetch(e)];case 1:return(t=r.sent()).ok?[4,t.json()]:[3,3];case 2:n=r.sent(),this.posterUrl=n.thumbnail_url,r.label=3;case 3:return[2]}})})},t.prototype.getEmbedVideoUrl=function(){return"https://player.vimeo.com/video/".concat(this.videoId,"?autoplay=1")},t}(Ei);Bn.VimeoPlayer=Ai;var Ii=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.fetchVideoDetails=function(){return Jo(this,void 0,void 0,function(){var e,t,n;return Go(this,function(r){switch(r.label){case 0:return e="https://api.dailymotion.com/video/".concat(this.videoId,"?fields=thumbnail_720_url"),[4,fetch(e)];case 1:return(t=r.sent()).ok?[4,t.json()]:[3,3];case 2:n=r.sent(),this.posterUrl=n.thumbnail_720_url,r.label=3;case 3:return[2]}})})},t.prototype.getEmbedVideoUrl=function(){return"https://www.dailymotion.com/embed/video/".concat(this.videoId,"?autoplay=1")},t}(Ei);Bn.DailymotionPlayer=Ii;var _i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.iFrameTitle=n,t.length>=3&&void 0!==t[2]&&(r._startTimeIndex=parseInt(t[2])),r}return $o(t,e),t.prototype.fetchVideoDetails=function(){return Jo(this,void 0,void 0,function(){return Go(this,function(e){return this.posterUrl=this.videoId?"https://img.youtube.com/vi/".concat(this.videoId,"/maxresdefault.jpg"):void 0,[2]})})},t.prototype.getEmbedVideoUrl=function(){var e="https://www.youtube.com/embed/".concat(this.videoId,"?autoplay=1");return void 0!==this._startTimeIndex&&(e+="&start=".concat(this._startTimeIndex)),e},t}(Ei);Bn.YouTubePlayer=_i;var Ti,ji,Mi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.sources=[],t.captionSources=[],t}return $o(t,e),t.prototype.createMediaPlayer=function(){for(var e=0,n=t.customMediaPlayers;e<n.length;e++)for(var r=n[e],o=0,i=this.sources;o<i.length;o++){var a=i[o];if(a.url)for(var s=0,l=r.urlPatterns;s<l.length;s++){var c=l[s].exec(a.url);if(null!==c)return r.createMediaPlayer(c)}}return new ki(this)},t.prototype.handlePlayButtonInvoke=function(e){if(this.hostConfig.media.allowInlinePlayback){if(e.preventDefault(),e.cancelBubble=!0,this.renderedElement){var n=this._mediaPlayer.render();oi(this.renderedElement),this.renderedElement.appendChild(n),this._mediaPlayer.play(),n.focus()}}else t.onPlay&&(e.preventDefault(),e.cancelBubble=!0,t.onPlay(this))},t.prototype.displayPoster=function(){return Jo(this,void 0,void 0,function(){var e,t,n,r,o,i,a=this;return Go(this,function(s){return this.renderedElement&&((e=document.createElement("div")).className=this.hostConfig.makeCssClassName("ac-media-poster"),e.setAttribute("role","contentinfo"),e.setAttribute("aria-label",this.altText?this.altText:ni.Strings.defaults.mediaPlayerAriaLabel()),e.style.position="relative",e.style.display="flex",(t=this.poster?this.poster:this._mediaPlayer.posterUrl)||(t=this.hostConfig.media.defaultPoster),t?((n=document.createElement("img")).style.width="100%",n.style.height="100%",n.setAttribute("role","presentation"),n.onerror=function(t){n.parentNode&&n.parentNode.removeChild(n),e.classList.add("empty"),e.style.minHeight="150px"},n.src=t,e.appendChild(n)):(e.classList.add("empty"),e.style.minHeight="150px"),this.hostConfig.supportsInteractivity&&this._mediaPlayer.canPlay()&&((r=document.createElement("div")).tabIndex=0,r.setAttribute("role","button"),r.setAttribute("aria-label",ni.Strings.defaults.mediaPlayerPlayMedia()),r.className=this.hostConfig.makeCssClassName("ac-media-playButton"),r.style.display="flex",r.style.alignItems="center",r.style.justifyContent="center",r.onclick=function(e){a.handlePlayButtonInvoke(e)},r.onkeypress=function(e){"Enter"!==e.code&&"Space"!==e.code||a.handlePlayButtonInvoke(e)},(o=document.createElement("div")).className=this.hostConfig.makeCssClassName("ac-media-playButton-arrow"),o.style.width="12px",o.style.height="15px",o.style.borderTopWidth="7.5px",o.style.borderBottomWidth="7.5px",o.style.borderLeftWidth="12px",o.style.borderRightWidth="0",o.style.borderStyle="solid",o.style.borderTopColor="transparent",o.style.borderRightColor="transparent",o.style.borderBottomColor="transparent",o.style.transform="translate(1.2px,0px)",r.appendChild(o),(i=document.createElement("div")).style.position="absolute",i.style.left="0",i.style.top="0",i.style.width="100%",i.style.height="100%",i.style.display="flex",i.style.justifyContent="center",i.style.alignItems="center",i.appendChild(r),e.appendChild(i)),oi(this.renderedElement),this.renderedElement.appendChild(e)),[2]})})},t.prototype.internalRender=function(){var e=document.createElement("div");return e.className=this.hostConfig.makeCssClassName("ac-media"),e},t.prototype.render=function(){var t=this,n=e.prototype.render.call(this);return n&&(this._mediaPlayer=this.createMediaPlayer(),this._mediaPlayer.fetchVideoDetails().then(function(){return t.displayPoster()})),n},t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this),this.displayPoster()},t.prototype.getJsonTypeName=function(){return"Media"},t.prototype.getResourceInformation=function(){var e=[];if(this._mediaPlayer){var t=this.poster?this.poster:this.hostConfig.media.defaultPoster;t&&e.push({url:t,mimeType:"image"})}for(var n=0,r=this.sources;n<r.length;n++){var o=r[n];o.isValid()&&e.push({url:o.url,mimeType:o.mimeType})}for(var i=0,a=this.captionSources;i<a.length;i++){var s=a[i];s.isValid()&&e.push({url:s.url,mimeType:s.mimeType})}return e},Object.defineProperty(t.prototype,"selectedMediaType",{get:function(){return this._mediaPlayer.selectedMediaType},enumerable:!1,configurable:!0}),t.customMediaPlayers=[{urlPatterns:[/^(?:https?:\/\/)?(?:www.)?youtube.com\/watch\?(?=.*v=([\w\d-_]+))(?=(?:.*t=(\d+))?).*/gi,/^(?:https?:\/\/)?youtu.be\/([\w\d-_]+)(?:\?t=(\d+))?/gi],createMediaPlayer:function(e){return new _i(e,ni.Strings.defaults.youTubeVideoPlayer())}},{urlPatterns:[/^(?:https?:\/\/)?vimeo.com\/([\w\d-_]+).*/gi],createMediaPlayer:function(e){return new Ai(e,ni.Strings.defaults.vimeoVideoPlayer())}},{urlPatterns:[/^(?:https?:\/\/)?(?:www.)?dailymotion.com\/video\/([\w\d-_]+).*/gi],createMediaPlayer:function(e){return new Ii(e,ni.Strings.defaults.dailymotionVideoPlayer())}}],t.sourcesProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_1,"sources",wi),t.captionSourcesProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_6,"captionSources",Ci),t.posterProperty=new ei.StringProperty(ei.Versions.v1_1,"poster"),t.altTextProperty=new ei.StringProperty(ei.Versions.v1_1,"altText"),Uo([(0,ei.property)(t.sourcesProperty)],t.prototype,"sources",void 0),Uo([(0,ei.property)(t.captionSourcesProperty)],t.prototype,"captionSources",void 0),Uo([(0,ei.property)(t.posterProperty)],t.prototype,"poster",void 0),Uo([(0,ei.property)(t.altTextProperty)],t.prototype,"altText",void 0),t}(ai);Bn.Media=Mi,(ji=Ti||(Ti={}))[ji.InitialRender=0]="InitialRender",ji[ji.MouseEnterOnCard=1]="MouseEnterOnCard",ji[ji.MouseLeaveOnCard=2]="MouseLeaveOnCard",ji[ji.FocusLeave=3]="FocusLeave";var Ni=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.inputStyle=qo.InputStyle.Default,t}return $o(t,e),t.prototype.getAllLabelIds=function(){var e=[];return this.labelledBy&&e.push(this.labelledBy),this._renderedLabelElement&&e.push(this._renderedLabelElement.id),this._renderedErrorMessageElement&&e.push(this._renderedErrorMessageElement.id),e},t.prototype.updateInputControlAriaLabelledBy=function(){if(this._renderedInputControlElement){var e=this.getAllLabelIds();e.length>0?this._renderedInputControlElement.setAttribute("aria-labelledby",e.join(" ")):this._renderedInputControlElement.removeAttribute("aria-labelledby")}},Object.defineProperty(t.prototype,"isNullable",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedInputControlElement",{get:function(){return this._renderedInputControlElement},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"inputControlContainerElement",{get:function(){return this._inputControlContainerElement},enumerable:!1,configurable:!0}),t.prototype.overrideInternalRender=function(){var e=this,t=this.hostConfig;this._outerContainerElement=document.createElement("div"),this._outerContainerElement.style.display="flex",this.labelPosition===qo.InputLabelPosition.Inline?this._outerContainerElement.style.flexDirection="row":this._outerContainerElement.style.flexDirection="column";var n=Yo.generateUniqueId();if(this.label){var r=new di;r.setParent(this),r.forElementId=n;var o=new ui(this.label);if(r.addInline(o),this.isRequired){o.init(t.inputs.label.requiredInputs);var i=new ui(t.inputs.label.requiredInputs.suffix);i.color=t.inputs.label.requiredInputs.suffixColor,i.ariaHidden=!0,r.addInline(i)}else o.init(t.inputs.label.optionalInputs);this._renderedLabelElement=r.render(),this._renderedLabelElement&&(this._renderedLabelElement.id=Yo.generateUniqueId(),this.labelPosition===qo.InputLabelPosition.Inline?this._renderedLabelElement.style.alignSelf="center":this._renderedLabelElement.style.marginBottom=t.getEffectiveSpacing(t.inputs.label.inputSpacing)+"px",this._outerContainerElement.appendChild(this._renderedLabelElement))}if(this._inputControlContainerElement=document.createElement("div"),this._inputControlContainerElement.className=t.makeCssClassName("ac-input-container"),this._inputControlContainerElement.style.display="flex","stretch"===this.height&&(this._inputControlContainerElement.style.alignItems="stretch",this._inputControlContainerElement.style.flex="1 1 auto"),this._renderedInputControlElement=this.internalRender(),this._renderedInputControlElement){if(this._renderedInputControlElement.id=n,this._renderedInputControlElement.style.minWidth="0px",this.isNullable&&this.isRequired&&(this._renderedInputControlElement.setAttribute("aria-required","true"),this._renderedInputControlElement.classList.add(t.makeCssClassName("ac-input-required"))),this._inputControlContainerElement.appendChild(this._renderedInputControlElement),this._outerContainerElement.appendChild(this._inputControlContainerElement),this._renderedLabelElement&&this.labelPosition===qo.InputLabelPosition.Inline)if(this.labelWidth){if(this.labelWidth.unit==qo.SizeUnit.Weight){var a=this.labelWidth.physicalSize;this._renderedLabelElement.style.width=a.toString()+"%",this._inputControlContainerElement.style.width=(100-a).toString()+"%"}else if(this.labelWidth.unit==qo.SizeUnit.Pixel){var s=this.labelWidth.physicalSize;this._renderedLabelElement.style.width=s.toString()+"px"}}else{var l=t.inputs.label.width;this._renderedLabelElement.style.width=l.toString()+"%",this._inputControlContainerElement.style.width=100-l+"%"}return this.updateVisualState(Ti.InitialRender),this._renderedInputControlElement&&(this._renderedInputControlElement.onblur=function(t){e.updateVisualState(Ti.FocusLeave)}),this.updateInputControlAriaLabelledBy(),this._outerContainerElement}this.resetDirtyState()},t.prototype.valueChanged=function(){var e,t,n;this.getRootElement().updateActionsEnabledState(),this.isValid()&&this.resetValidationFailureCue(),this.onValueChanged&&this.onValueChanged(this),t=(e=this).getRootElement(),(n=t&&t.onInputValueChanged?t.onInputValueChanged:Ia.onInputValueChanged)&&n(e)},t.prototype.resetValidationFailureCue=function(){this.renderedInputControlElement&&(this.renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName("ac-input-validation-failed")),this.updateInputControlAriaLabelledBy(),this._renderedErrorMessageElement&&(this._outerContainerElement.removeChild(this._renderedErrorMessageElement),this._renderedErrorMessageElement=void 0))},t.prototype.showValidationErrorMessage=function(){if(this.renderedElement&&this.errorMessage&&Xo.GlobalSettings.displayInputValidationErrors){var e=new ci;e.setParent(this),e.text=this.errorMessage,e.wrap=!0,e.init(this.hostConfig.inputs.errorMessage),this._renderedErrorMessageElement=e.render(),this._renderedErrorMessageElement&&(this._renderedErrorMessageElement.id=Yo.generateUniqueId(),this._outerContainerElement.appendChild(this._renderedErrorMessageElement),this.updateInputControlAriaLabelledBy())}},Object.defineProperty(t.prototype,"allowRevealOnHoverStyle",{get:function(){return this.hostConfig.inputs&&this.hostConfig.inputs.allowRevealOnHoverStyle},enumerable:!1,configurable:!0}),t.prototype.shouldHideInputAdornersForRevealOnHover=function(e,t){var n=e===document.activeElement,r=this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onhover"),o=e.classList.contains(r);return t===Ti.InitialRender||t===Ti.FocusLeave&&!o||t===Ti.MouseLeaveOnCard&&!n},t.prototype.updateVisualState=function(e){this.allowRevealOnHoverStyle&&this._renderedInputControlElement&&this.inputStyle===qo.InputStyle.RevealOnHover&&(e===Ti.InitialRender?this._renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onrender")):e===Ti.MouseEnterOnCard?this._renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onhover")):e===Ti.MouseLeaveOnCard&&this._renderedInputControlElement.classList.remove(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onhover")))},t.prototype.focus=function(){this._renderedInputControlElement&&this._renderedInputControlElement.focus()},t.prototype.isValid=function(){return!0},t.prototype.isDirty=function(){return this.value!==this._oldValue},t.prototype.resetDirtyState=function(){this._oldValue=this.value},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this.id||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.inputsMustHaveUniqueId()),this.isRequired&&(this.label||t.addFailure(this,qo.ValidationEvent.RequiredInputsShouldHaveLabel,"Required inputs should have a label"),this.errorMessage||t.addFailure(this,qo.ValidationEvent.RequiredInputsShouldHaveErrorMessage,"Required inputs should have an error message"))},t.prototype.validateValue=function(){this.resetValidationFailureCue();var e=this.isRequired?this.isSet()&&this.isValid():this.isValid();return!e&&this.renderedInputControlElement&&(this.renderedInputControlElement.classList.add(this.hostConfig.makeCssClassName("ac-input-validation-failed")),this.showValidationErrorMessage()),e},t.prototype.getAllInputs=function(e){return[this]},t.prototype.render=function(){var t=e.prototype.render.call(this);return this.resetDirtyState(),t},Object.defineProperty(t.prototype,"isInteractive",{get:function(){return!0},enumerable:!1,configurable:!0}),t.labelProperty=new ei.StringProperty(ei.Versions.v1_3,"label",!0),t.isRequiredProperty=new ei.BoolProperty(ei.Versions.v1_3,"isRequired",!1),t.errorMessageProperty=new ei.StringProperty(ei.Versions.v1_3,"errorMessage",!0),t.inputStyleProperty=new ei.EnumProperty(ei.Versions.v1_6,"inputStyle",qo.InputStyle,qo.InputStyle.Default,[{value:qo.InputStyle.RevealOnHover},{value:qo.InputStyle.Default}]),t.labelWidthProperty=new ei.CustomProperty(ei.Versions.v1_6,"labelWidth",function(e,t,n,r){var o=t.defaultValue,i=n[t.name],a=!1;if("number"!=typeof i||isNaN(i))if("string"==typeof i)try{o=Xo.SizeAndUnit.parse(i)}catch(s){a=!0}else a=!0;else((o=new Xo.SizeAndUnit(i,qo.SizeUnit.Weight)).physicalSize<0||o.physicalSize>100)&&(a=!0);return a&&(r.logParseEvent(e,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidInputLabelWidth()),o=void 0),o},function(e,t,n,r,o){r instanceof Xo.SizeAndUnit&&(r.unit===qo.SizeUnit.Pixel?o.serializeValue(n,"labelWidth",r.physicalSize+"px"):o.serializeNumber(n,"labelWidth",r.physicalSize))},void 0),t.labelPositionProperty=new ei.EnumProperty(ei.Versions.v1_6,"labelPosition",qo.InputLabelPosition,qo.InputLabelPosition.Above,[{value:qo.InputLabelPosition.Inline},{value:qo.InputLabelPosition.Above}]),Uo([(0,ei.property)(t.labelProperty)],t.prototype,"label",void 0),Uo([(0,ei.property)(t.isRequiredProperty)],t.prototype,"isRequired",void 0),Uo([(0,ei.property)(t.errorMessageProperty)],t.prototype,"errorMessage",void 0),Uo([(0,ei.property)(t.inputStyleProperty)],t.prototype,"inputStyle",void 0),Uo([(0,ei.property)(t.labelWidthProperty)],t.prototype,"labelWidth",void 0),Uo([(0,ei.property)(t.labelPositionProperty)],t.prototype,"labelPosition",void 0),t}(ai);Bn.Input=Ni;var Di=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMultiline=!1,t.style=qo.InputTextStyle.Text,t}return $o(t,e),t.prototype.setupInput=function(e){var t=this;e.style.flex="1 1 auto",e.tabIndex=this.isDesignMode()?-1:0,this.placeholder&&(e.placeholder=this.placeholder,e.setAttribute("aria-label",this.placeholder)),this.defaultValue&&(e.value=this.defaultValue),this.maxLength&&this.maxLength>0&&(e.maxLength=this.maxLength),e.oninput=function(){t.valueChanged()},e.onkeypress=function(e){e.ctrlKey&&"Enter"===e.code&&t.inlineAction&&t.inlineAction.isEffectivelyEnabled()&&t.inlineAction.execute()}},t.prototype.internalRender=function(){var e;return this.isMultiline&&this.style!==qo.InputTextStyle.Password?((e=document.createElement("textarea")).className=this.hostConfig.makeCssClassName("ac-input","ac-textInput","ac-multiline"),"stretch"===this.height&&(e.style.height="initial")):((e=document.createElement("input")).className=this.hostConfig.makeCssClassName("ac-input","ac-textInput"),e.type=qo.InputTextStyle[this.style].toLowerCase()),this.setupInput(e),e},t.prototype.overrideInternalRender=function(){var t=this,n=e.prototype.overrideInternalRender.call(this);if(this.inlineAction){var r=document.createElement("button");if(r.className=this.hostConfig.makeCssClassName(this.inlineAction.isEffectivelyEnabled()?"ac-inlineActionButton":"ac-inlineActionButton-disabled"),r.onclick=function(e){t.inlineAction&&t.inlineAction.isEffectivelyEnabled()&&(e.preventDefault(),e.cancelBubble=!0,t.inlineAction.execute())},this.inlineAction.iconUrl){r.classList.add("iconOnly");var o=document.createElement("img");o.style.height="100%",o.setAttribute("role","presentation"),o.style.display="none",o.onload=function(){o.style.removeProperty("display")},o.onerror=function(){r.removeChild(o),r.classList.remove("iconOnly"),r.classList.add("textOnly"),r.textContent=t.inlineAction&&t.inlineAction.title?t.inlineAction.title:ni.Strings.defaults.inlineActionTitle()},o.src=this.inlineAction.iconUrl,r.appendChild(o),r.title=this.inlineAction.title?this.inlineAction.title:ni.Strings.defaults.inlineActionTitle()}else r.classList.add("textOnly"),r.textContent=this.inlineAction.title?this.inlineAction.title:ni.Strings.defaults.inlineActionTitle();this.inlineAction.setupElementForAccessibility(r,!0),r.style.marginLeft="8px",this.inputControlContainerElement.appendChild(r)}return n},t.prototype.updateVisualState=function(t){this.allowRevealOnHoverStyle&&(this.inlineAction||this.isMultiline||e.prototype.updateVisualState.call(this,t))},t.prototype.getJsonTypeName=function(){return"Input.Text"},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return this.inlineAction&&t.push(this.inlineAction),t},t.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);return!n&&this.inlineAction&&(n=this.inlineAction.getActionById(t)),n},t.prototype.isSet=function(){return!!this.value},t.prototype.isValid=function(){return!this.value||(!this.regex||new RegExp(this.regex,"g").test(this.value))},Object.defineProperty(t.prototype,"value",{get:function(){return this.renderedInputControlElement?(this.isMultiline,this.renderedInputControlElement.value):void 0},enumerable:!1,configurable:!0}),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),t.maxLengthProperty=new ei.NumProperty(ei.Versions.v1_0,"maxLength"),t.isMultilineProperty=new ei.BoolProperty(ei.Versions.v1_0,"isMultiline",!1),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.styleProperty=new ei.EnumProperty(ei.Versions.v1_0,"style",qo.InputTextStyle,qo.InputTextStyle.Text,[{value:qo.InputTextStyle.Text},{value:qo.InputTextStyle.Tel},{value:qo.InputTextStyle.Url},{value:qo.InputTextStyle.Email},{value:qo.InputTextStyle.Password,targetVersion:ei.Versions.v1_5}]),t.inlineActionProperty=new si(ei.Versions.v1_0,"inlineAction",["Action.ShowCard"]),t.regexProperty=new ei.StringProperty(ei.Versions.v1_3,"regex",!0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.maxLengthProperty)],t.prototype,"maxLength",void 0),Uo([(0,ei.property)(t.isMultilineProperty)],t.prototype,"isMultiline",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),Uo([(0,ei.property)(t.inlineActionProperty)],t.prototype,"inlineAction",void 0),Uo([(0,ei.property)(t.regexProperty)],t.prototype,"regex",void 0),t}(Ni);Bn.TextInput=Di;var Oi=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.valueOn="true",t.valueOff="false",t.wrap=!1,t}return $o(t,e),t.prototype.updateInputControlAriaLabelledBy=function(){if(this._checkboxInputElement){var e=this.getAllLabelIds().join(" ");this._checkboxInputLabelElement&&this._checkboxInputLabelElement.id&&(e+=" "+this._checkboxInputLabelElement.id),e?this._checkboxInputElement.setAttribute("aria-labelledby",e):this._checkboxInputElement.removeAttribute("aria-labelledby")}},t.prototype.internalRender=function(){var e=this,t=document.createElement("div");if(t.className=this.hostConfig.makeCssClassName("ac-input","ac-toggleInput"),t.style.width="100%",t.style.display="flex",t.style.alignItems="center",this._checkboxInputElement=document.createElement("input"),this._checkboxInputElement.id=Yo.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.title&&this._checkboxInputElement.setAttribute("aria-label",this.title),this.isRequired&&this._checkboxInputElement.setAttribute("aria-required","true"),this._checkboxInputElement.tabIndex=this.isDesignMode()?-1:0,this.defaultValue===this.valueOn&&(this._checkboxInputElement.checked=!0),this._oldCheckboxValue=this._checkboxInputElement.checked,this._checkboxInputElement.onchange=function(){e.valueChanged()},Yo.appendChild(t,this._checkboxInputElement),this.title||this.isDesignMode()){var n=new ci;if(n.setParent(this),n.forElementId=this._checkboxInputElement.id,n.hostConfig=this.hostConfig,n.text=this.title?this.title:this.getJsonTypeName(),n.useMarkdown=Xo.GlobalSettings.useMarkdownInRadioButtonAndCheckbox,n.wrap=this.wrap,this._checkboxInputLabelElement=n.render(),this._checkboxInputLabelElement){this._checkboxInputLabelElement.id=Yo.generateUniqueId(),this._checkboxInputLabelElement.style.display="inline-block",this._checkboxInputLabelElement.style.flex="1 1 auto",this._checkboxInputLabelElement.style.marginLeft="6px",this._checkboxInputLabelElement.style.verticalAlign="middle";var r=document.createElement("div");r.style.width="6px",Yo.appendChild(t,r),Yo.appendChild(t,this._checkboxInputLabelElement)}}return t},Object.defineProperty(t.prototype,"isNullable",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.updateVisualState=function(e){},t.prototype.getJsonTypeName=function(){return"Input.Toggle"},t.prototype.focus=function(){this._checkboxInputElement&&this._checkboxInputElement.focus()},t.prototype.isSet=function(){return this.isRequired?this.value===this.valueOn:!!this.value},t.prototype.isDirty=function(){return!!this._checkboxInputElement&&this._checkboxInputElement.checked!==this._oldCheckboxValue},Object.defineProperty(t.prototype,"value",{get:function(){return this._checkboxInputElement?this._checkboxInputElement.checked?this.valueOn:this.valueOff:void 0},enumerable:!1,configurable:!0}),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),t.titleProperty=new ei.StringProperty(ei.Versions.v1_0,"title"),t.valueOnProperty=new ei.StringProperty(ei.Versions.v1_0,"valueOn",!0,void 0,"true",function(e){return"true"}),t.valueOffProperty=new ei.StringProperty(ei.Versions.v1_0,"valueOff",!0,void 0,"false",function(e){return"false"}),t.wrapProperty=new ei.BoolProperty(ei.Versions.v1_2,"wrap",!1),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"title",void 0),Uo([(0,ei.property)(t.valueOnProperty)],t.prototype,"valueOn",void 0),Uo([(0,ei.property)(t.valueOffProperty)],t.prototype,"valueOff",void 0),Uo([(0,ei.property)(t.wrapProperty)],t.prototype,"wrap",void 0),t}(Ni);Bn.ToggleInput=Oi;var Vi=function(e){function t(t,n){var r=e.call(this)||this;return r.title=t,r.value=n,r}return $o(t,e),t.prototype.getSchemaKey=function(){return"Choice"},t.titleProperty=new ei.StringProperty(ei.Versions.v1_0,"title"),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"title",void 0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"value",void 0),t}(ei.SerializableObject);Bn.Choice=Vi;var Bi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"choices.data"},t.typeProperty=new ei.StringProperty(ei.Versions.v1_6,"type",!0,new RegExp("^Data.Query$")),t.datasetProperty=new ei.StringProperty(ei.Versions.v1_6,"dataset"),t.countProperty=new ei.NumProperty(ei.Versions.v1_6,"count"),t.skipProperty=new ei.NumProperty(ei.Versions.v1_6,"skip"),Uo([(0,ei.property)(t.typeProperty)],t.prototype,"type",void 0),Uo([(0,ei.property)(t.datasetProperty)],t.prototype,"dataset",void 0),Uo([(0,ei.property)(t.countProperty)],t.prototype,"count",void 0),Uo([(0,ei.property)(t.skipProperty)],t.prototype,"skip",void 0),t}(ei.SerializableObject);Bn.ChoiceSetInputDataQuery=Bi;var Ri=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isMultiSelect=!1,t.wrap=!1,t.choices=[],t}return $o(t,e),Object.defineProperty(t.prototype,"isCompact",{get:function(){return!this.style||"compact"===this.style},set:function(e){this.style=e?void 0:"expanded"},enumerable:!1,configurable:!0}),t.getUniqueCategoryName=function(){var e="__ac-category"+t._uniqueCategoryCounter;return t._uniqueCategoryCounter++,e},t.prototype.isDynamicTypeahead=function(){return!!this.choicesData&&!!this.choicesData.dataset&&"Data.Query"===this.choicesData.type},t.prototype.getFilterForDynamicSearch=function(){var e,t;return null===(t=null===(e=this._filteredChoiceSet)||void 0===e?void 0:e.textInput)||void 0===t?void 0:t.value},t.prototype.renderChoices=function(e){var t;null===(t=this._filteredChoiceSet)||void 0===t||t.processResponse(e)},t.prototype.showLoadingIndicator=function(){var e;null===(e=this._filteredChoiceSet)||void 0===e||e.showLoadingIndicator()},t.prototype.removeLoadingIndicator=function(){var e;null===(e=this._filteredChoiceSet)||void 0===e||e.removeLoadingIndicator()},t.prototype.showErrorIndicator=function(e){var t;null===(t=this._filteredChoiceSet)||void 0===t||t.showErrorIndicator(e)},t.prototype.createPlaceholderOptionWhenValueDoesNotExist=function(){if(!this.value){var e=document.createElement("option");return e.selected=!0,e.disabled=!0,e.hidden=!0,e.value="",this.placeholder&&(e.text=this.placeholder),e}},t.prototype.internalApplyAriaCurrent=function(){if(this._selectElement){var e=this._selectElement.options;if(e)for(var t=0,n=Array.from(e);t<n.length;t++){var r=n[t];r.selected?r.setAttribute("aria-current","true"):r.removeAttribute("aria-current")}}},t.prototype.renderCompoundInput=function(e,t,n){var r=this,o=document.createElement("div");o.className=this.hostConfig.makeCssClassName("ac-input",e),o.style.width="100%",o.tabIndex=this.isDesignMode()?-1:0,this._toggleInputs=[],this._labels=[];for(var i=0,a=this.choices;i<a.length;i++){var s=a[i],l=document.createElement("input");l.id=Yo.generateUniqueId(),l.type=t,l.style.margin="0",l.style.display="inline-block",l.style.verticalAlign="middle",l.style.flex="0 0 auto",l.name=this.id?this.id:this._uniqueCategoryName,this.isRequired&&l.setAttribute("aria-required","true"),l.tabIndex=this.isDesignMode()?-1:0,s.value&&(l.value=s.value),s.title&&l.setAttribute("aria-label",s.title),n&&s.value&&n.indexOf(s.value)>=0&&(l.checked=!0),l.onchange=function(){r.valueChanged()},this._toggleInputs.push(l);var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",Yo.appendChild(c,l);var u=new ci;u.setParent(this),u.forElementId=l.id,u.hostConfig=this.hostConfig,u.text=s.title?s.title:"Choice "+this._toggleInputs.length,u.useMarkdown=Xo.GlobalSettings.useMarkdownInRadioButtonAndCheckbox,u.wrap=this.wrap;var d=u.render();if(this._labels.push(d),d){d.id=Yo.generateUniqueId(),d.style.display="inline-block",d.style.flex="1 1 auto",d.style.marginLeft="6px",d.style.verticalAlign="middle";var p=document.createElement("div");p.style.width="6px",Yo.appendChild(c,p),Yo.appendChild(c,d)}Yo.appendChild(o,c)}return o},t.prototype.updateInputControlAriaLabelledBy=function(){if((this.isMultiSelect||"expanded"===this.style)&&this._toggleInputs&&this._labels)for(var t=this.getAllLabelIds(),n=0;n<this._toggleInputs.length;n++){var r=t.join(" "),o=this._labels[n];o&&o.id&&(r+=" "+o.id),r?this._toggleInputs[n].setAttribute("aria-labelledby",r):this._toggleInputs[n].removeAttribute("aria-labelledby")}else e.prototype.updateInputControlAriaLabelledBy.call(this)},t.prototype.internalRender=function(){var e=this;if(this._uniqueCategoryName=t.getUniqueCategoryName(),this.isDynamicTypeahead()){var n=new zi(t._uniqueCategoryCounter,this.choices,this.hostConfig);if(n.render(),n.textInput){this._textInput=n.textInput,this.defaultValue&&(this._textInput.value=this.defaultValue),this.placeholder&&!this._textInput.value&&(this._textInput.placeholder=this.placeholder,this._textInput.setAttribute("aria-label",this.placeholder)),this._textInput.tabIndex=this.isDesignMode()?-1:0;var r=Yo.debounce(function(){n.processStaticChoices(),e.valueChanged(),e._textInput&&(e.value?(e._textInput.removeAttribute("placeholder"),e._textInput.removeAttribute("aria-label")):e.placeholder&&(e._textInput.placeholder=e.placeholder,e._textInput.setAttribute("aria-label",e.placeholder)))},this.hostConfig.inputs.debounceTimeInMilliSeconds);this._textInput.onclick=r,this._textInput.oninput=r}return n.parent=this,this._filteredChoiceSet=n,n.renderedElement}if(this.isMultiSelect)return this.renderCompoundInput("ac-choiceSetInput-multiSelect","checkbox",this.defaultValue?this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator):void 0);if("expanded"===this.style)return this.renderCompoundInput("ac-choiceSetInput-expanded","radio",this.defaultValue?[this.defaultValue]:void 0);if("filtered"===this.style){var o=document.createElement("div");o.style.width="100%",this._textInput=document.createElement("input"),this._textInput.className=this.hostConfig.makeCssClassName("ac-input","ac-multichoiceInput","ac-choiceSetInput-filtered"),this._textInput.type="text",this._textInput.style.width="100%",this._textInput.oninput=function(){e.valueChanged(),e._textInput&&(e.value?(e._textInput.removeAttribute("placeholder"),e._textInput.removeAttribute("aria-label")):e.placeholder&&(e._textInput.placeholder=e.placeholder,e._textInput.setAttribute("aria-label",e.placeholder)))},this.defaultValue&&(this._textInput.value=this.defaultValue),this.placeholder&&!this._textInput.value&&(this._textInput.placeholder=this.placeholder,this._textInput.setAttribute("aria-label",this.placeholder)),this._textInput.tabIndex=this.isDesignMode()?-1:0;var i=document.createElement("datalist");i.id=Yo.generateUniqueId();for(var a=0,s=this.choices;a<s.length;a++){var l=s[a],c=document.createElement("option");l.title&&(c.value=l.title,c.setAttribute("aria-label",l.title)),c.tabIndex=this.isDesignMode()?-1:0,i.appendChild(c)}return this._textInput.setAttribute("list",i.id),o.append(this._textInput,i),o}this._selectElement=document.createElement("select"),this._selectElement.className=this.hostConfig.makeCssClassName("ac-input","ac-multichoiceInput","ac-choiceSetInput-compact"),this._selectElement.style.width="100%",this._selectElement.tabIndex=this.isDesignMode()?-1:0;var u=this.createPlaceholderOptionWhenValueDoesNotExist();Yo.appendChild(this._selectElement,u);for(var d=0,p=this.choices;d<p.length;d++){l=p[d];(c=document.createElement("option")).value=l.value,l.title&&(c.text=l.title,c.setAttribute("aria-label",l.title)),c.tabIndex=this.isDesignMode()?-1:0,l.value===this.defaultValue&&(c.selected=!0),Yo.appendChild(this._selectElement,c)}return this._selectElement.onchange=function(){e.internalApplyAriaCurrent(),e.valueChanged()},this.internalApplyAriaCurrent(),this._selectElement},t.prototype.updateVisualState=function(t){this.allowRevealOnHoverStyle&&(!this.isMultiSelect&&this.isCompact&&(e.prototype.updateVisualState.call(this,t),this._selectElement&&this.inputStyle===qo.InputStyle.RevealOnHover&&(this.shouldHideInputAdornersForRevealOnHover(this._selectElement,t)?(this._selectElement.style.appearance="none",this._selectElement.classList.remove(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus"))):(this._selectElement.style.appearance="auto",this._selectElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus"))))))},t.prototype.getJsonTypeName=function(){return"Input.ChoiceSet"},t.prototype.focus=function(){this._toggleInputs&&(this.isMultiSelect||"expanded"===this.style)?this._toggleInputs.length>0&&this._toggleInputs[0].focus():this._textInput?this._textInput.focus():e.prototype.focus.call(this)},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),0===this.choices.length&&t.addFailure(this,qo.ValidationEvent.CollectionCantBeEmpty,ni.Strings.errors.choiceSetMustHaveAtLeastOneChoice());for(var n=0,r=this.choices;n<r.length;n++){var o=r[n];o.title&&o.value||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.choiceSetChoicesMustHaveTitleAndValue())}},t.prototype.isSet=function(){return!!this.value},t.prototype.isValid=function(){if(this._textInput){if(""===this.value||this.value===this.placeholder)return!0;for(var t=0,n=this.choices;t<n.length;t++){var r=n[t];if(this.value===r.value)return!0}if(this.dynamicChoices)for(var o=0,i=this.dynamicChoices;o<i.length;o++){r=i[o];if(this.value===r)return!0}return!1}return e.prototype.isValid.call(this)},Object.defineProperty(t.prototype,"value",{get:function(){if(this.isMultiSelect){if(!this._toggleInputs||0===this._toggleInputs.length)return;for(var e="",t=0,n=this._toggleInputs;t<n.length;t++){(l=n[t]).checked&&(""!==e&&(e+=this.hostConfig.choiceSetInputValueSeparator),e+=l.value)}return e||void 0}if(this._selectElement)return this._selectElement.selectedIndex>0?this._selectElement.value:void 0;if(this._textInput){for(var r=0,o=this.choices;r<o.length;r++){var i=o[r];if(i.title&&this._textInput.value===i.title)return i.value}return this._textInput.value}if(this._toggleInputs&&this._toggleInputs.length>0)for(var a=0,s=this._toggleInputs;a<s.length;a++){var l;if((l=s[a]).checked)return l.value}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dynamicChoices",{get:function(){var e;return null===(e=this._filteredChoiceSet)||void 0===e?void 0:e.dynamicChoices},enumerable:!1,configurable:!0}),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),t.choicesProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_0,"choices",Vi),t.choicesDataProperty=new ei.SerializableObjectProperty(ei.Versions.v1_6,"choices.data",Bi),t.styleProperty=new ei.ValueSetProperty(ei.Versions.v1_0,"style",[{value:"compact"},{value:"expanded"},{value:"filtered",targetVersion:ei.Versions.v1_5}],"compact"),t.isMultiSelectProperty=new ei.BoolProperty(ei.Versions.v1_0,"isMultiSelect",!1),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.wrapProperty=new ei.BoolProperty(ei.Versions.v1_2,"wrap",!1),t._uniqueCategoryCounter=0,Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),Uo([(0,ei.property)(t.isMultiSelectProperty)],t.prototype,"isMultiSelect",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),Uo([(0,ei.property)(t.wrapProperty)],t.prototype,"wrap",void 0),Uo([(0,ei.property)(t.choicesProperty)],t.prototype,"choices",void 0),Uo([(0,ei.property)(t.choicesDataProperty)],t.prototype,"choicesData",void 0),t}(Ni);Bn.ChoiceSetInput=Ri;var zi=function(){function e(e,t,n){this._choiceSetId=e,this._choices=t,this._dynamicChoices=[],this._visibleChoiceCount=0,this._hostConfig=n}return e.prototype.render=function(){var e=this,t=document.createElement("div");t.style.position="relative",t.style.width="100%",this._textInput=document.createElement("input"),this._textInput.className=this.hostConfig.makeCssClassName("ac-input","ac-multichoiceInput","ac-choiceSetInput-filtered"),this._textInput.type="text",this._textInput.style.width="100%",this._textInput.onkeydown=function(t){"ArrowDown"===t.key&&e.focusChoice(0)},this._dropdown=document.createElement("div"),this._dropdown.style.display="none",this._dropdown.className=this.hostConfig.makeCssClassName("ac-input","ac-multichoiceInput","ac-choiceSetInput-filtered-dropdown"),t.append(this._textInput,this._dropdown),document.onclick=function(t){if(e._dropdown){for(var n=e._dropdown.firstChild;n&&t.target!==n;)n=n.nextSibling;(n||t.target!==e._textInput)&&(e._dropdown.style.display="none")}},this._renderedElement=t},e.prototype.createChoice=function(e,t,n){var r=this,o=document.createElement("span");return o.className=this.hostConfig.makeCssClassName("ac-input","ac-choiceSetInput-choice"),o.id="ac-choiceSetInput-".concat(this._choiceSetId,"-choice-").concat(n),o.innerHTML=e.replace(t,"<b>".concat(t,"</b>")),o.tabIndex=-1,o.addEventListener("focusin",function(){o.classList.add("focused")}),o.addEventListener("focusout",function(){o.classList.remove("focused")}),o.onclick=function(){r._textInput&&(r._textInput.value=o.innerText),r._dropdown&&(r._dropdown.style.display="none")},o.onkeydown=function(e){"ArrowDown"===e.key?r.focusChoice(n+1):"ArrowUp"===e.key?r.focusChoice(n-1):"Enter"===e.key&&o.click()},o.onmouseover=function(){r.focusChoice(n)},o},e.prototype.focusChoice=function(e){var t=document.getElementById("ac-choiceSetInput-".concat(this._choiceSetId,"-choice-").concat(e));if(t)t.focus();else if(this._textInput){this._textInput.focus();var n=this._textInput.value.length;this._textInput.setSelectionRange(n,n)}},e.prototype.filterChoices=function(e){var t,n,r=null===(t=this._textInput)||void 0===t?void 0:t.value.toLowerCase();if(r)for(var o=0,i=e?this._dynamicChoices:this._choices;o<i.length;o++){var a=i[o];if(a.title){var s=a.title.toLowerCase().indexOf(r);if(-1!==s){var l=a.title.substring(s,s+r.length),c=this.createChoice(a.title,l,this._visibleChoiceCount++);null===(n=this._dropdown)||void 0===n||n.appendChild(c)}}}},e.prototype.getStatusIndicator=function(e){if(e){if(!this._errorIndicator){var t=document.createElement("div");t.className=this.hostConfig.makeCssClassName("ac-input","ac-choiceSetInput-statusIndicator","ac-choiceSetInput-errorIndicator"),this._errorIndicator=t}return this._errorIndicator.innerText=e,this._errorIndicator}if(!this._loadingIndicator){var n=document.createElement("div");n.className=this.hostConfig.makeCssClassName("ac-input","ac-choiceSetInput-statusIndicator"),this._loadingIndicator=n}return this._loadingIndicator.innerText=0===this._visibleChoiceCount?"Loading...":"Loading more...",this._loadingIndicator},e.prototype.resetDropdown=function(){this._dynamicChoices=[],this._dropdown&&(Yo.clearElementChildren(this._dropdown),this._visibleChoiceCount=0)},e.prototype.showDropdown=function(){var e;(null===(e=this._dropdown)||void 0===e?void 0:e.hasChildNodes)&&(this._dropdown.style.display="block")},e.prototype.processStaticChoices=function(){this.resetDropdown(),this.filterChoices(),this.showDropdown()},e.prototype.processResponse=function(e){this._dynamicChoices=e,this.filterChoices(!0),0===this._visibleChoiceCount&&this.showErrorIndicator("No results found.")},e.prototype.showLoadingIndicator=function(){var e,t=this.getStatusIndicator();null===(e=this._dropdown)||void 0===e||e.appendChild(t),this.showDropdown()},e.prototype.removeLoadingIndicator=function(){var e,t;this._loadingIndicator&&(null===(e=this._dropdown)||void 0===e?void 0:e.contains(this._loadingIndicator))&&(null===(t=this._dropdown)||void 0===t||t.removeChild(this._loadingIndicator))},e.prototype.showErrorIndicator=function(e){var t;this.removeLoadingIndicator();var n=this.getStatusIndicator(e);null===(t=this._dropdown)||void 0===t||t.appendChild(n)},Object.defineProperty(e.prototype,"dynamicChoices",{get:function(){var e;return null===(e=this._dynamicChoices)||void 0===e?void 0:e.map(function(e){return e.title})},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hostConfig",{get:function(){return this._hostConfig?this._hostConfig:this.parent?this.parent.hostConfig:Zo.defaultHostConfig},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this._parent},set:function(e){this._parent=e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"renderedElement",{get:function(){return this._renderedElement},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textInput",{get:function(){return this._textInput},enumerable:!1,configurable:!0}),e}();Bn.FilteredChoiceSet=zi;var Li=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.internalRender=function(){var e=this;return this._numberInputElement=document.createElement("input"),this._numberInputElement.setAttribute("type","number"),void 0!==this.min&&this._numberInputElement.setAttribute("min",this.min.toString()),void 0!==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=this.isDesignMode()?-1:0,void 0!==this.defaultValue&&(this._numberInputElement.valueAsNumber=this.defaultValue),this.placeholder&&(this._numberInputElement.placeholder=this.placeholder,this._numberInputElement.setAttribute("aria-label",this.placeholder)),this._numberInputElement.oninput=function(){e.valueChanged()},this._numberInputElement},t.prototype.getJsonTypeName=function(){return"Input.Number"},t.prototype.isSet=function(){return void 0!==this.value&&!isNaN(this.value)},t.prototype.isValid=function(){if(void 0===this.value)return!this.isRequired;var e=!0;return void 0!==this.min&&(e=e&&this.value>=this.min),void 0!==this.max&&(e=e&&this.value<=this.max),e},Object.defineProperty(t.prototype,"value",{get:function(){return this._numberInputElement?this._numberInputElement.valueAsNumber:void 0},set:function(e){e&&this._numberInputElement&&(this._numberInputElement.value=e.toString())},enumerable:!1,configurable:!0}),t.valueProperty=new ei.NumProperty(ei.Versions.v1_0,"value"),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.minProperty=new ei.NumProperty(ei.Versions.v1_0,"min"),t.maxProperty=new ei.NumProperty(ei.Versions.v1_0,"max"),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.minProperty)],t.prototype,"min",void 0),Uo([(0,ei.property)(t.maxProperty)],t.prototype,"max",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),t}(Ni);Bn.NumberInput=Li;var Hi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.internalRender=function(){var e=this;return this._dateInputElement=document.createElement("input"),this._dateInputElement.setAttribute("type","date"),this.min&&this._dateInputElement.setAttribute("min",this.min),this.max&&this._dateInputElement.setAttribute("max",this.max),this.placeholder&&(this._dateInputElement.placeholder=this.placeholder,this._dateInputElement.setAttribute("aria-label",this.placeholder)),this._dateInputElement.tabIndex=this.isDesignMode()?-1:0,this._dateInputElement.className=this.hostConfig.makeCssClassName("ac-input","ac-dateInput"),this._dateInputElement.style.width="100%",this._dateInputElement.oninput=function(){e.valueChanged()},this.defaultValue&&(this._dateInputElement.value=this.defaultValue),this._dateInputElement},t.prototype.updateVisualState=function(t){if(this.allowRevealOnHoverStyle&&(e.prototype.updateVisualState.call(this,t),this._dateInputElement&&this.inputStyle===qo.InputStyle.RevealOnHover)){var n=this.shouldHideInputAdornersForRevealOnHover(this._dateInputElement,t);n?this._dateInputElement.classList.remove(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus")):this._dateInputElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus")),Ca(this._dateInputElement,n)}},t.prototype.getJsonTypeName=function(){return"Input.Date"},t.prototype.isSet=function(){return!!this.value},t.prototype.isValid=function(){if(!this.value)return!this.isRequired;var e=new Date(this.value),t=!0;if(this.min){var n=new Date(this.min);t=t&&e>=n}if(this.max){var r=new Date(this.max);t=t&&e<=r}return t},Object.defineProperty(t.prototype,"value",{get:function(){return this._dateInputElement?this._dateInputElement.value:void 0},enumerable:!1,configurable:!0}),t.valueProperty=new ei.StringProperty(ei.Versions.v1_0,"value"),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.minProperty=new ei.StringProperty(ei.Versions.v1_0,"min"),t.maxProperty=new ei.StringProperty(ei.Versions.v1_0,"max"),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.minProperty)],t.prototype,"min",void 0),Uo([(0,ei.property)(t.maxProperty)],t.prototype,"max",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),t}(Ni);Bn.DateInput=Hi;var Fi=function(e){function t(t,n){var r=e.call(this,t,n,function(e,t,n,r){var o=n[t.name];if("string"==typeof o&&o&&/^[0-9]{2}:[0-9]{2}$/.test(o))return o},function(e,t,n,r,o){o.serializeValue(n,t.name,r)})||this;return r.targetVersion=t,r.name=n,r}return $o(t,e),t}(ei.CustomProperty);Bn.TimeProperty=Fi;var Wi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.convertTimeStringToDate=function(e){return new Date("1973-09-04T"+e+":00Z")},t.prototype.internalRender=function(){var e=this;return this._timeInputElement=document.createElement("input"),this._timeInputElement.setAttribute("type","time"),this.min&&this._timeInputElement.setAttribute("min",this.min),this.max&&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(){e.valueChanged()},this.placeholder&&(this._timeInputElement.placeholder=this.placeholder,this._timeInputElement.setAttribute("aria-label",this.placeholder)),this._timeInputElement.tabIndex=this.isDesignMode()?-1:0,this.defaultValue&&(this._timeInputElement.value=this.defaultValue),this._timeInputElement},t.prototype.updateVisualState=function(t){if(this.allowRevealOnHoverStyle&&(e.prototype.updateVisualState.call(this,t),this._timeInputElement&&this.inputStyle===qo.InputStyle.RevealOnHover)){var n=this.shouldHideInputAdornersForRevealOnHover(this._timeInputElement,t);n?this._timeInputElement.classList.remove(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus")):this._timeInputElement.classList.add(this.hostConfig.makeCssClassName("ac-inputStyle-revealOnHover-onfocus")),Ca(this._timeInputElement,n)}},t.prototype.getJsonTypeName=function(){return"Input.Time"},t.prototype.isSet=function(){return!!this.value},t.prototype.isValid=function(){if(!this.value)return!this.isRequired;var e=t.convertTimeStringToDate(this.value),n=!0;if(this.min){var r=t.convertTimeStringToDate(this.min);n=n&&e>=r}if(this.max){var o=t.convertTimeStringToDate(this.max);n=n&&e<=o}return n},Object.defineProperty(t.prototype,"value",{get:function(){return this._timeInputElement?this._timeInputElement.value:void 0},enumerable:!1,configurable:!0}),t.valueProperty=new Fi(ei.Versions.v1_0,"value"),t.placeholderProperty=new ei.StringProperty(ei.Versions.v1_0,"placeholder"),t.minProperty=new Fi(ei.Versions.v1_0,"min"),t.maxProperty=new Fi(ei.Versions.v1_0,"max"),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"defaultValue",void 0),Uo([(0,ei.property)(t.minProperty)],t.prototype,"min",void 0),Uo([(0,ei.property)(t.maxProperty)],t.prototype,"max",void 0),Uo([(0,ei.property)(t.placeholderProperty)],t.prototype,"placeholder",void 0),t}(Ni);Bn.TimeInput=Wi;var $i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.style=qo.ActionStyle.Default,t.mode=qo.ActionMode.Primary,t._state=0,t._isFocusable=!0,t}return $o(t,e),t.prototype.renderButtonContent=function(){if(this.renderedElement){var e=this.hostConfig,t=document.createElement("div");if(t.style.overflow="hidden",t.style.textOverflow="ellipsis",e.actions.iconPlacement===qo.ActionIconPlacement.AboveTitle||e.actions.allowTitleToWrap||(t.style.whiteSpace="nowrap"),this.title&&(t.innerText=this.title),this.iconUrl){var n=document.createElement("img");n.src=this.iconUrl,n.style.width=e.actions.iconSize+"px",n.style.height=e.actions.iconSize+"px",n.style.flex="0 0 auto",e.actions.iconPlacement===qo.ActionIconPlacement.AboveTitle?(this.renderedElement.classList.add("iconAbove"),this.renderedElement.style.flexDirection="column",this.title&&(n.style.marginBottom="6px")):(this.renderedElement.classList.add("iconLeft"),n.style.maxHeight="100%",this.title&&(n.style.marginRight="6px")),this.renderedElement.appendChild(n),this.renderedElement.appendChild(t)}else this.renderedElement.classList.add("noIcon"),this.renderedElement.appendChild(t)}},t.prototype.getParentContainer=function(){return this.parent instanceof ma?this.parent:this.parent?this.parent.getParentContainer():void 0},t.prototype.isDesignMode=function(){var e=this.getRootObject();return e instanceof ai&&e.isDesignMode()},t.prototype.updateCssClasses=function(){var e,t;if(this.parent&&this.renderedElement){var n=this.parent.hostConfig;this.renderedElement.className=n.makeCssClassName(this.isEffectivelyEnabled()?"ac-pushButton":"ac-pushButton-disabled");var r=this.getParentContainer();if(r){var o=r.getEffectiveStyle();o&&this.renderedElement.classList.add("style-"+o)}switch(this.renderedElement.tabIndex=!this.isDesignMode()&&this.isFocusable?0:-1,this._state){case 0:break;case 1:this.renderedElement.classList.add(n.makeCssClassName("expanded"));break;case 2:this.renderedElement.classList.add(n.makeCssClassName("subdued"))}this.style&&this.isEffectivelyEnabled()&&(this.style===qo.ActionStyle.Positive?(e=this.renderedElement.classList).add.apply(e,n.makeCssClassNames("primary","style-positive")):(t=this.renderedElement.classList).add.apply(t,n.makeCssClassNames("style-"+this.style.toLowerCase())))}},t.prototype.getDefaultSerializationContext=function(){return new Ta},t.prototype.internalGetReferencedInputs=function(){return{}},t.prototype.internalPrepareForExecution=function(e){},t.prototype.internalValidateInputs=function(e){var t=[];if(e)for(var n=0,r=Object.keys(e);n<r.length;n++){var o=e[r[n]];o.validateValue()||t.push(o)}return t},t.prototype.shouldSerialize=function(e){return void 0!==e.actionRegistry.findByName(this.getJsonTypeName())},t.prototype.raiseExecuteActionEvent=function(){var e,t,n;this.onExecute&&this.onExecute(this),t=(e=this).parent?e.parent.getRootElement():void 0,n=t&&t.onExecuteAction?t.onExecuteAction:Ia.onExecuteAction,e.prepareForExecution()&&n&&n(e)},t.prototype.internalAfterExecute=function(){var e=this.getRootObject();e instanceof ai&&e.updateActionsEnabledState()},t.prototype.getHref=function(){return""},t.prototype.getAriaRole=function(){var e=this.getAriaRoleFromEnum();return null!=e?e:"button"},t.prototype.getAriaRoleFromEnum=function(){switch(this.role){case qo.ActionRole.Button:return"button";case qo.ActionRole.Link:return"link";case qo.ActionRole.Menu:return"menu";case qo.ActionRole.MenuItem:return"menuitem";case qo.ActionRole.Tab:return"tab";default:return}},t.prototype.setupElementForAccessibility=function(e,t){void 0===t&&(t=!1),e.tabIndex=this.isEffectivelyEnabled()&&!this.isDesignMode()?0:-1,e.setAttribute("role",this.getAriaRole()),e instanceof HTMLButtonElement&&(e.disabled=!this.isEffectivelyEnabled()),this.isEffectivelyEnabled()?(e.removeAttribute("aria-disabled"),e.classList.add(this.hostConfig.makeCssClassName("ac-selectable"))):e.setAttribute("aria-disabled","true"),this.title?(e.setAttribute("aria-label",this.title),e.title=this.title):(e.removeAttribute("aria-label"),e.removeAttribute("title")),this.tooltip&&(t&&!this.title&&e.setAttribute("aria-label",this.tooltip),e.title=this.tooltip)},t.prototype.parse=function(t,n){return e.prototype.parse.call(this,t,n||new Ta)},t.prototype.render=function(){var e=this,t=document.createElement("button");t.type="button",t.style.display="flex",t.style.alignItems="center",t.style.justifyContent="center",t.onclick=function(t){e.isEffectivelyEnabled()&&(t.preventDefault(),t.cancelBubble=!0,e.execute())},this._renderedElement=t,this.renderButtonContent(),this.updateCssClasses(),this.setupElementForAccessibility(t)},t.prototype.execute=function(){this._actionCollection&&this._actionCollection.actionExecuted(this),this.raiseExecuteActionEvent(),this.internalAfterExecute()},t.prototype.prepareForExecution=function(){var e=this.getReferencedInputs(),t=this.internalValidateInputs(e);return t.length>0?(t[0].focus(),!1):(this.internalPrepareForExecution(e),!0)},t.prototype.remove=function(){return!!this._actionCollection&&this._actionCollection.removeAction(this)},t.prototype.getAllInputs=function(e){return[]},t.prototype.getAllActions=function(){return[this]},t.prototype.getResourceInformation=function(){return this.iconUrl?[{url:this.iconUrl,mimeType:"image"}]:[]},t.prototype.getActionById=function(e){return this.id===e?this:void 0},t.prototype.getReferencedInputs=function(){return this.internalGetReferencedInputs()},t.prototype.validateInputs=function(){return this.internalValidateInputs(this.getReferencedInputs())},t.prototype.updateEnabledState=function(){},t.prototype.isEffectivelyEnabled=function(){return this.isEnabled},Object.defineProperty(t.prototype,"isPrimary",{get:function(){return this.style===qo.ActionStyle.Positive},set:function(e){e?this.style=qo.ActionStyle.Positive:this.style===qo.ActionStyle.Positive&&(this.style=qo.ActionStyle.Default)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hostConfig",{get:function(){return this.parent?this.parent.hostConfig:Zo.defaultHostConfig},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parent",{get:function(){return this._parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){this._state!==e&&(this._state=e,this.updateCssClasses())},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isFocusable",{get:function(){return this._isFocusable},set:function(e){this._isFocusable!==e&&(this._isFocusable=e,this.updateCssClasses())},enumerable:!1,configurable:!0}),t.titleProperty=new ei.StringProperty(ei.Versions.v1_0,"title"),t.iconUrlProperty=new ei.StringProperty(ei.Versions.v1_1,"iconUrl"),t.styleProperty=new ei.ValueSetProperty(ei.Versions.v1_2,"style",[{value:qo.ActionStyle.Default},{value:qo.ActionStyle.Positive},{value:qo.ActionStyle.Destructive}],qo.ActionStyle.Default),t.modeProperty=new ei.ValueSetProperty(ei.Versions.v1_5,"mode",[{value:qo.ActionMode.Primary},{value:qo.ActionMode.Secondary}],qo.ActionMode.Primary),t.tooltipProperty=new ei.StringProperty(ei.Versions.v1_5,"tooltip"),t.isEnabledProperty=new ei.BoolProperty(ei.Versions.v1_5,"isEnabled",!0),t.roleProperty=new ei.EnumProperty(ei.Versions.v1_6,"role",qo.ActionRole),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"title",void 0),Uo([(0,ei.property)(t.iconUrlProperty)],t.prototype,"iconUrl",void 0),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",void 0),Uo([(0,ei.property)(t.modeProperty)],t.prototype,"mode",void 0),Uo([(0,ei.property)(t.tooltipProperty)],t.prototype,"tooltip",void 0),Uo([(0,ei.property)(t.isEnabledProperty)],t.prototype,"isEnabled",void 0),Uo([(0,ei.property)(t.roleProperty)],t.prototype,"role",void 0),t}(Ko.CardObject);Bn.Action=$i;var Ui=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.disabledUnlessAssociatedInputsChange=!1,t._isPrepared=!1,t._areReferencedInputsDirty=!1,t}return $o(t,e),t.prototype.internalGetReferencedInputs=function(){var e={};if("none"!==this.associatedInputs){for(var t=this.parent,n=[];t;)n.push.apply(n,t.getAllInputs(!1)),t=t.parent;for(var r=0,o=n;r<o.length;r++){var i=o[r];i.id&&(e[i.id]=i)}}return e},t.prototype.internalPrepareForExecution=function(e){if(this._originalData?this._processedData=JSON.parse(JSON.stringify(this._originalData)):this._processedData={},this._processedData&&e)for(var t=0,n=Object.keys(e);t<n.length;t++){var r=e[n[t]];r.id&&r.isSet()&&(this._processedData[r.id]="string"==typeof r.value?r.value:r.value.toString())}this._isPrepared=!0},t.prototype.internalAfterExecute=function(){Xo.GlobalSettings.resetInputsDirtyStateAfterActionExecution&&this.resetReferencedInputsDirtyState()},t.prototype.resetReferencedInputsDirtyState=function(){var e=this.getReferencedInputs();if(this._areReferencedInputsDirty=!1,e)for(var t=0,n=Object.keys(e);t<n.length;t++){e[n[t]].resetDirtyState()}},t.prototype.updateEnabledState=function(){this._areReferencedInputsDirty=!1;var e=this.getReferencedInputs();if(e)for(var t=0,n=Object.keys(e);t<n.length;t++){if(e[n[t]].isDirty()){this._areReferencedInputsDirty=!0;break}}this.updateCssClasses(),this._renderedElement&&this.setupElementForAccessibility(this._renderedElement)},t.prototype.isEffectivelyEnabled=function(){var t=e.prototype.isEffectivelyEnabled.call(this);return this.disabledUnlessAssociatedInputsChange?t&&this._areReferencedInputsDirty:t},Object.defineProperty(t.prototype,"data",{get:function(){return this._isPrepared?this._processedData:this._originalData},set:function(e){this._originalData=e,this._isPrepared=!1},enumerable:!1,configurable:!0}),t.dataProperty=new ei.PropertyDefinition(ei.Versions.v1_0,"data"),t.associatedInputsProperty=new ei.CustomProperty(ei.Versions.v1_3,"associatedInputs",function(e,t,n,r){var o=n[t.name];if(void 0!==o&&"string"==typeof o)return"none"===o.toLowerCase()?"none":"auto"},function(e,t,n,r,o){o.serializeValue(n,t.name,r)}),t.disabledUnlessAssociatedInputsChangeProperty=new ei.BoolProperty(ei.Versions.v1_6,"disabledUnlessAssociatedInputsChange",!1),Uo([(0,ei.property)(t.dataProperty)],t.prototype,"_originalData",void 0),Uo([(0,ei.property)(t.associatedInputsProperty)],t.prototype,"associatedInputs",void 0),Uo([(0,ei.property)(t.disabledUnlessAssociatedInputsChangeProperty)],t.prototype,"disabledUnlessAssociatedInputsChange",void 0),t}($i);Bn.SubmitActionBase=Ui;var Ji=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.JsonTypeName="Action.Submit",t}(Ui),Gi=Bn.SubmitAction=Ji,qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t}(Ui);Bn.UniversalAction=qi;var Xi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.JsonTypeName="Action.Execute",t.verbProperty=new ei.StringProperty(ei.Versions.v1_4,"verb"),Uo([(0,ei.property)(t.verbProperty)],t.prototype,"verb",void 0),t}(qi),Yi=Bn.ExecuteAction=Xi,Zi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getJsonTypeName=function(){return t.JsonTypeName},Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!1},enumerable:!1,configurable:!0}),t.JsonTypeName="Data.Query",t.datasetProperty=new ei.StringProperty(ei.Versions.v1_6,"dataset"),t.filterProperty=new ei.StringProperty(ei.Versions.v1_6,"filter"),t.countProperty=new ei.NumProperty(ei.Versions.v1_6,"count"),t.skipProperty=new ei.NumProperty(ei.Versions.v1_6,"skip"),Uo([(0,ei.property)(t.datasetProperty)],t.prototype,"dataset",void 0),Uo([(0,ei.property)(t.filterProperty)],t.prototype,"filter",void 0),Uo([(0,ei.property)(t.countProperty)],t.prototype,"count",void 0),Uo([(0,ei.property)(t.skipProperty)],t.prototype,"skip",void 0),t}(qi);Bn.DataQuery=Zi;var Qi=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.prototype.getAriaRole=function(){var e=this.getAriaRoleFromEnum();return null!=e?e:"link"},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this.url||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("url"))},t.prototype.getHref=function(){return this.url},t.urlProperty=new ei.StringProperty(ei.Versions.v1_0,"url"),t.JsonTypeName="Action.OpenUrl",Uo([(0,ei.property)(t.urlProperty)],t.prototype,"url",void 0),t}($i),Ki=Bn.OpenUrlAction=Qi,ea=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.targetElements={},t}return $o(t,e),t.prototype.updateAriaControlsAttribute=function(){if(this.targetElements){var e=Object.keys(this.targetElements);this._renderedElement&&(e.length>0?this._renderedElement.setAttribute("aria-controls",e.join(" ")):this._renderedElement.removeAttribute("aria-controls"))}},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this.targetElements||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("targetElements"))},t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.prototype.render=function(){e.prototype.render.call(this),this.updateAriaControlsAttribute()},t.prototype.execute=function(){if(e.prototype.execute.call(this),this.parent)for(var t=0,n=Object.keys(this.targetElements);t<n.length;t++){var r=n[t],o=this.parent.getRootElement().getElementById(r);o&&("boolean"==typeof this.targetElements[r]?o.isVisible=this.targetElements[r]:o.isVisible=!o.isVisible)}},t.prototype.addTargetElement=function(e,t){void 0===t&&(t=void 0),this.targetElements[e]=t,this.updateAriaControlsAttribute()},t.prototype.removeTargetElement=function(e){delete this.targetElements[e],this.updateAriaControlsAttribute()},t.targetElementsProperty=new ei.CustomProperty(ei.Versions.v1_2,"targetElements",function(e,t,n,r){var o={};if(Array.isArray(n[t.name]))for(var i=0,a=n[t.name];i<a.length;i++){var s=a[i];if("string"==typeof s)o[s]=void 0;else if("object"==typeof s){var l=s.elementId;"string"==typeof l&&(o[l]=Yo.parseBool(s.isVisible))}}return o},function(e,t,n,r,o){for(var i=[],a=0,s=Object.keys(r);a<s.length;a++){var l=s[a];"boolean"==typeof r[l]?i.push({elementId:l,isVisible:r[l]}):i.push(l)}o.serializeArray(n,t.name,i)},{},function(e){return{}}),t.JsonTypeName="Action.ToggleVisibility",Uo([(0,ei.property)(t.targetElementsProperty)],t.prototype,"targetElements",void 0),t}($i),ta=Bn.ToggleVisibilityAction=ea,na=function(e){function t(t,n){var r=e.call(this,t,n,void 0,function(){return new Xo.StringWithSubstitutions})||this;return r.targetVersion=t,r.name=n,r}return $o(t,e),t.prototype.parse=function(e,t,n){var r=new Xo.StringWithSubstitutions;return r.set(Yo.parseString(t[this.name])),r},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,n.getOriginal())},t}(ei.PropertyDefinition),ra=function(e){function t(t,n){void 0===t&&(t=""),void 0===n&&(n="");var r=e.call(this)||this;return r.name=t,r.value=n,r}return $o(t,e),t.prototype.getSchemaKey=function(){return"HttpHeader"},t.prototype.getReferencedInputs=function(e,t){this._value.getReferencedInputs(e,t)},t.prototype.prepareForExecution=function(e){this._value.substituteInputValues(e,Xo.ContentTypes.applicationXWwwFormUrlencoded)},Object.defineProperty(t.prototype,"value",{get:function(){return this._value.get()},set:function(e){this._value.set(e)},enumerable:!1,configurable:!0}),t.nameProperty=new ei.StringProperty(ei.Versions.v1_0,"name"),t.valueProperty=new na(ei.Versions.v1_0,"value"),Uo([(0,ei.property)(t.nameProperty)],t.prototype,"name",void 0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"_value",void 0),t}(ei.SerializableObject);Bn.HttpHeader=ra;var oa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._ignoreInputValidation=!1,t}return $o(t,e),t.prototype.internalGetReferencedInputs=function(){var e=this.parent?this.parent.getRootElement().getAllInputs():[],t={};this._url.getReferencedInputs(e,t);for(var n=0,r=this.headers;n<r.length;n++){r[n].getReferencedInputs(e,t)}return this._body.getReferencedInputs(e,t),t},t.prototype.internalPrepareForExecution=function(e){if(e){this._url.substituteInputValues(e,Xo.ContentTypes.applicationXWwwFormUrlencoded);for(var t=Xo.ContentTypes.applicationJson,n=0,r=this.headers;n<r.length;n++){var o=r[n];o.prepareForExecution(e),o.name&&"content-type"===o.name.toLowerCase()&&(t=o.value)}this._body.substituteInputValues(e,t)}},t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.prototype.internalValidateProperties=function(t){if(e.prototype.internalValidateProperties.call(this,t),this.url||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("url")),this.headers.length>0)for(var n=0,r=this.headers;n<r.length;n++){r[n].name||t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.actionHttpHeadersMustHaveNameAndValue())}},Object.defineProperty(t.prototype,"ignoreInputValidation",{get:function(){return this._ignoreInputValidation},set:function(e){this._ignoreInputValidation=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"url",{get:function(){return this._url.get()},set:function(e){this._url.set(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"body",{get:function(){return this._body.get()},set:function(e){this._body.set(e)},enumerable:!1,configurable:!0}),t.urlProperty=new na(ei.Versions.v1_0,"url"),t.bodyProperty=new na(ei.Versions.v1_0,"body"),t.methodProperty=new ei.StringProperty(ei.Versions.v1_0,"method"),t.headersProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_0,"headers",ra),t.ignoreInputValidationProperty=new ei.BoolProperty(ei.Versions.v1_3,"ignoreInputValidation",!1),t.JsonTypeName="Action.Http",Uo([(0,ei.property)(t.urlProperty)],t.prototype,"_url",void 0),Uo([(0,ei.property)(t.bodyProperty)],t.prototype,"_body",void 0),Uo([(0,ei.property)(t.methodProperty)],t.prototype,"method",void 0),Uo([(0,ei.property)(t.headersProperty)],t.prototype,"headers",void 0),Uo([(0,ei.property)(t.ignoreInputValidationProperty)],t.prototype,"_ignoreInputValidation",void 0),t}($i);Bn.HttpAction=oa;var ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.card=new _a,t}return $o(t,e),t.prototype.updateCssClasses=function(){if(e.prototype.updateCssClasses.call(this),this.renderedElement){var t=this.parent?this.parent.hostConfig:Zo.defaultHostConfig;this.renderedElement.classList.add(t.makeCssClassName("expandable")),this.renderedElement.setAttribute("aria-expanded",(1===this.state).toString())}},t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n);var r=t.card;r?this.card.parse(r,n):n.logParseEvent(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.showCardMustHaveCard())},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n),this.card&&n.serializeValue(t,"card",this.card.toJSON(n))},t.prototype.raiseExecuteActionEvent=function(){this.hostConfig.actions.showCard.actionMode===qo.ShowCardActionMode.Popup&&e.prototype.raiseExecuteActionEvent.call(this)},t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this),this.card.releaseDOMResources()},t.prototype.getJsonTypeName=function(){return t.JsonTypeName},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this.card.internalValidateProperties(t)},t.prototype.setParent=function(t){e.prototype.setParent.call(this,t),this.card.setParent(t)},t.prototype.getAllInputs=function(e){return void 0===e&&(e=!0),this.card.getAllInputs(e)},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return t.push.apply(t,this.card.getAllActions()),t},t.prototype.getResourceInformation=function(){var t=e.prototype.getResourceInformation.call(this);return t.push.apply(t,this.card.getResourceInformation()),t},t.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);return n||(n=this.card.getActionById(t)),n},t.JsonTypeName="Action.ShowCard",t}($i),aa=Bn.ShowCardAction=ia,sa=function(e){function t(t){var n=e.call(this)||this;return n._actions=t,n.title=ni.Strings.defaults.overflowButtonText(),n.tooltip=ni.Strings.defaults.overflowButtonTooltip(),n}return $o(t,e),t.prototype.getActions=function(){return this._actions},t.prototype.getAllActions=function(){var t=e.prototype.getAllActions.call(this);return t.push.apply(t,this._actions),t},t.prototype.getJsonTypeName=function(){return ia.JsonTypeName},t.prototype.execute=function(){var e,t,n,r,o,i=this;if((t=this,n=this.renderedElement,r=t.parent?t.parent.getRootElement():void 0,!(void 0!==(o=r&&r.onDisplayOverflowActionMenu?r.onDisplayOverflowActionMenu:Ia.onDisplayOverflowActionMenu)&&o(t.getActions(),n)))&&this.renderedElement){var a=new ri.PopupMenu;a.hostConfig=this.hostConfig;for(var s=function(t){var n=new ri.MenuItem(t.toString(),null!==(e=l._actions[t].title)&&void 0!==e?e:"");n.isEnabled=l._actions[t].isEnabled,n.onClick=function(){var e=i._actions[t];a.closePopup(!1),e.isEnabled&&e.execute()},a.items.add(n)},l=this,c=0;c<this._actions.length;c++)s(c);a.onClose=function(){var e;null===(e=i.renderedElement)||void 0===e||e.setAttribute("aria-expanded","false")},this.renderedElement.setAttribute("aria-expanded","true"),a.popup(this.renderedElement)}},t.prototype.setupElementForAccessibility=function(t,n){void 0===n&&(n=!1),e.prototype.setupElementForAccessibility.call(this,t,n),t.setAttribute("aria-label",ni.Strings.defaults.overflowButtonTooltip()),t.setAttribute("aria-expanded","false")},t.JsonTypeName="Action.Overflow",t}($i),la=function(){function e(e){this._items=[],this._renderedActions=[],this._owner=e}return e.prototype.isActionAllowed=function(e){var t=this._owner.getForbiddenActionTypes();if(t)for(var n=0,r=t;n<r.length;n++){var o=r[n];if(e.constructor===o)return!1}return!0},e.prototype.refreshContainer=function(){if(oi(this._actionCardContainer),this._actionCard){this._actionCardContainer.style.marginTop=this.renderedActionCount>0?this._owner.hostConfig.actions.showCard.inlineTopMargin+"px":"0px";var e=this._owner.getEffectivePadding();this._owner.getImmediateSurroundingPadding(e);var t=this._owner.hostConfig.paddingDefinitionToSpacingDefinition(e);this._actionCard&&(this._actionCard.style.paddingLeft=t.left+"px",this._actionCard.style.paddingRight=t.right+"px",this._actionCard.style.marginLeft="-"+t.left+"px",this._actionCard.style.marginRight="-"+t.right+"px",0===t.bottom||this._owner.isDesignMode()||(this._actionCard.style.paddingBottom=t.bottom+"px",this._actionCard.style.marginBottom="-"+t.bottom+"px"),Yo.appendChild(this._actionCardContainer,this._actionCard))}else this._actionCardContainer.style.marginTop="0px"},e.prototype.layoutChanged=function(){this._owner.getRootElement().updateLayout()},e.prototype.showActionCard=function(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!0),e.card.suppressStyle=t;var r=e.card.renderedElement&&!this._owner.isDesignMode()?e.card.renderedElement:e.card.render();this._actionCard=r,this._expandedAction=e,this.refreshContainer(),n&&(this.layoutChanged(),ba(e,!0))},e.prototype.collapseExpandedAction=function(){for(var e=0,t=this._renderedActions;e<t.length;e++){t[e].state=0}var n=this._expandedAction;this._expandedAction=void 0,this._actionCard=void 0,this.refreshContainer(),n&&(this.layoutChanged(),ba(n,!1))},e.prototype.expandShowCardAction=function(e,t){for(var n=this,r=!1,o=0,i=this._renderedActions;o<i.length;o++){var a=i[o];this._owner.hostConfig.actions.actionsOrientation==qo.Orientation.Horizontal&&r&&(a.isFocusable=!1),a!==e?a.state=2:(a.state=1,r=!0,a.renderedElement&&(a.renderedElement.onblur=function(e){for(var t=0,r=n._renderedActions;t<r.length;t++){r[t].isFocusable=!0}}))}this.showActionCard(e,!(this._owner.isAtTheVeryLeft()&&this._owner.isAtTheVeryRight()),t)},e.prototype.releaseDOMResources=function(){for(var e=0,t=this._renderedActions;e<t.length;e++){t[e].releaseDOMResources()}},e.prototype.actionExecuted=function(e){e instanceof ia?e===this._expandedAction?this.collapseExpandedAction():this._owner.hostConfig.actions.showCard.actionMode===qo.ShowCardActionMode.Inline&&this.expandShowCardAction(e,!0):this.collapseExpandedAction()},e.prototype.parse=function(e,t){if(this.clear(),Array.isArray(e))for(var n=0,r=e;n<r.length;n++){var o=r[n],i=[];this._owner instanceof wa&&(i=this._owner.getForbiddenActionNames());var a=t.parseAction(this._owner,o,i,!this._owner.isDesignMode());a&&this.addAction(a)}},e.prototype.toJSON=function(e,t,n){n.serializeArray(e,t,this._items)},e.prototype.getActionAt=function(e){return this._items[e]},e.prototype.getActionCount=function(){return this._items.length},e.prototype.getActionById=function(e){for(var t=void 0,n=0,r=this._items;n<r.length;n++){if(t=r[n].getActionById(e))break}return t},e.prototype.validateProperties=function(e){this._owner.hostConfig.actions.maxActions&&this._items.length>this._owner.hostConfig.actions.maxActions&&e.addFailure(this._owner,qo.ValidationEvent.TooManyActions,ni.Strings.errors.tooManyActions(this._owner.hostConfig.actions.maxActions)),this._items.length>0&&!this._owner.hostConfig.supportsInteractivity&&e.addFailure(this._owner,qo.ValidationEvent.InteractivityNotAllowed,ni.Strings.errors.interactivityNotAllowed());for(var t=0,n=this._items;t<n.length;t++){var r=n[t];this.isActionAllowed(r)||e.addFailure(this._owner,qo.ValidationEvent.ActionTypeNotAllowed,ni.Strings.errors.actionTypeNotAllowed(r.getJsonTypeName())),r.internalValidateProperties(e)}},e.prototype.render=function(e){var t=this._owner.hostConfig;if(t.supportsInteractivity){var n=document.createElement("div"),r=t.actions.maxActions?Math.min(t.actions.maxActions,this._items.length):this._items.length;if(this._actionCardContainer=document.createElement("div"),this._renderedActions=[],t.actions.preExpandSingleShowCardAction&&1===r&&this._items[0]instanceof ia&&this.isActionAllowed(this._items[0]))this.showActionCard(this._items[0],!0),this._renderedActions.push(this._items[0]);else{var o=document.createElement("div");if(o.className=t.makeCssClassName("ac-actionSet"),o.style.display="flex",e===qo.Orientation.Horizontal)if(o.style.flexDirection="row",this._owner.horizontalAlignment&&t.actions.actionAlignment!==qo.ActionAlignment.Stretch)switch(this._owner.horizontalAlignment){case qo.HorizontalAlignment.Center:o.style.justifyContent="center";break;case qo.HorizontalAlignment.Right:o.style.justifyContent="flex-end";break;default:o.style.justifyContent="flex-start"}else switch(t.actions.actionAlignment){case qo.ActionAlignment.Center:o.style.justifyContent="center";break;case qo.ActionAlignment.Right:o.style.justifyContent="flex-end";break;default:o.style.justifyContent="flex-start"}else if(o.style.flexDirection="column",this._owner.horizontalAlignment&&t.actions.actionAlignment!==qo.ActionAlignment.Stretch)switch(this._owner.horizontalAlignment){case qo.HorizontalAlignment.Center:o.style.alignItems="center";break;case qo.HorizontalAlignment.Right:o.style.alignItems="flex-end";break;default:o.style.alignItems="flex-start"}else switch(t.actions.actionAlignment){case qo.ActionAlignment.Center:o.style.alignItems="center";break;case qo.ActionAlignment.Right:o.style.alignItems="flex-end";break;case qo.ActionAlignment.Stretch:o.style.alignItems="stretch";break;default:o.style.alignItems="flex-start"}var i=this._items.filter(this.isActionAllowed.bind(this)),a=[],s=[];if(this._owner.isDesignMode())a=i;else{i.forEach(function(e){return e.mode===qo.ActionMode.Secondary?s.push(e):a.push(e)});var l=a.splice(t.actions.maxActions);Xo.GlobalSettings.allowMoreThanMaxActionsInOverflowMenu&&s.push.apply(s,l);var c=!0;if(s.length>0){this._overflowAction||(this._overflowAction=new sa(s),this._overflowAction.setParent(this._owner),this._overflowAction._actionCollection=this);var u=this._owner instanceof Ia&&!this._owner.parent;c=!function(e,t){var n=e.parent?e.parent.getRootElement():void 0,r=n&&n.onRenderOverflowActions?n.onRenderOverflowActions:Ia.onRenderOverflowActions;return void 0!==r&&r(e.getActions(),t)}(this._overflowAction,u)}this._overflowAction&&c&&a.push(this._overflowAction)}for(var d=0;d<a.length;d++){var p=a[d];if(p.render(),p.renderedElement&&(t.actions.actionsOrientation===qo.Orientation.Horizontal&&t.actions.actionAlignment===qo.ActionAlignment.Stretch?p.renderedElement.style.flex="0 1 100%":p.renderedElement.style.flex="0 1 auto",o.appendChild(p.renderedElement),this._renderedActions.push(p),d<a.length-1&&t.actions.buttonSpacing>0)){var h=document.createElement("div");e===qo.Orientation.Horizontal?(h.style.flex="0 0 auto",h.style.width=t.actions.buttonSpacing+"px"):h.style.height=t.actions.buttonSpacing+"px",Yo.appendChild(o,h)}}var m=document.createElement("div");m.style.overflow="hidden",m.appendChild(o),Yo.appendChild(n,m)}Yo.appendChild(n,this._actionCardContainer);for(var f=0,g=this._renderedActions;f<g.length;f++){var y=g[f];if(1===y.state){this.expandShowCardAction(y,!1);break}}return this._renderedActions.length>0?n:void 0}},e.prototype.addAction=function(e){if(!e)throw new Error("The action parameter cannot be null.");if(e.parent&&e.parent!==this._owner||!(this._items.indexOf(e)<0))throw new Error(ni.Strings.errors.actionAlreadyParented());this._items.push(e),e.parent||e.setParent(this._owner),e._actionCollection=this},e.prototype.removeAction=function(e){this.expandedAction&&this._expandedAction===e&&this.collapseExpandedAction();var t=this._items.indexOf(e);if(t>=0){this._items.splice(t,1),e.setParent(void 0),e._actionCollection=void 0;for(var n=0;n<this._renderedActions.length;n++)if(this._renderedActions[n]===e){this._renderedActions.splice(n,1);break}return!0}return!1},e.prototype.clear=function(){this._items=[],this._renderedActions=[],this._expandedAction=void 0},e.prototype.getAllInputs=function(e){void 0===e&&(e=!0);var t=[];if(e)for(var n=0,r=this._items;n<r.length;n++){var o=r[n];t.push.apply(t,o.getAllInputs())}return t},e.prototype.getResourceInformation=function(){for(var e=[],t=0,n=this._items;t<n.length;t++){var r=n[t];e.push.apply(e,r.getResourceInformation())}return e},Object.defineProperty(e.prototype,"renderedActionCount",{get:function(){return this._renderedActions.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"expandedAction",{get:function(){return this._expandedAction},enumerable:!1,configurable:!0}),e}(),ca=function(e){function t(){var t=e.call(this)||this;return t._actionCollection=new la(t),t}return $o(t,e),t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n),this._actionCollection.parse(t.actions,n)},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n),this._actionCollection.toJSON(t,"actions",n)},t.prototype.internalRender=function(){return this._actionCollection.render(void 0!==this.orientation?this.orientation:this.hostConfig.actions.actionsOrientation)},t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this),this._actionCollection.releaseDOMResources()},t.prototype.isBleedingAtBottom=function(){return 0===this._actionCollection.renderedActionCount?e.prototype.isBleedingAtBottom.call(this):1===this._actionCollection.getActionCount()?void 0!==this._actionCollection.expandedAction&&!this.hostConfig.actions.preExpandSingleShowCardAction:void 0!==this._actionCollection.expandedAction},t.prototype.getJsonTypeName=function(){return"ActionSet"},t.prototype.getActionCount=function(){return this._actionCollection.getActionCount()},t.prototype.getActionAt=function(t){return t>=0&&t<this.getActionCount()?this._actionCollection.getActionAt(t):e.prototype.getActionAt.call(this,t)},t.prototype.getActionById=function(t){var n=this._actionCollection.getActionById(t);return n||e.prototype.getActionById.call(this,t)},t.prototype.getAllActions=function(){for(var t=e.prototype.getAllActions.call(this),n=0;n<this.getActionCount();n++){var r=this.getActionAt(n);r&&t.push(r)}return t},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this._actionCollection.validateProperties(t)},t.prototype.addAction=function(e){this._actionCollection.addAction(e)},t.prototype.getAllInputs=function(e){return void 0===e&&(e=!0),e?this._actionCollection.getAllInputs():[]},t.prototype.getResourceInformation=function(){return this._actionCollection.getResourceInformation()},t.prototype.findDOMNodeOwner=function(t){for(var n=void 0,r=0;r<this.getActionCount();r++){var o=this.getActionAt(r);if(o&&(n=o.findDOMNodeOwner(t)))return n}return e.prototype.findDOMNodeOwner.call(this,t)},t.prototype.getElementById=function(t){var n=e.prototype.getElementById.call(this,t);return n||(n=this.getElementByIdFromAction(t)),n},Object.defineProperty(t.prototype,"isInteractive",{get:function(){return!0},enumerable:!1,configurable:!0}),t.orientationProperty=new ei.EnumProperty(ei.Versions.v1_1,"orientation",qo.Orientation),Uo([(0,ei.property)(t.orientationProperty)],t.prototype,"orientation",void 0),t}(ai);Bn.ActionSet=ca;var ua=function(e){function t(t,n,r,o){var i=e.call(this,t,n,[{value:qo.ContainerStyle.Default},{value:qo.ContainerStyle.Emphasis},{targetVersion:ei.Versions.v1_2,value:qo.ContainerStyle.Accent},{targetVersion:ei.Versions.v1_2,value:qo.ContainerStyle.Good},{targetVersion:ei.Versions.v1_2,value:qo.ContainerStyle.Attention},{targetVersion:ei.Versions.v1_2,value:qo.ContainerStyle.Warning}],r,o)||this;return i.targetVersion=t,i.name=n,i.defaultValue=r,i.onGetInitialValue=o,i}return $o(t,e),t}(ei.ValueSetProperty);Bn.ContainerStyleProperty=ua;var da=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),Object.defineProperty(t.prototype,"style",{get:function(){if(this.allowCustomStyle){var e=this.getValue(t.styleProperty);if(e&&this.hostConfig.containerStyles.getStyleByName(e))return e}},set:function(e){this.setValue(t.styleProperty,e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowCustomStyle",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasExplicitStyle",{get:function(){return void 0!==this.getValue(t.styleProperty)},enumerable:!1,configurable:!0}),t.prototype.applyBorder=function(){},t.prototype.applyBackground=function(){if(this.renderedElement){var e=this.hostConfig.containerStyles.getStyleByName(this.style,this.hostConfig.containerStyles.getStyleByName(this.defaultStyle));if(e.backgroundColor){var t=Yo.stringToCssColor(e.backgroundColor);t&&(this.renderedElement.style.backgroundColor=t)}}},t.prototype.applyPadding=function(){if(e.prototype.applyPadding.call(this),this.renderedElement){var t=new Xo.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 n=new Xo.PaddingDefinition;this.getImmediateSurroundingPadding(n);var r=this.hostConfig.paddingDefinitionToSpacingDefinition(n);this.renderedElement.style.marginRight="-"+r.right+"px",this.renderedElement.style.marginLeft="-"+r.left+"px",this.isDesignMode()||(this.renderedElement.style.marginTop="-"+r.top+"px",this.renderedElement.style.marginBottom="-"+r.bottom+"px"),this.separatorElement&&this.separatorOrientation===qo.Orientation.Horizontal&&(this.separatorElement.style.marginLeft="-"+r.left+"px",this.separatorElement.style.marginRight="-"+r.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.separatorOrientation===qo.Orientation.Horizontal&&(this.separatorElement.style.marginRight="0",this.separatorElement.style.marginLeft="0")}},t.prototype.getHasBackground=function(e){void 0===e&&(e=!1);for(var n=this.parent;n;){var r=!1;if(r=!e&&(n instanceof ma&&n.backgroundImage.isValid()),n instanceof t&&this.hasExplicitStyle&&(n.getEffectiveStyle()!==this.getEffectiveStyle()||r))return!0;n=n.parent}return!1},t.prototype.getDefaultPadding=function(){return this.getHasBackground()||this.getHasBorder()?new Xo.PaddingDefinition(qo.Spacing.Padding,qo.Spacing.Padding,qo.Spacing.Padding,qo.Spacing.Padding):e.prototype.getDefaultPadding.call(this)},t.prototype.internalValidateProperties=function(n){e.prototype.internalValidateProperties.call(this,n);var r=this.getValue(t.styleProperty);void 0!==r&&(this.hostConfig.containerStyles.getStyleByName(r)||n.addFailure(this,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidPropertyValue(r,"style")))},t.prototype.render=function(){var t=e.prototype.render.call(this);return t&&this.getHasBackground()&&this.applyBackground(),this.applyBorder(),t},t.prototype.getEffectiveStyle=function(){var t=this.style;return t||e.prototype.getEffectiveStyle.call(this)},t.styleProperty=new ua(ei.Versions.v1_0,"style"),Uo([(0,ei.property)(t.styleProperty)],t.prototype,"style",null),t}(yi);Bn.StylableCardElementContainer=da;var pa=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._bleed=!1,t}return $o(t,e),t.prototype.adjustRenderedElementSize=function(t){e.prototype.adjustRenderedElementSize.call(this,t),this.minPixelHeight&&(t.style.minHeight=this.minPixelHeight+"px")},t.prototype.getHasExpandedAction=function(){return!1},t.prototype.getBleed=function(){return this._bleed},t.prototype.setBleed=function(e){this._bleed=e},Object.defineProperty(t.prototype,"renderedActionCount",{get:function(){return 0},enumerable:!1,configurable:!0}),t.prototype.isBleeding=function(){return(this.getHasBackground()||this.hostConfig.alwaysAllowBleed)&&this.getBleed()},t.bleedProperty=new ei.BoolProperty(ei.Versions.v1_2,"bleed",!1),t.minHeightProperty=new ei.PixelSizeProperty(ei.Versions.v1_2,"minHeight"),Uo([(0,ei.property)(t.bleedProperty)],t.prototype,"_bleed",void 0),Uo([(0,ei.property)(t.minHeightProperty)],t.prototype,"minPixelHeight",void 0),t}(da);Bn.ContainerBase=pa;var ha=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"BackgroundImage"},t.prototype.internalParse=function(t,n){if("string"!=typeof t)return e.prototype.internalParse.call(this,t,n);this.resetDefaultValues(),this.url=t},t.prototype.apply=function(e){if(this.url&&e.renderedElement){switch(e.renderedElement.style.backgroundImage="url('"+e.preProcessPropertyValue(t.urlProperty,this.url)+"')",this.fillMode){case qo.FillMode.Repeat:e.renderedElement.style.backgroundRepeat="repeat";break;case qo.FillMode.RepeatHorizontally:e.renderedElement.style.backgroundRepeat="repeat-x";break;case qo.FillMode.RepeatVertically:e.renderedElement.style.backgroundRepeat="repeat-y";break;case qo.FillMode.Cover:default:e.renderedElement.style.backgroundRepeat="no-repeat",e.renderedElement.style.backgroundSize="cover"}switch(this.horizontalAlignment){case qo.HorizontalAlignment.Left:break;case qo.HorizontalAlignment.Center:e.renderedElement.style.backgroundPositionX="center";break;case qo.HorizontalAlignment.Right:e.renderedElement.style.backgroundPositionX="right"}switch(this.verticalAlignment){case qo.VerticalAlignment.Top:break;case qo.VerticalAlignment.Center:e.renderedElement.style.backgroundPositionY="center";break;case qo.VerticalAlignment.Bottom:e.renderedElement.style.backgroundPositionY="bottom"}}},t.prototype.isValid=function(){return!!this.url},t.urlProperty=new ei.StringProperty(ei.Versions.v1_0,"url"),t.fillModeProperty=new ei.EnumProperty(ei.Versions.v1_2,"fillMode",qo.FillMode,qo.FillMode.Cover),t.horizontalAlignmentProperty=new ei.EnumProperty(ei.Versions.v1_2,"horizontalAlignment",qo.HorizontalAlignment,qo.HorizontalAlignment.Left),t.verticalAlignmentProperty=new ei.EnumProperty(ei.Versions.v1_2,"verticalAlignment",qo.VerticalAlignment,qo.VerticalAlignment.Top),Uo([(0,ei.property)(t.urlProperty)],t.prototype,"url",void 0),Uo([(0,ei.property)(t.fillModeProperty)],t.prototype,"fillMode",void 0),Uo([(0,ei.property)(t.horizontalAlignmentProperty)],t.prototype,"horizontalAlignment",void 0),Uo([(0,ei.property)(t.verticalAlignmentProperty)],t.prototype,"verticalAlignment",void 0),t}(ei.SerializableObject);Bn.BackgroundImage=ha;var ma=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._items=[],t._renderedItems=[],t}return $o(t,e),Object.defineProperty(t.prototype,"backgroundImage",{get:function(){return this.getValue(t.backgroundImageProperty)},enumerable:!1,configurable:!0}),t.prototype.insertItemAt=function(e,t,n){if(e.parent&&!n)throw new Error(ni.Strings.errors.elementAlreadyParented());if(!e.isStandalone)throw new Error(ni.Strings.errors.elementTypeNotStandalone(e.getJsonTypeName()));t<0||t>=this._items.length?this._items.push(e):this._items.splice(t,0,e),e.setParent(this)},t.prototype.getItemsCollectionPropertyName=function(){return"items"},t.prototype.applyBackground=function(){this.backgroundImage.isValid()&&this.renderedElement&&this.backgroundImage.apply(this),e.prototype.applyBackground.call(this)},t.prototype.applyRTL=function(e){void 0!==this.rtl&&(e.dir=this.rtl?"rtl":"ltr")},t.prototype.internalRender=function(){this._renderedItems=[];var e=this.hostConfig,t=document.createElement("div");switch(this.applyRTL(t),t.classList.add(e.makeCssClassName("ac-container")),t.style.display="flex",t.style.flexDirection="column",Xo.GlobalSettings.useAdvancedCardBottomTruncation&&(t.style.minHeight="-webkit-min-content"),this.getEffectiveVerticalContentAlignment()){case qo.VerticalAlignment.Center:t.style.justifyContent="center";break;case qo.VerticalAlignment.Bottom:t.style.justifyContent="flex-end";break;default:t.style.justifyContent="flex-start"}if(this._items.length>0)for(var n=0,r=this._items;n<r.length;n++){var o=r[n],i=this.isElementAllowed(o)?o.render():void 0;i&&(this._renderedItems.length>0&&o.separatorElement&&(o.separatorElement.style.flex="0 0 auto",Yo.appendChild(t,o.separatorElement)),Yo.appendChild(t,i),this._renderedItems.push(o))}else if(this.isDesignMode()){var a=this.createPlaceholderElement();a.style.width="100%",a.style.height="100%",t.appendChild(a)}return t},t.prototype.truncateOverflow=function(e){if(this.renderedElement){for(var t=this.renderedElement.offsetTop+e+1,n=function(e){var r=e.renderedElement;if(r)switch(Yo.getFitStatus(r,t)){case qo.ContainerFitStatus.FullyInContainer:e.resetOverflow()&&n(e);break;case qo.ContainerFitStatus.Overflowing:var o=t-r.offsetTop;e.handleOverflow(o);break;case qo.ContainerFitStatus.FullyOutOfContainer:e.handleOverflow(0)}},r=0,o=this._items;r<o.length;r++){var i=o[r];n(i)}return!0}return!1},t.prototype.undoOverflowTruncation=function(){for(var e=0,t=this._items;e<t.length;e++){t[e].resetOverflow()}},t.prototype.getHasBackground=function(t){return void 0===t&&(t=!1),!t&&this.backgroundImage.isValid()||e.prototype.getHasBackground.call(this,t)},t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n),this.clear(),this.setShouldFallback(!1);var r=t[this.getItemsCollectionPropertyName()];if(Array.isArray(r))for(var o=0,i=r;o<i.length;o++){var a=i[o],s=n.parseElement(this,a,this.forbiddenChildElements(),!this.isDesignMode());s&&this.insertItemAt(s,-1,!0)}},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n);var r=this.getItemsCollectionPropertyName();n.serializeArray(t,r,this._items)},Object.defineProperty(t.prototype,"isSelectable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getEffectivePadding=function(){return Xo.GlobalSettings.removePaddingFromContainersWithBackgroundImage&&!this.getHasBackground(!0)?new Xo.PaddingDefinition:e.prototype.getEffectivePadding.call(this)},t.prototype.getEffectiveVerticalContentAlignment=function(){if(void 0!==this.verticalContentAlignment)return this.verticalContentAlignment;var e=this.getParentContainer();return e?e.getEffectiveVerticalContentAlignment():qo.VerticalAlignment.Top},t.prototype.getItemCount=function(){return this._items.length},t.prototype.getItemAt=function(e){return this._items[e]},t.prototype.getFirstVisibleRenderedItem=function(){if(this.renderedElement&&this._renderedItems&&this._renderedItems.length>0)for(var e=0,t=this._renderedItems;e<t.length;e++){var n=t[e];if(n.isVisible)return n}},t.prototype.getLastVisibleRenderedItem=function(){if(this.renderedElement&&this._renderedItems&&this._renderedItems.length>0)for(var e=this._renderedItems.length-1;e>=0;e--)if(this._renderedItems[e].isVisible)return this._renderedItems[e]},t.prototype.getJsonTypeName=function(){return"Container"},t.prototype.isFirstElement=function(e){for(var t=this.isDesignMode(),n=0,r=this._items;n<r.length;n++){var o=r[n];if(o.isVisible||t)return o===e}return!1},t.prototype.isLastElement=function(e){for(var t=this.isDesignMode(),n=this._items.length-1;n>=0;n--)if(this._items[n].isVisible||t)return this._items[n]===e;return!1},t.prototype.isRtl=function(){if(void 0!==this.rtl)return this.rtl;var e=this.getParentContainer();return!!e&&e.isRtl()},t.prototype.isBleedingAtTop=function(){var e=this.getFirstVisibleRenderedItem();return this.isBleeding()||!!e&&e.isBleedingAtTop()},t.prototype.isBleedingAtBottom=function(){var e=this.getLastVisibleRenderedItem();return this.isBleeding()||!!e&&(e.isBleedingAtBottom()&&e.getEffectiveStyle()===this.getEffectiveStyle())},t.prototype.indexOf=function(e){return this._items.indexOf(e)},t.prototype.addItem=function(e){this.insertItemAt(e,-1,!1)},t.prototype.insertItemBefore=function(e,t){this.insertItemAt(e,this._items.indexOf(t),!1)},t.prototype.insertItemAfter=function(e,t){this.insertItemAt(e,this._items.indexOf(t)+1,!1)},t.prototype.removeItem=function(e){var t=this._items.indexOf(e);return t>=0&&(this._items.splice(t,1),e.setParent(void 0),this.updateLayout(),!0)},t.prototype.clear=function(){this._items=[],this._renderedItems=[]},t.prototype.getResourceInformation=function(){var t=e.prototype.getResourceInformation.call(this);return this.backgroundImage.isValid()&&t.push({url:this.backgroundImage.url,mimeType:"image"}),t},t.prototype.getActionById=function(t){var n=e.prototype.getActionById.call(this,t);if(!n&&(this.selectAction&&(n=this.selectAction.getActionById(t)),!n))for(var r=0,o=this._items;r<o.length;r++){if(n=o[r].getActionById(t))break}return n},Object.defineProperty(t.prototype,"padding",{get:function(){return this.getPadding()},set:function(e){this.setPadding(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectAction",{get:function(){return this._selectAction},set:function(e){this._selectAction=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bleed",{get:function(){return this.getBleed()},set:function(e){this.setBleed(e)},enumerable:!1,configurable:!0}),t.backgroundImageProperty=new ei.SerializableObjectProperty(ei.Versions.v1_0,"backgroundImage",ha),t.verticalContentAlignmentProperty=new ei.EnumProperty(ei.Versions.v1_1,"verticalContentAlignment",qo.VerticalAlignment),t.rtlProperty=new ei.BoolProperty(ei.Versions.v1_0,"rtl"),Uo([(0,ei.property)(t.backgroundImageProperty)],t.prototype,"backgroundImage",null),Uo([(0,ei.property)(t.verticalContentAlignmentProperty)],t.prototype,"verticalContentAlignment",void 0),Uo([(0,ei.property)(t.rtlProperty)],t.prototype,"rtl",void 0),t}(pa);Bn.Container=ma;var fa=function(e){function t(t){void 0===t&&(t="stretch");var n=e.call(this)||this;return n.width="stretch",n._computedWeight=0,n.width=t,n}return $o(t,e),t.prototype.adjustRenderedElementSize=function(e){this.isDesignMode()?(e.style.minWidth="20px",e.style.minHeight=(this.minPixelHeight?Math.max(this.minPixelHeight,20):20)+"px"):(e.style.minWidth="0",this.minPixelHeight&&(e.style.minHeight=this.minPixelHeight+"px")),"auto"===this.width?e.style.flex="0 1 auto":"stretch"===this.width?e.style.flex="1 1 50px":this.width instanceof Xo.SizeAndUnit&&(this.width.unit===qo.SizeUnit.Pixel?(e.style.flex="0 0 auto",e.style.width=this.width.physicalSize+"px"):e.style.flex="1 1 "+(this._computedWeight>0?this._computedWeight:this.width.physicalSize)+"%")},t.prototype.shouldSerialize=function(e){return!0},Object.defineProperty(t.prototype,"separatorOrientation",{get:function(){return qo.Orientation.Vertical},enumerable:!1,configurable:!0}),t.prototype.getJsonTypeName=function(){return"Column"},Object.defineProperty(t.prototype,"hasVisibleSeparator",{get:function(){return!!(this.parent&&this.parent instanceof ga)&&(void 0!==this.separatorElement&&!this.parent.isLeftMostElement(this))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!1},enumerable:!1,configurable:!0}),t.widthProperty=new ei.CustomProperty(ei.Versions.v1_0,"width",function(e,t,n,r){var o=t.defaultValue,i=n[t.name],a=!1;if("number"!=typeof i||isNaN(i))if("auto"===i||"stretch"===i)o=i;else if("string"==typeof i)try{(o=Xo.SizeAndUnit.parse(i)).unit===qo.SizeUnit.Pixel&&t.targetVersion.compareTo(r.targetVersion)>0&&(a=!0)}catch(s){a=!0}else a=!0;else o=new Xo.SizeAndUnit(i,qo.SizeUnit.Weight);return a&&(r.logParseEvent(e,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidColumnWidth(i)),o="auto"),o},function(e,t,n,r,o){r instanceof Xo.SizeAndUnit?r.unit===qo.SizeUnit.Pixel?o.serializeValue(n,"width",r.physicalSize+"px"):o.serializeNumber(n,"width",r.physicalSize):o.serializeValue(n,"width",r)},"stretch"),Uo([(0,ei.property)(t.widthProperty)],t.prototype,"width",void 0),t}(ma);Bn.Column=fa;var ga=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._columns=[],t}return $o(t,e),t.prototype.createColumnInstance=function(e,t){return t.parseCardObject(this,e,[],!this.isDesignMode(),function(e){return e&&"Column"!==e?void 0:new fa},function(e,n){t.logParseEvent(void 0,qo.ValidationEvent.ElementTypeNotAllowed,ni.Strings.errors.elementTypeNotAllowed(e))})},t.prototype.internalRender=function(){if(this._renderedColumns=[],this._columns.length>0){var e=this.hostConfig,t=document.createElement("div");switch(t.className=e.makeCssClassName("ac-columnSet"),t.style.display="flex",Xo.GlobalSettings.useAdvancedCardBottomTruncation&&(t.style.minHeight="-webkit-min-content"),this.getEffectiveHorizontalAlignment()){case qo.HorizontalAlignment.Center:t.style.justifyContent="center";break;case qo.HorizontalAlignment.Right:t.style.justifyContent="flex-end";break;default:t.style.justifyContent="flex-start"}for(var n=0,r=0,o=this._columns;r<o.length;r++){(s=o[r]).width instanceof Xo.SizeAndUnit&&s.width.unit===qo.SizeUnit.Weight&&(n+=s.width.physicalSize)}for(var i=0,a=this._columns;i<a.length;i++){var s;if((s=a[i]).width instanceof Xo.SizeAndUnit&&s.width.unit===qo.SizeUnit.Weight&&n>0){var l=100/n*s.width.physicalSize;s._computedWeight=l}var c=s.render();c&&(this._renderedColumns.length>0&&s.separatorElement&&(s.separatorElement.style.flex="0 0 auto",Yo.appendChild(t,s.separatorElement)),Yo.appendChild(t,c),this._renderedColumns.push(s))}return this._renderedColumns.length>0?t:void 0}},t.prototype.truncateOverflow=function(e){for(var t=0,n=this._columns;t<n.length;t++){n[t].handleOverflow(e)}return!0},t.prototype.undoOverflowTruncation=function(){for(var e=0,t=this._columns;e<t.length;e++){t[e].resetOverflow()}},Object.defineProperty(t.prototype,"isSelectable",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n),this._columns=[],this._renderedColumns=[];var r=t.columns;if(Array.isArray(r))for(var o=0,i=r;o<i.length;o++){var a=i[o],s=this.createColumnInstance(a,n);s&&this._columns.push(s)}},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n),n.serializeArray(t,"columns",this._columns)},t.prototype.isFirstElement=function(e){for(var t=0,n=this._columns;t<n.length;t++){var r=n[t];if(r.isVisible)return r===e}return!1},t.prototype.isBleedingAtTop=function(){if(this.isBleeding())return!0;if(this._renderedColumns&&this._renderedColumns.length>0)for(var e=0,t=this._columns;e<t.length;e++){if(t[e].isBleedingAtTop())return!0}return!1},t.prototype.isBleedingAtBottom=function(){if(this.isBleeding())return!0;if(this._renderedColumns&&this._renderedColumns.length>0)for(var e=0,t=this._columns;e<t.length;e++){if(t[e].isBleedingAtBottom())return!0}return!1},t.prototype.getItemCount=function(){return this._columns.length},t.prototype.getFirstVisibleRenderedItem=function(){return this.renderedElement&&this._renderedColumns&&this._renderedColumns.length>0?this._renderedColumns[0]:void 0},t.prototype.getLastVisibleRenderedItem=function(){return this.renderedElement&&this._renderedColumns&&this._renderedColumns.length>0?this._renderedColumns[this._renderedColumns.length-1]:void 0},t.prototype.getColumnAt=function(e){return this._columns[e]},t.prototype.getItemAt=function(e){return this.getColumnAt(e)},t.prototype.getJsonTypeName=function(){return"ColumnSet"},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t);for(var n=0,r=0,o=0,i=this._columns;o<i.length;o++){var a=i[o];"number"==typeof a.width?n++:"stretch"===a.width&&r++}n>0&&r>0&&t.addFailure(this,qo.ValidationEvent.Hint,ni.Strings.hints.dontUseWeightedAndStrecthedColumnsInSameSet())},t.prototype.addColumn=function(e){if(e.parent)throw new Error(ni.Strings.errors.columnAlreadyBelongsToAnotherSet());this._columns.push(e),e.setParent(this)},t.prototype.removeItem=function(e){if(e instanceof fa){var t=this._columns.indexOf(e);if(t>=0)return this._columns.splice(t,1),e.setParent(void 0),this.updateLayout(),!0}return!1},t.prototype.indexOf=function(e){return e instanceof fa?this._columns.indexOf(e):-1},t.prototype.isLeftMostElement=function(e){return 0===this._columns.indexOf(e)},t.prototype.isRightMostElement=function(e){return this._columns.indexOf(e)===this._columns.length-1},t.prototype.isTopElement=function(e){return this._columns.indexOf(e)>=0},t.prototype.isBottomElement=function(e){return this._columns.indexOf(e)>=0},t.prototype.getActionById=function(e){for(var t=void 0,n=0,r=this._columns;n<r.length;n++){if(t=r[n].getActionById(e))break}return t},Object.defineProperty(t.prototype,"bleed",{get:function(){return this.getBleed()},set:function(e){this.setBleed(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"padding",{get:function(){return this.getPadding()},set:function(e){this.setPadding(e)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"selectAction",{get:function(){return this._selectAction},set:function(e){this._selectAction=e},enumerable:!1,configurable:!0}),t}(pa);function ya(e){var t=e.getRootElement(),n=t&&t.onImageLoaded?t.onImageLoaded:Ia.onImageLoaded;n&&n(e)}function va(e,t,n){var r=e.getRootElement(),o=r&&r.onAnchorClicked?r.onAnchorClicked:Ia.onAnchorClicked;return void 0!==o&&o(e,t,n)}function ba(e,t){var n=e.parent?e.parent.getRootElement():void 0,r=n&&n.onInlineCardExpanded?n.onInlineCardExpanded:Ia.onInlineCardExpanded;r&&r(e,t)}function xa(e,t){void 0===t&&(t=!0);var n=e.getRootElement();t&&n.updateLayout();var r=n,o=r&&r.onElementVisibilityChanged?r.onElementVisibilityChanged:Ia.onElementVisibilityChanged;void 0!==o&&o(e)}function Ca(e,t){t?(e.readOnly=!0,e.required=!0):(e.readOnly=!1,e.required=!1)}Bn.ColumnSet=ga;var wa=function(e){function t(){var t=e.call(this)||this;return t._actionCollection=new la(t),t}return $o(t,e),t.prototype.internalParse=function(t,n){e.prototype.internalParse.call(this,t,n),this.parseActions(t,n)},t.prototype.parseActions=function(e,t){this._actionCollection.parse(e.actions,t)},t.prototype.internalToJSON=function(t,n){e.prototype.internalToJSON.call(this,t,n),this._actionCollection.toJSON(t,"actions",n)},t.prototype.internalRender=function(){var t=e.prototype.internalRender.call(this);if(t){var n=this._actionCollection.render(this.hostConfig.actions.actionsOrientation);return n&&(Yo.appendChild(t,ii(this.hostConfig,{spacing:this.hostConfig.getEffectiveSpacing(this.hostConfig.actions.spacing)},qo.Orientation.Horizontal)),Yo.appendChild(t,n)),this.renderIfEmpty||t.children.length>0?t:void 0}},t.prototype.getHasExpandedAction=function(){return 0!==this.renderedActionCount&&(1===this.renderedActionCount?void 0!==this._actionCollection.expandedAction&&!this.hostConfig.actions.preExpandSingleShowCardAction:void 0!==this._actionCollection.expandedAction)},Object.defineProperty(t.prototype,"renderedActionCount",{get:function(){return this._actionCollection.renderedActionCount},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderIfEmpty",{get:function(){return!1},enumerable:!1,configurable:!0}),t.prototype.releaseDOMResources=function(){e.prototype.releaseDOMResources.call(this),this._actionCollection.releaseDOMResources()},t.prototype.getActionCount=function(){return this._actionCollection.getActionCount()},t.prototype.getActionAt=function(t){return t>=0&&t<this.getActionCount()?this._actionCollection.getActionAt(t):e.prototype.getActionAt.call(this,t)},t.prototype.getActionById=function(t){var n=this._actionCollection.getActionById(t);return n||e.prototype.getActionById.call(this,t)},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),this._actionCollection&&this._actionCollection.validateProperties(t)},t.prototype.isLastElement=function(t){return e.prototype.isLastElement.call(this,t)&&0===this._actionCollection.getActionCount()},t.prototype.addAction=function(e){this._actionCollection.addAction(e)},t.prototype.clear=function(){e.prototype.clear.call(this),this._actionCollection.clear()},t.prototype.getAllInputs=function(t){void 0===t&&(t=!0);var n=e.prototype.getAllInputs.call(this,t);return t&&n.push.apply(n,this._actionCollection.getAllInputs(t)),n},t.prototype.getResourceInformation=function(){var t=e.prototype.getResourceInformation.call(this);return t.push.apply(t,this._actionCollection.getResourceInformation()),t},t.prototype.isBleedingAtBottom=function(){return 0===this._actionCollection.renderedActionCount?e.prototype.isBleedingAtBottom.call(this):1===this._actionCollection.getActionCount()?void 0!==this._actionCollection.expandedAction&&!this.hostConfig.actions.preExpandSingleShowCardAction:void 0!==this._actionCollection.expandedAction},t.prototype.getForbiddenActionNames=function(){return[]},t.prototype.getElementById=function(t){var n=e.prototype.getElementById.call(this,t);return n||(n=this.getElementByIdFromAction(t)),n},Object.defineProperty(t.prototype,"isStandalone",{get:function(){return!1},enumerable:!1,configurable:!0}),t}(ma);Bn.ContainerWithActions=wa;var Sa=function(e){function t(t,n){var r=e.call(this,t,n,void 0)||this;return r.targetVersion=t,r.name=n,r}return $o(t,e),t.prototype.parse=function(e,t,n){var r=n.parseAction(e.parent,t[this.name],[],!1);if(void 0!==r){if(r instanceof Xi)return r;n.logParseEvent(e,qo.ValidationEvent.ActionTypeNotAllowed,ni.Strings.errors.actionTypeNotAllowed(r.getJsonTypeName()))}n.logParseEvent(e,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("action"))},t.prototype.toJSON=function(e,t,n,r){r.serializeValue(t,this.name,n?n.toJSON(r):void 0,void 0,!0)},t}(ei.PropertyDefinition);Bn.RefreshActionProperty=Sa;var ka=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),Object.defineProperty(t.prototype,"action",{get:function(){return this.getValue(t.actionProperty)},set:function(e){this.setValue(t.actionProperty,e),e&&e.setParent(this.parent)},enumerable:!1,configurable:!0}),t.prototype.getSchemaKey=function(){return"RefreshDefinition"},t.actionProperty=new Sa(ei.Versions.v1_4,"action"),t.userIdsProperty=new ei.StringArrayProperty(ei.Versions.v1_4,"userIds"),Uo([(0,ei.property)(t.actionProperty)],t.prototype,"action",null),Uo([(0,ei.property)(t.userIdsProperty)],t.prototype,"userIds",void 0),t}(ei.SerializableObject);Bn.RefreshDefinition=ka;var Pa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"AuthCardButton"},t.typeProperty=new ei.StringProperty(ei.Versions.v1_4,"type"),t.titleProperty=new ei.StringProperty(ei.Versions.v1_4,"title"),t.imageProperty=new ei.StringProperty(ei.Versions.v1_4,"image"),t.valueProperty=new ei.StringProperty(ei.Versions.v1_4,"value"),Uo([(0,ei.property)(t.typeProperty)],t.prototype,"type",void 0),Uo([(0,ei.property)(t.titleProperty)],t.prototype,"title",void 0),Uo([(0,ei.property)(t.imageProperty)],t.prototype,"image",void 0),Uo([(0,ei.property)(t.valueProperty)],t.prototype,"value",void 0),t}(ei.SerializableObject);Bn.AuthCardButton=Pa;var Ea=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"TokenExchangeResource"},t.idProperty=new ei.StringProperty(ei.Versions.v1_4,"id"),t.uriProperty=new ei.StringProperty(ei.Versions.v1_4,"uri"),t.providerIdProperty=new ei.StringProperty(ei.Versions.v1_4,"providerId"),Uo([(0,ei.property)(t.idProperty)],t.prototype,"id",void 0),Uo([(0,ei.property)(t.uriProperty)],t.prototype,"uri",void 0),Uo([(0,ei.property)(t.providerIdProperty)],t.prototype,"providerId",void 0),t}(ei.SerializableObject);Bn.TokenExchangeResource=Ea;var Aa=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return $o(t,e),t.prototype.getSchemaKey=function(){return"Authentication"},t.textProperty=new ei.StringProperty(ei.Versions.v1_4,"text"),t.connectionNameProperty=new ei.StringProperty(ei.Versions.v1_4,"connectionName"),t.buttonsProperty=new ei.SerializableObjectCollectionProperty(ei.Versions.v1_4,"buttons",Pa),t.tokenExchangeResourceProperty=new ei.SerializableObjectProperty(ei.Versions.v1_4,"tokenExchangeResource",Ea,!0),Uo([(0,ei.property)(t.textProperty)],t.prototype,"text",void 0),Uo([(0,ei.property)(t.connectionNameProperty)],t.prototype,"connectionName",void 0),Uo([(0,ei.property)(t.buttonsProperty)],t.prototype,"buttons",void 0),Uo([(0,ei.property)(t.tokenExchangeResourceProperty)],t.prototype,"tokenExchangeResource",void 0),t}(ei.SerializableObject);Bn.Authentication=Aa;var Ia=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.designMode=!1,t}return $o(t,e),Object.defineProperty(t.prototype,"refresh",{get:function(){return this.getValue(t.refreshProperty)},set:function(e){this.setValue(t.refreshProperty,e),e&&(e.parent=this)},enumerable:!1,configurable:!0}),Object.defineProperty(t,"processMarkdown",{get:function(){throw new Error(ni.Strings.errors.processMarkdownEventRemoved())},set:function(e){throw new Error(ni.Strings.errors.processMarkdownEventRemoved())},enumerable:!1,configurable:!0}),t.applyMarkdown=function(e){var n={didProcess:!1};if(t.onProcessMarkdown)t.onProcessMarkdown(e,n);else if(window.markdownit){var r=window.markdownit;n.outputHtml=r().render(e),n.didProcess=!0}else t._haveWarnedAboutNoMarkdownProcessing||(console.warn(ni.Strings.errors.markdownProcessingNotEnabled),t._haveWarnedAboutNoMarkdownProcessing=!0);return n},t.prototype.isVersionSupported=function(){return!!this.bypassVersionCheck||!(!this.version||!this.version.isValid||this.maxVersion.major<this.version.major||this.maxVersion.major===this.version.major&&this.maxVersion.minor<this.version.minor)},t.prototype.getDefaultSerializationContext=function(){return new Ta(this.version)},t.prototype.getItemsCollectionPropertyName=function(){return"body"},t.prototype.internalParse=function(n,r){this._fallbackCard=void 0;var o=r.parseElement(void 0,n.fallback,this.forbiddenChildElements(),!this.isDesignMode());o&&(this._fallbackCard=new t,this._fallbackCard.addItem(o)),e.prototype.internalParse.call(this,n,r)},t.prototype.internalToJSON=function(n,r){this.setValue(t.versionProperty,r.targetVersion),e.prototype.internalToJSON.call(this,n,r)},t.prototype.internalRender=function(){var t=e.prototype.internalRender.call(this);return Xo.GlobalSettings.useAdvancedCardBottomTruncation&&t&&t.style.removeProperty("minHeight"),t},t.prototype.getHasBackground=function(e){return!0},t.prototype.getDefaultPadding=function(){return new Xo.PaddingDefinition(qo.Spacing.Padding,qo.Spacing.Padding,qo.Spacing.Padding,qo.Spacing.Padding)},t.prototype.shouldSerialize=function(e){return!0},Object.defineProperty(t.prototype,"renderIfEmpty",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"bypassVersionCheck",{get:function(){return!1},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"allowCustomStyle",{get:function(){return this.hostConfig.adaptiveCard&&this.hostConfig.adaptiveCard.allowCustomStyle},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"hasBackground",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype.getJsonTypeName=function(){return"AdaptiveCard"},t.prototype.internalValidateProperties=function(t){e.prototype.internalValidateProperties.call(this,t),"AdaptiveCard"!==this.getValue(ai.typeNameProperty)&&t.addFailure(this,qo.ValidationEvent.MissingCardType,ni.Strings.errors.invalidCardType()),this.bypassVersionCheck||this.version?this.isVersionSupported()||t.addFailure(this,qo.ValidationEvent.UnsupportedCardVersion,ni.Strings.errors.unsupportedCardVersion(this.version.toString(),this.maxVersion.toString())):t.addFailure(this,qo.ValidationEvent.PropertyCantBeNull,ni.Strings.errors.propertyMustBeSet("version"))},t.prototype.render=function(t){var n,r=this;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")),Xo.GlobalSettings.setTabIndexAtCardRoot&&(n.tabIndex=0),this.speak&&n.setAttribute("aria-label",this.speak),n.onmouseenter=function(e){r.updateInputsVisualState(!0)},n.onmouseleave=function(e){r.updateInputsVisualState(!1)},this.getRootElement().updateActionsEnabledState()),t&&(Yo.appendChild(t,n),this.updateLayout()),n},t.prototype.updateLayout=function(t){if(void 0===t&&(t=!0),e.prototype.updateLayout.call(this,t),Xo.GlobalSettings.useAdvancedCardBottomTruncation&&this.isDisplayed()){var n=this.hostConfig.getEffectiveSpacing(qo.Spacing.Default);this.handleOverflow(this.renderedElement.offsetHeight-n)}},t.prototype.shouldFallback=function(){return e.prototype.shouldFallback.call(this)||!this.isVersionSupported()},Object.defineProperty(t.prototype,"hasVisibleSeparator",{get:function(){return!1},enumerable:!1,configurable:!0}),t.schemaUrl="http://adaptivecards.io/schemas/adaptive-card.json",t.$schemaProperty=new ei.CustomProperty(ei.Versions.v1_0,"$schema",function(e,n,r,o){return t.schemaUrl},function(e,n,r,o,i){i.serializeValue(r,n.name,t.schemaUrl)}),t.versionProperty=new ei.CustomProperty(ei.Versions.v1_0,"version",function(e,t,n,r){var o=ei.Version.parse(n[t.name],r);return void 0===o&&(o=ei.Versions.latest,r.logParseEvent(e,qo.ValidationEvent.InvalidPropertyValue,ni.Strings.errors.invalidCardVersion(o.toString()))),o},function(e,t,n,r,o){void 0!==r&&o.serializeValue(n,t.name,r.toString())},ei.Versions.v1_0),t.fallbackTextProperty=new ei.StringProperty(ei.Versions.v1_0,"fallbackText"),t.speakProperty=new ei.StringProperty(ei.Versions.v1_0,"speak"),t.refreshProperty=new ei.SerializableObjectProperty(ei.Versions.v1_4,"refresh",ka,!0),t.authenticationProperty=new ei.SerializableObjectProperty(ei.Versions.v1_4,"authentication",Aa,!0),t._haveWarnedAboutNoMarkdownProcessing=!1,Uo([(0,ei.property)(t.versionProperty)],t.prototype,"version",void 0),Uo([(0,ei.property)(t.fallbackTextProperty)],t.prototype,"fallbackText",void 0),Uo([(0,ei.property)(t.speakProperty)],t.prototype,"speak",void 0),Uo([(0,ei.property)(t.refreshProperty)],t.prototype,"refresh",null),Uo([(0,ei.property)(t.authenticationProperty)],t.prototype,"authentication",void 0),t}(wa);Bn.AdaptiveCard=Ia;var _a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.suppressStyle=!1,t}return $o(t,e),t.prototype.getSchemaKey=function(){return"InlineAdaptiveCard"},t.prototype.populateSchema=function(t){e.prototype.populateSchema.call(this,t),t.remove(Ia.$schemaProperty,Ia.versionProperty)},t.prototype.getDefaultPadding=function(){return new Xo.PaddingDefinition(this.suppressStyle?qo.Spacing.None:qo.Spacing.Padding,qo.Spacing.Padding,this.suppressStyle?qo.Spacing.None:qo.Spacing.Padding,qo.Spacing.Padding)},Object.defineProperty(t.prototype,"bypassVersionCheck",{get:function(){return!0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultStyle",{get:function(){return this.suppressStyle?qo.ContainerStyle.Default:this.hostConfig.actions.showCard.style?this.hostConfig.actions.showCard.style:qo.ContainerStyle.Emphasis},enumerable:!1,configurable:!0}),t.prototype.render=function(t){var n=e.prototype.render.call(this,t);return n&&(n.setAttribute("aria-live","polite"),n.removeAttribute("tabindex")),n},t}(Ia),Ta=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._forbiddenTypes=new Set,t}return $o(t,e),t.prototype.internalParseCardObject=function(e,t,n,r,o,i){var a=this,s=void 0;if(t&&"object"==typeof t){var l=new Set;this._forbiddenTypes.forEach(function(e){l.add(e)}),n.forEach(function(e){a._forbiddenTypes.add(e)});var c=Yo.parseString(t.type);if(c&&this._forbiddenTypes.has(c))i(c,qo.TypeErrorType.ForbiddenType);else{var u=!1;if((s=o(c))?(s.setParent(e),s.parse(t,this),u=Xo.GlobalSettings.enableFallback&&r&&s.shouldFallback()):(u=Xo.GlobalSettings.enableFallback&&r,i(c,qo.TypeErrorType.UnknownType)),u){var d=t.fallback;!d&&e&&e.setShouldFallback(!0),"string"==typeof d&&"drop"===d.toLowerCase()?s=void 0:"object"==typeof d&&(s=this.internalParseCardObject(e,d,n,!0,o,i))}}this._forbiddenTypes=l}return s},t.prototype.cardObjectParsed=function(e,t){e instanceof $i&&this.onParseAction?this.onParseAction(e,t,this):e instanceof ai&&this.onParseElement&&this.onParseElement(e,t,this)},t.prototype.shouldSerialize=function(e){return e instanceof $i?void 0!==this.actionRegistry.findByName(e.getJsonTypeName()):!(e instanceof ai)||void 0!==this.elementRegistry.findByName(e.getJsonTypeName())},t.prototype.parseCardObject=function(e,t,n,r,o,i){var a=new Set(n),s=this.internalParseCardObject(e,t,a,r,o,i);return void 0!==s&&this.cardObjectParsed(s,t),s},t.prototype.parseElement=function(e,t,n,r){var o=this;return this.parseCardObject(e,t,n,r,function(e){return o.elementRegistry.createInstance(e,o.targetVersion)},function(e,t){t===qo.TypeErrorType.UnknownType?o.logParseEvent(void 0,qo.ValidationEvent.UnknownElementType,ni.Strings.errors.unknownElementType(e)):o.logParseEvent(void 0,qo.ValidationEvent.ElementTypeNotAllowed,ni.Strings.errors.elementTypeNotAllowed(e))})},t.prototype.parseAction=function(e,t,n,r){var o=this;return this.parseCardObject(e,t,n,r,function(e){return o.actionRegistry.createInstance(e,o.targetVersion)},function(e,t){t===qo.TypeErrorType.UnknownType?o.logParseEvent(void 0,qo.ValidationEvent.UnknownActionType,ni.Strings.errors.unknownActionType(e)):o.logParseEvent(void 0,qo.ValidationEvent.ActionTypeNotAllowed,ni.Strings.errors.actionTypeNotAllowed(e))})},Object.defineProperty(t.prototype,"elementRegistry",{get:function(){var e;return null!==(e=this._elementRegistry)&&void 0!==e?e:ti.GlobalRegistry.elements},enumerable:!1,configurable:!0}),t.prototype.setElementRegistry=function(e){this._elementRegistry=e},Object.defineProperty(t.prototype,"actionRegistry",{get:function(){var e;return null!==(e=this._actionRegistry)&&void 0!==e?e:ti.GlobalRegistry.actions},enumerable:!1,configurable:!0}),t.prototype.setActionRegistry=function(e){this._actionRegistry=e},t}(ei.BaseSerializationContext);Bn.SerializationContext=Ta,ti.GlobalRegistry.defaultElements.register("Container",ma),ti.GlobalRegistry.defaultElements.register("TextBlock",ci),ti.GlobalRegistry.defaultElements.register("RichTextBlock",di,ei.Versions.v1_2),ti.GlobalRegistry.defaultElements.register("TextRun",ui,ei.Versions.v1_2),ti.GlobalRegistry.defaultElements.register("Image",fi),ti.GlobalRegistry.defaultElements.register("ImageSet",vi),ti.GlobalRegistry.defaultElements.register("Media",Mi,ei.Versions.v1_1),ti.GlobalRegistry.defaultElements.register("FactSet",hi),ti.GlobalRegistry.defaultElements.register("ColumnSet",ga),ti.GlobalRegistry.defaultElements.register("ActionSet",ca,ei.Versions.v1_2),ti.GlobalRegistry.defaultElements.register("Input.Text",Di),ti.GlobalRegistry.defaultElements.register("Input.Date",Hi),ti.GlobalRegistry.defaultElements.register("Input.Time",Wi),ti.GlobalRegistry.defaultElements.register("Input.Number",Li),ti.GlobalRegistry.defaultElements.register("Input.ChoiceSet",Ri),ti.GlobalRegistry.defaultElements.register("Input.Toggle",Oi),ti.GlobalRegistry.defaultActions.register(Qi.JsonTypeName,Qi),ti.GlobalRegistry.defaultActions.register(Ji.JsonTypeName,Ji),ti.GlobalRegistry.defaultActions.register(ia.JsonTypeName,ia),ti.GlobalRegistry.defaultActions.register(ea.JsonTypeName,ea,ei.Versions.v1_2),ti.GlobalRegistry.defaultActions.register(Xi.JsonTypeName,Xi,ei.Versions.v1_4);const ja=e=>{let t;return t=e.iconUrl?c.jsx(p.Button,{className:e.className,onClick:e.actionClickHandler,appearance:"primary",children:c.jsxs("div",{style:{display:"flex",flexDirection:e.iconPlacement===Rn.ActionIconPlacement.LeftOfTitle?"row":"column",justifyContent:"center",alignItems:"center"},children:[c.jsx("img",{src:e.iconUrl,style:{width:e.iconSize,height:e.iconSize,flexShrink:0,marginRight:e.iconPlacement===Rn.ActionIconPlacement.LeftOfTitle?4:0,marginBottom:e.iconPlacement!==Rn.ActionIconPlacement.LeftOfTitle?4:0},alt:""}),c.jsx("span",{children:e.text})]})}):"positive"===e.style.toLocaleLowerCase().trim()||"destructive"===e.style.toLocaleLowerCase().trim()?c.jsx(p.Button,{className:e.className,onClick:e.actionClickHandler,appearance:"primary",children:e.text}):c.jsx(p.Button,{className:e.className,onClick:e.actionClickHandler,children:e.text}),t},Ma=(e,t,n,r,o,i,a,s)=>{const l=document.createElement("div");return l.className="fluentUI",H.render(c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:s,children:c.jsx(ja,{text:e,className:n,iconUrl:t,iconPlacement:r,iconSize:o,actionClickHandler:i,style:a,theme:s})})}),l),l.addEventListener("DOMNodeRemoved",()=>{H.unmountComponentAtNode(l)}),l};class Na extends Yi{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){}render(e){var t,n;const r=this.hostConfig.hostCapabilities.getCustomProperty(Nn),o=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title??"",this.iconUrl||"",e||"",o.iconPlacement,o.iconSize,this.actionClickHandler,this.style,r)}}class Da extends Ki{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){}render(e){var t,n;const r=this.hostConfig.hostCapabilities.getCustomProperty(Nn),o=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title??"",this.iconUrl||"",e||"",o.iconPlacement,o.iconSize,this.actionClickHandler,this.style,r)}}class Oa extends aa{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){if(this.renderedElement){const e=1===this.state;this.renderedElement.setAttribute("aria-expanded",e.toString())}}render(e){var t,n;const r=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title||"Default Title",this.iconUrl||"",this.iconUrl??"",r.iconPlacement,r.iconSize,this.actionClickHandler,this.style)}}class Va extends Gi{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){}render(e){var t,n;const r=this.hostConfig.hostCapabilities.getCustomProperty(Nn),o=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title??"",this.iconUrl??"",e||"",o.iconPlacement,o.iconSize,this.actionClickHandler,this.style,r)}}class Ba extends ta{constructor(){super(...arguments),s(this,"actionClickHandler",e=>{e.stopPropagation(),e.preventDefault(),this.execute()})}updateCssClasses(){if(this.renderedElement){const e=1===this.state;this.renderedElement.setAttribute("aria-expanded",e.toString())}}render(e){var t,n;const r=this.hostConfig.hostCapabilities.getCustomProperty(Nn),o=(null==(n=null==(t=this.parent)?void 0:t.hostConfig)?void 0:n.actions)??{iconPlacement:"left",iconSize:24};this._renderedElement=Ma(this.title??"",this.iconUrl??"",e||"",o.iconPlacement,o.iconSize,this.actionClickHandler,this.style,r)}}const Ra=e=>{const t=document.createElement("div");return H.render(e(),t),t};var za=Object.defineProperty,La=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&za(t,n,i),i};const Ha=(e=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"style"),s(this,"isMultiSelect",!1),s(this,"placeholder"),s(this,"wrap",!1),s(this,"choices",[]),s(this,"element"),s(this,"refControl"),s(this,"selectedValues",[]),s(this,"defaultSelectedValues",[]),s(this,"updateSelectedValues",(e,t,n)=>{t?n?this.selectedValues.includes(e)||this.selectedValues.push(e):this.removeItemFromArray(this.selectedValues,e):this.selectedValues=[e]}),s(this,"removeItemFromArray",(e,t)=>{const n=e.indexOf(t);n>-1&&e.splice(n,1)})}get isCompact(){return!this.style||"compact"===this.style}set isCompact(e){this.style=e?void 0:"expanded"}internalRender(){const e=Dn(this.hostConfig),t=this.choices?this.choices.map(e=>({key:e.value,text:e.title})):[];this.defaultValue&&(this.defaultSelectedValues=this.defaultValue.split(this.hostConfig.choiceSetInputValueSeparator),this.selectedValues=[...this.defaultSelectedValues]);const n=()=>{var e;const[n,r]=L.useState(this.selectedValues);return L.useEffect(()=>{r(this.selectedValues)},[this.selectedValues.join(this.hostConfig.choiceSetInputValueSeparator)]),c.jsx(p.Combobox,{style:{width:"100%"},placeholder:this.placeholder,multiselect:this.isMultiSelect,value:this.isMultiSelect?n.map(e=>{var n;return null==(n=t.find(t=>t.key===e))?void 0:n.text}).join(this.hostConfig.choiceSetInputValueSeparator):null==(e=t.find(e=>n[0]===e.key))?void 0:e.text,selectedOptions:this.isMultiSelect?n:[n[0]],autoComplete:"filtered"===this.style?"on":"off",onOptionSelect:(e,t)=>{if(this.isMultiSelect)r(t.selectedOptions),this.selectedValues=t.selectedOptions;else{const e=t.optionValue??"";r([e]),this.selectedValues=[e]}this.valueChanged()},ref:e=>{this.refControl=e},children:t.map(e=>c.jsx(p.Option,{value:e.key,children:e.text??""},e.key))})};return this.element=Ra(()=>c.jsxs(c.Fragment,{children:[!this.isMultiSelect&&"expanded"===this.style&&c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(p.RadioGroup,{defaultValue:this.defaultValue,onChange:(e,t)=>{this.updateSelectedValues(t.value,this.isMultiSelect,!0),this.valueChanged()},ref:e=>{this.refControl=e},children:this.choices.map((e,t)=>c.jsx(p.Radio,{value:e.value,label:e.title,style:{marginTop:t>0?this.hostConfig.spacing.default:0}},e.value))})})}),this.isMultiSelect&&"expanded"===this.style&&c.jsx("div",{style:{display:"flex",gap:this.hostConfig.spacing.default},children:this.choices.map((t,n)=>{const r=this.defaultSelectedValues.indexOf(t.value??"")>-1;return c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(p.Checkbox,{label:t.title,defaultChecked:r,onChange:(e,n)=>{this.updateSelectedValues(t.value??"",this.isMultiSelect,!!n),this.valueChanged()},ref:e=>{0===n&&(this.refControl=e)}})})},t.value)})}),("compact"===this.style||"filtered"===this.style)&&c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(n,{})})})]})),this.element.style.width="100%",this.element}getJsonTypeName(){return"Input.ChoiceSet"}focus(){this.refControl&&this.refControl.focus&&this.refControl.focus()}internalValidateProperties(e){super.internalValidateProperties(e),0===this.choices.length&&e.addFailure(this,A.ValidationEvent.CollectionCantBeEmpty,A.Strings.errors.choiceSetMustHaveAtLeastOneChoice());for(const t of this.choices)t.title&&t.value||e.addFailure(this,A.ValidationEvent.PropertyCantBeNull,A.Strings.errors.choiceSetChoicesMustHaveTitleAndValue())}isSet(){return!!this.value}isValid(){return!!this.value||!this.isRequired}get value(){if(this.selectedValues)return this.selectedValues.join(this.hostConfig.choiceSetInputValueSeparator)}},s(e,"valueProperty",new A.StringProperty(A.Versions.v1_5,"value")),s(e,"choicesProperty",new A.SerializableObjectCollectionProperty(A.Versions.v1_5,"choices",A.Choice)),s(e,"styleProperty",new A.ValueSetProperty(A.Versions.v1_5,"style",[{value:"compact"},{value:"expanded"},{value:"filtered",targetVersion:A.Versions.v1_5}],"compact")),s(e,"isMultiSelectProperty",new A.BoolProperty(A.Versions.v1_5,"isMultiSelect",!1)),s(e,"placeholderProperty",new A.StringProperty(A.Versions.v1_5,"placeholder")),s(e,"wrapProperty",new A.BoolProperty(A.Versions.v1_5,"wrap",!1)),e);La([A.property(Ha.valueProperty)],Ha.prototype,"defaultValue"),La([A.property(Ha.styleProperty)],Ha.prototype,"style"),La([A.property(Ha.isMultiSelectProperty)],Ha.prototype,"isMultiSelect"),La([A.property(Ha.placeholderProperty)],Ha.prototype,"placeholder"),La([A.property(Ha.wrapProperty)],Ha.prototype,"wrap"),La([A.property(Ha.choicesProperty)],Ha.prototype,"choices");let Fa=Ha;var Wa=Object.defineProperty,$a=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&Wa(t,n,i),i};const Ua=(t=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"min"),s(this,"max"),s(this,"placeholder"),s(this,"_value"),s(this,"refControl"),s(this,"element")}internalRender(){const e=Dn(this.hostConfig);return this.element=Ra(()=>c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(T.DatePicker,{id:this.id,placeholder:this.placeholder,minDate:this.convertStringToDate(this.min),maxDate:this.convertStringToDate(this.max),onSelectDate:e=>{this._value=e??void 0,this.valueChanged()},ref:e=>{this.refControl=e},style:{width:"100%"}})})})),this.element.style.width="100%",this.element}convertStringToDate(e){if(e)try{const t=new Date(e);return isNaN(t.getTime())?void 0:t}catch{return}}getJsonTypeName(){return"Input.Date"}focus(){var e;null==(e=this.refControl)||e.focus()}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}isSet(){return!!this.value}isValid(){if(!this.value)return!this.isRequired;const e=new Date(this.value);let t=!0;if(this.min){const n=new Date(this.min);t=t&&e>=n}if(this.max){const n=new Date(this.max);t=t&&e<=n}return t}get value(){if(this._value){const e=this._value.getTimezoneOffset();return new Date(this._value.getTime()-60*e*1e3).toISOString().split("T")[0]}}},s(t,"valueProperty",new A.StringProperty(A.Versions.v1_5,"value")),s(t,"placeholderProperty",new A.StringProperty(A.Versions.v1_5,"placeholder")),s(t,"minProperty",new A.StringProperty(A.Versions.v1_0,"min")),s(t,"maxProperty",new A.StringProperty(A.Versions.v1_0,"max")),t);$a([A.property(Ua.valueProperty)],Ua.prototype,"defaultValue"),$a([A.property(Ua.minProperty)],Ua.prototype,"min"),$a([A.property(Ua.maxProperty)],Ua.prototype,"max"),$a([A.property(Ua.placeholderProperty)],Ua.prototype,"placeholder");let Ja=Ua;var Ga=Object.defineProperty,qa=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&Ga(t,n,i),i};const Xa=(n=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"min"),s(this,"max"),s(this,"placeholder"),s(this,"refControl",null),s(this,"element")}internalRender(){const e=Dn(this.hostConfig);return this.element=Ra(()=>c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:c.jsx(p.SpinButton,{style:{width:"calc(100% - 10px)"},id:this.id,defaultValue:void 0!==this.defaultValue?this.defaultValue:void 0,placeholder:this.placeholder,min:this.min,max:this.max,onChange:()=>{this.valueChanged()},ref:e=>{this.refControl=e}})})})),this.element.style.width="100%",this.element}getJsonTypeName(){return"Input.Number"}focus(){var e;null==(e=this.refControl)||e.focus()}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}isSet(){const e=this.value;return void 0!==e&&!isNaN(e)}isValid(){const e=this.value;if(void 0===e)return!this.isRequired;let t=!0;return void 0!==this.min&&(t=t&&e>=this.min),void 0!==this.max&&(t=t&&e<=this.max),t}get value(){return this.refControl?Number(this.refControl.value):void 0}},s(n,"valueProperty",new A.NumProperty(A.Versions.v1_5,"value")),s(n,"placeholderProperty",new A.StringProperty(A.Versions.v1_5,"placeholder")),s(n,"minProperty",new A.NumProperty(A.Versions.v1_0,"min")),s(n,"maxProperty",new A.NumProperty(A.Versions.v1_0,"max")),n);qa([A.property(Xa.valueProperty)],Xa.prototype,"defaultValue"),qa([A.property(Xa.minProperty)],Xa.prototype,"min"),qa([A.property(Xa.maxProperty)],Xa.prototype,"max"),qa([A.property(Xa.placeholderProperty)],Xa.prototype,"placeholder");let Ya=Xa;const Za=e=>{const{ariaLabel:t,iconProps:n,styles:r,className:o,onClick:i,...a}=e;return c.jsx(p.Button,{appearance:"transparent","aria-label":t,className:o,onClick:i,style:r,...a,children:c.jsx("img",{src:n.src,alt:t,style:{height:n.height||"100%",width:n.width||"auto"}})})},Qa={marginLeft:8};var Ka=Object.defineProperty,es=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&Ka(t,n,i),i};const ts=(r=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"maxLength"),s(this,"isMultiline",!1),s(this,"placeholder"),s(this,"style",A.InputTextStyle.Text),s(this,"inlineAction"),s(this,"regex"),s(this,"refControl",null),s(this,"element"),s(this,"_value",this.defaultValue||""),s(this,"handleKeyDown",e=>{var t;"Enter"===e.key&&this.inlineAction&&(null==(t=this.inlineAction)||t.execute())}),s(this,"buildInlineActionButton",()=>{var e;return Ra((null==(e=this.inlineAction)?void 0:e.iconUrl)?this.inlineIconActionButton:this.buildTextOnlyInlineActionActionButton)}),s(this,"inlineActionClickHandler",e=>{var t;e.stopPropagation(),e.preventDefault(),null==(t=this.inlineAction)||t.execute()}),s(this,"inlineIconActionButton",()=>{var e,t;const n=this.hostConfig.hostCapabilities.getCustomProperty(Nn);return c.jsx(p.FluentProvider,{theme:n,children:c.jsx(Za,{ariaLabel:(null==(e=this.inlineAction)?void 0:e.title)||"Inline action",className:this.hostConfig.makeCssClassName("ac-inlineActionButton","iconOnly"),iconProps:{src:(null==(t=this.inlineAction)?void 0:t.iconUrl)??""},onClick:this.inlineActionClickHandler,styles:Qa})})}),s(this,"buildTextOnlyInlineActionActionButton",()=>{var e;const t=this.hostConfig.hostCapabilities.getCustomProperty(Nn);return c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:t,children:c.jsx(p.Button,{appearance:"primary",className:this.hostConfig.makeCssClassName("ac-inlineActionButton","textOnly"),onClick:this.inlineActionClickHandler,style:Qa,children:(null==(e=this.inlineAction)?void 0:e.title)??""})})})})}internalRender(){const e=Dn(this.hostConfig);return this.element=Ra(()=>c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,children:this.isMultiline?c.jsx(p.Textarea,{resize:"vertical",style:{width:"100%"},id:this.id,defaultValue:this.defaultValue,placeholder:this.placeholder,maxLength:this.maxLength,onChange:(e,t)=>{this._value=t.value,this.valueChanged()},onKeyDown:this.handleKeyDown,ref:e=>{this.refControl=e}}):c.jsx(p.Input,{id:this.id,style:{width:"100%"},type:A.InputTextStyle[this.style].toLowerCase(),defaultValue:this.defaultValue,placeholder:this.placeholder,maxLength:this.maxLength,onChange:(e,t)=>{this._value=t.value,this.valueChanged()},onKeyDown:this.handleKeyDown,ref:e=>{this.refControl=e?e.inputElement:null}})})})),this.element.style.width="100%",this.element}overrideInternalRender(){const e=super.overrideInternalRender();return this.inlineAction&&this.inputControlContainerElement.appendChild(this.buildInlineActionButton()),e||document.createElement("div")}getJsonTypeName(){return"Input.Text"}focus(){var e;null==(e=this.refControl)||e.focus()}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}getActionById(e){let t=super.getActionById(e);if(!t&&this.inlineAction&&(t=this.inlineAction.getActionById(e)),!t)throw new Error(`Action with id '${e}' not found.`);return t}isSet(){return!!this.value}isValid(){return this.value?!this.regex||new RegExp(this.regex,"g").test(this.value):!this.isRequired}get value(){if(this._value)return this._value}},s(r,"valueProperty",new A.StringProperty(A.Versions.v1_0,"value")),s(r,"maxLengthProperty",new A.NumProperty(A.Versions.v1_0,"maxLength")),s(r,"isMultilineProperty",new A.BoolProperty(A.Versions.v1_0,"isMultiline",!1)),s(r,"placeholderProperty",new A.StringProperty(A.Versions.v1_0,"placeholder")),s(r,"styleProperty",new A.EnumProperty(A.Versions.v1_0,"style",A.InputTextStyle,A.InputTextStyle.Text)),s(r,"inlineActionProperty",new A.ActionProperty(A.Versions.v1_0,"inlineAction",["Action.ShowCard"])),s(r,"regexProperty",new A.StringProperty(A.Versions.v1_3,"regex",!0)),r);es([A.property(ts.valueProperty)],ts.prototype,"defaultValue"),es([A.property(ts.maxLengthProperty)],ts.prototype,"maxLength"),es([A.property(ts.isMultilineProperty)],ts.prototype,"isMultiline"),es([A.property(ts.placeholderProperty)],ts.prototype,"placeholder"),es([A.property(ts.styleProperty)],ts.prototype,"style"),es([A.property(ts.inlineActionProperty)],ts.prototype,"inlineAction"),es([A.property(ts.regexProperty)],ts.prototype,"regex");let ns=ts;var rs=Object.defineProperty,os=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&rs(t,n,i),i};const is=e=>{const{id:t,defaultTime:n,minTime:r,maxTime:o,placeholder:i,theme:a,onTimeChange:s}=e,[l,u]=L.useState(n),[d,h]=L.useState(n?j.formatDateToTimeString(n??new Date):"");return c.jsx(p.IdPrefixProvider,{value:t,children:c.jsx(p.FluentProvider,{theme:a,children:c.jsx(j.TimePicker,{style:{width:"100%"},expandIcon:c.jsx(v.ClockRegular,{}),id:t,freeform:!0,min:r?j.formatDateToTimeString(r):void 0,max:o?j.formatDateToTimeString(o):void 0,placeholder:i,value:l?j.formatDateToTimeString(l):d,onTimeChange:(e,t)=>{const n=t.selectedTime??void 0,r=t.selectedTimeText??"";u(n),h(r),s&&n&&s(n,r)},onInput:e=>{h(e.target.value)}})})})},as=(o=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"min"),s(this,"max"),s(this,"placeholder"),s(this,"_time"),s(this,"element")}static convertTimeStringToDate(e){return new Date("1973-09-04T"+e+":00Z")}internalRender(){const e=Dn(this.hostConfig),t=this.defaultValue?o.convertTimeStringToDate(this.defaultValue):void 0,n=this.min?o.convertTimeStringToDate(this.min):void 0,r=this.max?o.convertTimeStringToDate(this.max):void 0;return this.element=Ra(()=>c.jsx(is,{id:A.generateUniqueId(),defaultTime:t,minTime:n,maxTime:r,placeholder:this.placeholder,theme:e,onTimeChange:e=>{this._time=e,this.valueChanged()}})),this.element.style.width="100%",this.element}getJsonTypeName(){return"Input.Time"}focus(){}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}isSet(){return!!this.value}isValid(){if(!this.value)return!this.isRequired;if(!this._time)return!1;let e=!0;if(this.min){const t=o.convertTimeStringToDate(this.min);e=e&&this._time>=t}if(this.max){const t=o.convertTimeStringToDate(this.max);e=e&&this._time<=t}return e}get value(){return this._time?j.formatDateToTimeString(this._time):void 0}},s(o,"valueProperty",new A.TimeProperty(A.Versions.v1_0,"value")),s(o,"placeholderProperty",new A.StringProperty(A.Versions.v1_0,"placeholder")),s(o,"minProperty",new A.TimeProperty(A.Versions.v1_0,"min")),s(o,"maxProperty",new A.TimeProperty(A.Versions.v1_0,"max")),o);os([A.property(as.valueProperty)],as.prototype,"defaultValue"),os([A.property(as.minProperty)],as.prototype,"min"),os([A.property(as.maxProperty)],as.prototype,"max"),os([A.property(as.placeholderProperty)],as.prototype,"placeholder");let ss=as;var ls=Object.defineProperty,cs=(e,t,n,r)=>{for(var o,i=void 0,a=e.length-1;a>=0;a--)(o=e[a])&&(i=o(t,n,i)||i);return i&&ls(t,n,i),i};const us=(i=class extends A.Input{constructor(){super(...arguments),s(this,"defaultValue"),s(this,"title"),s(this,"valueOn","true"),s(this,"valueOff","false"),s(this,"wrap",!1),s(this,"_value"),s(this,"refControl",null),s(this,"element")}internalRender(){const e=Dn(this.hostConfig);return this.element=Ra(()=>c.jsx(p.IdPrefixProvider,{value:A.generateUniqueId(),children:c.jsx(p.FluentProvider,{theme:e,style:{backgroundColor:"transparent"},children:c.jsx(p.Switch,{id:this.id,label:this.title,onChange:(e,t)=>{this._value=t.checked,this.valueChanged()},defaultChecked:this.defaultValue===this.valueOn,style:{marginBottom:0,marginTop:0},ref:e=>{this.refControl=e}})})})),this.element.style.width="100%",this.element}get isNullable(){return!1}getJsonTypeName(){return"Input.Toggle"}focus(){var e;null==(e=this.refControl)||e.focus()}updateInputControlAriaLabelledBy(){if(this.element){const e=this.getAllLabelIds().join(" ");e?this.element.setAttribute("aria-labelledby",e):this.element.removeAttribute("aria-labelledby")}}isSet(){return this.isRequired?this.value===this.valueOn:!!this.value}get value(){return null!==this._value&&void 0!==this._value?this._value?this.valueOn:this.valueOff:this.isRequired?void 0:this.valueOff}},s(i,"valueProperty",new A.StringProperty(A.Versions.v1_5,"value")),s(i,"titleProperty",new A.StringProperty(A.Versions.v1_5,"title")),s(i,"valueOnProperty",new A.StringProperty(A.Versions.v1_5,"valueOn",!0,void 0,"true",e=>"true")),s(i,"valueOffProperty",new A.StringProperty(A.Versions.v1_5,"valueOff",!0,void 0,"false",e=>"false")),s(i,"wrapProperty",new A.BoolProperty(A.Versions.v1_2,"wrap",!1)),i);cs([A.property(us.valueProperty)],us.prototype,"defaultValue"),cs([A.property(us.titleProperty)],us.prototype,"title"),cs([A.property(us.valueOnProperty)],us.prototype,"valueOn"),cs([A.property(us.valueOffProperty)],us.prototype,"valueOff"),cs([A.property(us.wrapProperty)],us.prototype,"wrap");let ds=us;console.log("expression:",N.Expression);const ps=e=>{switch(e){case jn.SharePoint:return p.webLightTheme;case jn.Teams:return p.teamsLightTheme;case jn.TeamsDark:return p.teamsDarkTheme;case jn.TeamsHighContrast:return p.teamsHighContrastTheme;default:return p.webLightTheme}},hs=e=>{const t=u.useRef(null),n=u.useRef(null),r=u.useRef(null),o=u.useRef(null);u.useEffect(()=>{A.AdaptiveCard.onProcessMarkdown||(A.AdaptiveCard.onProcessMarkdown=(e,t)=>{t.outputHtml=(new W.default).render(e),t.didProcess=!0;try{t.outputHtml=(new W.default).render(e),t.didProcess=!0}catch(n){console.error("AdaptiveCardHost: Error parsing Markdown",n),t.didProcess=!1}})},[]),u.useEffect(()=>{n.current=null,n.current=new A.AdaptiveCard,r.current=new A.SerializationContext},[e]);const i=u.useCallback(t=>{if(e.onInvokeAction){let n={type:"",title:""};const r=t.getJsonTypeName();switch(r){case A.OpenUrlAction.JsonTypeName:{const e=t;n={type:r,title:e.title,url:e.url}}break;case A.SubmitAction.JsonTypeName:{const e=t;n={type:r,title:e.title,data:e.data}}break;case A.ExecuteAction.JsonTypeName:{const e=t;n={type:r,title:e.title,data:e.data,verb:e.verb}}break;default:n={type:r,title:"Unknown Action"}}e.onInvokeAction(n)}},[e.onInvokeAction]);return u.useEffect(()=>{let t,r=e.themeType;o.current=null,r||(r=jn.SharePoint),t=e.theme?e.theme:ps(r);const i=On(r,t),a=i.hostConfig;console.log("hostconfig:",a),o.current=t,n.current&&(n.current.hostConfig=i.hostConfig),e.onUpdateHostCapabilities&&e.onUpdateHostCapabilities(a.hostCapabilities)},[e]),u.useEffect(()=>{n.current&&(n.current.onExecuteAction=i)},[e,i]),u.useEffect(()=>{const t=new A.CardObjectRegistry,n=new A.CardObjectRegistry;var o;A.GlobalRegistry.populateWithDefaultElements(t),A.GlobalRegistry.populateWithDefaultActions(n),o=t,M.initializeIcons(),o.register("Input.Text",ns),o.register("Input.Number",Ya),o.register("Input.Time",ss),o.register("Input.Date",Ja),o.register("Input.Toggle",ds),o.register("Input.ChoiceSet",Fa),function(e){e.register("Action.Submit",Va),e.register("Action.OpenUrl",Da),e.register("Action.ShowCard",Oa),e.register("Action.ToggleVisibility",Ba),e.register("Action.Execute",Na)}(n),e.onSetCustomElements&&e.onSetCustomElements(t),e.onSetCustomActions&&e.onSetCustomActions(n);const i=r.current;i&&i.setElementRegistry(t),i&&i.setActionRegistry(n)},[e]),u.useEffect(()=>{for(var o;null==(o=null==t?void 0:t.current)?void 0:o.firstChild;)t.current.lastChild&&t.current.removeChild(t.current.lastChild);const i=t.current;if(!i)return;const a=n.current;try{const t=new D.Template(e.card),n=((e,t,n)=>{var r,o,i,a,s,l,c;let u,d;return d=n?{theme:t,aadInfo:(null==(r=null==n?void 0:n.pageContext)?void 0:r.aadInfo)?{instanceUrl:n.pageContext.aadInfo.instanceUrl||"",tenantId:n.pageContext.aadInfo.tenantId||"",userId:n.pageContext.aadInfo.userId||""}:void 0,cultureInfo:(null==(o=null==n?void 0:n.pageContext)?void 0:o.cultureInfo)?{currentCultureName:n.pageContext.cultureInfo.currentCultureName,currentUICultureName:n.pageContext.cultureInfo.currentUICultureName,isRightToLeft:n.pageContext.cultureInfo.isRightToLeft||!1}:void 0,userInfo:(null==(i=null==n?void 0:n.pageContext)?void 0:i.user)?{displayName:n.pageContext.user.displayName,email:n.pageContext.user.email,isAnonymousGuestUser:n.pageContext.user.isAnonymousGuestUser||!1,isExternalGuestUser:n.pageContext.user.isExternalGuestUser||!1,loginName:n.pageContext.user.loginName,preferUserTimeZone:n.pageContext.user.preferUserTimeZone||!1}:void 0,spListInfo:(null==(a=null==n?void 0:n.pageContext)?void 0:a.list)?{id:n.pageContext.list.id,serverRelativeUrl:n.pageContext.list.serverRelativeUrl||"",title:n.pageContext.list.title}:void 0,spListItemInfo:(null==(s=null==n?void 0:n.pageContext)?void 0:s.listItem)?{id:n.pageContext.listItem.id.toString()}:void 0,spSiteInfo:(null==(l=null==n?void 0:n.pageContext)?void 0:l.site)?{absoluteUrl:n.pageContext.site.absoluteUrl,cdnPrefix:n.pageContext.site.cdnPrefix||"",classification:n.pageContext.site.classification||"",correlationId:n.pageContext.site.correlationId||"",id:n.pageContext.site.id,isNoScriptEnabled:n.pageContext.site.isNoScriptEnabled||!1,recycleBinItemCount:n.pageContext.site.recycleBinItemCount||0,serverRelativeUrl:n.pageContext.site.serverRelativeUrl||"",serverRequestPath:n.pageContext.site.serverRequestPath||"",sitePagesEnabled:n.pageContext.site.sitePagesEnabled||!1}:void 0,spWebInfo:(null==(c=null==n?void 0:n.pageContext)?void 0:c.web)?{absoluteUrl:n.pageContext.web.absoluteUrl,id:n.pageContext.web.id,isAppWeb:n.pageContext.web.isAppWeb||!1,language:n.pageContext.web.language||0,languageName:n.pageContext.web.languageName||"",logoUrl:n.pageContext.web.logoUrl||"",serverRelativeUrl:n.pageContext.web.serverRelativeUrl||"",templateName:n.pageContext.web.templateName||"",title:n.pageContext.web.title,description:n.pageContext.web.description||""}:void 0}:{theme:t},u=e?{$root:{...null==e?void 0:e.$root,"@context":d}}:{$root:{"@context":d}},u})(e.data??{$root:{}},ps(e.themeType??jn.SharePoint),e.context),o=t.expand(n);if(a&&a.parse(o,r.current??void 0),a){const e=a.render();e&&e.outerHTML!==i.innerHTML&&e.outerHTML!==i.innerHTML&&(i.innerHTML="",i.appendChild(e))}}catch(s){e.onError&&e.onError(s)}},[e,ps]),c.jsx(p.IdPrefixProvider,{value:"adaptiveCardHost",children:c.jsx(p.FluentProvider,{theme:o.current?o.current:ps(e.themeType??jn.SharePoint),children:c.jsx("div",{ref:t,className:`${e.className?e.className:""}`,style:e.style})})})};var ms=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}(t);try{n.insertRule(e,n.cssRules.length)}catch(r){}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),this.tags=[],this.ctr=0},e}(),fs="-ms-",gs="-moz-",ys="-webkit-",vs="comm",bs="rule",xs="decl",Cs="@keyframes",ws=Math.abs,Ss=String.fromCharCode,ks=Object.assign;function Ps(e){return e.trim()}function Es(e,t,n){return e.replace(t,n)}function As(e,t){return e.indexOf(t)}function Is(e,t){return 0|e.charCodeAt(t)}function _s(e,t,n){return e.slice(t,n)}function Ts(e){return e.length}function js(e){return e.length}function Ms(e,t){return t.push(e),e}var Ns=1,Ds=1,Os=0,Vs=0,Bs=0,Rs="";function zs(e,t,n,r,o,i,a){return{value:e,root:t,parent:n,type:r,props:o,children:i,line:Ns,column:Ds,length:a,return:""}}function Ls(e,t){return ks(zs("",null,null,"",null,null,0),e,{length:-e.length},t)}function Hs(){return Bs=Vs>0?Is(Rs,--Vs):0,Ds--,10===Bs&&(Ds=1,Ns--),Bs}function Fs(){return Bs=Vs<Os?Is(Rs,Vs++):0,Ds++,10===Bs&&(Ds=1,Ns++),Bs}function Ws(){return Is(Rs,Vs)}function $s(){return Vs}function Us(e,t){return _s(Rs,e,t)}function Js(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Gs(e){return Ns=Ds=1,Os=Ts(Rs=e),Vs=0,[]}function qs(e){return Rs="",e}function Xs(e){return Ps(Us(Vs-1,Qs(91===e?e+2:40===e?e+1:e)))}function Ys(e){for(;(Bs=Ws())&&Bs<33;)Fs();return Js(e)>2||Js(Bs)>3?"":" "}function Zs(e,t){for(;--t&&Fs()&&!(Bs<48||Bs>102||Bs>57&&Bs<65||Bs>70&&Bs<97););return Us(e,$s()+(t<6&&32==Ws()&&32==Fs()))}function Qs(e){for(;Fs();)switch(Bs){case e:return Vs;case 34:case 39:34!==e&&39!==e&&Qs(Bs);break;case 40:41===e&&Qs(e);break;case 92:Fs()}return Vs}function Ks(e,t){for(;Fs()&&e+Bs!==57&&(e+Bs!==84||47!==Ws()););return"/*"+Us(t,Vs-1)+"*"+Ss(47===e?e:Fs())}function el(e){for(;!Js(Ws());)Fs();return Us(e,Vs)}function tl(e){return qs(nl("",null,null,null,[""],e=Gs(e),0,[0],e))}function nl(e,t,n,r,o,i,a,s,l){for(var c=0,u=0,d=a,p=0,h=0,m=0,f=1,g=1,y=1,v=0,b="",x=o,C=i,w=r,S=b;g;)switch(m=v,v=Fs()){case 40:if(108!=m&&58==Is(S,d-1)){-1!=As(S+=Es(Xs(v),"&","&\f"),"&\f")&&(y=-1);break}case 34:case 39:case 91:S+=Xs(v);break;case 9:case 10:case 13:case 32:S+=Ys(m);break;case 92:S+=Zs($s()-1,7);continue;case 47:switch(Ws()){case 42:case 47:Ms(ol(Ks(Fs(),$s()),t,n),l);break;default:S+="/"}break;case 123*f:s[c++]=Ts(S)*y;case 125*f:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:-1==y&&(S=Es(S,/\f/g,"")),h>0&&Ts(S)-d&&Ms(h>32?il(S+";",r,n,d-1):il(Es(S," ","")+";",r,n,d-2),l);break;case 59:S+=";";default:if(Ms(w=rl(S,t,n,c,u,o,s,b,x=[],C=[],d),i),123===v)if(0===u)nl(S,t,w,w,x,i,d,s,C);else switch(99===p&&110===Is(S,3)?100:p){case 100:case 108:case 109:case 115:nl(e,w,w,r&&Ms(rl(e,w,w,0,0,o,s,b,o,x=[],d),C),o,C,d,s,r?x:C);break;default:nl(S,w,w,w,[""],C,0,s,C)}}c=u=h=0,f=y=1,b=S="",d=a;break;case 58:d=1+Ts(S),h=m;default:if(f<1)if(123==v)--f;else if(125==v&&0==f++&&125==Hs())continue;switch(S+=Ss(v),v*f){case 38:y=u>0?1:(S+="\f",-1);break;case 44:s[c++]=(Ts(S)-1)*y,y=1;break;case 64:45===Ws()&&(S+=Xs(Fs())),p=Ws(),u=d=Ts(b=S+=el($s())),v++;break;case 45:45===m&&2==Ts(S)&&(f=0)}}return i}function rl(e,t,n,r,o,i,a,s,l,c,u){for(var d=o-1,p=0===o?i:[""],h=js(p),m=0,f=0,g=0;m<r;++m)for(var y=0,v=_s(e,d+1,d=ws(f=a[m])),b=e;y<h;++y)(b=Ps(f>0?p[y]+" "+v:Es(v,/&\f/g,p[y])))&&(l[g++]=b);return zs(e,t,n,0===o?bs:s,l,c,u)}function ol(e,t,n){return zs(e,t,n,vs,Ss(Bs),_s(e,2,-2),0)}function il(e,t,n,r){return zs(e,t,n,xs,_s(e,0,r),_s(e,r+1,-1),r)}function al(e,t){for(var n="",r=js(e),o=0;o<r;o++)n+=t(e[o],o,e,t)||"";return n}function sl(e,t,n,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case xs:return e.return=e.return||e.value;case vs:return"";case Cs:return e.return=e.value+"{"+al(e.children,r)+"}";case bs:e.value=e.props.join(",")}return Ts(n=al(e.children,r))?e.return=e.value+"{"+n+"}":""}function ll(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}var cl=function(e,t,n){for(var r=0,o=0;r=o,o=Ws(),38===r&&12===o&&(t[n]=1),!Js(o);)Fs();return Us(e,Vs)},ul=function(e,t){return qs(function(e,t){var n=-1,r=44;do{switch(Js(r)){case 0:38===r&&12===Ws()&&(t[n]=1),e[n]+=cl(Vs-1,t,n);break;case 2:e[n]+=Xs(r);break;case 4:if(44===r){e[++n]=58===Ws()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=Ss(r)}}while(r=Fs());return e}(Gs(e),t))},dl=new WeakMap,pl=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||dl.get(n))&&!r){dl.set(e,!0);for(var o=[],i=ul(t,o),a=n.props,s=0,l=0;s<i.length;s++)for(var c=0;c<a.length;c++,l++)e.props[l]=o[s]?i[s].replace(/&\f/g,a[c]):a[c]+" "+i[s]}}},hl=function(e){if("decl"===e.type){var t=e.value;108===t.charCodeAt(0)&&98===t.charCodeAt(2)&&(e.return="",e.value="")}};function ml(e,t){switch(function(e,t){return 45^Is(e,0)?(((t<<2^Is(e,0))<<2^Is(e,1))<<2^Is(e,2))<<2^Is(e,3):0}(e,t)){case 5103:return ys+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return ys+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return ys+e+gs+e+fs+e+e;case 6828:case 4268:return ys+e+fs+e+e;case 6165:return ys+e+fs+"flex-"+e+e;case 5187:return ys+e+Es(e,/(\w+).+(:[^]+)/,ys+"box-$1$2"+fs+"flex-$1$2")+e;case 5443:return ys+e+fs+"flex-item-"+Es(e,/flex-|-self/,"")+e;case 4675:return ys+e+fs+"flex-line-pack"+Es(e,/align-content|flex-|-self/,"")+e;case 5548:return ys+e+fs+Es(e,"shrink","negative")+e;case 5292:return ys+e+fs+Es(e,"basis","preferred-size")+e;case 6060:return ys+"box-"+Es(e,"-grow","")+ys+e+fs+Es(e,"grow","positive")+e;case 4554:return ys+Es(e,/([^-])(transform)/g,"$1"+ys+"$2")+e;case 6187:return Es(Es(Es(e,/(zoom-|grab)/,ys+"$1"),/(image-set)/,ys+"$1"),e,"")+e;case 5495:case 3959:return Es(e,/(image-set\([^]*)/,ys+"$1$`$1");case 4968:return Es(Es(e,/(.+:)(flex-)?(.*)/,ys+"box-pack:$3"+fs+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+ys+e+e;case 4095:case 3583:case 4068:case 2532:return Es(e,/(.+)-inline(.+)/,ys+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Ts(e)-1-t>6)switch(Is(e,t+1)){case 109:if(45!==Is(e,t+4))break;case 102:return Es(e,/(.+:)(.+)-([^]+)/,"$1"+ys+"$2-$3$1"+gs+(108==Is(e,t+3)?"$3":"$2-$3"))+e;case 115:return~As(e,"stretch")?ml(Es(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==Is(e,t+1))break;case 6444:switch(Is(e,Ts(e)-3-(~As(e,"!important")&&10))){case 107:return Es(e,":",":"+ys)+e;case 101:return Es(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+ys+(45===Is(e,14)?"inline-":"")+"box$3$1"+ys+"$2$3$1"+fs+"$2box$3")+e}break;case 5936:switch(Is(e,t+11)){case 114:return ys+e+fs+Es(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return ys+e+fs+Es(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return ys+e+fs+Es(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return ys+e+fs+e+e}return e}var fl,gl=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case xs:e.return=ml(e.value,e.length);break;case Cs:return al([Ls(e,{value:Es(e.value,"@","@"+ys)})],r);case bs:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return al([Ls(e,{props:[Es(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return al([Ls(e,{props:[Es(t,/:(plac\w+)/,":"+ys+"input-$1")]}),Ls(e,{props:[Es(t,/:(plac\w+)/,":-moz-$1")]}),Ls(e,{props:[Es(t,/:(plac\w+)/,fs+"input-$1")]})],r)}return""})}}],yl=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))})}var r,o,i=e.stylisPlugins||gl,a={},s=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n<t.length;n++)a[t[n]]=!0;s.push(e)});var l,c,u,d,p=[sl,(d=function(e){l.insert(e)},function(e){e.root||(e=e.return)&&d(e)})],h=(c=[pl,hl].concat(i,p),u=js(c),function(e,t,n,r){for(var o="",i=0;i<u;i++)o+=c[i](e,t,n,r)||"";return o});o=function(e,t,n,r){l=n,al(tl(e?e+"{"+t.styles+"}":t.styles),h),r&&(m.inserted[t.name]=!0)};var m={key:t,sheet:new ms({key:t,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:a,registered:{},insert:o};return m.sheet.hydrate(s),m},vl={exports:{}},bl={};var xl,Cl={};
|
|
25
25
|
/** @license React v16.13.1
|
|
26
26
|
* react-is.development.js
|
|
27
27
|
*
|
|
@@ -29,14 +29,14 @@ var s=function(){function e(){}return e.generate=function(){var t=4294967295*Mat
|
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the MIT license found in the
|
|
31
31
|
* LICENSE file in the root directory of this source tree.
|
|
32
|
-
*/"production"===process.env.NODE_ENV?
|
|
32
|
+
*/"production"===process.env.NODE_ENV?vl.exports=function(){if(fl)return bl;fl=1;var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:switch(e=e.type){case l:case c:case r:case i:case o:case d:return e;default:switch(e=e&&e.$$typeof){case s:case u:case m:case h:case a:return e;default:return p}}case n:return p}}}function x(e){return b(e)===c}return bl.AsyncMode=l,bl.ConcurrentMode=c,bl.ContextConsumer=s,bl.ContextProvider=a,bl.Element=t,bl.ForwardRef=u,bl.Fragment=r,bl.Lazy=m,bl.Memo=h,bl.Portal=n,bl.Profiler=i,bl.StrictMode=o,bl.Suspense=d,bl.isAsyncMode=function(e){return x(e)||b(e)===l},bl.isConcurrentMode=x,bl.isContextConsumer=function(e){return b(e)===s},bl.isContextProvider=function(e){return b(e)===a},bl.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},bl.isForwardRef=function(e){return b(e)===u},bl.isFragment=function(e){return b(e)===r},bl.isLazy=function(e){return b(e)===m},bl.isMemo=function(e){return b(e)===h},bl.isPortal=function(e){return b(e)===n},bl.isProfiler=function(e){return b(e)===i},bl.isStrictMode=function(e){return b(e)===o},bl.isSuspense=function(e){return b(e)===d},bl.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===f)},bl.typeOf=b,bl}():vl.exports=(xl||(xl=1,"production"!==process.env.NODE_ENV&&function(){var e="function"==typeof Symbol&&Symbol.for,t=e?Symbol.for("react.element"):60103,n=e?Symbol.for("react.portal"):60106,r=e?Symbol.for("react.fragment"):60107,o=e?Symbol.for("react.strict_mode"):60108,i=e?Symbol.for("react.profiler"):60114,a=e?Symbol.for("react.provider"):60109,s=e?Symbol.for("react.context"):60110,l=e?Symbol.for("react.async_mode"):60111,c=e?Symbol.for("react.concurrent_mode"):60111,u=e?Symbol.for("react.forward_ref"):60112,d=e?Symbol.for("react.suspense"):60113,p=e?Symbol.for("react.suspense_list"):60120,h=e?Symbol.for("react.memo"):60115,m=e?Symbol.for("react.lazy"):60116,f=e?Symbol.for("react.block"):60121,g=e?Symbol.for("react.fundamental"):60117,y=e?Symbol.for("react.responder"):60118,v=e?Symbol.for("react.scope"):60119;function b(e){if("object"==typeof e&&null!==e){var p=e.$$typeof;switch(p){case t:var f=e.type;switch(f){case l:case c:case r:case i:case o:case d:return f;default:var g=f&&f.$$typeof;switch(g){case s:case u:case m:case h:case a:return g;default:return p}}case n:return p}}}var x=l,C=c,w=s,S=a,k=t,P=u,E=r,A=m,I=h,_=n,T=i,j=o,M=d,N=!1;function D(e){return b(e)===c}Cl.AsyncMode=x,Cl.ConcurrentMode=C,Cl.ContextConsumer=w,Cl.ContextProvider=S,Cl.Element=k,Cl.ForwardRef=P,Cl.Fragment=E,Cl.Lazy=A,Cl.Memo=I,Cl.Portal=_,Cl.Profiler=T,Cl.StrictMode=j,Cl.Suspense=M,Cl.isAsyncMode=function(e){return N||(N=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),D(e)||b(e)===l},Cl.isConcurrentMode=D,Cl.isContextConsumer=function(e){return b(e)===s},Cl.isContextProvider=function(e){return b(e)===a},Cl.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===t},Cl.isForwardRef=function(e){return b(e)===u},Cl.isFragment=function(e){return b(e)===r},Cl.isLazy=function(e){return b(e)===m},Cl.isMemo=function(e){return b(e)===h},Cl.isPortal=function(e){return b(e)===n},Cl.isProfiler=function(e){return b(e)===i},Cl.isStrictMode=function(e){return b(e)===o},Cl.isSuspense=function(e){return b(e)===d},Cl.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===r||e===c||e===i||e===o||e===d||e===p||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===a||e.$$typeof===s||e.$$typeof===u||e.$$typeof===g||e.$$typeof===y||e.$$typeof===v||e.$$typeof===f)},Cl.typeOf=b}()),Cl);var wl=vl.exports,Sl={};Sl[wl.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Sl[wl.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var kl=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)};var Pl={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},El=/[A-Z]|^ms/g,Al=/_EMO_([^_]+?)_([^]*?)_EMO_/g,Il=function(e){return 45===e.charCodeAt(1)},_l=function(e){return null!=e&&"boolean"!=typeof e},Tl=ll(function(e){return Il(e)?e:e.replace(El,"-$&").toLowerCase()}),jl=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(Al,function(e,t,n){return Nl={name:t,styles:n,next:Nl},t})}return 1===Pl[e]||Il(e)||"number"!=typeof t||0===t?t:t+"px"};function Ml(e,t,n){if(null==n)return"";var r=n;if(void 0!==r.__emotion_styles)return r;switch(typeof n){case"boolean":return"";case"object":var o=n;if(1===o.anim)return Nl={name:o.name,styles:o.styles,next:Nl},o.name;var i=n;if(void 0!==i.styles){var a=i.next;if(void 0!==a)for(;void 0!==a;)Nl={name:a.name,styles:a.styles,next:Nl},a=a.next;return i.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o<n.length;o++)r+=Ml(e,t,n[o])+";";else for(var i in n){var a=n[i];if("object"!=typeof a){var s=a;_l(s)&&(r+=Tl(i)+":"+jl(i,s)+";")}else if(Array.isArray(a)&&"string"==typeof a[0]&&null==t)for(var l=0;l<a.length;l++)_l(a[l])&&(r+=Tl(i)+":"+jl(i,a[l])+";");else{var c=Ml(e,t,a);switch(i){case"animation":case"animationName":r+=Tl(i)+":"+c+";";break;default:r+=i+"{"+c+"}"}}}return r}(e,t,n);case"function":if(void 0!==e){var s=Nl,l=n(e);return Nl=s,Ml(e,t,l)}}return n}var Nl,Dl=/label:\s*([^\s;{]+)\s*(;|$)/g;function Ol(e,t,n){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var r=!0,o="";Nl=void 0;var i=e[0];null==i||void 0===i.raw?(r=!1,o+=Ml(n,t,i)):o+=i[0];for(var a=1;a<e.length;a++){if(o+=Ml(n,t,e[a]),r)o+=i[a]}Dl.lastIndex=0;for(var s,l="";null!==(s=Dl.exec(o));)l+="-"+s[1];var c=function(e){for(var t,n=0,r=0,o=e.length;o>=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:Nl}}var Vl=!!L.useInsertionEffect&&L.useInsertionEffect||function(e){return e()},Bl=L.createContext("undefined"!=typeof HTMLElement?yl({key:"css"}):null);Bl.Provider;var Rl,zl,Ll=function(e){return u.forwardRef(function(t,n){var r=u.useContext(Bl);return e(t,r,n)})},Hl=L.createContext({}),Fl={}.hasOwnProperty,Wl="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",$l=function(e,t){var n={};for(var r in t)Fl.call(t,r)&&(n[r]=t[r]);return n[Wl]=e,n},Ul=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return kl(t,n,r),Vl(function(){return function(e,t,n){kl(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var o=t;do{e.insert(t===o?"."+r:"",o,e.sheet,!0),o=o.next}while(void 0!==o)}}(t,n,r)}),null},Jl=Ll(function(e,t,n){var r=e.css;"string"==typeof r&&void 0!==t.registered[r]&&(r=t.registered[r]);var o=e[Wl],i=[r],a="";"string"==typeof e.className?a=function(e,t,n){var r="";return n.split(" ").forEach(function(n){void 0!==e[n]?t.push(e[n]+";"):n&&(r+=n+" ")}),r}(t.registered,i,e.className):null!=e.className&&(a=e.className+" ");var s=Ol(i,void 0,L.useContext(Hl));a+=t.key+"-"+s.name;var l={};for(var c in e)Fl.call(e,c)&&"css"!==c&&c!==Wl&&(l[c]=e[c]);return l.className=a,n&&(l.ref=n),L.createElement(L.Fragment,null,L.createElement(Ul,{cache:t,serialized:s,isStringTag:"string"==typeof o}),L.createElement(o,l))}),Gl=function(e,t,n){return Fl.call(t,"css")?z.jsx(Jl,$l(e,t),n):z.jsx(e,t,n)},ql=function(e,t,n){return Fl.call(t,"css")?z.jsxs(Jl,$l(e,t),n):z.jsxs(e,t,n)},Xl=function(e,t){var n=arguments;if(null==t||!Fl.call(t,"css"))return L.createElement.apply(void 0,n);var r=n.length,o=new Array(r);o[0]=Jl,o[1]=$l(e,t);for(var i=2;i<r;i++)o[i]=n[i];return L.createElement.apply(null,o)};function Yl(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return Ol(t)}Rl=Xl||(Xl={}),zl||(zl=Rl.JSX||(Rl.JSX={}));const Zl=Yl`
|
|
33
33
|
position: relative;
|
|
34
34
|
display: inline-block;
|
|
35
35
|
line-height: 0;
|
|
36
36
|
|
|
37
|
-
`,
|
|
37
|
+
`,Ql=Yl`
|
|
38
38
|
display: block;
|
|
39
|
-
`,
|
|
39
|
+
`,Kl=Yl`
|
|
40
40
|
position: absolute;
|
|
41
41
|
top: -1px;
|
|
42
42
|
right: -6px;
|
|
@@ -60,29 +60,29 @@ var s=function(){function e(){}return e.generate=function(){var t=4294967295*Mat
|
|
|
60
60
|
box-shadow: ${p.tokens.shadow8};
|
|
61
61
|
background: ${p.tokens.colorBrandBackgroundHover};
|
|
62
62
|
}
|
|
63
|
-
`,
|
|
64
|
-
${
|
|
63
|
+
`,ec=Yl`
|
|
64
|
+
${Kl};
|
|
65
65
|
font-size: 9px;
|
|
66
66
|
padding: 2px 4px;
|
|
67
67
|
border-radius: 8px;
|
|
68
68
|
top: -2px;
|
|
69
69
|
right: -7px;
|
|
70
|
-
`,
|
|
71
|
-
${
|
|
70
|
+
`,tc=Yl`
|
|
71
|
+
${Kl};
|
|
72
72
|
font-size: 6px;
|
|
73
73
|
padding: 1px 2px;
|
|
74
74
|
border-radius: 4px;
|
|
75
75
|
top: 0px;
|
|
76
76
|
right: -4px;
|
|
77
77
|
letter-spacing: 0.1px;
|
|
78
|
-
`,
|
|
79
|
-
${e>=24?
|
|
78
|
+
`,nc=({size:e=20,className:t,color:n,aiIndicatorColor:r})=>{const o=Yl`
|
|
79
|
+
${e>=24?ec:e<=16?tc:Kl};
|
|
80
80
|
${r?`\n background: ${r};\n border-color: ${r};\n `:""}
|
|
81
|
-
`,i=
|
|
82
|
-
${
|
|
81
|
+
`,i=Yl`
|
|
82
|
+
${Ql};
|
|
83
83
|
font-size: ${e}px;
|
|
84
84
|
${n?`color: ${n};`:"color: inherit;"}
|
|
85
|
-
`;return
|
|
85
|
+
`;return ql("span",{css:[Zl,t&&Yl`${t}`],children:[Gl(v.SearchRegular,{css:i}),Gl("span",{css:o,children:"AI"})]})},rc=p.makeStyles({container:{display:"flex",flexDirection:"column",gap:"20px",padding:"20px"},section:{display:"flex",flexDirection:"column",gap:"10px"},iconRow:{display:"flex",alignItems:"center",gap:"15px",padding:"10px",border:`1px solid ${p.tokens.colorNeutralStroke2}`,borderRadius:"8px"},label:{minWidth:"150px",fontWeight:600},buttonExample:{display:"flex",alignItems:"center",gap:"8px"},codeBlock:{background:p.tokens.colorNeutralBackground2,padding:"10px",borderRadius:"4px",fontSize:"12px",overflow:"auto",border:`1px solid ${p.tokens.colorNeutralStroke2}`}}),oc=u.memo(({icon:e,hoverIcon:t,imageSrc:n,width:r=24,height:o=24,color:i,hoverColor:a,onClick:s,enabled:l=!0})=>{const d=i||p.tokens.colorBrandBackground,h=a||p.tokens.colorBrandBackgroundHover,m=p.tokens.fontFamilyBase,[f,g]=u.useState(!1),y=u.useCallback(()=>{l&&g(!0)},[l]),v=u.useCallback(()=>{l&&g(!1)},[l]),b=u.useMemo(()=>l&&f&&t?t:e,[f,t,e,l]),x=u.useMemo(()=>({width:r,height:o,color:f?h:d,display:"flex",alignItems:"center",justifyContent:"center",opacity:l?1:.5,fontFamily:m,fontSize:"inherit"}),[r,o,f,h,d,l,m]),C=u.useMemo(()=>({border:"none",background:"none",padding:0,cursor:l?"pointer":"default"}),[l]),w=u.useMemo(()=>({width:r,height:o,objectFit:"contain",opacity:l?1:.5}),[r,o,l]);return c.jsx("button",{onClick:l?s:void 0,onMouseEnter:y,onMouseLeave:v,disabled:!l,style:C,children:n?c.jsx("img",{src:n,alt:"icon",style:w}):u.cloneElement(b,{style:{...b.props.style,...x}})})}),ic=L.forwardRef(({value:e,onChange:t,onSend:n,placeholder:r="Type a message",isRunning:o,onAbort:i},a)=>{const s={container:g.css({backgroundColor:p.tokens.colorNeutralBackground1,border:"1px solid "+p.tokens.colorNeutralStroke1,borderRadius:p.tokens.borderRadiusLarge,padding:`${p.tokens.spacingVerticalXS} ${p.tokens.spacingHorizontalS}`,minHeight:"40px",":focus-within::after":{borderBottom:`2px solid ${p.tokens.colorBrandStroke1}`}}),textarea:g.css({width:"calc(100% - 5px)",flex:1,border:"none",outline:"none",backgroundColor:"transparent",fontSize:p.tokens.fontSizeBase300,color:p.tokens.colorNeutralForeground1,resize:"none","::placeholder":{color:p.tokens.colorNeutralForegroundDisabled},"::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),iconContainer:g.css({display:"flex",alignItems:"center",gap:p.tokens.spacingHorizontalXS,marginLeft:p.tokens.spacingHorizontalXS}),buttonSend:g.css({width:"36px !important",height:"36px !important",maxWidth:"36px !important",maxHeight:"36px !important",minWidth:"36px !important",minHeight:"36px !important"})},l=L.useCallback(()=>{const t=e.trim();t.length>0&&n(t)},[e,n]);return c.jsxs(st,{width:"100%",className:s.container,children:[c.jsx("textarea",{ref:a,className:s.textarea,placeholder:r,value:e,onChange:e=>t(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),l())},rows:3}),c.jsx(st,{horizontal:!0,horizontalAlign:"end",width:"100%",children:o?c.jsx(oc,{icon:c.jsx(v.RecordStopRegular,{}),hoverIcon:c.jsx(v.RecordStopFilled,{}),width:32,height:32,onClick:i}):c.jsx(oc,{icon:c.jsx(v.ArrowCircleUp32Regular,{}),hoverIcon:c.jsx(v.ArrowCircleUp32Filled,{}),width:32,height:32,onClick:l,enabled:e.trim().length>0})})]})}),ac=()=>({listContainer:g.css({display:"grid",gridTemplateColumns:"1fr",gap:p.tokens.spacingVerticalXXS,maxHeight:"400px",overflowY:"auto",overflowX:"hidden",padding:p.tokens.spacingVerticalS,minWidth:"280px","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),suggestionsHeader:g.css({color:p.tokens.colorBrandBackground,padding:p.tokens.spacingVerticalXS}),noResults:g.css({padding:p.tokens.spacingVerticalS,textAlign:"center",color:p.tokens.colorNeutralForeground3})}),sc=({context:e,inputValue:t,parentRef:n,mentionChars:r,onUserSelect:o,theme:i=p.webLightTheme,suggestionsHeader:a="Suggestions",maxSuggestions:s=100,userFilter:l})=>{var d,h;const m=G(),f=e||m,g=null==f?void 0:f.graphClient,y=(null==(h=null==(d=null==f?void 0:f.pageContext)?void 0:d.web)?void 0:h.absoluteUrl)||"",[v,b]=u.useState(!1),[x,C]=u.useState({top:0,left:0}),[w,S]=u.useState([]),[k,P]=u.useState(""),[E,A]=u.useState(""),I=u.useRef({}),_=ac(),T=u.useCallback(async e=>{if(!g)return console.warn("Graph client not available"),[];const t=`${e}_${s}`;if(I.current[t])return I.current[t];try{const n=e&&e.length>0?`startswith(displayName,'${e}') or startswith(givenName,'${e}') or startswith(surname,'${e}')`:"",r=n?`/users?$filter=${n}&$select=id,displayName,mail,userPrincipalName&$top=${s}`:`/users?$select=id,displayName,mail,userPrincipalName&$orderby=displayName&$top=${s}`;console.log("[fetchUsers]: API query:",r);const o=await g.get(r);console.log("[fetchUsers]: Graph response:",o);const i=(o.value||[]).map(e=>({id:e.id||"",displayName:e.displayName||e.userPrincipalName||"Unknown User",mail:e.mail||e.userPrincipalName||"",avatar:y?`${y}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail||e.userPrincipalName}`:void 0})).filter(e=>e.id&&e.displayName);return console.log("[fetchUsers]: Processed users:",i),I.current[t]=i,i}catch(n){return console.error("[fetchUsers]: Error fetching users from Graph:",n),[]}},[g,y,s]),j=u.useCallback(Ke(async(e,t)=>{console.log("[debouncedFetch]: Fetching users for query:",e,"with char:",t);const n=await T(e),r=l?n.filter(t=>l(t,e)):n;console.log("[debouncedFetch]: Filtered users:",r),r.sort((e,t)=>e.displayName.localeCompare(t.displayName)),S(r),P(t),A(e),b(!0),console.log("[debouncedFetch]: Menu should be shown now")},300),[f,s,l,T]),M=e=>{const t=n.current;if(!t)return{top:0,left:0};if("TEXTAREA"===t.tagName){const n=t,r=V(n,e),o=n.getBoundingClientRect();return{top:o.top+r.top+22,left:o.left+r.left+16}}const r=t.getBoundingClientRect();return{top:r.bottom+5,left:r.left}};u.useEffect(()=>{if(!t)return void b(!1);console.log("[Mensions]: Analyzing input:",t);let e=!1;for(const n of r){const r=t.lastIndexOf(n);if(console.log("[Mensions]: Checking mention char:",n,"at position:",r),-1!==r&&(0===r||" "===t[r-1])){const o=t.slice(r+1);if(console.log("[Mensions]: Search text:",o),!o.includes(" ")){e=!0;const t=M(r);console.log("[Mensions]: Menu position:",t),C(t),j(o,n);break}}}e||(console.log("[Mensions]: No mention found, hiding menu"),b(!1))},[t,r,n,j]);const N=e=>{o(e,k),b(!1),S([])},D=u.useCallback(({users:e})=>c.jsxs("div",{className:_.listContainer,children:[0===e.length&&c.jsxs(p.Caption1,{className:_.noResults,children:['No users found for "',E,'"']}),e.map(e=>c.jsx(p.Card,{appearance:"subtle",onMouseDown:e=>e.preventDefault(),onClick:()=>N(e),children:c.jsx(p.Persona,{name:e.displayName||"Unknown User",role:"gridcell",secondaryText:e.mail||e.userPrincipalName||"",avatar:{image:{src:e.avatar}}})},e.id))]}),[_,E,N]);return c.jsxs(ft,{theme:i,anchorPoint:x,isOpen:v,onClose:()=>b(!1),excludeRefs:n?[n]:[],children:[c.jsx(p.CardHeader,{header:c.jsx(p.Body1Strong,{className:_.suggestionsHeader,children:a})}),c.jsx(p.Divider,{}),c.jsx(D,{users:w})]})},lc=()=>({inputContainer:g.css({marginTop:"auto",marginLeft:"auto","::after":{content:'""',position:"absolute",bottom:0,left:0,right:0,borderBottom:"2px solid transparent",pointerEvents:"none",borderRadius:p.tokens.borderRadiusMedium}}),listContainer:g.css({maxHeight:"400px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),sugestionsHeader:g.css({color:p.tokens.colorBrandBackground})}),cc=({context:e,onChange:t,value:n,placeholder:r,onSend:o,theme:i=p.webLightTheme,isRunning:a,onAbort:s})=>{const[l,d]=u.useState(n||""),h=u.useRef(null),m=lc();u.useEffect(()=>{var e;null==(e=h.current)||e.focus(),d(n||"")},[n]);return c.jsxs(st,{horizontal:!0,width:"100%",className:m.inputContainer,children:[c.jsx(ic,{ref:h,onSend:o,value:l,onChange:e=>{d(e),t&&t(e)},theme:i,placeholder:r,isRunning:a,onAbort:s}),c.jsx(sc,{context:e,inputValue:l,parentRef:h,mentionChars:["@"],onUserSelect:(e,n)=>{const r=new RegExp(`${n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(\\w*)$`),o=l.replace(r,`${n}${e.mail} `);d(o),t&&t(o),setTimeout(()=>{var e;null==(e=h.current)||e.focus()},0)},theme:i,suggestionsHeader:"Suggestions",maxSuggestions:10})]})},uc=()=>{const e=(()=>{const e=p.tokens.colorBrandBackground,t=g.keyframes`
|
|
86
86
|
0%, 80%, 100% {
|
|
87
87
|
opacity: 0;
|
|
88
88
|
transform: scale(0.8);
|
|
@@ -110,7 +110,7 @@ var s=function(){function e(){}return e.generate=function(){var t=4294967295*Mat
|
|
|
110
110
|
animation-delay: 0.2s;
|
|
111
111
|
`,dot3:g.css`
|
|
112
112
|
animation-delay: 0.4s;
|
|
113
|
-
`}})();return c.jsxs("div",{className:e.root,children:[c.jsx("div",{className:`${e.dot} ${e.dot1}`}),c.jsx("div",{className:`${e.dot} ${e.dot2}`}),c.jsx("div",{className:`${e.dot} ${e.dot3}`})]})},
|
|
113
|
+
`}})();return c.jsxs("div",{className:e.root,children:[c.jsx("div",{className:`${e.dot} ${e.dot1}`}),c.jsx("div",{className:`${e.dot} ${e.dot2}`}),c.jsx("div",{className:`${e.dot} ${e.dot3}`})]})},dc=(e,t)=>{switch(t.type){case"INIT":return{...e,messages:[t.welcomeMessage],isLoading:!1};case"SET_INPUT":return{...e,inputText:t.inputText};case"ADD_USER_MESSAGE":case"ADD_ASSISTANT_MESSAGE":return{...e,messages:[...e.messages,t.message]};case"UPDATE_LAST_ASSISTANT_MESSAGE":{const n=[...e.messages],r=n.length-1;return r>=0&&"Assistant"===n[r].senderName&&(n[r]=t.message),{...e,messages:n}}case"SET_ERROR":return{...e,error:t.error};case"CLEAR_INPUT":return{...e,inputText:""};case"SET_IS_RUNNING":return{...e,isRunning:!e.isRunning};default:return e}};const pc=(e,t)=>{const{getFormatRelative:n}=Ze(e,t);return n(new Date)},hc=e=>{const{template:t}=e;return c.jsx(c.Fragment,{children:t})},mc=new Map,fc=3e5;setInterval(()=>{const e=Date.now(),t=[];mc.forEach((n,r)=>{e>n.expiresAt&&t.push(r)}),t.forEach(e=>mc.delete(e))},6e5);const gc=u.memo(({userId:e,avatarSize:t=32,showHoverCard:n=!0,context:r,textPosition:o="after",className:i,avatarOnly:a=!1,secondaryText:s,tertiaryText:d,quaternaryText:h})=>{var m,f;const y={root:g.css({display:"flex",flexDirection:"row",justifyContent:"flex-start",alignItems:"flex-start",width:"fit-content",gap:"10px","&[data-fui-focus-within]:focus-within::after":{borderWidth:"0px"}}),personContainer:g.css({display:"flex",flexDirection:"column",justifyContent:"flex-start",alignItems:"flex-start",width:"100%",maxWidth:"100%",overflow:"hidden",paddingBottom:"0px"}),textStyle:g.css({width:"100%",maxWidth:"100%",overflow:"hidden",display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",paddingBottom:"0px",textAlign:"start",wordBreak:"break-all",textOverflow:"ellipsis",textOverlay:"hidden"}),spinnerContainer:g.css({display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",width:"100%"})},{user:v}=((e,t)=>{const n=G(),r=t||n,o=null==r?void 0:r.graphClient,{error:i}=q(),[a,s]=u.useState(void 0),[c,d]=u.useState(!0),p=u.useCallback(async e=>{if(!o)return console.warn("Graph client not available"),null;try{return await o.get(`/users/${e}`)}catch(t){return console.error("Error fetching user:",t),null}},[o]),h=u.useCallback(async e=>{if(!o)return console.warn("Graph client not available"),null;try{return await o.get(`/users/${e}/presence`)}catch(t){return console.error("Error fetching user presence:",t),null}},[o]),m=u.useCallback(async e=>{if(o)try{const t=await o.getBlob(`/users/${e}/photo/$value`);return t?new Promise((e,n)=>{const r=new FileReader;r.onloadend=()=>e(r.result),r.onerror=n,r.readAsDataURL(t)}):void 0}catch(t){return void console.debug("No photo available for user:",e)}else console.warn("Graph client not available")},[o]),f=u.useCallback(async()=>{var t;if(!e)return void d(!1);const n=mc.get(e),r=Date.now();if(n&&r<n.expiresAt)return s(n.data),void d(!1);try{const n=await p(e);if(!n)return;let a,c={availability:"Offline",activity:"Offline"};try{if(n.id){const e=await h(n.id);e&&(c=e)}}catch(o){(null==(t=null==o?void 0:o.message)?void 0:t.toLowerCase().includes("exceed"))?(i("fetchUser: Exceeded resource error during presence check",o,l.ErrorType.Error),c=n.presence||{availability:"Offline",activity:"Offline"}):i("fetchUser: Error fetching user presence",o,l.ErrorType.Error)}try{n.id&&(a=await m(n.id))}catch(o){i("fetchUser: Error fetching user photo",o,l.ErrorType.Warning)}const u={...n,presence:c,userPhoto:a};mc.set(e,{data:u,timestamp:r,expiresAt:r+fc}),s(u)}catch(o){i("fetchUser: Error fetching user",o,l.ErrorType.Error)}finally{d(!1)}},[e,p,h,m,i]),g=u.useCallback(async()=>{var t;if(!e||!a)return;const n=mc.get(e),r=Date.now();if(!(n&&n.data.presence&&r-n.timestamp<12e4))try{let c={availability:"Offline",activity:"Offline"};try{if(a.id){const e=await h(a.id);e&&(c=e)}}catch(o){(null==(t=o.message)?void 0:t.toLowerCase().includes("exceed"))?(i("checkUserPresence: Exceeded resource error during presence check",o,l.ErrorType.Error),c=a.presence||{availability:"Offline",activity:"Offline"}):i("checkUserPresence: Error fetching user presence",o,l.ErrorType.Error)}const u={...a,presence:c};mc.set(e,{data:u,timestamp:r,expiresAt:(null==n?void 0:n.expiresAt)||r+fc}),s(u)}catch(o){i("checkUserPresence: Error in checkUserPresence",o,l.ErrorType.Error)}},[e,a,h,i]);u.useEffect(()=>{(async()=>{await f()})()},[f]);const{startPolling:y,stopPolling:v}=Y(g,a?6e4:12e4,!1);return u.useEffect(()=>(a&&y(),()=>{v()}),[a,y,v]),{user:a,loading:c,refetch:f}})(e,r),b=u.useMemo(()=>{var e,t,n,r;const o=null==(t=null==(e=null==v?void 0:v.presence)?void 0:e.availability)?void 0:t.toLowerCase(),i=null==(r=null==(n=null==v?void 0:v.presence)?void 0:n.activity)?void 0:r.toLowerCase();switch(o){case"available":return{status:"available",text:"Available"};case"availableidle":return{status:"available",text:"Available, idle"};case"away":return{status:"away",text:"Away"};case"busy":return{status:"busy",text:"Busy"};case"busyidle":return{status:"busy",text:"Busy, idle"};case"donotdisturb":return{status:"do-not-disturb",text:"Do not disturb"};case"berighback":return{status:"away",text:"Be right back"};case"invisible":return{status:"offline",text:"Appear offline"};case"presenceunknown":return{status:"unknown",text:"Unknown"};case"offline":return{status:"offline",text:"outofoffice"===i?"Out of office":"Offline",outOfOffice:"outofoffice"===i};default:return{status:"offline",text:"Offline",outOfOffice:"outofoffice"===i}}},[null==(m=null==v?void 0:v.presence)?void 0:m.availability,null==(f=null==v?void 0:v.presence)?void 0:f.activity]);return c.jsx(hc,{upn:n&&(null==v?void 0:v.mail)||"",template:c.jsx("div",{className:p.mergeClasses(y.root,i),children:a?c.jsx(p.Avatar,{color:"colorful",image:{src:null==v?void 0:v.userPhoto,alt:(null==v?void 0:v.displayName)||"User Avatar"},size:t,name:(null==v?void 0:v.displayName)||e||"Unknown User",badge:{status:b.status,outOfOffice:b.outOfOffice}}):c.jsx(p.Persona,{primaryText:c.jsxs(p.Body1Strong,{className:y.textStyle,children:[" ",(null==v?void 0:v.displayName)||e||"Unknown User"]}),textPosition:o??"after",presence:{status:b.status,outOfOffice:b.outOfOffice},secondaryText:(null==s?void 0:s.showSecondaryText)?s.text?c.jsx(c.Fragment,{children:c.jsx("span",{className:y.textStyle,children:s.text})}):c.jsx(c.Fragment,{children:c.jsx("span",{className:y.textStyle,children:(null==v?void 0:v.jobTitle)||"Unknown Job Title"})}):void 0,tertiaryText:(null==d?void 0:d.showTertiaryText)?d.text?c.jsx(c.Fragment,{children:c.jsx("span",{className:y.textStyle,children:d.text})}):c.jsx(c.Fragment,{children:c.jsx("span",{className:y.textStyle,children:(null==v?void 0:v.mail)||"Unknown Email"})}):void 0,quaternaryText:(null==h?void 0:h.showQuaternaryText)?h.text?c.jsx(c.Fragment,{children:c.jsx("span",{className:y.textStyle,children:h.text})}):c.jsx(c.Fragment,{children:c.jsx("span",{className:y.textStyle,children:b.text})}):void 0,avatar:{color:"colorful",image:{src:null==v?void 0:v.userPhoto,alt:(null==v?void 0:v.displayName)||"User Avatar"},size:t},textAlignment:"start"})})})},(e,t)=>e.userId===t.userId&&e.avatarSize===t.avatarSize&&e.showHoverCard===t.showHoverCard&&e.textPosition===t.textPosition&&e.avatarOnly===t.avatarOnly&&e.className===t.className&&JSON.stringify(e.secondaryText)===JSON.stringify(t.secondaryText)&&JSON.stringify(e.tertiaryText)===JSON.stringify(t.tertiaryText)&&JSON.stringify(e.quaternaryText)===JSON.stringify(t.quaternaryText)),yc={width:"20px",height:"20px",color:p.tokens.colorBrandBackground},vc=["access","comment","create","delete","edit","mention","move","rename","restore","share","version"],bc=new Map([["access",{message:"accessed this"}],["comment",{message:"commented on this"}],["create",{message:"created this"}],["delete",{message:"deleted this"}],["edit",{message:"edited this"}],["mention",{message:"mentioned you in this"}],["move",{message:"moved this"}],["rename",{message:"renamed this"}],["restore",{message:"restored this"}],["share",{message:"shared this"}],["version",{message:"versioned this"}]]),xc=e=>c.jsxs("svg",{width:"100",height:"100",viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[c.jsx("rect",{x:"20",y:"30",width:"60",height:"50",fill:"#0078D4",opacity:"0.1"}),c.jsx("rect",{x:"30",y:"50",width:"10",height:"20",fill:"#0078D4"}),c.jsx("rect",{x:"45",y:"40",width:"10",height:"30",fill:"#0078D4"}),c.jsx("rect",{x:"60",y:"35",width:"10",height:"35",fill:"#0078D4"})]}),Cc=e=>{const{height:t}=e;return c.jsxs("div",{style:{height:t||"100%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},children:[c.jsx(xc,{width:200,height:200}),c.jsx(p.Text,{size:500,weight:"semibold",children:"No Dashboards Available"})]})},wc=e=>{const{onChange:t,values:n,maxCols:r,maxRows:o}=e,i=v.bundleIcon(v.Settings20Filled,v.Settings20Regular),a={gridContainer:g.css`
|
|
114
114
|
display: grid;
|
|
115
115
|
gap: 4px;
|
|
116
116
|
padding: 8px;
|
|
@@ -133,7 +133,7 @@ var s=function(){function e(){}return e.generate=function(){var t=4294967295*Mat
|
|
|
133
133
|
`,bottomText:g.css`
|
|
134
134
|
padding-left: 8px;
|
|
135
135
|
padding-right: 8px;
|
|
136
|
-
`,zoomContainer:g.css({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",width:"100%",boxSizing:"border-box",padding:"8px 0px"})},[s,l]=L.useState(n),[u,d]=L.useState(null),[h,m]=L.useState(!1);L.useEffect(()=>{l(n)},[n]);const f=(e,n)=>{const r={spanCols:n+1,spanRows:e+1};l(r),null==t||t(r),m(!1)},y=(e,t)=>{d({spanCols:t+1,spanRows:e+1})},b=L.useMemo(()=>30*r+4*(r-1)+32,[r]);return c.jsxs(p.Menu,{open:h,onOpenChange:(e,t)=>{m(t.open),d(null)},children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.Tooltip,{content:"Configure",relationship:"label",children:c.jsx(p.MenuButton,{icon:c.jsx(i,{}),size:"small",appearance:"transparent"})})}),c.jsxs(p.MenuPopover,{style:{width:`${b}px`,minWidth:"120px",padding:8},children:[c.jsx("div",{className:a.zoomContainer,children:c.jsx(bt,{label:`Span (${s.spanCols} × ${s.spanRows})`})}),c.jsx("div",{className:a.gridContainer,style:{gridTemplateColumns:`repeat(${r}, 30px)`,gridTemplateRows:`repeat(${o}, 30px)`},onMouseLeave:()=>{d(null)},children:(()=>{const e=[];for(let t=0;t<o;t++)for(let n=0;n<r;n++){const r=t<s.spanRows&&n<s.spanCols,o=u&&t<u.spanRows&&n<u.spanCols;e.push(c.jsx("div",{className:`${a.cell} ${o?a.hoveredCell:""} ${r?a.selectedCell:""}`,onMouseEnter:()=>y(t,n),onClick:()=>f(t,n)},`${t}-${n}`))}return e})()}),c.jsx(p.Caption1,{className:a.bottomText,children:"Click to set span"})]})]})};exports.ErrorType=l.ErrorType,exports.LogLevel=l.LogLevel,exports.AIAssistant=e=>{const{instrutions:t,timezone:n,locale:r,onResponse:o,openAIConfig:i,theme:a,placeholder:s,context:l}=e,[d,h]=L.useReducer(
|
|
136
|
+
`,zoomContainer:g.css({display:"flex",flexDirection:"row",alignItems:"center",gap:"6px",width:"100%",boxSizing:"border-box",padding:"8px 0px"})},[s,l]=L.useState(n),[u,d]=L.useState(null),[h,m]=L.useState(!1);L.useEffect(()=>{l(n)},[n]);const f=(e,n)=>{const r={spanCols:n+1,spanRows:e+1};l(r),null==t||t(r),m(!1)},y=(e,t)=>{d({spanCols:t+1,spanRows:e+1})},b=L.useMemo(()=>30*r+4*(r-1)+32,[r]);return c.jsxs(p.Menu,{open:h,onOpenChange:(e,t)=>{m(t.open),d(null)},children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.Tooltip,{content:"Configure",relationship:"label",children:c.jsx(p.MenuButton,{icon:c.jsx(i,{}),size:"small",appearance:"transparent"})})}),c.jsxs(p.MenuPopover,{style:{width:`${b}px`,minWidth:"120px",padding:8},children:[c.jsx("div",{className:a.zoomContainer,children:c.jsx(bt,{label:`Span (${s.spanCols} × ${s.spanRows})`})}),c.jsx("div",{className:a.gridContainer,style:{gridTemplateColumns:`repeat(${r}, 30px)`,gridTemplateRows:`repeat(${o}, 30px)`},onMouseLeave:()=>{d(null)},children:(()=>{const e=[];for(let t=0;t<o;t++)for(let n=0;n<r;n++){const r=t<s.spanRows&&n<s.spanCols,o=u&&t<u.spanRows&&n<u.spanCols;e.push(c.jsx("div",{className:`${a.cell} ${o?a.hoveredCell:""} ${r?a.selectedCell:""}`,onMouseEnter:()=>y(t,n),onClick:()=>f(t,n)},`${t}-${n}`))}return e})()}),c.jsx(p.Caption1,{className:a.bottomText,children:"Click to set span"})]})]})};exports.ErrorType=l.ErrorType,exports.LogLevel=l.LogLevel,exports.AIAssistant=e=>{const{instrutions:t,timezone:n,locale:r,onResponse:o,openAIConfig:i,theme:a,placeholder:s,context:l}=e,[d,h]=L.useReducer(dc,{messages:[],inputText:"",isLoading:!0,error:void 0,isRunning:!1}),{messages:m,inputText:f,isLoading:y,error:v,isRunning:b}=d,C=L.useRef([]),w={container:g.css({display:"flex",flexDirection:"column",padding:"10px",width:"100%",height:"600px",borderRadius:"8px",boxShadow:"0 2px 10px rgba(0, 0, 0, 0.1)",overflowY:"auto",overflowX:"hidden",position:"relative",zIndex:1e3}),chatList:g.css({display:"flex",flexDirection:"column",gap:"10px",padding:"10px",overflowY:"auto",overflowX:"hidden",height:"100%",width:"100%","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),chatAIAssistantRoot:g.css({padding:"10px",display:"flex",flexDirection:"column",position:"relative",height:"calc(100% - 20px)"}),inputContainer:g.css({display:"flex",flexDirection:"row",flex:1,marginTop:"10px",gap:"10px",alignItems:"center"}),input:g.css({width:"100%",fontSize:"14px"})},S=L.useRef(null),{sendRequest:k,cancelRequest:P,error:E}=function(){const[e,t]=u.useState(""),[n,r]=u.useState(!1),[o,i]=u.useState(null),a=u.useRef(null);return{data:e,isLoading:n,error:o,sendRequest:u.useCallback(async(e,n,o,s)=>{var l,c,u,d;t(""),i(null),r(!0);const p=new AbortController;a.current=p;try{const r=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n),signal:p.signal,...o});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const i=null==(l=r.body)?void 0:l.getReader();if(!i)throw new Error("No response body");const a=new TextDecoder("utf-8");let m=!1,f="",g="";for(;!m;){const{value:e,done:n}=await i.read();if(m=n,e)if(g+=a.decode(e,{stream:!0}),g.includes("event:")||g.includes("data:")){const e=g.split("\n");g=e.pop()||"";let n="",r="";for(const o of e)if(o.startsWith("event:"))n=o.substring(6).trim();else if(o.startsWith("data:")){const e=o.substring(5).trim();r&&e?r+="\n"+e:r=e}else if(""===o){if(!r){n="",r="";continue}if("error"===n)try{const e=JSON.parse(r).message||"An error occurred";throw e.includes("429")||e.toLowerCase().includes("rate limit")?new Error("Rate limit exceeded. Please wait a moment and try again."):e.includes("quota")?new Error("API quota exceeded. Please try again later."):new Error(e)}catch(h){if(h instanceof Error&&h.message.includes("Rate limit"))throw h;throw new Error(r||"An error occurred during streaming")}else if("done"===n)m=!0;else if("tool"===n);else try{const e=JSON.parse(r);if(e.status&&1===Object.keys(e).length);else if(e.content){const n="string"==typeof e.content?e.content:JSON.stringify(e.content,null,2);f+=n,t(f),s&&s(n)}else{const n=JSON.stringify(e,null,2);f+=n+"\n",t(f),s&&s(n)}}catch{f+=r+"\n",t(f),s&&s(r)}n="",r=""}}else{const e=g.split("\n");g=e.pop()||"";for(const n of e)if(n.trim())try{const e=JSON.parse(n);if(null==(d=null==(u=null==(c=e.choices)?void 0:c[0])?void 0:u.delta)?void 0:d.content){const n=e.choices[0].delta.content;f+=n,t(f),s&&s(n)}else e.content?(f+=e.content,t(f),s&&s(e.content)):!0===e.done||"done"===e.type?m=!0:e.status||(f+=n,t(f),s&&s(n))}catch{f+=n+"\n",t(f),s&&s(n+"\n")}}}}catch(m){throw m instanceof Error&&"AbortError"===m.name?(i("Request aborted"),m):(i(m instanceof Error?m.message:"Error occurred"),m)}finally{r(!1)}},[]),cancelRequest:u.useCallback(()=>{a.current&&a.current.abort()},[])}}(),A=L.useCallback(()=>{S.current&&(S.current.scrollTop=S.current.scrollHeight-S.current.clientHeight)},[]);L.useEffect(()=>{var e,t;const r={message:"Welcome to AI Assistant! How can I help you today?",senderName:"Assistant",timeStamp:pc(n,(null==(t=null==(e=null==l?void 0:l.pageContext)?void 0:e.cultureInfo)?void 0:t.currentUICultureName)||"en-US"),status:"received"};h({type:"INIT",welcomeMessage:r})},[]);const I=L.useCallback(async()=>{var e,a,s,u;if(!f.trim())return;const d={message:f,senderName:"User",timeStamp:pc(n,(null==(a=null==(e=null==l?void 0:l.pageContext)?void 0:e.cultureInfo)?void 0:a.currentUICultureName)||"en-US"),status:"received"},p=f;h({type:"ADD_USER_MESSAGE",message:d}),h({type:"CLEAR_INPUT"}),h({type:"SET_IS_RUNNING"});const m={message:c.jsx(uc,{}),senderName:"Assistant",timeStamp:pc(n,(null==(u=null==(s=null==l?void 0:l.pageContext)?void 0:s.cultureInfo)?void 0:u.currentUICultureName)||"en-US"),status:"sending"};h({type:"ADD_ASSISTANT_MESSAGE",message:m}),A();let g="";const y=(null==i?void 0:i.endpoint)||"http://localhost:7071/api/EventAssistant",v={instructions:t,input:p,timezone:n,locale:r,history:C.current,mcpServers:null==i?void 0:i.mcpServers};try{await k(y,v,void 0,e=>{g+=e,h({type:"UPDATE_LAST_ASSISTANT_MESSAGE",message:{...m,message:g,status:"received"}}),o&&o(g).then(e=>{const{message:t,status:n}=e;h({type:"UPDATE_LAST_ASSISTANT_MESSAGE",message:{...m,message:t||g,status:n||"received"}})}).catch(e=>{console.error("onResponse callback error:",e)})}),h({type:"UPDATE_LAST_ASSISTANT_MESSAGE",message:{...m,message:g,status:"received"}}),h({type:"SET_IS_RUNNING"})}catch(b){console.error("Error during streaming:",b);let e="Error occurred while processing your request.";b instanceof Error&&(e=b.message.includes("Rate limit")||b.message.includes("429")?"⚠️ Rate limit exceeded. Please wait a moment before sending another message.":b.message.includes("quota")?"⚠️ API quota exceeded. Please try again later.":b.message.includes("abort")?"Request was cancelled.":b.message),h({type:"UPDATE_LAST_ASSISTANT_MESSAGE",message:{...m,message:e,status:"failed"}}),h({type:"SET_IS_RUNNING"})}C.current.push(p),C.current.push(g),A()},[f,t,r,o,i,n,k,E]),_=L.useCallback(e=>{h({type:"SET_INPUT",inputText:e})},[]);if(y)return c.jsx(p.Spinner,{size:"medium"});if(v)return c.jsx(En,{message:"There was an error processing your request.",messageType:U.INFO});const T=e=>{if("string"!=typeof e)return e;const t=e.trim();try{const e=JSON.parse(t);if("AdaptiveCard"===e.type&&e.version)return c.jsx(hs,{card:e,context:l,onInvokeAction:e=>{console.log("Adaptive Card action:",e)},onError:e=>{console.error("Adaptive Card error:",e)}})}catch{}return c.jsx("pre",{style:{whiteSpace:"pre-wrap",wordWrap:"break-word",fontFamily:"inherit",fontSize:"inherit",margin:0,maxWidth:"100%",overflow:"auto"},children:e})};return c.jsxs("div",{id:"aiAssistant",className:w.chatAIAssistantRoot,children:[c.jsx(O.Chat,{className:w.chatList,ref:S,children:m.map((e,t)=>"User"===e.senderName?c.jsx(O.ChatMyMessage,{status:e.status,author:e.senderName,timestamp:e.timeStamp,children:e.message},t):c.jsx(O.ChatMessage,{decoration:"failed"===e.status?"important":void 0,avatar:c.jsx(x.Icon,{icon:"carbon:ibm-consulting-advantage-assistant",width:"32",height:"32",style:{color:p.tokens.colorBrandBackground}}),author:e.senderName,timestamp:e.timeStamp,children:T(e.message)},t))}),c.jsx("div",{className:w.inputContainer,children:c.jsx(cc,{context:l,value:f,onChange:_,placeholder:s,onSend:I,onAbort:P,theme:a,isRunning:b})})]})},exports.AISearchControl=({systemPromptTemplate:e,azureOpenAIConfig:t,placeholder:n="Ask AI to generate search query... (e.g., 'Find engineers in the Seattle office')",onSearchQueryGenerated:r,onSearchStart:o,onSearchError:i,disabled:a=!1,className:s,width:l})=>{const{error:c}=q(),{generateText:d,isConfigured:h}={generateText:async(e,t)=>(console.warn("useAzureOpenAI not implemented - add your Azure OpenAI implementation",{prompt:e,userInput:t}),"Azure OpenAI not configured - please provide configuration"),isConfigured:!1},[m,f]=u.useState(!1),[g,y]=u.useState(""),v=u.useRef(null),{searchBoxStyles:b,iconWrapperStyles:x}={searchBoxStyles:Yl`
|
|
137
137
|
border: 1px solid ${p.tokens.colorNeutralStroke2};
|
|
138
138
|
border-radius: 50px; /* Fully circular/pill shape */
|
|
139
139
|
background-color: ${p.tokens.colorNeutralBackground1};
|
|
@@ -192,10 +192,10 @@ var s=function(){function e(){}return e.generate=function(){var t=4294967295*Mat
|
|
|
192
192
|
box-shadow: none !important;
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
`,iconWrapperStyles:
|
|
195
|
+
`,iconWrapperStyles:Yl`
|
|
196
196
|
display: flex;
|
|
197
197
|
align-items: center;
|
|
198
198
|
padding: 2px;
|
|
199
199
|
margin-right: 8px;
|
|
200
|
-
`},C=u.useCallback(async e=>{if(e.trim()){return void(null==i||i("Azure OpenAI is not properly configured. Please check your configuration.",e.trim()))}},[d,e,r,o,i,c,h]),w=u.useCallback((e,t)=>{y(t.value)},[]),S=u.useCallback(()=>{var e;y(""),null==(e=v.current)||e.blur(),null==r||r("","")},[r]),k=u.useCallback(e=>{var t;"Enter"===e.key&&!m&&g.trim()?C(g).catch(e=>{console.error("Error in handleAISearch:",e)}):"Escape"===e.key&&(null==(t=v.current)||t.blur(),y(""),null==r||r("",""))},[C,m,g,r]);return Jl(p.SearchBox,{ref:v,css:b,className:s,style:{width:l},placeholder:n,value:g,onChange:w,onKeyDown:k,disabled:a||m,contentBefore:Jl("span",{css:x,children:Jl(tc,{size:20})}),dismiss:{onClick:S}})},exports.AISearchIcon=tc,exports.AISearchIconExample=()=>{const e=nc();return c.jsxs("div",{className:e.container,children:[c.jsx("h2",{children:"AI Search Icon Examples"}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Standard AI Search Icon"}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Small (16px):"}),c.jsx(tc,{size:16})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Medium (20px):"}),c.jsx(tc,{size:20})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Large (24px):"}),c.jsx(tc,{size:24})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Extra Large (32px):"}),c.jsx(tc,{size:32})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Custom Colors:"}),c.jsx(tc,{size:24,color:p.tokens.colorPaletteBlueForeground2,aiIndicatorColor:p.tokens.colorPaletteGreenForeground2})]})]}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Usage in Buttons"}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Primary Button:"}),c.jsx(p.Button,{appearance:"primary",icon:c.jsx(tc,{size:16}),children:"AI Search"})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Secondary Button:"}),c.jsx(p.Button,{appearance:"secondary",icon:c.jsx(tc,{size:16}),children:"Smart Search"})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Icon Only Button:"}),c.jsx(p.Button,{appearance:"subtle",icon:c.jsx(tc,{size:20}),title:"AI Search"})]})]}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Usage Example Code"}),c.jsx("pre",{className:e.codeBlock,children:"// Basic usage\nimport { AISearchIcon } from './AISearchIcon';\n\n// Standard icon with AI badge\n<AISearchIcon size={20} />\n\n// Icon with custom colors\n<AISearchIcon \n size={24} \n color={tokens.colorPaletteBlueForeground2}\n aiIndicatorColor={tokens.colorPaletteGreenForeground2}\n/>\n\n// In a button\n<Button \n appearance=\"primary\"\n icon={<AISearchIcon size={16} />}\n>\n AI Search\n</Button>"})]})]})},exports.AdaptiveCardHost=e=>{const t=u.useRef(null),n=u.useRef(null),r=u.useRef(null),o=u.useRef(null);u.useEffect(()=>{A.AdaptiveCard.onProcessMarkdown||(A.AdaptiveCard.onProcessMarkdown=(e,t)=>{t.outputHtml=(new W.default).render(e),t.didProcess=!0;try{t.outputHtml=(new W.default).render(e),t.didProcess=!0}catch(n){console.error("AdaptiveCardHost: Error parsing Markdown",n),t.didProcess=!1}})},[]),u.useEffect(()=>{n.current=null,n.current=new A.AdaptiveCard,r.current=new A.SerializationContext},[e]);const i=u.useCallback(t=>{if(e.onInvokeAction){let n={type:"",title:""};const r=t.getJsonTypeName();switch(r){case A.OpenUrlAction.JsonTypeName:{const e=t;n={type:r,title:e.title,url:e.url}}break;case A.SubmitAction.JsonTypeName:{const e=t;n={type:r,title:e.title,data:e.data}}break;case A.ExecuteAction.JsonTypeName:{const e=t;n={type:r,title:e.title,data:e.data,verb:e.verb}}break;default:n={type:r,title:"Unknown Action"}}e.onInvokeAction(n)}},[e.onInvokeAction]);return u.useEffect(()=>{let t,r=e.themeType;o.current=null,r||(r=jn.SharePoint),t=e.theme?e.theme:ps(r);const i=On(r,t),a=i.hostConfig;console.log("hostconfig:",a),o.current=t,n.current&&(n.current.hostConfig=i.hostConfig),e.onUpdateHostCapabilities&&e.onUpdateHostCapabilities(a.hostCapabilities)},[e]),u.useEffect(()=>{n.current&&(n.current.onExecuteAction=i)},[e,i]),u.useEffect(()=>{const t=new A.CardObjectRegistry,n=new A.CardObjectRegistry;var o;A.GlobalRegistry.populateWithDefaultElements(t),A.GlobalRegistry.populateWithDefaultActions(n),o=t,M.initializeIcons(),o.register("Input.Text",ns),o.register("Input.Number",Ya),o.register("Input.Time",ss),o.register("Input.Date",Ja),o.register("Input.Toggle",ds),o.register("Input.ChoiceSet",Fa),function(e){e.register("Action.Submit",Va),e.register("Action.OpenUrl",Da),e.register("Action.ShowCard",Oa),e.register("Action.ToggleVisibility",Ba),e.register("Action.Execute",Na)}(n),e.onSetCustomElements&&e.onSetCustomElements(t),e.onSetCustomActions&&e.onSetCustomActions(n);const i=r.current;i&&i.setElementRegistry(t),i&&i.setActionRegistry(n)},[e]),u.useEffect(()=>{for(var o;null==(o=null==t?void 0:t.current)?void 0:o.firstChild;)t.current.lastChild&&t.current.removeChild(t.current.lastChild);const i=t.current;if(!i)return;const a=n.current;try{const t=new D.Template(e.card),n=((e,t,n)=>{var r,o,i,a,s,l,c;let u,d;return d=n?{theme:t,aadInfo:(null==(r=null==n?void 0:n.pageContext)?void 0:r.aadInfo)?{instanceUrl:n.pageContext.aadInfo.instanceUrl||"",tenantId:n.pageContext.aadInfo.tenantId||"",userId:n.pageContext.aadInfo.userId||""}:void 0,cultureInfo:(null==(o=null==n?void 0:n.pageContext)?void 0:o.cultureInfo)?{currentCultureName:n.pageContext.cultureInfo.currentCultureName,currentUICultureName:n.pageContext.cultureInfo.currentUICultureName,isRightToLeft:n.pageContext.cultureInfo.isRightToLeft||!1}:void 0,userInfo:(null==(i=null==n?void 0:n.pageContext)?void 0:i.user)?{displayName:n.pageContext.user.displayName,email:n.pageContext.user.email,isAnonymousGuestUser:n.pageContext.user.isAnonymousGuestUser||!1,isExternalGuestUser:n.pageContext.user.isExternalGuestUser||!1,loginName:n.pageContext.user.loginName,preferUserTimeZone:n.pageContext.user.preferUserTimeZone||!1}:void 0,spListInfo:(null==(a=null==n?void 0:n.pageContext)?void 0:a.list)?{id:n.pageContext.list.id,serverRelativeUrl:n.pageContext.list.serverRelativeUrl||"",title:n.pageContext.list.title}:void 0,spListItemInfo:(null==(s=null==n?void 0:n.pageContext)?void 0:s.listItem)?{id:n.pageContext.listItem.id.toString()}:void 0,spSiteInfo:(null==(l=null==n?void 0:n.pageContext)?void 0:l.site)?{absoluteUrl:n.pageContext.site.absoluteUrl,cdnPrefix:n.pageContext.site.cdnPrefix||"",classification:n.pageContext.site.classification||"",correlationId:n.pageContext.site.correlationId||"",id:n.pageContext.site.id,isNoScriptEnabled:n.pageContext.site.isNoScriptEnabled||!1,recycleBinItemCount:n.pageContext.site.recycleBinItemCount||0,serverRelativeUrl:n.pageContext.site.serverRelativeUrl||"",serverRequestPath:n.pageContext.site.serverRequestPath||"",sitePagesEnabled:n.pageContext.site.sitePagesEnabled||!1}:void 0,spWebInfo:(null==(c=null==n?void 0:n.pageContext)?void 0:c.web)?{absoluteUrl:n.pageContext.web.absoluteUrl,id:n.pageContext.web.id,isAppWeb:n.pageContext.web.isAppWeb||!1,language:n.pageContext.web.language||0,languageName:n.pageContext.web.languageName||"",logoUrl:n.pageContext.web.logoUrl||"",serverRelativeUrl:n.pageContext.web.serverRelativeUrl||"",templateName:n.pageContext.web.templateName||"",title:n.pageContext.web.title,description:n.pageContext.web.description||""}:void 0}:{theme:t},u=e?{$root:{...null==e?void 0:e.$root,"@context":d}}:{$root:{"@context":d}},u})(e.data??{$root:{}},ps(e.themeType??jn.SharePoint),e.context),o=t.expand(n);if(a&&a.parse(o,r.current??void 0),a){const e=a.render();e&&e.outerHTML!==i.innerHTML&&e.outerHTML!==i.innerHTML&&(i.innerHTML="",i.appendChild(e))}}catch(s){e.onError&&e.onError(s)}},[e,ps]),c.jsx(p.IdPrefixProvider,{value:"adaptiveCardHost",children:c.jsx(p.FluentProvider,{theme:o.current?o.current:ps(e.themeType??jn.SharePoint),children:c.jsx("div",{ref:t,className:`${e.className?e.className:""}`,style:e.style})})})},exports.AppDashboard=({cards:e,containerWidth:t,containerHeight:n="100%",maxSpanRows:r=4,enableDragAndDrop:o=!0,enableCache:i=!0,cacheKeyPrefix:a="app-dashboard",onCardsReorder:s,onCardResize:l})=>{const d={dashboardContainer:g.css({display:"grid",padding:"20px",gap:"16px",backgroundColor:p.tokens.colorNeutralBackground2,gridTemplateColumns:"repeat(auto-fill, minmax(350px, 1fr))",gridAutoRows:"350px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2},justifyContent:"center",gridAutoFlow:"dense"}),cardBody:g.css({display:"flex",flexDirection:"column",height:"100%",minHeight:"320px"}),chartContainer:g.css({flex:1,width:"100%",minHeight:"280px"}),cardDescription:g.css({color:`${p.tokens.colorNeutralForeground2}`}),cardWrapper:g.css({position:"relative",height:"100%",minHeight:"300px",borderRadius:p.tokens.borderRadiusMedium,transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:`${p.tokens.shadow16}`},"&:active":{transform:"translateY(0)",boxShadow:`${p.tokens.shadow8}`}})},h=`${a}-layout-settings`,m=`${a}-card-order`,{getCachedData:f,setCachedData:y}=X(),v=u.useCallback(e=>f(e),[f]),b=u.useCallback((e,t)=>y(e,t,43200),[y]),{getCachedData:x,setCachedData:C}=X(),w=u.useCallback(e=>x(e),[x]),S=u.useCallback((e,t)=>C(e,t,43200),[C]),[k,P]=u.useState([]),[E,A]=u.useState({}),I=u.useRef(null),_=u.useRef(null),T=u.useRef(null);u.useEffect(()=>{(async()=>{try{let t=e,n={};if(i){const[r,o]=await Promise.all([v(h),w(m)]);if(o&&o.length>0){const n=new Map(e.map(e=>[e.id,e])),r=o.filter(e=>n.has(e)),i=e.filter(e=>!o.includes(e.id));t=[...r.map(e=>n.get(e)),...i]}e.forEach(e=>{var t,o;const i=null==r?void 0:r[e.id];n[e.id]={spanCols:(null==i?void 0:i.spanCols)??(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==i?void 0:i.spanRows)??(null==(o=e.defaultSpan)?void 0:o.spanRows)??1}})}else e.forEach(e=>{var t,r;n[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(r=e.defaultSpan)?void 0:r.spanRows)??1}});P(t),A(n)}catch(t){console.warn("Failed to load dashboard data from cache:",t),P(e);const n={};e.forEach(e=>{var t,r;n[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(r=e.defaultSpan)?void 0:r.spanRows)??1}}),A(n)}})()},[e,i,h,m,v,w]),u.useEffect(()=>{if(!i||0===Object.keys(E).length)return;(async()=>{try{await b(h,E)}catch(e){console.warn("Failed to save dashboard layout to cache:",e)}})()},[E,i,h,b]),u.useEffect(()=>{if(!i||0===k.length)return;(async()=>{try{const e=k.map(e=>e.id);await S(m,e)}catch(e){console.warn("Failed to save dashboard order to cache:",e)}})()},[k,i,m,S]),u.useEffect(()=>{t<=600&&A(()=>{const e={};return k.forEach(t=>{e[t.id]={spanCols:1,spanRows:1}}),e})},[t,k]);const j=u.useMemo(()=>t>600,[t]),{minCardWidth:M,gridGap:N,containerPadding:D}=u.useMemo(()=>({minCardWidth:350,gridGap:16,containerPadding:20}),[]),O=t-2*D,V=u.useMemo(()=>Math.floor((O+N)/(M+N)),[O,N,M]),B=Math.max(V,1),R=u.useCallback(()=>{if(null!==I.current&&null!==_.current&&I.current!==_.current){const e=[...k],[t]=e.splice(I.current,1);e.splice(_.current,0,t),P(e),s&&s(e)}I.current=null,_.current=null},[k,s]),z=u.useCallback((e,t)=>{const n={spanCols:Math.min(Math.max(t.spanCols,1),B),spanRows:Math.min(Math.max(t.spanRows,1),r)};A(t=>({...t,[e]:n})),l&&l(e,n)},[B,r,l]),L=u.useMemo(()=>k.reduce((e,t)=>{var n,r;return e[t.id]={spanCols:Math.min((null==(n=t.defaultSpan)?void 0:n.spanCols)??1,V),spanRows:(null==(r=t.defaultSpan)?void 0:r.spanRows)??1},e},{}),[k,V]),H=u.useMemo(()=>k.map((e,t)=>{var i,a,s,l;const u=!1!==e.showZoom&&j,h=e.headerAction||(u?c.jsx(Cc,{values:E[e.id]||L[e.id]||{spanCols:1,spanRows:1},maxCols:B,maxRows:r,IsOpen:!1,onChange:t=>z(e.id,t)}):void 0);return c.jsx("div",{className:d.cardWrapper,draggable:o,onDragStart:()=>o&&(I.current=t),onDragEnter:()=>o&&(_.current=t),onDragOver:e=>o&&e.preventDefault(),onDragEnd:o?R:void 0,style:{gridColumnEnd:(null==(i=E[e.id])?void 0:i.spanCols)?`span ${E[e.id].spanCols}`:`span ${(null==(a=L[e.id])?void 0:a.spanCols)||1}`,gridRowEnd:(null==(s=E[e.id])?void 0:s.spanRows)?`span ${E[e.id].spanRows}`:`span ${(null==(l=L[e.id])?void 0:l.spanRows)||1}`,cursor:o?"grab":"default"},children:c.jsxs(p.Card,{className:`${d.cardBody} ${e.className||""}`,children:[c.jsx(p.CardHeader,{header:c.jsxs(yt,{gap:"0px",children:[c.jsx(p.Text,{weight:"semibold",size:400,children:e.cardTitle}),e.cardDescription&&c.jsx(p.Text,{className:d.cardDescription,size:200,children:e.cardDescription})]}),action:h}),c.jsx("div",{className:d.chartContainer,style:{height:n,...e.style},children:e.content})]})},e.id)}),[k,o,R,E,d.cardBody,d.cardDescription,d.chartContainer,d.cardWrapper,j,B,r,z,n,L]);return 0===k.length?c.jsx(xc,{}):c.jsx("div",{ref:T,className:d.dashboardContainer,style:{height:n},children:H})},exports.AspectRatio=({ratio:e,children:t,maxWidth:n,maxHeight:r,style:o={},...i})=>{const a={position:"relative",width:"100%",paddingTop:100/e+"%",maxWidth:n||"none",maxHeight:r||"none",...o};return c.jsx("div",{style:a,...i,children:c.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:t})})},exports.Breadcrumb=({items:e,maxWidth:t="100%",styles:n,theme:r,size:o="medium",currentIndex:i=e.length-1,className:a})=>{const{styles:s,getStyles:l}=Pt(),d=u.useRef(null),[h,m]=u.useState([]),[g,y]=u.useState([]);return u.useEffect(()=>{const t=()=>{if(!d.current)return;const t=d.current.offsetWidth;let n=0;const r=[],o=[];e.forEach(e=>{n+80<=t-50?(r.push(e),n+=80):o.push(e)}),m(r),y(o)},n=((e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}})(t,100),r=new f.ResizeObserver(()=>{n()});return d.current&&r.observe(d.current),t(),()=>{r.disconnect()}},[e]),c.jsx("div",{ref:d,className:p.mergeClasses(s.container,a),style:{maxWidth:t,...n},children:c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",children:[h.map((e,t)=>c.jsxs(c.Fragment,{children:[t===i?c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",columnGap:5,styles:{overflow:"hidden"},children:[e.icon?u.cloneElement(e.icon,{style:{fontSize:"large"===o?"20px":"medium"===o?"16px":"12px"}}):null,c.jsx(p.Text,{className:p.mergeClasses(s.breadcrumbItem,l(e,o),l(e,"current")),"aria-current":"page",children:e.label},e.label)]}):c.jsx(p.Button,{icon:e.icon?e.icon:null,appearance:"transparent",className:`${s.breadcrumbItem}`,onClick:e.onClick,children:c.jsx(p.Text,{className:l(e,o),children:e.label})},e.label),t<h.length-1&&c.jsx(v.ChevronRightRegular,{style:{fontSize:"large"===o?"20px":"medium"===o?"16px":"12px"}})]})),g.length>0&&c.jsx(Et,{items:g,theme:r})]})})},exports.ButtonMenu=kt,exports.CalendarControl=({events:e,height:t=800,theme:n,onDayChange:r,onMonthChange:o,onWeekChange:i,onViewChange:a,onDaySlotClick:s,defaultView:l,strings:d})=>{const{styles:m}=Mt(),g=u.useRef(null),[y,v]=u.useState(null),b=u.useRef(0),[x,C]=u.useState(new Date),[w,S]=u.useState(l??Yt.Month),{getMonthCalendar:k}=Jt(Intl.DateTimeFormat().resolvedOptions().timeZone),P=L.useCallback(e=>{const t=e.getMonth(),n=h.startOfMonth(e),r=h.startOfWeek(n);return Array.from({length:42},(e,n)=>{const o=h.addDays(r,n);return{day:o.getDate(),currentMonth:o.getMonth()===t,date:o}})},[42]),E=L.useCallback(e=>{o&&o(e),C(e)},[o]),A=L.useCallback(e=>{r&&r(e),C(e)},[r]),I=L.useCallback(e=>{i&&i(e),C(e)},[i]),_=L.useCallback(e=>{a&&a(e),S(e)},[a]),T=L.useCallback(t=>{var n;const{date:r}=t;return(null==(n=k(e,x.getFullYear(),x.getMonth())[h.format(r,"yyyy-MM-dd")])?void 0:n.flatMap(e=>e))||[]},[x,e]),j=L.useCallback(()=>{g.current&&requestAnimationFrame(()=>{if(g.current){const e=g.current.querySelector(`.${m.calendarWrapper} > div:nth-child(8)`);e&&(v(e.offsetHeight),b.current=e.offsetHeight)}})},[m.calendarWrapper]);u.useEffect(()=>{const e=new f.ResizeObserver(j);return g.current&&e.observe(g.current),j(),window.addEventListener("resize",j),()=>{e.disconnect(),window.removeEventListener("resize",j)}},[j,w]),u.useEffect(()=>{S(l||Yt.Month)},[l]);const M=L.useCallback(()=>{switch(w){case Yt.Month:return c.jsx(hn,{events:e,currentDate:x,rowHeight:y,getCalendarDays:P,getEventsForDay:T,styles:m,onDaySlotClick:s,height:t,calendarRef:g,strings:null==d?void 0:d.calendarControl});case Yt.Week:return c.jsx(mn,{events:e,currentDay:x,height:t,strings:null==d?void 0:d.weekView});case Yt.Day:return c.jsx(fn,{events:e,currentDay:x,height:t,strings:null==d?void 0:d.dayView});default:return c.jsx(hn,{events:e,currentDate:x,rowHeight:y,getCalendarDays:P,getEventsForDay:T,styles:m,onDaySlotClick:s,height:t,calendarRef:g,strings:null==d?void 0:d.calendarControl})}},[w,e,x,y,P,T,m,s,t]);return c.jsx(p.IdPrefixProvider,{value:"calendarControl-",children:c.jsx(p.FluentProvider,{theme:n??p.webLightTheme,style:{width:"100%"},children:c.jsxs(st,{height:"100%",verticalAlign:"start",children:[c.jsx(cn,{selectedView:w,onSelectedView:_,currentDate:x,setCurrentDate:C,onWeekChange:I,onMonthChange:E,onDayChange:A,strings:null==d?void 0:d.toolbar}),c.jsx(M,{})]})})})},exports.CalendarMonth=tn,exports.Card=tt,exports.Carousel=e=>{const{className:t,items:n,title:r}=e,o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0),{carouselStyles:u}=ht(e),[d,h]=y(),m=mt(),{enableControls:g,embla__slide:b,embla__container:x,embla__viewport:C,embla__buttons:w}=pt(0,i),{prevBtnDisabled:S,nextBtnDisabled:k,onPrevButtonClick:P,onNextButtonClick:E}=dt(h);return L.useEffect(()=>{let e;return o.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;a(e),l(n)}}),a(o.current.clientWidth),l(o.current.clientHeight),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsxs("div",{id:"-carousel",className:p.mergeClasses(t,"embla"),style:{...u(i,s)},ref:o,children:[c.jsxs("div",{className:g,children:[c.jsx(p.Subtitle2,{className:m.titleStyles,children:r}),c.jsxs("div",{className:w,children:[c.jsx(p.Button,{onClick:P,disabled:S,appearance:"subtle",icon:c.jsx(v.ChevronLeftRegular,{})}),c.jsx(p.Button,{onClick:E,disabled:k,appearance:"subtle",icon:c.jsx(v.ChevronRightRegular,{})})]})]}),c.jsx("div",{className:C,ref:d,children:c.jsx("div",{className:x,children:n.map((e,t)=>c.jsx("div",{className:b,children:e},t))})})]})})},exports.Center=ct,exports.ChatInput=oc,exports.ChatInputWithMensions=lc,exports.ChatInputWithMensionsV1=({context:e,onChange:t,value:n,placeholder:r,onSend:o,theme:i=p.webLightTheme,isRunning:a,onAbort:s})=>{const[l,d]=u.useState(n||""),[h,m]=u.useState(!1),f=u.useRef(null),[g,y]=u.useState({top:0,left:0}),[v,b]=u.useState([]),x=u.useRef({}),C=sc();u.useEffect(()=>{var e;null==(e=f.current)||e.focus(),d(n||"")},[n]);const w=u.useCallback(Ke(async t=>{const n=await(async t=>{var n,r;if(x.current[t])return x.current[t];if(!(null==e?void 0:e.graphClient))return console.warn("Graph client not available"),[];try{const o=t&&t.length>0?`/users?$filter=startswith(displayName,'${t}')`:"/users?$orderby=displayName&$top=10",i=await e.graphClient.get(o),a=(null==i?void 0:i.value)||[],s=(null==(r=null==(n=e.pageContext)?void 0:n.web)?void 0:r.absoluteUrl)||"";return a.forEach(e=>{e.avatar=s?`${s}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail}`:`https://graph.microsoft.com/v1.0/users/${e.id}/photo/$value`}),x.current[t]=a,a}catch(o){return console.error("Error fetching users from Graph:",o),[]}})(t);n.sort((e,t)=>e.displayName.localeCompare(t.displayName)),b(n),m(!0),setTimeout(()=>{var e;null==(e=f.current)||e.focus()},0)},300),[e]),S=e=>{var n;const r=l.replace(/@(\w*)$/,`@${e} `);d(r),t&&t(r),m(!1),b([]),null==(n=f.current)||n.focus()},k=u.useCallback(({users:e})=>c.jsxs("div",{className:C.listContainer,children:[0===e.length&&c.jsx(p.Caption1,{children:"No users found"}),e.map(e=>c.jsx(p.Card,{size:"small",appearance:"subtle",onMouseDown:e=>e.preventDefault(),onClick:()=>S(e.mail),children:c.jsx(p.Persona,{name:e.displayName,role:"gridcell",secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[C.listContainer,S]);return c.jsxs(st,{horizontal:!0,width:"100%",className:C.inputContainer,children:[c.jsx(oc,{ref:f,onSend:o,value:l,onChange:async e=>{var n;d(e),t&&t(e),null==(n=f.current)||n.focus();const r=e.lastIndexOf("@");if(-1===r||0!==r&&" "!==e[r-1])m(!1);else{const t=e.slice(r+1);await w(t);const n=f.current;if(n){const e=V(n,r),t=n.getBoundingClientRect(),o=t.top+e.top+22,i=t.left+e.left+16;y({top:o,left:i})}}},theme:i,placeholder:r,isRunning:a,onAbort:s}),c.jsxs(ft,{theme:i,anchorPoint:g,isOpen:h,onClose:()=>m(!1),excludeRefs:[f],children:[c.jsx(p.CardHeader,{header:c.jsx(p.Body1Strong,{className:C.sugestionsHeader,children:"Sugestions"})}),c.jsx(p.Divider,{}),c.jsx(k,{users:v})]})]})},exports.Container=e=>{const{className:t,children:n,style:r,alignItems:o="center",justifyContent:i="center",flexDirection:a="row",centerContent:s=!0}=e,l=L.useRef(null),[u,d]=L.useState(0),[p,h]=L.useState(0),{containerStyles:g}=ut(e),y=L.useMemo(()=>m.debounce(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;d(e),h(n)}},200),[]);return L.useEffect(()=>{const e=new f.ResizeObserver(e=>{y(e)});return l.current&&e.observe(l.current),()=>{e.disconnect(),y.cancel()}},[y]),c.jsx("div",{id:"container",className:t,style:{...g(u,p),display:"flex",justifyContent:i,alignItems:o,flexDirection:a,...r},ref:l,children:s?c.jsx(ct,{children:n}):n})},exports.CustomControlBar=({items:e,selectedItemId:t,onSelectedItem:n,renderControl:r,theme:o})=>{const i={container:g.css({display:"flex",flexWrap:"nowrap",minWidth:0,overflow:"hidden",gap:10,marginBottom:20,width:"100%"}),text1LineStyle:g.css({display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),button:g.css({cursor:"pointer",minWidth:107})},a=L.useCallback(e=>{n&&n(e)},[n]);return c.jsx(p.Overflow,{children:c.jsxs(p.FluentProvider,{theme:o,children:[" ",c.jsxs("div",{className:p.mergeClasses(i.container),children:[e.map(e=>{const n=e.id===t;return c.jsx(p.OverflowItem,{id:e.id,priority:n?2:1,children:r(e,n,()=>a(e.id))},e.id)}),c.jsx(In,{items:e,onSelectedItem:a,theme:o})," "]})]})})},exports.DataGrid=e=>{const{items:t,columns:n,defaultSelectedItems:r=[],enableSorting:o=!1,selectionMode:i="none",onSelectionChange:a,onSortChange:s,defaultSortState:l,columnSizingOptions:u,enableResizing:d=!1,noItemsMessage:h,isLoadingData:m,isLoadingDataMessage:f,dataGridBodyClassName:g,dataGridBodyStyles:y,refreshData:v}=e,b=e=>t.findIndex(t=>t===e),[x,C]=L.useState(new Set(r.map(e=>b(e)))),w=L.useRef(null),{styles:S}=vn();L.useEffect(()=>{r.length>0&&C(new Set(r.map(e=>b(e))))},[r,t]),L.useEffect(()=>{v&&C(new Set)},[v]);const k=n.map(e=>p.createTableColumn({columnId:e.column,renderHeaderCell:()=>c.jsx(p.Body1Strong,{children:e.header}),renderCell:t=>c.jsx(p.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[null==e?void 0:e.column]??"")}),compare:e.order})),P=L.useCallback((e,t)=>{e.stopPropagation(),"row"===i&&a&&a([t])},[i,a]),E=L.useMemo(()=>"row"===i?S.rowSelection:"",[i,S.rowSelection]),A=L.useCallback(()=>c.jsx(p.DataGridBody,{style:y??{},className:g??"",children:({item:e,rowId:t})=>c.jsx(p.DataGridRow,{className:E,onClick:t=>P(t,e),children:({renderCell:t})=>c.jsx(p.DataGridCell,{children:t(e)})},t)}),[P,E,y,g]),I=L.useMemo(()=>t.length&&!m,[t,m]),_=L.useCallback(()=>m?c.jsx(c.Fragment,{children:f??c.jsx(yn,{direction:"vertical",gap:"s",justifyContent:"center",alignItems:"center",style:{height:"100%",minHeight:200,width:"100%"},children:c.jsx(p.Spinner,{})})}):I?c.jsx(A,{}):m||t.length?c.jsx(c.Fragment,{}):c.jsx("div",{children:h}),[I,m,t,h]);return c.jsx("div",{ref:w,children:c.jsxs(p.DataGrid,{as:"div",items:t,onSelectionChange:(e,n)=>{const r=new Set;if(n.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||r.add(t)}),C(r),a){const e=Array.from(r).map(e=>t[e]);a(e)}},sortable:o,columns:k,selectionMode:"none"===i||"row"===i?void 0:"multiple"===i?"multiselect":"single"===i?"single":void 0,selectedItems:x,defaultSortState:l,onSortChange:(e,t)=>{s&&s(t)},columnSizingOptions:u,resizableColumns:d,resizableColumnsOptions:{autoFitColumns:!1},children:[c.jsx(p.DataGridHeader,{children:c.jsx(p.DataGridRow,{children:({renderHeaderCell:e})=>c.jsx(p.DataGridHeaderCell,{children:e()})})}),c.jsx(_,{})]})})},exports.DataGridV2=xn,exports.DropdownField=({options:e,onChange:t,renderItem:n,validate:r,label:o,placeholder:i,message:a,messageType:s,required:l,size:d,hint:h})=>{const[m,f]=u.useState(""),[g,y]=u.useState(""),b=L.useMemo(()=>g?"error":"warning"===s?"warning":"info"===s?"success":"none",[g,s]),x=L.useMemo(()=>g||a,[g,a]),C=L.useCallback(()=>{switch(b){case"error":return c.jsx(v.ErrorCircle12Filled,{});case"warning":return c.jsx(v.Warning12Filled,{});case"success":return c.jsx(v.CheckmarkCircle12Filled,{});default:return null}},[b]);return c.jsx(p.Field,{label:o,required:l,validationMessage:x,validationMessageIcon:C(),size:d,hint:h,validationState:b,children:c.jsx(p.Dropdown,{placeholder:i,onChange:(e,n)=>{const o=(null==n?void 0:n.value)||"";f(o);const i=r?r(o):"";y(i),!i&&t&&t(o)},value:m,children:e.map(e=>c.jsxs(p.Option,{value:e.value,disabled:e.disabled,checkIcon:e.checkIcon,as:e.as,text:e.text||"",children:[n&&n(e)," "]},e.value))})})},exports.EBreakPoints=$,exports.ECalendarViews=Yt,exports.EMessageType=U,exports.GenericOverFlowMenu=({items:e,renderItem:t,keyExtractor:n})=>{const{ref:r,overflowCount:o,isOverflowing:i}=p.useOverflowMenu();return i?c.jsxs(p.Menu,{children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsxs(p.MenuButton,{ref:r,children:["+",o," items"]})}),c.jsx(p.MenuPopover,{children:c.jsx(p.MenuList,{children:e.map(e=>c.jsx(_n,{id:n(e),children:t(e)},n(e)))})})]}):null},exports.Grid=e=>{const{children:t,className:n}=e,{gridStyles:r}=nt(e),o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0);return L.useEffect(()=>{let e;return o.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;a(e),l(n)}}),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsx("div",{className:n,style:r(i,s),ref:o,children:t})})},exports.Layout=e=>{const{className:t,children:n,layoutConfig:r=ot}=e,o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0),{rootStyles:u,layoutGridStyles:d}=rt({...e,layoutConfig:r}),h=((e,t)=>{let n;return L.useCallback((...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)},[e,t])})((e,t)=>{a(e),l(t)},200);return L.useEffect(()=>{if(!o.current)return;const e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;h(e,n)}});return e.observe(o.current),()=>e.disconnect()},[h]),c.jsx("div",{id:"-Layout",className:p.mergeClasses(t,d),style:{...u(i,s),gridTemplateAreas:r.areas.join(" "),gridTemplateColumns:r.columns,gridTemplateRows:r.rows},ref:o,children:L.Children.map(n,(e,t)=>{var n;if(L.isValidElement(e)){const r=e;return c.jsx("div",{style:{gridArea:(null==(n=r.props)?void 0:n.area)??`area-${t}`},children:e},t)}return e})})},exports.LayoutItem=e=>{const{area:t,children:n}=e;return c.jsx(c.Fragment,{children:c.jsx("div",{style:{gridArea:t},children:n})})},exports.ListItemActivityMessage=({siteId:e,listId:t,itemId:n,currentUserEmail:r,strings:o,context:i})=>{var a,s,l,d,p,h,m,f,g,y,b;const{getItemActivities:x}=(e=>{const t=G(),n=e||t,r=null==n?void 0:n.graphClient;return{getItemActivities:u.useCallback(async(e,t,n)=>{if(!r)return console.warn("Graph client not available for SharePoint activities"),{activities:[]};try{const o=await r.get(`/sites/${e}/lists/${t}/items/${n}/getActivitiesByInterval(startDateTime='',endDateTime='',interval='')`);return o&&o.value?{activities:o.value.map(e=>({action:e.action||{},actor:e.actor||{},times:e.times||{}}))}:{activities:[]}}catch(o){throw console.error("Error fetching SharePoint activities:",o),o}},[r])}})(i),C=new Map([["access",{message:(null==o?void 0:o.access)||(null==(a=vc.get("access"))?void 0:a.message)||"",icon:c.jsx(v.OpenRegular,{style:gc})}],["comment",{message:(null==o?void 0:o.comment)||(null==(s=vc.get("comment"))?void 0:s.message)||"",icon:c.jsx(v.CommentRegular,{style:gc})}],["create",{message:(null==o?void 0:o.create)||(null==(l=vc.get("create"))?void 0:l.message)||"",icon:c.jsx(v.AddRegular,{style:gc})}],["delete",{message:(null==o?void 0:o.delete)||(null==(d=vc.get("delete"))?void 0:d.message)||"",icon:c.jsx(v.DeleteRegular,{style:gc})}],["edit",{message:(null==o?void 0:o.edit)||(null==(p=vc.get("edit"))?void 0:p.message)||"",icon:c.jsx(v.EditRegular,{style:gc})}],["mention",{message:(null==o?void 0:o.mention)||(null==(h=vc.get("mention"))?void 0:h.message)||"",icon:c.jsx(v.MentionRegular,{style:gc})}],["move",{message:(null==o?void 0:o.move)||(null==(m=vc.get("move"))?void 0:m.message)||"",icon:c.jsx(v.ArrowMoveRegular,{style:gc})}],["rename",{message:(null==o?void 0:o.rename)||(null==(f=vc.get("rename"))?void 0:f.message)||"",icon:c.jsx(v.RenameRegular,{style:gc})}],["restore",{message:(null==o?void 0:o.restore)||(null==(g=vc.get("restore"))?void 0:g.message)||"",icon:c.jsx(v.ArrowSyncRegular,{style:gc})}],["share",{message:(null==o?void 0:o.share)||(null==(y=vc.get("share"))?void 0:y.message)||"",icon:c.jsx(v.PeopleRegular,{style:gc})}],["version",{message:(null==o?void 0:o.version)||(null==(b=vc.get("version"))?void 0:b.message)||"",icon:c.jsx(v.HistoryRegular,{style:gc})}]]),[w,S]=L.useState({message:"",icon:c.jsx(c.Fragment,{})}),[k,P]=L.useState(!0),E=L.useRef(void 0),A=L.useRef(void 0),[I]=L.useState(30),_=L.useCallback(e=>e.user.email===r,[r]),T=L.useCallback(e=>{if(!e)return{message:"",icon:c.jsx(c.Fragment,{})};const{action:t,actor:n}=e,{displayName:r}=(null==n?void 0:n.user)||{displayName:""},o=yc.find(e=>t[e]);if(o){const e=C.get(o);if(e){return{message:`${_(n)?"You":r} ${e.message}`,icon:e.icon}}}return{message:"",icon:c.jsx(c.Fragment,{})}},[C,_]);return L.useEffect(()=>{var e;null==(e=A.current)||e.setPlaybackRate(I/100)},[I,k]),L.useEffect(()=>{let r=!1;const o=async(i=1e3)=>{var a;if(e&&t&&n)try{const o=await x(e,t,n);if(r)return;const i=o.activities[0];E.current&&JSON.stringify(E.current)===JSON.stringify(i)||(E.current=i,S(T(i)))}catch(s){if(429===s.status){const e=null==(a=s.headers)?void 0:a.get("Retry-After"),t=e?1e3*parseInt(e,10):i;return console.warn(`Throttled. Retrying after ${t}ms`),void setTimeout(()=>o(2*t),t)}console.error("Activity Error",s)}finally{r||P(!1)}},i=setTimeout(()=>{o()},1e3);return()=>{clearTimeout(i),r=!0}},[e,t,n,x,T]),c.jsx(B.Fade,{imperativeRef:A,visible:!k,children:c.jsx("div",{children:c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"center",RowGap:4,columnGap:4,children:[w.icon," ",w.message]})})})},exports.LivePersona=pc,exports.Mensions=ac,exports.MensionsExample=({context:e})=>{const[t,n]=u.useState(""),[r,o]=u.useState(""),i=u.useRef(null),a=u.useRef(null);return c.jsxs(st,{RowGap:20,children:[c.jsxs("div",{children:[c.jsx("h3",{children:"Input with @ mentions"}),c.jsx(p.Input,{ref:i,value:t,onChange:(e,t)=>n(t.value),placeholder:"Type @ to mention someone..."}),c.jsx(ac,{context:e,inputValue:t,parentRef:i,mentionChars:["@"],onUserSelect:(e,r)=>{const o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(\\w*)$`),a=t.replace(o,`${r}${e.displayName} `);n(a),setTimeout(()=>{var e;null==(e=i.current)||e.focus()},0)},theme:p.webLightTheme,suggestionsHeader:"Mention User",maxSuggestions:8})]}),c.jsxs("div",{children:[c.jsx("h3",{children:"Textarea with @ and # mentions"}),c.jsx(p.Textarea,{ref:a,value:r,onChange:(e,t)=>o(t.value),placeholder:"Type @ to mention someone or # for tags...",rows:4}),c.jsx(ac,{context:e,inputValue:r,parentRef:a,mentionChars:["@","#"],onUserSelect:(e,t)=>{const n=new RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(\\w*)$`),i=r.replace(n,`${t}${e.displayName} `);o(i),setTimeout(()=>{var e;null==(e=a.current)||e.focus()},0)},theme:p.webLightTheme,suggestionsHeader:"Select User or Tag",maxSuggestions:10,userFilter:(e,t)=>{var n;return e.displayName.toLowerCase().includes(t.toLowerCase())||((null==(n=e.mail)?void 0:n.toLowerCase().includes(t.toLowerCase()))??!1)}})]})]})},exports.Popup=ft,exports.RenderAdaptiveCard=({card:e,data:t})=>{const n=u.useRef(null);return u.useEffect(()=>{if(!n.current)return;n.current.innerHTML="";const r=new D.Template(e).expand({$root:t}),o=new F.AdaptiveCard;null==o||o.parse(r);const i=o.render();i&&n.current.appendChild(i)},[e,t]),c.jsx("div",{ref:n})},exports.RenderDialog=wn,exports.RenderDrawer=e=>{const{isOpen:t,onOpenChange:n,title:r,headerActions:o,footerActions:i,size:a,separator:s,type:l,style:u,children:d,position:p,classNameHeader:h="",classNameBody:m="",classNameFooter:f=""}=e;return c.jsx(c.Fragment,{children:c.jsxs(P.Drawer,{type:l,separator:s,open:t,onOpenChange:(e,t)=>{n&&n(t.open)},size:a,style:u,position:p,children:[c.jsx(P.DrawerHeader,{className:h,children:c.jsx(P.DrawerHeaderTitle,{style:{width:"100%"},action:o,children:r})}),c.jsx(P.DrawerBody,{className:m,children:d}),c.jsx(P.DrawerFooter,{className:f,children:i})]})})},exports.RenderHeader=e=>{const{onDismiss:t,title:n,description:r,icon:o,showCloseButton:i=!0}=e,a=Sn();return c.jsx(c.Fragment,{children:c.jsxs("div",{id:"RenderHedaermain",className:a.renderHeaderContent,children:[c.jsxs("div",{className:a.renderHeaderHeader,children:[c.jsx(p.Button,{style:{display:i?"block":"none"},appearance:"subtle",className:a.closeButton,onClick:e=>{e.stopPropagation(),e.preventDefault(),t(!1)},icon:c.jsx(v.Dismiss24Regular,{})}),c.jsxs("div",{className:a.renderHeaderTitleContainer,children:[L.isValidElement(o)?o:c.jsx(x.Icon,{icon:o}),c.jsxs("div",{className:a.dialogTitleAndDescriptionContainer,children:[L.isValidElement(n)?n:c.jsx(p.Subtitle1,{className:a.renderHeaderTitle,children:n}),L.isValidElement(r)?r:c.jsx(p.Caption1,{className:a.renderHeaderDescription,children:r})]})]})]}),c.jsx("div",{className:a.divider})]})})},exports.RenderLabel=bt,exports.RenderSpinner=e=>{const{size:t,label:n,labelPosition:r,style:o,className:i}=e,a=xt();return c.jsx("div",{className:a.root,children:c.jsx(p.Spinner,{style:o,className:p.mergeClasses(a.spinner,i),size:t,label:n,labelPosition:r})})},exports.SelectDay=Kt,exports.SelectMonth=nn,exports.SelectView=({onChange:e,defaultKey:t,label:n,options:r=[]})=>{const[o,i]=u.useState(()=>r.map(e=>({...e,selected:e.key===(t??"status")})));u.useEffect(()=>{const t=o.find(e=>e.selected);t&&e(t.key)},[]);const a=u.useCallback(t=>{const n=o.map(e=>({...e,selected:e.key===t.key}));i(n),e(t.key)},[o,e]);return c.jsxs(yt,{gap:"s",alignItems:"center",children:[n&&c.jsx(p.Label,{children:n}),c.jsx(kt,{options:o,onSelected:a,styles:{width:220}})]})},exports.SelectWeek=sn,exports.ShareDialog=({isOpen:e,options:t,onClose:n})=>{const[r,o]=u.useState(void 0);console.log(r);const i=u.useRef(null),[a,s]=u.useState(400),{siteUrl:l,listId:d,itemId:p,name:h}=t,m=u.useCallback(()=>{n()},[n]),f=u.useCallback(e=>{if(e.origin!==window.location.origin)return;console.log("Message from iframe:",e.data);const{name:t,height:n}=JSON.parse(e.data);switch(t){case"share_dismiss":m();break;case"share_resize":s(n)}},[m]);return u.useEffect(()=>(window.addEventListener("message",f),()=>{window.removeEventListener("message",f)}),[f]),u.useEffect(()=>{if(e){const e="sharePoint",t=0,n="",r=(new Date).getTime(),i=!1,a=encodeURIComponent(window.location.origin),s=encodeURIComponent(h),c=`${l}/_layouts/15/sharedialog.aspx?listId=${d}&listItemId=${p}&clientId=${e}&policyTip=${t}&folderColor=${n}&clickTime=${r}&ma=0&fullScreenMode=${i}&itemName= ${s}&channelId=&origin=${a}`;console.log(c),o(c)}else o(void 0)},[e,l,d,p]),c.jsx(wn,{isOpen:e,onDismiss:m,maxHeight:"fit-content",children:c.jsx("iframe",{ref:i,src:r||"",style:{width:"100%",height:a,border:"none"},onLoad:()=>console.log("Iframe loaded")})})},exports.ShowError=({title:e,message:t})=>{const n=kn();return c.jsx(p.Card,{className:n.container,children:c.jsxs(yt,{gap:"l",alignItems:"center",children:[c.jsx(v.ErrorCircleRegular,{className:n.icon}),c.jsxs(yt,{gap:"s",alignItems:"center",children:[c.jsx(p.Title3,{className:n.title,children:e}),c.jsx(p.Body1,{className:n.message,children:t})]})]})})},exports.ShowMessage=En,exports.Space=e=>{const t=L.useRef(null),[n,r]=L.useState(0),{spaceStyles:o}=it(e);return L.useEffect(()=>{let e;return t.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e}=t.contentRect;r(e)}}),e.observe(t.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsx("div",{id:"-space",style:o(n),ref:t})})},exports.Stack=st,exports.StackItem=e=>{const{children:t,grow:n,disableShrink:r,shrink:o,order:i,alignSelf:a,verticalFill:s}=e,{getBaseStyles:l}=Z(),u=L.useRef(null),[d,p]=L.useState(0),[h,m]=L.useState(0),g=l(e,d,h);L.useEffect(()=>{let e;return u.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;p(e),m(n)}}),e.observe(u.current)),()=>{e&&e.disconnect()}},[]);const y={...g,alignSelf:a,order:i,height:s?"100%":"auto",flexGrow:n?"boolean"==typeof n?1:n:void 0,flexShrink:r||!n&&!o?0:1,minWidth:0,minHeight:0,width:"auto"};return c.jsx(c.Fragment,{children:c.jsx("div",{ref:u,style:y,children:t})})},exports.StackV2=yt,exports.StackedUsers=({users:e,maxVisible:t=5,avatarSize:n=32,showHoverCard:r=!0,context:o,className:i,layout:a="stack",overflowText:s})=>{const l={container:g.css({display:"flex",alignItems:"center",gap:"4px"}),stackLayout:g.css({"& > *:not(:first-child)":{marginLeft:"-8px"}}),spreadLayout:g.css({display:"flex",flexDirection:"row",gap:"8px","& > *":{marginLeft:"0"}}),userCardWrapper:g.css({position:"relative",zIndex:1,transition:"transform 0.2s ease, z-index 0.2s ease","&:hover":{transform:"scale(1.1)",zIndex:10}}),overflowButton:g.css({backgroundColor:p.tokens.colorNeutralBackground1,border:`2px solid ${p.tokens.colorNeutralStroke1}`,borderRadius:"50%",color:p.tokens.colorNeutralForeground1,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:600,minWidth:"32px",minHeight:"32px",position:"relative",zIndex:1,transition:"all 0.2s ease","&:hover":{backgroundColor:p.tokens.colorNeutralBackground1Hover,zIndex:10}}),popover:g.css({maxWidth:"300px",padding:"12px"}),popoverUserList:g.css({display:"flex",flexDirection:"column",gap:"8px"}),popoverUserCard:g.css({padding:"4px",borderRadius:"4px",transition:"background-color 0.2s ease","&:hover":{backgroundColor:p.tokens.colorNeutralBackground1Hover}})},{visibleUsers:d,overflowUsers:h}=u.useMemo(()=>{if(!e||0===e.length)return{visibleUsers:[],overflowUsers:[]};return{visibleUsers:e.slice(0,t),overflowUsers:e.slice(t)}},[e,t]),m=u.useMemo(()=>s||`+${h.length}`,[s,h.length]);return e&&0!==e.length?o?c.jsxs(yt,{direction:"horizontal",alignItems:"start",gap:"stack"===a?"4px":"12px",className:`${"stack"===a?l.stackLayout:l.spreadLayout} ${i||""}`,children:[d.map((e,t)=>c.jsx("div",{className:l.userCardWrapper,children:c.jsx(fc,{userId:e.id,avatarSize:n,showHoverCard:r??!0,context:o,avatarOnly:!0})},`user-${e.id||t}`)),h.length>0&&c.jsxs(p.Popover,{withArrow:!0,children:[c.jsx(p.PopoverTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.Button,{className:l.overflowButton,style:{width:`${n}px`,height:`${n}px`,fontSize:n>40?"14px":"12px"},appearance:"subtle",children:m})}),c.jsx(p.PopoverSurface,{className:l.popover,children:c.jsx("div",{className:l.popoverUserList,children:h.map((e,t)=>c.jsx("div",{className:l.popoverUserCard,children:c.jsx(fc,{userId:e.id,avatarSize:32,showHoverCard:r??!0,context:o,textPosition:"after",avatarOnly:!1})},`overflow-user-${e.id||t}`))})})]})]}):(console.warn("StackedUsers: context is required to display user cards"),null):null},exports.TypographyControl=e=>{const{fontSize:t,fontWeight:n,numberOfLines:r,as:o,padding:i,paddingTop:a,paddingBottom:s,paddingLeft:l,paddingRight:u,margin:d,marginTop:h,marginBottom:m,marginLeft:f,marginRight:y,children:v,style:b,className:x,color:C,block:w,truncate:S,wrap:k}=e,P=g.css({color:C,fontSize:t&&Ct[t]?Ct[t]:t,fontWeight:n&&St[n]?St[n]:n,display:r?"-webkit-box":void 0,WebkitBoxOrient:"vertical",overflow:r?"hidden":void 0,WebkitLineClamp:r,padding:i&&wt[i]?wt[i]:i,paddingTop:a&&wt[a]?wt[a]:a,paddingBottom:s&&wt[s]?wt[s]:s,paddingLeft:l&&wt[l]?wt[l]:l,paddingRight:u&&wt[u]?wt[u]:u,margin:d&&wt[d]?wt[d]:d,marginTop:h&&wt[h]?wt[h]:h,marginBottom:m&&wt[m]?wt[m]:m,marginLeft:f&&wt[f]?wt[f]:f,marginRight:y&&wt[y]?wt[y]:y,...b});return c.jsx(p.Text,{as:o,className:p.mergeClasses(x,P),block:w,truncate:S,wrap:k,children:v})},exports.UniversalProvider=({context:e,children:t})=>c.jsx(J.Provider,{value:e,children:t}),exports.UserCard=fc,exports.VideoPlayer=e=>{const{url:t,controls:n=!0,width:r="100%",height:o="100%",loop:i=!1,muted:a=!1}=e,[s,l]=u.useState(!1),d=Tn(e);return c.jsxs("div",{className:d.videoPlayerContainer,children:[c.jsx(E,{url:t,controls:n,width:r,height:o,playing:s,loop:i,muted:a,onPause:()=>l(!1),onPlay:()=>l(!0),className:d.reactPlayer}),!s&&c.jsx(p.Button,{className:p.mergeClasses(d.playButton),onClick:()=>{l(!s)},children:"►"})]})},exports.cloneDeep=function e(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array)return t.map(t=>e(t));if(t instanceof Object){const n={};for(const r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}return t},exports.debounce=Ke,exports.defaultCalendarControlStrings=pn,exports.defaultCalendarMonthStrings=en,exports.defaultSelectWeekStrings=rn,exports.every=function(e,t){return e.every(t)},exports.filter=function(e,t){return e.filter(t)},exports.get=function(e,t,n){const r=Array.isArray(t)?t:t.split(".");let o=e;for(const i of r){if(null==o)return n;o=o[i]}return void 0===o?n:o},exports.groupBy=function(e,t){return e.reduce((e,n)=>{const r=String(t(n));return e[r]||(e[r]=[]),e[r].push(n),e},{})},exports.isEmpty=function(e){return null==e||("string"==typeof e||Array.isArray(e)?0===e.length:"object"==typeof e&&0===Object.keys(e).length)},exports.map=function(e,t){return e.map(t)},exports.set=function(e,t,n){const r=Array.isArray(t)?t:t.split("."),o=r.pop();if(!o)return e;let i=e;for(const a of r)a in i&&"object"==typeof i[a]||(i[a]={}),i=i[a];return i[o]=n,e},exports.some=function(e,t){return e.some(t)},exports.throttle=function(e,t=0){let n=null,r=0;return function(...o){const i=this,a=Date.now();r||(r=a);const s=t-(a-r);s<=0||s>t?(n&&(clearTimeout(n),n=null),r=a,e.apply(i,o)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e.apply(i,o)},s))}},exports.uniq=function(e){return Array.from(new Set(e))},exports.uniqBy=function(e,t){const n=new Set;return e.filter(e=>{const r=t(e);return!n.has(r)&&(n.add(r),!0)})},exports.useApplicationContext=G,exports.useAspectRatioStyles=e=>{const{styles:t}=e,{getBaseStyles:n}=Z();return{aspectRatioStyles:L.useCallback((r,o)=>({...n(e,r,o),...t}),[n,e,t])}},exports.useCalendar=Jt,exports.useCalendarStyles=Mt,exports.useCardStyles=et,exports.useCarouselStyles=pt,exports.useCarouselStylesMain=ht,exports.useCenterStyles=lt,exports.useComponentUtils=Z,exports.useContainerStyles=ut,exports.useDataGridStyles=vn,exports.useDateUtils=(e,t,n)=>{const{getFormatRelative:r,formatDate:o}=Ze(t,e);return{formatUtcDate:(e,t="PP")=>{const n=h.differenceInDays(new Date,h.parseISO(e));let i="";return void 0!==e&&(i=n>7?o(e,t):r(e)),i},formatTime:n=>n.toLocaleTimeString(e,{timeZone:t}),convertDateToUTC:n=>{const r="string"==typeof n?new Date(n):n,o=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(r);let i,a,s,l,c,u;for(const e of o)switch(e.type){case"year":i=e.value;break;case"month":a=e.value;break;case"day":s=e.value;break;case"hour":l=e.value;break;case"minute":c=e.value;break;case"second":u=e.value}return new Date(`${i}-${a}-${s}T${l}:${c}:${u}Z`)}}},exports.useDayViewStyles=Gt,exports.useGraphAPI=()=>{const e=G(),t=null==e?void 0:e.graphClient;return{getUser:u.useCallback(async e=>{if(!t)return console.warn("Graph client not available"),null;try{return await t.get(`/users/${e}`)}catch(n){return console.error("Error fetching user:",n),null}},[t]),getCurrentUser:u.useCallback(async()=>{if(!t)return console.warn("Graph client not available"),null;try{return await t.get("/me")}catch(e){return console.error("Error fetching current user:",e),null}},[t]),searchUsers:u.useCallback(async(e,n=10)=>{if(!t)return console.warn("Graph client not available"),[];try{return(await t.get(`/users?$search="displayName:${e}" OR "mail:${e}"&$top=${n}`)).value||[]}catch(r){return console.error("Error searching users:",r),[]}},[t]),getUserPhoto:u.useCallback(async e=>{if(!t)return console.warn("Graph client not available"),null;try{const n=await t.get(`/users/${e}/photo/$value`);return URL.createObjectURL(n)}catch(n){return console.error("Error fetching user photo:",n),null}},[t]),graphClient:t}},exports.useGridStyles=nt,exports.useImageUtils=()=>{const e=u.useCallback(async e=>{const t=await fetch(e).then(e=>e.text());return"data:image/svg+xml;base64,"+btoa(t)},[]),t=u.useCallback(async(e,t,n)=>new Promise((r,o)=>{const i=new Image;i.crossOrigin="anonymous",i.addEventListener("load",()=>{var e;const a=document.createElement("canvas");let s;a.width=t??i.width,a.height=n??i.height,null==(e=null==a?void 0:a.getContext("2d"))||e.drawImage(i,0,0,t??i.width,n??i.height);try{s=a.toDataURL("image/png",1),r(s)}catch(l){Qe&&console.error(`[ImageService.getBase64Image]: Err='${l.message}'`),o(l)}}),i.addEventListener("error",e=>{Qe&&console.error(`[ImageService.getBase64Image]: Image load error='${e.message}'`),o(e)}),i.src=e}),[]),n=u.useCallback(e=>!m.isEmpty(e)&&e.indexOf("data:image/")>=0,[]);return{getBase64ImageFromDOMImg:u.useCallback(e=>{try{const t=document.getElementById(e),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const r=n.getContext("2d");null==r||r.drawImage(t,0,0);return n.toDataURL("image/png")}catch(t){return void(Qe&&console.error(`[getBase64ImageFromDOMImg]: Err='${t.message}'`))}},[]),isBase64Image:n,getImageBase64:t,base64FromSVGUrl:e}},exports.useIndexedDBCache=X,exports.useLayoutStyles=rt,exports.useLogging=q,exports.useMensionsStyles=ic,exports.usePolling=Y,exports.usePrevNextButtons=dt,exports.useRenderHeaderStyles=Sn,exports.useShowErrorStyles=kn,exports.useShowMessageStyles=Pn,exports.useSpaceStyles=it,exports.useStackStyles=at,exports.useStyles=()=>({inputContainer:g.css({marginTop:"auto",marginLeft:"auto","::after":{content:'""',position:"absolute",bottom:0,left:0,right:0,borderBottom:"2px solid transparent",pointerEvents:"none",borderRadius:p.tokens.borderRadiusMedium}}),listContainer:g.css({maxHeight:"400px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),sugestionsHeader:g.css({color:p.tokens.colorBrandBackground})}),exports.useTimeZoneHelper=()=>{const e=G(),t=u.useMemo(()=>Intl.DateTimeFormat().resolvedOptions().timeZone,[]);return{timeZone:t,convertToUserTimeZone:(e,n)=>{const r=n||t;return d.toZonedTime(e,r)},convertFromUserTimeZone:(e,n)=>{const r=n||t;return d.fromZonedTime(e,r)},formatInTimeZone:(e,n,r)=>{const o=r||t;return d.format(d.toZonedTime(e,o),n,{timeZone:o})},getUserTimeZone:()=>{var n,r;return null==(r=null==(n=null==e?void 0:e.pageContext)?void 0:n.user)||r.preferUserTimeZone,t}}},exports.useUtils=At,exports.useVideoStyles=Tn,exports.useWeekViewStyles=Ot;
|
|
200
|
+
`},C=u.useCallback(async e=>{if(e.trim()){return void(null==i||i("Azure OpenAI is not properly configured. Please check your configuration.",e.trim()))}},[d,e,r,o,i,c,h]),w=u.useCallback((e,t)=>{y(t.value)},[]),S=u.useCallback(()=>{var e;y(""),null==(e=v.current)||e.blur(),null==r||r("","")},[r]),k=u.useCallback(e=>{var t;"Enter"===e.key&&!m&&g.trim()?C(g).catch(e=>{console.error("Error in handleAISearch:",e)}):"Escape"===e.key&&(null==(t=v.current)||t.blur(),y(""),null==r||r("",""))},[C,m,g,r]);return Gl(p.SearchBox,{ref:v,css:b,className:s,style:{width:l},placeholder:n,value:g,onChange:w,onKeyDown:k,disabled:a||m,contentBefore:Gl("span",{css:x,children:Gl(nc,{size:20})}),dismiss:{onClick:S}})},exports.AISearchIcon=nc,exports.AISearchIconExample=()=>{const e=rc();return c.jsxs("div",{className:e.container,children:[c.jsx("h2",{children:"AI Search Icon Examples"}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Standard AI Search Icon"}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Small (16px):"}),c.jsx(nc,{size:16})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Medium (20px):"}),c.jsx(nc,{size:20})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Large (24px):"}),c.jsx(nc,{size:24})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Extra Large (32px):"}),c.jsx(nc,{size:32})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Custom Colors:"}),c.jsx(nc,{size:24,color:p.tokens.colorPaletteBlueForeground2,aiIndicatorColor:p.tokens.colorPaletteGreenForeground2})]})]}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Usage in Buttons"}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Primary Button:"}),c.jsx(p.Button,{appearance:"primary",icon:c.jsx(nc,{size:16}),children:"AI Search"})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Secondary Button:"}),c.jsx(p.Button,{appearance:"secondary",icon:c.jsx(nc,{size:16}),children:"Smart Search"})]}),c.jsxs("div",{className:e.iconRow,children:[c.jsx("span",{className:e.label,children:"Icon Only Button:"}),c.jsx(p.Button,{appearance:"subtle",icon:c.jsx(nc,{size:20}),title:"AI Search"})]})]}),c.jsxs("div",{className:e.section,children:[c.jsx("h3",{children:"Usage Example Code"}),c.jsx("pre",{className:e.codeBlock,children:"// Basic usage\nimport { AISearchIcon } from './AISearchIcon';\n\n// Standard icon with AI badge\n<AISearchIcon size={20} />\n\n// Icon with custom colors\n<AISearchIcon \n size={24} \n color={tokens.colorPaletteBlueForeground2}\n aiIndicatorColor={tokens.colorPaletteGreenForeground2}\n/>\n\n// In a button\n<Button \n appearance=\"primary\"\n icon={<AISearchIcon size={16} />}\n>\n AI Search\n</Button>"})]})]})},exports.AdaptiveCardHost=hs,exports.AppDashboard=({cards:e,containerWidth:t,containerHeight:n="100%",maxSpanRows:r=4,enableDragAndDrop:o=!0,enableCache:i=!0,cacheKeyPrefix:a="app-dashboard",onCardsReorder:s,onCardResize:l})=>{const d={dashboardContainer:g.css({display:"grid",padding:"20px",gap:"16px",backgroundColor:p.tokens.colorNeutralBackground2,gridTemplateColumns:"repeat(auto-fill, minmax(350px, 1fr))",gridAutoRows:"350px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2},justifyContent:"center",gridAutoFlow:"dense"}),cardBody:g.css({display:"flex",flexDirection:"column",height:"100%",minHeight:"320px"}),chartContainer:g.css({flex:1,width:"100%",minHeight:"280px"}),cardDescription:g.css({color:`${p.tokens.colorNeutralForeground2}`}),cardWrapper:g.css({position:"relative",height:"100%",minHeight:"300px",borderRadius:p.tokens.borderRadiusMedium,transition:"all 0.2s ease","&:hover":{transform:"translateY(-2px)",boxShadow:`${p.tokens.shadow16}`},"&:active":{transform:"translateY(0)",boxShadow:`${p.tokens.shadow8}`}})},h=`${a}-layout-settings`,m=`${a}-card-order`,{getCachedData:f,setCachedData:y}=X(),v=u.useCallback(e=>f(e),[f]),b=u.useCallback((e,t)=>y(e,t,43200),[y]),{getCachedData:x,setCachedData:C}=X(),w=u.useCallback(e=>x(e),[x]),S=u.useCallback((e,t)=>C(e,t,43200),[C]),[k,P]=u.useState([]),[E,A]=u.useState({}),I=u.useRef(null),_=u.useRef(null),T=u.useRef(null);u.useEffect(()=>{(async()=>{try{let t=e,n={};if(i){const[r,o]=await Promise.all([v(h),w(m)]);if(o&&o.length>0){const n=new Map(e.map(e=>[e.id,e])),r=o.filter(e=>n.has(e)),i=e.filter(e=>!o.includes(e.id));t=[...r.map(e=>n.get(e)),...i]}e.forEach(e=>{var t,o;const i=null==r?void 0:r[e.id];n[e.id]={spanCols:(null==i?void 0:i.spanCols)??(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==i?void 0:i.spanRows)??(null==(o=e.defaultSpan)?void 0:o.spanRows)??1}})}else e.forEach(e=>{var t,r;n[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(r=e.defaultSpan)?void 0:r.spanRows)??1}});P(t),A(n)}catch(t){console.warn("Failed to load dashboard data from cache:",t),P(e);const n={};e.forEach(e=>{var t,r;n[e.id]={spanCols:(null==(t=e.defaultSpan)?void 0:t.spanCols)??1,spanRows:(null==(r=e.defaultSpan)?void 0:r.spanRows)??1}}),A(n)}})()},[e,i,h,m,v,w]),u.useEffect(()=>{if(!i||0===Object.keys(E).length)return;(async()=>{try{await b(h,E)}catch(e){console.warn("Failed to save dashboard layout to cache:",e)}})()},[E,i,h,b]),u.useEffect(()=>{if(!i||0===k.length)return;(async()=>{try{const e=k.map(e=>e.id);await S(m,e)}catch(e){console.warn("Failed to save dashboard order to cache:",e)}})()},[k,i,m,S]),u.useEffect(()=>{t<=600&&A(()=>{const e={};return k.forEach(t=>{e[t.id]={spanCols:1,spanRows:1}}),e})},[t,k]);const j=u.useMemo(()=>t>600,[t]),{minCardWidth:M,gridGap:N,containerPadding:D}=u.useMemo(()=>({minCardWidth:350,gridGap:16,containerPadding:20}),[]),O=t-2*D,V=u.useMemo(()=>Math.floor((O+N)/(M+N)),[O,N,M]),B=Math.max(V,1),R=u.useCallback(()=>{if(null!==I.current&&null!==_.current&&I.current!==_.current){const e=[...k],[t]=e.splice(I.current,1);e.splice(_.current,0,t),P(e),s&&s(e)}I.current=null,_.current=null},[k,s]),z=u.useCallback((e,t)=>{const n={spanCols:Math.min(Math.max(t.spanCols,1),B),spanRows:Math.min(Math.max(t.spanRows,1),r)};A(t=>({...t,[e]:n})),l&&l(e,n)},[B,r,l]),L=u.useMemo(()=>k.reduce((e,t)=>{var n,r;return e[t.id]={spanCols:Math.min((null==(n=t.defaultSpan)?void 0:n.spanCols)??1,V),spanRows:(null==(r=t.defaultSpan)?void 0:r.spanRows)??1},e},{}),[k,V]),H=u.useMemo(()=>k.map((e,t)=>{var i,a,s,l;const u=!1!==e.showZoom&&j,h=e.headerAction||(u?c.jsx(wc,{values:E[e.id]||L[e.id]||{spanCols:1,spanRows:1},maxCols:B,maxRows:r,IsOpen:!1,onChange:t=>z(e.id,t)}):void 0);return c.jsx("div",{className:d.cardWrapper,draggable:o,onDragStart:()=>o&&(I.current=t),onDragEnter:()=>o&&(_.current=t),onDragOver:e=>o&&e.preventDefault(),onDragEnd:o?R:void 0,style:{gridColumnEnd:(null==(i=E[e.id])?void 0:i.spanCols)?`span ${E[e.id].spanCols}`:`span ${(null==(a=L[e.id])?void 0:a.spanCols)||1}`,gridRowEnd:(null==(s=E[e.id])?void 0:s.spanRows)?`span ${E[e.id].spanRows}`:`span ${(null==(l=L[e.id])?void 0:l.spanRows)||1}`,cursor:o?"grab":"default"},children:c.jsxs(p.Card,{className:`${d.cardBody} ${e.className||""}`,children:[c.jsx(p.CardHeader,{header:c.jsxs(yt,{gap:"0px",children:[c.jsx(p.Text,{weight:"semibold",size:400,children:e.cardTitle}),e.cardDescription&&c.jsx(p.Text,{className:d.cardDescription,size:200,children:e.cardDescription})]}),action:h}),c.jsx("div",{className:d.chartContainer,style:{height:n,...e.style},children:e.content})]})},e.id)}),[k,o,R,E,d.cardBody,d.cardDescription,d.chartContainer,d.cardWrapper,j,B,r,z,n,L]);return 0===k.length?c.jsx(Cc,{}):c.jsx("div",{ref:T,className:d.dashboardContainer,style:{height:n},children:H})},exports.AspectRatio=({ratio:e,children:t,maxWidth:n,maxHeight:r,style:o={},...i})=>{const a={position:"relative",width:"100%",paddingTop:100/e+"%",maxWidth:n||"none",maxHeight:r||"none",...o};return c.jsx("div",{style:a,...i,children:c.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:"100%"},children:t})})},exports.Breadcrumb=({items:e,maxWidth:t="100%",styles:n,theme:r,size:o="medium",currentIndex:i=e.length-1,className:a})=>{const{styles:s,getStyles:l}=Pt(),d=u.useRef(null),[h,m]=u.useState([]),[g,y]=u.useState([]);return u.useEffect(()=>{const t=()=>{if(!d.current)return;const t=d.current.offsetWidth;let n=0;const r=[],o=[];e.forEach(e=>{n+80<=t-50?(r.push(e),n+=80):o.push(e)}),m(r),y(o)},n=((e,t)=>{let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)}})(t,100),r=new f.ResizeObserver(()=>{n()});return d.current&&r.observe(d.current),t(),()=>{r.disconnect()}},[e]),c.jsx("div",{ref:d,className:p.mergeClasses(s.container,a),style:{maxWidth:t,...n},children:c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",children:[h.map((e,t)=>c.jsxs(c.Fragment,{children:[t===i?c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"start",columnGap:5,styles:{overflow:"hidden"},children:[e.icon?u.cloneElement(e.icon,{style:{fontSize:"large"===o?"20px":"medium"===o?"16px":"12px"}}):null,c.jsx(p.Text,{className:p.mergeClasses(s.breadcrumbItem,l(e,o),l(e,"current")),"aria-current":"page",children:e.label},e.label)]}):c.jsx(p.Button,{icon:e.icon?e.icon:null,appearance:"transparent",className:`${s.breadcrumbItem}`,onClick:e.onClick,children:c.jsx(p.Text,{className:l(e,o),children:e.label})},e.label),t<h.length-1&&c.jsx(v.ChevronRightRegular,{style:{fontSize:"large"===o?"20px":"medium"===o?"16px":"12px"}})]})),g.length>0&&c.jsx(Et,{items:g,theme:r})]})})},exports.ButtonMenu=kt,exports.CalendarControl=({events:e,height:t=800,theme:n,onDayChange:r,onMonthChange:o,onWeekChange:i,onViewChange:a,onDaySlotClick:s,defaultView:l,strings:d})=>{const{styles:m}=Mt(),g=u.useRef(null),[y,v]=u.useState(null),b=u.useRef(0),[x,C]=u.useState(new Date),[w,S]=u.useState(l??Yt.Month),{getMonthCalendar:k}=Jt(Intl.DateTimeFormat().resolvedOptions().timeZone),P=L.useCallback(e=>{const t=e.getMonth(),n=h.startOfMonth(e),r=h.startOfWeek(n);return Array.from({length:42},(e,n)=>{const o=h.addDays(r,n);return{day:o.getDate(),currentMonth:o.getMonth()===t,date:o}})},[42]),E=L.useCallback(e=>{o&&o(e),C(e)},[o]),A=L.useCallback(e=>{r&&r(e),C(e)},[r]),I=L.useCallback(e=>{i&&i(e),C(e)},[i]),_=L.useCallback(e=>{a&&a(e),S(e)},[a]),T=L.useCallback(t=>{var n;const{date:r}=t;return(null==(n=k(e,x.getFullYear(),x.getMonth())[h.format(r,"yyyy-MM-dd")])?void 0:n.flatMap(e=>e))||[]},[x,e]),j=L.useCallback(()=>{g.current&&requestAnimationFrame(()=>{if(g.current){const e=g.current.querySelector(`.${m.calendarWrapper} > div:nth-child(8)`);e&&(v(e.offsetHeight),b.current=e.offsetHeight)}})},[m.calendarWrapper]);u.useEffect(()=>{const e=new f.ResizeObserver(j);return g.current&&e.observe(g.current),j(),window.addEventListener("resize",j),()=>{e.disconnect(),window.removeEventListener("resize",j)}},[j,w]),u.useEffect(()=>{S(l||Yt.Month)},[l]);const M=L.useCallback(()=>{switch(w){case Yt.Month:return c.jsx(hn,{events:e,currentDate:x,rowHeight:y,getCalendarDays:P,getEventsForDay:T,styles:m,onDaySlotClick:s,height:t,calendarRef:g,strings:null==d?void 0:d.calendarControl});case Yt.Week:return c.jsx(mn,{events:e,currentDay:x,height:t,strings:null==d?void 0:d.weekView});case Yt.Day:return c.jsx(fn,{events:e,currentDay:x,height:t,strings:null==d?void 0:d.dayView});default:return c.jsx(hn,{events:e,currentDate:x,rowHeight:y,getCalendarDays:P,getEventsForDay:T,styles:m,onDaySlotClick:s,height:t,calendarRef:g,strings:null==d?void 0:d.calendarControl})}},[w,e,x,y,P,T,m,s,t]);return c.jsx(p.IdPrefixProvider,{value:"calendarControl-",children:c.jsx(p.FluentProvider,{theme:n??p.webLightTheme,style:{width:"100%"},children:c.jsxs(st,{height:"100%",verticalAlign:"start",children:[c.jsx(cn,{selectedView:w,onSelectedView:_,currentDate:x,setCurrentDate:C,onWeekChange:I,onMonthChange:E,onDayChange:A,strings:null==d?void 0:d.toolbar}),c.jsx(M,{})]})})})},exports.CalendarMonth=tn,exports.Card=tt,exports.Carousel=e=>{const{className:t,items:n,title:r}=e,o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0),{carouselStyles:u}=ht(e),[d,h]=y(),m=mt(),{enableControls:g,embla__slide:b,embla__container:x,embla__viewport:C,embla__buttons:w}=pt(0,i),{prevBtnDisabled:S,nextBtnDisabled:k,onPrevButtonClick:P,onNextButtonClick:E}=dt(h);return L.useEffect(()=>{let e;return o.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;a(e),l(n)}}),a(o.current.clientWidth),l(o.current.clientHeight),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsxs("div",{id:"-carousel",className:p.mergeClasses(t,"embla"),style:{...u(i,s)},ref:o,children:[c.jsxs("div",{className:g,children:[c.jsx(p.Subtitle2,{className:m.titleStyles,children:r}),c.jsxs("div",{className:w,children:[c.jsx(p.Button,{onClick:P,disabled:S,appearance:"subtle",icon:c.jsx(v.ChevronLeftRegular,{})}),c.jsx(p.Button,{onClick:E,disabled:k,appearance:"subtle",icon:c.jsx(v.ChevronRightRegular,{})})]})]}),c.jsx("div",{className:C,ref:d,children:c.jsx("div",{className:x,children:n.map((e,t)=>c.jsx("div",{className:b,children:e},t))})})]})})},exports.Center=ct,exports.ChatInput=ic,exports.ChatInputWithMensions=cc,exports.ChatInputWithMensionsV1=({context:e,onChange:t,value:n,placeholder:r,onSend:o,theme:i=p.webLightTheme,isRunning:a,onAbort:s})=>{const[l,d]=u.useState(n||""),[h,m]=u.useState(!1),f=u.useRef(null),[g,y]=u.useState({top:0,left:0}),[v,b]=u.useState([]),x=u.useRef({}),C=lc();u.useEffect(()=>{var e;null==(e=f.current)||e.focus(),d(n||"")},[n]);const w=u.useCallback(Ke(async t=>{const n=await(async t=>{var n,r;if(x.current[t])return x.current[t];if(!(null==e?void 0:e.graphClient))return console.warn("Graph client not available"),[];try{const o=t&&t.length>0?`/users?$filter=startswith(displayName,'${t}')`:"/users?$orderby=displayName&$top=10",i=await e.graphClient.get(o),a=(null==i?void 0:i.value)||[],s=(null==(r=null==(n=e.pageContext)?void 0:n.web)?void 0:r.absoluteUrl)||"";return a.forEach(e=>{e.avatar=s?`${s}/_layouts/15/userphoto.aspx?size=S&accountname=${e.mail}`:`https://graph.microsoft.com/v1.0/users/${e.id}/photo/$value`}),x.current[t]=a,a}catch(o){return console.error("Error fetching users from Graph:",o),[]}})(t);n.sort((e,t)=>e.displayName.localeCompare(t.displayName)),b(n),m(!0),setTimeout(()=>{var e;null==(e=f.current)||e.focus()},0)},300),[e]),S=e=>{var n;const r=l.replace(/@(\w*)$/,`@${e} `);d(r),t&&t(r),m(!1),b([]),null==(n=f.current)||n.focus()},k=u.useCallback(({users:e})=>c.jsxs("div",{className:C.listContainer,children:[0===e.length&&c.jsx(p.Caption1,{children:"No users found"}),e.map(e=>c.jsx(p.Card,{size:"small",appearance:"subtle",onMouseDown:e=>e.preventDefault(),onClick:()=>S(e.mail),children:c.jsx(p.Persona,{name:e.displayName,role:"gridcell",secondaryText:e.mail,avatar:{image:{src:e.avatar}}})},e.id))]}),[C.listContainer,S]);return c.jsxs(st,{horizontal:!0,width:"100%",className:C.inputContainer,children:[c.jsx(ic,{ref:f,onSend:o,value:l,onChange:async e=>{var n;d(e),t&&t(e),null==(n=f.current)||n.focus();const r=e.lastIndexOf("@");if(-1===r||0!==r&&" "!==e[r-1])m(!1);else{const t=e.slice(r+1);await w(t);const n=f.current;if(n){const e=V(n,r),t=n.getBoundingClientRect(),o=t.top+e.top+22,i=t.left+e.left+16;y({top:o,left:i})}}},theme:i,placeholder:r,isRunning:a,onAbort:s}),c.jsxs(ft,{theme:i,anchorPoint:g,isOpen:h,onClose:()=>m(!1),excludeRefs:[f],children:[c.jsx(p.CardHeader,{header:c.jsx(p.Body1Strong,{className:C.sugestionsHeader,children:"Sugestions"})}),c.jsx(p.Divider,{}),c.jsx(k,{users:v})]})]})},exports.Container=e=>{const{className:t,children:n,style:r,alignItems:o="center",justifyContent:i="center",flexDirection:a="row",centerContent:s=!0}=e,l=L.useRef(null),[u,d]=L.useState(0),[p,h]=L.useState(0),{containerStyles:g}=ut(e),y=L.useMemo(()=>m.debounce(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;d(e),h(n)}},200),[]);return L.useEffect(()=>{const e=new f.ResizeObserver(e=>{y(e)});return l.current&&e.observe(l.current),()=>{e.disconnect(),y.cancel()}},[y]),c.jsx("div",{id:"container",className:t,style:{...g(u,p),display:"flex",justifyContent:i,alignItems:o,flexDirection:a,...r},ref:l,children:s?c.jsx(ct,{children:n}):n})},exports.CustomControlBar=({items:e,selectedItemId:t,onSelectedItem:n,renderControl:r,theme:o})=>{const i={container:g.css({display:"flex",flexWrap:"nowrap",minWidth:0,overflow:"hidden",gap:10,marginBottom:20,width:"100%"}),text1LineStyle:g.css({display:"-webkit-box",WebkitLineClamp:1,WebkitBoxOrient:"vertical",overflow:"hidden",textAlign:"start",textOverflow:"ellipsis",wordBreak:"break-word"}),button:g.css({cursor:"pointer",minWidth:107})},a=L.useCallback(e=>{n&&n(e)},[n]);return c.jsx(p.Overflow,{children:c.jsxs(p.FluentProvider,{theme:o,children:[" ",c.jsxs("div",{className:p.mergeClasses(i.container),children:[e.map(e=>{const n=e.id===t;return c.jsx(p.OverflowItem,{id:e.id,priority:n?2:1,children:r(e,n,()=>a(e.id))},e.id)}),c.jsx(In,{items:e,onSelectedItem:a,theme:o})," "]})]})})},exports.DataGrid=e=>{const{items:t,columns:n,defaultSelectedItems:r=[],enableSorting:o=!1,selectionMode:i="none",onSelectionChange:a,onSortChange:s,defaultSortState:l,columnSizingOptions:u,enableResizing:d=!1,noItemsMessage:h,isLoadingData:m,isLoadingDataMessage:f,dataGridBodyClassName:g,dataGridBodyStyles:y,refreshData:v}=e,b=e=>t.findIndex(t=>t===e),[x,C]=L.useState(new Set(r.map(e=>b(e)))),w=L.useRef(null),{styles:S}=vn();L.useEffect(()=>{r.length>0&&C(new Set(r.map(e=>b(e))))},[r,t]),L.useEffect(()=>{v&&C(new Set)},[v]);const k=n.map(e=>p.createTableColumn({columnId:e.column,renderHeaderCell:()=>c.jsx(p.Body1Strong,{children:e.header}),renderCell:t=>c.jsx(p.TableCellLayout,{media:e.media?e.media(t):void 0,className:null==e?void 0:e.className,style:null==e?void 0:e.style,children:e.onRender?e.onRender(t):String(t[null==e?void 0:e.column]??"")}),compare:e.order})),P=L.useCallback((e,t)=>{e.stopPropagation(),"row"===i&&a&&a([t])},[i,a]),E=L.useMemo(()=>"row"===i?S.rowSelection:"",[i,S.rowSelection]),A=L.useCallback(()=>c.jsx(p.DataGridBody,{style:y??{},className:g??"",children:({item:e,rowId:t})=>c.jsx(p.DataGridRow,{className:E,onClick:t=>P(t,e),children:({renderCell:t})=>c.jsx(p.DataGridCell,{children:t(e)})},t)}),[P,E,y,g]),I=L.useMemo(()=>t.length&&!m,[t,m]),_=L.useCallback(()=>m?c.jsx(c.Fragment,{children:f??c.jsx(yn,{direction:"vertical",gap:"s",justifyContent:"center",alignItems:"center",style:{height:"100%",minHeight:200,width:"100%"},children:c.jsx(p.Spinner,{})})}):I?c.jsx(A,{}):m||t.length?c.jsx(c.Fragment,{}):c.jsx("div",{children:h}),[I,m,t,h]);return c.jsx("div",{ref:w,children:c.jsxs(p.DataGrid,{as:"div",items:t,onSelectionChange:(e,n)=>{const r=new Set;if(n.selectedItems.forEach(e=>{const t=Number(e);isNaN(t)||r.add(t)}),C(r),a){const e=Array.from(r).map(e=>t[e]);a(e)}},sortable:o,columns:k,selectionMode:"none"===i||"row"===i?void 0:"multiple"===i?"multiselect":"single"===i?"single":void 0,selectedItems:x,defaultSortState:l,onSortChange:(e,t)=>{s&&s(t)},columnSizingOptions:u,resizableColumns:d,resizableColumnsOptions:{autoFitColumns:!1},children:[c.jsx(p.DataGridHeader,{children:c.jsx(p.DataGridRow,{children:({renderHeaderCell:e})=>c.jsx(p.DataGridHeaderCell,{children:e()})})}),c.jsx(_,{})]})})},exports.DataGridV2=xn,exports.DropdownField=({options:e,onChange:t,renderItem:n,validate:r,label:o,placeholder:i,message:a,messageType:s,required:l,size:d,hint:h})=>{const[m,f]=u.useState(""),[g,y]=u.useState(""),b=L.useMemo(()=>g?"error":"warning"===s?"warning":"info"===s?"success":"none",[g,s]),x=L.useMemo(()=>g||a,[g,a]),C=L.useCallback(()=>{switch(b){case"error":return c.jsx(v.ErrorCircle12Filled,{});case"warning":return c.jsx(v.Warning12Filled,{});case"success":return c.jsx(v.CheckmarkCircle12Filled,{});default:return null}},[b]);return c.jsx(p.Field,{label:o,required:l,validationMessage:x,validationMessageIcon:C(),size:d,hint:h,validationState:b,children:c.jsx(p.Dropdown,{placeholder:i,onChange:(e,n)=>{const o=(null==n?void 0:n.value)||"";f(o);const i=r?r(o):"";y(i),!i&&t&&t(o)},value:m,children:e.map(e=>c.jsxs(p.Option,{value:e.value,disabled:e.disabled,checkIcon:e.checkIcon,as:e.as,text:e.text||"",children:[n&&n(e)," "]},e.value))})})},exports.EBreakPoints=$,exports.ECalendarViews=Yt,exports.EMessageType=U,exports.GenericOverFlowMenu=({items:e,renderItem:t,keyExtractor:n})=>{const{ref:r,overflowCount:o,isOverflowing:i}=p.useOverflowMenu();return i?c.jsxs(p.Menu,{children:[c.jsx(p.MenuTrigger,{disableButtonEnhancement:!0,children:c.jsxs(p.MenuButton,{ref:r,children:["+",o," items"]})}),c.jsx(p.MenuPopover,{children:c.jsx(p.MenuList,{children:e.map(e=>c.jsx(_n,{id:n(e),children:t(e)},n(e)))})})]}):null},exports.Grid=e=>{const{children:t,className:n}=e,{gridStyles:r}=nt(e),o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0);return L.useEffect(()=>{let e;return o.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;a(e),l(n)}}),e.observe(o.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsx("div",{className:n,style:r(i,s),ref:o,children:t})})},exports.Layout=e=>{const{className:t,children:n,layoutConfig:r=ot}=e,o=L.useRef(null),[i,a]=L.useState(0),[s,l]=L.useState(0),{rootStyles:u,layoutGridStyles:d}=rt({...e,layoutConfig:r}),h=((e,t)=>{let n;return L.useCallback((...r)=>{clearTimeout(n),n=setTimeout(()=>e(...r),t)},[e,t])})((e,t)=>{a(e),l(t)},200);return L.useEffect(()=>{if(!o.current)return;const e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;h(e,n)}});return e.observe(o.current),()=>e.disconnect()},[h]),c.jsx("div",{id:"-Layout",className:p.mergeClasses(t,d),style:{...u(i,s),gridTemplateAreas:r.areas.join(" "),gridTemplateColumns:r.columns,gridTemplateRows:r.rows},ref:o,children:L.Children.map(n,(e,t)=>{var n;if(L.isValidElement(e)){const r=e;return c.jsx("div",{style:{gridArea:(null==(n=r.props)?void 0:n.area)??`area-${t}`},children:e},t)}return e})})},exports.LayoutItem=e=>{const{area:t,children:n}=e;return c.jsx(c.Fragment,{children:c.jsx("div",{style:{gridArea:t},children:n})})},exports.ListItemActivityMessage=({siteId:e,listId:t,itemId:n,currentUserEmail:r,strings:o,context:i})=>{var a,s,l,d,p,h,m,f,g,y,b;const{getItemActivities:x}=(e=>{const t=G(),n=e||t,r=null==n?void 0:n.graphClient;return{getItemActivities:u.useCallback(async(e,t,n)=>{if(!r)return console.warn("Graph client not available for SharePoint activities"),{activities:[]};try{const o=await r.get(`/sites/${e}/lists/${t}/items/${n}/getActivitiesByInterval(startDateTime='',endDateTime='',interval='')`);return o&&o.value?{activities:o.value.map(e=>({action:e.action||{},actor:e.actor||{},times:e.times||{}}))}:{activities:[]}}catch(o){throw console.error("Error fetching SharePoint activities:",o),o}},[r])}})(i),C=new Map([["access",{message:(null==o?void 0:o.access)||(null==(a=bc.get("access"))?void 0:a.message)||"",icon:c.jsx(v.OpenRegular,{style:yc})}],["comment",{message:(null==o?void 0:o.comment)||(null==(s=bc.get("comment"))?void 0:s.message)||"",icon:c.jsx(v.CommentRegular,{style:yc})}],["create",{message:(null==o?void 0:o.create)||(null==(l=bc.get("create"))?void 0:l.message)||"",icon:c.jsx(v.AddRegular,{style:yc})}],["delete",{message:(null==o?void 0:o.delete)||(null==(d=bc.get("delete"))?void 0:d.message)||"",icon:c.jsx(v.DeleteRegular,{style:yc})}],["edit",{message:(null==o?void 0:o.edit)||(null==(p=bc.get("edit"))?void 0:p.message)||"",icon:c.jsx(v.EditRegular,{style:yc})}],["mention",{message:(null==o?void 0:o.mention)||(null==(h=bc.get("mention"))?void 0:h.message)||"",icon:c.jsx(v.MentionRegular,{style:yc})}],["move",{message:(null==o?void 0:o.move)||(null==(m=bc.get("move"))?void 0:m.message)||"",icon:c.jsx(v.ArrowMoveRegular,{style:yc})}],["rename",{message:(null==o?void 0:o.rename)||(null==(f=bc.get("rename"))?void 0:f.message)||"",icon:c.jsx(v.RenameRegular,{style:yc})}],["restore",{message:(null==o?void 0:o.restore)||(null==(g=bc.get("restore"))?void 0:g.message)||"",icon:c.jsx(v.ArrowSyncRegular,{style:yc})}],["share",{message:(null==o?void 0:o.share)||(null==(y=bc.get("share"))?void 0:y.message)||"",icon:c.jsx(v.PeopleRegular,{style:yc})}],["version",{message:(null==o?void 0:o.version)||(null==(b=bc.get("version"))?void 0:b.message)||"",icon:c.jsx(v.HistoryRegular,{style:yc})}]]),[w,S]=L.useState({message:"",icon:c.jsx(c.Fragment,{})}),[k,P]=L.useState(!0),E=L.useRef(void 0),A=L.useRef(void 0),[I]=L.useState(30),_=L.useCallback(e=>e.user.email===r,[r]),T=L.useCallback(e=>{if(!e)return{message:"",icon:c.jsx(c.Fragment,{})};const{action:t,actor:n}=e,{displayName:r}=(null==n?void 0:n.user)||{displayName:""},o=vc.find(e=>t[e]);if(o){const e=C.get(o);if(e){return{message:`${_(n)?"You":r} ${e.message}`,icon:e.icon}}}return{message:"",icon:c.jsx(c.Fragment,{})}},[C,_]);return L.useEffect(()=>{var e;null==(e=A.current)||e.setPlaybackRate(I/100)},[I,k]),L.useEffect(()=>{let r=!1;const o=async(i=1e3)=>{var a;if(e&&t&&n)try{const o=await x(e,t,n);if(r)return;const i=o.activities[0];E.current&&JSON.stringify(E.current)===JSON.stringify(i)||(E.current=i,S(T(i)))}catch(s){if(429===s.status){const e=null==(a=s.headers)?void 0:a.get("Retry-After"),t=e?1e3*parseInt(e,10):i;return console.warn(`Throttled. Retrying after ${t}ms`),void setTimeout(()=>o(2*t),t)}console.error("Activity Error",s)}finally{r||P(!1)}},i=setTimeout(()=>{o()},1e3);return()=>{clearTimeout(i),r=!0}},[e,t,n,x,T]),c.jsx(B.Fade,{imperativeRef:A,visible:!k,children:c.jsx("div",{children:c.jsxs(st,{horizontal:!0,verticalAlign:"center",horizontalAlign:"center",RowGap:4,columnGap:4,children:[w.icon," ",w.message]})})})},exports.LivePersona=hc,exports.Mensions=sc,exports.MensionsExample=({context:e})=>{const[t,n]=u.useState(""),[r,o]=u.useState(""),i=u.useRef(null),a=u.useRef(null);return c.jsxs(st,{RowGap:20,children:[c.jsxs("div",{children:[c.jsx("h3",{children:"Input with @ mentions"}),c.jsx(p.Input,{ref:i,value:t,onChange:(e,t)=>n(t.value),placeholder:"Type @ to mention someone..."}),c.jsx(sc,{context:e,inputValue:t,parentRef:i,mentionChars:["@"],onUserSelect:(e,r)=>{const o=new RegExp(`${r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(\\w*)$`),a=t.replace(o,`${r}${e.displayName} `);n(a),setTimeout(()=>{var e;null==(e=i.current)||e.focus()},0)},theme:p.webLightTheme,suggestionsHeader:"Mention User",maxSuggestions:8})]}),c.jsxs("div",{children:[c.jsx("h3",{children:"Textarea with @ and # mentions"}),c.jsx(p.Textarea,{ref:a,value:r,onChange:(e,t)=>o(t.value),placeholder:"Type @ to mention someone or # for tags...",rows:4}),c.jsx(sc,{context:e,inputValue:r,parentRef:a,mentionChars:["@","#"],onUserSelect:(e,t)=>{const n=new RegExp(`${t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(\\w*)$`),i=r.replace(n,`${t}${e.displayName} `);o(i),setTimeout(()=>{var e;null==(e=a.current)||e.focus()},0)},theme:p.webLightTheme,suggestionsHeader:"Select User or Tag",maxSuggestions:10,userFilter:(e,t)=>{var n;return e.displayName.toLowerCase().includes(t.toLowerCase())||((null==(n=e.mail)?void 0:n.toLowerCase().includes(t.toLowerCase()))??!1)}})]})]})},exports.Popup=ft,exports.RenderAdaptiveCard=({card:e,data:t})=>{const n=u.useRef(null);return u.useEffect(()=>{if(!n.current)return;n.current.innerHTML="";const r=new D.Template(e).expand({$root:t}),o=new F.AdaptiveCard;null==o||o.parse(r);const i=o.render();i&&n.current.appendChild(i)},[e,t]),c.jsx("div",{ref:n})},exports.RenderDialog=wn,exports.RenderDrawer=e=>{const{isOpen:t,onOpenChange:n,title:r,headerActions:o,footerActions:i,size:a,separator:s,type:l,style:u,children:d,position:p,classNameHeader:h="",classNameBody:m="",classNameFooter:f=""}=e;return c.jsx(c.Fragment,{children:c.jsxs(P.Drawer,{type:l,separator:s,open:t,onOpenChange:(e,t)=>{n&&n(t.open)},size:a,style:u,position:p,children:[c.jsx(P.DrawerHeader,{className:h,children:c.jsx(P.DrawerHeaderTitle,{style:{width:"100%"},action:o,children:r})}),c.jsx(P.DrawerBody,{className:m,children:d}),c.jsx(P.DrawerFooter,{className:f,children:i})]})})},exports.RenderHeader=e=>{const{onDismiss:t,title:n,description:r,icon:o,showCloseButton:i=!0}=e,a=Sn();return c.jsx(c.Fragment,{children:c.jsxs("div",{id:"RenderHedaermain",className:a.renderHeaderContent,children:[c.jsxs("div",{className:a.renderHeaderHeader,children:[c.jsx(p.Button,{style:{display:i?"block":"none"},appearance:"subtle",className:a.closeButton,onClick:e=>{e.stopPropagation(),e.preventDefault(),t(!1)},icon:c.jsx(v.Dismiss24Regular,{})}),c.jsxs("div",{className:a.renderHeaderTitleContainer,children:[L.isValidElement(o)?o:c.jsx(x.Icon,{icon:o}),c.jsxs("div",{className:a.dialogTitleAndDescriptionContainer,children:[L.isValidElement(n)?n:c.jsx(p.Subtitle1,{className:a.renderHeaderTitle,children:n}),L.isValidElement(r)?r:c.jsx(p.Caption1,{className:a.renderHeaderDescription,children:r})]})]})]}),c.jsx("div",{className:a.divider})]})})},exports.RenderLabel=bt,exports.RenderSpinner=e=>{const{size:t,label:n,labelPosition:r,style:o,className:i}=e,a=xt();return c.jsx("div",{className:a.root,children:c.jsx(p.Spinner,{style:o,className:p.mergeClasses(a.spinner,i),size:t,label:n,labelPosition:r})})},exports.SelectDay=Kt,exports.SelectMonth=nn,exports.SelectView=({onChange:e,defaultKey:t,label:n,options:r=[]})=>{const[o,i]=u.useState(()=>r.map(e=>({...e,selected:e.key===(t??"status")})));u.useEffect(()=>{const t=o.find(e=>e.selected);t&&e(t.key)},[]);const a=u.useCallback(t=>{const n=o.map(e=>({...e,selected:e.key===t.key}));i(n),e(t.key)},[o,e]);return c.jsxs(yt,{gap:"s",alignItems:"center",children:[n&&c.jsx(p.Label,{children:n}),c.jsx(kt,{options:o,onSelected:a,styles:{width:220}})]})},exports.SelectWeek=sn,exports.ShareDialog=({isOpen:e,options:t,onClose:n})=>{const[r,o]=u.useState(void 0);console.log(r);const i=u.useRef(null),[a,s]=u.useState(400),{siteUrl:l,listId:d,itemId:p,name:h}=t,m=u.useCallback(()=>{n()},[n]),f=u.useCallback(e=>{if(e.origin!==window.location.origin)return;console.log("Message from iframe:",e.data);const{name:t,height:n}=JSON.parse(e.data);switch(t){case"share_dismiss":m();break;case"share_resize":s(n)}},[m]);return u.useEffect(()=>(window.addEventListener("message",f),()=>{window.removeEventListener("message",f)}),[f]),u.useEffect(()=>{if(e){const e="sharePoint",t=0,n="",r=(new Date).getTime(),i=!1,a=encodeURIComponent(window.location.origin),s=encodeURIComponent(h),c=`${l}/_layouts/15/sharedialog.aspx?listId=${d}&listItemId=${p}&clientId=${e}&policyTip=${t}&folderColor=${n}&clickTime=${r}&ma=0&fullScreenMode=${i}&itemName= ${s}&channelId=&origin=${a}`;console.log(c),o(c)}else o(void 0)},[e,l,d,p]),c.jsx(wn,{isOpen:e,onDismiss:m,maxHeight:"fit-content",children:c.jsx("iframe",{ref:i,src:r||"",style:{width:"100%",height:a,border:"none"},onLoad:()=>console.log("Iframe loaded")})})},exports.ShowError=({title:e,message:t})=>{const n=kn();return c.jsx(p.Card,{className:n.container,children:c.jsxs(yt,{gap:"l",alignItems:"center",children:[c.jsx(v.ErrorCircleRegular,{className:n.icon}),c.jsxs(yt,{gap:"s",alignItems:"center",children:[c.jsx(p.Title3,{className:n.title,children:e}),c.jsx(p.Body1,{className:n.message,children:t})]})]})})},exports.ShowMessage=En,exports.Space=e=>{const t=L.useRef(null),[n,r]=L.useState(0),{spaceStyles:o}=it(e);return L.useEffect(()=>{let e;return t.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e}=t.contentRect;r(e)}}),e.observe(t.current)),()=>{e&&e.disconnect()}},[]),c.jsx(c.Fragment,{children:c.jsx("div",{id:"-space",style:o(n),ref:t})})},exports.Stack=st,exports.StackItem=e=>{const{children:t,grow:n,disableShrink:r,shrink:o,order:i,alignSelf:a,verticalFill:s}=e,{getBaseStyles:l}=Z(),u=L.useRef(null),[d,p]=L.useState(0),[h,m]=L.useState(0),g=l(e,d,h);L.useEffect(()=>{let e;return u.current&&(e=new f.ResizeObserver(e=>{for(const t of e){const{width:e,height:n}=t.contentRect;p(e),m(n)}}),e.observe(u.current)),()=>{e&&e.disconnect()}},[]);const y={...g,alignSelf:a,order:i,height:s?"100%":"auto",flexGrow:n?"boolean"==typeof n?1:n:void 0,flexShrink:r||!n&&!o?0:1,minWidth:0,minHeight:0,width:"auto"};return c.jsx(c.Fragment,{children:c.jsx("div",{ref:u,style:y,children:t})})},exports.StackV2=yt,exports.StackedUsers=({users:e,maxVisible:t=5,avatarSize:n=32,showHoverCard:r=!0,context:o,className:i,layout:a="stack",overflowText:s})=>{const l={container:g.css({display:"flex",alignItems:"center",gap:"4px"}),stackLayout:g.css({"& > *:not(:first-child)":{marginLeft:"-8px"}}),spreadLayout:g.css({display:"flex",flexDirection:"row",gap:"8px","& > *":{marginLeft:"0"}}),userCardWrapper:g.css({position:"relative",zIndex:1,transition:"transform 0.2s ease, z-index 0.2s ease","&:hover":{transform:"scale(1.1)",zIndex:10}}),overflowButton:g.css({backgroundColor:p.tokens.colorNeutralBackground1,border:`2px solid ${p.tokens.colorNeutralStroke1}`,borderRadius:"50%",color:p.tokens.colorNeutralForeground1,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",fontWeight:600,minWidth:"32px",minHeight:"32px",position:"relative",zIndex:1,transition:"all 0.2s ease","&:hover":{backgroundColor:p.tokens.colorNeutralBackground1Hover,zIndex:10}}),popover:g.css({maxWidth:"300px",padding:"12px"}),popoverUserList:g.css({display:"flex",flexDirection:"column",gap:"8px"}),popoverUserCard:g.css({padding:"4px",borderRadius:"4px",transition:"background-color 0.2s ease","&:hover":{backgroundColor:p.tokens.colorNeutralBackground1Hover}})},{visibleUsers:d,overflowUsers:h}=u.useMemo(()=>{if(!e||0===e.length)return{visibleUsers:[],overflowUsers:[]};return{visibleUsers:e.slice(0,t),overflowUsers:e.slice(t)}},[e,t]),m=u.useMemo(()=>s||`+${h.length}`,[s,h.length]);return e&&0!==e.length?o?c.jsxs(yt,{direction:"horizontal",alignItems:"start",gap:"stack"===a?"4px":"12px",className:`${"stack"===a?l.stackLayout:l.spreadLayout} ${i||""}`,children:[d.map((e,t)=>c.jsx("div",{className:l.userCardWrapper,children:c.jsx(gc,{userId:e.id,avatarSize:n,showHoverCard:r??!0,context:o,avatarOnly:!0})},`user-${e.id||t}`)),h.length>0&&c.jsxs(p.Popover,{withArrow:!0,children:[c.jsx(p.PopoverTrigger,{disableButtonEnhancement:!0,children:c.jsx(p.Button,{className:l.overflowButton,style:{width:`${n}px`,height:`${n}px`,fontSize:n>40?"14px":"12px"},appearance:"subtle",children:m})}),c.jsx(p.PopoverSurface,{className:l.popover,children:c.jsx("div",{className:l.popoverUserList,children:h.map((e,t)=>c.jsx("div",{className:l.popoverUserCard,children:c.jsx(gc,{userId:e.id,avatarSize:32,showHoverCard:r??!0,context:o,textPosition:"after",avatarOnly:!1})},`overflow-user-${e.id||t}`))})})]})]}):(console.warn("StackedUsers: context is required to display user cards"),null):null},exports.TypographyControl=e=>{const{fontSize:t,fontWeight:n,numberOfLines:r,as:o,padding:i,paddingTop:a,paddingBottom:s,paddingLeft:l,paddingRight:u,margin:d,marginTop:h,marginBottom:m,marginLeft:f,marginRight:y,children:v,style:b,className:x,color:C,block:w,truncate:S,wrap:k}=e,P=g.css({color:C,fontSize:t&&Ct[t]?Ct[t]:t,fontWeight:n&&St[n]?St[n]:n,display:r?"-webkit-box":void 0,WebkitBoxOrient:"vertical",overflow:r?"hidden":void 0,WebkitLineClamp:r,padding:i&&wt[i]?wt[i]:i,paddingTop:a&&wt[a]?wt[a]:a,paddingBottom:s&&wt[s]?wt[s]:s,paddingLeft:l&&wt[l]?wt[l]:l,paddingRight:u&&wt[u]?wt[u]:u,margin:d&&wt[d]?wt[d]:d,marginTop:h&&wt[h]?wt[h]:h,marginBottom:m&&wt[m]?wt[m]:m,marginLeft:f&&wt[f]?wt[f]:f,marginRight:y&&wt[y]?wt[y]:y,...b});return c.jsx(p.Text,{as:o,className:p.mergeClasses(x,P),block:w,truncate:S,wrap:k,children:v})},exports.UniversalProvider=({context:e,children:t})=>c.jsx(J.Provider,{value:e,children:t}),exports.UserCard=gc,exports.VideoPlayer=e=>{const{url:t,controls:n=!0,width:r="100%",height:o="100%",loop:i=!1,muted:a=!1}=e,[s,l]=u.useState(!1),d=Tn(e);return c.jsxs("div",{className:d.videoPlayerContainer,children:[c.jsx(E,{url:t,controls:n,width:r,height:o,playing:s,loop:i,muted:a,onPause:()=>l(!1),onPlay:()=>l(!0),className:d.reactPlayer}),!s&&c.jsx(p.Button,{className:p.mergeClasses(d.playButton),onClick:()=>{l(!s)},children:"►"})]})},exports.cloneDeep=function e(t){if(null===t||"object"!=typeof t)return t;if(t instanceof Date)return new Date(t.getTime());if(t instanceof Array)return t.map(t=>e(t));if(t instanceof Object){const n={};for(const r in t)t.hasOwnProperty(r)&&(n[r]=e(t[r]));return n}return t},exports.debounce=Ke,exports.defaultCalendarControlStrings=pn,exports.defaultCalendarMonthStrings=en,exports.defaultSelectWeekStrings=rn,exports.every=function(e,t){return e.every(t)},exports.filter=function(e,t){return e.filter(t)},exports.get=function(e,t,n){const r=Array.isArray(t)?t:t.split(".");let o=e;for(const i of r){if(null==o)return n;o=o[i]}return void 0===o?n:o},exports.groupBy=function(e,t){return e.reduce((e,n)=>{const r=String(t(n));return e[r]||(e[r]=[]),e[r].push(n),e},{})},exports.isEmpty=function(e){return null==e||("string"==typeof e||Array.isArray(e)?0===e.length:"object"==typeof e&&0===Object.keys(e).length)},exports.map=function(e,t){return e.map(t)},exports.set=function(e,t,n){const r=Array.isArray(t)?t:t.split("."),o=r.pop();if(!o)return e;let i=e;for(const a of r)a in i&&"object"==typeof i[a]||(i[a]={}),i=i[a];return i[o]=n,e},exports.some=function(e,t){return e.some(t)},exports.throttle=function(e,t=0){let n=null,r=0;return function(...o){const i=this,a=Date.now();r||(r=a);const s=t-(a-r);s<=0||s>t?(n&&(clearTimeout(n),n=null),r=a,e.apply(i,o)):n||(n=setTimeout(()=>{r=Date.now(),n=null,e.apply(i,o)},s))}},exports.uniq=function(e){return Array.from(new Set(e))},exports.uniqBy=function(e,t){const n=new Set;return e.filter(e=>{const r=t(e);return!n.has(r)&&(n.add(r),!0)})},exports.useApplicationContext=G,exports.useAspectRatioStyles=e=>{const{styles:t}=e,{getBaseStyles:n}=Z();return{aspectRatioStyles:L.useCallback((r,o)=>({...n(e,r,o),...t}),[n,e,t])}},exports.useCalendar=Jt,exports.useCalendarStyles=Mt,exports.useCardStyles=et,exports.useCarouselStyles=pt,exports.useCarouselStylesMain=ht,exports.useCenterStyles=lt,exports.useComponentUtils=Z,exports.useContainerStyles=ut,exports.useDataGridStyles=vn,exports.useDateUtils=(e,t,n)=>{const{getFormatRelative:r,formatDate:o}=Ze(t,e);return{formatUtcDate:(e,t="PP")=>{const n=h.differenceInDays(new Date,h.parseISO(e));let i="";return void 0!==e&&(i=n>7?o(e,t):r(e)),i},formatTime:n=>n.toLocaleTimeString(e,{timeZone:t}),convertDateToUTC:n=>{const r="string"==typeof n?new Date(n):n,o=new Intl.DateTimeFormat(e,{timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1}).formatToParts(r);let i,a,s,l,c,u;for(const e of o)switch(e.type){case"year":i=e.value;break;case"month":a=e.value;break;case"day":s=e.value;break;case"hour":l=e.value;break;case"minute":c=e.value;break;case"second":u=e.value}return new Date(`${i}-${a}-${s}T${l}:${c}:${u}Z`)}}},exports.useDayViewStyles=Gt,exports.useGraphAPI=()=>{const e=G(),t=null==e?void 0:e.graphClient;return{getUser:u.useCallback(async e=>{if(!t)return console.warn("Graph client not available"),null;try{return await t.get(`/users/${e}`)}catch(n){return console.error("Error fetching user:",n),null}},[t]),getCurrentUser:u.useCallback(async()=>{if(!t)return console.warn("Graph client not available"),null;try{return await t.get("/me")}catch(e){return console.error("Error fetching current user:",e),null}},[t]),searchUsers:u.useCallback(async(e,n=10)=>{if(!t)return console.warn("Graph client not available"),[];try{return(await t.get(`/users?$search="displayName:${e}" OR "mail:${e}"&$top=${n}`)).value||[]}catch(r){return console.error("Error searching users:",r),[]}},[t]),getUserPhoto:u.useCallback(async e=>{if(!t)return console.warn("Graph client not available"),null;try{const n=await t.get(`/users/${e}/photo/$value`);return URL.createObjectURL(n)}catch(n){return console.error("Error fetching user photo:",n),null}},[t]),graphClient:t}},exports.useGridStyles=nt,exports.useImageUtils=()=>{const e=u.useCallback(async e=>{const t=await fetch(e).then(e=>e.text());return"data:image/svg+xml;base64,"+btoa(t)},[]),t=u.useCallback(async(e,t,n)=>new Promise((r,o)=>{const i=new Image;i.crossOrigin="anonymous",i.addEventListener("load",()=>{var e;const a=document.createElement("canvas");let s;a.width=t??i.width,a.height=n??i.height,null==(e=null==a?void 0:a.getContext("2d"))||e.drawImage(i,0,0,t??i.width,n??i.height);try{s=a.toDataURL("image/png",1),r(s)}catch(l){Qe&&console.error(`[ImageService.getBase64Image]: Err='${l.message}'`),o(l)}}),i.addEventListener("error",e=>{Qe&&console.error(`[ImageService.getBase64Image]: Image load error='${e.message}'`),o(e)}),i.src=e}),[]),n=u.useCallback(e=>!m.isEmpty(e)&&e.indexOf("data:image/")>=0,[]);return{getBase64ImageFromDOMImg:u.useCallback(e=>{try{const t=document.getElementById(e),n=document.createElement("canvas");n.width=t.width,n.height=t.height;const r=n.getContext("2d");null==r||r.drawImage(t,0,0);return n.toDataURL("image/png")}catch(t){return void(Qe&&console.error(`[getBase64ImageFromDOMImg]: Err='${t.message}'`))}},[]),isBase64Image:n,getImageBase64:t,base64FromSVGUrl:e}},exports.useIndexedDBCache=X,exports.useLayoutStyles=rt,exports.useLogging=q,exports.useMensionsStyles=ac,exports.usePolling=Y,exports.usePrevNextButtons=dt,exports.useRenderHeaderStyles=Sn,exports.useShowErrorStyles=kn,exports.useShowMessageStyles=Pn,exports.useSpaceStyles=it,exports.useStackStyles=at,exports.useStyles=()=>({inputContainer:g.css({marginTop:"auto",marginLeft:"auto","::after":{content:'""',position:"absolute",bottom:0,left:0,right:0,borderBottom:"2px solid transparent",pointerEvents:"none",borderRadius:p.tokens.borderRadiusMedium}}),listContainer:g.css({maxHeight:"400px",overflowY:"auto",overflowX:"hidden","::-webkit-scrollbar":{width:"5px",height:"5px"},"::-webkit-scrollbar-track":{background:p.tokens.colorNeutralBackground4,borderRadius:"10px"},"::-webkit-scrollbar-thumb":{background:p.tokens.colorBrandStroke2Hover,borderRadius:"10px"},"::-webkit-scrollbar-thumb:hover":{background:p.tokens.colorNeutralStroke2}}),sugestionsHeader:g.css({color:p.tokens.colorBrandBackground})}),exports.useTimeZoneHelper=()=>{const e=G(),t=u.useMemo(()=>Intl.DateTimeFormat().resolvedOptions().timeZone,[]);return{timeZone:t,convertToUserTimeZone:(e,n)=>{const r=n||t;return d.toZonedTime(e,r)},convertFromUserTimeZone:(e,n)=>{const r=n||t;return d.fromZonedTime(e,r)},formatInTimeZone:(e,n,r)=>{const o=r||t;return d.format(d.toZonedTime(e,o),n,{timeZone:o})},getUserTimeZone:()=>{var n,r;return null==(r=null==(n=null==e?void 0:e.pageContext)?void 0:n.user)||r.preferUserTimeZone,t}}},exports.useUtils=At,exports.useVideoStyles=Tn,exports.useWeekViewStyles=Ot;
|
|
201
201
|
//# sourceMappingURL=index.js.map
|