@microsoft/sp-adaptive-card-extension-base 1.13.1 → 1.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/eeec822e-c28a-46b4-affc-7058e4c1aa80.manifest.json +75 -70
  2. package/dist/index-internal-beta.d.ts +267 -16
  3. package/dist/index-internal-public.d.ts +171 -9
  4. package/dist/index-internal.d.ts +171 -9
  5. package/dist/sp-adaptive-card-extension-base_default_173ae32b19aec2e7570e.js +1 -0
  6. package/dist/sp-adaptive-card-extension-base_en-us_173ae32b19aec2e7570e.js +1 -0
  7. package/dist/sp-adaptive-card-extension-base_qps-ploc_173ae32b19aec2e7570e.js +1 -0
  8. package/dist/sp-adaptive-card-extension-base_qps-ploca_173ae32b19aec2e7570e.js +1 -0
  9. package/dist/test-api/AdaptiveCardExtensionTestWrapper.d.ts +2 -1
  10. package/dist/test-api/AdaptiveCardExtensionTestWrapper.js +7 -2
  11. package/dist/tsdoc-metadata.json +1 -1
  12. package/lib-commonjs/AdaptiveCardExtensionContext.js +12 -0
  13. package/lib-commonjs/AdaptiveCardExtensionLoader.js +2 -1
  14. package/lib-commonjs/BaseAdaptiveCardExtension.js +55 -6
  15. package/lib-commonjs/ac-template/util/actionButtonHelper.js +17 -1
  16. package/lib-commonjs/common/Flights.js +8 -1
  17. package/lib-commonjs/common/Killswitches.js +15 -1
  18. package/lib-commonjs/index.js +4 -0
  19. package/lib-commonjs/interfaces/ILocation.js +1 -1
  20. package/lib-commonjs/isolation/IsolatedAdaptiveCardExtensionService.js +217 -0
  21. package/lib-commonjs/isolation/interfaces/IIsolatedAction.js +3 -0
  22. package/lib-commonjs/isolation/interfaces/IIsolatedListener.js +3 -0
  23. package/lib-commonjs/isolation/interfaces/IIsolatedServiceCallbackParameters.js +3 -0
  24. package/lib-commonjs/isolation/interfaces/ILoadIsolatedAdaptiveCardExtensionParameters.js +3 -0
  25. package/lib-commonjs/isolation/interfaces/IRenderIsolatedQuickViewParameters.js +3 -0
  26. package/lib-commonjs/isolation/interfaces/IsolatedAdaptiveCardExtensionApplicationMessageEvent.js +3 -0
  27. package/lib-commonjs/isolation/interfaces/IsolatedServiceMessageEvent.js +3 -0
  28. package/lib-commonjs/test-api/AdaptiveCardExtensionTestWrapper.js +7 -2
  29. package/lib-commonjs/views/base/BaseView.js +10 -0
  30. package/package.json +8 -8
  31. package/dist/sp-adaptive-card-extension-base_default_e16b34147e78dbf0c04c.js +0 -1
  32. package/dist/sp-adaptive-card-extension-base_en-us_e16b34147e78dbf0c04c.js +0 -1
  33. package/dist/sp-adaptive-card-extension-base_qps-ploc_e16b34147e78dbf0c04c.js +0 -1
  34. package/dist/sp-adaptive-card-extension-base_qps-ploca_e16b34147e78dbf0c04c.js +0 -1
@@ -23,6 +23,8 @@ var LocalStorageACECache_1 = require("./caching/cache/LocalStorageACECache");
23
23
  Object.defineProperty(exports, "_LocalStorageACECache", { enumerable: true, get: function () { return LocalStorageACECache_1.LocalStorageACECache; } });
24
24
  var ISelectMediaActionTypes_1 = require("./interfaces/ISelectMediaActionTypes");
25
25
  Object.defineProperty(exports, "MediaType", { enumerable: true, get: function () { return ISelectMediaActionTypes_1.MediaType; } });
26
+ var IsolatedAdaptiveCardExtensionService_1 = require("./isolation/IsolatedAdaptiveCardExtensionService");
27
+ Object.defineProperty(exports, "_IsolatedAdaptiveCardExtensionService", { enumerable: true, get: function () { return IsolatedAdaptiveCardExtensionService_1.IsolatedAdaptiveCardExtensionService; } });
26
28
  var BaseView_1 = require("./views/base/BaseView");
27
29
  Object.defineProperty(exports, "BaseView", { enumerable: true, get: function () { return BaseView_1.BaseView; } });
28
30
  var BaseBasicCardView_1 = require("./views/card/BaseBasicCardView");
@@ -39,4 +41,6 @@ var ViewNavigator_1 = require("./views/navigator/ViewNavigator");
39
41
  Object.defineProperty(exports, "ViewNavigator", { enumerable: true, get: function () { return ViewNavigator_1.ViewNavigator; } });
40
42
  var BaseAdaptiveCardView_1 = require("./views/quickView/BaseAdaptiveCardView");
41
43
  Object.defineProperty(exports, "BaseAdaptiveCardView", { enumerable: true, get: function () { return BaseAdaptiveCardView_1.BaseAdaptiveCardView; } });
44
+ var Flights_1 = require("./common/Flights");
45
+ Object.defineProperty(exports, "_isAdaptiveCardExtensionLKGCachingEnabled", { enumerable: true, get: function () { return Flights_1.isAdaptiveCardExtensionLKGCachingEnabled; } });
42
46
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  /**
3
3
  * Interface for location coordinates
4
- * @remarks API under active development and not ready for use.
4
+ * @remarks API under active development and is not ready for use.
5
5
  * @beta
6
6
  */
