@microsoft/teams-js 2.8.0-beta.0 → 2.8.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,248 +11,176 @@
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
+ /***/ 881:
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
20
 
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
-
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
- }
146
- }
147
-
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;
160
-
161
- // Per 4.2.1.2, Bump clockseq on clock regression
162
- if (dt < 0 && options.clockseq === undefined) {
163
- clockseq = clockseq + 1 & 0x3fff;
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);
164
49
  }
50
+ throw new Error(
51
+ 'val is not a non-empty string or a valid number. val=' +
52
+ JSON.stringify(val)
53
+ );
54
+ };
165
55
 
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;
170
- }
56
+ /**
57
+ * Parse the given `str` and return milliseconds.
58
+ *
59
+ * @param {String} str
60
+ * @return {Number}
61
+ * @api private
62
+ */
171
63
 
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');
64
+ function parse(str) {
65
+ str = String(str);
66
+ if (str.length > 100) {
67
+ return;
175
68
  }
176
-
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;
205
-
206
- // `node`
207
- for (var n = 0; n < 6; ++n) {
208
- b[i + n] = node[n];
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;
209
74
  }
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;
118
+ }
119
+ }
210
120
 
211
- return buf ? buf : bytesToUuid(b);
212
- }
213
-
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;
121
+ /**
122
+ * Short format for `ms`.
123
+ *
124
+ * @param {Number} ms
125
+ * @return {String}
126
+ * @api private
127
+ */
227
128
 
228
- if (typeof(options) == 'string') {
229
- buf = options === 'binary' ? new Array(16) : null;
230
- options = null;
129
+ function fmtShort(ms) {
130
+ var msAbs = Math.abs(ms);
131
+ if (msAbs >= d) {
132
+ return Math.round(ms / d) + 'd';
231
133
  }
232
- options = options || {};
233
-
234
- var rnds = options.random || (options.rng || rng)();
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';
144
+ }
235
145
 
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;
146
+ /**
147
+ * Long format for `ms`.
148
+ *
149
+ * @param {Number} ms
150
+ * @return {String}
151
+ * @api private
152
+ */
239
153
 
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
- }
154
+ function fmtLong(ms) {
155
+ var msAbs = Math.abs(ms);
156
+ if (msAbs >= d) {
157
+ return plural(ms, msAbs, d, 'day');
245
158
  }
246
-
247
- return buf || bytesToUuid(rnds);
159
+ if (msAbs >= h) {
160
+ return plural(ms, msAbs, h, 'hour');
161
+ }
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
  /***/ }),
254
182
 
255
- /***/ 227:
183
+ /***/ 130:
256
184
  /***/ ((module, exports, __webpack_require__) => {
257
185
 
258
186
  /* eslint-env browser */
@@ -509,7 +437,7 @@ function localstorage() {
509
437
  }
510
438
  }
511
439
 
512
- module.exports = __webpack_require__(447)(exports);
440
+ module.exports = __webpack_require__(123)(exports);
513
441
 
514
442
  const {formatters} = module.exports;
515
443
 
@@ -528,7 +456,7 @@ formatters.j = function (v) {
528
456
 
529
457
  /***/ }),
530
458
 
531
- /***/ 447:
459
+ /***/ 123:
532
460
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
533
461
 
534
462
 
@@ -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__(881);
548
476
  createDebug.destroy = destroy;
549
477
 
