@microsoft/teams-js 2.3.1-beta.0 → 2.4.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,243 +11,171 @@
11
11
  return /******/ (() => { // webpackBootstrap
12
12
  /******/ var __webpack_modules__ = ({
13
13
 
14
- /***/ 22:
15
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
16
-
17
- var v1 = __webpack_require__(481);
18
- var v4 = __webpack_require__(426);
19
-
20
- var uuid = v4;
21
- uuid.v1 = v1;
22
- uuid.v4 = v4;
23
-
24
- module.exports = uuid;
25
-
26
-
27
- /***/ }),
28
-
29
- /***/ 725:
14
+ /***/ 378:
30
15
  /***/ ((module) => {
31
16
 
32
17
  /**
33
- * Convert array of 16 byte values to UUID string format of the form:
34
- * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
18
+ * Helpers.
35
19
  */
36
- var byteToHex = [];
37
- for (var i = 0; i < 256; ++i) {
38
- byteToHex[i] = (i + 0x100).toString(16).substr(1);
39
- }
40
-
41
- function bytesToUuid(buf, offset) {
42
- var i = offset || 0;
43
- var bth = byteToHex;
44
- // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
45
- return ([
46
- bth[buf[i++]], bth[buf[i++]],
47
- bth[buf[i++]], bth[buf[i++]], '-',
48
- bth[buf[i++]], bth[buf[i++]], '-',
49
- bth[buf[i++]], bth[buf[i++]], '-',
50
- bth[buf[i++]], bth[buf[i++]], '-',
51
- bth[buf[i++]], bth[buf[i++]],
52
- bth[buf[i++]], bth[buf[i++]],
53
- bth[buf[i++]], bth[buf[i++]]
54
- ]).join('');
55
- }
56
-
57
- module.exports = bytesToUuid;
58
-
59
-
60
- /***/ }),
61
-
62
- /***/ 157:
63
- /***/ ((module) => {
64
-
65
- // Unique ID creation requires a high quality random # generator. In the
66
- // browser this is a little complicated due to unknown quality of Math.random()
67
- // and inconsistent support for the `crypto` API. We do the best we can via
68
- // feature-detection
69
-
70
- // getRandomValues needs to be invoked in a context where "this" is a Crypto
71
- // implementation. Also, find the complete implementation of crypto on IE11.
72
- var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
73
- (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
74
-
75
- if (getRandomValues) {
76
- // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
77
- var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
78
-
79
- module.exports = function whatwgRNG() {
80
- getRandomValues(rnds8);
81
- return rnds8;
82
- };
83
- } else {
84
- // Math.random()-based (RNG)
85
- //
86
- // If all else fails, use Math.random(). It's fast, but is of unspecified
87
- // quality.
88
- var rnds = new Array(16);
89
-
90
- module.exports = function mathRNG() {
91
- for (var i = 0, r; i < 16; i++) {
92
- if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
93
- rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
94
- }
95
-
96
- return rnds;
97
- };
98
- }
99
-
100
-
101
- /***/ }),
102
-
103
- /***/ 481:
104
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
105
-
106
- var rng = __webpack_require__(157);
107
- var bytesToUuid = __webpack_require__(725);
108
20
 
109
- // **`v1()` - Generate time-based UUID**
110
- //
111
- // Inspired by https://github.com/LiosK/UUID.js
112
- // and http://docs.python.org/library/uuid.html
113
-
114
- var _nodeId;
115
- var _clockseq;
116
-
117
- // Previous uuid creation time
118
- var _lastMSecs = 0;
119
- var _lastNSecs = 0;
21
+ var s = 1000;
22
+ var m = s * 60;
23
+ var h = m * 60;
24
+ var d = h * 24;
25
+ var w = d * 7;
26
+ var y = d * 365.25;
120
27
 
121
- // See https://github.com/uuidjs/uuid for API details
122
- function v1(options, buf, offset) {
123
- var i = buf && offset || 0;
124
- var b = buf || [];
28
+ /**
29
+ * Parse or format the given `val`.
30
+ *
31
+ * Options:
32
+ *
33
+ * - `long` verbose formatting [false]
34
+ *
35
+ * @param {String|Number} val
36
+ * @param {Object} [options]
37
+ * @throws {Error} throw an error if val is not a non-empty string or a number
38
+ * @return {String|Number}
39
+ * @api public
40
+ */
125
41
 
42
+ module.exports = function(val, options) {
126
43
  options = options || {};
127
- var node = options.node || _nodeId;
128
- var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
129
-
130
- // node and clockseq need to be initialized to random values if they're not
131
- // specified. We do this lazily to minimize issues related to insufficient
132
- // system entropy. See #189
133
- if (node == null || clockseq == null) {
134
- var seedBytes = rng();
135
- if (node == null) {
136
- // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
137
- node = _nodeId = [
138
- seedBytes[0] | 0x01,
139
- seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
140
- ];
141
- }
142
- if (clockseq == null) {
143
- // Per 4.2.2, randomize (14 bit) clockseq
144
- clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
145
- }
44
+ var type = typeof val;
45
+ if (type === 'string' && val.length > 0) {
46
+ return parse(val);
47
+ } else if (type === 'number' && isFinite(val)) {
48
+ return options.long ? fmtLong(val) : fmtShort(val);
146
49
  }
50
+ throw new Error(
51
+ 'val is not a non-empty string or a valid number. val=' +
52
+ JSON.stringify(val)
53
+ );
54
+ };
147
55
 
148
- // UUID timestamps are 100 nano-second units since the Gregorian epoch,
149
- // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
150
- // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
151
- // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
152
- var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
153
-
154
- // Per 4.2.1.2, use count of uuid's generated during the current clock
155
- // cycle to simulate higher resolution clock
156
- var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
157
-
158
- // Time since last uuid creation (in msecs)
159
- var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
56
+ /**
57
+ * Parse the given `str` and return milliseconds.
58
+ *
59
+ * @param {String} str
60
+ * @return {Number}
61
+ * @api private
62
+ */
160
63
 
161
- // Per 4.2.1.2, Bump clockseq on clock regression
162
- if (dt < 0 && options.clockseq === undefined) {
163
- clockseq = clockseq + 1 & 0x3fff;
64
+ function parse(str) {
65
+ str = String(str);
66
+ if (str.length > 100) {
67
+ return;
164
68
  }
165
-
166
- // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
167
- // time interval
168
- if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
169
- nsecs = 0;
69
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
70
+ str
71
+ );
72
+ if (!match) {
73
+ return;
170
74
  }
171
-
172
- // Per 4.2.1.2 Throw error if too many uuids are requested
173
- if (nsecs >= 10000) {
174
- throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
75
+ var n = parseFloat(match[1]);
76
+ var type = (match[2] || 'ms').toLowerCase();
77
+ switch (type) {
78
+ case 'years':
79
+ case 'year':
80
+ case 'yrs':
81
+ case 'yr':
82
+ case 'y':
83
+ return n * y;
84
+ case 'weeks':
85
+ case 'week':
86
+ case 'w':
87
+ return n * w;
88
+ case 'days':
89
+ case 'day':
90
+ case 'd':
91
+ return n * d;
92
+ case 'hours':
93
+ case 'hour':
94
+ case 'hrs':
95
+ case 'hr':
96
+ case 'h':
97
+ return n * h;
98
+ case 'minutes':
99
+ case 'minute':
100
+ case 'mins':
101
+ case 'min':
102
+ case 'm':
103
+ return n * m;
104
+ case 'seconds':
105
+ case 'second':
106
+ case 'secs':
107
+ case 'sec':
108
+ case 's':
109
+ return n * s;
110
+ case 'milliseconds':
111
+ case 'millisecond':
112
+ case 'msecs':
113
+ case 'msec':
114
+ case 'ms':
115
+ return n;
116
+ default:
117
+ return undefined;
175
118
  }
119
+ }
176
120
 
177
- _lastMSecs = msecs;
178
- _lastNSecs = nsecs;
179
- _clockseq = clockseq;
180
-
181
- // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
182
- msecs += 12219292800000;
183
-
184
- // `time_low`
185
- var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
186
- b[i++] = tl >>> 24 & 0xff;
187
- b[i++] = tl >>> 16 & 0xff;
188
- b[i++] = tl >>> 8 & 0xff;
189
- b[i++] = tl & 0xff;
190
-
191
- // `time_mid`
192
- var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
193
- b[i++] = tmh >>> 8 & 0xff;
194
- b[i++] = tmh & 0xff;
195
-
196
- // `time_high_and_version`
197
- b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
198
- b[i++] = tmh >>> 16 & 0xff;
199
-
200
- // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
201
- b[i++] = clockseq >>> 8 | 0x80;
202
-
203
- // `clock_seq_low`
204
- b[i++] = clockseq & 0xff;
121
+ /**
122
+ * Short format for `ms`.
123
+ *
124
+ * @param {Number} ms
125
+ * @return {String}
126
+ * @api private
127
+ */
205
128
 
206
- // `node`
207
- for (var n = 0; n < 6; ++n) {
208
- b[i + n] = node[n];
129
+ function fmtShort(ms) {
130
+ var msAbs = Math.abs(ms);
131
+ if (msAbs >= d) {
132
+ return Math.round(ms / d) + 'd';
209
133
  }
210
-
211
- return buf ? buf : bytesToUuid(b);
134
+ if (msAbs >= h) {
135
+ return Math.round(ms / h) + 'h';
136
+ }
137
+ if (msAbs >= m) {
138
+ return Math.round(ms / m) + 'm';
139
+ }
140
+ if (msAbs >= s) {
141
+ return Math.round(ms / s) + 's';
142
+ }
143
+ return ms + 'ms';
212
144
  }
213
145
 
214
- module.exports = v1;
215
-
216
-
217
- /***/ }),
218
-
219
- /***/ 426:
220
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
221
-
222
- var rng = __webpack_require__(157);
223
- var bytesToUuid = __webpack_require__(725);
224
-
225
- function v4(options, buf, offset) {
226
- var i = buf && offset || 0;
146
+ /**
147
+ * Long format for `ms`.
148
+ *
149
+ * @param {Number} ms
150
+ * @return {String}
151
+ * @api private
152
+ */
227
153
 
228
- if (typeof(options) == 'string') {
229
- buf = options === 'binary' ? new Array(16) : null;
230
- options = null;
154
+ function fmtLong(ms) {
155
+ var msAbs = Math.abs(ms);
156
+ if (msAbs >= d) {
157
+ return plural(ms, msAbs, d, 'day');
231
158
  }
232
- options = options || {};
233
-
234
- var rnds = options.random || (options.rng || rng)();
235
-
236
- // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
237
- rnds[6] = (rnds[6] & 0x0f) | 0x40;
238
- rnds[8] = (rnds[8] & 0x3f) | 0x80;
239
-
240
- // Copy bytes to buffer, if provided
241
- if (buf) {
242
- for (var ii = 0; ii < 16; ++ii) {
243
- buf[i + ii] = rnds[ii];
244
- }
159
+ if (msAbs >= h) {
160
+ return plural(ms, msAbs, h, 'hour');
245
161
  }
246
-
247
- return buf || bytesToUuid(rnds);
162
+ if (msAbs >= m) {
163
+ return plural(ms, msAbs, m, 'minute');
164
+ }
165
+ if (msAbs >= s) {
166
+ return plural(ms, msAbs, s, 'second');
167
+ }
168
+ return ms + ' ms';
248
169
  }
249
170
 
250
- module.exports = v4;
171
+ /**
172
+ * Pluralization helper.
173
+ */
174
+
175
+ function plural(ms, msAbs, n, name) {
176
+ var isPlural = msAbs >= n * 1.5;
177
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
178
+ }
251
179
 
252
180
 
253
181
  /***/ }),
@@ -544,7 +472,7 @@ function setup(env) {
544
472
  createDebug.disable = disable;
545
473
  createDebug.enable = enable;
546
474
  createDebug.enabled = enabled;
547
- createDebug.humanize = __webpack_require__(824);
475
+ createDebug.humanize = __webpack_require__(378);
548
476
  createDebug.destroy = destroy;
549
477
 
550
478
  Object.keys(env).forEach(key => {
@@ -809,174 +737,24 @@ module.exports = setup;
809
737
 
810
738
  /***/ }),
811
739
 
812
- /***/ 824:
740
+ /***/ 703:
813
741
  /***/ ((module) => {
814
742
 
815
- /**
816
- * Helpers.
817
- */
818
-
819
- var s = 1000;
820
- var m = s * 60;
821
- var h = m * 60;
822
- var d = h * 24;
823
- var w = d * 7;
824
- var y = d * 365.25;
825
-
826
- /**
827
- * Parse or format the given `val`.
828
- *
829
- * Options:
830
- *
831
- * - `long` verbose formatting [false]
832
- *
833
- * @param {String|Number} val
834
- * @param {Object} [options]
835
- * @throws {Error} throw an error if val is not a non-empty string or a number
836
- * @return {String|Number}
837
- * @api public
838
- */
839
-
840
- module.exports = function(val, options) {
841
- options = options || {};
842
- var type = typeof val;
843
- if (type === 'string' && val.length > 0) {
844
- return parse(val);
845
- } else if (type === 'number' && isFinite(val)) {
846
- return options.long ? fmtLong(val) : fmtShort(val);
847
- }
848
- throw new Error(
849
- 'val is not a non-empty string or a valid number. val=' +
850
- JSON.stringify(val)
851
- );
852
- };
743
+ function webpackEmptyAsyncContext(req) {
744
+ // Here Promise.resolve().then() is used instead of new Promise() to prevent
745
+ // uncaught exception popping up in devtools
746
+ return Promise.resolve().then(() => {
747
+ var e = new Error("Cannot find module '" + req + "'");
748
+ e.code = 'MODULE_NOT_FOUND';
749
+ throw e;
750
+ });
751
+ }
752
+ webpackEmptyAsyncContext.keys = () => ([]);
753
+ webpackEmptyAsyncContext.resolve = webpackEmptyAsyncContext;
754
+ webpackEmptyAsyncContext.id = 703;
755
+ module.exports = webpackEmptyAsyncContext;
853
756
 
854
- /**
855
- * Parse the given `str` and return milliseconds.
856
- *
857
- * @param {String} str
858
- * @return {Number}
859
- * @api private
860
- */
861
-
862
- function parse(str) {
863
- str = String(str);
864
- if (str.length > 100) {
865
- return;
866
- }
867
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
868
- str
869
- );
870
- if (!match) {
871
- return;
872
- }
873
- var n = parseFloat(match[1]);
874
- var type = (match[2] || 'ms').toLowerCase();
875
- switch (type) {
876
- case 'years':
877
- case 'year':
878
- case 'yrs':
879
- case 'yr':
880
- case 'y':
881
- return n * y;
882
- case 'weeks':
883
- case 'week':
884
- case 'w':
885
- return n * w;
886
- case 'days':
887
- case 'day':
888
- case 'd':
889
- return n * d;
890
- case 'hours':
891
- case 'hour':
892
- case 'hrs':
893
- case 'hr':
894
- case 'h':
895
- return n * h;
896
- case 'minutes':
897
- case 'minute':
898
- case 'mins':
899
- case 'min':
900
- case 'm':
901
- return n * m;
902
- case 'seconds':
903
- case 'second':
904
- case 'secs':
905
- case 'sec':
906
- case 's':
907
- return n * s;
908
- case 'milliseconds':
909
- case 'millisecond':
910
- case 'msecs':
911
- case 'msec':
912
- case 'ms':
913
- return n;
914
- default:
915
- return undefined;
916
- }
917
- }
918
-
919
- /**
920
- * Short format for `ms`.
921
- *
922
- * @param {Number} ms
923
- * @return {String}
924
- * @api private
925
- */
926
-
927
- function fmtShort(ms) {
928
- var msAbs = Math.abs(ms);
929
- if (msAbs >= d) {
930
- return Math.round(ms / d) + 'd';
931
- }
932
- if (msAbs >= h) {
933
- return Math.round(ms / h) + 'h';
934
- }
935
- if (msAbs >= m) {
936
- return Math.round(ms / m) + 'm';
937
- }
938
- if (msAbs >= s) {
939
- return Math.round(ms / s) + 's';
940
- }
941
- return ms + 'ms';
942
- }
943
-
944
- /**
945
- * Long format for `ms`.
946
- *
947
- * @param {Number} ms
948
- * @return {String}
949
- * @api private
950
- */
951
-
952
- function fmtLong(ms) {
953
- var msAbs = Math.abs(ms);
954
- if (msAbs >= d) {
955
- return plural(ms, msAbs, d, 'day');
956
- }
957
- if (msAbs >= h) {
958
- return plural(ms, msAbs, h, 'hour');
959
- }
960
- if (msAbs >= m) {
961
- return plural(ms, msAbs, m, 'minute');
962
- }
963
- if (msAbs >= s) {
964
- return plural(ms, msAbs, s, 'second');
965
- }
966
- return ms + ' ms';
967
- }
968
-
969
- /**
970
- * Pluralization helper.
971
- */
972
-
973
- function plural(ms, msAbs, n, name) {
974
- var isPlural = msAbs >= n * 1.5;
975
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
976
- }
977
-
978
-
979
- /***/ })
757
+ /***/ })
980
758
 
981
759
  /******/ });
982
760
  /************************************************************************/
@@ -1080,6 +858,7 @@ __webpack_require__.d(__webpack_exports__, {
1080
858
  "getTabInstances": () => (/* reexport */ getTabInstances),
1081
859
  "initialize": () => (/* reexport */ initialize),
1082
860
  "initializeWithFrameContext": () => (/* reexport */ initializeWithFrameContext),
861
+ "liveShare": () => (/* reexport */ liveShare),
1083
862
  "location": () => (/* reexport */ location_location),
1084
863
  "logs": () => (/* reexport */ logs),
1085
864
  "mail": () => (/* reexport */ mail),
@@ -1123,171 +902,14 @@ __webpack_require__.d(__webpack_exports__, {
1123
902
  "teams": () => (/* reexport */ teams),
1124
903
  "teamsCore": () => (/* reexport */ teamsCore),
1125
904
  "uploadCustomApp": () => (/* reexport */ uploadCustomApp),
905
+ "version": () => (/* reexport */ version),
1126
906
  "video": () => (/* reexport */ video),
1127
907
  "videoEx": () => (/* reexport */ videoEx),
1128
908
  "webStorage": () => (/* reexport */ webStorage)
1129
909
  });
1130
910
 
1131
- ;// CONCATENATED MODULE: ./src/internal/constants.ts
1132
- var version = "2.3.1-beta.0";
1133
- /**
1134
- * @hidden
1135
- * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
1136
- * Modified to 2.0.1 which is hightest till now so that if any client doesn't pass version in initialize function, it will be set to highest.
1137
- * Mobile clients are passing versions, hence will be applicable to web and desktop clients only.
1138
- *
1139
- * @internal
1140
- * Limited to Microsoft-internal use
1141
- */
1142
- var defaultSDKVersionForCompatCheck = '2.0.1';
1143
- /**
1144
- * @hidden
1145
- * This is the client version when selectMedia API - VideoAndImage is supported on mobile.
1146
- *
1147
- * @internal
1148
- * Limited to Microsoft-internal use
1149
- */
1150
- var videoAndImageMediaAPISupportVersion = '2.0.2';
1151
- /**
1152
- * @hidden
1153
- * This is the client version when selectMedia API - Video with non-full screen mode is supported on mobile.
1154
- *
1155
- * @internal
1156
- * Limited to Microsoft-internal use
1157
- */
1158
- var nonFullScreenVideoModeAPISupportVersion = '2.0.3';
1159
- /**
1160
- * @hidden
1161
- * This is the client version when selectMedia API - ImageOutputFormats is supported on mobile.
1162
- *
1163
- * @internal
1164
- * Limited to Microsoft-internal use
1165
- */
1166
- var imageOutputFormatsAPISupportVersion = '2.0.4';
1167
- /**
1168
- * @hidden
1169
- * Minimum required client supported version for {@link getUserJoinedTeams} to be supported on {@link HostClientType.android}
1170
- *
1171
- * @internal
1172
- * Limited to Microsoft-internal use
1173
- */
1174
- var getUserJoinedTeamsSupportedAndroidClientVersion = '2.0.1';
1175
- /**
1176
- * @hidden
1177
- * This is the client version when location APIs (getLocation and showLocation) are supported.
1178
- *
1179
- * @internal
1180
- * Limited to Microsoft-internal use
1181
- */
1182
- var locationAPIsRequiredVersion = '1.9.0';
1183
- /**
1184
- * @hidden
1185
- * This is the client version when permisisons are supported
1186
- *
1187
- * @internal
1188
- * Limited to Microsoft-internal use
1189
- */
1190
- var permissionsAPIsRequiredVersion = '2.0.1';
1191
- /**
1192
- * @hidden
1193
- * This is the client version when people picker API is supported on mobile.
1194
- *
1195
- * @internal
1196
- * Limited to Microsoft-internal use
1197
- */
1198
- var peoplePickerRequiredVersion = '2.0.0';
1199
- /**
1200
- * @hidden
1201
- * This is the client version when captureImage API is supported on mobile.
1202
- *
1203
- * @internal
1204
- * Limited to Microsoft-internal use
1205
- */
1206
- var captureImageMobileSupportVersion = '1.7.0';
1207
- /**
1208
- * @hidden
1209
- * This is the client version when media APIs are supported on all three platforms ios, android and web.
1210
- *
1211
- * @internal
1212
- * Limited to Microsoft-internal use
1213
- */
1214
- var mediaAPISupportVersion = '1.8.0';
1215
- /**
1216
- * @hidden
1217
- * This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
1218
- *
1219
- * @internal
1220
- * Limited to Microsoft-internal use
1221
- */
1222
- var getMediaCallbackSupportVersion = '2.0.0';
1223
- /**
1224
- * @hidden
1225
- * This is the client version when scanBarCode API is supported on mobile.
1226
- *
1227
- * @internal
1228
- * Limited to Microsoft-internal use
1229
- */
1230
- var scanBarCodeAPIMobileSupportVersion = '1.9.0';
1231
- /**
1232
- * @hidden
1233
- * List of supported Host origins
1234
- *
1235
- * @internal
1236
- * Limited to Microsoft-internal use
1237
- */
1238
- var validOrigins = [
1239
- 'teams.microsoft.com',
1240
- 'teams.microsoft.us',
1241
- 'gov.teams.microsoft.us',
1242
- 'dod.teams.microsoft.us',
1243
- 'int.teams.microsoft.com',
1244
- 'teams.live.com',
1245
- 'devspaces.skype.com',
1246
- 'ssauth.skype.com',
1247
- 'local.teams.live.com',
1248
- 'local.teams.live.com:8080',
1249
- 'local.teams.office.com',
1250
- 'local.teams.office.com:8080',
1251
- 'msft.spoppe.com',
1252
- '*.sharepoint.com',
1253
- '*.sharepoint-df.com',
1254
- '*.sharepointonline.com',
1255
- 'outlook.office.com',
1256
- 'outlook-sdf.office.com',
1257
- 'outlook.office365.com',
1258
- 'outlook-sdf.office365.com',
1259
- '*.teams.microsoft.com',
1260
- 'www.office.com',
1261
- 'word.office.com',
1262
- 'excel.office.com',
1263
- 'powerpoint.office.com',
1264
- 'www.officeppe.com',
1265
- '*.www.office.com',
1266
- ];
1267
- /**
1268
- * @hidden
1269
- * USer specified message origins should satisfy this test
1270
- *
1271
- * @internal
1272
- * Limited to Microsoft-internal use
1273
- */
1274
- var userOriginUrlValidationRegExp = /^https:\/\//;
1275
- /**
1276
- * @hidden
1277
- * The protocol used for deep links into Teams
1278
- *
1279
- * @internal
1280
- * Limited to Microsoft-internal use
1281
- */
1282
- var teamsDeepLinkProtocol = 'https';
1283
- /**
1284
- * @hidden
1285
- * The host used for deep links into Teams
1286
- *
1287
- * @internal
1288
- * Limited to Microsoft-internal use
1289
- */
1290
- var teamsDeepLinkHost = 'teams.microsoft.com';
911
+ ;// CONCATENATED MODULE: ./src/public/version.ts
912
+ var version = "2.4.0-beta.1";
1291
913
 
1292
914
  ;// CONCATENATED MODULE: ./src/internal/globalVars.ts
1293
915
  var GlobalVars = /** @class */ (function () {
@@ -1425,9 +1047,26 @@ var HostClientType;
1425
1047
  })(HostClientType || (HostClientType = {}));
1426
1048
  var HostName;
1427
1049
  (function (HostName) {
1050
+ /**
1051
+ * Office.com and Office Windows App
1052
+ */
1428
1053
  HostName["office"] = "Office";
1054
+ /**
1055
+ * For "desktop" specifically, this refers to the new, pre-release version of Outlook for Windows.
1056
+ * Also used on other platforms that map to a single Outlook client.
1057
+ */
1429
1058
  HostName["outlook"] = "Outlook";
1059
+ /**
1060
+ * Outlook for Windows: the classic, native, desktop client
1061
+ */
1062
+ HostName["outlookWin32"] = "OutlookWin32";
1063
+ /**
1064
+ * Microsoft-internal test Host
1065
+ */
1430
1066
  HostName["orange"] = "Orange";
1067
+ /**
1068
+ * Teams
1069
+ */
1431
1070
  HostName["teams"] = "Teams";
1432
1071
  })(HostName || (HostName = {}));
1433
1072
  // Ensure these declarations stay in sync with the framework.
@@ -1474,24 +1113,268 @@ var DialogDimension;
1474
1113
  })(DialogDimension || (DialogDimension = {}));
1475
1114
 
1476
1115
  /**
1477
- * @deprecated
1478
- * As of 2.0.0, please use {@link DialogDimension} instead.
1116
+ * @deprecated
1117
+ * As of 2.0.0, please use {@link DialogDimension} instead.
1118
+ */
1119
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
1120
+ var TaskModuleDimension = DialogDimension;
1121
+ /**
1122
+ * The type of the channel with which the content is associated.
1123
+ */
1124
+ var ChannelType;
1125
+ (function (ChannelType) {
1126
+ ChannelType["Regular"] = "Regular";
1127
+ ChannelType["Private"] = "Private";
1128
+ ChannelType["Shared"] = "Shared";
1129
+ })(ChannelType || (ChannelType = {}));
1130
+ var errorNotSupportedOnPlatform = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
1131
+
1132
+ ;// CONCATENATED MODULE: ./src/internal/constants.ts
1133
+ /**
1134
+ * @hidden
1135
+ * The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
1136
+ * Modified to 2.0.1 which is hightest till now so that if any client doesn't pass version in initialize function, it will be set to highest.
1137
+ * Mobile clients are passing versions, hence will be applicable to web and desktop clients only.
1138
+ *
1139
+ * @internal
1140
+ * Limited to Microsoft-internal use
1141
+ */
1142
+ var defaultSDKVersionForCompatCheck = '2.0.1';
1143
+ /**
1144
+ * @hidden
1145
+ * This is the client version when selectMedia API - VideoAndImage is supported on mobile.
1146
+ *
1147
+ * @internal
1148
+ * Limited to Microsoft-internal use
1149
+ */
1150
+ var videoAndImageMediaAPISupportVersion = '2.0.2';
1151
+ /**
1152
+ * @hidden
1153
+ * This is the client version when selectMedia API - Video with non-full screen mode is supported on mobile.
1154
+ *
1155
+ * @internal
1156
+ * Limited to Microsoft-internal use
1157
+ */
1158
+ var nonFullScreenVideoModeAPISupportVersion = '2.0.3';
1159
+ /**
1160
+ * @hidden
1161
+ * This is the client version when selectMedia API - ImageOutputFormats is supported on mobile.
1162
+ *
1163
+ * @internal
1164
+ * Limited to Microsoft-internal use
1165
+ */
1166
+ var imageOutputFormatsAPISupportVersion = '2.0.4';
1167
+ /**
1168
+ * @hidden
1169
+ * Minimum required client supported version for {@link getUserJoinedTeams} to be supported on {@link HostClientType.android}
1170
+ *
1171
+ * @internal
1172
+ * Limited to Microsoft-internal use
1173
+ */
1174
+ var getUserJoinedTeamsSupportedAndroidClientVersion = '2.0.1';
1175
+ /**
1176
+ * @hidden
1177
+ * This is the client version when location APIs (getLocation and showLocation) are supported.
1178
+ *
1179
+ * @internal
1180
+ * Limited to Microsoft-internal use
1181
+ */
1182
+ var locationAPIsRequiredVersion = '1.9.0';
1183
+ /**
1184
+ * @hidden
1185
+ * This is the client version when permisisons are supported
1186
+ *
1187
+ * @internal
1188
+ * Limited to Microsoft-internal use
1189
+ */
1190
+ var permissionsAPIsRequiredVersion = '2.0.1';
1191
+ /**
1192
+ * @hidden
1193
+ * This is the client version when people picker API is supported on mobile.
1194
+ *
1195
+ * @internal
1196
+ * Limited to Microsoft-internal use
1197
+ */
1198
+ var peoplePickerRequiredVersion = '2.0.0';
1199
+ /**
1200
+ * @hidden
1201
+ * This is the client version when captureImage API is supported on mobile.
1202
+ *
1203
+ * @internal
1204
+ * Limited to Microsoft-internal use
1205
+ */
1206
+ var captureImageMobileSupportVersion = '1.7.0';
1207
+ /**
1208
+ * @hidden
1209
+ * This is the client version when media APIs are supported on all three platforms ios, android and web.
1210
+ *
1211
+ * @internal
1212
+ * Limited to Microsoft-internal use
1213
+ */
1214
+ var mediaAPISupportVersion = '1.8.0';
1215
+ /**
1216
+ * @hidden
1217
+ * This is the client version when getMedia API is supported via Callbacks on all three platforms ios, android and web.
1218
+ *
1219
+ * @internal
1220
+ * Limited to Microsoft-internal use
1221
+ */
1222
+ var getMediaCallbackSupportVersion = '2.0.0';
1223
+ /**
1224
+ * @hidden
1225
+ * This is the client version when scanBarCode API is supported on mobile.
1226
+ *
1227
+ * @internal
1228
+ * Limited to Microsoft-internal use
1229
+ */
1230
+ var scanBarCodeAPIMobileSupportVersion = '1.9.0';
1231
+ /**
1232
+ * @hidden
1233
+ * List of supported Host origins
1234
+ *
1235
+ * @internal
1236
+ * Limited to Microsoft-internal use
1237
+ */
1238
+ var validOrigins = [
1239
+ 'teams.microsoft.com',
1240
+ 'teams.microsoft.us',
1241
+ 'gov.teams.microsoft.us',
1242
+ 'dod.teams.microsoft.us',
1243
+ 'int.teams.microsoft.com',
1244
+ 'teams.live.com',
1245
+ 'devspaces.skype.com',
1246
+ 'ssauth.skype.com',
1247
+ 'local.teams.live.com',
1248
+ 'local.teams.live.com:8080',
1249
+ 'local.teams.office.com',
1250
+ 'local.teams.office.com:8080',
1251
+ 'msft.spoppe.com',
1252
+ '*.sharepoint.com',
1253
+ '*.sharepoint-df.com',
1254
+ '*.sharepointonline.com',
1255
+ 'outlook.office.com',
1256
+ 'outlook-sdf.office.com',
1257
+ 'outlook.office365.com',
1258
+ 'outlook-sdf.office365.com',
1259
+ '*.teams.microsoft.com',
1260
+ 'www.office.com',
1261
+ 'word.office.com',
1262
+ 'excel.office.com',
1263
+ 'powerpoint.office.com',
1264
+ 'www.officeppe.com',
1265
+ '*.www.office.com',
1266
+ ];
1267
+ /**
1268
+ * @hidden
1269
+ * USer specified message origins should satisfy this test
1270
+ *
1271
+ * @internal
1272
+ * Limited to Microsoft-internal use
1273
+ */
1274
+ var userOriginUrlValidationRegExp = /^https:\/\//;
1275
+ /**
1276
+ * @hidden
1277
+ * The protocol used for deep links into Teams
1278
+ *
1279
+ * @internal
1280
+ * Limited to Microsoft-internal use
1479
1281
  */
1480
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1481
- var TaskModuleDimension = DialogDimension;
1282
+ var teamsDeepLinkProtocol = 'https';
1482
1283
  /**
1483
- * The type of the channel with which the content is associated.
1284
+ * @hidden
1285
+ * The host used for deep links into Teams
1286
+ *
1287
+ * @internal
1288
+ * Limited to Microsoft-internal use
1484
1289
  */
1485
- var ChannelType;
1486
- (function (ChannelType) {
1487
- ChannelType["Regular"] = "Regular";
1488
- ChannelType["Private"] = "Private";
1489
- ChannelType["Shared"] = "Shared";
1490
- })(ChannelType || (ChannelType = {}));
1491
- var errorNotSupportedOnPlatform = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
1290
+ var teamsDeepLinkHost = 'teams.microsoft.com';
1291
+
1292
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/rng.js
1293
+ // Unique ID creation requires a high quality random # generator. In the browser we therefore
1294
+ // require the crypto API and do not support built-in fallback to lower quality random number
1295
+ // generators (like Math.random()).
1296
+ var getRandomValues;
1297
+ var rnds8 = new Uint8Array(16);
1298
+ function rng() {
1299
+ // lazy load so that environments that need to polyfill have a chance to do so
1300
+ if (!getRandomValues) {
1301
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto implementation. Also,
1302
+ // find the complete implementation of crypto (msCrypto) on IE11.
1303
+ getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);
1304
+
1305
+ if (!getRandomValues) {
1306
+ throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');
1307
+ }
1308
+ }
1309
+
1310
+ return getRandomValues(rnds8);
1311
+ }
1312
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/regex.js
1313
+ /* harmony default export */ const regex = (/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i);
1314
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/validate.js
1315
+
1316
+
1317
+ function validate(uuid) {
1318
+ return typeof uuid === 'string' && regex.test(uuid);
1319
+ }
1320
+
1321
+ /* harmony default export */ const esm_browser_validate = (validate);
1322
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/stringify.js
1323
+
1324
+ /**
1325
+ * Convert array of 16 byte values to UUID string format of the form:
1326
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
1327
+ */
1328
+
1329
+ var byteToHex = [];
1330
+
1331
+ for (var i = 0; i < 256; ++i) {
1332
+ byteToHex.push((i + 0x100).toString(16).substr(1));
1333
+ }
1334
+
1335
+ function stringify(arr) {
1336
+ var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
1337
+ // Note: Be careful editing this code! It's been tuned for performance
1338
+ // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434
1339
+ var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one
1340
+ // of the following:
1341
+ // - One or more input array values don't map to a hex octet (leading to
1342
+ // "undefined" in the uuid)
1343
+ // - Invalid input values for the RFC `version` or `variant` fields
1344
+
1345
+ if (!esm_browser_validate(uuid)) {
1346
+ throw TypeError('Stringified UUID is invalid');
1347
+ }
1348
+
1349
+ return uuid;
1350
+ }
1492
1351
 
1493
- // EXTERNAL MODULE: ../../node_modules/uuid/index.js
1494
- var uuid = __webpack_require__(22);
1352
+ /* harmony default export */ const esm_browser_stringify = (stringify);
1353
+ ;// CONCATENATED MODULE: ../../node_modules/uuid/dist/esm-browser/v4.js
1354
+
1355
+
1356
+
1357
+ function v4(options, buf, offset) {
1358
+ options = options || {};
1359
+ var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
1360
+
1361
+ rnds[6] = rnds[6] & 0x0f | 0x40;
1362
+ rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided
1363
+
1364
+ if (buf) {
1365
+ offset = offset || 0;
1366
+
1367
+ for (var i = 0; i < 16; ++i) {
1368
+ buf[offset + i] = rnds[i];
1369
+ }
1370
+
1371
+ return buf;
1372
+ }
1373
+
1374
+ return esm_browser_stringify(rnds);
1375
+ }
1376
+
1377
+ /* harmony default export */ const esm_browser_v4 = (v4);
1495
1378
  ;// CONCATENATED MODULE: ./src/internal/utils.ts
1496
1379
  /* eslint-disable @typescript-eslint/ban-types */
1497
1380
  /* eslint-disable @typescript-eslint/no-unused-vars */
@@ -1619,7 +1502,7 @@ function compareSDKVersions(v1, v2) {
1619
1502
  * Limited to Microsoft-internal use
1620
1503
  */
1621
1504
  function generateGUID() {
1622
- return uuid.v4();
1505
+ return esm_browser_v4();
1623
1506
  }
1624
1507
  /**
1625
1508
  * @internal
@@ -1920,6 +1803,21 @@ function processAdditionalValidOrigins(validMessageOrigins) {
1920
1803
  GlobalVars.additionalValidOrigins = combinedOriginUrls;
1921
1804
  }
1922
1805
 
1806
+ // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
1807
+ var browser = __webpack_require__(227);
1808
+ ;// CONCATENATED MODULE: ./src/internal/telemetry.ts
1809
+
1810
+ var topLevelLogger = (0,browser.debug)('teamsJs');
1811
+ /**
1812
+ * @internal
1813
+ * Limited to Microsoft-internal use
1814
+ *
1815
+ * Returns a logger for a given namespace, within the pre-defined top-level teamsJs namespace
1816
+ */
1817
+ function getLogger(namespace) {
1818
+ return topLevelLogger.extend(namespace);
1819
+ }
1820
+
1923
1821
  ;// CONCATENATED MODULE: ./src/public/authentication.ts
1924
1822
 
1925
1823
 
@@ -1956,7 +1854,9 @@ var authentication;
1956
1854
  authentication.registerAuthenticationHandlers = registerAuthenticationHandlers;
1957
1855
  function authenticate(authenticateParameters) {
1958
1856
  var isDifferentParamsInCall = authenticateParameters !== undefined;
1959
- var authenticateParams = isDifferentParamsInCall ? authenticateParameters : authParams;
1857
+ var authenticateParams = isDifferentParamsInCall
1858
+ ? authenticateParameters
1859
+ : authParams;
1960
1860
  if (!authenticateParams) {
1961
1861
  throw new Error('No parameters are provided for authentication');
1962
1862
  }
@@ -2313,6 +2213,8 @@ var __assign = (undefined && undefined.__assign) || function () {
2313
2213
 
2314
2214
 
2315
2215
 
2216
+
2217
+ var runtimeLogger = getLogger('runtime');
2316
2218
  var runtime = {
2317
2219
  apiVersion: 1,
2318
2220
  supports: {
@@ -2445,6 +2347,7 @@ var versionConstants = {
2445
2347
  },
2446
2348
  ],
2447
2349
  };
2350
+ var generateBackCompatRuntimeConfigLogger = runtimeLogger.extend('generateBackCompatRuntimeConfig');
2448
2351
  /**
2449
2352
  * @internal
2450
2353
  * Limited to Microsoft-internal use
@@ -2457,7 +2360,9 @@ var versionConstants = {
2457
2360
  * @returns runtime which describes the APIs supported by the legacy host client.
2458
2361
  */
2459
2362
  function generateBackCompatRuntimeConfig(highestSupportedVersion) {
2363
+ generateBackCompatRuntimeConfigLogger('generating back compat runtime config for %s', highestSupportedVersion);
2460
2364
  var newSupports = __assign({}, teamsRuntimeConfig.supports);
2365
+ generateBackCompatRuntimeConfigLogger('Supported capabilities in config before updating based on highestSupportedVersion: %o', newSupports);
2461
2366
  Object.keys(versionConstants).forEach(function (versionNumber) {
2462
2367
  if (compareSDKVersions(highestSupportedVersion, versionNumber) >= 0) {
2463
2368
  versionConstants[versionNumber].forEach(function (capabilityReqs) {
@@ -2472,9 +2377,12 @@ function generateBackCompatRuntimeConfig(highestSupportedVersion) {
2472
2377
  isLegacyTeams: true,
2473
2378
  supports: newSupports,
2474
2379
  };
2380
+ generateBackCompatRuntimeConfigLogger('Runtime config after updating based on highestSupportedVersion: %o', backCompatRuntimeConfig);
2475
2381
  return backCompatRuntimeConfig;
2476
2382
  }
2383
+ var applyRuntimeConfigLogger = runtimeLogger.extend('applyRuntimeConfig');
2477
2384
  function applyRuntimeConfig(runtimeConfig) {
2385
+ applyRuntimeConfigLogger('Applying runtime %o', runtimeConfig);
2478
2386
  runtime = deepFreeze(runtimeConfig);
2479
2387
  }
2480
2388
  /**
@@ -3039,6 +2947,8 @@ var teamsCore;
3039
2947
 
3040
2948
 
3041
2949
 
2950
+
2951
+
3042
2952
  /**
3043
2953
  * Namespace to interact with app initialization and lifecycle.
3044
2954
  *
@@ -3046,6 +2956,7 @@ var teamsCore;
3046
2956
  */
3047
2957
  var app_app;
3048
2958
  (function (app) {
2959
+ var appLogger = getLogger('app');
3049
2960
  // ::::::::::::::::::::::: MicrosoftTeams client SDK public API ::::::::::::::::::::
3050
2961
  app.Messages = {
3051
2962
  AppLoaded: 'appInitialization.appLoaded',
@@ -3133,6 +3044,7 @@ var app_app;
3133
3044
  return runWithTimeout(function () { return initializeHelper(validMessageOrigins); }, initializationTimeoutInMs, new Error('SDK initialization timed out.'));
3134
3045
  }
3135
3046
  app.initialize = initialize;
3047
+ var initializeHelperLogger = appLogger.extend('initializeHelper');
3136
3048
  function initializeHelper(validMessageOrigins) {
3137
3049
  return new Promise(function (resolve) {
3138
3050
  // Independent components might not know whether the SDK is initialized so might call it to be safe.
@@ -3155,7 +3067,9 @@ var app_app;
3155
3067
  // so we assume that if we don't have it, we must be running in Teams.
3156
3068
  // After Teams updates its client code, we can remove this default code.
3157
3069
  try {
3070
+ initializeHelperLogger('Parsing %s', runtimeConfig);
3158
3071
  var givenRuntimeConfig = JSON.parse(runtimeConfig);
3072
+ initializeHelperLogger('Checking if %o is a valid runtime object', givenRuntimeConfig !== null && givenRuntimeConfig !== void 0 ? givenRuntimeConfig : 'null');
3159
3073
  // Check that givenRuntimeConfig is a valid instance of IRuntimeConfig
3160
3074
  if (!givenRuntimeConfig || !givenRuntimeConfig.apiVersion) {
3161
3075
  throw new Error('Received runtime config is invalid');
@@ -3165,6 +3079,7 @@ var app_app;
3165
3079
  catch (e) {
3166
3080
  if (e instanceof SyntaxError) {
3167
3081
  try {
3082
+ initializeHelperLogger('Attempting to parse %s as an SDK version', runtimeConfig);
3168
3083
  // if the given runtime config was actually meant to be a SDK version, store it as such.
3169
3084
  // TODO: This is a temporary workaround to allow Teams to store clientSupportedSDKVersion even when
3170
3085
  // it doesn't provide the runtimeConfig. After Teams updates its client code, we should
@@ -3173,7 +3088,13 @@ var app_app;
3173
3088
  GlobalVars.clientSupportedSDKVersion = runtimeConfig;
3174
3089
  }
3175
3090
  var givenRuntimeConfig = JSON.parse(clientSupportedSDKVersion);
3176
- clientSupportedSDKVersion && applyRuntimeConfig(givenRuntimeConfig);
3091
+ initializeHelperLogger('givenRuntimeConfig parsed to %o', givenRuntimeConfig !== null && givenRuntimeConfig !== void 0 ? givenRuntimeConfig : 'null');
3092
+ if (!givenRuntimeConfig) {
3093
+ throw new Error('givenRuntimeConfig string was successfully parsed. However, it parsed to value of null');
3094
+ }
3095
+ else {
3096
+ applyRuntimeConfig(givenRuntimeConfig);
3097
+ }
3177
3098
  }
3178
3099
  catch (e) {
3179
3100
  if (e instanceof SyntaxError) {
@@ -3226,17 +3147,21 @@ var app_app;
3226
3147
  return;
3227
3148
  }
3228
3149
  if (GlobalVars.frameContext) {
3150
+ /* eslint-disable strict-null-checks/all */ /* Fix tracked by 5730662 */
3229
3151
  registerOnThemeChangeHandler(null);
3230
3152
  pages.backStack.registerBackButtonHandler(null);
3231
3153
  pages.registerFullScreenHandler(null);
3232
3154
  teamsCore.registerBeforeUnloadHandler(null);
3233
3155
  teamsCore.registerOnLoadHandler(null);
3234
- logs.registerGetLogHandler(null);
3156
+ logs.registerGetLogHandler(null); /* Fix tracked by 5730662 */
3157
+ /* eslint-enable strict-null-checks/all */
3235
3158
  }
3236
3159
  if (GlobalVars.frameContext === FrameContexts.settings) {
3160
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3237
3161
  pages.config.registerOnSaveHandler(null);
3238
3162
  }
3239
3163
  if (GlobalVars.frameContext === FrameContexts.remove) {
3164
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3240
3165
  pages.config.registerOnRemoveHandler(null);
3241
3166
  }
3242
3167
  GlobalVars.initializeCalled = false;
@@ -3634,6 +3559,7 @@ var pages;
3634
3559
  if (!isSupported()) {
3635
3560
  throw errorNotSupportedOnPlatform;
3636
3561
  }
3562
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3637
3563
  resolve(sendAndUnwrap('getTabInstances', tabInstanceParameters));
3638
3564
  });
3639
3565
  }
@@ -3649,6 +3575,7 @@ var pages;
3649
3575
  if (!isSupported()) {
3650
3576
  throw errorNotSupportedOnPlatform;
3651
3577
  }
3578
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
3652
3579
  resolve(sendAndUnwrap('getMruTabInstances', tabInstanceParameters));
3653
3580
  });
3654
3581
  }
@@ -4053,21 +3980,6 @@ var pages;
4053
3980
  })(appButton = pages.appButton || (pages.appButton = {}));
4054
3981
  })(pages || (pages = {}));
4055
3982
 
4056
- // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
4057
- var browser = __webpack_require__(227);
4058
- ;// CONCATENATED MODULE: ./src/internal/telemetry.ts
4059
-
4060
- var topLevelLogger = (0,browser.debug)('teamsJs');
4061
- /**
4062
- * @internal
4063
- * Limited to Microsoft-internal use
4064
- *
4065
- * Returns a logger for a given namespace, within the pre-defined top-level teamsJs namespace
4066
- */
4067
- function getLogger(namespace) {
4068
- return topLevelLogger.extend(namespace);
4069
- }
4070
-
4071
3983
  ;// CONCATENATED MODULE: ./src/internal/handlers.ts
4072
3984
  /* eslint-disable @typescript-eslint/ban-types */
4073
3985
  var __spreadArray = (undefined && undefined.__spreadArray) || function (to, from, pack) {
@@ -4401,6 +4313,7 @@ function sendMessageToParentAsync(actionName, args) {
4401
4313
  if (args === void 0) { args = undefined; }
4402
4314
  return new Promise(function (resolve) {
4403
4315
  var request = sendMessageToParentHelper(actionName, args);
4316
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4404
4317
  resolve(waitForResponse(request.id));
4405
4318
  });
4406
4319
  }
@@ -4425,6 +4338,7 @@ function sendMessageToParent(actionName, argsOrCallback, callback) {
4425
4338
  else if (argsOrCallback instanceof Array) {
4426
4339
  args = argsOrCallback;
4427
4340
  }
4341
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4428
4342
  var request = sendMessageToParentHelper(actionName, args);
4429
4343
  if (callback) {
4430
4344
  CommunicationPrivate.callbacks[request.id] = callback;
@@ -4439,9 +4353,11 @@ function sendMessageToParentHelper(actionName, args) {
4439
4353
  var logger = sendMessageToParentHelperLogger;
4440
4354
  var targetWindow = Communication.parentWindow;
4441
4355
  var request = createMessageRequest(actionName, args);
4356
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4442
4357
  logger('Message %i information: %o', request.id, { actionName: actionName, args: args });
4443
4358
  if (GlobalVars.isFramelessWindow) {
4444
4359
  if (Communication.currentWindow && Communication.currentWindow.nativeInterface) {
4360
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4445
4361
  logger('Sending message %i to parent via framelessPostMessage interface', request.id);
4446
4362
  Communication.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(request));
4447
4363
  }
@@ -4451,10 +4367,12 @@ function sendMessageToParentHelper(actionName, args) {
4451
4367
  // If the target window isn't closed and we already know its origin, send the message right away; otherwise,
4452
4368
  // queue the message and send it after the origin is established
4453
4369
  if (targetWindow && targetOrigin) {
4370
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4454
4371
  logger('Sending message %i to parent via postMessage', request.id);
4455
4372
  targetWindow.postMessage(request, targetOrigin);
4456
4373
  }
4457
4374
  else {
4375
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4458
4376
  logger('Adding message %i to parent message queue', request.id);
4459
4377
  getTargetMessageQueue(targetWindow).push(request);
4460
4378
  }
@@ -4598,6 +4516,7 @@ function handleChildMessage(evt) {
4598
4516
  var message_1 = evt.data;
4599
4517
  var _a = callHandler(message_1.func, message_1.args), called = _a[0], result = _a[1];
4600
4518
  if (called && typeof result !== 'undefined') {
4519
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4601
4520
  sendMessageResponseToChild(message_1.id, Array.isArray(result) ? result : [result]);
4602
4521
  }
4603
4522
  else {
@@ -4610,6 +4529,7 @@ function handleChildMessage(evt) {
4610
4529
  }
4611
4530
  if (Communication.childWindow) {
4612
4531
  var isPartialResponse_1 = args.pop();
4532
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4613
4533
  sendMessageResponseToChild(message_1.id, args, isPartialResponse_1);
4614
4534
  }
4615
4535
  });
@@ -4649,6 +4569,7 @@ function flushMessageQueue(targetWindow) {
4649
4569
  var target = targetWindow == Communication.parentWindow ? 'parent' : 'child';
4650
4570
  while (targetWindow && targetOrigin && targetMessageQueue.length > 0) {
4651
4571
  var request = targetMessageQueue.shift();
4572
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4652
4573
  flushMessageQueueLogger('Flushing message %i from ' + target + ' message queue via postMessage.', request.id);
4653
4574
  targetWindow.postMessage(request, targetOrigin);
4654
4575
  }
@@ -4676,6 +4597,7 @@ function sendMessageResponseToChild(id,
4676
4597
  // tslint:disable-next-line:no-any
4677
4598
  args, isPartialResponse) {
4678
4599
  var targetWindow = Communication.childWindow;
4600
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4679
4601
  var response = createMessageResponse(id, args, isPartialResponse);
4680
4602
  var targetOrigin = getTargetOrigin(targetWindow);
4681
4603
  if (targetWindow && targetOrigin) {
@@ -4694,6 +4616,7 @@ function sendMessageEventToChild(actionName,
4694
4616
  // tslint:disable-next-line: no-any
4695
4617
  args) {
4696
4618
  var targetWindow = Communication.childWindow;
4619
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
4697
4620
  var customEvent = createMessageEvent(actionName, args);
4698
4621
  var targetOrigin = getTargetOrigin(targetWindow);
4699
4622
  // If the target window isn't closed and we already know its origin, send the message right away; otherwise,
@@ -5252,11 +5175,13 @@ var media;
5252
5175
  ensureInitialized(FrameContexts.content, FrameContexts.task);
5253
5176
  if (!GlobalVars.isFramelessWindow) {
5254
5177
  var notSupportedError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
5178
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5255
5179
  callback(notSupportedError, undefined);
5256
5180
  return;
5257
5181
  }
5258
5182
  if (!isCurrentSDKVersionAtLeast(captureImageMobileSupportVersion)) {
5259
5183
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
5184
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5260
5185
  callback(oldPlatformError, undefined);
5261
5186
  return;
5262
5187
  }
@@ -5293,11 +5218,13 @@ var media;
5293
5218
  ensureInitialized(FrameContexts.content, FrameContexts.task);
5294
5219
  if (!isCurrentSDKVersionAtLeast(mediaAPISupportVersion)) {
5295
5220
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
5221
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5296
5222
  callback(oldPlatformError, null);
5297
5223
  return;
5298
5224
  }
5299
5225
  if (!validateGetMediaInputs(this.mimeType, this.format, this.content)) {
5300
5226
  var invalidInput = { errorCode: ErrorCode.INVALID_ARGUMENTS };
5227
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5301
5228
  callback(invalidInput, null);
5302
5229
  return;
5303
5230
  }
@@ -5318,6 +5245,7 @@ var media;
5318
5245
  function handleGetMediaCallbackRequest(mediaResult) {
5319
5246
  if (callback) {
5320
5247
  if (mediaResult && mediaResult.error) {
5248
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5321
5249
  callback(mediaResult.error, null);
5322
5250
  }
5323
5251
  else {
@@ -5335,6 +5263,7 @@ var media;
5335
5263
  }
5336
5264
  }
5337
5265
  else {
5266
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5338
5267
  callback({ errorCode: ErrorCode.INTERNAL_ERROR, message: 'data received is null' }, null);
5339
5268
  }
5340
5269
  }
@@ -5352,8 +5281,10 @@ var media;
5352
5281
  this.content && callback && sendMessageToParent('getMedia', params);
5353
5282
  function handleGetMediaRequest(response) {
5354
5283
  if (callback) {
5284
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5355
5285
  var mediaResult = JSON.parse(response);
5356
5286
  if (mediaResult.error) {
5287
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5357
5288
  callback(mediaResult.error, null);
5358
5289
  removeHandler('getMedia' + actionName);
5359
5290
  }
@@ -5373,6 +5304,7 @@ var media;
5373
5304
  }
5374
5305
  }
5375
5306
  else {
5307
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5376
5308
  callback({ errorCode: ErrorCode.INTERNAL_ERROR, message: 'data received is null' }, null);
5377
5309
  removeHandler('getMedia' + actionName);
5378
5310
  }
@@ -5522,6 +5454,7 @@ var media;
5522
5454
  ensureInitialized(FrameContexts.content, FrameContexts.task);
5523
5455
  if (!isCurrentSDKVersionAtLeast(mediaAPISupportVersion)) {
5524
5456
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
5457
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5525
5458
  callback(oldPlatformError, null);
5526
5459
  return;
5527
5460
  }
@@ -5529,11 +5462,13 @@ var media;
5529
5462
  throwExceptionIfMediaCallIsNotSupportedOnMobile(mediaInputs);
5530
5463
  }
5531
5464
  catch (err) {
5465
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5532
5466
  callback(err, null);
5533
5467
  return;
5534
5468
  }
5535
5469
  if (!validateSelectMediaInputs(mediaInputs)) {
5536
5470
  var invalidInput = { errorCode: ErrorCode.INVALID_ARGUMENTS };
5471
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5537
5472
  callback(invalidInput, null);
5538
5473
  return;
5539
5474
  }
@@ -5543,12 +5478,14 @@ var media;
5543
5478
  // MediaControllerEvent response is used to notify the app about events and is a partial response to selectMedia
5544
5479
  if (mediaEvent) {
5545
5480
  if (isVideoControllerRegistered(mediaInputs)) {
5481
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5546
5482
  mediaInputs.videoProps.videoController.notifyEventToApp(mediaEvent);
5547
5483
  }
5548
5484
  return;
5549
5485
  }
5550
5486
  // Media Attachments are final response to selectMedia
5551
5487
  if (!localAttachments) {
5488
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5552
5489
  callback(err, null);
5553
5490
  return;
5554
5491
  }
@@ -5611,16 +5548,20 @@ var media;
5611
5548
  GlobalVars.hostClientType === HostClientType.teamsPhones ||
5612
5549
  GlobalVars.hostClientType === HostClientType.teamsDisplays) {
5613
5550
  var notSupportedError = { errorCode: ErrorCode.NOT_SUPPORTED_ON_PLATFORM };
5551
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5614
5552
  callback(notSupportedError, null);
5615
5553
  return;
5616
5554
  }
5617
5555
  if (!isCurrentSDKVersionAtLeast(scanBarCodeAPIMobileSupportVersion)) {
5618
5556
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
5557
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5619
5558
  callback(oldPlatformError, null);
5620
5559
  return;
5621
5560
  }
5561
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5622
5562
  if (!validateScanBarCodeInput(config)) {
5623
5563
  var invalidInput = { errorCode: ErrorCode.INVALID_ARGUMENTS };
5564
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
5624
5565
  callback(invalidInput, null);
5625
5566
  return;
5626
5567
  }
@@ -6613,6 +6554,7 @@ var monetization;
6613
6554
  */
6614
6555
  function openPurchaseExperience(param1, param2) {
6615
6556
  var callback;
6557
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6616
6558
  var planInfo;
6617
6559
  if (typeof param1 === 'function') {
6618
6560
  callback = param1;
@@ -6747,7 +6689,9 @@ var people;
6747
6689
  function selectPeople(param1, param2) {
6748
6690
  var _a;
6749
6691
  ensureInitialized(FrameContexts.content, FrameContexts.task, FrameContexts.settings);
6692
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6750
6693
  var callback;
6694
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6751
6695
  var peoplePickerInputs;
6752
6696
  if (typeof param1 === 'function') {
6753
6697
  _a = [param1, param2], callback = _a[0], peoplePickerInputs = _a[1];
@@ -6763,12 +6707,14 @@ var people;
6763
6707
  if (!isCurrentSDKVersionAtLeast(peoplePickerRequiredVersion)) {
6764
6708
  throw { errorCode: ErrorCode.OLD_PLATFORM };
6765
6709
  }
6710
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6766
6711
  if (!validatePeoplePickerInput(peoplePickerInputs)) {
6767
6712
  throw { errorCode: ErrorCode.INVALID_ARGUMENTS };
6768
6713
  }
6769
6714
  if (!isSupported()) {
6770
6715
  throw errorNotSupportedOnPlatform;
6771
6716
  }
6717
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
6772
6718
  resolve(sendAndHandleSdkError('people.selectPeople', peoplePickerInputs));
6773
6719
  });
6774
6720
  }
@@ -7033,13 +6979,6 @@ var search;
7033
6979
  * Your application should *not* re-render inside of these callbacks, there may be a large number
7034
6980
  * of onChangeHandler calls if the user is typing rapidly in the search box.
7035
6981
  *
7036
- * @param onChangeHandler - This optional handler will be called when the user first starts using the
7037
- * host's search box and as the user types their query. Can be used to put your application into a
7038
- * word-wheeling state or to display suggestions as the user is typing.
7039
- *
7040
- * This handler will be called with an empty {@link SearchQuery.searchTerm} when search is beginning, and subsequently,
7041
- * with the current contents of the search box.
7042
- *
7043
6982
  * @param onClosedHandler - This handler will be called when the user exits or cancels their search.
7044
6983
  * Should be used to return your application to its most recent, non-search state. The value of {@link SearchQuery.searchTerm}
7045
6984
  * will be whatever the last query was before ending search.
@@ -7048,18 +6987,24 @@ var search;
7048
6987
  * search (by pressing Enter for example). Should be used to display the full list of search results.
7049
6988
  * The value of {@link SearchQuery.searchTerm} is the complete query the user entered in the search box.
7050
6989
  *
6990
+ * @param onChangeHandler - This optional handler will be called when the user first starts using the
6991
+ * host's search box and as the user types their query. Can be used to put your application into a
6992
+ * word-wheeling state or to display suggestions as the user is typing.
6993
+ *
6994
+ * This handler will be called with an empty {@link SearchQuery.searchTerm} when search is beginning, and subsequently,
6995
+ * with the current contents of the search box.
7051
6996
  * @example
7052
6997
  * ``` ts
7053
6998
  * search.registerHandlers(
7054
- query => {
7055
- console.log(`Update your application with the changed search query: ${query.searchTerm}`);
7056
- },
7057
6999
  query => {
7058
7000
  console.log('Update your application to handle the search experience being closed. Last query: ${query.searchTerm}');
7059
7001
  },
7060
7002
  query => {
7061
7003
  console.log(`Update your application to handle an executed search result: ${query.searchTerm}`);
7062
7004
  },
7005
+ query => {
7006
+ console.log(`Update your application with the changed search query: ${query.searchTerm}`);
7007
+ },
7063
7008
  );
7064
7009
  * ```
7065
7010
  *
@@ -7995,7 +7940,8 @@ var tasks;
7995
7940
  */
7996
7941
  function startTask(taskInfo, submitHandler) {
7997
7942
  var dialogSubmitHandler = submitHandler
7998
- ? function (sdkResponse) { return submitHandler(sdkResponse.err, sdkResponse.result); }
7943
+ ? /* eslint-disable-next-line strict-null-checks/all */ /* fix tracked by 5730662 */
7944
+ function (sdkResponse) { return submitHandler(sdkResponse.err, sdkResponse.result); }
7999
7945
  : undefined;
8000
7946
  if (taskInfo.card !== undefined || taskInfo.url === undefined) {
8001
7947
  ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
@@ -8047,6 +7993,7 @@ var tasks;
8047
7993
  * @returns - Converted UrlDialogInfo object
8048
7994
  */
8049
7995
  function getUrlDialogInfoFromTaskInfo(taskInfo) {
7996
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
8050
7997
  var urldialogInfo = {
8051
7998
  url: taskInfo.url,
8052
7999
  size: {
@@ -8064,6 +8011,7 @@ var tasks;
8064
8011
  * @returns - converted BotUrlDialogInfo object
8065
8012
  */
8066
8013
  function getBotUrlDialogInfoFromTaskInfo(taskInfo) {
8014
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
8067
8015
  var botUrldialogInfo = {
8068
8016
  url: taskInfo.url,
8069
8017
  size: {
@@ -8090,6 +8038,302 @@ var tasks;
8090
8038
  tasks.getDefaultSizeIfNotProvided = getDefaultSizeIfNotProvided;
8091
8039
  })(tasks || (tasks = {}));
8092
8040
 
8041
+ ;// CONCATENATED MODULE: ./src/internal/liveShareHost.ts
8042
+
8043
+
8044
+
8045
+ /**
8046
+ * @hidden
8047
+ * @internal
8048
+ * Limited to Microsoft-internal use
8049
+ * ------
8050
+ * Allowed roles during a meeting.
8051
+ */
8052
+ var UserMeetingRole;
8053
+ (function (UserMeetingRole) {
8054
+ UserMeetingRole["guest"] = "Guest";
8055
+ UserMeetingRole["attendee"] = "Attendee";
8056
+ UserMeetingRole["presenter"] = "Presenter";
8057
+ UserMeetingRole["organizer"] = "Organizer";
8058
+ })(UserMeetingRole || (UserMeetingRole = {}));
8059
+ /**
8060
+ * @hidden
8061
+ * @internal
8062
+ * Limited to Microsoft-internal use
8063
+ * ------
8064
+ * State of the current Live Share sessions backing fluid container.
8065
+ */
8066
+ var ContainerState;
8067
+ (function (ContainerState) {
8068
+ /**
8069
+ * The call to `LiveShareHost.setContainerId()` successfully created the container mapping
8070
+ * for the current Live Share session.
8071
+ */
8072
+ ContainerState["added"] = "Added";
8073
+ /**
8074
+ * A container mapping for the current Live Share Session already exists and should be used
8075
+ * when joining the sessions Fluid container.
8076
+ */
8077
+ ContainerState["alreadyExists"] = "AlreadyExists";
8078
+ /**
8079
+ * The call to `LiveShareHost.setContainerId()` failed to create the container mapping due to
8080
+ * another client having already set the container ID for the current Live Share session.
8081
+ */
8082
+ ContainerState["conflict"] = "Conflict";
8083
+ /**
8084
+ * A container mapping for the current Live Share session doesn't exist yet.
8085
+ */
8086
+ ContainerState["notFound"] = "NotFound";
8087
+ })(ContainerState || (ContainerState = {}));
8088
+ /**
8089
+ * @hidden
8090
+ * @internal
8091
+ * Limited to Microsoft-internal use
8092
+ * ------
8093
+ * Interface for hosting a Live Share session within a client like Teams.
8094
+ */
8095
+ var LiveShareHost = /** @class */ (function () {
8096
+ function LiveShareHost() {
8097
+ }
8098
+ /**
8099
+ * @hidden
8100
+ * @internal
8101
+ * Limited to Microsoft-internal use
8102
+ * ------
8103
+ * Returns the Fluid Tenant connection info for user's current context.
8104
+ */
8105
+ LiveShareHost.prototype.getFluidTenantInfo = function () {
8106
+ return new Promise(function (resolve) {
8107
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8108
+ resolve(sendAndHandleSdkError('interactive.getFluidTenantInfo'));
8109
+ });
8110
+ };
8111
+ /**
8112
+ * @hidden
8113
+ * @internal
8114
+ * Limited to Microsoft-internal use
8115
+ * ------
8116
+ * Returns the fluid access token for mapped container Id.
8117
+ *
8118
+ * @param containerId Fluid's container Id for the request. Undefined for new containers.
8119
+ * @returns token for connecting to Fluid's session.
8120
+ */
8121
+ LiveShareHost.prototype.getFluidToken = function (containerId) {
8122
+ return new Promise(function (resolve) {
8123
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8124
+ // eslint-disable-next-line strict-null-checks/all
8125
+ resolve(sendAndHandleSdkError('interactive.getFluidToken', containerId));
8126
+ });
8127
+ };
8128
+ /**
8129
+ * @hidden
8130
+ * @internal
8131
+ * Limited to Microsoft-internal use
8132
+ * ------
8133
+ * Returns the ID of the fluid container associated with the user's current context.
8134
+ */
8135
+ LiveShareHost.prototype.getFluidContainerId = function () {
8136
+ return new Promise(function (resolve) {
8137
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8138
+ resolve(sendAndHandleSdkError('interactive.getFluidContainerId'));
8139
+ });
8140
+ };
8141
+ /**
8142
+ * @hidden
8143
+ * @internal
8144
+ * Limited to Microsoft-internal use
8145
+ * ------
8146
+ * Sets the ID of the fluid container associated with the current context.
8147
+ *
8148
+ * @remarks
8149
+ * If this returns false, the client should delete the container they created and then call
8150
+ * `getFluidContainerId()` to get the ID of the container being used.
8151
+ * @param containerId ID of the fluid container the client created.
8152
+ * @returns A data structure with a `containerState` indicating the success or failure of the request.
8153
+ */
8154
+ LiveShareHost.prototype.setFluidContainerId = function (containerId) {
8155
+ return new Promise(function (resolve) {
8156
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8157
+ resolve(sendAndHandleSdkError('interactive.setFluidContainerId', containerId));
8158
+ });
8159
+ };
8160
+ /**
8161
+ * @hidden
8162
+ * @internal
8163
+ * Limited to Microsoft-internal use
8164
+ * ------
8165
+ * Returns the shared clock server's current time.
8166
+ */
8167
+ LiveShareHost.prototype.getNtpTime = function () {
8168
+ return new Promise(function (resolve) {
8169
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8170
+ resolve(sendAndHandleSdkError('interactive.getNtpTime'));
8171
+ });
8172
+ };
8173
+ /**
8174
+ * @hidden
8175
+ * @internal
8176
+ * Limited to Microsoft-internal use
8177
+ * ------
8178
+ * Associates the fluid client ID with a set of user roles.
8179
+ *
8180
+ * @param clientId The ID for the current user's Fluid client. Changes on reconnects.
8181
+ * @returns The roles for the current user.
8182
+ */
8183
+ LiveShareHost.prototype.registerClientId = function (clientId) {
8184
+ return new Promise(function (resolve) {
8185
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8186
+ resolve(sendAndHandleSdkError('interactive.registerClientId', clientId));
8187
+ });
8188
+ };
8189
+ /**
8190
+ * @hidden
8191
+ * @internal
8192
+ * Limited to Microsoft-internal use
8193
+ * ------
8194
+ * Returns the roles associated with a client ID.
8195
+ *
8196
+ * @param clientId The Client ID the message was received from.
8197
+ * @returns The roles for a given client. Returns `undefined` if the client ID hasn't been registered yet.
8198
+ */
8199
+ LiveShareHost.prototype.getClientRoles = function (clientId) {
8200
+ return new Promise(function (resolve) {
8201
+ ensureInitialized(FrameContexts.meetingStage, FrameContexts.sidePanel);
8202
+ resolve(sendAndHandleSdkError('interactive.getClientRoles', clientId));
8203
+ });
8204
+ };
8205
+ return LiveShareHost;
8206
+ }());
8207
+
8208
+
8209
+ ;// CONCATENATED MODULE: ./src/public/liveShare.ts
8210
+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
8211
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
8212
+ return new (P || (P = Promise))(function (resolve, reject) {
8213
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
8214
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
8215
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8216
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8217
+ });
8218
+ };
8219
+ var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
8220
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
8221
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
8222
+ function verb(n) { return function (v) { return step([n, v]); }; }
8223
+ function step(op) {
8224
+ if (f) throw new TypeError("Generator is already executing.");
8225
+ while (_) try {
8226
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
8227
+ if (y = 0, t) op = [op[0] & 2, t.value];
8228
+ switch (op[0]) {
8229
+ case 0: case 1: t = op; break;
8230
+ case 4: _.label++; return { value: op[1], done: false };
8231
+ case 5: _.label++; y = op[1]; op = [0]; continue;
8232
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
8233
+ default:
8234
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
8235
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
8236
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
8237
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
8238
+ if (t[2]) _.ops.pop();
8239
+ _.trys.pop(); continue;
8240
+ }
8241
+ op = body.call(thisArg, _);
8242
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
8243
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
8244
+ }
8245
+ };
8246
+
8247
+ /**
8248
+ * Namespace to interact with the Live Share module-specific part of the SDK.
8249
+ *
8250
+ * @beta
8251
+ */
8252
+ var liveShare;
8253
+ (function (liveShare) {
8254
+ var LIVE_SHARE_PACKAGE = '@microsoft/live-share';
8255
+ var LIVE_SHARE_HOST = new LiveShareHost();
8256
+ var client;
8257
+ var initializing = false;
8258
+ /**
8259
+ * Initializes the Live Share client.
8260
+ * @param options Optional. Configuration options passed to the Live Share client.
8261
+ *
8262
+ * @beta
8263
+ */
8264
+ function initialize(options) {
8265
+ return __awaiter(this, void 0, void 0, function () {
8266
+ var pkg, err_1;
8267
+ return __generator(this, function (_a) {
8268
+ switch (_a.label) {
8269
+ case 0:
8270
+ if (initializing || client) {
8271
+ throw new Error('Live Share has already been initialized.');
8272
+ }
8273
+ _a.label = 1;
8274
+ case 1:
8275
+ _a.trys.push([1, 3, 4, 5]);
8276
+ initializing = true;
8277
+ return [4 /*yield*/, __webpack_require__(703)(LIVE_SHARE_PACKAGE)];
8278
+ case 2:
8279
+ pkg = (_a.sent());
8280
+ client = new pkg.LiveShareClient(options, LIVE_SHARE_HOST);
8281
+ return [3 /*break*/, 5];
8282
+ case 3:
8283
+ err_1 = _a.sent();
8284
+ throw new Error('Unable to initialize Live Share client. Ensure that your project includes "@microsoft/live-share"');
8285
+ case 4:
8286
+ initializing = false;
8287
+ return [7 /*endfinally*/];
8288
+ case 5: return [2 /*return*/];
8289
+ }
8290
+ });
8291
+ });
8292
+ }
8293
+ liveShare.initialize = initialize;
8294
+ /**
8295
+ * Connects to the fluid container for the current teams context.
8296
+ *
8297
+ * @remarks
8298
+ * The first client joining the container will create the container resulting in the
8299
+ * `onContainerFirstCreated` callback being called. This callback can be used to set the initial
8300
+ * state of of the containers object prior to the container being attached.
8301
+ * @param fluidContainerSchema Fluid objects to create.
8302
+ * @param onContainerFirstCreated Optional. Callback that's called when the container is first created.
8303
+ * @returns The fluid `container` and `services` objects to use along with a `created` flag that if true means the container had to be created.
8304
+ *
8305
+ * @beta
8306
+ */
8307
+ function joinContainer(fluidContainerSchema, onContainerFirstCreated) {
8308
+ return __awaiter(this, void 0, void 0, function () {
8309
+ return __generator(this, function (_a) {
8310
+ switch (_a.label) {
8311
+ case 0:
8312
+ if (!client) return [3 /*break*/, 2];
8313
+ return [4 /*yield*/, client.joinContainer(fluidContainerSchema, onContainerFirstCreated)];
8314
+ case 1: return [2 /*return*/, _a.sent()];
8315
+ case 2: throw new Error('Live Share must first be initialized');
8316
+ }
8317
+ });
8318
+ });
8319
+ }
8320
+ liveShare.joinContainer = joinContainer;
8321
+ /**
8322
+ * @hidden
8323
+ * Hide from docs
8324
+ * ------
8325
+ * Returns the LiveShareHost object. Called by existing apps that use the TeamsFluidClient
8326
+ * directly. This prevents existing apps from breaking and will be removed when Live Share
8327
+ * goes GA.
8328
+ *
8329
+ * @beta
8330
+ */
8331
+ function getHost() {
8332
+ return LIVE_SHARE_HOST;
8333
+ }
8334
+ liveShare.getHost = getHost;
8335
+ })(liveShare || (liveShare = {}));
8336
+
8093
8337
  ;// CONCATENATED MODULE: ./src/public/index.ts
8094
8338
 
8095
8339
 
@@ -8120,6 +8364,8 @@ var tasks;
8120
8364
 
8121
8365
 
8122
8366
 
8367
+
8368
+
8123
8369
 
8124
8370
 
8125
8371
 
@@ -9272,6 +9518,7 @@ var teams;
9272
9518
  var oldPlatformError = { errorCode: ErrorCode.OLD_PLATFORM };
9273
9519
  throw new Error(JSON.stringify(oldPlatformError));
9274
9520
  }
9521
+ /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
9275
9522
  resolve(sendAndUnwrap('getUserJoinedTeams', teamInstanceParameters));
9276
9523
  });
9277
9524
  }