7
7
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,217 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.IsolatedAdaptiveCardExtensionService = void 0;
4
+ var sp_core_library_1 = require("@microsoft/sp-core-library");
5
+ var sp_diagnostics_1 = require("@microsoft/sp-diagnostics");
6
+ var sp_page_context_1 = require("@microsoft/sp-page-context");
7
+ var sp_component_base_1 = require("@microsoft/sp-component-base");
8
+ var Flights_1 = require("../common/Flights");
9
+ /**
10
+ * @internal
11
+ */
12
+ var IsolatedAdaptiveCardExtensionService = /** @class */ (function () {
13
+ function IsolatedAdaptiveCardExtensionService(_serviceScope) {
14
+ var _this = this;
15
+ this._serviceScope = _serviceScope;
16
+ this._callbackCache = new Map();
17
+ this._isolatedFrames = new Map();
18
+ this._isolatedListeners = new Map();
19
+ /**
20
+ * Message handler for isolated domain iframes.
21
+ *
22
+ * @param message - {@link _IsolatedAdaptiveCardExtensionApplicationMessageEvent}
23
+ */
24
+ this._handleIsolatedApplicationMessage = function (message) {
25
+ var data = message.data;
26
+ if (data.messageType === 'applicationMessage') {
27
+ var instanceId = data.instanceId, kind = data.kind;
28
+ switch (kind) {
29
+ case 'Card':
30
+ _this._invokeCallback(instanceId, {
31
+ aceData: data.aceData,
32
+ card: data.card,
33
+ cacheObject: data.cacheObject,
34
+ type: kind
35
+ });
36
+ break;
37
+ case 'Error':
38
+ _this._invokeCallback(instanceId, { error: data.error, type: kind });
39
+ break;
40
+ case 'Ready':
41
+ var isolatedFrame = _this._isolatedFrames.get(new URL(message.origin).hostname);
42
+ if (isolatedFrame) {
43
+ isolatedFrame.isReady = true;
44
+ for (var _i = 0, _a = isolatedFrame.messageQueue; _i < _a.length; _i++) {
45
+ var _b = _a[_i], id = _b[0], msg = _b[1];
46
+ _this._sendMessage(id, msg); /* tslint:disable-line:no-any */
47
+ }
48
+ isolatedFrame.messageQueue = [];
49
+ }
50
+ break;
51
+ default:
52
+ _this._logError("Unexpected message: " + JSON.stringify(message.data));
53
+ break;
54
+ }
55
+ }
56
+ };
57
+ window.addEventListener('message', this._handleIsolatedApplicationMessage);
58
+ }
59
+ Object.defineProperty(IsolatedAdaptiveCardExtensionService.prototype, "_pageContext", {
60
+ get: function () {
61
+ if (!this._pContext) {
62
+ // Since this service can be autocreated, we must consume services after autocreation has finished
63
+ this._pContext = this._serviceScope.consume(sp_page_context_1.PageContext.serviceKey);
64
+ }
65
+ return this._pContext;
66
+ },
67
+ enumerable: false,
68
+ configurable: true
69
+ });
70
+ IsolatedAdaptiveCardExtensionService.prototype.disposeEntry = function (instanceId) {
71
+ this._isolatedListeners.delete(instanceId);
72
+ };
73
+ /**
74
+ * Load an isolated Adaptive Card Extension.
75
+ *
76
+ * @remarks Only loads one iframe per isolated domain.
77
+ *
78
+ * @param args - {@link _ILoadIsolatedAdaptiveCardExtensionParameters}
79
+ */
80
+ IsolatedAdaptiveCardExtensionService.prototype.load = function (args) {
81
+ var callback = args.callback, dashboardListId = args.dashboardListId, itemId = args.itemId, instanceId = args.instanceId, listenerId = args.listenerId, manifestId = args.manifestId;
82
+ // Normalize the domain since we are using it as dictionary keys
83
+ var isolatedDomain = args.isolatedDomain.toLowerCase();
84
+ var isolatedFrame = this._isolatedFrames.get(isolatedDomain);
85
+ if (!isolatedFrame) {
86
+ var iframe = document.createElement('iframe');
87
+ var parentQueryParams = new URLSearchParams(window.location.search).toString();
88
+ var serverRelativeUrl = this._pageContext.site.serverRelativeUrl;
89
+ var destBaseUrl = serverRelativeUrl === '/' ? '' : serverRelativeUrl;
90
+ var destUrl = "/_layouts/15/adaptivecardextensions.aspx?dashboardListID=" + dashboardListId + "&id=" + itemId + "&instanceId=" + instanceId + "&" + parentQueryParams;
91
+ var isolatedUrlBase = sp_component_base_1._ensureIsolatedDomainUrl(isolatedDomain, this._pageContext.web.absoluteUrl);
92
+ if (Flights_1.isFramedTeamsLogonEnabled()) {
93
+ // Use framedteamslogon.aspx for scenarios where cookie auth doesn't work e.g. Teams, Safari, etc.
94
+ iframe.src = isolatedUrlBase + "/_layouts/15/framedteamslogon.aspx?spfx=true&dest=" + encodeURIComponent(destBaseUrl + destUrl);
95
+ }
96
+ else {
97
+ iframe.src = isolatedUrlBase + destUrl;
98
+ }
99
+ // Start hidden.
100
+ iframe.hidden = true;
101
+ iframe.style.position = 'absolute';
102
+ document.body.appendChild(iframe);
103
+ isolatedFrame = { iframe: iframe, isReady: false, messageQueue: [] };
104
+ this._isolatedFrames.set(isolatedDomain.toLowerCase(), isolatedFrame);
105
+ }
106
+ var entry = this._isolatedListeners.get(instanceId);
107
+ if (!entry) {
108
+ this._isolatedListeners.set(instanceId, {
109
+ isolatedDomain: isolatedDomain,
110
+ iframe: isolatedFrame.iframe,
111
+ listeners: new Map([[listenerId, { callback: callback }]])
112
+ });
113
+ }
114
+ else if (!entry.listeners.get(listenerId)) {
115
+ entry.listeners.set(listenerId, { callback: callback });
116
+ }
117
+ // When we are creating a new isolated ACE during authoring, we need to tell the isolated app to initialize a new ACE instance.
118
+ if (!args.isRenderedFromPersistedData) {
119
+ this.sendInitialize(instanceId, manifestId);
120
+ }
121
+ // If the ACE has previously loaded, then send the latest data to the listener.
122
+ // Otherwise, when the isolated domain iframe has loaded we will automatically notify the listener.
123
+ var callbackArgs = this._callbackCache.get(instanceId);
124
+ if (callbackArgs) {
125
+ this._invokeCallback(instanceId, callbackArgs, listenerId);
126
+ }
127
+ };
128
+ /**
129
+ * Display the iframe with the ACE quick view.
130
+ *
131
+ * @param args - {@link _IRenderIsolatedQuickViewParameters}
132
+ */
133
+ IsolatedAdaptiveCardExtensionService.prototype.renderQuickView = function (args) {
134
+ var instanceId = args.instanceId, listenerId = args.listenerId;
135
+ this._sendMessage(instanceId, {
136
+ serviceAction: 'Action',
137
+ action: {
138
+ action: { type: 'QuickView' },
139
+ instanceId: instanceId,
140
+ listenerId: listenerId
141
+ }
142
+ });
143
+ };
144
+ IsolatedAdaptiveCardExtensionService.prototype.setDisplayMode = function (newDisplayMode) {
145
+ // not implemented
146
+ };
147
+ IsolatedAdaptiveCardExtensionService.prototype.setRenderType = function (newRenderType) {
148
+ // not implemented
149
+ };
150
+ IsolatedAdaptiveCardExtensionService.prototype.logCardActionEngagement = function () {
151
+ // not implemented
152
+ };
153
+ /**
154
+ * Send an action to an isolated ACE.
155
+ *
156
+ * @param action - {@link _IIsolatedAction}
157
+ */
158
+ IsolatedAdaptiveCardExtensionService.prototype.sendAction = function (action) {
159
+ var instanceId = action.instanceId;
160
+ this._sendMessage(instanceId, { serviceAction: 'Action', action: action });
161
+ };
162
+ IsolatedAdaptiveCardExtensionService.prototype.sendInitialize = function (newInstanceId, manifestId) {
163
+ this._sendMessage(newInstanceId, { serviceAction: 'Initialize', newInstanceId: newInstanceId, manifestId: manifestId });
164
+ };
165
+ /**
166
+ * Notify listeners of a change with the ACE;
167
+ *
168
+ * @param instanceId - ACE instance.
169
+ * @param args - {@link _IsolatedServiceCallbackParameters}
170
+ * @param listenerId - Optional. If provided, only invoke the callback for this listener.
171
+ */
172
+ IsolatedAdaptiveCardExtensionService.prototype._invokeCallback = function (instanceId, args, listenerId) {
173
+ var _a;
174
+ var entry = this._isolatedListeners.get(instanceId);
175
+ this._callbackCache.set(instanceId, args);
176
+ if (entry) {
177
+ if (listenerId) {
178
+ (_a = entry.listeners.get(listenerId)) === null || _a === void 0 ? void 0 : _a.callback(args);
179
+ }
180
+ else {
181
+ entry.listeners.forEach(function (listener) { return listener.callback(args); });
182
+ }
183
+ }
184
+ else {
185
+ this._logError("No entry for " + instanceId);
186
+ }
187
+ };
188
+ /**
189
+ * Trace log an error.
190
+ *
191
+ * @param errorMessage - Message to create a new `Error` object.
192
+ */
193
+ IsolatedAdaptiveCardExtensionService.prototype._logError = function (errorMessage) {
194
+ sp_diagnostics_1._TraceLogger.logError(IsolatedAdaptiveCardExtensionService._logSource, new Error(errorMessage));
195
+ };
196
+ IsolatedAdaptiveCardExtensionService.prototype._sendMessage = function (instanceId, message) {
197
+ var entry = this._isolatedListeners.get(instanceId);
198
+ if (entry) {
199
+ var isolatedFrame = this._isolatedFrames.get(entry.isolatedDomain);
200
+ if (isolatedFrame.isReady) {
201
+ message.messageType = 'serviceMessage';
202
+ entry.iframe.contentWindow.postMessage(message, '*');
203
+ }
204
+ else {
205
+ isolatedFrame.messageQueue.push([instanceId, message]);
206
+ }
207
+ }
208
+ else {
209
+ this._logError("No entry for " + instanceId);
210
+ }
211
+ };
212
+ IsolatedAdaptiveCardExtensionService.serviceKey = sp_core_library_1.ServiceKey.create('sp-adaptive-card-extension-base::IsolatedAdaptiveCardExtensionService', IsolatedAdaptiveCardExtensionService);
213
+ IsolatedAdaptiveCardExtensionService._logSource = { id: 'IsolatedAdaptiveCardExtensionService' };
214
+ return IsolatedAdaptiveCardExtensionService;
215
+ }());
216
+ exports.IsolatedAdaptiveCardExtensionService = IsolatedAdaptiveCardExtensionService;
217
+ //# sourceMappingURL=IsolatedAdaptiveCardExtensionService.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IIsolatedAction.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IIsolatedListener.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IIsolatedServiceCallbackParameters.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ILoadIsolatedAdaptiveCardExtensionParameters.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IRenderIsolatedQuickViewParameters.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IsolatedAdaptiveCardExtensionApplicationMessageEvent.js.map
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=IsolatedServiceMessageEvent.js.map
@@ -102,7 +102,12 @@ var AdaptiveCardExtensionTestWrapper = /** @class */ (function () {
102
102
  instanceId: testData.instanceId || 'aceInstanceId',
103
103
  parentServiceScope: this._rootScope,
104
104
  loggingTag: '',
105
- deviceContext: 'WebView'
105
+ deviceContext: 'WebView',
106
+ location: function () {
107
+ return new Promise(function (resolve, reject) {
108
+ return resolve({ latitude: 10, longitude: 10 });
109
+ });
110
+ }
106
111
  };
107
112
  return new index_1.AdaptiveCardExtensionContext(contextParams);
108
113
  };
@@ -115,7 +120,7 @@ var AdaptiveCardExtensionTestWrapper = /** @class */ (function () {
115
120
  title: 'title',
116
121
  description: 'description',
117
122
  iconProperty: 'iconProperty',
118
- cardSize: 'Large'
123
+ cardSize: 'Medium'
119
124
  };
120
125
  return tslib_1.__assign(tslib_1.__assign({}, defaultAdaptiveCardExtensionData), testData);
121
126
  };