550
478
  Object.keys(env).forEach(key => {
@@ -712,7 +640,7 @@ function setup(env) {
712
640
  namespaces = split[i].replace(/\*/g, '.*?');
713
641
 
714
642
  if (namespaces[0] === '-') {
715
- createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
643
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
716
644
  } else {
717
645
  createDebug.names.push(new RegExp('^' + namespaces + '$'));
718
646
  }
@@ -809,172 +737,244 @@ module.exports = setup;
809
737
 
810
738
  /***/ }),
811
739
 
812
- /***/ 824:
740
+ /***/ 22:
741
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
742
+
743
+ var v1 = __webpack_require__(481);
744
+ var v4 = __webpack_require__(426);
745
+
746
+ var uuid = v4;
747
+ uuid.v1 = v1;
748
+ uuid.v4 = v4;
749
+
750
+ module.exports = uuid;
751
+
752
+
753
+ /***/ }),
754
+
755
+ /***/ 725:
813
756
  /***/ ((module) => {
814
757
 
815
758
  /**
816
- * Helpers.
759
+ * Convert array of 16 byte values to UUID string format of the form:
760
+ * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
817
761
  */
762
+ var byteToHex = [];
763
+ for (var i = 0; i < 256; ++i) {
764
+ byteToHex[i] = (i + 0x100).toString(16).substr(1);
765
+ }
818
766
 
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;
767
+ function bytesToUuid(buf, offset) {
768
+ var i = offset || 0;
769
+ var bth = byteToHex;
770
+ // join used to fix memory issue caused by concatenation: https://bugs.chromium.org/p/v8/issues/detail?id=3175#c4
771
+ return ([
772
+ bth[buf[i++]], bth[buf[i++]],
773
+ bth[buf[i++]], bth[buf[i++]], '-',
774
+ bth[buf[i++]], bth[buf[i++]], '-',
775
+ bth[buf[i++]], bth[buf[i++]], '-',
776
+ bth[buf[i++]], bth[buf[i++]], '-',
777
+ bth[buf[i++]], bth[buf[i++]],
778
+ bth[buf[i++]], bth[buf[i++]],
779
+ bth[buf[i++]], bth[buf[i++]]
780
+ ]).join('');
781
+ }
825
782
 
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
- */
783
+ module.exports = bytesToUuid;
839
784
 
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
- };
853
785
 
854
- /**
855
- * Parse the given `str` and return milliseconds.
856
- *
857
- * @param {String} str
858
- * @return {Number}
859
- * @api private
860
- */
786
+ /***/ }),
861
787
 
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;
788
+ /***/ 157:
789
+ /***/ ((module) => {
790
+
791
+ // Unique ID creation requires a high quality random # generator. In the
792
+ // browser this is a little complicated due to unknown quality of Math.random()
793
+ // and inconsistent support for the `crypto` API. We do the best we can via
794
+ // feature-detection
795
+
796
+ // getRandomValues needs to be invoked in a context where "this" is a Crypto
797
+ // implementation. Also, find the complete implementation of crypto on IE11.
798
+ var getRandomValues = (typeof(crypto) != 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto)) ||
799
+ (typeof(msCrypto) != 'undefined' && typeof window.msCrypto.getRandomValues == 'function' && msCrypto.getRandomValues.bind(msCrypto));
800
+
801
+ if (getRandomValues) {
802
+ // WHATWG crypto RNG - http://wiki.whatwg.org/wiki/Crypto
803
+ var rnds8 = new Uint8Array(16); // eslint-disable-line no-undef
804
+
805
+ module.exports = function whatwgRNG() {
806
+ getRandomValues(rnds8);
807
+ return rnds8;
808
+ };
809
+ } else {
810
+ // Math.random()-based (RNG)
811
+ //
812
+ // If all else fails, use Math.random(). It's fast, but is of unspecified
813
+ // quality.
814
+ var rnds = new Array(16);
815
+
816
+ module.exports = function mathRNG() {
817
+ for (var i = 0, r; i < 16; i++) {
818
+ if ((i & 0x03) === 0) r = Math.random() * 0x100000000;
819
+ rnds[i] = r >>> ((i & 0x03) << 3) & 0xff;
820
+ }
821
+
822
+ return rnds;
823
+ };
824
+ }
825
+
826
+
827
+ /***/ }),
828
+
829
+ /***/ 481:
830
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
831
+
832
+ var rng = __webpack_require__(157);
833
+ var bytesToUuid = __webpack_require__(725);
834
+
835
+ // **`v1()` - Generate time-based UUID**
836
+ //
837
+ // Inspired by https://github.com/LiosK/UUID.js
838
+ // and http://docs.python.org/library/uuid.html
839
+
840
+ var _nodeId;
841
+ var _clockseq;
842
+
843
+ // Previous uuid creation time
844
+ var _lastMSecs = 0;
845
+ var _lastNSecs = 0;
846
+
847
+ // See https://github.com/uuidjs/uuid for API details
848
+ function v1(options, buf, offset) {
849
+ var i = buf && offset || 0;
850
+ var b = buf || [];
851
+
852
+ options = options || {};
853
+ var node = options.node || _nodeId;
854
+ var clockseq = options.clockseq !== undefined ? options.clockseq : _clockseq;
855
+
856
+ // node and clockseq need to be initialized to random values if they're not
857
+ // specified. We do this lazily to minimize issues related to insufficient
858
+ // system entropy. See #189
859
+ if (node == null || clockseq == null) {
860
+ var seedBytes = rng();
861
+ if (node == null) {
862
+ // Per 4.5, create and 48-bit node id, (47 random bits + multicast bit = 1)
863
+ node = _nodeId = [
864
+ seedBytes[0] | 0x01,
865
+ seedBytes[1], seedBytes[2], seedBytes[3], seedBytes[4], seedBytes[5]
866
+ ];
867
+ }
868
+ if (clockseq == null) {
869
+ // Per 4.2.2, randomize (14 bit) clockseq
870
+ clockseq = _clockseq = (seedBytes[6] << 8 | seedBytes[7]) & 0x3fff;
871
+ }
916
872
  }
917
- }
918
873
 
919
- /**
920
- * Short format for `ms`.
921
- *
922
- * @param {Number} ms
923
- * @return {String}
924
- * @api private
925
- */
874
+ // UUID timestamps are 100 nano-second units since the Gregorian epoch,
875
+ // (1582-10-15 00:00). JSNumbers aren't precise enough for this, so
876
+ // time is handled internally as 'msecs' (integer milliseconds) and 'nsecs'
877
+ // (100-nanoseconds offset from msecs) since unix epoch, 1970-01-01 00:00.
878
+ var msecs = options.msecs !== undefined ? options.msecs : new Date().getTime();
926
879
 
