· 6 years ago · Apr 01, 2020, 08:04 AM
1// Running this script will make pnp v 1.3.9 available on $pnp in the window
2
3!function(e, t) {
4 e.$pnp = t()
5}(window, function() {
6 return r = {},
7 i.m = n = [function(e, t, n) {
8 "use strict";
9 n.d(t, "c", function() {
10 return i
11 }),
12 n.d(t, "b", function() {
13 return o
14 }),
15 n.d(t, "a", function() {
16 return s
17 }),
18 n.d(t, "d", function() {
19 return a
20 }),
21 n.d(t, "f", function() {
22 return c
23 }),
24 n.d(t, "e", function() {
25 return l
26 });
27 var r = function(e, t) {
28 return (r = Object.setPrototypeOf || {
29 __proto__: []
30 }instanceof Array && function(e, t) {
31 e.__proto__ = t
32 }
33 || function(e, t) {
34 for (var n in t)
35 t.hasOwnProperty(n) && (e[n] = t[n])
36 }
37 )(e, t)
38 };
39 function i(e, t) {
40 function n() {
41 this.constructor = e
42 }
43 r(e, t),
44 e.prototype = null === t ? Object.create(t) : (n.prototype = t.prototype,
45 new n)
46 }
47 function o(e, t, n, r) {
48 var i, o = arguments.length, s = o < 3 ? t : null === r ? r = Object.getOwnPropertyDescriptor(t, n) : r;
49 if ("object" == typeof Reflect && "function" == typeof Reflect.decorate)
50 s = Reflect.decorate(e, t, n, r);
51 else
52 for (var a = e.length - 1; 0 <= a; a--)
53 (i = e[a]) && (s = (o < 3 ? i(s) : 3 < o ? i(t, n, s) : i(t, n)) || s);
54 return 3 < o && s && Object.defineProperty(t, n, s),
55 s
56 }
57 function s(o, s, a, c) {
58 return new (a = a || Promise)(function(e, t) {
59 function n(e) {
60 try {
61 i(c.next(e))
62 } catch (e) {
63 t(e)
64 }
65 }
66 function r(e) {
67 try {
68 i(c.throw(e))
69 } catch (e) {
70 t(e)
71 }
72 }
73 function i(t) {
74 t.done ? e(t.value) : new a(function(e) {
75 e(t.value)
76 }
77 ).then(n, r)
78 }
79 i((c = c.apply(o, s || [])).next())
80 }
81 )
82 }
83 function a(n, r) {
84 var i, o, s, e, a = {
85 label: 0,
86 sent: function() {
87 if (1 & s[0])
88 throw s[1];
89 return s[1]
90 },
91 trys: [],
92 ops: []
93 };
94 return e = {
95 next: t(0),
96 throw: t(1),
97 return: t(2)
98 },
99 "function" == typeof Symbol && (e[Symbol.iterator] = function() {
100 return this
101 }
102 ),
103 e;
104 function t(t) {
105 return function(e) {
106 return function(t) {
107 if (i)
108 throw new TypeError("Generator is already executing.");
109 for (; a; )
110 try {
111 if (i = 1,
112 o && (s = 2 & t[0] ? o.return : t[0] ? o.throw || ((s = o.return) && s.call(o),
113 0) : o.next) && !(s = s.call(o, t[1])).done)
114 return s;
115 switch (o = 0,
116 s && (t = [2 & t[0], s.value]),
117 t[0]) {
118 case 0:
119 case 1:
120 s = t;
121 break;
122 case 4:
123 return a.label++,
124 {
125 value: t[1],
126 done: !1
127 };
128 case 5:
129 a.label++,
130 o = t[1],
131 t = [0];
132 continue;
133 case 7:
134 t = a.ops.pop(),
135 a.trys.pop();
136 continue;
137 default:
138 if (!(s = 0 < (s = a.trys).length && s[s.length - 1]) && (6 === t[0] || 2 === t[0])) {
139 a = 0;
140 continue
141 }
142 if (3 === t[0] && (!s || t[1] > s[0] && t[1] < s[3])) {
143 a.label = t[1];
144 break
145 }
146 if (6 === t[0] && a.label < s[1]) {
147 a.label = s[1],
148 s = t;
149 break
150 }
151 if (s && a.label < s[2]) {
152 a.label = s[2],
153 a.ops.push(t);
154 break
155 }
156 s[2] && a.ops.pop(),
157 a.trys.pop();
158 continue
159 }
160 t = r.call(n, a)
161 } catch (e) {
162 t = [6, e],
163 o = 0
164 } finally {
165 i = s = 0
166 }
167 if (5 & t[0])
168 throw t[1];
169 return {
170 value: t[0] ? t[1] : void 0,
171 done: !0
172 }
173 }([t, e])
174 }
175 }
176 }
177 function c(e) {
178 var t = "function" == typeof Symbol && e[Symbol.iterator]
179 , n = 0;
180 return t ? t.call(e) : {
181 next: function() {
182 return e && n >= e.length && (e = void 0),
183 {
184 value: e && e[n++],
185 done: !e
186 }
187 }
188 }
189 }
190 function u(e, t) {
191 var n = "function" == typeof Symbol && e[Symbol.iterator];
192 if (!n)
193 return e;
194 var r, i, o = n.call(e), s = [];
195 try {
196 for (; (void 0 === t || 0 < t--) && !(r = o.next()).done; )
197 s.push(r.value)
198 } catch (e) {
199 i = {
200 error: e
201 }
202 } finally {
203 try {
204 r && !r.done && (n = o.return) && n.call(o)
205 } finally {
206 if (i)
207 throw i.error
208 }
209 }
210 return s
211 }
212 function l() {
213 for (var e = [], t = 0; t < arguments.length; t++)
214 e = e.concat(u(arguments[t]));
215 return e
216 }
217 }
218 , function(e, t, n) {
219 "use strict";
220 var r = n(2)
221 , i = Object(r.j)(Object.entries) ? Object.entries : function(t) {
222 return Object.keys(t).map(function(e) {
223 return [e, t[e]]
224 })
225 }
226 ;
227 function o(e) {
228 return null != e ? new Map(i(e)) : new Map
229 }
230 function s(n) {
231 for (var e = [], t = 1; t < arguments.length; t++)
232 e[t - 1] = arguments[t];
233 for (var r = 0; r < e.length; r++)
234 e[r].forEach(function(e, t) {
235 n.set(t, e)
236 });
237 return n
238 }
239 var a = ["defaultCachingStore", "defaultCachingTimeoutSeconds", "globalCacheDisable", "enableCacheExpiration", "cacheExpirationIntervalMilliseconds", "spfxContext", "ie11"]
240 , c = (O.prototype.assign = function(e) {
241 this._v = s(this._v, o(e))
242 }
243 ,
244 O.prototype.get = function(e) {
245 return this._v.get(e)
246 }
247 ,
248 Object.defineProperty(O.prototype, "defaultCachingStore", {
249 get: function() {
250 return this.get(a[0])
251 },
252 enumerable: !0,
253 configurable: !0
254 }),
255 Object.defineProperty(O.prototype, "defaultCachingTimeoutSeconds", {
256 get: function() {
257 return this.get(a[1])
258 },
259 enumerable: !0,
260 configurable: !0
261 }),
262 Object.defineProperty(O.prototype, "globalCacheDisable", {
263 get: function() {
264 return this.get(a[2])
265 },
266 enumerable: !0,
267 configurable: !0
268 }),
269 Object.defineProperty(O.prototype, "enableCacheExpiration", {
270 get: function() {
271 return this.get(a[3])
272 },
273 enumerable: !0,
274 configurable: !0
275 }),
276 Object.defineProperty(O.prototype, "cacheExpirationIntervalMilliseconds", {
277 get: function() {
278 return this.get(a[4])
279 },
280 enumerable: !0,
281 configurable: !0
282 }),
283 Object.defineProperty(O.prototype, "spfxContext", {
284 get: function() {
285 return this.get(a[5])
286 },
287 enumerable: !0,
288 configurable: !0
289 }),
290 Object.defineProperty(O.prototype, "ie11", {
291 get: function() {
292 var e = this.get(a[6]);
293 return e && console.warn("PnPjs is running in ie11 compat mode. Not all features may work as expected."),
294 e
295 },
296 enumerable: !0,
297 configurable: !0
298 }),
299 O)
300 , u = new c
301 , l = n(5)
302 , p = n(0)
303 , d = (g.bind = function(e) {
304 return new g(void 0 === e ? new h : e)
305 }
306 ,
307 g.prototype.get = function(e) {
308 if (!this.enabled)
309 return null;
310 var t = this.store.getItem(e);
311 if (!Object(r.m)(t))
312 return null;
313 var n = JSON.parse(t);
314 return new Date(n.expiration) <= new Date ? (this.delete(e),
315 null) : n.value
316 }
317 ,
318 g.prototype.put = function(e, t, n) {
319 this.enabled && this.store.setItem(e, this.createPersistable(t, n))
320 }
321 ,
322 g.prototype.delete = function(e) {
323 this.enabled && this.store.removeItem(e)
324 }
325 ,
326 g.prototype.getOrPut = function(n, r, i) {
327 return Object(p.a)(this, void 0, void 0, function() {
328 var t;
329 return Object(p.d)(this, function(e) {
330 switch (e.label) {
331 case 0:
332 return this.enabled ? null !== (t = this.get(n)) ? [3, 2] : [4, r()] : [2, r()];
333 case 1:
334 t = e.sent(),
335 this.put(n, t, i),
336 e.label = 2;
337 case 2:
338 return [2, t]
339 }
340 })
341 })
342 }
343 ,
344 g.prototype.deleteExpired = function() {
345 return Object(p.a)(this, void 0, void 0, function() {
346 var t, n;
347 return Object(p.d)(this, function(e) {
348 switch (e.label) {
349 case 0:
350 if (!this.enabled)
351 return [2];
352 t = 0,
353 e.label = 1;
354 case 1:
355 return t < this.store.length ? null === (n = this.store.key(t)) ? [3, 3] : /["|']?pnp["|']? ?: ?1/i.test(this.store.getItem(n)) ? [4, this.get(n)] : [3, 3] : [3, 4];
356 case 2:
357 e.sent(),
358 e.label = 3;
359 case 3:
360 return t++,
361 [3, 1];
362 case 4:
363 return [2]
364 }
365 })
366 })
367 }
368 ,
369 g.prototype.test = function() {
370 try {
371 return this.store.setItem("t", "t"),
372 this.store.removeItem("t"),
373 !0
374 } catch (e) {
375 return !1
376 }
377 }
378 ,
379 g.prototype.createPersistable = function(e, t) {
380 if (void 0 === t) {
381 var n = u.defaultCachingTimeoutSeconds;
382 0 < this.defaultTimeoutMinutes && (n = 60 * this.defaultTimeoutMinutes),
383 t = Object(r.c)(new Date, "second", n)
384 }
385 return Object(r.l)({
386 pnp: 1,
387 expiration: t,
388 value: e
389 })
390 }
391 ,
392 g.prototype.cacheExpirationHandler = function() {
393 var t = this;
394 this.enabled && this.deleteExpired().then(function(e) {
395 setTimeout(Object(r.d)(t, t.cacheExpirationHandler), u.cacheExpirationIntervalMilliseconds)
396 }).catch(console.error)
397 }
398 ,
399 g)
400 , h = (Object.defineProperty(y.prototype, "length", {
401 get: function() {
402 return this._store.size
403 },
404 enumerable: !0,
405 configurable: !0
406 }),
407 y.prototype.clear = function() {
408 this._store.clear()
409 }
410 ,
411 y.prototype.getItem = function(e) {
412 return this._store.get(e)
413 }
414 ,
415 y.prototype.key = function(e) {
416 return Array.from(this._store)[e][0]
417 }
418 ,
419 y.prototype.removeItem = function(e) {
420 this._store.delete(e)
421 }
422 ,
423 y.prototype.setItem = function(e, t) {
424 this._store.set(e, t)
425 }
426 ,
427 y)
428 , f = (Object.defineProperty(b.prototype, "local", {
429 get: function() {
430 return null === this._local && (this._local = d.bind(localStorage)),
431 this._local
432 },
433 enumerable: !0,
434 configurable: !0
435 }),
436 Object.defineProperty(b.prototype, "session", {
437 get: function() {
438 return null === this._session && (this._session = d.bind(sessionStorage)),
439 this._session
440 },
441 enumerable: !0,
442 configurable: !0
443 }),
444 b);
445 function b(e, t) {
446 void 0 === e && (e = null),
447 void 0 === t && (t = null),
448 this._local = e,
449 this._session = t
450 }
451 function y(e) {
452 void 0 === e && (e = new Map),
453 this._store = e
454 }
455 function g(e, t) {
456 void 0 === t && (t = -1),
457 this.store = e,
458 this.defaultTimeoutMinutes = t,
459 this.enabled = this.test(),
460 u.enableCacheExpiration && this.cacheExpirationHandler()
461 }
462 function O(e) {
463 void 0 === e && (e = new Map),
464 this._v = e,
465 this._v.set(a[0], "session"),
466 this._v.set(a[1], 60),
467 this._v.set(a[2], !1),
468 this._v.set(a[3], !1),
469 this._v.set(a[4], 750),
470 this._v.set(a[5], null),
471 this._v.set(a[6], !1)
472 }
473 n.d(t, "y", function() {
474 return o
475 }),
476 n.d(t, "v", function() {
477 return s
478 }),
479 n.d(t, "f", function() {
480 return c
481 }),
482 n.d(t, "e", function() {
483 return u
484 }),
485 n.d(t, "u", function() {
486 return l.e
487 }),
488 n.d(t, "w", function() {
489 return l.f
490 }),
491 n.d(t, "k", function() {
492 return l.d
493 }),
494 n.d(t, "b", function() {
495 return l.b
496 }),
497 n.d(t, "a", function() {
498 return l.a
499 }),
500 n.d(t, "g", function() {
501 return l.c
502 }),
503 n.d(t, "d", function() {
504 return d
505 }),
506 n.d(t, "c", function() {
507 return f
508 }),
509 n.d(t, "l", function() {
510 return r.d
511 }),
512 n.d(t, "j", function() {
513 return r.c
514 }),
515 n.d(t, "i", function() {
516 return r.b
517 }),
518 n.d(t, "o", function() {
519 return r.g
520 }),
521 n.d(t, "m", function() {
522 return r.e
523 }),
524 n.d(t, "r", function() {
525 return r.j
526 }),
527 n.d(t, "x", function() {
528 return r.m
529 }),
530 n.d(t, "q", function() {
531 return r.i
532 }),
533 n.d(t, "h", function() {
534 return r.a
535 }),
536 n.d(t, "s", function() {
537 return r.k
538 }),
539 n.d(t, "A", function() {
540 return r.o
541 }),
542 n.d(t, "z", function() {
543 return r.n
544 }),
545 n.d(t, "t", function() {
546 return r.l
547 }),
548 n.d(t, "p", function() {
549 return r.h
550 }),
551 n.d(t, "n", function() {
552 return r.f
553 })
554 }
555 , function(e, t, n) {
556 "use strict";
557 function r(e, t) {
558 for (var n = [], r = 2; r < arguments.length; r++)
559 n[r - 2] = arguments[r];
560 return function() {
561 t.apply(e, n)
562 }
563 }
564 function i(e, t, n) {
565 var r = new Date(e.toString());
566 switch (t.toLowerCase()) {
567 case "year":
568 r.setFullYear(r.getFullYear() + n);
569 break;
570 case "quarter":
571 r.setMonth(r.getMonth() + 3 * n);
572 break;
573 case "month":
574 r.setMonth(r.getMonth() + n);
575 break;
576 case "week":
577 r.setDate(r.getDate() + 7 * n);
578 break;
579 case "day":
580 r.setDate(r.getDate() + n);
581 break;
582 case "hour":
583 r.setTime(r.getTime() + 36e5 * n);
584 break;
585 case "minute":
586 r.setTime(r.getTime() + 6e4 * n);
587 break;
588 case "second":
589 r.setTime(r.getTime() + 1e3 * n);
590 break;
591 default:
592 r = void 0
593 }
594 return r
595 }
596 function o() {
597 for (var e = [], t = 0; t < arguments.length; t++)
598 e[t] = arguments[t];
599 return e.filter(function(e) {
600 return !h(e)
601 }).map(function(e) {
602 return e.replace(/^[\\|\/]/, "").replace(/[\\|\/]$/, "")
603 }).join("/").replace(/\\/g, "/")
604 }
605 function s(e) {
606 for (var t = new Array(e), n = 0; n < e; n++)
607 t[n] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".charAt(Math.floor(62 * Math.random()));
608 return t.join("")
609 }
610 function a() {
611 var n = Date.now();
612 return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function(e) {
613 var t = (n + 16 * Math.random()) % 16 | 0;
614 return n = Math.floor(n / 16),
615 ("x" === e ? t : 3 & t | 8).toString(16)
616 })
617 }
618 function c(e) {
619 return "function" == typeof e
620 }
621 function u(e) {
622 return null != e
623 }
624 function l(e) {
625 return Array.isArray ? Array.isArray(e) : e && "number" == typeof e.length && e.constructor === Array
626 }
627 function p(t, n, e, r) {
628 if (void 0 === e && (e = !1),
629 void 0 === r && (r = function() {
630 return !0
631 }
632 ),
633 !u(n))
634 return t;
635 var i = e ? function(e, t) {
636 return !(t in e)
637 }
638 : function() {
639 return !0
640 }
641 ;
642 return Object.getOwnPropertyNames(n).filter(function(e) {
643 return i(t, e) && r(e)
644 }).reduce(function(e, t) {
645 return e[t] = n[t],
646 e
647 }, t)
648 }
649 function d(e) {
650 return /^https?:\/\/|^\/\//i.test(e)
651 }
652 function h(e) {
653 return null == e || e.length < 1
654 }
655 function f(e) {
656 if (h(e))
657 return e;
658 var t = /([0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12})/i.exec(e);
659 return null === t ? e : t[1]
660 }
661 function b(e) {
662 return JSON.stringify(e)
663 }
664 function y(e, t) {
665 return Object.hasOwnProperty.call(e, t)
666 }
667 function g(e) {
668 var t = 0;
669 if (0 === e.length)
670 return t;
671 for (var n = 0; n < e.length; n++)
672 t = (t << 5) - t + e.charCodeAt(n),
673 t |= 0;
674 return t
675 }
676 n.d(t, "d", function() {
677 return r
678 }),
679 n.d(t, "c", function() {
680 return i
681 }),
682 n.d(t, "b", function() {
683 return o
684 }),
685 n.d(t, "g", function() {
686 return s
687 }),
688 n.d(t, "e", function() {
689 return a
690 }),
691 n.d(t, "j", function() {
692 return c
693 }),
694 n.d(t, "m", function() {
695 return u
696 }),
697 n.d(t, "i", function() {
698 return l
699 }),
700 n.d(t, "a", function() {
701 return p
702 }),
703 n.d(t, "k", function() {
704 return d
705 }),
706 n.d(t, "o", function() {
707 return h
708 }),
709 n.d(t, "n", function() {
710 return f
711 }),
712 n.d(t, "l", function() {
713 return b
714 }),
715 n.d(t, "h", function() {
716 return y
717 }),
718 n.d(t, "f", function() {
719 return g
720 })
721 }
722 , function(e, t, n) {
723 "use strict";
724 n.d(t, "b", function() {
725 return i
726 }),
727 n.d(t, "a", function() {
728 return o
729 });
730 var r = n(1);
731 function i(e) {
732 r.e.assign(e)
733 }
734 var o = (Object.defineProperty(s.prototype, "headers", {
735 get: function() {
736 var e = r.e.get("sp");
737 return void 0 !== e && void 0 !== e.headers ? e.headers : {}
738 },
739 enumerable: !0,
740 configurable: !0
741 }),
742 Object.defineProperty(s.prototype, "baseUrl", {
743 get: function() {
744 var e = r.e.get("sp");
745 return void 0 !== e && void 0 !== e.baseUrl ? e.baseUrl : Object(r.x)(r.e.spfxContext) ? r.e.spfxContext.pageContext.web.absoluteUrl : null
746 },
747 enumerable: !0,
748 configurable: !0
749 }),
750 Object.defineProperty(s.prototype, "fetchClientFactory", {
751 get: function() {
752 var e = r.e.get("sp");
753 return void 0 !== e && void 0 !== e.fetchClientFactory ? e.fetchClientFactory : function() {
754 return new r.b
755 }
756 },
757 enumerable: !0,
758 configurable: !0
759 }),
760 new s);
761 function s() {}
762 }
763 , function(e, r, i) {
764 "use strict";
765 (function(e) {
766 i.d(r, "a", function() {
767 return n
768 });
769 var o = i(1)
770 , t = i(3);
771 function n(i) {
772 return new Promise(function(n) {
773 if (Object(o.s)(i))
774 return n(i);
775 if (null !== t.a.baseUrl)
776 return n(Object(o.i)(t.a.baseUrl, i));
777 if (void 0 !== e._spPageContextInfo) {
778 if (Object(o.p)(e._spPageContextInfo, "webAbsoluteUrl"))
779 return n(Object(o.i)(e._spPageContextInfo.webAbsoluteUrl, i));
780 if (Object(o.p)(e._spPageContextInfo, "webServerRelativeUrl"))
781 return n(Object(o.i)(e._spPageContextInfo.webServerRelativeUrl, i))
782 }
783 if (void 0 !== e.location) {
784 var r = e.location.toString().toLowerCase();
785 ["/_layouts/", "/siteassets/"].forEach(function(e) {
786 var t = r.indexOf(e);
787 if (0 < t)
788 return n(Object(o.i)(r.substr(0, t), i))
789 })
790 }
791 return n(i)
792 }
793 )
794 }
795 }
796 ).call(this, i(6))
797 }
798 , function(e, f, b) {
799 "use strict";
800 (function(n) {
801 b.d(f, "e", function() {
802 return i
803 }),
804 b.d(f, "f", function() {
805 return t
806 }),
807 b.d(f, "d", function() {
808 return o
809 }),
810 b.d(f, "b", function() {
811 return c
812 }),
813 b.d(f, "a", function() {
814 return u
815 }),
816 b.d(f, "c", function() {
817 return l
818 });
819 var e = b(0)
820 , r = b(2);
821 function i(n, e) {
822 Object(r.m)(e) && new Request("",{
823 headers: e
824 }).headers.forEach(function(e, t) {
825 n.append(t, e)
826 })
827 }
828 function t(e, t) {
829 if (Object(r.m)(t)) {
830 var n = Object(r.a)(e.headers || {}, t.headers);
831 (e = Object(r.a)(e, t)).headers = n
832 }
833 }
834 function o(e) {
835 var t = new URL(e);
836 return t.protocol + "//" + t.hostname
837 }
838 var s, a, c = (h.prototype.fetch = function(e, t) {
839 return n.fetch(e, t)
840 }
841 ,
842 h), u = (a = c,
843 Object(e.c)(d, a),
844 Object.defineProperty(d.prototype, "token", {
845 get: function() {
846 return this._token || ""
847 },
848 set: function(e) {
849 this._token = e
850 },
851 enumerable: !0,
852 configurable: !0
853 }),
854 d.prototype.fetch = function(e, t) {
855 void 0 === t && (t = {});
856 var n = new Headers;
857 return i(n, t.headers),
858 n.set("Authorization", "Bearer " + this._token),
859 t.headers = n,
860 a.prototype.fetch.call(this, e, t)
861 }
862 ,
863 d), l = (s = u,
864 Object(e.c)(p, s),
865 p.prototype.fetch = function(n, r) {
866 return Object(e.a)(this, void 0, void 0, function() {
867 var t;
868 return Object(e.d)(this, function(e) {
869 switch (e.label) {
870 case 0:
871 return [4, this.getToken(o(n))];
872 case 1:
873 return t = e.sent(),
874 this.token = t,
875 [2, s.prototype.fetch.call(this, n, r)]
876 }
877 })
878 })
879 }
880 ,
881 p.prototype.getToken = function(t) {
882 return Object(e.a)(this, void 0, void 0, function() {
883 return Object(e.d)(this, function(e) {
884 switch (e.label) {
885 case 0:
886 return [4, this.context.aadTokenProviderFactory.getTokenProvider()];
887 case 1:
888 return [2, e.sent().getToken(t)]
889 }
890 })
891 })
892 }
893 ,
894 p);
895 function p(e) {
896 var t = s.call(this, null) || this;
897 return t.context = e,
898 t
899 }
900 function d(e) {
901 var t = a.call(this) || this;
902 return t._token = e,
903 t
904 }
905 function h() {}
906 }
907 ).call(this, b(6))
908 }
909 , function(e, t) {
910 var n;
911 n = function() {
912 return this
913 }();
914 try {
915 n = n || new Function("return this")()
916 } catch (e) {
917 "object" == typeof window && (n = window)
918 }
919 e.exports = n
920 }
921 , function(e, t, n) {
922 var r = function() {
923 "use strict";
924 return r = function(e) {
925 if (this.REQUEST_TYPE = {
926 LOGIN: "LOGIN",
927 RENEW_TOKEN: "RENEW_TOKEN",
928 UNKNOWN: "UNKNOWN"
929 },
930 this.RESPONSE_TYPE = {
931 ID_TOKEN_TOKEN: "id_token token",
932 TOKEN: "token"
933 },
934 this.CONSTANTS = {
935 ACCESS_TOKEN: "access_token",
936 EXPIRES_IN: "expires_in",
937 ID_TOKEN: "id_token",
938 ERROR_DESCRIPTION: "error_description",
939 SESSION_STATE: "session_state",
940 ERROR: "error",
941 STORAGE: {
942 TOKEN_KEYS: "adal.token.keys",
943 ACCESS_TOKEN_KEY: "adal.access.token.key",
944 EXPIRATION_KEY: "adal.expiration.key",
945 STATE_LOGIN: "adal.state.login",
946 STATE_RENEW: "adal.state.renew",
947 NONCE_IDTOKEN: "adal.nonce.idtoken",
948 SESSION_STATE: "adal.session.state",
949 USERNAME: "adal.username",
950 IDTOKEN: "adal.idtoken",
951 ERROR: "adal.error",
952 ERROR_DESCRIPTION: "adal.error.description",
953 LOGIN_REQUEST: "adal.login.request",
954 LOGIN_ERROR: "adal.login.error",
955 RENEW_STATUS: "adal.token.renew.status",
956 ANGULAR_LOGIN_REQUEST: "adal.angular.login.request"
957 },
958 RESOURCE_DELIMETER: "|",
959 CACHE_DELIMETER: "||",
960 LOADFRAME_TIMEOUT: 6e3,
961 TOKEN_RENEW_STATUS_CANCELED: "Canceled",
962 TOKEN_RENEW_STATUS_COMPLETED: "Completed",
963 TOKEN_RENEW_STATUS_IN_PROGRESS: "In Progress",
964 LOGGING_LEVEL: {
965 ERROR: 0,
966 WARN: 1,
967 INFO: 2,
968 VERBOSE: 3
969 },
970 LEVEL_STRING_MAP: {
971 0: "ERROR:",
972 1: "WARNING:",
973 2: "INFO:",
974 3: "VERBOSE:"
975 },
976 POPUP_WIDTH: 483,
977 POPUP_HEIGHT: 600
978 },
979 r.prototype._singletonInstance)
980 return r.prototype._singletonInstance;
981 if ((r.prototype._singletonInstance = this).instance = "https://login.microsoftonline.com/",
982 this.config = {},
983 this.callback = null,
984 this.popUp = !1,
985 this.isAngular = !1,
986 this._user = null,
987 this._activeRenewals = {},
988 this._loginInProgress = !1,
989 this._acquireTokenInProgress = !1,
990 this._renewStates = [],
991 this._callBackMappedToRenewStates = {},
992 this._callBacksMappedToRenewStates = {},
993 this._openedWindows = [],
994 this._requestType = this.REQUEST_TYPE.LOGIN,
995 window._adalInstance = this,
996 e.displayCall && "function" != typeof e.displayCall)
997 throw new Error("displayCall is not a function");
998 if (!e.clientId)
999 throw new Error("clientId is required");
1000 this.config = this._cloneConfig(e),
1001 void 0 === this.config.navigateToLoginRequestUrl && (this.config.navigateToLoginRequestUrl = !0),
1002 this.config.popUp && (this.popUp = !0),
1003 this.config.callback && "function" == typeof this.config.callback && (this.callback = this.config.callback),
1004 this.config.instance && (this.instance = this.config.instance),
1005 this.config.loginResource || (this.config.loginResource = this.config.clientId),
1006 this.config.redirectUri || (this.config.redirectUri = window.location.href.split("?")[0].split("#")[0]),
1007 this.config.postLogoutRedirectUri || (this.config.postLogoutRedirectUri = window.location.href.split("?")[0].split("#")[0]),
1008 this.config.anonymousEndpoints || (this.config.anonymousEndpoints = []),
1009 this.config.isAngular && (this.isAngular = this.config.isAngular),
1010 this.config.loadFrameTimeout && (this.CONSTANTS.LOADFRAME_TIMEOUT = this.config.loadFrameTimeout)
1011 }
1012 ,
1013 "undefined" != typeof window && (window.Logging = {
1014 piiLoggingEnabled: !1,
1015 level: 0,
1016 log: function(e) {}
1017 }),
1018 r.prototype.login = function() {
1019 if (this._loginInProgress)
1020 this.info("Login in progress");
1021 else {
1022 this._loginInProgress = !0;
1023 var e = this._guid();
1024 this.config.state = e,
1025 this._idTokenNonce = this._guid();
1026 var t = this._getItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST);
1027 t && "" !== t ? this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST, "") : t = window.location.href,
1028 this.verbose("Expected state: " + e + " startPage:" + t),
1029 this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST, t),
1030 this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, ""),
1031 this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN, e, !0),
1032 this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, !0),
1033 this._saveItem(this.CONSTANTS.STORAGE.ERROR, ""),
1034 this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, "");
1035 var n = this._getNavigateUrl("id_token", null) + "&nonce=" + encodeURIComponent(this._idTokenNonce);
1036 this.config.displayCall ? this.config.displayCall(n) : this.popUp ? (this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN, ""),
1037 this._renewStates.push(e),
1038 this.registerCallback(e, this.config.clientId, this.callback),
1039 this._loginPopup(n)) : this.promptUser(n)
1040 }
1041 }
1042 ,
1043 r.prototype._openPopup = function(e, t, n, r) {
1044 try {
1045 var i = window.screenLeft ? window.screenLeft : window.screenX
1046 , o = window.screenTop ? window.screenTop : window.screenY
1047 , s = window.innerWidth || document.documentElement.clientWidth || document.body.clientWidth
1048 , a = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight
1049 , c = s / 2 - n / 2 + i
1050 , u = a / 2 - r / 2 + o
1051 , l = window.open(e, t, "width=" + n + ", height=" + r + ", top=" + u + ", left=" + c);
1052 return l.focus && l.focus(),
1053 l
1054 } catch (e) {
1055 return this.warn("Error opening popup, " + e.message),
1056 this._loginInProgress = !1,
1057 this._acquireTokenInProgress = !1,
1058 null
1059 }
1060 }
1061 ,
1062 r.prototype._handlePopupError = function(e, t, n, r, i) {
1063 this.warn(r),
1064 this._saveItem(this.CONSTANTS.STORAGE.ERROR, n),
1065 this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, r),
1066 this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, i),
1067 t && this._activeRenewals[t] && (this._activeRenewals[t] = null),
1068 this._loginInProgress = !1,
1069 this._acquireTokenInProgress = !1,
1070 e && e(r, null, n)
1071 }
1072 ,
1073 r.prototype._loginPopup = function(e, r, t) {
1074 var i = this._openPopup(e, "login", this.CONSTANTS.POPUP_WIDTH, this.CONSTANTS.POPUP_HEIGHT)
1075 , o = t || this.callback;
1076 if (null != i) {
1077 if (this._openedWindows.push(i),
1078 -1 != this.config.redirectUri.indexOf("#"))
1079 var s = this.config.redirectUri.split("#")[0];
1080 else
1081 s = this.config.redirectUri;
1082 var a = this
1083 , c = window.setInterval(function() {
1084 if (!i || i.closed || void 0 === i.closed) {
1085 var e = "Popup Window closed"
1086 , t = "Popup Window closed by UI action/ Popup Window handle destroyed due to cross zone navigation in IE/Edge";
1087 return a.isAngular && a._broadcast("adal:popUpClosed", t + a.CONSTANTS.RESOURCE_DELIMETER + e),
1088 a._handlePopupError(o, r, e, t, t),
1089 void window.clearInterval(c)
1090 }
1091 try {
1092 var n = i.location;
1093 if (-1 != encodeURI(n.href).indexOf(encodeURI(s)))
1094 return a.isAngular ? a._broadcast("adal:popUpHashChanged", n.hash) : a.handleWindowCallback(n.hash),
1095 window.clearInterval(c),
1096 a._loginInProgress = !1,
1097 a._acquireTokenInProgress = !1,
1098 a.info("Closing popup window"),
1099 a._openedWindows = [],
1100 void i.close()
1101 } catch (e) {}
1102 }, 1)
1103 } else {
1104 var n = "Popup Window is null. This can happen if you are using IE";
1105 this._handlePopupError(o, r, "Error opening popup", n, n)
1106 }
1107 }
1108 ,
1109 r.prototype._broadcast = function(e, t) {
1110 function n(e, t) {
1111 t = t || {
1112 bubbles: !1,
1113 cancelable: !1,
1114 detail: void 0
1115 };
1116 var n = document.createEvent("CustomEvent");
1117 return n.initCustomEvent(e, t.bubbles, t.cancelable, t.detail),
1118 n
1119 }
1120 "function" != typeof window.CustomEvent && (n.prototype = window.Event.prototype,
1121 window.CustomEvent = n);
1122 var r = new CustomEvent(e,{
1123 detail: t
1124 });
1125 window.dispatchEvent(r)
1126 }
1127 ,
1128 r.prototype.loginInProgress = function() {
1129 return this._loginInProgress
1130 }
1131 ,
1132 r.prototype._hasResource = function(e) {
1133 var t = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);
1134 return t && !this._isEmpty(t) && -1 < t.indexOf(e + this.CONSTANTS.RESOURCE_DELIMETER)
1135 }
1136 ,
1137 r.prototype.getCachedToken = function(e) {
1138 if (!this._hasResource(e))
1139 return null;
1140 var t = this._getItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + e)
1141 , n = this._getItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + e)
1142 , r = this.config.expireOffsetSeconds || 300;
1143 return n && n > this._now() + r ? t : (this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + e, ""),
1144 this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + e, 0),
1145 null)
1146 }
1147 ,
1148 r.prototype.getCachedUser = function() {
1149 if (this._user)
1150 return this._user;
1151 var e = this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);
1152 return this._user = this._createUser(e),
1153 this._user
1154 }
1155 ,
1156 r.prototype.registerCallback = function(o, s, e) {
1157 this._activeRenewals[s] = o,
1158 this._callBacksMappedToRenewStates[o] || (this._callBacksMappedToRenewStates[o] = []);
1159 var a = this;
1160 this._callBacksMappedToRenewStates[o].push(e),
1161 this._callBackMappedToRenewStates[o] || (this._callBackMappedToRenewStates[o] = function(e, t, n, r) {
1162 a._activeRenewals[s] = null;
1163 for (var i = 0; i < a._callBacksMappedToRenewStates[o].length; ++i)
1164 try {
1165 a._callBacksMappedToRenewStates[o][i](e, t, n, r)
1166 } catch (n) {
1167 a.warn(n)
1168 }
1169 a._callBacksMappedToRenewStates[o] = null,
1170 a._callBackMappedToRenewStates[o] = null
1171 }
1172 )
1173 }
1174 ,
1175 r.prototype._renewToken = function(e, t, n) {
1176 this.info("renewToken is called for resource:" + e);
1177 var r = this._addAdalFrame("adalRenewFrame" + e)
1178 , i = this._guid() + "|" + e;
1179 this.config.state = i,
1180 this._renewStates.push(i),
1181 this.verbose("Renew token Expected state: " + i),
1182 n = n || "token";
1183 var o = this._urlRemoveQueryStringParameter(this._getNavigateUrl(n, e), "prompt");
1184 n === this.RESPONSE_TYPE.ID_TOKEN_TOKEN && (this._idTokenNonce = this._guid(),
1185 this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, !0),
1186 o += "&nonce=" + encodeURIComponent(this._idTokenNonce)),
1187 o += "&prompt=none",
1188 o = this._addHintParameters(o),
1189 this.registerCallback(i, e, t),
1190 this.verbosePii("Navigate to:" + o),
1191 r.src = "about:blank",
1192 this._loadFrameTimeout(o, "adalRenewFrame" + e, e)
1193 }
1194 ,
1195 r.prototype._renewIdToken = function(e, t) {
1196 this.info("renewIdToken is called");
1197 var n = this._addAdalFrame("adalIdTokenFrame")
1198 , r = this._guid() + "|" + this.config.clientId;
1199 this._idTokenNonce = this._guid(),
1200 this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, this._idTokenNonce, !0),
1201 this.config.state = r,
1202 this._renewStates.push(r),
1203 this.verbose("Renew Idtoken Expected state: " + r);
1204 var i = null == t ? null : this.config.clientId
1205 , o = (t = t || "id_token",
1206 this._urlRemoveQueryStringParameter(this._getNavigateUrl(t, i), "prompt"));
1207 o += "&prompt=none",
1208 o = this._addHintParameters(o),
1209 o += "&nonce=" + encodeURIComponent(this._idTokenNonce),
1210 this.registerCallback(r, this.config.clientId, e),
1211 this.verbosePii("Navigate to:" + o),
1212 n.src = "about:blank",
1213 this._loadFrameTimeout(o, "adalIdTokenFrame", this.config.clientId)
1214 }
1215 ,
1216 r.prototype._urlContainsQueryStringParameter = function(e, t) {
1217 return new RegExp("[\\?&]" + e + "=").test(t)
1218 }
1219 ,
1220 r.prototype._urlRemoveQueryStringParameter = function(e, t) {
1221 var n = new RegExp("(\\&" + t + "=)[^&]+");
1222 return e = e.replace(n, ""),
1223 n = new RegExp("(" + t + "=)[^&]+&"),
1224 e = e.replace(n, ""),
1225 n = new RegExp("(" + t + "=)[^&]+"),
1226 e.replace(n, "")
1227 }
1228 ,
1229 r.prototype._loadFrameTimeout = function(e, t, n) {
1230 this.verbose("Set loading state to pending for: " + n),
1231 this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS + n, this.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS),
1232 this._loadFrame(e, t);
1233 var r = this;
1234 setTimeout(function() {
1235 if (r._getItem(r.CONSTANTS.STORAGE.RENEW_STATUS + n) === r.CONSTANTS.TOKEN_RENEW_STATUS_IN_PROGRESS) {
1236 r.verbose("Loading frame has timed out after: " + r.CONSTANTS.LOADFRAME_TIMEOUT / 1e3 + " seconds for resource " + n);
1237 var e = r._activeRenewals[n];
1238 e && r._callBackMappedToRenewStates[e] && r._callBackMappedToRenewStates[e]("Token renewal operation failed due to timeout", null, "Token Renewal Failed"),
1239 r._saveItem(r.CONSTANTS.STORAGE.RENEW_STATUS + n, r.CONSTANTS.TOKEN_RENEW_STATUS_CANCELED)
1240 }
1241 }, r.CONSTANTS.LOADFRAME_TIMEOUT)
1242 }
1243 ,
1244 r.prototype._loadFrame = function(t, e) {
1245 var n = this;
1246 n.info("LoadFrame: " + e);
1247 var r = e;
1248 setTimeout(function() {
1249 var e = n._addAdalFrame(r);
1250 "" !== e.src && "about:blank" !== e.src || (e.src = t,
1251 n._loadFrame(t, r))
1252 }, 500)
1253 }
1254 ,
1255 r.prototype.acquireToken = function(e, t) {
1256 if (this._isEmpty(e))
1257 return this.warn("resource is required"),
1258 void t("resource is required", null, "resource is required");
1259 var n = this.getCachedToken(e);
1260 return n ? (this.info("Token is already in cache for resource:" + e),
1261 void t(null, n, null)) : this._user || this.config.extraQueryParameter && -1 !== this.config.extraQueryParameter.indexOf("login_hint") ? void (this._activeRenewals[e] ? this.registerCallback(this._activeRenewals[e], e, t) : (this._requestType = this.REQUEST_TYPE.RENEW_TOKEN,
1262 e === this.config.clientId ? this._user ? (this.verbose("renewing idtoken"),
1263 this._renewIdToken(t)) : (this.verbose("renewing idtoken and access_token"),
1264 this._renewIdToken(t, this.RESPONSE_TYPE.ID_TOKEN_TOKEN)) : this._user ? (this.verbose("renewing access_token"),
1265 this._renewToken(e, t)) : (this.verbose("renewing idtoken and access_token"),
1266 this._renewToken(e, t, this.RESPONSE_TYPE.ID_TOKEN_TOKEN)))) : (this.warn("User login is required"),
1267 void t("User login is required", null, "login required"))
1268 }
1269 ,
1270 r.prototype.acquireTokenPopup = function(e, t, n, r) {
1271 if (this._isEmpty(e))
1272 return this.warn("resource is required"),
1273 void r("resource is required", null, "resource is required");
1274 if (!this._user)
1275 return this.warn("User login is required"),
1276 void r("User login is required", null, "login required");
1277 if (this._acquireTokenInProgress)
1278 return this.warn("Acquire token interactive is already in progress"),
1279 void r("Acquire token interactive is already in progress", null, "Acquire token interactive is already in progress");
1280 var i = this._guid() + "|" + e;
1281 this.config.state = i,
1282 this._renewStates.push(i),
1283 this._requestType = this.REQUEST_TYPE.RENEW_TOKEN,
1284 this.verbose("Renew token Expected state: " + i);
1285 var o = this._urlRemoveQueryStringParameter(this._getNavigateUrl("token", e), "prompt");
1286 if (o += "&prompt=select_account",
1287 t && (o += t),
1288 n && -1 === o.indexOf("&claims"))
1289 o += "&claims=" + encodeURIComponent(n);
1290 else if (n && -1 !== o.indexOf("&claims"))
1291 throw new Error("Claims cannot be passed as an extraQueryParameter");
1292 o = this._addHintParameters(o),
1293 this._acquireTokenInProgress = !0,
1294 this.info("acquireToken interactive is called for the resource " + e),
1295 this.registerCallback(i, e, r),
1296 this._loginPopup(o, e, r)
1297 }
1298 ,
1299 r.prototype.acquireTokenRedirect = function(e, t, n) {
1300 if (this._isEmpty(e))
1301 return this.warn("resource is required"),
1302 void r("resource is required", null, "resource is required");
1303 var r = this.callback;
1304 if (!this._user)
1305 return this.warn("User login is required"),
1306 void r("User login is required", null, "login required");
1307 if (this._acquireTokenInProgress)
1308 return this.warn("Acquire token interactive is already in progress"),
1309 void r("Acquire token interactive is already in progress", null, "Acquire token interactive is already in progress");
1310 var i = this._guid() + "|" + e;
1311 this.config.state = i,
1312 this.verbose("Renew token Expected state: " + i);
1313 var o = this._urlRemoveQueryStringParameter(this._getNavigateUrl("token", e), "prompt");
1314 if (o += "&prompt=select_account",
1315 t && (o += t),
1316 n && -1 === o.indexOf("&claims"))
1317 o += "&claims=" + encodeURIComponent(n);
1318 else if (n && -1 !== o.indexOf("&claims"))
1319 throw new Error("Claims cannot be passed as an extraQueryParameter");
1320 o = this._addHintParameters(o),
1321 this._acquireTokenInProgress = !0,
1322 this.info("acquireToken interactive is called for the resource " + e),
1323 this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST, window.location.href),
1324 this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW, i, !0),
1325 this.promptUser(o)
1326 }
1327 ,
1328 r.prototype.promptUser = function(e) {
1329 e ? (this.infoPii("Navigate to:" + e),
1330 window.location.replace(e)) : this.info("Navigate url is empty")
1331 }
1332 ,
1333 r.prototype.clearCache = function() {
1334 this._saveItem(this.CONSTANTS.STORAGE.LOGIN_REQUEST, ""),
1335 this._saveItem(this.CONSTANTS.STORAGE.ANGULAR_LOGIN_REQUEST, ""),
1336 this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE, ""),
1337 this._saveItem(this.CONSTANTS.STORAGE.STATE_LOGIN, ""),
1338 this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW, ""),
1339 this._renewStates = [],
1340 this._saveItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN, ""),
1341 this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN, ""),
1342 this._saveItem(this.CONSTANTS.STORAGE.ERROR, ""),
1343 this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, ""),
1344 this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, ""),
1345 this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, "");
1346 var e = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS);
1347 if (!this._isEmpty(e)) {
1348 e = e.split(this.CONSTANTS.RESOURCE_DELIMETER);
1349 for (var t = 0; t < e.length && "" !== e[t]; t++)
1350 this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + e[t], ""),
1351 this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + e[t], 0)
1352 }
1353 this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS, "")
1354 }
1355 ,
1356 r.prototype.clearCacheForResource = function(e) {
1357 this._saveItem(this.CONSTANTS.STORAGE.STATE_RENEW, ""),
1358 this._saveItem(this.CONSTANTS.STORAGE.ERROR, ""),
1359 this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, ""),
1360 this._hasResource(e) && (this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + e, ""),
1361 this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + e, 0))
1362 }
1363 ,
1364 r.prototype.logOut = function() {
1365 var e;
1366 if (this.clearCache(),
1367 this._user = null,
1368 this.config.logOutUri)
1369 e = this.config.logOutUri;
1370 else {
1371 var t = "common"
1372 , n = "";
1373 this.config.tenant && (t = this.config.tenant),
1374 this.config.postLogoutRedirectUri && (n = "post_logout_redirect_uri=" + encodeURIComponent(this.config.postLogoutRedirectUri)),
1375 e = this.instance + t + "/oauth2/logout?" + n
1376 }
1377 this.infoPii("Logout navigate to: " + e),
1378 this.promptUser(e)
1379 }
1380 ,
1381 r.prototype._isEmpty = function(e) {
1382 return void 0 === e || !e || 0 === e.length
1383 }
1384 ,
1385 r.prototype.getUser = function(e) {
1386 if ("function" != typeof e)
1387 throw new Error("callback is not a function");
1388 if (this._user)
1389 e(null, this._user);
1390 else {
1391 var t = this._getItem(this.CONSTANTS.STORAGE.IDTOKEN);
1392 this._isEmpty(t) ? (this.warn("User information is not available"),
1393 e("User information is not available", null)) : (this.info("User exists in cache: "),
1394 this._user = this._createUser(t),
1395 e(null, this._user))
1396 }
1397 }
1398 ,
1399 r.prototype._addHintParameters = function(e) {
1400 if (this._user && this._user.profile)
1401 if (this._user.profile.sid && -1 !== e.indexOf("&prompt=none"))
1402 this._urlContainsQueryStringParameter("sid", e) || (e += "&sid=" + encodeURIComponent(this._user.profile.sid));
1403 else if (this._user.profile.upn && (this._urlContainsQueryStringParameter("login_hint", e) || (e += "&login_hint=" + encodeURIComponent(this._user.profile.upn)),
1404 !this._urlContainsQueryStringParameter("domain_hint", e) && -1 < this._user.profile.upn.indexOf("@"))) {
1405 var t = this._user.profile.upn.split("@");
1406 e += "&domain_hint=" + encodeURIComponent(t[t.length - 1])
1407 }
1408 return e
1409 }
1410 ,
1411 r.prototype._createUser = function(e) {
1412 var t = null
1413 , n = this._extractIdToken(e);
1414 return n && n.hasOwnProperty("aud") && (n.aud.toLowerCase() === this.config.clientId.toLowerCase() ? (t = {
1415 userName: "",
1416 profile: n
1417 },
1418 n.hasOwnProperty("upn") ? t.userName = n.upn : n.hasOwnProperty("email") && (t.userName = n.email)) : this.warn("IdToken has invalid aud field")),
1419 t
1420 }
1421 ,
1422 r.prototype._getHash = function(e) {
1423 return -1 < e.indexOf("#/") ? e = e.substring(e.indexOf("#/") + 2) : -1 < e.indexOf("#") && (e = e.substring(1)),
1424 e
1425 }
1426 ,
1427 r.prototype.isCallback = function(e) {
1428 e = this._getHash(e);
1429 var t = this._deserialize(e);
1430 return t.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION) || t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN) || t.hasOwnProperty(this.CONSTANTS.ID_TOKEN)
1431 }
1432 ,
1433 r.prototype.getLoginError = function() {
1434 return this._getItem(this.CONSTANTS.STORAGE.LOGIN_ERROR)
1435 }
1436 ,
1437 r.prototype.getRequestInfo = function(e) {
1438 e = this._getHash(e);
1439 var t = this._deserialize(e)
1440 , n = {
1441 valid: !1,
1442 parameters: {},
1443 stateMatch: !1,
1444 stateResponse: "",
1445 requestType: this.REQUEST_TYPE.UNKNOWN
1446 };
1447 if (t && ((n.parameters = t).hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION) || t.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN) || t.hasOwnProperty(this.CONSTANTS.ID_TOKEN))) {
1448 var r;
1449 if (n.valid = !0,
1450 !t.hasOwnProperty("state"))
1451 return this.warn("No state returned"),
1452 n;
1453 if (this.verbose("State: " + t.state),
1454 r = t.state,
1455 n.stateResponse = r,
1456 this._matchState(n))
1457 return n;
1458 if (!n.stateMatch && window.parent) {
1459 n.requestType = this._requestType;
1460 for (var i = this._renewStates, o = 0; o < i.length; o++)
1461 if (i[o] === n.stateResponse) {
1462 n.stateMatch = !0;
1463 break
1464 }
1465 }
1466 }
1467 return n
1468 }
1469 ,
1470 r.prototype._matchNonce = function(e) {
1471 var t = this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN);
1472 if (t) {
1473 t = t.split(this.CONSTANTS.CACHE_DELIMETER);
1474 for (var n = 0; n < t.length; n++)
1475 if (t[n] === e.profile.nonce)
1476 return !0
1477 }
1478 return !1
1479 }
1480 ,
1481 r.prototype._matchState = function(e) {
1482 var t = this._getItem(this.CONSTANTS.STORAGE.STATE_LOGIN);
1483 if (t) {
1484 t = t.split(this.CONSTANTS.CACHE_DELIMETER);
1485 for (var n = 0; n < t.length; n++)
1486 if (t[n] === e.stateResponse)
1487 return e.requestType = this.REQUEST_TYPE.LOGIN,
1488 e.stateMatch = !0
1489 }
1490 var r = this._getItem(this.CONSTANTS.STORAGE.STATE_RENEW);
1491 if (r)
1492 for (r = r.split(this.CONSTANTS.CACHE_DELIMETER),
1493 n = 0; n < r.length; n++)
1494 if (r[n] === e.stateResponse)
1495 return e.requestType = this.REQUEST_TYPE.RENEW_TOKEN,
1496 e.stateMatch = !0;
1497 return !1
1498 }
1499 ,
1500 r.prototype._getResourceFromState = function(e) {
1501 if (e) {
1502 var t = e.indexOf("|");
1503 if (-1 < t && t + 1 < e.length)
1504 return e.substring(t + 1)
1505 }
1506 return ""
1507 }
1508 ,
1509 r.prototype.saveTokenFromHash = function(e) {
1510 this.info("State status:" + e.stateMatch + "; Request type:" + e.requestType),
1511 this._saveItem(this.CONSTANTS.STORAGE.ERROR, ""),
1512 this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, "");
1513 var t = this._getResourceFromState(e.stateResponse);
1514 if (e.parameters.hasOwnProperty(this.CONSTANTS.ERROR_DESCRIPTION))
1515 this.infoPii("Error :" + e.parameters.error + "; Error description:" + e.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),
1516 this._saveItem(this.CONSTANTS.STORAGE.ERROR, e.parameters.error),
1517 this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, e.parameters[this.CONSTANTS.ERROR_DESCRIPTION]),
1518 e.requestType === this.REQUEST_TYPE.LOGIN && (this._loginInProgress = !1,
1519 this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, e.parameters.error_description));
1520 else if (e.stateMatch) {
1521 var n;
1522 this.info("State is right"),
1523 e.parameters.hasOwnProperty(this.CONSTANTS.SESSION_STATE) && this._saveItem(this.CONSTANTS.STORAGE.SESSION_STATE, e.parameters[this.CONSTANTS.SESSION_STATE]),
1524 e.parameters.hasOwnProperty(this.CONSTANTS.ACCESS_TOKEN) && (this.info("Fragment has access token"),
1525 this._hasResource(t) || (n = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS) || "",
1526 this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS, n + t + this.CONSTANTS.RESOURCE_DELIMETER)),
1527 this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + t, e.parameters[this.CONSTANTS.ACCESS_TOKEN]),
1528 this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + t, this._expiresIn(e.parameters[this.CONSTANTS.EXPIRES_IN]))),
1529 e.parameters.hasOwnProperty(this.CONSTANTS.ID_TOKEN) && (this.info("Fragment has id token"),
1530 this._loginInProgress = !1,
1531 this._user = this._createUser(e.parameters[this.CONSTANTS.ID_TOKEN]),
1532 this._user && this._user.profile ? this._matchNonce(this._user) ? (this._saveItem(this.CONSTANTS.STORAGE.IDTOKEN, e.parameters[this.CONSTANTS.ID_TOKEN]),
1533 t = this.config.loginResource ? this.config.loginResource : this.config.clientId,
1534 this._hasResource(t) || (n = this._getItem(this.CONSTANTS.STORAGE.TOKEN_KEYS) || "",
1535 this._saveItem(this.CONSTANTS.STORAGE.TOKEN_KEYS, n + t + this.CONSTANTS.RESOURCE_DELIMETER)),
1536 this._saveItem(this.CONSTANTS.STORAGE.ACCESS_TOKEN_KEY + t, e.parameters[this.CONSTANTS.ID_TOKEN]),
1537 this._saveItem(this.CONSTANTS.STORAGE.EXPIRATION_KEY + t, this._user.profile.exp)) : (this._saveItem(this.CONSTANTS.STORAGE.LOGIN_ERROR, "Nonce received: " + this._user.profile.nonce + " is not same as requested: " + this._getItem(this.CONSTANTS.STORAGE.NONCE_IDTOKEN)),
1538 this._user = null) : (e.parameters.error = "invalid id_token",
1539 e.parameters.error_description = "Invalid id_token. id_token: " + e.parameters[this.CONSTANTS.ID_TOKEN],
1540 this._saveItem(this.CONSTANTS.STORAGE.ERROR, "invalid id_token"),
1541 this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, "Invalid id_token. id_token: " + e.parameters[this.CONSTANTS.ID_TOKEN])))
1542 } else
1543 e.parameters.error = "Invalid_state",
1544 e.parameters.error_description = "Invalid_state. state: " + e.stateResponse,
1545 this._saveItem(this.CONSTANTS.STORAGE.ERROR, "Invalid_state"),
1546 this._saveItem(this.CONSTANTS.STORAGE.ERROR_DESCRIPTION, "Invalid_state. state: " + e.stateResponse);
1547 this._saveItem(this.CONSTANTS.STORAGE.RENEW_STATUS + t, this.CONSTANTS.TOKEN_RENEW_STATUS_COMPLETED)
1548 }
1549 ,
1550 r.prototype.getResourceForEndpoint = function(e) {
1551 if (this.config && this.config.anonymousEndpoints)
1552 for (var t = 0; t < this.config.anonymousEndpoints.length; t++)
1553 if (-1 < e.indexOf(this.config.anonymousEndpoints[t]))
1554 return null;
1555 if (this.config && this.config.endpoints)
1556 for (var n in this.config.endpoints)
1557 if (-1 < e.indexOf(n))
1558 return this.config.endpoints[n];
1559 return -1 < e.indexOf("http://") || -1 < e.indexOf("https://") ? this._getHostFromUri(e) === this._getHostFromUri(this.config.redirectUri) ? this.config.loginResource : null : this.config.loginResource
1560 }
1561 ,
1562 r.prototype._getHostFromUri = function(e) {
1563 return String(e).replace(/^(https?:)\/\//, "").split("/")[0]
1564 }
1565 ,
1566 r.prototype.handleWindowCallback = function(e) {
1567 if (null == e && (e = window.location.hash),
1568 this.isCallback(e)) {
1569 var t = null
1570 , n = !1;
1571 0 < this._openedWindows.length && this._openedWindows[this._openedWindows.length - 1].opener && this._openedWindows[this._openedWindows.length - 1].opener._adalInstance ? (t = this._openedWindows[this._openedWindows.length - 1].opener._adalInstance,
1572 n = !0) : window.parent && window.parent._adalInstance && (t = window.parent._adalInstance);
1573 var r, i, o = t.getRequestInfo(e), s = null;
1574 i = n || window.parent !== window ? t._callBackMappedToRenewStates[o.stateResponse] : t.callback,
1575 t.info("Returned from redirect url"),
1576 t.saveTokenFromHash(o),
1577 o.requestType === this.REQUEST_TYPE.RENEW_TOKEN && window.parent ? (window.parent !== window ? t.verbose("Window is in iframe, acquiring token silently") : t.verbose("acquiring token interactive in progress"),
1578 r = o.parameters[t.CONSTANTS.ACCESS_TOKEN] || o.parameters[t.CONSTANTS.ID_TOKEN],
1579 s = t.CONSTANTS.ACCESS_TOKEN) : o.requestType === this.REQUEST_TYPE.LOGIN && (r = o.parameters[t.CONSTANTS.ID_TOKEN],
1580 s = t.CONSTANTS.ID_TOKEN);
1581 var a = o.parameters[t.CONSTANTS.ERROR_DESCRIPTION]
1582 , c = o.parameters[t.CONSTANTS.ERROR];
1583 try {
1584 i && i(a, r, c, s)
1585 } catch (e) {
1586 t.error("Error occurred in user defined callback function: " + e)
1587 }
1588 window.parent !== window || n || (t.config.navigateToLoginRequestUrl ? window.location.href = t._getItem(t.CONSTANTS.STORAGE.LOGIN_REQUEST) : window.location.hash = "")
1589 }
1590 }
1591 ,
1592 r.prototype._getNavigateUrl = function(e, t) {
1593 var n = "common";
1594 this.config.tenant && (n = this.config.tenant);
1595 var r = this.instance + n + "/oauth2/authorize" + this._serialize(e, this.config, t) + this._addLibMetadata();
1596 return this.info("Navigate url:" + r),
1597 r
1598 }
1599 ,
1600 r.prototype._extractIdToken = function(e) {
1601 var t = this._decodeJwt(e);
1602 if (!t)
1603 return null;
1604 try {
1605 var n = t.JWSPayload
1606 , r = this._base64DecodeStringUrlSafe(n);
1607 return r ? JSON.parse(r) : (this.info("The returned id_token could not be base64 url safe decoded."),
1608 null)
1609 } catch (e) {
1610 this.error("The returned id_token could not be decoded", e)
1611 }
1612 return null
1613 }
1614 ,
1615 r.prototype._base64DecodeStringUrlSafe = function(e) {
1616 return e = e.replace(/-/g, "+").replace(/_/g, "/"),
1617 window.atob ? decodeURIComponent(escape(window.atob(e))) : decodeURIComponent(escape(this._decode(e)))
1618 }
1619 ,
1620 r.prototype._decode = function(e) {
1621 var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="
1622 , n = (e = String(e).replace(/=+$/, "")).length;
1623 if (n % 4 == 1)
1624 throw new Error("The token to be decoded is not correctly encoded.");
1625 for (var r, i, o, s, a, c, u, l, p = "", d = 0; d < n; d += 4) {
1626 if (r = t.indexOf(e.charAt(d)),
1627 i = t.indexOf(e.charAt(d + 1)),
1628 o = t.indexOf(e.charAt(d + 2)),
1629 s = t.indexOf(e.charAt(d + 3)),
1630 d + 2 === n - 1) {
1631 c = (a = r << 18 | i << 12 | o << 6) >> 16 & 255,
1632 u = a >> 8 & 255,
1633 p += String.fromCharCode(c, u);
1634 break
1635 }
1636 if (d + 1 === n - 1) {
1637 c = (a = r << 18 | i << 12) >> 16 & 255,
1638 p += String.fromCharCode(c);
1639 break
1640 }
1641 c = (a = r << 18 | i << 12 | o << 6 | s) >> 16 & 255,
1642 u = a >> 8 & 255,
1643 l = 255 & a,
1644 p += String.fromCharCode(c, u, l)
1645 }
1646 return p
1647 }
1648 ,
1649 r.prototype._decodeJwt = function(e) {
1650 if (this._isEmpty(e))
1651 return null;
1652 var t = /^([^\.\s]*)\.([^\.\s]+)\.([^\.\s]*)$/.exec(e);
1653 return !t || t.length < 4 ? (this.warn("The returned id_token is not parseable."),
1654 null) : {
1655 header: t[1],
1656 JWSPayload: t[2],
1657 JWSSig: t[3]
1658 }
1659 }
1660 ,
1661 r.prototype._convertUrlSafeToRegularBase64EncodedString = function(e) {
1662 return e.replace("-", "+").replace("_", "/")
1663 }
1664 ,
1665 r.prototype._serialize = function(e, t, n) {
1666 var r = [];
1667 if (null !== t) {
1668 r.push("?response_type=" + e),
1669 r.push("client_id=" + encodeURIComponent(t.clientId)),
1670 n && r.push("resource=" + encodeURIComponent(n)),
1671 r.push("redirect_uri=" + encodeURIComponent(t.redirectUri)),
1672 r.push("state=" + encodeURIComponent(t.state)),
1673 t.hasOwnProperty("slice") && r.push("slice=" + encodeURIComponent(t.slice)),
1674 t.hasOwnProperty("extraQueryParameter") && r.push(t.extraQueryParameter);
1675 var i = t.correlationId ? t.correlationId : this._guid();
1676 r.push("client-request-id=" + encodeURIComponent(i))
1677 }
1678 return r.join("&")
1679 }
1680 ,
1681 r.prototype._deserialize = function(e) {
1682 function t(e) {
1683 return decodeURIComponent(e.replace(r, " "))
1684 }
1685 var n, r = /\+/g, i = /([^&=]+)=([^&]*)/g, o = {};
1686 for (n = i.exec(e); n; )
1687 o[t(n[1])] = t(n[2]),
1688 n = i.exec(e);
1689 return o
1690 }
1691 ,
1692 r.prototype._decimalToHex = function(e) {
1693 for (var t = e.toString(16); t.length < 2; )
1694 t = "0" + t;
1695 return t
1696 }
1697 ,
1698 r.prototype._guid = function() {
1699 var e = window.crypto || window.msCrypto;
1700 if (e && e.getRandomValues) {
1701 var t = new Uint8Array(16);
1702 return e.getRandomValues(t),
1703 t[6] |= 64,
1704 t[6] &= 79,
1705 t[8] |= 128,
1706 t[8] &= 191,
1707 this._decimalToHex(t[0]) + this._decimalToHex(t[1]) + this._decimalToHex(t[2]) + this._decimalToHex(t[3]) + "-" + this._decimalToHex(t[4]) + this._decimalToHex(t[5]) + "-" + this._decimalToHex(t[6]) + this._decimalToHex(t[7]) + "-" + this._decimalToHex(t[8]) + this._decimalToHex(t[9]) + "-" + this._decimalToHex(t[10]) + this._decimalToHex(t[11]) + this._decimalToHex(t[12]) + this._decimalToHex(t[13]) + this._decimalToHex(t[14]) + this._decimalToHex(t[15])
1708 }
1709 for (var n = "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx", r = "0123456789abcdef", i = 0, o = "", s = 0; s < 36; s++)
1710 "-" !== n[s] && "4" !== n[s] && (i = 16 * Math.random() | 0),
1711 "x" === n[s] ? o += r[i] : "y" === n[s] ? (i &= 3,
1712 o += r[i |= 8]) : o += n[s];
1713 return o
1714 }
1715 ,
1716 r.prototype._expiresIn = function(e) {
1717 return e = e || 3599,
1718 this._now() + parseInt(e, 10)
1719 }
1720 ,
1721 r.prototype._now = function() {
1722 return Math.round((new Date).getTime() / 1e3)
1723 }
1724 ,
1725 r.prototype._addAdalFrame = function(e) {
1726 if (void 0 !== e) {
1727 this.info("Add adal frame to document:" + e);
1728 var t = document.getElementById(e);
1729 if (!t) {
1730 if (document.createElement && document.documentElement && (window.opera || -1 === window.navigator.userAgent.indexOf("MSIE 5.0"))) {
1731 var n = document.createElement("iframe");
1732 n.setAttribute("id", e),
1733 n.setAttribute("aria-hidden", "true"),
1734 n.style.visibility = "hidden",
1735 n.style.position = "absolute",
1736 n.style.width = n.style.height = n.borderWidth = "0px",
1737 t = document.getElementsByTagName("body")[0].appendChild(n)
1738 } else
1739 document.body && document.body.insertAdjacentHTML && document.body.insertAdjacentHTML("beforeEnd", '<iframe name="' + e + '" id="' + e + '" style="display:none"></iframe>');
1740 window.frames && window.frames[e] && (t = window.frames[e])
1741 }
1742 return t
1743 }
1744 }
1745 ,
1746 r.prototype._saveItem = function(e, t, n) {
1747 if (this.config && this.config.cacheLocation && "localStorage" === this.config.cacheLocation) {
1748 if (!this._supportsLocalStorage())
1749 return this.info("Local storage is not supported"),
1750 !1;
1751 if (n) {
1752 var r = this._getItem(e) || "";
1753 localStorage.setItem(e, r + t + this.CONSTANTS.CACHE_DELIMETER)
1754 } else
1755 localStorage.setItem(e, t);
1756 return !0
1757 }
1758 return this._supportsSessionStorage() ? (sessionStorage.setItem(e, t),
1759 !0) : (this.info("Session storage is not supported"),
1760 !1)
1761 }
1762 ,
1763 r.prototype._getItem = function(e) {
1764 return this.config && this.config.cacheLocation && "localStorage" === this.config.cacheLocation ? this._supportsLocalStorage() ? localStorage.getItem(e) : (this.info("Local storage is not supported"),
1765 null) : this._supportsSessionStorage() ? sessionStorage.getItem(e) : (this.info("Session storage is not supported"),
1766 null)
1767 }
1768 ,
1769 r.prototype._supportsLocalStorage = function() {
1770 try {
1771 return !!window.localStorage && (window.localStorage.setItem("storageTest", "A"),
1772 "A" == window.localStorage.getItem("storageTest") && (window.localStorage.removeItem("storageTest"),
1773 !window.localStorage.getItem("storageTest")))
1774 } catch (e) {
1775 return !1
1776 }
1777 }
1778 ,
1779 r.prototype._supportsSessionStorage = function() {
1780 try {
1781 return !!window.sessionStorage && (window.sessionStorage.setItem("storageTest", "A"),
1782 "A" == window.sessionStorage.getItem("storageTest") && (window.sessionStorage.removeItem("storageTest"),
1783 !window.sessionStorage.getItem("storageTest")))
1784 } catch (e) {
1785 return !1
1786 }
1787 }
1788 ,
1789 r.prototype._cloneConfig = function(e) {
1790 if (null === e || "object" != typeof e)
1791 return e;
1792 var t = {};
1793 for (var n in e)
1794 e.hasOwnProperty(n) && (t[n] = e[n]);
1795 return t
1796 }
1797 ,
1798 r.prototype._addLibMetadata = function() {
1799 return "&x-client-SKU=Js&x-client-Ver=" + this._libVersion()
1800 }
1801 ,
1802 r.prototype.log = function(e, t, n, r) {
1803 if (e <= Logging.level) {
1804 if (!Logging.piiLoggingEnabled && r)
1805 return;
1806 var i = (new Date).toUTCString()
1807 , o = "";
1808 o = this.config.correlationId ? i + ":" + this.config.correlationId + "-" + this._libVersion() + "-" + this.CONSTANTS.LEVEL_STRING_MAP[e] + " " + t : i + ":" + this._libVersion() + "-" + this.CONSTANTS.LEVEL_STRING_MAP[e] + " " + t,
1809 n && (o += "\nstack:\n" + n.stack),
1810 Logging.log(o)
1811 }
1812 }
1813 ,
1814 r.prototype.error = function(e, t) {
1815 this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR, e, t)
1816 }
1817 ,
1818 r.prototype.warn = function(e) {
1819 this.log(this.CONSTANTS.LOGGING_LEVEL.WARN, e, null)
1820 }
1821 ,
1822 r.prototype.info = function(e) {
1823 this.log(this.CONSTANTS.LOGGING_LEVEL.INFO, e, null)
1824 }
1825 ,
1826 r.prototype.verbose = function(e) {
1827 this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE, e, null)
1828 }
1829 ,
1830 r.prototype.errorPii = function(e, t) {
1831 this.log(this.CONSTANTS.LOGGING_LEVEL.ERROR, e, t, !0)
1832 }
1833 ,
1834 r.prototype.warnPii = function(e) {
1835 this.log(this.CONSTANTS.LOGGING_LEVEL.WARN, e, null, !0)
1836 }
1837 ,
1838 r.prototype.infoPii = function(e) {
1839 this.log(this.CONSTANTS.LOGGING_LEVEL.INFO, e, null, !0)
1840 }
1841 ,
1842 r.prototype.verbosePii = function(e) {
1843 this.log(this.CONSTANTS.LOGGING_LEVEL.VERBOSE, e, null, !0)
1844 }
1845 ,
1846 r.prototype._libVersion = function() {
1847 return "1.0.17"
1848 }
1849 ,
1850 e.exports && (e.exports = r,
1851 e.exports.inject = function(e) {
1852 return new r(e)
1853 }
1854 ),
1855 r
1856 }()
1857 }
1858 , function(e, t, n) {
1859 "use strict";
1860 n.r(t);
1861 var r = {};
1862 n.r(r),
1863 n.d(r, "App", function() {
1864 return qr
1865 }),
1866 n.d(r, "AppCatalog", function() {
1867 return Br
1868 }),
1869 n.d(r, "Attachment", function() {
1870 return Xr
1871 }),
1872 n.d(r, "Attachments", function() {
1873 return Qr
1874 }),
1875 n.d(r, "ClientsidePageFromFile", function() {
1876 return mi
1877 }),
1878 n.d(r, "CreateClientsidePage", function() {
1879 return Si
1880 }),
1881 n.d(r, "CanvasColumn", function() {
1882 return Ti
1883 }),
1884 n.d(r, "CanvasSection", function() {
1885 return ji
1886 }),
1887 n.d(r, "ClientsideText", function() {
1888 return Ii
1889 }),
1890 n.d(r, "ClientsideWebpart", function() {
1891 return Pi
1892 }),
1893 n.d(r, "ColumnControl", function() {
1894 return wi
1895 }),
1896 n.d(r, "PromotedState", function() {
1897 return ei
1898 }),
1899 n.d(r, "Comment", function() {
1900 return ci
1901 }),
1902 n.d(r, "Comments", function() {
1903 return si
1904 }),
1905 n.d(r, "Replies", function() {
1906 return li
1907 }),
1908 n.d(r, "ContentType", function() {
1909 return Mi
1910 }),
1911 n.d(r, "ContentTypes", function() {
1912 return Fi
1913 }),
1914 n.d(r, "FieldLink", function() {
1915 return Hi
1916 }),
1917 n.d(r, "FieldLinks", function() {
1918 return Gi
1919 }),
1920 n.d(r, "Feature", function() {
1921 return eo
1922 }),
1923 n.d(r, "Features", function() {
1924 return Yi
1925 }),
1926 n.d(r, "Fields", function() {
1927 return To
1928 }),
1929 n.d(r, "Field", function() {
1930 return Io
1931 }),
1932 n.d(r, "AddFieldOptions", function() {
1933 return so
1934 }),
1935 n.d(r, "CalendarType", function() {
1936 return ao
1937 }),
1938 n.d(r, "ChoiceFieldFormatType", function() {
1939 return lo
1940 }),
1941 n.d(r, "DateTimeFieldFormatType", function() {
1942 return io
1943 }),
1944 n.d(r, "DateTimeFieldFriendlyFormatType", function() {
1945 return oo
1946 }),
1947 n.d(r, "FieldTypes", function() {
1948 return ro
1949 }),
1950 n.d(r, "FieldUserSelectionMode", function() {
1951 return uo
1952 }),
1953 n.d(r, "UrlFieldFormatType", function() {
1954 return co
1955 }),
1956 n.d(r, "File", function() {
1957 return vr
1958 }),
1959 n.d(r, "Files", function() {
1960 return gr
1961 }),
1962 n.d(r, "CheckinType", function() {
1963 return Wn
1964 }),
1965 n.d(r, "MoveOperations", function() {
1966 return Hn
1967 }),
1968 n.d(r, "TemplateFileType", function() {
1969 return Vn
1970 }),
1971 n.d(r, "Version", function() {
1972 return Tr
1973 }),
1974 n.d(r, "Versions", function() {
1975 return Sr
1976 }),
1977 n.d(r, "Folder", function() {
1978 return Uo
1979 }),
1980 n.d(r, "Folders", function() {
1981 return No
1982 }),
1983 n.d(r, "Form", function() {
1984 return qo
1985 }),
1986 n.d(r, "Forms", function() {
1987 return Bo
1988 }),
1989 n.d(r, "HubSite", function() {
1990 return Xo
1991 }),
1992 n.d(r, "HubSites", function() {
1993 return Qo
1994 }),
1995 n.d(r, "Item", function() {
1996 return zt
1997 }),
1998 n.d(r, "Items", function() {
1999 return Kt
2000 }),
2001 n.d(r, "ItemVersion", function() {
2002 return Yt
2003 }),
2004 n.d(r, "ItemVersions", function() {
2005 return Jt
2006 }),
2007 n.d(r, "PagedItemCollection", function() {
2008 return Zt
2009 }),
2010 n.d(r, "List", function() {
2011 return kt
2012 }),
2013 n.d(r, "Lists", function() {
2014 return xt
2015 }),
2016 n.d(r, "ControlMode", function() {
2017 return Ct
2018 }),
2019 n.d(r, "RenderListDataOptions", function() {
2020 return _t
2021 }),
2022 n.d(r, "Navigation", function() {
2023 return as
2024 }),
2025 n.d(r, "NavigationNode", function() {
2026 return os
2027 }),
2028 n.d(r, "NavigationNodes", function() {
2029 return rs
2030 }),
2031 n.d(r, "NavigationService", function() {
2032 return us
2033 }),
2034 n.d(r, "spODataEntity", function() {
2035 return st
2036 }),
2037 n.d(r, "spODataEntityArray", function() {
2038 return at
2039 }),
2040 n.d(r, "Profiles", function() {
2041 return ms
2042 }),
2043 n.d(r, "UrlZone", function() {
2044 return fs
2045 }),
2046 n.d(r, "RegionalSettings", function() {
2047 return As
2048 }),
2049 n.d(r, "TimeZone", function() {
2050 return xs
2051 }),
2052 n.d(r, "TimeZones", function() {
2053 return ks
2054 }),
2055 n.d(r, "RelatedItemManager", function() {
2056 return Gs
2057 }),
2058 n.d(r, "SortDirection", function() {
2059 return zs
2060 }),
2061 n.d(r, "ReorderingRuleMatchType", function() {
2062 return Xs
2063 }),
2064 n.d(r, "QueryPropertyValueType", function() {
2065 return Js
2066 }),
2067 n.d(r, "SearchBuiltInSourceId", function() {
2068 return pa
2069 }),
2070 n.d(r, "SearchQueryBuilder", function() {
2071 return Qs
2072 }),
2073 n.d(r, "SearchResults", function() {
2074 return oa
2075 }),
2076 n.d(r, "Search", function() {
2077 return ia
2078 }),
2079 n.d(r, "Suggest", function() {
2080 return aa
2081 }),
2082 n.d(r, "RoleAssignment", function() {
2083 return Ka
2084 }),
2085 n.d(r, "RoleAssignments", function() {
2086 return Ha
2087 }),
2088 n.d(r, "RoleDefinition", function() {
2089 return Ja
2090 }),
2091 n.d(r, "RoleDefinitions", function() {
2092 return za
2093 }),
2094 n.d(r, "PermissionKind", function() {
2095 return ha
2096 }),
2097 n.d(r, "SPSharedObjectType", function() {
2098 return ba
2099 }),
2100 n.d(r, "SharingDomainRestrictionMode", function() {
2101 return ya
2102 }),
2103 n.d(r, "SharingLinkKind", function() {
2104 return Oa
2105 }),
2106 n.d(r, "SharingOperationStatusCode", function() {
2107 return ga
2108 }),
2109 n.d(r, "SharingRole", function() {
2110 return fa
2111 }),
2112 n.d(r, "RoleType", function() {
2113 return va
2114 }),
2115 n.d(r, "SiteDesigns", function() {
2116 return wc
2117 }),
2118 n.d(r, "SiteGroup", function() {
2119 return Ga
2120 }),
2121 n.d(r, "SiteGroups", function() {
2122 return Ma
2123 }),
2124 n.d(r, "SiteScripts", function() {
2125 return Ec
2126 }),
2127 n.d(r, "SiteUser", function() {
2128 return Fa
2129 }),
2130 n.d(r, "SiteUsers", function() {
2131 return ka
2132 }),
2133 n.d(r, "Site", function() {
2134 return yt
2135 }),
2136 n.d(r, "MySocial", function() {
2137 return Kc
2138 }),
2139 n.d(r, "Social", function() {
2140 return Wc
2141 }),
2142 n.d(r, "SocialActorType", function() {
2143 return Ac
2144 }),
2145 n.d(r, "SocialActorTypes", function() {
2146 return Uc
2147 }),
2148 n.d(r, "SocialFollowResult", function() {
2149 return xc
2150 }),
2151 n.d(r, "SocialStatusCode", function() {
2152 return Dc
2153 }),
2154 n.d(r, "Utilities", function() {
2155 return Yc
2156 }),
2157 n.d(r, "Subscription", function() {
2158 return su
2159 }),
2160 n.d(r, "Subscriptions", function() {
2161 return iu
2162 }),
2163 n.d(r, "UserCustomAction", function() {
2164 return Ou
2165 }),
2166 n.d(r, "UserCustomActions", function() {
2167 return yu
2168 }),
2169 n.d(r, "UserCustomActionRegistrationType", function() {
2170 return uu
2171 }),
2172 n.d(r, "UserCustomActionScope", function() {
2173 return lu
2174 }),
2175 n.d(r, "View", function() {
2176 return Eu
2177 }),
2178 n.d(r, "ViewFields", function() {
2179 return Nu
2180 }),
2181 n.d(r, "Views", function() {
2182 return _u
2183 }),
2184 n.d(r, "ViewScope", function() {
2185 return Su
2186 }),
2187 n.d(r, "WebPartsPersonalizationScope", function() {
2188 return Du
2189 }),
2190 n.d(r, "WebPartDefinitions", function() {
2191 return Hu
2192 }),
2193 n.d(r, "WebPartDefinition", function() {
2194 return Ku
2195 }),
2196 n.d(r, "LimitedWebPartManager", function() {
2197 return qu
2198 }),
2199 n.d(r, "Web", function() {
2200 return Tt
2201 }),
2202 n.d(r, "Webs", function() {
2203 return St
2204 }),
2205 n.d(r, "SharePointQueryableInstance", function() {
2206 return Ke
2207 }),
2208 n.d(r, "SharePointQueryableCollection", function() {
2209 return He
2210 }),
2211 n.d(r, "SharePointQueryable", function() {
2212 return Ge
2213 }),
2214 n.d(r, "spInvokableFactory", function() {
2215 return Me
2216 }),
2217 n.d(r, "SPBatch", function() {
2218 return ut
2219 }),
2220 n.d(r, "defaultPath", function() {
2221 return Ye
2222 }),
2223 n.d(r, "spGet", function() {
2224 return xe
2225 }),
2226 n.d(r, "spPost", function() {
2227 return De
2228 }),
2229 n.d(r, "spDelete", function() {
2230 return ke
2231 }),
2232 n.d(r, "spPatch", function() {
2233 return Le
2234 }),
2235 n.d(r, "spPostDelete", function() {
2236 return Fe
2237 }),
2238 n.d(r, "spPostDeleteETag", function() {
2239 return Be
2240 }),
2241 n.d(r, "SPHttpClient", function() {
2242 return Ie
2243 }),
2244 n.d(r, "SPRest", function() {
2245 return lt
2246 }),
2247 n.d(r, "sp", function() {
2248 return Ju
2249 }),
2250 n.d(r, "PrincipalType", function() {
2251 return ln
2252 }),
2253 n.d(r, "PrincipalSource", function() {
2254 return pn
2255 }),
2256 n.d(r, "PageType", function() {
2257 return dn
2258 }),
2259 n.d(r, "toAbsoluteUrl", function() {
2260 return Ae.a
2261 }),
2262 n.d(r, "extractWebUrl", function() {
2263 return Te
2264 }),
2265 n.d(r, "objectToSPKeyValueCollection", function() {
2266 return vn
2267 }),
2268 n.d(r, "stripInvalidFileFolderChars", function() {
2269 return Tn
2270 }),
2271 n.d(r, "containsInvalidFileFolderChars", function() {
2272 return jn
2273 });
2274 var i = {};
2275 n.r(i),
2276 n.d(i, "Attachment", function() {
2277 return Cl
2278 }),
2279 n.d(i, "Attachments", function() {
2280 return El
2281 }),
2282 n.d(i, "Calendar", function() {
2283 return Zl
2284 }),
2285 n.d(i, "Calendars", function() {
2286 return Yl
2287 }),
2288 n.d(i, "Event", function() {
2289 return ep
2290 }),
2291 n.d(i, "Events", function() {
2292 return tp
2293 }),
2294 n.d(i, "Contact", function() {
2295 return vp
2296 }),
2297 n.d(i, "ContactFolder", function() {
2298 return Sp
2299 }),
2300 n.d(i, "ContactFolders", function() {
2301 return jp
2302 }),
2303 n.d(i, "Contacts", function() {
2304 return mp
2305 }),
2306 n.d(i, "Conversation", function() {
2307 return pl
2308 }),
2309 n.d(i, "Conversations", function() {
2310 return dl
2311 }),
2312 n.d(i, "Post", function() {
2313 return yl
2314 }),
2315 n.d(i, "Posts", function() {
2316 return gl
2317 }),
2318 n.d(i, "Senders", function() {
2319 return Ol
2320 }),
2321 n.d(i, "Thread", function() {
2322 return hl
2323 }),
2324 n.d(i, "Threads", function() {
2325 return fl
2326 }),
2327 n.d(i, "DirectoryObjectTypes", function() {
2328 return Al
2329 }),
2330 n.d(i, "DirectoryObject", function() {
2331 return Bl
2332 }),
2333 n.d(i, "DirectoryObjects", function() {
2334 return Ml
2335 }),
2336 n.d(i, "Group", function() {
2337 return Jl
2338 }),
2339 n.d(i, "GroupType", function() {
2340 return Ul
2341 }),
2342 n.d(i, "Groups", function() {
2343 return $l
2344 }),
2345 n.d(i, "Member", function() {
2346 return Ap
2347 }),
2348 n.d(i, "Members", function() {
2349 return Up
2350 }),
2351 n.d(i, "MailFolder", function() {
2352 return Wp
2353 }),
2354 n.d(i, "MailFolders", function() {
2355 return Hp
2356 }),
2357 n.d(i, "MailboxSettings", function() {
2358 return Vp
2359 }),
2360 n.d(i, "Message", function() {
2361 return qp
2362 }),
2363 n.d(i, "Messages", function() {
2364 return Gp
2365 }),
2366 n.d(i, "Drive", function() {
2367 return nd
2368 }),
2369 n.d(i, "DriveItem", function() {
2370 return od
2371 }),
2372 n.d(i, "DriveItems", function() {
2373 return sd
2374 }),
2375 n.d(i, "Drives", function() {
2376 return rd
2377 }),
2378 n.d(i, "Root", function() {
2379 return id
2380 }),
2381 n.d(i, "Notebook", function() {
2382 return Od
2383 }),
2384 n.d(i, "Notebooks", function() {
2385 return vd
2386 }),
2387 n.d(i, "OneNote", function() {
2388 return gd
2389 }),
2390 n.d(i, "Section", function() {
2391 return md
2392 }),
2393 n.d(i, "Sections", function() {
2394 return Sd
2395 }),
2396 n.d(i, "Photo", function() {
2397 return Cd
2398 }),
2399 n.d(i, "Bucket", function() {
2400 return Gd
2401 }),
2402 n.d(i, "Buckets", function() {
2403 return Wd
2404 }),
2405 n.d(i, "Plan", function() {
2406 return Fd
2407 }),
2408 n.d(i, "Planner", function() {
2409 return Ld
2410 }),
2411 n.d(i, "Plans", function() {
2412 return Bd
2413 }),
2414 n.d(i, "Task", function() {
2415 return Md
2416 }),
2417 n.d(i, "Tasks", function() {
2418 return qd
2419 }),
2420 n.d(i, "Subscription", function() {
2421 return Zd
2422 }),
2423 n.d(i, "Subscriptions", function() {
2424 return eh
2425 }),
2426 n.d(i, "Channel", function() {
2427 return ph
2428 }),
2429 n.d(i, "Channels", function() {
2430 return dh
2431 }),
2432 n.d(i, "Tab", function() {
2433 return hh
2434 }),
2435 n.d(i, "Tabs", function() {
2436 return fh
2437 }),
2438 n.d(i, "Team", function() {
2439 return uh
2440 }),
2441 n.d(i, "Teams", function() {
2442 return lh
2443 }),
2444 n.d(i, "User", function() {
2445 return yp
2446 }),
2447 n.d(i, "Users", function() {
2448 return gp
2449 }),
2450 n.d(i, "People", function() {
2451 return Op
2452 }),
2453 n.d(i, "graph", function() {
2454 return br
2455 }),
2456 n.d(i, "GraphRest", function() {
2457 return fr
2458 });
2459 var o, s, b = (Object.defineProperty(u, "activeLogLevel", {
2460 get: function() {
2461 return u.instance.activeLogLevel
2462 },
2463 set: function(e) {
2464 u.instance.activeLogLevel = e
2465 },
2466 enumerable: !0,
2467 configurable: !0
2468 }),
2469 Object.defineProperty(u, "instance", {
2470 get: function() {
2471 return null != u._instance || (u._instance = new a),
2472 u._instance
2473 },
2474 enumerable: !0,
2475 configurable: !0
2476 }),
2477 u.subscribe = function() {
2478 for (var e = [], t = 0; t < arguments.length; t++)
2479 e[t] = arguments[t];
2480 e.forEach(function(e) {
2481 return u.instance.subscribe(e)
2482 })
2483 }
2484 ,
2485 u.clearSubscribers = function() {
2486 return u.instance.clearSubscribers()
2487 }
2488 ,
2489 Object.defineProperty(u, "count", {
2490 get: function() {
2491 return u.instance.count
2492 },
2493 enumerable: !0,
2494 configurable: !0
2495 }),
2496 u.write = function(e, t) {
2497 void 0 === t && (t = 1),
2498 u.instance.log({
2499 level: t,
2500 message: e
2501 })
2502 }
2503 ,
2504 u.writeJSON = function(e, t) {
2505 void 0 === t && (t = 1),
2506 this.write(JSON.stringify(e), t)
2507 }
2508 ,
2509 u.log = function(e) {
2510 u.instance.log(e)
2511 }
2512 ,
2513 u.error = function(e) {
2514 u.instance.log({
2515 data: e,
2516 level: 3,
2517 message: e.message
2518 })
2519 }
2520 ,
2521 u), a = (c.prototype.subscribe = function(e) {
2522 this.subscribers.push(e)
2523 }
2524 ,
2525 c.prototype.clearSubscribers = function() {
2526 var e = this.subscribers.slice(0);
2527 return this.subscribers.length = 0,
2528 e
2529 }
2530 ,
2531 Object.defineProperty(c.prototype, "count", {
2532 get: function() {
2533 return this.subscribers.length
2534 },
2535 enumerable: !0,
2536 configurable: !0
2537 }),
2538 c.prototype.write = function(e, t) {
2539 void 0 === t && (t = 1),
2540 this.log({
2541 level: t,
2542 message: e
2543 })
2544 }
2545 ,
2546 c.prototype.log = function(t) {
2547 void 0 !== t && this.activeLogLevel <= t.level && this.subscribers.map(function(e) {
2548 return e.log(t)
2549 })
2550 }
2551 ,
2552 c);
2553 function c(e, t) {
2554 void 0 === e && (e = 2),
2555 void 0 === t && (t = []),
2556 this.activeLogLevel = e,
2557 this.subscribers = t
2558 }
2559 function u() {}
2560 (s = o = o || {})[s.Verbose = 0] = "Verbose",
2561 s[s.Info = 1] = "Info",
2562 s[s.Warning = 2] = "Warning",
2563 s[s.Error = 3] = "Error",
2564 s[s.Off = 99] = "Off";
2565 var l = (P.prototype.log = function(e) {
2566 var t = this.format(e);
2567 switch (e.level) {
2568 case 0:
2569 case 1:
2570 console.log(t);
2571 break;
2572 case 2:
2573 console.warn(t);
2574 break;
2575 case 3:
2576 console.error(t)
2577 }
2578 }
2579 ,
2580 P.prototype.format = function(e) {
2581 var t = [];
2582 if (t.push("Message: " + e.message),
2583 void 0 !== e.data)
2584 try {
2585 t.push(" Data: " + JSON.stringify(e.data))
2586 } catch (e) {
2587 t.push(" Data: Error in stringify of supplied data " + e)
2588 }
2589 return t.join("")
2590 }
2591 ,
2592 P)
2593 , p = (I.prototype.log = function(e) {
2594 this.method(e)
2595 }
2596 ,
2597 I)
2598 , y = n(1)
2599 , d = (w.prototype.add = function(e, t) {
2600 this._settings.set(e, t)
2601 }
2602 ,
2603 w.prototype.addJSON = function(e, t) {
2604 this._settings.set(e, Object(y.t)(t))
2605 }
2606 ,
2607 w.prototype.apply = function(n) {
2608 var r = this;
2609 return new Promise(function(e, t) {
2610 try {
2611 r._settings = Object(y.v)(r._settings, Object(y.y)(n)),
2612 e()
2613 } catch (e) {
2614 t(e)
2615 }
2616 }
2617 )
2618 }
2619 ,
2620 w.prototype.load = function(n) {
2621 var r = this;
2622 return new Promise(function(t, e) {
2623 n.getConfiguration().then(function(e) {
2624 r._settings = Object(y.v)(r._settings, Object(y.y)(e)),
2625 t()
2626 }).catch(e)
2627 }
2628 )
2629 }
2630 ,
2631 w.prototype.get = function(e) {
2632 return this._settings.get(e) || null
2633 }
2634 ,
2635 w.prototype.getJSON = function(e) {
2636 var t = this.get(e);
2637 return null == t ? t : JSON.parse(t)
2638 }
2639 ,
2640 w)
2641 , h = (T.prototype.getWrappedProvider = function() {
2642 return this.wrappedProvider
2643 }
2644 ,
2645 T.prototype.getConfiguration = function() {
2646 var t = this;
2647 return this.store && this.store.enabled ? this.store.getOrPut(this.cacheKey, function() {
2648 return t.wrappedProvider.getConfiguration().then(function(e) {
2649 return t.store.put(t.cacheKey, e),
2650 e
2651 })
2652 }) : this.wrappedProvider.getConfiguration()
2653 }
2654 ,
2655 T.prototype.selectPnPCache = function() {
2656 var e = new y.c;
2657 if (e.local && e.local.enabled)
2658 return e.local;
2659 if (e.session && e.session.enabled)
2660 return e.session;
2661 throw Error("Cannot create a caching configuration provider since cache is not available.")
2662 }
2663 ,
2664 T)
2665 , g = n(0)
2666 , f = (Object.defineProperty(j.prototype, "batchId", {
2667 get: function() {
2668 return this._batchId
2669 },
2670 enumerable: !0,
2671 configurable: !0
2672 }),
2673 Object.defineProperty(j.prototype, "requests", {
2674 get: function() {
2675 return this._reqs.sort(function(e, t) {
2676 return e.index - t.index
2677 })
2678 },
2679 enumerable: !0,
2680 configurable: !0
2681 }),
2682 j.prototype.track = function(e) {
2683 e.data.batch = this,
2684 (void 0 === e.data.batchIndex || e.data.batchIndex < 0) && (e.data.batchIndex = ++this._index)
2685 }
2686 ,
2687 j.prototype.add = function(e) {
2688 var n = {
2689 id: e.requestId,
2690 index: e.batchIndex,
2691 method: e.method.toUpperCase(),
2692 options: e.options,
2693 parser: e.parser,
2694 reject: null,
2695 resolve: null,
2696 url: e.url
2697 }
2698 , t = new Promise(function(e, t) {
2699 n.resolve = e,
2700 n.reject = t
2701 }
2702 );
2703 return this._reqs.push(n),
2704 t
2705 }
2706 ,
2707 j.prototype.addDependency = function() {
2708 var t = function() {};
2709 return this._deps.push(new Promise(function(e) {
2710 t = e
2711 }
2712 )),
2713 t
2714 }
2715 ,
2716 j.prototype.addResolveBatchDependency = function(e) {
2717 this._rDeps.push(e)
2718 }
2719 ,
2720 j.prototype.execute = function() {
2721 var e = this;
2722 return Promise.all(this._deps).then(function() {
2723 return Promise.all(e._deps)
2724 }).then(function() {
2725 return e.executeImpl()
2726 }).then(function() {
2727 return Promise.all(e._rDeps)
2728 }).then(function() {})
2729 }
2730 ,
2731 j)
2732 , O = (Object.defineProperty(S.prototype, "store", {
2733 get: function() {
2734 return "local" === this.storeName ? S.storage.local : S.storage.session
2735 },
2736 enumerable: !0,
2737 configurable: !0
2738 }),
2739 S.storage = new y.c,
2740 S)
2741 , v = (m.prototype.parse = function(e) {
2742 var t = this;
2743 return this.parser.parse(e).then(function(e) {
2744 return t.cacheData(e)
2745 })
2746 }
2747 ,
2748 m.prototype.cacheData = function(e) {
2749 return null !== this.cacheOptions.store && this.cacheOptions.store.put(this.cacheOptions.key, e, this.cacheOptions.expiration),
2750 e
2751 }
2752 ,
2753 m);
2754 function m(e, t) {
2755 this.parser = e,
2756 this.cacheOptions = t
2757 }
2758 function S(e, t, n) {
2759 void 0 === t && (t = y.e.defaultCachingStore),
2760 void 0 === n && (n = Object(y.j)(new Date, "second", y.e.defaultCachingTimeoutSeconds)),
2761 this.key = e,
2762 this.storeName = t,
2763 this.expiration = n
2764 }
2765 function j(e) {
2766 void 0 === e && (e = Object(y.m)()),
2767 this._batchId = e,
2768 this._reqs = [],
2769 this._deps = [],
2770 this._rDeps = [],
2771 this._index = -1
2772 }
2773 function T(e, t, n) {
2774 this.wrappedProvider = e,
2775 this.cacheKey = t,
2776 this.wrappedProvider = e,
2777 this.store = n || this.selectPnPCache()
2778 }
2779 function w(e) {
2780 void 0 === e && (e = new Map),
2781 this._settings = e
2782 }
2783 function I(e) {
2784 this.method = e
2785 }
2786 function P() {}
2787 function _(e, t, n, r) {
2788 Reflect.defineProperty(e.prototype, t, {
2789 configurable: !0,
2790 enumerable: !0,
2791 get: function() {
2792 return n(this, r)
2793 }
2794 })
2795 }
2796 function C(e) {
2797 N = !0,
2798 x(A, e)
2799 }
2800 function E(e, t) {
2801 return N = !0,
2802 Reflect.has(e, U) || Reflect.set(e, U, []),
2803 x(Reflect.get(e, U), t),
2804 e
2805 }
2806 function R(e, t) {
2807 N = !0,
2808 void 0 === e.__proto__[U] && (e.__proto__[U] = []),
2809 x(e.__proto__[U], t)
2810 }
2811 var N = !1
2812 , A = []
2813 , U = Symbol("__extensions");
2814 function x(e, t) {
2815 Object(y.q)(t) ? e.push.apply(e, Object(g.e)(t)) : e.push(t)
2816 }
2817 function D() {
2818 A.length = 0
2819 }
2820 function k() {
2821 N = !1
2822 }
2823 function L() {
2824 N = !0
2825 }
2826 function F(e, t, n) {
2827 for (var r = [], i = 3; i < arguments.length; i++)
2828 r[i - 3] = arguments[i];
2829 if (N) {
2830 var o = [];
2831 Reflect.has(n, U) && o.push.apply(o, Object(g.e)(Reflect.get(n, U))),
2832 o.push.apply(o, Object(g.e)(A));
2833 for (var s = 0; s < o.length; s++) {
2834 var a = o[s]
2835 , c = void 0;
2836 if (Object(y.r)(a) ? c = a.apply(void 0, Object(g.e)([e, n], r)) : "get" === e && Reflect.has(a, r[0]) ? c = Reflect.get(a, r[0], n) : Reflect.has(a, e) && (c = Reflect.get(a, e).apply(void 0, Object(g.e)([n], r))),
2837 void 0 !== c)
2838 return c
2839 }
2840 }
2841 return t.apply(void 0, Object(g.e)([n], r))
2842 }
2843 var B, M, q, G, W, H, V, K = (B = function(e) {
2844 return this.defaultAction(e)
2845 }
2846 ,
2847 function(o) {
2848 return function() {
2849 for (var e = [], t = 0; t < arguments.length; t++)
2850 e[t] = arguments[t];
2851 function n(e) {
2852 var n = Object.assign(function() {
2853 for (var e = [], t = 0; t < arguments.length; t++)
2854 e[t] = arguments[t];
2855 return B.apply(n, e)
2856 }, new (o.bind.apply(o, Object(g.e)([void 0], e))));
2857 return Reflect.setPrototypeOf(n, o.prototype),
2858 n
2859 }
2860 var r, i;
2861 return y.e.ie11 ? n(e) : new Proxy((i = (r = n)(e),
2862 r.__proto__[U] && (i = E(i, r.__proto__[U])),
2863 i),{
2864 apply: function(e, t, n) {
2865 return F("apply", function() {
2866 for (var e = [], t = 0; t < arguments.length; t++)
2867 e[t] = arguments[t];
2868 return Reflect.apply(e[0], e[1], e[2])
2869 }, e, t, n)
2870 },
2871 get: function(e, t, n) {
2872 return F("get", function() {
2873 for (var e = [], t = 0; t < arguments.length; t++)
2874 e[t] = arguments[t];
2875 return Reflect.get(e[0], e[1], e[2])
2876 }, e, t, n)
2877 },
2878 has: function(e, t) {
2879 return F("has", function() {
2880 for (var e = [], t = 0; t < arguments.length; t++)
2881 e[t] = arguments[t];
2882 return Reflect.has(e[0], e[1])
2883 }, e, t)
2884 },
2885 set: function(e, t, n, r) {
2886 return F("set", function() {
2887 for (var e = [], t = 0; t < arguments.length; t++)
2888 e[t] = arguments[t];
2889 return Reflect.set(e[0], e[1], e[2], e[3])
2890 }, e, t, n, r)
2891 }
2892 })
2893 }
2894 }
2895 ), Q = (se.prototype.parse = function(n) {
2896 var r = this;
2897 return new Promise(function(e, t) {
2898 r.handleError(n, t) && r.parseImpl(n, e, t)
2899 }
2900 )
2901 }
2902 ,
2903 se.prototype.parseImpl = function(e, t, n) {
2904 var r = this;
2905 e.headers.has("Content-Length") && 0 === parseFloat(e.headers.get("Content-Length")) || 204 === e.status ? t({}) : e.text().then(function(e) {
2906 return 0 < e.replace(/\s/gi, "").length ? JSON.parse(e) : {}
2907 }).then(function(e) {
2908 return t(r.parseODataJSON(e))
2909 }).catch(function(e) {
2910 return n(e)
2911 })
2912 }
2913 ,
2914 se.prototype.handleError = function(e, t) {
2915 return e.ok || Z.init(e).then(t),
2916 e.ok
2917 }
2918 ,
2919 se.prototype.parseODataJSON = function(e) {
2920 var t = e;
2921 return Object(y.p)(e, "d") ? t = Object(y.p)(e.d, "results") ? e.d.results : e.d : Object(y.p)(e, "value") && (t = e.value),
2922 t
2923 }
2924 ,
2925 se), z = (V = Q,
2926 Object(g.c)(oe, V),
2927 oe.prototype.parseImpl = function(e, t) {
2928 e.text().then(t)
2929 }
2930 ,
2931 oe), X = (H = Q,
2932 Object(g.c)(ie, H),
2933 ie.prototype.parseImpl = function(e, t) {
2934 e.blob().then(t)
2935 }
2936 ,
2937 ie), J = (W = Q,
2938 Object(g.c)(re, W),
2939 re.prototype.parseImpl = function(e, t) {
2940 e.json().then(t)
2941 }
2942 ,
2943 re), $ = (G = Q,
2944 Object(g.c)(ne, G),
2945 ne.prototype.parseImpl = function(e, t) {
2946 Object(y.r)(e.arrayBuffer) ? e.arrayBuffer().then(t) : e.buffer().then(t)
2947 }
2948 ,
2949 ne), Y = (q = Q,
2950 Object(g.c)(te, q),
2951 te.prototype.parseImpl = function(e, t) {
2952 this.parser(e).then(t)
2953 }
2954 ,
2955 te), Z = (M = Error,
2956 Object(g.c)(ee, M),
2957 ee.init = function(n) {
2958 return Object(g.a)(this, void 0, void 0, function() {
2959 var t;
2960 return Object(g.d)(this, function(e) {
2961 switch (e.label) {
2962 case 0:
2963 return [4, n.clone().text()];
2964 case 1:
2965 return t = e.sent(),
2966 [2, new ee("Error making HttpClient request in queryable [" + n.status + "] " + n.statusText + " ::> " + t,n.clone())]
2967 }
2968 })
2969 })
2970 }
2971 ,
2972 ee);
2973 function ee(e, t, n, r) {
2974 void 0 === n && (n = t.status),
2975 void 0 === r && (r = t.statusText);
2976 var i = M.call(this, e) || this;
2977 return i.response = t,
2978 i.status = n,
2979 i.statusText = r,
2980 i.isHttpRequestError = !0,
2981 i
2982 }
2983 function te(e) {
2984 var t = q.call(this) || this;
2985 return t.parser = e,
2986 t
2987 }
2988 function ne() {
2989 return null !== G && G.apply(this, arguments) || this
2990 }
2991 function re() {
2992 return null !== W && W.apply(this, arguments) || this
2993 }
2994 function ie() {
2995 return null !== H && H.apply(this, arguments) || this
2996 }
2997 function oe() {
2998 return null !== V && V.apply(this, arguments) || this
2999 }
3000 function se() {}
3001 function ae(n) {
3002 var e = JSON.stringify(n, function(e, t) {
3003 switch (e) {
3004 case "query":
3005 return JSON.stringify(Object(g.e)(t));
3006 case "batch":
3007 case "batchDependency":
3008 case "cachingOptions":
3009 case "clientFactory":
3010 case "parser":
3011 return "-";
3012 default:
3013 return t
3014 }
3015 }, 0)
3016 , t = JSON.parse(e, function(e, t) {
3017 switch (e) {
3018 case "query":
3019 return new Map(JSON.parse(t));
3020 case "batch":
3021 return n.batch;
3022 case "batchDependency":
3023 return n.batchDependency;
3024 case "cachingOptions":
3025 return n.cachingOptions;
3026 case "clientFactory":
3027 return n.clientFactory;
3028 case "parser":
3029 return n.parser;
3030 default:
3031 return t
3032 }
3033 });
3034 return n.options && n.options.body && (t.options.body = n.options.body),
3035 t
3036 }
3037 var ce = (Object.defineProperty(ue.prototype, "data", {
3038 get: function() {
3039 return this._data
3040 },
3041 set: function(e) {
3042 this._data = Object.assign({}, ae(this.data), ae(e))
3043 },
3044 enumerable: !0,
3045 configurable: !0
3046 }),
3047 ue.prototype.toUrl = function() {
3048 return this.data.url
3049 }
3050 ,
3051 ue.prototype.concat = function(e) {
3052 return this.data.url += e,
3053 this
3054 }
3055 ,
3056 Object.defineProperty(ue.prototype, "query", {
3057 get: function() {
3058 return this.data.query
3059 },
3060 enumerable: !0,
3061 configurable: !0
3062 }),
3063 ue.prototype.configure = function(e) {
3064 return Object(y.w)(this.data.options, e),
3065 this
3066 }
3067 ,
3068 ue.prototype.configureFrom = function(e) {
3069 return Object(y.w)(this.data.options, e.data.options),
3070 this
3071 }
3072 ,
3073 ue.prototype.usingCaching = function(e) {
3074 return y.e.globalCacheDisable || (this.data.useCaching = !0,
3075 void 0 !== e && (this.data.cachingOptions = e)),
3076 this
3077 }
3078 ,
3079 ue.prototype.usingParser = function(e) {
3080 return this.data.parser = e,
3081 this
3082 }
3083 ,
3084 ue.prototype.withPipeline = function(e) {
3085 return this.data.pipes = e.slice(0),
3086 this
3087 }
3088 ,
3089 ue.prototype.append = function(e) {
3090 this.data.url = Object(y.i)(this.data.url, e)
3091 }
3092 ,
3093 ue.prototype.inBatch = function(e) {
3094 if (this.hasBatch)
3095 throw Error("This query is already part of a batch.");
3096 return Object(y.x)(e) && e.track(this),
3097 this
3098 }
3099 ,
3100 ue.prototype.addBatchDependency = function() {
3101 return Object(y.x)(this.data.batch) ? this.data.batch.addDependency() : function() {
3102 return null
3103 }
3104 }
3105 ,
3106 Object.defineProperty(ue.prototype, "hasBatch", {
3107 get: function() {
3108 return Object(y.x)(this.data.batch)
3109 },
3110 enumerable: !0,
3111 configurable: !0
3112 }),
3113 Object.defineProperty(ue.prototype, "batch", {
3114 get: function() {
3115 return this.hasBatch ? this.data.batch : null
3116 },
3117 enumerable: !0,
3118 configurable: !0
3119 }),
3120 Object.defineProperty(ue.prototype, "parentUrl", {
3121 get: function() {
3122 return this.data.parentUrl
3123 },
3124 enumerable: !0,
3125 configurable: !0
3126 }),
3127 ue.prototype.cloneTo = function(e, t) {
3128 return void 0 === t && (t = {
3129 includeBatch: !0
3130 }),
3131 e.data = Object.assign({}, ae(this.data), {
3132 batch: null,
3133 cloneParentCacheOptions: null,
3134 cloneParentWasCaching: !1
3135 }, ae(e.data)),
3136 e.configureFrom(this),
3137 t.includeBatch && e.inBatch(this.batch),
3138 this.data.useCaching && (e.data.cloneParentWasCaching = !0,
3139 e.data.cloneParentCacheOptions = this.data.cachingOptions),
3140 e
3141 }
3142 ,
3143 ue);
3144 function ue(e) {
3145 void 0 === e && (e = {}),
3146 this._data = Object.assign({}, {
3147 cloneParentWasCaching: !1,
3148 options: {},
3149 parentUrl: "",
3150 parser: new Q,
3151 query: new Map,
3152 url: "",
3153 useCaching: !1
3154 }, ae(e))
3155 }
3156 function le(t, n) {
3157 return new Promise(function(e) {
3158 t.result = n,
3159 t.hasResult = !0,
3160 e(t)
3161 }
3162 )
3163 }
3164 function pe(e) {
3165 return 0 < e.pipes.length ? e.pipes.shift()(e) : Promise.resolve(e)
3166 }
3167 function de(e) {
3168 if (e.pipes.length < 1)
3169 throw b.write("[" + e.requestId + "] (" + (new Date).getTime() + ") Request pipeline contains no methods!", 3),
3170 Error("Request pipeline contains no methods!");
3171 var t = pe(e).then(function(e) {
3172 return t = e,
3173 b.log({
3174 data: 0 === b.activeLogLevel ? t.result : {},
3175 level: 1,
3176 message: "[" + t.requestId + "] (" + (new Date).getTime() + ") Returning result from pipeline. Set logging to verbose to see data."
3177 }),
3178 Promise.resolve(t.result);
3179 var t
3180 }).catch(function(e) {
3181 throw b.error(e),
3182 e
3183 });
3184 return e.isBatched && e.batch.addResolveBatchDependency(t),
3185 t
3186 }
3187 function he(o) {
3188 return void 0 === o && (o = !1),
3189 function(n, r, e) {
3190 var i = e.value;
3191 e.value = function() {
3192 for (var e = [], t = 0; t < arguments.length; t++)
3193 e[t] = arguments[t];
3194 return !o && 0 < e.length && Object(y.p)(e[0], "hasResult") && e[0].hasResult ? (b.write("[" + e[0].requestId + "] (" + (new Date).getTime() + ") Skipping request pipeline method " + r + ", existing result in pipeline.", 0),
3195 Promise.resolve(e[0])) : (b.write("[" + e[0].requestId + "] (" + (new Date).getTime() + ") Calling request pipeline method " + r + ".", 0),
3196 i.apply(n, e).then(function(e) {
3197 return pe(e)
3198 }))
3199 }
3200 }
3201 }
3202 var fe = (be.logStart = function(t) {
3203 return new Promise(function(e) {
3204 b.log({
3205 data: 1 === b.activeLogLevel ? {} : t,
3206 level: 1,
3207 message: "[" + t.requestId + "] (" + (new Date).getTime() + ") Beginning " + t.method + " request (" + t.url + ")"
3208 }),
3209 e(t)
3210 }
3211 )
3212 }
3213 ,
3214 be.caching = function(r) {
3215 return new Promise(function(t) {
3216 if (r.useCaching) {
3217 b.write("[" + r.requestId + "] (" + (new Date).getTime() + ") Caching is enabled for request, checking cache...", 1);
3218 var e = new O(r.url.toLowerCase());
3219 if (void 0 !== r.cachingOptions && (e = Object(y.h)(e, r.cachingOptions)),
3220 null !== e.store) {
3221 var n = e.store.get(e.key);
3222 if (null !== n)
3223 return b.log({
3224 data: 1 === b.activeLogLevel ? {} : n,
3225 level: 1,
3226 message: "[" + r.requestId + "] (" + (new Date).getTime() + ") Value returned from cache."
3227 }),
3228 Object(y.r)(r.batchDependency) && r.batchDependency(),
3229 Object(y.p)(r.parser, "hydrate") && (n = r.parser.hydrate(n)),
3230 le(r, n).then(function(e) {
3231 return t(e)
3232 })
3233 }
3234 b.write("[" + r.requestId + "] (" + (new Date).getTime() + ") Value not found in cache.", 1),
3235 r.parser = new v(r.parser,e)
3236 }
3237 return t(r)
3238 }
3239 )
3240 }
3241 ,
3242 be.send = function(o) {
3243 return new Promise(function(t, n) {
3244 if (o.isBatched) {
3245 var e = o.batch.add(o);
3246 Object(y.r)(o.batchDependency) && o.batchDependency(),
3247 b.write("[" + o.requestId + "] (" + (new Date).getTime() + ") Batching request in batch " + o.batch.batchId + ".", 1),
3248 t(le(o, e))
3249 } else {
3250 b.write("[" + o.requestId + "] (" + (new Date).getTime() + ") Sending request.", 1);
3251 var r = o.clientFactory()
3252 , i = Object(y.h)(o.options || {}, {
3253 method: o.method
3254 });
3255 r.fetch(o.url, i).then(function(e) {
3256 return o.parser.parse(e)
3257 }).then(function(e) {
3258 return le(o, e)
3259 }).then(function(e) {
3260 return t(e)
3261 }).catch(function(e) {
3262 return n(e)
3263 })
3264 }
3265 }
3266 )
3267 }
3268 ,
3269 be.logEnd = function(t) {
3270 return new Promise(function(e) {
3271 t.isBatched ? b.log({
3272 data: 1 === b.activeLogLevel ? {} : t,
3273 level: 1,
3274 message: "[" + t.requestId + "] (" + (new Date).getTime() + ") " + t.method + " request will complete in batch " + t.batch.batchId + "."
3275 }) : b.log({
3276 data: 1 === b.activeLogLevel ? {} : t,
3277 level: 1,
3278 message: "[" + t.requestId + "] (" + (new Date).getTime() + ") Completing " + t.method + " request."
3279 }),
3280 e(t)
3281 }
3282 )
3283 }
3284 ,
3285 Object(g.b)([he(!0)], be, "logStart", null),
3286 Object(g.b)([he()], be, "caching", null),
3287 Object(g.b)([he()], be, "send", null),
3288 Object(g.b)([he(!0)], be, "logEnd", null),
3289 be);
3290 function be() {}
3291 function ye() {
3292 return [fe.logStart, fe.caching, fe.send, fe.logEnd].slice(0)
3293 }
3294 function ge(r) {
3295 return function(n) {
3296 return function(t) {
3297 return function(e) {
3298 return de(Object.assign({}, {
3299 batch: null,
3300 batchDependency: null,
3301 batchIndex: -1,
3302 cachingOptions: null,
3303 clientFactory: n,
3304 cloneParentCacheOptions: null,
3305 cloneParentWasCaching: !1,
3306 hasResult: !1,
3307 isBatched: Object(y.x)(e.batch),
3308 method: t,
3309 options: null,
3310 parentUrl: "",
3311 parser: new Q,
3312 pipes: r.slice(0),
3313 query: new Map,
3314 requestId: Object(y.m)(),
3315 url: "",
3316 useCaching: /^get$/i.test(e.method) && e.useCaching
3317 }, ae(e)))
3318 }
3319 }
3320 }
3321 }
3322 var Oe = ge(ye());
3323 function ve(e, t) {
3324 return Object.assign({
3325 body: Object(y.t)(e)
3326 }, t)
3327 }
3328 function me(e, t) {
3329 return Object.assign({
3330 headers: e
3331 }, t)
3332 }
3333 function Se(e) {
3334 return {
3335 __metadata: {
3336 type: e
3337 }
3338 }
3339 }
3340 var je = n(3);
3341 function Te(e) {
3342 if (Object(y.A)(e))
3343 return "";
3344 var t = e.indexOf("_api/");
3345 return t < 0 && (t = e.indexOf("_vti_bin/")),
3346 -1 < t ? e.substr(0, t) : e
3347 }
3348 function we(i) {
3349 return function(e, t, n) {
3350 void 0 === n && (n = Object.getOwnPropertyDescriptor(e, t));
3351 var r = n.value;
3352 return n.value = function() {
3353 for (var t = [], e = 0; e < arguments.length; e++)
3354 t[e] = arguments[e];
3355 return Object(g.a)(this, void 0, void 0, function() {
3356 return Object(g.d)(this, function(e) {
3357 return this.configure(me({
3358 "X-PnPjs-Tracking": i
3359 })),
3360 [2, r.apply(this, t)]
3361 })
3362 })
3363 }
3364 ,
3365 n
3366 }
3367 }
3368 we.getClientTag = function(e, t) {
3369 if (void 0 === t && (t = !0),
3370 e.has("X-PnPjs-Tracking")) {
3371 var n = e.get("X-PnPjs-Tracking");
3372 if (t && e.delete("X-PnPjs-Tracking"),
3373 !Object(y.A)(n))
3374 return n
3375 }
3376 return ""
3377 }
3378 ,
3379 we.configure = function(e, t) {
3380 return e.configure(me({
3381 "X-PnPjs-Tracking": t
3382 }))
3383 }
3384 ,
3385 we.isTagged = function(e) {
3386 return e.data.options.headers && e.data.options.headers["X-PnPjs-Tracking"]
3387 }
3388 ;
3389 var Ie = (_e.prototype.fetch = function(s, a) {
3390 return void 0 === a && (a = {}),
3391 Object(g.a)(this, void 0, void 0, function() {
3392 var t, n, r, i, o;
3393 return Object(g.d)(this, function(e) {
3394 switch (e.label) {
3395 case 0:
3396 return t = Object(y.h)(a, {
3397 cache: "no-cache",
3398 credentials: "same-origin"
3399 }, !0),
3400 n = new Headers,
3401 Object(y.u)(n, je.a.headers),
3402 Object(y.u)(n, a.headers),
3403 n.has("Accept") || n.append("Accept", "application/json"),
3404 n.has("Content-Type") || n.append("Content-Type", "application/json;odata=verbose;charset=utf-8"),
3405 n.has("X-ClientService-ClientTag") || (r = we.getClientTag(n),
3406 32 < (i = "PnPCoreJS:$$Version$$:" + r).length && (i = i.substr(0, 32)),
3407 n.append("X-ClientService-ClientTag", i)),
3408 n.has("User-Agent") || n.append("User-Agent", "NONISV|SharePointPnP|PnPjs/$$Version$$"),
3409 !(t = Object(y.h)(t, {
3410 headers: n
3411 })).method || "GET" === t.method.toUpperCase() || n.has("X-RequestDigest") || n.has("Authorization") ? [3, 2] : [4, this._digestCache(Te(s))];
3412 case 1:
3413 o = e.sent(),
3414 n.append("X-RequestDigest", o),
3415 e.label = 2;
3416 case 2:
3417 return [2, this.fetchRaw(s, t)]
3418 }
3419 })
3420 })
3421 }
3422 ,
3423 _e.prototype.fetchRaw = function(e, r) {
3424 var i = this;
3425 void 0 === r && (r = {});
3426 var t = new Headers;
3427 Object(y.u)(t, r.headers),
3428 r = Object(y.h)(r, {
3429 headers: t
3430 });
3431 var o = function(n) {
3432 function t(e) {
3433 var t;
3434 e.headers.has("Retry-After") ? t = parseInt(e.headers.get("Retry-After"), 10) : (t = n.delay,
3435 n.delay *= 2),
3436 n.attempts++,
3437 n.retryCount <= n.attempts ? n.reject(Error("Retry count exceeded (" + n.retryCount + ") for request. Response status: [" + e.status + "] " + e.statusText)) : setTimeout(Object(y.l)(i, o, n), t)
3438 }
3439 i._impl.fetch(e, r).then(function(e) {
3440 429 === e.status ? t(e) : n.resolve(e)
3441 }).catch(function(e) {
3442 503 === e.status || 504 === e.status ? t(e) : n.reject(e)
3443 })
3444 };
3445 return new Promise(function(e, t) {
3446 o.call(i, {
3447 attempts: 0,
3448 delay: 100,
3449 reject: t,
3450 resolve: e,
3451 retryCount: 7
3452 })
3453 }
3454 )
3455 }
3456 ,
3457 _e.prototype.get = function(e, t) {
3458 void 0 === t && (t = {});
3459 var n = Object(y.h)(t, {
3460 method: "GET"
3461 });
3462 return this.fetch(e, n)
3463 }
3464 ,
3465 _e.prototype.post = function(e, t) {
3466 void 0 === t && (t = {});
3467 var n = Object(y.h)(t, {
3468 method: "POST"
3469 });
3470 return this.fetch(e, n)
3471 }
3472 ,
3473 _e.prototype.patch = function(e, t) {
3474 void 0 === t && (t = {});
3475 var n = Object(y.h)(t, {
3476 method: "PATCH"
3477 });
3478 return this.fetch(e, n)
3479 }
3480 ,
3481 _e.prototype.delete = function(e, t) {
3482 void 0 === t && (t = {});
3483 var n = Object(y.h)(t, {
3484 method: "DELETE"
3485 });
3486 return this.fetch(e, n)
3487 }
3488 ,
3489 _e)
3490 , Pe = new Map;
3491 function _e(e) {
3492 void 0 === e && (e = je.a.fetchClientFactory()),
3493 this._impl = e,
3494 this._digestCache = function(c) {
3495 var e = this;
3496 return function(a) {
3497 return Object(g.a)(e, void 0, void 0, function() {
3498 var t, n, r, i, o, s;
3499 return Object(g.d)(this, function(e) {
3500 switch (e.label) {
3501 case 0:
3502 return void 0 !== (t = Pe.get(a)) && new Date < t.expiration ? [2, t.value] : (n = Object(y.i)(a, "/_api/contextinfo"),
3503 r = {
3504 Accept: "application/json;odata=verbose",
3505 "Content-Type": "application/json;odata=verbose;charset=utf-8"
3506 },
3507 [4, c.fetchRaw(n, {
3508 cache: "no-cache",
3509 credentials: "same-origin",
3510 headers: Object(y.h)(r, je.a.headers, !0),
3511 method: "POST"
3512 })]);
3513 case 1:
3514 return i = e.sent(),
3515 [4, (new Q).parse(i).then(function(e) {
3516 return e.GetContextWebInformation
3517 })];
3518 case 2:
3519 return o = e.sent(),
3520 s = {
3521 expiration: Object(y.j)(new Date, "second", o.FormDigestTimeoutSeconds),
3522 value: o.FormDigestValue
3523 },
3524 Pe.set(a, s),
3525 [2, s.value]
3526 }
3527 })
3528 })
3529 }
3530 }(this)
3531 }
3532 function Ce(e) {
3533 var s = Ue(e);
3534 return function(i, o) {
3535 return Object(g.a)(this, void 0, void 0, function() {
3536 var t, n, r;
3537 return Object(g.d)(this, function(e) {
3538 switch (e.label) {
3539 case 0:
3540 return t = ae(i.data),
3541 n = Object(y.x)(t.batch) ? t.batch.addDependency() : function() {}
3542 ,
3543 [4, Object(Ae.a)(i.toUrlAndQuery())];
3544 case 1:
3545 return r = e.sent(),
3546 Object(y.w)(t.options, o),
3547 [2, s(Object.assign({}, t, {
3548 batchDependency: n,
3549 url: r
3550 }))]
3551 }
3552 })
3553 })
3554 }
3555 }
3556 var Ee, Re, Ne, Ae = n(4), Ue = Oe(function() {
3557 return new Ie
3558 }), xe = function(e, t) {
3559 return e.data.cloneParentWasCaching && e.usingCaching(e.data.cloneParentCacheOptions),
3560 e._forceCaching && (e.data.useCaching = !0),
3561 Ce("GET")(e, t)
3562 }, De = Ce("POST"), ke = Ce("DELETE"), Le = Ce("PATCH"), Fe = function(e, t) {
3563 var n = Object.assign(me({
3564 "X-HTTP-Method": "DELETE"
3565 }), t);
3566 return De(e, n)
3567 }, Be = function(e, t, n) {
3568 void 0 === n && (n = "*");
3569 var r = Object.assign(me({
3570 "X-HTTP-Method": "DELETE",
3571 "IF-Match": n
3572 }), t);
3573 return De(e, r)
3574 }, Me = function(e) {
3575 return K(e)
3576 }, qe = (Ne = ce,
3577 Object(g.c)(Xe, Ne),
3578 Xe.prototype.toUrlAndQuery = function() {
3579 var r = new Map(this.query)
3580 , e = this.toUrl().replace(/'!(@.*?)::(.*?)'/gi, function(e, t, n) {
3581 return b.write("Rewriting aliased parameter from match " + e + " to label: " + t + " value: " + n, 0),
3582 r.set(t, "'" + n + "'"),
3583 t
3584 });
3585 if (0 < r.size) {
3586 var t = -1 < e.indexOf("?") ? "&" : "?";
3587 e += t + Array.from(r).map(function(e) {
3588 return e[0] + "=" + e[1]
3589 }).join("&")
3590 }
3591 return e
3592 }
3593 ,
3594 Xe.prototype.select = function() {
3595 for (var e = [], t = 0; t < arguments.length; t++)
3596 e[t] = arguments[t];
3597 return 0 < e.length && this.query.set("$select", e.join(",")),
3598 this
3599 }
3600 ,
3601 Xe.prototype.get = function(e) {
3602 return xe(this, e)
3603 }
3604 ,
3605 Xe.prototype.expand = function() {
3606 for (var e = [], t = 0; t < arguments.length; t++)
3607 e[t] = arguments[t];
3608 return 0 < e.length && this.query.set("$expand", e.join(",")),
3609 this
3610 }
3611 ,
3612 Xe.prototype.clone = function(e, t, n) {
3613 void 0 === n && (n = !0);
3614 var r = Ne.prototype.cloneTo.call(this, e(this, t), {
3615 includeBatch: n
3616 })
3617 , i = "@target";
3618 return this.query.has(i) && r.query.set(i, this.query.get(i)),
3619 r
3620 }
3621 ,
3622 Xe.prototype.defaultAction = function(e) {
3623 return xe(this, e)
3624 }
3625 ,
3626 Xe.prototype.getParent = function(e, t, n, r) {
3627 void 0 === t && (t = this.parentUrl);
3628 var i = e(t, n).configureFrom(this)
3629 , o = "@target";
3630 return this.query.has(o) && i.query.set(o, this.query.get(o)),
3631 void 0 !== r && (i = i.inBatch(r)),
3632 i
3633 }
3634 ,
3635 Xe), Ge = Me(qe), We = (Re = qe,
3636 Object(g.c)(ze, Re),
3637 ze.prototype.filter = function(e) {
3638 return this.query.set("$filter", e),
3639 this
3640 }
3641 ,
3642 ze.prototype.orderBy = function(e, t) {
3643 void 0 === t && (t = !0);
3644 var n = "$orderby"
3645 , r = this.query.has(n) ? this.query.get(n).split(",") : [];
3646 return r.push(e + " " + (t ? "asc" : "desc")),
3647 this.query.set(n, r.join(",")),
3648 this
3649 }
3650 ,
3651 ze.prototype.skip = function(e) {
3652 return this.query.set("$skip", e.toString()),
3653 this
3654 }
3655 ,
3656 ze.prototype.top = function(e) {
3657 return this.query.set("$top", e.toString()),
3658 this
3659 }
3660 ,
3661 ze), He = Me(We), Ve = (Ee = qe,
3662 Object(g.c)(Qe, Ee),
3663 Qe.prototype._update = function(e, n) {
3664 var r = this;
3665 return function(t) {
3666 return De(we.configure(r, e + ".Update"), {
3667 body: Object(y.t)(Object(y.h)(Se(e), t)),
3668 headers: {
3669 "X-HTTP-Method": "MERGE"
3670 }
3671 }).then(function(e) {
3672 return n(e, t)
3673 })
3674 }
3675 }
3676 ,
3677 Qe), Ke = Me(Ve);
3678 function Qe() {
3679 return null !== Ee && Ee.apply(this, arguments) || this
3680 }
3681 function ze() {
3682 return null !== Re && Re.apply(this, arguments) || this
3683 }
3684 function Xe(e, t) {
3685 var n = this
3686 , r = ""
3687 , i = ""
3688 , o = new Map;
3689 if ("string" == typeof e)
3690 if (Object(y.s)(e) || e.lastIndexOf("/") < 0)
3691 i = e,
3692 r = Object(y.i)(e, t);
3693 else if (e.lastIndexOf("/") > e.lastIndexOf("(")) {
3694 var s = e.lastIndexOf("/");
3695 i = e.slice(0, s),
3696 t = Object(y.i)(e.slice(s), t),
3697 r = Object(y.i)(i, t)
3698 } else
3699 s = e.lastIndexOf("("),
3700 i = e.slice(0, s),
3701 r = Object(y.i)(e, t);
3702 else {
3703 i = e.toUrl(),
3704 r = Object(y.i)(i, t || "");
3705 var a = e.query.get("@target");
3706 void 0 !== a && o.set("@target", a)
3707 }
3708 return n = Ne.call(this, {
3709 parentUrl: i,
3710 query: o,
3711 url: r
3712 }) || this,
3713 "string" != typeof e && n.configureFrom(e),
3714 n._forceCaching = !1,
3715 n
3716 }
3717 function Je(e) {
3718 return function() {
3719 return Fe(we.configure(this, e + ".delete"))
3720 }
3721 }
3722 function $e(t) {
3723 return function(e) {
3724 return void 0 === e && (e = "*"),
3725 Be(we.configure(this, t + ".delete"), {}, e)
3726 }
3727 }
3728 function Ye(r) {
3729 return function(e) {
3730 return n = e,
3731 Object(g.c)(t, n),
3732 t;
3733 function t() {
3734 for (var e = [], t = 0; t < arguments.length; t++)
3735 e[t] = arguments[t];
3736 return n.call(this, e[0], 1 < e.length && void 0 !== e[1] ? e[1] : r) || this
3737 }
3738 var n
3739 }
3740 }
3741 function Ze(e) {
3742 var t = []
3743 , n = ["odata.type", "odata.editLink", "__metadata", "odata.metadata", "odata.id"];
3744 if (Object(y.p)(e, n[0]) && "SP.Web" === e[n[0]])
3745 Object(y.p)(e, n[4]) ? t.push(e[n[4]]) : Object(y.p)(e, n[2]) && t.push(e.__metadata.uri);
3746 else if (Object(y.p)(e, n[3]) && Object(y.p)(e, n[1])) {
3747 var r = Object(y.s)(e[n[1]]) ? e[n[1]].split("_api")[1] : e[n[1]];
3748 t.push(Te(e[n[3]]), "_api", r)
3749 } else
3750 Object(y.p)(e, n[1]) ? t.push("_api", e[n[1]]) : Object(y.p)(e, n[2]) && t.push(e.__metadata.uri);
3751 return t.length < 1 ? (b.write("No uri information found in ODataEntity parsing, chaining will fail for this object.", 2),
3752 "") : y.i.apply(void 0, Object(g.e)(t))
3753 }
3754 var et, tt, nt = (tt = Q,
3755 Object(g.c)(ot, tt),
3756 ot.prototype.parse = function(e) {
3757 var n = this;
3758 return tt.prototype.parse.call(this, e).then(function(e) {
3759 var t = n.factory(Ze(e), null);
3760 return Object(y.h)(t, e)
3761 })
3762 }
3763 ,
3764 ot), rt = (et = Q,
3765 Object(g.c)(it, et),
3766 it.prototype.parse = function(e) {
3767 var n = this;
3768 return et.prototype.parse.call(this, e).then(function(e) {
3769 return e.map(function(e) {
3770 var t = n.factory(Ze(e), null);
3771 return Object(y.h)(t, e)
3772 })
3773 })
3774 }
3775 ,
3776 it);
3777 function it(e) {
3778 var n = et.call(this) || this;
3779 return n.factory = e,
3780 n.hydrate = function(e) {
3781 return e.map(function(e) {
3782 var t = n.factory(Ze(e), null);
3783 return Object(y.h)(t, e)
3784 })
3785 }
3786 ,
3787 n
3788 }
3789 function ot(e) {
3790 var n = tt.call(this) || this;
3791 return n.factory = e,
3792 n.hydrate = function(e) {
3793 var t = n.factory(Ze(e), null);
3794 return Object(y.h)(t, e)
3795 }
3796 ,
3797 n
3798 }
3799 function st(e) {
3800 return new nt(e)
3801 }
3802 function at(e) {
3803 return new rt(e)
3804 }
3805 var ct, ut = (ct = f,
3806 Object(g.c)(dt, ct),
3807 dt.ParseResponse = function(e) {
3808 for (var t, n, r = [], i = new RegExp("^HTTP/[0-9.]+ +([0-9]+) +(.*)","i"), o = e.split("\n"), s = "batch", a = 0; a < o.length; ++a) {
3809 var c = o[a];
3810 switch (s) {
3811 case "batch":
3812 if ("--batchresponse_" === c.substr(0, "--batchresponse_".length))
3813 s = "batchHeaders";
3814 else if ("" !== c.trim())
3815 throw Error("Invalid response, line " + a);
3816 break;
3817 case "batchHeaders":
3818 "" === c.trim() && (s = "status");
3819 break;
3820 case "status":
3821 var u = i.exec(c);
3822 if (3 !== u.length)
3823 throw Error("Invalid status, line " + a);
3824 t = parseInt(u[1], 10),
3825 n = u[2],
3826 s = "statusHeaders";
3827 break;
3828 case "statusHeaders":
3829 "" === c.trim() && (s = "body");
3830 break;
3831 case "body":
3832 r.push(204 === t ? new Response : new Response(c,{
3833 status: t,
3834 statusText: n
3835 })),
3836 s = "batch"
3837 }
3838 }
3839 if ("status" !== s)
3840 throw Error("Unexpected end of input");
3841 return r
3842 }
3843 ,
3844 dt.prototype.executeImpl = function() {
3845 return Object(g.a)(this, void 0, void 0, function() {
3846 var t, n, r, i, o, s, a, c, u, l, p, d, h, f = this;
3847 return Object(g.d)(this, function(e) {
3848 switch (e.label) {
3849 case 0:
3850 return b.write("[" + this.batchId + "] (" + (new Date).getTime() + ") Executing batch with " + this.requests.length + " requests.", 1),
3851 this.requests.length < 1 ? (b.write("Resolving empty batch.", 1),
3852 [2]) : (t = new Ie,
3853 [4, Object(Ae.a)(this.baseUrl)]);
3854 case 1:
3855 for (n = e.sent(),
3856 r = [],
3857 i = "",
3858 o = 0; o < this.requests.length; o++)
3859 "GET" === (s = this.requests[o]).method ? (0 < i.length && (r.push("--changeset_" + i + "--\n\n"),
3860 i = ""),
3861 r.push("--batch_" + this.batchId + "\n")) : (i.length < 1 && (i = Object(y.m)(),
3862 r.push("--batch_" + this.batchId + "\n"),
3863 r.push('Content-Type: multipart/mixed; boundary="changeset_' + i + '"\n\n')),
3864 r.push("--changeset_" + i + "\n")),
3865 r.push("Content-Type: application/http\n"),
3866 r.push("Content-Transfer-Encoding: binary\n\n"),
3867 a = new Headers,
3868 c = Object(y.s)(s.url) ? s.url : Object(y.i)(n, s.url),
3869 b.write("[" + this.batchId + "] (" + (new Date).getTime() + ") Adding request " + s.method + " " + c + " to batch.", 0),
3870 "GET" !== s.method ? (u = s.method,
3871 l = s.options.headers,
3872 Object(y.p)(s, "options") && Object(y.p)(s.options, "headers") && void 0 !== l["X-HTTP-Method"] && (u = l["X-HTTP-Method"],
3873 delete l["X-HTTP-Method"]),
3874 r.push(u + " " + c + " HTTP/1.1\n"),
3875 a.set("Content-Type", "application/json;odata=verbose;charset=utf-8")) : r.push(s.method + " " + c + " HTTP/1.1\n"),
3876 Object(y.u)(a, je.a.headers),
3877 s.options && Object(y.u)(a, s.options.headers),
3878 a.has("Accept") || a.append("Accept", "application/json"),
3879 a.has("Content-Type") || a.append("Content-Type", "application/json;odata=verbose;charset=utf-8"),
3880 a.has("X-ClientService-ClientTag") || a.append("X-ClientService-ClientTag", "PnPCoreJS:@pnp-$$Version$$:batch"),
3881 a.forEach(function(e, t) {
3882 r.push(t + ": " + e + "\n")
3883 }),
3884 r.push("\n"),
3885 s.options.body && r.push(s.options.body + "\n\n");
3886 return 0 < i.length && (r.push("--changeset_" + i + "--\n\n"),
3887 i = ""),
3888 r.push("--batch_" + this.batchId + "--\n"),
3889 p = {
3890 body: r.join(""),
3891 headers: {
3892 "Content-Type": "multipart/mixed; boundary=batch_" + this.batchId
3893 },
3894 method: "POST"
3895 },
3896 b.write("[" + this.batchId + "] (" + (new Date).getTime() + ") Sending batch request.", 1),
3897 [4, t.fetch(Object(y.i)(n, "/_api/$batch"), p)];
3898 case 2:
3899 return [4, e.sent().text()];
3900 case 3:
3901 if (d = e.sent(),
3902 (h = dt.ParseResponse(d)).length !== this.requests.length)
3903 throw Error("Could not properly parse responses to match requests in batch.");
3904 return b.write("[" + this.batchId + "] (" + (new Date).getTime() + ") Resolving batched requests.", 1),
3905 [2, h.reduce(function(e, o, s) {
3906 return e.then(function(e) {
3907 return Object(g.a)(f, void 0, void 0, function() {
3908 var t, n, r, i;
3909 return Object(g.d)(this, function(e) {
3910 switch (e.label) {
3911 case 0:
3912 t = this.requests[s],
3913 b.write("[" + t.id + "] (" + (new Date).getTime() + ") Resolving request in batch " + this.batchId + ".", 1),
3914 e.label = 1;
3915 case 1:
3916 return e.trys.push([1, 3, , 4]),
3917 r = (n = t).resolve,
3918 [4, t.parser.parse(o)];
3919 case 2:
3920 return r.apply(n, [e.sent()]),
3921 [3, 4];
3922 case 3:
3923 return i = e.sent(),
3924 t.reject(i),
3925 [3, 4];
3926 case 4:
3927 return [2]
3928 }
3929 })
3930 })
3931 })
3932 }, Promise.resolve(void 0))]
3933 }
3934 })
3935 })
3936 }
3937 ,
3938 dt), lt = (pt.prototype.configure = function(e, t) {
3939 return void 0 === t && (t = ""),
3940 new pt(e,t)
3941 }
3942 ,
3943 pt.prototype.setup = function(e) {
3944 e.pageContext ? Object(je.b)({
3945 spfxContext: e
3946 }) : Object(je.b)(e)
3947 }
3948 ,
3949 pt);
3950 function pt(e, t) {
3951 void 0 === e && (e = {}),
3952 void 0 === t && (t = ""),
3953 this._options = e,
3954 this._baseUrl = t
3955 }
3956 function dt(e) {
3957 var t = ct.call(this) || this;
3958 return t.baseUrl = e,
3959 t
3960 }
3961 function ht(e) {
3962 return Object(y.A)(e) ? "" : /!(@.*?)::(.*?)/gi.test(e) ? e.replace(/!(@.*?)::(.*)$/gi, function(e, t, n) {
3963 return b.write("Rewriting aliased parameter from match " + e + " to label: " + t + " value: " + n, 0),
3964 "!" + t + "::" + encodeURIComponent(n.replace(/\'/gi, "''"))
3965 }) : encodeURIComponent(e.replace(/\'/gi, "''"))
3966 }
3967 new lt;
3968 var ft, bt = (ft = Ve,
3969 Object(g.c)(gt, ft),
3970 Object.defineProperty(gt.prototype, "rootWeb", {
3971 get: function() {
3972 return we.configure(Tt(this, "rootweb"), "si.rootWeb")
3973 },
3974 enumerable: !0,
3975 configurable: !0
3976 }),
3977 gt.prototype.getRootWeb = function() {
3978 return Object(g.a)(this, void 0, void 0, function() {
3979 var t;
3980 return Object(g.d)(this, function(e) {
3981 switch (e.label) {
3982 case 0:
3983 return [4, this.rootWeb.select("Url")()];
3984 case 1:
3985 return t = e.sent(),
3986 [2, we.configure(Tt(t.Url), "si.getRootWeb")]
3987 }
3988 })
3989 })
3990 }
3991 ,
3992 gt.prototype.getContextInfo = function() {
3993 return Object(g.a)(this, void 0, void 0, function() {
3994 var t, n, r;
3995 return Object(g.d)(this, function(e) {
3996 switch (e.label) {
3997 case 0:
3998 return t = we.configure(yt(this.parentUrl, "_api/contextinfo"), "si.getContextInfo"),
3999 [4, De(t)];
4000 case 1:
4001 return n = e.sent(),
4002 Object(y.p)(n, "GetContextWebInformation") ? ((r = n.GetContextWebInformation).SupportedSchemaVersions = r.SupportedSchemaVersions.results,
4003 [2, r]) : [2, n]
4004 }
4005 })
4006 })
4007 }
4008 ,
4009 gt.prototype.createBatch = function() {
4010 return new ut(this.parentUrl)
4011 }
4012 ,
4013 gt.prototype.delete = function() {
4014 return Object(g.a)(this, void 0, void 0, function() {
4015 var t, n;
4016 return Object(g.d)(this, function(e) {
4017 switch (e.label) {
4018 case 0:
4019 return [4, this.clone(yt, "").select("Id")()];
4020 case 1:
4021 return t = e.sent(),
4022 n = we.configure(yt(this.parentUrl, "_api/SPSiteManager/Delete"), "si.delete"),
4023 [4, De(n, ve({
4024 siteId: t.Id
4025 }))];
4026 case 2:
4027 return e.sent(),
4028 [2]
4029 }
4030 })
4031 })
4032 }
4033 ,
4034 gt.prototype.getDocumentLibraries = function(r) {
4035 return Object(g.a)(this, void 0, void 0, function() {
4036 var t, n;
4037 return Object(g.d)(this, function(e) {
4038 switch (e.label) {
4039 case 0:
4040 return (t = we.configure(Ge("", "_api/sp.web.getdocumentlibraries(@v)"), "si.getDocumentLibraries")).query.set("@v", "'" + ht(r) + "'"),
4041 [4, t()];
4042 case 1:
4043 return n = e.sent(),
4044 [2, Object(y.p)(n, "GetDocumentLibraries") ? n.GetDocumentLibraries : n]
4045 }
4046 })
4047 })
4048 }
4049 ,
4050 gt.prototype.getWebUrlFromPageUrl = function(r) {
4051 return Object(g.a)(this, void 0, void 0, function() {
4052 var t, n;
4053 return Object(g.d)(this, function(e) {
4054 switch (e.label) {
4055 case 0:
4056 return (t = we.configure(Ge("", "_api/sp.web.getweburlfrompageurl(@v)"), "si.getWebUrlFromPageUrl")).query.set("@v", "'" + ht(r) + "'"),
4057 [4, t()];
4058 case 1:
4059 return n = e.sent(),
4060 [2, Object(y.p)(n, "GetWebUrlFromPageUrl") ? n.GetWebUrlFromPageUrl : n]
4061 }
4062 })
4063 })
4064 }
4065 ,
4066 gt.prototype.getChanges = function(e) {
4067 var t = ve({
4068 query: Object(y.h)(Se("SP.ChangeQuery"), e)
4069 });
4070 return De(this.clone(Tt, "getchanges"), t)
4071 }
4072 ,
4073 gt.prototype.openWebById = function(n) {
4074 return Object(g.a)(this, void 0, void 0, function() {
4075 var t;
4076 return Object(g.d)(this, function(e) {
4077 switch (e.label) {
4078 case 0:
4079 return [4, De(this.clone(yt, "openWebById('" + n + "')"))];
4080 case 1:
4081 return [2, {
4082 data: t = e.sent(),
4083 web: Tt(Te(Ze(t)))
4084 }]
4085 }
4086 })
4087 })
4088 }
4089 ,
4090 gt.prototype.createCommunicationSite = function(s, a, c, u, l, p, d, h, f) {
4091 return void 0 === a && (a = 1033),
4092 void 0 === c && (c = !1),
4093 void 0 === l && (l = ""),
4094 void 0 === p && (p = ""),
4095 void 0 === d && (d = "00000000-0000-0000-0000-000000000000"),
4096 void 0 === h && (h = "00000000-0000-0000-0000-000000000000"),
4097 Object(g.a)(this, void 0, void 0, function() {
4098 var t, n, r, i, o;
4099 return Object(g.d)(this, function(e) {
4100 switch (e.label) {
4101 case 0:
4102 return t = {
4103 Classification: p,
4104 Description: l,
4105 HubSiteId: h,
4106 Lcid: a,
4107 Owner: f,
4108 ShareByEmailEnabled: c,
4109 SiteDesignId: d,
4110 Title: s,
4111 Url: u,
4112 WebTemplate: "SITEPAGEPUBLISHING#0",
4113 WebTemplateExtensionId: "00000000-0000-0000-0000-000000000000"
4114 },
4115 n = ve({
4116 request: Object(y.h)(Se("Microsoft.SharePoint.Portal.SPSiteCreationRequest"), t)
4117 }, me({
4118 Accept: "application/json;odata=verbose",
4119 "Content-Type": "application/json;odata=verbose;charset=utf-8"
4120 })),
4121 [4, this.getRootWeb()];
4122 case 1:
4123 return r = e.sent(),
4124 i = new Ie,
4125 o = r.parentUrl + "/_api/SPSiteManager/Create",
4126 [4, i.post(o, n)];
4127 case 2:
4128 return [4, e.sent().json()];
4129 case 3:
4130 return [2, e.sent()]
4131 }
4132 })
4133 })
4134 }
4135 ,
4136 gt.prototype.createModernTeamSite = function(o, s, a, c, u, l, p, d, h) {
4137 return void 0 === a && (a = !0),
4138 void 0 === c && (c = 1033),
4139 void 0 === u && (u = ""),
4140 void 0 === l && (l = ""),
4141 void 0 === d && (d = "00000000-0000-0000-0000-000000000000"),
4142 Object(g.a)(this, void 0, void 0, function() {
4143 var t, n, r, i;
4144 return Object(g.d)(this, function(e) {
4145 switch (e.label) {
4146 case 0:
4147 return t = {
4148 alias: s,
4149 displayName: o,
4150 isPublic: a,
4151 optionalParams: {
4152 Classification: l,
4153 CreationOptions: {
4154 results: ["SPSiteLanguage:" + c, "HubSiteId:" + d]
4155 },
4156 Description: u,
4157 Owners: {
4158 results: p || []
4159 }
4160 }
4161 },
4162 h && t.optionalParams.CreationOptions.results.push("implicit_formula_292aa8a00786498a87a5ca52d9f4214a_" + h),
4163 [4, this.getRootWeb()];
4164 case 1:
4165 return n = e.sent(),
4166 r = new Ie,
4167 i = n.parentUrl + "/_api/GroupSiteManager/CreateGroupEx",
4168 [4, r.post(i, {
4169 body: Object(y.t)(t),
4170 headers: {
4171 Accept: "application/json;odata=verbose",
4172 "Content-Type": "application/json;odata=verbose;charset=utf-8"
4173 }
4174 })];
4175 case 2:
4176 return [4, e.sent().json()];
4177 case 3:
4178 return [2, e.sent()]
4179 }
4180 })
4181 })
4182 }
4183 ,
4184 Object(g.b)([we("si.getChanges")], gt.prototype, "getChanges", null),
4185 Object(g.b)([we("si.openWebById")], gt.prototype, "openWebById", null),
4186 Object(g.b)([Ye("_api/site")], gt)), yt = Me(bt);
4187 function gt() {
4188 return null !== ft && ft.apply(this, arguments) || this
4189 }
4190 Reflect.defineProperty(lt.prototype, "site", {
4191 configurable: !0,
4192 enumerable: !0,
4193 get: function() {
4194 return yt(this._baseUrl).configure(this._options)
4195 }
4196 });
4197 var Ot, vt, mt = (vt = We,
4198 Object(g.c)(It, vt),
4199 It.prototype.add = function(r, i, o, s, a, c) {
4200 return void 0 === o && (o = ""),
4201 void 0 === s && (s = "STS"),
4202 void 0 === a && (a = 1033),
4203 void 0 === c && (c = !0),
4204 Object(g.a)(this, void 0, void 0, function() {
4205 var t, n;
4206 return Object(g.d)(this, function(e) {
4207 switch (e.label) {
4208 case 0:
4209 return t = ve({
4210 parameters: Object(y.h)(Se("SP.WebCreationInformation"), {
4211 Description: o,
4212 Language: a,
4213 Title: r,
4214 Url: i,
4215 UseSamePermissionsAsParentSite: c,
4216 WebTemplate: s
4217 })
4218 }),
4219 [4, De(this.clone(St, "add"), t)];
4220 case 1:
4221 return [2, {
4222 data: n = e.sent(),
4223 web: Tt(Ze(n).replace(/_api\/web\/?/i, ""))
4224 }]
4225 }
4226 })
4227 })
4228 }
4229 ,
4230 Object(g.b)([we("ws.add")], It.prototype, "add", null),
4231 Object(g.b)([Ye("webs")], It)), St = Me(mt), jt = (Ot = Ve,
4232 Object(g.c)(wt, Ot),
4233 Object.defineProperty(wt.prototype, "webs", {
4234 get: function() {
4235 return St(this)
4236 },
4237 enumerable: !0,
4238 configurable: !0
4239 }),
4240 wt.prototype.getParentWeb = function() {
4241 return Object(g.a)(this, void 0, void 0, function() {
4242 var t;
4243 return Object(g.d)(this, function(e) {
4244 switch (e.label) {
4245 case 0:
4246 return [4, xe(this.select("ParentWeb/Id").expand("ParentWeb"))];
4247 case 1:
4248 return [2, (t = e.sent().ParentWeb) ? yt(this.parentUrl).openWebById(t.Id) : null]
4249 }
4250 })
4251 })
4252 }
4253 ,
4254 wt.prototype.getSubwebsFilteredForCurrentUser = function(e, t) {
4255 void 0 === e && (e = -1),
4256 void 0 === t && (t = -1);
4257 var n = this.clone(St, "getSubwebsFilteredForCurrentUser(nWebTemplateFilter=" + e + ",nConfigurationFilter=" + t + ")");
4258 return we.configure(n, "w.getSubwebsFilteredForCurrentUser")
4259 }
4260 ,
4261 Object.defineProperty(wt.prototype, "allProperties", {
4262 get: function() {
4263 return we.configure(this.clone(Ke, "allproperties"), "w.allprops")
4264 },
4265 enumerable: !0,
4266 configurable: !0
4267 }),
4268 Object.defineProperty(wt.prototype, "webinfos", {
4269 get: function() {
4270 return we.configure(He(this, "webinfos"), "w.webinfos")
4271 },
4272 enumerable: !0,
4273 configurable: !0
4274 }),
4275 wt.prototype.createBatch = function() {
4276 return new ut(this.parentUrl)
4277 }
4278 ,
4279 wt.prototype.update = function(n) {
4280 return Object(g.a)(this, void 0, void 0, function() {
4281 var t;
4282 return Object(g.d)(this, function(e) {
4283 switch (e.label) {
4284 case 0:
4285 return t = ve(Object(y.h)(Se("SP.Web"), n), me({
4286 "X-HTTP-Method": "MERGE"
4287 })),
4288 [4, De(this, t)];
4289 case 1:
4290 return [2, {
4291 data: e.sent(),
4292 web: this
4293 }]
4294 }
4295 })
4296 })
4297 }
4298 ,
4299 wt.prototype.applyTheme = function(e, t, n, r) {
4300 var i = ve({
4301 backgroundImageUrl: n,
4302 colorPaletteUrl: e,
4303 fontSchemeUrl: t,
4304 shareGenerated: r
4305 });
4306 return De(this.clone(Tt, "applytheme"), i)
4307 }
4308 ,
4309 wt.prototype.applyWebTemplate = function(e) {
4310 var t = this.clone(Tt, "applywebtemplate");
4311 return t.concat("(webTemplate='" + ht(e) + "')"),
4312 De(t)
4313 }
4314 ,
4315 wt.prototype.availableWebTemplates = function(e, t) {
4316 return void 0 === e && (e = 1033),
4317 void 0 === t && (t = !0),
4318 we.configure(He(this, "getavailablewebtemplates(lcid=" + e + ", doincludecrosslanguage=" + t + ")"), "w.availableWebTemplates")
4319 }
4320 ,
4321 wt.prototype.getChanges = function(e) {
4322 var t = ve({
4323 query: Object(y.h)(Se("SP.ChangeQuery"), e)
4324 });
4325 return De(this.clone(Tt, "getchanges"), t)
4326 }
4327 ,
4328 wt.prototype.mapToIcon = function(e, t, n) {
4329 return void 0 === t && (t = 0),
4330 void 0 === n && (n = ""),
4331 xe(this.clone(Tt, "maptoicon(filename='" + ht(e) + "', progid='" + ht(n) + "', size=" + t + ")"))
4332 }
4333 ,
4334 wt.prototype.getStorageEntity = function(e) {
4335 return xe(this.clone(Tt, "getStorageEntity('" + ht(e) + "')"))
4336 }
4337 ,
4338 wt.prototype.setStorageEntity = function(e, t, n, r) {
4339 return void 0 === n && (n = ""),
4340 void 0 === r && (r = ""),
4341 De(this.clone(Tt, "setStorageEntity"), ve({
4342 comments: r,
4343 description: n,
4344 key: e,
4345 value: t
4346 }))
4347 }
4348 ,
4349 wt.prototype.removeStorageEntity = function(e) {
4350 return De(this.clone(Tt, "removeStorageEntity('" + ht(e) + "')"))
4351 }
4352 ,
4353 Object(g.b)([we("w.getParentWeb")], wt.prototype, "getParentWeb", null),
4354 Object(g.b)([we("w.update")], wt.prototype, "update", null),
4355 Object(g.b)([we("w.applyTheme")], wt.prototype, "applyTheme", null),
4356 Object(g.b)([we("w.applyWebTemplate")], wt.prototype, "applyWebTemplate", null),
4357 Object(g.b)([we("w.getChanges")], wt.prototype, "getChanges", null),
4358 Object(g.b)([we("w.mapToIcon")], wt.prototype, "mapToIcon", null),
4359 Object(g.b)([we("w.getStorageEntity")], wt.prototype, "getStorageEntity", null),
4360 Object(g.b)([we("w.setStorageEntity")], wt.prototype, "setStorageEntity", null),
4361 Object(g.b)([we("w.removeStorageEntity")], wt.prototype, "removeStorageEntity", null),
4362 Object(g.b)([Ye("_api/web")], wt)), Tt = Me(jt);
4363 function wt() {
4364 var e = null !== Ot && Ot.apply(this, arguments) || this;
4365 return e.delete = Je("w"),
4366 e
4367 }
4368 function It() {
4369 return null !== vt && vt.apply(this, arguments) || this
4370 }
4371 function Pt(e) {
4372 return {
4373 DecodedUrl: e,
4374 __metadata: {
4375 type: "SP.ResourcePath"
4376 }
4377 }
4378 }
4379 var _t, Ct, Et, Rt, Nt, At, Ut = (Rt = We,
4380 Object(g.c)(Ft, Rt),
4381 Ft.prototype.getById = function(e) {
4382 return we.configure(kt(this).concat("('" + e + "')"), "ls.getById")
4383 }
4384 ,
4385 Ft.prototype.getByTitle = function(e) {
4386 return we.configure(kt(this, "getByTitle('" + ht(e) + "')"), "ls.getByTitle")
4387 }
4388 ,
4389 Ft.prototype.add = function(n, r, i, o, s) {
4390 return void 0 === r && (r = ""),
4391 void 0 === i && (i = 100),
4392 void 0 === o && (o = !1),
4393 void 0 === s && (s = {}),
4394 Object(g.a)(this, void 0, void 0, function() {
4395 var t;
4396 return Object(g.d)(this, function(e) {
4397 switch (e.label) {
4398 case 0:
4399 return t = Object.assign({
4400 AllowContentTypes: o,
4401 BaseTemplate: i,
4402 ContentTypesEnabled: o,
4403 Description: r,
4404 Title: n
4405 }, Se("SP.List"), s),
4406 [4, De(this, ve(t))];
4407 case 1:
4408 return [2, {
4409 data: e.sent(),
4410 list: this.getByTitle(t.Title)
4411 }]
4412 }
4413 })
4414 })
4415 }
4416 ,
4417 Ft.prototype.ensure = function(r, i, o, s, a) {
4418 return void 0 === i && (i = ""),
4419 void 0 === o && (o = 100),
4420 void 0 === s && (s = !1),
4421 void 0 === a && (a = {}),
4422 Object(g.a)(this, void 0, void 0, function() {
4423 var t, n;
4424 return Object(g.d)(this, function(e) {
4425 switch (e.label) {
4426 case 0:
4427 if (this.hasBatch)
4428 throw Error("The ensure list method is not supported for use in a batch.");
4429 t = Object(y.h)(a, {
4430 Title: r,
4431 Description: i,
4432 ContentTypesEnabled: s
4433 }, !0),
4434 n = this.getByTitle(t.Title),
4435 e.label = 1;
4436 case 1:
4437 return e.trys.push([1, 4, , 6]),
4438 [4, n.select("Title")()];
4439 case 2:
4440 return e.sent(),
4441 [4, n.update(t).then(function(e) {
4442 return e.data
4443 })];
4444 case 3:
4445 return [2, {
4446 created: !1,
4447 data: e.sent(),
4448 list: this.getByTitle(t.Title)
4449 }];
4450 case 4:
4451 return e.sent(),
4452 [4, this.add(r, i, o, s, t).then(function(e) {
4453 return e.data
4454 })];
4455 case 5:
4456 return [2, {
4457 created: !0,
4458 data: e.sent(),
4459 list: this.getByTitle(t.Title)
4460 }];
4461 case 6:
4462 return [2]
4463 }
4464 })
4465 })
4466 }
4467 ,
4468 Ft.prototype.ensureSiteAssetsLibrary = function() {
4469 return Object(g.a)(this, void 0, void 0, function() {
4470 var t;
4471 return Object(g.d)(this, function(e) {
4472 switch (e.label) {
4473 case 0:
4474 return [4, De(this.clone(xt, "ensuresiteassetslibrary"))];
4475 case 1:
4476 return t = e.sent(),
4477 [2, kt(Ze(t))]
4478 }
4479 })
4480 })
4481 }
4482 ,
4483 Ft.prototype.ensureSitePagesLibrary = function() {
4484 return Object(g.a)(this, void 0, void 0, function() {
4485 var t;
4486 return Object(g.d)(this, function(e) {
4487 switch (e.label) {
4488 case 0:
4489 return [4, De(this.clone(xt, "ensuresitepageslibrary"))];
4490 case 1:
4491 return t = e.sent(),
4492 [2, kt(Ze(t))]
4493 }
4494 })
4495 })
4496 }
4497 ,
4498 Object(g.b)([we("ls.add")], Ft.prototype, "add", null),
4499 Object(g.b)([we("ls.ensure")], Ft.prototype, "ensure", null),
4500 Object(g.b)([we("ls.ensureSiteAssetsLibrary")], Ft.prototype, "ensureSiteAssetsLibrary", null),
4501 Object(g.b)([we("ls.ensureSitePagesLibrary")], Ft.prototype, "ensureSitePagesLibrary", null),
4502 Object(g.b)([Ye("lists")], Ft)), xt = Me(Ut), Dt = (Et = Ve,
4503 Object(g.c)(Lt, Et),
4504 Object.defineProperty(Lt.prototype, "effectiveBasePermissions", {
4505 get: function() {
4506 return we.configure(Ge(this, "EffectiveBasePermissions"), "l.effectiveBasePermissions")
4507 },
4508 enumerable: !0,
4509 configurable: !0
4510 }),
4511 Object.defineProperty(Lt.prototype, "eventReceivers", {
4512 get: function() {
4513 return we.configure(He(this, "EventReceivers"), "l.eventReceivers")
4514 },
4515 enumerable: !0,
4516 configurable: !0
4517 }),
4518 Object.defineProperty(Lt.prototype, "relatedFields", {
4519 get: function() {
4520 return we.configure(Ge(this, "getRelatedFields"), "l.relatedFields")
4521 },
4522 enumerable: !0,
4523 configurable: !0
4524 }),
4525 Object.defineProperty(Lt.prototype, "informationRightsManagementSettings", {
4526 get: function() {
4527 return we.configure(Ge(this, "InformationRightsManagementSettings"), "l.informationRightsManagementSettings")
4528 },
4529 enumerable: !0,
4530 configurable: !0
4531 }),
4532 Lt.prototype.update = function(i, o) {
4533 return void 0 === o && (o = "*"),
4534 Object(g.a)(this, void 0, void 0, function() {
4535 var t, n, r;
4536 return Object(g.d)(this, function(e) {
4537 switch (e.label) {
4538 case 0:
4539 return t = ve(Object(y.h)(Se("SP.List"), i), me({
4540 "IF-Match": o,
4541 "X-HTTP-Method": "MERGE"
4542 })),
4543 [4, De(this, t)];
4544 case 1:
4545 return n = e.sent(),
4546 r = this,
4547 Object(y.p)(i, "Title") && (r = this.getParent(kt, this.parentUrl, "getByTitle('" + i.Title + "')")),
4548 [2, {
4549 data: n,
4550 list: r
4551 }]
4552 }
4553 })
4554 })
4555 }
4556 ,
4557 Lt.prototype.getChanges = function(e) {
4558 return De(this.clone(kt, "getchanges"), ve({
4559 query: Object(y.h)(Se("SP.ChangeQuery"), e)
4560 }))
4561 }
4562 ,
4563 Lt.prototype.getItemsByCAMLQuery = function(e) {
4564 for (var t = [], n = 1; n < arguments.length; n++)
4565 t[n - 1] = arguments[n];
4566 var r = this.clone(kt, "getitems");
4567 return De(r.expand.apply(r, t), ve({
4568 query: Object(y.h)(Se("SP.CamlQuery"), e)
4569 }))
4570 }
4571 ,
4572 Lt.prototype.getListItemChangesSinceToken = function(e) {
4573 var t = this.clone(kt, "getlistitemchangessincetoken").usingParser({
4574 parse: function(e) {
4575 return e.text()
4576 }
4577 });
4578 return De(t, ve({
4579 query: Object(y.h)(Se("SP.ChangeLogItemQuery"), e)
4580 }))
4581 }
4582 ,
4583 Lt.prototype.recycle = function() {
4584 return Object(g.a)(this, void 0, void 0, function() {
4585 var t;
4586 return Object(g.d)(this, function(e) {
4587 switch (e.label) {
4588 case 0:
4589 return [4, De(this.clone(kt, "recycle"))];
4590 case 1:
4591 return t = e.sent(),
4592 [2, Object(y.p)(t, "Recycle") ? t.Recycle : t]
4593 }
4594 })
4595 })
4596 }
4597 ,
4598 Lt.prototype.renderListData = function(r) {
4599 return Object(g.a)(this, void 0, void 0, function() {
4600 var t, n;
4601 return Object(g.d)(this, function(e) {
4602 switch (e.label) {
4603 case 0:
4604 return (t = this.clone(kt, "renderlistdata(@viewXml)")).query.set("@viewXml", "'" + r + "'"),
4605 [4, De(t)];
4606 case 1:
4607 return n = e.sent(),
4608 [2, JSON.parse(Object(y.p)(n, "RenderListData") ? n.RenderListData : n)]
4609 }
4610 })
4611 })
4612 }
4613 ,
4614 Lt.prototype.renderListDataAsStream = function(e, t, n) {
4615 void 0 === t && (t = null),
4616 void 0 === n && (n = new Map),
4617 Object(y.p)(e, "RenderOptions") && Object(y.q)(e.RenderOptions) && (e.RenderOptions = e.RenderOptions.reduce(function(e, t) {
4618 return e + t
4619 }));
4620 var r = ve({
4621 overrideParameters: Object(y.h)(Se("SP.RenderListDataOverrideParameters"), t),
4622 parameters: Object(y.h)(Se("SP.RenderListDataParameters"), e)
4623 })
4624 , i = this.clone(kt, "RenderListDataAsStream", !0);
4625 return n && 0 < n.size && n.forEach(function(e, t) {
4626 return i.query.set(t, e)
4627 }),
4628 De(i, r)
4629 }
4630 ,
4631 Lt.prototype.renderListFormData = function(n, r, i) {
4632 return Object(g.a)(this, void 0, void 0, function() {
4633 var t;
4634 return Object(g.d)(this, function(e) {
4635 switch (e.label) {
4636 case 0:
4637 return [4, De(this.clone(kt, "renderlistformdata(itemid=" + n + ", formid='" + r + "', mode='" + i + "')"))];
4638 case 1:
4639 return t = e.sent(),
4640 [2, JSON.parse(Object(y.p)(t, "RenderListFormData") ? t.RenderListFormData : t)]
4641 }
4642 })
4643 })
4644 }
4645 ,
4646 Lt.prototype.reserveListItemId = function() {
4647 return Object(g.a)(this, void 0, void 0, function() {
4648 var t;
4649 return Object(g.d)(this, function(e) {
4650 switch (e.label) {
4651 case 0:
4652 return [4, De(this.clone(kt, "reservelistitemid"))];
4653 case 1:
4654 return t = e.sent(),
4655 [2, Object(y.p)(t, "ReserveListItemId") ? t.ReserveListItemId : t]
4656 }
4657 })
4658 })
4659 }
4660 ,
4661 Lt.prototype.getListItemEntityTypeFullName = function() {
4662 return this.clone(kt, null, !1).select("ListItemEntityTypeFullName").get().then(function(e) {
4663 return e.ListItemEntityTypeFullName
4664 })
4665 }
4666 ,
4667 Lt.prototype.addValidateUpdateItemUsingPath = function(r, i, o, s, a) {
4668 return void 0 === o && (o = !1),
4669 Object(g.a)(this, void 0, void 0, function() {
4670 var t, n;
4671 return Object(g.d)(this, function(e) {
4672 switch (e.label) {
4673 case 0:
4674 return t = {
4675 FolderPath: Pt(i)
4676 },
4677 Object(y.x)(a) && (a.leafName && (t.LeafName = Pt(a.leafName)),
4678 a.objectType && (t.UnderlyingObjectType = a.objectType)),
4679 [4, De(this.clone(kt, "AddValidateUpdateItemUsingPath()"), ve({
4680 bNewDocumentUpdate: o,
4681 checkInComment: s,
4682 formValues: r,
4683 listItemCreateInfo: Object(y.h)(Se("SP.ListItemCreationInformationUsingPath"), t)
4684 }))];
4685 case 1:
4686 return n = e.sent(),
4687 [2, Object(y.p)(n, "AddValidateUpdateItemUsingPath") ? n.AddValidateUpdateItemUsingPath : n]
4688 }
4689 })
4690 })
4691 }
4692 ,
4693 Object(g.b)([we("l.update")], Lt.prototype, "update", null),
4694 Object(g.b)([we("l.getChanges")], Lt.prototype, "getChanges", null),
4695 Object(g.b)([we("l.CAMLQuery")], Lt.prototype, "getItemsByCAMLQuery", null),
4696 Object(g.b)([we("l.ChangesSinceToken")], Lt.prototype, "getListItemChangesSinceToken", null),
4697 Object(g.b)([we("l.recycle")], Lt.prototype, "recycle", null),
4698 Object(g.b)([we("l.renderListData")], Lt.prototype, "renderListData", null),
4699 Object(g.b)([we("l.AsStream")], Lt.prototype, "renderListDataAsStream", null),
4700 Object(g.b)([we("l.renderListFormData")], Lt.prototype, "renderListFormData", null),
4701 Object(g.b)([we("l.reserveListItemId")], Lt.prototype, "reserveListItemId", null),
4702 Object(g.b)([we("l.getListItemEntityTypeFullName")], Lt.prototype, "getListItemEntityTypeFullName", null),
4703 Object(g.b)([we("l.addValidateUpdateItemUsingPath")], Lt.prototype, "addValidateUpdateItemUsingPath", null),
4704 Lt), kt = Me(Dt);
4705 function Lt() {
4706 var e = null !== Et && Et.apply(this, arguments) || this;
4707 return e.delete = $e("l"),
4708 e
4709 }
4710 function Ft() {
4711 return null !== Rt && Rt.apply(this, arguments) || this
4712 }
4713 (At = _t = _t || {})[At.None = 0] = "None",
4714 At[At.ContextInfo = 1] = "ContextInfo",
4715 At[At.ListData = 2] = "ListData",
4716 At[At.ListSchema = 4] = "ListSchema",
4717 At[At.MenuView = 8] = "MenuView",
4718 At[At.ListContentType = 16] = "ListContentType",
4719 At[At.FileSystemItemId = 32] = "FileSystemItemId",
4720 At[At.ClientFormSchema = 64] = "ClientFormSchema",
4721 At[At.QuickLaunch = 128] = "QuickLaunch",
4722 At[At.Spotlight = 256] = "Spotlight",
4723 At[At.Visualization = 512] = "Visualization",
4724 At[At.ViewMetadata = 1024] = "ViewMetadata",
4725 At[At.DisableAutoHyperlink = 2048] = "DisableAutoHyperlink",
4726 At[At.EnableMediaTAUrls = 4096] = "EnableMediaTAUrls",
4727 At[At.ParentInfo = 8192] = "ParentInfo",
4728 At[At.PageContextInfo = 16384] = "PageContextInfo",
4729 At[At.ClientSideComponentManifest = 32768] = "ClientSideComponentManifest",
4730 (Nt = Ct = Ct || {})[Nt.Display = 1] = "Display",
4731 Nt[Nt.Edit = 2] = "Edit",
4732 Nt[Nt.New = 3] = "New",
4733 _(jt, "lists", xt),
4734 _(jt, "siteUserInfoList", kt, "siteuserinfolist"),
4735 _(jt, "defaultDocumentLibrary", kt, "DefaultDocumentLibrary"),
4736 _(jt, "customListTemplates", He, "getcustomlisttemplates"),
4737 jt.prototype.getList = function(e) {
4738 return kt(this, "getList('" + ht(e) + "')")
4739 }
4740 ,
4741 jt.prototype.getCatalog = function(n) {
4742 return Object(g.a)(this, void 0, void 0, function() {
4743 var t;
4744 return Object(g.d)(this, function(e) {
4745 switch (e.label) {
4746 case 0:
4747 return [4, this.clone(Tt, "getcatalog(" + n + ")").select("Id").get()];
4748 case 1:
4749 return t = e.sent(),
4750 [2, kt(Ze(t))]
4751 }
4752 })
4753 })
4754 }
4755 ;
4756 var Bt, Mt, qt, Gt, Wt, Ht, Vt = (Ht = We,
4757 Object(g.c)(un, Ht),
4758 un.prototype.getById = function(e) {
4759 return we.configure(zt(this).concat("(" + e + ")"), "is.getById")
4760 }
4761 ,
4762 un.prototype.getItemByStringId = function(e) {
4763 return we.configure(zt(this.parentUrl, "getItemByStringId('" + e + "')"), "is.getItemByStringId")
4764 }
4765 ,
4766 un.prototype.skip = function(e, t) {
4767 return void 0 === t && (t = !1),
4768 t ? this.query.set("$skiptoken", encodeURIComponent("Paged=TRUE&PagedPrev=TRUE&p_ID=" + e)) : this.query.set("$skiptoken", encodeURIComponent("Paged=TRUE&p_ID=" + e)),
4769 this
4770 }
4771 ,
4772 un.prototype.getPaged = function() {
4773 return this.usingParser(new en(this))()
4774 }
4775 ,
4776 un.prototype.getAll = function(e, t) {
4777 void 0 === e && (e = 2e3),
4778 void 0 === t && (t = "application/json;odata=nometadata"),
4779 b.write("Calling items.getAll should be done sparingly. Ensure this is the correct choice. If you are unsure, it is not.", 2);
4780 var o = Kt(this, "").top(e).configure({
4781 headers: {
4782 Accept: t
4783 }
4784 });
4785 return this.query.forEach(function(e, t) {
4786 /^\$select|filter|top|expand$/i.test(t) && o.query.set(t, e)
4787 }),
4788 new Promise(function(t, n) {
4789 var r = []
4790 , i = function(e) {
4791 [].push.apply(r, e.results),
4792 e.hasNext ? e.getNext().then(i).catch(n) : t(r)
4793 };
4794 o.getPaged().then(i).catch(n)
4795 }
4796 )
4797 }
4798 ,
4799 un.prototype.add = function(s, a) {
4800 return void 0 === s && (s = {}),
4801 void 0 === a && (a = null),
4802 Object(g.a)(this, void 0, void 0, function() {
4803 var t, n, r, i, o = this;
4804 return Object(g.d)(this, function(e) {
4805 switch (e.label) {
4806 case 0:
4807 return t = this.addBatchDependency(),
4808 [4, this.ensureListItemEntityTypeName(a)];
4809 case 1:
4810 return n = e.sent(),
4811 r = ve(Object(y.h)(Se(n), s)),
4812 i = De(this.clone(Kt, ""), r).then(function(e) {
4813 return {
4814 data: e,
4815 item: o.getById(e.Id)
4816 }
4817 }),
4818 t(),
4819 [2, i]
4820 }
4821 })
4822 })
4823 }
4824 ,
4825 un.prototype.ensureListItemEntityTypeName = function(e) {
4826 return e ? Promise.resolve(e) : this.getParent(kt).getListItemEntityTypeFullName()
4827 }
4828 ,
4829 Object(g.b)([we("is.getPaged")], un.prototype, "getPaged", null),
4830 Object(g.b)([we("is.getAll")], un.prototype, "getAll", null),
4831 Object(g.b)([we("is.add")], un.prototype, "add", null),
4832 Object(g.b)([Ye("items")], un)), Kt = Me(Vt), Qt = (Wt = Ve,
4833 Object(g.c)(cn, Wt),
4834 Object.defineProperty(cn.prototype, "effectiveBasePermissions", {
4835 get: function() {
4836 return we.configure(Ge(this, "EffectiveBasePermissions"), "i.effectiveBasePermissions")
4837 },
4838 enumerable: !0,
4839 configurable: !0
4840 }),
4841 Object.defineProperty(cn.prototype, "effectiveBasePermissionsForUI", {
4842 get: function() {
4843 return we.configure(Ge(this, "EffectiveBasePermissionsForUI"), "i.effectiveBasePermissionsForUI")
4844 },
4845 enumerable: !0,
4846 configurable: !0
4847 }),
4848 Object.defineProperty(cn.prototype, "fieldValuesAsHTML", {
4849 get: function() {
4850 return we.configure(Ke(this, "FieldValuesAsHTML"), "i.fvHTML")
4851 },
4852 enumerable: !0,
4853 configurable: !0
4854 }),
4855 Object.defineProperty(cn.prototype, "fieldValuesAsText", {
4856 get: function() {
4857 return we.configure(Ke(this, "FieldValuesAsText"), "i.fvText")
4858 },
4859 enumerable: !0,
4860 configurable: !0
4861 }),
4862 Object.defineProperty(cn.prototype, "fieldValuesForEdit", {
4863 get: function() {
4864 return we.configure(Ke(this, "FieldValuesForEdit"), "i.fvEdit")
4865 },
4866 enumerable: !0,
4867 configurable: !0
4868 }),
4869 Object.defineProperty(cn.prototype, "versions", {
4870 get: function() {
4871 return we.configure(Jt(this), "i.versions")
4872 },
4873 enumerable: !0,
4874 configurable: !0
4875 }),
4876 Object.defineProperty(cn.prototype, "list", {
4877 get: function() {
4878 return this.getParent(kt, this.parentUrl.substr(0, this.parentUrl.lastIndexOf("/")))
4879 },
4880 enumerable: !0,
4881 configurable: !0
4882 }),
4883 cn.prototype.update = function(o, s, a) {
4884 return void 0 === s && (s = "*"),
4885 void 0 === a && (a = null),
4886 Object(g.a)(this, void 0, void 0, function() {
4887 var t, n, r, i;
4888 return Object(g.d)(this, function(e) {
4889 switch (e.label) {
4890 case 0:
4891 return t = this.addBatchDependency(),
4892 [4, this.ensureListItemEntityTypeName(a)];
4893 case 1:
4894 return n = e.sent(),
4895 r = ve(Object(y.h)(Se(n), o), me({
4896 "IF-Match": s,
4897 "X-HTTP-Method": "MERGE"
4898 })),
4899 t(),
4900 i = we.configure(this.clone(zt).usingParser(new tn), "i.update"),
4901 [4, De(i, r)];
4902 case 2:
4903 return [2, {
4904 data: e.sent(),
4905 item: this
4906 }]
4907 }
4908 })
4909 })
4910 }
4911 ,
4912 cn.prototype.recycle = function() {
4913 return De(this.clone(zt, "recycle"))
4914 }
4915 ,
4916 cn.prototype.getWopiFrameUrl = function(r) {
4917 return void 0 === r && (r = 0),
4918 Object(g.a)(this, void 0, void 0, function() {
4919 var t, n;
4920 return Object(g.d)(this, function(e) {
4921 switch (e.label) {
4922 case 0:
4923 return (t = this.clone(zt, "getWOPIFrameUrl(@action)")).query.set("@action", r),
4924 [4, De(t)];
4925 case 1:
4926 return n = e.sent(),
4927 Object(y.p)(n, "GetWOPIFrameUrl") ? [2, n.GetWOPIFrameUrl] : [2, n]
4928 }
4929 })
4930 })
4931 }
4932 ,
4933 cn.prototype.validateUpdateListItem = function(e, t) {
4934 return void 0 === t && (t = !1),
4935 De(this.clone(zt, "validateupdatelistitem"), ve({
4936 formValues: e,
4937 bNewDocumentUpdate: t
4938 }))
4939 }
4940 ,
4941 cn.prototype.ensureListItemEntityTypeName = function(e) {
4942 return e ? Promise.resolve(e) : this.list.getListItemEntityTypeFullName()
4943 }
4944 ,
4945 Object(g.b)([we("i.recycle")], cn.prototype, "recycle", null),
4946 Object(g.b)([we("i.getWopiFrameUrl")], cn.prototype, "getWopiFrameUrl", null),
4947 Object(g.b)([we("i.validateUpdateListItem")], cn.prototype, "validateUpdateListItem", null),
4948 cn), zt = Me(Qt), Xt = (Gt = We,
4949 Object(g.c)(an, Gt),
4950 an.prototype.getById = function(e) {
4951 return we.configure(Yt(this).concat("(" + e + ")"), "iv.getById")
4952 }
4953 ,
4954 Object(g.b)([Ye("versions")], an)), Jt = Me(Xt), $t = (qt = Ve,
4955 Object(g.c)(sn, qt),
4956 sn), Yt = Me($t), Zt = (Object.defineProperty(on.prototype, "hasNext", {
4957 get: function() {
4958 return "string" == typeof this.nextUrl && 0 < this.nextUrl.length
4959 },
4960 enumerable: !0,
4961 configurable: !0
4962 }),
4963 on.prototype.getNext = function() {
4964 return this.hasNext ? we.configure(Kt(this.nextUrl, null).configureFrom(this.parent), "ip.getNext").getPaged() : new Promise(function(e) {
4965 return e(null)
4966 }
4967 )
4968 }
4969 ,
4970 on), en = (Mt = Q,
4971 Object(g.c)(rn, Mt),
4972 rn.prototype.parse = function(t) {
4973 var r = this;
4974 return new Promise(function(n, e) {
4975 r.handleError(t, e) && t.json().then(function(e) {
4976 var t = Object(y.p)(e, "d") && Object(y.p)(e.d, "__next") ? e.d.__next : e["odata.nextLink"];
4977 n(new Zt(r._parent,t,r.parseODataJSON(e)))
4978 })
4979 }
4980 )
4981 }
4982 ,
4983 rn), tn = (Bt = Q,
4984 Object(g.c)(nn, Bt),
4985 nn.prototype.parse = function(n) {
4986 var r = this;
4987 return new Promise(function(e, t) {
4988 r.handleError(n, t) && e({
4989 "odata.etag": n.headers.get("etag")
4990 })
4991 }
4992 )
4993 }
4994 ,
4995 nn);
4996 function nn() {
4997 return null !== Bt && Bt.apply(this, arguments) || this
4998 }
4999 function rn(e) {
5000 var t = Mt.call(this) || this;
5001 return t._parent = e,
5002 t
5003 }
5004 function on(e, t, n) {
5005 this.parent = e,
5006 this.nextUrl = t,
5007 this.results = n
5008 }
5009 function sn() {
5010 var e = null !== qt && qt.apply(this, arguments) || this;
5011 return e.delete = $e("iv"),
5012 e
5013 }
5014 function an() {
5015 return null !== Gt && Gt.apply(this, arguments) || this
5016 }
5017 function cn() {
5018 var e = null !== Wt && Wt.apply(this, arguments) || this;
5019 return e.delete = $e("i"),
5020 e
5021 }
5022 function un() {
5023 return null !== Ht && Ht.apply(this, arguments) || this
5024 }
5025 _(Dt, "items", Kt);
5026 var ln, pn, dn, hn, fn, bn, yn = (On.prototype.getConfiguration = function() {
5027 var n = this;
5028 return this.web.lists.getByTitle(this.listTitle).items.select(this.keyFieldName, this.valueFieldName)().then(function(e) {
5029 return e.reduce(function(e, t) {
5030 return e[t[n.keyFieldName]] = t[n.valueFieldName],
5031 e
5032 }, {})
5033 })
5034 }
5035 ,
5036 On.prototype.asCaching = function(e) {
5037 return void 0 === e && (e = "pnp_configcache_splist_" + this.web.toUrl() + "+" + this.listTitle),
5038 new h(this,e)
5039 }
5040 ,
5041 On), gn = function(e, t) {
5042 return (gn = Object.setPrototypeOf || {
5043 __proto__: []
5044 }instanceof Array && function(e, t) {
5045 e.__proto__ = t
5046 }
5047 || function(e, t) {
5048 for (var n in t)
5049 t.hasOwnProperty(n) && (e[n] = t[n])
5050 }
5051 )(e, t)
5052 };
5053 function On(e, t, n, r) {
5054 void 0 === t && (t = "config"),
5055 void 0 === n && (n = "Title"),
5056 void 0 === r && (r = "Value"),
5057 this.web = e,
5058 this.listTitle = t,
5059 this.keyFieldName = n,
5060 this.valueFieldName = r
5061 }
5062 function vn(t) {
5063 return Object(y.h)(Se("Collection(SP.KeyValue)"), {
5064 results: Object.keys(t).map(function(e) {
5065 return Object(y.h)(Se("SP.KeyValue"), {
5066 Key: e,
5067 Value: Reflect.get(t, e),
5068 ValueType: "Edm.String"
5069 })
5070 })
5071 })
5072 }
5073 (bn = ln = ln || {})[bn.None = 0] = "None",
5074 bn[bn.User = 1] = "User",
5075 bn[bn.DistributionList = 2] = "DistributionList",
5076 bn[bn.SecurityGroup = 4] = "SecurityGroup",
5077 bn[bn.SharePointGroup = 8] = "SharePointGroup",
5078 bn[bn.All = 15] = "All",
5079 (fn = pn = pn || {})[fn.None = 0] = "None",
5080 fn[fn.UserInfoList = 1] = "UserInfoList",
5081 fn[fn.Windows = 2] = "Windows",
5082 fn[fn.MembershipProvider = 4] = "MembershipProvider",
5083 fn[fn.RoleProvider = 8] = "RoleProvider",
5084 fn[fn.All = 15] = "All",
5085 (hn = dn = dn || {})[hn.Invalid = -1] = "Invalid",
5086 hn[hn.DefaultView = 0] = "DefaultView",
5087 hn[hn.NormalView = 1] = "NormalView",
5088 hn[hn.DialogView = 2] = "DialogView",
5089 hn[hn.View = 3] = "View",
5090 hn[hn.DisplayForm = 4] = "DisplayForm",
5091 hn[hn.DisplayFormDialog = 5] = "DisplayFormDialog",
5092 hn[hn.EditForm = 6] = "EditForm",
5093 hn[hn.EditFormDialog = 7] = "EditFormDialog",
5094 hn[hn.NewForm = 8] = "NewForm",
5095 hn[hn.NewFormDialog = 9] = "NewFormDialog",
5096 hn[hn.SolutionForm = 10] = "SolutionForm",
5097 hn[hn.PAGE_MAXITEMS = 11] = "PAGE_MAXITEMS";
5098 var mn = /["*:<>?/\\|\x00-\x1f\x7f-\x9f]/g
5099 , Sn = /["#%*:<>?/\\|\x00-\x1f\x7f-\x9f]/g;
5100 function jn(e, t) {
5101 return void 0 === t && (t = !1),
5102 t ? Sn.test(e) : mn.test(e)
5103 }
5104 function Tn(e, t, n) {
5105 return void 0 === t && (t = ""),
5106 void 0 === n && (n = !1),
5107 n ? e.replace(Sn, t) : e.replace(mn, t)
5108 }
5109 Reflect.defineProperty(lt.prototype, "web", {
5110 configurable: !0,
5111 enumerable: !0,
5112 get: function() {
5113 return Tt(this._baseUrl).configure(this._options)
5114 }
5115 }),
5116 lt.prototype.createBatch = function() {
5117 return this.web.createBatch()
5118 }
5119 ;
5120 var wn, In, Pn, _n = (gn(In = Cn, Pn = wn = lt),
5121 In.prototype = null === Pn ? Object.create(Pn) : (En.prototype = Pn.prototype,
5122 new En),
5123 Cn.prototype.crossDomainSite = function(e, t) {
5124 return this._cdImpl(yt, e, t, "site")
5125 }
5126 ,
5127 Cn.prototype.crossDomainWeb = function(e, t) {
5128 return this._cdImpl(Tt, e, t, "web")
5129 }
5130 ,
5131 Cn.prototype._cdImpl = function(e, t, n, r) {
5132 if (!Object(y.s)(t))
5133 throw Error("The addInWebUrl parameter must be an absolute url.");
5134 if (!Object(y.s)(n))
5135 throw Error("The hostWebUrl parameter must be an absolute url.");
5136 var i = e(Object(y.i)(t, "_api/SP.AppContextSite(@target)"), r);
5137 return i.query.set("@target", "'" + encodeURIComponent(n) + "'"),
5138 i.configure(this._options)
5139 }
5140 ,
5141 new Cn);
5142 function Cn() {
5143 return null !== wn && wn.apply(this, arguments) || this
5144 }
5145 function En() {
5146 this.constructor = In
5147 }
5148 var Rn, Nn = (Dn.ensure = function(e, t) {
5149 var n = [Dn.Beta, Dn.V1]
5150 , r = new RegExp(t,"i")
5151 , i = n.filter(function(e) {
5152 return !r.test(e)
5153 }).map(function(e) {
5154 return e.replace(".", "\\.")
5155 });
5156 return r = new RegExp("/?(" + i.join("|") + ")/","ig"),
5157 e.replace(r, "/" + t + "/")
5158 }
5159 ,
5160 Dn.Beta = "beta",
5161 Dn.V1 = "v1.0",
5162 Dn), An = n(7), Un = (Rn = y.a,
5163 Object(g.c)(xn, Rn),
5164 xn.fromSPFxContext = function(e) {
5165 return new y.g(e)
5166 }
5167 ,
5168 xn.prototype.fetch = function(n, r) {
5169 return Object(g.a)(this, void 0, void 0, function() {
5170 var t;
5171 return Object(g.d)(this, function(e) {
5172 switch (e.label) {
5173 case 0:
5174 if (!Object(y.s)(n))
5175 throw Error("You must supply absolute urls to AdalClient.fetch.");
5176 return [4, this.getToken(Object(y.k)(n))];
5177 case 1:
5178 return t = e.sent(),
5179 this.token = t,
5180 [2, Rn.prototype.fetch.call(this, n, r)]
5181 }
5182 })
5183 })
5184 }
5185 ,
5186 xn.prototype.getToken = function(t) {
5187 return Object(g.a)(this, void 0, void 0, function() {
5188 var n;
5189 return Object(g.d)(this, function(e) {
5190 switch (e.label) {
5191 case 0:
5192 return [4, this.ensureAuthContext()];
5193 case 1:
5194 return e.sent(),
5195 [4, this.login()];
5196 case 2:
5197 return e.sent(),
5198 n = null,
5199 xn._authContext.acquireToken(t, function(e, t) {
5200 if (e)
5201 throw Error(e);
5202 n = t
5203 }),
5204 [2, n]
5205 }
5206 })
5207 })
5208 }
5209 ,
5210 xn.prototype.ensureAuthContext = function() {
5211 var t = this;
5212 return new Promise(function(e) {
5213 null === xn._authContext && (xn._authContext = An.inject({
5214 clientId: t.clientId,
5215 displayCall: function(e) {
5216 t._displayCallback && t._displayCallback(e)
5217 },
5218 navigateToLoginRequestUrl: !1,
5219 redirectUri: t.redirectUri,
5220 tenant: t.tenant
5221 })),
5222 e()
5223 }
5224 )
5225 }
5226 ,
5227 xn.prototype.login = function() {
5228 var o = this;
5229 return this._loginPromise || (this._loginPromise = new Promise(function(r, i) {
5230 if (xn._authContext.getCachedUser())
5231 return r();
5232 o._displayCallback = function(e) {
5233 var t = window.open(e, "login", "width=483, height=600");
5234 if (!t)
5235 return i(Error("Could not open pop-up window for auth. Likely pop-ups are blocked by the browser."));
5236 t && t.focus && t.focus();
5237 var n = window.setInterval(function() {
5238 t && !t.closed && void 0 !== t.closed || window.clearInterval(n);
5239 try {
5240 -1 !== t.document.URL.indexOf(o.redirectUri) && (window.clearInterval(n),
5241 xn._authContext.handleWindowCallback(t.location.hash),
5242 t.close(),
5243 r())
5244 } catch (e) {
5245 i(e)
5246 }
5247 }, 30)
5248 }
5249 ,
5250 o.ensureAuthContext().then(function(e) {
5251 xn._authContext._loginInProgress = !1,
5252 xn._authContext.login(),
5253 o._displayCallback = null
5254 })
5255 }
5256 )),
5257 this._loginPromise
5258 }
5259 ,
5260 xn._authContext = null,
5261 xn);
5262 function xn(e, t, n) {
5263 var r = Rn.call(this, null) || this;
5264 return r.clientId = e,
5265 r.tenant = t,
5266 r.redirectUri = n,
5267 r._displayCallback = null,
5268 r._loginPromise = null,
5269 r
5270 }
5271 function Dn() {}
5272 function kn(s) {
5273 return function(i, o) {
5274 return Object(g.a)(this, void 0, void 0, function() {
5275 var t, n, r;
5276 return Object(g.d)(this, function(e) {
5277 return t = ae(i.data),
5278 n = Object(y.x)(t.batch) ? t.batch.addDependency() : function() {}
5279 ,
5280 r = i.toUrlAndQuery(),
5281 Object(y.w)(t.options, o),
5282 [2, s(Object.assign({}, t, {
5283 batchDependency: n,
5284 url: r
5285 }))]
5286 })
5287 })
5288 }
5289 }
5290 function Ln(e, t) {
5291 return kn(ar("GET"))(e, t)
5292 }
5293 function Fn(e, t) {
5294 return kn(ar("POST"))(e, t)
5295 }
5296 function Bn(e, t) {
5297 return kn(ar("DELETE"))(e, t)
5298 }
5299 function Mn(e, t) {
5300 return kn(ar("PATCH"))(e, t)
5301 }
5302 function qn(e, t) {
5303 return kn(ar("PUT"))(e, t)
5304 }
5305 function Gn(e) {
5306 return K(e)
5307 }
5308 var Wn, Hn, Vn, Kn, Qn, zn, Xn, Jn, $n, Yn, Zn, er, tr, nr, rr, ir, or = (Object.defineProperty(Dr.prototype, "headers", {
5309 get: function() {
5310 var e = y.e.get("graph");
5311 return null != e && void 0 !== e.headers ? e.headers : {}
5312 },
5313 enumerable: !0,
5314 configurable: !0
5315 }),
5316 Object.defineProperty(Dr.prototype, "fetchClientFactory", {
5317 get: function() {
5318 var e = y.e.get("graph");
5319 if (null != e && void 0 !== e.fetchClientFactory)
5320 return e.fetchClientFactory;
5321 if (void 0 !== y.e.spfxContext)
5322 return function() {
5323 return Un.fromSPFxContext(y.e.spfxContext)
5324 }
5325 ;
5326 throw Error("There is no Graph Client available, either set one using configuraiton or provide a valid SPFx Context using setup.")
5327 },
5328 enumerable: !0,
5329 configurable: !0
5330 }),
5331 new Dr), sr = (xr.prototype.fetch = function(e, t) {
5332 void 0 === t && (t = {});
5333 var n = new Headers;
5334 Object(y.u)(n, or.headers),
5335 Object(y.u)(n, t.headers),
5336 n.has("Content-Type") || n.append("Content-Type", "application/json"),
5337 n.has("SdkVersion") || n.append("SdkVersion", "PnPCoreJS/$$Version$$");
5338 var r = Object(y.h)(t, {
5339 headers: n
5340 });
5341 return this.fetchRaw(e, r)
5342 }
5343 ,
5344 xr.prototype.fetchRaw = function(e, t) {
5345 var r = this;
5346 void 0 === t && (t = {});
5347 var n = new Headers;
5348 Object(y.u)(n, t.headers),
5349 t = Object(y.h)(t, {
5350 headers: n
5351 });
5352 var i = function(n) {
5353 r._impl.fetch(e, t).then(function(e) {
5354 return n.resolve(e)
5355 }).catch(function(e) {
5356 429 !== e.status && 503 !== e.status && 504 !== e.status && n.reject(e);
5357 var t = n.delay;
5358 n.delay *= 2,
5359 n.attempts++,
5360 n.retryCount <= n.attempts && n.reject(e),
5361 setTimeout(Object(y.l)(r, i, n), t)
5362 })
5363 };
5364 return new Promise(function(e, t) {
5365 var n = {
5366 attempts: 0,
5367 delay: 100,
5368 reject: t,
5369 resolve: e,
5370 retryCount: 7
5371 };
5372 i.call(r, n)
5373 }
5374 )
5375 }
5376 ,
5377 xr.prototype.get = function(e, t) {
5378 void 0 === t && (t = {});
5379 var n = Object(y.h)(t, {
5380 method: "GET"
5381 });
5382 return this.fetch(e, n)
5383 }
5384 ,
5385 xr.prototype.post = function(e, t) {
5386 void 0 === t && (t = {});
5387 var n = Object(y.h)(t, {
5388 method: "POST"
5389 });
5390 return this.fetch(e, n)
5391 }
5392 ,
5393 xr.prototype.patch = function(e, t) {
5394 void 0 === t && (t = {});
5395 var n = Object(y.h)(t, {
5396 method: "PATCH"
5397 });
5398 return this.fetch(e, n)
5399 }
5400 ,
5401 xr.prototype.delete = function(e, t) {
5402 void 0 === t && (t = {});
5403 var n = Object(y.h)(t, {
5404 method: "DELETE"
5405 });
5406 return this.fetch(e, n)
5407 }
5408 ,
5409 xr), ar = Oe(function() {
5410 return new sr
5411 }), cr = (tr = ce,
5412 Object(g.c)(Ur, tr),
5413 Ur.prototype.select = function() {
5414 for (var e = [], t = 0; t < arguments.length; t++)
5415 e[t] = arguments[t];
5416 return 0 < e.length && this.query.set("$select", e.join(",")),
5417 this
5418 }
5419 ,
5420 Ur.prototype.expand = function() {
5421 for (var e = [], t = 0; t < arguments.length; t++)
5422 e[t] = arguments[t];
5423 return 0 < e.length && this.query.set("$expand", e.join(",")),
5424 this
5425 }
5426 ,
5427 Ur.prototype.defaultAction = function(e) {
5428 return Ln(this, e)
5429 }
5430 ,
5431 Ur.prototype.get = function(e) {
5432 return Ln(this, e)
5433 }
5434 ,
5435 Ur.prototype.toUrlAndQuery = function() {
5436 var e = this.toUrl();
5437 if (Object(y.s)(e) || (e = Object(y.i)("https://graph.microsoft.com", e)),
5438 0 < this.query.size) {
5439 var t = -1 < e.indexOf("?") ? "&" : "?";
5440 e += t + Array.from(this.query).map(function(e) {
5441 return e[0] + "=" + e[1]
5442 }).join("&")
5443 }
5444 return e
5445 }
5446 ,
5447 Ur.prototype.getParent = function(e, t, n) {
5448 return void 0 === t && (t = this.parentUrl),
5449 new e(t,n)
5450 }
5451 ,
5452 Ur.prototype.clone = function(e, t, n) {
5453 return void 0 === n && (n = !0),
5454 tr.prototype.cloneTo.call(this, e(this, t), {
5455 includeBatch: n
5456 })
5457 }
5458 ,
5459 Ur.prototype.setEndpoint = function(e) {
5460 return this.data.url = Nn.ensure(this.data.url, e),
5461 this
5462 }
5463 ,
5464 Ur), ur = (Gn(cr),
5465 er = cr,
5466 Object(g.c)(Ar, er),
5467 Ar.prototype.filter = function(e) {
5468 return this.query.set("$filter", e),
5469 this
5470 }
5471 ,
5472 Ar.prototype.orderBy = function(e, t) {
5473 void 0 === t && (t = !0);
5474 var n = "$orderby"
5475 , r = this.query.has(n) ? this.query.get(n).split(",") : [];
5476 return r.push(e + " " + (t ? "asc" : "desc")),
5477 this.query.set(n, r.join(",")),
5478 this
5479 }
5480 ,
5481 Ar.prototype.top = function(e) {
5482 return this.query.set("$top", e.toString()),
5483 this
5484 }
5485 ,
5486 Ar.prototype.skip = function(e) {
5487 return this.query.set("$skip", e.toString()),
5488 this
5489 }
5490 ,
5491 Ar.prototype.skipToken = function(e) {
5492 return this.query.set("$skiptoken", e),
5493 this
5494 }
5495 ,
5496 Object.defineProperty(Ar.prototype, "count", {
5497 get: function() {
5498 return this.query.set("$count", "true"),
5499 this
5500 },
5501 enumerable: !0,
5502 configurable: !0
5503 }),
5504 Ar), lr = Gn(ur), pr = (Gn((Zn = ur,
5505 Object(g.c)(Nr, Zn),
5506 Nr.prototype.search = function(e) {
5507 return this.query.set("$search", e),
5508 this
5509 }
5510 ,
5511 Nr)),
5512 Yn = cr,
5513 Object(g.c)(Rr, Yn),
5514 Rr), dr = Gn(pr), hr = ($n = f,
5515 Object(g.c)(Er, $n),
5516 Er.makeUrlRelative = function(e) {
5517 if (!Object(y.s)(e))
5518 return e;
5519 var t = e.indexOf(".com/v1.0/");
5520 return t < 0 ? -1 < (t = e.indexOf(".com/beta/")) ? e.substr(t + 10) : e : e.substr(t + 9)
5521 }
5522 ,
5523 Er.formatRequests = function(e) {
5524 var i = this;
5525 return e.map(function(e, t) {
5526 var n = {
5527 id: "" + ++t,
5528 method: e.method,
5529 url: i.makeUrlRelative(e.url)
5530 }
5531 , r = {};
5532 return void 0 !== or.headers && null !== or.headers && (r = Object(y.h)(r, or.headers)),
5533 void 0 !== e.options && (void 0 !== e.options.headers && null !== e.options.headers && (r = Object(y.h)(r, e.options.headers)),
5534 void 0 !== e.options.body && null !== e.options.body && (n = Object(y.h)(n, {
5535 body: e.options.body
5536 }))),
5537 Object(y.h)(n, {
5538 headers: r
5539 })
5540 })
5541 }
5542 ,
5543 Er.parseResponse = function(o, s) {
5544 return new Promise(function(e) {
5545 for (var t = new Array(o.length).fill(null), n = 0; n < s.responses.length; ++n) {
5546 var r = s.responses[n]
5547 , i = parseInt(r.id, 10) - 1;
5548 204 === r.status ? t[i] = new Response : t[i] = new Response(JSON.stringify(r.body),r)
5549 }
5550 e({
5551 nextLink: s.nextLink,
5552 responses: t
5553 })
5554 }
5555 )
5556 }
5557 ,
5558 Er.prototype.executeImpl = function() {
5559 var o = this;
5560 if (b.write("[" + this.batchId + "] (" + (new Date).getTime() + ") Executing batch with " + this.requests.length + " requests.", 1),
5561 this.requests.length < 1)
5562 return b.write("Resolving empty batch.", 1),
5563 Promise.resolve();
5564 for (var n = new sr, r = this.requests.slice(), s = Promise.resolve(), e = function() {
5565 var i = r.splice(0, a.maxRequests)
5566 , e = {
5567 requests: Er.formatRequests(i)
5568 }
5569 , t = {
5570 body: Object(y.t)(e),
5571 headers: {
5572 Accept: "application/json",
5573 "Content-Type": "application/json"
5574 },
5575 method: "POST"
5576 };
5577 b.write("[" + a.batchId + "] (" + (new Date).getTime() + ") Sending batch request.", 1),
5578 n.fetch(a.batchUrl, t).then(function(e) {
5579 return e.json()
5580 }).then(function(e) {
5581 return Er.parseResponse(i, e)
5582 }).then(function(e) {
5583 b.write("[" + o.batchId + "] (" + (new Date).getTime() + ") Resolving batched requests.", 1),
5584 e.responses.reduce(function(e, t, n) {
5585 var r = i[n];
5586 return b.write("[" + o.batchId + "] (" + (new Date).getTime() + ") Resolving batched request " + r.method + " " + r.url + ".", 0),
5587 e.then(function(e) {
5588 return r.parser.parse(t).then(r.resolve).catch(r.reject)
5589 })
5590 }, s)
5591 })
5592 }, a = this; 0 < r.length; )
5593 e();
5594 return s
5595 }
5596 ,
5597 Er), fr = (Jn = cr,
5598 Object(g.c)(Cr, Jn),
5599 Cr.prototype.createBatch = function() {
5600 return new hr
5601 }
5602 ,
5603 Cr.prototype.setup = function(e) {
5604 var t;
5605 t = e,
5606 y.e.assign(t)
5607 }
5608 ,
5609 Cr), br = new fr("v1.0"), yr = (Xn = We,
5610 Object(g.c)(_r, Xn),
5611 _r.prototype.getByName = function(e) {
5612 if (/\%#/.test(e))
5613 throw Error("For file names containing % or # please use web.getFileByServerRelativePath");
5614 return we.configure(vr(this).concat("('" + ht(e) + "')"), "fis.getByName")
5615 }
5616 ,
5617 _r.prototype.add = function(t, n, r) {
5618 return void 0 === r && (r = !0),
5619 Object(g.a)(this, void 0, void 0, function() {
5620 return Object(g.d)(this, function(e) {
5621 switch (e.label) {
5622 case 0:
5623 return [4, De(gr(this, "add(overwrite=" + r + ",url='" + ht(t) + "')"), {
5624 body: n
5625 })];
5626 case 1:
5627 return [2, {
5628 data: e.sent(),
5629 file: this.getByName(t)
5630 }]
5631 }
5632 })
5633 })
5634 }
5635 ,
5636 _r.prototype.addUsingPath = function(r, i, o) {
5637 return void 0 === o && (o = {
5638 Overwrite: !1
5639 }),
5640 Object(g.a)(this, void 0, void 0, function() {
5641 var t, n;
5642 return Object(g.d)(this, function(e) {
5643 switch (e.label) {
5644 case 0:
5645 return t = ["AddUsingPath(decodedurl='" + ht(r) + "'"],
5646 o && (o.Overwrite && t.push(",Overwrite=true"),
5647 o.AutoCheckoutOnInvalidData && t.push(",AutoCheckoutOnInvalidData=true"),
5648 Object(y.A)(o.XorHash) || t.push(",XorHash=" + ht(o.XorHash))),
5649 t.push(")"),
5650 [4, De(gr(this, t.join("")), {
5651 body: i
5652 })];
5653 case 1:
5654 return [2, {
5655 data: n = e.sent(),
5656 file: vr(Ze(n))
5657 }]
5658 }
5659 })
5660 })
5661 }
5662 ,
5663 _r.prototype.addChunked = function(t, n, r, i, o) {
5664 return void 0 === i && (i = !0),
5665 void 0 === o && (o = 10485760),
5666 Object(g.a)(this, void 0, void 0, function() {
5667 return Object(g.d)(this, function(e) {
5668 switch (e.label) {
5669 case 0:
5670 return [4, De(this.clone(gr, "add(overwrite=" + i + ",url='" + ht(t) + "')", !1))];
5671 case 1:
5672 return e.sent(),
5673 [4, this.getByName(t).setContentChunked(n, r, o)];
5674 case 2:
5675 return [2, e.sent()]
5676 }
5677 })
5678 })
5679 }
5680 ,
5681 _r.prototype.addTemplateFile = function(n, r) {
5682 return Object(g.a)(this, void 0, void 0, function() {
5683 var t;
5684 return Object(g.d)(this, function(e) {
5685 switch (e.label) {
5686 case 0:
5687 return [4, De(this.clone(gr, "addTemplateFile(urloffile='" + ht(n) + "',templatefiletype=" + r + ")", !1))];
5688 case 1:
5689 return [2, {
5690 data: t = e.sent(),
5691 file: vr(Ze(t))
5692 }]
5693 }
5694 })
5695 })
5696 }
5697 ,
5698 Object(g.b)([we("fis.add")], _r.prototype, "add", null),
5699 Object(g.b)([we("fis.addUsingPath")], _r.prototype, "addUsingPath", null),
5700 Object(g.b)([we("fis.addChunked")], _r.prototype, "addChunked", null),
5701 Object(g.b)([we("fis.addTemplateFile")], _r.prototype, "addTemplateFile", null),
5702 Object(g.b)([Ye("files")], _r)), gr = Me(yr), Or = (zn = Ve,
5703 Object(g.c)(Pr, zn),
5704 Object.defineProperty(Pr.prototype, "listItemAllFields", {
5705 get: function() {
5706 return we.configure(Ke(this, "listItemAllFields"), "fi.listItemAllFields")
5707 },
5708 enumerable: !0,
5709 configurable: !0
5710 }),
5711 Object.defineProperty(Pr.prototype, "versions", {
5712 get: function() {
5713 return we.configure(Sr(this), "fi.versions")
5714 },
5715 enumerable: !0,
5716 configurable: !0
5717 }),
5718 Pr.prototype.approve = function(e) {
5719 return void 0 === e && (e = ""),
5720 De(this.clone(vr, "approve(comment='" + ht(e) + "')"))
5721 }
5722 ,
5723 Pr.prototype.cancelUpload = function(e) {
5724 return De(this.clone(vr, "cancelUpload(uploadId=guid'" + e + "')", !1))
5725 }
5726 ,
5727 Pr.prototype.checkin = function(e, t) {
5728 if (void 0 === e && (e = ""),
5729 void 0 === t && (t = Wn.Major),
5730 1023 < e.length)
5731 throw Error("The maximum comment length is 1023 characters.");
5732 return De(this.clone(vr, "checkin(comment='" + ht(e) + "',checkintype=" + t + ")"))
5733 }
5734 ,
5735 Pr.prototype.checkout = function() {
5736 return De(this.clone(vr, "checkout"))
5737 }
5738 ,
5739 Pr.prototype.copyTo = function(e, t) {
5740 return void 0 === t && (t = !0),
5741 De(this.clone(vr, "copyTo(strnewurl='" + ht(e) + "',boverwrite=" + t + ")"))
5742 }
5743 ,
5744 Pr.prototype.copyByPath = function(s, a, c) {
5745 return void 0 === c && (c = !1),
5746 Object(g.a)(this, void 0, void 0, function() {
5747 var t, n, r, i, o;
5748 return Object(g.d)(this, function(e) {
5749 switch (e.label) {
5750 case 0:
5751 return [4, this.select("ServerRelativeUrl")()];
5752 case 1:
5753 return t = e.sent(),
5754 n = t.ServerRelativeUrl,
5755 r = t["odata.id"],
5756 i = Te(r),
5757 o = i.replace("://", "___").split("/")[0].replace("___", "://"),
5758 [4, De(vr(i, "/_api/SP.MoveCopyUtil.CopyFileByPath(overwrite=@a1)?@a1=" + a), ve({
5759 destPath: Pt(Object(y.s)(s) ? s : "" + o + s),
5760 options: {
5761 KeepBoth: c,
5762 ResetAuthorAndCreatedOnCopy: !0,
5763 ShouldBypassSharedLocks: !0,
5764 __metadata: {
5765 type: "SP.MoveCopyOptions"
5766 }
5767 },
5768 srcPath: Pt("" + o + n)
5769 }))];
5770 case 2:
5771 return e.sent(),
5772 [2]
5773 }
5774 })
5775 })
5776 }
5777 ,
5778 Pr.prototype.deny = function(e) {
5779 if (void 0 === e && (e = ""),
5780 1023 < e.length)
5781 throw Error("The maximum comment length is 1023 characters.");
5782 return De(this.clone(vr, "deny(comment='" + ht(e) + "')"))
5783 }
5784 ,
5785 Pr.prototype.moveTo = function(e, t) {
5786 return void 0 === t && (t = Hn.Overwrite),
5787 De(this.clone(vr, "moveTo(newurl='" + ht(e) + "',flags=" + t + ")"))
5788 }
5789 ,
5790 Pr.prototype.moveByPath = function(s, a, c) {
5791 return void 0 === c && (c = !1),
5792 Object(g.a)(this, void 0, void 0, function() {
5793 var t, n, r, i, o;
5794 return Object(g.d)(this, function(e) {
5795 switch (e.label) {
5796 case 0:
5797 return [4, this.select("ServerRelativeUrl")()];
5798 case 1:
5799 return t = e.sent(),
5800 n = t.ServerRelativeUrl,
5801 r = t["odata.id"],
5802 i = Te(r),
5803 o = i.replace("://", "___").split("/")[0].replace("___", "://"),
5804 [4, De(vr(i, "/_api/SP.MoveCopyUtil.MoveFileByPath(overwrite=@a1)?@a1=" + a), ve({
5805 destPath: Pt(Object(y.s)(s) ? s : "" + o + s),
5806 options: {
5807 KeepBoth: c,
5808 ResetAuthorAndCreatedOnCopy: !1,
5809 ShouldBypassSharedLocks: !0,
5810 __metadata: {
5811 type: "SP.MoveCopyOptions"
5812 }
5813 },
5814 srcPath: Pt("" + o + n)
5815 }))];
5816 case 2:
5817 return e.sent(),
5818 [2]
5819 }
5820 })
5821 })
5822 }
5823 ,
5824 Pr.prototype.publish = function(e) {
5825 if (void 0 === e && (e = ""),
5826 1023 < e.length)
5827 throw Error("The maximum comment length is 1023 characters.");
5828 return De(this.clone(vr, "publish(comment='" + ht(e) + "')"))
5829 }
5830 ,
5831 Pr.prototype.recycle = function() {
5832 return De(this.clone(vr, "recycle"))
5833 }
5834 ,
5835 Pr.prototype.undoCheckout = function() {
5836 return De(this.clone(vr, "undoCheckout"))
5837 }
5838 ,
5839 Pr.prototype.unpublish = function(e) {
5840 if (void 0 === e && (e = ""),
5841 1023 < e.length)
5842 throw Error("The maximum comment length is 1023 characters.");
5843 return De(this.clone(vr, "unpublish(comment='" + ht(e) + "')"))
5844 }
5845 ,
5846 Pr.prototype.getText = function() {
5847 return this.clone(vr, "$value", !1).usingParser(new z)(me({
5848 binaryStringResponseBody: "true"
5849 }))
5850 }
5851 ,
5852 Pr.prototype.getBlob = function() {
5853 return this.clone(vr, "$value", !1).usingParser(new X)(me({
5854 binaryStringResponseBody: "true"
5855 }))
5856 }
5857 ,
5858 Pr.prototype.getBuffer = function() {
5859 return this.clone(vr, "$value", !1).usingParser(new $)(me({
5860 binaryStringResponseBody: "true"
5861 }))
5862 }
5863 ,
5864 Pr.prototype.getJSON = function() {
5865 return this.clone(vr, "$value", !1).usingParser(new J)(me({
5866 binaryStringResponseBody: "true"
5867 }))
5868 }
5869 ,
5870 Pr.prototype.setContent = function(t) {
5871 return Object(g.a)(this, void 0, void 0, function() {
5872 return Object(g.d)(this, function(e) {
5873 switch (e.label) {
5874 case 0:
5875 return [4, De(this.clone(vr, "$value", !1), {
5876 body: t,
5877 headers: {
5878 "X-HTTP-Method": "PUT"
5879 }
5880 })];
5881 case 1:
5882 return e.sent(),
5883 [2, vr(this)]
5884 }
5885 })
5886 })
5887 }
5888 ,
5889 Pr.prototype.getItem = function() {
5890 for (var r = [], e = 0; e < arguments.length; e++)
5891 r[e] = arguments[e];
5892 return Object(g.a)(this, void 0, void 0, function() {
5893 var t, n;
5894 return Object(g.d)(this, function(e) {
5895 switch (e.label) {
5896 case 0:
5897 return [4, (t = this.listItemAllFields).select.apply(t, r)()];
5898 case 1:
5899 return n = e.sent(),
5900 [2, Object(y.h)(zt(Ze(n)), n)]
5901 }
5902 })
5903 })
5904 }
5905 ,
5906 Pr.prototype.setContentChunked = function(s, a, c) {
5907 return void 0 === c && (c = 10485760),
5908 Object(g.a)(this, void 0, void 0, function() {
5909 var t, n, r, i, o;
5910 return Object(g.d)(this, function(e) {
5911 switch (e.label) {
5912 case 0:
5913 return Object(y.r)(a) || (a = function() {
5914 return null
5915 }
5916 ),
5917 t = s.size,
5918 n = parseInt((t / c).toString(), 10) + (t % c == 0 ? 1 : 0),
5919 r = Object(y.m)(),
5920 a({
5921 uploadId: r,
5922 blockNumber: 1,
5923 chunkSize: c,
5924 currentPointer: 0,
5925 fileSize: t,
5926 stage: "starting",
5927 totalBlocks: n
5928 }),
5929 [4, this.startUpload(r, s.slice(0, c))];
5930 case 1:
5931 i = e.sent(),
5932 o = 2,
5933 e.label = 2;
5934 case 2:
5935 return o < n ? (a({
5936 uploadId: r,
5937 blockNumber: o,
5938 chunkSize: c,
5939 currentPointer: i,
5940 fileSize: t,
5941 stage: "continue",
5942 totalBlocks: n
5943 }),
5944 [4, this.continueUpload(r, i, s.slice(i, i + c))]) : [3, 5];
5945 case 3:
5946 i = e.sent(),
5947 e.label = 4;
5948 case 4:
5949 return o++,
5950 [3, 2];
5951 case 5:
5952 return a({
5953 uploadId: r,
5954 blockNumber: n,
5955 chunkSize: c,
5956 currentPointer: i,
5957 fileSize: t,
5958 stage: "finishing",
5959 totalBlocks: n
5960 }),
5961 [2, this.finishUpload(r, i, s.slice(i))]
5962 }
5963 })
5964 })
5965 }
5966 ,
5967 Pr.prototype.startUpload = function(n, r) {
5968 return Object(g.a)(this, void 0, void 0, function() {
5969 var t;
5970 return Object(g.d)(this, function(e) {
5971 switch (e.label) {
5972 case 0:
5973 return [4, De(this.clone(vr, "startUpload(uploadId=guid'" + n + "')", !1), {
5974 body: r
5975 })];
5976 case 1:
5977 return "object" == typeof (t = e.sent()) && (t = t.StartUpload),
5978 [2, parseFloat(t)]
5979 }
5980 })
5981 })
5982 }
5983 ,
5984 Pr.prototype.continueUpload = function(n, r, i) {
5985 return Object(g.a)(this, void 0, void 0, function() {
5986 var t;
5987 return Object(g.d)(this, function(e) {
5988 switch (e.label) {
5989 case 0:
5990 return [4, De(this.clone(vr, "continueUpload(uploadId=guid'" + n + "',fileOffset=" + r + ")", !1), {
5991 body: i
5992 })];
5993 case 1:
5994 return "object" == typeof (t = e.sent()) && (t = t.ContinueUpload),
5995 [2, parseFloat(t)]
5996 }
5997 })
5998 })
5999 }
6000 ,
6001 Pr.prototype.finishUpload = function(n, r, i) {
6002 return Object(g.a)(this, void 0, void 0, function() {
6003 var t;
6004 return Object(g.d)(this, function(e) {
6005 switch (e.label) {
6006 case 0:
6007 return [4, De(this.clone(vr, "finishUpload(uploadId=guid'" + n + "',fileOffset=" + r + ")", !1), {
6008 body: i
6009 })];
6010 case 1:
6011 return [2, {
6012 data: t = e.sent(),
6013 file: vr(Ze(t))
6014 }]
6015 }
6016 })
6017 })
6018 }
6019 ,
6020 Object(g.b)([we("fi.approve")], Pr.prototype, "approve", null),
6021 Object(g.b)([we("fi.cancelUpload")], Pr.prototype, "cancelUpload", null),
6022 Object(g.b)([we("fi.checkin")], Pr.prototype, "checkin", null),
6023 Object(g.b)([we("fi.checkout")], Pr.prototype, "checkout", null),
6024 Object(g.b)([we("fi.copyTo")], Pr.prototype, "copyTo", null),
6025 Object(g.b)([we("fi.copyByPath")], Pr.prototype, "copyByPath", null),
6026 Object(g.b)([we("fi.deny")], Pr.prototype, "deny", null),
6027 Object(g.b)([we("fi.moveTo")], Pr.prototype, "moveTo", null),
6028 Object(g.b)([we("fi.moveByPath")], Pr.prototype, "moveByPath", null),
6029 Object(g.b)([we("fi.publish")], Pr.prototype, "publish", null),
6030 Object(g.b)([we("fi.recycle")], Pr.prototype, "recycle", null),
6031 Object(g.b)([we("fi.undoCheckout")], Pr.prototype, "undoCheckout", null),
6032 Object(g.b)([we("fi.unpublish")], Pr.prototype, "unpublish", null),
6033 Object(g.b)([we("fi.getText")], Pr.prototype, "getText", null),
6034 Object(g.b)([we("fi.getBlob")], Pr.prototype, "getBlob", null),
6035 Object(g.b)([we("fi.getBuffer")], Pr.prototype, "getBuffer", null),
6036 Object(g.b)([we("fi.getJSON")], Pr.prototype, "getJSON", null),
6037 Object(g.b)([we("fi.setContent")], Pr.prototype, "setContent", null),
6038 Object(g.b)([we("fi.getItem")], Pr.prototype, "getItem", null),
6039 Object(g.b)([we("fi.startUpload")], Pr.prototype, "startUpload", null),
6040 Object(g.b)([we("fi.continueUpload")], Pr.prototype, "continueUpload", null),
6041 Object(g.b)([we("fi.finishUpload")], Pr.prototype, "finishUpload", null),
6042 Pr), vr = Me(Or), mr = (Qn = We,
6043 Object(g.c)(Ir, Qn),
6044 Ir.prototype.getById = function(e) {
6045 return we.configure(Tr(this).concat("(" + e + ")"), "vers.getById")
6046 }
6047 ,
6048 Ir.prototype.deleteAll = function() {
6049 return De(Sr(this, "deleteAll"))
6050 }
6051 ,
6052 Ir.prototype.deleteById = function(e) {
6053 return De(this.clone(Sr, "deleteById(vid=" + e + ")"))
6054 }
6055 ,
6056 Ir.prototype.recycleByID = function(e) {
6057 return De(this.clone(Sr, "recycleByID(vid=" + e + ")"))
6058 }
6059 ,
6060 Ir.prototype.deleteByLabel = function(e) {
6061 return De(this.clone(Sr, "deleteByLabel(versionlabel='" + ht(e) + "')"))
6062 }
6063 ,
6064 Ir.prototype.recycleByLabel = function(e) {
6065 return De(this.clone(Sr, "recycleByLabel(versionlabel='" + ht(e) + "')"))
6066 }
6067 ,
6068 Ir.prototype.restoreByLabel = function(e) {
6069 return De(this.clone(Sr, "restoreByLabel(versionlabel='" + ht(e) + "')"))
6070 }
6071 ,
6072 Object(g.b)([we("vers.deleteAll")], Ir.prototype, "deleteAll", null),
6073 Object(g.b)([we("vers.deleteById")], Ir.prototype, "deleteById", null),
6074 Object(g.b)([we("vers.recycleByID")], Ir.prototype, "recycleByID", null),
6075 Object(g.b)([we("vers.deleteByLabel")], Ir.prototype, "deleteByLabel", null),
6076 Object(g.b)([we("vers.recycleByLabel")], Ir.prototype, "recycleByLabel", null),
6077 Object(g.b)([we("vers.restoreByLabel")], Ir.prototype, "restoreByLabel", null),
6078 Object(g.b)([Ye("versions")], Ir)), Sr = Me(mr), jr = (Kn = Ve,
6079 Object(g.c)(wr, Kn),
6080 wr), Tr = Me(jr);
6081 function wr() {
6082 var e = null !== Kn && Kn.apply(this, arguments) || this;
6083 return e.delete = $e("ver"),
6084 e
6085 }
6086 function Ir() {
6087 return null !== Qn && Qn.apply(this, arguments) || this
6088 }
6089 function Pr() {
6090 var e = null !== zn && zn.apply(this, arguments) || this;
6091 return e.delete = $e("fi"),
6092 e
6093 }
6094 function _r() {
6095 return null !== Xn && Xn.apply(this, arguments) || this
6096 }
6097 function Cr() {
6098 return null !== Jn && Jn.apply(this, arguments) || this
6099 }
6100 function Er(e, t) {
6101 void 0 === e && (e = "https://graph.microsoft.com/v1.0/$batch"),
6102 void 0 === t && (t = 20);
6103 var n = $n.call(this) || this;
6104 return n.batchUrl = e,
6105 n.maxRequests = t,
6106 n
6107 }
6108 function Rr() {
6109 return null !== Yn && Yn.apply(this, arguments) || this
6110 }
6111 function Nr() {
6112 return null !== Zn && Zn.apply(this, arguments) || this
6113 }
6114 function Ar() {
6115 return null !== er && er.apply(this, arguments) || this
6116 }
6117 function Ur(e, t) {
6118 var n = this
6119 , r = ""
6120 , i = ""
6121 , o = new Map;
6122 return r = (i = "string" == typeof e ? e : e.toUrl(),
6123 Object(y.i)(i, t)),
6124 n = tr.call(this, {
6125 parentUrl: i,
6126 query: o,
6127 url: r
6128 }) || this,
6129 "string" != typeof e && n.configureFrom(e),
6130 n
6131 }
6132 function xr() {
6133 this._impl = or.fetchClientFactory()
6134 }
6135 function Dr() {}
6136 (ir = Wn = Wn || {})[ir.Minor = 0] = "Minor",
6137 ir[ir.Major = 1] = "Major",
6138 ir[ir.Overwrite = 2] = "Overwrite",
6139 (rr = Hn = Hn || {})[rr.Overwrite = 1] = "Overwrite",
6140 rr[rr.AllowBrokenThickets = 8] = "AllowBrokenThickets",
6141 (nr = Vn = Vn || {})[nr.StandardPage = 0] = "StandardPage",
6142 nr[nr.WikiPage = 1] = "WikiPage",
6143 nr[nr.FormPage = 2] = "FormPage",
6144 nr[nr.ClientSidePage = 3] = "ClientSidePage";
6145 var kr, Lr, Fr = (Lr = We,
6146 Object(g.c)(Wr, Lr),
6147 Wr.prototype.getAppById = function(e) {
6148 return we.configure(qr(this, "getById('" + e + "')"), "ac.getAppById")
6149 }
6150 ,
6151 Wr.prototype.syncSolutionToTeams = function(a, c) {
6152 return void 0 === c && (c = !1),
6153 Object(g.a)(this, void 0, void 0, function() {
6154 var t, n, r, i, o, s;
6155 return Object(g.d)(this, function(e) {
6156 switch (e.label) {
6157 case 0:
6158 return t = null,
6159 n = Te(this.toUrl()),
6160 c ? (t = a,
6161 [3, 4]) : [3, 1];
6162 case 1:
6163 return [4, (r = Tt(n)).lists.select("Id").filter("EntityTypeName eq 'AppCatalog'")()];
6164 case 2:
6165 return i = e.sent()[0].Id,
6166 [4, r.lists.getById(i).items.filter("AppProductID eq '" + a + "'").top(1)()];
6167 case 3:
6168 if (!((o = e.sent()) && 0 < o.length))
6169 throw Error("Did not find the app with id " + a + " in the appcatalog.");
6170 t = o[0].Id,
6171 e.label = 4;
6172 case 4:
6173 return s = we.configure(Br(n, "_api/web/tenantappcatalog/SyncSolutionToTeams(id=" + t + ")"), "ac.syncSolutionToTeams"),
6174 [4, De(s, {})];
6175 case 5:
6176 return [2, e.sent()]
6177 }
6178 })
6179 })
6180 }
6181 ,
6182 Wr.prototype.add = function(r, i, o) {
6183 return void 0 === o && (o = !0),
6184 Object(g.a)(this, void 0, void 0, function() {
6185 var t, n;
6186 return Object(g.d)(this, function(e) {
6187 switch (e.label) {
6188 case 0:
6189 return t = we.configure(Br(Te(this.toUrl()), "_api/web/tenantappcatalog/add(overwrite=" + o + ",url='" + r + "')"), "ac.add"),
6190 [4, De(t, {
6191 body: i,
6192 headers: {
6193 binaryStringRequestBody: "true"
6194 }
6195 })];
6196 case 1:
6197 return [2, {
6198 data: n = e.sent(),
6199 file: vr(Ze(n))
6200 }]
6201 }
6202 })
6203 })
6204 }
6205 ,
6206 Wr), Br = Me(Fr), Mr = (kr = Ve,
6207 Object(g.c)(Gr, kr),
6208 Gr.prototype.deploy = function(e) {
6209 return void 0 === e && (e = !1),
6210 this.do("Deploy(" + e + ")")
6211 }
6212 ,
6213 Gr.prototype.retract = function() {
6214 return this.do("Retract")
6215 }
6216 ,
6217 Gr.prototype.install = function() {
6218 return this.do("Install")
6219 }
6220 ,
6221 Gr.prototype.uninstall = function() {
6222 return this.do("Uninstall")
6223 }
6224 ,
6225 Gr.prototype.upgrade = function() {
6226 return this.do("Upgrade")
6227 }
6228 ,
6229 Gr.prototype.remove = function() {
6230 return this.do("Remove")
6231 }
6232 ,
6233 Gr.prototype.do = function(e) {
6234 return De(this.clone(qr, e))
6235 }
6236 ,
6237 Object(g.b)([we("app.deploy")], Gr.prototype, "deploy", null),
6238 Object(g.b)([we("app.retract")], Gr.prototype, "retract", null),
6239 Object(g.b)([we("app.install")], Gr.prototype, "install", null),
6240 Object(g.b)([we("app.uninstall")], Gr.prototype, "uninstall", null),
6241 Object(g.b)([we("app.upgrade")], Gr.prototype, "upgrade", null),
6242 Object(g.b)([we("app.remove")], Gr.prototype, "remove", null),
6243 Gr), qr = Me(Mr);
6244 function Gr() {
6245 return null !== kr && kr.apply(this, arguments) || this
6246 }
6247 function Wr(e, t) {
6248 return void 0 === t && (t = "_api/web/tenantappcatalog/AvailableApps"),
6249 Lr.call(this, Te("string" == typeof e ? e : e.toUrl()), t) || this
6250 }
6251 jt.prototype.getAppCatalog = function(e) {
6252 return Br(e || this)
6253 }
6254 ,
6255 lt.prototype.getTenantAppCatalogWeb = function() {
6256 return Object(g.a)(this, void 0, void 0, function() {
6257 var t;
6258 return Object(g.d)(this, function(e) {
6259 switch (e.label) {
6260 case 0:
6261 return [4, Ge("/", "_api/SP_TenantSettings_Current")()];
6262 case 1:
6263 return t = e.sent(),
6264 [2, Tt(t.CorporateCatalogUrl)]
6265 }
6266 })
6267 })
6268 }
6269 ;
6270 var Hr, Vr, Kr = (Vr = We,
6271 Object(g.c)($r, Vr),
6272 $r.prototype.getByName = function(e) {
6273 var t = we.configure(Xr(this), "ats.getByName");
6274 return t.concat("('" + e + "')"),
6275 t
6276 }
6277 ,
6278 $r.prototype.add = function(t, n) {
6279 return Object(g.a)(this, void 0, void 0, function() {
6280 return Object(g.d)(this, function(e) {
6281 switch (e.label) {
6282 case 0:
6283 return [4, De(this.clone(Qr, "add(FileName='" + t + "')", !1), {
6284 body: n
6285 })];
6286 case 1:
6287 return [2, {
6288 data: e.sent(),
6289 file: this.getByName(t)
6290 }]
6291 }
6292 })
6293 })
6294 }
6295 ,
6296 $r.prototype.addMultiple = function(n) {
6297 return Object(g.a)(this, void 0, void 0, function() {
6298 var t;
6299 return Object(g.d)(this, function(e) {
6300 switch (e.label) {
6301 case 0:
6302 t = 0,
6303 e.label = 1;
6304 case 1:
6305 return t < n.length ? [4, this.add(n[t].name, n[t].content)] : [3, 4];
6306 case 2:
6307 e.sent(),
6308 e.label = 3;
6309 case 3:
6310 return t++,
6311 [3, 1];
6312 case 4:
6313 return [2]
6314 }
6315 })
6316 })
6317 }
6318 ,
6319 $r.prototype.deleteMultiple = function() {
6320 for (var n = [], e = 0; e < arguments.length; e++)
6321 n[e] = arguments[e];
6322 return Object(g.a)(this, void 0, void 0, function() {
6323 var t;
6324 return Object(g.d)(this, function(e) {
6325 switch (e.label) {
6326 case 0:
6327 t = 0,
6328 e.label = 1;
6329 case 1:
6330 return t < n.length ? [4, this.getByName(n[t]).delete()] : [3, 4];
6331 case 2:
6332 e.sent(),
6333 e.label = 3;
6334 case 3:
6335 return t++,
6336 [3, 1];
6337 case 4:
6338 return [2]
6339 }
6340 })
6341 })
6342 }
6343 ,
6344 $r.prototype.recycleMultiple = function() {
6345 for (var n = [], e = 0; e < arguments.length; e++)
6346 n[e] = arguments[e];
6347 return Object(g.a)(this, void 0, void 0, function() {
6348 var t;
6349 return Object(g.d)(this, function(e) {
6350 switch (e.label) {
6351 case 0:
6352 t = 0,
6353 e.label = 1;
6354 case 1:
6355 return t < n.length ? [4, this.getByName(n[t]).recycle()] : [3, 4];
6356 case 2:
6357 e.sent(),
6358 e.label = 3;
6359 case 3:
6360 return t++,
6361 [3, 1];
6362 case 4:
6363 return [2]
6364 }
6365 })
6366 })
6367 }
6368 ,
6369 Object(g.b)([we("ats.add")], $r.prototype, "add", null),
6370 Object(g.b)([we("ats.addMultiple")], $r.prototype, "addMultiple", null),
6371 Object(g.b)([we("ats.deleteMultiple")], $r.prototype, "deleteMultiple", null),
6372 Object(g.b)([we("ats.recycleMultiple")], $r.prototype, "recycleMultiple", null),
6373 Object(g.b)([Ye("AttachmentFiles")], $r)), Qr = Me(Kr), zr = (Hr = Ve,
6374 Object(g.c)(Jr, Hr),
6375 Jr.prototype.getText = function() {
6376 return this.getParsed(new z)
6377 }
6378 ,
6379 Jr.prototype.getBlob = function() {
6380 return this.getParsed(new X)
6381 }
6382 ,
6383 Jr.prototype.getBuffer = function() {
6384 return this.getParsed(new $)
6385 }
6386 ,
6387 Jr.prototype.getJSON = function() {
6388 return this.getParsed(new J)
6389 }
6390 ,
6391 Jr.prototype.setContent = function(t) {
6392 return Object(g.a)(this, void 0, void 0, function() {
6393 return Object(g.d)(this, function(e) {
6394 switch (e.label) {
6395 case 0:
6396 return [4, De(this.clone(Xr, "$value", !1), me({
6397 "X-HTTP-Method": "PUT"
6398 }, {
6399 body: t
6400 }))];
6401 case 1:
6402 return e.sent(),
6403 [2, Xr(this)]
6404 }
6405 })
6406 })
6407 }
6408 ,
6409 Jr.prototype.recycle = function(e) {
6410 return void 0 === e && (e = "*"),
6411 De(this.clone(Xr, "recycleObject"), me({
6412 "IF-Match": e,
6413 "X-HTTP-Method": "DELETE"
6414 }))
6415 }
6416 ,
6417 Jr.prototype.getParsed = function(e) {
6418 return this.clone(Xr, "$value", !1).usingParser(e)()
6419 }
6420 ,
6421 Object(g.b)([we("at.getText")], Jr.prototype, "getText", null),
6422 Object(g.b)([we("at.getBlob")], Jr.prototype, "getBlob", null),
6423 Object(g.b)([we("at.getBuffer")], Jr.prototype, "getBuffer", null),
6424 Object(g.b)([we("at.getJSON")], Jr.prototype, "getJSON", null),
6425 Object(g.b)([we("at.setContent")], Jr.prototype, "setContent", null),
6426 Object(g.b)([we("at.recycle")], Jr.prototype, "recycle", null),
6427 Jr), Xr = Me(zr);
6428 function Jr() {
6429 var e = null !== Hr && Hr.apply(this, arguments) || this;
6430 return e.delete = $e("at"),
6431 e
6432 }
6433 function $r() {
6434 return null !== Vr && Vr.apply(this, arguments) || this
6435 }
6436 function Yr(e) {
6437 return e.length < 1 ? 1 : Math.max.apply(null, e.map(function(e) {
6438 return e.order
6439 })) + 1
6440 }
6441 function Zr(e) {
6442 for (var t = 0; t < e.length; t++)
6443 e[t].order = t + 1,
6444 Object(y.p)(e[t], "columns") ? Zr(e[t].columns) : Object(y.p)(e[t], "controls") && Zr(e[t].controls)
6445 }
6446 _(Qt, "attachmentFiles", Qr),
6447 jt.prototype.getFileByServerRelativeUrl = function(e) {
6448 return vr(this, "getFileByServerRelativeUrl('" + ht(e) + "')")
6449 }
6450 ,
6451 jt.prototype.getFileByServerRelativePath = function(e) {
6452 return vr(this, "getFileByServerRelativePath(decodedUrl='" + ht(e) + "')")
6453 }
6454 ,
6455 jt.prototype.getFileById = function(e) {
6456 return vr(this, "getFileById('" + e + "')")
6457 }
6458 ;
6459 var ei, ti, ni, ri, ii, oi = (ri = We,
6460 Object(g.c)(hi, ri),
6461 hi.prototype.add = function(r) {
6462 return Object(g.a)(this, void 0, void 0, function() {
6463 var t, n;
6464 return Object(g.d)(this, function(e) {
6465 switch (e.label) {
6466 case 0:
6467 return "string" == typeof r && (r = {
6468 text: r
6469 }),
6470 t = ve(Object(y.h)(Se("Microsoft.SharePoint.Comments.comment"), r)),
6471 [4, De(this.clone(si, null), t)];
6472 case 1:
6473 return n = e.sent(),
6474 [2, Object(y.h)(this.getById(n.id), n)]
6475 }
6476 })
6477 })
6478 }
6479 ,
6480 hi.prototype.getById = function(e) {
6481 return we.configure(ci(this).concat("(" + e + ")"), "coms.getById")
6482 }
6483 ,
6484 hi.prototype.clear = function() {
6485 return De(we.configure(this.clone(si, "DeleteAll"), "coms.clear"))
6486 }
6487 ,
6488 Object(g.b)([we("coms.add")], hi.prototype, "add", null),
6489 Object(g.b)([Ye("comments")], hi)), si = Me(oi), ai = (ni = Ve,
6490 Object(g.c)(di, ni),
6491 Object.defineProperty(di.prototype, "replies", {
6492 get: function() {
6493 return we.configure(li(this), "com.replies")
6494 },
6495 enumerable: !0,
6496 configurable: !0
6497 }),
6498 di.prototype.like = function() {
6499 return De(this.clone(ci, "Like"))
6500 }
6501 ,
6502 di.prototype.unlike = function() {
6503 return De(this.clone(ci, "Unlike"))
6504 }
6505 ,
6506 di.prototype.delete = function() {
6507 return De(this.clone(ci, "DeleteComment"))
6508 }
6509 ,
6510 Object(g.b)([we("com.like")], di.prototype, "like", null),
6511 Object(g.b)([we("com.unlike")], di.prototype, "unlike", null),
6512 Object(g.b)([we("com.delete")], di.prototype, "delete", null),
6513 di), ci = Me(ai), ui = (ti = We,
6514 Object(g.c)(pi, ti),
6515 pi.prototype.add = function(r) {
6516 return Object(g.a)(this, void 0, void 0, function() {
6517 var t, n;
6518 return Object(g.d)(this, function(e) {
6519 switch (e.label) {
6520 case 0:
6521 return "string" == typeof r && (r = {
6522 text: r
6523 }),
6524 t = ve(Object(y.h)(Se("Microsoft.SharePoint.Comments.comment"), r)),
6525 [4, De(this.clone(li, null), t)];
6526 case 1:
6527 return n = e.sent(),
6528 [2, Object(y.h)(ci(Ze(n)), n)]
6529 }
6530 })
6531 })
6532 }
6533 ,
6534 Object(g.b)([we("reps.add")], pi.prototype, "add", null),
6535 Object(g.b)([Ye("replies")], pi)), li = Me(ui);
6536 function pi() {
6537 return null !== ti && ti.apply(this, arguments) || this
6538 }
6539 function di() {
6540 return null !== ni && ni.apply(this, arguments) || this
6541 }
6542 function hi() {
6543 return null !== ri && ri.apply(this, arguments) || this
6544 }
6545 function fi(e, t) {
6546 return vi(Te(e.toUrl()), t).configureFrom(e)
6547 }
6548 _(Qt, "comments", si),
6549 Qt.prototype.getLikedBy = function() {
6550 return De(this.clone(zt, "likedBy"))
6551 }
6552 ,
6553 Qt.prototype.like = function() {
6554 return De(this.clone(zt, "like"))
6555 }
6556 ,
6557 Qt.prototype.unlike = function() {
6558 return De(this.clone(zt, "unlike"))
6559 }
6560 ,
6561 Qt.prototype.getLikedByInformation = function() {
6562 return this.clone(zt, "likedByInformation").expand("likedby")()
6563 }
6564 ,
6565 (ii = ei = ei || {})[ii.NotPromoted = 0] = "NotPromoted",
6566 ii[ii.PromoteOnPublish = 1] = "PromoteOnPublish",
6567 ii[ii.Promoted = 2] = "Promoted";
6568 var bi, yi, gi, Oi = (gi = qe,
6569 Object(g.c)(Ai, gi),
6570 Ai.getDefaultLayoutPart = function() {
6571 return {
6572 dataVersion: "1.4",
6573 description: "Title Region Description",
6574 id: "cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",
6575 instanceId: "cbe7b0a9-3504-44dd-a3a3-0e5cacd07788",
6576 properties: {
6577 authors: [],
6578 layoutType: "FullWidthImage",
6579 showPublishDate: !1,
6580 showTopicHeader: !1,
6581 textAlignment: "Left",
6582 title: "",
6583 topicHeader: ""
6584 },
6585 serverProcessedContent: {
6586 htmlStrings: {},
6587 searchablePlainTexts: {},
6588 imageSources: {},
6589 links: {}
6590 },
6591 title: "Title area"
6592 }
6593 }
6594 ,
6595 Object.defineProperty(Ai.prototype, "pageLayout", {
6596 get: function() {
6597 return this.json.PageLayoutType
6598 },
6599 set: function(e) {
6600 this.json.PageLayoutType = e
6601 },
6602 enumerable: !0,
6603 configurable: !0
6604 }),
6605 Object.defineProperty(Ai.prototype, "bannerImageUrl", {
6606 get: function() {
6607 return this.json.BannerImageUrl
6608 },
6609 set: function(e) {
6610 this.json.BannerImageUrl = e,
6611 this._bannerImageDirty = !0
6612 },
6613 enumerable: !0,
6614 configurable: !0
6615 }),
6616 Object.defineProperty(Ai.prototype, "topicHeader", {
6617 get: function() {
6618 return Object(y.x)(this.json.TopicHeader) ? this.json.TopicHeader : ""
6619 },
6620 set: function(e) {
6621 this.json.TopicHeader = e,
6622 this._layoutPart.properties.topicHeader = e,
6623 Object(y.A)(e) && (this.showTopicHeader = !1)
6624 },
6625 enumerable: !0,
6626 configurable: !0
6627 }),
6628 Object.defineProperty(Ai.prototype, "title", {
6629 get: function() {
6630 return this._layoutPart.properties.title
6631 },
6632 set: function(e) {
6633 this.json.Title = e,
6634 this._layoutPart.properties.title = e
6635 },
6636 enumerable: !0,
6637 configurable: !0
6638 }),
6639 Object.defineProperty(Ai.prototype, "layoutType", {
6640 get: function() {
6641 return this._layoutPart.properties.layoutType
6642 },
6643 set: function(e) {
6644 this._layoutPart.properties.layoutType = e
6645 },
6646 enumerable: !0,
6647 configurable: !0
6648 }),
6649 Object.defineProperty(Ai.prototype, "headerTextAlignment", {
6650 get: function() {
6651 return this._layoutPart.properties.textAlignment
6652 },
6653 set: function(e) {
6654 this._layoutPart.properties.textAlignment = e
6655 },
6656 enumerable: !0,
6657 configurable: !0
6658 }),
6659 Object.defineProperty(Ai.prototype, "showTopicHeader", {
6660 get: function() {
6661 return this._layoutPart.properties.showTopicHeader
6662 },
6663 set: function(e) {
6664 this._layoutPart.properties.showTopicHeader = e
6665 },
6666 enumerable: !0,
6667 configurable: !0
6668 }),
6669 Object.defineProperty(Ai.prototype, "showPublishDate", {
6670 get: function() {
6671 return this._layoutPart.properties.showPublishDate
6672 },
6673 set: function(e) {
6674 this._layoutPart.properties.showPublishDate = e
6675 },
6676 enumerable: !0,
6677 configurable: !0
6678 }),
6679 Object.defineProperty(Ai.prototype, "hasVerticalSection", {
6680 get: function() {
6681 return -1 < this.sections.findIndex(function(e) {
6682 return 2 === e.layoutIndex
6683 })
6684 },
6685 enumerable: !0,
6686 configurable: !0
6687 }),
6688 Object.defineProperty(Ai.prototype, "verticalSection", {
6689 get: function() {
6690 return this.hasVerticalSection ? this.addVerticalSection() : null
6691 },
6692 enumerable: !0,
6693 configurable: !0
6694 }),
6695 Ai.prototype.addSection = function() {
6696 var e = new ji(this,Yr(this.sections),1);
6697 return this.sections.push(e),
6698 e
6699 }
6700 ,
6701 Ai.prototype.addVerticalSection = function() {
6702 var e = this.sections.findIndex(function(e) {
6703 return 2 === e.layoutIndex
6704 });
6705 if (-1 < e)
6706 return this.sections[e];
6707 var t = new ji(this,Yr(this.sections),2);
6708 return this.sections.push(t),
6709 t
6710 }
6711 ,
6712 Ai.prototype.fromJSON = function(e) {
6713 this.json = e;
6714 var t = JSON.parse(e.CanvasContent1)
6715 , n = JSON.parse(e.LayoutWebpartsContent);
6716 return n && 0 < n.length && (this._layoutPart = n[0]),
6717 this.setControls(t),
6718 this
6719 }
6720 ,
6721 Ai.prototype.load = function() {
6722 return Object(g.a)(this, void 0, void 0, function() {
6723 var t, n;
6724 return Object(g.d)(this, function(e) {
6725 switch (e.label) {
6726 case 0:
6727 return [4, this.getItem("Id", "CommentsDisabled")];
6728 case 1:
6729 return t = e.sent(),
6730 [4, Ge(this, "_api/sitepages/pages(" + t.Id + ")")()];
6731 case 2:
6732 return n = e.sent(),
6733 this.commentsDisabled = t.CommentsDisabled,
6734 [2, this.fromJSON(n)]
6735 }
6736 })
6737 })
6738 }
6739 ,
6740 Ai.prototype.save = function(b) {
6741 return void 0 === b && (b = !0),
6742 Object(g.a)(this, void 0, void 0, function() {
6743 var t, n, r, i, o, s, a, c, u, l, p, d, h, f;
6744 return Object(g.d)(this, function(e) {
6745 switch (e.label) {
6746 case 0:
6747 if (null === this.json.Id)
6748 throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");
6749 return this._bannerImageDirty ? (t = this.json.BannerImageUrl,
6750 Object(y.s)(t) && (t = t.replace(/^https?:\/\/[a-z0-9\.]*?\.[a-z]{2,3}\//i, "/")),
6751 n = yt(Te(this.toUrl())),
6752 r = Tt(Te(this.toUrl())),
6753 i = r.getFileByServerRelativePath(t),
6754 u = c = a = s = o = "",
6755 l = r.createBatch(),
6756 n.select("Id", "Url").inBatch(l)().then(function(e) {
6757 return o = e.Id
6758 }),
6759 r.select("Id", "Url").inBatch(l)().then(function(e) {
6760 s = e.Id,
6761 u = e.Url
6762 }),
6763 i.listItemAllFields.select("UniqueId", "ParentList/Id").expand("ParentList").inBatch(l)().then(function(e) {
6764 a = e.UniqueId,
6765 c = e.ParentList.Id
6766 }),
6767 [4, l.execute()]) : [3, 2];
6768 case 1:
6769 e.sent(),
6770 (p = Ge(u, "_layouts/15/getpreview.ashx")).query.set("guidSite", "" + o),
6771 p.query.set("guidWeb", "" + s),
6772 p.query.set("guidFile", "" + a),
6773 this.bannerImageUrl = p.toUrlAndQuery(),
6774 Object(y.x)(this._layoutPart.serverProcessedContent) || (this._layoutPart.serverProcessedContent = {}),
6775 this._layoutPart.serverProcessedContent.imageSources = {
6776 imageSource: t
6777 },
6778 Object(y.x)(this._layoutPart.serverProcessedContent.customMetadata) || (this._layoutPart.serverProcessedContent.customMetadata = {}),
6779 this._layoutPart.serverProcessedContent.customMetadata.imageSource = {
6780 listId: c,
6781 siteId: o,
6782 uniqueId: a,
6783 webId: s
6784 },
6785 this._layoutPart.properties.webId = s,
6786 this._layoutPart.properties.siteId = o,
6787 this._layoutPart.properties.listId = c,
6788 this._layoutPart.properties.uniqueId = a,
6789 e.label = 2;
6790 case 2:
6791 return this.json.IsPageCheckedOutToCurrentUser ? [3, 4] : [4, De(fi(this, "_api/sitepages/pages(" + this.json.Id + ")/checkoutpage"))];
6792 case 3:
6793 e.sent(),
6794 e.label = 4;
6795 case 4:
6796 return d = Object.assign(Se("SP.Publishing.SitePage"), {
6797 AuthorByline: this.json.AuthorByline || [],
6798 BannerImageUrl: this.bannerImageUrl,
6799 CanvasContent1: this.getCanvasContent1(),
6800 LayoutWebpartsContent: this.getLayoutWebpartsContent(),
6801 Title: this.title,
6802 TopicHeader: this.topicHeader
6803 }),
6804 h = fi(this, "_api/sitepages/pages(" + this.json.Id + ")/savepage"),
6805 [4, De(h, me({
6806 "if-match": "*"
6807 }, ve(d)))];
6808 case 5:
6809 return e.sent(),
6810 f = !0,
6811 b ? [4, De(fi(this, "_api/sitepages/pages(" + this.json.Id + ")/publish"))] : [3, 7];
6812 case 6:
6813 (f = e.sent()) && (this.json.IsPageCheckedOutToCurrentUser = !1),
6814 e.label = 7;
6815 case 7:
6816 return this._bannerImageDirty = !1,
6817 [2, f]
6818 }
6819 })
6820 })
6821 }
6822 ,
6823 Ai.prototype.discardPageCheckout = function() {
6824 return Object(g.a)(this, void 0, void 0, function() {
6825 var t;
6826 return Object(g.d)(this, function(e) {
6827 switch (e.label) {
6828 case 0:
6829 if (null === this.json.Id)
6830 throw Error("The id for this page is null. If you want to create a new page, please use ClientSidePage.Create");
6831 return [4, De(fi(this, "_api/sitepages/pages(" + this.json.Id + ")/discardPage"), ve(Se("SP.Publishing.SitePage")))];
6832 case 1:
6833 return t = e.sent(),
6834 this.fromJSON(t),
6835 [2]
6836 }
6837 })
6838 })
6839 }
6840 ,
6841 Ai.prototype.promoteToNews = function() {
6842 return Object(g.a)(this, void 0, void 0, function() {
6843 return Object(g.d)(this, function(e) {
6844 return [2, this.promoteNewsImpl("promoteToNews")]
6845 })
6846 })
6847 }
6848 ,
6849 Ai.prototype.findControlById = function(t) {
6850 return this.findControl(function(e) {
6851 return e.id === t
6852 })
6853 }
6854 ,
6855 Ai.prototype.findControl = function(e) {
6856 for (var t = 0; t < this.sections.length; t++)
6857 for (var n = 0; n < this.sections[t].columns.length; n++)
6858 for (var r = 0; r < this.sections[t].columns[n].controls.length; r++)
6859 if (e(this.sections[t].columns[n].controls[r]))
6860 return this.sections[t].columns[n].controls[r];
6861 return null
6862 }
6863 ,
6864 Ai.prototype.copy = function(n, r, i, o) {
6865 return void 0 === o && (o = !0),
6866 Object(g.a)(this, void 0, void 0, function() {
6867 var t;
6868 return Object(g.d)(this, function(e) {
6869 switch (e.label) {
6870 case 0:
6871 return [4, Si(n, r, i, this.pageLayout)];
6872 case 1:
6873 return (t = e.sent()).setControls(this.getControls()),
6874 [4, t.save(o)];
6875 case 2:
6876 return e.sent(),
6877 [2, t]
6878 }
6879 })
6880 })
6881 }
6882 ,
6883 Ai.prototype.setBannerImage = function(e, t) {
6884 this.bannerImageUrl = e,
6885 this._layoutPart.properties.imageSourceType = 2,
6886 Object(y.x)(t) && (Object(y.p)(t, "translateX") && (this._layoutPart.properties.translateX = t.translateX),
6887 Object(y.p)(t, "translateY") && (this._layoutPart.properties.translateY = t.translateY),
6888 Object(y.p)(t, "imageSourceType") && (this._layoutPart.properties.imageSourceType = t.imageSourceType),
6889 Object(y.p)(t, "altText") && (this._layoutPart.properties.altText = t.altText))
6890 }
6891 ,
6892 Ai.prototype.getItem = function() {
6893 for (var o = [], e = 0; e < arguments.length; e++)
6894 o[e] = arguments[e];
6895 return Object(g.a)(this, void 0, void 0, function() {
6896 var t, n, r, i;
6897 return Object(g.d)(this, function(e) {
6898 switch (e.label) {
6899 case 0:
6900 return t = fi(this, "/_api/lists/EnsureClientRenderedSitePagesLibrary").select("EnableModeration", "EnableMinorVersions", "Id"),
6901 [4, De(t)];
6902 case 1:
6903 return n = e.sent(),
6904 [4, (r = kt(n["odata.id"]).configureFrom(this).items.getById(this.json.Id)).select.apply(r, o)()];
6905 case 2:
6906 return i = e.sent(),
6907 [2, Object(y.h)(zt(Ze(i)).configureFrom(this), i)]
6908 }
6909 })
6910 })
6911 }
6912 ,
6913 Ai.prototype.assign = function(e, t) {
6914 this.data.parentUrl = e.data.url,
6915 this.data.url = Object(y.i)(this.data.parentUrl, t || ""),
6916 this.configureFrom(e)
6917 }
6918 ,
6919 Ai.prototype.getCanvasContent1 = function() {
6920 return JSON.stringify(this.getControls())
6921 }
6922 ,
6923 Ai.prototype.getLayoutWebpartsContent = function() {
6924 return this._layoutPart ? JSON.stringify([this._layoutPart]) : JSON.stringify(null)
6925 }
6926 ,
6927 Ai.prototype.setControls = function(e) {
6928 if (e && e.length) {
6929 for (var t = 0; t < e.length; t++)
6930 switch (Object(y.p)(e[t], "controlType") ? e[t].controlType : 0) {
6931 case 0:
6932 Object(y.p)(e[t], "pageSettingsSlice") ? this._pageSettings = e[t] : this.mergeColumnToTree(new Ti(e[t]));
6933 break;
6934 case 3:
6935 var n = new Pi(e[t]);
6936 this.mergePartToTree(n, n.data.position);
6937 break;
6938 case 4:
6939 var r = e[t]
6940 , i = new Ii(r.innerHTML,r);
6941 this.mergePartToTree(i, i.data.position)
6942 }
6943 Zr(this.sections)
6944 }
6945 }
6946 ,
6947 Ai.prototype.getControls = function() {
6948 var n = this;
6949 Zr(this.sections);
6950 var r = [];
6951 return this.sections.forEach(function(t) {
6952 t.columns.forEach(function(e) {
6953 e.controls.length < 1 ? r.push({
6954 displayMode: e.data.displayMode,
6955 emphasis: n.getEmphasisObj(t.emphasis),
6956 position: e.data.position
6957 }) : e.controls.forEach(function(e) {
6958 e.data.emphasis = n.getEmphasisObj(t.emphasis),
6959 r.push(e.data)
6960 })
6961 })
6962 }),
6963 r.push(this._pageSettings),
6964 r
6965 }
6966 ,
6967 Ai.prototype.getEmphasisObj = function(e) {
6968 return e < 1 || 3 < e ? {} : {
6969 zoneEmphasis: e
6970 }
6971 }
6972 ,
6973 Ai.prototype.promoteNewsImpl = function(t) {
6974 return Object(g.a)(this, void 0, void 0, function() {
6975 return Object(g.d)(this, function(e) {
6976 switch (e.label) {
6977 case 0:
6978 if (null === this.json.Id)
6979 throw Error("The id for this page is null.");
6980 return Object(y.A)(this.json.VersionInfo.LastVersionCreatedBy) && new Date(this.json.VersionInfo.LastVersionCreated).getFullYear() < 2e3 ? [4, this.save(!0)] : [3, 2];
6981 case 1:
6982 e.sent(),
6983 e.label = 2;
6984 case 2:
6985 return [4, De(fi(this, "_api/sitepages/pages(" + this.json.Id + ")/" + t), ve(Se("SP.Publishing.SitePage")))];
6986 case 3:
6987 return [2, e.sent()]
6988 }
6989 })
6990 })
6991 }
6992 ,
6993 Ai.prototype.mergePartToTree = function(e, t) {
6994 var n = null
6995 , r = 12
6996 , i = 0
6997 , o = 0
6998 , s = 1;
6999 t && (Object(y.p)(t, "zoneIndex") && (o = t.zoneIndex),
7000 Object(y.p)(t, "sectionIndex") && (i = t.sectionIndex),
7001 Object(y.p)(t, "sectionFactor") && (r = t.sectionFactor),
7002 Object(y.p)(t, "layoutIndex") && (s = t.layoutIndex));
7003 var a = this.getOrCreateSection(o, s, e.data.emphasis.zoneEmphasis || 0)
7004 , c = a.columns.filter(function(e) {
7005 return e.order === i
7006 });
7007 n = c.length < 1 ? a.addColumn(r, s) : c[0],
7008 (e.column = n).addControl(e)
7009 }
7010 ,
7011 Ai.prototype.mergeColumnToTree = function(e) {
7012 var t = Object(y.p)(e.data, "position") && Object(y.p)(e.data.position, "zoneIndex") ? e.data.position.zoneIndex : 0
7013 , n = Object(y.p)(e.data, "position") && Object(y.p)(e.data.position, "layoutIndex") ? e.data.position.layoutIndex : 1
7014 , r = this.getOrCreateSection(t, n, e.data.emphasis.zoneEmphasis || 0);
7015 (e.section = r).columns.push(e)
7016 }
7017 ,
7018 Ai.prototype.getOrCreateSection = function(t, n, e) {
7019 var r = null
7020 , i = this.sections.filter(function(e) {
7021 return e.order === t && e.layoutIndex === n
7022 });
7023 return i.length < 1 ? ((r = 2 === n ? this.addVerticalSection() : this.addSection()).order = t,
7024 r.emphasis = e) : r = i[0],
7025 r
7026 }
7027 ,
7028 Object(g.b)([we("csp.load")], Ai.prototype, "load", null),
7029 Object(g.b)([we("csp.save")], Ai.prototype, "save", null),
7030 Object(g.b)([we("csp.discardPageCheckout")], Ai.prototype, "discardPageCheckout", null),
7031 Object(g.b)([we("csp.promoteToNews")], Ai.prototype, "promoteToNews", null),
7032 Object(g.b)([we("csp.copy")], Ai.prototype, "copy", null),
7033 Object(g.b)([we("csp.getItem")], Ai.prototype, "getItem", null),
7034 Ai), vi = function(e, t, n, r, i, o) {
7035 return void 0 === r && (r = !1),
7036 void 0 === i && (i = []),
7037 void 0 === o && (o = !1),
7038 K(Oi)(e, t, n, r, i, o)
7039 }, mi = function(n) {
7040 return Object(g.a)(void 0, void 0, void 0, function() {
7041 var t;
7042 return Object(g.d)(this, function(e) {
7043 switch (e.label) {
7044 case 0:
7045 return [4, n.getItem()];
7046 case 1:
7047 return t = e.sent(),
7048 [2, vi(Te(n.toUrl()), "", {
7049 Id: t.Id
7050 }, !0).configureFrom(n).load()]
7051 }
7052 })
7053 })
7054 }, Si = function(r, i, o, s) {
7055 return void 0 === s && (s = "Article"),
7056 Object(g.a)(void 0, void 0, void 0, function() {
7057 var t, n;
7058 return Object(g.d)(this, function(e) {
7059 switch (e.label) {
7060 case 0:
7061 return i = i.replace(/\.aspx$/i, ""),
7062 [4, De(fi(r, "_api/sitepages/pages"), ve(Object.assign(Se("SP.Publishing.SitePage"), {
7063 PageLayoutType: s
7064 })))];
7065 case 1:
7066 return t = e.sent(),
7067 (n = vi(r, "", t)).title = i,
7068 [4, n.save(!1)];
7069 case 2:
7070 return e.sent(),
7071 n.title = o,
7072 [2, n]
7073 }
7074 })
7075 })
7076 }, ji = (Object.defineProperty(Ni.prototype, "order", {
7077 get: function() {
7078 return this._order
7079 },
7080 set: function(e) {
7081 this._order = e;
7082 for (var t = 0; t < this.columns.length; t++)
7083 this.columns[t].data.position.zoneIndex = e
7084 },
7085 enumerable: !0,
7086 configurable: !0
7087 }),
7088 Object.defineProperty(Ni.prototype, "layoutIndex", {
7089 get: function() {
7090 return this._layoutIndex
7091 },
7092 set: function(e) {
7093 this._layoutIndex = e;
7094 for (var t = 0; t < this.columns.length; t++)
7095 this.columns[t].data.position.layoutIndex = e
7096 },
7097 enumerable: !0,
7098 configurable: !0
7099 }),
7100 Object.defineProperty(Ni.prototype, "defaultColumn", {
7101 get: function() {
7102 return this.columns.length < 1 && this.addColumn(12),
7103 this.columns[0]
7104 },
7105 enumerable: !0,
7106 configurable: !0
7107 }),
7108 Ni.prototype.addColumn = function(e, t) {
7109 void 0 === t && (t = 1);
7110 var n = new Ti;
7111 return n.section = this,
7112 n.data.position.zoneIndex = this.order,
7113 n.data.position.layoutIndex = t,
7114 n.data.position.sectionFactor = e,
7115 n.order = Yr(this.columns),
7116 this.columns.push(n),
7117 n
7118 }
7119 ,
7120 Ni.prototype.addControl = function(e) {
7121 return this.defaultColumn.addControl(e),
7122 this
7123 }
7124 ,
7125 Object.defineProperty(Ni.prototype, "emphasis", {
7126 get: function() {
7127 return this._emphasis
7128 },
7129 set: function(e) {
7130 this._emphasis = e
7131 },
7132 enumerable: !0,
7133 configurable: !0
7134 }),
7135 Ni.prototype.remove = function() {
7136 var t = this;
7137 this.page.sections = this.page.sections.filter(function(e) {
7138 return e._memId !== t._memId
7139 }),
7140 Zr(this.page.sections)
7141 }
7142 ,
7143 Ni), Ti = (Object.defineProperty(Ri.prototype, "data", {
7144 get: function() {
7145 return this.json
7146 },
7147 enumerable: !0,
7148 configurable: !0
7149 }),
7150 Object.defineProperty(Ri.prototype, "section", {
7151 get: function() {
7152 return this._section
7153 },
7154 set: function(e) {
7155 this._section = e
7156 },
7157 enumerable: !0,
7158 configurable: !0
7159 }),
7160 Object.defineProperty(Ri.prototype, "order", {
7161 get: function() {
7162 return this.data.position.sectionIndex
7163 },
7164 set: function(e) {
7165 this.data.position.sectionIndex = e;
7166 for (var t = 0; t < this.controls.length; t++)
7167 this.controls[t].data.position.zoneIndex = this.data.position.zoneIndex,
7168 this.controls[t].data.position.layoutIndex = this.data.position.layoutIndex,
7169 this.controls[t].data.position.sectionIndex = e
7170 },
7171 enumerable: !0,
7172 configurable: !0
7173 }),
7174 Object.defineProperty(Ri.prototype, "factor", {
7175 get: function() {
7176 return this.data.position.sectionFactor
7177 },
7178 set: function(e) {
7179 this.data.position.sectionFactor = e
7180 },
7181 enumerable: !0,
7182 configurable: !0
7183 }),
7184 Ri.prototype.addControl = function(e) {
7185 return (e.column = this).controls.push(e),
7186 this
7187 }
7188 ,
7189 Ri.prototype.getControl = function(e) {
7190 return this.controls[e]
7191 }
7192 ,
7193 Ri.prototype.remove = function() {
7194 var t = this;
7195 this.section.columns = this.section.columns.filter(function(e) {
7196 return e._memId !== t._memId
7197 }),
7198 Zr(this.section.columns)
7199 }
7200 ,
7201 Ri.Default = {
7202 controlType: 0,
7203 displayMode: 2,
7204 emphasis: {},
7205 position: {
7206 layoutIndex: 1,
7207 sectionFactor: 12,
7208 sectionIndex: 1,
7209 zoneIndex: 1
7210 }
7211 },
7212 Ri), wi = (Object.defineProperty(Ei.prototype, "id", {
7213 get: function() {
7214 return this.json.id
7215 },
7216 enumerable: !0,
7217 configurable: !0
7218 }),
7219 Object.defineProperty(Ei.prototype, "data", {
7220 get: function() {
7221 return this.json
7222 },
7223 enumerable: !0,
7224 configurable: !0
7225 }),
7226 Object.defineProperty(Ei.prototype, "column", {
7227 get: function() {
7228 return this._column
7229 },
7230 set: function(e) {
7231 this._column = e,
7232 this.onColumnChange(this._column)
7233 },
7234 enumerable: !0,
7235 configurable: !0
7236 }),
7237 Ei.prototype.remove = function() {
7238 var t = this;
7239 this.column.controls = this.column.controls.filter(function(e) {
7240 return e.id !== t.id
7241 }),
7242 Zr(this.column.controls)
7243 }
7244 ,
7245 Ei.prototype.setData = function(e) {
7246 this.json = e
7247 }
7248 ,
7249 Ei), Ii = (yi = wi,
7250 Object(g.c)(Ci, yi),
7251 Object.defineProperty(Ci.prototype, "text", {
7252 get: function() {
7253 return this.data.innerHTML
7254 },
7255 set: function(e) {
7256 e.startsWith("<p>") || (e = "<p>" + e + "</p>"),
7257 this.data.innerHTML = e
7258 },
7259 enumerable: !0,
7260 configurable: !0
7261 }),
7262 Object.defineProperty(Ci.prototype, "order", {
7263 get: function() {
7264 return this.data.position.controlIndex
7265 },
7266 set: function(e) {
7267 this.data.position.controlIndex = e
7268 },
7269 enumerable: !0,
7270 configurable: !0
7271 }),
7272 Ci.prototype.onColumnChange = function(e) {
7273 this.data.position.sectionFactor = e.factor,
7274 this.data.position.controlIndex = Yr(e.controls),
7275 this.data.position.zoneIndex = e.data.position.zoneIndex,
7276 this.data.position.sectionIndex = e.order,
7277 this.data.position.layoutIndex = e.data.position.layoutIndex
7278 }
7279 ,
7280 Ci.Default = {
7281 addedFromPersistedData: !1,
7282 anchorComponentId: "",
7283 controlType: 4,
7284 displayMode: 2,
7285 editorType: "CKEditor",
7286 emphasis: {},
7287 id: "",
7288 innerHTML: "",
7289 position: {
7290 controlIndex: 1,
7291 layoutIndex: 1,
7292 sectionFactor: 12,
7293 sectionIndex: 1,
7294 zoneIndex: 1
7295 }
7296 },
7297 Ci), Pi = (bi = wi,
7298 Object(g.c)(_i, bi),
7299 _i.fromComponentDef = function(e) {
7300 var t = new _i;
7301 return t.import(e),
7302 t
7303 }
7304 ,
7305 Object.defineProperty(_i.prototype, "title", {
7306 get: function() {
7307 return this.data.webPartData.title
7308 },
7309 set: function(e) {
7310 this.data.webPartData.title = e
7311 },
7312 enumerable: !0,
7313 configurable: !0
7314 }),
7315 Object.defineProperty(_i.prototype, "description", {
7316 get: function() {
7317 return this.data.webPartData.description
7318 },
7319 set: function(e) {
7320 this.data.webPartData.description = e
7321 },
7322 enumerable: !0,
7323 configurable: !0
7324 }),
7325 Object.defineProperty(_i.prototype, "order", {
7326 get: function() {
7327 return this.data.position.controlIndex
7328 },
7329 set: function(e) {
7330 this.data.position.controlIndex = e
7331 },
7332 enumerable: !0,
7333 configurable: !0
7334 }),
7335 Object.defineProperty(_i.prototype, "height", {
7336 get: function() {
7337 return this.data.reservedHeight
7338 },
7339 set: function(e) {
7340 this.data.reservedHeight = e
7341 },
7342 enumerable: !0,
7343 configurable: !0
7344 }),
7345 Object.defineProperty(_i.prototype, "width", {
7346 get: function() {
7347 return this.data.reservedWidth
7348 },
7349 set: function(e) {
7350 this.data.reservedWidth = e
7351 },
7352 enumerable: !0,
7353 configurable: !0
7354 }),
7355 Object.defineProperty(_i.prototype, "dataVersion", {
7356 get: function() {
7357 return this.data.webPartData.dataVersion
7358 },
7359 set: function(e) {
7360 this.data.webPartData.dataVersion = e
7361 },
7362 enumerable: !0,
7363 configurable: !0
7364 }),
7365 _i.prototype.setProperties = function(e) {
7366 return this.data.webPartData.properties = Object(y.h)(this.data.webPartData.properties, e),
7367 this
7368 }
7369 ,
7370 _i.prototype.getProperties = function() {
7371 return this.data.webPartData.properties
7372 }
7373 ,
7374 _i.prototype.onColumnChange = function(e) {
7375 this.data.position.sectionFactor = e.factor,
7376 this.data.position.controlIndex = Yr(e.controls),
7377 this.data.position.zoneIndex = e.data.position.zoneIndex,
7378 this.data.position.sectionIndex = e.data.position.sectionIndex,
7379 this.data.position.layoutIndex = e.data.position.layoutIndex
7380 }
7381 ,
7382 _i.prototype.import = function(e) {
7383 var t = Object(y.m)()
7384 , n = e.Id.replace(/^\{|\}$/g, "").toLowerCase()
7385 , r = JSON.parse(e.Manifest).preconfiguredEntries[0];
7386 this.setData(Object.assign({}, this.data, {
7387 id: t,
7388 webPartData: {
7389 dataVersion: "1.0",
7390 description: r.description.default,
7391 id: n,
7392 instanceId: t,
7393 properties: r.properties,
7394 title: r.title.default
7395 },
7396 webPartId: n
7397 }))
7398 }
7399 ,
7400 _i.Default = {
7401 addedFromPersistedData: !1,
7402 controlType: 3,
7403 displayMode: 2,
7404 emphasis: {},
7405 id: null,
7406 position: {
7407 controlIndex: 1,
7408 layoutIndex: 1,
7409 sectionFactor: 12,
7410 sectionIndex: 1,
7411 zoneIndex: 1
7412 },
7413 reservedHeight: 500,
7414 reservedWidth: 500,
7415 webPartData: null,
7416 webPartId: null
7417 },
7418 _i);
7419 function _i(e) {
7420 return void 0 === e && (e = JSON.parse(JSON.stringify(_i.Default))),
7421 bi.call(this, e) || this
7422 }
7423 function Ci(e, t) {
7424 void 0 === t && (t = JSON.parse(JSON.stringify(Ci.Default)));
7425 var n = this;
7426 return Object(y.A)(t.id) && (t.id = Object(y.m)(),
7427 t.anchorComponentId = t.id),
7428 (n = yi.call(this, t) || this).text = e,
7429 n
7430 }
7431 function Ei(e) {
7432 this.json = e
7433 }
7434 function Ri(e, t) {
7435 void 0 === e && (e = JSON.parse(JSON.stringify(Ri.Default))),
7436 void 0 === t && (t = []),
7437 this.json = e,
7438 this.controls = t,
7439 this._section = null,
7440 this._memId = Object(y.m)()
7441 }
7442 function Ni(e, t, n, r, i) {
7443 void 0 === r && (r = []),
7444 void 0 === i && (i = 0),
7445 this.page = e,
7446 this.columns = r,
7447 this._emphasis = i,
7448 this._memId = Object(y.m)(),
7449 this._order = t,
7450 this._layoutIndex = n
7451 }
7452 function Ai(e, t, n, r, i, o) {
7453 void 0 === r && (r = !1),
7454 void 0 === i && (i = []),
7455 void 0 === o && (o = !1);
7456 var s = gi.call(this, e, t) || this;
7457 return s.json = n,
7458 s.sections = i,
7459 s.commentsDisabled = o,
7460 s._bannerImageDirty = !1,
7461 "string" == typeof e ? (s.data.parentUrl = "",
7462 s.data.url = Object(y.i)(Te(e), t)) : s.assign(fi(e, null), t),
7463 s._pageSettings = {
7464 controlType: 0,
7465 pageSettingsSlice: {
7466 isDefaultDescription: !0,
7467 isDefaultThumbnail: !0
7468 }
7469 },
7470 s._layoutPart = Ai.getDefaultLayoutPart(),
7471 void 0 === n || r || s.fromJSON(n),
7472 s
7473 }
7474 jt.prototype.getClientsideWebParts = function() {
7475 return this.clone(He, "GetClientSideWebParts")()
7476 }
7477 ,
7478 jt.prototype.addClientsidePage = function(e, t, n) {
7479 return void 0 === t && (t = e.replace(/\.[^/.]+$/, "")),
7480 Si(this, e, t, n)
7481 }
7482 ,
7483 jt.prototype.loadClientsidePage = function(e) {
7484 return mi(this.getFileByServerRelativePath(e))
7485 }
7486 ;
7487 var Ui, xi, Di, ki, Li = (ki = We,
7488 Object(g.c)(zi, ki),
7489 zi.prototype.addAvailableContentType = function(n) {
7490 return Object(g.a)(this, void 0, void 0, function() {
7491 var t;
7492 return Object(g.d)(this, function(e) {
7493 switch (e.label) {
7494 case 0:
7495 return [4, De(this.clone(Fi, "addAvailableContentType"), ve({
7496 contentTypeId: n
7497 }))];
7498 case 1:
7499 return t = e.sent(),
7500 [2, {
7501 contentType: this.getById(t.id),
7502 data: t
7503 }]
7504 }
7505 })
7506 })
7507 }
7508 ,
7509 zi.prototype.getById = function(e) {
7510 return we.configure(Mi(this).concat("('" + e + "')"), "cts.getById")
7511 }
7512 ,
7513 zi.prototype.add = function(r, i, o, s, a) {
7514 return void 0 === o && (o = ""),
7515 void 0 === s && (s = "Custom Content Types"),
7516 void 0 === a && (a = {}),
7517 Object(g.a)(this, void 0, void 0, function() {
7518 var t, n;
7519 return Object(g.d)(this, function(e) {
7520 switch (e.label) {
7521 case 0:
7522 return t = ve(Object.assign(Se("SP.ContentType"), {
7523 Description: o,
7524 Group: s,
7525 Id: {
7526 StringValue: r
7527 },
7528 Name: i
7529 }, a)),
7530 [4, De(this, t)];
7531 case 1:
7532 return n = e.sent(),
7533 [2, {
7534 contentType: this.getById(n.id),
7535 data: n
7536 }]
7537 }
7538 })
7539 })
7540 }
7541 ,
7542 Object(g.b)([we("cts.addAvailableContentType")], zi.prototype, "addAvailableContentType", null),
7543 Object(g.b)([we("cts.add")], zi.prototype, "add", null),
7544 Object(g.b)([Ye("contenttypes")], zi)), Fi = Me(Li), Bi = (Di = Ve,
7545 Object(g.c)(Qi, Di),
7546 Object.defineProperty(Qi.prototype, "fieldLinks", {
7547 get: function() {
7548 return we.configure(Gi(this), "ct.fieldLinks")
7549 },
7550 enumerable: !0,
7551 configurable: !0
7552 }),
7553 Object.defineProperty(Qi.prototype, "fields", {
7554 get: function() {
7555 return we.configure(He(this, "fields"), "ct.fields")
7556 },
7557 enumerable: !0,
7558 configurable: !0
7559 }),
7560 Object.defineProperty(Qi.prototype, "parent", {
7561 get: function() {
7562 return we.configure(Mi(this, "parent"), "ct.parent")
7563 },
7564 enumerable: !0,
7565 configurable: !0
7566 }),
7567 Object.defineProperty(Qi.prototype, "workflowAssociations", {
7568 get: function() {
7569 return we.configure(He(this, "workflowAssociations"), "ct.workflowAssociations")
7570 },
7571 enumerable: !0,
7572 configurable: !0
7573 }),
7574 Qi), Mi = Me(Bi), qi = (xi = We,
7575 Object(g.c)(Ki, xi),
7576 Ki.prototype.getById = function(e) {
7577 return we.configure(Hi(this).concat("(guid'" + e + "')"), "fls.getById")
7578 }
7579 ,
7580 Object(g.b)([Ye("fieldlinks")], Ki)), Gi = Me(qi), Wi = (Ui = Ve,
7581 Object(g.c)(Vi, Ui),
7582 Vi), Hi = Me(Wi);
7583 function Vi() {
7584 return null !== Ui && Ui.apply(this, arguments) || this
7585 }
7586 function Ki() {
7587 return null !== xi && xi.apply(this, arguments) || this
7588 }
7589 function Qi() {
7590 var e = null !== Di && Di.apply(this, arguments) || this;
7591 return e.delete = Je("ct"),
7592 e
7593 }
7594 function zi() {
7595 return null !== ki && ki.apply(this, arguments) || this
7596 }
7597 _(jt, "contentTypes", Fi),
7598 _(Qt, "contentType", Mi, "ContentType"),
7599 _(Dt, "contentTypes", Fi);
7600 var Xi, Ji, $i = (Ji = We,
7601 Object(g.c)(no, Ji),
7602 no.prototype.add = function(t, n) {
7603 return void 0 === n && (n = !1),
7604 Object(g.a)(this, void 0, void 0, function() {
7605 return Object(g.d)(this, function(e) {
7606 switch (e.label) {
7607 case 0:
7608 return [4, De(this.clone(Yi, "add"), ve({
7609 featdefScope: 0,
7610 featureId: t,
7611 force: n
7612 }))];
7613 case 1:
7614 return [2, {
7615 data: e.sent(),
7616 feature: this.getById(t)
7617 }]
7618 }
7619 })
7620 })
7621 }
7622 ,
7623 no.prototype.getById = function(e) {
7624 var t = eo(this);
7625 return t.concat("('" + e + "')"),
7626 we.configure(t, "fes.getById")
7627 }
7628 ,
7629 no.prototype.remove = function(e, t) {
7630 return void 0 === t && (t = !1),
7631 De(this.clone(Yi, "remove"), ve({
7632 featureId: e,
7633 force: t
7634 }))
7635 }
7636 ,
7637 Object(g.b)([we("fes.add")], no.prototype, "add", null),
7638 Object(g.b)([we("fes.remove")], no.prototype, "remove", null),
7639 Object(g.b)([Ye("features")], no)), Yi = Me($i), Zi = (Xi = Ve,
7640 Object(g.c)(to, Xi),
7641 to.prototype.deactivate = function(i) {
7642 return void 0 === i && (i = !1),
7643 Object(g.a)(this, void 0, void 0, function() {
7644 var t, n, r;
7645 return Object(g.d)(this, function(e) {
7646 switch (e.label) {
7647 case 0:
7648 return t = this.addBatchDependency(),
7649 [4, eo(this).select("DefinitionId")()];
7650 case 1:
7651 return n = e.sent(),
7652 r = this.getParent(Yi, this.parentUrl, "", this.batch).remove(n.DefinitionId, i),
7653 t(),
7654 [2, r]
7655 }
7656 })
7657 })
7658 }
7659 ,
7660 Object(g.b)([we("fe.deactivate")], to.prototype, "deactivate", null),
7661 to), eo = Me(Zi);
7662 function to() {
7663 return null !== Xi && Xi.apply(this, arguments) || this
7664 }
7665 function no() {
7666 return null !== Ji && Ji.apply(this, arguments) || this
7667 }
7668 _(bt, "features", Yi),
7669 _(jt, "features", Yi);
7670 var ro, io, oo, so, ao, co, uo, lo, po, ho, fo, bo, yo, go, Oo, vo, mo, So, jo = (ho = We,
7671 Object(g.c)(_o, ho),
7672 _o.prototype.getById = function(e) {
7673 return we.configure(Io(this).concat("('" + e + "')"), "fs.getById")
7674 }
7675 ,
7676 _o.prototype.getByTitle = function(e) {
7677 return we.configure(Io(this, "getByTitle('" + e + "')"), "fs.getByTitle")
7678 }
7679 ,
7680 _o.prototype.getByInternalNameOrTitle = function(e) {
7681 return we.configure(Io(this, "getByInternalNameOrTitle('" + e + "')"), "fs.getByInternalNameOrTitle")
7682 }
7683 ,
7684 _o.prototype.createFieldAsXml = function(r) {
7685 return Object(g.a)(this, void 0, void 0, function() {
7686 var t, n;
7687 return Object(g.d)(this, function(e) {
7688 switch (e.label) {
7689 case 0:
7690 return "string" == typeof r && (r = {
7691 SchemaXml: r
7692 }),
7693 t = ve({
7694 parameters: Object(y.h)(Se("SP.XmlSchemaFieldCreationInformation"), r)
7695 }),
7696 [4, De(this.clone(To, "createfieldasxml"), t)];
7697 case 1:
7698 return [2, {
7699 data: n = e.sent(),
7700 field: this.getById(n.Id)
7701 }]
7702 }
7703 })
7704 })
7705 }
7706 ,
7707 _o.prototype.add = function(r, i, o) {
7708 return Object(g.a)(this, void 0, void 0, function() {
7709 var t, n;
7710 return Object(g.d)(this, function(e) {
7711 switch (e.label) {
7712 case 0:
7713 return t = ve(Object.assign(Se(i), {
7714 Title: r
7715 }, o)),
7716 we.isTagged(this) || we.configure(this, "fs.add"),
7717 [4, De(this.clone(To, null), t)];
7718 case 1:
7719 return [2, {
7720 data: n = e.sent(),
7721 field: this.getById(n.Id)
7722 }]
7723 }
7724 })
7725 })
7726 }
7727 ,
7728 _o.prototype.addText = function(e, t, n) {
7729 void 0 === t && (t = 255);
7730 var r = {
7731 FieldTypeKind: 2,
7732 MaxLength: t
7733 };
7734 return this.add(e, "SP.FieldText", Object(y.h)(r, n))
7735 }
7736 ,
7737 _o.prototype.addCalculated = function(e, t, n, r, i) {
7738 void 0 === r && (r = ro.Text);
7739 var o = {
7740 DateFormat: n,
7741 FieldTypeKind: 17,
7742 Formula: t,
7743 OutputType: r
7744 };
7745 return this.add(e, "SP.FieldCalculated", Object(y.h)(o, i))
7746 }
7747 ,
7748 _o.prototype.addDateTime = function(e, t, n, r, i) {
7749 void 0 === t && (t = io.DateOnly),
7750 void 0 === n && (n = ao.Gregorian),
7751 void 0 === r && (r = oo.Unspecified);
7752 var o = {
7753 DateTimeCalendarType: n,
7754 DisplayFormat: t,
7755 FieldTypeKind: 4,
7756 FriendlyDisplayFormat: r
7757 };
7758 return this.add(e, "SP.FieldDateTime", Object(y.h)(o, i))
7759 }
7760 ,
7761 _o.prototype.addNumber = function(e, t, n, r) {
7762 var i = {
7763 FieldTypeKind: 9
7764 };
7765 return void 0 !== t && (i = Object(y.h)({
7766 MinimumValue: t
7767 }, i)),
7768 void 0 !== n && (i = Object(y.h)({
7769 MaximumValue: n
7770 }, i)),
7771 this.add(e, "SP.FieldNumber", Object(y.h)(i, r))
7772 }
7773 ,
7774 _o.prototype.addCurrency = function(e, t, n, r, i) {
7775 void 0 === r && (r = 1033);
7776 var o = {
7777 CurrencyLocaleId: r,
7778 FieldTypeKind: 10
7779 };
7780 return void 0 !== t && (o = Object(y.h)({
7781 MinimumValue: t
7782 }, o)),
7783 void 0 !== n && (o = Object(y.h)({
7784 MaximumValue: n
7785 }, o)),
7786 this.add(e, "SP.FieldCurrency", Object(y.h)(o, i))
7787 }
7788 ,
7789 _o.prototype.addMultilineText = function(e, t, n, r, i, o, s) {
7790 void 0 === t && (t = 6),
7791 void 0 === n && (n = !0),
7792 void 0 === r && (r = !1),
7793 void 0 === i && (i = !1),
7794 void 0 === o && (o = !0);
7795 var a = {
7796 AllowHyperlink: o,
7797 AppendOnly: i,
7798 FieldTypeKind: 3,
7799 NumberOfLines: t,
7800 RestrictedMode: r,
7801 RichText: n
7802 };
7803 return this.add(e, "SP.FieldMultiLineText", Object(y.h)(a, s))
7804 }
7805 ,
7806 _o.prototype.addUrl = function(e, t, n) {
7807 void 0 === t && (t = co.Hyperlink);
7808 var r = {
7809 DisplayFormat: t,
7810 FieldTypeKind: 11
7811 };
7812 return this.add(e, "SP.FieldUrl", Object(y.h)(r, n))
7813 }
7814 ,
7815 _o.prototype.addUser = function(e, t, n) {
7816 var r = {
7817 FieldTypeKind: 20,
7818 SelectionMode: t
7819 };
7820 return this.add(e, "SP.FieldUser", Object(y.h)(r, n))
7821 }
7822 ,
7823 _o.prototype.addLookup = function(i, o, s, a) {
7824 return Object(g.a)(this, void 0, void 0, function() {
7825 var t, n, r;
7826 return Object(g.d)(this, function(e) {
7827 switch (e.label) {
7828 case 0:
7829 return t = Object(y.h)({
7830 FieldTypeKind: 7,
7831 LookupFieldName: s,
7832 LookupListId: o,
7833 Title: i
7834 }, a),
7835 n = ve({
7836 parameters: Object(y.h)(Se("SP.FieldCreationInformation"), t)
7837 }),
7838 [4, De(this.clone(To, "addfield"), n)];
7839 case 1:
7840 return [2, {
7841 data: r = e.sent(),
7842 field: this.getById(r.Id)
7843 }]
7844 }
7845 })
7846 })
7847 }
7848 ,
7849 _o.prototype.addChoice = function(e, t, n, r, i) {
7850 void 0 === n && (n = lo.Dropdown);
7851 var o = {
7852 Choices: {
7853 results: t
7854 },
7855 EditFormat: n,
7856 FieldTypeKind: 6,
7857 FillInChoice: r
7858 };
7859 return this.add(e, "SP.FieldChoice", Object(y.h)(o, i))
7860 }
7861 ,
7862 _o.prototype.addMultiChoice = function(e, t, n, r) {
7863 var i = {
7864 Choices: {
7865 results: t
7866 },
7867 FieldTypeKind: 15,
7868 FillInChoice: n
7869 };
7870 return this.add(e, "SP.FieldMultiChoice", Object(y.h)(i, r))
7871 }
7872 ,
7873 _o.prototype.addBoolean = function(e, t) {
7874 return this.add(e, "SP.Field", Object(y.h)({
7875 FieldTypeKind: 8
7876 }, t))
7877 }
7878 ,
7879 _o.prototype.addDependentLookupField = function(r, i, o) {
7880 return Object(g.a)(this, void 0, void 0, function() {
7881 var t, n;
7882 return Object(g.d)(this, function(e) {
7883 switch (e.label) {
7884 case 0:
7885 return t = "adddependentlookupfield(displayName='" + r + "', primarylookupfieldid='" + i + "', showfield='" + o + "')",
7886 [4, De(this.clone(To, t))];
7887 case 1:
7888 return [2, {
7889 data: n = e.sent(),
7890 field: this.getById(n.Id)
7891 }]
7892 }
7893 })
7894 })
7895 }
7896 ,
7897 _o.prototype.addLocation = function(e, t) {
7898 return this.add(e, "SP.FieldLocation", Object(y.h)({
7899 FieldTypeKind: 33
7900 }, t))
7901 }
7902 ,
7903 Object(g.b)([we("fs.createFieldAsXml")], _o.prototype, "createFieldAsXml", null),
7904 Object(g.b)([we("fs.addText")], _o.prototype, "addText", null),
7905 Object(g.b)([we("fs.addCalculated")], _o.prototype, "addCalculated", null),
7906 Object(g.b)([we("fs.addDateTime")], _o.prototype, "addDateTime", null),
7907 Object(g.b)([we("fs.addNumber")], _o.prototype, "addNumber", null),
7908 Object(g.b)([we("fs.addCurrency")], _o.prototype, "addCurrency", null),
7909 Object(g.b)([we("fs.addMultilineText")], _o.prototype, "addMultilineText", null),
7910 Object(g.b)([we("fs.addUrl")], _o.prototype, "addUrl", null),
7911 Object(g.b)([we("fs.addUser")], _o.prototype, "addUser", null),
7912 Object(g.b)([we("fs.addLookup")], _o.prototype, "addLookup", null),
7913 Object(g.b)([we("fs.addChoice")], _o.prototype, "addChoice", null),
7914 Object(g.b)([we("fs.addMultiChoice")], _o.prototype, "addMultiChoice", null),
7915 Object(g.b)([we("fs.addBoolean")], _o.prototype, "addBoolean", null),
7916 Object(g.b)([we("fs.addDependentLookupField")], _o.prototype, "addDependentLookupField", null),
7917 Object(g.b)([we("fs.addLocation")], _o.prototype, "addLocation", null),
7918 Object(g.b)([Ye("fields")], _o)), To = Me(jo), wo = (po = Ve,
7919 Object(g.c)(Po, po),
7920 Po.prototype.update = function(n, r) {
7921 return void 0 === r && (r = "SP.Field"),
7922 Object(g.a)(this, void 0, void 0, function() {
7923 var t;
7924 return Object(g.d)(this, function(e) {
7925 switch (e.label) {
7926 case 0:
7927 return t = ve(Object(y.h)(Se(r), n), me({
7928 "X-HTTP-Method": "MERGE"
7929 })),
7930 [4, De(this, t)];
7931 case 1:
7932 return [2, {
7933 data: e.sent(),
7934 field: this
7935 }]
7936 }
7937 })
7938 })
7939 }
7940 ,
7941 Po.prototype.setShowInDisplayForm = function(e) {
7942 return De(this.clone(Io, "setshowindisplayform(" + e + ")"))
7943 }
7944 ,
7945 Po.prototype.setShowInEditForm = function(e) {
7946 return De(this.clone(Io, "setshowineditform(" + e + ")"))
7947 }
7948 ,
7949 Po.prototype.setShowInNewForm = function(e) {
7950 return De(this.clone(Io, "setshowinnewform(" + e + ")"))
7951 }
7952 ,
7953 Object(g.b)([we("f.update")], Po.prototype, "update", null),
7954 Object(g.b)([we("f.setShowInDisplayForm")], Po.prototype, "setShowInDisplayForm", null),
7955 Object(g.b)([we("f.setShowInEditForm")], Po.prototype, "setShowInEditForm", null),
7956 Object(g.b)([we("f.setShowInNewForm")], Po.prototype, "setShowInNewForm", null),
7957 Po), Io = Me(wo);
7958 function Po() {
7959 return null !== po && po.apply(this, arguments) || this
7960 }
7961 function _o() {
7962 return null !== ho && ho.apply(this, arguments) || this
7963 }
7964 (So = ro = ro || {})[So.Invalid = 0] = "Invalid",
7965 So[So.Integer = 1] = "Integer",
7966 So[So.Text = 2] = "Text",
7967 So[So.Note = 3] = "Note",
7968 So[So.DateTime = 4] = "DateTime",
7969 So[So.Counter = 5] = "Counter",
7970 So[So.Choice = 6] = "Choice",
7971 So[So.Lookup = 7] = "Lookup",
7972 So[So.Boolean = 8] = "Boolean",
7973 So[So.Number = 9] = "Number",
7974 So[So.Currency = 10] = "Currency",
7975 So[So.URL = 11] = "URL",
7976 So[So.Computed = 12] = "Computed",
7977 So[So.Threading = 13] = "Threading",
7978 So[So.Guid = 14] = "Guid",
7979 So[So.MultiChoice = 15] = "MultiChoice",
7980 So[So.GridChoice = 16] = "GridChoice",
7981 So[So.Calculated = 17] = "Calculated",
7982 So[So.File = 18] = "File",
7983 So[So.Attachments = 19] = "Attachments",
7984 So[So.User = 20] = "User",
7985 So[So.Recurrence = 21] = "Recurrence",
7986 So[So.CrossProjectLink = 22] = "CrossProjectLink",
7987 So[So.ModStat = 23] = "ModStat",
7988 So[So.Error = 24] = "Error",
7989 So[So.ContentTypeId = 25] = "ContentTypeId",
7990 So[So.PageSeparator = 26] = "PageSeparator",
7991 So[So.ThreadIndex = 27] = "ThreadIndex",
7992 So[So.WorkflowStatus = 28] = "WorkflowStatus",
7993 So[So.AllDayEvent = 29] = "AllDayEvent",
7994 So[So.WorkflowEventType = 30] = "WorkflowEventType",
7995 (mo = io = io || {})[mo.DateOnly = 0] = "DateOnly",
7996 mo[mo.DateTime = 1] = "DateTime",
7997 (vo = oo = oo || {})[vo.Unspecified = 0] = "Unspecified",
7998 vo[vo.Disabled = 1] = "Disabled",
7999 vo[vo.Relative = 2] = "Relative",
8000 (Oo = so = so || {})[Oo.DefaultValue = 0] = "DefaultValue",
8001 Oo[Oo.AddToDefaultContentType = 1] = "AddToDefaultContentType",
8002 Oo[Oo.AddToNoContentType = 2] = "AddToNoContentType",
8003 Oo[Oo.AddToAllContentTypes = 4] = "AddToAllContentTypes",
8004 Oo[Oo.AddFieldInternalNameHint = 8] = "AddFieldInternalNameHint",
8005 Oo[Oo.AddFieldToDefaultView = 16] = "AddFieldToDefaultView",
8006 Oo[Oo.AddFieldCheckDisplayName = 32] = "AddFieldCheckDisplayName",
8007 (go = ao = ao || {})[go.Gregorian = 1] = "Gregorian",
8008 go[go.Japan = 3] = "Japan",
8009 go[go.Taiwan = 4] = "Taiwan",
8010 go[go.Korea = 5] = "Korea",
8011 go[go.Hijri = 6] = "Hijri",
8012 go[go.Thai = 7] = "Thai",
8013 go[go.Hebrew = 8] = "Hebrew",
8014 go[go.GregorianMEFrench = 9] = "GregorianMEFrench",
8015 go[go.GregorianArabic = 10] = "GregorianArabic",
8016 go[go.GregorianXLITEnglish = 11] = "GregorianXLITEnglish",
8017 go[go.GregorianXLITFrench = 12] = "GregorianXLITFrench",
8018 go[go.KoreaJapanLunar = 14] = "KoreaJapanLunar",
8019 go[go.ChineseLunar = 15] = "ChineseLunar",
8020 go[go.SakaEra = 16] = "SakaEra",
8021 go[go.UmAlQura = 23] = "UmAlQura",
8022 (yo = co = co || {})[yo.Hyperlink = 0] = "Hyperlink",
8023 yo[yo.Image = 1] = "Image",
8024 (bo = uo = uo || {})[bo.PeopleAndGroups = 1] = "PeopleAndGroups",
8025 bo[bo.PeopleOnly = 0] = "PeopleOnly",
8026 (fo = lo = lo || {})[fo.Dropdown = 0] = "Dropdown",
8027 fo[fo.RadioButtons = 1] = "RadioButtons",
8028 _(jt, "fields", To),
8029 _(jt, "availablefields", To, "availablefields"),
8030 _(Dt, "fields", To);
8031 var Co, Eo, Ro = (Eo = We,
8032 Object(g.c)(Do, Eo),
8033 Do.prototype.getByName = function(e) {
8034 return we.configure(Uo(this).concat("('" + ht(e) + "')"), "fs.getByName")
8035 }
8036 ,
8037 Do.prototype.add = function(t) {
8038 return Object(g.a)(this, void 0, void 0, function() {
8039 return Object(g.d)(this, function(e) {
8040 switch (e.label) {
8041 case 0:
8042 return [4, De(this.clone(No, "add('" + ht(t) + "')"))];
8043 case 1:
8044 return [2, {
8045 data: e.sent(),
8046 folder: this.getByName(t)
8047 }]
8048 }
8049 })
8050 })
8051 }
8052 ,
8053 Do.prototype.addUsingPath = function(t, n) {
8054 return void 0 === n && (n = !1),
8055 Object(g.a)(this, void 0, void 0, function() {
8056 return Object(g.d)(this, function(e) {
8057 switch (e.label) {
8058 case 0:
8059 return [4, De(this.clone(No, "addUsingPath(DecodedUrl='" + ht(t) + "',overwrite=" + n + ")"))];
8060 case 1:
8061 return [2, {
8062 data: e.sent(),
8063 folder: Uo(Te(this.toUrl()), "_api/web/getFolderByServerRelativePath(decodedUrl='" + ht(t) + "')")
8064 }]
8065 }
8066 })
8067 })
8068 }
8069 ,
8070 Object(g.b)([we("fs.add")], Do.prototype, "add", null),
8071 Object(g.b)([we("fs.addUsingPath")], Do.prototype, "addUsingPath", null),
8072 Object(g.b)([Ye("folders")], Do)), No = Me(Ro), Ao = (Co = Ve,
8073 Object(g.c)(xo, Co),
8074 Object.defineProperty(xo.prototype, "contentTypeOrder", {
8075 get: function() {
8076 return we.configure(He(this, "contentTypeOrder"), "f.contentTypeOrder")
8077 },
8078 enumerable: !0,
8079 configurable: !0
8080 }),
8081 Object.defineProperty(xo.prototype, "folders", {
8082 get: function() {
8083 return No(this)
8084 },
8085 enumerable: !0,
8086 configurable: !0
8087 }),
8088 Object.defineProperty(xo.prototype, "listItemAllFields", {
8089 get: function() {
8090 return we.configure(Ke(this, "listItemAllFields"), "f.listItemAllFields")
8091 },
8092 enumerable: !0,
8093 configurable: !0
8094 }),
8095 Object.defineProperty(xo.prototype, "parentFolder", {
8096 get: function() {
8097 return we.configure(Uo(this, "parentFolder"), "f.parentFolder")
8098 },
8099 enumerable: !0,
8100 configurable: !0
8101 }),
8102 Object.defineProperty(xo.prototype, "properties", {
8103 get: function() {
8104 return we.configure(Ke(this, "properties"), "f.properties")
8105 },
8106 enumerable: !0,
8107 configurable: !0
8108 }),
8109 Object.defineProperty(xo.prototype, "serverRelativeUrl", {
8110 get: function() {
8111 return we.configure(Ge(this, "serverRelativeUrl"), "f.serverRelativeUrl")
8112 },
8113 enumerable: !0,
8114 configurable: !0
8115 }),
8116 Object.defineProperty(xo.prototype, "uniqueContentTypeOrder", {
8117 get: function() {
8118 return we.configure(He(this, "uniqueContentTypeOrder"), "f.uniqueContentTypeOrder")
8119 },
8120 enumerable: !0,
8121 configurable: !0
8122 }),
8123 xo.prototype.recycle = function() {
8124 return De(this.clone(Uo, "recycle"))
8125 }
8126 ,
8127 xo.prototype.getItem = function() {
8128 for (var r = [], e = 0; e < arguments.length; e++)
8129 r[e] = arguments[e];
8130 return Object(g.a)(this, void 0, void 0, function() {
8131 var t, n;
8132 return Object(g.d)(this, function(e) {
8133 switch (e.label) {
8134 case 0:
8135 return [4, (t = this.listItemAllFields).select.apply(t, r)()];
8136 case 1:
8137 return n = e.sent(),
8138 [2, Object(y.h)(zt(Ze(n)), n)]
8139 }
8140 })
8141 })
8142 }
8143 ,
8144 xo.prototype.moveTo = function(s) {
8145 return Object(g.a)(this, void 0, void 0, function() {
8146 var t, n, r, i, o;
8147 return Object(g.d)(this, function(e) {
8148 switch (e.label) {
8149 case 0:
8150 return [4, this.select("ServerRelativeUrl")()];
8151 case 1:
8152 return t = e.sent(),
8153 n = t.ServerRelativeUrl,
8154 r = t["odata.id"],
8155 i = Te(r),
8156 o = i.replace("://", "___").split("/")[0].replace("___", "://"),
8157 [4, De(Uo(i, "/_api/SP.MoveCopyUtil.MoveFolder()"), ve({
8158 destUrl: Object(y.s)(s) ? s : "" + o + s,
8159 srcUrl: "" + o + n
8160 }))];
8161 case 2:
8162 return e.sent(),
8163 [2]
8164 }
8165 })
8166 })
8167 }
8168 ,
8169 xo.prototype.moveByPath = function(s, a) {
8170 return void 0 === a && (a = !1),
8171 Object(g.a)(this, void 0, void 0, function() {
8172 var t, n, r, i, o;
8173 return Object(g.d)(this, function(e) {
8174 switch (e.label) {
8175 case 0:
8176 return [4, this.select("ServerRelativeUrl")()];
8177 case 1:
8178 return t = e.sent(),
8179 n = t.ServerRelativeUrl,
8180 r = t["odata.id"],
8181 i = Te(r),
8182 o = i.replace("://", "___").split("/")[0].replace("___", "://"),
8183 [4, De(Uo(i, "/_api/SP.MoveCopyUtil.MoveFolderByPath()"), ve({
8184 destPath: Pt(Object(y.s)(s) ? s : "" + o + s),
8185 options: {
8186 KeepBoth: a,
8187 ResetAuthorAndCreatedOnCopy: !0,
8188 ShouldBypassSharedLocks: !0,
8189 __metadata: {
8190 type: "SP.MoveCopyOptions"
8191 }
8192 },
8193 srcPath: Pt("" + o + n)
8194 }))];
8195 case 2:
8196 return e.sent(),
8197 [2]
8198 }
8199 })
8200 })
8201 }
8202 ,
8203 xo.prototype.copyTo = function(s) {
8204 return Object(g.a)(this, void 0, void 0, function() {
8205 var t, n, r, i, o;
8206 return Object(g.d)(this, function(e) {
8207 switch (e.label) {
8208 case 0:
8209 return [4, this.select("ServerRelativeUrl")()];
8210 case 1:
8211 return t = e.sent(),
8212 n = t.ServerRelativeUrl,
8213 r = t["odata.id"],
8214 i = Te(r),
8215 o = i.replace("://", "___").split("/")[0].replace("___", "://"),
8216 [4, De(Uo(i, "/_api/SP.MoveCopyUtil.CopyFolder()"), ve({
8217 destUrl: Object(y.s)(s) ? s : "" + o + s,
8218 srcUrl: "" + o + n
8219 }))];
8220 case 2:
8221 return e.sent(),
8222 [2]
8223 }
8224 })
8225 })
8226 }
8227 ,
8228 xo.prototype.copyByPath = function(s, a) {
8229 return void 0 === a && (a = !1),
8230 Object(g.a)(this, void 0, void 0, function() {
8231 var t, n, r, i, o;
8232 return Object(g.d)(this, function(e) {
8233 switch (e.label) {
8234 case 0:
8235 return [4, this.select("ServerRelativeUrl")()];
8236 case 1:
8237 return t = e.sent(),
8238 n = t.ServerRelativeUrl,
8239 r = t["odata.id"],
8240 i = Te(r),
8241 o = i.replace("://", "___").split("/")[0].replace("___", "://"),
8242 [4, De(Uo(i, "/_api/SP.MoveCopyUtil.CopyFolderByPath()"), ve({
8243 destPath: Pt(Object(y.s)(s) ? s : "" + o + s),
8244 options: {
8245 KeepBoth: a,
8246 ResetAuthorAndCreatedOnCopy: !0,
8247 ShouldBypassSharedLocks: !0,
8248 __metadata: {
8249 type: "SP.MoveCopyOptions"
8250 }
8251 },
8252 srcPath: Pt("" + o + n)
8253 }))];
8254 case 2:
8255 return e.sent(),
8256 [2]
8257 }
8258 })
8259 })
8260 }
8261 ,
8262 xo.prototype.getShareable = function() {
8263 return Object(g.a)(this, void 0, void 0, function() {
8264 var t, n;
8265 return Object(g.d)(this, function(e) {
8266 switch (e.label) {
8267 case 0:
8268 return [4, this.clone(Ke, "listItemAllFields", !1).select("odata.id")()];
8269 case 1:
8270 return t = e.sent(),
8271 n = zt(Ze(t)),
8272 this.hasBatch && (n = n.inBatch(this.batch)),
8273 [2, n]
8274 }
8275 })
8276 })
8277 }
8278 ,
8279 Object(g.b)([we("f.recycle")], xo.prototype, "recycle", null),
8280 Object(g.b)([we("f.getItem")], xo.prototype, "getItem", null),
8281 Object(g.b)([we("f.moveTo")], xo.prototype, "moveTo", null),
8282 Object(g.b)([we("f.moveByPath")], xo.prototype, "moveByPath", null),
8283 Object(g.b)([we("f.copyTo")], xo.prototype, "copyTo", null),
8284 Object(g.b)([we("f.copyByPath")], xo.prototype, "copyByPath", null),
8285 Object(g.b)([we("f.getShareable")], xo.prototype, "getShareable", null),
8286 xo), Uo = Me(Ao);
8287 function xo() {
8288 var t = null !== Co && Co.apply(this, arguments) || this;
8289 return t.delete = $e("f"),
8290 t.update = t._update("SP.Folder", function(e) {
8291 return {
8292 data: e,
8293 folder: t
8294 }
8295 }),
8296 t
8297 }
8298 function Do() {
8299 return null !== Eo && Eo.apply(this, arguments) || this
8300 }
8301 _(Ao, "files", gr),
8302 _(Qt, "file", vr, "file"),
8303 _(Qt, "folder", Uo, "folder"),
8304 _(Dt, "rootFolder", Uo, "rootFolder"),
8305 _(jt, "folders", No),
8306 _(jt, "rootFolder", Uo, "rootFolder"),
8307 jt.prototype.getFolderByServerRelativeUrl = function(e) {
8308 return Uo(this, "getFolderByServerRelativeUrl('" + ht(e) + "')")
8309 }
8310 ,
8311 jt.prototype.getFolderByServerRelativePath = function(e) {
8312 return Uo(this, "getFolderByServerRelativePath(decodedUrl='" + ht(e) + "')")
8313 }
8314 ,
8315 jt.prototype.getFolderById = function(e) {
8316 return Uo(this, "getFolderById('" + e + "')")
8317 }
8318 ;
8319 var ko, Lo, Fo = (Lo = We,
8320 Object(g.c)(Wo, Lo),
8321 Wo.prototype.getById = function(e) {
8322 return we.configure(qo(this).concat("('" + e + "')"), "fos.getById")
8323 }
8324 ,
8325 Object(g.b)([Ye("forms")], Wo)), Bo = Me(Fo), Mo = (ko = Ve,
8326 Object(g.c)(Go, ko),
8327 Go), qo = Me(Mo);
8328 function Go() {
8329 return null !== ko && ko.apply(this, arguments) || this
8330 }
8331 function Wo() {
8332 return null !== Lo && Lo.apply(this, arguments) || this
8333 }
8334 _(Dt, "forms", Bo, "forms");
8335 var Ho, Vo, Ko = (Vo = We,
8336 Object(g.c)($o, Vo),
8337 $o.prototype.getById = function(e) {
8338 return we.configure(Xo(this, "GetById?hubSiteId='" + e + "'"), "hss.getById")
8339 }
8340 ,
8341 Object(g.b)([Ye("_api/hubsites")], $o)), Qo = Me(Ko), zo = (Ho = Ve,
8342 Object(g.c)(Jo, Ho),
8343 Jo.prototype.getSite = function() {
8344 return Object(g.a)(this, void 0, void 0, function() {
8345 var t;
8346 return Object(g.d)(this, function(e) {
8347 switch (e.label) {
8348 case 0:
8349 return [4, this.select("SiteUrl")()];
8350 case 1:
8351 return t = e.sent(),
8352 [2, yt(t.SiteUrl)]
8353 }
8354 })
8355 })
8356 }
8357 ,
8358 Object(g.b)([we("hs.getSite")], Jo.prototype, "getSite", null),
8359 Jo), Xo = Me(zo);
8360 function Jo() {
8361 return null !== Ho && Ho.apply(this, arguments) || this
8362 }
8363 function $o() {
8364 return null !== Vo && Vo.apply(this, arguments) || this
8365 }
8366 bt.prototype.joinHubSite = function(t) {
8367 return Object(g.a)(this, void 0, void 0, function() {
8368 return Object(g.d)(this, function(e) {
8369 switch (e.label) {
8370 case 0:
8371 return [4, De(this.clone(yt, "joinHubSite('" + t + "')"))];
8372 case 1:
8373 return e.sent(),
8374 [2]
8375 }
8376 })
8377 })
8378 }
8379 ,
8380 bt.prototype.registerHubSite = function() {
8381 return Object(g.a)(this, void 0, void 0, function() {
8382 return Object(g.d)(this, function(e) {
8383 switch (e.label) {
8384 case 0:
8385 return [4, De(this.clone(yt, "registerHubSite"))];
8386 case 1:
8387 return e.sent(),
8388 [2]
8389 }
8390 })
8391 })
8392 }
8393 ,
8394 bt.prototype.unRegisterHubSite = function() {
8395 return Object(g.a)(this, void 0, void 0, function() {
8396 return Object(g.d)(this, function(e) {
8397 switch (e.label) {
8398 case 0:
8399 return [4, De(this.clone(yt, "unRegisterHubSite"))];
8400 case 1:
8401 return e.sent(),
8402 [2]
8403 }
8404 })
8405 })
8406 }
8407 ,
8408 jt.prototype.hubSiteData = function(n) {
8409 return void 0 === n && (n = !1),
8410 Object(g.a)(this, void 0, void 0, function() {
8411 var t;
8412 return Object(g.d)(this, function(e) {
8413 switch (e.label) {
8414 case 0:
8415 return [4, this.clone(Tt, "hubSiteData(" + n + ")")()];
8416 case 1:
8417 return "string" == typeof (t = e.sent()) ? [2, JSON.parse(t)] : [2, t]
8418 }
8419 })
8420 })
8421 }
8422 ,
8423 jt.prototype.syncHubSiteTheme = function() {
8424 return De(this.clone(Tt, "syncHubSiteTheme"))
8425 }
8426 ,
8427 Reflect.defineProperty(lt.prototype, "hubSites", {
8428 configurable: !0,
8429 enumerable: !0,
8430 get: function() {
8431 return Qo(this._baseUrl).configure(this._options)
8432 }
8433 });
8434 var Yo, Zo, es, ts, ns = (ts = We,
8435 Object(g.c)(hs, ts),
8436 hs.prototype.getById = function(e) {
8437 return we.configure(os(this).concat("(" + e + ")"), "nns.getById")
8438 }
8439 ,
8440 hs.prototype.add = function(r, i, o) {
8441 return void 0 === o && (o = !0),
8442 Object(g.a)(this, void 0, void 0, function() {
8443 var t, n;
8444 return Object(g.d)(this, function(e) {
8445 switch (e.label) {
8446 case 0:
8447 return t = ve(Object(y.h)(Se("SP.NavigationNode"), {
8448 IsVisible: o,
8449 Title: r,
8450 Url: i
8451 })),
8452 [4, De(this.clone(rs, null), t)];
8453 case 1:
8454 return [2, {
8455 data: n = e.sent(),
8456 node: this.getById(n.Id)
8457 }]
8458 }
8459 })
8460 })
8461 }
8462 ,
8463 hs.prototype.moveAfter = function(e, t) {
8464 var n = ve({
8465 nodeId: e,
8466 previousNodeId: t
8467 });
8468 return De(this.clone(rs, "MoveAfter"), n)
8469 }
8470 ,
8471 Object(g.b)([we("nns.add")], hs.prototype, "add", null),
8472 Object(g.b)([we("nns.moveAfter")], hs.prototype, "moveAfter", null),
8473 hs), rs = Me(ns), is = (es = Ve,
8474 Object(g.c)(ds, es),
8475 Object.defineProperty(ds.prototype, "children", {
8476 get: function() {
8477 return we.configure(rs(this, "children"), "nn.children")
8478 },
8479 enumerable: !0,
8480 configurable: !0
8481 }),
8482 ds.prototype.update = function(n) {
8483 return Object(g.a)(this, void 0, void 0, function() {
8484 var t;
8485 return Object(g.d)(this, function(e) {
8486 switch (e.label) {
8487 case 0:
8488 return t = ve(Object(y.h)(Se("SP.NavigationNode"), n), me({
8489 "X-HTTP-Method": "MERGE"
8490 })),
8491 [4, De(this, t)];
8492 case 1:
8493 return [2, {
8494 data: e.sent(),
8495 node: this
8496 }]
8497 }
8498 })
8499 })
8500 }
8501 ,
8502 Object(g.b)([we("nn.update")], ds.prototype, "update", null),
8503 ds), os = Me(is), ss = (Zo = qe,
8504 Object(g.c)(ps, Zo),
8505 Object.defineProperty(ps.prototype, "quicklaunch", {
8506 get: function() {
8507 return we.configure(rs(this, "quicklaunch"), "n.quicklaunch")
8508 },
8509 enumerable: !0,
8510 configurable: !0
8511 }),
8512 Object.defineProperty(ps.prototype, "topNavigationBar", {
8513 get: function() {
8514 return we.configure(rs(this, "topnavigationbar"), "n.topnavigationbar")
8515 },
8516 enumerable: !0,
8517 configurable: !0
8518 }),
8519 Object(g.b)([Ye("navigation")], ps)), as = Me(ss), cs = (Yo = qe,
8520 Object(g.c)(ls, Yo),
8521 ls.prototype.getMenuState = function(e, t, n, r) {
8522 return void 0 === e && (e = null),
8523 void 0 === t && (t = 10),
8524 void 0 === n && (n = null),
8525 void 0 === r && (r = null),
8526 De(us("MenuState"), ve({
8527 customProperties: r,
8528 depth: t,
8529 mapProviderName: n,
8530 menuNodeKey: e
8531 }))
8532 }
8533 ,
8534 ls.prototype.getMenuNodeKey = function(e, t) {
8535 return void 0 === t && (t = null),
8536 De(us("MenuNodeKey"), ve({
8537 currentUrl: e,
8538 mapProviderName: t
8539 }))
8540 }
8541 ,
8542 Object(g.b)([we("ns.getMenuState")], ls.prototype, "getMenuState", null),
8543 Object(g.b)([we("ns.getMenuNodeKey")], ls.prototype, "getMenuNodeKey", null),
8544 ls), us = function(e) {
8545 return new cs(e)
8546 };
8547 function ls(e) {
8548 return void 0 === e && (e = null),
8549 Yo.call(this, "_api/navigation", e) || this
8550 }
8551 function ps() {
8552 return null !== Zo && Zo.apply(this, arguments) || this
8553 }
8554 function ds() {
8555 var e = null !== es && es.apply(this, arguments) || this;
8556 return e.delete = Je("nn"),
8557 e
8558 }
8559 function hs() {
8560 return null !== ts && ts.apply(this, arguments) || this
8561 }
8562 _(jt, "navigation", as),
8563 Reflect.defineProperty(lt.prototype, "navigation", {
8564 configurable: !0,
8565 enumerable: !0,
8566 get: function() {
8567 return us().configure(this._options)
8568 }
8569 });
8570 var fs, bs, ys, gs, Os, vs = (gs = Ve,
8571 Object(g.c)(_s, gs),
8572 Object.defineProperty(_s.prototype, "editProfileLink", {
8573 get: function() {
8574 return this.clone(ms, "EditProfileLink").get()
8575 },
8576 enumerable: !0,
8577 configurable: !0
8578 }),
8579 Object.defineProperty(_s.prototype, "isMyPeopleListPublic", {
8580 get: function() {
8581 return this.clone(ms, "IsMyPeopleListPublic").get()
8582 },
8583 enumerable: !0,
8584 configurable: !0
8585 }),
8586 _s.prototype.amIFollowedBy = function(e) {
8587 var t = this.clone(ms, "amifollowedby(@v)");
8588 return t.query.set("@v", "'" + encodeURIComponent(e) + "'"),
8589 t.get()
8590 }
8591 ,
8592 _s.prototype.amIFollowing = function(e) {
8593 var t = this.clone(ms, "amifollowing(@v)");
8594 return t.query.set("@v", "'" + encodeURIComponent(e) + "'"),
8595 t.get()
8596 }
8597 ,
8598 _s.prototype.getFollowedTags = function(e) {
8599 return void 0 === e && (e = 20),
8600 this.clone(ms, "getfollowedtags(" + e + ")").get()
8601 }
8602 ,
8603 _s.prototype.getFollowersFor = function(e) {
8604 var t = this.clone(ms, "getfollowersfor(@v)");
8605 return t.query.set("@v", "'" + encodeURIComponent(e) + "'"),
8606 t.get()
8607 }
8608 ,
8609 Object.defineProperty(_s.prototype, "myFollowers", {
8610 get: function() {
8611 return He(this, "getmyfollowers")
8612 },
8613 enumerable: !0,
8614 configurable: !0
8615 }),
8616 Object.defineProperty(_s.prototype, "myProperties", {
8617 get: function() {
8618 return new _s(this,"getmyproperties")
8619 },
8620 enumerable: !0,
8621 configurable: !0
8622 }),
8623 _s.prototype.getPeopleFollowedBy = function(e) {
8624 var t = this.clone(ms, "getpeoplefollowedby(@v)");
8625 return t.query.set("@v", "'" + encodeURIComponent(e) + "'"),
8626 t.get()
8627 }
8628 ,
8629 _s.prototype.getPropertiesFor = function(e) {
8630 var t = this.clone(ms, "getpropertiesfor(@v)");
8631 return t.query.set("@v", "'" + encodeURIComponent(e) + "'"),
8632 t.get()
8633 }
8634 ,
8635 Object.defineProperty(_s.prototype, "trendingTags", {
8636 get: function() {
8637 var e = this.clone(ms, null);
8638 return e.concat(".gettrendingtags"),
8639 e.get()
8640 },
8641 enumerable: !0,
8642 configurable: !0
8643 }),
8644 _s.prototype.getUserProfilePropertyFor = function(e, t) {
8645 var n = this.clone(ms, "getuserprofilepropertyfor(accountname=@v, propertyname='" + t + "')");
8646 return n.query.set("@v", "'" + encodeURIComponent(e) + "'"),
8647 n.get()
8648 }
8649 ,
8650 _s.prototype.hideSuggestion = function(e) {
8651 var t = this.clone(ms, "hidesuggestion(@v)");
8652 return t.query.set("@v", "'" + encodeURIComponent(e) + "'"),
8653 De(t)
8654 }
8655 ,
8656 _s.prototype.isFollowing = function(e, t) {
8657 var n = this.clone(ms, null);
8658 return n.concat(".isfollowing(possiblefolloweraccountname=@v, possiblefolloweeaccountname=@y)"),
8659 n.query.set("@v", "'" + encodeURIComponent(e) + "'"),
8660 n.query.set("@y", "'" + encodeURIComponent(t) + "'"),
8661 n.get()
8662 }
8663 ,
8664 _s.prototype.setMyProfilePic = function(e) {
8665 var t = null
8666 , n = new FileReader;
8667 n.onload = function(e) {
8668 return t = e.target.result
8669 }
8670 ,
8671 n.readAsArrayBuffer(e);
8672 var r = new _s(this,"setmyprofilepicture");
8673 return De(r, ve(String.fromCharCode.apply(null, new Uint16Array(t))))
8674 }
8675 ,
8676 _s.prototype.setSingleValueProfileProperty = function(e, t, n) {
8677 return De(this.clone(ms, "SetSingleValueProfileProperty"), ve({
8678 accountName: e,
8679 propertyName: t,
8680 propertyValue: n
8681 }))
8682 }
8683 ,
8684 _s.prototype.setMultiValuedProfileProperty = function(e, t, n) {
8685 return De(this.clone(ms, "SetMultiValuedProfileProperty"), ve({
8686 accountName: e,
8687 propertyName: t,
8688 propertyValues: n
8689 }))
8690 }
8691 ,
8692 _s.prototype.createPersonalSiteEnqueueBulk = function() {
8693 for (var e = [], t = 0; t < arguments.length; t++)
8694 e[t] = arguments[t];
8695 return this.profileLoader.createPersonalSiteEnqueueBulk(e)
8696 }
8697 ,
8698 Object.defineProperty(_s.prototype, "ownerUserProfile", {
8699 get: function() {
8700 return this.profileLoader.ownerUserProfile
8701 },
8702 enumerable: !0,
8703 configurable: !0
8704 }),
8705 Object.defineProperty(_s.prototype, "userProfile", {
8706 get: function() {
8707 return this.profileLoader.userProfile
8708 },
8709 enumerable: !0,
8710 configurable: !0
8711 }),
8712 _s.prototype.createPersonalSite = function(e) {
8713 return void 0 === e && (e = !1),
8714 this.profileLoader.createPersonalSite(e)
8715 }
8716 ,
8717 _s.prototype.shareAllSocialData = function(e) {
8718 return this.profileLoader.shareAllSocialData(e)
8719 }
8720 ,
8721 _s.prototype.clientPeoplePickerResolveUser = function(e) {
8722 return this.clientPeoplePickerQuery.clientPeoplePickerResolveUser(e)
8723 }
8724 ,
8725 _s.prototype.clientPeoplePickerSearchUser = function(e) {
8726 return this.clientPeoplePickerQuery.clientPeoplePickerSearchUser(e)
8727 }
8728 ,
8729 _s), ms = Me(vs), Ss = (ys = qe,
8730 Object(g.c)(Ps, ys),
8731 Ps.prototype.createPersonalSiteEnqueueBulk = function(e) {
8732 return De(this.clone(js, "createpersonalsiteenqueuebulk", !1), ve({
8733 emailIDs: e
8734 }))
8735 }
8736 ,
8737 Object.defineProperty(Ps.prototype, "ownerUserProfile", {
8738 get: function() {
8739 var e = this.getParent(js, this.parentUrl, "_api/sp.userprofiles.profileloader.getowneruserprofile");
8740 return this.hasBatch && (e = e.inBatch(this.batch)),
8741 De(e)
8742 },
8743 enumerable: !0,
8744 configurable: !0
8745 }),
8746 Object.defineProperty(Ps.prototype, "userProfile", {
8747 get: function() {
8748 return De(this.clone(js, "getuserprofile"))
8749 },
8750 enumerable: !0,
8751 configurable: !0
8752 }),
8753 Ps.prototype.createPersonalSite = function(e) {
8754 return void 0 === e && (e = !1),
8755 De(this.clone(js, "getuserprofile/createpersonalsiteenque(" + e + ")"))
8756 }
8757 ,
8758 Ps.prototype.shareAllSocialData = function(e) {
8759 return De(this.clone(js, "getuserprofile/shareallsocialdata(" + e + ")"))
8760 }
8761 ,
8762 Object(g.b)([Ye("_api/sp.userprofiles.profileloader.getprofileloader")], Ps)), js = function(e, t) {
8763 return new Ss(e,t)
8764 }, Ts = (bs = qe,
8765 Object(g.c)(Is, bs),
8766 Is.prototype.clientPeoplePickerResolveUser = function(r) {
8767 return Object(g.a)(this, void 0, void 0, function() {
8768 var t, n;
8769 return Object(g.d)(this, function(e) {
8770 switch (e.label) {
8771 case 0:
8772 return (t = this.clone(ws, null)).concat(".clientpeoplepickerresolveuser"),
8773 [4, De(t, this.getBodyFrom(r))];
8774 case 1:
8775 return n = e.sent(),
8776 [2, JSON.parse("object" == typeof n ? n.ClientPeoplePickerResolveUser : n)]
8777 }
8778 })
8779 })
8780 }
8781 ,
8782 Is.prototype.clientPeoplePickerSearchUser = function(r) {
8783 return Object(g.a)(this, void 0, void 0, function() {
8784 var t, n;
8785 return Object(g.d)(this, function(e) {
8786 switch (e.label) {
8787 case 0:
8788 return (t = this.clone(ws, null)).concat(".clientpeoplepickersearchuser"),
8789 [4, De(t, this.getBodyFrom(r))];
8790 case 1:
8791 return n = e.sent(),
8792 [2, JSON.parse("object" == typeof n ? n.ClientPeoplePickerSearchUser : n)]
8793 }
8794 })
8795 })
8796 }
8797 ,
8798 Is.prototype.getBodyFrom = function(e) {
8799 return ve({
8800 queryParams: Object(y.h)(Se("SP.UI.ApplicationPages.ClientPeoplePickerQueryParameters"), e)
8801 })
8802 }
8803 ,
8804 Object(g.b)([Ye("_api/sp.ui.applicationpages.clientpeoplepickerwebserviceinterface")], Is)), ws = function(e, t) {
8805 return new Ts(e,t)
8806 };
8807 function Is() {
8808 return null !== bs && bs.apply(this, arguments) || this
8809 }
8810 function Ps() {
8811 return null !== ys && ys.apply(this, arguments) || this
8812 }
8813 function _s(e, t) {
8814 void 0 === t && (t = "_api/sp.userprofiles.peoplemanager");
8815 var n = gs.call(this, e, t) || this;
8816 return n.clientPeoplePickerQuery = new Ts(e).configureFrom(n),
8817 n.profileLoader = new Ss(e).configureFrom(n),
8818 n
8819 }
8820 (Os = fs = fs || {})[Os.DefaultZone = 0] = "DefaultZone",
8821 Os[Os.Intranet = 1] = "Intranet",
8822 Os[Os.Internet = 2] = "Internet",
8823 Os[Os.Custom = 3] = "Custom",
8824 Os[Os.Extranet = 4] = "Extranet",
8825 Reflect.defineProperty(lt.prototype, "profiles", {
8826 configurable: !0,
8827 enumerable: !0,
8828 get: function() {
8829 return ms(this._baseUrl)
8830 }
8831 });
8832 var Cs, Es, Rs, Ns = (Rs = Ve,
8833 Object(g.c)(Bs, Rs),
8834 Object.defineProperty(Bs.prototype, "installedLanguages", {
8835 get: function() {
8836 return we.configure(He(this, "installedlanguages"), "rs.installedLanguages")
8837 },
8838 enumerable: !0,
8839 configurable: !0
8840 }),
8841 Object.defineProperty(Bs.prototype, "timeZone", {
8842 get: function() {
8843 return we.configure(xs(this), "rs.tz")
8844 },
8845 enumerable: !0,
8846 configurable: !0
8847 }),
8848 Object.defineProperty(Bs.prototype, "timeZones", {
8849 get: function() {
8850 return we.configure(ks(this), "rs.tzs")
8851 },
8852 enumerable: !0,
8853 configurable: !0
8854 }),
8855 Object(g.b)([Ye("regionalsettings")], Bs)), As = Me(Ns), Us = (Es = Ve,
8856 Object(g.c)(Fs, Es),
8857 Fs.prototype.utcToLocalTime = function(r) {
8858 return Object(g.a)(this, void 0, void 0, function() {
8859 var t, n;
8860 return Object(g.d)(this, function(e) {
8861 switch (e.label) {
8862 case 0:
8863 return t = "string" == typeof r ? r : r.toISOString(),
8864 [4, De(this.clone(xs, "utctolocaltime('" + t + "')"))];
8865 case 1:
8866 return n = e.sent(),
8867 [2, Object(y.p)(n, "UTCToLocalTime") ? n.UTCToLocalTime : n]
8868 }
8869 })
8870 })
8871 }
8872 ,
8873 Fs.prototype.localTimeToUTC = function(r) {
8874 return Object(g.a)(this, void 0, void 0, function() {
8875 var t, n;
8876 return Object(g.d)(this, function(e) {
8877 switch (e.label) {
8878 case 0:
8879 return t = "string" == typeof r ? r : Object(y.j)(r, "minute", -1 * r.getTimezoneOffset()).toISOString(),
8880 [4, De(this.clone(xs, "localtimetoutc('" + t + "')"))];
8881 case 1:
8882 return n = e.sent(),
8883 [2, Object(y.p)(n, "LocalTimeToUTC") ? n.LocalTimeToUTC : n]
8884 }
8885 })
8886 })
8887 }
8888 ,
8889 Object(g.b)([we("tz.utcToLocalTime")], Fs.prototype, "utcToLocalTime", null),
8890 Object(g.b)([we("tz.localTimeToUTC")], Fs.prototype, "localTimeToUTC", null),
8891 Object(g.b)([Ye("timezone")], Fs)), xs = Me(Us), Ds = (Cs = We,
8892 Object(g.c)(Ls, Cs),
8893 Ls.prototype.getById = function(e) {
8894 return De(this.clone(ks, "GetById(" + e + ")").usingParser(st(xs)))
8895 }
8896 ,
8897 Object(g.b)([we("tzs.getById")], Ls.prototype, "getById", null),
8898 Object(g.b)([Ye("timezones")], Ls)), ks = Me(Ds);
8899 function Ls() {
8900 return null !== Cs && Cs.apply(this, arguments) || this
8901 }
8902 function Fs() {
8903 return null !== Es && Es.apply(this, arguments) || this
8904 }
8905 function Bs() {
8906 return null !== Rs && Rs.apply(this, arguments) || this
8907 }
8908 _(jt, "regionalSettings", As);
8909 var Ms, qs = (Ms = qe,
8910 Object(g.c)(Vs, Ms),
8911 Vs.prototype.getRelatedItems = function(e, t) {
8912 var n = this.clone(Gs, null);
8913 return n.concat(".GetRelatedItems"),
8914 De(n, ve({
8915 SourceItemID: t,
8916 SourceListName: e
8917 }))
8918 }
8919 ,
8920 Vs.prototype.getPageOneRelatedItems = function(e, t) {
8921 var n = this.clone(Gs, null);
8922 return n.concat(".GetPageOneRelatedItems"),
8923 De(n, ve({
8924 SourceItemID: t,
8925 SourceListName: e
8926 }))
8927 }
8928 ,
8929 Vs.prototype.addSingleLink = function(e, t, n, r, i, o, s) {
8930 void 0 === s && (s = !1);
8931 var a = this.clone(Gs, null);
8932 return a.concat(".AddSingleLink"),
8933 De(a, ve({
8934 SourceItemID: t,
8935 SourceListName: e,
8936 SourceWebUrl: n,
8937 TargetItemID: i,
8938 TargetListName: r,
8939 TargetWebUrl: o,
8940 TryAddReverseLink: s
8941 }))
8942 }
8943 ,
8944 Vs.prototype.addSingleLinkToUrl = function(e, t, n, r) {
8945 void 0 === r && (r = !1);
8946 var i = this.clone(Gs, null);
8947 return i.concat(".AddSingleLinkToUrl"),
8948 De(i, ve({
8949 SourceItemID: t,
8950 SourceListName: e,
8951 TargetItemUrl: n,
8952 TryAddReverseLink: r
8953 }))
8954 }
8955 ,
8956 Vs.prototype.addSingleLinkFromUrl = function(e, t, n, r) {
8957 void 0 === r && (r = !1);
8958 var i = this.clone(Gs, null);
8959 return i.concat(".AddSingleLinkFromUrl"),
8960 De(i, ve({
8961 SourceItemUrl: e,
8962 TargetItemID: n,
8963 TargetListName: t,
8964 TryAddReverseLink: r
8965 }))
8966 }
8967 ,
8968 Vs.prototype.deleteSingleLink = function(e, t, n, r, i, o, s) {
8969 void 0 === s && (s = !1);
8970 var a = this.clone(Gs, null);
8971 return a.concat(".DeleteSingleLink"),
8972 De(a, ve({
8973 SourceItemID: t,
8974 SourceListName: e,
8975 SourceWebUrl: n,
8976 TargetItemID: i,
8977 TargetListName: r,
8978 TargetWebUrl: o,
8979 TryDeleteReverseLink: s
8980 }))
8981 }
8982 ,
8983 Object(g.b)([we("rim.getRelatedItems")], Vs.prototype, "getRelatedItems", null),
8984 Object(g.b)([we("rim.getPageOneRelatedItems")], Vs.prototype, "getPageOneRelatedItems", null),
8985 Object(g.b)([we("rim.addSingleLink")], Vs.prototype, "addSingleLink", null),
8986 Object(g.b)([we("rim.ToUrl")], Vs.prototype, "addSingleLinkToUrl", null),
8987 Object(g.b)([we("rim.FromUrl")], Vs.prototype, "addSingleLinkFromUrl", null),
8988 Object(g.b)([we("rim.deleteSingleLink")], Vs.prototype, "deleteSingleLink", null),
8989 Object(g.b)([Ye("_api/SP.RelatedItemManager")], Vs)), Gs = function(e) {
8990 return new qs(Te("string" == typeof e ? e : e.toUrl()))
8991 }, Ws = new Map([["text", "Querytext"], ["template", "QueryTemplate"], ["sourceId", "SourceId"], ["trimDuplicatesIncludeId", ""], ["startRow", ""], ["rowLimit", ""], ["rankingModelId", ""], ["rowsPerPage", ""], ["selectProperties", ""], ["culture", ""], ["timeZoneId", ""], ["refinementFilters", ""], ["refiners", ""], ["hiddenConstraints", ""], ["sortList", ""], ["timeout", ""], ["hithighlightedProperties", ""], ["clientType", ""], ["personalizationData", ""], ["resultsURL", ""], ["queryTag", ""], ["properties", ""], ["queryTemplatePropertiesUrl", ""], ["reorderingRules", ""], ["hitHighlightedMultivaluePropertyLimit", ""], ["collapseSpecification", ""], ["uiLanguage", ""], ["desiredSnippetLength", ""], ["maxSnippetLength", ""], ["summaryLength", ""]]), Hs = new Map([]);
8992 function Vs() {
8993 return null !== Ms && Ms.apply(this, arguments) || this
8994 }
8995 function Ks(e) {
8996 return e.replace(/^(.)/, function(e) {
8997 return e.toUpperCase()
8998 })
8999 }
9000 function Qs(e, t) {
9001 return void 0 === e && (e = ""),
9002 void 0 === t && (t = {}),
9003 new Proxy({
9004 query: Object.assign({
9005 Querytext: e
9006 }, t)
9007 },{
9008 get: function(r, e, i) {
9009 var o = e.toString();
9010 if ("toSearchQuery" === o)
9011 return function() {
9012 return r.query
9013 }
9014 ;
9015 if (Ws.has(o))
9016 return function() {
9017 for (var e = [], t = 0; t < arguments.length; t++)
9018 e[t] = arguments[t];
9019 var n = Ws.get(o);
9020 return r.query[0 < n.length ? n : Ks(o)] = 1 < e.length ? e : e[0],
9021 i
9022 }
9023 ;
9024 var t = Hs.has(o) ? Hs.get(o) : Ks(o);
9025 return r.query[t] = !0,
9026 i
9027 }
9028 })
9029 }
9030 var zs, Xs, Js, $s, Ys, Zs, ea, ta, na = /_api\/search\/postquery$/i, ra = (Ys = Ve,
9031 Object(g.c)(la, Ys),
9032 la.prototype.execute = function(o) {
9033 return Object(g.a)(this, void 0, void 0, function() {
9034 var t, n, r, i;
9035 return Object(g.d)(this, function(e) {
9036 switch (e.label) {
9037 case 0:
9038 return t = this.parseQuery(o),
9039 n = ve({
9040 request: Object(y.h)(Se("Microsoft.Office.Server.Search.REST.SearchRequest"), Object.assign({}, t, {
9041 HitHighlightedProperties: this.fixArrProp(t.HitHighlightedProperties),
9042 Properties: this.fixArrProp(t.Properties),
9043 RefinementFilters: this.fixArrProp(t.RefinementFilters),
9044 ReorderingRules: this.fixArrProp(t.ReorderingRules),
9045 SelectProperties: this.fixArrProp(t.SelectProperties),
9046 SortList: this.fixArrProp(t.SortList)
9047 }))
9048 }),
9049 this.data.useCaching && (this._forceCaching = !0,
9050 r = "PnPjs.SearchWithCaching(" + Object(y.n)(n.body) + ")",
9051 Object(y.x)(this.data.cachingOptions) ? na.test(this.data.cachingOptions.key) && (this.data.cachingOptions.key = r) : this.data.cachingOptions = new O(r)),
9052 [4, De(this, n)];
9053 case 1:
9054 return i = e.sent(),
9055 [2, new oa(i,this.toUrl(),t)]
9056 }
9057 })
9058 })
9059 }
9060 ,
9061 la.prototype.fixArrProp = function(e) {
9062 return void 0 === e ? {
9063 results: []
9064 } : {
9065 results: Object(y.q)(e) ? e : [e]
9066 }
9067 }
9068 ,
9069 la.prototype.parseQuery = function(e) {
9070 return "string" == typeof e ? {
9071 Querytext: e
9072 } : e.toSearchQuery ? e.toSearchQuery() : e
9073 }
9074 ,
9075 Object(g.b)([we("se.execute")], la.prototype, "execute", null),
9076 Object(g.b)([Ye("_api/search/postquery")], la)), ia = function(t, n) {
9077 return void 0 === n && (n = {}),
9078 function(e) {
9079 return new ra(t).configure(n).execute(e)
9080 }
9081 }, oa = (Object.defineProperty(ua.prototype, "ElapsedTime", {
9082 get: function() {
9083 return this.RawSearchResults.ElapsedTime
9084 },
9085 enumerable: !0,
9086 configurable: !0
9087 }),
9088 Object.defineProperty(ua.prototype, "RowCount", {
9089 get: function() {
9090 return this.RawSearchResults.PrimaryQueryResult.RelevantResults.RowCount
9091 },
9092 enumerable: !0,
9093 configurable: !0
9094 }),
9095 Object.defineProperty(ua.prototype, "TotalRows", {
9096 get: function() {
9097 return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRows
9098 },
9099 enumerable: !0,
9100 configurable: !0
9101 }),
9102 Object.defineProperty(ua.prototype, "TotalRowsIncludingDuplicates", {
9103 get: function() {
9104 return this.RawSearchResults.PrimaryQueryResult.RelevantResults.TotalRowsIncludingDuplicates
9105 },
9106 enumerable: !0,
9107 configurable: !0
9108 }),
9109 Object.defineProperty(ua.prototype, "RawSearchResults", {
9110 get: function() {
9111 return this._raw
9112 },
9113 enumerable: !0,
9114 configurable: !0
9115 }),
9116 Object.defineProperty(ua.prototype, "PrimarySearchResults", {
9117 get: function() {
9118 return null === this._primary && (this._primary = this.formatSearchResults(this._raw.PrimaryQueryResult.RelevantResults.Table.Rows)),
9119 this._primary
9120 },
9121 enumerable: !0,
9122 configurable: !0
9123 }),
9124 ua.prototype.getPage = function(e, t) {
9125 if (this.TotalRows < this.RowCount)
9126 return Promise.resolve(null);
9127 var n = void 0 !== t ? t : Object(y.p)(this._query, "RowLimit") ? this._query.RowLimit : 10
9128 , r = Object(y.h)(this._query, {
9129 RowLimit: n,
9130 StartRow: n * (e - 1)
9131 });
9132 return r.StartRow > this.TotalRows ? Promise.resolve(null) : ia(this._url)(r)
9133 }
9134 ,
9135 ua.prototype.formatSearchResults = function(e) {
9136 var t, n, r = new Array, i = e.results ? e.results : e;
9137 try {
9138 for (var o = Object(g.f)(i), s = o.next(); !s.done; s = o.next()) {
9139 var a = s.value
9140 , c = a.Cells.results ? a.Cells.results : a.Cells;
9141 r.push(c.reduce(function(e, t) {
9142 return Reflect.defineProperty(e, t.Key, {
9143 configurable: !1,
9144 enumerable: !0,
9145 value: t.Value,
9146 writable: !1
9147 }),
9148 e
9149 }, {}))
9150 }
9151 } catch (e) {
9152 t = {
9153 error: e
9154 }
9155 } finally {
9156 try {
9157 s && !s.done && (n = o.return) && n.call(o)
9158 } finally {
9159 if (t)
9160 throw t.error
9161 }
9162 }
9163 return r
9164 }
9165 ,
9166 ua), sa = ($s = Ve,
9167 Object(g.c)(ca, $s),
9168 ca.prototype.execute = function(r) {
9169 return Object(g.a)(this, void 0, void 0, function() {
9170 var t, n;
9171 return Object(g.d)(this, function(e) {
9172 switch (e.label) {
9173 case 0:
9174 return this.mapQueryToQueryString(r),
9175 [4, this.get()];
9176 case 1:
9177 return t = e.sent(),
9178 [2, {
9179 PeopleNames: (n = Object(y.p)(t, "suggest") ? function(e) {
9180 return t.suggest[e].results
9181 }
9182 : function(e) {
9183 return t[e]
9184 }
9185 )("PeopleNames"),
9186 PersonalResults: n("PersonalResults"),
9187 Queries: n("Queries")
9188 }]
9189 }
9190 })
9191 })
9192 }
9193 ,
9194 ca.prototype.mapQueryToQueryString = function(e) {
9195 var n = this;
9196 this.query.set("querytext", "'" + e.querytext + "'");
9197 var r, t = (r = e,
9198 function(t) {
9199 return function(e) {
9200 Object(y.p)(r, t) && n.query.set(e, r[t].toString())
9201 }
9202 }
9203 );
9204 t("count")("inumberofquerysuggestions"),
9205 t("personalCount")("inumberofresultsuggestions"),
9206 t("preQuery")("fprequerysuggestions"),
9207 t("hitHighlighting")("fhithighlighting"),
9208 t("capitalize")("fcapitalizefirstletters"),
9209 t("culture")("culture"),
9210 t("stemming")("enablestemming"),
9211 t("includePeople")("showpeoplenamesuggestions"),
9212 t("queryRules")("enablequeryrules"),
9213 t("prefixMatch")("fprefixmatchallterms")
9214 }
9215 ,
9216 Object(g.b)([we("su.execute")], ca.prototype, "execute", null),
9217 Object(g.b)([Ye("_api/search/suggest")], ca)), aa = function(t, n) {
9218 return void 0 === n && (n = {}),
9219 function(e) {
9220 return new sa(t).configure(n).execute(e)
9221 }
9222 };
9223 function ca() {
9224 return null !== $s && $s.apply(this, arguments) || this
9225 }
9226 function ua(e, t, n, r, i) {
9227 void 0 === r && (r = null),
9228 void 0 === i && (i = null),
9229 this._url = t,
9230 this._query = n,
9231 this._raw = r,
9232 this._primary = i,
9233 this._url = this._url.replace(na, ""),
9234 this._raw = e.postquery ? e.postquery : e
9235 }
9236 function la() {
9237 return null !== Ys && Ys.apply(this, arguments) || this
9238 }
9239 (ta = zs = zs || {})[ta.Ascending = 0] = "Ascending",
9240 ta[ta.Descending = 1] = "Descending",
9241 ta[ta.FQLFormula = 2] = "FQLFormula",
9242 (ea = Xs = Xs || {})[ea.ResultContainsKeyword = 0] = "ResultContainsKeyword",
9243 ea[ea.TitleContainsKeyword = 1] = "TitleContainsKeyword",
9244 ea[ea.TitleMatchesKeyword = 2] = "TitleMatchesKeyword",
9245 ea[ea.UrlStartsWith = 3] = "UrlStartsWith",
9246 ea[ea.UrlExactlyMatches = 4] = "UrlExactlyMatches",
9247 ea[ea.ContentTypeIs = 5] = "ContentTypeIs",
9248 ea[ea.FileExtensionMatches = 6] = "FileExtensionMatches",
9249 ea[ea.ResultHasTag = 7] = "ResultHasTag",
9250 ea[ea.ManualCondition = 8] = "ManualCondition",
9251 (Zs = Js = Js || {})[Zs.None = 0] = "None",
9252 Zs[Zs.StringType = 1] = "StringType",
9253 Zs[Zs.Int32Type = 2] = "Int32Type",
9254 Zs[Zs.BooleanType = 3] = "BooleanType",
9255 Zs[Zs.StringArrayType = 4] = "StringArrayType",
9256 Zs[Zs.UnSupportedType = 5] = "UnSupportedType";
9257 var pa = (da.Documents = "e7ec8cee-ded8-43c9-beb5-436b54b31e84",
9258 da.ItemsMatchingContentType = "5dc9f503-801e-4ced-8a2c-5d1237132419",
9259 da.ItemsMatchingTag = "e1327b9c-2b8c-4b23-99c9-3730cb29c3f7",
9260 da.ItemsRelatedToCurrentUser = "48fec42e-4a92-48ce-8363-c2703a40e67d",
9261 da.ItemsWithSameKeywordAsThisItem = "5c069288-1d17-454a-8ac6-9c642a065f48",
9262 da.LocalPeopleResults = "b09a7990-05ea-4af9-81ef-edfab16c4e31",
9263 da.LocalReportsAndDataResults = "203fba36-2763-4060-9931-911ac8c0583b",
9264 da.LocalSharePointResults = "8413cd39-2156-4e00-b54d-11efd9abdb89",
9265 da.LocalVideoResults = "78b793ce-7956-4669-aa3b-451fc5defebf",
9266 da.Pages = "5e34578e-4d08-4edc-8bf3-002acf3cdbcc",
9267 da.Pictures = "38403c8c-3975-41a8-826e-717f2d41568a",
9268 da.Popular = "97c71db1-58ce-4891-8b64-585bc2326c12",
9269 da.RecentlyChangedItems = "ba63bbae-fa9c-42c0-b027-9a878f16557c",
9270 da.RecommendedItems = "ec675252-14fa-4fbe-84dd-8d098ed74181",
9271 da.Wiki = "9479bf85-e257-4318-b5a8-81a180f5faa1",
9272 da);
9273 function da() {}
9274 lt.prototype.search = function(e) {
9275 return ia(this._baseUrl, this._options)(e)
9276 }
9277 ,
9278 lt.prototype.searchWithCaching = function(e, t) {
9279 return new ra(this._baseUrl,null).configure(this._options).usingCaching(t).execute(e)
9280 }
9281 ,
9282 lt.prototype.searchSuggest = function(e) {
9283 return aa(this._baseUrl, this._options)("string" == typeof e ? {
9284 querytext: e
9285 } : e)
9286 }
9287 ;
9288 var ha, fa, ba, ya, ga, Oa, va, ma, Sa, ja, Ta, wa, Ia, Pa, _a, Ca, Ea, Ra, Na, Aa, Ua, xa, Da = (_a = We,
9289 Object(g.c)(ic, _a),
9290 ic.prototype.getById = function(e) {
9291 return we.configure(Fa(this, "getById(" + e + ")"), "sus.getById")
9292 }
9293 ,
9294 ic.prototype.getByEmail = function(e) {
9295 return we.configure(Fa(this, "getByEmail('" + e + "')"), "sus.getByEmail")
9296 }
9297 ,
9298 ic.prototype.getByLoginName = function(e) {
9299 return we.configure(Fa(this).concat("('!@v::" + encodeURIComponent(e) + "')"), "sus.getByLoginName")
9300 }
9301 ,
9302 ic.prototype.removeById = function(e) {
9303 return De(this.clone(ka, "removeById(" + e + ")"))
9304 }
9305 ,
9306 ic.prototype.removeByLoginName = function(e) {
9307 var t = this.clone(ka, "removeByLoginName(@v)");
9308 return t.query.set("@v", "'" + encodeURIComponent(e) + "'"),
9309 De(t)
9310 }
9311 ,
9312 ic.prototype.add = function(t) {
9313 return Object(g.a)(this, void 0, void 0, function() {
9314 return Object(g.d)(this, function(e) {
9315 switch (e.label) {
9316 case 0:
9317 return [4, De(this, ve(Object(y.h)(Se("SP.User"), {
9318 LoginName: t
9319 })))];
9320 case 1:
9321 return e.sent(),
9322 [2, this.getByLoginName(t)]
9323 }
9324 })
9325 })
9326 }
9327 ,
9328 Object(g.b)([we("sus.remId")], ic.prototype, "removeById", null),
9329 Object(g.b)([we("sus.remLoginName")], ic.prototype, "removeByLoginName", null),
9330 Object(g.b)([we("sus.add")], ic.prototype, "add", null),
9331 Object(g.b)([Ye("siteusers")], ic)), ka = Me(Da), La = (Pa = Ve,
9332 Object(g.c)(rc, Pa),
9333 Object.defineProperty(rc.prototype, "groups", {
9334 get: function() {
9335 return we.configure(Ma(this, "groups"), "su.groups")
9336 },
9337 enumerable: !0,
9338 configurable: !0
9339 }),
9340 rc), Fa = Me(La), Ba = (Ia = We,
9341 Object(g.c)(nc, Ia),
9342 nc.prototype.getById = function(e) {
9343 return we.configure(Ga(this).concat("(" + e + ")"), "sgs.getById")
9344 }
9345 ,
9346 nc.prototype.add = function(r) {
9347 return Object(g.a)(this, void 0, void 0, function() {
9348 var t, n;
9349 return Object(g.d)(this, function(e) {
9350 switch (e.label) {
9351 case 0:
9352 return t = ve(Object(y.h)(Se("SP.Group"), r)),
9353 [4, De(we.configure(this, "sgs.add"), t)];
9354 case 1:
9355 return [2, {
9356 data: n = e.sent(),
9357 group: this.getById(n.Id)
9358 }]
9359 }
9360 })
9361 })
9362 }
9363 ,
9364 nc.prototype.getByName = function(e) {
9365 return we.configure(Ga(this, "getByName('" + e + "')"), "sgs.getByName")
9366 }
9367 ,
9368 nc.prototype.removeById = function(e) {
9369 return De(this.clone(Ma, "removeById('" + e + "')"))
9370 }
9371 ,
9372 nc.prototype.removeByLoginName = function(e) {
9373 return De(this.clone(Ma, "removeByLoginName('" + e + "')"))
9374 }
9375 ,
9376 Object(g.b)([we("sgs.removeById")], nc.prototype, "removeById", null),
9377 Object(g.b)([we("sgs.removeByLoginName")], nc.prototype, "removeByLoginName", null),
9378 Object(g.b)([Ye("sitegroups")], nc)), Ma = Me(Ba), qa = (wa = Ve,
9379 Object(g.c)(tc, wa),
9380 Object.defineProperty(tc.prototype, "users", {
9381 get: function() {
9382 return we.configure(ka(this, "users"), "sg.users")
9383 },
9384 enumerable: !0,
9385 configurable: !0
9386 }),
9387 tc.prototype.setUserAsOwner = function(e) {
9388 return De(this.clone(Ga, "SetUserAsOwner(" + e + ")"))
9389 }
9390 ,
9391 Object(g.b)([we("sg.setUserAsOwner")], tc.prototype, "setUserAsOwner", null),
9392 tc), Ga = Me(qa), Wa = (Ta = We,
9393 Object(g.c)(ec, Ta),
9394 ec.prototype.getById = function(e) {
9395 return Ka(this).concat("(" + e + ")")
9396 }
9397 ,
9398 ec.prototype.add = function(t, n) {
9399 return Object(g.a)(this, void 0, void 0, function() {
9400 return Object(g.d)(this, function(e) {
9401 switch (e.label) {
9402 case 0:
9403 return [4, De(this.clone(Ha, "addroleassignment(principalid=" + t + ", roledefid=" + n + ")"))];
9404 case 1:
9405 return e.sent(),
9406 [2]
9407 }
9408 })
9409 })
9410 }
9411 ,
9412 ec.prototype.remove = function(t, n) {
9413 return Object(g.a)(this, void 0, void 0, function() {
9414 return Object(g.d)(this, function(e) {
9415 switch (e.label) {
9416 case 0:
9417 return [4, De(this.clone(Ha, "removeroleassignment(principalid=" + t + ", roledefid=" + n + ")"))];
9418 case 1:
9419 return e.sent(),
9420 [2]
9421 }
9422 })
9423 })
9424 }
9425 ,
9426 Object(g.b)([Ye("roleassignments")], ec)), Ha = Me(Wa), Va = (ja = Ve,
9427 Object(g.c)(Za, ja),
9428 Object.defineProperty(Za.prototype, "groups", {
9429 get: function() {
9430 return we.configure(Ma(this, "groups"), "ra.groups")
9431 },
9432 enumerable: !0,
9433 configurable: !0
9434 }),
9435 Object.defineProperty(Za.prototype, "bindings", {
9436 get: function() {
9437 return He(this, "roledefinitionbindings")
9438 },
9439 enumerable: !0,
9440 configurable: !0
9441 }),
9442 Za), Ka = Me(Va), Qa = (Sa = We,
9443 Object(g.c)(Ya, Sa),
9444 Ya.prototype.getById = function(e) {
9445 return Ja(this, "getById(" + e + ")")
9446 }
9447 ,
9448 Ya.prototype.getByName = function(e) {
9449 return Ja(this, "getbyname('" + e + "')")
9450 }
9451 ,
9452 Ya.prototype.getByType = function(e) {
9453 return Ja(this, "getbytype(" + e + ")")
9454 }
9455 ,
9456 Ya.prototype.add = function(r, i, o, s) {
9457 return Object(g.a)(this, void 0, void 0, function() {
9458 var t, n;
9459 return Object(g.d)(this, function(e) {
9460 switch (e.label) {
9461 case 0:
9462 return t = ve({
9463 BasePermissions: Object(y.h)(Se("SP.BasePermissions"), s),
9464 Description: i,
9465 Name: r,
9466 Order: o,
9467 __metadata: {
9468 type: "SP.RoleDefinition"
9469 }
9470 }),
9471 [4, De(this, t)];
9472 case 1:
9473 return [2, {
9474 data: n = e.sent(),
9475 definition: this.getById(n.Id)
9476 }]
9477 }
9478 })
9479 })
9480 }
9481 ,
9482 Object(g.b)([Ye("roledefinitions")], Ya)), za = Me(Qa), Xa = (ma = Ve,
9483 Object(g.c)($a, ma),
9484 $a.prototype.update = function(s) {
9485 return Object(g.a)(this, void 0, void 0, function() {
9486 var t, n, r, i, o;
9487 return Object(g.d)(this, function(e) {
9488 switch (e.label) {
9489 case 0:
9490 return t = ["BasePermissions"],
9491 void 0 !== Object(y.p)(s, t[0]) && (s[t[0]] = Object(y.h)(Se("SP." + t[0]), s[t[0]])),
9492 n = ve(Object(y.h)(Se("SP.RoleDefinition"), s), me({
9493 "X-HTTP-Method": "MERGE"
9494 })),
9495 [4, De(this, n)];
9496 case 1:
9497 return r = e.sent(),
9498 i = this,
9499 Object(y.p)(s, "Name") && (o = this.getParent(za, this.parentUrl, ""),
9500 i = o.getByName(s.Name)),
9501 [2, {
9502 data: r,
9503 definition: i
9504 }]
9505 }
9506 })
9507 })
9508 }
9509 ,
9510 $a), Ja = Me(Xa);
9511 function $a() {
9512 var e = null !== ma && ma.apply(this, arguments) || this;
9513 return e.delete = Je("rd"),
9514 e
9515 }
9516 function Ya() {
9517 return null !== Sa && Sa.apply(this, arguments) || this
9518 }
9519 function Za() {
9520 var e = null !== ja && ja.apply(this, arguments) || this;
9521 return e.delete = Je("ra"),
9522 e
9523 }
9524 function ec() {
9525 return null !== Ta && Ta.apply(this, arguments) || this
9526 }
9527 function tc() {
9528 var r = null !== wa && wa.apply(this, arguments) || this;
9529 return r.update = r._update("SP.Group", function(e, t) {
9530 var n = r;
9531 return Object(y.p)(t, "Title") && (n = r.getParent(Ga, r.parentUrl, "getByName('" + t.Title + "')")),
9532 {
9533 data: e,
9534 group: n
9535 }
9536 }),
9537 r
9538 }
9539 function nc() {
9540 return null !== Ia && Ia.apply(this, arguments) || this
9541 }
9542 function rc() {
9543 var t = null !== Pa && Pa.apply(this, arguments) || this;
9544 return t.delete = Je("su"),
9545 t.update = t._update("SP.User", function(e) {
9546 return {
9547 data: e,
9548 user: t
9549 }
9550 }),
9551 t
9552 }
9553 function ic() {
9554 return null !== _a && _a.apply(this, arguments) || this
9555 }
9556 function oc(r) {
9557 return Object(g.a)(this, void 0, void 0, function() {
9558 var t, n;
9559 return Object(g.d)(this, function(e) {
9560 switch (e.label) {
9561 case 0:
9562 return (t = this.clone(Ke, "getUserEffectivePermissions(@user)")).query.set("@user", "'" + encodeURIComponent(r) + "'"),
9563 [4, t.get()];
9564 case 1:
9565 return n = e.sent(),
9566 [2, Object(y.p)(n, "GetUserEffectivePermissions") ? n.GetUserEffectivePermissions : n]
9567 }
9568 })
9569 })
9570 }
9571 function sc() {
9572 return Object(g.a)(this, void 0, void 0, function() {
9573 var t;
9574 return Object(g.d)(this, function(e) {
9575 switch (e.label) {
9576 case 0:
9577 return [4, Ke("_api/web", "currentuser").configureFrom(this).select("LoginName")()];
9578 case 1:
9579 return t = e.sent(),
9580 [2, oc.call(this, t.LoginName)]
9581 }
9582 })
9583 })
9584 }
9585 function ac(t, n) {
9586 return void 0 === t && (t = !1),
9587 void 0 === n && (n = !1),
9588 Object(g.a)(this, void 0, void 0, function() {
9589 return Object(g.d)(this, function(e) {
9590 switch (e.label) {
9591 case 0:
9592 return [4, De(this.clone(Ge, "breakroleinheritance(copyroleassignments=" + t + ", clearsubscopes=" + n + ")"))];
9593 case 1:
9594 return e.sent(),
9595 [2]
9596 }
9597 })
9598 })
9599 }
9600 function cc() {
9601 return Object(g.a)(this, void 0, void 0, function() {
9602 return Object(g.d)(this, function(e) {
9603 switch (e.label) {
9604 case 0:
9605 return [4, De(this.clone(Ge, "resetroleinheritance"))];
9606 case 1:
9607 return e.sent(),
9608 [2]
9609 }
9610 })
9611 })
9612 }
9613 function uc(n, r) {
9614 return Object(g.a)(this, void 0, void 0, function() {
9615 var t;
9616 return Object(g.d)(this, function(e) {
9617 switch (e.label) {
9618 case 0:
9619 return [4, oc.call(this, n)];
9620 case 1:
9621 return t = e.sent(),
9622 [2, this.hasPermissions(t, r)]
9623 }
9624 })
9625 })
9626 }
9627 function lc(n) {
9628 return Object(g.a)(this, void 0, void 0, function() {
9629 var t;
9630 return Object(g.d)(this, function(e) {
9631 switch (e.label) {
9632 case 0:
9633 return [4, sc.call(this)];
9634 case 1:
9635 return t = e.sent(),
9636 [2, this.hasPermissions(t, n)]
9637 }
9638 })
9639 })
9640 }
9641 function pc(e, t) {
9642 if (!t)
9643 return !0;
9644 if (t === ha.FullMask)
9645 return 32767 == (32767 & e.High) && 65535 === e.Low;
9646 var n = 1;
9647 return 0 <= --t && t < 32 ? (n <<= t,
9648 0 != (e.Low & n)) : 32 <= t && t < 64 && (n <<= t - 32,
9649 0 != (e.High & n))
9650 }
9651 function dc(i, o, s) {
9652 return void 0 === s && (s = !1),
9653 Object(g.a)(this, void 0, void 0, function() {
9654 var t, n, r;
9655 return Object(g.d)(this, function(e) {
9656 switch (e.label) {
9657 case 0:
9658 return s ? [2, Sc(i, o)] : [4, function(r, i) {
9659 return Object(g.a)(this, void 0, void 0, function() {
9660 var t, n;
9661 return Object(g.d)(this, function(e) {
9662 switch (e.label) {
9663 case 0:
9664 if (null == i)
9665 return [3, 7];
9666 switch (i) {
9667 case va.Contributor:
9668 return [3, 1];
9669 case va.Reader:
9670 case va.Guest:
9671 return [3, 3]
9672 }
9673 return [3, 5];
9674 case 1:
9675 return [4, Tt("_api/web", "associatedmembergroup").select("Id")()];
9676 case 2:
9677 return [2, "group: " + e.sent().Id];
9678 case 3:
9679 return [4, Tt("_api/web", "associatedvisitorgroup").select("Id")()];
9680 case 4:
9681 return [2, "group: " + e.sent().Id];
9682 case 5:
9683 throw Error("Could not determine role value for supplied value. Contributor, Reader, and Guest are supported");
9684 case 6:
9685 return [3, 9];
9686 case 7:
9687 return t = r === fa.Edit ? va.Contributor : va.Reader,
9688 [4, za("_api/web").select("Id").top(1).filter("RoleTypeKind eq " + t)()];
9689 case 8:
9690 if ((n = e.sent()).length < 1)
9691 throw Error("Could not locate associated role definition for supplied role. Edit and View are supported");
9692 return [2, "role: " + n[0].Id];
9693 case 9:
9694 return [2]
9695 }
9696 })
9697 })
9698 }((o = Object(y.h)(o, {
9699 group: null,
9700 includeAnonymousLinkInEmail: !1,
9701 propagateAcl: !1,
9702 useSimplifiedRoles: !0
9703 }, !0)).role, o.group)];
9704 case 1:
9705 return t = e.sent(),
9706 Array.isArray(o.loginNames) || (o.loginNames = [o.loginNames]),
9707 n = Object(y.t)(o.loginNames.map(function(e) {
9708 return {
9709 Key: e
9710 }
9711 })),
9712 r = {
9713 peoplePickerInput: n,
9714 roleValue: t,
9715 url: o.url
9716 },
9717 void 0 !== o.emailData && null !== o.emailData && (r = Object(y.h)(r, {
9718 emailBody: o.emailData.body,
9719 emailSubject: void 0 !== o.emailData.subject ? o.emailData.subject : "Shared with you.",
9720 sendEmail: !0
9721 })),
9722 [2, Sc(i, r)]
9723 }
9724 })
9725 })
9726 }
9727 function hc(e, t) {
9728 void 0 === t && (t = null);
9729 var n = null !== t ? t.toISOString() : null
9730 , r = we.configure(this.clone(Ke, "shareLink"), "sh.getShareLink");
9731 return De(r, ve({
9732 request: {
9733 createLink: !0,
9734 emailData: null,
9735 settings: {
9736 expiration: n,
9737 linkKind: e
9738 }
9739 }
9740 }))
9741 }
9742 function fc(e) {
9743 var t = we.configure(this.clone(Ke, "checkPermissions"), "sh.checkPermissions");
9744 return De(t, ve({
9745 recipients: e
9746 }))
9747 }
9748 function bc(e, t) {
9749 void 0 === e && (e = null),
9750 void 0 === t && (t = []);
9751 var n = we.configure(this.clone(Ke, "getSharingInformation"), "sh.getSharingInformation");
9752 return De(n.expand.apply(n, Object(g.e)(t)), ve({
9753 request: e
9754 }))
9755 }
9756 function yc(e) {
9757 void 0 === e && (e = !0);
9758 var t = we.configure(this.clone(Ke, "getObjectSharingSettings"), "sh.getObjectSharingSettings");
9759 return De(t, ve({
9760 useSimplifiedRoles: e
9761 }))
9762 }
9763 function gc() {
9764 return De(we.configure(this.clone(Ke, "unshareObject"), "sh.unshareObject"))
9765 }
9766 function Oc(e) {
9767 return De(we.configure(this.clone(Ke, "deleteLinkByKind"), "sh.deleteLinkByKind"), ve({
9768 linkKind: e
9769 }))
9770 }
9771 function vc(e, t) {
9772 return void 0 === t && (t = "00000000-0000-0000-0000-000000000000"),
9773 De(we.configure(this.clone(Ke, "unshareLink"), "sh.unshareLink"), ve({
9774 linkKind: e,
9775 shareId: t
9776 }))
9777 }
9778 function mc(o, s, a, c, u, l) {
9779 return void 0 === c && (c = !1),
9780 void 0 === u && (u = !1),
9781 Object(g.a)(this, void 0, void 0, function() {
9782 var t, n, r, i;
9783 return Object(g.d)(this, function(e) {
9784 switch (e.label) {
9785 case 0:
9786 return Array.isArray(s) || (s = [s]),
9787 t = Object(y.t)(s.map(function(e) {
9788 return {
9789 Key: e
9790 }
9791 })),
9792 n = a === fa.Edit ? va.Contributor : va.Reader,
9793 [4, He("_api/web", "roledefinitions").select("Id").filter("RoleTypeKind eq " + n).get()];
9794 case 1:
9795 if (r = e.sent(),
9796 !Array.isArray(r) || r.length < 1)
9797 throw Error("Could not locate a role defintion with RoleTypeKind " + n);
9798 return i = {
9799 includeAnonymousLinkInEmail: c,
9800 peoplePickerInput: t,
9801 propagateAcl: u,
9802 roleValue: "role:" + r[0].Id,
9803 useSimplifiedRoles: !0
9804 },
9805 void 0 !== l && (i = Object(y.h)(i, {
9806 emailBody: l.body,
9807 emailSubject: void 0 !== l.subject ? l.subject : "",
9808 sendEmail: !0
9809 })),
9810 [2, De(we.configure(o.clone(Ke, "shareObject"), "sh.shareWith"), ve(i))]
9811 }
9812 })
9813 })
9814 }
9815 function Sc(e, t) {
9816 var n = we.configure(Tt(Te(e.toUrl()), "/_api/SP.Web.ShareObject"), "sh.sendShareObjectRequest");
9817 return De(n.expand("UsersWithAccessRequests", "GroupsSharedWith"), ve(t))
9818 }
9819 (xa = ha = ha || {})[xa.EmptyMask = 0] = "EmptyMask",
9820 xa[xa.ViewListItems = 1] = "ViewListItems",
9821 xa[xa.AddListItems = 2] = "AddListItems",
9822 xa[xa.EditListItems = 3] = "EditListItems",
9823 xa[xa.DeleteListItems = 4] = "DeleteListItems",
9824 xa[xa.ApproveItems = 5] = "ApproveItems",
9825 xa[xa.OpenItems = 6] = "OpenItems",
9826 xa[xa.ViewVersions = 7] = "ViewVersions",
9827 xa[xa.DeleteVersions = 8] = "DeleteVersions",
9828 xa[xa.CancelCheckout = 9] = "CancelCheckout",
9829 xa[xa.ManagePersonalViews = 10] = "ManagePersonalViews",
9830 xa[xa.ManageLists = 12] = "ManageLists",
9831 xa[xa.ViewFormPages = 13] = "ViewFormPages",
9832 xa[xa.AnonymousSearchAccessList = 14] = "AnonymousSearchAccessList",
9833 xa[xa.Open = 17] = "Open",
9834 xa[xa.ViewPages = 18] = "ViewPages",
9835 xa[xa.AddAndCustomizePages = 19] = "AddAndCustomizePages",
9836 xa[xa.ApplyThemeAndBorder = 20] = "ApplyThemeAndBorder",
9837 xa[xa.ApplyStyleSheets = 21] = "ApplyStyleSheets",
9838 xa[xa.ViewUsageData = 22] = "ViewUsageData",
9839 xa[xa.CreateSSCSite = 23] = "CreateSSCSite",
9840 xa[xa.ManageSubwebs = 24] = "ManageSubwebs",
9841 xa[xa.CreateGroups = 25] = "CreateGroups",
9842 xa[xa.ManagePermissions = 26] = "ManagePermissions",
9843 xa[xa.BrowseDirectories = 27] = "BrowseDirectories",
9844 xa[xa.BrowseUserInfo = 28] = "BrowseUserInfo",
9845 xa[xa.AddDelPrivateWebParts = 29] = "AddDelPrivateWebParts",
9846 xa[xa.UpdatePersonalWebParts = 30] = "UpdatePersonalWebParts",
9847 xa[xa.ManageWeb = 31] = "ManageWeb",
9848 xa[xa.AnonymousSearchAccessWebLists = 32] = "AnonymousSearchAccessWebLists",
9849 xa[xa.UseClientIntegration = 37] = "UseClientIntegration",
9850 xa[xa.UseRemoteAPIs = 38] = "UseRemoteAPIs",
9851 xa[xa.ManageAlerts = 39] = "ManageAlerts",
9852 xa[xa.CreateAlerts = 40] = "CreateAlerts",
9853 xa[xa.EditMyUserInfo = 41] = "EditMyUserInfo",
9854 xa[xa.EnumeratePermissions = 63] = "EnumeratePermissions",
9855 xa[xa.FullMask = 65] = "FullMask",
9856 _(Qt, "roleAssignments", Ha),
9857 _(Qt, "firstUniqueAncestorSecurableObject", Ke),
9858 Qt.prototype.getUserEffectivePermissions = oc,
9859 Qt.prototype.getCurrentUserEffectivePermissions = sc,
9860 Qt.prototype.breakRoleInheritance = ac,
9861 Qt.prototype.resetRoleInheritance = cc,
9862 Qt.prototype.userHasPermissions = uc,
9863 Qt.prototype.currentUserHasPermissions = lc,
9864 Qt.prototype.hasPermissions = pc,
9865 _(Dt, "roleAssignments", Ha),
9866 _(Dt, "firstUniqueAncestorSecurableObject", Ke),
9867 Dt.prototype.getUserEffectivePermissions = oc,
9868 Dt.prototype.getCurrentUserEffectivePermissions = sc,
9869 Dt.prototype.breakRoleInheritance = ac,
9870 Dt.prototype.resetRoleInheritance = cc,
9871 Dt.prototype.userHasPermissions = uc,
9872 Dt.prototype.currentUserHasPermissions = lc,
9873 Dt.prototype.hasPermissions = pc,
9874 _(jt, "roleDefinitions", za),
9875 _(jt, "roleAssignments", Ha),
9876 _(jt, "firstUniqueAncestorSecurableObject", Ke),
9877 jt.prototype.getUserEffectivePermissions = oc,
9878 jt.prototype.getCurrentUserEffectivePermissions = sc,
9879 jt.prototype.breakRoleInheritance = ac,
9880 jt.prototype.resetRoleInheritance = cc,
9881 jt.prototype.userHasPermissions = uc,
9882 jt.prototype.currentUserHasPermissions = lc,
9883 jt.prototype.hasPermissions = pc,
9884 (Ua = fa = fa || {})[Ua.None = 0] = "None",
9885 Ua[Ua.View = 1] = "View",
9886 Ua[Ua.Edit = 2] = "Edit",
9887 Ua[Ua.Owner = 3] = "Owner",
9888 (Aa = ba = ba || {})[Aa.Unknown = 0] = "Unknown",
9889 Aa[Aa.File = 1] = "File",
9890 Aa[Aa.Folder = 2] = "Folder",
9891 Aa[Aa.Item = 3] = "Item",
9892 Aa[Aa.List = 4] = "List",
9893 Aa[Aa.Web = 5] = "Web",
9894 Aa[Aa.Max = 6] = "Max",
9895 (Na = ya = ya || {})[Na.None = 0] = "None",
9896 Na[Na.AllowList = 1] = "AllowList",
9897 Na[Na.BlockList = 2] = "BlockList",
9898 (Ra = ga = ga || {})[Ra.CompletedSuccessfully = 0] = "CompletedSuccessfully",
9899 Ra[Ra.AccessRequestsQueued = 1] = "AccessRequestsQueued",
9900 Ra[Ra.NoResolvedUsers = -1] = "NoResolvedUsers",
9901 Ra[Ra.AccessDenied = -2] = "AccessDenied",
9902 Ra[Ra.CrossSiteRequestNotSupported = -3] = "CrossSiteRequestNotSupported",
9903 Ra[Ra.UnknowError = -4] = "UnknowError",
9904 Ra[Ra.EmailBodyTooLong = -5] = "EmailBodyTooLong",
9905 Ra[Ra.ListUniqueScopesExceeded = -6] = "ListUniqueScopesExceeded",
9906 Ra[Ra.CapabilityDisabled = -7] = "CapabilityDisabled",
9907 Ra[Ra.ObjectNotSupported = -8] = "ObjectNotSupported",
9908 Ra[Ra.NestedGroupsNotSupported = -9] = "NestedGroupsNotSupported",
9909 (Ea = Oa = Oa || {})[Ea.Uninitialized = 0] = "Uninitialized",
9910 Ea[Ea.Direct = 1] = "Direct",
9911 Ea[Ea.OrganizationView = 2] = "OrganizationView",
9912 Ea[Ea.OrganizationEdit = 3] = "OrganizationEdit",
9913 Ea[Ea.AnonymousView = 4] = "AnonymousView",
9914 Ea[Ea.AnonymousEdit = 5] = "AnonymousEdit",
9915 Ea[Ea.Flexible = 6] = "Flexible",
9916 (Ca = va = va || {})[Ca.None = 0] = "None",
9917 Ca[Ca.Guest = 1] = "Guest",
9918 Ca[Ca.Reader = 2] = "Reader",
9919 Ca[Ca.Contributor = 3] = "Contributor",
9920 Ca[Ca.WebDesigner = 4] = "WebDesigner",
9921 Ca[Ca.Administrator = 5] = "Administrator",
9922 Or.prototype.shareWith = function(e, t, n, r) {
9923 return void 0 === t && (t = fa.View),
9924 void 0 === n && (n = !1),
9925 mc(this, e, t, n, !1, r)
9926 }
9927 ,
9928 Or.prototype.getShareLink = hc,
9929 Or.prototype.checkSharingPermissions = fc,
9930 Or.prototype.getSharingInformation = bc,
9931 Or.prototype.getObjectSharingSettings = yc,
9932 Or.prototype.unshare = gc,
9933 Or.prototype.deleteSharingLinkByKind = Oc,
9934 Or.prototype.unshareLink = vc,
9935 Ao.prototype.shareWith = function(r, i, o, s, a) {
9936 return void 0 === i && (i = fa.View),
9937 void 0 === o && (o = !1),
9938 void 0 === s && (s = !1),
9939 Object(g.a)(this, void 0, void 0, function() {
9940 var t, n;
9941 return Object(g.d)(this, function(e) {
9942 switch (e.label) {
9943 case 0:
9944 return t = this.addBatchDependency(),
9945 [4, this.getShareable()];
9946 case 1:
9947 return n = e.sent(),
9948 t(),
9949 [2, n.shareWith(r, i, o, s, a)]
9950 }
9951 })
9952 })
9953 }
9954 ,
9955 Ao.prototype.getShareLink = function(r, i) {
9956 return void 0 === i && (i = null),
9957 Object(g.a)(this, void 0, void 0, function() {
9958 var t, n;
9959 return Object(g.d)(this, function(e) {
9960 switch (e.label) {
9961 case 0:
9962 return t = this.addBatchDependency(),
9963 [4, this.getShareable()];
9964 case 1:
9965 return n = e.sent(),
9966 t(),
9967 [2, n.getShareLink(r, i)]
9968 }
9969 })
9970 })
9971 }
9972 ,
9973 Ao.prototype.checkSharingPermissions = function(r) {
9974 return Object(g.a)(this, void 0, void 0, function() {
9975 var t, n;
9976 return Object(g.d)(this, function(e) {
9977 switch (e.label) {
9978 case 0:
9979 return t = this.addBatchDependency(),
9980 [4, this.getShareable()];
9981 case 1:
9982 return n = e.sent(),
9983 t(),
9984 [2, n.checkSharingPermissions(r)]
9985 }
9986 })
9987 })
9988 }
9989 ,
9990 Ao.prototype.getSharingInformation = function(r, i) {
9991 return Object(g.a)(this, void 0, void 0, function() {
9992 var t, n;
9993 return Object(g.d)(this, function(e) {
9994 switch (e.label) {
9995 case 0:
9996 return t = this.addBatchDependency(),
9997 [4, this.getShareable()];
9998 case 1:
9999 return n = e.sent(),
10000 t(),
10001 [2, n.getSharingInformation(r, i)]
10002 }
10003 })
10004 })
10005 }
10006 ,
10007 Ao.prototype.getObjectSharingSettings = function(r) {
10008 return void 0 === r && (r = !0),
10009 Object(g.a)(this, void 0, void 0, function() {
10010 var t, n;
10011 return Object(g.d)(this, function(e) {
10012 switch (e.label) {
10013 case 0:
10014 return t = this.addBatchDependency(),
10015 [4, this.getShareable()];
10016 case 1:
10017 return n = e.sent(),
10018 t(),
10019 [2, n.getObjectSharingSettings(r)]
10020 }
10021 })
10022 })
10023 }
10024 ,
10025 Ao.prototype.unshare = function() {
10026 return Object(g.a)(this, void 0, void 0, function() {
10027 var t, n;
10028 return Object(g.d)(this, function(e) {
10029 switch (e.label) {
10030 case 0:
10031 return t = this.addBatchDependency(),
10032 [4, this.getShareable()];
10033 case 1:
10034 return n = e.sent(),
10035 t(),
10036 [2, n.unshare()]
10037 }
10038 })
10039 })
10040 }
10041 ,
10042 Ao.prototype.deleteSharingLinkByKind = function(r) {
10043 return Object(g.a)(this, void 0, void 0, function() {
10044 var t, n;
10045 return Object(g.d)(this, function(e) {
10046 switch (e.label) {
10047 case 0:
10048 return t = this.addBatchDependency(),
10049 [4, this.getShareable()];
10050 case 1:
10051 return n = e.sent(),
10052 t(),
10053 [2, n.deleteSharingLinkByKind(r)]
10054 }
10055 })
10056 })
10057 }
10058 ,
10059 Ao.prototype.unshareLink = function(r, i) {
10060 return Object(g.a)(this, void 0, void 0, function() {
10061 var t, n;
10062 return Object(g.d)(this, function(e) {
10063 switch (e.label) {
10064 case 0:
10065 return t = this.addBatchDependency(),
10066 [4, this.getShareable()];
10067 case 1:
10068 return n = e.sent(),
10069 t(),
10070 [2, n.unshareLink(r, i)]
10071 }
10072 })
10073 })
10074 }
10075 ,
10076 Qt.prototype.shareWith = function(e, t, n, r) {
10077 return void 0 === t && (t = fa.View),
10078 void 0 === n && (n = !1),
10079 mc(this, e, t, n, !1, r)
10080 }
10081 ,
10082 Qt.prototype.getShareLink = hc,
10083 Qt.prototype.checkSharingPermissions = fc,
10084 Qt.prototype.getSharingInformation = bc,
10085 Qt.prototype.getObjectSharingSettings = yc,
10086 Qt.prototype.unshare = gc,
10087 Qt.prototype.deleteSharingLinkByKind = Oc,
10088 Qt.prototype.unshareLink = vc,
10089 jt.prototype.shareWith = function(r, i, o) {
10090 return void 0 === i && (i = fa.View),
10091 Object(g.a)(this, void 0, void 0, function() {
10092 var t, n;
10093 return Object(g.d)(this, function(e) {
10094 switch (e.label) {
10095 case 0:
10096 return t = this.addBatchDependency(),
10097 [4, new Ve(Te(this.toUrl()),"/_api/web/url").get()];
10098 case 1:
10099 return n = e.sent(),
10100 t(),
10101 [2, this.shareObject(Object(y.i)(n, "/_layouts/15/aclinv.aspx?forSharing=1&mbypass=1"), r, i, o)]
10102 }
10103 })
10104 })
10105 }
10106 ,
10107 jt.prototype.shareObject = function(e, t, n, r, i, o, s, a) {
10108 return void 0 === o && (o = !1),
10109 void 0 === s && (s = !1),
10110 void 0 === a && (a = !0),
10111 dc(this, {
10112 emailData: r,
10113 group: i,
10114 includeAnonymousLinkInEmail: s,
10115 loginNames: t,
10116 propagateAcl: o,
10117 role: n,
10118 url: e,
10119 useSimplifiedRoles: a
10120 })
10121 }
10122 ,
10123 jt.prototype.shareObjectRaw = function(e) {
10124 return dc(this, e, !0)
10125 }
10126 ,
10127 jt.prototype.unshareObject = function(e) {
10128 return De(Tt(this, "unshareObject"), ve({
10129 url: e
10130 }))
10131 }
10132 ;
10133 var jc, Tc = (jc = qe,
10134 Object(g.c)(Pc, jc),
10135 Pc.prototype.execute = function(e) {
10136 return De(this, ve(e, me({
10137 "Content-Type": "application/json;charset=utf-8"
10138 })))
10139 }
10140 ,
10141 Pc.prototype.createSiteDesign = function(e) {
10142 return this.clone(Ic, "CreateSiteDesign").execute({
10143 info: e
10144 })
10145 }
10146 ,
10147 Pc.prototype.applySiteDesign = function(e, t) {
10148 return this.clone(Ic, "ApplySiteDesign").execute({
10149 siteDesignId: e,
10150 webUrl: t
10151 })
10152 }
10153 ,
10154 Pc.prototype.getSiteDesigns = function() {
10155 return this.clone(Ic, "GetSiteDesigns").execute({})
10156 }
10157 ,
10158 Pc.prototype.getSiteDesignMetadata = function(e) {
10159 return this.clone(Ic, "GetSiteDesignMetadata").execute({
10160 id: e
10161 })
10162 }
10163 ,
10164 Pc.prototype.updateSiteDesign = function(e) {
10165 return this.clone(Ic, "UpdateSiteDesign").execute({
10166 updateInfo: e
10167 })
10168 }
10169 ,
10170 Pc.prototype.deleteSiteDesign = function(e) {
10171 return this.clone(Ic, "DeleteSiteDesign").execute({
10172 id: e
10173 })
10174 }
10175 ,
10176 Pc.prototype.getSiteDesignRights = function(e) {
10177 return this.clone(Ic, "GetSiteDesignRights").execute({
10178 id: e
10179 })
10180 }
10181 ,
10182 Pc.prototype.grantSiteDesignRights = function(e, t, n) {
10183 return void 0 === n && (n = 1),
10184 this.clone(Ic, "GrantSiteDesignRights").execute({
10185 grantedRights: n.toString(),
10186 id: e,
10187 principalNames: t
10188 })
10189 }
10190 ,
10191 Pc.prototype.revokeSiteDesignRights = function(e, t) {
10192 return this.clone(Ic, "RevokeSiteDesignRights").execute({
10193 id: e,
10194 principalNames: t
10195 })
10196 }
10197 ,
10198 Pc.prototype.addSiteDesignTask = function(e, t) {
10199 return this.clone(Ic, "AddSiteDesignTask").execute({
10200 webUrl: e,
10201 siteDesignId: t
10202 })
10203 }
10204 ,
10205 Pc.prototype.addSiteDesignTaskToCurrentWeb = function(e) {
10206 return this.clone(Ic, "AddSiteDesignTaskToCurrentWeb").execute({
10207 siteDesignId: e
10208 })
10209 }
10210 ,
10211 Pc.prototype.getSiteDesignTask = function(n) {
10212 return Object(g.a)(this, void 0, void 0, function() {
10213 var t;
10214 return Object(g.d)(this, function(e) {
10215 switch (e.label) {
10216 case 0:
10217 return [4, this.clone(Ic, "GetSiteDesignTask").execute({
10218 taskId: n
10219 })];
10220 case 1:
10221 return t = e.sent(),
10222 [2, Object(y.p)(t, "ID") ? t : null]
10223 }
10224 })
10225 })
10226 }
10227 ,
10228 Pc.prototype.getSiteDesignRun = function(e, t) {
10229 return this.clone(Ic, "GetSiteDesignRun").execute({
10230 webUrl: e,
10231 siteDesignId: t
10232 })
10233 }
10234 ,
10235 Pc.prototype.getSiteDesignRunStatus = function(e, t) {
10236 return this.clone(Ic, "GetSiteDesignRunStatus").execute({
10237 webUrl: e,
10238 runId: t
10239 })
10240 }
10241 ,
10242 Object(g.b)([we("sd.createSiteDesign")], Pc.prototype, "createSiteDesign", null),
10243 Object(g.b)([we("sd.applySiteDesign")], Pc.prototype, "applySiteDesign", null),
10244 Object(g.b)([we("sd.getSiteDesigns")], Pc.prototype, "getSiteDesigns", null),
10245 Object(g.b)([we("sd.getSiteDesignMetadata")], Pc.prototype, "getSiteDesignMetadata", null),
10246 Object(g.b)([we("sd.updateSiteDesign")], Pc.prototype, "updateSiteDesign", null),
10247 Object(g.b)([we("sd.deleteSiteDesign")], Pc.prototype, "deleteSiteDesign", null),
10248 Object(g.b)([we("sd.getSiteDesignRights")], Pc.prototype, "getSiteDesignRights", null),
10249 Object(g.b)([we("sd.grantSiteDesignRights")], Pc.prototype, "grantSiteDesignRights", null),
10250 Object(g.b)([we("sd.revokeSiteDesignRights")], Pc.prototype, "revokeSiteDesignRights", null),
10251 Object(g.b)([we("sd.addSiteDesignTask")], Pc.prototype, "addSiteDesignTask", null),
10252 Object(g.b)([we("sd.addSiteDesignTaskToCurrentWeb")], Pc.prototype, "addSiteDesignTaskToCurrentWeb", null),
10253 Object(g.b)([we("sd.getSiteDesignTask")], Pc.prototype, "getSiteDesignTask", null),
10254 Object(g.b)([we("sd.getSiteDesignRun")], Pc.prototype, "getSiteDesignRun", null),
10255 Object(g.b)([we("sd.getSiteDesignRunStatus")], Pc.prototype, "getSiteDesignRunStatus", null),
10256 Pc), wc = function(e, t) {
10257 return new Tc(e,t)
10258 }, Ic = function(e, t) {
10259 return void 0 === t && (t = ""),
10260 wc(e, t)
10261 };
10262 function Pc(e, t) {
10263 void 0 === t && (t = "");
10264 var n = "string" == typeof e ? e : e.toUrl();
10265 return jc.call(this, Te(n), "_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility." + t) || this
10266 }
10267 jt.prototype.getSiteDesignRuns = function(e) {
10268 return wc(this, "").getSiteDesignRun(void 0, e)
10269 }
10270 ,
10271 jt.prototype.addSiteDesignTask = function(e) {
10272 return wc(this, "").addSiteDesignTaskToCurrentWeb(e)
10273 }
10274 ,
10275 jt.prototype.getSiteDesignRunStatus = function(e) {
10276 return wc(this, "").getSiteDesignRunStatus(void 0, e)
10277 }
10278 ,
10279 Reflect.defineProperty(lt.prototype, "siteDesigns", {
10280 configurable: !0,
10281 enumerable: !0,
10282 get: function() {
10283 return wc(this._baseUrl)
10284 }
10285 }),
10286 _(jt, "siteGroups", Ma),
10287 _(jt, "associatedOwnerGroup", Ma, "associatedownergroup"),
10288 _(jt, "associatedMemberGroup", Ma, "associatedmembergroup"),
10289 _(jt, "associatedVisitorGroup", Ma, "associatedvisitorgroup"),
10290 jt.prototype.createDefaultAssociatedGroups = function(n, r, i, o, s) {
10291 return void 0 === i && (i = !1),
10292 void 0 === o && (o = !0),
10293 Object(g.a)(this, void 0, void 0, function() {
10294 var t;
10295 return Object(g.d)(this, function(e) {
10296 switch (e.label) {
10297 case 0:
10298 return [4, this.breakRoleInheritance(i, o)];
10299 case 1:
10300 return e.sent(),
10301 (t = this.clone(Tt, "createDefaultAssociatedGroups(userLogin=@u,userLogin2=@v,groupNameSeed=@s)")).query.set("@u", "'" + ht(r || "") + "'"),
10302 t.query.set("@v", "'" + ht(s || "") + "'"),
10303 t.query.set("@s", "'" + ht(n || "") + "'"),
10304 [2, De(t)]
10305 }
10306 })
10307 })
10308 }
10309 ;
10310 var _c, Cc = (_c = qe,
10311 Object(g.c)(Nc, _c),
10312 Nc.prototype.execute = function(e) {
10313 return De(this, ve(e))
10314 }
10315 ,
10316 Nc.prototype.getSiteScripts = function() {
10317 return this.clone(Rc, "GetSiteScripts", !0).execute({})
10318 }
10319 ,
10320 Nc.prototype.createSiteScript = function(e, t, n) {
10321 return this.clone(Rc, "CreateSiteScript(Title=@title,Description=@desc)?@title='" + ht(e) + "'&@desc='" + ht(t) + "'").execute(n)
10322 }
10323 ,
10324 Nc.prototype.getSiteScriptMetadata = function(e) {
10325 return this.clone(Rc, "GetSiteScriptMetadata").execute({
10326 id: e
10327 })
10328 }
10329 ,
10330 Nc.prototype.deleteSiteScript = function(e) {
10331 return this.clone(Rc, "DeleteSiteScript").execute({
10332 id: e
10333 })
10334 }
10335 ,
10336 Nc.prototype.updateSiteScript = function(e, t) {
10337 return t && (e.Content = JSON.stringify(t)),
10338 this.clone(Rc, "UpdateSiteScript").execute({
10339 updateInfo: e
10340 })
10341 }
10342 ,
10343 Nc.prototype.getSiteScriptFromList = function(e) {
10344 return this.clone(Rc, "GetSiteScriptFromList").execute({
10345 listUrl: e
10346 })
10347 }
10348 ,
10349 Nc.prototype.getSiteScriptFromWeb = function(e, t) {
10350 return this.clone(Rc, "getSiteScriptFromWeb").execute({
10351 webUrl: e,
10352 info: t
10353 })
10354 }
10355 ,
10356 Object(g.b)([we("ss.getSiteScripts")], Nc.prototype, "getSiteScripts", null),
10357 Object(g.b)([we("ss.createSiteScript")], Nc.prototype, "createSiteScript", null),
10358 Object(g.b)([we("ss.getSiteScriptMetadata")], Nc.prototype, "getSiteScriptMetadata", null),
10359 Object(g.b)([we("ss.deleteSiteScript")], Nc.prototype, "deleteSiteScript", null),
10360 Object(g.b)([we("ss.updateSiteScript")], Nc.prototype, "updateSiteScript", null),
10361 Object(g.b)([we("ss.getSiteScriptFromList")], Nc.prototype, "getSiteScriptFromList", null),
10362 Object(g.b)([we("ss.getSiteScriptFromWeb")], Nc.prototype, "getSiteScriptFromWeb", null),
10363 Nc), Ec = function(e, t) {
10364 return new Cc(e,t)
10365 }, Rc = function(e, t) {
10366 return void 0 === t && (t = ""),
10367 Ec(e, t)
10368 };
10369 function Nc(e, t) {
10370 void 0 === t && (t = "");
10371 var n = "string" == typeof e ? e : e.toUrl();
10372 return _c.call(this, Te(n), "_api/Microsoft.Sharepoint.Utilities.WebTemplateExtensions.SiteScriptUtility." + t) || this
10373 }
10374 jt.prototype.getSiteScript = function(e) {
10375 return Ec(this.toUrl(), "").getSiteScriptFromWeb(void 0, e)
10376 }
10377 ,
10378 Dt.prototype.getSiteScript = function() {
10379 return Object(g.a)(this, void 0, void 0, function() {
10380 var t, n, r;
10381 return Object(g.d)(this, function(e) {
10382 switch (e.label) {
10383 case 0:
10384 return [4, this.clone(kt).rootFolder.get()];
10385 case 1:
10386 return t = e.sent(),
10387 [4, Tt(Te(this.toUrl())).select("Url").get()];
10388 case 2:
10389 return n = e.sent(),
10390 r = Object(y.i)(n.Url, "Lists", t.Name),
10391 [2, Ec(this, "").getSiteScriptFromList(r)]
10392 }
10393 })
10394 })
10395 }
10396 ,
10397 Reflect.defineProperty(lt.prototype, "siteScripts", {
10398 configurable: !0,
10399 enumerable: !0,
10400 get: function() {
10401 return Ec(this._baseUrl)
10402 }
10403 }),
10404 _(jt, "siteUsers", ka),
10405 _(jt, "currentUser", Fa, "currentuser"),
10406 jt.prototype.ensureUser = function(n) {
10407 return Object(g.a)(this, void 0, void 0, function() {
10408 var t;
10409 return Object(g.d)(this, function(e) {
10410 switch (e.label) {
10411 case 0:
10412 return [4, De(this.clone(Tt, "ensureuser"), ve({
10413 logonName: n
10414 }))];
10415 case 1:
10416 return [2, {
10417 data: t = e.sent(),
10418 user: Fa(Ze(t))
10419 }]
10420 }
10421 })
10422 })
10423 }
10424 ,
10425 jt.prototype.getUserById = function(e) {
10426 return Fa(this, "getUserById(" + e + ")")
10427 }
10428 ;
10429 var Ac, Uc, xc, Dc, kc, Lc, Fc, Bc, Mc, qc, Gc = (Lc = Ve,
10430 Object(g.c)(Xc, Lc),
10431 Object.defineProperty(Xc.prototype, "my", {
10432 get: function() {
10433 return Kc(this)
10434 },
10435 enumerable: !0,
10436 configurable: !0
10437 }),
10438 Xc.prototype.getFollowedSitesUri = function() {
10439 return Object(g.a)(this, void 0, void 0, function() {
10440 var t;
10441 return Object(g.d)(this, function(e) {
10442 switch (e.label) {
10443 case 0:
10444 return [4, this.clone(Hc, "FollowedSitesUri").get()];
10445 case 1:
10446 return [2, (t = e.sent()).FollowedSitesUri || t]
10447 }
10448 })
10449 })
10450 }
10451 ,
10452 Xc.prototype.getFollowedDocumentsUri = function() {
10453 return Object(g.a)(this, void 0, void 0, function() {
10454 var t;
10455 return Object(g.d)(this, function(e) {
10456 switch (e.label) {
10457 case 0:
10458 return [4, this.clone(Hc, "FollowedDocumentsUri").get()];
10459 case 1:
10460 return [2, (t = e.sent()).FollowedDocumentsUri || t]
10461 }
10462 })
10463 })
10464 }
10465 ,
10466 Xc.prototype.follow = function(t) {
10467 return Object(g.a)(this, void 0, void 0, function() {
10468 return Object(g.d)(this, function(e) {
10469 switch (e.label) {
10470 case 0:
10471 return [4, De(this.clone(Hc, "follow"), this.createSocialActorInfoRequestBody(t))];
10472 case 1:
10473 return [2, e.sent()]
10474 }
10475 })
10476 })
10477 }
10478 ,
10479 Xc.prototype.isFollowed = function(t) {
10480 return Object(g.a)(this, void 0, void 0, function() {
10481 return Object(g.d)(this, function(e) {
10482 switch (e.label) {
10483 case 0:
10484 return [4, De(this.clone(Hc, "isfollowed"), this.createSocialActorInfoRequestBody(t))];
10485 case 1:
10486 return [2, e.sent()]
10487 }
10488 })
10489 })
10490 }
10491 ,
10492 Xc.prototype.stopFollowing = function(t) {
10493 return Object(g.a)(this, void 0, void 0, function() {
10494 return Object(g.d)(this, function(e) {
10495 switch (e.label) {
10496 case 0:
10497 return [4, De(this.clone(Hc, "stopfollowing"), this.createSocialActorInfoRequestBody(t))];
10498 case 1:
10499 return [2, e.sent()]
10500 }
10501 })
10502 })
10503 }
10504 ,
10505 Xc.prototype.createSocialActorInfoRequestBody = function(e) {
10506 return ve({
10507 actor: Object.assign(Se("SP.Social.SocialActorInfo"), {
10508 Id: null
10509 }, e)
10510 })
10511 }
10512 ,
10513 Object(g.b)([we("soc.getFollowedSitesUri")], Xc.prototype, "getFollowedSitesUri", null),
10514 Object(g.b)([we("soc.getFollowedDocumentsUri")], Xc.prototype, "getFollowedDocumentsUri", null),
10515 Object(g.b)([we("soc.follow")], Xc.prototype, "follow", null),
10516 Object(g.b)([we("soc.isFollowed")], Xc.prototype, "isFollowed", null),
10517 Object(g.b)([we("soc.stopFollowing")], Xc.prototype, "stopFollowing", null),
10518 Object(g.b)([Ye("_api/social.following")], Xc)), Wc = function(e) {
10519 return new Gc(e)
10520 }, Hc = function(e, t) {
10521 return new Gc(e,t)
10522 }, Vc = (kc = Ve,
10523 Object(g.c)(zc, kc),
10524 zc.prototype.followed = function(n) {
10525 return Object(g.a)(this, void 0, void 0, function() {
10526 var t;
10527 return Object(g.d)(this, function(e) {
10528 switch (e.label) {
10529 case 0:
10530 return [4, this.clone(Qc, "followed(types=" + n + ")")()];
10531 case 1:
10532 return t = e.sent(),
10533 [2, Object(y.p)(t, "Followed") ? t.Followed.results : t]
10534 }
10535 })
10536 })
10537 }
10538 ,
10539 zc.prototype.followedCount = function(n) {
10540 return Object(g.a)(this, void 0, void 0, function() {
10541 var t;
10542 return Object(g.d)(this, function(e) {
10543 switch (e.label) {
10544 case 0:
10545 return [4, this.clone(Qc, "followedcount(types=" + n + ")")()];
10546 case 1:
10547 return [2, (t = e.sent()).FollowedCount || t]
10548 }
10549 })
10550 })
10551 }
10552 ,
10553 zc.prototype.followers = function() {
10554 return Object(g.a)(this, void 0, void 0, function() {
10555 var t;
10556 return Object(g.d)(this, function(e) {
10557 switch (e.label) {
10558 case 0:
10559 return [4, this.clone(Qc, "followers")()];
10560 case 1:
10561 return t = e.sent(),
10562 [2, Object(y.p)(t, "Followers") ? t.Followers.results : t]
10563 }
10564 })
10565 })
10566 }
10567 ,
10568 zc.prototype.suggestions = function() {
10569 return Object(g.a)(this, void 0, void 0, function() {
10570 var t;
10571 return Object(g.d)(this, function(e) {
10572 switch (e.label) {
10573 case 0:
10574 return [4, this.clone(Qc, "suggestions")()];
10575 case 1:
10576 return t = e.sent(),
10577 [2, Object(y.p)(t, "Suggestions") ? t.Suggestions.results : t]
10578 }
10579 })
10580 })
10581 }
10582 ,
10583 Object(g.b)([we("msoc.followed")], zc.prototype, "followed", null),
10584 Object(g.b)([we("msoc.followedCount")], zc.prototype, "followedCount", null),
10585 Object(g.b)([we("msoc.followers")], zc.prototype, "followers", null),
10586 Object(g.b)([we("msoc.suggestions")], zc.prototype, "suggestions", null),
10587 Object(g.b)([Ye("my")], zc)), Kc = Me(Vc), Qc = function(e, t) {
10588 return Kc(e, t)
10589 };
10590 function zc() {
10591 return null !== kc && kc.apply(this, arguments) || this
10592 }
10593 function Xc() {
10594 return null !== Lc && Lc.apply(this, arguments) || this
10595 }
10596 (qc = Ac = Ac || {})[qc.User = 0] = "User",
10597 qc[qc.Document = 1] = "Document",
10598 qc[qc.Site = 2] = "Site",
10599 qc[qc.Tag = 3] = "Tag",
10600 (Mc = Uc = Uc || {})[Mc.None = 0] = "None",
10601 Mc[Mc.User = 1] = "User",
10602 Mc[Mc.Document = 2] = "Document",
10603 Mc[Mc.Site = 4] = "Site",
10604 Mc[Mc.Tag = 8] = "Tag",
10605 Mc[Mc.ExcludeContentWithoutFeeds = 268435456] = "ExcludeContentWithoutFeeds",
10606 Mc[Mc.IncludeGroupsSites = 536870912] = "IncludeGroupsSites",
10607 Mc[Mc.WithinLast24Hours = 1073741824] = "WithinLast24Hours",
10608 (Bc = xc = xc || {})[Bc.Ok = 0] = "Ok",
10609 Bc[Bc.AlreadyFollowing = 1] = "AlreadyFollowing",
10610 Bc[Bc.LimitReached = 2] = "LimitReached",
10611 Bc[Bc.InternalError = 3] = "InternalError",
10612 (Fc = Dc = Dc || {})[Fc.OK = 0] = "OK",
10613 Fc[Fc.InvalidRequest = 1] = "InvalidRequest",
10614 Fc[Fc.AccessDenied = 2] = "AccessDenied",
10615 Fc[Fc.ItemNotFound = 3] = "ItemNotFound",
10616 Fc[Fc.InvalidOperation = 4] = "InvalidOperation",
10617 Fc[Fc.ItemNotModified = 5] = "ItemNotModified",
10618 Fc[Fc.InternalError = 6] = "InternalError",
10619 Fc[Fc.CacheReadError = 7] = "CacheReadError",
10620 Fc[Fc.CacheUpdateError = 8] = "CacheUpdateError",
10621 Fc[Fc.PersonalSiteNotFound = 9] = "PersonalSiteNotFound",
10622 Fc[Fc.FailedToCreatePersonalSite = 10] = "FailedToCreatePersonalSite",
10623 Fc[Fc.NotAuthorizedToCreatePersonalSite = 11] = "NotAuthorizedToCreatePersonalSite",
10624 Fc[Fc.CannotCreatePersonalSite = 12] = "CannotCreatePersonalSite",
10625 Fc[Fc.LimitReached = 13] = "LimitReached",
10626 Fc[Fc.AttachmentError = 14] = "AttachmentError",
10627 Fc[Fc.PartialData = 15] = "PartialData",
10628 Fc[Fc.FeatureDisabled = 16] = "FeatureDisabled",
10629 Fc[Fc.StorageQuotaExceeded = 17] = "StorageQuotaExceeded",
10630 Fc[Fc.DatabaseError = 18] = "DatabaseError",
10631 Reflect.defineProperty(lt.prototype, "social", {
10632 configurable: !0,
10633 enumerable: !0,
10634 get: function() {
10635 return Wc(this._baseUrl)
10636 }
10637 });
10638 var Jc, $c = (Jc = qe,
10639 Object(g.c)(eu, Jc),
10640 eu.prototype.excute = function(e) {
10641 return De(this, ve(e))
10642 }
10643 ,
10644 eu.prototype.sendEmail = function(e) {
10645 var t = {
10646 properties: Object(y.h)(Se("SP.Utilities.EmailProperties"), {
10647 Body: e.Body,
10648 From: e.From,
10649 Subject: e.Subject
10650 })
10651 };
10652 return e.To && 0 < e.To.length && (t.properties = Object(y.h)(t.properties, {
10653 To: {
10654 results: e.To
10655 }
10656 })),
10657 e.CC && 0 < e.CC.length && (t.properties = Object(y.h)(t.properties, {
10658 CC: {
10659 results: e.CC
10660 }
10661 })),
10662 e.BCC && 0 < e.BCC.length && (t.properties = Object(y.h)(t.properties, {
10663 BCC: {
10664 results: e.BCC
10665 }
10666 })),
10667 e.AdditionalHeaders && (t.properties = Object(y.h)(t.properties, {
10668 AdditionalHeaders: vn(e.AdditionalHeaders)
10669 })),
10670 we.configure(this.clone(Zc, "SendEmail", !0), "u.sendEmail").excute(t)
10671 }
10672 ,
10673 eu.prototype.getCurrentUserEmailAddresses = function() {
10674 return we.configure(this.clone(Zc, "GetCurrentUserEmailAddresses", !0), "u.getCurrentUserEmailAddresses").excute({})
10675 }
10676 ,
10677 eu.prototype.resolvePrincipal = function(e, t, n, r, i, o) {
10678 void 0 === o && (o = !1);
10679 var s = {
10680 addToUserInfoList: i,
10681 input: e,
10682 inputIsEmailOnly: r,
10683 matchUserInfoList: o,
10684 scopes: t,
10685 sources: n
10686 }
10687 , a = this.clone(Zc, "ResolvePrincipalInCurrentContext", !0);
10688 return we.configure(a, "u.ResolvePrincipalInCurrentContext").excute(s)
10689 }
10690 ,
10691 eu.prototype.searchPrincipals = function(e, t, n, r, i) {
10692 var o = {
10693 groupName: r,
10694 input: e,
10695 maxCount: i,
10696 scopes: t,
10697 sources: n
10698 }
10699 , s = this.clone(Zc, "SearchPrincipalsUsingContextWeb", !0);
10700 return we.configure(s, "u.SearchPrincipalsUsingContextWeb").excute(o)
10701 }
10702 ,
10703 eu.prototype.createEmailBodyForInvitation = function(e) {
10704 var t = {
10705 pageAddress: e
10706 }
10707 , n = this.clone(Zc, "CreateEmailBodyForInvitation", !0);
10708 return we.configure(n, "u.CreateEmailBodyForInvitation").excute(t)
10709 }
10710 ,
10711 eu.prototype.expandGroupsToPrincipals = function(e, t) {
10712 void 0 === t && (t = 30);
10713 var n = {
10714 inputs: e,
10715 maxCount: t
10716 }
10717 , r = this.clone(Zc, "ExpandGroupsToPrincipals", !0);
10718 return we.configure(r, "u.ExpandGroupsToPrincipals").excute(n)
10719 }
10720 ,
10721 eu.prototype.createWikiPage = function(r) {
10722 return Object(g.a)(this, void 0, void 0, function() {
10723 var t, n;
10724 return Object(g.d)(this, function(e) {
10725 switch (e.label) {
10726 case 0:
10727 return t = this.clone(Zc, "CreateWikiPageInContextWeb", !0),
10728 [4, we.configure(t, "u.CreateWikiPageInContextWeb").excute({
10729 parameters: r
10730 })];
10731 case 1:
10732 return [2, {
10733 data: n = e.sent(),
10734 file: vr(Ze(n))
10735 }]
10736 }
10737 })
10738 })
10739 }
10740 ,
10741 eu), Yc = Me($c), Zc = function(e, t) {
10742 return Yc(e, t)
10743 };
10744 function eu(e, t) {
10745 var n = "string" == typeof e ? e : e.toUrl();
10746 return Jc.call(this, Te(n), "_api/SP.Utilities.Utility." + t) || this
10747 }
10748 Reflect.defineProperty(lt.prototype, "utility", {
10749 configurable: !0,
10750 enumerable: !0,
10751 get: function() {
10752 return Yc(this._baseUrl, "")
10753 }
10754 });
10755 var tu, nu, ru = (nu = We,
10756 Object(g.c)(cu, nu),
10757 cu.prototype.getById = function(e) {
10758 return we.configure(su(this).concat("('" + e + "')"), "subs.getById")
10759 }
10760 ,
10761 cu.prototype.add = function(r, i, o) {
10762 return Object(g.a)(this, void 0, void 0, function() {
10763 var t, n;
10764 return Object(g.d)(this, function(e) {
10765 switch (e.label) {
10766 case 0:
10767 return t = {
10768 expirationDateTime: i,
10769 notificationUrl: r,
10770 resource: this.toUrl()
10771 },
10772 o && (t.clientState = o),
10773 [4, De(this, ve(t, me({
10774 "Content-Type": "application/json"
10775 })))];
10776 case 1:
10777 return [2, {
10778 data: n = e.sent(),
10779 subscription: this.getById(n.id)
10780 }]
10781 }
10782 })
10783 })
10784 }
10785 ,
10786 Object(g.b)([we("subs.add")], cu.prototype, "add", null),
10787 Object(g.b)([Ye("subscriptions")], cu)), iu = Me(ru), ou = (tu = Ve,
10788 Object(g.c)(au, tu),
10789 au.prototype.update = function(n, r, i) {
10790 return Object(g.a)(this, void 0, void 0, function() {
10791 var t;
10792 return Object(g.d)(this, function(e) {
10793 switch (e.label) {
10794 case 0:
10795 return t = {},
10796 n && (t.expirationDateTime = n),
10797 r && (t.notificationUrl = r),
10798 i && (t.clientState = i),
10799 [4, Le(this, ve(t, me({
10800 "Content-Type": "application/json"
10801 })))];
10802 case 1:
10803 return [2, {
10804 data: e.sent(),
10805 subscription: this
10806 }]
10807 }
10808 })
10809 })
10810 }
10811 ,
10812 au.prototype.delete = function() {
10813 return ke(this)
10814 }
10815 ,
10816 Object(g.b)([we("sub.update")], au.prototype, "update", null),
10817 Object(g.b)([we("sub.delete")], au.prototype, "delete", null),
10818 au), su = Me(ou);
10819 function au() {
10820 return null !== tu && tu.apply(this, arguments) || this
10821 }
10822 function cu() {
10823 return null !== nu && nu.apply(this, arguments) || this
10824 }
10825 _(Dt, "subscriptions", iu);
10826 var uu, lu, pu, du, hu, fu, bu = (du = We,
10827 Object(g.c)(mu, du),
10828 mu.prototype.getById = function(e) {
10829 return we.configure(Ou(this).concat("('" + e + "')"), "ucas.getById")
10830 }
10831 ,
10832 mu.prototype.add = function(n) {
10833 return Object(g.a)(this, void 0, void 0, function() {
10834 var t;
10835 return Object(g.d)(this, function(e) {
10836 switch (e.label) {
10837 case 0:
10838 return [4, De(this, ve(Object(y.h)(Se("SP.UserCustomAction"), n)))];
10839 case 1:
10840 return t = e.sent(),
10841 [2, {
10842 action: this.getById(t.Id),
10843 data: t
10844 }]
10845 }
10846 })
10847 })
10848 }
10849 ,
10850 mu.prototype.clear = function() {
10851 return De(this.clone(yu, "clear"))
10852 }
10853 ,
10854 Object(g.b)([we("ucas.add")], mu.prototype, "add", null),
10855 Object(g.b)([we("ucas.clear")], mu.prototype, "clear", null),
10856 Object(g.b)([Ye("usercustomactions")], mu)), yu = Me(bu), gu = (pu = Ve,
10857 Object(g.c)(vu, pu),
10858 vu), Ou = Me(gu);
10859 function vu() {
10860 var t = null !== pu && pu.apply(this, arguments) || this;
10861 return t.delete = Je("uca"),
10862 t.update = t._update("SP.UserCustomAction", function(e) {
10863 return {
10864 data: e,
10865 action: t
10866 }
10867 }),
10868 t
10869 }
10870 function mu() {
10871 return null !== du && du.apply(this, arguments) || this
10872 }
10873 (fu = uu = uu || {})[fu.None = 0] = "None",
10874 fu[fu.List = 1] = "List",
10875 fu[fu.ContentType = 2] = "ContentType",
10876 fu[fu.ProgId = 3] = "ProgId",
10877 fu[fu.FileType = 4] = "FileType",
10878 (hu = lu = lu || {})[hu.Unknown = 0] = "Unknown",
10879 hu[hu.Site = 2] = "Site",
10880 hu[hu.Web = 3] = "Web",
10881 hu[hu.List = 4] = "List",
10882 _(Dt, "userCustomActions", yu),
10883 _(jt, "userCustomActions", yu),
10884 _(bt, "userCustomActions", yu);
10885 var Su, ju, Tu, wu, Iu, Pu = (wu = We,
10886 Object(g.c)(xu, wu),
10887 xu.prototype.getById = function(e) {
10888 return Eu(this).concat("('" + e + "')")
10889 }
10890 ,
10891 xu.prototype.getByTitle = function(e) {
10892 return Eu(this, "getByTitle('" + e + "')")
10893 }
10894 ,
10895 xu.prototype.add = function(r, i, o) {
10896 return void 0 === i && (i = !1),
10897 void 0 === o && (o = {}),
10898 Object(g.a)(this, void 0, void 0, function() {
10899 var t, n;
10900 return Object(g.d)(this, function(e) {
10901 switch (e.label) {
10902 case 0:
10903 return t = ve(Object.assign(Se("SP.View"), {
10904 PersonalView: i,
10905 Title: r
10906 }, o)),
10907 [4, De(this.clone(_u, null), t)];
10908 case 1:
10909 return [2, {
10910 data: n = e.sent(),
10911 view: this.getById(n.Id)
10912 }]
10913 }
10914 })
10915 })
10916 }
10917 ,
10918 Object(g.b)([we("vs.add")], xu.prototype, "add", null),
10919 Object(g.b)([Ye("views")], xu)), _u = Me(Pu), Cu = (Tu = Ve,
10920 Object(g.c)(Uu, Tu),
10921 Object.defineProperty(Uu.prototype, "fields", {
10922 get: function() {
10923 return Nu(this)
10924 },
10925 enumerable: !0,
10926 configurable: !0
10927 }),
10928 Uu.prototype.renderAsHtml = function() {
10929 return this.clone(Eu, "renderashtml")()
10930 }
10931 ,
10932 Uu.prototype.setViewXml = function(e) {
10933 return De(this.clone(Eu, "SetViewXml"), ve({
10934 viewXml: e
10935 }))
10936 }
10937 ,
10938 Object(g.b)([we("v.renderAsHtml")], Uu.prototype, "renderAsHtml", null),
10939 Object(g.b)([we("v.setViewXml")], Uu.prototype, "setViewXml", null),
10940 Uu), Eu = Me(Cu), Ru = (ju = We,
10941 Object(g.c)(Au, ju),
10942 Au.prototype.getSchemaXml = function() {
10943 return this.clone(Nu, "schemaxml")()
10944 }
10945 ,
10946 Au.prototype.add = function(e) {
10947 return De(this.clone(Nu, "addviewfield('" + e + "')"))
10948 }
10949 ,
10950 Au.prototype.move = function(e, t) {
10951 return De(this.clone(Nu, "moveviewfieldto"), ve({
10952 field: e,
10953 index: t
10954 }))
10955 }
10956 ,
10957 Au.prototype.removeAll = function() {
10958 return De(this.clone(Nu, "removeallviewfields"))
10959 }
10960 ,
10961 Au.prototype.remove = function(e) {
10962 return De(this.clone(Nu, "removeviewfield('" + e + "')"))
10963 }
10964 ,
10965 Object(g.b)([we("vfs.getSchemaXml")], Au.prototype, "getSchemaXml", null),
10966 Object(g.b)([we("vfs.add")], Au.prototype, "add", null),
10967 Object(g.b)([we("vfs.move")], Au.prototype, "move", null),
10968 Object(g.b)([we("vfs.removeAll")], Au.prototype, "removeAll", null),
10969 Object(g.b)([we("vfs.remove")], Au.prototype, "remove", null),
10970 Object(g.b)([Ye("viewfields")], Au)), Nu = Me(Ru);
10971 function Au() {
10972 return null !== ju && ju.apply(this, arguments) || this
10973 }
10974 function Uu() {
10975 var t = null !== Tu && Tu.apply(this, arguments) || this;
10976 return t.delete = Je("vw"),
10977 t.update = t._update("SP.View", function(e) {
10978 return {
10979 data: e,
10980 view: t
10981 }
10982 }),
10983 t
10984 }
10985 function xu() {
10986 return null !== wu && wu.apply(this, arguments) || this
10987 }
10988 (Iu = Su = Su || {})[Iu.DefaultValue = 0] = "DefaultValue",
10989 Iu[Iu.Recursive = 1] = "Recursive",
10990 Iu[Iu.RecursiveAll = 2] = "RecursiveAll",
10991 Iu[Iu.FilesOnly = 3] = "FilesOnly",
10992 _(Dt, "views", _u),
10993 _(Dt, "defaultView", Eu, "DefaultView"),
10994 Dt.prototype.getView = function(e) {
10995 return Eu(this, "getView('" + e + "')")
10996 }
10997 ;
10998 var Du, ku, Lu, Fu, Bu, Mu = (Fu = qe,
10999 Object(g.c)(Xu, Fu),
11000 Object.defineProperty(Xu.prototype, "scope", {
11001 get: function() {
11002 return we.configure(Ge(this, "Scope"), "f.scope")
11003 },
11004 enumerable: !0,
11005 configurable: !0
11006 }),
11007 Object.defineProperty(Xu.prototype, "webparts", {
11008 get: function() {
11009 return Hu(this, "webparts")
11010 },
11011 enumerable: !0,
11012 configurable: !0
11013 }),
11014 Xu.prototype.export = function(e) {
11015 return De(this.clone(Gu, "ExportWebPart"), ve({
11016 webPartId: e
11017 }))
11018 }
11019 ,
11020 Xu.prototype.import = function(e) {
11021 return De(this.clone(Gu, "ImportWebPart"), ve({
11022 webPartXml: e
11023 }))
11024 }
11025 ,
11026 Xu), qu = function(e, t) {
11027 return new Mu(e,t)
11028 }, Gu = function(e, t) {
11029 return qu(e, t)
11030 }, Wu = (Lu = We,
11031 Object(g.c)(zu, Lu),
11032 zu.prototype.getById = function(e) {
11033 return Ku(this, "getbyid('" + e + "')")
11034 }
11035 ,
11036 zu.prototype.getByControlId = function(e) {
11037 return Ku(this, "getByControlId('" + e + "')")
11038 }
11039 ,
11040 zu), Hu = Me(Wu), Vu = (ku = Ve,
11041 Object(g.c)(Qu, ku),
11042 Object.defineProperty(Qu.prototype, "webpart", {
11043 get: function() {
11044 return Ke(this, "webpart")
11045 },
11046 enumerable: !0,
11047 configurable: !0
11048 }),
11049 Qu.prototype.saveChanges = function() {
11050 return De(this.clone(Ku, "SaveWebPartChanges"))
11051 }
11052 ,
11053 Qu.prototype.moveTo = function(e, t) {
11054 return De(this.clone(Ku, "MoveWebPartTo(zoneID='" + e + "', zoneIndex=" + t + ")"))
11055 }
11056 ,
11057 Qu.prototype.close = function() {
11058 return De(this.clone(Ku, "CloseWebPart"))
11059 }
11060 ,
11061 Qu.prototype.open = function() {
11062 return De(this.clone(Ku, "OpenWebPart"))
11063 }
11064 ,
11065 Qu.prototype.delete = function() {
11066 return De(this.clone(Ku, "DeleteWebPart"))
11067 }
11068 ,
11069 Qu), Ku = Me(Vu);
11070 function Qu() {
11071 return null !== ku && ku.apply(this, arguments) || this
11072 }
11073 function zu() {
11074 return null !== Lu && Lu.apply(this, arguments) || this
11075 }
11076 function Xu() {
11077 return null !== Fu && Fu.apply(this, arguments) || this
11078 }
11079 (Bu = Du = Du || {})[Bu.User = 0] = "User",
11080 Bu[Bu.Shared = 1] = "Shared",
11081 Or.prototype.getLimitedWebPartManager = function(e) {
11082 return void 0 === e && (e = Du.Shared),
11083 qu(this, "getLimitedWebPartManager(scope=" + e + ")")
11084 }
11085 ;
11086 var Ju = new lt;
11087 function $u(r) {
11088 return function(e) {
11089 return n = e,
11090 Object(g.c)(t, n),
11091 t;
11092 function t() {
11093 for (var e = [], t = 0; t < arguments.length; t++)
11094 e[t] = arguments[t];
11095 return n.call(this, e[0], 1 < e.length && void 0 !== e[1] ? e[1] : r) || this
11096 }
11097 var n
11098 }
11099 }
11100 function Yu() {
11101 return function(e) {
11102 return n = e,
11103 Object(g.c)(t, n),
11104 t.prototype.delete = function() {
11105 return Bn(this)
11106 }
11107 ,
11108 t;
11109 function t() {
11110 return null !== n && n.apply(this, arguments) || this
11111 }
11112 var n
11113 }
11114 }
11115 function Zu() {
11116 return function(e) {
11117 return n = e,
11118 Object(g.c)(t, n),
11119 t.prototype.delete = function(e) {
11120 return void 0 === e && (e = "*"),
11121 Bn(this, me({
11122 "If-Match": e
11123 }))
11124 }
11125 ,
11126 t;
11127 function t() {
11128 return null !== n && n.apply(this, arguments) || this
11129 }
11130 var n
11131 }
11132 }
11133 function el() {
11134 return function(e) {
11135 return n = e,
11136 Object(g.c)(t, n),
11137 t.prototype.update = function(e) {
11138 return Mn(this, ve(e))
11139 }
11140 ,
11141 t;
11142 function t() {
11143 return null !== n && n.apply(this, arguments) || this
11144 }
11145 var n
11146 }
11147 }
11148 function tl() {
11149 return function(e) {
11150 return n = e,
11151 Object(g.c)(t, n),
11152 t.prototype.update = function(e, t) {
11153 return void 0 === t && (t = "*"),
11154 Mn(this, ve(e, me({
11155 "If-Match": t
11156 })))
11157 }
11158 ,
11159 t;
11160 function t() {
11161 return null !== n && n.apply(this, arguments) || this
11162 }
11163 var n
11164 }
11165 }
11166 function nl() {
11167 return function(e) {
11168 return n = e,
11169 Object(g.c)(t, n),
11170 t.prototype.add = function(e) {
11171 return Fn(this, ve(e))
11172 }
11173 ,
11174 t;
11175 function t() {
11176 return null !== n && n.apply(this, arguments) || this
11177 }
11178 var n
11179 }
11180 }
11181 function rl(r) {
11182 return function(e) {
11183 return n = e,
11184 Object(g.c)(t, n),
11185 t.prototype.getById = function(e) {
11186 return r(this, e)
11187 }
11188 ,
11189 t;
11190 function t() {
11191 return null !== n && n.apply(this, arguments) || this
11192 }
11193 var n
11194 }
11195 }
11196 var il, ol, sl, al, cl, ul, ll, pl = Gn((ll = pr,
11197 Object(g.c)(Il, ll),
11198 Object.defineProperty(Il.prototype, "threads", {
11199 get: function() {
11200 return fl(this)
11201 },
11202 enumerable: !0,
11203 configurable: !0
11204 }),
11205 Object(g.b)([el(), Yu()], Il))), dl = Gn((ul = ur,
11206 Object(g.c)(wl, ul),
11207 Object(g.b)([$u("conversations"), nl(), rl(pl)], wl))), hl = Gn((cl = pr,
11208 Object(g.c)(Tl, cl),
11209 Object.defineProperty(Tl.prototype, "posts", {
11210 get: function() {
11211 return gl(this)
11212 },
11213 enumerable: !0,
11214 configurable: !0
11215 }),
11216 Tl.prototype.reply = function(e) {
11217 return Fn(this.clone(hl, "reply"), ve(e))
11218 }
11219 ,
11220 Object(g.b)([Yu()], Tl))), fl = Gn((al = ur,
11221 Object(g.c)(jl, al),
11222 Object(g.b)([$u("threads"), nl(), rl(hl)], jl))), bl = (sl = pr,
11223 Object(g.c)(Sl, sl),
11224 Sl.prototype.forward = function(e) {
11225 return Fn(this.clone(yl, "forward"), ve(e))
11226 }
11227 ,
11228 Sl.prototype.reply = function(e) {
11229 return Fn(this.clone(yl, "reply"), ve(e))
11230 }
11231 ,
11232 Object(g.b)([Yu()], Sl)), yl = Gn(bl), gl = Gn((ol = ur,
11233 Object(g.c)(ml, ol),
11234 Object(g.b)([$u("posts"), nl(), rl(yl)], ml))), Ol = Gn((il = ur,
11235 Object(g.c)(vl, il),
11236 vl.prototype.add = function(e) {
11237 return Fn(this.clone(Ol, "$ref"), ve({
11238 "@odata.id": e
11239 }))
11240 }
11241 ,
11242 vl.prototype.remove = function(e) {
11243 var t = this.clone(Ol, "$ref");
11244 return t.query.set("$id", e),
11245 Bn(t)
11246 }
11247 ,
11248 vl));
11249 function vl() {
11250 return null !== il && il.apply(this, arguments) || this
11251 }
11252 function ml() {
11253 return null !== ol && ol.apply(this, arguments) || this
11254 }
11255 function Sl() {
11256 return null !== sl && sl.apply(this, arguments) || this
11257 }
11258 function jl() {
11259 return null !== al && al.apply(this, arguments) || this
11260 }
11261 function Tl() {
11262 return null !== cl && cl.apply(this, arguments) || this
11263 }
11264 function wl() {
11265 return null !== ul && ul.apply(this, arguments) || this
11266 }
11267 function Il() {
11268 return null !== ll && ll.apply(this, arguments) || this
11269 }
11270 var Pl, _l, Cl = Gn((_l = pr,
11271 Object(g.c)(Nl, _l),
11272 Nl)), El = Gn((Pl = ur,
11273 Object(g.c)(Rl, Pl),
11274 Rl.prototype.addFile = function(e, t) {
11275 return Fn(this, ve((n = {
11276 contentBytes: t,
11277 name: e
11278 },
11279 Object.assign({
11280 "@odata.type": "#microsoft.graph.fileAttachment"
11281 }, n))));
11282 var n
11283 }
11284 ,
11285 Object(g.b)([$u("attachments"), rl(Cl)], Rl)));
11286 function Rl() {
11287 return null !== Pl && Pl.apply(this, arguments) || this
11288 }
11289 function Nl() {
11290 return null !== _l && _l.apply(this, arguments) || this
11291 }
11292 _(bl, "attachments", El);
11293 var Al, Ul, xl, Dl, kl, Ll, Fl = (Dl = pr,
11294 Object(g.c)(Gl, Dl),
11295 Gl.prototype.getMemberObjects = function(e) {
11296 return void 0 === e && (e = !1),
11297 Fn(this.clone(Bl, "getMemberObjects"), ve({
11298 securityEnabledOnly: e
11299 }))
11300 }
11301 ,
11302 Gl.prototype.getMemberGroups = function(e) {
11303 return void 0 === e && (e = !1),
11304 Fn(this.clone(Bl, "getMemberGroups"), ve({
11305 securityEnabledOnly: e
11306 }))
11307 }
11308 ,
11309 Gl.prototype.checkMemberGroups = function(e) {
11310 return Fn(this.clone(Bl, "checkMemberGroups"), ve({
11311 groupIds: e
11312 }))
11313 }
11314 ,
11315 Object(g.b)([Yu()], Gl)), Bl = Gn(Fl), Ml = Gn((xl = ur,
11316 Object(g.c)(ql, xl),
11317 ql.prototype.getByIds = function(e, t) {
11318 return void 0 === t && (t = Al.directoryObject),
11319 Fn(this.clone(Ml, "getByIds"), ve({
11320 ids: e,
11321 type: t
11322 }))
11323 }
11324 ,
11325 Object(g.b)([$u("directoryObjects"), rl(Bl)], ql)));
11326 function ql() {
11327 return null !== xl && xl.apply(this, arguments) || this
11328 }
11329 function Gl() {
11330 return null !== Dl && Dl.apply(this, arguments) || this
11331 }
11332 (Ll = Al = Al || {})[Ll.directoryObject = 0] = "directoryObject",
11333 Ll[Ll.user = 1] = "user",
11334 Ll[Ll.group = 2] = "group",
11335 Ll[Ll.device = 3] = "device",
11336 (kl = Ul = Ul || {})[kl.Office365 = 0] = "Office365",
11337 kl[kl.Dynamic = 1] = "Dynamic",
11338 kl[kl.Security = 2] = "Security";
11339 var Wl, Hl, Vl, Kl, Ql, zl, Xl = (zl = Fl,
11340 Object(g.c)(ap, zl),
11341 ap.prototype.addFavorite = function() {
11342 return Fn(this.clone(Jl, "addFavorite"))
11343 }
11344 ,
11345 ap.prototype.removeFavorite = function() {
11346 return Fn(this.clone(Jl, "removeFavorite"))
11347 }
11348 ,
11349 ap.prototype.resetUnseenCount = function() {
11350 return Fn(this.clone(Jl, "resetUnseenCount"))
11351 }
11352 ,
11353 ap.prototype.subscribeByMail = function() {
11354 return Fn(this.clone(Jl, "subscribeByMail"))
11355 }
11356 ,
11357 ap.prototype.unsubscribeByMail = function() {
11358 return Fn(this.clone(Jl, "unsubscribeByMail"))
11359 }
11360 ,
11361 ap.prototype.getCalendarView = function(e, t) {
11362 var n = this.clone(Jl, "calendarView");
11363 return n.query.set("startDateTime", e.toISOString()),
11364 n.query.set("endDateTime", t.toISOString()),
11365 n()
11366 }
11367 ,
11368 Object(g.b)([Yu(), el()], ap)), Jl = Gn(Xl), $l = Gn((Ql = ur,
11369 Object(g.c)(sp, Ql),
11370 sp.prototype.add = function(r, i, o, s) {
11371 return void 0 === s && (s = {}),
11372 Object(g.a)(this, void 0, void 0, function() {
11373 var t, n;
11374 return Object(g.d)(this, function(e) {
11375 switch (e.label) {
11376 case 0:
11377 return t = Object(y.h)({
11378 displayName: r,
11379 mailEnabled: o === Ul.Office365,
11380 mailNickname: i,
11381 securityEnabled: o !== Ul.Office365
11382 }, s),
11383 o !== Ul.Security && (t = Object(y.h)(t, {
11384 groupTypes: o === Ul.Office365 ? ["Unified"] : ["DynamicMembership"]
11385 })),
11386 [4, Fn(this, ve(t))];
11387 case 1:
11388 return [2, {
11389 data: n = e.sent(),
11390 group: this.getById(n.id)
11391 }]
11392 }
11393 })
11394 })
11395 }
11396 ,
11397 Object(g.b)([$u("groups"), rl(Jl)], sp))), Yl = Gn((Kl = ur,
11398 Object(g.c)(op, Kl),
11399 Object(g.b)([$u("calendars")], op))), Zl = Gn((Vl = pr,
11400 Object(g.c)(ip, Vl),
11401 Object.defineProperty(ip.prototype, "events", {
11402 get: function() {
11403 return tp(this)
11404 },
11405 enumerable: !0,
11406 configurable: !0
11407 }),
11408 ip)), ep = Gn((Hl = pr,
11409 Object(g.c)(rp, Hl),
11410 Object(g.b)([Yu(), el()], rp))), tp = Gn((Wl = ur,
11411 Object(g.c)(np, Wl),
11412 np.prototype.add = function(n) {
11413 return Object(g.a)(this, void 0, void 0, function() {
11414 var t;
11415 return Object(g.d)(this, function(e) {
11416 switch (e.label) {
11417 case 0:
11418 return [4, Fn(this, ve(n))];
11419 case 1:
11420 return [2, {
11421 data: t = e.sent(),
11422 event: this.getById(t.id)
11423 }]
11424 }
11425 })
11426 })
11427 }
11428 ,
11429 Object(g.b)([$u("events"), rl(ep)], np)));
11430 function np() {
11431 return null !== Wl && Wl.apply(this, arguments) || this
11432 }
11433 function rp() {
11434 return null !== Hl && Hl.apply(this, arguments) || this
11435 }
11436 function ip() {
11437 return null !== Vl && Vl.apply(this, arguments) || this
11438 }
11439 function op() {
11440 return null !== Kl && Kl.apply(this, arguments) || this
11441 }
11442 function sp() {
11443 return null !== Ql && Ql.apply(this, arguments) || this
11444 }
11445 function ap() {
11446 return null !== zl && zl.apply(this, arguments) || this
11447 }
11448 _(Xl, "calendar", Zl, "calendar"),
11449 _(Xl, "events", tp);
11450 var cp, up, lp, pp, dp, hp, fp, bp = (fp = Fl,
11451 Object(g.c)(Ep, fp),
11452 Object.defineProperty(Ep.prototype, "memberOf", {
11453 get: function() {
11454 return Ml(this, "memberOf")
11455 },
11456 enumerable: !0,
11457 configurable: !0
11458 }),
11459 Object.defineProperty(Ep.prototype, "people", {
11460 get: function() {
11461 return Op(this)
11462 },
11463 enumerable: !0,
11464 configurable: !0
11465 }),
11466 Object(g.b)([el(), Yu()], Ep)), yp = Gn(bp), gp = Gn((hp = ur,
11467 Object(g.c)(Cp, hp),
11468 Object(g.b)([$u("users"), rl(yp)], Cp))), Op = Gn((dp = ur,
11469 Object(g.c)(_p, dp),
11470 Object(g.b)([$u("people")], _p))), vp = Gn((pp = pr,
11471 Object(g.c)(Pp, pp),
11472 Object(g.b)([el(), Yu()], Pp))), mp = Gn((lp = ur,
11473 Object(g.c)(Ip, lp),
11474 Ip.prototype.add = function(r, i, o, s, a) {
11475 return void 0 === a && (a = {}),
11476 Object(g.a)(this, void 0, void 0, function() {
11477 var t, n;
11478 return Object(g.d)(this, function(e) {
11479 switch (e.label) {
11480 case 0:
11481 return t = Object(y.h)({
11482 businessPhones: s,
11483 emailAddresses: o,
11484 givenName: r,
11485 surName: i
11486 }, a),
11487 [4, Fn(this, ve(t))];
11488 case 1:
11489 return n = e.sent(),
11490 [2, {
11491 contact: this.getById(n.id),
11492 data: n
11493 }]
11494 }
11495 })
11496 })
11497 }
11498 ,
11499 Object(g.b)([$u("contacts"), rl(vp)], Ip))), Sp = Gn((up = pr,
11500 Object(g.c)(wp, up),
11501 Object.defineProperty(wp.prototype, "contacts", {
11502 get: function() {
11503 return mp(this)
11504 },
11505 enumerable: !0,
11506 configurable: !0
11507 }),
11508 Object.defineProperty(wp.prototype, "childFolders", {
11509 get: function() {
11510 return jp(this, "childFolders")
11511 },
11512 enumerable: !0,
11513 configurable: !0
11514 }),
11515 Object(g.b)([Yu(), el()], wp))), jp = Gn((cp = ur,
11516 Object(g.c)(Tp, cp),
11517 Tp.prototype.add = function(n, r) {
11518 return Object(g.a)(this, void 0, void 0, function() {
11519 var t;
11520 return Object(g.d)(this, function(e) {
11521 switch (e.label) {
11522 case 0:
11523 return [4, Fn(this, ve({
11524 displayName: n,
11525 parentFolderId: r
11526 }))];
11527 case 1:
11528 return t = e.sent(),
11529 [2, {
11530 contactFolder: this.getById(t.id),
11531 data: t
11532 }]
11533 }
11534 })
11535 })
11536 }
11537 ,
11538 Object(g.b)([$u("contactFolders"), rl(Sp)], Tp)));
11539 function Tp() {
11540 return null !== cp && cp.apply(this, arguments) || this
11541 }
11542 function wp() {
11543 return null !== up && up.apply(this, arguments) || this
11544 }
11545 function Ip() {
11546 return null !== lp && lp.apply(this, arguments) || this
11547 }
11548 function Pp() {
11549 return null !== pp && pp.apply(this, arguments) || this
11550 }
11551 function _p() {
11552 return null !== dp && dp.apply(this, arguments) || this
11553 }
11554 function Cp() {
11555 return null !== hp && hp.apply(this, arguments) || this
11556 }
11557 function Ep() {
11558 return null !== fp && fp.apply(this, arguments) || this
11559 }
11560 _(bp, "contacts", mp),
11561 _(bp, "contactFolders", jp),
11562 _(Xl, "conversations", dl),
11563 _(Xl, "acceptedSenders", Ol, "acceptedsenders"),
11564 _(Xl, "rejectedSenders", Ol, "rejectedsenders"),
11565 Reflect.defineProperty(fr.prototype, "directoryObjects", {
11566 configurable: !0,
11567 enumerable: !0,
11568 get: function() {
11569 return Ml(this)
11570 }
11571 }),
11572 Reflect.defineProperty(fr.prototype, "groups", {
11573 configurable: !0,
11574 enumerable: !0,
11575 get: function() {
11576 return $l(this)
11577 }
11578 });
11579 var Rp, Np, Ap = Gn((Np = pr,
11580 Object(g.c)(Dp, Np),
11581 Dp.prototype.remove = function() {
11582 return Bn(this.clone(Ap, "$ref"))
11583 }
11584 ,
11585 Dp)), Up = Gn((Rp = ur,
11586 Object(g.c)(xp, Rp),
11587 xp.prototype.add = function(e) {
11588 return Fn(this.clone(Up, "$ref"), ve({
11589 "@odata.id": e
11590 }))
11591 }
11592 ,
11593 Object(g.b)([$u("members"), rl(Ap)], xp)));
11594 function xp() {
11595 return null !== Rp && Rp.apply(this, arguments) || this
11596 }
11597 function Dp() {
11598 return null !== Np && Np.apply(this, arguments) || this
11599 }
11600 _(Xl, "owners", Up, "owners"),
11601 _(Xl, "members", Up);
11602 var kp, Lp, Fp, Bp, Mp, qp = Gn((Mp = pr,
11603 Object(g.c)(Jp, Mp),
11604 Jp)), Gp = Gn((Bp = ur,
11605 Object(g.c)(Xp, Bp),
11606 Object(g.b)([$u("messages"), rl(qp), nl()], Xp))), Wp = Gn((Fp = pr,
11607 Object(g.c)(zp, Fp),
11608 zp)), Hp = Gn((Lp = ur,
11609 Object(g.c)(Qp, Lp),
11610 Object(g.b)([$u("mailFolders"), rl(Wp), nl()], Qp))), Vp = Gn((kp = pr,
11611 Object(g.c)(Kp, kp),
11612 Object(g.b)([$u("mailboxSettings"), el()], Kp)));
11613 function Kp() {
11614 return null !== kp && kp.apply(this, arguments) || this
11615 }
11616 function Qp() {
11617 return null !== Lp && Lp.apply(this, arguments) || this
11618 }
11619 function zp() {
11620 return null !== Fp && Fp.apply(this, arguments) || this
11621 }
11622 function Xp() {
11623 return null !== Bp && Bp.apply(this, arguments) || this
11624 }
11625 function Jp() {
11626 return null !== Mp && Mp.apply(this, arguments) || this
11627 }
11628 _(bp, "messages", Gp),
11629 _(bp, "mailboxSettings", Vp),
11630 _(bp, "mailFolders", Hp),
11631 bp.prototype.sendMail = function(e) {
11632 return Fn(this.clone(yp, "sendMail"), ve(e))
11633 }
11634 ;
11635 var $p, Yp, Zp, ed, td, nd = Gn((td = pr,
11636 Object(g.c)(pd, td),
11637 Object.defineProperty(pd.prototype, "root", {
11638 get: function() {
11639 return id(this)
11640 },
11641 enumerable: !0,
11642 configurable: !0
11643 }),
11644 Object.defineProperty(pd.prototype, "list", {
11645 get: function() {
11646 return dr(this, "list")
11647 },
11648 enumerable: !0,
11649 configurable: !0
11650 }),
11651 Object.defineProperty(pd.prototype, "recent", {
11652 get: function() {
11653 return sd(this, "recent")
11654 },
11655 enumerable: !0,
11656 configurable: !0
11657 }),
11658 Object.defineProperty(pd.prototype, "sharedWithMe", {
11659 get: function() {
11660 return sd(this, "sharedWithMe")
11661 },
11662 enumerable: !0,
11663 configurable: !0
11664 }),
11665 pd.prototype.getItemById = function(e) {
11666 return od(this, Object(y.i)("items", e))
11667 }
11668 ,
11669 Object(g.b)([$u("drive")], pd))), rd = Gn((ed = ur,
11670 Object(g.c)(ld, ed),
11671 Object(g.b)([$u("drives"), rl(nd)], ld))), id = Gn((Zp = pr,
11672 Object(g.c)(ud, Zp),
11673 Object.defineProperty(ud.prototype, "children", {
11674 get: function() {
11675 return sd(this, "children")
11676 },
11677 enumerable: !0,
11678 configurable: !0
11679 }),
11680 ud.prototype.search = function(e) {
11681 var t = this.clone(id);
11682 return t.query.set("search", "'" + e + "'"),
11683 t()
11684 }
11685 ,
11686 Object.defineProperty(ud.prototype, "thumbnails", {
11687 get: function() {
11688 return lr(this, "thumbnails")
11689 },
11690 enumerable: !0,
11691 configurable: !0
11692 }),
11693 Object(g.b)([$u("root")], ud))), od = Gn((Yp = pr,
11694 Object(g.c)(cd, Yp),
11695 Object.defineProperty(cd.prototype, "children", {
11696 get: function() {
11697 return sd(this, "children")
11698 },
11699 enumerable: !0,
11700 configurable: !0
11701 }),
11702 Object.defineProperty(cd.prototype, "thumbnails", {
11703 get: function() {
11704 return lr(this, "thumbnails")
11705 },
11706 enumerable: !0,
11707 configurable: !0
11708 }),
11709 Object.defineProperty(cd.prototype, "versions", {
11710 get: function() {
11711 return lr(this, "versions")
11712 },
11713 enumerable: !0,
11714 configurable: !0
11715 }),
11716 cd.prototype.move = function(e, t) {
11717 return Mn(this, ve(Object(y.h)(e, {
11718 name: t
11719 })))
11720 }
11721 ,
11722 cd.prototype.getContent = function() {
11723 return Ln(this.clone(od, "content"))
11724 }
11725 ,
11726 cd.prototype.setContent = function(e) {
11727 return qn(this.clone(od, "content"), {
11728 body: e
11729 })
11730 }
11731 ,
11732 Object(g.b)([Yu(), el()], cd))), sd = Gn(($p = ur,
11733 Object(g.c)(ad, $p),
11734 Object(g.b)([rl(od)], ad)));
11735 function ad() {
11736 return null !== $p && $p.apply(this, arguments) || this
11737 }
11738 function cd() {
11739 return null !== Yp && Yp.apply(this, arguments) || this
11740 }
11741 function ud() {
11742 return null !== Zp && Zp.apply(this, arguments) || this
11743 }
11744 function ld() {
11745 return null !== ed && ed.apply(this, arguments) || this
11746 }
11747 function pd() {
11748 return null !== td && td.apply(this, arguments) || this
11749 }
11750 _(bp, "drive", nd),
11751 _(bp, "drives", rd);
11752 var dd, hd, fd, bd, yd, gd = Gn((yd = pr,
11753 Object(g.c)(Pd, yd),
11754 Object.defineProperty(Pd.prototype, "notebooks", {
11755 get: function() {
11756 return vd(this)
11757 },
11758 enumerable: !0,
11759 configurable: !0
11760 }),
11761 Object.defineProperty(Pd.prototype, "sections", {
11762 get: function() {
11763 return Sd(this)
11764 },
11765 enumerable: !0,
11766 configurable: !0
11767 }),
11768 Object.defineProperty(Pd.prototype, "pages", {
11769 get: function() {
11770 return lr(this, "pages")
11771 },
11772 enumerable: !0,
11773 configurable: !0
11774 }),
11775 Object(g.b)([$u("onenote")], Pd))), Od = Gn((bd = pr,
11776 Object(g.c)(Id, bd),
11777 Object.defineProperty(Id.prototype, "sections", {
11778 get: function() {
11779 return Sd(this)
11780 },
11781 enumerable: !0,
11782 configurable: !0
11783 }),
11784 Id)), vd = Gn((fd = ur,
11785 Object(g.c)(wd, fd),
11786 wd.prototype.add = function(n) {
11787 return Object(g.a)(this, void 0, void 0, function() {
11788 var t;
11789 return Object(g.d)(this, function(e) {
11790 switch (e.label) {
11791 case 0:
11792 return [4, Fn(this, ve({
11793 displayName: n
11794 }))];
11795 case 1:
11796 return [2, {
11797 data: t = e.sent(),
11798 notebook: this.getById(t.id)
11799 }]
11800 }
11801 })
11802 })
11803 }
11804 ,
11805 Object(g.b)([$u("notebooks"), rl(Od)], wd))), md = Gn((hd = pr,
11806 Object(g.c)(Td, hd),
11807 Td)), Sd = Gn((dd = ur,
11808 Object(g.c)(jd, dd),
11809 jd.prototype.add = function(n) {
11810 return Object(g.a)(this, void 0, void 0, function() {
11811 var t;
11812 return Object(g.d)(this, function(e) {
11813 switch (e.label) {
11814 case 0:
11815 return [4, Fn(this, ve({
11816 displayName: n
11817 }))];
11818 case 1:
11819 return [2, {
11820 data: t = e.sent(),
11821 section: this.getById(t.id)
11822 }]
11823 }
11824 })
11825 })
11826 }
11827 ,
11828 Object(g.b)([$u("sections"), rl(md)], jd)));
11829 function jd() {
11830 return null !== dd && dd.apply(this, arguments) || this
11831 }
11832 function Td() {
11833 return null !== hd && hd.apply(this, arguments) || this
11834 }
11835 function wd() {
11836 return null !== fd && fd.apply(this, arguments) || this
11837 }
11838 function Id() {
11839 return null !== bd && bd.apply(this, arguments) || this
11840 }
11841 function Pd() {
11842 return null !== yd && yd.apply(this, arguments) || this
11843 }
11844 _(bp, "onenote", gd);
11845 var _d, Cd = Gn((_d = pr,
11846 Object(g.c)(Ed, _d),
11847 Ed.prototype.getBlob = function() {
11848 return this.clone(Cd, "$value", !1).usingParser(new X)()
11849 }
11850 ,
11851 Ed.prototype.getBuffer = function() {
11852 return this.clone(Cd, "$value", !1).usingParser(new $)()
11853 }
11854 ,
11855 Ed.prototype.setContent = function(e) {
11856 return Mn(this.clone(Cd, "$value", !1), {
11857 body: e
11858 })
11859 }
11860 ,
11861 Object(g.b)([$u("photo")], Ed)));
11862 function Ed() {
11863 return null !== _d && _d.apply(this, arguments) || this
11864 }
11865 _(Xl, "photo", Cd);
11866 var Rd, Nd, Ad, Ud, xd, Dd, kd, Ld = Gn((kd = pr,
11867 Object(g.c)(Jd, kd),
11868 Object.defineProperty(Jd.prototype, "plans", {
11869 get: function() {
11870 return Bd(this)
11871 },
11872 enumerable: !0,
11873 configurable: !0
11874 }),
11875 Object.defineProperty(Jd.prototype, "tasks", {
11876 get: function() {
11877 return qd(this)
11878 },
11879 enumerable: !0,
11880 configurable: !0
11881 }),
11882 Object.defineProperty(Jd.prototype, "buckets", {
11883 get: function() {
11884 return Wd(this)
11885 },
11886 enumerable: !0,
11887 configurable: !0
11888 }),
11889 Object(g.b)([$u("planner")], Jd))), Fd = Gn((Dd = pr,
11890 Object(g.c)(Xd, Dd),
11891 Object.defineProperty(Xd.prototype, "tasks", {
11892 get: function() {
11893 return qd(this)
11894 },
11895 enumerable: !0,
11896 configurable: !0
11897 }),
11898 Object.defineProperty(Xd.prototype, "buckets", {
11899 get: function() {
11900 return Wd(this)
11901 },
11902 enumerable: !0,
11903 configurable: !0
11904 }),
11905 Object(g.b)([tl(), Zu()], Xd))), Bd = Gn((xd = ur,
11906 Object(g.c)(zd, xd),
11907 zd.prototype.add = function(n, r) {
11908 return Object(g.a)(this, void 0, void 0, function() {
11909 var t;
11910 return Object(g.d)(this, function(e) {
11911 switch (e.label) {
11912 case 0:
11913 return [4, Fn(this, ve({
11914 owner: n,
11915 title: r
11916 }))];
11917 case 1:
11918 return [2, {
11919 data: t = e.sent(),
11920 plan: this.getById(t.id)
11921 }]
11922 }
11923 })
11924 })
11925 }
11926 ,
11927 Object(g.b)([$u("plans"), rl(Fd)], zd))), Md = Gn((Ud = pr,
11928 Object(g.c)(Qd, Ud),
11929 Object(g.b)([tl(), Zu()], Qd))), qd = Gn((Ad = ur,
11930 Object(g.c)(Kd, Ad),
11931 Kd.prototype.add = function(r, i, o, s) {
11932 return Object(g.a)(this, void 0, void 0, function() {
11933 var t, n;
11934 return Object(g.d)(this, function(e) {
11935 switch (e.label) {
11936 case 0:
11937 return t = Object(y.h)({
11938 planId: r,
11939 title: i
11940 }, o),
11941 s && (t = Object(y.h)(t, {
11942 bucketId: s
11943 })),
11944 [4, Fn(this, ve(t))];
11945 case 1:
11946 return [2, {
11947 data: n = e.sent(),
11948 task: this.getById(n.id)
11949 }]
11950 }
11951 })
11952 })
11953 }
11954 ,
11955 Object(g.b)([$u("tasks"), rl(Md)], Kd))), Gd = Gn((Nd = pr,
11956 Object(g.c)(Vd, Nd),
11957 Object.defineProperty(Vd.prototype, "tasks", {
11958 get: function() {
11959 return qd(this)
11960 },
11961 enumerable: !0,
11962 configurable: !0
11963 }),
11964 Object(g.b)([el(), Yu()], Vd))), Wd = Gn((Rd = ur,
11965 Object(g.c)(Hd, Rd),
11966 Hd.prototype.add = function(n, r, i) {
11967 return Object(g.a)(this, void 0, void 0, function() {
11968 var t;
11969 return Object(g.d)(this, function(e) {
11970 switch (e.label) {
11971 case 0:
11972 return [4, Fn(this, ve({
11973 name: n,
11974 orderHint: i || "",
11975 planId: r
11976 }))];
11977 case 1:
11978 return t = e.sent(),
11979 [2, {
11980 bucket: this.getById(t.id),
11981 data: t
11982 }]
11983 }
11984 })
11985 })
11986 }
11987 ,
11988 Object(g.b)([$u("buckets"), rl(Gd)], Hd)));
11989 function Hd() {
11990 return null !== Rd && Rd.apply(this, arguments) || this
11991 }
11992 function Vd() {
11993 return null !== Nd && Nd.apply(this, arguments) || this
11994 }
11995 function Kd() {
11996 return null !== Ad && Ad.apply(this, arguments) || this
11997 }
11998 function Qd() {
11999 return null !== Ud && Ud.apply(this, arguments) || this
12000 }
12001 function zd() {
12002 return null !== xd && xd.apply(this, arguments) || this
12003 }
12004 function Xd() {
12005 return null !== Dd && Dd.apply(this, arguments) || this
12006 }
12007 function Jd() {
12008 return null !== kd && kd.apply(this, arguments) || this
12009 }
12010 _(Xl, "plans", Bd, "planner/plans"),
12011 _(bp, "tasks", qd, "planner/tasks"),
12012 Reflect.defineProperty(fr.prototype, "planner", {
12013 configurable: !0,
12014 enumerable: !0,
12015 get: function() {
12016 return Ld(this)
12017 }
12018 });
12019 var $d, Yd, Zd = Gn((Yd = pr,
12020 Object(g.c)(nh, Yd),
12021 Object(g.b)([Yu(), el()], nh))), eh = Gn(($d = ur,
12022 Object(g.c)(th, $d),
12023 th.prototype.add = function(r, i, o, s, a) {
12024 return void 0 === a && (a = {}),
12025 Object(g.a)(this, void 0, void 0, function() {
12026 var t, n;
12027 return Object(g.d)(this, function(e) {
12028 switch (e.label) {
12029 case 0:
12030 return t = Object(y.h)({
12031 changeType: r,
12032 expirationDateTime: s,
12033 notificationUrl: i,
12034 resource: o
12035 }, a),
12036 [4, Fn(this, ve(t))];
12037 case 1:
12038 return [2, {
12039 data: n = e.sent(),
12040 subscription: this.getById(n.id)
12041 }]
12042 }
12043 })
12044 })
12045 }
12046 ,
12047 Object(g.b)([$u("subscriptions"), rl(Zd)], th)));
12048 function th() {
12049 return null !== $d && $d.apply(this, arguments) || this
12050 }
12051 function nh() {
12052 return null !== Yd && Yd.apply(this, arguments) || this
12053 }
12054 Reflect.defineProperty(fr.prototype, "subscriptions", {
12055 configurable: !0,
12056 enumerable: !0,
12057 get: function() {
12058 return eh(this)
12059 }
12060 });
12061 var rh, ih, oh, sh, ah, ch, uh = Gn((ch = pr,
12062 Object(g.c)(mh, ch),
12063 Object.defineProperty(mh.prototype, "channels", {
12064 get: function() {
12065 return dh(this)
12066 },
12067 enumerable: !0,
12068 configurable: !0
12069 }),
12070 mh.prototype.archive = function(e) {
12071 return void 0 === e && (e = !1),
12072 Fn(this.clone(uh, "archive"), ve({
12073 shouldSetSpoSiteReadOnlyForMembers: e
12074 }))
12075 }
12076 ,
12077 mh.prototype.unarchive = function() {
12078 return Fn(this.clone(uh, "unarchive"))
12079 }
12080 ,
12081 mh.prototype.cloneTeam = function(e, t, n, r) {
12082 void 0 === t && (t = ""),
12083 void 0 === n && (n = "apps,tabs,settings,channels,members"),
12084 void 0 === r && (r = "private");
12085 var i = {
12086 description: t || "",
12087 displayName: e,
12088 mailNickname: e,
12089 partsToClone: n,
12090 visibility: r
12091 };
12092 return Fn(this.clone(uh, "clone"), ve(i))
12093 }
12094 ,
12095 Object(g.b)([$u("team"), el()], mh))), lh = Gn((ah = ur,
12096 Object(g.c)(vh, ah),
12097 Object(g.b)([$u("teams"), rl(uh)], vh))), ph = Gn((sh = pr,
12098 Object(g.c)(Oh, sh),
12099 Object.defineProperty(Oh.prototype, "tabs", {
12100 get: function() {
12101 return fh(this)
12102 },
12103 enumerable: !0,
12104 configurable: !0
12105 }),
12106 Oh)), dh = Gn((oh = ur,
12107 Object(g.c)(gh, oh),
12108 gh.prototype.add = function(n, r) {
12109 return void 0 === r && (r = ""),
12110 Object(g.a)(this, void 0, void 0, function() {
12111 var t;
12112 return Object(g.d)(this, function(e) {
12113 switch (e.label) {
12114 case 0:
12115 return [4, Fn(this, ve({
12116 description: r,
12117 displayName: n
12118 }))];
12119 case 1:
12120 return t = e.sent(),
12121 [2, {
12122 channel: this.getById(t.id),
12123 data: t
12124 }]
12125 }
12126 })
12127 })
12128 }
12129 ,
12130 Object(g.b)([$u("channels"), rl(ph)], gh))), hh = Gn((ih = pr,
12131 Object(g.c)(yh, ih),
12132 Object(g.b)([$u("tab"), el(), Yu()], yh))), fh = Gn((rh = ur,
12133 Object(g.c)(bh, rh),
12134 bh.prototype.add = function(r, i, o) {
12135 return Object(g.a)(this, void 0, void 0, function() {
12136 var t, n;
12137 return Object(g.d)(this, function(e) {
12138 switch (e.label) {
12139 case 0:
12140 return t = Object(y.h)({
12141 displayName: r,
12142 "teamsApp@odata.bind": i
12143 }, o),
12144 [4, Fn(this, ve(t))];
12145 case 1:
12146 return [2, {
12147 data: n = e.sent(),
12148 tab: this.getById(n.id)
12149 }]
12150 }
12151 })
12152 })
12153 }
12154 ,
12155 Object(g.b)([$u("tabs"), rl(hh)], bh)));
12156 function bh() {
12157 return null !== rh && rh.apply(this, arguments) || this
12158 }
12159 function yh() {
12160 return null !== ih && ih.apply(this, arguments) || this
12161 }
12162 function gh() {
12163 return null !== oh && oh.apply(this, arguments) || this
12164 }
12165 function Oh() {
12166 return null !== sh && sh.apply(this, arguments) || this
12167 }
12168 function vh() {
12169 return null !== ah && ah.apply(this, arguments) || this
12170 }
12171 function mh() {
12172 return null !== ch && ch.apply(this, arguments) || this
12173 }
12174 _(bp, "joinedTeams", lh, "joinedTeams"),
12175 _(Xl, "team", uh),
12176 Xl.prototype.createTeam = function(t) {
12177 return Object(g.a)(this, void 0, void 0, function() {
12178 return Object(g.d)(this, function(e) {
12179 switch (e.label) {
12180 case 0:
12181 return [4, qn(this.clone(Jl, "team"), ve(t))];
12182 case 1:
12183 return [2, {
12184 data: e.sent(),
12185 team: this.team
12186 }]
12187 }
12188 })
12189 })
12190 }
12191 ,
12192 Reflect.defineProperty(fr.prototype, "teams", {
12193 configurable: !0,
12194 enumerable: !0,
12195 get: function() {
12196 return lh(this)
12197 }
12198 }),
12199 Reflect.defineProperty(fr.prototype, "me", {
12200 configurable: !0,
12201 enumerable: !0,
12202 get: function() {
12203 return yp(this, "me")
12204 }
12205 }),
12206 Reflect.defineProperty(fr.prototype, "users", {
12207 configurable: !0,
12208 enumerable: !0,
12209 get: function() {
12210 return gp(this)
12211 }
12212 }),
12213 n.d(t, "util", function() {
12214 return Sh
12215 }),
12216 n.d(t, "sp", function() {
12217 return jh
12218 }),
12219 n.d(t, "graph", function() {
12220 return Th
12221 }),
12222 n.d(t, "storage", function() {
12223 return wh
12224 }),
12225 n.d(t, "config", function() {
12226 return Ih
12227 }),
12228 n.d(t, "log", function() {
12229 return Ph
12230 }),
12231 n.d(t, "setup", function() {
12232 return _h
12233 }),
12234 n.d(t, "objectToMap", function() {
12235 return y.y
12236 }),
12237 n.d(t, "mergeMaps", function() {
12238 return y.v
12239 }),
12240 n.d(t, "RuntimeConfigImpl", function() {
12241 return y.f
12242 }),
12243 n.d(t, "RuntimeConfig", function() {
12244 return y.e
12245 }),
12246 n.d(t, "mergeHeaders", function() {
12247 return y.u
12248 }),
12249 n.d(t, "mergeOptions", function() {
12250 return y.w
12251 }),
12252 n.d(t, "getADALResource", function() {
12253 return y.k
12254 }),
12255 n.d(t, "FetchClient", function() {
12256 return y.b
12257 }),
12258 n.d(t, "BearerTokenFetchClient", function() {
12259 return y.a
12260 }),
12261 n.d(t, "SPFxAdalClient", function() {
12262 return y.g
12263 }),
12264 n.d(t, "PnPClientStorageWrapper", function() {
12265 return y.d
12266 }),
12267 n.d(t, "PnPClientStorage", function() {
12268 return y.c
12269 }),
12270 n.d(t, "getCtxCallback", function() {
12271 return y.l
12272 }),
12273 n.d(t, "dateAdd", function() {
12274 return y.j
12275 }),
12276 n.d(t, "combine", function() {
12277 return y.i
12278 }),
12279 n.d(t, "getRandomString", function() {
12280 return y.o
12281 }),
12282 n.d(t, "getGUID", function() {
12283 return y.m
12284 }),
12285 n.d(t, "isFunc", function() {
12286 return y.r
12287 }),
12288 n.d(t, "objectDefinedNotNull", function() {
12289 return y.x
12290 }),
12291 n.d(t, "isArray", function() {
12292 return y.q
12293 }),
12294 n.d(t, "assign", function() {
12295 return y.h
12296 }),
12297 n.d(t, "isUrlAbsolute", function() {
12298 return y.s
12299 }),
12300 n.d(t, "stringIsNullOrEmpty", function() {
12301 return y.A
12302 }),
12303 n.d(t, "sanitizeGuid", function() {
12304 return y.z
12305 }),
12306 n.d(t, "jsS", function() {
12307 return y.t
12308 }),
12309 n.d(t, "hOP", function() {
12310 return y.p
12311 }),
12312 n.d(t, "getHashCode", function() {
12313 return y.n
12314 }),
12315 n.d(t, "Logger", function() {
12316 return b
12317 }),
12318 n.d(t, "LogLevel", function() {
12319 return o
12320 }),
12321 n.d(t, "ConsoleListener", function() {
12322 return l
12323 }),
12324 n.d(t, "FunctionListener", function() {
12325 return p
12326 }),
12327 n.d(t, "Settings", function() {
12328 return d
12329 }),
12330 n.d(t, "CachingConfigurationProvider", function() {
12331 return h
12332 }),
12333 n.d(t, "SPListConfigurationProvider", function() {
12334 return yn
12335 }),
12336 n.d(t, "Batch", function() {
12337 return f
12338 }),
12339 n.d(t, "CachingOptions", function() {
12340 return O
12341 }),
12342 n.d(t, "CachingParserWrapper", function() {
12343 return v
12344 }),
12345 n.d(t, "addProp", function() {
12346 return _
12347 }),
12348 n.d(t, "invokableFactory", function() {
12349 return K
12350 }),
12351 n.d(t, "pipelineBinder", function() {
12352 return ge
12353 }),
12354 n.d(t, "defaultPipelineBinder", function() {
12355 return Oe
12356 }),
12357 n.d(t, "ODataParser", function() {
12358 return Q
12359 }),
12360 n.d(t, "TextParser", function() {
12361 return z
12362 }),
12363 n.d(t, "BlobParser", function() {
12364 return X
12365 }),
12366 n.d(t, "JSONParser", function() {
12367 return J
12368 }),
12369 n.d(t, "BufferParser", function() {
12370 return $
12371 }),
12372 n.d(t, "LambdaParser", function() {
12373 return Y
12374 }),
12375 n.d(t, "HttpRequestError", function() {
12376 return Z
12377 }),
12378 n.d(t, "setResult", function() {
12379 return le
12380 }),
12381 n.d(t, "pipe", function() {
12382 return de
12383 }),
12384 n.d(t, "requestPipelineMethod", function() {
12385 return he
12386 }),
12387 n.d(t, "PipelineMethods", function() {
12388 return fe
12389 }),
12390 n.d(t, "getDefaultPipeline", function() {
12391 return ye
12392 }),
12393 n.d(t, "cloneQueryableData", function() {
12394 return ae
12395 }),
12396 n.d(t, "Queryable", function() {
12397 return ce
12398 }),
12399 n.d(t, "body", function() {
12400 return ve
12401 }),
12402 n.d(t, "headers", function() {
12403 return me
12404 }),
12405 n.d(t, "extendGlobal", function() {
12406 return C
12407 }),
12408 n.d(t, "extendObj", function() {
12409 return E
12410 }),
12411 n.d(t, "extendFactory", function() {
12412 return R
12413 }),
12414 n.d(t, "clearGlobalExtensions", function() {
12415 return D
12416 }),
12417 n.d(t, "enableExtensions", function() {
12418 return L
12419 }),
12420 n.d(t, "disableExtensions", function() {
12421 return k
12422 }),
12423 n.d(t, "SPNS", function() {
12424 return r
12425 }),
12426 n.d(t, "GraphNS", function() {
12427 return i
12428 });
12429 var Sh = {
12430 assign: y.h,
12431 combine: y.i,
12432 dateAdd: y.j,
12433 getCtxCallback: y.l,
12434 getGUID: y.m,
12435 getRandomString: y.o,
12436 isArray: y.q,
12437 isFunc: y.r,
12438 isUrlAbsolute: y.s,
12439 objectDefinedNotNull: y.x,
12440 sanitizeGuid: y.z,
12441 stringIsNullOrEmpty: y.A
12442 }
12443 , jh = _n
12444 , Th = br
12445 , wh = new y.c
12446 , Ih = new d
12447 , Ph = b
12448 , _h = function(e) {
12449 y.e.assign(e)
12450 }
12451 , Ch = {
12452 config: Ih,
12453 graph: Th,
12454 log: Ph,
12455 setup: _h,
12456 sp: jh,
12457 storage: wh,
12458 util: Sh
12459 };
12460 t.default = Ch
12461 }
12462 ],
12463 i.c = r,
12464 i.d = function(e, t, n) {
12465 i.o(e, t) || Object.defineProperty(e, t, {
12466 enumerable: !0,
12467 get: n
12468 })
12469 }
12470 ,
12471 i.r = function(e) {
12472 "undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e, Symbol.toStringTag, {
12473 value: "Module"
12474 }),
12475 Object.defineProperty(e, "__esModule", {
12476 value: !0
12477 })
12478 }
12479 ,
12480 i.t = function(t, e) {
12481 if (1 & e && (t = i(t)),
12482 8 & e)
12483 return t;
12484 if (4 & e && "object" == typeof t && t && t.__esModule)
12485 return t;
12486 var n = Object.create(null);
12487 if (i.r(n),
12488 Object.defineProperty(n, "default", {
12489 enumerable: !0,
12490 value: t
12491 }),
12492 2 & e && "string" != typeof t)
12493 for (var r in t)
12494 i.d(n, r, function(e) {
12495 return t[e]
12496 }
12497 .bind(null, r));
12498 return n
12499 }
12500 ,
12501 i.n = function(e) {
12502 var t = e && e.__esModule ? function() {
12503 return e.default
12504 }
12505 : function() {
12506 return e
12507 }
12508 ;
12509 return i.d(t, "a", t),
12510 t
12511 }
12512 ,
12513 i.o = function(e, t) {
12514 return Object.prototype.hasOwnProperty.call(e, t)
12515 }
12516 ,
12517 i.p = "",
12518 i(i.s = 8);
12519 function i(e) {
12520 if (r[e])
12521 return r[e].exports;
12522 var t = r[e] = {
12523 i: e,
12524 l: !1,
12525 exports: {}
12526 };
12527 return n[e].call(t.exports, t, t.exports, i),
12528 t.l = !0,
12529 t.exports
12530 }
12531 var n, r
12532});