@@ -84,6 +84,16 @@ var BaseView = /** @class */ (function () {
84
84
  BaseView.prototype.onAction = function (action) {
85
85
  // no-op
86
86
  };
87
+ /**
88
+ * @beta
89
+ *
90
+ * Error handler for Adaptive Card Actions.
91
+ *
92
+ * @param error - The {@link IActionErrorArguments} for the current event.
93
+ */
94
+ BaseView.prototype.onActionError = function (error) {
95
+ // no-op
96
+ };
87
97
  /**
88
98
  * See {@link BaseAdaptiveCardExtension.setState}.
89
99
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@microsoft/sp-adaptive-card-extension-base",
3
- "version": "1.13.1",
3
+ "version": "1.14.0",
4
4
  "description": "SharePoint Framework Adaptive Card Extensions",
5
5
  "license": "SEE LICENSE IN \"EULA\" FOLDER",
6
6
  "homepage": "http://aka.ms/spfx",
@@ -15,13 +15,13 @@
15
15
  "node": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0"
16
16
  },
17
17
  "dependencies": {
18
- "@microsoft/sp-component-base": "1.13.1",
19
- "@microsoft/sp-core-library": "1.13.1",
20
- "@microsoft/sp-diagnostics": "1.13.1",
21
- "@microsoft/sp-loader": "1.13.1",
22
- "@microsoft/sp-lodash-subset": "1.13.1",
23
- "@microsoft/sp-module-interfaces": "1.13.1",
24
- "@microsoft/sp-property-pane": "1.13.1",
18
+ "@microsoft/sp-component-base": "1.14.0",
19
+ "@microsoft/sp-core-library": "1.14.0",
20
+ "@microsoft/sp-diagnostics": "1.14.0",
21
+ "@microsoft/sp-loader": "1.14.0",
22
+ "@microsoft/sp-lodash-subset": "1.14.0",
23
+ "@microsoft/sp-module-interfaces": "1.14.0",
24
+ "@microsoft/sp-property-pane": "1.14.0",
25
25
  "adaptivecards": "2.9.0",
26
26
  "tslib": "~1.10.0"
27
27
  }
@@ -1 +0,0 @@
1
- define("eeec822e-c28a-46b4-affc-7058e4c1aa80_1.13.1",["tslib","@microsoft/sp-component-base","@microsoft/sp-loader","@microsoft/sp-lodash-subset","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o,s){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="mwqp")}({"17wl":function(e,t){e.exports=n},"7Awa":function(e,t){e.exports=a},I6O9:function(e,t){e.exports=i},Pk8u:function(e,t){e.exports=r},UWqr:function(e,t){e.exports=o},mGD9:function(e){e.exports=JSON.parse('{"t":"TargetUrlIsUndefinedOrEmpty","e":"DefaultIconAltText"}')},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"AdaptiveCardExtensionContext",function(){return r}),n.d(t,"_AdaptiveCardExtensionHost",function(){return o}),n.d(t,"_AdaptiveCardExtensionLoader",function(){return f}),n.d(t,"BaseAdaptiveCardExtension",function(){return G}),n.d(t,"_BaseAdaptiveCardExtensionCache",function(){return I}),n.d(t,"_LocalStorageACECache",function(){return x}),n.d(t,"MediaType",function(){return D}),n.d(t,"BaseView",function(){return F}),n.d(t,"BaseBasicCardView",function(){return R}),n.d(t,"BaseCardView",function(){return H}),n.d(t,"BaseImageCardView",function(){return K}),n.d(t,"BasePrimaryTextCardView",function(){return W}),n.d(t,"QuickViewNavigator",function(){return z}),n.d(t,"ViewNavigator",function(){return V}),n.d(t,"BaseAdaptiveCardView",function(){return q});var a=n("17wl"),i=n("7Awa"),r=function(e){function t(t){var n=e.call(this,t)||this;return n._aceHost=t.host,n.manifest=t.manifest,n._deviceContext=t.deviceContext,n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"_host",{get:function(){return this._aceHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyPane",{get:function(){return this._host.propertyPane},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceContext",{get:function(){return this._deviceContext},enumerable:!1,configurable:!0}),t}(i.BaseComponentContext),o=function(){function e(e){this._onBeforeInitializedCallback=e.onBeforeInitializedCallback,this._onUpdateCallback=e.onUpdateCallback,this._onErrorCallback=e.onError,this._onRequestRenderTypeCallback=e.onRequestRenderTypeCallback,this._onVisibilityChanged=e.onVisibilityChanged,this._cache=e.cache,this.propertyPane=e.propertyPane}return e.prototype.update=function(e){this._onUpdateCallback(e)},e.prototype.onBeforeInitialized=function(e){this._onBeforeInitializedCallback&&this._onBeforeInitializedCallback(e)},e.prototype.onError=function(e){this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.requestRenderTypeChange=function(e,t){this._onRequestRenderTypeCallback(e,t)},Object.defineProperty(e.prototype,"cache",{get:function(){return this._cache},enumerable:!1,configurable:!0}),e.prototype.onVisibilityChanged=function(e){this._onVisibilityChanged(e)},e}(),s=n("I6O9"),c=n("UWqr"),d=n("ut3N");function l(){return c._SPKillSwitch.isActivated("6ca4b572-5356-4763-87bb-1e80205bfa6b")}function u(){return c._SPKillSwitch.isActivated("00be0ead-6f25-4d07-8cef-9840d5522e49")}var f=function(){function e(){}return e._createQosExtraData=function(e,t){return{alias:e.alias,manifestId:e.id,mpnId:e.mpnId,isInternal:e.isInternal,teamsHosted:c._BrowserUtilities.isTeamsHosted(),deviceContext:t}},e.prototype.load=function(t){var n,a,i=this,r=new d._QosMonitor("AdaptiveCardExtension.Load",!0),o=e._createQosExtraData(t.manifest,t.deviceContext);return s.SPComponentLoader.loadComponent(t.manifest).then(function(e){return e.default&&(e=e.default),new e}).catch(function(e){throw r.writeUnexpectedFailure("AdaptiveCardExtensionLoadFailed",e,o),n=e,e}).then(function(e){(a=e)._internalInitialize(i._getContext(t),t.addedFromPersistedData,t.initialDisplayMode),a._internalDeserialize(t.aceData),t.host.onBeforeInitialized(a);var n,r=t.cacheObject?{state:(n=t.cacheObject).cachedState,cardNavigatorState:n.cardNavigatorState}:void 0;return a.onInit(r)}).then(function(){return r.writeSuccess(o),u()||a._internalOnAfterInit(),a}).catch(function(e){throw n||r.writeUnexpectedFailure("AdaptiveCardExtensionInitializationFailed",e,o),e})},e.prototype._getContext=function(e){return new r({host:e.host,manifest:e.manifest,instanceId:e.instanceId,parentServiceScope:e.serviceScope,loggingTag:"",deviceContext:e.deviceContext})},e}(),p=n("Pk8u");function m(){return c._SPFlight.isEnabled(60544)}function _(){return c._SPFlight.isEnabled(60456)}var h=n("mGD9"),b=new RegExp(/(?=.+)(\/l\/entity\/.+)/gi),g={Medium:1,Large:2};function v(e,t,n,a,i){var r,o;if("Submit"===t.type)(o=t).confirmationDialog&&(o.parameters||(o.parameters={}),o.parameters.__MSConfirmationDialog__=o.confirmationDialog),r={id:n,type:"Action.Submit",style:i,title:a,data:t.parameters||void 0};else if("ExternalLink"===t.type){y(t.parameters,e);var s=t.parameters.target;if(!s||""===s)throw new Error(c.Text.format(h.t,n));r={id:n,type:"Action.OpenUrl",style:i,title:a,url:s}}else"QuickView"===t.type?r={id:n,type:"Action.Submit",style:i,title:a,data:{_internalQuickViewId:t.parameters.view}}:c._SPFlight.isEnabled(60447)&&"VivaAction.SelectMedia"===t.type?r={id:n,type:"VivaAction.SelectMedia",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.GetLocation"===t.type?r={id:n,type:"VivaAction.GetLocation",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.ShowLocation"===t.type&&(r={id:n,type:"VivaAction.ShowLocation",style:i,title:a,parameters:t.parameters});return r}function y(e,t){if(e&&e.isTeamsDeepLink&&"WebView"===t){var n=e.target.match(b);n&&n[0]&&(e.target="msteams:"+n[0])}}function S(e,t,n,i,r,o){var s,c=e.cardButtons,d=e.data,l=e.onCardSelection,u=e._templateType;if(i||(i=e.template),void 0===c||"Image"===u&&"Large"!==t||function(e,t,n,a){for(var i=[],r=Math.min(g[n],(null==t?void 0:t.length)||0),o=0;o<r;o++){var s=t[o],c=s.id?s.id:"ac-button-"+o;i.push(v(a,s.action,c,s.title,s.style))}e.actions=i}(i,c,t,n),l){var f=v(n,l,"select-action");"Action.OpenUrl"!==f.type&&"Action.Submit"!==f.type||(s=f)}return{data:Object(a.__assign)({selectAction:s,iconProperty:r,iconAltText:d.iconAltText||h.e,title:o},d),template:i,cardProperties:{iconProperty:d.iconProperty||r,size:t,title:d.title||o,templateType:u}}}var D,I=function(){function e(){}return e.prototype.get=function(e,t){var n=this.getFromSource(e,t);if(n)return(new Date).getTime()<n.expirationTime?n:void 0},e}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.getKey=function(e,t){return"AdaptiveCardExtension_LKG_"+e+"_"+t},Object.defineProperty(t,"instance",{get:function(){return void 0===this._instance&&(this._instance=new t),this._instance},enumerable:!1,configurable:!0}),t.prototype.save=function(e,t,n){var a=this._getLocalStorageEntry(e);a.set(t,n);var i=Array.from(a.entries());localStorage.setItem(e,JSON.stringify(i))},t.prototype.getFromSource=function(e,t){return this._getLocalStorageEntry(e).get(t)},t.prototype._getLocalStorageEntry=function(e){var t=localStorage.getItem(e);return t?new Map(JSON.parse(t)):new Map},t}(I),C=function(){function e(e,t,n,i,r,o){this._context=e,this._getCardSize=t,this._getIconProperty=n,this._getTitle=i,this._handleInitializeCallback=r,this._settings=Object(a.__assign)(Object(a.__assign)({},this._defaultCacheSettings()),o)}return e.prototype.save=function(e,t,n,a,i){var r,o,s;if(this._settings.isEnabled){var c=this._initializeCustomCardView();if(c&&c.isCacheEnabled||!c&&t.isCacheEnabled){var d=c?S(c,this._getCardSize(),this._context.deviceContext,void 0,this._getIconProperty(),this._getTitle()):n.card;s=this._createCacheObject(n,d,a,i),null===(r=this._context._host.cache)||void 0===r||r.save(x.getKey(this._context.pageContext.site.id.toString(),null===(o=this._context.pageContext.listItem)||void 0===o?void 0:o.uniqueId),e,s)}}return s},e.prototype._createCacheObject=function(e,t,n,a){return{cachedCard:t,cardNavigatorState:n,isVisible:e.isVisible,cachedState:a,expirationTime:(new Date).getTime()+1e3*this._settings.expiryTimeInSeconds}},e.prototype._initializeCustomCardView=function(){if(this._settings.cachedCardView){var e=this._settings.cachedCardView();return this._handleInitializeCallback(e),e}},e.prototype._defaultCacheSettings=function(){return{isEnabled:!0,expiryTimeInSeconds:86400,cachedCardView:void 0}},e}(),O={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},w={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},E={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},A={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},L={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},k={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},M={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},P={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},T={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},U={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},F=function(){function e(){}return Object.defineProperty(e.prototype,"cardNavigator",{get:function(){return this._ace.cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickViewNavigator",{get:function(){return this._ace.quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cardSize",{get:function(){return this._getCardSize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),e.prototype.onAction=function(e){},e.prototype.setState=function(e){this._ace.setState(e)},e.prototype.setVisibility=function(e){this._ace.isVisible=e},e}(),H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardButtons",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCardSelection",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCacheEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._getTemplate=function(e,t){return Object(p.cloneDeep)(this.onCardSelection?t:e)},t}(F),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Basic",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(L,P)},enumerable:!1,configurable:!0}),t}(H),N=function(e){function t(t){var n=e.call(this)||this;return n._primaryText=t,n._templateType="Basic",n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{primaryText:this._primaryText}},enumerable:!1,configurable:!0}),t}(R),B=/\{(\d+)\}/g,j=function(){function e(){this._registeredCallbacks=new Map}return e.prototype.register=function(e,t){this._registeredCallbacks.has(e)||this._registeredCallbacks.set(e,t)},e.prototype.consume=function(e){var t=this._registeredCallbacks.get(e);if(!t)throw new Error(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(B,function(e,n){return null===t[n]?"":""+t[n]})}("View with id {0} must be registered before being used",e));return this._registeredCallbacks.delete(e),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._registeredCallbacks.size},enumerable:!1,configurable:!0}),e}(),V=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=new Array,this._viewCache=new Map,this._viewRegistry=new j}return e.prototype.register=function(e,t){this._viewRegistry.register(e,t)},e.prototype.push=function(e,t){void 0===t&&(t=!1),this._push(e),this._handleStackChangedCallback(t)},e.prototype.replace=function(e,t){void 0===t&&(t=!1),this._pop(),this._push(e),this._handleStackChangedCallback(t)},e.prototype.pop=function(e){void 0===e&&(e=!1),this.size>1&&(this._pop(),this._handleStackChangedCallback(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this._viewStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentId",{get:function(){var e=this.size;return e?this._viewStack[e-1]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_currentView",{get:function(){return this._viewCache.get(this._viewStack[this.size-1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewStack",{get:function(){return this._viewStack},enumerable:!1,configurable:!0}),e.prototype._clear=function(){this._viewStack=[]},e.prototype._forEach=function(e){this._viewCache.forEach(e)},e.prototype._getRegistrySize=function(){return this._viewRegistry.size},e.prototype._push=function(e){if(void 0===this._viewCache.get(e)){var t=this._viewRegistry.consume(e)();this._handleInitializeCallback(t),this._viewCache.set(e,t)}this._viewStack.push(e)},e.prototype._pop=function(){this._viewStack.pop()},e}(),z=function(e){function t(t,n,a){var i=e.call(this,t,n)||this;return i._closeQuickViewCallback=a,i}return Object(a.__extends)(t,e),t.prototype.close=function(){this._closeQuickViewCallback()},t}(V),G=function(e){function t(){var t=e.call(this)||this;return t._isInitialized=!1,t._getCard=function(e){try{return S(t._cardNavigator._currentView,t.cardSize,t.context.deviceContext,e?t._ACRenderArgs.card.template:void 0,t.iconProperty,t.title)}catch(e){throw t.context._host.onError(e.toString()),e}},t._onViewInitialized=function(e){e._state=t.state,e._ace=t,e._properties=t.properties,e._getCardSize=function(){return t.cardSize},e._context=t.context},t._navigatorCallback=function(e){e||t.update(t._renderType)},t._closeQuickViewCallback=function(){t.context._host.requestRenderTypeChange("Card",t.instanceId)},t._cardSize="Medium",t._renderType="Card",t._isVisible=!0,t._cardNavigator=new V(t._navigatorCallback,t._onViewInitialized),t._quickViewNavigator=new z(t._navigatorCallback,t._onViewInitialized,t._closeQuickViewCallback),t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardNavigator",{get:function(){return this._cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cardSize",{get:function(){return this._cardSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return c.Version.parse("1.0")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayMode",{get:function(){return this._displayMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quickViewNavigator",{get:function(){return this._quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedFromPersistedData",{get:function(){return this._renderedFromPersistedData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedOnce",{get:function(){return this._renderedOnce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderType",{get:function(){return this._renderType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertiesMetadata",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){if(this._state)throw new Error("state can only be initialized once");this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconProperty",{get:function(){return this._iconProperty},enumerable:!1,configurable:!0}),t.prototype.getPropertyPaneConfiguration=function(){return{pages:[]}},t.prototype.loadPropertyPaneResources=function(){return Promise.resolve()},t.prototype.getCacheSettings=function(){return{}},t.prototype.getCachedState=function(e){return{}},t.prototype._internalOnAction=function(e){("Card"===this.renderType?this._cardNavigator:this._quickViewNavigator)._currentView.onAction(e)},t.prototype.onBeforeSerialize=function(){},t.prototype.onAfterPropertiesUpdatedExternally=function(e){},t.prototype.onAfterDeserialize=function(e,t){return e},t.prototype.onDisplayModeChanged=function(e){},t.prototype.onDispose=function(){},t.prototype.onInit=function(e){return Promise.resolve()},t.prototype.onPropertyPaneFieldChanged=function(e,t,n){},t.prototype.onRenderTypeChanged=function(e){},t.prototype.renderCard=function(){},t.prototype._getPreFrameworkPropertyPaneConfiguration=function(){return[]},Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,(this.cardNavigator._getRegistrySize()>0||this.cardNavigator._currentView)&&this.context._host.onVisibilityChanged(this._getRenderArguments(this.renderType))},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){if(!this._state)throw new Error("state must be initialized before calling setState");e&&(this._state=Object(a.__assign)(Object(a.__assign)({},this.state),Object(p.cloneDeep)(e)),this._cardNavigator._forEach(this._onViewInitialized),this._quickViewNavigator._forEach(this._onViewInitialized)),(u()||this._isInitialized)&&this.context._host.update(this._getRenderArguments(this._renderType))},t.prototype.update=function(e,t){void 0===t&&(t=!1);var n=this._getRenderArguments(e,t);this.context._host.update(n)},t.prototype._getRenderArguments=function(e,t){var n,i=this;if(void 0===t&&(t=!1),"Card"===e&&0===this.cardNavigator.size){var r=this.renderCard();r||(r="_InternalDefaultCardView",this._cardNavigator.register(r,function(){return new N(i.description)})),this._cardNavigator.push(r,!0)}if(void 0===this._ACRenderArgs?this._ACRenderArgs={card:"Card"===e?this._getCard(t):void 0,isVisible:this._isVisible,instanceId:this.instanceId,lastUpdatedType:e,quickLook:"QuickView"===e?this._getQuickView(t):void 0}:this._updateRenderArgs(e,t),_()&&this.displayMode===c.DisplayMode.Read&&"Card"===e){var o=null===(n=this._cacheManager)||void 0===n?void 0:n.save(this.instanceId,this._cardNavigator._currentView,this._ACRenderArgs,this.cardNavigator.viewStack,this.getCachedState(Object(a.__assign)({},this._state)));this._ACRenderArgs.cacheObject=o}return this._ACRenderArgs},t.prototype._propertiesMetadata=function(){return l()?void 0:this.propertiesMetadata},t.prototype._getPropertyPaneConfiguration=function(){return this.getPropertyPaneConfiguration()},t.prototype._internalDeserialize=function(e){e.title&&(this._title=e.title),e.iconProperty&&(this._iconProperty=e.iconProperty),e.description&&(this._description=e.description),e.cardSize&&(this._cardSize=e.cardSize);var t=e.properties;!l()&&this.renderedFromPersistedData&&(i._PropertyMetadataProcessor.reInstateServerProcessedData(this.propertiesMetadata,t,e.serverProcessedContent),e.serverProcessedContent=void 0),this._properties?Object.assign(this._properties,t):this._properties=this.onAfterDeserialize(t,e.dataVersion?c.Version.parse(e.dataVersion):this.dataVersion)},t.prototype._internalInitialize=function(t,n,a){var i=this;e.prototype._initializeContext.call(this,t),this._displayMode=a,this._renderedOnce=!1,this._renderedFromPersistedData=n,_()&&(this._cacheManager=new C(this.context,function(){return i.cardSize},function(){return i.iconProperty},function(){return i.title},this._onViewInitialized,this.getCacheSettings()))},t.prototype._internalSetDisplayMode=function(e){if(this._displayMode!==e){var t=this._displayMode;this._displayMode=e,this.onDisplayModeChanged(t)}},t.prototype._loadPropertyPaneResources=function(){return this.loadPropertyPaneResources()},t.prototype._onPropertyPaneFieldChanged=function(e,t,n){Object(p.isEqual)(t,n)||(this._updateProperty(e,n),this.onPropertyPaneFieldChanged(e,t,n))},t.prototype._renderCompleted=function(){this._renderedOnce=!0},t.prototype._internalOnAfterInit=function(){this._isInitialized=!0},t.prototype._internalSerialize=function(){return this.onBeforeSerialize(),{dataVersion:this.dataVersion.toString(),id:this.componentId,instanceId:this.instanceId,properties:this.properties,title:this.title,description:this._description,iconProperty:this.iconProperty,cardSize:this._cardSize}},t.prototype._setRenderType=function(e,t){if(this._renderType!==e){var n=this._renderType;"QuickView"===n&&this._quickViewNavigator._clear(),"Card"===n&&(this._quickViewNavigator._clear(),void 0!==t&&this._quickViewNavigator.push(t,!0)),this._renderType=e,this.onRenderTypeChanged(n)}},t.prototype._updateConfigurableFields=function(e,t){switch(e){case"cardSize":this._cardSize=t}},t.prototype._logCardActionEngagement=function(e,t,n,a,i){var r,o,s,c,l,u,f;d._EngagementLogger.log({name:"AdaptiveCardExtension.CardAction",isIntentional:!0,siteId:null===(o=null===(r=this.context.pageContext)||void 0===r?void 0:r.site)||void 0===o?void 0:o.id.toString(),webId:null===(c=null===(s=this.context.pageContext)||void 0===s?void 0:s.web)||void 0===c?void 0:c.id.toString(),extraData:{ActionType:e,Alias:this.manifest.alias,DeviceContext:n,IsInternal:this.manifest.isInternal,InstanceId:this.instanceId,ItemLocation:t,WorkLoad:t,TenantID:null===(f=null===(u=null===(l=this.context.pageContext)||void 0===l?void 0:l.aadInfo)||void 0===u?void 0:u.tenantId)||void 0===f?void 0:f.toString().toLowerCase(),EventSchemaVersion:10,ManifestId:this.manifest.id,MobileSessionId:a,MobileBootType:i,MPNId:this.manifest.mpnId}})},t.prototype._getQuickView=function(e){if(0!==this._quickViewNavigator.size){var t=this._quickViewNavigator._currentView;if(void 0!==t)return y(t.externalLink,this.context.deviceContext),{data:t.data,template:e?this._ACRenderArgs.quickLook.template:t.template,pageBarProperties:{externalLink:t.externalLink,leftNavigationButtonType:this._quickViewNavigator.size>1?"Back":"Close",title:t.title}}}},t.prototype._updateRenderArgs=function(e,t){this._ACRenderArgs.lastUpdatedType=e,this._ACRenderArgs.isVisible=this._isVisible,"Card"===e?this._ACRenderArgs.card=this._getCard(t):this._ACRenderArgs.quickLook=this._getQuickView(t)},t.prototype._updateProperty=function(e,t){Object(p.update)(this._properties,e,function(){return t})},t}(i.BaseComponent);!function(e){e[e.Image=1]="Image",e[e.Audio=4]="Audio"}(D||(D={}));var K=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Image",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(k,T)},enumerable:!1,configurable:!0}),t}(H),W=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="PrimaryText",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(M,U)},enumerable:!1,configurable:!0}),t}(H),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"externalLink",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return""},enumerable:!1,configurable:!0}),t}(F)},ut3N:function(e,t){e.exports=s}})});
@@ -1 +0,0 @@
1
- define("eeec822e-c28a-46b4-affc-7058e4c1aa80_1.13.1",["tslib","@microsoft/sp-component-base","@microsoft/sp-loader","@microsoft/sp-lodash-subset","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o,s){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="mwqp")}({"17wl":function(e,t){e.exports=n},"7Awa":function(e,t){e.exports=a},I6O9:function(e,t){e.exports=i},Pk8u:function(e,t){e.exports=r},UWqr:function(e,t){e.exports=o},mGD9:function(e){e.exports=JSON.parse('{"t":"Action Id: \\u0027{0}\\u0027 target URL should not be undefined or empty string. ","e":"Adaptive card extension icon."}')},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"AdaptiveCardExtensionContext",function(){return r}),n.d(t,"_AdaptiveCardExtensionHost",function(){return o}),n.d(t,"_AdaptiveCardExtensionLoader",function(){return f}),n.d(t,"BaseAdaptiveCardExtension",function(){return G}),n.d(t,"_BaseAdaptiveCardExtensionCache",function(){return I}),n.d(t,"_LocalStorageACECache",function(){return x}),n.d(t,"MediaType",function(){return D}),n.d(t,"BaseView",function(){return F}),n.d(t,"BaseBasicCardView",function(){return R}),n.d(t,"BaseCardView",function(){return H}),n.d(t,"BaseImageCardView",function(){return K}),n.d(t,"BasePrimaryTextCardView",function(){return W}),n.d(t,"QuickViewNavigator",function(){return z}),n.d(t,"ViewNavigator",function(){return V}),n.d(t,"BaseAdaptiveCardView",function(){return q});var a=n("17wl"),i=n("7Awa"),r=function(e){function t(t){var n=e.call(this,t)||this;return n._aceHost=t.host,n.manifest=t.manifest,n._deviceContext=t.deviceContext,n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"_host",{get:function(){return this._aceHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyPane",{get:function(){return this._host.propertyPane},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceContext",{get:function(){return this._deviceContext},enumerable:!1,configurable:!0}),t}(i.BaseComponentContext),o=function(){function e(e){this._onBeforeInitializedCallback=e.onBeforeInitializedCallback,this._onUpdateCallback=e.onUpdateCallback,this._onErrorCallback=e.onError,this._onRequestRenderTypeCallback=e.onRequestRenderTypeCallback,this._onVisibilityChanged=e.onVisibilityChanged,this._cache=e.cache,this.propertyPane=e.propertyPane}return e.prototype.update=function(e){this._onUpdateCallback(e)},e.prototype.onBeforeInitialized=function(e){this._onBeforeInitializedCallback&&this._onBeforeInitializedCallback(e)},e.prototype.onError=function(e){this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.requestRenderTypeChange=function(e,t){this._onRequestRenderTypeCallback(e,t)},Object.defineProperty(e.prototype,"cache",{get:function(){return this._cache},enumerable:!1,configurable:!0}),e.prototype.onVisibilityChanged=function(e){this._onVisibilityChanged(e)},e}(),s=n("I6O9"),c=n("UWqr"),d=n("ut3N");function l(){return c._SPKillSwitch.isActivated("6ca4b572-5356-4763-87bb-1e80205bfa6b")}function u(){return c._SPKillSwitch.isActivated("00be0ead-6f25-4d07-8cef-9840d5522e49")}var f=function(){function e(){}return e._createQosExtraData=function(e,t){return{alias:e.alias,manifestId:e.id,mpnId:e.mpnId,isInternal:e.isInternal,teamsHosted:c._BrowserUtilities.isTeamsHosted(),deviceContext:t}},e.prototype.load=function(t){var n,a,i=this,r=new d._QosMonitor("AdaptiveCardExtension.Load",!0),o=e._createQosExtraData(t.manifest,t.deviceContext);return s.SPComponentLoader.loadComponent(t.manifest).then(function(e){return e.default&&(e=e.default),new e}).catch(function(e){throw r.writeUnexpectedFailure("AdaptiveCardExtensionLoadFailed",e,o),n=e,e}).then(function(e){(a=e)._internalInitialize(i._getContext(t),t.addedFromPersistedData,t.initialDisplayMode),a._internalDeserialize(t.aceData),t.host.onBeforeInitialized(a);var n,r=t.cacheObject?{state:(n=t.cacheObject).cachedState,cardNavigatorState:n.cardNavigatorState}:void 0;return a.onInit(r)}).then(function(){return r.writeSuccess(o),u()||a._internalOnAfterInit(),a}).catch(function(e){throw n||r.writeUnexpectedFailure("AdaptiveCardExtensionInitializationFailed",e,o),e})},e.prototype._getContext=function(e){return new r({host:e.host,manifest:e.manifest,instanceId:e.instanceId,parentServiceScope:e.serviceScope,loggingTag:"",deviceContext:e.deviceContext})},e}(),p=n("Pk8u");function m(){return c._SPFlight.isEnabled(60544)}function _(){return c._SPFlight.isEnabled(60456)}var h=n("mGD9"),b=new RegExp(/(?=.+)(\/l\/entity\/.+)/gi),g={Medium:1,Large:2};function v(e,t,n,a,i){var r,o;if("Submit"===t.type)(o=t).confirmationDialog&&(o.parameters||(o.parameters={}),o.parameters.__MSConfirmationDialog__=o.confirmationDialog),r={id:n,type:"Action.Submit",style:i,title:a,data:t.parameters||void 0};else if("ExternalLink"===t.type){y(t.parameters,e);var s=t.parameters.target;if(!s||""===s)throw new Error(c.Text.format(h.t,n));r={id:n,type:"Action.OpenUrl",style:i,title:a,url:s}}else"QuickView"===t.type?r={id:n,type:"Action.Submit",style:i,title:a,data:{_internalQuickViewId:t.parameters.view}}:c._SPFlight.isEnabled(60447)&&"VivaAction.SelectMedia"===t.type?r={id:n,type:"VivaAction.SelectMedia",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.GetLocation"===t.type?r={id:n,type:"VivaAction.GetLocation",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.ShowLocation"===t.type&&(r={id:n,type:"VivaAction.ShowLocation",style:i,title:a,parameters:t.parameters});return r}function y(e,t){if(e&&e.isTeamsDeepLink&&"WebView"===t){var n=e.target.match(b);n&&n[0]&&(e.target="msteams:"+n[0])}}function S(e,t,n,i,r,o){var s,c=e.cardButtons,d=e.data,l=e.onCardSelection,u=e._templateType;if(i||(i=e.template),void 0===c||"Image"===u&&"Large"!==t||function(e,t,n,a){for(var i=[],r=Math.min(g[n],(null==t?void 0:t.length)||0),o=0;o<r;o++){var s=t[o],c=s.id?s.id:"ac-button-"+o;i.push(v(a,s.action,c,s.title,s.style))}e.actions=i}(i,c,t,n),l){var f=v(n,l,"select-action");"Action.OpenUrl"!==f.type&&"Action.Submit"!==f.type||(s=f)}return{data:Object(a.__assign)({selectAction:s,iconProperty:r,iconAltText:d.iconAltText||h.e,title:o},d),template:i,cardProperties:{iconProperty:d.iconProperty||r,size:t,title:d.title||o,templateType:u}}}var D,I=function(){function e(){}return e.prototype.get=function(e,t){var n=this.getFromSource(e,t);if(n)return(new Date).getTime()<n.expirationTime?n:void 0},e}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.getKey=function(e,t){return"AdaptiveCardExtension_LKG_"+e+"_"+t},Object.defineProperty(t,"instance",{get:function(){return void 0===this._instance&&(this._instance=new t),this._instance},enumerable:!1,configurable:!0}),t.prototype.save=function(e,t,n){var a=this._getLocalStorageEntry(e);a.set(t,n);var i=Array.from(a.entries());localStorage.setItem(e,JSON.stringify(i))},t.prototype.getFromSource=function(e,t){return this._getLocalStorageEntry(e).get(t)},t.prototype._getLocalStorageEntry=function(e){var t=localStorage.getItem(e);return t?new Map(JSON.parse(t)):new Map},t}(I),C=function(){function e(e,t,n,i,r,o){this._context=e,this._getCardSize=t,this._getIconProperty=n,this._getTitle=i,this._handleInitializeCallback=r,this._settings=Object(a.__assign)(Object(a.__assign)({},this._defaultCacheSettings()),o)}return e.prototype.save=function(e,t,n,a,i){var r,o,s;if(this._settings.isEnabled){var c=this._initializeCustomCardView();if(c&&c.isCacheEnabled||!c&&t.isCacheEnabled){var d=c?S(c,this._getCardSize(),this._context.deviceContext,void 0,this._getIconProperty(),this._getTitle()):n.card;s=this._createCacheObject(n,d,a,i),null===(r=this._context._host.cache)||void 0===r||r.save(x.getKey(this._context.pageContext.site.id.toString(),null===(o=this._context.pageContext.listItem)||void 0===o?void 0:o.uniqueId),e,s)}}return s},e.prototype._createCacheObject=function(e,t,n,a){return{cachedCard:t,cardNavigatorState:n,isVisible:e.isVisible,cachedState:a,expirationTime:(new Date).getTime()+1e3*this._settings.expiryTimeInSeconds}},e.prototype._initializeCustomCardView=function(){if(this._settings.cachedCardView){var e=this._settings.cachedCardView();return this._handleInitializeCallback(e),e}},e.prototype._defaultCacheSettings=function(){return{isEnabled:!0,expiryTimeInSeconds:86400,cachedCardView:void 0}},e}(),O={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},w={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},E={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},A={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},L={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},k={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},M={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},P={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},T={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},U={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},F=function(){function e(){}return Object.defineProperty(e.prototype,"cardNavigator",{get:function(){return this._ace.cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickViewNavigator",{get:function(){return this._ace.quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cardSize",{get:function(){return this._getCardSize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),e.prototype.onAction=function(e){},e.prototype.setState=function(e){this._ace.setState(e)},e.prototype.setVisibility=function(e){this._ace.isVisible=e},e}(),H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardButtons",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCardSelection",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCacheEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._getTemplate=function(e,t){return Object(p.cloneDeep)(this.onCardSelection?t:e)},t}(F),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Basic",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(L,P)},enumerable:!1,configurable:!0}),t}(H),N=function(e){function t(t){var n=e.call(this)||this;return n._primaryText=t,n._templateType="Basic",n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{primaryText:this._primaryText}},enumerable:!1,configurable:!0}),t}(R),B=/\{(\d+)\}/g,j=function(){function e(){this._registeredCallbacks=new Map}return e.prototype.register=function(e,t){this._registeredCallbacks.has(e)||this._registeredCallbacks.set(e,t)},e.prototype.consume=function(e){var t=this._registeredCallbacks.get(e);if(!t)throw new Error(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(B,function(e,n){return null===t[n]?"":""+t[n]})}("View with id {0} must be registered before being used",e));return this._registeredCallbacks.delete(e),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._registeredCallbacks.size},enumerable:!1,configurable:!0}),e}(),V=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=new Array,this._viewCache=new Map,this._viewRegistry=new j}return e.prototype.register=function(e,t){this._viewRegistry.register(e,t)},e.prototype.push=function(e,t){void 0===t&&(t=!1),this._push(e),this._handleStackChangedCallback(t)},e.prototype.replace=function(e,t){void 0===t&&(t=!1),this._pop(),this._push(e),this._handleStackChangedCallback(t)},e.prototype.pop=function(e){void 0===e&&(e=!1),this.size>1&&(this._pop(),this._handleStackChangedCallback(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this._viewStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentId",{get:function(){var e=this.size;return e?this._viewStack[e-1]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_currentView",{get:function(){return this._viewCache.get(this._viewStack[this.size-1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewStack",{get:function(){return this._viewStack},enumerable:!1,configurable:!0}),e.prototype._clear=function(){this._viewStack=[]},e.prototype._forEach=function(e){this._viewCache.forEach(e)},e.prototype._getRegistrySize=function(){return this._viewRegistry.size},e.prototype._push=function(e){if(void 0===this._viewCache.get(e)){var t=this._viewRegistry.consume(e)();this._handleInitializeCallback(t),this._viewCache.set(e,t)}this._viewStack.push(e)},e.prototype._pop=function(){this._viewStack.pop()},e}(),z=function(e){function t(t,n,a){var i=e.call(this,t,n)||this;return i._closeQuickViewCallback=a,i}return Object(a.__extends)(t,e),t.prototype.close=function(){this._closeQuickViewCallback()},t}(V),G=function(e){function t(){var t=e.call(this)||this;return t._isInitialized=!1,t._getCard=function(e){try{return S(t._cardNavigator._currentView,t.cardSize,t.context.deviceContext,e?t._ACRenderArgs.card.template:void 0,t.iconProperty,t.title)}catch(e){throw t.context._host.onError(e.toString()),e}},t._onViewInitialized=function(e){e._state=t.state,e._ace=t,e._properties=t.properties,e._getCardSize=function(){return t.cardSize},e._context=t.context},t._navigatorCallback=function(e){e||t.update(t._renderType)},t._closeQuickViewCallback=function(){t.context._host.requestRenderTypeChange("Card",t.instanceId)},t._cardSize="Medium",t._renderType="Card",t._isVisible=!0,t._cardNavigator=new V(t._navigatorCallback,t._onViewInitialized),t._quickViewNavigator=new z(t._navigatorCallback,t._onViewInitialized,t._closeQuickViewCallback),t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardNavigator",{get:function(){return this._cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cardSize",{get:function(){return this._cardSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return c.Version.parse("1.0")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayMode",{get:function(){return this._displayMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quickViewNavigator",{get:function(){return this._quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedFromPersistedData",{get:function(){return this._renderedFromPersistedData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedOnce",{get:function(){return this._renderedOnce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderType",{get:function(){return this._renderType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertiesMetadata",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){if(this._state)throw new Error("state can only be initialized once");this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconProperty",{get:function(){return this._iconProperty},enumerable:!1,configurable:!0}),t.prototype.getPropertyPaneConfiguration=function(){return{pages:[]}},t.prototype.loadPropertyPaneResources=function(){return Promise.resolve()},t.prototype.getCacheSettings=function(){return{}},t.prototype.getCachedState=function(e){return{}},t.prototype._internalOnAction=function(e){("Card"===this.renderType?this._cardNavigator:this._quickViewNavigator)._currentView.onAction(e)},t.prototype.onBeforeSerialize=function(){},t.prototype.onAfterPropertiesUpdatedExternally=function(e){},t.prototype.onAfterDeserialize=function(e,t){return e},t.prototype.onDisplayModeChanged=function(e){},t.prototype.onDispose=function(){},t.prototype.onInit=function(e){return Promise.resolve()},t.prototype.onPropertyPaneFieldChanged=function(e,t,n){},t.prototype.onRenderTypeChanged=function(e){},t.prototype.renderCard=function(){},t.prototype._getPreFrameworkPropertyPaneConfiguration=function(){return[]},Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,(this.cardNavigator._getRegistrySize()>0||this.cardNavigator._currentView)&&this.context._host.onVisibilityChanged(this._getRenderArguments(this.renderType))},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){if(!this._state)throw new Error("state must be initialized before calling setState");e&&(this._state=Object(a.__assign)(Object(a.__assign)({},this.state),Object(p.cloneDeep)(e)),this._cardNavigator._forEach(this._onViewInitialized),this._quickViewNavigator._forEach(this._onViewInitialized)),(u()||this._isInitialized)&&this.context._host.update(this._getRenderArguments(this._renderType))},t.prototype.update=function(e,t){void 0===t&&(t=!1);var n=this._getRenderArguments(e,t);this.context._host.update(n)},t.prototype._getRenderArguments=function(e,t){var n,i=this;if(void 0===t&&(t=!1),"Card"===e&&0===this.cardNavigator.size){var r=this.renderCard();r||(r="_InternalDefaultCardView",this._cardNavigator.register(r,function(){return new N(i.description)})),this._cardNavigator.push(r,!0)}if(void 0===this._ACRenderArgs?this._ACRenderArgs={card:"Card"===e?this._getCard(t):void 0,isVisible:this._isVisible,instanceId:this.instanceId,lastUpdatedType:e,quickLook:"QuickView"===e?this._getQuickView(t):void 0}:this._updateRenderArgs(e,t),_()&&this.displayMode===c.DisplayMode.Read&&"Card"===e){var o=null===(n=this._cacheManager)||void 0===n?void 0:n.save(this.instanceId,this._cardNavigator._currentView,this._ACRenderArgs,this.cardNavigator.viewStack,this.getCachedState(Object(a.__assign)({},this._state)));this._ACRenderArgs.cacheObject=o}return this._ACRenderArgs},t.prototype._propertiesMetadata=function(){return l()?void 0:this.propertiesMetadata},t.prototype._getPropertyPaneConfiguration=function(){return this.getPropertyPaneConfiguration()},t.prototype._internalDeserialize=function(e){e.title&&(this._title=e.title),e.iconProperty&&(this._iconProperty=e.iconProperty),e.description&&(this._description=e.description),e.cardSize&&(this._cardSize=e.cardSize);var t=e.properties;!l()&&this.renderedFromPersistedData&&(i._PropertyMetadataProcessor.reInstateServerProcessedData(this.propertiesMetadata,t,e.serverProcessedContent),e.serverProcessedContent=void 0),this._properties?Object.assign(this._properties,t):this._properties=this.onAfterDeserialize(t,e.dataVersion?c.Version.parse(e.dataVersion):this.dataVersion)},t.prototype._internalInitialize=function(t,n,a){var i=this;e.prototype._initializeContext.call(this,t),this._displayMode=a,this._renderedOnce=!1,this._renderedFromPersistedData=n,_()&&(this._cacheManager=new C(this.context,function(){return i.cardSize},function(){return i.iconProperty},function(){return i.title},this._onViewInitialized,this.getCacheSettings()))},t.prototype._internalSetDisplayMode=function(e){if(this._displayMode!==e){var t=this._displayMode;this._displayMode=e,this.onDisplayModeChanged(t)}},t.prototype._loadPropertyPaneResources=function(){return this.loadPropertyPaneResources()},t.prototype._onPropertyPaneFieldChanged=function(e,t,n){Object(p.isEqual)(t,n)||(this._updateProperty(e,n),this.onPropertyPaneFieldChanged(e,t,n))},t.prototype._renderCompleted=function(){this._renderedOnce=!0},t.prototype._internalOnAfterInit=function(){this._isInitialized=!0},t.prototype._internalSerialize=function(){return this.onBeforeSerialize(),{dataVersion:this.dataVersion.toString(),id:this.componentId,instanceId:this.instanceId,properties:this.properties,title:this.title,description:this._description,iconProperty:this.iconProperty,cardSize:this._cardSize}},t.prototype._setRenderType=function(e,t){if(this._renderType!==e){var n=this._renderType;"QuickView"===n&&this._quickViewNavigator._clear(),"Card"===n&&(this._quickViewNavigator._clear(),void 0!==t&&this._quickViewNavigator.push(t,!0)),this._renderType=e,this.onRenderTypeChanged(n)}},t.prototype._updateConfigurableFields=function(e,t){switch(e){case"cardSize":this._cardSize=t}},t.prototype._logCardActionEngagement=function(e,t,n,a,i){var r,o,s,c,l,u,f;d._EngagementLogger.log({name:"AdaptiveCardExtension.CardAction",isIntentional:!0,siteId:null===(o=null===(r=this.context.pageContext)||void 0===r?void 0:r.site)||void 0===o?void 0:o.id.toString(),webId:null===(c=null===(s=this.context.pageContext)||void 0===s?void 0:s.web)||void 0===c?void 0:c.id.toString(),extraData:{ActionType:e,Alias:this.manifest.alias,DeviceContext:n,IsInternal:this.manifest.isInternal,InstanceId:this.instanceId,ItemLocation:t,WorkLoad:t,TenantID:null===(f=null===(u=null===(l=this.context.pageContext)||void 0===l?void 0:l.aadInfo)||void 0===u?void 0:u.tenantId)||void 0===f?void 0:f.toString().toLowerCase(),EventSchemaVersion:10,ManifestId:this.manifest.id,MobileSessionId:a,MobileBootType:i,MPNId:this.manifest.mpnId}})},t.prototype._getQuickView=function(e){if(0!==this._quickViewNavigator.size){var t=this._quickViewNavigator._currentView;if(void 0!==t)return y(t.externalLink,this.context.deviceContext),{data:t.data,template:e?this._ACRenderArgs.quickLook.template:t.template,pageBarProperties:{externalLink:t.externalLink,leftNavigationButtonType:this._quickViewNavigator.size>1?"Back":"Close",title:t.title}}}},t.prototype._updateRenderArgs=function(e,t){this._ACRenderArgs.lastUpdatedType=e,this._ACRenderArgs.isVisible=this._isVisible,"Card"===e?this._ACRenderArgs.card=this._getCard(t):this._ACRenderArgs.quickLook=this._getQuickView(t)},t.prototype._updateProperty=function(e,t){Object(p.update)(this._properties,e,function(){return t})},t}(i.BaseComponent);!function(e){e[e.Image=1]="Image",e[e.Audio=4]="Audio"}(D||(D={}));var K=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Image",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(k,T)},enumerable:!1,configurable:!0}),t}(H),W=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="PrimaryText",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(M,U)},enumerable:!1,configurable:!0}),t}(H),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"externalLink",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return""},enumerable:!1,configurable:!0}),t}(F)},ut3N:function(e,t){e.exports=s}})});
@@ -1 +0,0 @@
1
- define("eeec822e-c28a-46b4-affc-7058e4c1aa80_1.13.1",["tslib","@microsoft/sp-component-base","@microsoft/sp-loader","@microsoft/sp-lodash-subset","@microsoft/sp-core-library","@microsoft/sp-diagnostics"],function(n,a,i,r,o,s){return function(e){var t={};function n(a){if(t[a])return t[a].exports;var i=t[a]={i:a,l:!1,exports:{}};return e[a].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,a){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:a})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var a=Object.create(null);if(n.r(a),Object.defineProperty(a,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(a,i,function(t){return e[t]}.bind(null,i));return a},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s="mwqp")}({"17wl":function(e,t){e.exports=n},"7Awa":function(e,t){e.exports=a},I6O9:function(e,t){e.exports=i},Pk8u:function(e,t){e.exports=r},UWqr:function(e,t){e.exports=o},mGD9:function(e){e.exports=JSON.parse('{"t":"[!!--##Àćţĩōń Ĩď: \\u0027{0}\\u0027 ţàŕĝēţ ŨŔĹ śĥōũĺď ńōţ ƀē ũńďēƒĩńēď ōŕ ēmƥţŷ śţŕĩńĝ. ##--!!]","e":"[!!--##Àďàƥţĩvē ćàŕď ēxţēńśĩōń ĩćōń.##--!!]"}')},mwqp:function(e,t,n){"use strict";n.r(t),n.d(t,"AdaptiveCardExtensionContext",function(){return r}),n.d(t,"_AdaptiveCardExtensionHost",function(){return o}),n.d(t,"_AdaptiveCardExtensionLoader",function(){return f}),n.d(t,"BaseAdaptiveCardExtension",function(){return G}),n.d(t,"_BaseAdaptiveCardExtensionCache",function(){return I}),n.d(t,"_LocalStorageACECache",function(){return x}),n.d(t,"MediaType",function(){return D}),n.d(t,"BaseView",function(){return F}),n.d(t,"BaseBasicCardView",function(){return R}),n.d(t,"BaseCardView",function(){return H}),n.d(t,"BaseImageCardView",function(){return K}),n.d(t,"BasePrimaryTextCardView",function(){return W}),n.d(t,"QuickViewNavigator",function(){return z}),n.d(t,"ViewNavigator",function(){return V}),n.d(t,"BaseAdaptiveCardView",function(){return q});var a=n("17wl"),i=n("7Awa"),r=function(e){function t(t){var n=e.call(this,t)||this;return n._aceHost=t.host,n.manifest=t.manifest,n._deviceContext=t.deviceContext,n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"_host",{get:function(){return this._aceHost},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertyPane",{get:function(){return this._host.propertyPane},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"deviceContext",{get:function(){return this._deviceContext},enumerable:!1,configurable:!0}),t}(i.BaseComponentContext),o=function(){function e(e){this._onBeforeInitializedCallback=e.onBeforeInitializedCallback,this._onUpdateCallback=e.onUpdateCallback,this._onErrorCallback=e.onError,this._onRequestRenderTypeCallback=e.onRequestRenderTypeCallback,this._onVisibilityChanged=e.onVisibilityChanged,this._cache=e.cache,this.propertyPane=e.propertyPane}return e.prototype.update=function(e){this._onUpdateCallback(e)},e.prototype.onBeforeInitialized=function(e){this._onBeforeInitializedCallback&&this._onBeforeInitializedCallback(e)},e.prototype.onError=function(e){this._onErrorCallback&&this._onErrorCallback(e)},e.prototype.requestRenderTypeChange=function(e,t){this._onRequestRenderTypeCallback(e,t)},Object.defineProperty(e.prototype,"cache",{get:function(){return this._cache},enumerable:!1,configurable:!0}),e.prototype.onVisibilityChanged=function(e){this._onVisibilityChanged(e)},e}(),s=n("I6O9"),c=n("UWqr"),d=n("ut3N");function l(){return c._SPKillSwitch.isActivated("6ca4b572-5356-4763-87bb-1e80205bfa6b")}function u(){return c._SPKillSwitch.isActivated("00be0ead-6f25-4d07-8cef-9840d5522e49")}var f=function(){function e(){}return e._createQosExtraData=function(e,t){return{alias:e.alias,manifestId:e.id,mpnId:e.mpnId,isInternal:e.isInternal,teamsHosted:c._BrowserUtilities.isTeamsHosted(),deviceContext:t}},e.prototype.load=function(t){var n,a,i=this,r=new d._QosMonitor("AdaptiveCardExtension.Load",!0),o=e._createQosExtraData(t.manifest,t.deviceContext);return s.SPComponentLoader.loadComponent(t.manifest).then(function(e){return e.default&&(e=e.default),new e}).catch(function(e){throw r.writeUnexpectedFailure("AdaptiveCardExtensionLoadFailed",e,o),n=e,e}).then(function(e){(a=e)._internalInitialize(i._getContext(t),t.addedFromPersistedData,t.initialDisplayMode),a._internalDeserialize(t.aceData),t.host.onBeforeInitialized(a);var n,r=t.cacheObject?{state:(n=t.cacheObject).cachedState,cardNavigatorState:n.cardNavigatorState}:void 0;return a.onInit(r)}).then(function(){return r.writeSuccess(o),u()||a._internalOnAfterInit(),a}).catch(function(e){throw n||r.writeUnexpectedFailure("AdaptiveCardExtensionInitializationFailed",e,o),e})},e.prototype._getContext=function(e){return new r({host:e.host,manifest:e.manifest,instanceId:e.instanceId,parentServiceScope:e.serviceScope,loggingTag:"",deviceContext:e.deviceContext})},e}(),p=n("Pk8u");function m(){return c._SPFlight.isEnabled(60544)}function _(){return c._SPFlight.isEnabled(60456)}var h=n("mGD9"),b=new RegExp(/(?=.+)(\/l\/entity\/.+)/gi),g={Medium:1,Large:2};function v(e,t,n,a,i){var r,o;if("Submit"===t.type)(o=t).confirmationDialog&&(o.parameters||(o.parameters={}),o.parameters.__MSConfirmationDialog__=o.confirmationDialog),r={id:n,type:"Action.Submit",style:i,title:a,data:t.parameters||void 0};else if("ExternalLink"===t.type){y(t.parameters,e);var s=t.parameters.target;if(!s||""===s)throw new Error(c.Text.format(h.t,n));r={id:n,type:"Action.OpenUrl",style:i,title:a,url:s}}else"QuickView"===t.type?r={id:n,type:"Action.Submit",style:i,title:a,data:{_internalQuickViewId:t.parameters.view}}:c._SPFlight.isEnabled(60447)&&"VivaAction.SelectMedia"===t.type?r={id:n,type:"VivaAction.SelectMedia",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.GetLocation"===t.type?r={id:n,type:"VivaAction.GetLocation",style:i,title:a,parameters:t.parameters}:m()&&"VivaAction.ShowLocation"===t.type&&(r={id:n,type:"VivaAction.ShowLocation",style:i,title:a,parameters:t.parameters});return r}function y(e,t){if(e&&e.isTeamsDeepLink&&"WebView"===t){var n=e.target.match(b);n&&n[0]&&(e.target="msteams:"+n[0])}}function S(e,t,n,i,r,o){var s,c=e.cardButtons,d=e.data,l=e.onCardSelection,u=e._templateType;if(i||(i=e.template),void 0===c||"Image"===u&&"Large"!==t||function(e,t,n,a){for(var i=[],r=Math.min(g[n],(null==t?void 0:t.length)||0),o=0;o<r;o++){var s=t[o],c=s.id?s.id:"ac-button-"+o;i.push(v(a,s.action,c,s.title,s.style))}e.actions=i}(i,c,t,n),l){var f=v(n,l,"select-action");"Action.OpenUrl"!==f.type&&"Action.Submit"!==f.type||(s=f)}return{data:Object(a.__assign)({selectAction:s,iconProperty:r,iconAltText:d.iconAltText||h.e,title:o},d),template:i,cardProperties:{iconProperty:d.iconProperty||r,size:t,title:d.title||o,templateType:u}}}var D,I=function(){function e(){}return e.prototype.get=function(e,t){var n=this.getFromSource(e,t);if(n)return(new Date).getTime()<n.expirationTime?n:void 0},e}(),x=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),t.getKey=function(e,t){return"AdaptiveCardExtension_LKG_"+e+"_"+t},Object.defineProperty(t,"instance",{get:function(){return void 0===this._instance&&(this._instance=new t),this._instance},enumerable:!1,configurable:!0}),t.prototype.save=function(e,t,n){var a=this._getLocalStorageEntry(e);a.set(t,n);var i=Array.from(a.entries());localStorage.setItem(e,JSON.stringify(i))},t.prototype.getFromSource=function(e,t){return this._getLocalStorageEntry(e).get(t)},t.prototype._getLocalStorageEntry=function(e){var t=localStorage.getItem(e);return t?new Map(JSON.parse(t)):new Map},t}(I),C=function(){function e(e,t,n,i,r,o){this._context=e,this._getCardSize=t,this._getIconProperty=n,this._getTitle=i,this._handleInitializeCallback=r,this._settings=Object(a.__assign)(Object(a.__assign)({},this._defaultCacheSettings()),o)}return e.prototype.save=function(e,t,n,a,i){var r,o,s;if(this._settings.isEnabled){var c=this._initializeCustomCardView();if(c&&c.isCacheEnabled||!c&&t.isCacheEnabled){var d=c?S(c,this._getCardSize(),this._context.deviceContext,void 0,this._getIconProperty(),this._getTitle()):n.card;s=this._createCacheObject(n,d,a,i),null===(r=this._context._host.cache)||void 0===r||r.save(x.getKey(this._context.pageContext.site.id.toString(),null===(o=this._context.pageContext.listItem)||void 0===o?void 0:o.uniqueId),e,s)}}return s},e.prototype._createCacheObject=function(e,t,n,a){return{cachedCard:t,cardNavigatorState:n,isVisible:e.isVisible,cachedState:a,expirationTime:(new Date).getTime()+1e3*this._settings.expiryTimeInSeconds}},e.prototype._initializeCustomCardView=function(){if(this._settings.cachedCardView){var e=this._settings.cachedCardView();return this._handleInitializeCallback(e),e}},e.prototype._defaultCacheSettings=function(){return{isEnabled:!0,expiryTimeInSeconds:86400,cachedCardView:void 0}},e}(),O={type:"TextBlock",subType:"Primary",text:"${primaryText}",weight:"Bolder",maxLines:1,spacing:"none"},w={type:"TextBlock",subType:"BodySecondary",text:"${description}",spacing:"none",wrap:!0},E={type:"TextBlock",subType:"BodyPrimary",text:"${primaryText}",spacing:"none",wrap:!0},A={type:"TextBlock",subType:"Title",text:"${title}",wrap:!1,maxLines:1,spacing:"none"},L={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},k={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},M={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},P={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},T={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"Image",url:"${imageUrl}"},{type:"ColumnSet",spacing:"none",columns:[{type:"Column",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},E]}]},U={$schema:"http://adaptivecards.io/schemas/adaptive-card.json",type:"AdaptiveCard",version:"1.2",body:[{type:"Container",selectAction:"${selectAction}",items:[{type:"ColumnSet",columns:[{type:"Column",spacing:"none",items:[{type:"Icon",iconProperty:"${iconProperty}",altText:"${iconAltText}"}],width:"auto"},{type:"Column",spacing:"none",items:[A],width:"stretch"}]},{type:"Container",spacing:"none",items:[O,w]}]}]},F=function(){function e(){}return Object.defineProperty(e.prototype,"cardNavigator",{get:function(){return this._ace.cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"quickViewNavigator",{get:function(){return this._ace.quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"cardSize",{get:function(){return this._getCardSize()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"context",{get:function(){return this._context},enumerable:!1,configurable:!0}),e.prototype.onAction=function(e){},e.prototype.setState=function(e){this._ace.setState(e)},e.prototype.setVisibility=function(e){this._ace.isVisible=e},e}(),H=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardButtons",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"onCardSelection",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isCacheEnabled",{get:function(){return!0},enumerable:!1,configurable:!0}),t.prototype._getTemplate=function(e,t){return Object(p.cloneDeep)(this.onCardSelection?t:e)},t}(F),R=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Basic",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(L,P)},enumerable:!1,configurable:!0}),t}(H),N=function(e){function t(t){var n=e.call(this)||this;return n._primaryText=t,n._templateType="Basic",n}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{primaryText:this._primaryText}},enumerable:!1,configurable:!0}),t}(R),B=/\{(\d+)\}/g,j=function(){function e(){this._registeredCallbacks=new Map}return e.prototype.register=function(e,t){this._registeredCallbacks.has(e)||this._registeredCallbacks.set(e,t)},e.prototype.consume=function(e){var t=this._registeredCallbacks.get(e);if(!t)throw new Error(function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.replace(B,function(e,n){return null===t[n]?"":""+t[n]})}("View with id {0} must be registered before being used",e));return this._registeredCallbacks.delete(e),t},Object.defineProperty(e.prototype,"size",{get:function(){return this._registeredCallbacks.size},enumerable:!1,configurable:!0}),e}(),V=function(){function e(e,t){this._handleStackChangedCallback=e,this._handleInitializeCallback=t,this._viewStack=new Array,this._viewCache=new Map,this._viewRegistry=new j}return e.prototype.register=function(e,t){this._viewRegistry.register(e,t)},e.prototype.push=function(e,t){void 0===t&&(t=!1),this._push(e),this._handleStackChangedCallback(t)},e.prototype.replace=function(e,t){void 0===t&&(t=!1),this._pop(),this._push(e),this._handleStackChangedCallback(t)},e.prototype.pop=function(e){void 0===e&&(e=!1),this.size>1&&(this._pop(),this._handleStackChangedCallback(e))},Object.defineProperty(e.prototype,"size",{get:function(){return this._viewStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentId",{get:function(){var e=this.size;return e?this._viewStack[e-1]:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"_currentView",{get:function(){return this._viewCache.get(this._viewStack[this.size-1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"viewStack",{get:function(){return this._viewStack},enumerable:!1,configurable:!0}),e.prototype._clear=function(){this._viewStack=[]},e.prototype._forEach=function(e){this._viewCache.forEach(e)},e.prototype._getRegistrySize=function(){return this._viewRegistry.size},e.prototype._push=function(e){if(void 0===this._viewCache.get(e)){var t=this._viewRegistry.consume(e)();this._handleInitializeCallback(t),this._viewCache.set(e,t)}this._viewStack.push(e)},e.prototype._pop=function(){this._viewStack.pop()},e}(),z=function(e){function t(t,n,a){var i=e.call(this,t,n)||this;return i._closeQuickViewCallback=a,i}return Object(a.__extends)(t,e),t.prototype.close=function(){this._closeQuickViewCallback()},t}(V),G=function(e){function t(){var t=e.call(this)||this;return t._isInitialized=!1,t._getCard=function(e){try{return S(t._cardNavigator._currentView,t.cardSize,t.context.deviceContext,e?t._ACRenderArgs.card.template:void 0,t.iconProperty,t.title)}catch(e){throw t.context._host.onError(e.toString()),e}},t._onViewInitialized=function(e){e._state=t.state,e._ace=t,e._properties=t.properties,e._getCardSize=function(){return t.cardSize},e._context=t.context},t._navigatorCallback=function(e){e||t.update(t._renderType)},t._closeQuickViewCallback=function(){t.context._host.requestRenderTypeChange("Card",t.instanceId)},t._cardSize="Medium",t._renderType="Card",t._isVisible=!0,t._cardNavigator=new V(t._navigatorCallback,t._onViewInitialized),t._quickViewNavigator=new z(t._navigatorCallback,t._onViewInitialized,t._closeQuickViewCallback),t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"cardNavigator",{get:function(){return this._cardNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"cardSize",{get:function(){return this._cardSize},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dataVersion",{get:function(){return c.Version.parse("1.0")},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"description",{get:function(){return this._description},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"displayMode",{get:function(){return this._displayMode},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"properties",{get:function(){return this._properties},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"quickViewNavigator",{get:function(){return this._quickViewNavigator},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedFromPersistedData",{get:function(){return this._renderedFromPersistedData},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderedOnce",{get:function(){return this._renderedOnce},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"renderType",{get:function(){return this._renderType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"propertiesMetadata",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},set:function(e){if(this._state)throw new Error("state can only be initialized once");this._state=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return this._title},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"iconProperty",{get:function(){return this._iconProperty},enumerable:!1,configurable:!0}),t.prototype.getPropertyPaneConfiguration=function(){return{pages:[]}},t.prototype.loadPropertyPaneResources=function(){return Promise.resolve()},t.prototype.getCacheSettings=function(){return{}},t.prototype.getCachedState=function(e){return{}},t.prototype._internalOnAction=function(e){("Card"===this.renderType?this._cardNavigator:this._quickViewNavigator)._currentView.onAction(e)},t.prototype.onBeforeSerialize=function(){},t.prototype.onAfterPropertiesUpdatedExternally=function(e){},t.prototype.onAfterDeserialize=function(e,t){return e},t.prototype.onDisplayModeChanged=function(e){},t.prototype.onDispose=function(){},t.prototype.onInit=function(e){return Promise.resolve()},t.prototype.onPropertyPaneFieldChanged=function(e,t,n){},t.prototype.onRenderTypeChanged=function(e){},t.prototype.renderCard=function(){},t.prototype._getPreFrameworkPropertyPaneConfiguration=function(){return[]},Object.defineProperty(t.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,(this.cardNavigator._getRegistrySize()>0||this.cardNavigator._currentView)&&this.context._host.onVisibilityChanged(this._getRenderArguments(this.renderType))},enumerable:!1,configurable:!0}),t.prototype.setState=function(e){if(!this._state)throw new Error("state must be initialized before calling setState");e&&(this._state=Object(a.__assign)(Object(a.__assign)({},this.state),Object(p.cloneDeep)(e)),this._cardNavigator._forEach(this._onViewInitialized),this._quickViewNavigator._forEach(this._onViewInitialized)),(u()||this._isInitialized)&&this.context._host.update(this._getRenderArguments(this._renderType))},t.prototype.update=function(e,t){void 0===t&&(t=!1);var n=this._getRenderArguments(e,t);this.context._host.update(n)},t.prototype._getRenderArguments=function(e,t){var n,i=this;if(void 0===t&&(t=!1),"Card"===e&&0===this.cardNavigator.size){var r=this.renderCard();r||(r="_InternalDefaultCardView",this._cardNavigator.register(r,function(){return new N(i.description)})),this._cardNavigator.push(r,!0)}if(void 0===this._ACRenderArgs?this._ACRenderArgs={card:"Card"===e?this._getCard(t):void 0,isVisible:this._isVisible,instanceId:this.instanceId,lastUpdatedType:e,quickLook:"QuickView"===e?this._getQuickView(t):void 0}:this._updateRenderArgs(e,t),_()&&this.displayMode===c.DisplayMode.Read&&"Card"===e){var o=null===(n=this._cacheManager)||void 0===n?void 0:n.save(this.instanceId,this._cardNavigator._currentView,this._ACRenderArgs,this.cardNavigator.viewStack,this.getCachedState(Object(a.__assign)({},this._state)));this._ACRenderArgs.cacheObject=o}return this._ACRenderArgs},t.prototype._propertiesMetadata=function(){return l()?void 0:this.propertiesMetadata},t.prototype._getPropertyPaneConfiguration=function(){return this.getPropertyPaneConfiguration()},t.prototype._internalDeserialize=function(e){e.title&&(this._title=e.title),e.iconProperty&&(this._iconProperty=e.iconProperty),e.description&&(this._description=e.description),e.cardSize&&(this._cardSize=e.cardSize);var t=e.properties;!l()&&this.renderedFromPersistedData&&(i._PropertyMetadataProcessor.reInstateServerProcessedData(this.propertiesMetadata,t,e.serverProcessedContent),e.serverProcessedContent=void 0),this._properties?Object.assign(this._properties,t):this._properties=this.onAfterDeserialize(t,e.dataVersion?c.Version.parse(e.dataVersion):this.dataVersion)},t.prototype._internalInitialize=function(t,n,a){var i=this;e.prototype._initializeContext.call(this,t),this._displayMode=a,this._renderedOnce=!1,this._renderedFromPersistedData=n,_()&&(this._cacheManager=new C(this.context,function(){return i.cardSize},function(){return i.iconProperty},function(){return i.title},this._onViewInitialized,this.getCacheSettings()))},t.prototype._internalSetDisplayMode=function(e){if(this._displayMode!==e){var t=this._displayMode;this._displayMode=e,this.onDisplayModeChanged(t)}},t.prototype._loadPropertyPaneResources=function(){return this.loadPropertyPaneResources()},t.prototype._onPropertyPaneFieldChanged=function(e,t,n){Object(p.isEqual)(t,n)||(this._updateProperty(e,n),this.onPropertyPaneFieldChanged(e,t,n))},t.prototype._renderCompleted=function(){this._renderedOnce=!0},t.prototype._internalOnAfterInit=function(){this._isInitialized=!0},t.prototype._internalSerialize=function(){return this.onBeforeSerialize(),{dataVersion:this.dataVersion.toString(),id:this.componentId,instanceId:this.instanceId,properties:this.properties,title:this.title,description:this._description,iconProperty:this.iconProperty,cardSize:this._cardSize}},t.prototype._setRenderType=function(e,t){if(this._renderType!==e){var n=this._renderType;"QuickView"===n&&this._quickViewNavigator._clear(),"Card"===n&&(this._quickViewNavigator._clear(),void 0!==t&&this._quickViewNavigator.push(t,!0)),this._renderType=e,this.onRenderTypeChanged(n)}},t.prototype._updateConfigurableFields=function(e,t){switch(e){case"cardSize":this._cardSize=t}},t.prototype._logCardActionEngagement=function(e,t,n,a,i){var r,o,s,c,l,u,f;d._EngagementLogger.log({name:"AdaptiveCardExtension.CardAction",isIntentional:!0,siteId:null===(o=null===(r=this.context.pageContext)||void 0===r?void 0:r.site)||void 0===o?void 0:o.id.toString(),webId:null===(c=null===(s=this.context.pageContext)||void 0===s?void 0:s.web)||void 0===c?void 0:c.id.toString(),extraData:{ActionType:e,Alias:this.manifest.alias,DeviceContext:n,IsInternal:this.manifest.isInternal,InstanceId:this.instanceId,ItemLocation:t,WorkLoad:t,TenantID:null===(f=null===(u=null===(l=this.context.pageContext)||void 0===l?void 0:l.aadInfo)||void 0===u?void 0:u.tenantId)||void 0===f?void 0:f.toString().toLowerCase(),EventSchemaVersion:10,ManifestId:this.manifest.id,MobileSessionId:a,MobileBootType:i,MPNId:this.manifest.mpnId}})},t.prototype._getQuickView=function(e){if(0!==this._quickViewNavigator.size){var t=this._quickViewNavigator._currentView;if(void 0!==t)return y(t.externalLink,this.context.deviceContext),{data:t.data,template:e?this._ACRenderArgs.quickLook.template:t.template,pageBarProperties:{externalLink:t.externalLink,leftNavigationButtonType:this._quickViewNavigator.size>1?"Back":"Close",title:t.title}}}},t.prototype._updateRenderArgs=function(e,t){this._ACRenderArgs.lastUpdatedType=e,this._ACRenderArgs.isVisible=this._isVisible,"Card"===e?this._ACRenderArgs.card=this._getCard(t):this._ACRenderArgs.quickLook=this._getQuickView(t)},t.prototype._updateProperty=function(e,t){Object(p.update)(this._properties,e,function(){return t})},t}(i.BaseComponent);!function(e){e[e.Image=1]="Image",e[e.Audio=4]="Audio"}(D||(D={}));var K=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="Image",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(k,T)},enumerable:!1,configurable:!0}),t}(H),W=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._templateType="PrimaryText",t}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"template",{get:function(){return this._getTemplate(M,U)},enumerable:!1,configurable:!0}),t}(H),q=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Object(a.__extends)(t,e),Object.defineProperty(t.prototype,"data",{get:function(){return{}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"externalLink",{get:function(){},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"title",{get:function(){return""},enumerable:!1,configurable:!0}),t}(F)},ut3N:function(e,t){e.exports=s}})});