927
- function fmtShort(ms) {
928
- var msAbs = Math.abs(ms);
929
- if (msAbs >= d) {
930
- return Math.round(ms / d) + 'd';
880
+ // Per 4.2.1.2, use count of uuid's generated during the current clock
881
+ // cycle to simulate higher resolution clock
882
+ var nsecs = options.nsecs !== undefined ? options.nsecs : _lastNSecs + 1;
883
+
884
+ // Time since last uuid creation (in msecs)
885
+ var dt = (msecs - _lastMSecs) + (nsecs - _lastNSecs)/10000;
886
+
887
+ // Per 4.2.1.2, Bump clockseq on clock regression
888
+ if (dt < 0 && options.clockseq === undefined) {
889
+ clockseq = clockseq + 1 & 0x3fff;
931
890
  }
932
- if (msAbs >= h) {
933
- return Math.round(ms / h) + 'h';
891
+
892
+ // Reset nsecs if clock regresses (new clockseq) or we've moved onto a new
893
+ // time interval
894
+ if ((dt < 0 || msecs > _lastMSecs) && options.nsecs === undefined) {
895
+ nsecs = 0;
934
896
  }
935
- if (msAbs >= m) {
936
- return Math.round(ms / m) + 'm';
897
+
898
+ // Per 4.2.1.2 Throw error if too many uuids are requested
899
+ if (nsecs >= 10000) {
900
+ throw new Error('uuid.v1(): Can\'t create more than 10M uuids/sec');
937
901
  }
938
- if (msAbs >= s) {
939
- return Math.round(ms / s) + 's';
902
+
903
+ _lastMSecs = msecs;
904
+ _lastNSecs = nsecs;
905
+ _clockseq = clockseq;
906
+
907
+ // Per 4.1.4 - Convert from unix epoch to Gregorian epoch
908
+ msecs += 12219292800000;
909
+
910
+ // `time_low`
911
+ var tl = ((msecs & 0xfffffff) * 10000 + nsecs) % 0x100000000;
912
+ b[i++] = tl >>> 24 & 0xff;
913
+ b[i++] = tl >>> 16 & 0xff;
914
+ b[i++] = tl >>> 8 & 0xff;
915
+ b[i++] = tl & 0xff;
916
+
917
+ // `time_mid`
918
+ var tmh = (msecs / 0x100000000 * 10000) & 0xfffffff;
919
+ b[i++] = tmh >>> 8 & 0xff;
920
+ b[i++] = tmh & 0xff;
921
+
922
+ // `time_high_and_version`
923
+ b[i++] = tmh >>> 24 & 0xf | 0x10; // include version
924
+ b[i++] = tmh >>> 16 & 0xff;
925
+
926
+ // `clock_seq_hi_and_reserved` (Per 4.2.2 - include variant)
927
+ b[i++] = clockseq >>> 8 | 0x80;
928
+
929
+ // `clock_seq_low`
930
+ b[i++] = clockseq & 0xff;
931
+
932
+ // `node`
933
+ for (var n = 0; n < 6; ++n) {
934
+ b[i + n] = node[n];
940
935
  }
941
- return ms + 'ms';
936
+
937
+ return buf ? buf : bytesToUuid(b);
942
938
  }
943
939
 
944
- /**
945
- * Long format for `ms`.
946
- *
947
- * @param {Number} ms
948
- * @return {String}
949
- * @api private
950
- */
940
+ module.exports = v1;
951
941
 
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');
942
+
943
+ /***/ }),
944
+
945
+ /***/ 426:
946
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
947
+
948
+ var rng = __webpack_require__(157);
949
+ var bytesToUuid = __webpack_require__(725);
950
+
951
+ function v4(options, buf, offset) {
952
+ var i = buf && offset || 0;
953
+
954
+ if (typeof(options) == 'string') {
955
+ buf = options === 'binary' ? new Array(16) : null;
956
+ options = null;
965
957
  }
966
- return ms + ' ms';
967
- }
958
+ options = options || {};
968
959
 
969
- /**
970
- * Pluralization helper.
971
- */
960
+ var rnds = options.random || (options.rng || rng)();
972
961
 
973
- function plural(ms, msAbs, n, name) {
974
- var isPlural = msAbs >= n * 1.5;
975
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
962
+ // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`
963
+ rnds[6] = (rnds[6] & 0x0f) | 0x40;
964
+ rnds[8] = (rnds[8] & 0x3f) | 0x80;
965
+
966
+ // Copy bytes to buffer, if provided
967
+ if (buf) {
968
+ for (var ii = 0; ii < 16; ++ii) {
969
+ buf[i + ii] = rnds[ii];
970
+ }
971
+ }
972
+
973
+ return buf || bytesToUuid(rnds);
976
974
  }
977
975
 
976
+ module.exports = v4;
977
+
978
978
 
979
979
  /***/ })
980
980
 
@@ -1316,8 +1316,8 @@ var GlobalVars = /** @class */ (function () {
1316
1316
  }());
1317
1317
 
1318
1318
 
1319
- // EXTERNAL MODULE: ./node_modules/debug/src/browser.js
1320
- var browser = __webpack_require__(227);
1319
+ // EXTERNAL MODULE: ../../node_modules/debug/src/browser.js
1320
+ var browser = __webpack_require__(130);
1321
1321
  ;// CONCATENATED MODULE: ./src/internal/telemetry.ts
1322
1322
 
1323
1323
  var topLevelLogger = (0,browser.debug)('teamsJs');
@@ -1877,7 +1877,7 @@ function createTeamsAppLink(params) {
1877
1877
  * @returns true if the Adaptive Card Version is not supported and false if it is supported.
1878
1878
  */
1879
1879
  function isHostAdaptiveCardSchemaVersionUnsupported(hostAdaptiveCardSchemaVersion) {
1880
- var versionCheck = compareSDKVersions(hostAdaptiveCardSchemaVersion.majorVersion + "." + hostAdaptiveCardSchemaVersion.minorVersion, minAdaptiveCardVersion.majorVersion + "." + minAdaptiveCardVersion.minorVersion);
1880
+ var versionCheck = compareSDKVersions("".concat(hostAdaptiveCardSchemaVersion.majorVersion, ".").concat(hostAdaptiveCardSchemaVersion.minorVersion), "".concat(minAdaptiveCardVersion.majorVersion, ".").concat(minAdaptiveCardVersion.minorVersion));
1881
1881
  if (versionCheck >= 0) {
1882
1882
  return false;
1883
1883
  }
@@ -2151,7 +2151,7 @@ var _minRuntimeConfigToUninitialize = {
2151
2151
  };
2152
2152
 
2153
2153
  ;// CONCATENATED MODULE: ./src/public/version.ts
2154
- var version = "2.8.0-beta.0";
2154
+ var version = "2.8.0-beta.1";
2155
2155
 
2156
2156
  ;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
2157
2157
 
@@ -2209,8 +2209,8 @@ function ensureInitialized(runtime) {
2209
2209
  }
2210
2210
  }
2211
2211
  if (!found) {
2212
- throw new Error("This call is only allowed in following contexts: " + JSON.stringify(expectedFrameContexts) + ". " +
2213
- ("Current context: \"" + GlobalVars.frameContext + "\"."));
2212
+ throw new Error("This call is only allowed in following contexts: ".concat(JSON.stringify(expectedFrameContexts), ". ") +
2213
+ "Current context: \"".concat(GlobalVars.frameContext, "\"."));
2214
2214
  }
2215
2215
  }
2216
2216
  return isRuntimeInitialized(runtime);
@@ -2765,6 +2765,9 @@ var dialog;
2765
2765
  /**
2766
2766
  * Submit the dialog module and close the dialog
2767
2767
  *
2768
+ * @remarks
2769
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
2770
+ *
2768
2771
  * @param result - The result to be sent to the bot or the app. Typically a JSON object or a serialized version of it,
2769
2772
  * If this function is called from a dialog while {@link M365ContentAction} is set in the context object by the host, result will be ignored
2770
2773
  *
@@ -2787,8 +2790,8 @@ var dialog;
2787
2790
  /**
2788
2791
  * Send message to the parent from dialog
2789
2792
  *
2790
- * @remarks
2791
- * This function is only called from inside of a dialog
2793
+ * @remarks
2794
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
2792
2795
  *
2793
2796
  * @param message - The message to send to the parent
2794
2797
  *
@@ -2825,7 +2828,7 @@ var dialog;
2825
2828
  * Register a listener that will be triggered when a message is received from the app that opened the dialog.
2826
2829
  *
2827
2830
  * @remarks
2828
- * This function is only called from inside of a dialog.
2831
+ * This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
2829
2832
  *
2830
2833
  * @param listener - The listener that will be triggered.
2831
2834
  *
@@ -3009,7 +3012,7 @@ var dialog;
3009
3012
  * This function cannot be called from inside of a dialog
3010
3013
  *
3011
3014
  * @param adaptiveCardDialogInfo - An object containing the parameters of the dialog module {@link AdaptiveCardDialogInfo}.
3012
- * @param submitHandler - Handler that triggers when a dialog calls the {@linkcode submit} function or when the user closes the dialog.
3015
+ * @param submitHandler - Handler that triggers when a dialog calls the {@linkcode url.submit} function or when the user closes the dialog.
3013
3016
  *
3014
3017
  * @beta
3015
3018
  */
@@ -4871,7 +4874,10 @@ function initializeCommunication(validMessageOrigins) {
4871
4874
  * Limited to Microsoft-internal use
4872
4875
  */
4873
4876
  function uninitializeCommunication() {
4874
- Communication.currentWindow.removeEventListener('message', CommunicationPrivate.messageListener, false);
4877
+ if (Communication.currentWindow) {
4878
+ Communication.currentWindow.removeEventListener('message', CommunicationPrivate.messageListener, false);
4879
+ }
4880
+ Communication.currentWindow = null;
4875
4881
  Communication.parentWindow = null;
4876
4882
  Communication.parentOrigin = null;
4877
4883
  Communication.childWindow = null;
@@ -5683,36 +5689,36 @@ function createTeamsDeepLinkForChat(users, topic, message) {
5683
5689
  if (users.length === 0) {
5684
5690
  throw new Error('Must have at least one user when creating a chat deep link');
5685
5691
  }
5686
- var usersSearchParameter = teamsDeepLinkUsersUrlParameterName + "=" + users.map(function (user) { return encodeURIComponent(user); }).join(',');
5687
- var topicSearchParameter = topic === undefined ? '' : "&" + teamsDeepLinkTopicUrlParameterName + "=" + encodeURIComponent(topic);
5688
- var messageSearchParameter = message === undefined ? '' : "&" + teamsDeepLinkMessageUrlParameterName + "=" + encodeURIComponent(message);
5689
- return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForChat + "?" + usersSearchParameter + topicSearchParameter + messageSearchParameter;
5692
+ var usersSearchParameter = "".concat(teamsDeepLinkUsersUrlParameterName, "=") + users.map(function (user) { return encodeURIComponent(user); }).join(',');
5693
+ var topicSearchParameter = topic === undefined ? '' : "&".concat(teamsDeepLinkTopicUrlParameterName, "=").concat(encodeURIComponent(topic));
5694
+ var messageSearchParameter = message === undefined ? '' : "&".concat(teamsDeepLinkMessageUrlParameterName, "=").concat(encodeURIComponent(message));
5695
+ return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForChat, "?").concat(usersSearchParameter).concat(topicSearchParameter).concat(messageSearchParameter);
5690
5696
  }
5691
5697
  function createTeamsDeepLinkForCall(targets, withVideo, source) {
5692
5698
  if (targets.length === 0) {
5693
5699
  throw new Error('Must have at least one target when creating a call deep link');
5694
5700
  }
5695
- var usersSearchParameter = teamsDeepLinkUsersUrlParameterName + "=" + targets.map(function (user) { return encodeURIComponent(user); }).join(',');
5696
- var withVideoSearchParameter = withVideo === undefined ? '' : "&" + teamsDeepLinkWithVideoUrlParameterName + "=" + encodeURIComponent(withVideo);
5697
- var sourceSearchParameter = source === undefined ? '' : "&" + teamsDeepLinkSourceUrlParameterName + "=" + encodeURIComponent(source);
5698
- return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForCall + "?" + usersSearchParameter + withVideoSearchParameter + sourceSearchParameter;
5701
+ var usersSearchParameter = "".concat(teamsDeepLinkUsersUrlParameterName, "=") + targets.map(function (user) { return encodeURIComponent(user); }).join(',');
5702
+ var withVideoSearchParameter = withVideo === undefined ? '' : "&".concat(teamsDeepLinkWithVideoUrlParameterName, "=").concat(encodeURIComponent(withVideo));
5703
+ var sourceSearchParameter = source === undefined ? '' : "&".concat(teamsDeepLinkSourceUrlParameterName, "=").concat(encodeURIComponent(source));
5704
+ return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForCall, "?").concat(usersSearchParameter).concat(withVideoSearchParameter).concat(sourceSearchParameter);
5699
5705
  }
5700
5706
  function createTeamsDeepLinkForCalendar(attendees, startTime, endTime, subject, content) {
5701
5707
  var attendeeSearchParameter = attendees === undefined
5702
5708
  ? ''
5703
- : teamsDeepLinkAttendeesUrlParameterName + "=" +
5709
+ : "".concat(teamsDeepLinkAttendeesUrlParameterName, "=") +
5704
5710
  attendees.map(function (attendee) { return encodeURIComponent(attendee); }).join(',');
5705
- var startTimeSearchParameter = startTime === undefined ? '' : "&" + teamsDeepLinkStartTimeUrlParameterName + "=" + encodeURIComponent(startTime);
5706
- var endTimeSearchParameter = endTime === undefined ? '' : "&" + teamsDeepLinkEndTimeUrlParameterName + "=" + encodeURIComponent(endTime);
5707
- var subjectSearchParameter = subject === undefined ? '' : "&" + teamsDeepLinkSubjectUrlParameterName + "=" + encodeURIComponent(subject);
5708
- var contentSearchParameter = content === undefined ? '' : "&" + teamsDeepLinkContentUrlParameterName + "=" + encodeURIComponent(content);
5709
- return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForCalendar + "?" + attendeeSearchParameter + startTimeSearchParameter + endTimeSearchParameter + subjectSearchParameter + contentSearchParameter;
5711
+ var startTimeSearchParameter = startTime === undefined ? '' : "&".concat(teamsDeepLinkStartTimeUrlParameterName, "=").concat(encodeURIComponent(startTime));
5712
+ var endTimeSearchParameter = endTime === undefined ? '' : "&".concat(teamsDeepLinkEndTimeUrlParameterName, "=").concat(encodeURIComponent(endTime));
5713
+ var subjectSearchParameter = subject === undefined ? '' : "&".concat(teamsDeepLinkSubjectUrlParameterName, "=").concat(encodeURIComponent(subject));
5714
+ var contentSearchParameter = content === undefined ? '' : "&".concat(teamsDeepLinkContentUrlParameterName, "=").concat(encodeURIComponent(content));
5715
+ return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForCalendar, "?").concat(attendeeSearchParameter).concat(startTimeSearchParameter).concat(endTimeSearchParameter).concat(subjectSearchParameter).concat(contentSearchParameter);
5710
5716
  }
5711
5717
  function createTeamsDeepLinkForAppInstallDialog(appId) {
5712
5718
  if (!appId) {
5713
5719
  throw new Error('App ID must be set when creating an app install dialog deep link');
5714
5720
  }
5715
- return teamsDeepLinkProtocol + "://" + teamsDeepLinkHost + teamsDeepLinkUrlPathForAppInstall + encodeURIComponent(appId);
5721
+ return "".concat(teamsDeepLinkProtocol, "://").concat(teamsDeepLinkHost).concat(teamsDeepLinkUrlPathForAppInstall).concat(encodeURIComponent(appId));
5716
5722
  }
5717
5723
 
5718
5724
  ;// CONCATENATED MODULE: ./src/public/appInstallDialog.ts
@@ -6754,7 +6760,7 @@ var geoLocation;
6754
6760
  ;// CONCATENATED MODULE: ./src/public/adaptiveCards.ts
6755
6761
 
6756
6762
  /**
6757
- * @returns The {@linkcode: AdaptiveCardVersion} representing the Adaptive Card schema
6763
+ * @returns The {@linkcode AdaptiveCardVersion} representing the Adaptive Card schema
6758
6764
  * version supported by the host, or undefined if the host does not support Adaptive Cards
6759
6765
  */
6760
6766
  function getAdaptiveCardSchemaVersion() {
@@ -6926,6 +6932,42 @@ var location_location;
6926
6932
  })(location_location || (location_location = {}));
6927
6933
 
6928
6934
  ;// CONCATENATED MODULE: ./src/public/meeting.ts
6935
+ var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
6936
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
6937
+ return new (P || (P = Promise))(function (resolve, reject) {
6938
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6939
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6940
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
6941
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
6942
+ });
6943
+ };
6944
+ var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
6945
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
6946
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
6947
+ function verb(n) { return function (v) { return step([n, v]); }; }
6948
+ function step(op) {
6949
+ if (f) throw new TypeError("Generator is already executing.");
6950
+ while (_) try {
6951
+ 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;
6952
+ if (y = 0, t) op = [op[0] & 2, t.value];
6953
+ switch (op[0]) {
6954
+ case 0: case 1: t = op; break;
6955
+ case 4: _.label++; return { value: op[1], done: false };
6956
+ case 5: _.label++; y = op[1]; op = [0]; continue;
6957
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
6958
+ default:
6959
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
6960
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
6961
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
6962
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
6963
+ if (t[2]) _.ops.pop();
6964
+ _.trys.pop(); continue;
6965
+ }
6966
+ op = body.call(thisArg, _);
6967
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
6968
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
6969
+ }
6970
+ };
6929
6971
 
6930
6972
 
6931
6973
 
@@ -6933,9 +6975,25 @@ var location_location;
6933
6975
 
6934
6976
  var meeting;
6935
6977
  (function (meeting) {
6978
+ /**
6979
+ * Reasons for the app's microphone state to change
6980
+ */
6981
+ var MicStateChangeReason;
6982
+ (function (MicStateChangeReason) {
6983
+ MicStateChangeReason[MicStateChangeReason["HostInitiated"] = 0] = "HostInitiated";
6984
+ MicStateChangeReason[MicStateChangeReason["AppInitiated"] = 1] = "AppInitiated";
6985
+ MicStateChangeReason[MicStateChangeReason["AppDeclinedToChange"] = 2] = "AppDeclinedToChange";
6986
+ MicStateChangeReason[MicStateChangeReason["AppFailedToChange"] = 3] = "AppFailedToChange";
6987
+ })(MicStateChangeReason || (MicStateChangeReason = {}));
6936
6988
  /**
6937
6989
  * Different types of meeting reactions that can be sent/received
6938
6990
  *
6991
+ * @hidden
6992
+ * Hide from docs.
6993
+ *
6994
+ * @internal
6995
+ * Limited to Microsoft-internal use
6996
+ *
6939
6997
  * @beta
6940
6998
  */
6941
6999
  var MeetingReactionType;
@@ -7184,6 +7242,12 @@ var meeting;
7184
7242
  *
7185
7243
  * @param handler The handler to invoke when the selfParticipant's (current user's) raiseHandState changes.
7186
7244
  *
7245
+ * @hidden
7246
+ * Hide from docs.
7247
+ *
7248
+ * @internal
7249
+ * Limited to Microsoft-internal use
7250
+ *
7187
7251
  * @beta
7188
7252
  */
7189
7253
  function registerRaiseHandStateChangedHandler(handler) {
@@ -7200,6 +7264,12 @@ var meeting;
7200
7264
  *
7201
7265
  * @param handler The handler to invoke when the selfParticipant (current user) successfully sends a meeting reaction
7202
7266
  *
7267
+ * @hidden
7268
+ * Hide from docs.
7269
+ *
7270
+ * @internal
7271
+ * Limited to Microsoft-internal use
7272
+ *
7203
7273
  * @beta
7204
7274
  */
7205
7275
  function registerMeetingReactionReceivedHandler(handler) {
@@ -7236,6 +7306,123 @@ var meeting;
7236
7306
  }
7237
7307
  appShareButton.setOptions = setOptions;
7238
7308
  })(appShareButton = meeting.appShareButton || (meeting.appShareButton = {}));
7309
+ /**
7310
+ * Have the app handle audio (mic & speaker) and turn off host audio.
7311
+ *
7312
+ * When {@link RequestAppAudioHandlingParams.isAppHandlingAudio} is true, the host will switch to audioless mode
7313
+ * Registers for mic mute status change events, which are events that the app can receive from the host asking the app to
7314
+ * mute or unmute the microphone.
7315
+ *
7316
+ * When {@link RequestAppAudioHandlingParams.isAppHandlingAudio} is false, the host will switch out of audioless mode
7317
+ * Unregisters the mic mute status change events so the app will no longer receive these events
7318
+ *
7319
+ * @throws Error if {@linkcode app.initialize} has not successfully completed
7320
+ * @throws Error if {@link RequestAppAudioHandlingParams.micMuteStateChangedCallback} parameter is not defined
7321
+ *
7322
+ * @param requestAppAudioHandlingParams - {@link RequestAppAudioHandlingParams} object with values for the audio switchover
7323
+ * @param callback - Callback with one parameter, the result
7324
+ * can either be true (the host is now in audioless mode) or false (the host is not in audioless mode)
7325
+ *
7326
+ * @hidden
7327
+ * Hide from docs.
7328
+ *
7329
+ * @internal
7330
+ * Limited to Microsoft-internal use
7331
+ *
7332
+ * @beta
7333
+ */
7334
+ function requestAppAudioHandling(requestAppAudioHandlingParams, callback) {
7335
+ if (!callback) {
7336
+ throw new Error('[requestAppAudioHandling] Callback response cannot be null');
7337
+ }
7338
+ if (!requestAppAudioHandlingParams.micMuteStateChangedCallback) {
7339
+ throw new Error('[requestAppAudioHandling] Callback Mic mute state handler cannot be null');
7340
+ }
7341
+ ensureInitialized(runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
7342
+ if (requestAppAudioHandlingParams.isAppHandlingAudio) {
7343
+ startAppAudioHandling(requestAppAudioHandlingParams, callback);
7344
+ }
7345
+ else {
7346
+ stopAppAudioHandling(requestAppAudioHandlingParams, callback);
7347
+ }
7348
+ }
7349
+ meeting.requestAppAudioHandling = requestAppAudioHandling;
7350
+ function startAppAudioHandling(requestAppAudioHandlingParams, callback) {
7351
+ var _this = this;
7352
+ var callbackInternalRequest = function (error, isHostAudioless) {
7353
+ if (error && isHostAudioless != null) {
7354
+ throw new Error('[requestAppAudioHandling] Callback response - both parameters cannot be set');
7355
+ }
7356
+ if (error) {
7357
+ throw new Error("[requestAppAudioHandling] Callback response - SDK error ".concat(error.errorCode, " ").concat(error.message));
7358
+ }
7359
+ if (typeof isHostAudioless !== 'boolean') {
7360
+ throw new Error('[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean');
7361
+ }
7362
+ var micStateChangedCallback = function (micState) { return __awaiter(_this, void 0, void 0, function () {
7363
+ var newMicState, micStateDidUpdate, _a;
7364
+ return __generator(this, function (_b) {
7365
+ switch (_b.label) {
7366
+ case 0:
7367
+ _b.trys.push([0, 2, , 3]);
7368
+ return [4 /*yield*/, requestAppAudioHandlingParams.micMuteStateChangedCallback(micState)];
7369
+ case 1:
7370
+ newMicState = _b.sent();
7371
+ micStateDidUpdate = newMicState.isMicMuted === micState.isMicMuted;
7372
+ setMicStateWithReason(newMicState, micStateDidUpdate ? MicStateChangeReason.HostInitiated : MicStateChangeReason.AppDeclinedToChange);
7373
+ return [3 /*break*/, 3];
7374
+ case 2:
7375
+ _a = _b.sent();
7376
+ setMicStateWithReason(micState, MicStateChangeReason.AppFailedToChange);
7377
+ return [3 /*break*/, 3];
7378
+ case 3: return [2 /*return*/];
7379
+ }
7380
+ });
7381
+ }); };
7382
+ registerHandler('meeting.micStateChanged', micStateChangedCallback);
7383
+ callback(isHostAudioless);
7384
+ };
7385
+ sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalRequest);
7386
+ }
7387
+ function stopAppAudioHandling(requestAppAudioHandlingParams, callback) {
7388
+ var callbackInternalStop = function (error, isHostAudioless) {
7389
+ if (error && isHostAudioless != null) {
7390
+ throw new Error('[requestAppAudioHandling] Callback response - both parameters cannot be set');
7391
+ }
7392
+ if (error) {
7393
+ throw new Error("[requestAppAudioHandling] Callback response - SDK error ".concat(error.errorCode, " ").concat(error.message));
7394
+ }
7395
+ if (typeof isHostAudioless !== 'boolean') {
7396
+ throw new Error('[requestAppAudioHandling] Callback response - isHostAudioless must be a boolean');
7397
+ }
7398
+ if (doesHandlerExist('meeting.micStateChanged')) {
7399
+ removeHandler('meeting.micStateChanged');
7400
+ }
7401
+ callback(isHostAudioless);
7402
+ };
7403
+ sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalStop);
7404
+ }
7405
+ /**
7406
+ * Notifies the host that the microphone state has changed in the app.
7407
+ * @param micState - The new state that the microphone is in
7408
+ * isMicMuted - Boolean to indicate the current mute status of the mic.
7409
+ *
7410
+ * @hidden
7411
+ * Hide from docs.
7412
+ *
7413
+ * @internal
7414
+ * Limited to Microsoft-internal use
7415
+ *
7416
+ * @beta
7417
+ */
7418
+ function updateMicState(micState) {
7419
+ setMicStateWithReason(micState, MicStateChangeReason.AppInitiated);
7420
+ }
7421
+ meeting.updateMicState = updateMicState;
7422
+ function setMicStateWithReason(micState, reason) {
7423
+ ensureInitialized(runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
7424
+ sendMessageToParent('meeting.updateMicState', [micState, reason]);
7425
+ }
7239
7426
  })(meeting || (meeting = {}));
7240
7427
 
7241
7428
  ;// CONCATENATED MODULE: ./src/public/monetization.ts
@@ -7805,7 +7992,7 @@ var search;
7805
7992
 
7806
7993
  /**
7807
7994
  * Namespace to open a share dialog for web content.
7808
- * For more info, see {@link https://learn.microsoft.com/en-us/microsoftteams/platform/concepts/build-and-test/share-to-teams-from-personal-app-or-tab Share to Teams from personal app or tab}
7995
+ * For more info, see [Share to Teams from personal app or tab](https://learn.microsoft.com/microsoftteams/platform/concepts/build-and-test/share-to-teams-from-personal-app-or-tab)
7809
7996
  */
7810
7997
  var sharing;
7811
7998
  (function (sharing) {
@@ -8111,6 +8298,8 @@ var appInitialization;
8111
8298
 
8112
8299
 
8113
8300
 
8301
+
8302
+
8114
8303
  /**
8115
8304
  * @deprecated
8116
8305
  * As of 2.0.0, please use {@link app.initialize app.initialize(validMessageOrigins?: string[]): Promise\<void\>} instead.
@@ -8156,10 +8345,12 @@ function print() {
8156
8345
  */
8157
8346
  function getContext(callback) {
8158
8347
  ensureInitializeCalled();
8159
- app.getContext().then(function (context) {
8160
- if (callback) {
8161
- callback(transformAppContextToLegacyContext(context));
8348
+ sendMessageToParent('getContext', function (context) {
8349
+ if (!context.frameContext) {
8350
+ // Fallback logic for frameContext properties
8351
+ context.frameContext = GlobalVars.frameContext;
8162
8352
  }
8353
+ callback(context);
8163
8354
  });
8164
8355
  }
8165
8356
  /**
@@ -8374,86 +8565,6 @@ function setFrameContext(frameContext) {
8374
8565
  function initializeWithFrameContext(frameContext, callback, validMessageOrigins) {
8375
8566
  pages.initializeWithFrameContext(frameContext, callback, validMessageOrigins);
8376
8567
  }
8377
- /**
8378
- * Transforms the app.Context object received to the legacy global Context object
8379
- * @param appContext - The app.Context object to be transformed
8380
- * @returns The transformed legacy global Context object
8381
- */
8382
- function transformAppContextToLegacyContext(appContext) {
8383
- var context = {
8384
- // actionInfo
8385
- actionInfo: appContext.actionInfo,
8386
- // app
8387
- locale: appContext.app.locale,
8388
- appSessionId: appContext.app.sessionId,
8389
- theme: appContext.app.theme,
8390
- appIconPosition: appContext.app.iconPositionVertical,
8391
- osLocaleInfo: appContext.app.osLocaleInfo,
8392
- parentMessageId: appContext.app.parentMessageId,
8393
- userClickTime: appContext.app.userClickTime,
8394
- userFileOpenPreference: appContext.app.userFileOpenPreference,
8395
- appLaunchId: appContext.app.appLaunchId,
8396
- // app.host
8397
- hostClientType: appContext.app.host.clientType,
8398
- sessionId: appContext.app.host.sessionId,
8399
- ringId: appContext.app.host.ringId,
8400
- // page
8401
- entityId: appContext.page.id,
8402
- frameContext: appContext.page.frameContext,
8403
- subEntityId: appContext.page.subPageId,
8404
- isFullScreen: appContext.page.isFullScreen,
8405
- isMultiWindow: appContext.page.isMultiWindow,
8406
- sourceOrigin: appContext.page.sourceOrigin,
8407
- // user
8408
- userObjectId: appContext.user !== undefined ? appContext.user.id : undefined,
8409
- isCallingAllowed: appContext.user !== undefined ? appContext.user.isCallingAllowed : undefined,
8410
- isPSTNCallingAllowed: appContext.user !== undefined ? appContext.user.isPSTNCallingAllowed : undefined,
8411
- userLicenseType: appContext.user !== undefined ? appContext.user.licenseType : undefined,
8412
- loginHint: appContext.user !== undefined ? appContext.user.loginHint : undefined,
8413
- userPrincipalName: appContext.user !== undefined ? appContext.user.userPrincipalName : undefined,
8414
- // user.tenant
8415
- tid: appContext.user !== undefined
8416
- ? appContext.user.tenant !== undefined
8417
- ? appContext.user.tenant.id
8418
- : undefined
8419
- : undefined,
8420
- tenantSKU: appContext.user !== undefined
8421
- ? appContext.user.tenant !== undefined
8422
- ? appContext.user.tenant.teamsSku
8423
- : undefined
8424
- : undefined,
8425
- // channel
8426
- channelId: appContext.channel !== undefined ? appContext.channel.id : undefined,
8427
- channelName: appContext.channel !== undefined ? appContext.channel.displayName : undefined,
8428
- channelRelativeUrl: appContext.channel !== undefined ? appContext.channel.relativeUrl : undefined,
8429
- channelType: appContext.channel !== undefined ? appContext.channel.membershipType : undefined,
8430
- defaultOneNoteSectionId: appContext.channel !== undefined ? appContext.channel.defaultOneNoteSectionId : undefined,
8431
- hostTeamGroupId: appContext.channel !== undefined ? appContext.channel.ownerGroupId : undefined,
8432
- hostTeamTenantId: appContext.channel !== undefined ? appContext.channel.ownerTenantId : undefined,
8433
- // chat
8434
- chatId: appContext.chat !== undefined ? appContext.chat.id : undefined,
8435
- // meeting
8436
- meetingId: appContext.meeting !== undefined ? appContext.meeting.id : undefined,
8437
- // sharepoint
8438
- sharepoint: appContext.sharepoint,
8439
- // team
8440
- teamId: appContext.team !== undefined ? appContext.team.internalId : undefined,
8441
- teamName: appContext.team !== undefined ? appContext.team.displayName : undefined,
8442
- teamType: appContext.team !== undefined ? appContext.team.type : undefined,
8443
- groupId: appContext.team !== undefined ? appContext.team.groupId : undefined,
8444
- teamTemplateId: appContext.team !== undefined ? appContext.team.templateId : undefined,
8445
- isTeamArchived: appContext.team !== undefined ? appContext.team.isArchived : undefined,
8446
- userTeamRole: appContext.team !== undefined ? appContext.team.userRole : undefined,
8447
- // sharepointSite
8448
- teamSiteUrl: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteUrl : undefined,
8449
- teamSiteDomain: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteDomain : undefined,
8450
- teamSitePath: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSitePath : undefined,
8451
- teamSiteId: appContext.sharePointSite !== undefined ? appContext.sharePointSite.teamSiteId : undefined,
8452
- mySitePath: appContext.sharePointSite !== undefined ? appContext.sharePointSite.mySitePath : undefined,
8453
- mySiteDomain: appContext.sharePointSite !== undefined ? appContext.sharePointSite.mySiteDomain : undefined,
8454
- };
8455
- return context;
8456
- }
8457
8568
 
8458
8569
  ;// CONCATENATED MODULE: ./src/public/navigation.ts
8459
8570
 
@@ -8667,7 +8778,7 @@ var tasks;
8667
8778
  (function (tasks) {
8668
8779
  /**
8669
8780
  * @deprecated
8670
- * As of 2.0.0, please use {@link dialog.url.open dialog.url.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
8781
+ * As of 2.8.0, please use {@link dialog.url.open dialog.url.open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for url based dialogs
8671
8782
  * and {@link dialog.url.bot.open dialog.url.bot.open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): void} for bot-based dialogs. In Teams,
8672
8783
  * this function can be used for Adaptive Card-based dialogs. Support for Adaptive Card-based dialogs is coming to other hosts in the future.
8673
8784
  *
@@ -8718,7 +8829,7 @@ var tasks;
8718
8829
  tasks.updateTask = updateTask;
8719
8830
  /**
8720
8831
  * @deprecated
8721
- * As of 2.0.0, please use {@link dialog.submit} instead.
8832
+ * As of 2.8.0, please use {@link dialog.url.submit} instead.
8722
8833
  *
8723
8834
  * Submit the task module.
8724
8835
  *