@livetiles/reach-components-react 0.4.0-preview.66 → 0.4.0-preview.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NewsItemPreviewContextProvider.d.ts +5 -0
- package/README.md +21 -4
- package/en.async.esm.esm.js +5 -1
- package/index.d.ts +6 -1
- package/index.esm.js +1 -1
- package/index.esm2.js +357 -333
- package/index.umd.js +362 -333
- package/package.json +1 -1
package/index.esm2.js
CHANGED
|
@@ -144,22 +144,22 @@ var toIndexedObject$e = function (it) {
|
|
|
144
144
|
return IndexedObject$9(requireObjectCoercible$k(it));
|
|
145
145
|
};
|
|
146
146
|
|
|
147
|
-
var isObject$
|
|
147
|
+
var isObject$u = function (it) {
|
|
148
148
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
149
149
|
};
|
|
150
150
|
|
|
151
|
-
var isObject$
|
|
151
|
+
var isObject$t = isObject$u;
|
|
152
152
|
|
|
153
153
|
// `ToPrimitive` abstract operation
|
|
154
154
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
155
155
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
156
156
|
// and the second argument - flag - preferred type is a string
|
|
157
157
|
var toPrimitive$c = function (input, PREFERRED_STRING) {
|
|
158
|
-
if (!isObject$
|
|
158
|
+
if (!isObject$t(input)) return input;
|
|
159
159
|
var fn, val;
|
|
160
|
-
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$
|
|
161
|
-
if (typeof (fn = input.valueOf) == 'function' && !isObject$
|
|
162
|
-
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$
|
|
160
|
+
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$t(val = fn.call(input))) return val;
|
|
161
|
+
if (typeof (fn = input.valueOf) == 'function' && !isObject$t(val = fn.call(input))) return val;
|
|
162
|
+
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$t(val = fn.call(input))) return val;
|
|
163
163
|
throw TypeError("Can't convert object to primitive value");
|
|
164
164
|
};
|
|
165
165
|
|
|
@@ -170,11 +170,11 @@ var has$w = function (it, key) {
|
|
|
170
170
|
};
|
|
171
171
|
|
|
172
172
|
var global$F = global$G;
|
|
173
|
-
var isObject$
|
|
173
|
+
var isObject$s = isObject$u;
|
|
174
174
|
|
|
175
175
|
var document$4 = global$F.document;
|
|
176
176
|
// typeof document.createElement is 'object' in old IE
|
|
177
|
-
var EXISTS$7 = isObject$
|
|
177
|
+
var EXISTS$7 = isObject$s(document$4) && isObject$s(document$4.createElement);
|
|
178
178
|
|
|
179
179
|
var documentCreateElement$8 = function (it) {
|
|
180
180
|
return EXISTS$7 ? document$4.createElement(it) : {};
|
|
@@ -214,10 +214,10 @@ objectGetOwnPropertyDescriptor$7.f = DESCRIPTORS$k ? nativeGetOwnPropertyDescrip
|
|
|
214
214
|
|
|
215
215
|
var objectDefineProperty$7 = {};
|
|
216
216
|
|
|
217
|
-
var isObject$
|
|
217
|
+
var isObject$r = isObject$u;
|
|
218
218
|
|
|
219
219
|
var anObject$v = function (it) {
|
|
220
|
-
if (!isObject$
|
|
220
|
+
if (!isObject$r(it)) {
|
|
221
221
|
throw TypeError(String(it) + ' is not an object');
|
|
222
222
|
} return it;
|
|
223
223
|
};
|
|
@@ -327,7 +327,7 @@ var hiddenKeys$e = {};
|
|
|
327
327
|
|
|
328
328
|
var NATIVE_WEAK_MAP$7 = nativeWeakMap$7;
|
|
329
329
|
var global$B = global$G;
|
|
330
|
-
var isObject$
|
|
330
|
+
var isObject$q = isObject$u;
|
|
331
331
|
var createNonEnumerableProperty$i = createNonEnumerableProperty$k;
|
|
332
332
|
var objectHas$7 = has$w;
|
|
333
333
|
var sharedKey$a = sharedKey$b;
|
|
@@ -343,7 +343,7 @@ var enforce$7 = function (it) {
|
|
|
343
343
|
var getterFor$7 = function (TYPE) {
|
|
344
344
|
return function (it) {
|
|
345
345
|
var state;
|
|
346
|
-
if (!isObject$
|
|
346
|
+
if (!isObject$q(it) || (state = get$7(it)).type !== TYPE) {
|
|
347
347
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
348
348
|
} return state;
|
|
349
349
|
};
|
|
@@ -455,7 +455,7 @@ var min$c = Math.min;
|
|
|
455
455
|
|
|
456
456
|
// `ToLength` abstract operation
|
|
457
457
|
// https://tc39.github.io/ecma262/#sec-tolength
|
|
458
|
-
var toLength$
|
|
458
|
+
var toLength$k = function (argument) {
|
|
459
459
|
return argument > 0 ? min$c(toInteger$d(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
460
460
|
};
|
|
461
461
|
|
|
@@ -473,14 +473,14 @@ var toAbsoluteIndex$9 = function (index, length) {
|
|
|
473
473
|
};
|
|
474
474
|
|
|
475
475
|
var toIndexedObject$c = toIndexedObject$e;
|
|
476
|
-
var toLength$
|
|
476
|
+
var toLength$j = toLength$k;
|
|
477
477
|
var toAbsoluteIndex$8 = toAbsoluteIndex$9;
|
|
478
478
|
|
|
479
479
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
480
480
|
var createMethod$b = function (IS_INCLUDES) {
|
|
481
481
|
return function ($this, el, fromIndex) {
|
|
482
482
|
var O = toIndexedObject$c($this);
|
|
483
|
-
var length = toLength$
|
|
483
|
+
var length = toLength$j(O.length);
|
|
484
484
|
var index = toAbsoluteIndex$8(fromIndex, length);
|
|
485
485
|
var value;
|
|
486
486
|
// Array#includes uses SameValueZero equality algorithm
|
|
@@ -691,7 +691,7 @@ var WellKnownSymbolsStore$7 = shared$9('wks');
|
|
|
691
691
|
var Symbol$2 = global$v.Symbol;
|
|
692
692
|
var createWellKnownSymbol$7 = USE_SYMBOL_AS_UID$7 ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$9;
|
|
693
693
|
|
|
694
|
-
var wellKnownSymbol$
|
|
694
|
+
var wellKnownSymbol$E = function (name) {
|
|
695
695
|
if (!has$q(WellKnownSymbolsStore$7, name)) {
|
|
696
696
|
if (NATIVE_SYMBOL$8 && has$q(Symbol$2, name)) WellKnownSymbolsStore$7[name] = Symbol$2[name];
|
|
697
697
|
else WellKnownSymbolsStore$7[name] = createWellKnownSymbol$7('Symbol.' + name);
|
|
@@ -700,9 +700,9 @@ var wellKnownSymbol$D = function (name) {
|
|
|
700
700
|
|
|
701
701
|
var defineProperty$b = objectDefineProperty$7.f;
|
|
702
702
|
var has$p = has$w;
|
|
703
|
-
var wellKnownSymbol$
|
|
703
|
+
var wellKnownSymbol$D = wellKnownSymbol$E;
|
|
704
704
|
|
|
705
|
-
var TO_STRING_TAG$b = wellKnownSymbol$
|
|
705
|
+
var TO_STRING_TAG$b = wellKnownSymbol$D('toStringTag');
|
|
706
706
|
|
|
707
707
|
var setToStringTag$c = function (it, TAG, STATIC) {
|
|
708
708
|
if (it && !has$p(it = STATIC ? it : it.prototype, TO_STRING_TAG$b)) {
|
|
@@ -712,17 +712,17 @@ var setToStringTag$c = function (it, TAG, STATIC) {
|
|
|
712
712
|
|
|
713
713
|
var getBuiltIn$g = getBuiltIn$i;
|
|
714
714
|
var definePropertyModule$c = objectDefineProperty$7;
|
|
715
|
-
var wellKnownSymbol$
|
|
715
|
+
var wellKnownSymbol$C = wellKnownSymbol$E;
|
|
716
716
|
var DESCRIPTORS$h = descriptors$7;
|
|
717
717
|
|
|
718
|
-
var SPECIES$
|
|
718
|
+
var SPECIES$d = wellKnownSymbol$C('species');
|
|
719
719
|
|
|
720
720
|
var setSpecies$7 = function (CONSTRUCTOR_NAME) {
|
|
721
721
|
var Constructor = getBuiltIn$g(CONSTRUCTOR_NAME);
|
|
722
722
|
var defineProperty = definePropertyModule$c.f;
|
|
723
723
|
|
|
724
|
-
if (DESCRIPTORS$h && Constructor && !Constructor[SPECIES$
|
|
725
|
-
defineProperty(Constructor, SPECIES$
|
|
724
|
+
if (DESCRIPTORS$h && Constructor && !Constructor[SPECIES$d]) {
|
|
725
|
+
defineProperty(Constructor, SPECIES$d, {
|
|
726
726
|
configurable: true,
|
|
727
727
|
get: function () { return this; }
|
|
728
728
|
});
|
|
@@ -745,10 +745,10 @@ var iterate$8 = {exports: {}};
|
|
|
745
745
|
|
|
746
746
|
var iterators$6 = {};
|
|
747
747
|
|
|
748
|
-
var wellKnownSymbol$
|
|
748
|
+
var wellKnownSymbol$B = wellKnownSymbol$E;
|
|
749
749
|
var Iterators$b = iterators$6;
|
|
750
750
|
|
|
751
|
-
var ITERATOR$f = wellKnownSymbol$
|
|
751
|
+
var ITERATOR$f = wellKnownSymbol$B('iterator');
|
|
752
752
|
var ArrayPrototype$7 = Array.prototype;
|
|
753
753
|
|
|
754
754
|
// check on default Array iterator
|
|
@@ -781,9 +781,9 @@ var functionBindContext$5 = function (fn, that, length) {
|
|
|
781
781
|
};
|
|
782
782
|
};
|
|
783
783
|
|
|
784
|
-
var wellKnownSymbol$
|
|
784
|
+
var wellKnownSymbol$A = wellKnownSymbol$E;
|
|
785
785
|
|
|
786
|
-
var TO_STRING_TAG$a = wellKnownSymbol$
|
|
786
|
+
var TO_STRING_TAG$a = wellKnownSymbol$A('toStringTag');
|
|
787
787
|
var test$7 = {};
|
|
788
788
|
|
|
789
789
|
test$7[TO_STRING_TAG$a] = 'z';
|
|
@@ -792,9 +792,9 @@ var toStringTagSupport$5 = String(test$7) === '[object z]';
|
|
|
792
792
|
|
|
793
793
|
var TO_STRING_TAG_SUPPORT$5 = toStringTagSupport$5;
|
|
794
794
|
var classofRaw$8 = classofRaw$9;
|
|
795
|
-
var wellKnownSymbol$
|
|
795
|
+
var wellKnownSymbol$z = wellKnownSymbol$E;
|
|
796
796
|
|
|
797
|
-
var TO_STRING_TAG$9 = wellKnownSymbol$
|
|
797
|
+
var TO_STRING_TAG$9 = wellKnownSymbol$z('toStringTag');
|
|
798
798
|
// ES3 wrong here
|
|
799
799
|
var CORRECT_ARGUMENTS$5 = classofRaw$8(function () { return arguments; }()) == 'Arguments';
|
|
800
800
|
|
|
@@ -819,9 +819,9 @@ var classof$m = TO_STRING_TAG_SUPPORT$5 ? classofRaw$8 : function (it) {
|
|
|
819
819
|
|
|
820
820
|
var classof$l = classof$m;
|
|
821
821
|
var Iterators$a = iterators$6;
|
|
822
|
-
var wellKnownSymbol$
|
|
822
|
+
var wellKnownSymbol$y = wellKnownSymbol$E;
|
|
823
823
|
|
|
824
|
-
var ITERATOR$e = wellKnownSymbol$
|
|
824
|
+
var ITERATOR$e = wellKnownSymbol$y('iterator');
|
|
825
825
|
|
|
826
826
|
var getIteratorMethod$a = function (it) {
|
|
827
827
|
if (it != undefined) return it[ITERATOR$e]
|
|
@@ -845,8 +845,8 @@ var callWithSafeIterationClosing$8 = function (iterator, fn, value, ENTRIES) {
|
|
|
845
845
|
|
|
846
846
|
var anObject$r = anObject$v;
|
|
847
847
|
var isArrayIteratorMethod$7 = isArrayIteratorMethod$8;
|
|
848
|
-
var toLength$
|
|
849
|
-
var bind$
|
|
848
|
+
var toLength$i = toLength$k;
|
|
849
|
+
var bind$e = functionBindContext$5;
|
|
850
850
|
var getIteratorMethod$9 = getIteratorMethod$a;
|
|
851
851
|
var callWithSafeIterationClosing$7 = callWithSafeIterationClosing$8;
|
|
852
852
|
|
|
@@ -856,7 +856,7 @@ var Result$4 = function (stopped, result) {
|
|
|
856
856
|
};
|
|
857
857
|
|
|
858
858
|
var iterate$7 = iterate$8.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
|
|
859
|
-
var boundFunction = bind$
|
|
859
|
+
var boundFunction = bind$e(fn, that, AS_ENTRIES ? 2 : 1);
|
|
860
860
|
var iterator, iterFn, index, length, result, next, step;
|
|
861
861
|
|
|
862
862
|
if (IS_ITERATOR) {
|
|
@@ -866,7 +866,7 @@ var iterate$7 = iterate$8.exports = function (iterable, fn, that, AS_ENTRIES, IS
|
|
|
866
866
|
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
|
|
867
867
|
// optimisation for array iterators
|
|
868
868
|
if (isArrayIteratorMethod$7(iterFn)) {
|
|
869
|
-
for (index = 0, length = toLength$
|
|
869
|
+
for (index = 0, length = toLength$i(iterable.length); length > index; index++) {
|
|
870
870
|
result = AS_ENTRIES
|
|
871
871
|
? boundFunction(anObject$r(step = iterable[index])[0], step[1])
|
|
872
872
|
: boundFunction(iterable[index]);
|
|
@@ -887,9 +887,9 @@ iterate$7.stop = function (result) {
|
|
|
887
887
|
return new Result$4(true, result);
|
|
888
888
|
};
|
|
889
889
|
|
|
890
|
-
var wellKnownSymbol$
|
|
890
|
+
var wellKnownSymbol$x = wellKnownSymbol$E;
|
|
891
891
|
|
|
892
|
-
var ITERATOR$d = wellKnownSymbol$
|
|
892
|
+
var ITERATOR$d = wellKnownSymbol$x('iterator');
|
|
893
893
|
var SAFE_CLOSING$4 = false;
|
|
894
894
|
|
|
895
895
|
try {
|
|
@@ -928,16 +928,16 @@ var checkCorrectnessOfIteration$6 = function (exec, SKIP_CLOSING) {
|
|
|
928
928
|
|
|
929
929
|
var anObject$q = anObject$v;
|
|
930
930
|
var aFunction$h = aFunction$j;
|
|
931
|
-
var wellKnownSymbol$
|
|
931
|
+
var wellKnownSymbol$w = wellKnownSymbol$E;
|
|
932
932
|
|
|
933
|
-
var SPECIES$
|
|
933
|
+
var SPECIES$c = wellKnownSymbol$w('species');
|
|
934
934
|
|
|
935
935
|
// `SpeciesConstructor` abstract operation
|
|
936
936
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
937
937
|
var speciesConstructor$8 = function (O, defaultConstructor) {
|
|
938
938
|
var C = anObject$q(O).constructor;
|
|
939
939
|
var S;
|
|
940
|
-
return C === undefined || (S = anObject$q(C)[SPECIES$
|
|
940
|
+
return C === undefined || (S = anObject$q(C)[SPECIES$c]) == undefined ? defaultConstructor : aFunction$h(S);
|
|
941
941
|
};
|
|
942
942
|
|
|
943
943
|
var getBuiltIn$f = getBuiltIn$i;
|
|
@@ -955,7 +955,7 @@ var engineIsIos$4 = /(iphone|ipod|ipad).*applewebkit/i.test(userAgent$6);
|
|
|
955
955
|
var global$u = global$G;
|
|
956
956
|
var fails$q = fails$w;
|
|
957
957
|
var classof$k = classofRaw$9;
|
|
958
|
-
var bind$
|
|
958
|
+
var bind$d = functionBindContext$5;
|
|
959
959
|
var html$8 = html$9;
|
|
960
960
|
var createElement$8 = documentCreateElement$8;
|
|
961
961
|
var IS_IOS$6 = engineIsIos$4;
|
|
@@ -1027,7 +1027,7 @@ if (!set$8 || !clear$4) {
|
|
|
1027
1027
|
channel$4 = new MessageChannel$5();
|
|
1028
1028
|
port$4 = channel$4.port2;
|
|
1029
1029
|
channel$4.port1.onmessage = listener$4;
|
|
1030
|
-
defer$4 = bind$
|
|
1030
|
+
defer$4 = bind$d(port$4.postMessage, port$4, 1);
|
|
1031
1031
|
// Browsers with postMessage, skip WebWorkers
|
|
1032
1032
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1033
1033
|
} else if (
|
|
@@ -1160,12 +1160,12 @@ newPromiseCapability$8.f = function (C) {
|
|
|
1160
1160
|
};
|
|
1161
1161
|
|
|
1162
1162
|
var anObject$p = anObject$v;
|
|
1163
|
-
var isObject$
|
|
1163
|
+
var isObject$p = isObject$u;
|
|
1164
1164
|
var newPromiseCapability$7 = newPromiseCapability$8;
|
|
1165
1165
|
|
|
1166
1166
|
var promiseResolve$6 = function (C, x) {
|
|
1167
1167
|
anObject$p(C);
|
|
1168
|
-
if (isObject$
|
|
1168
|
+
if (isObject$p(x) && x.constructor === C) return x;
|
|
1169
1169
|
var promiseCapability = newPromiseCapability$7.f(C);
|
|
1170
1170
|
var resolve = promiseCapability.resolve;
|
|
1171
1171
|
resolve(x);
|
|
@@ -1210,7 +1210,7 @@ if (v8$4) {
|
|
|
1210
1210
|
|
|
1211
1211
|
var engineV8Version$4 = version$a && +version$a;
|
|
1212
1212
|
|
|
1213
|
-
var $$
|
|
1213
|
+
var $$o = _export$7;
|
|
1214
1214
|
var global$q = global$G;
|
|
1215
1215
|
var getBuiltIn$d = getBuiltIn$i;
|
|
1216
1216
|
var NativePromise$4 = nativePromiseConstructor$4;
|
|
@@ -1218,7 +1218,7 @@ var redefine$h = redefine$k.exports;
|
|
|
1218
1218
|
var redefineAll$7 = redefineAll$8;
|
|
1219
1219
|
var setToStringTag$b = setToStringTag$c;
|
|
1220
1220
|
var setSpecies$6 = setSpecies$7;
|
|
1221
|
-
var isObject$
|
|
1221
|
+
var isObject$o = isObject$u;
|
|
1222
1222
|
var aFunction$f = aFunction$j;
|
|
1223
1223
|
var anInstance$8 = anInstance$9;
|
|
1224
1224
|
var classof$i = classofRaw$9;
|
|
@@ -1234,10 +1234,10 @@ var newPromiseCapabilityModule$4 = newPromiseCapability$8;
|
|
|
1234
1234
|
var perform$5 = perform$6;
|
|
1235
1235
|
var InternalStateModule$c = internalState$7;
|
|
1236
1236
|
var isForced$a = isForced_1$7;
|
|
1237
|
-
var wellKnownSymbol$
|
|
1237
|
+
var wellKnownSymbol$v = wellKnownSymbol$E;
|
|
1238
1238
|
var V8_VERSION$4 = engineV8Version$4;
|
|
1239
1239
|
|
|
1240
|
-
var SPECIES$
|
|
1240
|
+
var SPECIES$b = wellKnownSymbol$v('species');
|
|
1241
1241
|
var PROMISE$4 = 'Promise';
|
|
1242
1242
|
var getInternalState$a = InternalStateModule$c.get;
|
|
1243
1243
|
var setInternalState$b = InternalStateModule$c.set;
|
|
@@ -1280,7 +1280,7 @@ var FORCED$9 = isForced$a(PROMISE$4, function () {
|
|
|
1280
1280
|
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1281
1281
|
};
|
|
1282
1282
|
var constructor = promise.constructor = {};
|
|
1283
|
-
constructor[SPECIES$
|
|
1283
|
+
constructor[SPECIES$b] = FakePromise;
|
|
1284
1284
|
return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
|
|
1285
1285
|
});
|
|
1286
1286
|
|
|
@@ -1291,7 +1291,7 @@ var INCORRECT_ITERATION$4 = FORCED$9 || !checkCorrectnessOfIteration$5(function
|
|
|
1291
1291
|
// helpers
|
|
1292
1292
|
var isThenable$4 = function (it) {
|
|
1293
1293
|
var then;
|
|
1294
|
-
return isObject$
|
|
1294
|
+
return isObject$o(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
1295
1295
|
};
|
|
1296
1296
|
|
|
1297
1297
|
var notify$5 = function (promise, state, isReject) {
|
|
@@ -1385,7 +1385,7 @@ var onHandleUnhandled$4 = function (promise, state) {
|
|
|
1385
1385
|
});
|
|
1386
1386
|
};
|
|
1387
1387
|
|
|
1388
|
-
var bind$
|
|
1388
|
+
var bind$c = function (fn, promise, state, unwrap) {
|
|
1389
1389
|
return function (value) {
|
|
1390
1390
|
fn(promise, state, value, unwrap);
|
|
1391
1391
|
};
|
|
@@ -1412,8 +1412,8 @@ var internalResolve$4 = function (promise, state, value, unwrap) {
|
|
|
1412
1412
|
var wrapper = { done: false };
|
|
1413
1413
|
try {
|
|
1414
1414
|
then.call(value,
|
|
1415
|
-
bind$
|
|
1416
|
-
bind$
|
|
1415
|
+
bind$c(internalResolve$4, promise, wrapper, state),
|
|
1416
|
+
bind$c(internalReject$4, promise, wrapper, state)
|
|
1417
1417
|
);
|
|
1418
1418
|
} catch (error) {
|
|
1419
1419
|
internalReject$4(promise, wrapper, error, state);
|
|
@@ -1438,7 +1438,7 @@ if (FORCED$9) {
|
|
|
1438
1438
|
Internal$4.call(this);
|
|
1439
1439
|
var state = getInternalState$a(this);
|
|
1440
1440
|
try {
|
|
1441
|
-
executor(bind$
|
|
1441
|
+
executor(bind$c(internalResolve$4, this, state), bind$c(internalReject$4, this, state));
|
|
1442
1442
|
} catch (error) {
|
|
1443
1443
|
internalReject$4(this, state, error);
|
|
1444
1444
|
}
|
|
@@ -1480,8 +1480,8 @@ if (FORCED$9) {
|
|
|
1480
1480
|
var promise = new Internal$4();
|
|
1481
1481
|
var state = getInternalState$a(promise);
|
|
1482
1482
|
this.promise = promise;
|
|
1483
|
-
this.resolve = bind$
|
|
1484
|
-
this.reject = bind$
|
|
1483
|
+
this.resolve = bind$c(internalResolve$4, promise, state);
|
|
1484
|
+
this.reject = bind$c(internalReject$4, promise, state);
|
|
1485
1485
|
};
|
|
1486
1486
|
newPromiseCapabilityModule$4.f = newPromiseCapability$6 = function (C) {
|
|
1487
1487
|
return C === PromiseConstructor$4 || C === PromiseWrapper$4
|
|
@@ -1502,7 +1502,7 @@ if (FORCED$9) {
|
|
|
1502
1502
|
}, { unsafe: true });
|
|
1503
1503
|
|
|
1504
1504
|
// wrap fetch result
|
|
1505
|
-
if (typeof $fetch$6 == 'function') $$
|
|
1505
|
+
if (typeof $fetch$6 == 'function') $$o({ global: true, enumerable: true, forced: true }, {
|
|
1506
1506
|
// eslint-disable-next-line no-unused-vars
|
|
1507
1507
|
fetch: function fetch(input /* , init */) {
|
|
1508
1508
|
return promiseResolve$5(PromiseConstructor$4, $fetch$6.apply(global$q, arguments));
|
|
@@ -1511,7 +1511,7 @@ if (FORCED$9) {
|
|
|
1511
1511
|
}
|
|
1512
1512
|
}
|
|
1513
1513
|
|
|
1514
|
-
$$
|
|
1514
|
+
$$o({ global: true, wrap: true, forced: FORCED$9 }, {
|
|
1515
1515
|
Promise: PromiseConstructor$4
|
|
1516
1516
|
});
|
|
1517
1517
|
|
|
@@ -1521,7 +1521,7 @@ setSpecies$6(PROMISE$4);
|
|
|
1521
1521
|
PromiseWrapper$4 = getBuiltIn$d(PROMISE$4);
|
|
1522
1522
|
|
|
1523
1523
|
// statics
|
|
1524
|
-
$$
|
|
1524
|
+
$$o({ target: PROMISE$4, stat: true, forced: FORCED$9 }, {
|
|
1525
1525
|
// `Promise.reject` method
|
|
1526
1526
|
// https://tc39.github.io/ecma262/#sec-promise.reject
|
|
1527
1527
|
reject: function reject(r) {
|
|
@@ -1531,7 +1531,7 @@ $$n({ target: PROMISE$4, stat: true, forced: FORCED$9 }, {
|
|
|
1531
1531
|
}
|
|
1532
1532
|
});
|
|
1533
1533
|
|
|
1534
|
-
$$
|
|
1534
|
+
$$o({ target: PROMISE$4, stat: true, forced: FORCED$9 }, {
|
|
1535
1535
|
// `Promise.resolve` method
|
|
1536
1536
|
// https://tc39.github.io/ecma262/#sec-promise.resolve
|
|
1537
1537
|
resolve: function resolve(x) {
|
|
@@ -1539,7 +1539,7 @@ $$n({ target: PROMISE$4, stat: true, forced: FORCED$9 }, {
|
|
|
1539
1539
|
}
|
|
1540
1540
|
});
|
|
1541
1541
|
|
|
1542
|
-
$$
|
|
1542
|
+
$$o({ target: PROMISE$4, stat: true, forced: INCORRECT_ITERATION$4 }, {
|
|
1543
1543
|
// `Promise.all` method
|
|
1544
1544
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
1545
1545
|
all: function all(iterable) {
|
|
@@ -14691,7 +14691,7 @@ var bind$1$4 = functionBindContext$4;
|
|
|
14691
14691
|
var toObject$d = toObject$3$3;
|
|
14692
14692
|
var callWithSafeIterationClosing$6 = callWithSafeIterationClosing$1$4;
|
|
14693
14693
|
var isArrayIteratorMethod$6 = isArrayIteratorMethod$1$4;
|
|
14694
|
-
var toLength$
|
|
14694
|
+
var toLength$h = toLength$2$5;
|
|
14695
14695
|
var createProperty$2 = createProperty$1$1;
|
|
14696
14696
|
var getIteratorMethod$2$1 = getIteratorMethod$3$1; // `Array.from` method implementation
|
|
14697
14697
|
// https://tc39.github.io/ecma262/#sec-array.from
|
|
@@ -14719,7 +14719,7 @@ var arrayFrom$1$1 = function from(arrayLike
|
|
|
14719
14719
|
createProperty$2(result, index, value);
|
|
14720
14720
|
}
|
|
14721
14721
|
} else {
|
|
14722
|
-
length = toLength$
|
|
14722
|
+
length = toLength$h(O.length);
|
|
14723
14723
|
result = new C(length);
|
|
14724
14724
|
|
|
14725
14725
|
for (; length > index; index++) {
|
|
@@ -14954,18 +14954,18 @@ var createIteratorConstructor$6 = createIteratorConstructor$2$1;
|
|
|
14954
14954
|
var InternalStateModule$1$5 = internalState$6;
|
|
14955
14955
|
var anInstance$1$4 = anInstance$2$1;
|
|
14956
14956
|
var hasOwn$4 = has$a$3;
|
|
14957
|
-
var bind$
|
|
14957
|
+
var bind$b = functionBindContext$4;
|
|
14958
14958
|
var classof$h = classof$2$5;
|
|
14959
14959
|
var anObject$o = anObject$8$5;
|
|
14960
|
-
var isObject$
|
|
14960
|
+
var isObject$n = isObject$6$5;
|
|
14961
14961
|
var create$8 = objectCreate$5;
|
|
14962
14962
|
var createPropertyDescriptor$b = createPropertyDescriptor$5$1;
|
|
14963
14963
|
var getIterator$2 = getIterator$1$1;
|
|
14964
14964
|
var getIteratorMethod$8 = getIteratorMethod$3$1;
|
|
14965
|
-
var wellKnownSymbol$
|
|
14965
|
+
var wellKnownSymbol$u = wellKnownSymbol$b$4;
|
|
14966
14966
|
var $fetch$5 = getBuiltIn$c('fetch');
|
|
14967
14967
|
var Headers$2 = getBuiltIn$c('Headers');
|
|
14968
|
-
var ITERATOR$c = wellKnownSymbol$
|
|
14968
|
+
var ITERATOR$c = wellKnownSymbol$u('iterator');
|
|
14969
14969
|
var URL_SEARCH_PARAMS$1 = 'URLSearchParams';
|
|
14970
14970
|
var URL_SEARCH_PARAMS_ITERATOR$1 = URL_SEARCH_PARAMS$1 + 'Iterator';
|
|
14971
14971
|
var setInternalState$1$3 = InternalStateModule$1$5.set;
|
|
@@ -15086,7 +15086,7 @@ URLSearchParams() {
|
|
|
15086
15086
|
});
|
|
15087
15087
|
|
|
15088
15088
|
if (init !== undefined) {
|
|
15089
|
-
if (isObject$
|
|
15089
|
+
if (isObject$n(init)) {
|
|
15090
15090
|
iteratorMethod = getIteratorMethod$8(init);
|
|
15091
15091
|
|
|
15092
15092
|
if (typeof iteratorMethod === 'function') {
|
|
@@ -15242,7 +15242,7 @@ redefineAll$6(URLSearchParamsPrototype$1, {
|
|
|
15242
15242
|
/* , thisArg */
|
|
15243
15243
|
) {
|
|
15244
15244
|
var entries = getInternalParamsState$1(this).entries;
|
|
15245
|
-
var boundFunction = bind$
|
|
15245
|
+
var boundFunction = bind$b(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
|
|
15246
15246
|
var index = 0;
|
|
15247
15247
|
var entry;
|
|
15248
15248
|
|
|
@@ -15309,7 +15309,7 @@ if (!USE_NATIVE_URL$1$1 && typeof $fetch$5 == 'function' && typeof Headers$2 ==
|
|
|
15309
15309
|
if (arguments.length > 1) {
|
|
15310
15310
|
init = arguments[1];
|
|
15311
15311
|
|
|
15312
|
-
if (isObject$
|
|
15312
|
+
if (isObject$n(init)) {
|
|
15313
15313
|
body = init.body;
|
|
15314
15314
|
|
|
15315
15315
|
if (classof$h(body) === URL_SEARCH_PARAMS$1) {
|
|
@@ -16541,11 +16541,11 @@ var numberParseInt$3 = FORCED$8 ? function parseInt(string, radix) {
|
|
|
16541
16541
|
var S = trim$3(String(string));
|
|
16542
16542
|
return $parseInt$3(S, radix >>> 0 || (hex$3.test(S) ? 16 : 10));
|
|
16543
16543
|
} : $parseInt$3;
|
|
16544
|
-
var $$
|
|
16544
|
+
var $$n = _export$6;
|
|
16545
16545
|
var parseIntImplementation$3 = numberParseInt$3; // `parseInt` method
|
|
16546
16546
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
16547
16547
|
|
|
16548
|
-
$$
|
|
16548
|
+
$$n({
|
|
16549
16549
|
global: true,
|
|
16550
16550
|
forced: parseInt != parseIntImplementation$3
|
|
16551
16551
|
}, {
|
|
@@ -18572,7 +18572,7 @@ var fixRegexpWellKnownSymbolLogic$5 = function (KEY, length, exec, sham) {
|
|
|
18572
18572
|
if (sham) createNonEnumerableProperty$e(RegExp.prototype[SYMBOL], 'sham', true);
|
|
18573
18573
|
};
|
|
18574
18574
|
|
|
18575
|
-
var isObject$
|
|
18575
|
+
var isObject$m = isObject$6$4;
|
|
18576
18576
|
var classof$1$5 = classofRaw$6;
|
|
18577
18577
|
var wellKnownSymbol$1$5 = wellKnownSymbol$8$4;
|
|
18578
18578
|
var MATCH$8 = wellKnownSymbol$1$5('match'); // `IsRegExp` abstract operation
|
|
@@ -18580,7 +18580,7 @@ var MATCH$8 = wellKnownSymbol$1$5('match'); // `IsRegExp` abstract operation
|
|
|
18580
18580
|
|
|
18581
18581
|
var isRegexp$5 = function (it) {
|
|
18582
18582
|
var isRegExp;
|
|
18583
|
-
return isObject$
|
|
18583
|
+
return isObject$m(it) && ((isRegExp = it[MATCH$8]) !== undefined ? !!isRegExp : classof$1$5(it) == 'RegExp');
|
|
18584
18584
|
};
|
|
18585
18585
|
|
|
18586
18586
|
var aFunction$1$4 = function (it) {
|
|
@@ -18593,14 +18593,14 @@ var aFunction$1$4 = function (it) {
|
|
|
18593
18593
|
|
|
18594
18594
|
var anObject$2$6 = anObject$9$3;
|
|
18595
18595
|
var aFunction$d = aFunction$1$4;
|
|
18596
|
-
var wellKnownSymbol$
|
|
18597
|
-
var SPECIES$
|
|
18596
|
+
var wellKnownSymbol$t = wellKnownSymbol$8$4;
|
|
18597
|
+
var SPECIES$a = wellKnownSymbol$t('species'); // `SpeciesConstructor` abstract operation
|
|
18598
18598
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
18599
18599
|
|
|
18600
18600
|
var speciesConstructor$1$4 = function (O, defaultConstructor) {
|
|
18601
18601
|
var C = anObject$2$6(O).constructor;
|
|
18602
18602
|
var S;
|
|
18603
|
-
return C === undefined || (S = anObject$2$6(C)[SPECIES$
|
|
18603
|
+
return C === undefined || (S = anObject$2$6(C)[SPECIES$a]) == undefined ? defaultConstructor : aFunction$d(S);
|
|
18604
18604
|
};
|
|
18605
18605
|
|
|
18606
18606
|
var toInteger$1$5 = toInteger$4$4;
|
|
@@ -18814,7 +18814,7 @@ function isValidEmail(email) {
|
|
|
18814
18814
|
var fixRegExpWellKnownSymbolLogic$8 = fixRegexpWellKnownSymbolLogic$5;
|
|
18815
18815
|
var anObject$n = anObject$9$3;
|
|
18816
18816
|
var toObject$c = toObject$2$3;
|
|
18817
|
-
var toLength$
|
|
18817
|
+
var toLength$g = toLength$3$4;
|
|
18818
18818
|
var toInteger$a = toInteger$4$4;
|
|
18819
18819
|
var requireObjectCoercible$1$6 = requireObjectCoercible$6$3;
|
|
18820
18820
|
var advanceStringIndex$7 = advanceStringIndex$2$3;
|
|
@@ -18867,7 +18867,7 @@ fixRegExpWellKnownSymbolLogic$8('replace', 2, function (REPLACE, nativeReplace,
|
|
|
18867
18867
|
results.push(result);
|
|
18868
18868
|
if (!global) break;
|
|
18869
18869
|
var matchStr = String(result[0]);
|
|
18870
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex$7(S, toLength$
|
|
18870
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex$7(S, toLength$g(rx.lastIndex), fullUnicode);
|
|
18871
18871
|
}
|
|
18872
18872
|
|
|
18873
18873
|
var accumulatedResult = '';
|
|
@@ -18994,11 +18994,11 @@ var numberParseInt$2 = FORCED$7 ? function parseInt(string, radix) {
|
|
|
18994
18994
|
var S = trim$2(String(string));
|
|
18995
18995
|
return $parseInt$2(S, radix >>> 0 || (hex$2.test(S) ? 16 : 10));
|
|
18996
18996
|
} : $parseInt$2;
|
|
18997
|
-
var $$
|
|
18997
|
+
var $$m = _export$5;
|
|
18998
18998
|
var parseIntImplementation$2 = numberParseInt$2; // `parseInt` method
|
|
18999
18999
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
19000
19000
|
|
|
19001
|
-
$$
|
|
19001
|
+
$$m({
|
|
19002
19002
|
global: true,
|
|
19003
19003
|
forced: parseInt != parseIntImplementation$2
|
|
19004
19004
|
}, {
|
|
@@ -25228,7 +25228,7 @@ var sharedKey$1$4 = function (key) {
|
|
|
25228
25228
|
var hiddenKeys$3$4 = {};
|
|
25229
25229
|
var NATIVE_WEAK_MAP$4 = nativeWeakMap$4;
|
|
25230
25230
|
var global$6$4 = global$b$4;
|
|
25231
|
-
var isObject$
|
|
25231
|
+
var isObject$l = isObject$4$4;
|
|
25232
25232
|
var createNonEnumerableProperty$3$4 = createNonEnumerableProperty$5$3;
|
|
25233
25233
|
var objectHas$4 = has$6$4;
|
|
25234
25234
|
var sharedKey$7 = sharedKey$1$4;
|
|
@@ -25244,7 +25244,7 @@ var getterFor$4 = function (TYPE) {
|
|
|
25244
25244
|
return function (it) {
|
|
25245
25245
|
var state;
|
|
25246
25246
|
|
|
25247
|
-
if (!isObject$
|
|
25247
|
+
if (!isObject$l(it) || (state = get$4(it)).type !== TYPE) {
|
|
25248
25248
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
25249
25249
|
}
|
|
25250
25250
|
|
|
@@ -25369,13 +25369,13 @@ var toAbsoluteIndex$1$4 = function (index, length) {
|
|
|
25369
25369
|
};
|
|
25370
25370
|
|
|
25371
25371
|
var toIndexedObject$1$4 = toIndexedObject$3$4;
|
|
25372
|
-
var toLength$
|
|
25372
|
+
var toLength$f = toLength$1$4;
|
|
25373
25373
|
var toAbsoluteIndex$5 = toAbsoluteIndex$1$4; // `Array.prototype.{ indexOf, includes }` methods implementation
|
|
25374
25374
|
|
|
25375
25375
|
var createMethod$8 = function (IS_INCLUDES) {
|
|
25376
25376
|
return function ($this, el, fromIndex) {
|
|
25377
25377
|
var O = toIndexedObject$1$4($this);
|
|
25378
|
-
var length = toLength$
|
|
25378
|
+
var length = toLength$f(O.length);
|
|
25379
25379
|
var index = toAbsoluteIndex$5(fromIndex, length);
|
|
25380
25380
|
var value; // Array#includes uses SameValueZero equality algorithm
|
|
25381
25381
|
// eslint-disable-next-line no-self-compare
|
|
@@ -25657,9 +25657,9 @@ if (PATCH$4) {
|
|
|
25657
25657
|
}
|
|
25658
25658
|
|
|
25659
25659
|
var regexpExec$2$4 = patchedExec$4;
|
|
25660
|
-
var $$
|
|
25660
|
+
var $$l = _export$4;
|
|
25661
25661
|
var exec$4 = regexpExec$2$4;
|
|
25662
|
-
$$
|
|
25662
|
+
$$l({
|
|
25663
25663
|
target: 'RegExp',
|
|
25664
25664
|
proto: true,
|
|
25665
25665
|
forced: /./.exec !== exec$4
|
|
@@ -25697,10 +25697,10 @@ var wellKnownSymbol$1$4 = function (name) {
|
|
|
25697
25697
|
|
|
25698
25698
|
var redefine$e = redefine$2$4.exports;
|
|
25699
25699
|
var fails$n = fails$7$4;
|
|
25700
|
-
var wellKnownSymbol$
|
|
25700
|
+
var wellKnownSymbol$s = wellKnownSymbol$1$4;
|
|
25701
25701
|
var regexpExec$1$4 = regexpExec$2$4;
|
|
25702
25702
|
var createNonEnumerableProperty$d = createNonEnumerableProperty$5$3;
|
|
25703
|
-
var SPECIES$
|
|
25703
|
+
var SPECIES$9 = wellKnownSymbol$s('species');
|
|
25704
25704
|
var REPLACE_SUPPORTS_NAMED_GROUPS$4 = !fails$n(function () {
|
|
25705
25705
|
// #replace needs built-in support for named groups.
|
|
25706
25706
|
// #match works fine because it just return the exec results, even if it has
|
|
@@ -25723,7 +25723,7 @@ var REPLACE_KEEPS_$0$4 = function () {
|
|
|
25723
25723
|
return 'a'.replace(/./, '$0') === '$0';
|
|
25724
25724
|
}();
|
|
25725
25725
|
|
|
25726
|
-
var REPLACE$5 = wellKnownSymbol$
|
|
25726
|
+
var REPLACE$5 = wellKnownSymbol$s('replace'); // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
25727
25727
|
|
|
25728
25728
|
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE$4 = function () {
|
|
25729
25729
|
if (/./[REPLACE$5]) {
|
|
@@ -25748,7 +25748,7 @@ var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC$4 = !fails$n(function () {
|
|
|
25748
25748
|
});
|
|
25749
25749
|
|
|
25750
25750
|
var fixRegexpWellKnownSymbolLogic$4 = function (KEY, length, exec, sham) {
|
|
25751
|
-
var SYMBOL = wellKnownSymbol$
|
|
25751
|
+
var SYMBOL = wellKnownSymbol$s(KEY);
|
|
25752
25752
|
var DELEGATES_TO_SYMBOL = !fails$n(function () {
|
|
25753
25753
|
// String methods call symbol-named RegEp methods
|
|
25754
25754
|
var O = {};
|
|
@@ -25773,7 +25773,7 @@ var fixRegexpWellKnownSymbolLogic$4 = function (KEY, length, exec, sham) {
|
|
|
25773
25773
|
|
|
25774
25774
|
re.constructor = {};
|
|
25775
25775
|
|
|
25776
|
-
re.constructor[SPECIES$
|
|
25776
|
+
re.constructor[SPECIES$9] = function () {
|
|
25777
25777
|
return re;
|
|
25778
25778
|
};
|
|
25779
25779
|
|
|
@@ -38414,13 +38414,13 @@ function isString$2(value) {
|
|
|
38414
38414
|
}
|
|
38415
38415
|
isString$3.default = isString$2;
|
|
38416
38416
|
|
|
38417
|
-
var isObject$
|
|
38417
|
+
var isObject$k = {};
|
|
38418
38418
|
|
|
38419
|
-
Object.defineProperty(isObject$
|
|
38420
|
-
function isObject$
|
|
38419
|
+
Object.defineProperty(isObject$k, "__esModule", { value: true });
|
|
38420
|
+
function isObject$j(value) {
|
|
38421
38421
|
return ((value !== null) && (typeof value === 'object'));
|
|
38422
38422
|
}
|
|
38423
|
-
isObject$
|
|
38423
|
+
isObject$k.default = isObject$j;
|
|
38424
38424
|
|
|
38425
38425
|
var printer = {};
|
|
38426
38426
|
|
|
@@ -39857,7 +39857,7 @@ var NativeWebSocket = _global.WebSocket || _global.MozWebSocket;
|
|
|
39857
39857
|
var Backoff = backo2;
|
|
39858
39858
|
var eventemitter3_1 = eventemitter3.exports;
|
|
39859
39859
|
var is_string_1 = isString$3;
|
|
39860
|
-
var is_object_1 = isObject$
|
|
39860
|
+
var is_object_1 = isObject$k;
|
|
39861
39861
|
var printer_1 = printer;
|
|
39862
39862
|
var getOperationAST_1 = getOperationAST$1;
|
|
39863
39863
|
var symbol_observable_1 = require$$6$1;
|
|
@@ -42537,19 +42537,19 @@ function useBeaconHandler() {
|
|
|
42537
42537
|
var classof$e = classofRaw$1$3; // `IsArray` abstract operation
|
|
42538
42538
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
42539
42539
|
|
|
42540
|
-
var isArray$2$
|
|
42540
|
+
var isArray$2$3 = Array.isArray || function isArray(arg) {
|
|
42541
42541
|
return classof$e(arg) == 'Array';
|
|
42542
42542
|
};
|
|
42543
42543
|
|
|
42544
|
-
var isArray$1$3 = isArray$2$
|
|
42544
|
+
var isArray$1$3 = isArray$2$3;
|
|
42545
42545
|
var toLength$1$3 = toLength$5$3;
|
|
42546
|
-
var bind$
|
|
42546
|
+
var bind$a = functionBindContext$3; // `FlattenIntoArray` abstract operation
|
|
42547
42547
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
42548
42548
|
|
|
42549
|
-
var flattenIntoArray$1$
|
|
42549
|
+
var flattenIntoArray$1$3 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
42550
42550
|
var targetIndex = start;
|
|
42551
42551
|
var sourceIndex = 0;
|
|
42552
|
-
var mapFn = mapper ? bind$
|
|
42552
|
+
var mapFn = mapper ? bind$a(mapper, thisArg, 3) : false;
|
|
42553
42553
|
var element;
|
|
42554
42554
|
|
|
42555
42555
|
while (sourceIndex < sourceLen) {
|
|
@@ -42557,7 +42557,7 @@ var flattenIntoArray$1$2 = function (target, original, source, sourceLen, start,
|
|
|
42557
42557
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
42558
42558
|
|
|
42559
42559
|
if (depth > 0 && isArray$1$3(element)) {
|
|
42560
|
-
targetIndex = flattenIntoArray$1$
|
|
42560
|
+
targetIndex = flattenIntoArray$1$3(target, original, element, toLength$1$3(element.length), targetIndex, depth - 1) - 1;
|
|
42561
42561
|
} else {
|
|
42562
42562
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
42563
42563
|
target[targetIndex] = element;
|
|
@@ -42572,7 +42572,7 @@ var flattenIntoArray$1$2 = function (target, original, source, sourceLen, start,
|
|
|
42572
42572
|
return targetIndex;
|
|
42573
42573
|
};
|
|
42574
42574
|
|
|
42575
|
-
var flattenIntoArray_1$
|
|
42575
|
+
var flattenIntoArray_1$3 = flattenIntoArray$1$3;
|
|
42576
42576
|
var requireObjectCoercible$g = requireObjectCoercible$4$3; // `ToObject` abstract operation
|
|
42577
42577
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
42578
42578
|
|
|
@@ -42580,20 +42580,20 @@ var toObject$1$3 = function (argument) {
|
|
|
42580
42580
|
return Object(requireObjectCoercible$g(argument));
|
|
42581
42581
|
};
|
|
42582
42582
|
|
|
42583
|
-
var isObject$
|
|
42584
|
-
var isArray$b = isArray$2$
|
|
42583
|
+
var isObject$i = isObject$8$3;
|
|
42584
|
+
var isArray$b = isArray$2$3;
|
|
42585
42585
|
var wellKnownSymbol$1$3 = wellKnownSymbol$d$3;
|
|
42586
|
-
var SPECIES$
|
|
42586
|
+
var SPECIES$8 = wellKnownSymbol$1$3('species'); // `ArraySpeciesCreate` abstract operation
|
|
42587
42587
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
42588
42588
|
|
|
42589
|
-
var arraySpeciesCreate$1$
|
|
42589
|
+
var arraySpeciesCreate$1$3 = function (originalArray, length) {
|
|
42590
42590
|
var C;
|
|
42591
42591
|
|
|
42592
42592
|
if (isArray$b(originalArray)) {
|
|
42593
42593
|
C = originalArray.constructor; // cross-realm fallback
|
|
42594
42594
|
|
|
42595
|
-
if (typeof C == 'function' && (C === Array || isArray$b(C.prototype))) C = undefined;else if (isObject$
|
|
42596
|
-
C = C[SPECIES$
|
|
42595
|
+
if (typeof C == 'function' && (C === Array || isArray$b(C.prototype))) C = undefined;else if (isObject$i(C)) {
|
|
42596
|
+
C = C[SPECIES$8];
|
|
42597
42597
|
if (C === null) C = undefined;
|
|
42598
42598
|
}
|
|
42599
42599
|
}
|
|
@@ -42601,15 +42601,15 @@ var arraySpeciesCreate$1$2 = function (originalArray, length) {
|
|
|
42601
42601
|
return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
42602
42602
|
};
|
|
42603
42603
|
|
|
42604
|
-
var $$
|
|
42605
|
-
var flattenIntoArray$
|
|
42604
|
+
var $$k = _export$3;
|
|
42605
|
+
var flattenIntoArray$4 = flattenIntoArray_1$3;
|
|
42606
42606
|
var toObject$b = toObject$1$3;
|
|
42607
|
-
var toLength$
|
|
42607
|
+
var toLength$e = toLength$5$3;
|
|
42608
42608
|
var aFunction$b = aFunction$5$3;
|
|
42609
|
-
var arraySpeciesCreate$
|
|
42609
|
+
var arraySpeciesCreate$4 = arraySpeciesCreate$1$3; // `Array.prototype.flatMap` method
|
|
42610
42610
|
// https://github.com/tc39/proposal-flatMap
|
|
42611
42611
|
|
|
42612
|
-
$$
|
|
42612
|
+
$$k({
|
|
42613
42613
|
target: 'Array',
|
|
42614
42614
|
proto: true
|
|
42615
42615
|
}, {
|
|
@@ -42617,11 +42617,11 @@ $$j({
|
|
|
42617
42617
|
/* , thisArg */
|
|
42618
42618
|
) {
|
|
42619
42619
|
var O = toObject$b(this);
|
|
42620
|
-
var sourceLen = toLength$
|
|
42620
|
+
var sourceLen = toLength$e(O.length);
|
|
42621
42621
|
var A;
|
|
42622
42622
|
aFunction$b(callbackfn);
|
|
42623
|
-
A = arraySpeciesCreate$
|
|
42624
|
-
A.length = flattenIntoArray$
|
|
42623
|
+
A = arraySpeciesCreate$4(O, 0);
|
|
42624
|
+
A.length = flattenIntoArray$4(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
42625
42625
|
return A;
|
|
42626
42626
|
}
|
|
42627
42627
|
});
|
|
@@ -42738,10 +42738,10 @@ var objectCreate$3 = Object.create || function create(O, Properties) {
|
|
|
42738
42738
|
return Properties === undefined ? result : defineProperties$4(result, Properties);
|
|
42739
42739
|
};
|
|
42740
42740
|
|
|
42741
|
-
var wellKnownSymbol$
|
|
42741
|
+
var wellKnownSymbol$r = wellKnownSymbol$d$3;
|
|
42742
42742
|
var create$6 = objectCreate$3;
|
|
42743
42743
|
var definePropertyModule$8 = objectDefineProperty$3;
|
|
42744
|
-
var UNSCOPABLES$3 = wellKnownSymbol$
|
|
42744
|
+
var UNSCOPABLES$3 = wellKnownSymbol$r('unscopables');
|
|
42745
42745
|
var ArrayPrototype$4 = Array.prototype; // Array.prototype[@@unscopables]
|
|
42746
42746
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
42747
42747
|
|
|
@@ -42962,7 +42962,7 @@ var empty = {
|
|
|
42962
42962
|
var isArray$a = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();
|
|
42963
42963
|
|
|
42964
42964
|
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
|
42965
|
-
function isObject$
|
|
42965
|
+
function isObject$h(x) {
|
|
42966
42966
|
return x !== null && typeof x === 'object';
|
|
42967
42967
|
}
|
|
42968
42968
|
|
|
@@ -43022,7 +43022,7 @@ var Subscription = /*@__PURE__*/ (function () {
|
|
|
43022
43022
|
var len = _subscriptions.length;
|
|
43023
43023
|
while (++index < len) {
|
|
43024
43024
|
var sub = _subscriptions[index];
|
|
43025
|
-
if (isObject$
|
|
43025
|
+
if (isObject$h(sub)) {
|
|
43026
43026
|
try {
|
|
43027
43027
|
sub.unsubscribe();
|
|
43028
43028
|
}
|
|
@@ -44266,7 +44266,7 @@ var subscribeTo = function (result) {
|
|
|
44266
44266
|
return subscribeToIterable(result);
|
|
44267
44267
|
}
|
|
44268
44268
|
else {
|
|
44269
|
-
var value = isObject$
|
|
44269
|
+
var value = isObject$h(result) ? 'an invalid object' : "'" + result + "'";
|
|
44270
44270
|
var msg = "You provided " + value + " where a stream was expected."
|
|
44271
44271
|
+ ' You can provide an Observable, Promise, Array, or Iterable.';
|
|
44272
44272
|
throw new TypeError(msg);
|
|
@@ -44531,7 +44531,7 @@ function forkJoin() {
|
|
|
44531
44531
|
if (isArray$a(first_1)) {
|
|
44532
44532
|
return forkJoinInternal(first_1, null);
|
|
44533
44533
|
}
|
|
44534
|
-
if (isObject$
|
|
44534
|
+
if (isObject$h(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
|
|
44535
44535
|
var keys = Object.keys(first_1);
|
|
44536
44536
|
return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
|
|
44537
44537
|
}
|
|
@@ -48852,12 +48852,12 @@ var path$1$2 = global$c$2;
|
|
|
48852
48852
|
var path$3 = path$1$2;
|
|
48853
48853
|
var global$b$2 = global$j$2;
|
|
48854
48854
|
|
|
48855
|
-
var aFunction$8$
|
|
48855
|
+
var aFunction$8$2 = function (variable) {
|
|
48856
48856
|
return typeof variable == 'function' ? variable : undefined;
|
|
48857
48857
|
};
|
|
48858
48858
|
|
|
48859
48859
|
var getBuiltIn$5$2 = function (namespace, method) {
|
|
48860
|
-
return arguments.length < 2 ? aFunction$8$
|
|
48860
|
+
return arguments.length < 2 ? aFunction$8$2(path$3[namespace]) || aFunction$8$2(global$b$2[namespace]) : path$3[namespace] && path$3[namespace][method] || global$b$2[namespace] && global$b$2[namespace][method];
|
|
48861
48861
|
};
|
|
48862
48862
|
|
|
48863
48863
|
var objectGetOwnPropertyNames$2 = {};
|
|
@@ -52052,7 +52052,7 @@ if (ArrayPrototype$3[UNSCOPABLES$2] == undefined) {
|
|
|
52052
52052
|
} // add a key to Array.prototype[@@unscopables]
|
|
52053
52053
|
|
|
52054
52054
|
|
|
52055
|
-
var addToUnscopables$2$
|
|
52055
|
+
var addToUnscopables$2$2 = function (key) {
|
|
52056
52056
|
ArrayPrototype$3[UNSCOPABLES$2][key] = true;
|
|
52057
52057
|
};
|
|
52058
52058
|
|
|
@@ -52286,7 +52286,7 @@ var defineIterator$1$2 = function (Iterable, NAME, IteratorConstructor, next, DE
|
|
|
52286
52286
|
};
|
|
52287
52287
|
|
|
52288
52288
|
var toIndexedObject$6 = toIndexedObject$4$2;
|
|
52289
|
-
var addToUnscopables$1$2 = addToUnscopables$2$
|
|
52289
|
+
var addToUnscopables$1$2 = addToUnscopables$2$2;
|
|
52290
52290
|
var Iterators$6 = iterators$2;
|
|
52291
52291
|
var InternalStateModule$7 = internalState$2;
|
|
52292
52292
|
var defineIterator$4 = defineIterator$1$2;
|
|
@@ -53498,27 +53498,27 @@ var PluginWrapper = function PluginWrapper(_a) {
|
|
|
53498
53498
|
var classof$d = classofRaw$1$2; // `IsArray` abstract operation
|
|
53499
53499
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
53500
53500
|
|
|
53501
|
-
var isArray$3$
|
|
53501
|
+
var isArray$3$2 = Array.isArray || function isArray(arg) {
|
|
53502
53502
|
return classof$d(arg) == 'Array';
|
|
53503
53503
|
};
|
|
53504
53504
|
|
|
53505
|
-
var isArray$2$
|
|
53505
|
+
var isArray$2$2 = isArray$3$2;
|
|
53506
53506
|
var toLength$3$2 = toLength$a$1;
|
|
53507
|
-
var bind$
|
|
53507
|
+
var bind$9 = functionBindContext$2; // `FlattenIntoArray` abstract operation
|
|
53508
53508
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
53509
53509
|
|
|
53510
|
-
var flattenIntoArray$1$
|
|
53510
|
+
var flattenIntoArray$1$2 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
53511
53511
|
var targetIndex = start;
|
|
53512
53512
|
var sourceIndex = 0;
|
|
53513
|
-
var mapFn = mapper ? bind$
|
|
53513
|
+
var mapFn = mapper ? bind$9(mapper, thisArg, 3) : false;
|
|
53514
53514
|
var element;
|
|
53515
53515
|
|
|
53516
53516
|
while (sourceIndex < sourceLen) {
|
|
53517
53517
|
if (sourceIndex in source) {
|
|
53518
53518
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
53519
53519
|
|
|
53520
|
-
if (depth > 0 && isArray$2$
|
|
53521
|
-
targetIndex = flattenIntoArray$1$
|
|
53520
|
+
if (depth > 0 && isArray$2$2(element)) {
|
|
53521
|
+
targetIndex = flattenIntoArray$1$2(target, original, element, toLength$3$2(element.length), targetIndex, depth - 1) - 1;
|
|
53522
53522
|
} else {
|
|
53523
53523
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
53524
53524
|
target[targetIndex] = element;
|
|
@@ -53533,21 +53533,21 @@ var flattenIntoArray$1$1 = function (target, original, source, sourceLen, start,
|
|
|
53533
53533
|
return targetIndex;
|
|
53534
53534
|
};
|
|
53535
53535
|
|
|
53536
|
-
var flattenIntoArray_1$
|
|
53537
|
-
var isObject$
|
|
53538
|
-
var isArray$1$2 = isArray$3$
|
|
53539
|
-
var wellKnownSymbol$
|
|
53540
|
-
var SPECIES$
|
|
53536
|
+
var flattenIntoArray_1$2 = flattenIntoArray$1$2;
|
|
53537
|
+
var isObject$g = isObject$9$2;
|
|
53538
|
+
var isArray$1$2 = isArray$3$2;
|
|
53539
|
+
var wellKnownSymbol$q = wellKnownSymbol$h$2;
|
|
53540
|
+
var SPECIES$7 = wellKnownSymbol$q('species'); // `ArraySpeciesCreate` abstract operation
|
|
53541
53541
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
53542
53542
|
|
|
53543
|
-
var arraySpeciesCreate$1$
|
|
53543
|
+
var arraySpeciesCreate$1$2 = function (originalArray, length) {
|
|
53544
53544
|
var C;
|
|
53545
53545
|
|
|
53546
53546
|
if (isArray$1$2(originalArray)) {
|
|
53547
53547
|
C = originalArray.constructor; // cross-realm fallback
|
|
53548
53548
|
|
|
53549
|
-
if (typeof C == 'function' && (C === Array || isArray$1$2(C.prototype))) C = undefined;else if (isObject$
|
|
53550
|
-
C = C[SPECIES$
|
|
53549
|
+
if (typeof C == 'function' && (C === Array || isArray$1$2(C.prototype))) C = undefined;else if (isObject$g(C)) {
|
|
53550
|
+
C = C[SPECIES$7];
|
|
53551
53551
|
if (C === null) C = undefined;
|
|
53552
53552
|
}
|
|
53553
53553
|
}
|
|
@@ -53556,11 +53556,11 @@ var arraySpeciesCreate$1$1 = function (originalArray, length) {
|
|
|
53556
53556
|
};
|
|
53557
53557
|
|
|
53558
53558
|
var $$5$2 = _export$2;
|
|
53559
|
-
var flattenIntoArray$
|
|
53559
|
+
var flattenIntoArray$3 = flattenIntoArray_1$2;
|
|
53560
53560
|
var toObject$2$2 = toObject$6$2;
|
|
53561
53561
|
var toLength$2$2 = toLength$a$1;
|
|
53562
53562
|
var aFunction$1$2 = aFunction$7$2;
|
|
53563
|
-
var arraySpeciesCreate$
|
|
53563
|
+
var arraySpeciesCreate$3 = arraySpeciesCreate$1$2; // `Array.prototype.flatMap` method
|
|
53564
53564
|
// https://github.com/tc39/proposal-flatMap
|
|
53565
53565
|
|
|
53566
53566
|
$$5$2({
|
|
@@ -53574,14 +53574,14 @@ $$5$2({
|
|
|
53574
53574
|
var sourceLen = toLength$2$2(O.length);
|
|
53575
53575
|
var A;
|
|
53576
53576
|
aFunction$1$2(callbackfn);
|
|
53577
|
-
A = arraySpeciesCreate$
|
|
53578
|
-
A.length = flattenIntoArray$
|
|
53577
|
+
A = arraySpeciesCreate$3(O, 0);
|
|
53578
|
+
A.length = flattenIntoArray$3(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
53579
53579
|
return A;
|
|
53580
53580
|
}
|
|
53581
53581
|
}); // this method was added to unscopables after implementation
|
|
53582
53582
|
// in popular engines, so it's moved to a separate module
|
|
53583
53583
|
|
|
53584
|
-
var addToUnscopables$4 = addToUnscopables$2$
|
|
53584
|
+
var addToUnscopables$4 = addToUnscopables$2$2;
|
|
53585
53585
|
addToUnscopables$4('flatMap'); // `SameValue` abstract operation
|
|
53586
53586
|
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
53587
53587
|
|
|
@@ -53997,7 +53997,7 @@ var anObject$1$3 = anObject$f$1;
|
|
|
53997
53997
|
var requireObjectCoercible$f = requireObjectCoercible$b$1;
|
|
53998
53998
|
var speciesConstructor$4 = speciesConstructor$2$2;
|
|
53999
53999
|
var advanceStringIndex$6 = advanceStringIndex$3$1;
|
|
54000
|
-
var toLength$
|
|
54000
|
+
var toLength$d = toLength$a$1;
|
|
54001
54001
|
var callRegExpExec$2 = regexpExecAbstract$3;
|
|
54002
54002
|
var regexpExec$6 = regexpExec$3$2;
|
|
54003
54003
|
var fails$3$3 = fails$g$2;
|
|
@@ -54092,7 +54092,7 @@ fixRegExpWellKnownSymbolLogic$6('split', 2, function (SPLIT, nativeSplit, maybeC
|
|
|
54092
54092
|
var z = callRegExpExec$2(splitter, SUPPORTS_Y$2 ? S : S.slice(q));
|
|
54093
54093
|
var e;
|
|
54094
54094
|
|
|
54095
|
-
if (z === null || (e = min$6(toLength$
|
|
54095
|
+
if (z === null || (e = min$6(toLength$d(splitter.lastIndex + (SUPPORTS_Y$2 ? 0 : q)), S.length)) === p) {
|
|
54096
54096
|
q = advanceStringIndex$6(S, q, unicodeMatching);
|
|
54097
54097
|
} else {
|
|
54098
54098
|
A.push(S.slice(p, q));
|
|
@@ -55371,15 +55371,15 @@ $$1$3({
|
|
|
55371
55371
|
return comparefn === undefined ? nativeSort$2.call(toObject$9(this)) : nativeSort$2.call(toObject$9(this), aFunction$a(comparefn));
|
|
55372
55372
|
}
|
|
55373
55373
|
});
|
|
55374
|
-
var $$
|
|
55375
|
-
var isArray$9 = isArray$3$
|
|
55374
|
+
var $$j = _export$2;
|
|
55375
|
+
var isArray$9 = isArray$3$2;
|
|
55376
55376
|
var nativeReverse$1 = [].reverse;
|
|
55377
55377
|
var test$4 = [1, 2]; // `Array.prototype.reverse` method
|
|
55378
55378
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
|
|
55379
55379
|
// fix for Safari 12.0 bug
|
|
55380
55380
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
55381
55381
|
|
|
55382
|
-
$$
|
|
55382
|
+
$$j({
|
|
55383
55383
|
target: 'Array',
|
|
55384
55384
|
proto: true,
|
|
55385
55385
|
forced: String(test$4) === String(test$4.reverse())
|
|
@@ -65752,9 +65752,9 @@ var implementation = implementation$1;
|
|
|
65752
65752
|
|
|
65753
65753
|
var functionBind = Function.prototype.bind || implementation;
|
|
65754
65754
|
|
|
65755
|
-
var bind$
|
|
65755
|
+
var bind$8 = functionBind;
|
|
65756
65756
|
|
|
65757
|
-
var src = bind$
|
|
65757
|
+
var src = bind$8.call(Function.call, Object.prototype.hasOwnProperty);
|
|
65758
65758
|
|
|
65759
65759
|
var undefined$1;
|
|
65760
65760
|
|
|
@@ -65952,12 +65952,12 @@ var LEGACY_ALIASES = {
|
|
|
65952
65952
|
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
65953
65953
|
};
|
|
65954
65954
|
|
|
65955
|
-
var bind$
|
|
65955
|
+
var bind$7 = functionBind;
|
|
65956
65956
|
var hasOwn$2 = src;
|
|
65957
|
-
var $concat = bind$
|
|
65958
|
-
var $spliceApply = bind$
|
|
65959
|
-
var $replace = bind$
|
|
65960
|
-
var $strSlice = bind$
|
|
65957
|
+
var $concat = bind$7.call(Function.call, Array.prototype.concat);
|
|
65958
|
+
var $spliceApply = bind$7.call(Function.apply, Array.prototype.splice);
|
|
65959
|
+
var $replace = bind$7.call(Function.call, String.prototype.replace);
|
|
65960
|
+
var $strSlice = bind$7.call(Function.call, String.prototype.slice);
|
|
65961
65961
|
|
|
65962
65962
|
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
65963
65963
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
@@ -77436,12 +77436,12 @@ var path$1$1 = global$c$1;
|
|
|
77436
77436
|
var path$2 = path$1$1;
|
|
77437
77437
|
var global$b$1 = global$j$1;
|
|
77438
77438
|
|
|
77439
|
-
var aFunction$8 = function (variable) {
|
|
77439
|
+
var aFunction$8$1 = function (variable) {
|
|
77440
77440
|
return typeof variable == 'function' ? variable : undefined;
|
|
77441
77441
|
};
|
|
77442
77442
|
|
|
77443
77443
|
var getBuiltIn$5$1 = function (namespace, method) {
|
|
77444
|
-
return arguments.length < 2 ? aFunction$8(path$2[namespace]) || aFunction$8(global$b$1[namespace]) : path$2[namespace] && path$2[namespace][method] || global$b$1[namespace] && global$b$1[namespace][method];
|
|
77444
|
+
return arguments.length < 2 ? aFunction$8$1(path$2[namespace]) || aFunction$8$1(global$b$1[namespace]) : path$2[namespace] && path$2[namespace][method] || global$b$1[namespace] && global$b$1[namespace][method];
|
|
77445
77445
|
};
|
|
77446
77446
|
|
|
77447
77447
|
var objectGetOwnPropertyNames$1 = {};
|
|
@@ -77652,12 +77652,12 @@ var aFunction$7$1 = function (it) {
|
|
|
77652
77652
|
var requireObjectCoercible$7$1 = requireObjectCoercible$9$1; // `ToObject` abstract operation
|
|
77653
77653
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
77654
77654
|
|
|
77655
|
-
var toObject$7 = function (argument) {
|
|
77655
|
+
var toObject$7$1 = function (argument) {
|
|
77656
77656
|
return Object(requireObjectCoercible$7$1(argument));
|
|
77657
77657
|
};
|
|
77658
77658
|
|
|
77659
77659
|
var aFunction$6$1 = aFunction$7$1;
|
|
77660
|
-
var toObject$6$1 = toObject$7;
|
|
77660
|
+
var toObject$6$1 = toObject$7$1;
|
|
77661
77661
|
var IndexedObject$1$1 = indexedObject$1;
|
|
77662
77662
|
var toLength$6$1 = toLength$8$1; // `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
77663
77663
|
|
|
@@ -77775,7 +77775,7 @@ var fails$a$1 = fails$h$1;
|
|
|
77775
77775
|
var objectKeys$1$1 = objectKeys$2$1;
|
|
77776
77776
|
var getOwnPropertySymbolsModule$2 = objectGetOwnPropertySymbols$1;
|
|
77777
77777
|
var propertyIsEnumerableModule$2 = objectPropertyIsEnumerable$1;
|
|
77778
|
-
var toObject$5$1 = toObject$7;
|
|
77778
|
+
var toObject$5$1 = toObject$7$1;
|
|
77779
77779
|
var IndexedObject$3 = indexedObject$1;
|
|
77780
77780
|
var nativeAssign$1 = Object.assign;
|
|
77781
77781
|
var defineProperty$2$1 = Object.defineProperty; // `Object.assign` method
|
|
@@ -78050,7 +78050,7 @@ if (ArrayPrototype$1$1[UNSCOPABLES$1] == undefined) {
|
|
|
78050
78050
|
} // add a key to Array.prototype[@@unscopables]
|
|
78051
78051
|
|
|
78052
78052
|
|
|
78053
|
-
var addToUnscopables$2 = function (key) {
|
|
78053
|
+
var addToUnscopables$2$1 = function (key) {
|
|
78054
78054
|
ArrayPrototype$1$1[UNSCOPABLES$1][key] = true;
|
|
78055
78055
|
};
|
|
78056
78056
|
|
|
@@ -78065,7 +78065,7 @@ var correctPrototypeGetter$1 = !fails$8$1(function () {
|
|
|
78065
78065
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
78066
78066
|
});
|
|
78067
78067
|
var has$4$1 = has$c$1;
|
|
78068
|
-
var toObject$4$1 = toObject$7;
|
|
78068
|
+
var toObject$4$1 = toObject$7$1;
|
|
78069
78069
|
var sharedKey$4 = sharedKey$3$1;
|
|
78070
78070
|
var CORRECT_PROTOTYPE_GETTER$1 = correctPrototypeGetter$1;
|
|
78071
78071
|
var IE_PROTO$2 = sharedKey$4('IE_PROTO');
|
|
@@ -78299,7 +78299,7 @@ var defineIterator$1$1 = function (Iterable, NAME, IteratorConstructor, next, DE
|
|
|
78299
78299
|
};
|
|
78300
78300
|
|
|
78301
78301
|
var toIndexedObject$5 = toIndexedObject$4$1;
|
|
78302
|
-
var addToUnscopables$1$1 = addToUnscopables$2;
|
|
78302
|
+
var addToUnscopables$1$1 = addToUnscopables$2$1;
|
|
78303
78303
|
var Iterators$2$1 = iterators$1;
|
|
78304
78304
|
var InternalStateModule$1$1 = internalState$1;
|
|
78305
78305
|
var defineIterator$3 = defineIterator$1$1;
|
|
@@ -78838,7 +78838,7 @@ var PeoplePicker = function PeoplePicker(props) {
|
|
|
78838
78838
|
}
|
|
78839
78839
|
|
|
78840
78840
|
function prepareEmptyInputFocusItems(accounts) {
|
|
78841
|
-
if (isArray$3(accounts)) {
|
|
78841
|
+
if (isArray$3$1(accounts)) {
|
|
78842
78842
|
return excludeSelectedItems(accounts).map(toPersona);
|
|
78843
78843
|
}
|
|
78844
78844
|
|
|
@@ -78947,7 +78947,7 @@ function isSameAccount(a, b) {
|
|
|
78947
78947
|
return a.userPrincipalName === b.userPrincipalName;
|
|
78948
78948
|
}
|
|
78949
78949
|
|
|
78950
|
-
function isArray$3(accounts) {
|
|
78950
|
+
function isArray$3$1(accounts) {
|
|
78951
78951
|
return typeof accounts.length !== 'undefined';
|
|
78952
78952
|
}
|
|
78953
78953
|
|
|
@@ -79511,7 +79511,7 @@ var advanceStringIndex$2$1 = function (S, index, unicode) {
|
|
|
79511
79511
|
|
|
79512
79512
|
var fixRegExpWellKnownSymbolLogic$1$1 = fixRegexpWellKnownSymbolLogic$2;
|
|
79513
79513
|
var anObject$5$1 = anObject$e$1;
|
|
79514
|
-
var toObject$3$1 = toObject$7;
|
|
79514
|
+
var toObject$3$1 = toObject$7$1;
|
|
79515
79515
|
var toLength$4$1 = toLength$8$1;
|
|
79516
79516
|
var toInteger$6 = toInteger$4$1;
|
|
79517
79517
|
var requireObjectCoercible$2$2 = requireObjectCoercible$9$1;
|
|
@@ -81130,7 +81130,7 @@ var hasFlag = function hasFlag(baseValue, flag) {
|
|
|
81130
81130
|
|
|
81131
81131
|
var $$2$1 = _export$1;
|
|
81132
81132
|
var aFunction$1$1 = aFunction$7$1;
|
|
81133
|
-
var toObject$2$1 = toObject$7;
|
|
81133
|
+
var toObject$2$1 = toObject$7$1;
|
|
81134
81134
|
var fails$2$2 = fails$h$1;
|
|
81135
81135
|
var arrayMethodIsStrict$3 = arrayMethodIsStrict$2$1;
|
|
81136
81136
|
var test$3 = [];
|
|
@@ -84623,19 +84623,19 @@ var templateObject_1$9$2, templateObject_2$7$2, templateObject_3$6$2, templateOb
|
|
|
84623
84623
|
var classof$c = classofRaw$1$1; // `IsArray` abstract operation
|
|
84624
84624
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
84625
84625
|
|
|
84626
|
-
var isArray$2 = Array.isArray || function isArray(arg) {
|
|
84626
|
+
var isArray$2$1 = Array.isArray || function isArray(arg) {
|
|
84627
84627
|
return classof$c(arg) == 'Array';
|
|
84628
84628
|
};
|
|
84629
84629
|
|
|
84630
|
-
var isArray$1$1 = isArray$2;
|
|
84630
|
+
var isArray$1$1 = isArray$2$1;
|
|
84631
84631
|
var toLength$1$1 = toLength$8$1;
|
|
84632
|
-
var bind$
|
|
84632
|
+
var bind$6 = functionBindContext$1; // `FlattenIntoArray` abstract operation
|
|
84633
84633
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
84634
84634
|
|
|
84635
|
-
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
84635
|
+
var flattenIntoArray$1$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
84636
84636
|
var targetIndex = start;
|
|
84637
84637
|
var sourceIndex = 0;
|
|
84638
|
-
var mapFn = mapper ? bind$
|
|
84638
|
+
var mapFn = mapper ? bind$6(mapper, thisArg, 3) : false;
|
|
84639
84639
|
var element;
|
|
84640
84640
|
|
|
84641
84641
|
while (sourceIndex < sourceLen) {
|
|
@@ -84643,7 +84643,7 @@ var flattenIntoArray$1 = function (target, original, source, sourceLen, start, d
|
|
|
84643
84643
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
84644
84644
|
|
|
84645
84645
|
if (depth > 0 && isArray$1$1(element)) {
|
|
84646
|
-
targetIndex = flattenIntoArray$1(target, original, element, toLength$1$1(element.length), targetIndex, depth - 1) - 1;
|
|
84646
|
+
targetIndex = flattenIntoArray$1$1(target, original, element, toLength$1$1(element.length), targetIndex, depth - 1) - 1;
|
|
84647
84647
|
} else {
|
|
84648
84648
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
84649
84649
|
target[targetIndex] = element;
|
|
@@ -84658,21 +84658,21 @@ var flattenIntoArray$1 = function (target, original, source, sourceLen, start, d
|
|
|
84658
84658
|
return targetIndex;
|
|
84659
84659
|
};
|
|
84660
84660
|
|
|
84661
|
-
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
84662
|
-
var isObject$
|
|
84663
|
-
var isArray$4 = isArray$2;
|
|
84664
|
-
var wellKnownSymbol$
|
|
84665
|
-
var SPECIES$
|
|
84661
|
+
var flattenIntoArray_1$1 = flattenIntoArray$1$1;
|
|
84662
|
+
var isObject$f = isObject$a$1;
|
|
84663
|
+
var isArray$4 = isArray$2$1;
|
|
84664
|
+
var wellKnownSymbol$p = wellKnownSymbol$i$1;
|
|
84665
|
+
var SPECIES$6 = wellKnownSymbol$p('species'); // `ArraySpeciesCreate` abstract operation
|
|
84666
84666
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
84667
84667
|
|
|
84668
|
-
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
84668
|
+
var arraySpeciesCreate$1$1 = function (originalArray, length) {
|
|
84669
84669
|
var C;
|
|
84670
84670
|
|
|
84671
84671
|
if (isArray$4(originalArray)) {
|
|
84672
84672
|
C = originalArray.constructor; // cross-realm fallback
|
|
84673
84673
|
|
|
84674
|
-
if (typeof C == 'function' && (C === Array || isArray$4(C.prototype))) C = undefined;else if (isObject$
|
|
84675
|
-
C = C[SPECIES$
|
|
84674
|
+
if (typeof C == 'function' && (C === Array || isArray$4(C.prototype))) C = undefined;else if (isObject$f(C)) {
|
|
84675
|
+
C = C[SPECIES$6];
|
|
84676
84676
|
if (C === null) C = undefined;
|
|
84677
84677
|
}
|
|
84678
84678
|
}
|
|
@@ -84680,15 +84680,15 @@ var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
|
84680
84680
|
return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
84681
84681
|
};
|
|
84682
84682
|
|
|
84683
|
-
var $$
|
|
84684
|
-
var flattenIntoArray = flattenIntoArray_1;
|
|
84685
|
-
var toObject$1$1 = toObject$7;
|
|
84686
|
-
var toLength$
|
|
84683
|
+
var $$i = _export$1;
|
|
84684
|
+
var flattenIntoArray$2 = flattenIntoArray_1$1;
|
|
84685
|
+
var toObject$1$1 = toObject$7$1;
|
|
84686
|
+
var toLength$c = toLength$8$1;
|
|
84687
84687
|
var aFunction$9 = aFunction$7$1;
|
|
84688
|
-
var arraySpeciesCreate = arraySpeciesCreate$1; // `Array.prototype.flatMap` method
|
|
84688
|
+
var arraySpeciesCreate$2 = arraySpeciesCreate$1$1; // `Array.prototype.flatMap` method
|
|
84689
84689
|
// https://github.com/tc39/proposal-flatMap
|
|
84690
84690
|
|
|
84691
|
-
$$
|
|
84691
|
+
$$i({
|
|
84692
84692
|
target: 'Array',
|
|
84693
84693
|
proto: true
|
|
84694
84694
|
}, {
|
|
@@ -84696,17 +84696,17 @@ $$h({
|
|
|
84696
84696
|
/* , thisArg */
|
|
84697
84697
|
) {
|
|
84698
84698
|
var O = toObject$1$1(this);
|
|
84699
|
-
var sourceLen = toLength$
|
|
84699
|
+
var sourceLen = toLength$c(O.length);
|
|
84700
84700
|
var A;
|
|
84701
84701
|
aFunction$9(callbackfn);
|
|
84702
|
-
A = arraySpeciesCreate(O, 0);
|
|
84703
|
-
A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
84702
|
+
A = arraySpeciesCreate$2(O, 0);
|
|
84703
|
+
A.length = flattenIntoArray$2(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
84704
84704
|
return A;
|
|
84705
84705
|
}
|
|
84706
84706
|
}); // this method was added to unscopables after implementation
|
|
84707
84707
|
// in popular engines, so it's moved to a separate module
|
|
84708
84708
|
|
|
84709
|
-
var addToUnscopables$3 = addToUnscopables$2;
|
|
84709
|
+
var addToUnscopables$3 = addToUnscopables$2$1;
|
|
84710
84710
|
addToUnscopables$3('flatMap');
|
|
84711
84711
|
|
|
84712
84712
|
function useItemLoaderWithPreFetch(pageSize, handler, deps) {
|
|
@@ -87374,9 +87374,9 @@ var AuthenticationContextProvider = function AuthenticationContextProvider(_a) {
|
|
|
87374
87374
|
}), void 0);
|
|
87375
87375
|
};
|
|
87376
87376
|
|
|
87377
|
-
var version$1 = "0.4.0-preview.
|
|
87378
|
-
var buildId = "
|
|
87379
|
-
var commitId = "
|
|
87377
|
+
var version$1 = "0.4.0-preview.72";
|
|
87378
|
+
var buildId = "95788";
|
|
87379
|
+
var commitId = "f49f0cb706928f1318c7fd74f5c57da900ec8e8e";
|
|
87380
87380
|
var isCustomerBuild = false;
|
|
87381
87381
|
var buildInfo = {
|
|
87382
87382
|
version: version$1,
|
|
@@ -87385,17 +87385,17 @@ var buildInfo = {
|
|
|
87385
87385
|
isCustomerBuild: isCustomerBuild
|
|
87386
87386
|
};
|
|
87387
87387
|
|
|
87388
|
-
var isObject$
|
|
87388
|
+
var isObject$e = isObject$u;
|
|
87389
87389
|
var classof$b = classofRaw$9;
|
|
87390
|
-
var wellKnownSymbol$
|
|
87390
|
+
var wellKnownSymbol$o = wellKnownSymbol$E;
|
|
87391
87391
|
|
|
87392
|
-
var MATCH$4 = wellKnownSymbol$
|
|
87392
|
+
var MATCH$4 = wellKnownSymbol$o('match');
|
|
87393
87393
|
|
|
87394
87394
|
// `IsRegExp` abstract operation
|
|
87395
87395
|
// https://tc39.github.io/ecma262/#sec-isregexp
|
|
87396
87396
|
var isRegexp$1 = function (it) {
|
|
87397
87397
|
var isRegExp;
|
|
87398
|
-
return isObject$
|
|
87398
|
+
return isObject$e(it) && ((isRegExp = it[MATCH$4]) !== undefined ? !!isRegExp : classof$b(it) == 'RegExp');
|
|
87399
87399
|
};
|
|
87400
87400
|
|
|
87401
87401
|
var isRegExp$5 = isRegexp$1;
|
|
@@ -87406,9 +87406,9 @@ var notARegexp$1 = function (it) {
|
|
|
87406
87406
|
} return it;
|
|
87407
87407
|
};
|
|
87408
87408
|
|
|
87409
|
-
var wellKnownSymbol$
|
|
87409
|
+
var wellKnownSymbol$n = wellKnownSymbol$E;
|
|
87410
87410
|
|
|
87411
|
-
var MATCH$3 = wellKnownSymbol$
|
|
87411
|
+
var MATCH$3 = wellKnownSymbol$n('match');
|
|
87412
87412
|
|
|
87413
87413
|
var correctIsRegexpLogic$1 = function (METHOD_NAME) {
|
|
87414
87414
|
var regexp = /./;
|
|
@@ -87422,14 +87422,14 @@ var correctIsRegexpLogic$1 = function (METHOD_NAME) {
|
|
|
87422
87422
|
} return false;
|
|
87423
87423
|
};
|
|
87424
87424
|
|
|
87425
|
-
var $$
|
|
87425
|
+
var $$h = _export$7;
|
|
87426
87426
|
var notARegExp$2 = notARegexp$1;
|
|
87427
87427
|
var requireObjectCoercible$d = requireObjectCoercible$l;
|
|
87428
87428
|
var correctIsRegExpLogic$2 = correctIsRegexpLogic$1;
|
|
87429
87429
|
|
|
87430
87430
|
// `String.prototype.includes` method
|
|
87431
87431
|
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
|
87432
|
-
$$
|
|
87432
|
+
$$h({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
|
|
87433
87433
|
includes: function includes(searchString /* , position = 0 */) {
|
|
87434
87434
|
return !!~String(requireObjectCoercible$d(this))
|
|
87435
87435
|
.indexOf(notARegExp$2(searchString), arguments.length > 1 ? arguments[1] : undefined);
|
|
@@ -87488,11 +87488,9 @@ var client$1 = {
|
|
|
87488
87488
|
canva: {
|
|
87489
87489
|
apiKey: "6vvsr2srHeve85SXxMX1k1LD"
|
|
87490
87490
|
},
|
|
87491
|
-
|
|
87491
|
+
zendeskMessaging: {
|
|
87492
87492
|
enable: true,
|
|
87493
|
-
|
|
87494
|
-
productId: "Condense",
|
|
87495
|
-
unauthenticatedProductId: "Condense Login"
|
|
87493
|
+
apiKey: "816bfec7-3beb-457a-a4a1-f462c9cb403f"
|
|
87496
87494
|
},
|
|
87497
87495
|
webAppUrl: "http://localhost:3000",
|
|
87498
87496
|
hyperfish: {
|
|
@@ -88481,7 +88479,7 @@ function assign$2(obj /*from1, from2, from3, ...*/) {
|
|
|
88481
88479
|
|
|
88482
88480
|
function _class(obj) { return Object.prototype.toString.call(obj); }
|
|
88483
88481
|
function isString(obj) { return _class(obj) === '[object String]'; }
|
|
88484
|
-
function isObject$
|
|
88482
|
+
function isObject$d(obj) { return _class(obj) === '[object Object]'; }
|
|
88485
88483
|
function isRegExp$4(obj) { return _class(obj) === '[object RegExp]'; }
|
|
88486
88484
|
function isFunction(obj) { return _class(obj) === '[object Function]'; }
|
|
88487
88485
|
|
|
@@ -88652,7 +88650,7 @@ function compile(self) {
|
|
|
88652
88650
|
|
|
88653
88651
|
self.__compiled__[name] = compiled;
|
|
88654
88652
|
|
|
88655
|
-
if (isObject$
|
|
88653
|
+
if (isObject$d(val)) {
|
|
88656
88654
|
if (isRegExp$4(val.validate)) {
|
|
88657
88655
|
compiled.validate = createValidator(val.validate);
|
|
88658
88656
|
} else if (isFunction(val.validate)) {
|
|
@@ -125697,28 +125695,28 @@ var indexedObject=fails$g(function(){// throws an error in rhino, see https://gi
|
|
|
125697
125695
|
return !Object('z').propertyIsEnumerable(0);})?function(it){return classof$9(it)=='String'?split.call(it,''):Object(it);}:Object;// `RequireObjectCoercible` abstract operation
|
|
125698
125696
|
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
|
125699
125697
|
var requireObjectCoercible$b=function(it){if(it==undefined)throw TypeError("Can't call method on "+it);return it;};// toObject with fallback for non-array-like ES3 strings
|
|
125700
|
-
var IndexedObject$2=indexedObject;var requireObjectCoercible$a=requireObjectCoercible$b;var toIndexedObject$4=function(it){return IndexedObject$2(requireObjectCoercible$a(it));};var isObject$
|
|
125698
|
+
var IndexedObject$2=indexedObject;var requireObjectCoercible$a=requireObjectCoercible$b;var toIndexedObject$4=function(it){return IndexedObject$2(requireObjectCoercible$a(it));};var isObject$c=function(it){return typeof it==='object'?it!==null:typeof it==='function';};var isObject$b=isObject$c;// `ToPrimitive` abstract operation
|
|
125701
125699
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
125702
125700
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
125703
125701
|
// and the second argument - flag - preferred type is a string
|
|
125704
|
-
var toPrimitive$3=function(input,PREFERRED_STRING){if(!isObject$
|
|
125705
|
-
var EXISTS=isObject$
|
|
125702
|
+
var toPrimitive$3=function(input,PREFERRED_STRING){if(!isObject$b(input))return input;var fn,val;if(PREFERRED_STRING&&typeof(fn=input.toString)=='function'&&!isObject$b(val=fn.call(input)))return val;if(typeof(fn=input.valueOf)=='function'&&!isObject$b(val=fn.call(input)))return val;if(!PREFERRED_STRING&&typeof(fn=input.toString)=='function'&&!isObject$b(val=fn.call(input)))return val;throw TypeError("Can't convert object to primitive value");};var hasOwnProperty={}.hasOwnProperty;var has$c=function(it,key){return hasOwnProperty.call(it,key);};var global$l=global$m;var isObject$a=isObject$c;var document$2=global$l.document;// typeof document.createElement is 'object' in old IE
|
|
125703
|
+
var EXISTS=isObject$a(document$2)&&isObject$a(document$2.createElement);var documentCreateElement$1=function(it){return EXISTS?document$2.createElement(it):{};};var DESCRIPTORS$a=descriptors;var fails$f=fails$i;var createElement$1=documentCreateElement$1;// Thank's IE8 for his funny defineProperty
|
|
125706
125704
|
var ie8DomDefine=!DESCRIPTORS$a&&!fails$f(function(){return Object.defineProperty(createElement$1('div'),'a',{get:function(){return 7;}}).a!=7;});var DESCRIPTORS$9=descriptors;var propertyIsEnumerableModule$1=objectPropertyIsEnumerable;var createPropertyDescriptor$4=createPropertyDescriptor$5;var toIndexedObject$3=toIndexedObject$4;var toPrimitive$2=toPrimitive$3;var has$b=has$c;var IE8_DOM_DEFINE$1=ie8DomDefine;var nativeGetOwnPropertyDescriptor=Object.getOwnPropertyDescriptor;// `Object.getOwnPropertyDescriptor` method
|
|
125707
125705
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
|
125708
|
-
objectGetOwnPropertyDescriptor.f=DESCRIPTORS$9?nativeGetOwnPropertyDescriptor:function getOwnPropertyDescriptor(O,P){O=toIndexedObject$3(O);P=toPrimitive$2(P,true);if(IE8_DOM_DEFINE$1)try{return nativeGetOwnPropertyDescriptor(O,P);}catch(error){/* empty */}if(has$b(O,P))return createPropertyDescriptor$4(!propertyIsEnumerableModule$1.f.call(O,P),O[P]);};var objectDefineProperty={};var isObject$
|
|
125706
|
+
objectGetOwnPropertyDescriptor.f=DESCRIPTORS$9?nativeGetOwnPropertyDescriptor:function getOwnPropertyDescriptor(O,P){O=toIndexedObject$3(O);P=toPrimitive$2(P,true);if(IE8_DOM_DEFINE$1)try{return nativeGetOwnPropertyDescriptor(O,P);}catch(error){/* empty */}if(has$b(O,P))return createPropertyDescriptor$4(!propertyIsEnumerableModule$1.f.call(O,P),O[P]);};var objectDefineProperty={};var isObject$9=isObject$c;var anObject$h=function(it){if(!isObject$9(it)){throw TypeError(String(it)+' is not an object');}return it;};var DESCRIPTORS$8=descriptors;var IE8_DOM_DEFINE=ie8DomDefine;var anObject$g=anObject$h;var toPrimitive$1=toPrimitive$3;var nativeDefineProperty=Object.defineProperty;// `Object.defineProperty` method
|
|
125709
125707
|
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
|
125710
125708
|
objectDefineProperty.f=DESCRIPTORS$8?nativeDefineProperty:function defineProperty(O,P,Attributes){anObject$g(O);P=toPrimitive$1(P,true);anObject$g(Attributes);if(IE8_DOM_DEFINE)try{return nativeDefineProperty(O,P,Attributes);}catch(error){/* empty */}if('get'in Attributes||'set'in Attributes)throw TypeError('Accessors not supported');if('value'in Attributes)O[P]=Attributes.value;return O;};var DESCRIPTORS$7=descriptors;var definePropertyModule$5=objectDefineProperty;var createPropertyDescriptor$3=createPropertyDescriptor$5;var createNonEnumerableProperty$8=DESCRIPTORS$7?function(object,key,value){return definePropertyModule$5.f(object,key,createPropertyDescriptor$3(1,value));}:function(object,key,value){object[key]=value;return object;};var redefine$9={exports:{}};var global$k=global$m;var createNonEnumerableProperty$7=createNonEnumerableProperty$8;var setGlobal$3=function(key,value){try{createNonEnumerableProperty$7(global$k,key,value);}catch(error){global$k[key]=value;}return value;};var global$j=global$m;var setGlobal$2=setGlobal$3;var SHARED='__core-js_shared__';var store$3=global$j[SHARED]||setGlobal$2(SHARED,{});var sharedStore=store$3;var store$2=sharedStore;var functionToString=Function.toString;// this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
|
125711
|
-
if(typeof store$2.inspectSource!='function'){store$2.inspectSource=function(it){return functionToString.call(it);};}var inspectSource$3=store$2.inspectSource;var global$i=global$m;var inspectSource$2=inspectSource$3;var WeakMap$1=global$i.WeakMap;var nativeWeakMap=typeof WeakMap$1==='function'&&/native code/.test(inspectSource$2(WeakMap$1));var shared$2={exports:{}};var isPure=false;var store$1=sharedStore;(shared$2.exports=function(key,value){return store$1[key]||(store$1[key]=value!==undefined?value:{});})('versions',[]).push({version:'3.6.5',mode:'global',copyright:'© 2020 Denis Pushkarev (zloirock.ru)'});var id=0;var postfix=Math.random();var uid$2=function(key){return 'Symbol('+String(key===undefined?'':key)+')_'+(++id+postfix).toString(36);};var shared$1=shared$2.exports;var uid$1=uid$2;var keys$1=shared$1('keys');var sharedKey$3=function(key){return keys$1[key]||(keys$1[key]=uid$1(key));};var hiddenKeys$4={};var NATIVE_WEAK_MAP=nativeWeakMap;var global$h=global$m;var isObject$
|
|
125712
|
-
})(Function.prototype,'toString',function toString(){return typeof this=='function'&&getInternalState$3(this).source||inspectSource$1(this);});var global$f=global$m;var path$1=global$f;var path=path$1;var global$e=global$m;var aFunction$
|
|
125709
|
+
if(typeof store$2.inspectSource!='function'){store$2.inspectSource=function(it){return functionToString.call(it);};}var inspectSource$3=store$2.inspectSource;var global$i=global$m;var inspectSource$2=inspectSource$3;var WeakMap$1=global$i.WeakMap;var nativeWeakMap=typeof WeakMap$1==='function'&&/native code/.test(inspectSource$2(WeakMap$1));var shared$2={exports:{}};var isPure=false;var store$1=sharedStore;(shared$2.exports=function(key,value){return store$1[key]||(store$1[key]=value!==undefined?value:{});})('versions',[]).push({version:'3.6.5',mode:'global',copyright:'© 2020 Denis Pushkarev (zloirock.ru)'});var id=0;var postfix=Math.random();var uid$2=function(key){return 'Symbol('+String(key===undefined?'':key)+')_'+(++id+postfix).toString(36);};var shared$1=shared$2.exports;var uid$1=uid$2;var keys$1=shared$1('keys');var sharedKey$3=function(key){return keys$1[key]||(keys$1[key]=uid$1(key));};var hiddenKeys$4={};var NATIVE_WEAK_MAP=nativeWeakMap;var global$h=global$m;var isObject$8=isObject$c;var createNonEnumerableProperty$6=createNonEnumerableProperty$8;var objectHas=has$c;var sharedKey$2=sharedKey$3;var hiddenKeys$3=hiddenKeys$4;var WeakMap$2=global$h.WeakMap;var set$1,get,has$a;var enforce=function(it){return has$a(it)?get(it):set$1(it,{});};var getterFor=function(TYPE){return function(it){var state;if(!isObject$8(it)||(state=get(it)).type!==TYPE){throw TypeError('Incompatible receiver, '+TYPE+' required');}return state;};};if(NATIVE_WEAK_MAP){var store=new WeakMap$2();var wmget=store.get;var wmhas=store.has;var wmset=store.set;set$1=function(it,metadata){wmset.call(store,it,metadata);return metadata;};get=function(it){return wmget.call(store,it)||{};};has$a=function(it){return wmhas.call(store,it);};}else {var STATE=sharedKey$2('state');hiddenKeys$3[STATE]=true;set$1=function(it,metadata){createNonEnumerableProperty$6(it,STATE,metadata);return metadata;};get=function(it){return objectHas(it,STATE)?it[STATE]:{};};has$a=function(it){return objectHas(it,STATE);};}var internalState={set:set$1,get:get,has:has$a,enforce:enforce,getterFor:getterFor};var global$g=global$m;var createNonEnumerableProperty$5=createNonEnumerableProperty$8;var has$9=has$c;var setGlobal$1=setGlobal$3;var inspectSource$1=inspectSource$3;var InternalStateModule$5=internalState;var getInternalState$3=InternalStateModule$5.get;var enforceInternalState=InternalStateModule$5.enforce;var TEMPLATE=String(String).split('String');(redefine$9.exports=function(O,key,value,options){var unsafe=options?!!options.unsafe:false;var simple=options?!!options.enumerable:false;var noTargetGet=options?!!options.noTargetGet:false;if(typeof value=='function'){if(typeof key=='string'&&!has$9(value,'name'))createNonEnumerableProperty$5(value,'name',key);enforceInternalState(value).source=TEMPLATE.join(typeof key=='string'?key:'');}if(O===global$g){if(simple)O[key]=value;else setGlobal$1(key,value);return;}else if(!unsafe){delete O[key];}else if(!noTargetGet&&O[key]){simple=true;}if(simple)O[key]=value;else createNonEnumerableProperty$5(O,key,value);// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
125710
|
+
})(Function.prototype,'toString',function toString(){return typeof this=='function'&&getInternalState$3(this).source||inspectSource$1(this);});var global$f=global$m;var path$1=global$f;var path=path$1;var global$e=global$m;var aFunction$8=function(variable){return typeof variable=='function'?variable:undefined;};var getBuiltIn$6=function(namespace,method){return arguments.length<2?aFunction$8(path[namespace])||aFunction$8(global$e[namespace]):path[namespace]&&path[namespace][method]||global$e[namespace]&&global$e[namespace][method];};var objectGetOwnPropertyNames={};var ceil=Math.ceil;var floor$3=Math.floor;// `ToInteger` abstract operation
|
|
125713
125711
|
// https://tc39.github.io/ecma262/#sec-tointeger
|
|
125714
125712
|
var toInteger$4=function(argument){return isNaN(argument=+argument)?0:(argument>0?floor$3:ceil)(argument);};var toInteger$3=toInteger$4;var min$5=Math.min;// `ToLength` abstract operation
|
|
125715
125713
|
// https://tc39.github.io/ecma262/#sec-tolength
|
|
125716
|
-
var toLength$
|
|
125714
|
+
var toLength$a=function(argument){return argument>0?min$5(toInteger$3(argument),0x1FFFFFFFFFFFFF):0;// 2 ** 53 - 1 == 9007199254740991
|
|
125717
125715
|
};var toInteger$2=toInteger$4;var max$2=Math.max;var min$4=Math.min;// Helper for a popular repeating case of the spec:
|
|
125718
125716
|
// Let integer be ? ToInteger(index).
|
|
125719
125717
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
125720
|
-
var toAbsoluteIndex$1=function(index,length){var integer=toInteger$2(index);return integer<0?max$2(integer+length,0):min$4(integer,length);};var toIndexedObject$2=toIndexedObject$4;var toLength$
|
|
125721
|
-
var createMethod$3=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIndexedObject$2($this);var length=toLength$
|
|
125718
|
+
var toAbsoluteIndex$1=function(index,length){var integer=toInteger$2(index);return integer<0?max$2(integer+length,0):min$4(integer,length);};var toIndexedObject$2=toIndexedObject$4;var toLength$9=toLength$a;var toAbsoluteIndex=toAbsoluteIndex$1;// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
125719
|
+
var createMethod$3=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIndexedObject$2($this);var length=toLength$9(O.length);var index=toAbsoluteIndex(fromIndex,length);var value;// Array#includes uses SameValueZero equality algorithm
|
|
125722
125720
|
// eslint-disable-next-line no-self-compare
|
|
125723
125721
|
if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];// eslint-disable-next-line no-self-compare
|
|
125724
125722
|
if(value!=value)return true;// Array#indexOf ignores holes, Array#includes - not
|
|
@@ -125751,11 +125749,11 @@ redefine$8(target,key,sourceProperty,options);}};var fails$d=fails$i;var nativeS
|
|
|
125751
125749
|
// eslint-disable-next-line no-undef
|
|
125752
125750
|
return !String(Symbol());});var NATIVE_SYMBOL$1=nativeSymbol;var useSymbolAsUid=NATIVE_SYMBOL$1// eslint-disable-next-line no-undef
|
|
125753
125751
|
&&!Symbol.sham// eslint-disable-next-line no-undef
|
|
125754
|
-
&&typeof Symbol.iterator=='symbol';var global$c=global$m;var shared=shared$2.exports;var has$6=has$c;var uid=uid$2;var NATIVE_SYMBOL=nativeSymbol;var USE_SYMBOL_AS_UID=useSymbolAsUid;var WellKnownSymbolsStore=shared('wks');var Symbol$1=global$c.Symbol;var createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid;var wellKnownSymbol$
|
|
125752
|
+
&&typeof Symbol.iterator=='symbol';var global$c=global$m;var shared=shared$2.exports;var has$6=has$c;var uid=uid$2;var NATIVE_SYMBOL=nativeSymbol;var USE_SYMBOL_AS_UID=useSymbolAsUid;var WellKnownSymbolsStore=shared('wks');var Symbol$1=global$c.Symbol;var createWellKnownSymbol=USE_SYMBOL_AS_UID?Symbol$1:Symbol$1&&Symbol$1.withoutSetter||uid;var wellKnownSymbol$l=function(name){if(!has$6(WellKnownSymbolsStore,name)){if(NATIVE_SYMBOL&&has$6(Symbol$1,name))WellKnownSymbolsStore[name]=Symbol$1[name];else WellKnownSymbolsStore[name]=createWellKnownSymbol('Symbol.'+name);}return WellKnownSymbolsStore[name];};var isObject$7=isObject$c;var classof$8=classofRaw$1;var wellKnownSymbol$k=wellKnownSymbol$l;var MATCH$2=wellKnownSymbol$k('match');// `IsRegExp` abstract operation
|
|
125755
125753
|
// https://tc39.github.io/ecma262/#sec-isregexp
|
|
125756
|
-
var isRegexp=function(it){var isRegExp;return isObject$
|
|
125754
|
+
var isRegexp=function(it){var isRegExp;return isObject$7(it)&&((isRegExp=it[MATCH$2])!==undefined?!!isRegExp:classof$8(it)=='RegExp');};var isRegExp$3=isRegexp;var notARegexp=function(it){if(isRegExp$3(it)){throw TypeError("The method doesn't accept regular expressions");}return it;};var wellKnownSymbol$j=wellKnownSymbol$l;var MATCH$1=wellKnownSymbol$j('match');var correctIsRegexpLogic=function(METHOD_NAME){var regexp=/./;try{'/./'[METHOD_NAME](regexp);}catch(e){try{regexp[MATCH$1]=false;return '/./'[METHOD_NAME](regexp);}catch(f){/* empty */}}return false;};var $$f=_export;var notARegExp$1=notARegexp;var requireObjectCoercible$9=requireObjectCoercible$b;var correctIsRegExpLogic$1=correctIsRegexpLogic;// `String.prototype.includes` method
|
|
125757
125755
|
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
|
125758
|
-
$$
|
|
125756
|
+
$$f({target:'String',proto:true,forced:!correctIsRegExpLogic$1('includes')},{includes:function includes(searchString/* , position = 0 */){return !!~String(requireObjectCoercible$9(this)).indexOf(notARegExp$1(searchString),arguments.length>1?arguments[1]:undefined);}});var anObject$e=anObject$h;// `RegExp.prototype.flags` getter implementation
|
|
125759
125757
|
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
|
125760
125758
|
var regexpFlags$1$1=function(){var that=anObject$e(this);var result='';if(that.global)result+='g';if(that.ignoreCase)result+='i';if(that.multiline)result+='m';if(that.dotAll)result+='s';if(that.unicode)result+='u';if(that.sticky)result+='y';return result;};var regexpStickyHelpers$1={};var fails$c=fails$i;// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,
|
|
125761
125759
|
// so we use an intermediate function.
|
|
@@ -125770,32 +125768,32 @@ if(re.lastIndex>0&&(!re.multiline||re.multiline&&str[re.lastIndex-1]!=='\n')){so
|
|
|
125770
125768
|
// simulate the 'y' flag.
|
|
125771
125769
|
reCopy=new RegExp('^(?:'+source+')',flags);}if(NPCG_INCLUDED$1){reCopy=new RegExp('^'+source+'$(?!\\s)',flags);}if(UPDATES_LAST_INDEX_WRONG$1)lastIndex=re.lastIndex;match=nativeExec$1.call(sticky?reCopy:re,strCopy);if(sticky){if(match){match.input=match.input.slice(charsAdded);match[0]=match[0].slice(charsAdded);match.index=re.lastIndex;re.lastIndex+=match[0].length;}else re.lastIndex=0;}else if(UPDATES_LAST_INDEX_WRONG$1&&match){re.lastIndex=re.global?match.index+match[0].length:lastIndex;}if(NPCG_INCLUDED$1&&match&&match.length>1){// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
125772
125770
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
125773
|
-
nativeReplace$1.call(match[0],reCopy,function(){for(i=1;i<arguments.length-2;i++){if(arguments[i]===undefined)match[i]=undefined;}});}return match;};}var regexpExec$3=patchedExec$1;var $$
|
|
125774
|
-
var redefine$7=redefine$9.exports;var fails$b=fails$i;var wellKnownSymbol$
|
|
125771
|
+
nativeReplace$1.call(match[0],reCopy,function(){for(i=1;i<arguments.length-2;i++){if(arguments[i]===undefined)match[i]=undefined;}});}return match;};}var regexpExec$3=patchedExec$1;var $$e=_export;var exec$1=regexpExec$3;$$e({target:'RegExp',proto:true,forced:/./.exec!==exec$1},{exec:exec$1});// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
125772
|
+
var redefine$7=redefine$9.exports;var fails$b=fails$i;var wellKnownSymbol$i=wellKnownSymbol$l;var regexpExec$2$1=regexpExec$3;var createNonEnumerableProperty$3=createNonEnumerableProperty$8;var SPECIES$4=wellKnownSymbol$i('species');var REPLACE_SUPPORTS_NAMED_GROUPS$1=!fails$b(function(){// #replace needs built-in support for named groups.
|
|
125775
125773
|
// #match works fine because it just return the exec results, even if it has
|
|
125776
125774
|
// a "grops" property.
|
|
125777
125775
|
var re=/./;re.exec=function(){var result=[];result.groups={a:'7'};return result;};return ''.replace(re,'$<a>')!=='7';});// IE <= 11 replaces $0 with the whole match, as if it was $&
|
|
125778
125776
|
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
125779
|
-
var REPLACE_KEEPS_$0$1=function(){return 'a'.replace(/./,'$0')==='$0';}();var REPLACE$1=wellKnownSymbol$
|
|
125777
|
+
var REPLACE_KEEPS_$0$1=function(){return 'a'.replace(/./,'$0')==='$0';}();var REPLACE$1=wellKnownSymbol$i('replace');// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
125780
125778
|
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE$1=function(){if(/./[REPLACE$1]){return /./[REPLACE$1]('a','$0')==='';}return false;}();// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
125781
125779
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
125782
|
-
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC$1=!fails$b(function(){var re=/(?:)/;var originalExec=re.exec;re.exec=function(){return originalExec.apply(this,arguments);};var result='ab'.split(re);return result.length!==2||result[0]!=='a'||result[1]!=='b';});var fixRegexpWellKnownSymbolLogic$1=function(KEY,length,exec,sham){var SYMBOL=wellKnownSymbol$
|
|
125780
|
+
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC$1=!fails$b(function(){var re=/(?:)/;var originalExec=re.exec;re.exec=function(){return originalExec.apply(this,arguments);};var result='ab'.split(re);return result.length!==2||result[0]!=='a'||result[1]!=='b';});var fixRegexpWellKnownSymbolLogic$1=function(KEY,length,exec,sham){var SYMBOL=wellKnownSymbol$i(KEY);var DELEGATES_TO_SYMBOL=!fails$b(function(){// String methods call symbol-named RegEp methods
|
|
125783
125781
|
var O={};O[SYMBOL]=function(){return 7;};return ''[KEY](O)!=7;});var DELEGATES_TO_EXEC=DELEGATES_TO_SYMBOL&&!fails$b(function(){// Symbol-named RegExp methods call .exec
|
|
125784
125782
|
var execCalled=false;var re=/a/;if(KEY==='split'){// We can't use real regex here since it causes deoptimization
|
|
125785
125783
|
// and serious performance degradation in V8
|
|
125786
125784
|
// https://github.com/zloirock/core-js/issues/306
|
|
125787
125785
|
re={};// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
125788
125786
|
// a new one. We need to return the patched regex when creating the new one.
|
|
125789
|
-
re.constructor={};re.constructor[SPECIES$
|
|
125787
|
+
re.constructor={};re.constructor[SPECIES$4]=function(){return re;};re.flags='';re[SYMBOL]=/./[SYMBOL];}re.exec=function(){execCalled=true;return null;};re[SYMBOL]('');return !execCalled;});if(!DELEGATES_TO_SYMBOL||!DELEGATES_TO_EXEC||KEY==='replace'&&!(REPLACE_SUPPORTS_NAMED_GROUPS$1&&REPLACE_KEEPS_$0$1&&!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE$1)||KEY==='split'&&!SPLIT_WORKS_WITH_OVERWRITTEN_EXEC$1){var nativeRegExpMethod=/./[SYMBOL];var methods=exec(SYMBOL,''[KEY],function(nativeMethod,regexp,str,arg2,forceStringMethod){if(regexp.exec===regexpExec$2$1){if(DELEGATES_TO_SYMBOL&&!forceStringMethod){// The native String method already delegates to @@method (this
|
|
125790
125788
|
// polyfilled function), leasing to infinite recursion.
|
|
125791
125789
|
// We avoid it by directly calling the native @@method method.
|
|
125792
125790
|
return {done:true,value:nativeRegExpMethod.call(regexp,str,arg2)};}return {done:true,value:nativeMethod.call(str,regexp,arg2)};}return {done:false};},{REPLACE_KEEPS_$0:REPLACE_KEEPS_$0$1,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE$1});var stringMethod=methods[0];var regexMethod=methods[1];redefine$7(String.prototype,KEY,stringMethod);redefine$7(RegExp.prototype,SYMBOL,length==2// 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)
|
|
125793
125791
|
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
|
125794
125792
|
?function(string,arg){return regexMethod.call(string,this,arg);}// 21.2.5.6 RegExp.prototype[@@match](string)
|
|
125795
125793
|
// 21.2.5.9 RegExp.prototype[@@search](string)
|
|
125796
|
-
:function(string){return regexMethod.call(string,this);});}if(sham)createNonEnumerableProperty$3(RegExp.prototype[SYMBOL],'sham',true);};var aFunction$
|
|
125794
|
+
:function(string){return regexMethod.call(string,this);});}if(sham)createNonEnumerableProperty$3(RegExp.prototype[SYMBOL],'sham',true);};var aFunction$7=function(it){if(typeof it!='function'){throw TypeError(String(it)+' is not a function');}return it;};var anObject$d=anObject$h;var aFunction$6=aFunction$7;var wellKnownSymbol$h=wellKnownSymbol$l;var SPECIES$3=wellKnownSymbol$h('species');// `SpeciesConstructor` abstract operation
|
|
125797
125795
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
125798
|
-
var speciesConstructor$2=function(O,defaultConstructor){var C=anObject$d(O).constructor;var S;return C===undefined||(S=anObject$d(C)[SPECIES$
|
|
125796
|
+
var speciesConstructor$2=function(O,defaultConstructor){var C=anObject$d(O).constructor;var S;return C===undefined||(S=anObject$d(C)[SPECIES$3])==undefined?defaultConstructor:aFunction$6(S);};var toInteger$1=toInteger$4;var requireObjectCoercible$8=requireObjectCoercible$b;// `String.prototype.{ codePointAt, at }` methods implementation
|
|
125799
125797
|
var createMethod$2=function(CONVERT_TO_STRING){return function($this,pos){var S=String(requireObjectCoercible$8($this));var position=toInteger$1(pos);var size=S.length;var first,second;if(position<0||position>=size)return CONVERT_TO_STRING?'':undefined;first=S.charCodeAt(position);return first<0xD800||first>0xDBFF||position+1===size||(second=S.charCodeAt(position+1))<0xDC00||second>0xDFFF?CONVERT_TO_STRING?S.charAt(position):first:CONVERT_TO_STRING?S.slice(position,position+2):(first-0xD800<<10)+(second-0xDC00)+0x10000;};};var stringMultibyte$1={// `String.prototype.codePointAt` method
|
|
125800
125798
|
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
|
125801
125799
|
codeAt:createMethod$2(false),// `String.prototype.at` method
|
|
@@ -125804,7 +125802,7 @@ charAt:createMethod$2(true)};var charAt$1=stringMultibyte$1.charAt;// `AdvanceSt
|
|
|
125804
125802
|
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
|
125805
125803
|
var advanceStringIndex$3=function(S,index,unicode){return index+(unicode?charAt$1(S,index).length:1);};var classof$7=classofRaw$1;var regexpExec$1$1=regexpExec$3;// `RegExpExec` abstract operation
|
|
125806
125804
|
// https://tc39.github.io/ecma262/#sec-regexpexec
|
|
125807
|
-
var regexpExecAbstract$1=function(R,S){var exec=R.exec;if(typeof exec==='function'){var result=exec.call(R,S);if(typeof result!=='object'){throw TypeError('RegExp exec method returned something other than an Object or null');}return result;}if(classof$7(R)!=='RegExp'){throw TypeError('RegExp#exec called on incompatible receiver');}return regexpExec$1$1.call(R,S);};var fixRegExpWellKnownSymbolLogic$3=fixRegexpWellKnownSymbolLogic$1;var isRegExp$2=isRegexp;var anObject$c=anObject$h;var requireObjectCoercible$7=requireObjectCoercible$b;var speciesConstructor$1=speciesConstructor$2;var advanceStringIndex$2=advanceStringIndex$3;var toLength$
|
|
125805
|
+
var regexpExecAbstract$1=function(R,S){var exec=R.exec;if(typeof exec==='function'){var result=exec.call(R,S);if(typeof result!=='object'){throw TypeError('RegExp exec method returned something other than an Object or null');}return result;}if(classof$7(R)!=='RegExp'){throw TypeError('RegExp#exec called on incompatible receiver');}return regexpExec$1$1.call(R,S);};var fixRegExpWellKnownSymbolLogic$3=fixRegexpWellKnownSymbolLogic$1;var isRegExp$2=isRegexp;var anObject$c=anObject$h;var requireObjectCoercible$7=requireObjectCoercible$b;var speciesConstructor$1=speciesConstructor$2;var advanceStringIndex$2=advanceStringIndex$3;var toLength$8=toLength$a;var callRegExpExec=regexpExecAbstract$1;var regexpExec$4=regexpExec$3;var fails$a=fails$i;var arrayPush=[].push;var min$3=Math.min;var MAX_UINT32=0xFFFFFFFF;// babel-minify transpiles RegExp('x', 'y') -> /x/y and it causes SyntaxError
|
|
125808
125806
|
var SUPPORTS_Y=!fails$a(function(){return !RegExp(MAX_UINT32,'y');});// @@split logic
|
|
125809
125807
|
fixRegExpWellKnownSymbolLogic$3('split',2,function(SPLIT,nativeSplit,maybeCallNative){var internalSplit;if('abbc'.split(/(b)*/)[1]=='c'||'test'.split(/(?:)/,-1).length!=4||'ab'.split(/(?:ab)*/).length!=2||'.'.split(/(.?)(.?)/).length!=4||'.'.split(/()()/).length>1||''.split(/.?/).length){// based on es5-shim implementation, need to rework it
|
|
125810
125808
|
internalSplit=function(separator,limit){var string=String(requireObjectCoercible$7(this));var lim=limit===undefined?MAX_UINT32:limit>>>0;if(lim===0)return [];if(separator===undefined)return [string];// If `separator` is not a regex, use native split
|
|
@@ -125820,12 +125818,12 @@ function split(separator,limit){var O=requireObjectCoercible$7(this);var splitte
|
|
|
125820
125818
|
// the 'y' flag.
|
|
125821
125819
|
function(regexp,limit){var res=maybeCallNative(internalSplit,regexp,this,limit,internalSplit!==nativeSplit);if(res.done)return res.value;var rx=anObject$c(regexp);var S=String(this);var C=speciesConstructor$1(rx,RegExp);var unicodeMatching=rx.unicode;var flags=(rx.ignoreCase?'i':'')+(rx.multiline?'m':'')+(rx.unicode?'u':'')+(SUPPORTS_Y?'y':'g');// ^(? + rx + ) is needed, in combination with some S slicing, to
|
|
125822
125820
|
// simulate the 'y' flag.
|
|
125823
|
-
var splitter=new C(SUPPORTS_Y?rx:'^(?:'+rx.source+')',flags);var lim=limit===undefined?MAX_UINT32:limit>>>0;if(lim===0)return [];if(S.length===0)return callRegExpExec(splitter,S)===null?[S]:[];var p=0;var q=0;var A=[];while(q<S.length){splitter.lastIndex=SUPPORTS_Y?q:0;var z=callRegExpExec(splitter,SUPPORTS_Y?S:S.slice(q));var e;if(z===null||(e=min$3(toLength$
|
|
125821
|
+
var splitter=new C(SUPPORTS_Y?rx:'^(?:'+rx.source+')',flags);var lim=limit===undefined?MAX_UINT32:limit>>>0;if(lim===0)return [];if(S.length===0)return callRegExpExec(splitter,S)===null?[S]:[];var p=0;var q=0;var A=[];while(q<S.length){splitter.lastIndex=SUPPORTS_Y?q:0;var z=callRegExpExec(splitter,SUPPORTS_Y?S:S.slice(q));var e;if(z===null||(e=min$3(toLength$8(splitter.lastIndex+(SUPPORTS_Y?0:q)),S.length))===p){q=advanceStringIndex$2(S,q,unicodeMatching);}else {A.push(S.slice(p,q));if(A.length===lim)return A;for(var i=1;i<=z.length-1;i++){A.push(z[i]);if(A.length===lim)return A;}q=p=e;}}A.push(S.slice(p));return A;}];},!SUPPORTS_Y);var fixRegExpWellKnownSymbolLogic$2=fixRegexpWellKnownSymbolLogic$1;var anObject$b=anObject$h;var toLength$7=toLength$a;var requireObjectCoercible$6=requireObjectCoercible$b;var advanceStringIndex$1$1=advanceStringIndex$3;var regExpExec$2=regexpExecAbstract$1;// @@match logic
|
|
125824
125822
|
fixRegExpWellKnownSymbolLogic$2('match',1,function(MATCH,nativeMatch,maybeCallNative){return [// `String.prototype.match` method
|
|
125825
125823
|
// https://tc39.github.io/ecma262/#sec-string.prototype.match
|
|
125826
125824
|
function match(regexp){var O=requireObjectCoercible$6(this);var matcher=regexp==undefined?undefined:regexp[MATCH];return matcher!==undefined?matcher.call(regexp,O):new RegExp(regexp)[MATCH](String(O));},// `RegExp.prototype[@@match]` method
|
|
125827
125825
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
|
|
125828
|
-
function(regexp){var res=maybeCallNative(nativeMatch,regexp,this);if(res.done)return res.value;var rx=anObject$b(regexp);var S=String(this);if(!rx.global)return regExpExec$2(rx,S);var fullUnicode=rx.unicode;rx.lastIndex=0;var A=[];var n=0;var result;while((result=regExpExec$2(rx,S))!==null){var matchStr=String(result[0]);A[n]=matchStr;if(matchStr==='')rx.lastIndex=advanceStringIndex$1$1(S,toLength$
|
|
125826
|
+
function(regexp){var res=maybeCallNative(nativeMatch,regexp,this);if(res.done)return res.value;var rx=anObject$b(regexp);var S=String(this);if(!rx.global)return regExpExec$2(rx,S);var fullUnicode=rx.unicode;rx.lastIndex=0;var A=[];var n=0;var result;while((result=regExpExec$2(rx,S))!==null){var matchStr=String(result[0]);A[n]=matchStr;if(matchStr==='')rx.lastIndex=advanceStringIndex$1$1(S,toLength$7(rx.lastIndex),fullUnicode);n++;}return n===0?null:A;}];});/*! *****************************************************************************
|
|
125829
125827
|
Copyright (c) Microsoft Corporation.
|
|
125830
125828
|
|
|
125831
125829
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -125865,9 +125863,9 @@ end:createMethod$1$1(2),// `String.prototype.trim` method
|
|
|
125865
125863
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
125866
125864
|
trim:createMethod$1$1(3)};var fails$9=fails$i;var whitespaces$1$1=whitespaces$3;var non$1='\u200B\u0085\u180E';// check that a method works with the correct list
|
|
125867
125865
|
// of whitespaces and has a correct name
|
|
125868
|
-
var stringTrimForced$1=function(METHOD_NAME){return fails$9(function(){return !!whitespaces$1$1[METHOD_NAME]()||non$1[METHOD_NAME]()!=non$1||whitespaces$1$1[METHOD_NAME].name!==METHOD_NAME;});};var $$
|
|
125866
|
+
var stringTrimForced$1=function(METHOD_NAME){return fails$9(function(){return !!whitespaces$1$1[METHOD_NAME]()||non$1[METHOD_NAME]()!=non$1||whitespaces$1$1[METHOD_NAME].name!==METHOD_NAME;});};var $$d=_export;var $trim$1=stringTrim$1.trim;var forcedStringTrimMethod$1=stringTrimForced$1;// `String.prototype.trim` method
|
|
125869
125867
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
125870
|
-
$$
|
|
125868
|
+
$$d({target:'String',proto:true,forced:forcedStringTrimMethod$1('trim')},{trim:function trim(){return $trim$1(this);}});function canSaveInput(allowSaveWithoutContent,attachments,content){if(attachments.some(function(a){return a.isUploadInProgress||a.hasError;})){return false;}if(allowSaveWithoutContent&&attachments.some(function(a){return a.type===AttachmentType.Giphy||a.type===AttachmentType.Image;})){return true;}return content&&content.trim().length!==0;}var internalObjectKeys=objectKeysInternal;var enumBugKeys$1=enumBugKeys$3;// `Object.keys` method
|
|
125871
125869
|
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
125872
125870
|
var objectKeys$2=Object.keys||function keys(O){return internalObjectKeys(O,enumBugKeys$1);};var DESCRIPTORS$6=descriptors;var definePropertyModule$3=objectDefineProperty;var anObject$a=anObject$h;var objectKeys$1=objectKeys$2;// `Object.defineProperties` method
|
|
125873
125871
|
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
@@ -125884,26 +125882,26 @@ iframe.src=String(JS);iframeDocument=iframe.contentWindow.document;iframeDocumen
|
|
|
125884
125882
|
var activeXDocument;var NullProtoObject=function(){try{/* global ActiveXObject */activeXDocument=document.domain&&new ActiveXObject('htmlfile');}catch(error){/* ignore */}NullProtoObject=activeXDocument?NullProtoObjectViaActiveX(activeXDocument):NullProtoObjectViaIFrame();var length=enumBugKeys.length;while(length--)delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];return NullProtoObject();};hiddenKeys[IE_PROTO$1]=true;// `Object.create` method
|
|
125885
125883
|
// https://tc39.github.io/ecma262/#sec-object.create
|
|
125886
125884
|
var objectCreate=Object.create||function create(O,Properties){var result;if(O!==null){EmptyConstructor[PROTOTYPE]=anObject$9(O);result=new EmptyConstructor();EmptyConstructor[PROTOTYPE]=null;// add "__proto__" for Object.getPrototypeOf polyfill
|
|
125887
|
-
result[IE_PROTO$1]=O;}else result=NullProtoObject();return Properties===undefined?result:defineProperties$1(result,Properties);};var wellKnownSymbol$
|
|
125885
|
+
result[IE_PROTO$1]=O;}else result=NullProtoObject();return Properties===undefined?result:defineProperties$1(result,Properties);};var wellKnownSymbol$g=wellKnownSymbol$l;var create$2=objectCreate;var definePropertyModule$2=objectDefineProperty;var UNSCOPABLES=wellKnownSymbol$g('unscopables');var ArrayPrototype$1=Array.prototype;// Array.prototype[@@unscopables]
|
|
125888
125886
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
125889
125887
|
if(ArrayPrototype$1[UNSCOPABLES]==undefined){definePropertyModule$2.f(ArrayPrototype$1,UNSCOPABLES,{configurable:true,value:create$2(null)});}// add a key to Array.prototype[@@unscopables]
|
|
125890
|
-
var addToUnscopables$
|
|
125888
|
+
var addToUnscopables$2=function(key){ArrayPrototype$1[UNSCOPABLES][key]=true;};var iterators={};var requireObjectCoercible$4=requireObjectCoercible$b;// `ToObject` abstract operation
|
|
125891
125889
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
125892
|
-
var toObject$
|
|
125890
|
+
var toObject$7=function(argument){return Object(requireObjectCoercible$4(argument));};var fails$8=fails$i;var correctPrototypeGetter=!fails$8(function(){function F(){/* empty */}F.prototype.constructor=null;return Object.getPrototypeOf(new F())!==F.prototype;});var has$5=has$c;var toObject$6=toObject$7;var sharedKey=sharedKey$3;var CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter;var IE_PROTO=sharedKey('IE_PROTO');var ObjectPrototype=Object.prototype;// `Object.getPrototypeOf` method
|
|
125893
125891
|
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
|
125894
|
-
var objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?Object.getPrototypeOf:function(O){O=toObject$
|
|
125892
|
+
var objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?Object.getPrototypeOf:function(O){O=toObject$6(O);if(has$5(O,IE_PROTO))return O[IE_PROTO];if(typeof O.constructor=='function'&&O instanceof O.constructor){return O.constructor.prototype;}return O instanceof Object?ObjectPrototype:null;};var getPrototypeOf$1=objectGetPrototypeOf;var createNonEnumerableProperty$2=createNonEnumerableProperty$8;var has$4=has$c;var wellKnownSymbol$f=wellKnownSymbol$l;var ITERATOR$7=wellKnownSymbol$f('iterator');var BUGGY_SAFARI_ITERATORS$1=false;var returnThis$2=function(){return this;};// `%IteratorPrototype%` object
|
|
125895
125893
|
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
|
|
125896
125894
|
var IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;if([].keys){arrayIterator=[].keys();// Safari 8 has buggy iterators w/o `next`
|
|
125897
125895
|
if(!('next'in arrayIterator))BUGGY_SAFARI_ITERATORS$1=true;else {PrototypeOfArrayIteratorPrototype=getPrototypeOf$1(getPrototypeOf$1(arrayIterator));if(PrototypeOfArrayIteratorPrototype!==Object.prototype)IteratorPrototype$2=PrototypeOfArrayIteratorPrototype;}}if(IteratorPrototype$2==undefined)IteratorPrototype$2={};// 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
125898
|
-
if(!has$4(IteratorPrototype$2,ITERATOR$7)){createNonEnumerableProperty$2(IteratorPrototype$2,ITERATOR$7,returnThis$2);}var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1};var defineProperty$4=objectDefineProperty.f;var has$3=has$c;var wellKnownSymbol$
|
|
125896
|
+
if(!has$4(IteratorPrototype$2,ITERATOR$7)){createNonEnumerableProperty$2(IteratorPrototype$2,ITERATOR$7,returnThis$2);}var iteratorsCore={IteratorPrototype:IteratorPrototype$2,BUGGY_SAFARI_ITERATORS:BUGGY_SAFARI_ITERATORS$1};var defineProperty$4=objectDefineProperty.f;var has$3=has$c;var wellKnownSymbol$e=wellKnownSymbol$l;var TO_STRING_TAG$3=wellKnownSymbol$e('toStringTag');var setToStringTag$5=function(it,TAG,STATIC){if(it&&!has$3(it=STATIC?it:it.prototype,TO_STRING_TAG$3)){defineProperty$4(it,TO_STRING_TAG$3,{configurable:true,value:TAG});}};var IteratorPrototype$1=iteratorsCore.IteratorPrototype;var create$1=objectCreate;var createPropertyDescriptor$2=createPropertyDescriptor$5;var setToStringTag$4=setToStringTag$5;var Iterators$4=iterators;var returnThis$1=function(){return this;};var createIteratorConstructor$2=function(IteratorConstructor,NAME,next){var TO_STRING_TAG=NAME+' Iterator';IteratorConstructor.prototype=create$1(IteratorPrototype$1,{next:createPropertyDescriptor$2(1,next)});setToStringTag$4(IteratorConstructor,TO_STRING_TAG,false);Iterators$4[TO_STRING_TAG]=returnThis$1;return IteratorConstructor;};var isObject$6=isObject$c;var aPossiblePrototype$1=function(it){if(!isObject$6(it)&&it!==null){throw TypeError("Can't set "+String(it)+' as a prototype');}return it;};var anObject$8=anObject$h;var aPossiblePrototype=aPossiblePrototype$1;// `Object.setPrototypeOf` method
|
|
125899
125897
|
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
|
|
125900
125898
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
125901
|
-
/* eslint-disable no-proto */var objectSetPrototypeOf=Object.setPrototypeOf||('__proto__'in{}?function(){var CORRECT_SETTER=false;var test={};var setter;try{setter=Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').set;setter.call(test,[]);CORRECT_SETTER=test instanceof Array;}catch(error){/* empty */}return function setPrototypeOf(O,proto){anObject$8(O);aPossiblePrototype(proto);if(CORRECT_SETTER)setter.call(O,proto);else O.__proto__=proto;return O;};}():undefined);var $$
|
|
125899
|
+
/* eslint-disable no-proto */var objectSetPrototypeOf=Object.setPrototypeOf||('__proto__'in{}?function(){var CORRECT_SETTER=false;var test={};var setter;try{setter=Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').set;setter.call(test,[]);CORRECT_SETTER=test instanceof Array;}catch(error){/* empty */}return function setPrototypeOf(O,proto){anObject$8(O);aPossiblePrototype(proto);if(CORRECT_SETTER)setter.call(O,proto);else O.__proto__=proto;return O;};}():undefined);var $$c=_export;var createIteratorConstructor$1=createIteratorConstructor$2;var getPrototypeOf=objectGetPrototypeOf;var setPrototypeOf$1=objectSetPrototypeOf;var setToStringTag$3=setToStringTag$5;var createNonEnumerableProperty$1=createNonEnumerableProperty$8;var redefine$6=redefine$9.exports;var wellKnownSymbol$d=wellKnownSymbol$l;var Iterators$3=iterators;var IteratorsCore=iteratorsCore;var IteratorPrototype=IteratorsCore.IteratorPrototype;var BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS;var ITERATOR$6=wellKnownSymbol$d('iterator');var KEYS='keys';var VALUES='values';var ENTRIES='entries';var returnThis=function(){return this;};var defineIterator$2=function(Iterable,NAME,IteratorConstructor,next,DEFAULT,IS_SET,FORCED){createIteratorConstructor$1(IteratorConstructor,NAME,next);var getIterationMethod=function(KIND){if(KIND===DEFAULT&&defaultIterator)return defaultIterator;if(!BUGGY_SAFARI_ITERATORS&&KIND in IterablePrototype)return IterablePrototype[KIND];switch(KIND){case KEYS:return function keys(){return new IteratorConstructor(this,KIND);};case VALUES:return function values(){return new IteratorConstructor(this,KIND);};case ENTRIES:return function entries(){return new IteratorConstructor(this,KIND);};}return function(){return new IteratorConstructor(this);};};var TO_STRING_TAG=NAME+' Iterator';var INCORRECT_VALUES_NAME=false;var IterablePrototype=Iterable.prototype;var nativeIterator=IterablePrototype[ITERATOR$6]||IterablePrototype['@@iterator']||DEFAULT&&IterablePrototype[DEFAULT];var defaultIterator=!BUGGY_SAFARI_ITERATORS&&nativeIterator||getIterationMethod(DEFAULT);var anyNativeIterator=NAME=='Array'?IterablePrototype.entries||nativeIterator:nativeIterator;var CurrentIteratorPrototype,methods,KEY;// fix native
|
|
125902
125900
|
if(anyNativeIterator){CurrentIteratorPrototype=getPrototypeOf(anyNativeIterator.call(new Iterable()));if(IteratorPrototype!==Object.prototype&&CurrentIteratorPrototype.next){if(getPrototypeOf(CurrentIteratorPrototype)!==IteratorPrototype){if(setPrototypeOf$1){setPrototypeOf$1(CurrentIteratorPrototype,IteratorPrototype);}else if(typeof CurrentIteratorPrototype[ITERATOR$6]!='function'){createNonEnumerableProperty$1(CurrentIteratorPrototype,ITERATOR$6,returnThis);}}// Set @@toStringTag to native iterators
|
|
125903
125901
|
setToStringTag$3(CurrentIteratorPrototype,TO_STRING_TAG,true);}}// fix Array#{values, @@iterator}.name in V8 / FF
|
|
125904
125902
|
if(DEFAULT==VALUES&&nativeIterator&&nativeIterator.name!==VALUES){INCORRECT_VALUES_NAME=true;defaultIterator=function values(){return nativeIterator.call(this);};}// define iterator
|
|
125905
125903
|
if(IterablePrototype[ITERATOR$6]!==defaultIterator){createNonEnumerableProperty$1(IterablePrototype,ITERATOR$6,defaultIterator);}Iterators$3[NAME]=defaultIterator;// export additional methods
|
|
125906
|
-
if(DEFAULT){methods={values:getIterationMethod(VALUES),keys:IS_SET?defaultIterator:getIterationMethod(KEYS),entries:getIterationMethod(ENTRIES)};if(FORCED)for(KEY in methods){if(BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME||!(KEY in IterablePrototype)){redefine$6(IterablePrototype,KEY,methods[KEY]);}}else $$
|
|
125904
|
+
if(DEFAULT){methods={values:getIterationMethod(VALUES),keys:IS_SET?defaultIterator:getIterationMethod(KEYS),entries:getIterationMethod(ENTRIES)};if(FORCED)for(KEY in methods){if(BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME||!(KEY in IterablePrototype)){redefine$6(IterablePrototype,KEY,methods[KEY]);}}else $$c({target:NAME,proto:true,forced:BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME},methods);}return methods;};var toIndexedObject=toIndexedObject$4;var addToUnscopables$1=addToUnscopables$2;var Iterators$2=iterators;var InternalStateModule$4=internalState;var defineIterator$1=defineIterator$2;var ARRAY_ITERATOR='Array Iterator';var setInternalState$5=InternalStateModule$4.set;var getInternalState$2=InternalStateModule$4.getterFor(ARRAY_ITERATOR);// `Array.prototype.entries` method
|
|
125907
125905
|
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
|
|
125908
125906
|
// `Array.prototype.keys` method
|
|
125909
125907
|
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
|
|
@@ -125922,39 +125920,39 @@ kind:kind// kind
|
|
|
125922
125920
|
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
|
|
125923
125921
|
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
|
|
125924
125922
|
Iterators$2.Arguments=Iterators$2.Array;// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
125925
|
-
addToUnscopables('keys');addToUnscopables('values');addToUnscopables('entries');// iterable DOM collections
|
|
125923
|
+
addToUnscopables$1('keys');addToUnscopables$1('values');addToUnscopables$1('entries');// iterable DOM collections
|
|
125926
125924
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
125927
|
-
var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};var global$b=global$m;var DOMIterables=domIterables;var ArrayIteratorMethods=es_array_iterator;var createNonEnumerableProperty$9=createNonEnumerableProperty$8;var wellKnownSymbol$
|
|
125925
|
+
var domIterables={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0};var global$b=global$m;var DOMIterables=domIterables;var ArrayIteratorMethods=es_array_iterator;var createNonEnumerableProperty$9=createNonEnumerableProperty$8;var wellKnownSymbol$c=wellKnownSymbol$l;var ITERATOR$5=wellKnownSymbol$c('iterator');var TO_STRING_TAG$2=wellKnownSymbol$c('toStringTag');var ArrayValues=ArrayIteratorMethods.values;for(var COLLECTION_NAME in DOMIterables){var Collection=global$b[COLLECTION_NAME];var CollectionPrototype=Collection&&Collection.prototype;if(CollectionPrototype){// some Chrome versions have non-configurable methods on DOMTokenList
|
|
125928
125926
|
if(CollectionPrototype[ITERATOR$5]!==ArrayValues)try{createNonEnumerableProperty$9(CollectionPrototype,ITERATOR$5,ArrayValues);}catch(error){CollectionPrototype[ITERATOR$5]=ArrayValues;}if(!CollectionPrototype[TO_STRING_TAG$2]){createNonEnumerableProperty$9(CollectionPrototype,TO_STRING_TAG$2,COLLECTION_NAME);}if(DOMIterables[COLLECTION_NAME])for(var METHOD_NAME in ArrayIteratorMethods){// some Chrome versions have non-configurable methods on DOMTokenList
|
|
125929
125927
|
if(CollectionPrototype[METHOD_NAME]!==ArrayIteratorMethods[METHOD_NAME])try{createNonEnumerableProperty$9(CollectionPrototype,METHOD_NAME,ArrayIteratorMethods[METHOD_NAME]);}catch(error){CollectionPrototype[METHOD_NAME]=ArrayIteratorMethods[METHOD_NAME];}}}}var charAt$2=stringMultibyte$1.charAt;var InternalStateModule$3=internalState;var defineIterator=defineIterator$2;var STRING_ITERATOR='String Iterator';var setInternalState$4=InternalStateModule$3.set;var getInternalState$1=InternalStateModule$3.getterFor(STRING_ITERATOR);// `String.prototype[@@iterator]` method
|
|
125930
125928
|
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
|
125931
125929
|
defineIterator(String,'String',function(iterated){setInternalState$4(this,{type:STRING_ITERATOR,string:String(iterated),index:0});// `%StringIteratorPrototype%.next` method
|
|
125932
125930
|
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
|
125933
|
-
},function next(){var state=getInternalState$1(this);var string=state.string;var index=state.index;var point;if(index>=string.length)return {value:undefined,done:true};point=charAt$2(string,index);state.index+=point.length;return {value:point,done:false};});var fails$7=fails$i;var wellKnownSymbol$
|
|
125931
|
+
},function next(){var state=getInternalState$1(this);var string=state.string;var index=state.index;var point;if(index>=string.length)return {value:undefined,done:true};point=charAt$2(string,index);state.index+=point.length;return {value:point,done:false};});var fails$7=fails$i;var wellKnownSymbol$b=wellKnownSymbol$l;var IS_PURE=isPure;var ITERATOR$4=wellKnownSymbol$b('iterator');var nativeUrl=!fails$7(function(){var url=new URL('b?a=1&b=2&c=3','http://a');var searchParams=url.searchParams;var result='';url.pathname='c%20d';searchParams.forEach(function(value,key){searchParams['delete']('b');result+=key+value;});return IS_PURE&&!url.toJSON||!searchParams.sort||url.href!=='http://a/c%20d?a=1&c=3'||searchParams.get('c')!=='3'||String(new URLSearchParams('?a=1'))!=='a=1'||!searchParams[ITERATOR$4]// throws in Edge
|
|
125934
125932
|
||new URL('https://a@b').username!=='a'||new URLSearchParams(new URLSearchParams('a=b')).get('a')!=='b'// not punycoded in Edge
|
|
125935
125933
|
||new URL('http://тест').host!=='xn--e1aybc'// not escaped in Chrome 62-
|
|
125936
125934
|
||new URL('http://a#б').hash!=='#%D0%B1'// fails in Chrome 66-
|
|
125937
125935
|
||result!=='a1c3'// throws in Safari
|
|
125938
|
-
||new URL('http://x',undefined).host!=='x';});var anInstance$3=function(it,Constructor,name){if(!(it instanceof Constructor)){throw TypeError('Incorrect '+(name?name+' ':'')+'invocation');}return it;};var DESCRIPTORS$5=descriptors;var fails$6=fails$i;var objectKeys=objectKeys$2;var getOwnPropertySymbolsModule=objectGetOwnPropertySymbols;var propertyIsEnumerableModule=objectPropertyIsEnumerable;var toObject$
|
|
125936
|
+
||new URL('http://x',undefined).host!=='x';});var anInstance$3=function(it,Constructor,name){if(!(it instanceof Constructor)){throw TypeError('Incorrect '+(name?name+' ':'')+'invocation');}return it;};var DESCRIPTORS$5=descriptors;var fails$6=fails$i;var objectKeys=objectKeys$2;var getOwnPropertySymbolsModule=objectGetOwnPropertySymbols;var propertyIsEnumerableModule=objectPropertyIsEnumerable;var toObject$5=toObject$7;var IndexedObject$1=indexedObject;var nativeAssign=Object.assign;var defineProperty$3=Object.defineProperty;// `Object.assign` method
|
|
125939
125937
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
125940
125938
|
var objectAssign=!nativeAssign||fails$6(function(){// should have correct order of operations (Edge bug)
|
|
125941
125939
|
if(DESCRIPTORS$5&&nativeAssign({b:1},nativeAssign(defineProperty$3({},'a',{enumerable:true,get:function(){defineProperty$3(this,'b',{value:3,enumerable:false});}}),{b:2})).b!==1)return true;// should work with symbols and should have deterministic property order (V8 bug)
|
|
125942
125940
|
var A={};var B={};// eslint-disable-next-line no-undef
|
|
125943
125941
|
var symbol=Symbol();var alphabet='abcdefghijklmnopqrst';A[symbol]=7;alphabet.split('').forEach(function(chr){B[chr]=chr;});return nativeAssign({},A)[symbol]!=7||objectKeys(nativeAssign({},B)).join('')!=alphabet;})?function assign(target,source){// eslint-disable-line no-unused-vars
|
|
125944
|
-
var T=toObject$
|
|
125945
|
-
var functionBindContext=function(fn,that,length){aFunction$
|
|
125942
|
+
var T=toObject$5(target);var argumentsLength=arguments.length;var index=1;var getOwnPropertySymbols=getOwnPropertySymbolsModule.f;var propertyIsEnumerable=propertyIsEnumerableModule.f;while(argumentsLength>index){var S=IndexedObject$1(arguments[index++]);var keys=getOwnPropertySymbols?objectKeys(S).concat(getOwnPropertySymbols(S)):objectKeys(S);var length=keys.length;var j=0;var key;while(length>j){key=keys[j++];if(!DESCRIPTORS$5||propertyIsEnumerable.call(S,key))T[key]=S[key];}}return T;}:nativeAssign;var aFunction$5=aFunction$7;// optional / simple context binding
|
|
125943
|
+
var functionBindContext=function(fn,that,length){aFunction$5(fn);if(that===undefined)return fn;switch(length){case 0:return function(){return fn.call(that);};case 1:return function(a){return fn.call(that,a);};case 2:return function(a,b){return fn.call(that,a,b);};case 3:return function(a,b,c){return fn.call(that,a,b,c);};}return function/* ...args */(){return fn.apply(that,arguments);};};var anObject$7=anObject$h;// call something on iterator step with safe closing on error
|
|
125946
125944
|
var callWithSafeIterationClosing$2=function(iterator,fn,value,ENTRIES){try{return ENTRIES?fn(anObject$7(value)[0],value[1]):fn(value);// 7.4.6 IteratorClose(iterator, completion)
|
|
125947
|
-
}catch(error){var returnMethod=iterator['return'];if(returnMethod!==undefined)anObject$7(returnMethod.call(iterator));throw error;}};var wellKnownSymbol$
|
|
125948
|
-
var isArrayIteratorMethod$2=function(it){return it!==undefined&&(Iterators$1.Array===it||ArrayPrototype[ITERATOR$3]===it);};var toPrimitive=toPrimitive$3;var definePropertyModule$1=objectDefineProperty;var createPropertyDescriptor$1=createPropertyDescriptor$5;var createProperty$1=function(object,key,value){var propertyKey=toPrimitive(key);if(propertyKey in object)definePropertyModule$1.f(object,propertyKey,createPropertyDescriptor$1(0,value));else object[propertyKey]=value;};var wellKnownSymbol$
|
|
125945
|
+
}catch(error){var returnMethod=iterator['return'];if(returnMethod!==undefined)anObject$7(returnMethod.call(iterator));throw error;}};var wellKnownSymbol$a=wellKnownSymbol$l;var Iterators$1=iterators;var ITERATOR$3=wellKnownSymbol$a('iterator');var ArrayPrototype=Array.prototype;// check on default Array iterator
|
|
125946
|
+
var isArrayIteratorMethod$2=function(it){return it!==undefined&&(Iterators$1.Array===it||ArrayPrototype[ITERATOR$3]===it);};var toPrimitive=toPrimitive$3;var definePropertyModule$1=objectDefineProperty;var createPropertyDescriptor$1=createPropertyDescriptor$5;var createProperty$1=function(object,key,value){var propertyKey=toPrimitive(key);if(propertyKey in object)definePropertyModule$1.f(object,propertyKey,createPropertyDescriptor$1(0,value));else object[propertyKey]=value;};var wellKnownSymbol$9=wellKnownSymbol$l;var TO_STRING_TAG$1=wellKnownSymbol$9('toStringTag');var test$2={};test$2[TO_STRING_TAG$1]='z';var toStringTagSupport=String(test$2)==='[object z]';var TO_STRING_TAG_SUPPORT=toStringTagSupport;var classofRaw=classofRaw$1;var wellKnownSymbol$8=wellKnownSymbol$l;var TO_STRING_TAG=wellKnownSymbol$8('toStringTag');// ES3 wrong here
|
|
125949
125947
|
var CORRECT_ARGUMENTS=classofRaw(function(){return arguments;}())=='Arguments';// fallback for IE11 Script Access Denied error
|
|
125950
125948
|
var tryGet=function(it,key){try{return it[key];}catch(error){/* empty */}};// getting tag from ES6+ `Object.prototype.toString`
|
|
125951
125949
|
var classof$6=TO_STRING_TAG_SUPPORT?classofRaw:function(it){var O,tag,result;return it===undefined?'Undefined':it===null?'Null'// @@toStringTag case
|
|
125952
125950
|
:typeof(tag=tryGet(O=Object(it),TO_STRING_TAG))=='string'?tag// builtinTag case
|
|
125953
125951
|
:CORRECT_ARGUMENTS?classofRaw(O)// ES3 arguments fallback
|
|
125954
|
-
:(result=classofRaw(O))=='Object'&&typeof O.callee=='function'?'Arguments':result;};var classof$5=classof$6;var Iterators=iterators;var wellKnownSymbol$
|
|
125952
|
+
:(result=classofRaw(O))=='Object'&&typeof O.callee=='function'?'Arguments':result;};var classof$5=classof$6;var Iterators=iterators;var wellKnownSymbol$7=wellKnownSymbol$l;var ITERATOR$2=wellKnownSymbol$7('iterator');var getIteratorMethod$4=function(it){if(it!=undefined)return it[ITERATOR$2]||it['@@iterator']||Iterators[classof$5(it)];};var bind$5=functionBindContext;var toObject$4=toObject$7;var callWithSafeIterationClosing$1=callWithSafeIterationClosing$2;var isArrayIteratorMethod$1=isArrayIteratorMethod$2;var toLength$6=toLength$a;var createProperty=createProperty$1;var getIteratorMethod$3=getIteratorMethod$4;// `Array.from` method implementation
|
|
125955
125953
|
// https://tc39.github.io/ecma262/#sec-array.from
|
|
125956
|
-
var arrayFrom$1=function from(arrayLike/* , mapfn = undefined, thisArg = undefined */){var O=toObject$
|
|
125957
|
-
if(iteratorMethod!=undefined&&!(C==Array&&isArrayIteratorMethod$1(iteratorMethod))){iterator=iteratorMethod.call(O);next=iterator.next;result=new C();for(;!(step=next.call(iterator)).done;index++){value=mapping?callWithSafeIterationClosing$1(iterator,mapfn,[step.value,index],true):step.value;createProperty(result,index,value);}}else {length=toLength$
|
|
125954
|
+
var arrayFrom$1=function from(arrayLike/* , mapfn = undefined, thisArg = undefined */){var O=toObject$4(arrayLike);var C=typeof this=='function'?this:Array;var argumentsLength=arguments.length;var mapfn=argumentsLength>1?arguments[1]:undefined;var mapping=mapfn!==undefined;var iteratorMethod=getIteratorMethod$3(O);var index=0;var length,result,step,iterator,next,value;if(mapping)mapfn=bind$5(mapfn,argumentsLength>2?arguments[2]:undefined,2);// if the target is not iterable or it's an array with the default iterator - use a simple case
|
|
125955
|
+
if(iteratorMethod!=undefined&&!(C==Array&&isArrayIteratorMethod$1(iteratorMethod))){iterator=iteratorMethod.call(O);next=iterator.next;result=new C();for(;!(step=next.call(iterator)).done;index++){value=mapping?callWithSafeIterationClosing$1(iterator,mapfn,[step.value,index],true):step.value;createProperty(result,index,value);}}else {length=toLength$6(O.length);result=new C(length);for(;length>index;index++){value=mapping?mapfn(O[index],index):O[index];createProperty(result,index,value);}}result.length=index;return result;};// based on https://github.com/bestiejs/punycode.js/blob/master/punycode.js
|
|
125958
125956
|
var maxInt=2147483647;// aka. 0x7FFFFFFF or 2^31-1
|
|
125959
125957
|
var base=36;var tMin=1;var tMax=26;var skew=38;var damp=700;var initialBias=72;var initialN=128;// 0x80
|
|
125960
125958
|
var delimiter='-';// '\x2D'
|
|
@@ -125993,9 +125991,9 @@ while(handledCPCount<inputLength){// All non-basic code points < n have been han
|
|
|
125993
125991
|
var m=maxInt;for(i=0;i<input.length;i++){currentValue=input[i];if(currentValue>=n&¤tValue<m){m=currentValue;}}// Increase `delta` enough to advance the decoder's <n,i> state to <m,0>, but guard against overflow.
|
|
125994
125992
|
var handledCPCountPlusOne=handledCPCount+1;if(m-n>floor$2((maxInt-delta)/handledCPCountPlusOne)){throw RangeError(OVERFLOW_ERROR);}delta+=(m-n)*handledCPCountPlusOne;n=m;for(i=0;i<input.length;i++){currentValue=input[i];if(currentValue<n&&++delta>maxInt){throw RangeError(OVERFLOW_ERROR);}if(currentValue==n){// Represent delta as a generalized variable-length integer.
|
|
125995
125993
|
var q=delta;for(var k=base;;k+=base){var t=k<=bias?tMin:k>=bias+tMax?tMax:k-bias;if(q<t)break;var qMinusT=q-t;var baseMinusT=base-t;output.push(stringFromCharCode(digitToBasic(t+qMinusT%baseMinusT)));q=floor$2(qMinusT/baseMinusT);}output.push(stringFromCharCode(digitToBasic(q)));bias=adapt(delta,handledCPCountPlusOne,handledCPCount==basicLength);delta=0;++handledCPCount;}}++delta;++n;}return output.join('');};var stringPunycodeToAscii=function(input){var encoded=[];var labels=input.toLowerCase().replace(regexSeparators,'\u002E').split('.');var i,label;for(i=0;i<labels.length;i++){label=labels[i];encoded.push(regexNonASCII.test(label)?'xn--'+encode(label):label);}return encoded.join('.');};var redefine$5=redefine$9.exports;var redefineAll$2=function(target,src,options){for(var key in src)redefine$5(target,key,src[key],options);return target;};var anObject$6=anObject$h;var getIteratorMethod$2=getIteratorMethod$4;var getIterator$1=function(it){var iteratorMethod=getIteratorMethod$2(it);if(typeof iteratorMethod!='function'){throw TypeError(String(it)+' is not iterable');}return anObject$6(iteratorMethod.call(it));};// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
125996
|
-
var $$
|
|
125994
|
+
var $$b=_export;var getBuiltIn$3=getBuiltIn$6;var USE_NATIVE_URL$1=nativeUrl;var redefine$4=redefine$9.exports;var redefineAll$1=redefineAll$2;var setToStringTag$2=setToStringTag$5;var createIteratorConstructor=createIteratorConstructor$2;var InternalStateModule$2=internalState;var anInstance$2=anInstance$3;var hasOwn=has$c;var bind$4=functionBindContext;var classof$4=classof$6;var anObject$5=anObject$h;var isObject$5=isObject$c;var create=objectCreate;var createPropertyDescriptor=createPropertyDescriptor$5;var getIterator=getIterator$1;var getIteratorMethod$1=getIteratorMethod$4;var wellKnownSymbol$6=wellKnownSymbol$l;var $fetch$1=getBuiltIn$3('fetch');var Headers$1=getBuiltIn$3('Headers');var ITERATOR$1=wellKnownSymbol$6('iterator');var URL_SEARCH_PARAMS='URLSearchParams';var URL_SEARCH_PARAMS_ITERATOR=URL_SEARCH_PARAMS+'Iterator';var setInternalState$3=InternalStateModule$2.set;var getInternalParamsState=InternalStateModule$2.getterFor(URL_SEARCH_PARAMS);var getInternalIteratorState=InternalStateModule$2.getterFor(URL_SEARCH_PARAMS_ITERATOR);var plus=/\+/g;var sequences=Array(4);var percentSequence=function(bytes){return sequences[bytes-1]||(sequences[bytes-1]=RegExp('((?:%[\\da-f]{2}){'+bytes+'})','gi'));};var percentDecode=function(sequence){try{return decodeURIComponent(sequence);}catch(error){return sequence;}};var deserialize=function(it){var result=it.replace(plus,' ');var bytes=4;try{return decodeURIComponent(result);}catch(error){while(bytes){result=result.replace(percentSequence(bytes--),percentDecode);}return result;}};var find=/[!'()~]|%20/g;var replace={'!':'%21',"'":'%27','(':'%28',')':'%29','~':'%7E','%20':'+'};var replacer=function(match){return replace[match];};var serialize=function(it){return encodeURIComponent(it).replace(find,replacer);};var parseSearchParams=function(result,query){if(query){var attributes=query.split('&');var index=0;var attribute,entry;while(index<attributes.length){attribute=attributes[index++];if(attribute.length){entry=attribute.split('=');result.push({key:deserialize(entry.shift()),value:deserialize(entry.join('='))});}}}};var updateSearchParams=function(query){this.entries.length=0;parseSearchParams(this.entries,query);};var validateArgumentsLength=function(passed,required){if(passed<required)throw TypeError('Not enough arguments');};var URLSearchParamsIterator=createIteratorConstructor(function Iterator(params,kind){setInternalState$3(this,{type:URL_SEARCH_PARAMS_ITERATOR,iterator:getIterator(getInternalParamsState(params).entries),kind:kind});},'Iterator',function next(){var state=getInternalIteratorState(this);var kind=state.kind;var step=state.iterator.next();var entry=step.value;if(!step.done){step.value=kind==='keys'?entry.key:kind==='values'?entry.value:[entry.key,entry.value];}return step;});// `URLSearchParams` constructor
|
|
125997
125995
|
// https://url.spec.whatwg.org/#interface-urlsearchparams
|
|
125998
|
-
var URLSearchParamsConstructor=function/* init */URLSearchParams(){anInstance$2(this,URLSearchParamsConstructor,URL_SEARCH_PARAMS);var init=arguments.length>0?arguments[0]:undefined;var that=this;var entries=[];var iteratorMethod,iterator,next,step,entryIterator,entryNext,first,second,key;setInternalState$3(that,{type:URL_SEARCH_PARAMS,entries:entries,updateURL:function(){/* empty */},updateSearchParams:updateSearchParams});if(init!==undefined){if(isObject$
|
|
125996
|
+
var URLSearchParamsConstructor=function/* init */URLSearchParams(){anInstance$2(this,URLSearchParamsConstructor,URL_SEARCH_PARAMS);var init=arguments.length>0?arguments[0]:undefined;var that=this;var entries=[];var iteratorMethod,iterator,next,step,entryIterator,entryNext,first,second,key;setInternalState$3(that,{type:URL_SEARCH_PARAMS,entries:entries,updateURL:function(){/* empty */},updateSearchParams:updateSearchParams});if(init!==undefined){if(isObject$5(init)){iteratorMethod=getIteratorMethod$1(init);if(typeof iteratorMethod==='function'){iterator=iteratorMethod.call(init);next=iterator.next;while(!(step=next.call(iterator)).done){entryIterator=getIterator(anObject$5(step.value));entryNext=entryIterator.next;if((first=entryNext.call(entryIterator)).done||(second=entryNext.call(entryIterator)).done||!entryNext.call(entryIterator).done)throw TypeError('Expected sequence with length 2');entries.push({key:first.value+'',value:second.value+''});}}else for(key in init)if(hasOwn(init,key))entries.push({key:key,value:init[key]+''});}else {parseSearchParams(entries,typeof init==='string'?init.charAt(0)==='?'?init.slice(1):init:init+'');}}};var URLSearchParamsPrototype=URLSearchParamsConstructor.prototype;redefineAll$1(URLSearchParamsPrototype,{// `URLSearchParams.prototype.appent` method
|
|
125999
125997
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
126000
125998
|
append:function append(name,value){validateArgumentsLength(arguments.length,2);var state=getInternalParamsState(this);state.entries.push({key:name+'',value:value+''});state.updateURL();},// `URLSearchParams.prototype.delete` method
|
|
126001
125999
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
@@ -126011,16 +126009,16 @@ set:function set(name,value){validateArgumentsLength(arguments.length,1);var sta
|
|
|
126011
126009
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
|
|
126012
126010
|
sort:function sort(){var state=getInternalParamsState(this);var entries=state.entries;// Array#sort is not stable in some engines
|
|
126013
126011
|
var slice=entries.slice();var entry,entriesIndex,sliceIndex;entries.length=0;for(sliceIndex=0;sliceIndex<slice.length;sliceIndex++){entry=slice[sliceIndex];for(entriesIndex=0;entriesIndex<sliceIndex;entriesIndex++){if(entries[entriesIndex].key>entry.key){entries.splice(entriesIndex,0,entry);break;}}if(entriesIndex===sliceIndex)entries.push(entry);}state.updateURL();},// `URLSearchParams.prototype.forEach` method
|
|
126014
|
-
forEach:function forEach(callback/* , thisArg */){var entries=getInternalParamsState(this).entries;var boundFunction=bind$
|
|
126012
|
+
forEach:function forEach(callback/* , thisArg */){var entries=getInternalParamsState(this).entries;var boundFunction=bind$4(callback,arguments.length>1?arguments[1]:undefined,3);var index=0;var entry;while(index<entries.length){entry=entries[index++];boundFunction(entry.value,entry.key,this);}},// `URLSearchParams.prototype.keys` method
|
|
126015
126013
|
keys:function keys(){return new URLSearchParamsIterator(this,'keys');},// `URLSearchParams.prototype.values` method
|
|
126016
126014
|
values:function values(){return new URLSearchParamsIterator(this,'values');},// `URLSearchParams.prototype.entries` method
|
|
126017
126015
|
entries:function entries(){return new URLSearchParamsIterator(this,'entries');}},{enumerable:true});// `URLSearchParams.prototype[@@iterator]` method
|
|
126018
126016
|
redefine$4(URLSearchParamsPrototype,ITERATOR$1,URLSearchParamsPrototype.entries);// `URLSearchParams.prototype.toString` method
|
|
126019
126017
|
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
|
|
126020
|
-
redefine$4(URLSearchParamsPrototype,'toString',function toString(){var entries=getInternalParamsState(this).entries;var result=[];var index=0;var entry;while(index<entries.length){entry=entries[index++];result.push(serialize(entry.key)+'='+serialize(entry.value));}return result.join('&');},{enumerable:true});setToStringTag$2(URLSearchParamsConstructor,URL_SEARCH_PARAMS);$$
|
|
126018
|
+
redefine$4(URLSearchParamsPrototype,'toString',function toString(){var entries=getInternalParamsState(this).entries;var result=[];var index=0;var entry;while(index<entries.length){entry=entries[index++];result.push(serialize(entry.key)+'='+serialize(entry.value));}return result.join('&');},{enumerable:true});setToStringTag$2(URLSearchParamsConstructor,URL_SEARCH_PARAMS);$$b({global:true,forced:!USE_NATIVE_URL$1},{URLSearchParams:URLSearchParamsConstructor});// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
|
|
126021
126019
|
// https://github.com/zloirock/core-js/issues/674
|
|
126022
|
-
if(!USE_NATIVE_URL$1&&typeof $fetch$1=='function'&&typeof Headers$1=='function'){$$
|
|
126023
|
-
var $$
|
|
126020
|
+
if(!USE_NATIVE_URL$1&&typeof $fetch$1=='function'&&typeof Headers$1=='function'){$$b({global:true,enumerable:true,forced:true},{fetch:function fetch(input/* , init */){var args=[input];var init,body,headers;if(arguments.length>1){init=arguments[1];if(isObject$5(init)){body=init.body;if(classof$4(body)===URL_SEARCH_PARAMS){headers=init.headers?new Headers$1(init.headers):new Headers$1();if(!headers.has('content-type')){headers.set('content-type','application/x-www-form-urlencoded;charset=UTF-8');}init=create(init,{body:createPropertyDescriptor(0,String(body)),headers:createPropertyDescriptor(0,headers)});}}args.push(init);}return $fetch$1.apply(this,args);}});}var web_urlSearchParams={URLSearchParams:URLSearchParamsConstructor,getState:getInternalParamsState};// TODO: in core-js@4, move /modules/ dependencies to public entries for better optimization by tools like `preset-env`
|
|
126021
|
+
var $$a=_export;var DESCRIPTORS$4=descriptors;var USE_NATIVE_URL=nativeUrl;var global$a=global$m;var defineProperties=objectDefineProperties;var redefine$3=redefine$9.exports;var anInstance$1=anInstance$3;var has$2=has$c;var assign$1=objectAssign;var arrayFrom=arrayFrom$1;var codeAt=stringMultibyte$1.codeAt;var toASCII=stringPunycodeToAscii;var setToStringTag$1=setToStringTag$5;var URLSearchParamsModule=web_urlSearchParams;var InternalStateModule$1=internalState;var NativeURL=global$a.URL;var URLSearchParams$1=URLSearchParamsModule.URLSearchParams;var getInternalSearchParamsState=URLSearchParamsModule.getState;var setInternalState$2=InternalStateModule$1.set;var getInternalURLState=InternalStateModule$1.getterFor('URL');var floor$1=Math.floor;var pow=Math.pow;var INVALID_AUTHORITY='Invalid authority';var INVALID_SCHEME='Invalid scheme';var INVALID_HOST='Invalid host';var INVALID_PORT='Invalid port';var ALPHA=/[A-Za-z]/;var ALPHANUMERIC=/[\d+-.A-Za-z]/;var DIGIT=/\d/;var HEX_START=/^(0x|0X)/;var OCT=/^[0-7]+$/;var DEC=/^\d+$/;var HEX=/^[\dA-Fa-f]+$/;// eslint-disable-next-line no-control-regex
|
|
126024
126022
|
var FORBIDDEN_HOST_CODE_POINT=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/;// eslint-disable-next-line no-control-regex
|
|
126025
126023
|
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/;// eslint-disable-next-line no-control-regex
|
|
126026
126024
|
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;// eslint-disable-next-line no-control-regex
|
|
@@ -126067,10 +126065,10 @@ redefine$3(URLPrototype,'toString',function toString(){return serializeURL.call(
|
|
|
126067
126065
|
if(nativeCreateObjectURL)redefine$3(URLConstructor,'createObjectURL',function createObjectURL(blob){return nativeCreateObjectURL.apply(NativeURL,arguments);});// `URL.revokeObjectURL` method
|
|
126068
126066
|
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
|
|
126069
126067
|
// eslint-disable-next-line no-unused-vars
|
|
126070
|
-
if(nativeRevokeObjectURL)redefine$3(URLConstructor,'revokeObjectURL',function revokeObjectURL(url){return nativeRevokeObjectURL.apply(NativeURL,arguments);});}setToStringTag$1(URLConstructor,'URL');$$
|
|
126068
|
+
if(nativeRevokeObjectURL)redefine$3(URLConstructor,'revokeObjectURL',function revokeObjectURL(url){return nativeRevokeObjectURL.apply(NativeURL,arguments);});}setToStringTag$1(URLConstructor,'URL');$$a({global:true,forced:!USE_NATIVE_URL,sham:!DESCRIPTORS$4},{URL:URLConstructor});var $$9=_export;var getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f;var toLength$5=toLength$a;var notARegExp=notARegexp;var requireObjectCoercible$3=requireObjectCoercible$b;var correctIsRegExpLogic=correctIsRegexpLogic;var nativeStartsWith=''.startsWith;var min$2=Math.min;var CORRECT_IS_REGEXP_LOGIC=correctIsRegExpLogic('startsWith');// https://github.com/zloirock/core-js/pull/702
|
|
126071
126069
|
var MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var descriptor=getOwnPropertyDescriptor$1(String.prototype,'startsWith');return descriptor&&!descriptor.writable;}();// `String.prototype.startsWith` method
|
|
126072
126070
|
// https://tc39.github.io/ecma262/#sec-string.prototype.startswith
|
|
126073
|
-
$$
|
|
126071
|
+
$$9({target:'String',proto:true,forced:!MDN_POLYFILL_BUG&&!CORRECT_IS_REGEXP_LOGIC},{startsWith:function startsWith(searchString/* , position = 0 */){var that=String(requireObjectCoercible$3(this));notARegExp(searchString);var index=toLength$5(min$2(arguments.length>1?arguments[1]:undefined,that.length));var search=String(searchString);return nativeStartsWith?nativeStartsWith.call(that,search,index):that.slice(index,index+search.length)===search;}});var mentionRegex=/[@#](\[(.+?)]\((.+?)\))/gi;var CommentInput=/*#__PURE__*/forwardRef(function(_a,ref){var disabled=_a.disabled,onEnter=_a.onEnter,onCtrlEnter=_a.onCtrlEnter,buttons=_a.buttons,content=_a.content,onChange=_a.onChange,onFocus=_a.onFocus,autoFocus=_a.autoFocus,className=_a.className,mentionSearchHandler=_a.mentionSearchHandler,inputTheme=_a.inputTheme,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues;var formatMessage=useIntl().formatMessage;var handleSearch=useMentionsSearch(mentionSearchHandler,handleSearchComplete);var inputRef=useRef$1(null);var hostRef=useRef$1(null);// exists only for e2e tests, so we know when the focus has been set
|
|
126074
126072
|
var _b=useState$2(false),didInitialFocus=_b[0],setDidInitialFocus=_b[1];var screenSize=useWindowSize$2();var inputPlaceholder=screenSize.width>maxScreenSize.medium?'PostMessage.inputPlaceholder':'PostMessage.inputPlaceholder.mobile';useImperativeHandle(ref,function(){return inputRef.current;},[inputRef]);useEffect$1(function(){if(autoFocus&&inputRef.current&&!didInitialFocus&&!disabled){// HACK: it seems as the react-mentions input does not like setting the focus
|
|
126075
126073
|
// right away. Postpone it for a couple of ms
|
|
126076
126074
|
// Unfortunately autoFocus={true} is not supported
|
|
@@ -126101,10 +126099,10 @@ if(filteredKeywords.length!==flatDefaultKeywords.length){onChangeKeywords(filter
|
|
|
126101
126099
|
if(!mandatoryKeywordIds.every(function(id){return itemKeys.includes(id);})){return;}updateKeywords(items);}function removeItem(item){var filteredSelectedItems=selectedItems.filter(function(i){return i.key!==item.key;});updateKeywords(filteredSelectedItems);}function updateKeywords(items){setSelectedItems(items);var selectedItemIds=items.map(function(i){return i.key;});onChangeKeywords(availableKeywords.filter(function(k){return selectedItemIds.includes(k.id);}));}};var MandatoryKeywordsInfoIcon=function MandatoryKeywordsInfoIcon(){var formatMessage=useIntl().formatMessage;var _a=useState$2(false),showCallout=_a[0],setShowCallout=_a[1];var infoButtonRef=useRef$1();return jsxs("div",__assign({ref:infoButtonRef},{children:[jsx$1(StyledIconButton$7,{iconProps:{iconName:'Info'},onClick:function(){return setShowCallout(!showCallout);},ariaLabel:formatMessage({id:'Keywords.picker.tooltipAriaLabel'})},void 0),showCallout&&jsx$1(StyledCallout$1,__assign({onDismiss:function(){return setShowCallout(false);},target:infoButtonRef.current},{children:jsx$1(FormattedMessage$1,{id:"Keywords.picker.tooltip"},void 0)}),void 0)]}),void 0);};var Tag=function Tag(_a){var item=_a.item,onRemoveItem=_a.onRemoveItem;var formatMessage=useIntl().formatMessage;var canBeRemoved=!item.isMandatory;return jsxs(TagWrapper,__assign({"data-keyword-tag":item.name},{children:[jsx$1(KeywordName,{children:item.name},void 0),canBeRemoved&&jsx$1(RemoveTagButton,{iconProps:{iconName:'Cancel'},onClick:function(){return onRemoveItem(item);},ariaLabel:formatMessage({id:'AriaLabel.removeKeywordButton'}),"data-remove-keyword-button":true},void 0)]}),void 0);};var Host$S=_styled.div.withConfig({displayName:"KeywordsPicker__Host",componentId:"sc-5ec8mr-0"})(templateObject_1$2e||(templateObject_1$2e=__makeTemplateObject(["\n margin-top: ","px;\n padding: ","px;\n background-color: ",";\n"],["\n margin-top: ","px;\n padding: ","px;\n background-color: ",";\n"])),spacingS,spacingS,function(p){return p.theme.palette.white;});var LabelHost=_styled.div.withConfig({displayName:"KeywordsPicker__LabelHost",componentId:"sc-5ec8mr-1"})(templateObject_2$1r||(templateObject_2$1r=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var StyledIconButton$7=_styled(IconButton).withConfig({displayName:"KeywordsPicker__StyledIconButton",componentId:"sc-5ec8mr-2"})(templateObject_3$Z||(templateObject_3$Z=__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"])));var StyledCallout$1=_styled(Callout).withConfig({displayName:"KeywordsPicker__StyledCallout",componentId:"sc-5ec8mr-3"})(templateObject_4$I||(templateObject_4$I=__makeTemplateObject(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingS);var TagWrapper=_styled.div.withConfig({displayName:"KeywordsPicker__TagWrapper",componentId:"sc-5ec8mr-4"})(templateObject_5$C||(templateObject_5$C=__makeTemplateObject(["\n background-color: ",";\n line-height: 26px;\n margin-right: ","px;\n display: flex;\n font-size: ","px;\n"],["\n background-color: ",";\n line-height: 26px;\n margin-right: ","px;\n display: flex;\n font-size: ","px;\n"])),function(p){return p.theme.palette.neutralLight;},spacingXxs+1,fontSizeSmall);var KeywordName=_styled.span.withConfig({displayName:"KeywordsPicker__KeywordName",componentId:"sc-5ec8mr-5"})(templateObject_6$q||(templateObject_6$q=__makeTemplateObject(["\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n min-width: ","px;\n margin: 0 ","px;\n"],["\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n min-width: ","px;\n margin: 0 ","px;\n"])),spacingL,spacingXs+2);var RemoveTagButton=_styled(IconButton).withConfig({displayName:"KeywordsPicker__RemoveTagButton",componentId:"sc-5ec8mr-6"})(templateObject_7$l||(templateObject_7$l=__makeTemplateObject(["\n padding: 0 ","px;\n border-radius: 0 ","px ","px 0;\n width: ","px;\n height: auto;\n i {\n font-size: ","px;\n }\n"],["\n padding: 0 ","px;\n border-radius: 0 ","px ","px 0;\n width: ","px;\n height: auto;\n i {\n font-size: ","px;\n }\n"])),spacingXxs+1,spacingXxs-1,spacingXxs-1,spacingL,fontSizeSmaller);var StyledTagPicker=_styled(TagPicker).withConfig({displayName:"KeywordsPicker__StyledTagPicker",componentId:"sc-5ec8mr-7"})(templateObject_8$j||(templateObject_8$j=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$2e,templateObject_2$1r,templateObject_3$Z,templateObject_4$I,templateObject_5$C,templateObject_6$q,templateObject_7$l,templateObject_8$j;var hasValidGenericUrlVideoSourcePrefix=function hasValidGenericUrlVideoSourcePrefix(url){return url&&getAdditionalVideoSources().filter(function(s){return url.startsWith(s.prefix);}).length>0;};var VideoUrlParser=/** @class */function(){function VideoUrlParser(url){this.url=url;this.source=null;this.id=null;this.isDirectVideoUrl=false;this.videoProperties=null;this.thumbnailUrl=null;if(hasValidGenericUrlVideoSourcePrefix(this.url)){this.source=VideoSource.GenericUrl;this.id=url;}else if(VideoUrlParser.microsoftStreamRegex.test(this.url)){this.source=VideoSource.MicrosoftStream;this.id=VideoUrlParser.microsoftStreamRegex.exec(this.url)[1];}else if(VideoUrlParser.ytRegex.test(this.url)){this.source=VideoSource.YouTube;this.id=VideoUrlParser.ytRegex.exec(this.url)[1];}else if(VideoUrlParser.vimeoRegex.test(this.url)){this.source=VideoSource.Vimeo;this.id=VideoUrlParser.vimeoRegex.exec(this.url)[1];}else if(VideoUrlParser.vimeoDirectLinkRegex.test(this.url)){this.source=VideoSource.Vimeo;this.id=VideoUrlParser.vimeoDirectLinkRegex.exec(this.url)[1];this.isDirectVideoUrl=true;}else if(VideoUrlParser.kalturaRegex.test(this.url)){var regexMatches=VideoUrlParser.kalturaRegex.exec(this.url);this.source=VideoSource.Kaltura;this.id=regexMatches[1];this.videoProperties={sp:regexMatches[2],uiconfId:regexMatches[3],partnerId:regexMatches[4],entryId:regexMatches[5]};this.thumbnailUrl="https://cdnsecakmi.kaltura.com/p/"+this.id+"/thumbnail/entry_id/"+this.videoProperties.entryId+"/width/1000";}}//TODO handle the different error messages for cloud and onprem versions, i.e. what sources are permitted (see task 23570)
|
|
126102
126100
|
VideoUrlParser.prototype.isValid=function(){return this.source!=null&&this.id!=null;};VideoUrlParser.ytRegex=/^.*(?:(?:youtu.be\/)|(?:v\/)|(?:\/u\/\w\/)|(?:embed\/)|(?:watch\?))\??v?=?([^#&?]*).*$/;VideoUrlParser.vimeoRegex=/.*?(?:vimeo.com\/){1}(?:video\/)?(\d+)/;// match first GUID after domain
|
|
126103
126101
|
VideoUrlParser.microsoftStreamRegex=/.*web\.microsoftstream\.com.+?([0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12})/i;VideoUrlParser.vimeoDirectLinkRegex=/.*?(?:player\.vimeo\.com\/external\/){1}(\d+)/;VideoUrlParser.kalturaRegex=/.+cdnapisec\.kaltura\.com\/p\/([0-9]+)\/sp\/([0-9]+)\/embedIframeJs\/uiconf_id\/([0-9]+)\/partner_id\/([0-9]+)(?:.*entry_id=(.+?(?=&|$)))/;return VideoUrlParser;}();// we should probably provide a better fix for this => #38316
|
|
126104
|
-
function getAdditionalVideoSources(){return [];}var isObject$
|
|
126102
|
+
function getAdditionalVideoSources(){return [];}var isObject$4=isObject$c;var setPrototypeOf=objectSetPrototypeOf;// makes subclassing work correct for wrapped built-ins
|
|
126105
126103
|
var inheritIfRequired$1=function($this,dummy,Wrapper){var NewTarget,NewTargetPrototype;if(// it can work only with native `setPrototypeOf`
|
|
126106
126104
|
setPrototypeOf&&// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
126107
|
-
typeof(NewTarget=dummy.constructor)=='function'&&NewTarget!==Wrapper&&isObject$
|
|
126105
|
+
typeof(NewTarget=dummy.constructor)=='function'&&NewTarget!==Wrapper&&isObject$4(NewTargetPrototype=NewTarget.prototype)&&NewTargetPrototype!==Wrapper.prototype)setPrototypeOf($this,NewTargetPrototype);return $this;};var getBuiltIn$2=getBuiltIn$6;var definePropertyModule=objectDefineProperty;var wellKnownSymbol$5=wellKnownSymbol$l;var DESCRIPTORS$3=descriptors;var SPECIES$2=wellKnownSymbol$5('species');var setSpecies$2=function(CONSTRUCTOR_NAME){var Constructor=getBuiltIn$2(CONSTRUCTOR_NAME);var defineProperty=definePropertyModule.f;if(DESCRIPTORS$3&&Constructor&&!Constructor[SPECIES$2]){defineProperty(Constructor,SPECIES$2,{configurable:true,get:function(){return this;}});}};var DESCRIPTORS$2=descriptors;var global$9=global$m;var isForced$1=isForced_1;var inheritIfRequired=inheritIfRequired$1;var defineProperty$2=objectDefineProperty.f;var getOwnPropertyNames=objectGetOwnPropertyNames.f;var isRegExp$1=isRegexp;var getFlags=regexpFlags$1$1;var stickyHelpers$2=regexpStickyHelpers$1;var redefine$2=redefine$9.exports;var fails$5=fails$i;var setInternalState$1=internalState.set;var setSpecies$1=setSpecies$2;var wellKnownSymbol$4=wellKnownSymbol$l;var MATCH=wellKnownSymbol$4('match');var NativeRegExp=global$9.RegExp;var RegExpPrototype$2=NativeRegExp.prototype;var re1=/a/g;var re2=/a/g;// "new" should create a new object, old webkit bug
|
|
126108
126106
|
var CORRECT_NEW=new NativeRegExp(re1)!==re1;var UNSUPPORTED_Y$2=stickyHelpers$2.UNSUPPORTED_Y;var FORCED$3=DESCRIPTORS$2&&isForced$1('RegExp',!CORRECT_NEW||UNSUPPORTED_Y$2||fails$5(function(){re2[MATCH]=false;// RegExp constructor can alter flags and IsRegExp works correct with @@match
|
|
126109
126107
|
return NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||NativeRegExp(re1,'i')!='/a/i';}));// `RegExp` constructor
|
|
126110
126108
|
// https://tc39.github.io/ecma262/#sec-regexp-constructor
|
|
@@ -126113,9 +126111,9 @@ setSpecies$1('RegExp');var redefine$1$1=redefine$9.exports;var anObject$4=anObje
|
|
|
126113
126111
|
var INCORRECT_NAME$1=nativeToString$1.name!=TO_STRING$1;// `RegExp.prototype.toString` method
|
|
126114
126112
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
|
|
126115
126113
|
if(NOT_GENERIC$1||INCORRECT_NAME$1){redefine$1$1(RegExp.prototype,TO_STRING$1,function toString(){var R=anObject$4(this);var p=String(R.source);var rf=R.flags;var f=String(rf===undefined&&R instanceof RegExp&&!('flags'in RegExpPrototype$1)?flags$1.call(R):rf);return '/'+p+'/'+f;},{unsafe:true});}// Sources: https://webapps.stackexchange.com/questions/54443/format-for-id-of-youtube-video
|
|
126116
|
-
var videoRegex=/((https?:\/\/)?((www\.)?)?)(((youtube\.com|youtu\.?be)\/[^\s]{11,}.*?)|((vimeo\.com)\/(?:video\/)?[\d]{3,})|((player\.vimeo\.com\/external)\/(\S+)))/g;function getAllVideosFromString(content){var matches,url,type;return __generator(this,function(_a){switch(_a.label){case 0:videoRegex.lastIndex=0;_a.label=1;case 1:matches=videoRegex.exec(content);url=matches===null||matches===void 0?void 0:matches[0];if(!url){return [3/*break*/,3];}type=matches.filter(function(m){return !!m;}).some(function(m){return m.indexOf('vimeo')>-1;})?AttachmentType.VimeoVideo:AttachmentType.YouTubeVideo;return [4/*yield*/,{url:url,type:type}];case 2:_a.sent();return [3/*break*/,1];case 3:return [2/*return*/];}});}function getEmbeddedObjectsFromString(content){var embeddedObjectRegex,matches,url,subscriptionIdentifier,type,id;return __generator(this,function(_a){switch(_a.label){case 0:embeddedObjectRegex=new RegExp("/([^/]{3,})(/(redirect/)?(news|events|pages|posts)/([^\\s/?]+).*?)",'g');_a.label=1;case 1:matches=embeddedObjectRegex.exec(content);url=matches===null||matches===void 0?void 0:matches[2];if(!url){return [3/*break*/,3];}subscriptionIdentifier=matches[1];type=AttachmentType.News;switch(matches[4]){case'news':type=AttachmentType.News;break;case'events':type=AttachmentType.Event;break;case'pages':type=AttachmentType.Page;break;case'posts':type=AttachmentType.Post;break;default:type=AttachmentType.News;}id=matches[5];return [4/*yield*/,{url:url,subscriptionIdentifier:subscriptionIdentifier,type:type,id:id}];case 2:_a.sent();return [3/*break*/,1];case 3:return [2/*return*/];}});}var global$8=global$m;var nativePromiseConstructor=global$8.Promise;var iterate$2={exports:{}};var anObject$3=anObject$h;var isArrayIteratorMethod=isArrayIteratorMethod$2;var toLength$
|
|
126117
|
-
if(isArrayIteratorMethod(iterFn)){for(index=0,length=toLength$
|
|
126118
|
-
Array.from(iteratorWithReturn,function(){throw 2;});}catch(error){/* empty */}var checkCorrectnessOfIteration$1=function(exec,SKIP_CLOSING){if(!SKIP_CLOSING&&!SAFE_CLOSING)return false;var ITERATION_SUPPORT=false;try{var object={};object[ITERATOR]=function(){return {next:function(){return {done:ITERATION_SUPPORT=true};}};};exec(object);}catch(error){/* empty */}return ITERATION_SUPPORT;};var getBuiltIn$1=getBuiltIn$6;var engineUserAgent=getBuiltIn$1('navigator','userAgent')||'';var userAgent$1=engineUserAgent;var engineIsIos=/(iphone|ipod|ipad).*applewebkit/i.test(userAgent$1);var global$7=global$m;var fails$3$1=fails$i;var classof$3=classofRaw$1;var bind$
|
|
126114
|
+
var videoRegex=/((https?:\/\/)?((www\.)?)?)(((youtube\.com|youtu\.?be)\/[^\s]{11,}.*?)|((vimeo\.com)\/(?:video\/)?[\d]{3,})|((player\.vimeo\.com\/external)\/(\S+)))/g;function getAllVideosFromString(content){var matches,url,type;return __generator(this,function(_a){switch(_a.label){case 0:videoRegex.lastIndex=0;_a.label=1;case 1:matches=videoRegex.exec(content);url=matches===null||matches===void 0?void 0:matches[0];if(!url){return [3/*break*/,3];}type=matches.filter(function(m){return !!m;}).some(function(m){return m.indexOf('vimeo')>-1;})?AttachmentType.VimeoVideo:AttachmentType.YouTubeVideo;return [4/*yield*/,{url:url,type:type}];case 2:_a.sent();return [3/*break*/,1];case 3:return [2/*return*/];}});}function getEmbeddedObjectsFromString(content){var embeddedObjectRegex,matches,url,subscriptionIdentifier,type,id;return __generator(this,function(_a){switch(_a.label){case 0:embeddedObjectRegex=new RegExp("/([^/]{3,})(/(redirect/)?(news|events|pages|posts)/([^\\s/?]+).*?)",'g');_a.label=1;case 1:matches=embeddedObjectRegex.exec(content);url=matches===null||matches===void 0?void 0:matches[2];if(!url){return [3/*break*/,3];}subscriptionIdentifier=matches[1];type=AttachmentType.News;switch(matches[4]){case'news':type=AttachmentType.News;break;case'events':type=AttachmentType.Event;break;case'pages':type=AttachmentType.Page;break;case'posts':type=AttachmentType.Post;break;default:type=AttachmentType.News;}id=matches[5];return [4/*yield*/,{url:url,subscriptionIdentifier:subscriptionIdentifier,type:type,id:id}];case 2:_a.sent();return [3/*break*/,1];case 3:return [2/*return*/];}});}var global$8=global$m;var nativePromiseConstructor=global$8.Promise;var iterate$2={exports:{}};var anObject$3=anObject$h;var isArrayIteratorMethod=isArrayIteratorMethod$2;var toLength$4=toLength$a;var bind$3=functionBindContext;var getIteratorMethod=getIteratorMethod$4;var callWithSafeIterationClosing=callWithSafeIterationClosing$2;var Result=function(stopped,result){this.stopped=stopped;this.result=result;};var iterate$1=iterate$2.exports=function(iterable,fn,that,AS_ENTRIES,IS_ITERATOR){var boundFunction=bind$3(fn,that,AS_ENTRIES?2:1);var iterator,iterFn,index,length,result,next,step;if(IS_ITERATOR){iterator=iterable;}else {iterFn=getIteratorMethod(iterable);if(typeof iterFn!='function')throw TypeError('Target is not iterable');// optimisation for array iterators
|
|
126115
|
+
if(isArrayIteratorMethod(iterFn)){for(index=0,length=toLength$4(iterable.length);length>index;index++){result=AS_ENTRIES?boundFunction(anObject$3(step=iterable[index])[0],step[1]):boundFunction(iterable[index]);if(result&&result instanceof Result)return result;}return new Result(false);}iterator=iterFn.call(iterable);}next=iterator.next;while(!(step=next.call(iterator)).done){result=callWithSafeIterationClosing(iterator,boundFunction,step.value,AS_ENTRIES);if(typeof result=='object'&&result&&result instanceof Result)return result;}return new Result(false);};iterate$1.stop=function(result){return new Result(true,result);};var wellKnownSymbol$3=wellKnownSymbol$l;var ITERATOR=wellKnownSymbol$3('iterator');var SAFE_CLOSING=false;try{var called=0;var iteratorWithReturn={next:function(){return {done:!!called++};},'return':function(){SAFE_CLOSING=true;}};iteratorWithReturn[ITERATOR]=function(){return this;};// eslint-disable-next-line no-throw-literal
|
|
126116
|
+
Array.from(iteratorWithReturn,function(){throw 2;});}catch(error){/* empty */}var checkCorrectnessOfIteration$1=function(exec,SKIP_CLOSING){if(!SKIP_CLOSING&&!SAFE_CLOSING)return false;var ITERATION_SUPPORT=false;try{var object={};object[ITERATOR]=function(){return {next:function(){return {done:ITERATION_SUPPORT=true};}};};exec(object);}catch(error){/* empty */}return ITERATION_SUPPORT;};var getBuiltIn$1=getBuiltIn$6;var engineUserAgent=getBuiltIn$1('navigator','userAgent')||'';var userAgent$1=engineUserAgent;var engineIsIos=/(iphone|ipod|ipad).*applewebkit/i.test(userAgent$1);var global$7=global$m;var fails$3$1=fails$i;var classof$3=classofRaw$1;var bind$2=functionBindContext;var html=html$2;var createElement=documentCreateElement$1;var IS_IOS$1=engineIsIos;var location$1=global$7.location;var set=global$7.setImmediate;var clear=global$7.clearImmediate;var process$3=global$7.process;var MessageChannel$1=global$7.MessageChannel;var Dispatch=global$7.Dispatch;var counter=0;var queue={};var ONREADYSTATECHANGE='onreadystatechange';var defer,channel,port;var run=function(id){// eslint-disable-next-line no-prototype-builtins
|
|
126119
126117
|
if(queue.hasOwnProperty(id)){var fn=queue[id];delete queue[id];fn();}};var runner=function(id){return function(){run(id);};};var listener=function(event){run(event.data);};var post=function(id){// old engines have not location.origin
|
|
126120
126118
|
global$7.postMessage(id+'',location$1.protocol+'//'+location$1.host);};// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
126121
126119
|
if(!set||!clear){set=function setImmediate(fn){var args=[];var i=1;while(arguments.length>i)args.push(arguments[i++]);queue[++counter]=function(){// eslint-disable-next-line no-new-func
|
|
@@ -126123,7 +126121,7 @@ if(!set||!clear){set=function setImmediate(fn){var args=[];var i=1;while(argumen
|
|
|
126123
126121
|
if(classof$3(process$3)=='process'){defer=function(id){process$3.nextTick(runner(id));};// Sphere (JS game engine) Dispatch API
|
|
126124
126122
|
}else if(Dispatch&&Dispatch.now){defer=function(id){Dispatch.now(runner(id));};// Browsers with MessageChannel, includes WebWorkers
|
|
126125
126123
|
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
126126
|
-
}else if(MessageChannel$1&&!IS_IOS$1){channel=new MessageChannel$1();port=channel.port2;channel.port1.onmessage=listener;defer=bind$
|
|
126124
|
+
}else if(MessageChannel$1&&!IS_IOS$1){channel=new MessageChannel$1();port=channel.port2;channel.port1.onmessage=listener;defer=bind$2(port.postMessage,port,1);// Browsers with postMessage, skip WebWorkers
|
|
126127
126125
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
126128
126126
|
}else if(global$7.addEventListener&&typeof postMessage=='function'&&!global$7.importScripts&&!fails$3$1(post)&&location$1.protocol!=='file:'){defer=post;global$7.addEventListener('message',listener,false);// IE8-
|
|
126129
126127
|
}else if(ONREADYSTATECHANGE in createElement('script')){defer=function(id){html.appendChild(createElement('script'))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run(id);};};// Rest old browsers
|
|
@@ -126140,8 +126138,8 @@ promise=Promise$1.resolve(undefined);then=promise.then;notify$1=function(){then.
|
|
|
126140
126138
|
// - onreadystatechange
|
|
126141
126139
|
// - setTimeout
|
|
126142
126140
|
}else {notify$1=function(){// strange IE + webpack dev server bug - use .call(global)
|
|
126143
|
-
macrotask.call(global$6,flush);};}}var microtask$1=queueMicrotask||function(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify$1();}last=task;};var newPromiseCapability$2={};var aFunction$
|
|
126144
|
-
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$
|
|
126141
|
+
macrotask.call(global$6,flush);};}}var microtask$1=queueMicrotask||function(fn){var task={fn:fn,next:undefined};if(last)last.next=task;if(!head){head=task;notify$1();}last=task;};var newPromiseCapability$2={};var aFunction$4=aFunction$7;var PromiseCapability=function(C){var resolve,reject;this.promise=new C(function($$resolve,$$reject){if(resolve!==undefined||reject!==undefined)throw TypeError('Bad Promise constructor');resolve=$$resolve;reject=$$reject;});this.resolve=aFunction$4(resolve);this.reject=aFunction$4(reject);};// 25.4.1.5 NewPromiseCapability(C)
|
|
126142
|
+
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$3=isObject$c;var newPromiseCapability$1=newPromiseCapability$2;var promiseResolve$1=function(C,x){anObject$2$1(C);if(isObject$3(x)&&x.constructor===C)return x;var promiseCapability=newPromiseCapability$1.f(C);var resolve=promiseCapability.resolve;resolve(x);return promiseCapability.promise;};var global$5=global$m;var hostReportErrors$1=function(a,b){var console=global$5.console;if(console&&console.error){arguments.length===1?console.error(a):console.error(a,b);}};var perform$1=function(exec){try{return {error:false,value:exec()};}catch(error){return {error:true,value:error};}};var global$4=global$m;var userAgent=engineUserAgent;var process$1=global$4.process;var versions=process$1&&process$1.versions;var v8=versions&&versions.v8;var match,version;if(v8){match=v8.split('.');version=match[0]+match[1];}else if(userAgent){match=userAgent.match(/Edge\/(\d+)/);if(!match||match[1]>=74){match=userAgent.match(/Chrome\/(\d+)/);if(match)version=match[1];}}var engineV8Version=version&&+version;var $$8=_export;var global$3=global$m;var getBuiltIn=getBuiltIn$6;var NativePromise=nativePromiseConstructor;var redefine$a=redefine$9.exports;var redefineAll=redefineAll$2;var setToStringTag=setToStringTag$5;var setSpecies=setSpecies$2;var isObject$2=isObject$c;var aFunction$3=aFunction$7;var anInstance=anInstance$3;var classof$1=classofRaw$1;var inspectSource=inspectSource$3;var iterate=iterate$2.exports;var checkCorrectnessOfIteration=checkCorrectnessOfIteration$1;var speciesConstructor=speciesConstructor$2;var task=task$1.set;var microtask=microtask$1;var promiseResolve=promiseResolve$1;var hostReportErrors=hostReportErrors$1;var newPromiseCapabilityModule=newPromiseCapability$2;var perform=perform$1;var InternalStateModule=internalState;var isForced=isForced_1;var wellKnownSymbol$2=wellKnownSymbol$l;var V8_VERSION=engineV8Version;var SPECIES$1=wellKnownSymbol$2('species');var PROMISE='Promise';var getInternalState=InternalStateModule.get;var setInternalState=InternalStateModule.set;var getInternalPromiseState=InternalStateModule.getterFor(PROMISE);var PromiseConstructor=NativePromise;var TypeError$1=global$3.TypeError;var document$1=global$3.document;var process$4=global$3.process;var $fetch=getBuiltIn('fetch');var newPromiseCapability=newPromiseCapabilityModule.f;var newGenericPromiseCapability=newPromiseCapability;var IS_NODE=classof$1(process$4)=='process';var DISPATCH_EVENT=!!(document$1&&document$1.createEvent&&global$3.dispatchEvent);var UNHANDLED_REJECTION='unhandledrejection';var REJECTION_HANDLED='rejectionhandled';var PENDING=0;var FULFILLED=1;var REJECTED=2;var HANDLED=1;var UNHANDLED=2;var Internal,OwnPromiseCapability,PromiseWrapper,nativeThen;var FORCED$2=isForced(PROMISE,function(){var GLOBAL_CORE_JS_PROMISE=inspectSource(PromiseConstructor)!==String(PromiseConstructor);if(!GLOBAL_CORE_JS_PROMISE){// V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
|
|
126145
126143
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
126146
126144
|
// We can't detect it synchronously, so just check versions
|
|
126147
126145
|
if(V8_VERSION===66)return true;// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
@@ -126149,31 +126147,31 @@ if(!IS_NODE&&typeof PromiseRejectionEvent!='function')return true;}// We can't u
|
|
|
126149
126147
|
// deoptimization and performance degradation
|
|
126150
126148
|
// https://github.com/zloirock/core-js/issues/679
|
|
126151
126149
|
if(V8_VERSION>=51&&/native code/.test(PromiseConstructor))return false;// Detect correctness of subclassing with @@species support
|
|
126152
|
-
var promise=PromiseConstructor.resolve(1);var FakePromise=function(exec){exec(function(){/* empty */},function(){/* empty */});};var constructor=promise.constructor={};constructor[SPECIES$
|
|
126153
|
-
var isThenable=function(it){var then;return isObject$
|
|
126150
|
+
var promise=PromiseConstructor.resolve(1);var FakePromise=function(exec){exec(function(){/* empty */},function(){/* empty */});};var constructor=promise.constructor={};constructor[SPECIES$1]=FakePromise;return !(promise.then(function(){/* empty */})instanceof FakePromise);});var INCORRECT_ITERATION=FORCED$2||!checkCorrectnessOfIteration(function(iterable){PromiseConstructor.all(iterable)['catch'](function(){/* empty */});});// helpers
|
|
126151
|
+
var isThenable=function(it){var then;return isObject$2(it)&&typeof(then=it.then)=='function'?then:false;};var notify=function(promise,state,isReject){if(state.notified)return;state.notified=true;var chain=state.reactions;microtask(function(){var value=state.value;var ok=state.state==FULFILLED;var index=0;// variable length - can't use forEach
|
|
126154
126152
|
while(chain.length>index){var reaction=chain[index++];var handler=ok?reaction.ok:reaction.fail;var resolve=reaction.resolve;var reject=reaction.reject;var domain=reaction.domain;var result,then,exited;try{if(handler){if(!ok){if(state.rejection===UNHANDLED)onHandleUnhandled(promise,state);state.rejection=HANDLED;}if(handler===true)result=value;else {if(domain)domain.enter();result=handler(value);// can throw
|
|
126155
126153
|
if(domain){domain.exit();exited=true;}}if(result===reaction.promise){reject(TypeError$1('Promise-chain cycle'));}else if(then=isThenable(result)){then.call(result,resolve,reject);}else resolve(result);}else reject(value);}catch(error){if(domain&&!exited)domain.exit();reject(error);}}state.reactions=[];state.notified=false;if(isReject&&!state.rejection)onUnhandled(promise,state);});};var dispatchEvent=function(name,promise,reason){var event,handler;if(DISPATCH_EVENT){event=document$1.createEvent('Event');event.promise=promise;event.reason=reason;event.initEvent(name,false,true);global$3.dispatchEvent(event);}else event={promise:promise,reason:reason};if(handler=global$3['on'+name])handler(event);else if(name===UNHANDLED_REJECTION)hostReportErrors('Unhandled promise rejection',reason);};var onUnhandled=function(promise,state){task.call(global$3,function(){var value=state.value;var IS_UNHANDLED=isUnhandled(state);var result;if(IS_UNHANDLED){result=perform(function(){if(IS_NODE){process$4.emit('unhandledRejection',value,promise);}else dispatchEvent(UNHANDLED_REJECTION,promise,value);});// Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
|
|
126156
|
-
state.rejection=IS_NODE||isUnhandled(state)?UNHANDLED:HANDLED;if(result.error)throw result.value;}});};var isUnhandled=function(state){return state.rejection!==HANDLED&&!state.parent;};var onHandleUnhandled=function(promise,state){task.call(global$3,function(){if(IS_NODE){process$4.emit('rejectionHandled',promise);}else dispatchEvent(REJECTION_HANDLED,promise,state.value);});};var bind=function(fn,promise,state,unwrap){return function(value){fn(promise,state,value,unwrap);};};var internalReject=function(promise,state,value,unwrap){if(state.done)return;state.done=true;if(unwrap)state=unwrap;state.value=value;state.state=REJECTED;notify(promise,state,true);};var internalResolve=function(promise,state,value,unwrap){if(state.done)return;state.done=true;if(unwrap)state=unwrap;try{if(promise===value)throw TypeError$1("Promise can't be resolved itself");var then=isThenable(value);if(then){microtask(function(){var wrapper={done:false};try{then.call(value,bind(internalResolve,promise,wrapper,state),bind(internalReject,promise,wrapper,state));}catch(error){internalReject(promise,wrapper,error,state);}});}else {state.value=value;state.state=FULFILLED;notify(promise,state,false);}}catch(error){internalReject(promise,{done:false},error,state);}};// constructor polyfill
|
|
126154
|
+
state.rejection=IS_NODE||isUnhandled(state)?UNHANDLED:HANDLED;if(result.error)throw result.value;}});};var isUnhandled=function(state){return state.rejection!==HANDLED&&!state.parent;};var onHandleUnhandled=function(promise,state){task.call(global$3,function(){if(IS_NODE){process$4.emit('rejectionHandled',promise);}else dispatchEvent(REJECTION_HANDLED,promise,state.value);});};var bind$1=function(fn,promise,state,unwrap){return function(value){fn(promise,state,value,unwrap);};};var internalReject=function(promise,state,value,unwrap){if(state.done)return;state.done=true;if(unwrap)state=unwrap;state.value=value;state.state=REJECTED;notify(promise,state,true);};var internalResolve=function(promise,state,value,unwrap){if(state.done)return;state.done=true;if(unwrap)state=unwrap;try{if(promise===value)throw TypeError$1("Promise can't be resolved itself");var then=isThenable(value);if(then){microtask(function(){var wrapper={done:false};try{then.call(value,bind$1(internalResolve,promise,wrapper,state),bind$1(internalReject,promise,wrapper,state));}catch(error){internalReject(promise,wrapper,error,state);}});}else {state.value=value;state.state=FULFILLED;notify(promise,state,false);}}catch(error){internalReject(promise,{done:false},error,state);}};// constructor polyfill
|
|
126157
126155
|
if(FORCED$2){// 25.4.3.1 Promise(executor)
|
|
126158
|
-
PromiseConstructor=function Promise(executor){anInstance(this,PromiseConstructor,PROMISE);aFunction$
|
|
126156
|
+
PromiseConstructor=function Promise(executor){anInstance(this,PromiseConstructor,PROMISE);aFunction$3(executor);Internal.call(this);var state=getInternalState(this);try{executor(bind$1(internalResolve,this,state),bind$1(internalReject,this,state));}catch(error){internalReject(this,state,error);}};// eslint-disable-next-line no-unused-vars
|
|
126159
126157
|
Internal=function Promise(executor){setInternalState(this,{type:PROMISE,done:false,notified:false,parent:false,reactions:[],rejection:false,state:PENDING,value:undefined});};Internal.prototype=redefineAll(PromiseConstructor.prototype,{// `Promise.prototype.then` method
|
|
126160
126158
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.then
|
|
126161
126159
|
then:function then(onFulfilled,onRejected){var state=getInternalPromiseState(this);var reaction=newPromiseCapability(speciesConstructor(this,PromiseConstructor));reaction.ok=typeof onFulfilled=='function'?onFulfilled:true;reaction.fail=typeof onRejected=='function'&&onRejected;reaction.domain=IS_NODE?process$4.domain:undefined;state.parent=true;state.reactions.push(reaction);if(state.state!=PENDING)notify(this,state,false);return reaction.promise;},// `Promise.prototype.catch` method
|
|
126162
126160
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.catch
|
|
126163
|
-
'catch':function(onRejected){return this.then(undefined,onRejected);}});OwnPromiseCapability=function(){var promise=new Internal();var state=getInternalState(promise);this.promise=promise;this.resolve=bind(internalResolve,promise,state);this.reject=bind(internalReject,promise,state);};newPromiseCapabilityModule.f=newPromiseCapability=function(C){return C===PromiseConstructor||C===PromiseWrapper?new OwnPromiseCapability(C):newGenericPromiseCapability(C);};if(typeof NativePromise=='function'){nativeThen=NativePromise.prototype.then;// wrap native Promise#then for native async functions
|
|
126161
|
+
'catch':function(onRejected){return this.then(undefined,onRejected);}});OwnPromiseCapability=function(){var promise=new Internal();var state=getInternalState(promise);this.promise=promise;this.resolve=bind$1(internalResolve,promise,state);this.reject=bind$1(internalReject,promise,state);};newPromiseCapabilityModule.f=newPromiseCapability=function(C){return C===PromiseConstructor||C===PromiseWrapper?new OwnPromiseCapability(C):newGenericPromiseCapability(C);};if(typeof NativePromise=='function'){nativeThen=NativePromise.prototype.then;// wrap native Promise#then for native async functions
|
|
126164
126162
|
redefine$a(NativePromise.prototype,'then',function then(onFulfilled,onRejected){var that=this;return new PromiseConstructor(function(resolve,reject){nativeThen.call(that,resolve,reject);}).then(onFulfilled,onRejected);// https://github.com/zloirock/core-js/issues/640
|
|
126165
126163
|
},{unsafe:true});// wrap fetch result
|
|
126166
|
-
if(typeof $fetch=='function')$$
|
|
126167
|
-
fetch:function fetch(input/* , init */){return promiseResolve(PromiseConstructor,$fetch.apply(global$3,arguments));}});}}$$
|
|
126168
|
-
$$
|
|
126164
|
+
if(typeof $fetch=='function')$$8({global:true,enumerable:true,forced:true},{// eslint-disable-next-line no-unused-vars
|
|
126165
|
+
fetch:function fetch(input/* , init */){return promiseResolve(PromiseConstructor,$fetch.apply(global$3,arguments));}});}}$$8({global:true,wrap:true,forced:FORCED$2},{Promise:PromiseConstructor});setToStringTag(PromiseConstructor,PROMISE,false);setSpecies(PROMISE);PromiseWrapper=getBuiltIn(PROMISE);// statics
|
|
126166
|
+
$$8({target:PROMISE,stat:true,forced:FORCED$2},{// `Promise.reject` method
|
|
126169
126167
|
// https://tc39.github.io/ecma262/#sec-promise.reject
|
|
126170
|
-
reject:function reject(r){var capability=newPromiseCapability(this);capability.reject.call(undefined,r);return capability.promise;}});$$
|
|
126168
|
+
reject:function reject(r){var capability=newPromiseCapability(this);capability.reject.call(undefined,r);return capability.promise;}});$$8({target:PROMISE,stat:true,forced:FORCED$2},{// `Promise.resolve` method
|
|
126171
126169
|
// https://tc39.github.io/ecma262/#sec-promise.resolve
|
|
126172
|
-
resolve:function resolve(x){return promiseResolve(this,x);}});$$
|
|
126170
|
+
resolve:function resolve(x){return promiseResolve(this,x);}});$$8({target:PROMISE,stat:true,forced:INCORRECT_ITERATION},{// `Promise.all` method
|
|
126173
126171
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
126174
|
-
all:function all(iterable){var C=this;var capability=newPromiseCapability(C);var resolve=capability.resolve;var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$
|
|
126172
|
+
all:function all(iterable){var C=this;var capability=newPromiseCapability(C);var resolve=capability.resolve;var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$3(C.resolve);var values=[];var counter=0;var remaining=1;iterate(iterable,function(promise){var index=counter++;var alreadyCalled=false;values.push(undefined);remaining++;$promiseResolve.call(C,promise).then(function(value){if(alreadyCalled)return;alreadyCalled=true;values[index]=value;--remaining||resolve(values);},reject);});--remaining||resolve(values);});if(result.error)reject(result.value);return capability.promise;},// `Promise.race` method
|
|
126175
126173
|
// https://tc39.github.io/ecma262/#sec-promise.race
|
|
126176
|
-
race:function race(iterable){var C=this;var capability=newPromiseCapability(C);var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$
|
|
126174
|
+
race:function race(iterable){var C=this;var capability=newPromiseCapability(C);var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$3(C.resolve);iterate(iterable,function(promise){$promiseResolve.call(C,promise).then(capability.resolve,reject);});});if(result.error)reject(result.value);return capability.promise;}});function useEventsApi(){var api=useApi();return useMemo(function(){return {getEvents:getEvents,getEvent:getEvent,getEventRecurrences:getEventRecurrences};function getEvents(filter,sortFieldBuilder){var queryString$1=queryString.stringify(__assign(__assign({},filter&&__assign({},filter)),sortFieldBuilder&&__assign({},sortFieldBuilder)));return api.custom("events?"+queryString$1).get().then(function(r){return r.body().data();});}function getEvent(id){return api.all('events').get(id).then(function(response){var eventItem=response.body().data();itemStatisticsCache[eventItem.id]=Promise.resolve(__assign({},eventItem.statistics));return eventItem;});}function getEventRecurrences(eventId,from,to){return api.all("editor/events/"+eventId+"/recurrences?"+queryString.stringify({from:from,to:to})).getAll().then(function(res){return res.body().map(function(e){return e.data();});});}},[api]);}// `SameValue` abstract operation
|
|
126177
126175
|
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
126178
126176
|
var sameValue$1=Object.is||function is(x,y){// eslint-disable-next-line no-self-compare
|
|
126179
126177
|
return x===y?x!==0||1/x===1/y:x!=x&&y!=y;};var fixRegExpWellKnownSymbolLogic$1=fixRegexpWellKnownSymbolLogic$1;var anObject$1$1=anObject$h;var requireObjectCoercible$2$1=requireObjectCoercible$b;var sameValue=sameValue$1;var regExpExec$1=regexpExecAbstract$1;// @@search logic
|
|
@@ -126181,9 +126179,9 @@ fixRegExpWellKnownSymbolLogic$1('search',1,function(SEARCH,nativeSearch,maybeCal
|
|
|
126181
126179
|
// https://tc39.github.io/ecma262/#sec-string.prototype.search
|
|
126182
126180
|
function search(regexp){var O=requireObjectCoercible$2$1(this);var searcher=regexp==undefined?undefined:regexp[SEARCH];return searcher!==undefined?searcher.call(regexp,O):new RegExp(regexp)[SEARCH](String(O));},// `RegExp.prototype[@@search]` method
|
|
126183
126181
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
|
|
126184
|
-
function(regexp){var res=maybeCallNative(nativeSearch,regexp,this);if(res.done)return res.value;var rx=anObject$1$1(regexp);var S=String(this);var previousLastIndex=rx.lastIndex;if(!sameValue(previousLastIndex,0))rx.lastIndex=0;var result=regExpExec$1(rx,S);if(!sameValue(rx.lastIndex,previousLastIndex))rx.lastIndex=previousLastIndex;return result===null?-1:result.index;}];});var $$
|
|
126182
|
+
function(regexp){var res=maybeCallNative(nativeSearch,regexp,this);if(res.done)return res.value;var rx=anObject$1$1(regexp);var S=String(this);var previousLastIndex=rx.lastIndex;if(!sameValue(previousLastIndex,0))rx.lastIndex=0;var result=regExpExec$1(rx,S);if(!sameValue(rx.lastIndex,previousLastIndex))rx.lastIndex=previousLastIndex;return result===null?-1:result.index;}];});var $$7=_export;var assign=objectAssign;// `Object.assign` method
|
|
126185
126183
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
126186
|
-
$$
|
|
126184
|
+
$$7({target:'Object',stat:true,forced:Object.assign!==assign},{assign:assign});var defaultPageSize$2=10;function fetchNewsItems(path,cacheKey,api,storage,paginationToken,filterDefinition,isArray){var _this=this;if(isArray===void 0){isArray=false;}var hasSimpleFilters=filterDefinition.beforeDate!=null||filterDefinition.keywords!=null||filterDefinition.author!=null||filterDefinition.owner!=null||filterDefinition.bookmarksOnly!=null||filterDefinition.source!=null||filterDefinition.state!=null||filterDefinition.groupId!=null||filterDefinition.includePromoted!=null||filterDefinition.unreadOnly!=null;var isSearchActive=filterDefinition.search&&filterDefinition.search.length>0;var hasChannels=filterDefinition.channels!=null&&filterDefinition.channels.length>0;var pageSize=filterDefinition.pageSize;var hasAnyFilteringApplied=hasChannels||hasSimpleFilters||isSearchActive;// Note: caching is done only for the first page (paginationToken == null)
|
|
126187
126185
|
var canCache=!hasAnyFilteringApplied&&paginationToken==null;if(isSearchActive){filterDefinition.search=filterDefinition.search.trim();}if(!hasAnyFilteringApplied){filterDefinition=null;}var params=Object.assign({},{token:paginationToken,pageSize:pageSize!==null&&pageSize!==void 0?pageSize:defaultPageSize$2},filterDefinition);var endpoint=api.all(path);var apiLoader=isArray?endpoint.getAll(params).then(function(res){return {items:res.body().map(function(r){return r.data();})};}):endpoint.get('',params).then(function(res){return res.body().data();});if(!canCache){return from(apiLoader);}return new Observable(function(observer){(function(){return __awaiter(_this,void 0,void 0,function(){var cachedPage,apiPage_1,err_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,3,,4]);return [4/*yield*/,storage.getObject(cacheKey)];case 1:cachedPage=_a.sent();if(cachedPage){validateFileAccessTokens(cachedPage,function(isTokenValid,item){if(!isTokenValid){// prevent executing requests resulting in 401 if we already know the token is not valid anymore
|
|
126188
126186
|
item.fileAccessToken=null;}});observer.next(cachedPage);}return [4/*yield*/,apiLoader];case 2:apiPage_1=_a.sent();// no need to wait for updating the cache
|
|
126189
126187
|
storage.set(cacheKey,apiPage_1).then(function(){return null;});if(!cachedPage){observer.next(apiPage_1);observer.complete();return [2/*return*/];}validateFileAccessTokens(cachedPage,function(isTokenValid,cachedItem){var apiItem=apiPage_1.items.find(function(i){return i.id===cachedItem.id;});if(apiItem&&isTokenValid){// prevent reload of the image if the old token is still valid
|
|
@@ -126209,26 +126207,26 @@ return this.getVideoElement(getMicrosoftStreamEmbedVideoUrl(this.videoInfo.id,th
|
|
|
126209
126207
|
// ></iframe>;
|
|
126210
126208
|
var _a=this.videoProperties||{},sp=_a.sp,uiconfId=_a.uiconfId,partnerId=_a.partnerId,entryId=_a.entryId;var iframe=document.createElement('iframe');iframe.setAttribute('aria-label',this.iframeAreaLabel);iframe.setAttribute('src',"https://cdnapisec.kaltura.com/p/"+this.videoInfo.id+"/sp/"+sp+"/embedIframeJs/uiconf_id/"+uiconfId+"/partner_id/"+partnerId+"?iframeembed=true&playerId=kaltura_player&entry_id="+entryId);iframe.setAttribute('frameborder','0');iframe.setAttribute('allowfullscreen','');return iframe;};VideoElementGenerator.prototype.getGenericURLVideoElement=function(){var _a;// for generic URL videos, we treat the id as the URL
|
|
126211
126209
|
var video=document.createElement('video');video.setAttribute('controls','');var source=document.createElement('source');source.setAttribute('src',(_a=this.videoInfo.url)!==null&&_a!==void 0?_a:this.videoInfo.id);if(this.autoplay){video.setAttribute('autoplay','');}if(this.width){video.setAttribute('width',this.width);}var noVideo=document.createTextNode('Your browser does not support the video tag');video.appendChild(source);video.appendChild(noVideo);return video;};VideoElementGenerator.prototype.getVideoElement=function(src){var iframe=document.createElement('iframe');iframe.setAttribute('src',src);iframe.setAttribute('frameborder','0');iframe.setAttribute('webkitallowfullscreen','');iframe.setAttribute('mozallowfullscreen','');iframe.setAttribute('allowfullscreen','');iframe.setAttribute('aria-label',this.iframeAreaLabel);return iframe;};VideoElementGenerator.prototype.getNotSupportedElement=function(){var content=document.createElement('div');content.innerText="The selected video cannot be played. The source is not supported.";return content;};VideoElementGenerator.getVideoElement=function(videoInfo,autoplay,width,iframeAreaLabel,videoProperties){var generator=new VideoElementGenerator(videoInfo,iframeAreaLabel||'',autoplay,width,videoProperties);switch(videoInfo.source){case VideoSource.YouTube:return generator.getYouTubeVideoElement();case VideoSource.Vimeo:return videoInfo.isDirectUrl?generator.getExternalVimeoVideoElement():generator.getVimeoVideoElement();case VideoSource.MicrosoftStream:return generator.getMicrosoftStreamVideoElement();case VideoSource.GenericUrl:return generator.getGenericURLVideoElement();case VideoSource.Kaltura:return generator.getKalturaVideoElement();default:return generator.getNotSupportedElement();}};VideoElementGenerator.getVideoType=function(videoInfo){switch(videoInfo.source){case VideoSource.YouTube:return 'YouTube';case VideoSource.Vimeo:return 'Vimeo';case VideoSource.MicrosoftStream:return 'Microsoft Stream';case VideoSource.GenericUrl:return 'Generic';case VideoSource.Kaltura:return 'Kaltura';default:return '';}};return VideoElementGenerator;}();var VideoView=function VideoView(_a){var videoInfo=_a.videoInfo,autoplay=_a.autoplay,width=_a.width,className=_a.className;var formatMessage=useIntl().formatMessage;var container=useRef$1();useEffect$1(function(){renderContents();// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126212
|
-
},[videoInfo.id,videoInfo.source]);return jsx$1(Host$R,{className:classNames(className,inlineObjectsClassNames.video,videoInfo.source===VideoSource.YouTube?inlineObjectsClassNames.video+"--youtube":null),ref:container,"data-is-direct-url":!!videoInfo.isDirectUrl,applyBackground:videoInfo.source===VideoSource.Vimeo&&!videoInfo.isDirectUrl},void 0);function renderContents(){var _a;if(!container.current){return;}var videoProperties=(_a=new VideoUrlParser(videoInfo.url))===null||_a===void 0?void 0:_a.videoProperties;var iframeAreaLabel=formatMessage({id:'AriaLabel.videoElementGenerator.videoPreview'},{type:VideoElementGenerator.getVideoType(videoInfo)});container.current.innerHTML='';container.current.appendChild(VideoElementGenerator.getVideoElement(videoInfo,autoplay,width,iframeAreaLabel,videoProperties));}};var Host$R=_styled.div.withConfig({displayName:"VideoView__Host",componentId:"sc-1t89fhn-0"})(templateObject_2$1q||(templateObject_2$1q=__makeTemplateObject(["\n ","\n\n &.video-view-container {\n position: relative;\n width: 100%;\n display: block;\n overflow: hidden;\n z-index: 1;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n font-size: 0; // fix for firefox\n }\n\n > * {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-is-direct-url='true'] {\n > [data-external-vimeo] {\n display: flex;\n\n > video {\n height: 100%;\n max-width: 100%;\n margin: 0 auto;\n }\n }\n }\n }\n"],["\n ","\n\n &.video-view-container {\n position: relative;\n width: 100%;\n display: block;\n overflow: hidden;\n z-index: 1;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n font-size: 0; // fix for firefox\n }\n\n > * {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-is-direct-url='true'] {\n > [data-external-vimeo] {\n display: flex;\n\n > video {\n height: 100%;\n max-width: 100%;\n margin: 0 auto;\n }\n }\n }\n }\n"])),function(p){return p.applyBackground&&css$2(templateObject_1$2d||(templateObject_1$2d=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.black);});var templateObject_1$2d,templateObject_2$1q;var VideoWithThumbnailView=function VideoWithThumbnailView(_a){var videoInfo=_a.videoInfo,videoThumbnailUrl=_a.videoThumbnailUrl,className=_a.className;var _b=useState$2(!videoInfo.isDirectUrl),showPlayer=_b[0],setShowPlayer=_b[1];if(showPlayer){return jsx$1(VideoView,{videoInfo:videoInfo,autoplay:videoInfo.isDirectUrl,className:className},void 0);}if(videoThumbnailUrl){return jsxs(Host$Q,__assign({className:className},{children:[jsx$1(StyledImage,{src:videoThumbnailUrl,imageFit:ImageFit.cover,maximizeFrame:true},void 0),jsx$1(PlayButton,{onClick:function(){return setShowPlayer(true);},iconProps:{iconName:'MSNVideosSolid'}},void 0)]}),void 0);}return null;};var Host$Q=_styled.div.withConfig({displayName:"VideoWithThumbnailView__Host",componentId:"sc-z8lt34-0"})(templateObject_1$2c||(templateObject_1$2c=__makeTemplateObject(["\n width: 100%;\n display: block;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n }\n"],["\n width: 100%;\n display: block;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n }\n"])));var StyledImage=_styled(Image$1).withConfig({displayName:"VideoWithThumbnailView__StyledImage",componentId:"sc-z8lt34-1"})(templateObject_2$1p||(templateObject_2$1p=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n"])));var PlayButton=_styled(IconButton$1).withConfig({displayName:"VideoWithThumbnailView__PlayButton",componentId:"sc-z8lt34-2"})(templateObject_3$Y||(templateObject_3$Y=__makeTemplateObject(["\n && {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n // overlay styling\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n // play icon styling\n i {\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n\n i {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n }\n"],["\n && {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n // overlay styling\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n // play icon styling\n i {\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n\n i {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n }\n"])));var templateObject_1$2c,templateObject_2$1p,templateObject_3$Y;var VideoList=function VideoList(_a){var attachments=_a.attachments,onDeleteClick=_a.onDeleteClick,className=_a.className;var formatMessage=useIntl().formatMessage;var videos=attachments.filter(function(a){return a.type===AttachmentType.YouTubeVideo||a.type===AttachmentType.VimeoVideo;});if(videos.length===0){return null;}if(onDeleteClick){return jsx$1(Host$P,__assign({className:className,"data-video-attachment-list":true},{children:videos.map(function(video){return jsx$1(AttachmentHost,__assign({domIdentifier:"video",deleteButton:jsx$1(DeleteAttachmentButton,{"data-remove-attachment-button":video.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(video);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsx$1(VideoPreview,{video:video},void 0)}),video.id);})}),void 0);}var video=videos[0];return jsx$1(PreviewHost$1,__assign({className:className,domIdentifier:"video-url-preview-"+video.id},{children:jsx$1(VideoPreview,{video:video},void 0)}),void 0);};var VideoPreview=function VideoPreview(_a){var video=_a.video;var getVideoThumbnailUrl=useVideosApi().getVideoThumbnailUrl;var token=useCurrentToken();var user=useCurrentUser();var parser=new VideoUrlParser(video.url);var source=video.type===AttachmentType.YouTubeVideo?VideoSource.YouTube:VideoSource.Vimeo;var videoThumbnailUrl=parser.isDirectVideoUrl?getVideoThumbnailUrl(token,user.subscription.id,source,video.id):null;return jsx$1(VideoWithThumbnailView,{videoInfo:{id:video.id,source:source,url:video.url,isDirectUrl:parser.isDirectVideoUrl},videoThumbnailUrl:videoThumbnailUrl},void 0);};var Host$P=_styled.div.withConfig({displayName:"VideoList__Host",componentId:"sc-1cep2pw-0"})(templateObject_1$2b||(templateObject_1$2b=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n"],["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n"])),spacingM);var PreviewHost$1=_styled(AttachmentHost).withConfig({displayName:"VideoList__PreviewHost",componentId:"sc-1cep2pw-1"})(templateObject_2$1o||(templateObject_2$1o=__makeTemplateObject(["\n margin: ","px 0 0 0;\n"],["\n margin: ","px 0 0 0;\n"])),spacingM);var templateObject_1$2b,templateObject_2$1o;var aFunction$
|
|
126213
|
-
var createMethod$4=function(IS_RIGHT){return function(that,callbackfn,argumentsLength,memo){aFunction$
|
|
126210
|
+
},[videoInfo.id,videoInfo.source]);return jsx$1(Host$R,{className:classNames(className,inlineObjectsClassNames.video,videoInfo.source===VideoSource.YouTube?inlineObjectsClassNames.video+"--youtube":null),ref:container,"data-is-direct-url":!!videoInfo.isDirectUrl,applyBackground:videoInfo.source===VideoSource.Vimeo&&!videoInfo.isDirectUrl},void 0);function renderContents(){var _a;if(!container.current){return;}var videoProperties=(_a=new VideoUrlParser(videoInfo.url))===null||_a===void 0?void 0:_a.videoProperties;var iframeAreaLabel=formatMessage({id:'AriaLabel.videoElementGenerator.videoPreview'},{type:VideoElementGenerator.getVideoType(videoInfo)});container.current.innerHTML='';container.current.appendChild(VideoElementGenerator.getVideoElement(videoInfo,autoplay,width,iframeAreaLabel,videoProperties));}};var Host$R=_styled.div.withConfig({displayName:"VideoView__Host",componentId:"sc-1t89fhn-0"})(templateObject_2$1q||(templateObject_2$1q=__makeTemplateObject(["\n ","\n\n &.video-view-container {\n position: relative;\n width: 100%;\n display: block;\n overflow: hidden;\n z-index: 1;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n font-size: 0; // fix for firefox\n }\n\n > * {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-is-direct-url='true'] {\n > [data-external-vimeo] {\n display: flex;\n\n > video {\n height: 100%;\n max-width: 100%;\n margin: 0 auto;\n }\n }\n }\n }\n"],["\n ","\n\n &.video-view-container {\n position: relative;\n width: 100%;\n display: block;\n overflow: hidden;\n z-index: 1;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n font-size: 0; // fix for firefox\n }\n\n > * {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n }\n\n &[data-is-direct-url='true'] {\n > [data-external-vimeo] {\n display: flex;\n\n > video {\n height: 100%;\n max-width: 100%;\n margin: 0 auto;\n }\n }\n }\n }\n"])),function(p){return p.applyBackground&&css$2(templateObject_1$2d||(templateObject_1$2d=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.black);});var templateObject_1$2d,templateObject_2$1q;var VideoWithThumbnailView=function VideoWithThumbnailView(_a){var videoInfo=_a.videoInfo,videoThumbnailUrl=_a.videoThumbnailUrl,className=_a.className;var _b=useState$2(!videoInfo.isDirectUrl),showPlayer=_b[0],setShowPlayer=_b[1];if(showPlayer){return jsx$1(VideoView,{videoInfo:videoInfo,autoplay:videoInfo.isDirectUrl,className:className},void 0);}if(videoThumbnailUrl){return jsxs(Host$Q,__assign({className:className},{children:[jsx$1(StyledImage,{src:videoThumbnailUrl,imageFit:ImageFit.cover,maximizeFrame:true},void 0),jsx$1(PlayButton,{onClick:function(){return setShowPlayer(true);},iconProps:{iconName:'MSNVideosSolid'}},void 0)]}),void 0);}return null;};var Host$Q=_styled.div.withConfig({displayName:"VideoWithThumbnailView__Host",componentId:"sc-z8lt34-0"})(templateObject_1$2c||(templateObject_1$2c=__makeTemplateObject(["\n width: 100%;\n display: block;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n }\n"],["\n width: 100%;\n display: block;\n position: relative;\n\n &:after {\n content: '';\n display: block;\n padding-bottom: calc(9 / 16 * 100%);\n }\n"])));var StyledImage=_styled(Image$1).withConfig({displayName:"VideoWithThumbnailView__StyledImage",componentId:"sc-z8lt34-1"})(templateObject_2$1p||(templateObject_2$1p=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n"])));var PlayButton=_styled(IconButton$1).withConfig({displayName:"VideoWithThumbnailView__PlayButton",componentId:"sc-z8lt34-2"})(templateObject_3$Y||(templateObject_3$Y=__makeTemplateObject(["\n && {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n // overlay styling\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n // play icon styling\n i {\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n\n i {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n }\n"],["\n && {\n width: 100%;\n height: 100%;\n margin: 0;\n padding: 0;\n\n // overlay styling\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n // play icon styling\n i {\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n\n i {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n }\n"])));var templateObject_1$2c,templateObject_2$1p,templateObject_3$Y;var VideoList=function VideoList(_a){var attachments=_a.attachments,onDeleteClick=_a.onDeleteClick,className=_a.className;var formatMessage=useIntl().formatMessage;var videos=attachments.filter(function(a){return a.type===AttachmentType.YouTubeVideo||a.type===AttachmentType.VimeoVideo;});if(videos.length===0){return null;}if(onDeleteClick){return jsx$1(Host$P,__assign({className:className,"data-video-attachment-list":true},{children:videos.map(function(video){return jsx$1(AttachmentHost,__assign({domIdentifier:"video",deleteButton:jsx$1(DeleteAttachmentButton,{"data-remove-attachment-button":video.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(video);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsx$1(VideoPreview,{video:video},void 0)}),video.id);})}),void 0);}var video=videos[0];return jsx$1(PreviewHost$1,__assign({className:className,domIdentifier:"video-url-preview-"+video.id},{children:jsx$1(VideoPreview,{video:video},void 0)}),void 0);};var VideoPreview=function VideoPreview(_a){var video=_a.video;var getVideoThumbnailUrl=useVideosApi().getVideoThumbnailUrl;var token=useCurrentToken();var user=useCurrentUser();var parser=new VideoUrlParser(video.url);var source=video.type===AttachmentType.YouTubeVideo?VideoSource.YouTube:VideoSource.Vimeo;var videoThumbnailUrl=parser.isDirectVideoUrl?getVideoThumbnailUrl(token,user.subscription.id,source,video.id):null;return jsx$1(VideoWithThumbnailView,{videoInfo:{id:video.id,source:source,url:video.url,isDirectUrl:parser.isDirectVideoUrl},videoThumbnailUrl:videoThumbnailUrl},void 0);};var Host$P=_styled.div.withConfig({displayName:"VideoList__Host",componentId:"sc-1cep2pw-0"})(templateObject_1$2b||(templateObject_1$2b=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n"],["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n"])),spacingM);var PreviewHost$1=_styled(AttachmentHost).withConfig({displayName:"VideoList__PreviewHost",componentId:"sc-1cep2pw-1"})(templateObject_2$1o||(templateObject_2$1o=__makeTemplateObject(["\n margin: ","px 0 0 0;\n"],["\n margin: ","px 0 0 0;\n"])),spacingM);var templateObject_1$2b,templateObject_2$1o;var aFunction$2=aFunction$7;var toObject$3=toObject$7;var IndexedObject=indexedObject;var toLength$3=toLength$a;// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
126211
|
+
var createMethod$4=function(IS_RIGHT){return function(that,callbackfn,argumentsLength,memo){aFunction$2(callbackfn);var O=toObject$3(that);var self=IndexedObject(O);var length=toLength$3(O.length);var index=IS_RIGHT?length-1:0;var i=IS_RIGHT?-1:1;if(argumentsLength<2)while(true){if(index in self){memo=self[index];index+=i;break;}index+=i;if(IS_RIGHT?index<0:length<=index){throw TypeError('Reduce of empty array with no initial value');}}for(;IS_RIGHT?index>=0:length>index;index+=i)if(index in self){memo=callbackfn(memo,self[index],index,O);}return memo;};};var arrayReduce={// `Array.prototype.reduce` method
|
|
126214
126212
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
126215
126213
|
left:createMethod$4(false),// `Array.prototype.reduceRight` method
|
|
126216
126214
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
|
126217
126215
|
right:createMethod$4(true)};var fails$2$1=fails$i;var arrayMethodIsStrict$2=function(METHOD_NAME,argument){var method=[][METHOD_NAME];return !!method&&fails$2$1(function(){// eslint-disable-next-line no-useless-call,no-throw-literal
|
|
126218
|
-
method.call(null,argument||function(){throw 1;},1);});};var DESCRIPTORS$1=descriptors;var fails$1$1=fails$i;var has$1=has$c;var defineProperty$1=Object.defineProperty;var cache={};var thrower=function(it){throw it;};var arrayMethodUsesToLength$1=function(METHOD_NAME,options){if(has$1(cache,METHOD_NAME))return cache[METHOD_NAME];if(!options)options={};var method=[][METHOD_NAME];var ACCESSORS=has$1(options,'ACCESSORS')?options.ACCESSORS:false;var argument0=has$1(options,0)?options[0]:thrower;var argument1=has$1(options,1)?options[1]:undefined;return cache[METHOD_NAME]=!!method&&!fails$1$1(function(){if(ACCESSORS&&!DESCRIPTORS$1)return true;var O={length:-1};if(ACCESSORS)defineProperty$1(O,1,{enumerable:true,get:thrower});else O[1]=1;method.call(O,argument0,argument1);});};var $$
|
|
126216
|
+
method.call(null,argument||function(){throw 1;},1);});};var DESCRIPTORS$1=descriptors;var fails$1$1=fails$i;var has$1=has$c;var defineProperty$1=Object.defineProperty;var cache={};var thrower=function(it){throw it;};var arrayMethodUsesToLength$1=function(METHOD_NAME,options){if(has$1(cache,METHOD_NAME))return cache[METHOD_NAME];if(!options)options={};var method=[][METHOD_NAME];var ACCESSORS=has$1(options,'ACCESSORS')?options.ACCESSORS:false;var argument0=has$1(options,0)?options[0]:thrower;var argument1=has$1(options,1)?options[1]:undefined;return cache[METHOD_NAME]=!!method&&!fails$1$1(function(){if(ACCESSORS&&!DESCRIPTORS$1)return true;var O={length:-1};if(ACCESSORS)defineProperty$1(O,1,{enumerable:true,get:thrower});else O[1]=1;method.call(O,argument0,argument1);});};var $$6=_export;var $reduce=arrayReduce.left;var arrayMethodIsStrict$1=arrayMethodIsStrict$2;var arrayMethodUsesToLength=arrayMethodUsesToLength$1;var STRICT_METHOD$1=arrayMethodIsStrict$1('reduce');var USES_TO_LENGTH=arrayMethodUsesToLength('reduce',{1:0});// `Array.prototype.reduce` method
|
|
126219
126217
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
126220
|
-
$$
|
|
126218
|
+
$$6({target:'Array',proto:true,forced:!STRICT_METHOD$1||!USES_TO_LENGTH},{reduce:function reduce(callbackfn/* , initialValue */){return $reduce(this,callbackfn,arguments.length,arguments.length>1?arguments[1]:undefined);}});var KeywordsInfo=function KeywordsInfo(_a){var keywords=_a.keywords,language=_a.language,className=_a.className,filterBaseUrl=_a.filterBaseUrl;var selectedKeywordGroups=useContext(LazySubscriptionContext).selectedKeywordGroups;if(selectedKeywordGroups==null){return null;}var availableKeywordGroups=selectedKeywordGroups===null||selectedKeywordGroups===void 0?void 0:selectedKeywordGroups.reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.id]=next,_a));},{});var flatKeywords=getFlatKeywordList(keywords);var hasKeywords=flatKeywords&&flatKeywords.length>0;if(!hasKeywords){return null;}return jsx$1(Host$O,__assign({"data-keywords":true},{children:renderKeywords()}),void 0);function renderKeywords(){var keywordsGroupsIds=Object.keys(keywords||[]);return keywordsGroupsIds.filter(function(id){return availableKeywordGroups[id];}).map(function(groupId){return keywords[groupId].length>0&&jsx$1(KeywordsGroup,{groupId:groupId,groupName:availableKeywordGroups[groupId].name,language:language,keywords:keywords,className:className,filterBaseUrl:filterBaseUrl},groupId);});}};var KeywordsGroup=function KeywordsGroup(_a){var groupId=_a.groupId,groupName=_a.groupName,keywords=_a.keywords,language=_a.language,className=_a.className,filterBaseUrl=_a.filterBaseUrl;return jsxs(KeywordsList$1,__assign({className:classNames('ms-fontColor-neutralSecondaryAlt',className)},{children:[jsxs(KeywordsListTitle,{children:[jsx$1(KeywordTitle,{groupName:groupName,language:language},void 0),":"]},void 0),keywords[groupId].map(function(k){var Title=jsx$1(KeywordTitle,{groupName:groupName,keywordName:k.name,language:language},void 0);return jsx$1(KeywordsListItem,{children:filterBaseUrl?jsx$1(NavLink,__assign({"data-keyword":true,className:"ms-fontColor-neutralSecondaryAlt",to:filterBaseUrl+"?"+queryString.stringify({keywords:k.id})},{children:Title}),void 0):jsxs(Fragment,{children:[" ",Title," "]},void 0)},groupName+k.name);})]}),void 0);};var Host$O=_styled.div.withConfig({displayName:"KeywordsInfo__Host",componentId:"sc-woteiy-0"})(templateObject_1$2a||(templateObject_1$2a=__makeTemplateObject(["\n padding-right: ","px;\n flex: 1; /* IE fix */\n @media (min-width: 700px) {\n padding-right: ","px;\n }\n"],["\n padding-right: ","px;\n flex: 1; /* IE fix */\n @media (min-width: 700px) {\n padding-right: ","px;\n }\n"])),spacingM,spacingXl);var KeywordsList$1=_styled.dl.withConfig({displayName:"KeywordsInfo__KeywordsList",componentId:"sc-woteiy-1"})(templateObject_2$1n||(templateObject_2$1n=__makeTemplateObject(["\n width: 100%;\n margin: 0;\n\n + dl {\n margin-top: 5px;\n }\n"],["\n width: 100%;\n margin: 0;\n\n + dl {\n margin-top: 5px;\n }\n"])));var KeywordsListTitle=_styled.dt.withConfig({displayName:"KeywordsInfo__KeywordsListTitle",componentId:"sc-woteiy-2"})(templateObject_3$X||(templateObject_3$X=__makeTemplateObject(["\n display: inline-block;\n padding-right: 5px;\n word-break: normal;\n"],["\n display: inline-block;\n padding-right: 5px;\n word-break: normal;\n"])));var KeywordsListItem=_styled.dd.withConfig({displayName:"KeywordsInfo__KeywordsListItem",componentId:"sc-woteiy-3"})(templateObject_4$H||(templateObject_4$H=__makeTemplateObject(["\n display: inline-block;\n margin: 0;\n\n text-decoration: underline;\n\n &:not(:last-child) span::after {\n content: ',';\n padding-right: 5px;\n }\n"],["\n display: inline-block;\n margin: 0;\n\n text-decoration: underline;\n\n &:not(:last-child) span::after {\n content: ',';\n padding-right: 5px;\n }\n"])));var Keywords$3=function Keywords(_a){var keywords=_a.item.keywords,filterBaseUrl=_a.filterBaseUrl,className=_a.className,useGridKeywordTitle=_a.useGridKeywordTitle;var location=useLocation$1();var currentParamsObject=queryString.parse(location.search);var selectedKeywordGroups=useContext(LazySubscriptionContext).selectedKeywordGroups;if(selectedKeywordGroups==null){return null;}var availableKeywordGroups=selectedKeywordGroups===null||selectedKeywordGroups===void 0?void 0:selectedKeywordGroups.reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.id]=next,_a));},{});var keywordsGroupsIds=Object.keys(keywords||[]);return jsx$1("span",__assign({className:className},{children:keywordsGroupsIds.filter(function(id){return availableKeywordGroups[id];}).map(function(groupId){return keywords[groupId].map(function(keyword){currentParamsObject.keywords=keyword.id;if(filterBaseUrl){return jsx$1(NavLink,__assign({"data-keyword":true,to:filterBaseUrl+"?"+queryString.stringify(currentParamsObject)},{children:useGridKeywordTitle?jsx$1(GridKeywordTitle,{keywordName:keyword.name,groupId:groupId},void 0):jsx$1(KeywordTitle,{keywordName:keyword.name,groupId:groupId,underlined:true},void 0)}),groupId+keyword.id);}return useGridKeywordTitle?jsx$1(GridKeywordTitle,{keywordName:keyword.name,groupId:groupId},groupId+keyword.id):jsx$1(KeywordTitle,{keywordName:keyword.name,groupId:groupId},groupId+keyword.id);});}).reduce(function(result,next){return result.concat(next);},[])}),void 0);};var FlatKeywords=_styled(Keywords$3).withConfig({displayName:"KeywordsInfo__FlatKeywords",componentId:"sc-woteiy-4"})(templateObject_5$B||(templateObject_5$B=__makeTemplateObject(["\n > a,\n > a:link,\n > a:visited,\n > span {\n color: ",";\n\n &:not(:last-child) {\n &::after {\n content: ', ';\n }\n }\n }\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n > a,\n > a:link,\n > a:visited,\n > span {\n color: ",";\n\n &:not(:last-child) {\n &::after {\n content: ', ';\n }\n }\n }\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$2a,templateObject_2$1n,templateObject_3$X,templateObject_4$H,templateObject_5$B;var fixRegExpWellKnownSymbolLogic$4=fixRegexpWellKnownSymbolLogic$1;var anObject$i=anObject$h;var toObject$2=toObject$7;var toLength$2=toLength$a;var toInteger$5=toInteger$4;var requireObjectCoercible$1$1=requireObjectCoercible$b;var advanceStringIndex$4=advanceStringIndex$3;var regExpExec$3=regexpExecAbstract$1;var max$1=Math.max;var min$1=Math.min;var floor=Math.floor;var SUBSTITUTION_SYMBOLS=/\$([$&'`]|\d\d?|<[^>]*>)/g;var SUBSTITUTION_SYMBOLS_NO_NAMED=/\$([$&'`]|\d\d?)/g;var maybeToString=function(it){return it===undefined?it:String(it);};// @@replace logic
|
|
126221
126219
|
fixRegExpWellKnownSymbolLogic$4('replace',2,function(REPLACE,nativeReplace,maybeCallNative,reason){var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE=reason.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE;var REPLACE_KEEPS_$0=reason.REPLACE_KEEPS_$0;var UNSAFE_SUBSTITUTE=REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE?'$':'$0';return [// `String.prototype.replace` method
|
|
126222
126220
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
|
126223
126221
|
function replace(searchValue,replaceValue){var O=requireObjectCoercible$1$1(this);var replacer=searchValue==undefined?undefined:searchValue[REPLACE];return replacer!==undefined?replacer.call(searchValue,O,replaceValue):nativeReplace.call(String(O),searchValue,replaceValue);},// `RegExp.prototype[@@replace]` method
|
|
126224
126222
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
|
126225
|
-
function(regexp,replaceValue){if(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE&&REPLACE_KEEPS_$0||typeof replaceValue==='string'&&replaceValue.indexOf(UNSAFE_SUBSTITUTE)===-1){var res=maybeCallNative(nativeReplace,regexp,this,replaceValue);if(res.done)return res.value;}var rx=anObject$i(regexp);var S=String(this);var functionalReplace=typeof replaceValue==='function';if(!functionalReplace)replaceValue=String(replaceValue);var global=rx.global;if(global){var fullUnicode=rx.unicode;rx.lastIndex=0;}var results=[];while(true){var result=regExpExec$3(rx,S);if(result===null)break;results.push(result);if(!global)break;var matchStr=String(result[0]);if(matchStr==='')rx.lastIndex=advanceStringIndex$4(S,toLength$
|
|
126223
|
+
function(regexp,replaceValue){if(!REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE&&REPLACE_KEEPS_$0||typeof replaceValue==='string'&&replaceValue.indexOf(UNSAFE_SUBSTITUTE)===-1){var res=maybeCallNative(nativeReplace,regexp,this,replaceValue);if(res.done)return res.value;}var rx=anObject$i(regexp);var S=String(this);var functionalReplace=typeof replaceValue==='function';if(!functionalReplace)replaceValue=String(replaceValue);var global=rx.global;if(global){var fullUnicode=rx.unicode;rx.lastIndex=0;}var results=[];while(true){var result=regExpExec$3(rx,S);if(result===null)break;results.push(result);if(!global)break;var matchStr=String(result[0]);if(matchStr==='')rx.lastIndex=advanceStringIndex$4(S,toLength$2(rx.lastIndex),fullUnicode);}var accumulatedResult='';var nextSourcePosition=0;for(var i=0;i<results.length;i++){result=results[i];var matched=String(result[0]);var position=max$1(min$1(toInteger$5(result.index),S.length),0);var captures=[];// NOTE: This is equivalent to
|
|
126226
126224
|
// captures = result.slice(1).map(maybeToString)
|
|
126227
126225
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
126228
126226
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
126229
126227
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
126230
126228
|
for(var j=1;j<result.length;j++)captures.push(maybeToString(result[j]));var namedCaptures=result.groups;if(functionalReplace){var replacerArgs=[matched].concat(captures,position,S);if(namedCaptures!==undefined)replacerArgs.push(namedCaptures);var replacement=String(replaceValue.apply(undefined,replacerArgs));}else {replacement=getSubstitution(matched,S,position,captures,namedCaptures,replaceValue);}if(position>=nextSourcePosition){accumulatedResult+=S.slice(nextSourcePosition,position)+replacement;nextSourcePosition=position+matched.length;}}return accumulatedResult+S.slice(nextSourcePosition);}];// https://tc39.github.io/ecma262/#sec-getsubstitution
|
|
126231
|
-
function getSubstitution(matched,str,position,captures,namedCaptures,replacement){var tailPos=position+matched.length;var m=captures.length;var symbols=SUBSTITUTION_SYMBOLS_NO_NAMED;if(namedCaptures!==undefined){namedCaptures=toObject$
|
|
126229
|
+
function getSubstitution(matched,str,position,captures,namedCaptures,replacement){var tailPos=position+matched.length;var m=captures.length;var symbols=SUBSTITUTION_SYMBOLS_NO_NAMED;if(namedCaptures!==undefined){namedCaptures=toObject$2(namedCaptures);symbols=SUBSTITUTION_SYMBOLS;}return nativeReplace.call(replacement,symbols,function(match,ch){var capture;switch(ch.charAt(0)){case'$':return '$';case'&':return matched;case'`':return str.slice(0,position);case"'":return str.slice(tailPos);case'<':capture=namedCaptures[ch.slice(1,-1)];break;default:// \d\d?
|
|
126232
126230
|
var n=+ch;if(n===0)return match;if(n>m){var f=floor(n/10);if(f===0)return match;if(f<=m)return captures[f-1]===undefined?ch.charAt(1):captures[f-1]+ch.charAt(1);return match;}capture=captures[n-1];}return capture===undefined?'':capture;});}});var NewsService=/** @class */function(){function NewsService(){}NewsService.getNewsRouteWithRedirect=function(baseRoute,newsId,newsTitle,isExternalContent){var route=!isExternalContent?baseRoute:baseRoute.replace('/news','/redirect/news');return this.getNewsRoute(route,newsId,newsTitle,isExternalContent);};NewsService.getNewsRoute=function(baseRoute,newsId,newsTitle,isExternalContent){var route=baseRoute+"/"+encodeURIComponent(newsId);if(newsTitle){route=route+"/"+slugify(newsTitle,{remove:/[%.#]/});}return isExternalContent?route+"?"+queryString.stringify({noRedirect:true}):route;};NewsService.getItemContentLanguages=function(item,languages){if(!item){return [];}return NewsService.getContentLanguages(item.contents,languages);};NewsService.getContentLanguages=function(contents,languages,contentValidator){if(!contents){return [];}var allLanguages=Object.keys(contents);if(!allLanguages.length){return [];}var activeLanguages=allLanguages.filter(function(l){return contents[l].active&&languages.find(function(sl){return sl.code===l;})&&(!contentValidator||contentValidator(contents[l]));});if(contentValidator){return activeLanguages;}return activeLanguages.length?activeLanguages:[allLanguages[0]];};NewsService.getLanguageForPublishableItem=function(item,user,contentValidator){if(!user||!item||!item.contents||!user.subscription){return null;}return NewsService.getLanguageForContent(item.contents,user,contentValidator);};NewsService.getLanguageForContent=function(contents,user,contentValidator){if(!contents){return null;}var activeLanguages=NewsService.getContentLanguages(contents,user.subscription.languages,contentValidator);return NewsService.getUserPreferredLanguage(activeLanguages,user);};NewsService.getUserPreferredLanguage=function(languages,user){if(!languages){return null;}var preferredLanguage=getPreferredContentLanguage(user);var subscription=user.subscription;if(languages.find(function(l){return l===preferredLanguage;})){return preferredLanguage;}if(languages.find(function(l){return l===subscription.defaultLanguage;})){return subscription.defaultLanguage;}return languages[0];};return NewsService;}();var ClickableOverlay=function ClickableOverlay(_a){var title=_a.title,itemId=_a.itemId,itemType=_a.itemType,baseRoute=_a.baseRoute,ariaLabelResourceKey=_a.ariaLabelResourceKey,onClick=_a.onClick,openTargetInNewWindow=_a.openTargetInNewWindow,isExternalContent=_a.isExternalContent;var formatMessage=useIntl().formatMessage;var targetRoute=itemType===ItemResourceTypes.Posts||itemType===ItemResourceTypes.Comments?baseRoute:NewsService.getNewsRoute(baseRoute,itemId,title,isExternalContent);if(openTargetInNewWindow){return jsx$1(ExternalLink$1,{href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick,"aria-label":ariaLabelResourceKey?formatMessage({id:ariaLabelResourceKey}):formatMessage({id:'AriaLabel.readMoreAbout'},{title:title}),"data-clickable-overlay":true},void 0);}return jsx$1(StyledLink$1,{to:targetRoute,onClick:onClick,"aria-label":ariaLabelResourceKey?formatMessage({id:ariaLabelResourceKey}):formatMessage({id:'AriaLabel.readMoreAbout'},{title:title}),"data-clickable-overlay":true},void 0);};var Style=css$2(templateObject_1$29||(templateObject_1$29=__makeTemplateObject(["\n width: 0;\n height: 0;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 1;\n }\n"],["\n width: 0;\n height: 0;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 1;\n }\n"])));var StyledLink$1=_styled(Link$4).withConfig({displayName:"ClickableOverlay__StyledLink",componentId:"sc-yfxl9c-0"})(templateObject_2$1m||(templateObject_2$1m=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),Style);var ExternalLink$1=_styled.a.withConfig({displayName:"ClickableOverlay__ExternalLink",componentId:"sc-yfxl9c-1"})(templateObject_3$W||(templateObject_3$W=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),Style);var templateObject_1$29,templateObject_2$1m,templateObject_3$W;var PostItemTile=function PostItemTile(_a){var post=_a.post,readOnly=_a.readOnly,backgroundColor=_a.backgroundColor,className=_a.className;var features=useFeatures();var buildPath=useSubscriptionHandlePathBuilder().buildPath;return jsxs(PostHost,__assign({className:className,backgroundColor:backgroundColor},{children:[!readOnly&&jsx$1(ClickableOverlay,{baseRoute:buildPath("/posts/"+post.id),itemId:post.id,itemType:ItemResourceTypes.Posts,ariaLabelResourceKey:"AriaLabel.itemLink"},void 0),jsxs(Header$3,{children:[jsx$1(StyledPersonaCard$3,__assign({upn:post.author.userPrincipalName,domIdentifier:"avatar"},{children:jsx$1(Avatar,{upn:post.author.userPrincipalName,text:post.author.displayName,size:PersonaSize.size40,hidePersonaDetails:true},void 0)}),void 0),jsxs(HeaderMetadata$2,{children:[jsx$1(PostDisplayName$1,__assign({"data-author":true},{children:post.author.displayName}),void 0),jsx$1(PostDateTime$1,{className:"ms-fontColor-neutralTertiary",value:post.publishingDate},void 0),jsx$1(Modified,{modified:post.modified},void 0)]},void 0)]},void 0),jsx$1(Content$8,{children:jsx$1(ContentDisplay,{content:post.content,handlers:[ContentDisplayHandler.LineBreak,ContentDisplayHandler.Link,ContentDisplayHandler.Mention,ContentDisplayHandler.Hashtag]},void 0)},void 0),features.keywords&&features.postKeywords&&post.keywords&&jsx$1(StyledKeywordsInfo$1,{keywords:post.keywords},void 0)]}),void 0);};var PostHost=_styled.div.withConfig({displayName:"PostItemTile__PostHost",componentId:"sc-yu434m-0"})(templateObject_3$V||(templateObject_3$V=__makeTemplateObject(["\n ","\n\n display: flex;\n flex-direction: column;\n\n font-size: ","px;\n padding: ","px;\n\n position: relative;\n"],["\n ","\n\n display: flex;\n flex-direction: column;\n\n font-size: ","px;\n padding: ","px;\n\n position: relative;\n"])),function(p){return p.backgroundColor?css$2(templateObject_1$28||(templateObject_1$28=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):css$2(templateObject_2$1l||(templateObject_2$1l=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.white);},fontSizeSmall,spacingM);var Header$3=_styled.div.withConfig({displayName:"PostItemTile__Header",componentId:"sc-yu434m-1"})(templateObject_4$G||(templateObject_4$G=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledPersonaCard$3=_styled(PersonaCard).withConfig({displayName:"PostItemTile__StyledPersonaCard",componentId:"sc-yu434m-2"})(templateObject_5$A||(templateObject_5$A=__makeTemplateObject(["\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var HeaderMetadata$2=_styled.div.withConfig({displayName:"PostItemTile__HeaderMetadata",componentId:"sc-yu434m-3"})(templateObject_6$p||(templateObject_6$p=__makeTemplateObject(["\n flex: 1;\n font-size: ","px;\n padding-left: ","px;\n white-space: nowrap;\n"],["\n flex: 1;\n font-size: ","px;\n padding-left: ","px;\n white-space: nowrap;\n"])),fontSizeSmall,spacingS);var PostDisplayName$1=_styled.div.withConfig({displayName:"PostItemTile__PostDisplayName",componentId:"sc-yu434m-4"})(templateObject_7$k||(templateObject_7$k=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var PostDateTime$1=_styled(DateTime).withConfig({displayName:"PostItemTile__PostDateTime",componentId:"sc-yu434m-5"})(templateObject_8$i||(templateObject_8$i=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);var Content$8=_styled.div.withConfig({displayName:"PostItemTile__Content",componentId:"sc-yu434m-6"})(templateObject_9$e||(templateObject_9$e=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var StyledKeywordsInfo$1=_styled(KeywordsInfo).withConfig({displayName:"PostItemTile__StyledKeywordsInfo",componentId:"sc-yu434m-7"})(templateObject_10$c||(templateObject_10$c=__makeTemplateObject(["\n margin-top: ","px;\n\n dd {\n text-decoration: none;\n }\n"],["\n margin-top: ","px;\n\n dd {\n text-decoration: none;\n }\n"])),spacingM);var templateObject_1$28,templateObject_2$1l,templateObject_3$V,templateObject_4$G,templateObject_5$A,templateObject_6$p,templateObject_7$k,templateObject_8$i,templateObject_9$e,templateObject_10$c;var EventLocationLink=function EventLocationLink(_a){var location=_a.location,alternativeCaption=_a.alternativeCaption,className=_a.className;var locationLink=location.url||getGoogleMapsSearchLink(location.locationOnMap);return jsx$1(Fragment,{children:locationLink?jsx$1(TextLink,__assign({url:locationLink,ariaLabel:alternativeCaption||location.name},{children:alternativeCaption||location.name}),void 0):jsx$1("span",__assign({className:className},{children:alternativeCaption||location.name}),void 0)},void 0);};var EventLocationInfo=function EventLocationInfo(_a){var locations=_a.locations,className=_a.className;if(!locations||locations.length===0){return null;}var isMultiLine=locations.length>1;return jsx$1(Host$N,__assign({className:className},{children:jsxs(ListWrapper,__assign({"data-event-locations":true,isMultiLine:isMultiLine},{children:[jsx$1(Label,{resourceKey:"Events.locationsLabel",count:locations.length},void 0),jsx$1(List$2,__assign({isMultiLine:isMultiLine},{children:locations.map(function(l){return jsx$1("li",{children:jsx$1(EventLocationLink,{location:l},void 0)},l.locationId);})}),void 0)]}),void 0)}),void 0);};var EventPeopleInfo=function EventPeopleInfo(_a){var item=_a.item,className=_a.className,hideAnnouncer=_a.hideAnnouncer;var author=item.owner||item.author;var contactsCount=item.contacts&&item.contacts.length;if(hideAnnouncer&&contactsCount===0){return null;}var isMultiLine=contactsCount>1;return jsxs(Host$N,__assign({className:className},{children:[contactsCount>0&&jsxs(Contacts$1,__assign({"data-event-people":"contacts",isMultiLine:isMultiLine,hideAnnouncer:hideAnnouncer},{children:[jsx$1(Label,{resourceKey:"Events.contactsLabel",count:contactsCount},void 0),jsx$1(List$2,__assign({isMultiLine:isMultiLine},{children:item.contacts.map(function(c){return jsx$1("li",{children:jsx$1(EventUser,{user:c,className:"ms-fontColor-accent"},void 0)},c.userPrincipalName);})}),void 0)]}),void 0),!hideAnnouncer&&author&&jsxs(ListWrapper,__assign({"data-event-people":"author",isMultiLine:false},{children:[jsx$1(Label,{resourceKey:"Events.authorLabel"},void 0),jsx$1(EventUser,{user:author,className:"ms-fontColor-accent"},void 0)]}),void 0)]}),void 0);};var EventUser=function EventUser(_a){var user=_a.user,className=_a.className;return jsx$1("div",__assign({className:className},{children:jsx$1(StyledPersonaCard$2,__assign({upn:user.userPrincipalName},{children:user.displayName}),void 0)}),void 0);};var Label=function Label(_a){var resourceKey=_a.resourceKey,count=_a.count;return jsxs("div",{children:[jsx$1(FormattedMessage$1,{id:resourceKey,values:{count:count||1}},void 0),":\u00A0"]},void 0);};var EventChannelsDisplay=function EventChannelsDisplay(_a){var _b;var item=_a.item,language=_a.language,className=_a.className,allowFilterByChannels=_a.allowFilterByChannels,channelBackgroundColor=_a.channelBackgroundColor;var buildPath=useSubscriptionHandlePathBuilder().buildPath;if(!((_b=item===null||item===void 0?void 0:item.channels)===null||_b===void 0?void 0:_b.length)){return null;}return jsx$1(Channels$2,{channels:item.channels.map(function(c){return c.name;}),language:language,buildChannelFilterUrl:allowFilterByChannels?function(c){return buildPath("/events?"+queryString.stringify({channels:c}));}:null,channelBackgroundColor:channelBackgroundColor,className:className},void 0);};var Host$N=_styled.div.withConfig({displayName:"EventMetaInfo__Host",componentId:"sc-l9y854-0"})(templateObject_1$27||(templateObject_1$27=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n"],["\n display: flex;\n flex-wrap: wrap;\n font-size: ","px;\n"])),fontSizeSmall);var ListWrapper=_styled.div.withConfig({displayName:"EventMetaInfo__ListWrapper",componentId:"sc-l9y854-1"})(templateObject_2$1k||(templateObject_2$1k=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n text-align: left;\n\n flex-direction: ",";\n\n ","\n"],["\n display: flex;\n flex-wrap: wrap;\n width: 100%;\n text-align: left;\n\n flex-direction: ",";\n\n ","\n"])),function(_a){var isMultiLine=_a.isMultiLine;return isMultiLine?'column':'row';},function(_a){var isMultiLine=_a.isMultiLine;return isMultiLine&&'> div:first-child { padding-bottom: 3px }';});var Contacts$1=_styled(ListWrapper).withConfig({displayName:"EventMetaInfo__Contacts",componentId:"sc-l9y854-2"})(templateObject_3$U||(templateObject_3$U=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),function(p){return !p.hideAnnouncer?spacingXs:0;});var StyledPersonaCard$2=_styled(PersonaCard).withConfig({displayName:"EventMetaInfo__StyledPersonaCard",componentId:"sc-l9y854-3"})(templateObject_4$F||(templateObject_4$F=__makeTemplateObject(["\n text-decoration: underline;\n"],["\n text-decoration: underline;\n"])));var List$2=_styled.ul.withConfig({displayName:"EventMetaInfo__List",componentId:"sc-l9y854-4"})(templateObject_6$o||(templateObject_6$o=__makeTemplateObject(["\n ",";\n\n &&& {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n > li {\n margin-top: ","px;\n }\n"],["\n ",";\n\n &&& {\n padding: 0;\n margin: 0;\n list-style: none;\n }\n\n > li {\n margin-top: ","px;\n }\n"])),function(_a){var isMultiLine=_a.isMultiLine;return !isMultiLine&&css$2(templateObject_5$z||(templateObject_5$z=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n "],["\n display: flex;\n flex-wrap: wrap;\n flex-direction: row;\n align-items: center;\n "])));},function(_a){var isMultiLine=_a.isMultiLine;return isMultiLine?3:0;});var Channels$2=_styled(ClickableChannelTitles).withConfig({displayName:"EventMetaInfo__Channels",componentId:"sc-l9y854-5"})(templateObject_7$j||(templateObject_7$j=__makeTemplateObject(["\n &&& li {\n margin-top: ","px;\n }\n"],["\n &&& li {\n margin-top: ","px;\n }\n"])),spacingS);var templateObject_1$27,templateObject_2$1k,templateObject_3$U,templateObject_4$F,templateObject_5$z,templateObject_6$o,templateObject_7$j;var BannerImage=function BannerImage(_a){var imageUrl=_a.imageUrl,children=_a.children,className=_a.className,openImageUrl=_a.openImageUrl;return jsxs(Host$M,__assign({onClick:function(){return openImageUrl&&showPhoto();},className:classNames('bannerImage',className)},{children:[jsx$1(Image$1,{src:imageUrl,imageFit:ImageFit.cover,maximizeFrame:true,alt:""},void 0),children]}),void 0);};var Host$M=_styled.div.withConfig({displayName:"BannerImage__Host",componentId:"sc-1wfmp37-0"})(templateObject_1$26||(templateObject_1$26=__makeTemplateObject(["\n position: relative;\n height: inherit;\n\n /*\n The UI Fabric image component has a bug that it shows 1px on the left/ top\n or right side of the background when applying their cross browser image-fit: cover.\n This result in 1px gray/white \"border\".\n We just add 1px to the image width & height to cover this gap\n */\n .ms-Image {\n img {\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n }\n }\n"],["\n position: relative;\n height: inherit;\n\n /*\n The UI Fabric image component has a bug that it shows 1px on the left/ top\n or right side of the background when applying their cross browser image-fit: cover.\n This result in 1px gray/white \"border\".\n We just add 1px to the image width & height to cover this gap\n */\n .ms-Image {\n img {\n width: calc(100% + 1px);\n height: calc(100% + 1px);\n }\n }\n"])));var templateObject_1$26;function useImageEditorApi(){var api=useApi();var _a=useApiFactory(),createApiUrl=_a.createApiUrl,fetchFromApi=_a.fetchFromApi;var onRequestToken=useContext(AuthenticationContext).onRequestToken;return useMemo(function(){return {getImageInfo:getImageInfo,getImageEditorUrl:getImageEditorUrl,getOriginalImageEditorUrlWithToken:getOriginalImageEditorUrlWithToken,getImageEditorUrlWithToken:getImageEditorUrlWithToken,uploadImage:uploadImage};/**
|
|
126233
126231
|
* Retrieve information on a given image. Does not return the actual image.
|
|
126234
126232
|
*/function getImageInfo(itemId,identifier,resourceType){var path="editor/"+resourceType+"/"+itemId+"/images/"+identifier;return api.custom(path+"/info").get().then(function(res){return res.body().data();});}function getImageEditorUrl(itemId,subscriptionId,identifier,resourceType){return __awaiter(this,void 0,void 0,function(){var token;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,onRequestToken()];case 1:token=_a.sent();return [2/*return*/,getImageEditorUrlWithToken(token,itemId,subscriptionId,identifier,resourceType)];}});});}function getImageEditorUrlWithToken(token,itemId,subscriptionId,identifier,resourceType,width,height){var url=width?"/editor/"+resourceType+"/"+itemId+"/images/"+identifier+"/"+width+"/"+(height||''):"/editor/"+resourceType+"/"+itemId+"/images/"+identifier;return createApiUrl(url,{access_token:token,subscriptionId:subscriptionId});}function getOriginalImageEditorUrlWithToken(token,itemId,subscriptionId,identifier,resourceType){return createApiUrl("/editor/"+resourceType+"/"+itemId+"/images/"+identifier+"/original",{access_token:token,subscriptionId:subscriptionId});}function uploadImage(subscriptionId,resourceType,newImage){return __awaiter(this,void 0,void 0,function(){var fd,token,config;return __generator(this,function(_a){switch(_a.label){case 0:// validate or set defaults
|
|
@@ -126237,10 +126235,10 @@ newImage.identifier='banner';}fd=new FormData();fd.append('image',newImage.image
|
|
|
126237
126235
|
// any promise failures are expected be handled from the code consuming the observable
|
|
126238
126236
|
return [4/*yield*/,fetchFromApi("/editor/"+resourceType+"/"+newImage.itemId+"/images/"+newImage.identifier+"/"+newImage.variant,config)];case 2:// error handling is not done here
|
|
126239
126237
|
// any promise failures are expected be handled from the code consuming the observable
|
|
126240
|
-
_a.sent();return [2/*return*/,{itemId:newImage.itemId,identifier:newImage.identifier,mimeType:newImage.image.type,extension:newImage.image.name.split('.').pop()}];}});});}},[api,createApiUrl,fetchFromApi,onRequestToken]);}var PublishableItemBanner=function PublishableItemBanner(props){var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var _a=useVideosApi(),getBannerVideoThumbnailUrl=_a.getBannerVideoThumbnailUrl,getVideoThumbnailUrl=_a.getVideoThumbnailUrl;var getImageEditorUrlWithToken=useImageEditorApi().getImageEditorUrlWithToken;var _b=useState$2(false),showPlayer=_b[0],setShowPlayer=_b[1];var user=useCurrentUser();var features=useFeatures();var onOpenExternalLink=useContext(LinkContext).onOpenExternalLink;var formatMessage=useIntl().formatMessage;useEffect$1(function(){if(props.hidePlayerIfActive){setShowPlayer(false);}},[props.hidePlayerIfActive]);if(!props.token||!props.bannerInfo){return null;}var isEdit=props.mode==='edit';var isImage=props.bannerInfo.type==='image';var imageUrl=getImageUrl(isEdit,isImage,props.width,props.height);var isStreamVideo=props.bannerInfo.videoSource===VideoSource.MicrosoftStream;var streamVideoUrl=isStreamVideo&&getMicrosoftStreamVideoUrl(props.bannerInfo.videoId);var isPlayableVideo=!isImage&&!(isStreamVideo&&env.isNativeMobileApp);if(isPlayableVideo&&showPlayer){return jsx$1(StyledVideoView,{videoInfo:{id:props.bannerInfo.videoId,source:props.bannerInfo.videoSource,url:props.bannerInfo.videoUrl,isDirectUrl:props.bannerInfo.isDirectVideoUrl},autoplay:true,className:props.className},void 0);}return jsxs(StyledBannerImage,__assign({isVideo:!isImage,imageUrl:imageUrl,openImageUrl:props.canOpenImage&&env.isNativeMobileApp?getImageUrl(isEdit,true,'default'):null,className:props.className},{children:[isPlayableVideo&&jsx$1(VideoButtonOverlay,{onClick:handlePlayClick,iconProps:{iconName:'MSNVideosSolid',className:'video-icon'},ariaLabel:formatMessage({id:'Generic.watchVideo'})},void 0),isStreamVideo&&env.isNativeMobileApp&&(features.inAppBrowser?jsx$1(VideoLinkOverlay,__assign({url:streamVideoUrl,onClick:function(e){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:e.stopPropagation();e.preventDefault();return [4/*yield*/,onOpenExternalLink(streamVideoUrl)];case 1:_a.sent();return [2/*return*/];}});});},ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsx$1(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0):jsx$1(VideoLinkOverlay,__assign({url:streamVideoUrl,ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsx$1(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0))]}),void 0);function getImageUrl(isEdit,isImage,width,height){var _a;if(isImage){return isEdit?getImageEditorUrlWithToken(props.token,props.itemId,user.subscription.id,props.bannerInfo.imageId,props.resourceType):getImageUrlWithToken(props.token,props.itemId,user.subscription.id,props.resourceType,props.bannerInfo.imageId,width,height);}else {return (_a=new VideoUrlParser(props.bannerInfo.videoUrl).thumbnailUrl)!==null&&_a!==void 0?_a:isEdit?getVideoThumbnailUrl(props.token,user.subscription.id,props.bannerInfo.videoSource,props.bannerInfo.videoId):getBannerVideoThumbnailUrl(props.token,props.itemId,user.subscription.id,props.resourceType);}}function handlePlayClick(e){var _a;e.stopPropagation();e.preventDefault();setShowPlayer(true);(_a=props.onPlayButtonClick)===null||_a===void 0?void 0:_a.call(props);}};var StyledBannerImage=_styled(BannerImage).withConfig({displayName:"PublishableItemBanner__StyledBannerImage",componentId:"sc-bjnycc-0"})(templateObject_2$1j||(templateObject_2$1j=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.isVideo&&css$2(templateObject_1$25||(templateObject_1$25=__makeTemplateObject(["\n position: relative;\n "],["\n position: relative;\n "])));});var BannerVideoOverlay=css$2(templateObject_3$T||(templateObject_3$T=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n .video-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &:hover {\n .video-icon {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n .video-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &:hover {\n .video-icon {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"])));var VideoIconStyle=css$2(templateObject_4$E||(templateObject_4$E=__makeTemplateObject(["\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n"],["\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n"])));var VideoButtonOverlay=_styled(IconButton$1).withConfig({displayName:"PublishableItemBanner__VideoButtonOverlay",componentId:"sc-bjnycc-1"})(templateObject_5$y||(templateObject_5$y=__makeTemplateObject(["\n && {\n width: 100%;\n height: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n z-index: 1;\n border-radius: 0;\n\n ","\n\n i.video-icon {\n ","\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n }\n }\n"],["\n && {\n width: 100%;\n height: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n z-index: 1;\n border-radius: 0;\n\n ","\n\n i.video-icon {\n ","\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n }\n }\n"])),BannerVideoOverlay,VideoIconStyle);var VideoLinkOverlay=_styled(ExternalLinkHandler).withConfig({displayName:"PublishableItemBanner__VideoLinkOverlay",componentId:"sc-bjnycc-2"})(templateObject_6$n||(templateObject_6$n=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),BannerVideoOverlay);var VideoIcon=_styled(Icon).withConfig({displayName:"PublishableItemBanner__VideoIcon",componentId:"sc-bjnycc-3"})(templateObject_7$i||(templateObject_7$i=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),VideoIconStyle);var StyledVideoView=_styled(VideoView).withConfig({displayName:"PublishableItemBanner__StyledVideoView",componentId:"sc-bjnycc-4"})(templateObject_8$h||(templateObject_8$h=__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"])));var templateObject_1$25,templateObject_2$1j,templateObject_3$T,templateObject_4$E,templateObject_5$y,templateObject_6$n,templateObject_7$i,templateObject_8$h;var EventCardBanner=function EventCardBanner(_a){var item=_a.item,bannerWidth=_a.bannerWidth,bannerHostDefaultWidth=_a.bannerHostDefaultWidth,showPlaceholder=_a.showPlaceholder;if(!item.bannerInfo&&!showPlaceholder){return null;}return jsx$1("div",{children:jsx$1(LeftBannerWrapper,__assign({defaultWidth:bannerHostDefaultWidth,showPlaceholder:showPlaceholder},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:item.bannerInfo,mode:"read",width:bannerWidth,token:item.fileAccessToken,resourceType:ItemResourceTypes.Events},void 0)}),void 0)},void 0);};var FeedbackCountButton=function FeedbackCountButton(_a){var className=_a.className,isActive=_a.isActive,activeIconName=_a.activeIconName,count=_a.count,iconName=_a.iconName,onClick=_a.onClick,readOnly=_a.readOnly,tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceKeyValues=_a.tooltipResourceKeyValues,activeTooltipResourceKey=_a.activeTooltipResourceKey,activeTooltipResourceKeyValues=_a.activeTooltipResourceKeyValues,ariaLabel=_a.ariaLabel,feedbackType=_a.feedbackType,highlight=_a.highlight,hideZeroCount=_a.hideZeroCount,doNotRenderZeroCount=_a.doNotRenderZeroCount,hideTooltip=_a.hideTooltip;var resourceKey=isActive?activeTooltipResourceKey||tooltipResourceKey:tooltipResourceKey;var resourceValues=isActive?activeTooltipResourceKeyValues||tooltipResourceKeyValues:tooltipResourceKeyValues;return jsxs(CountButtonHost,__assign({className:className,"data-feedback":feedbackType,"data-feedback-button-isactive":isActive!==null&&isActive!==void 0?isActive:false,"data-feedback-count":count},{children:[jsx$1(IEMarginFix,{},void 0),jsx$1(PreloadIcons,{icons:[activeIconName,iconName]},void 0),jsx$1(TooltipHost,__assign({resourceKey:resourceKey,values:resourceValues,hidden:hideTooltip},{children:onClick?jsx$1(StyledIconButton$6,__assign({onClick:onClick,iconProps:{iconName:isActive?activeIconName:iconName},"data-feedback-button":feedbackType,disabled:readOnly,highlight:highlight,"data-unread-comment-highlight":highlight,ariaLabel:ariaLabel},{children:jsx$1(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount},void 0)}),void 0):jsxs(Fragment,{children:[jsx$1(StyledIcon$7,{iconName:isActive?activeIconName:iconName,highlight:highlight,"data-unread-comment-highlight":highlight},void 0),jsx$1(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount,ariaLabel:ariaLabel},void 0)]},void 0)}),void 0)]}),void 0);};var CountDisplay=function CountDisplay(_a){var count=_a.count,hideZeroCount=_a.hideZeroCount,doNotRenderZeroCount=_a.doNotRenderZeroCount,ariaLabel=_a.ariaLabel;var shouldNotRenderZeroCount=doNotRenderZeroCount&&!count;if(shouldNotRenderZeroCount){return null;}var shouldHideZeroCount=hideZeroCount&&!count;return jsx$1(CountLabel,__assign({isHidden:shouldHideZeroCount,"aria-label":ariaLabel},{children:count}),void 0);};var TooltipHost=_styled(Tooltip).withConfig({displayName:"FeedbackCountButton__TooltipHost",componentId:"sc-vg1ry1-0"})(templateObject_1$24||(templateObject_1$24=__makeTemplateObject(["\n && {\n display: flex;\n height: 100%;\n align-items: center;\n }\n"],["\n && {\n display: flex;\n height: 100%;\n align-items: center;\n }\n"])));var CountButtonHost=_styled.div.withConfig({displayName:"FeedbackCountButton__CountButtonHost",componentId:"sc-vg1ry1-1"})(templateObject_2$1i||(templateObject_2$1i=__makeTemplateObject(["\n display: flex;\n align-items: center;\n min-width: 60px;\n height: ","px; // ensure same height for feedback buttons\n\n margin-right: 9px;\n"],["\n display: flex;\n align-items: center;\n min-width: 60px;\n height: ","px; // ensure same height for feedback buttons\n\n margin-right: 9px;\n"])),feedbackButtonHeight);var IEMarginFix=createGlobalStyle(templateObject_3$S||(templateObject_3$S=__makeTemplateObject(["\n .browser-name-ie {\n "," {\n margin-right: 20px;\n }\n }\n"],["\n .browser-name-ie {\n "," {\n margin-right: 20px;\n }\n }\n"])),CountButtonHost);var StyledIconButton$6=_styled(IconButton).withConfig({displayName:"FeedbackCountButton__StyledIconButton",componentId:"sc-vg1ry1-2"})(templateObject_4$D||(templateObject_4$D=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n width: 100%;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 22px;\n margin: 0;\n ","\n }\n\n user-select: none;\n"],["\n && {\n margin: 0;\n padding: 0;\n width: 100%;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 22px;\n margin: 0;\n ","\n }\n\n user-select: none;\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var StyledIcon$7=_styled(Icon).withConfig({displayName:"FeedbackCountButton__StyledIcon",componentId:"sc-vg1ry1-3"})(templateObject_5$x||(templateObject_5$x=__makeTemplateObject(["\n font-size: 22px;\n user-select: none;\n\n ","\n"],["\n font-size: 22px;\n user-select: none;\n\n ","\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var CountLabel=_styled.span.withConfig({displayName:"FeedbackCountButton__CountLabel",componentId:"sc-vg1ry1-4"})(templateObject_8$g||(templateObject_8$g=__makeTemplateObject(["\n margin-left: 7px;\n word-break: normal;\n align-self: center;\n ","\n ","\n"],["\n margin-left: 7px;\n word-break: normal;\n align-self: center;\n ","\n ","\n"])),function(p){return p.isHidden&&css$2(templateObject_6$m||(templateObject_6$m=__makeTemplateObject(["\n visibility: hidden;\n "],["\n visibility: hidden;\n "])));},function(p){return p.isDisabled&&css$2(templateObject_7$h||(templateObject_7$h=__makeTemplateObject(["\n color: ",";\n "],["\n color: ",";\n "])),p.theme.palette.neutralQuaternary);});var PreloadIcons=function PreloadIcons(_a){var icons=_a.icons;return jsx$1(Fragment,{children:icons.filter(function(i){return i;}).map(function(i){return jsx$1(PreloadIcon,{iconName:i},i);})},void 0);};var PreloadIcon=_styled(Icon).withConfig({displayName:"FeedbackCountButton__PreloadIcon",componentId:"sc-vg1ry1-5"})(templateObject_9$d||(templateObject_9$d=__makeTemplateObject(["\n position: fixed;\n left: -500px;\n"],["\n position: fixed;\n left: -500px;\n"])));var templateObject_1$24,templateObject_2$1i,templateObject_3$S,templateObject_4$D,templateObject_5$x,templateObject_6$m,templateObject_7$h,templateObject_8$g,templateObject_9$d;var EventCardCommentCount=function EventCardCommentCount(_a){var item=_a.item;var formatMessage=useIntl().formatMessage;return jsxs(Fragment,{children:[jsx$1(IEFix$1,{},void 0),jsx$1(StyledFeedbackCountButton,{tooltipResourceKey:"Events.numberOfComments",tooltipResourceKeyValues:{count:item.statistics.commentCount},ariaLabel:formatMessage({id:'AriaLabel.commentsButton'}),iconName:"Chat",count:item.statistics.commentCount,feedbackType:"comment",highlight:item.hasNewComments,className:"event-card-comments"},void 0)]},void 0);};var StyledFeedbackCountButton=_styled(FeedbackCountButton).withConfig({displayName:"EventCardCommentCount__StyledFeedbackCountButton",componentId:"sc-3prmx8-0"})(templateObject_1$23||(templateObject_1$23=__makeTemplateObject(["\n && {\n min-width: 0;\n margin-right: 0;\n }\n"],["\n && {\n min-width: 0;\n margin-right: 0;\n }\n"])));var IEFix$1=createGlobalStyle(templateObject_2$1h||(templateObject_2$1h=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-comments {\n margin-right: 0 !important;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-comments {\n margin-right: 0 !important;\n }\n }\n"])));var templateObject_1$23,templateObject_2$1h;var EventCancelInformation=function EventCancelInformation(_a){var _b;var item=_a.item,language=_a.language,className=_a.className;var user=useCurrentUser();if(!((_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled)){return null;}var contents=item.cancelInformation.reasons||{};var reason=contents[language]||contents[NewsService.getUserPreferredLanguage(Object.keys(contents),user)]||Object.values(contents)[0];return jsxs(Host$L,__assign({className:className,"data-event-cancelled-info":true},{children:[jsxs(TitleContainer,{children:[jsx$1(CancelIcon,{iconName:"RemoveEvent"},void 0),jsx$1(Title$8,{id:"Events.cancel.cancelled"},void 0)]},void 0),reason]}),void 0);};var Host$L=_styled.div.withConfig({displayName:"EventCancelInformation__Host",componentId:"sc-rh6578-0"})(templateObject_1$22||(templateObject_1$22=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n margin-top: ","px;\n\n font-size: ","px;\n\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ",";\n opacity: 0.1;\n }\n"],["\n position: relative;\n padding: ","px;\n margin-top: ","px;\n\n font-size: ","px;\n\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ",";\n opacity: 0.1;\n }\n"])),spacingM,spacingS,fontSizeSmall,function(p){return p.theme.palette.red;});var TitleContainer=_styled.div.withConfig({displayName:"EventCancelInformation__TitleContainer",componentId:"sc-rh6578-1"})(templateObject_2$1g||(templateObject_2$1g=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n\n color: ",";\n\n *:not(:first-child) {\n padding-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n\n color: ",";\n\n *:not(:first-child) {\n padding-left: ","px;\n }\n"])),spacingXs,function(p){return p.theme.palette.redDark;},spacingXs);var CancelIcon=_styled(Icon).withConfig({displayName:"EventCancelInformation__CancelIcon",componentId:"sc-rh6578-2"})(templateObject_3$R||(templateObject_3$R=__makeTemplateObject(["\n font-size: 20px;\n"],["\n font-size: 20px;\n"])));var Title$8=_styled(FormattedMessageWithStyle).withConfig({displayName:"EventCancelInformation__Title",componentId:"sc-rh6578-3"})(templateObject_4$C||(templateObject_4$C=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$22,templateObject_2$1g,templateObject_3$R,templateObject_4$C;var EventUserRegistrationContext=/*#__PURE__*/createContext(null);function getDeadlineInfos(item){var hasDeadline=item.registrationSettings.deadline!=null;var isPastDeadline=hasDeadline&&moment(item.registrationSettings.deadline).isBefore(moment());return {hasDeadline:hasDeadline,isPastDeadline:isPastDeadline};}var EventRegistrationButton=function EventRegistrationButton(_a){var isRegistered=_a.isRegistered,className=_a.className,disabled=_a.disabled,onClick=_a.onClick,showInfoMessage=_a.showInfoMessage,infoMessageResourceKey=_a.infoMessageResourceKey;var formatMessage=useIntl().formatMessage;return jsxs(Host$K,__assign({className:className,"aria-label":formatMessage({id:'Events.registration.sectionLabel'})},{children:[jsx$1(RegisterButton,{text:formatMessage({id:isRegistered?'Events.registration.deregisterButtonCaption':'Events.registration.registerButtonCaption'}),disabled:disabled,"data-event-register-button":!!isRegistered,onClick:function(e){e.preventDefault();onClick();},isRegistered:isRegistered},void 0),showInfoMessage&&jsxs(InfoMessage,__assign({"data-event-register-info":true},{children:[jsx$1(Icon,{iconName:"Info"},void 0),jsx$1(FormattedMessage$1,{id:infoMessageResourceKey},void 0)]}),void 0)]}),void 0);};var Host$K=_styled.div.withConfig({displayName:"EventRegistrationButton__Host",componentId:"sc-rvaf0t-0"})(templateObject_1$21||(templateObject_1$21=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var RegisterButton=_styled(PrimaryButton).withConfig({displayName:"EventRegistrationButton__RegisterButton",componentId:"sc-rvaf0t-1"})(templateObject_4$B||(templateObject_4$B=__makeTemplateObject(["\n && {\n min-width: 200px;\n border: 0;\n &:hover {\n border: 0;\n }\n ","\n ","\n }\n"],["\n && {\n min-width: 200px;\n border: 0;\n &:hover {\n border: 0;\n }\n ","\n ","\n }\n"])),function(p){return p.disabled&&css$2(templateObject_2$1f||(templateObject_2$1f=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.neutralQuaternaryAlt);},function(p){return p.isRegistered&&css$2(templateObject_3$Q||(templateObject_3$Q=__makeTemplateObject(["\n &:not([disabled]) {\n background-color: ",";\n color: #fff;\n\n &:hover {\n background-color: ",";\n }\n }\n "],["\n &:not([disabled]) {\n background-color: ",";\n color: #fff;\n\n &:hover {\n background-color: ",";\n }\n }\n "])),p.theme.palette.red,p.theme.palette.redDark);});var InfoMessage=_styled.span.withConfig({displayName:"EventRegistrationButton__InfoMessage",componentId:"sc-rvaf0t-2"})(templateObject_5$w||(templateObject_5$w=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"])),spacingXs,fontSizeSmall,spacingXs);var templateObject_1$21,templateObject_2$1f,templateObject_3$Q,templateObject_4$B,templateObject_5$w;var $$4=_export;var DESCRIPTORS=descriptors;var global$2=global$m;var has=has$c;var isObject=isObject$b;var defineProperty=objectDefineProperty.f;var copyConstructorProperties=copyConstructorProperties$2;var NativeSymbol=global$2.Symbol;if(DESCRIPTORS&&typeof NativeSymbol=='function'&&(!('description'in NativeSymbol.prototype)||// Safari 12 bug
|
|
126238
|
+
_a.sent();return [2/*return*/,{itemId:newImage.itemId,identifier:newImage.identifier,mimeType:newImage.image.type,extension:newImage.image.name.split('.').pop()}];}});});}},[api,createApiUrl,fetchFromApi,onRequestToken]);}var PublishableItemBanner=function PublishableItemBanner(props){var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var _a=useVideosApi(),getBannerVideoThumbnailUrl=_a.getBannerVideoThumbnailUrl,getVideoThumbnailUrl=_a.getVideoThumbnailUrl;var getImageEditorUrlWithToken=useImageEditorApi().getImageEditorUrlWithToken;var _b=useState$2(false),showPlayer=_b[0],setShowPlayer=_b[1];var user=useCurrentUser();var features=useFeatures();var onOpenExternalLink=useContext(LinkContext).onOpenExternalLink;var formatMessage=useIntl().formatMessage;useEffect$1(function(){if(props.hidePlayerIfActive){setShowPlayer(false);}},[props.hidePlayerIfActive]);if(!props.token||!props.bannerInfo){return null;}var isEdit=props.mode==='edit';var isImage=props.bannerInfo.type==='image';var imageUrl=getImageUrl(isEdit,isImage,props.width,props.height);var isStreamVideo=props.bannerInfo.videoSource===VideoSource.MicrosoftStream;var streamVideoUrl=isStreamVideo&&getMicrosoftStreamVideoUrl(props.bannerInfo.videoId);var isPlayableVideo=!isImage&&!(isStreamVideo&&env.isNativeMobileApp);if(isPlayableVideo&&showPlayer){return jsx$1(StyledVideoView,{videoInfo:{id:props.bannerInfo.videoId,source:props.bannerInfo.videoSource,url:props.bannerInfo.videoUrl,isDirectUrl:props.bannerInfo.isDirectVideoUrl},autoplay:true,className:props.className},void 0);}return jsxs(StyledBannerImage,__assign({isVideo:!isImage,imageUrl:imageUrl,openImageUrl:props.canOpenImage&&env.isNativeMobileApp?getImageUrl(isEdit,true,'default'):null,className:props.className},{children:[isPlayableVideo&&jsx$1(VideoButtonOverlay,{onClick:handlePlayClick,iconProps:{iconName:'MSNVideosSolid',className:'video-icon'},ariaLabel:formatMessage({id:'Generic.watchVideo'})},void 0),isStreamVideo&&env.isNativeMobileApp&&(features.inAppBrowser?jsx$1(VideoLinkOverlay,__assign({url:streamVideoUrl,onClick:function(e){return __awaiter(void 0,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:e.stopPropagation();e.preventDefault();return [4/*yield*/,onOpenExternalLink(streamVideoUrl)];case 1:_a.sent();return [2/*return*/];}});});},ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsx$1(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0):jsx$1(VideoLinkOverlay,__assign({url:streamVideoUrl,ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsx$1(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0))]}),void 0);function getImageUrl(isEdit,isImage,width,height){var _a;if(isImage){return isEdit?getImageEditorUrlWithToken(props.token,props.itemId,user.subscription.id,props.bannerInfo.imageId,props.resourceType):getImageUrlWithToken(props.token,props.itemId,user.subscription.id,props.resourceType,props.bannerInfo.imageId,width,height);}else {return (_a=new VideoUrlParser(props.bannerInfo.videoUrl).thumbnailUrl)!==null&&_a!==void 0?_a:isEdit?getVideoThumbnailUrl(props.token,user.subscription.id,props.bannerInfo.videoSource,props.bannerInfo.videoId):getBannerVideoThumbnailUrl(props.token,props.itemId,user.subscription.id,props.resourceType);}}function handlePlayClick(e){var _a;e.stopPropagation();e.preventDefault();setShowPlayer(true);(_a=props.onPlayButtonClick)===null||_a===void 0?void 0:_a.call(props);}};var StyledBannerImage=_styled(BannerImage).withConfig({displayName:"PublishableItemBanner__StyledBannerImage",componentId:"sc-bjnycc-0"})(templateObject_2$1j||(templateObject_2$1j=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.isVideo&&css$2(templateObject_1$25||(templateObject_1$25=__makeTemplateObject(["\n position: relative;\n "],["\n position: relative;\n "])));});var BannerVideoOverlay=css$2(templateObject_3$T||(templateObject_3$T=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n .video-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &:hover {\n .video-icon {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n\n background-color: rgba(0, 0, 0, 0.33);\n\n .video-icon {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\n &:hover {\n .video-icon {\n color: rgba(255, 255, 255, 0.85);\n }\n }\n"])));var VideoIconStyle=css$2(templateObject_4$E||(templateObject_4$E=__makeTemplateObject(["\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n"],["\n font-size: 50px;\n color: rgba(255, 255, 255, 0.5);\n"])));var VideoButtonOverlay=_styled(IconButton$1).withConfig({displayName:"PublishableItemBanner__VideoButtonOverlay",componentId:"sc-bjnycc-1"})(templateObject_5$y||(templateObject_5$y=__makeTemplateObject(["\n && {\n width: 100%;\n height: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n z-index: 1;\n border-radius: 0;\n\n ","\n\n i.video-icon {\n ","\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n }\n }\n"],["\n && {\n width: 100%;\n height: 100%;\n border: 0;\n margin: 0;\n padding: 0;\n z-index: 1;\n border-radius: 0;\n\n ","\n\n i.video-icon {\n ","\n }\n\n &&:hover {\n background-color: rgba(0, 0, 0, 0.33);\n }\n }\n"])),BannerVideoOverlay,VideoIconStyle);var VideoLinkOverlay=_styled(ExternalLinkHandler).withConfig({displayName:"PublishableItemBanner__VideoLinkOverlay",componentId:"sc-bjnycc-2"})(templateObject_6$n||(templateObject_6$n=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),BannerVideoOverlay);var VideoIcon=_styled(Icon).withConfig({displayName:"PublishableItemBanner__VideoIcon",componentId:"sc-bjnycc-3"})(templateObject_7$i||(templateObject_7$i=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),VideoIconStyle);var StyledVideoView=_styled(VideoView).withConfig({displayName:"PublishableItemBanner__StyledVideoView",componentId:"sc-bjnycc-4"})(templateObject_8$h||(templateObject_8$h=__makeTemplateObject(["\n height: 100%;\n"],["\n height: 100%;\n"])));var templateObject_1$25,templateObject_2$1j,templateObject_3$T,templateObject_4$E,templateObject_5$y,templateObject_6$n,templateObject_7$i,templateObject_8$h;var EventCardBanner=function EventCardBanner(_a){var item=_a.item,bannerWidth=_a.bannerWidth,bannerHostDefaultWidth=_a.bannerHostDefaultWidth,showPlaceholder=_a.showPlaceholder;if(!item.bannerInfo&&!showPlaceholder){return null;}return jsx$1("div",{children:jsx$1(LeftBannerWrapper,__assign({defaultWidth:bannerHostDefaultWidth,showPlaceholder:showPlaceholder},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:item.bannerInfo,mode:"read",width:bannerWidth,token:item.fileAccessToken,resourceType:ItemResourceTypes.Events},void 0)}),void 0)},void 0);};var FeedbackCountButton=function FeedbackCountButton(_a){var className=_a.className,isActive=_a.isActive,activeIconName=_a.activeIconName,count=_a.count,iconName=_a.iconName,onClick=_a.onClick,readOnly=_a.readOnly,tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceKeyValues=_a.tooltipResourceKeyValues,activeTooltipResourceKey=_a.activeTooltipResourceKey,activeTooltipResourceKeyValues=_a.activeTooltipResourceKeyValues,ariaLabel=_a.ariaLabel,feedbackType=_a.feedbackType,highlight=_a.highlight,hideZeroCount=_a.hideZeroCount,doNotRenderZeroCount=_a.doNotRenderZeroCount,hideTooltip=_a.hideTooltip;var resourceKey=isActive?activeTooltipResourceKey||tooltipResourceKey:tooltipResourceKey;var resourceValues=isActive?activeTooltipResourceKeyValues||tooltipResourceKeyValues:tooltipResourceKeyValues;return jsxs(CountButtonHost,__assign({className:className,"data-feedback":feedbackType,"data-feedback-button-isactive":isActive!==null&&isActive!==void 0?isActive:false,"data-feedback-count":count},{children:[jsx$1(IEMarginFix,{},void 0),jsx$1(PreloadIcons,{icons:[activeIconName,iconName]},void 0),jsx$1(TooltipHost,__assign({resourceKey:resourceKey,values:resourceValues,hidden:hideTooltip},{children:onClick?jsx$1(StyledIconButton$6,__assign({onClick:onClick,iconProps:{iconName:isActive?activeIconName:iconName},"data-feedback-button":feedbackType,disabled:readOnly,highlight:highlight,"data-unread-comment-highlight":highlight,ariaLabel:ariaLabel},{children:jsx$1(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount},void 0)}),void 0):jsxs(Fragment,{children:[jsx$1(StyledIcon$7,{iconName:isActive?activeIconName:iconName,highlight:highlight,"data-unread-comment-highlight":highlight},void 0),jsx$1(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount,ariaLabel:ariaLabel},void 0)]},void 0)}),void 0)]}),void 0);};var CountDisplay=function CountDisplay(_a){var count=_a.count,hideZeroCount=_a.hideZeroCount,doNotRenderZeroCount=_a.doNotRenderZeroCount,ariaLabel=_a.ariaLabel;var shouldNotRenderZeroCount=doNotRenderZeroCount&&!count;if(shouldNotRenderZeroCount){return null;}var shouldHideZeroCount=hideZeroCount&&!count;return jsx$1(CountLabel,__assign({isHidden:shouldHideZeroCount,"aria-label":ariaLabel},{children:count}),void 0);};var TooltipHost=_styled(Tooltip).withConfig({displayName:"FeedbackCountButton__TooltipHost",componentId:"sc-vg1ry1-0"})(templateObject_1$24||(templateObject_1$24=__makeTemplateObject(["\n && {\n display: flex;\n height: 100%;\n align-items: center;\n }\n"],["\n && {\n display: flex;\n height: 100%;\n align-items: center;\n }\n"])));var CountButtonHost=_styled.div.withConfig({displayName:"FeedbackCountButton__CountButtonHost",componentId:"sc-vg1ry1-1"})(templateObject_2$1i||(templateObject_2$1i=__makeTemplateObject(["\n display: flex;\n align-items: center;\n min-width: 60px;\n height: ","px; // ensure same height for feedback buttons\n\n margin-right: 9px;\n"],["\n display: flex;\n align-items: center;\n min-width: 60px;\n height: ","px; // ensure same height for feedback buttons\n\n margin-right: 9px;\n"])),feedbackButtonHeight);var IEMarginFix=createGlobalStyle(templateObject_3$S||(templateObject_3$S=__makeTemplateObject(["\n .browser-name-ie {\n "," {\n margin-right: 20px;\n }\n }\n"],["\n .browser-name-ie {\n "," {\n margin-right: 20px;\n }\n }\n"])),CountButtonHost);var StyledIconButton$6=_styled(IconButton).withConfig({displayName:"FeedbackCountButton__StyledIconButton",componentId:"sc-vg1ry1-2"})(templateObject_4$D||(templateObject_4$D=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n width: 100%;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 22px;\n margin: 0;\n ","\n }\n\n user-select: none;\n"],["\n && {\n margin: 0;\n padding: 0;\n width: 100%;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 22px;\n margin: 0;\n ","\n }\n\n user-select: none;\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var StyledIcon$7=_styled(Icon).withConfig({displayName:"FeedbackCountButton__StyledIcon",componentId:"sc-vg1ry1-3"})(templateObject_5$x||(templateObject_5$x=__makeTemplateObject(["\n font-size: 22px;\n user-select: none;\n\n ","\n"],["\n font-size: 22px;\n user-select: none;\n\n ","\n"])),function(p){return p.highlight&&unreadCommentHighlight;});var CountLabel=_styled.span.withConfig({displayName:"FeedbackCountButton__CountLabel",componentId:"sc-vg1ry1-4"})(templateObject_8$g||(templateObject_8$g=__makeTemplateObject(["\n margin-left: 7px;\n word-break: normal;\n align-self: center;\n ","\n ","\n"],["\n margin-left: 7px;\n word-break: normal;\n align-self: center;\n ","\n ","\n"])),function(p){return p.isHidden&&css$2(templateObject_6$m||(templateObject_6$m=__makeTemplateObject(["\n visibility: hidden;\n "],["\n visibility: hidden;\n "])));},function(p){return p.isDisabled&&css$2(templateObject_7$h||(templateObject_7$h=__makeTemplateObject(["\n color: ",";\n "],["\n color: ",";\n "])),p.theme.palette.neutralQuaternary);});var PreloadIcons=function PreloadIcons(_a){var icons=_a.icons;return jsx$1(Fragment,{children:icons.filter(function(i){return i;}).map(function(i){return jsx$1(PreloadIcon,{iconName:i},i);})},void 0);};var PreloadIcon=_styled(Icon).withConfig({displayName:"FeedbackCountButton__PreloadIcon",componentId:"sc-vg1ry1-5"})(templateObject_9$d||(templateObject_9$d=__makeTemplateObject(["\n position: fixed;\n left: -500px;\n"],["\n position: fixed;\n left: -500px;\n"])));var templateObject_1$24,templateObject_2$1i,templateObject_3$S,templateObject_4$D,templateObject_5$x,templateObject_6$m,templateObject_7$h,templateObject_8$g,templateObject_9$d;var EventCardCommentCount=function EventCardCommentCount(_a){var item=_a.item;var formatMessage=useIntl().formatMessage;return jsxs(Fragment,{children:[jsx$1(IEFix$1,{},void 0),jsx$1(StyledFeedbackCountButton,{tooltipResourceKey:"Events.numberOfComments",tooltipResourceKeyValues:{count:item.statistics.commentCount},ariaLabel:formatMessage({id:'AriaLabel.commentsButton'}),iconName:"Chat",count:item.statistics.commentCount,feedbackType:"comment",highlight:item.hasNewComments,className:"event-card-comments"},void 0)]},void 0);};var StyledFeedbackCountButton=_styled(FeedbackCountButton).withConfig({displayName:"EventCardCommentCount__StyledFeedbackCountButton",componentId:"sc-3prmx8-0"})(templateObject_1$23||(templateObject_1$23=__makeTemplateObject(["\n && {\n min-width: 0;\n margin-right: 0;\n }\n"],["\n && {\n min-width: 0;\n margin-right: 0;\n }\n"])));var IEFix$1=createGlobalStyle(templateObject_2$1h||(templateObject_2$1h=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-comments {\n margin-right: 0 !important;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-comments {\n margin-right: 0 !important;\n }\n }\n"])));var templateObject_1$23,templateObject_2$1h;var EventCancelInformation=function EventCancelInformation(_a){var _b;var item=_a.item,language=_a.language,className=_a.className;var user=useCurrentUser();if(!((_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled)){return null;}var contents=item.cancelInformation.reasons||{};var reason=contents[language]||contents[NewsService.getUserPreferredLanguage(Object.keys(contents),user)]||Object.values(contents)[0];return jsxs(Host$L,__assign({className:className,"data-event-cancelled-info":true},{children:[jsxs(TitleContainer,{children:[jsx$1(CancelIcon,{iconName:"RemoveEvent"},void 0),jsx$1(Title$8,{id:"Events.cancel.cancelled"},void 0)]},void 0),reason]}),void 0);};var Host$L=_styled.div.withConfig({displayName:"EventCancelInformation__Host",componentId:"sc-rh6578-0"})(templateObject_1$22||(templateObject_1$22=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n margin-top: ","px;\n\n font-size: ","px;\n\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ",";\n opacity: 0.1;\n }\n"],["\n position: relative;\n padding: ","px;\n margin-top: ","px;\n\n font-size: ","px;\n\n :after {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: ",";\n opacity: 0.1;\n }\n"])),spacingM,spacingS,fontSizeSmall,function(p){return p.theme.palette.red;});var TitleContainer=_styled.div.withConfig({displayName:"EventCancelInformation__TitleContainer",componentId:"sc-rh6578-1"})(templateObject_2$1g||(templateObject_2$1g=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n\n color: ",";\n\n *:not(:first-child) {\n padding-left: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n\n color: ",";\n\n *:not(:first-child) {\n padding-left: ","px;\n }\n"])),spacingXs,function(p){return p.theme.palette.redDark;},spacingXs);var CancelIcon=_styled(Icon).withConfig({displayName:"EventCancelInformation__CancelIcon",componentId:"sc-rh6578-2"})(templateObject_3$R||(templateObject_3$R=__makeTemplateObject(["\n font-size: 20px;\n"],["\n font-size: 20px;\n"])));var Title$8=_styled(FormattedMessageWithStyle).withConfig({displayName:"EventCancelInformation__Title",componentId:"sc-rh6578-3"})(templateObject_4$C||(templateObject_4$C=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$22,templateObject_2$1g,templateObject_3$R,templateObject_4$C;var EventUserRegistrationContext=/*#__PURE__*/createContext(null);function getDeadlineInfos(item){var hasDeadline=item.registrationSettings.deadline!=null;var isPastDeadline=hasDeadline&&moment(item.registrationSettings.deadline).isBefore(moment());return {hasDeadline:hasDeadline,isPastDeadline:isPastDeadline};}var EventRegistrationButton=function EventRegistrationButton(_a){var isRegistered=_a.isRegistered,className=_a.className,disabled=_a.disabled,onClick=_a.onClick,showInfoMessage=_a.showInfoMessage,infoMessageResourceKey=_a.infoMessageResourceKey;var formatMessage=useIntl().formatMessage;return jsxs(Host$K,__assign({className:className,"aria-label":formatMessage({id:'Events.registration.sectionLabel'})},{children:[jsx$1(RegisterButton,{text:formatMessage({id:isRegistered?'Events.registration.deregisterButtonCaption':'Events.registration.registerButtonCaption'}),disabled:disabled,"data-event-register-button":!!isRegistered,onClick:function(e){e.preventDefault();onClick();},isRegistered:isRegistered},void 0),showInfoMessage&&jsxs(InfoMessage,__assign({"data-event-register-info":true},{children:[jsx$1(Icon,{iconName:"Info"},void 0),jsx$1(FormattedMessage$1,{id:infoMessageResourceKey},void 0)]}),void 0)]}),void 0);};var Host$K=_styled.div.withConfig({displayName:"EventRegistrationButton__Host",componentId:"sc-rvaf0t-0"})(templateObject_1$21||(templateObject_1$21=__makeTemplateObject(["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"],["\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n"])));var RegisterButton=_styled(PrimaryButton).withConfig({displayName:"EventRegistrationButton__RegisterButton",componentId:"sc-rvaf0t-1"})(templateObject_4$B||(templateObject_4$B=__makeTemplateObject(["\n && {\n min-width: 200px;\n border: 0;\n &:hover {\n border: 0;\n }\n ","\n ","\n }\n"],["\n && {\n min-width: 200px;\n border: 0;\n &:hover {\n border: 0;\n }\n ","\n ","\n }\n"])),function(p){return p.disabled&&css$2(templateObject_2$1f||(templateObject_2$1f=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.neutralQuaternaryAlt);},function(p){return p.isRegistered&&css$2(templateObject_3$Q||(templateObject_3$Q=__makeTemplateObject(["\n &:not([disabled]) {\n background-color: ",";\n color: #fff;\n\n &:hover {\n background-color: ",";\n }\n }\n "],["\n &:not([disabled]) {\n background-color: ",";\n color: #fff;\n\n &:hover {\n background-color: ",";\n }\n }\n "])),p.theme.palette.red,p.theme.palette.redDark);});var InfoMessage=_styled.span.withConfig({displayName:"EventRegistrationButton__InfoMessage",componentId:"sc-rvaf0t-2"})(templateObject_5$w||(templateObject_5$w=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"])),spacingXs,fontSizeSmall,spacingXs);var templateObject_1$21,templateObject_2$1f,templateObject_3$Q,templateObject_4$B,templateObject_5$w;var $$5=_export;var DESCRIPTORS=descriptors;var global$2=global$m;var has=has$c;var isObject$1=isObject$c;var defineProperty=objectDefineProperty.f;var copyConstructorProperties=copyConstructorProperties$2;var NativeSymbol=global$2.Symbol;if(DESCRIPTORS&&typeof NativeSymbol=='function'&&(!('description'in NativeSymbol.prototype)||// Safari 12 bug
|
|
126241
126239
|
NativeSymbol().description!==undefined)){var EmptyStringDescriptionStore={};// wrap Symbol constructor for correct work with undefined description
|
|
126242
126240
|
var SymbolWrapper=function Symbol(){var description=arguments.length<1||arguments[0]===undefined?undefined:String(arguments[0]);var result=this instanceof SymbolWrapper?new NativeSymbol(description)// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
126243
|
-
:description===undefined?NativeSymbol():NativeSymbol(description);if(description==='')EmptyStringDescriptionStore[result]=true;return result;};copyConstructorProperties(SymbolWrapper,NativeSymbol);var symbolPrototype=SymbolWrapper.prototype=NativeSymbol.prototype;symbolPrototype.constructor=SymbolWrapper;var symbolToString=symbolPrototype.toString;var native=String(NativeSymbol('test'))=='Symbol(test)';var regexp=/^Symbol\((.*)\)[^)]+$/;defineProperty(symbolPrototype,'description',{configurable:true,get:function description(){var symbol=isObject(this)?this.valueOf():this;var string=symbolToString.call(symbol);if(has(EmptyStringDescriptionStore,symbol))return '';var desc=native?string.slice(7,-1):string.replace(regexp,'$1');return desc===''?undefined:desc;}});$$
|
|
126241
|
+
:description===undefined?NativeSymbol():NativeSymbol(description);if(description==='')EmptyStringDescriptionStore[result]=true;return result;};copyConstructorProperties(SymbolWrapper,NativeSymbol);var symbolPrototype=SymbolWrapper.prototype=NativeSymbol.prototype;symbolPrototype.constructor=SymbolWrapper;var symbolToString=symbolPrototype.toString;var native=String(NativeSymbol('test'))=='Symbol(test)';var regexp=/^Symbol\((.*)\)[^)]+$/;defineProperty(symbolPrototype,'description',{configurable:true,get:function description(){var symbol=isObject$1(this)?this.valueOf():this;var string=symbolToString.call(symbol);if(has(EmptyStringDescriptionStore,symbol))return '';var desc=native?string.slice(7,-1):string.replace(regexp,'$1');return desc===''?undefined:desc;}});$$5({global:true,forced:true},{Symbol:SymbolWrapper});}function getLocationQuestionId(item){return "location_id_"+item.id;}function getLocationPollDefinitions(item,formatMessage,result,isOnBehalfOf){if(!item.locations||item.locations.length<2){return {};}var locationQuestionId=getLocationQuestionId(item);return {translations:__spreadArray([{language:'en',id:locationQuestionId,text:formatMessage({id:!isOnBehalfOf?'Events.registration.locations.questionTitle':'Events.registration.locations.onBehalfOfQuestionTitle'})}],item.locations.map(function(l){return {language:'en',id:l.locationId,text:l.name};})),question:{questionId:locationQuestionId,isMultiChoice:false,choices:item.locations.map(function(l){return getLocationChoice(locationQuestionId,l,result,formatMessage,isOnBehalfOf);})}};}function getLocationChoice(locationQuestionId,location,result,formatMessage,isOnBehalfOf){var _a,_b,_c,_d,_e;var choice={choiceId:location.locationId};if(!location.maxNumberOfSeats){return choice;}var takenSeats=(_e=(_d=(_c=(_b=(_a=result===null||result===void 0?void 0:result.answers)===null||_a===void 0?void 0:_a.find(function(a){return a.questionId===locationQuestionId;}))===null||_b===void 0?void 0:_b.choices)===null||_c===void 0?void 0:_c.find(function(c){return c.choiceId===location.locationId;}))===null||_d===void 0?void 0:_d.count)!==null&&_e!==void 0?_e:0;var availableSeats=Math.max(location.maxNumberOfSeats-takenSeats,0);choice.description=formatMessage({id:'Events.registration.locations.leftSeats'},{total:location.maxNumberOfSeats,available:availableSeats,b:function(text){return jsx$1("strong",{children:text},void 0);}});if(availableSeats===0){choice.disabled=!isOnBehalfOf;}return choice;}var EventRegistrationLocationSeatsInfo=function EventRegistrationLocationSeatsInfo(_a){var hasAnySeatsLeft=_a.hasAnySeatsLeft,locations=_a.locations,className=_a.className;if(!(locations===null||locations===void 0?void 0:locations.length)){return null;}if(locations.length>1){if(hasAnySeatsLeft){// in this case we don't want to render anything, because it's already rendered by the poll anyway
|
|
126244
126242
|
return null;}return jsx$1(MessageContainer,__assign({domIdentifier:"multi-location-no-seats-left",className:className},{children:jsx$1(NoSeatsMessage,{id:"Events.registration.locations.noSeatsLeft"},void 0)}),void 0);}var location=locations[0];if(hasAnySeatsLeft){return jsx$1(MessageContainer,__assign({domIdentifier:"one-location-number-of-seats-left",className:className},{children:jsx$1(SeatsInfoMessage,{id:"Events.registration.locations.seatsLeftInLocation",values:{available:location.seatsLeft,b:function(text){return jsx$1("span",{children:text},void 0);}}},void 0)}),void 0);}return jsx$1(MessageContainer,__assign({domIdentifier:"one-location-no-seats-left",className:className},{children:jsx$1(NoSeatsMessage,{id:"Events.registration.locations.leftSeats",values:{total:location.maxNumberOfSeats,available:location.seatsLeft,b:function(text){return jsx$1("span",{children:text},void 0);}}},void 0)}),void 0);};var SeatsInfoMessage=_styled(FormattedMessageWithStyle)(templateObject_1$20||(templateObject_1$20=__makeTemplateObject(["\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"],["\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"])),fontSizeSmall);var NoSeatsMessage=_styled(FormattedMessageWithStyle)(templateObject_2$1e||(templateObject_2$1e=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"],["\n color: ",";\n font-size: ","px;\n\n span {\n font-weight: bold;\n }\n"])),function(p){return p.theme.palette.neutralSecondaryAlt;},fontSizeSmall);var MessageContainer=function MessageContainer(_a){var domIdentifier=_a.domIdentifier,className=_a.className,children=_a.children;return jsx$1("div",__assign({"data-seats-info":domIdentifier,className:className},{children:children}),void 0);};var templateObject_1$20,templateObject_2$1e;var EventRegistrationInfoDescription=_styled(FormattedMessageWithStyle).withConfig({displayName:"EventRegistrationInfoDescription",componentId:"sc-1shfbk2-0"})(templateObject_1$1$||(templateObject_1$1$=__makeTemplateObject(["\n font-size: ","px;\n\n time {\n font-weight: bold;\n }\n"],["\n font-size: ","px;\n\n time {\n font-weight: bold;\n }\n"])),fontSizeSmall);var templateObject_1$1$;var EventRegistrationRegisterStatusInfo=function EventRegistrationRegisterStatusInfo(_a){var isRegistered=_a.isRegistered,onBehalfOfUpn=_a.onBehalfOfUpn,className=_a.className;if(!isRegistered){return null;}return jsx$1(EventRegistrationInfoDescription,{className:className,id:onBehalfOfUpn?'Events.registration.onBehalfOfIsRegistered':'Events.registration.userIsRegistered'},void 0);};var EventRegistrationDeadlineInfo=function EventRegistrationDeadlineInfo(_a){var item=_a.item,isRegistered=_a.isRegistered,className=_a.className;var _b=getDeadlineInfos(item),isPastDeadline=_b.isPastDeadline,hasDeadline=_b.hasDeadline;if(isRegistered||!hasDeadline){return null;}return jsx$1(EventRegistrationInfoDescription,{className:className,id:"Events.registration.deadline.title",values:{isPast:isPastDeadline,deadlineRelative:hasDeadline&&jsx$1(DateTime,{value:item.registrationSettings.deadline,showAsRelative:true},void 0)}},void 0);};var EventUserRegistrationFullSeriesDialog=function EventUserRegistrationFullSeriesDialog(_a){var item=_a.item,visible=_a.visible,isRegistered=_a.isRegistered,onClick=_a.onClick,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;var recurrenceSettingsEndDate=item.recurrenceSettings.endDate;return jsxs(Dialog,__assign({hidden:!visible,modalProps:{isBlocking:false},dialogContentProps:{type:DialogType.normal,title:formatMessage({id:isRegistered?'Events.registration.recurringEvent.deregister':'Events.registration.recurringEvent.register'})},onDismiss:onDismiss},{children:[jsxs(DialogContent$1,__assign({"data-registration-full-series":true},{children:[recurrenceSettingsEndDate&&jsx$1(FormattedMessage$1,{id:"Events.registration.lastOccurrence",values:{date:moment(recurrenceSettingsEndDate).format('L')},tagName:"p"},void 0),jsx$1(FormattedMessage$1,{id:isRegistered?'Events.registration.fullSeriesDeregistered':'Events.registration.fullSeriesRegistered',tagName:"p"},void 0)]}),void 0),jsxs(DialogFooter,{children:[jsx$1(DefaultButton,__assign({onClick:onDismiss,"data-button":"cancel"},{children:jsx$1(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0),jsx$1(PrimaryButton,__assign({onClick:function(){return onClick(!isRegistered);},"data-button":"save"},{children:jsx$1(FormattedMessage$1,{id:isRegistered?'Events.registration.deregisterButtonCaption':'Events.registration.registerButtonCaption'},void 0)}),void 0)]},void 0)]}),void 0);};var DialogContent$1=_styled.div.withConfig({displayName:"EventUserRegistrationFullSeriesDialog__DialogContent",componentId:"sc-8ec3oi-0"})(templateObject_1$1_||(templateObject_1$1_=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n > p {\n margin-top: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n > p {\n margin-top: 0;\n }\n"])));var templateObject_1$1_;var feedbackCache={};function useFeedbackApi(){var api=useApi();return useMemo(function(){return {getFeedback:getFeedback,setFeedback:setFeedback,unsetFeedback:unsetFeedback,updatePollAnswers:updatePollAnswers,getPollResult:getPollResult,getLikers:getLikers};function getFeedback(type,itemId,onBehalfOfUpn){var cacheKey=itemId+(onBehalfOfUpn||'');if(feedbackCache[cacheKey]!=null){return feedbackCache[cacheKey];}return feedbackCache[cacheKey]=api.custom(type+"/"+itemId+"/feedback?"+queryString.stringify({onBehalfOfUpn:onBehalfOfUpn})).get().then(function(result){return result.body().data();});}function setFeedback(type,itemId,feedbackType){delete feedbackCache[itemId];return api.custom(type+"/"+itemId+"/feedback/"+feedbackType).put({}).then(function(){return null;});}function unsetFeedback(type,itemId,feedbackType){delete feedbackCache[itemId];return api.custom(type+"/"+itemId+"/feedback/"+feedbackType).delete().then(function(){return null;});}function updatePollAnswers(type,itemId,answers){delete feedbackCache[itemId];return api.custom(type+"/"+itemId+"/feedback/poll/answers").put(answers).then(function(){return null;});}function getPollResult(type,itemId){return api.custom(type+"/"+itemId+"/feedback/poll/result").get().then(function(result){return result.body().data();});}function getLikers(type,itemId,filter){return api.custom(type+"/"+itemId+"/feedback/likes").get(filter).then(function(result){return result.body().data();});}},[api]);}function useEventRegistrationApi(){var api=useApi();return useMemo(function(){return {setEventRegistration:setEventRegistration,getEventRegistrationResults:getEventRegistrationResults,getParticipants:getParticipants};function setEventRegistration(itemId,response,pollAnswers,locationId,onBehalfOfUpn){var cacheKey=itemId+(onBehalfOfUpn||'');delete feedbackCache[cacheKey];return api.custom("events/"+itemId+"/feedback/registration").put({response:response,pollAnswers:pollAnswers,locationId:locationId,onBehalfOfUpn:onBehalfOfUpn}).then(function(){return null;});}function getEventRegistrationResults(itemId){return api.custom("events/"+itemId+"/feedback/registration/result").get().then(function(result){return result.body().data();});}function getParticipants(eventId){return api.custom("events/"+eventId+"/feedback/registration/participants").get().then(function(result){return result.body().data();}).then(function(r){return r.participants;});}},[api]);}var EventUserRegistration=function EventUserRegistration(_a){var _b,_c;var disabled=_a.disabled,hideInfoMessage=_a.hideInfoMessage,className=_a.className;var history=useHistory();var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var _d=useState$2(false),isSaving=_d[0],setIsSaving=_d[1];var _e=useState$2(false),showRegisterFullSeriesDialog=_e[0],setShowRegisterFullSeriesDialog=_e[1];var toastHandleRef=useRef$1(null);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var followPublicPublishableItemComments=useManageCurrentUserApi().followPublicPublishableItemComments;var setEventRegistration=useEventRegistrationApi().setEventRegistration;var _f=useContext(EventUserRegistrationContext),hasPollContext=_f.hasPollContext,submitPoll=_f.submitPoll,answers=_f.answers,hasMissingAnswers=_f.hasMissingAnswers,reset=_f.reset,isLoading=_f.isLoading,onBehalfOfUpn=_f.onBehalfOfUpn,item=_f.item,eventResponse=_f.eventResponse,setEventResponse=_f.setEventResponse,seatsInfo=_f.seatsInfo;var _g=useNotificationContext(),dismissToast=_g.dismissToast,showToast=_g.showToast,showError=_g.showError;useListener(RegisterFullSeriesTriggerAction.type,function(action){if(action.recurrenceSeriesId===item.recurrenceSeriesId){setEventResponse(action.response);}return false;},[]);if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled)){return null;}var isRegistered=eventResponse===EventResponse.Registered;var isFullSeriesRegistrationModeEnabled=((_c=item.registrationSettings)===null||_c===void 0?void 0:_c.seriesMode)===SeriesRegistrationMode.FullSeries;var hasPoll=item.poll&&item.poll.questions&&item.poll.questions.length>0||item.locations&&item.locations.length>1;var showInfoMessage=!hideInfoMessage&&isFullSeriesRegistrationModeEnabled&&hasPollContext;return jsxs("div",__assign({className:className},{children:[jsx$1(DeadlineInfo,{item:item,isRegistered:isRegistered},void 0),jsx$1(SeatsInfo,{hasAnySeatsLeft:seatsInfo.hasAnySeatsLeft,locations:seatsInfo.locations},void 0),jsx$1(StatusInfo,{isRegistered:isRegistered,onBehalfOfUpn:onBehalfOfUpn},void 0),jsx$1(EventRegistrationButton,{isRegistered:isRegistered,disabled:isButtonDisabled(),onClick:function(){return handleClick(!isRegistered);},showInfoMessage:showInfoMessage,infoMessageResourceKey:isRegistered?'Events.registration.fullSeriesDeregistered':'Events.registration.fullSeriesRegistered'},void 0),showRegisterFullSeriesDialog&&jsx$1(EventUserRegistrationFullSeriesDialog,{item:item,visible:showRegisterFullSeriesDialog,onClick:handleRegisterFullSeriesClick,onDismiss:function(){return setShowRegisterFullSeriesDialog(false);},isRegistered:isRegistered},void 0)]}),void 0);function isButtonDisabled(){if(disabled||isLoading||isSaving){return true;}var isPastDeadline=getDeadlineInfos(item).isPastDeadline;if(isRegistered){return !onBehalfOfUpn&&isPastDeadline;}if(hasMissingAnswers){return true;}if(onBehalfOfUpn){return false;}return !seatsInfo.hasAnySeatsLeft||isPastDeadline;}function handleClick(doRegister){return __awaiter(this,void 0,void 0,function(){var language,contents,targetRoute;return __generator(this,function(_a){switch(_a.label){case 0:if(!doRegister){if(isFullSeriesRegistrationModeEnabled&&!hasPollContext){setShowRegisterFullSeriesDialog(true);return [2/*return*/];}deregister();return [2/*return*/];}if(isFullSeriesRegistrationModeEnabled&&!hasPoll&&!hasPollContext){setShowRegisterFullSeriesDialog(true);return [2/*return*/];}if(hasPoll&&!hasPollContext){language=NewsService.getLanguageForPublishableItem(item,user);contents=item.contents[language];targetRoute=NewsService.getNewsRoute('events',item.id,contents.title);history.push(buildPath(targetRoute));return [2/*return*/];}return [4/*yield*/,register()];case 1:_a.sent();return [2/*return*/];}});});}function handleRegisterFullSeriesClick(doRegister){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:setShowRegisterFullSeriesDialog(false);if(!doRegister)return [3/*break*/,2];return [4/*yield*/,register()];case 1:_b.sent();return [3/*break*/,4];case 2:return [4/*yield*/,deregister()];case 3:_b.sent();_b.label=4;case 4:triggerEvent(RegisterFullSeriesTriggerAction.create(item.recurrenceSeriesId,doRegister?EventResponse.Registered:EventResponse.NotSet));return [2/*return*/];}});});}function register(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,submitPoll(function(){return toggleRegistration(true,answers,onBehalfOfUpn);})];case 1:_a.sent();return [2/*return*/];}});});}function deregister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,toggleRegistration(false,null,onBehalfOfUpn)];case 1:_a.sent();return [4/*yield*/,reset()];case 2:_a.sent();return [2/*return*/];}});});}function toggleRegistration(doRegister,answersToSet,onBehalfOfUpn){return __awaiter(this,void 0,void 0,function(){var newResponse,locationQuestionId_1,locationId,registerOnBehalfOfUserStringResource,error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(isSaving){return [2/*return*/];}setIsSaving(true);_a.label=1;case 1:_a.trys.push([1,3,4,5]);newResponse=doRegister?EventResponse.Registered:EventResponse.NotSet;setEventResponse(newResponse);if(!answersToSet){answersToSet=[];}locationQuestionId_1=getLocationQuestionId(item);locationId=answersToSet.filter(function(a){return a.questionId===locationQuestionId_1;}).map(function(a){return a.choiceIds[0];})[0];answersToSet=answersToSet.filter(function(a){return a.questionId!==locationQuestionId_1;});return [4/*yield*/,setEventRegistration(item.id,newResponse,answersToSet,locationId,onBehalfOfUpn)];case 2:_a.sent();refreshUserDetails();triggerEvent(EventResponseTriggerAction.create(item.id,newResponse,locationId,onBehalfOfUpn));if(doRegister&&!onBehalfOfUpn){followPublicPublishableItemComments(item.id,ItemResourceTypes.Events);triggerEvent(FollowCommentsTriggerAction.create(item.id,true));}dismissToast(toastHandleRef.current);registerOnBehalfOfUserStringResource=isHiddenMail(onBehalfOfUpn)?'Events.registration.onBehalfOfRegistrationSuccess.hiddenMail':'Events.registration.onBehalfOfRegistrationSuccess';toastHandleRef.current=showToast(doRegister?onBehalfOfUpn?registerOnBehalfOfUserStringResource:'Events.registration.registrationSuccess':onBehalfOfUpn?'Events.registration.onBehalfOfDeregistrationSuccess':'Events.registration.deregistrationSuccess',{mail:onBehalfOfUpn});return [3/*break*/,5];case 3:error_1=_a.sent();logger.error(error_1);showError('Generic.error');setEventResponse(eventResponse);return [3/*break*/,5];case 4:setIsSaving(false);return [7/*endfinally*/];case 5:return [2/*return*/];}});});}};var DeadlineInfo=_styled(EventRegistrationDeadlineInfo).withConfig({displayName:"EventUserRegistration__DeadlineInfo",componentId:"sc-1mvozes-0"})(templateObject_1$1Z||(templateObject_1$1Z=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var SeatsInfo=_styled(EventRegistrationLocationSeatsInfo).withConfig({displayName:"EventUserRegistration__SeatsInfo",componentId:"sc-1mvozes-1"})(templateObject_2$1d||(templateObject_2$1d=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var StatusInfo=_styled(EventRegistrationRegisterStatusInfo).withConfig({displayName:"EventUserRegistration__StatusInfo",componentId:"sc-1mvozes-2"})(templateObject_3$P||(templateObject_3$P=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);var templateObject_1$1Z,templateObject_2$1d,templateObject_3$P;var EventCardUserRegistration=function EventCardUserRegistration(_a){var item=_a.item,disabled=_a.disabled,className=_a.className;var _b=useState$2(item.userResponse),eventResponse=_b[0],setEventResponse=_b[1];var isRegistered=eventResponse===EventResponse.Registered;// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126245
126243
|
var seatsInfo=useMemo(getSeatsInfo,[isRegistered,item.id]);return jsx$1(EventUserRegistrationContext.Provider,__assign({value:{hasPollContext:false,item:item,submitPoll:function(savePollAnswers){return savePollAnswers();},reset:function(){return Promise.resolve();},answers:null,hasMissingAnswers:false,onBehalfOfUpn:null,isLoading:false,eventResponse:eventResponse,setEventResponse:setEventResponse,seatsInfo:seatsInfo}},{children:jsx$1(EventUserRegistration,{disabled:disabled,className:className},void 0)}),void 0);function getSeatsInfo(){var _a;if(!item.registrationSettings||!item.registrationSettings.enabled||((_a=item.cancelInformation)===null||_a===void 0?void 0:_a.isCancelled)||isRegistered){return {hasAnySeatsLeft:true};}var locationsWithSeats=item.locations.filter(function(l){return l.maxNumberOfSeats>0;});var hasLocationsWithoutSeats=locationsWithSeats.length!==item.locations.length;if(!locationsWithSeats.length||hasLocationsWithoutSeats){return {hasAnySeatsLeft:true};}var participantsCount=getTotalParticipants();if(locationsWithSeats.length===1){var location_1=locationsWithSeats[0];var seatsLeft=Math.max(location_1.maxNumberOfSeats-participantsCount,0);return {hasAnySeatsLeft:seatsLeft>0,locations:[__assign(__assign({},location_1),{seatsLeft:seatsLeft})]};}// in this case we don't really know if we have any left seats or not
|
|
126246
126244
|
// since to get this information we need to load all results of all items
|
|
@@ -126249,12 +126247,12 @@ var seatsInfo=useMemo(getSeatsInfo,[isRegistered,item.id]);return jsx$1(EventUse
|
|
|
126249
126247
|
return {hasAnySeatsLeft:true,locations:undefined};}function getTotalParticipants(){if(item.userResponse!==eventResponse){return (item.statistics.participantsCount||0)+(eventResponse===EventResponse.Registered?1:-1);}return item.statistics.participantsCount||0;}};var pageSize=50;var defaultShimmerCount=7;var LikersList=function LikersList(_a){var itemId=_a.itemId,itemType=_a.itemType,likersCount=_a.likersCount,className=_a.className;var getLikers=useFeedbackApi().getLikers;var initialPageSize=Math.min(likersCount,pageSize);var _b=usePromise$2(loadLikers,null,[itemId]),likersInfo=_b[0],isLoading=_b[1],loadNextPage=_b[5];var isInitialLoading=!(likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers)&&isLoading;var isLoadingNextPage=(likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers)&&isLoading;var scrollContainer=useRef$1(null);return jsxs(Fragment,{children:[jsx$1(LikersListShimmer,__assign({count:Math.min(likersCount,defaultShimmerCount),isLoading:isInitialLoading&&likersCount>0},{children:jsxs(List$1,__assign({className:className,"data-likers-list":true,ref:scrollContainer,onScroll:handleScroll},{children:[likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers.map(function(i){return jsx$1("li",{children:jsx$1(PersonaCard,__assign({upn:i.userPrincipalName},{children:jsx$1(StyledAvatar$2,{"data-liker":i.userPrincipalName,upn:i.userPrincipalName,text:i.displayName},void 0)}),void 0)},i.id);}),isLoadingNextPage&&jsx$1(StyledSpinner$3,{},void 0),likersInfo&&!likersInfo.token&&likersInfo.likers.length>defaultShimmerCount&&jsx$1(UsersLoadedIndicator,{children:jsx$1(FormattedMessage$1,{id:"Generic.finishedLoadingLikers"},void 0)},void 0)]}),void 0)}),void 0),(likersInfo===null||likersInfo===void 0?void 0:likersInfo.likers)&&!likersInfo.likers.length&&jsx$1(FormattedMessage$1,{id:"Generic.nobodyLikesThis"},void 0)]},void 0);function loadLikers(likersInfo){if(likersInfo===void 0){likersInfo={likers:[],token:null};}return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getLikers(itemType,itemId,{pageSize:!likersInfo.token?initialPageSize:pageSize,token:likersInfo.token})];case 1:result=_a.sent();return [2/*return*/,{likers:likersInfo.likers.concat(result.items),token:result.paginationToken}];}});});}function handleScroll(){return __awaiter(this,void 0,void 0,function(){var container,err_1;return __generator(this,function(_a){switch(_a.label){case 0:container=scrollContainer.current;if(!container){return [2/*return*/];}// check if we reached the end of the pagination
|
|
126250
126248
|
// or we are already loading the next page
|
|
126251
126249
|
if(likersInfo.token==null||isLoading){return [2/*return*/];}// check if user scrolled enough
|
|
126252
|
-
if(container.scrollHeight-container.scrollTop>container.clientHeight+300){return [2/*return*/];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,loadNextPage(likersInfo)];case 2:_a.sent();return [3/*break*/,4];case 3:err_1=_a.sent();logger.error(err_1);return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var StyledAvatar$2=_styled(Avatar).withConfig({displayName:"LikersList__StyledAvatar",componentId:"sc-a990fb-0"})(templateObject_1$1Y||(templateObject_1$1Y=__makeTemplateObject(["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"],["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"])));var List$1=_styled.ul.withConfig({displayName:"LikersList__List",componentId:"sc-a990fb-1"})(templateObject_2$1c||(templateObject_2$1c=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"])),defaultShimmerCount*58,spacingS);var StyledSpinner$3=_styled(Spinner).withConfig({displayName:"LikersList__StyledSpinner",componentId:"sc-a990fb-2"})(templateObject_3$O||(templateObject_3$O=__makeTemplateObject(["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"],["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"])),spacingS);var LikersListShimmer=function LikersListShimmer(_a){var count=_a.count,isLoading=_a.isLoading,children=_a.children;return jsx$1(Shimmer,__assign({isDataLoaded:!isLoading,customElementsGroup:Array.from(Array(count)).map(function(_,i){return jsx$1(UserShimmer,{},i);})},{children:children}),void 0);};var UserShimmer=function UserShimmer(){return jsxs(Fragment,{children:[jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.gap,height:10,width:'100%'}]},void 0),jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.circle,height:48,verticalAlign:'bottom'},{type:ShimmerElementType.gap,height:15},{type:ShimmerElementType.gap,height:15},{type:ShimmerElementType.line,height:18}]},void 0)]},void 0);};var UsersLoadedIndicator=_styled.div.withConfig({displayName:"LikersList__UsersLoadedIndicator",componentId:"sc-a990fb-3"})(templateObject_4$A||(templateObject_4$A=__makeTemplateObject(["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"],["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"])),spacingM);var templateObject_1$1Y,templateObject_2$1c,templateObject_3$O,templateObject_4$A;_styled.div.withConfig({displayName:"LongPressLikeButton__ButtonHost",componentId:"sc-1n5c9rg-0"})(templateObject_1$1X||(templateObject_1$1X=__makeTemplateObject(["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"],["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"])));createGlobalStyle(templateObject_2$1b||(templateObject_2$1b=__makeTemplateObject(["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"],["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1X,templateObject_2$1b;var HoverLikeButton=function HoverLikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,likersCount=_a.likersCount,children=_a.children;var _b=useState$2(false),showCallout=_b[0],setshowCallout=_b[1];var buttonRef=useRef$1(null);var timeout=useRef$1(null);useEffect$1(function(){return function(){return window.clearTimeout(timeout.current);};},[]);return jsxs("div",__assign({ref:buttonRef,onMouseEnter:handleOnMouseEnter,onMouseLeave:handleOnMouseLeave},{children:[jsx$1("div",{children:children},void 0),showCallout&&jsx$1(LikersCallout,{itemId:itemId,itemType:itemType,target:buttonRef.current,likersCount:likersCount,onDismiss:function(){return setshowCallout(false);}},void 0)]}),void 0);function handleOnMouseEnter(){if(!likersCount){return;}window.clearTimeout(timeout.current);timeout.current=window.setTimeout(function(){setshowCallout(true);},1000);}function handleOnMouseLeave(){window.clearTimeout(timeout.current);}};var LikersCallout=function LikersCallout(_a){var itemId=_a.itemId,itemType=_a.itemType,onDismiss=_a.onDismiss,target=_a.target,likersCount=_a.likersCount;return jsxs(StyledCallout,__assign({target:target,onDismiss:onDismiss,directionalHint:DirectionalHint$1.leftCenter},{children:[jsxs(LikedBy,{children:[jsx$1(FormattedMessage$1,{id:"Generic.likers"},void 0),":"]},void 0),jsx$1(LikersList,{itemId:itemId,itemType:itemType,likersCount:likersCount},void 0)]}),void 0);};var StyledCallout=_styled(Callout).withConfig({displayName:"HoverLikeButton__StyledCallout",componentId:"sc-1f0a2ni-0"})(templateObject_1$1W||(templateObject_1$1W=__makeTemplateObject(["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"],["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"])),spacingM,spacingXl);var LikedBy=_styled.span.withConfig({displayName:"HoverLikeButton__LikedBy",componentId:"sc-1f0a2ni-1"})(templateObject_2$1a||(templateObject_2$1a=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$1W,templateObject_2$1a;var LikeButton=function LikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,isActive=_a.isActive,count=_a.count,onClick=_a.onClick,isDemoContent=_a.isDemoContent,doNotRenderZeroCount=_a.doNotRenderZeroCount,readOnly=_a.readOnly,className=_a.className;var features=useFeatures();var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var likeButton=jsx$1(FeedbackCountButton,{className:className,tooltipResourceKey:"Generic.like",activeTooltipResourceKey:"Generic.unlike",ariaLabel:formatMessage({id:isActive?'AriaLabel.unlikeItemButton':'AriaLabel.likeItemButton'}),iconName:"Like",activeIconName:"LikeSolid",isActive:isActive,onClick:onClick,count:count,feedbackType:"like",doNotRenderZeroCount:doNotRenderZeroCount,readOnly:readOnly,hideTooltip:features.showLikers},void 0);if(!features.showLikers||isDemoContent||user.isPublicUser){return likeButton;}return jsx$1(HoverLikeButton,__assign({itemId:itemId,itemType:itemType,likersCount:count},{children:likeButton}),void 0);};function hasFeedbackType(feedbackSettings,feedbackType){return feedbackSettings&&feedbackSettings.feedbackOptions&&feedbackSettings.feedbackOptions.findIndex(function(f){return f===feedbackType;})>-1;}var CardLikeButton=function CardLikeButton(_a){var _b,_c,_d;var item=_a.item,itemResourceType=_a.itemResourceType,className=_a.className;var _e=useState$2(item.isLiked),isLiked=_e[0],setIsLiked=_e[1];var _f=useState$2((_c=(_b=item.statistics)===null||_b===void 0?void 0:_b.likeCount)!==null&&_c!==void 0?_c:0),likeCount=_f[0],setLikeCount=_f[1];var _g=useState$2(false),isSaving=_g[0],setIsSaving=_g[1];var features=useFeatures();var _h=useFeedbackApi(),setFeedback=_h.setFeedback,unsetFeedback=_h.unsetFeedback;var metadata=(_d=item.metadata)!==null&&_d!==void 0?_d:{};var hasLikesEnabled=hasFeedbackType(metadata.feedbackSettings,'like');var showError=useNotificationContext().showError;if(!features.likes||!hasLikesEnabled){return null;}return jsx$1(StyledLikeButton$2,{itemId:item.id,itemType:itemResourceType,isActive:isLiked,count:likeCount,onClick:handleClick,doNotRenderZeroCount:true,className:className,isDemoContent:item.isDemoContent},void 0);function handleClick(){return __awaiter(this,void 0,void 0,function(){var isNowLiked,oldCount;return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving){return [2/*return*/];}isNowLiked=!isLiked;oldCount=likeCount;_b.label=1;case 1:_b.trys.push([1,6,7,8]);setIsSaving(true);setIsLiked(isNowLiked);setLikeCount(isNowLiked?oldCount+1:oldCount-1);if(!isNowLiked)return [3/*break*/,3];return [4/*yield*/,setFeedback(itemResourceType,item.id,'like')];case 2:_b.sent();return [3/*break*/,5];case 3:return [4/*yield*/,unsetFeedback(itemResourceType,item.id,'like')];case 4:_b.sent();_b.label=5;case 5:return [3/*break*/,8];case 6:_b.sent();setIsLiked(!isNowLiked);showError('NewsArticle.setFeedback_error');setLikeCount(oldCount);return [3/*break*/,8];case 7:setIsSaving(false);return [7/*endfinally*/];case 8:return [2/*return*/];}});});}};var StyledLikeButton$2=_styled(LikeButton).withConfig({displayName:"CardLikeButton__StyledLikeButton",componentId:"sc-10mlzn4-0"})(templateObject_1$1V||(templateObject_1$1V=__makeTemplateObject(["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"],["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"])));var templateObject_1$1V;var EventRecurrenceSeriesInfo=function EventRecurrenceSeriesInfo(_a){var _b;var eventItem=_a.eventItem,className=_a.className;if(!(eventItem===null||eventItem===void 0?void 0:eventItem.recurrenceSeriesId)){return null;}var endDate=(_b=eventItem.recurrenceSettings)===null||_b===void 0?void 0:_b.endDate;return jsx$1(Host$J,__assign({className:className},{children:jsx$1(StyledTooltip$3,__assign({resourceKey:"Events.editor.recurrence.iconTooltip",values:{endDate:moment(endDate).format('LL')},hidden:!endDate},{children:jsxs(Container$2,{children:[jsx$1(StyledIcon$6,{iconName:"RecurringEvent"},void 0),jsx$1(FormattedMessage$1,{id:"Events.editor.recurrence.series"},void 0)]},void 0)}),void 0)}),void 0);};var Host$J=_styled.div.withConfig({displayName:"EventRecurrenceSeriesInfo__Host",componentId:"sc-12fly5n-0"})(templateObject_1$1U||(templateObject_1$1U=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n"],["\n display: flex;\n font-size: ","px;\n"])),fontSizeSmall);var StyledTooltip$3=_styled(Tooltip).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledTooltip",componentId:"sc-12fly5n-1"})(templateObject_2$19||(templateObject_2$19=__makeTemplateObject(["\n z-index: 1;\n"],["\n z-index: 1;\n"])));var Container$2=_styled.div.withConfig({displayName:"EventRecurrenceSeriesInfo__Container",componentId:"sc-12fly5n-2"})(templateObject_3$N||(templateObject_3$N=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIcon$6=_styled(Icon).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledIcon",componentId:"sc-12fly5n-3"})(templateObject_4$z||(templateObject_4$z=__makeTemplateObject(["\n font-size: ","px;\n padding-right: ","px;\n"],["\n font-size: ","px;\n padding-right: ","px;\n"])),fontSizeMedium,spacingXs);var templateObject_1$1U,templateObject_2$19,templateObject_3$N,templateObject_4$z;var EventRecurrenceSeriesInfoNavLink=function EventRecurrenceSeriesInfoNavLink(_a){var recurrenceSeriesId=_a.recurrenceSeriesId,title=_a.title,children=_a.children,className=_a.className;var buildPath=useSubscriptionHandlePathBuilder().buildPath;if(!recurrenceSeriesId){return null;}return jsx$1(StyledNavLink$2,__assign({to:buildPath("/events/upcoming?"+queryString.stringify({seriesId:recurrenceSeriesId,seriesTitle:title})),className:className},{children:children}),void 0);};var StyledNavLink$2=_styled(NavLink).withConfig({displayName:"EventRecurrenceSeriesInfoNavLink__StyledNavLink",componentId:"sc-1szm15-0"})(templateObject_1$1T||(templateObject_1$1T=__makeTemplateObject(["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1T;var EventCard=function EventCard(_a){var _b,_c,_d,_e,_f;var item=_a.item,language=_a.language,styleDefinition=_a.styleDefinition,allowFilterByChannels=_a.allowFilterByChannels,showFeedbackButtons=_a.showFeedbackButtons,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var windowSize=useWindowSize$2();var highlight=!!user.unreadEvents.find(function(e){return e.itemId===item.id||e.itemId===item.recurrenceSeriesId;});var userLanguage=getPreferredContentLanguage(user);var contents=item.contents[language];var targetRoute=NewsService.getNewsRoute(buildPath('/events'),item.id,contents.title);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;var hasNoRegistration=!isCancelled&&!((_c=item.registrationSettings)===null||_c===void 0?void 0:_c.enabled);var hasManyLocationsAndContacts=((_d=item.locations)===null||_d===void 0?void 0:_d.length)+((_e=item.contacts)===null||_e===void 0?void 0:_e.length)>=6;var bannerOnTheLeft=windowSize.width>767;var bannerWidth=bannerOnTheLeft&&hasManyLocationsAndContacts?750:450;return jsxs(Host$I,__assign({className:className,highlight:highlight,styleDefinition:styleDefinition,"data-item-id":item.id,"data-card-highlight":highlight,"data-no-registration":hasNoRegistration,"data-banner":(_f=item.bannerInfo)===null||_f===void 0?void 0:_f.type},{children:[jsx$1(IEFix,{},void 0),!readOnly&&jsx$1(ClickableOverlay,{baseRoute:buildPath('/events'),title:contents.title,itemId:item.id,itemType:ItemResourceTypes.Events},void 0),jsx$1(EventCardBanner,{item:item,bannerWidth:bannerWidth,bannerHostDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerHostWidth,showPlaceholder:!item.bannerInfo&&(styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo)},void 0),jsxs(Content$7,{children:[jsxs(Header$2,__assign({"data-card-header":true},{children:[jsx$1(Dates,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled,className:"event-card-dates"},void 0),showFeedbackButtons&&jsx$1(Feedback,{item:item,type:"header",targetRoute:targetRoute},void 0)]}),void 0),readOnly?jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0):jsx$1(EventRecurrenceSeriesInfoNavLink,{recurrenceSeriesId:item.recurrenceSeriesId,title:contents.title,children:jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0)},void 0),jsx$1(Title$7,{children:readOnly?contents.title:jsx$1(StyledLink,__assign({to:targetRoute},{children:contents.title}),void 0)},void 0),jsxs(Footer$1,{children:[jsxs(FooterStart,{children:[jsx$1(Locations,{locations:item.locations},void 0),jsx$1(Contacts,{item:item,hideAnnouncer:true},void 0),jsx$1(EventChannelsDisplay,{item:item,language:userLanguage,allowFilterByChannels:allowFilterByChannels,channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0),jsxs(FooterEnd,{children:[jsx$1(Registration,{item:item,disabled:readOnly},void 0),jsx$1(CancelInfo,{item:item},void 0),showFeedbackButtons&&jsx$1(Feedback,{item:item,type:"footer",targetRoute:targetRoute},void 0)]},void 0)]},void 0)]},void 0)]}),void 0);};var Host$I=_styled.article.withConfig({displayName:"EventCard__Host",componentId:"sc-19skrau-0"})(templateObject_4$y||(templateObject_4$y=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"],["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"])),function(p){return p.styleDefinition?css$2(templateObject_1$1S||(templateObject_1$1S=__makeTemplateObject(["\n background-color: ",";\n ",";\n "],["\n background-color: ",";\n ",";\n "])),p.styleDefinition.backgroundColor||p.theme.palette.white,!p.styleDefinition.noShadow&&CardBorderInline(2,2)):css$2(templateObject_2$18||(templateObject_2$18=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);},maxScreenSize.medium,function(p){return p.highlight&&css$2(templateObject_3$M||(templateObject_3$M=__makeTemplateObject(["\n position: relative;\n\n &::after {\n ",";\n }\n "],["\n position: relative;\n\n &::after {\n ",";\n }\n "])),BannerHighlightStyle$1);},function(p){return p.theme.textColors.default;});var BannerHighlightStyle$1=css$2(templateObject_5$v||(templateObject_5$v=__makeTemplateObject(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"],["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"])),spacingXs,function(p){return p.theme.palette.accent;});var StyledLink=_styled(Link$4).withConfig({displayName:"EventCard__StyledLink",componentId:"sc-19skrau-1"})(templateObject_6$l||(templateObject_6$l=__makeTemplateObject(["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"],["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"])),function(p){return p.theme.textColors.default;});var Title$7=_styled.h3.withConfig({displayName:"EventCard__Title",componentId:"sc-19skrau-2"})(templateObject_7$g||(templateObject_7$g=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeMedium);var Header$2=_styled.div.withConfig({displayName:"EventCard__Header",componentId:"sc-19skrau-3"})(templateObject_8$f||(templateObject_8$f=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),maxScreenSize.medium,spacingXs);var RecurrenceSeriesInfo$1=_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventCard__RecurrenceSeriesInfo",componentId:"sc-19skrau-4"})(templateObject_9$c||(templateObject_9$c=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var Content$7=_styled.div.withConfig({displayName:"EventCard__Content",componentId:"sc-19skrau-5"})(templateObject_10$b||(templateObject_10$b=__makeTemplateObject(["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"],["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"])),spacingM,function(p){return p.theme.textColors.default;});var Footer$1=_styled.div.withConfig({displayName:"EventCard__Footer",componentId:"sc-19skrau-6"})(templateObject_11$7||(templateObject_11$7=__makeTemplateObject(["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingM,maxScreenSize.medium);var FooterStart=_styled.div.withConfig({displayName:"EventCard__FooterStart",componentId:"sc-19skrau-7"})(templateObject_12$6||(templateObject_12$6=__makeTemplateObject(["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"],["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"])),spacingXs,spacingS,maxScreenSize.medium);var FooterEnd=_styled.div.withConfig({displayName:"EventCard__FooterEnd",componentId:"sc-19skrau-8"})(templateObject_13$5||(templateObject_13$5=__makeTemplateObject(["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"],["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"])),maxScreenSize.medium,spacingM);var HeaderFeedback=css$2(templateObject_14$5||(templateObject_14$5=__makeTemplateObject(["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"],["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"])),minScreenSize.medium);var FooterFeedback=css$2(templateObject_15$5||(templateObject_15$5=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"])),spacingM,minScreenSize.medium);var FeedbackHost=_styled.div.withConfig({displayName:"EventCard__FeedbackHost",componentId:"sc-19skrau-9"})(templateObject_16$5||(templateObject_16$5=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),function(_a){var isHeader=_a.isHeader;return isHeader?HeaderFeedback:FooterFeedback;});var Feedback=function Feedback(_a){var item=_a.item,type=_a.type,targetRoute=_a.targetRoute;var user=useCurrentUser();var showCommentCount=item.statistics&&item.statistics.commentCount>0&&hasFeedbackType(item.metadata.feedbackSettings,'comment')&&!user.isPublicUser;return jsxs(FeedbackHost,__assign({isHeader:type==='header'},{children:[jsx$1(EventCardLikeButton,{item:item,itemResourceType:ItemResourceTypes.Events},void 0),showCommentCount&&jsx$1(StyledLink,__assign({to:targetRoute+"#comments","aria-hidden":"true"},{children:jsx$1(EventCardCommentCount,{item:item},void 0)}),void 0)]}),void 0);};var EventCardLikeButton=_styled(CardLikeButton).withConfig({displayName:"EventCard__EventCardLikeButton",componentId:"sc-19skrau-10"})(templateObject_17$4||(templateObject_17$4=__makeTemplateObject(["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"],["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"])));var Registration=_styled(EventCardUserRegistration).withConfig({displayName:"EventCard__Registration",componentId:"sc-19skrau-11"})(templateObject_18$3||(templateObject_18$3=__makeTemplateObject(["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"],["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"])),spacingS,minScreenSize.medium);var Dates=_styled(DateTimeRange).withConfig({displayName:"EventCard__Dates",componentId:"sc-19skrau-12"})(templateObject_19$3||(templateObject_19$3=__makeTemplateObject(["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"],["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"])),fontSizeSmall,function(_a){var isCancelled=_a.isCancelled;return isCancelled?0.4:1;},spacingS);var Locations=_styled(EventLocationInfo).withConfig({displayName:"EventCard__Locations",componentId:"sc-19skrau-13"})(templateObject_20$1||(templateObject_20$1=__makeTemplateObject([""],[""])));var Contacts=_styled(EventPeopleInfo).withConfig({displayName:"EventCard__Contacts",componentId:"sc-19skrau-14"})(templateObject_21$1||(templateObject_21$1=__makeTemplateObject(["\n flex-direction: column;\n"],["\n flex-direction: column;\n"])));var CancelInfo=_styled(EventCancelInformation).withConfig({displayName:"EventCard__CancelInfo",componentId:"sc-19skrau-15"})(templateObject_22$1||(templateObject_22$1=__makeTemplateObject(["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"],["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"])),spacingM,minScreenSize.medium);var IEFix=createGlobalStyle(templateObject_23$1||(templateObject_23$1=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"])));var templateObject_1$1S,templateObject_2$18,templateObject_3$M,templateObject_4$y,templateObject_5$v,templateObject_6$l,templateObject_7$g,templateObject_8$f,templateObject_9$c,templateObject_10$b,templateObject_11$7,templateObject_12$6,templateObject_13$5,templateObject_14$5,templateObject_15$5,templateObject_16$5,templateObject_17$4,templateObject_18$3,templateObject_19$3,templateObject_20$1,templateObject_21$1,templateObject_22$1,templateObject_23$1;var $$3=_export;var aFunction=aFunction$6;var toObject=toObject$6;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
|
|
126250
|
+
if(container.scrollHeight-container.scrollTop>container.clientHeight+300){return [2/*return*/];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,loadNextPage(likersInfo)];case 2:_a.sent();return [3/*break*/,4];case 3:err_1=_a.sent();logger.error(err_1);return [3/*break*/,4];case 4:return [2/*return*/];}});});}};var StyledAvatar$2=_styled(Avatar).withConfig({displayName:"LikersList__StyledAvatar",componentId:"sc-a990fb-0"})(templateObject_1$1Y||(templateObject_1$1Y=__makeTemplateObject(["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"],["\n .ms-Persona-primaryText {\n white-space: initial;\n }\n"])));var List$1=_styled.ul.withConfig({displayName:"LikersList__List",componentId:"sc-a990fb-1"})(templateObject_2$1c||(templateObject_2$1c=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 4px;\n\n max-height: ","px;\n overflow-y: auto;\n\n display: flex;\n flex-direction: column;\n\n li {\n display: flex;\n flex: 1 1 auto;\n margin-top: ","px;\n }\n"])),defaultShimmerCount*58,spacingS);var StyledSpinner$3=_styled(Spinner).withConfig({displayName:"LikersList__StyledSpinner",componentId:"sc-a990fb-2"})(templateObject_3$O||(templateObject_3$O=__makeTemplateObject(["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"],["\n margin: ","px 0;\n\n & > .ms-Spinner {\n height: 38px;\n }\n"])),spacingS);var LikersListShimmer=function LikersListShimmer(_a){var count=_a.count,isLoading=_a.isLoading,children=_a.children;return jsx$1(Shimmer,__assign({isDataLoaded:!isLoading,customElementsGroup:Array.from(Array(count)).map(function(_,i){return jsx$1(UserShimmer,{},i);})},{children:children}),void 0);};var UserShimmer=function UserShimmer(){return jsxs(Fragment,{children:[jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.gap,height:10,width:'100%'}]},void 0),jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.circle,height:48,verticalAlign:'bottom'},{type:ShimmerElementType.gap,height:15},{type:ShimmerElementType.gap,height:15},{type:ShimmerElementType.line,height:18}]},void 0)]},void 0);};var UsersLoadedIndicator=_styled.div.withConfig({displayName:"LikersList__UsersLoadedIndicator",componentId:"sc-a990fb-3"})(templateObject_4$A||(templateObject_4$A=__makeTemplateObject(["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"],["\n margin-top: ","px;\n font-style: italic;\n display: flex;\n justify-content: center;\n"])),spacingM);var templateObject_1$1Y,templateObject_2$1c,templateObject_3$O,templateObject_4$A;_styled.div.withConfig({displayName:"LongPressLikeButton__ButtonHost",componentId:"sc-1n5c9rg-0"})(templateObject_1$1X||(templateObject_1$1X=__makeTemplateObject(["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"],["\n * {\n // try to fix ios behavior\n -webkit-touch-callout: none !important;\n -webkit-user-select: none !important;\n -khtml-user-select: none !important;\n -moz-user-select: none !important;\n -ms-user-select: none !important;\n user-select: none !important;\n -webkit-text-size-adjust: none;\n }\n"])));createGlobalStyle(templateObject_2$1b||(templateObject_2$1b=__makeTemplateObject(["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"],["\n .dialog-likers-list {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n }\n"])),maxScreenSize.small);var templateObject_1$1X,templateObject_2$1b;var HoverLikeButton=function HoverLikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,likersCount=_a.likersCount,children=_a.children;var _b=useState$2(false),showCallout=_b[0],setshowCallout=_b[1];var buttonRef=useRef$1(null);var timeout=useRef$1(null);useEffect$1(function(){return function(){return window.clearTimeout(timeout.current);};},[]);return jsxs("div",__assign({ref:buttonRef,onMouseEnter:handleOnMouseEnter,onMouseLeave:handleOnMouseLeave},{children:[jsx$1("div",{children:children},void 0),showCallout&&jsx$1(LikersCallout,{itemId:itemId,itemType:itemType,target:buttonRef.current,likersCount:likersCount,onDismiss:function(){return setshowCallout(false);}},void 0)]}),void 0);function handleOnMouseEnter(){if(!likersCount){return;}window.clearTimeout(timeout.current);timeout.current=window.setTimeout(function(){setshowCallout(true);},1000);}function handleOnMouseLeave(){window.clearTimeout(timeout.current);}};var LikersCallout=function LikersCallout(_a){var itemId=_a.itemId,itemType=_a.itemType,onDismiss=_a.onDismiss,target=_a.target,likersCount=_a.likersCount;return jsxs(StyledCallout,__assign({target:target,onDismiss:onDismiss,directionalHint:DirectionalHint$1.leftCenter},{children:[jsxs(LikedBy,{children:[jsx$1(FormattedMessage$1,{id:"Generic.likers"},void 0),":"]},void 0),jsx$1(LikersList,{itemId:itemId,itemType:itemType,likersCount:likersCount},void 0)]}),void 0);};var StyledCallout=_styled(Callout).withConfig({displayName:"HoverLikeButton__StyledCallout",componentId:"sc-1f0a2ni-0"})(templateObject_1$1W||(templateObject_1$1W=__makeTemplateObject(["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"],["\n padding: ","px;\n .ms-Callout-main {\n min-height: ","px;\n overflow-y: hidden;\n width: 225px;\n\n .ms-TooltipHost {\n white-space: initial;\n }\n }\n"])),spacingM,spacingXl);var LikedBy=_styled.span.withConfig({displayName:"HoverLikeButton__LikedBy",componentId:"sc-1f0a2ni-1"})(templateObject_2$1a||(templateObject_2$1a=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$1W,templateObject_2$1a;var LikeButton=function LikeButton(_a){var itemId=_a.itemId,itemType=_a.itemType,isActive=_a.isActive,count=_a.count,onClick=_a.onClick,isDemoContent=_a.isDemoContent,doNotRenderZeroCount=_a.doNotRenderZeroCount,readOnly=_a.readOnly,className=_a.className;var features=useFeatures();var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var likeButton=jsx$1(FeedbackCountButton,{className:className,tooltipResourceKey:"Generic.like",activeTooltipResourceKey:"Generic.unlike",ariaLabel:formatMessage({id:isActive?'AriaLabel.unlikeItemButton':'AriaLabel.likeItemButton'}),iconName:"Like",activeIconName:"LikeSolid",isActive:isActive,onClick:onClick,count:count,feedbackType:"like",doNotRenderZeroCount:doNotRenderZeroCount,readOnly:readOnly,hideTooltip:features.showLikers},void 0);if(!features.showLikers||isDemoContent||user.isPublicUser){return likeButton;}return jsx$1(HoverLikeButton,__assign({itemId:itemId,itemType:itemType,likersCount:count},{children:likeButton}),void 0);};function hasFeedbackType(feedbackSettings,feedbackType){return feedbackSettings&&feedbackSettings.feedbackOptions&&feedbackSettings.feedbackOptions.findIndex(function(f){return f===feedbackType;})>-1;}var CardLikeButton=function CardLikeButton(_a){var _b,_c,_d;var item=_a.item,itemResourceType=_a.itemResourceType,className=_a.className;var _e=useState$2(item.isLiked),isLiked=_e[0],setIsLiked=_e[1];var _f=useState$2((_c=(_b=item.statistics)===null||_b===void 0?void 0:_b.likeCount)!==null&&_c!==void 0?_c:0),likeCount=_f[0],setLikeCount=_f[1];var _g=useState$2(false),isSaving=_g[0],setIsSaving=_g[1];var features=useFeatures();var _h=useFeedbackApi(),setFeedback=_h.setFeedback,unsetFeedback=_h.unsetFeedback;var metadata=(_d=item.metadata)!==null&&_d!==void 0?_d:{};var hasLikesEnabled=hasFeedbackType(metadata.feedbackSettings,'like');var showError=useNotificationContext().showError;if(!features.likes||!hasLikesEnabled){return null;}return jsx$1(StyledLikeButton$2,{itemId:item.id,itemType:itemResourceType,isActive:isLiked,count:likeCount,onClick:handleClick,doNotRenderZeroCount:true,className:className,isDemoContent:item.isDemoContent},void 0);function handleClick(){return __awaiter(this,void 0,void 0,function(){var isNowLiked,oldCount;return __generator(this,function(_b){switch(_b.label){case 0:if(isSaving){return [2/*return*/];}isNowLiked=!isLiked;oldCount=likeCount;_b.label=1;case 1:_b.trys.push([1,6,7,8]);setIsSaving(true);setIsLiked(isNowLiked);setLikeCount(isNowLiked?oldCount+1:oldCount-1);if(!isNowLiked)return [3/*break*/,3];return [4/*yield*/,setFeedback(itemResourceType,item.id,'like')];case 2:_b.sent();return [3/*break*/,5];case 3:return [4/*yield*/,unsetFeedback(itemResourceType,item.id,'like')];case 4:_b.sent();_b.label=5;case 5:return [3/*break*/,8];case 6:_b.sent();setIsLiked(!isNowLiked);showError('NewsArticle.setFeedback_error');setLikeCount(oldCount);return [3/*break*/,8];case 7:setIsSaving(false);return [7/*endfinally*/];case 8:return [2/*return*/];}});});}};var StyledLikeButton$2=_styled(LikeButton).withConfig({displayName:"CardLikeButton__StyledLikeButton",componentId:"sc-10mlzn4-0"})(templateObject_1$1V||(templateObject_1$1V=__makeTemplateObject(["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"],["\n min-width: 1px;\n margin: 0 4px;\n font-size: 0.9rem;\n font-weight: normal;\n\n i {\n font-size: 22px;\n font-weight: 400;\n }\n"])));var templateObject_1$1V;var EventRecurrenceSeriesInfo=function EventRecurrenceSeriesInfo(_a){var _b;var eventItem=_a.eventItem,className=_a.className;if(!(eventItem===null||eventItem===void 0?void 0:eventItem.recurrenceSeriesId)){return null;}var endDate=(_b=eventItem.recurrenceSettings)===null||_b===void 0?void 0:_b.endDate;return jsx$1(Host$J,__assign({className:className},{children:jsx$1(StyledTooltip$3,__assign({resourceKey:"Events.editor.recurrence.iconTooltip",values:{endDate:moment(endDate).format('LL')},hidden:!endDate},{children:jsxs(Container$2,{children:[jsx$1(StyledIcon$6,{iconName:"RecurringEvent"},void 0),jsx$1(FormattedMessage$1,{id:"Events.editor.recurrence.series"},void 0)]},void 0)}),void 0)}),void 0);};var Host$J=_styled.div.withConfig({displayName:"EventRecurrenceSeriesInfo__Host",componentId:"sc-12fly5n-0"})(templateObject_1$1U||(templateObject_1$1U=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n"],["\n display: flex;\n font-size: ","px;\n"])),fontSizeSmall);var StyledTooltip$3=_styled(Tooltip).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledTooltip",componentId:"sc-12fly5n-1"})(templateObject_2$19||(templateObject_2$19=__makeTemplateObject(["\n z-index: 1;\n"],["\n z-index: 1;\n"])));var Container$2=_styled.div.withConfig({displayName:"EventRecurrenceSeriesInfo__Container",componentId:"sc-12fly5n-2"})(templateObject_3$N||(templateObject_3$N=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));var StyledIcon$6=_styled(Icon).withConfig({displayName:"EventRecurrenceSeriesInfo__StyledIcon",componentId:"sc-12fly5n-3"})(templateObject_4$z||(templateObject_4$z=__makeTemplateObject(["\n font-size: ","px;\n padding-right: ","px;\n"],["\n font-size: ","px;\n padding-right: ","px;\n"])),fontSizeMedium,spacingXs);var templateObject_1$1U,templateObject_2$19,templateObject_3$N,templateObject_4$z;var EventRecurrenceSeriesInfoNavLink=function EventRecurrenceSeriesInfoNavLink(_a){var recurrenceSeriesId=_a.recurrenceSeriesId,title=_a.title,children=_a.children,className=_a.className;var buildPath=useSubscriptionHandlePathBuilder().buildPath;if(!recurrenceSeriesId){return null;}return jsx$1(StyledNavLink$2,__assign({to:buildPath("/events/upcoming?"+queryString.stringify({seriesId:recurrenceSeriesId,seriesTitle:title})),className:className},{children:children}),void 0);};var StyledNavLink$2=_styled(NavLink).withConfig({displayName:"EventRecurrenceSeriesInfoNavLink__StyledNavLink",componentId:"sc-1szm15-0"})(templateObject_1$1T||(templateObject_1$1T=__makeTemplateObject(["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"],["\n &&& {\n color: ",";\n text-decoration: none;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1T;var EventCard=function EventCard(_a){var _b,_c,_d,_e,_f;var item=_a.item,language=_a.language,styleDefinition=_a.styleDefinition,allowFilterByChannels=_a.allowFilterByChannels,showFeedbackButtons=_a.showFeedbackButtons,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var windowSize=useWindowSize$2();var highlight=!!user.unreadEvents.find(function(e){return e.itemId===item.id||e.itemId===item.recurrenceSeriesId;});var userLanguage=getPreferredContentLanguage(user);var contents=item.contents[language];var targetRoute=NewsService.getNewsRoute(buildPath('/events'),item.id,contents.title);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;var hasNoRegistration=!isCancelled&&!((_c=item.registrationSettings)===null||_c===void 0?void 0:_c.enabled);var hasManyLocationsAndContacts=((_d=item.locations)===null||_d===void 0?void 0:_d.length)+((_e=item.contacts)===null||_e===void 0?void 0:_e.length)>=6;var bannerOnTheLeft=windowSize.width>767;var bannerWidth=bannerOnTheLeft&&hasManyLocationsAndContacts?750:450;return jsxs(Host$I,__assign({className:className,highlight:highlight,styleDefinition:styleDefinition,"data-item-id":item.id,"data-card-highlight":highlight,"data-no-registration":hasNoRegistration,"data-banner":(_f=item.bannerInfo)===null||_f===void 0?void 0:_f.type},{children:[jsx$1(IEFix,{},void 0),!readOnly&&jsx$1(ClickableOverlay,{baseRoute:buildPath('/events'),title:contents.title,itemId:item.id,itemType:ItemResourceTypes.Events},void 0),jsx$1(EventCardBanner,{item:item,bannerWidth:bannerWidth,bannerHostDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerHostWidth,showPlaceholder:!item.bannerInfo&&(styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo)},void 0),jsxs(Content$7,{children:[jsxs(Header$2,__assign({"data-card-header":true},{children:[jsx$1(Dates,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled,className:"event-card-dates"},void 0),showFeedbackButtons&&jsx$1(Feedback,{item:item,type:"header",targetRoute:targetRoute},void 0)]}),void 0),readOnly?jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0):jsx$1(EventRecurrenceSeriesInfoNavLink,{recurrenceSeriesId:item.recurrenceSeriesId,title:contents.title,children:jsx$1(RecurrenceSeriesInfo$1,{eventItem:item},void 0)},void 0),jsx$1(Title$7,{children:readOnly?contents.title:jsx$1(StyledLink,__assign({to:targetRoute},{children:contents.title}),void 0)},void 0),jsxs(Footer$1,{children:[jsxs(FooterStart,{children:[jsx$1(Locations,{locations:item.locations},void 0),jsx$1(Contacts,{item:item,hideAnnouncer:true},void 0),jsx$1(EventChannelsDisplay,{item:item,language:userLanguage,allowFilterByChannels:allowFilterByChannels,channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0),jsxs(FooterEnd,{children:[jsx$1(Registration,{item:item,disabled:readOnly},void 0),jsx$1(CancelInfo,{item:item},void 0),showFeedbackButtons&&jsx$1(Feedback,{item:item,type:"footer",targetRoute:targetRoute},void 0)]},void 0)]},void 0)]},void 0)]}),void 0);};var Host$I=_styled.article.withConfig({displayName:"EventCard__Host",componentId:"sc-19skrau-0"})(templateObject_4$y||(templateObject_4$y=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"],["\n ","\n\n display: flex;\n width: 100%;\n position: relative;\n\n @media (max-width: ","px) {\n flex-direction: column;\n }\n\n ","\n\n color: ",";\n"])),function(p){return p.styleDefinition?css$2(templateObject_1$1S||(templateObject_1$1S=__makeTemplateObject(["\n background-color: ",";\n ",";\n "],["\n background-color: ",";\n ",";\n "])),p.styleDefinition.backgroundColor||p.theme.palette.white,!p.styleDefinition.noShadow&&CardBorderInline(2,2)):css$2(templateObject_2$18||(templateObject_2$18=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);},maxScreenSize.medium,function(p){return p.highlight&&css$2(templateObject_3$M||(templateObject_3$M=__makeTemplateObject(["\n position: relative;\n\n &::after {\n ",";\n }\n "],["\n position: relative;\n\n &::after {\n ",";\n }\n "])),BannerHighlightStyle$1);},function(p){return p.theme.textColors.default;});var BannerHighlightStyle$1=css$2(templateObject_5$v||(templateObject_5$v=__makeTemplateObject(["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"],["\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: ","px;\n display: block;\n background-color: ",";\n"])),spacingXs,function(p){return p.theme.palette.accent;});var StyledLink=_styled(Link$4).withConfig({displayName:"EventCard__StyledLink",componentId:"sc-19skrau-1"})(templateObject_6$l||(templateObject_6$l=__makeTemplateObject(["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"],["\n &&& {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n"])),function(p){return p.theme.textColors.default;});var Title$7=_styled.h3.withConfig({displayName:"EventCard__Title",componentId:"sc-19skrau-2"})(templateObject_7$g||(templateObject_7$g=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeMedium);var Header$2=_styled.div.withConfig({displayName:"EventCard__Header",componentId:"sc-19skrau-3"})(templateObject_8$f||(templateObject_8$f=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: flex-start;\n > *:not(:first-child) {\n padding-top: ","px;\n }\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),maxScreenSize.medium,spacingXs);var RecurrenceSeriesInfo$1=_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventCard__RecurrenceSeriesInfo",componentId:"sc-19skrau-4"})(templateObject_9$c||(templateObject_9$c=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var Content$7=_styled.div.withConfig({displayName:"EventCard__Content",componentId:"sc-19skrau-5"})(templateObject_10$b||(templateObject_10$b=__makeTemplateObject(["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"],["\n padding: ","px;\n flex-grow: 1;\n\n color: ",";\n"])),spacingM,function(p){return p.theme.textColors.default;});var Footer$1=_styled.div.withConfig({displayName:"EventCard__Footer",componentId:"sc-19skrau-6"})(templateObject_11$7||(templateObject_11$7=__makeTemplateObject(["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n margin-top: ","px;\n\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n\n @media (max-width: ","px) {\n flex-direction: column;\n align-items: stretch;\n }\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingM,maxScreenSize.medium);var FooterStart=_styled.div.withConfig({displayName:"EventCard__FooterStart",componentId:"sc-19skrau-7"})(templateObject_12$6||(templateObject_12$6=__makeTemplateObject(["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"],["\n flex: 1 1 100%;\n\n margin-right: ","px;\n\n > *:first-child:not(:only-child) {\n margin-bottom: ","px;\n }\n\n @media (max-width: ","px) {\n flex: 1 1 auto;\n }\n"])),spacingXs,spacingS,maxScreenSize.medium);var FooterEnd=_styled.div.withConfig({displayName:"EventCard__FooterEnd",componentId:"sc-19skrau-8"})(templateObject_13$5||(templateObject_13$5=__makeTemplateObject(["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"],["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"])),maxScreenSize.medium,spacingS);var HeaderFeedback=css$2(templateObject_14$5||(templateObject_14$5=__makeTemplateObject(["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"],["\n display: none;\n @media (min-width: ","px) {\n display: flex;\n align-items: center;\n }\n"])),minScreenSize.medium);var FooterFeedback=css$2(templateObject_15$5||(templateObject_15$5=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"])),spacingS,minScreenSize.medium);var FeedbackHost=_styled.div.withConfig({displayName:"EventCard__FeedbackHost",componentId:"sc-19skrau-9"})(templateObject_16$5||(templateObject_16$5=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),function(_a){var isHeader=_a.isHeader;return isHeader?HeaderFeedback:FooterFeedback;});var Feedback=function Feedback(_a){var item=_a.item,type=_a.type,targetRoute=_a.targetRoute;var user=useCurrentUser();var showCommentCount=item.statistics&&item.statistics.commentCount>0&&hasFeedbackType(item.metadata.feedbackSettings,'comment')&&!user.isPublicUser;return jsxs(FeedbackHost,__assign({isHeader:type==='header'},{children:[jsx$1(EventCardLikeButton,{item:item,itemResourceType:ItemResourceTypes.Events},void 0),showCommentCount&&jsx$1(StyledLink,__assign({to:targetRoute+"#comments","aria-hidden":"true"},{children:jsx$1(EventCardCommentCount,{item:item},void 0)}),void 0)]}),void 0);};var EventCardLikeButton=_styled(CardLikeButton).withConfig({displayName:"EventCard__EventCardLikeButton",componentId:"sc-19skrau-10"})(templateObject_17$4||(templateObject_17$4=__makeTemplateObject(["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"],["\n && {\n button {\n min-height: 23px;\n display: flex;\n margin-right: 9px;\n font-size: 1rem;\n }\n }\n"])));var Registration=_styled(EventCardUserRegistration).withConfig({displayName:"EventCard__Registration",componentId:"sc-19skrau-11"})(templateObject_18$3||(templateObject_18$3=__makeTemplateObject(["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"],["\n && {\n margin-top: ","px;\n button {\n width: 100%;\n }\n\n @media (min-width: ","px) {\n text-align: right;\n button {\n width: initial;\n }\n }\n }\n"])),spacingS,minScreenSize.medium);var Dates=_styled(DateTimeRange).withConfig({displayName:"EventCard__Dates",componentId:"sc-19skrau-12"})(templateObject_19$3||(templateObject_19$3=__makeTemplateObject(["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"],["\n flex: 1;\n font-size: ","px;\n font-weight: 500;\n opacity: ",";\n padding-right: ","px;\n"])),fontSizeSmall,function(_a){var isCancelled=_a.isCancelled;return isCancelled?0.4:1;},spacingS);var Locations=_styled(EventLocationInfo).withConfig({displayName:"EventCard__Locations",componentId:"sc-19skrau-13"})(templateObject_20$1||(templateObject_20$1=__makeTemplateObject([""],[""])));var Contacts=_styled(EventPeopleInfo).withConfig({displayName:"EventCard__Contacts",componentId:"sc-19skrau-14"})(templateObject_21$1||(templateObject_21$1=__makeTemplateObject(["\n flex-direction: column;\n"],["\n flex-direction: column;\n"])));var CancelInfo=_styled(EventCancelInformation).withConfig({displayName:"EventCard__CancelInfo",componentId:"sc-19skrau-15"})(templateObject_22$1||(templateObject_22$1=__makeTemplateObject(["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"],["\n margin: 0 -","px;\n @media (min-width: ","px) {\n margin: 0;\n }\n"])),spacingM,minScreenSize.medium);var IEFix=createGlobalStyle(templateObject_23$1||(templateObject_23$1=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"])));var templateObject_1$1S,templateObject_2$18,templateObject_3$M,templateObject_4$y,templateObject_5$v,templateObject_6$l,templateObject_7$g,templateObject_8$f,templateObject_9$c,templateObject_10$b,templateObject_11$7,templateObject_12$6,templateObject_13$5,templateObject_14$5,templateObject_15$5,templateObject_16$5,templateObject_17$4,templateObject_18$3,templateObject_19$3,templateObject_20$1,templateObject_21$1,templateObject_22$1,templateObject_23$1;var $$4=_export;var aFunction$1=aFunction$7;var toObject$1=toObject$7;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
|
|
126253
126251
|
var FAILS_ON_UNDEFINED=fails$j(function(){test$1.sort(undefined);});// V8 bug
|
|
126254
126252
|
var FAILS_ON_NULL=fails$j(function(){test$1.sort(null);});// Old WebKit
|
|
126255
126253
|
var STRICT_METHOD=arrayMethodIsStrict('sort');var FORCED$1=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD;// `Array.prototype.sort` method
|
|
126256
126254
|
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
|
|
126257
|
-
$$
|
|
126255
|
+
$$4({target:'Array',proto:true,forced:FORCED$1},{sort:function sort(comparefn){return comparefn===undefined?nativeSort.call(toObject$1(this)):nativeSort.call(toObject$1(this),aFunction$1(comparefn));}});function useExternalContentHandler(){var _this=this;var history=useHistory();var onRequestToken=useContext(AuthenticationContext).onRequestToken;var trackExternalItem=useNewsApi().trackExternalItem;var createApiUrl=useApiFactory().createApiUrl;var currentUser=useCurrentUser();var webAppUrls=useSubscriptionWebAppUrls();var _a=useContext(LinkContext),onOpenExternalLink=_a.onOpenExternalLink,tryGetInternalLink=_a.tryGetInternalLink;var refreshUserDetails=useRefreshUserDetails();return function(item,itemType,openInNewTab){return __awaiter(_this,void 0,void 0,function(){var language,externalContentUrl,internalLink,token;return __generator(this,function(_a){switch(_a.label){case 0:if(!(item===null||item===void 0?void 0:item.useExternalContent)){return [2/*return*/,null];}language=getPreferredContentLanguage(currentUser);externalContentUrl=getExternalContentUrl(item,language);if(!externalContentUrl){return [2/*return*/,null];}internalLink=tryGetInternalLink(externalContentUrl,webAppUrls);if(internalLink){// no API redirect; only the unread & page views tracking
|
|
126258
126256
|
trackExternalItem(item.id,itemType).then(function(){return refreshUserDetails();},logger.error);history.push(internalLink);return [2/*return*/,true];}return [4/*yield*/,onRequestToken()];case 1:token=_a.sent();if(!token){return [2/*return*/,false];}return [4/*yield*/,redirectToExternalContent(item.id,itemType,token,openInNewTab)];case 2:_a.sent();refreshUserDetails();return [2/*return*/,true];}});});};function redirectToExternalContent(itemId,itemType,token,openNewTab){return __awaiter(this,void 0,void 0,function(){var apiExternalContentRedirectRoute;return __generator(this,function(_a){switch(_a.label){case 0:apiExternalContentRedirectRoute=createApiUrl("/"+itemType+"/"+encodeURIComponent(itemId)+"/external_url",{access_token:token});return [4/*yield*/,onOpenExternalLink(apiExternalContentRedirectRoute,openNewTab)];case 1:_a.sent();return [2/*return*/];}});});}}function useExternalContentClickHandler(){var _this=this;var handleExternalContent=useExternalContentHandler();return function(e,item,itemType){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!item.useExternalContent){return [2/*return*/];}e.stopPropagation();e.preventDefault();return [4/*yield*/,handleExternalContent(item,itemType,true)];case 1:_a.sent();return [2/*return*/];}});});};}function useExternalContentRedirectHandler(item,resourceType,noRedirect){var _this=this;var handleExternalContent=useExternalContentHandler();useEffect$1(function(){if(noRedirect){return;}(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,handleExternalContent(item,resourceType)];case 1:return [2/*return*/,_a.sent()];}});});})();// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126259
126257
|
},[item===null||item===void 0?void 0:item.id]);}function usePagesClickHandler(){var user=useCurrentUser();var userToken=useCurrentToken();var onOpenExternalLink=useContext(LinkContext).onOpenExternalLink;var getDocumentFileUrl=usePagesApi().getDocumentFileUrl;var createApiUrl=useApiFactory().createApiUrl;var handleExternalContent=useExternalContentHandler();var _a=useFileAccessTokenApi(),exchangeShortLivedToken=_a.exchangeShortLivedToken,getPublishableItemShortLivedToken=_a.getPublishableItemShortLivedToken,createDownloadClickHandler=_a.createDownloadClickHandler;return useMemo(function(){return {createPageClickHandler:createPageClickHandler,createDocumentClickHandler:createDocumentClickHandler};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126260
126258
|
},[user.subscription.id,userToken,getDocumentFileUrl,handleExternalContent]);function createPageClickHandler(page,basePath,additionalOnClick,ignoreExternalContent){var _this=this;if(!page.useExternalContent||// we don't want the editor view to open the external page
|
|
@@ -126269,11 +126267,11 @@ return nodes.slice().sort(function(a,b){return compareRootPages(groupPositions,a
|
|
|
126269
126267
|
// we just use the id for that, because this one is always different
|
|
126270
126268
|
var fallbackCompare=function fallbackCompare(){var _a;return ((_a=a.id)===null||_a===void 0?void 0:_a.localeCompare(b===null||b===void 0?void 0:b.id))||0;};if(firstGroupIdOfA===firstGroupIdOfB){return a.position-b.position||fallbackCompare();}return groupPositions[firstGroupIdOfA]-groupPositions[firstGroupIdOfB]||fallbackCompare();}function useInlinePageDocument(documentData,page,basePath){if(basePath===void 0){basePath='pages';}var extension=documentData.extension,fileId=documentData.fileId,originalFileName=documentData.fileName,pageId=documentData.pageId,originalTitle=documentData.title;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var createDocumentClickHandler=usePagesClickHandler().createDocumentClickHandler;var _a=useMemo(function(){var iconName=getFileIconByExtension(extension);var fileUrl=NewsService.getNewsRoute(buildPath(basePath),pageId,null);return {iconName:iconName,fileUrl:fileUrl};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126271
126269
|
},[extension,pageId]),fileUrl=_a.fileUrl,iconName=_a.iconName;var _b=useMemo(function(){if(!(page===null||page===void 0?void 0:page.id)){return {title:originalTitle,fileName:originalFileName};}var _a=getFileInfo(page,user),fileInfo=_a.fileInfo,language=_a.language;var onPageDocumentDownloadClick=createDocumentClickHandler(pageId,fileId,language,fileInfo.shouldOpenInBrowser,page.fileAccessToken,basePath);return {title:getTitle(page,user,formatMessage,language),fileName:fileInfo.fileName,onPageDocumentDownloadClick:onPageDocumentDownloadClick};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126272
|
-
},[page===null||page===void 0?void 0:page.id,createDocumentClickHandler]),fileName=_b.fileName,title=_b.title,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return {fileUrl:fileUrl,iconName:iconName,fileName:fileName,title:title,onPageDocumentDownloadClick:onPageDocumentDownloadClick};}function getFileInfo(page,user){var _a=getContentForPage(page,user),content=_a.content,language=_a.language;return {fileInfo:content===null||content===void 0?void 0:content.fileInfo,language:language};}function getContentForPage(page,user){var language=getLanguageForPage(page,user);return {content:page.contents[language],language:language};}function getLanguageForPage(page,user){if(!user||!page||!page.contents||!user.subscription){return null;}var language=NewsService.getLanguageForContent(page.contents,user,function(c){var _a;return page.pageType!==PageType.Document||((_a=c.fileInfo)===null||_a===void 0?void 0:_a.fileId)!=null;});if(language){return language;}return NewsService.getLanguageForContent(page.contents,user);}function convertToNavigationNode(page){var _a,_b,_c,_d;var parent=(_b=(_a=page===null||page===void 0?void 0:page.navigationContext)===null||_a===void 0?void 0:_a.parent)!==null&&_b!==void 0?_b:{id:page.parentId,contents:{}};return {id:page.id,pageType:page.pageType,parent:parent,position:page.position,status:page.status,groupIds:page.groupIds,hasHiddenAncestor:page.hasHiddenAncestor,isUnlinked:page.isUnlinked,hasPublishedVersion:page.isCurrentPublishedVersion||!!page.publishedVersionId,contents:Object.values(page.contents||{}).filter(function(c){return c.active;}).reduce(function(acc,next){acc[next.language]=next;return acc;},{}),firstChildId:page.firstChildId||((_d=(_c=page.navigationContext)===null||_c===void 0?void 0:_c.children)===null||_d===void 0?void 0:_d[0].id),children:undefined,isSearchMatch:undefined,hasAnyPageChild:undefined,useExternalContent:page.useExternalContent,topLevelFolderName:undefined};}var HostBaseStyle=function HostBaseStyle(backgroundColor){return css$2(templateObject_3$L||(templateObject_3$L=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n "],["\n ","\n\n display: flex;\n width: 100%;\n "])),function(p){return backgroundColor?css$2(templateObject_1$1R||(templateObject_1$1R=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),backgroundColor||p.theme.palette.white):css$2(templateObject_2$17||(templateObject_2$17=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);});};var ContentStyle=css$2(templateObject_4$x||(templateObject_4$x=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"],["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"])),fontSizeMedium);var MetaInfoStyle=function MetaInfoStyle(marginBottomOnEmpty){return css$2(templateObject_5$u||(templateObject_5$u=__makeTemplateObject(["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"],["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"])),fontSizeSmall,marginBottomOnEmpty||spacingM);};var BorderRadiusStyle=function BorderRadiusStyle(roundedCornerSize,rightSideOnly){var radius=roundedCornerSize||inlinePageBannerRoundedCornerSize;return css$2(templateObject_8$e||(templateObject_8$e=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),rightSideOnly?css$2(templateObject_6$k||(templateObject_6$k=__makeTemplateObject(["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "],["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "])),radius,radius):css$2(templateObject_7$f||(templateObject_7$f=__makeTemplateObject(["\n border-radius: ","px;\n "],["\n border-radius: ","px;\n "])),radius));};var templateObject_1$1R,templateObject_2$17,templateObject_3$L,templateObject_4$x,templateObject_5$u,templateObject_6$k,templateObject_7$f,templateObject_8$e;var ExternalContentIcon=function ExternalContentIcon(_a){var tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceValues=_a.tooltipResourceValues,className=_a.className;return jsx$1(StyledTooltip$2,__assign({className:className,resourceKey:tooltipResourceKey,values:{url:tooltipResourceValues},width:400},{children:jsx$1(StyledIcon$5,{iconName:"NavigateExternalInline","data-external-content":true},void 0)}),void 0);};var StyledTooltip$2=_styled(Tooltip).withConfig({displayName:"ExternalContentIcon__StyledTooltip",componentId:"sc-8h84ua-0"})(templateObject_1$1Q||(templateObject_1$1Q=__makeTemplateObject(["\n display: inline-flex;\n z-index: 1;\n"],["\n display: inline-flex;\n z-index: 1;\n"])));var StyledIcon$5=_styled(Icon).withConfig({displayName:"ExternalContentIcon__StyledIcon",componentId:"sc-8h84ua-1"})(templateObject_2$16||(templateObject_2$16=__makeTemplateObject(["\n margin-left: ","px;\n"],["\n margin-left: ","px;\n"])),spacingXs);var templateObject_1$1Q,templateObject_2$16;var Title$6=function Title(_a){var title=_a.title,targetRoute=_a.targetRoute,readOnly=_a.readOnly,openTargetInNewWindow=_a.openTargetInNewWindow,isDownloadLink=_a.isDownloadLink,isExternalContent=_a.isExternalContent,onClick=_a.onClick,resourceKey=_a.resourceKey,resourceValues=_a.resourceValues,className=_a.className;return jsx$1(TitleHost,__assign({expandClickArea:!isExternalContent,className:className},{children:readOnly?jsx$1("span",{children:title},void 0):isDownloadLink?jsx$1("a",__assign({href:targetRoute,rel:"noopener noreferrer",onClick:onClick},{children:jsx$1("span",{children:title},void 0)}),void 0):openTargetInNewWindow?jsxs("a",__assign({href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick},{children:[jsx$1("span",{children:title},void 0),isExternalContent&&jsx$1(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0):jsxs(Link$4,__assign({to:targetRoute,onClick:onClick},{children:[jsx$1("span",{children:title},void 0),isExternalContent&&jsx$1(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0)}),void 0);};var TitleHost=_styled.h3.withConfig({displayName:"Title__TitleHost",componentId:"sc-1wpb7iz-0"})(templateObject_2$15||(templateObject_2$15=__makeTemplateObject(["\n font-size: ","px;\n z-index: 1;\n\n ","\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"],["\n font-size: ","px;\n z-index: 1;\n\n ","\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"])),fontSizeMedium,function(p){return p.expandClickArea&&css$2(templateObject_1$1P||(templateObject_1$1P=__makeTemplateObject(["\n position: relative;\n\n a::before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "],["\n position: relative;\n\n a::before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "])));},spacingS,function(p){return p.theme.textColors.default;});var templateObject_1$1P,templateObject_2$15;function getBreadcrumbsItems(page,target,handleOnClick,getTitle,formatMessage,hideCurrentPageNode,hideHomeNode){var ancestors=[];var parent=page.navigationContext.parent;while(parent!=null&&parent.id!=null){ancestors.unshift({title:getTitle(parent),id:parent.id});parent=parent.parent;}var parentNode=ancestors.find(function(a){return a.id===page.parentId;});var items=hideHomeNode?[]:[{key:'home',text:formatMessage({id:'Generic.home'}),href:target}];var ancestorItems=ancestors.map(function(node){return {key:node.id,text:node.title,href:NewsService.getNewsRoute(target,node.id,node.title),onClick:handleOnClick};});if(hideCurrentPageNode){return {breadcrumbItems:__spreadArray(__spreadArray([],items),ancestorItems),ancestors:ancestors,parentNode:parentNode};}var currentItem={key:'current',text:getTitle(page),isCurrentItem:true};return {breadcrumbItems:__spreadArray(__spreadArray(__spreadArray([],items),ancestorItems),[currentItem]),ancestors:ancestors,parentNode:parentNode};}var ListItemBreadcrumb=function ListItemBreadcrumb(_a){var page=_a.page,languageOverride=_a.language,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;if(!page||!page.navigationContext){return null;}var breadcrumbItems=getBreadcrumbsItems(page,null,function(){},function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,true,true).breadcrumbItems;return jsx$1(Host$H,__assign({className:className},{children:breadcrumbItems.map(function(b,i){return jsxs(Fragment$1,{children:[i!==0&&jsx$1(RightChevronIcon,{iconName:"ChevronRight"},void 0),jsx$1("span",{children:b.text},void 0)]},b.key);})}),void 0);};var Host$H=_styled.p.withConfig({displayName:"ListItemBreadcrumb__Host",componentId:"sc-c9uoz1-0"})(templateObject_1$1O||(templateObject_1$1O=__makeTemplateObject(["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"],["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"])),spacingXxs,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var RightChevronIcon=_styled(Icon).withConfig({displayName:"ListItemBreadcrumb__RightChevronIcon",componentId:"sc-c9uoz1-1"})(templateObject_2$14||(templateObject_2$14=__makeTemplateObject(["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"],["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"])),spacingXxs,fontSizeSmaller-2);var templateObject_1$1O,templateObject_2$14;var PageItemTile=function PageItemTile(_a){var _b,_c;var item=_a.item,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,additionalMetadata=_a.additionalMetadata,buttons=_a.buttons,additionalContent=_a.additionalContent,showBannerPlaceholder=_a.showBannerPlaceholder,showBreadcrumb=_a.showBreadcrumb,showIntro=_a.showIntro,className=_a.className;var user=useCurrentUserContext().user;var intl=useIntl();var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var title=getTitle(item,user,intl.formatMessage);var language=getLanguageForPage(item,user);var content=item.contents[language];var hasKeywords=Object.keys((_b=item.keywords)!==null&&_b!==void 0?_b:[]).length>0;var targetRoute=NewsService.getNewsRoute(baseRoute,item.id,title);var clickHandler=createPageClickHandler(item);var isDocument=item.pageType===PageType.Document;var isEditor=baseRoute.includes('/editor');var preferredContentLanguage=getPreferredContentLanguage(user);var url=item.useExternalContent&&getExternalContentUrl(item,preferredContentLanguage);return jsxs(Host$G,__assign({"data-item-id":item.id,className:className},{children:[!readOnly&&jsx$1(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.Pages,baseRoute:baseRoute,title:title,isExternalContent:item.useExternalContent},void 0),jsxs(Inner$3,__assign({styleDefinition:styleDefinition,hasBanner:item.bannerInfo!=null||showBannerPlaceholder||isDocument},{children:[jsx$1(Banner$2,{item:item,language:language,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,applyRoundedCorners:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.applyRoundedCorners,showBannerPlaceholder:showBannerPlaceholder,isEditor:isEditor,bannerFontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerFontSize},void 0),jsxs(Content$6,__assign({padding:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.contentPadding,"data-page-tile-content":true},{children:[jsxs(MetaInfo$3,__assign({paddingRight:showBreadcrumb&&!isDocument&&readOnly?spacingM:0},{children:[showBreadcrumb&&jsx$1(StyledListItemBreadcrumb,{page:item},void 0),!showBreadcrumb&&item.modified&&jsx$1(DateTime,{value:item.modified},void 0),additionalMetadata]}),void 0),jsxs(MainContent,{children:[jsxs(TitleAndIntro,__assign({addDownloadButtonSafetySpace:isDocument},{children:[jsx$1(StyledTitle$1,{title:title,targetRoute:targetRoute,readOnly:readOnly,onClick:clickHandler,fontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleFontSize,margin:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleMargin,isExternalContent:item.useExternalContent,resourceKey:item.useExternalContent?'ExternalLinkButton.pages.navigateTo':undefined,resourceValues:url!==null&&url!==void 0?url:undefined},void 0),showIntro&&((_c=content.intro)===null||_c===void 0?void 0:_c.length)>0&&jsx$1(Intro$2,{children:content.intro},void 0)]}),void 0),additionalContent]},void 0),hasKeywords&&jsx$1(Keywords$2,{children:jsx$1(FlatKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0)},void 0),buttons&&jsx$1(Buttons$2,{children:buttons},void 0)]}),void 0)]}),void 0)]}),void 0);};var StyledTitle$1=_styled(Title$6).withConfig({displayName:"PageItemTile__StyledTitle",componentId:"sc-lcm8k6-0"})(templateObject_5$t||(templateObject_5$t=__makeTemplateObject(["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"],["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"])),function(p){return !p.fontSize&&css$2(templateObject_1$1N||(templateObject_1$1N=__makeTemplateObject(["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "],["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "])),LineClamp(2,fontSizeMedium,1.4));},function(p){return p.fontSize&&css$2(templateObject_2$13||(templateObject_2$13=__makeTemplateObject(["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "],["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "])),p.fontSize,fontSizeNormal,fontSizeNormal);},function(p){return p.margin?css$2(templateObject_3$K||(templateObject_3$K=__makeTemplateObject(["\n margin: "," !important;\n "],["\n margin: "," !important;\n "])),p.margin):css$2(templateObject_4$w||(templateObject_4$w=__makeTemplateObject(["\n margin: 0 !important;\n "],["\n margin: 0 !important;\n "])));});var Intro$2=_styled.div.withConfig({displayName:"PageItemTile__Intro",componentId:"sc-lcm8k6-1"})(templateObject_6$j||(templateObject_6$j=__makeTemplateObject(["\n margin: ","px 0 ","px;\n ","\n"],["\n margin: ","px 0 ","px;\n ","\n"])),spacingXs-1,spacingS+5,LineClamp(10,fontSizeSmall,1.4));var Host$G=_styled.article.withConfig({displayName:"PageItemTile__Host",componentId:"sc-lcm8k6-2"})(templateObject_7$e||(templateObject_7$e=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));var Inner$3=_styled.div.withConfig({displayName:"PageItemTile__Inner",componentId:"sc-lcm8k6-3"})(templateObject_11$6||(templateObject_11$6=__makeTemplateObject(["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.applyRoundedCorners)&&BorderRadiusStyle();},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.height)?css$2(templateObject_8$d||(templateObject_8$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.styleDefinition.height):css$2(templateObject_9$b||(templateObject_9$b=__makeTemplateObject(["\n height: auto;\n min-height: 138px;\n "],["\n height: auto;\n min-height: 138px;\n "])));},function(p){var _a;return p.hasBanner&&css$2(templateObject_10$a||(templateObject_10$a=__makeTemplateObject(["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "],["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "])),(_a=p.styleDefinition)===null||_a===void 0?void 0:_a.bannerDefaultWidth);});var Content$6=_styled.div.withConfig({displayName:"PageItemTile__Content",componentId:"sc-lcm8k6-4"})(templateObject_14$4||(templateObject_14$4=__makeTemplateObject(["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"],["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"])),ContentStyle,function(p){return p.padding?css$2(templateObject_12$5||(templateObject_12$5=__makeTemplateObject(["\n padding: ",";\n "],["\n padding: ",";\n "])),p.padding):css$2(templateObject_13$4||(templateObject_13$4=__makeTemplateObject(["\n padding: ","px;\n "],["\n padding: ","px;\n "])),spacingM);});var MetaInfo$3=_styled.div.withConfig({displayName:"PageItemTile__MetaInfo",componentId:"sc-lcm8k6-5"})(templateObject_15$4||(templateObject_15$4=__makeTemplateObject(["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"],["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"])),MetaInfoStyle(17),function(p){return p.theme.textColors.default;},function(p){return p.paddingRight;});var MainContent=_styled.div.withConfig({displayName:"PageItemTile__MainContent",componentId:"sc-lcm8k6-6"})(templateObject_16$4||(templateObject_16$4=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"],["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"])));var DownloadButtonWidth=32;var TitleAndIntro=_styled.div.withConfig({displayName:"PageItemTile__TitleAndIntro",componentId:"sc-lcm8k6-7"})(templateObject_17$3||(templateObject_17$3=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"],["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"])),function(p){return p.addDownloadButtonSafetySpace?DownloadButtonWidth:0;});var StyledListItemBreadcrumb=_styled(ListItemBreadcrumb).withConfig({displayName:"PageItemTile__StyledListItemBreadcrumb",componentId:"sc-lcm8k6-8"})(templateObject_18$2||(templateObject_18$2=__makeTemplateObject(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"],["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"])));var Keywords$2=_styled.span.withConfig({displayName:"PageItemTile__Keywords",componentId:"sc-lcm8k6-9"})(templateObject_19$2||(templateObject_19$2=__makeTemplateObject(["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"],["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});var Buttons$2=_styled.div.withConfig({displayName:"PageItemTile__Buttons",componentId:"sc-lcm8k6-10"})(templateObject_20$2||(templateObject_20$2=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingS);var Banner$2=function Banner(_a){var _b,_c;var item=_a.item,language=_a.language,bannerDefaultWidth=_a.bannerDefaultWidth,bannerFontSize=_a.bannerFontSize,applyRoundedCorners=_a.applyRoundedCorners,showBannerPlaceholder=_a.showBannerPlaceholder,isEditor=_a.isEditor;var bannerInfo=item.bannerInfo;var isDocument=item.pageType===PageType.Document;var fileIcon=getFileIconByExtension(((_c=(_b=item.contents[language])===null||_b===void 0?void 0:_b.fileInfo)===null||_c===void 0?void 0:_c.extension)||'');if(isDocument){return jsx$1(BannerHost$1,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(FileIcon$1,{iconName:fileIcon,fontSize:bannerFontSize,color:getIconColor(fileIcon)},void 0)}),void 0);}if(!bannerInfo&&!showBannerPlaceholder){return null;}if(bannerDefaultWidth<100){return jsx$1(SmallBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:isEditor?'edit':'read',width:200,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0);}return jsx$1("div",{children:jsx$1(LargeBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:450,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0)},void 0);};var BannerHost$1=_styled.div.withConfig({displayName:"PageItemTile__BannerHost",componentId:"sc-lcm8k6-11"})(templateObject_23$2||(templateObject_23$2=__makeTemplateObject(["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"],["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"])),function(p){return p.defaultWidth;},function(p){return p.theme.palette.neutralQuaternaryAlt;},function(p){return p.applyRoundedCorners&&css$2(templateObject_21$2||(templateObject_21$2=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));},maxScreenSize.medium,function(p){return p.defaultWidth>100&&css$2(templateObject_22$2||(templateObject_22$2=__makeTemplateObject(["\n width: auto;\n height: 100px;\n "],["\n width: auto;\n height: 100px;\n "])));});var FileIcon$1=_styled(Icon).withConfig({displayName:"PageItemTile__FileIcon",componentId:"sc-lcm8k6-12"})(templateObject_24$1||(templateObject_24$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),function(p){return p.fontSize||30;},function(p){return p.color||p.theme.textColors.default;});var SmallBannerWrapper=_styled.div.withConfig({displayName:"PageItemTile__SmallBannerWrapper",componentId:"sc-lcm8k6-13"})(templateObject_26$1||(templateObject_26$1=__makeTemplateObject(["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"],["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"])),function(p){return p.theme.palette.accent;},function(p){return p.defaultWidth;},function(p){return p.applyRoundedCorners&&css$2(templateObject_25$1||(templateObject_25$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));});var LargeBannerWrapper=_styled(LeftBannerWrapper).withConfig({displayName:"PageItemTile__LargeBannerWrapper",componentId:"sc-lcm8k6-14"})(templateObject_28$1||(templateObject_28$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.applyRoundedCorners&&css$2(templateObject_27$1||(templateObject_27$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5,true));});var templateObject_1$1N,templateObject_2$13,templateObject_3$K,templateObject_4$w,templateObject_5$t,templateObject_6$j,templateObject_7$e,templateObject_8$d,templateObject_9$b,templateObject_10$a,templateObject_11$6,templateObject_12$5,templateObject_13$4,templateObject_14$4,templateObject_15$4,templateObject_16$4,templateObject_17$3,templateObject_18$2,templateObject_19$2,templateObject_20$2,templateObject_21$2,templateObject_22$2,templateObject_23$2,templateObject_24$1,templateObject_25$1,templateObject_26$1,templateObject_27$1,templateObject_28$1;var global$1=global$m;var trim=stringTrim$1.trim;var whitespaces$4=whitespaces$3;var $parseInt=global$1.parseInt;var hex=/^[+-]?0[Xx]/;var FORCED=$parseInt(whitespaces$4+'08')!==8||$parseInt(whitespaces$4+'0x16')!==22;// `parseInt` method
|
|
126270
|
+
},[page===null||page===void 0?void 0:page.id,createDocumentClickHandler]),fileName=_b.fileName,title=_b.title,onPageDocumentDownloadClick=_b.onPageDocumentDownloadClick;return {fileUrl:fileUrl,iconName:iconName,fileName:fileName,title:title,onPageDocumentDownloadClick:onPageDocumentDownloadClick};}function getFileInfo(page,user){var _a=getContentForPage(page,user),content=_a.content,language=_a.language;return {fileInfo:content===null||content===void 0?void 0:content.fileInfo,language:language};}function getContentForPage(page,user){var language=getLanguageForPage(page,user);return {content:page.contents[language],language:language};}function getLanguageForPage(page,user){if(!user||!page||!page.contents||!user.subscription){return null;}var language=NewsService.getLanguageForContent(page.contents,user,function(c){var _a;return page.pageType!==PageType.Document||((_a=c.fileInfo)===null||_a===void 0?void 0:_a.fileId)!=null;});if(language){return language;}return NewsService.getLanguageForContent(page.contents,user);}function convertToNavigationNode(page){var _a,_b,_c,_d;var parent=(_b=(_a=page===null||page===void 0?void 0:page.navigationContext)===null||_a===void 0?void 0:_a.parent)!==null&&_b!==void 0?_b:{id:page.parentId,contents:{}};return {id:page.id,pageType:page.pageType,parent:parent,position:page.position,status:page.status,groupIds:page.groupIds,hasHiddenAncestor:page.hasHiddenAncestor,isUnlinked:page.isUnlinked,hasPublishedVersion:page.isCurrentPublishedVersion||!!page.publishedVersionId,contents:Object.values(page.contents||{}).filter(function(c){return c.active;}).reduce(function(acc,next){acc[next.language]=next;return acc;},{}),firstChildId:page.firstChildId||((_d=(_c=page.navigationContext)===null||_c===void 0?void 0:_c.children)===null||_d===void 0?void 0:_d[0].id),children:undefined,isSearchMatch:undefined,hasAnyPageChild:undefined,useExternalContent:page.useExternalContent,topLevelFolderName:undefined};}var HostBaseStyle=function HostBaseStyle(backgroundColor){return css$2(templateObject_3$L||(templateObject_3$L=__makeTemplateObject(["\n ","\n\n display: flex;\n width: 100%;\n "],["\n ","\n\n display: flex;\n width: 100%;\n "])),function(p){return backgroundColor?css$2(templateObject_1$1R||(templateObject_1$1R=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),backgroundColor||p.theme.palette.white):css$2(templateObject_2$17||(templateObject_2$17=__makeTemplateObject(["\n ",";\n background-color: ",";\n "],["\n ",";\n background-color: ",";\n "])),CardBorderInline(2,2),p.theme.palette.white);});};var ContentStyle=css$2(templateObject_4$x||(templateObject_4$x=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"],["\n display: flex;\n flex-direction: column;\n flex-grow: 1;\n font-size: ","px;\n"])),fontSizeMedium);var MetaInfoStyle=function MetaInfoStyle(marginBottomOnEmpty){return css$2(templateObject_5$u||(templateObject_5$u=__makeTemplateObject(["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"],["\n font-size: ","px;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n\n &:empty {\n margin-bottom: ","px;\n }\n"])),fontSizeSmall,marginBottomOnEmpty||spacingM);};var BorderRadiusStyle=function BorderRadiusStyle(roundedCornerSize,rightSideOnly){var radius=roundedCornerSize||inlinePageBannerRoundedCornerSize;return css$2(templateObject_8$e||(templateObject_8$e=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),rightSideOnly?css$2(templateObject_6$k||(templateObject_6$k=__makeTemplateObject(["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "],["\n border-top-right-radius: ","px;\n border-bottom-right-radius: ","px;\n "])),radius,radius):css$2(templateObject_7$f||(templateObject_7$f=__makeTemplateObject(["\n border-radius: ","px;\n "],["\n border-radius: ","px;\n "])),radius));};var templateObject_1$1R,templateObject_2$17,templateObject_3$L,templateObject_4$x,templateObject_5$u,templateObject_6$k,templateObject_7$f,templateObject_8$e;var ExternalContentIcon=function ExternalContentIcon(_a){var tooltipResourceKey=_a.tooltipResourceKey,tooltipResourceValues=_a.tooltipResourceValues,className=_a.className;return jsx$1(StyledTooltip$2,__assign({className:className,resourceKey:tooltipResourceKey,values:{url:tooltipResourceValues},width:400},{children:jsx$1(StyledIcon$5,{iconName:"NavigateExternalInline","data-external-content":true},void 0)}),void 0);};var StyledTooltip$2=_styled(Tooltip).withConfig({displayName:"ExternalContentIcon__StyledTooltip",componentId:"sc-8h84ua-0"})(templateObject_1$1Q||(templateObject_1$1Q=__makeTemplateObject(["\n display: inline-flex;\n z-index: 1;\n"],["\n display: inline-flex;\n z-index: 1;\n"])));var StyledIcon$5=_styled(Icon).withConfig({displayName:"ExternalContentIcon__StyledIcon",componentId:"sc-8h84ua-1"})(templateObject_2$16||(templateObject_2$16=__makeTemplateObject(["\n margin-left: ","px;\n"],["\n margin-left: ","px;\n"])),spacingXs);var templateObject_1$1Q,templateObject_2$16;var Title$6=function Title(_a){var title=_a.title,targetRoute=_a.targetRoute,readOnly=_a.readOnly,openTargetInNewWindow=_a.openTargetInNewWindow,isDownloadLink=_a.isDownloadLink,isExternalContent=_a.isExternalContent,onClick=_a.onClick,resourceKey=_a.resourceKey,resourceValues=_a.resourceValues,className=_a.className;return jsx$1(TitleHost,__assign({expandClickArea:!isExternalContent,className:className,"data-title":true},{children:readOnly?jsx$1("span",{children:title},void 0):isDownloadLink?jsx$1("a",__assign({href:targetRoute,rel:"noopener noreferrer",onClick:onClick},{children:jsx$1("span",{children:title},void 0)}),void 0):openTargetInNewWindow?jsxs("a",__assign({href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick},{children:[jsx$1("span",{children:title},void 0),isExternalContent&&jsx$1(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0):jsxs(Link$4,__assign({to:targetRoute,onClick:onClick},{children:[jsx$1("span",{children:title},void 0),isExternalContent&&jsx$1(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0)}),void 0);};var TitleHost=_styled.h3.withConfig({displayName:"Title__TitleHost",componentId:"sc-1wpb7iz-0"})(templateObject_2$15||(templateObject_2$15=__makeTemplateObject(["\n font-size: ","px;\n z-index: 1;\n\n ","\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"],["\n font-size: ","px;\n z-index: 1;\n\n ","\n\n &&& {\n margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"])),fontSizeMedium,function(p){return p.expandClickArea&&css$2(templateObject_1$1P||(templateObject_1$1P=__makeTemplateObject(["\n position: relative;\n\n a::before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "],["\n position: relative;\n\n a::before {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n "])));},spacingS,function(p){return p.theme.textColors.default;});var templateObject_1$1P,templateObject_2$15;function getBreadcrumbsItems(page,target,handleOnClick,getTitle,formatMessage,hideCurrentPageNode,hideHomeNode){var ancestors=[];var parent=page.navigationContext.parent;while(parent!=null&&parent.id!=null){ancestors.unshift({title:getTitle(parent),id:parent.id});parent=parent.parent;}var parentNode=ancestors.find(function(a){return a.id===page.parentId;});var items=hideHomeNode?[]:[{key:'home',text:formatMessage({id:'Generic.home'}),href:target}];var ancestorItems=ancestors.map(function(node){return {key:node.id,text:node.title,href:NewsService.getNewsRoute(target,node.id,node.title),onClick:handleOnClick};});if(hideCurrentPageNode){return {breadcrumbItems:__spreadArray(__spreadArray([],items),ancestorItems),ancestors:ancestors,parentNode:parentNode};}var currentItem={key:'current',text:getTitle(page),isCurrentItem:true};return {breadcrumbItems:__spreadArray(__spreadArray(__spreadArray([],items),ancestorItems),[currentItem]),ancestors:ancestors,parentNode:parentNode};}var ListItemBreadcrumb=function ListItemBreadcrumb(_a){var page=_a.page,languageOverride=_a.language,className=_a.className;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;if(!page||!page.navigationContext){return null;}var breadcrumbItems=getBreadcrumbsItems(page,null,function(){},function(page){return getTitle(page,user,formatMessage,languageOverride);},formatMessage,true,true).breadcrumbItems;return jsx$1(Host$H,__assign({className:className},{children:breadcrumbItems.map(function(b,i){return jsxs(Fragment$1,{children:[i!==0&&jsx$1(RightChevronIcon,{iconName:"ChevronRight"},void 0),jsx$1("span",{children:b.text},void 0)]},b.key);})}),void 0);};var Host$H=_styled.p.withConfig({displayName:"ListItemBreadcrumb__Host",componentId:"sc-c9uoz1-0"})(templateObject_1$1O||(templateObject_1$1O=__makeTemplateObject(["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"],["\n padding: 0;\n margin: ","px 0 0;\n font-size: ","px;\n\n color: ",";\n text-align: start;\n\n > span,\n i {\n vertical-align: middle;\n line-height: 1;\n }\n"])),spacingXxs,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var RightChevronIcon=_styled(Icon).withConfig({displayName:"ListItemBreadcrumb__RightChevronIcon",componentId:"sc-c9uoz1-1"})(templateObject_2$14||(templateObject_2$14=__makeTemplateObject(["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"],["\n &&& {\n font-weight: bold;\n margin: 0 ","px;\n font-size: ","px;\n }\n"])),spacingXxs,fontSizeSmaller-2);var templateObject_1$1O,templateObject_2$14;var PageItemTile=function PageItemTile(_a){var _b,_c;var item=_a.item,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,additionalMetadata=_a.additionalMetadata,buttons=_a.buttons,additionalContent=_a.additionalContent,showBannerPlaceholder=_a.showBannerPlaceholder,showBreadcrumb=_a.showBreadcrumb,showIntro=_a.showIntro,className=_a.className;var user=useCurrentUserContext().user;var intl=useIntl();var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var title=getTitle(item,user,intl.formatMessage);var language=getLanguageForPage(item,user);var content=item.contents[language];var hasKeywords=Object.keys((_b=item.keywords)!==null&&_b!==void 0?_b:[]).length>0;var targetRoute=NewsService.getNewsRoute(baseRoute,item.id,title);var clickHandler=createPageClickHandler(item);var isDocument=item.pageType===PageType.Document;var isEditor=baseRoute.includes('/editor');var preferredContentLanguage=getPreferredContentLanguage(user);var url=item.useExternalContent&&getExternalContentUrl(item,preferredContentLanguage);return jsxs(Host$G,__assign({"data-item-id":item.id,className:className},{children:[!readOnly&&jsx$1(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.Pages,baseRoute:baseRoute,title:title,isExternalContent:item.useExternalContent},void 0),jsxs(Inner$3,__assign({styleDefinition:styleDefinition,hasBanner:item.bannerInfo!=null||showBannerPlaceholder||isDocument},{children:[jsx$1(Banner$2,{item:item,language:language,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,applyRoundedCorners:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.applyRoundedCorners,showBannerPlaceholder:showBannerPlaceholder,isEditor:isEditor,bannerFontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerFontSize},void 0),jsxs(Content$6,__assign({padding:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.contentPadding,"data-page-tile-content":true},{children:[jsxs(MetaInfo$3,__assign({paddingRight:showBreadcrumb&&!isDocument&&readOnly?spacingM:0},{children:[showBreadcrumb&&jsx$1(StyledListItemBreadcrumb,{page:item},void 0),!showBreadcrumb&&item.modified&&jsx$1(DateTime,{value:item.modified},void 0),additionalMetadata]}),void 0),jsxs(MainContent,{children:[jsxs(TitleAndIntro,__assign({addDownloadButtonSafetySpace:isDocument},{children:[jsx$1(StyledTitle$1,{title:title,targetRoute:targetRoute,readOnly:readOnly,onClick:clickHandler,fontSize:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleFontSize,margin:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.titleMargin,isExternalContent:item.useExternalContent,resourceKey:item.useExternalContent?'ExternalLinkButton.pages.navigateTo':undefined,resourceValues:url!==null&&url!==void 0?url:undefined},void 0),showIntro&&((_c=content.intro)===null||_c===void 0?void 0:_c.length)>0&&jsx$1(Intro$2,{children:content.intro},void 0)]}),void 0),additionalContent]},void 0),hasKeywords&&jsx$1(Keywords$2,{children:jsx$1(FlatKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0)},void 0),buttons&&jsx$1(Buttons$2,{children:buttons},void 0)]}),void 0)]}),void 0)]}),void 0);};var StyledTitle$1=_styled(Title$6).withConfig({displayName:"PageItemTile__StyledTitle",componentId:"sc-lcm8k6-0"})(templateObject_5$t||(templateObject_5$t=__makeTemplateObject(["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"],["\n // for embedded pages we do not pass in a custom font size and we want to truncate the title to 2 lines\n ","\n\n ",";\n\n ",";\n\n width: 100%;\n\n a:focus {\n outline-offset: 0 !important;\n }\n"])),function(p){return !p.fontSize&&css$2(templateObject_1$1N||(templateObject_1$1N=__makeTemplateObject(["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "],["\n a {\n display: inline-flex;\n }\n\n span {\n ","\n }\n "])),LineClamp(2,fontSizeMedium,1.4));},function(p){return p.fontSize&&css$2(templateObject_2$13||(templateObject_2$13=__makeTemplateObject(["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "],["\n &&& {\n font-size: ","px;\n line-height: 20px;\n\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n }\n\n a {\n display: inline-flex;\n max-width: 100%;\n }\n\n span {\n // we pass a custom font size (smaller) for inline page lists and here we want to keep the title to single line\n display: block;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n "])),p.fontSize,fontSizeNormal,fontSizeNormal);},function(p){return p.margin?css$2(templateObject_3$K||(templateObject_3$K=__makeTemplateObject(["\n margin: "," !important;\n "],["\n margin: "," !important;\n "])),p.margin):css$2(templateObject_4$w||(templateObject_4$w=__makeTemplateObject(["\n margin: 0 !important;\n "],["\n margin: 0 !important;\n "])));});var Intro$2=_styled.div.withConfig({displayName:"PageItemTile__Intro",componentId:"sc-lcm8k6-1"})(templateObject_6$j||(templateObject_6$j=__makeTemplateObject(["\n margin: ","px 0 ","px;\n ","\n"],["\n margin: ","px 0 ","px;\n ","\n"])),spacingXs-1,spacingS+5,LineClamp(10,fontSizeSmall,1.4));var Host$G=_styled.article.withConfig({displayName:"PageItemTile__Host",componentId:"sc-lcm8k6-2"})(templateObject_7$e||(templateObject_7$e=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));var Inner$3=_styled.div.withConfig({displayName:"PageItemTile__Inner",componentId:"sc-lcm8k6-3"})(templateObject_11$6||(templateObject_11$6=__makeTemplateObject(["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n ","\n ","\n ","\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.applyRoundedCorners)&&BorderRadiusStyle();},function(p){var _a;return ((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.height)?css$2(templateObject_8$d||(templateObject_8$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.styleDefinition.height):css$2(templateObject_9$b||(templateObject_9$b=__makeTemplateObject(["\n height: auto;\n min-height: 138px;\n "],["\n height: auto;\n min-height: 138px;\n "])));},function(p){var _a;return p.hasBanner&&css$2(templateObject_10$a||(templateObject_10$a=__makeTemplateObject(["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "],["\n [data-page-tile-content] {\n max-width: calc(100% - ","px)};\n }\n "])),(_a=p.styleDefinition)===null||_a===void 0?void 0:_a.bannerDefaultWidth);});var Content$6=_styled.div.withConfig({displayName:"PageItemTile__Content",componentId:"sc-lcm8k6-4"})(templateObject_14$4||(templateObject_14$4=__makeTemplateObject(["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"],["\n ","\n ","\n\n box-sizing: border-box;\n max-width: 100%;\n"])),ContentStyle,function(p){return p.padding?css$2(templateObject_12$5||(templateObject_12$5=__makeTemplateObject(["\n padding: ",";\n "],["\n padding: ",";\n "])),p.padding):css$2(templateObject_13$4||(templateObject_13$4=__makeTemplateObject(["\n padding: ","px;\n "],["\n padding: ","px;\n "])),spacingM);});var MetaInfo$3=_styled.div.withConfig({displayName:"PageItemTile__MetaInfo",componentId:"sc-lcm8k6-5"})(templateObject_15$4||(templateObject_15$4=__makeTemplateObject(["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"],["\n "," /* font-size of date */\n display: inline-flex;\n align-items: center;\n flex-wrap: nowrap;\n color: ",";\n\n padding-left: 2px;\n padding-right: ","px;\n"])),MetaInfoStyle(17),function(p){return p.theme.textColors.default;},function(p){return p.paddingRight;});var MainContent=_styled.div.withConfig({displayName:"PageItemTile__MainContent",componentId:"sc-lcm8k6-6"})(templateObject_16$4||(templateObject_16$4=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"],["\n display: flex;\n align-items: center;\n padding-left: 2px;\n"])));var DownloadButtonWidth=32;var TitleAndIntro=_styled.div.withConfig({displayName:"PageItemTile__TitleAndIntro",componentId:"sc-lcm8k6-7"})(templateObject_17$3||(templateObject_17$3=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"],["\n display: flex;\n flex-direction: column;\n width: calc(\n 100% -\n ","px\n );\n"])),function(p){return p.addDownloadButtonSafetySpace?DownloadButtonWidth:0;});var StyledListItemBreadcrumb=_styled(ListItemBreadcrumb).withConfig({displayName:"PageItemTile__StyledListItemBreadcrumb",componentId:"sc-lcm8k6-8"})(templateObject_18$2||(templateObject_18$2=__makeTemplateObject(["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"],["\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n &&& {\n // this is needed because draft.js adds a 1rem margin bottom here somehow (because the breadcrumb is a <p> maybe) and it breaks the view\n margin-bottom: 0;\n }\n"])));var Keywords$2=_styled.span.withConfig({displayName:"PageItemTile__Keywords",componentId:"sc-lcm8k6-9"})(templateObject_19$2||(templateObject_19$2=__makeTemplateObject(["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"],["\n display: block;\n margin-top: auto;\n\n > span {\n font-size: ","px;\n line-height: 20px;\n height: 20px;\n display: inline-block;\n padding: 0 2px;\n max-width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n && {\n a:link,\n a:visited {\n color: "," !important;\n\n &:focus {\n outline-offset: 0 !important;\n }\n }\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});var Buttons$2=_styled.div.withConfig({displayName:"PageItemTile__Buttons",componentId:"sc-lcm8k6-10"})(templateObject_20$2||(templateObject_20$2=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])),spacingS);var Banner$2=function Banner(_a){var _b,_c;var item=_a.item,language=_a.language,bannerDefaultWidth=_a.bannerDefaultWidth,bannerFontSize=_a.bannerFontSize,applyRoundedCorners=_a.applyRoundedCorners,showBannerPlaceholder=_a.showBannerPlaceholder,isEditor=_a.isEditor;var bannerInfo=item.bannerInfo;var isDocument=item.pageType===PageType.Document;var fileIcon=getFileIconByExtension(((_c=(_b=item.contents[language])===null||_b===void 0?void 0:_b.fileInfo)===null||_c===void 0?void 0:_c.extension)||'');if(isDocument){return jsx$1(BannerHost$1,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(FileIcon$1,{iconName:fileIcon,fontSize:bannerFontSize,color:getIconColor(fileIcon)},void 0)}),void 0);}if(!bannerInfo&&!showBannerPlaceholder){return null;}if(bannerDefaultWidth<100){return jsx$1(SmallBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:isEditor?'edit':'read',width:200,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0);}return jsx$1("div",{children:jsx$1(LargeBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:450,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0)},void 0);};var BannerHost$1=_styled.div.withConfig({displayName:"PageItemTile__BannerHost",componentId:"sc-lcm8k6-11"})(templateObject_23$2||(templateObject_23$2=__makeTemplateObject(["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"],["\n display: flex;\n width: ","px;\n justify-content: center;\n align-items: center;\n background-color: ",";\n\n ","\n\n @media (max-width: ","px) {\n ","\n }\n"])),function(p){return p.defaultWidth;},function(p){return p.theme.palette.neutralQuaternaryAlt;},function(p){return p.applyRoundedCorners&&css$2(templateObject_21$2||(templateObject_21$2=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));},maxScreenSize.medium,function(p){return p.defaultWidth>100&&css$2(templateObject_22$2||(templateObject_22$2=__makeTemplateObject(["\n width: auto;\n height: 100px;\n "],["\n width: auto;\n height: 100px;\n "])));});var FileIcon$1=_styled(Icon).withConfig({displayName:"PageItemTile__FileIcon",componentId:"sc-lcm8k6-12"})(templateObject_24$1||(templateObject_24$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),function(p){return p.fontSize||30;},function(p){return p.color||p.theme.textColors.default;});var SmallBannerWrapper=_styled.div.withConfig({displayName:"PageItemTile__SmallBannerWrapper",componentId:"sc-lcm8k6-13"})(templateObject_26$1||(templateObject_26$1=__makeTemplateObject(["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"],["\n background-color: ",";\n\n width: ","px;\n height: 100%;\n\n .video-view-container {\n height: 100%;\n }\n\n &&& .video-icon {\n font-size: 35px;\n margin: 0;\n }\n\n ","\n"])),function(p){return p.theme.palette.accent;},function(p){return p.defaultWidth;},function(p){return p.applyRoundedCorners&&css$2(templateObject_25$1||(templateObject_25$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5));});var LargeBannerWrapper=_styled(LeftBannerWrapper).withConfig({displayName:"PageItemTile__LargeBannerWrapper",componentId:"sc-lcm8k6-14"})(templateObject_28$1||(templateObject_28$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return p.applyRoundedCorners&&css$2(templateObject_27$1||(templateObject_27$1=__makeTemplateObject(["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "],["\n ","\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n "])),BorderRadiusStyle(5,true));});var templateObject_1$1N,templateObject_2$13,templateObject_3$K,templateObject_4$w,templateObject_5$t,templateObject_6$j,templateObject_7$e,templateObject_8$d,templateObject_9$b,templateObject_10$a,templateObject_11$6,templateObject_12$5,templateObject_13$4,templateObject_14$4,templateObject_15$4,templateObject_16$4,templateObject_17$3,templateObject_18$2,templateObject_19$2,templateObject_20$2,templateObject_21$2,templateObject_22$2,templateObject_23$2,templateObject_24$1,templateObject_25$1,templateObject_26$1,templateObject_27$1,templateObject_28$1;var global$1=global$m;var trim=stringTrim$1.trim;var whitespaces$4=whitespaces$3;var $parseInt=global$1.parseInt;var hex=/^[+-]?0[Xx]/;var FORCED=$parseInt(whitespaces$4+'08')!==8||$parseInt(whitespaces$4+'0x16')!==22;// `parseInt` method
|
|
126273
126271
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
126274
|
-
var numberParseInt=FORCED?function parseInt(string,radix){var S=trim(String(string));return $parseInt(S,radix>>>0||(hex.test(S)?16:10));}:$parseInt;var $$
|
|
126272
|
+
var numberParseInt=FORCED?function parseInt(string,radix){var S=trim(String(string));return $parseInt(S,radix>>>0||(hex.test(S)?16:10));}:$parseInt;var $$3=_export;var parseIntImplementation=numberParseInt;// `parseInt` method
|
|
126275
126273
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
126276
|
-
$$2({global:true,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation});function getMaxImageWidth(defaultMaxWidth){return defaultMaxWidth!==null&&defaultMaxWidth!==void 0?defaultMaxWidth:maxContentWidth;}function getImageWidth(image){var width=typeof image==='string'?parseInt(image):image===null||image===void 0?void 0:image.width;if(!width||isNaN(width)){return getMaxImageWidth();}return Math.min(width,getMaxImageWidth());}function getNewsCardIcon(item,intl){if(hasFlag(item.knownState,KnownNewsState.Alert)){return {name:'Warning',backgroundColor:'red',tooltipText:intl.formatMessage({id:'NewsArticle.alert'})};}if(hasFlag(item.knownState,KnownNewsState.Unconfirmed)){return {name:'Completed',backgroundColor:'green',tooltipText:intl.formatMessage({id:'NewsArticle.confirmationRequired'})};}return null;}var ItemTileLayoutMode;(function(ItemTileLayoutMode){ItemTileLayoutMode["BannerTopMode"]="bannerTop";ItemTileLayoutMode["BannerLeftMode"]="bannerLeft";})(ItemTileLayoutMode||(ItemTileLayoutMode={}));var NewsItemTile=function NewsItemTile(_a){var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,filterBaseUrl=_a.filterBaseUrl,dateLabelResourceKey=_a.dateLabelResourceKey,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUserContext().user;var token=useCurrentToken();var intl=useIntl();var features=useFeatures();var title=getTitle(item,user,intl.formatMessage);var headline=getHeadline(item,user);var language=NewsService.getLanguageForPublishableItem(item,user);var handleExternalContentClick=useExternalContentClickHandler();var targetRoute=NewsService.getNewsRouteWithRedirect(baseRoute,item.id,title,item.useExternalContent);var hasKeywords=Object.keys(item.keywords).length>0;var content=item.contents[language];var hasIntro=content.intro&&content.intro.length>0;var icon=getNewsCardIcon(item,intl);var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);return jsxs(Host$F,__assign({hasBanner:item.bannerInfo!=null,layoutMode:layoutMode,styleDefinition:styleDefinition,"data-item-id":item.id,className:className},{children:[!readOnly&&jsx$1(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.News,baseRoute:baseRoute,onClick:onClick,title:title,openTargetInNewWindow:openTargetInNewWindow,isExternalContent:item.useExternalContent},void 0),jsx$1(Banner$1$1,{item:item,token:item.fileAccessToken||token,resourceType:ItemResourceTypes.News,layoutMode:layoutMode,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,showPlaceholderIfNoBannerInfo:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo},void 0),jsxs(Content$5,{children:[jsxs(MetaInfoAndIcon,{children:[jsxs(MetaInfo$2,__assign({showChannelsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:[dateLabelResourceKey&&jsxs(Fragment,{children:[jsx$1(FormattedMessage$1,{id:dateLabelResourceKey},void 0),":\u00A0"]},void 0),jsx$1(DateTime,{value:item.publishingDate},void 0),jsxs(Fragment,{children:["\u2002",jsx$1(ClickableChannelTitles,{channels:item.channels.map(function(c){return c.name;}),language:getPreferredContentLanguage(user),channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0)]}),void 0),icon&&jsx$1(NewsCardIcon$1,{children:jsx$1(Tooltip,__assign({text:icon.tooltipText},{children:jsx$1(StyledIcon$4$1,{iconName:icon.name,backgroundColor:icon.backgroundColor},void 0)}),item.id+"-"+icon.name)},void 0)]},void 0),features.contentHeadline&&!!headline&&jsx$1(Headline$2,{children:headline},void 0),jsx$1(StyledTitle$2,{title:title,targetRoute:targetRoute,readOnly:readOnly,openTargetInNewWindow:openTargetInNewWindow,onClick:function(e){if(onClick){onClick(e,true);}else {handleExternalContentClick(e,item,ItemResourceTypes.News);}},isExternalContent:item.useExternalContent,resourceKey:"ExternalLinkButton.news.navigateTo",resourceValues:url},void 0),hasIntro&&jsx$1(Intro$1$1,{children:content.intro},void 0),hasKeywords&&jsx$1(StyledKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0),buttons&&jsx$1(Footer,__assign({alignItemsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:buttons}),void 0)]},void 0)]}),void 0);};var Host$F=_styled.article.withConfig({displayName:"NewsItemTile__Host",componentId:"sc-15drgb8-0"})(templateObject_4$v||(templateObject_4$v=__makeTemplateObject(["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"],["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return !((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.noShadow)&&CardBorderInline(2,2);},function(p){return p.hasBanner&&css$2(templateObject_1$1M||(templateObject_1$1M=__makeTemplateObject(["\n min-height: 138px;\n "],["\n min-height: 138px;\n "])));},function(p){return (!p.layoutMode||p.layoutMode===ItemTileLayoutMode.BannerLeftMode)&&css$2(templateObject_2$12||(templateObject_2$12=__makeTemplateObject(["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "],["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "])),maxScreenSize.medium);},function(p){return p.layoutMode===ItemTileLayoutMode.BannerTopMode&&css$2(templateObject_3$J||(templateObject_3$J=__makeTemplateObject(["\n flex-direction: column;\n "],["\n flex-direction: column;\n "])));});var StyledTitle$2=_styled(Title$6).withConfig({displayName:"NewsItemTile__StyledTitle",componentId:"sc-15drgb8-1"})(templateObject_5$s||(templateObject_5$s=__makeTemplateObject(["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"],["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium,fontSizeSmall);var Content$5=_styled.div.withConfig({displayName:"NewsItemTile__Content",componentId:"sc-15drgb8-2"})(templateObject_6$i||(templateObject_6$i=__makeTemplateObject(["\n ","\n padding: ","px;\n"],["\n ","\n padding: ","px;\n"])),ContentStyle,spacingM);var Headline$2=_styled.div.withConfig({displayName:"NewsItemTile__Headline",componentId:"sc-15drgb8-3"})(templateObject_7$d||(templateObject_7$d=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"],["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"])),fontSizeSmall,spacingS);var Intro$1$1=_styled.p.withConfig({displayName:"NewsItemTile__Intro",componentId:"sc-15drgb8-4"})(templateObject_8$c||(templateObject_8$c=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n"])),fontSizeNormal);var MetaInfoAndIcon=_styled.div.withConfig({displayName:"NewsItemTile__MetaInfoAndIcon",componentId:"sc-15drgb8-5"})(templateObject_9$a||(templateObject_9$a=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var MetaInfo$2=_styled.div.withConfig({displayName:"NewsItemTile__MetaInfo",componentId:"sc-15drgb8-6"})(templateObject_11$5||(templateObject_11$5=__makeTemplateObject(["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"],["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"])),MetaInfoStyle(),function(p){return p.theme.palette.neutralTertiary;},spacingS,function(p){return p.showChannelsToTheRight&&css$2(templateObject_10$9||(templateObject_10$9=__makeTemplateObject(["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "],["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "])));});var NewsCardIcon$1=_styled.div.withConfig({displayName:"NewsItemTile__NewsCardIcon",componentId:"sc-15drgb8-7"})(templateObject_12$4||(templateObject_12$4=__makeTemplateObject(["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"],["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"])));var StyledIcon$4$1=_styled(Icon).withConfig({displayName:"NewsItemTile__StyledIcon",componentId:"sc-15drgb8-8"})(templateObject_13$3||(templateObject_13$3=__makeTemplateObject(["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"],["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"])),fontSizeSmaller,spacingXs,function(p){return p.backgroundColor;},function(p){return p.theme.palette.white;});var StyledKeywords=_styled(FlatKeywords).withConfig({displayName:"NewsItemTile__StyledKeywords",componentId:"sc-15drgb8-9"})(templateObject_14$3||(templateObject_14$3=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"])),spacingS,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var Footer=_styled.footer.withConfig({displayName:"NewsItemTile__Footer",componentId:"sc-15drgb8-10"})(templateObject_16$3||(templateObject_16$3=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"])),spacingS,function(p){return p.alignItemsToTheRight&&css$2(templateObject_15$3||(templateObject_15$3=__makeTemplateObject(["\n justify-content: flex-end;\n "],["\n justify-content: flex-end;\n "])));},spacingS+5);var Banner$1$1=function Banner(_a){var item=_a.item,token=_a.token,resourceType=_a.resourceType,layoutMode=_a.layoutMode,bannerDefaultWidth=_a.bannerDefaultWidth,showPlaceholderIfNoBannerInfo=_a.showPlaceholderIfNoBannerInfo;var bannerInfo=item.bannerInfo;if(!bannerInfo&&!showPlaceholderIfNoBannerInfo){return null;}var banner=getBanner();return jsx$1("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsx$1(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(TopBannerInner,{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(),token:item.fileAccessToken||token,resourceType:resourceType},void 0)},void 0)}),void 0);}return jsx$1(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(450),token:item.fileAccessToken||token,resourceType:resourceType},void 0)}),void 0);}};var TopBannerWrapper=_styled.div.withConfig({displayName:"NewsItemTile__TopBannerWrapper",componentId:"sc-15drgb8-11"})(templateObject_18$1||(templateObject_18$1=__makeTemplateObject(["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"],["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"])),bannerAspectRatio,function(p){return p.showPlaceholder&&css$2(templateObject_17$2||(templateObject_17$2=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled.div.withConfig({displayName:"NewsItemTile__TopBannerInner",componentId:"sc-15drgb8-12"})(templateObject_19$1||(templateObject_19$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));var templateObject_1$1M,templateObject_2$12,templateObject_3$J,templateObject_4$v,templateObject_5$s,templateObject_6$i,templateObject_7$d,templateObject_8$c,templateObject_9$a,templateObject_10$9,templateObject_11$5,templateObject_12$4,templateObject_13$3,templateObject_14$3,templateObject_15$3,templateObject_16$3,templateObject_17$2,templateObject_18$1,templateObject_19$1;var DocumentDownloadButton=function DocumentDownloadButton(_a){var _b;var page=_a.page,basePath=_a.basePath,onClick=_a.onClick,className=_a.className;var formatMessage=useIntl().formatMessage;var currentUser=useCurrentUser();var createDocumentClickHandler=usePagesClickHandler().createDocumentClickHandler;if(page.pageType!==PageType.Document){return null;}var _c=getContentForPage(page,currentUser),content=_c.content,language=_c.language;var fileInfo=content===null||content===void 0?void 0:content.fileInfo;var title=content===null||content===void 0?void 0:content.title;if(!fileInfo||!language){return null;}return jsx$1(StyledTooltip$1,__assign({resourceKey:'Pages.documents.downloadButton.tooltip',values:{fileName:title||fileInfo.fileName},className:className},{children:jsx$1(IconButton,{iconProps:{iconName:'Download'},onClick:createDocumentClickHandler(page.id,fileInfo.fileId,language,fileInfo.shouldOpenInBrowser,(_b=page)===null||_b===void 0?void 0:_b.fileAccessToken,basePath,onClick),ariaLabel:formatMessage({id:'Pages.documents.downloadButton.tooltip'},{fileName:title||fileInfo.fileName})},void 0)}),void 0);};var StyledTooltip$1=_styled(Tooltip).withConfig({displayName:"DocumentDownloadButton__StyledTooltip",componentId:"sc-1lgs2rp-0"})(templateObject_1$1L||(templateObject_1$1L=__makeTemplateObject(["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"],["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1L;var EmbeddedObjectTile=function EmbeddedObjectTile(_a){var _b;var id=_a.id,type=_a.type,readOnly=_a.readOnly,previewTheme=_a.previewTheme,buttons=_a.buttons,groupIds=_a.groupIds,className=_a.className;var getPost=usePostsApi().getPost;var getNews=useNewsApi().get;var loadPage=usePagesApi().loadPage;var getEvent=useEventsApi().getEvent;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=usePromise$2(fetchItem),item=_c[0],isLoading=_c[1],error=_c[2];var useDarkTheme=previewTheme==='dark';var palette=useContext(ThemeContext$1).theme.palette;var user=useCurrentUser();var backgroundColor=useDarkTheme?palette.neutralLight:palette.white;if(isLoading){return jsx$1(SpinnerHost,{children:jsx$1(StyledSpinner$2,{size:SpinnerSize.large},void 0)},void 0);}if(((_b=error===null||error===void 0?void 0:error.response)===null||_b===void 0?void 0:_b.statusCode)===403){return jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-access-denied":true},{children:[buttons,jsx$1(EmbeddedObjectWarningTile,{iconName:"LockSolid",iconLabel:"Generic.noAccess",messageResourceKey:"Generic.noAccessReason"},void 0)]}),void 0);}if(error||!item){return jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-not-found":true},{children:[buttons,jsx$1(EmbeddedObjectWarningTile,{iconName:"AlertSolid",iconLabel:"Generic.itemNotFound",messageResourceKey:"Generic.deletedItemReason"},void 0)]}),void 0);}var itemGroupIds=getItemGroupIds();return jsxs(Fragment,{children:[jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-embedded-object-id":id},{children:[buttons,renderEmbeddedObjectTile()]}),void 0),groupIds&&groupIds.every(function(gid){return !itemGroupIds.includes(gid);})&&jsx$1(DifferentGroupWarning,__assign({"data-warning-different-group":true},{children:jsx$1(EmbeddedObjectWarningTile,{messageResourceKey:"Generic.differentGroupWarning"},void 0)}),void 0)]},void 0);function getItemGroupIds(){var _a,_b;var groupIds=(_a=item)===null||_a===void 0?void 0:_a.groupIds;if(groupIds){return groupIds;}var groupId=(_b=item)===null||_b===void 0?void 0:_b.groupId;return groupId?[groupId]:null;}function fetchItem(){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:_a=type;switch(_a){case AttachmentType.Post:return [3/*break*/,1];case AttachmentType.News:return [3/*break*/,3];case AttachmentType.Page:return [3/*break*/,5];case AttachmentType.Event:return [3/*break*/,7];}return [3/*break*/,9];case 1:return [4/*yield*/,getPost(id)];case 2:return [2/*return*/,_b.sent()];case 3:return [4/*yield*/,getNews(id).toPromise()];case 4:return [2/*return*/,_b.sent()];case 5:return [4/*yield*/,loadPage(id)];case 6:return [2/*return*/,_b.sent()];case 7:return [4/*yield*/,getEvent(id)];case 8:return [2/*return*/,_b.sent()];case 9:throw Error('Invalid type');}});});}function renderEmbeddedObjectTile(){var _a;if(type===AttachmentType.Post){return jsx$1(PostItemTile,{post:item,backgroundColor:backgroundColor,readOnly:readOnly},void 0);}if(type===AttachmentType.News){var newsItem=item;return jsx$1(NewsItemTile,{item:newsItem,baseRoute:buildPath('news'),styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white},readOnly:readOnly},void 0);}if(type===AttachmentType.Page){var pageItem=item;return jsx$1(StyledPageItemTile$1,{item:pageItem,baseRoute:buildPath('pages'),styleDefinition:{backgroundColor:backgroundColor,bannerDefaultWidth:150,bannerFontSize:60},readOnly:readOnly,isBannerClickable:((_a=pageItem.bannerInfo)===null||_a===void 0?void 0:_a.type)==='video',additionalMetadata:jsx$1(StyledDocumentDownloadButton$3,{page:item,marginRight:readOnly?spacingM:0},void 0),showBreadcrumb:true,showIntro:true},void 0);}var language=NewsService.getLanguageForPublishableItem(item,user);return jsx$1(EventCard,{item:item,language:language,styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white,bannerHostWidth:150},readOnly:readOnly},void 0);}};var Host$E=_styled.div.withConfig({displayName:"EmbeddedObjectTile__Host",componentId:"sc-yfh5nh-0"})(templateObject_3$I||(templateObject_3$I=__makeTemplateObject(["\n width: 100%;\n ","\n"],["\n width: 100%;\n ","\n"])),function(p){return p.backgroundColor?css$2(templateObject_1$1K||(templateObject_1$1K=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):css$2(templateObject_2$11||(templateObject_2$11=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),function(p){return p.theme.palette.white;});});var DifferentGroupWarning=_styled.div.withConfig({displayName:"EmbeddedObjectTile__DifferentGroupWarning",componentId:"sc-yfh5nh-1"})(templateObject_4$u||(templateObject_4$u=__makeTemplateObject(["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"],["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.semanticColors.errorBackground;},function(p){return p.theme.palette.red;},fontSizeSmall);var EmbeddedObjectWarningTile=function EmbeddedObjectWarningTile(_a){var messageResourceKey=_a.messageResourceKey,iconName=_a.iconName,iconLabel=_a.iconLabel;return jsxs(WarningHost,{children:[(iconName||iconLabel)&&jsxs(Title$5,{children:[iconName&&jsx$1(StyleIcon,{iconName:iconName},void 0),iconLabel&&jsx$1(FormattedMessageWithStyle,{id:iconLabel},void 0)]},void 0),jsx$1(FormattedMessageWithStyle,{id:messageResourceKey},void 0)]},void 0);};var WarningHost=_styled.div.withConfig({displayName:"EmbeddedObjectTile__WarningHost",componentId:"sc-yfh5nh-2"})(templateObject_5$r||(templateObject_5$r=__makeTemplateObject(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingM);var Title$5=_styled.div.withConfig({displayName:"EmbeddedObjectTile__Title",componentId:"sc-yfh5nh-3"})(templateObject_6$h||(templateObject_6$h=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"])),fontSizeMedium,spacingS);var SpinnerHost=_styled.div.withConfig({displayName:"EmbeddedObjectTile__SpinnerHost",componentId:"sc-yfh5nh-4"})(templateObject_7$c||(templateObject_7$c=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"])),spacingL);var StyledSpinner$2=_styled(Spinner).withConfig({displayName:"EmbeddedObjectTile__StyledSpinner",componentId:"sc-yfh5nh-5"})(templateObject_8$b||(templateObject_8$b=__makeTemplateObject(["\n margin-top: 0;\n margin-bottom: ","px;\n"],["\n margin-top: 0;\n margin-bottom: ","px;\n"])),spacingL);var StyleIcon=_styled(Icon).withConfig({displayName:"EmbeddedObjectTile__StyleIcon",componentId:"sc-yfh5nh-6"})(templateObject_9$9||(templateObject_9$9=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledPageItemTile$1=_styled(PageItemTile).withConfig({displayName:"EmbeddedObjectTile__StyledPageItemTile",componentId:"sc-yfh5nh-7"})(templateObject_11$4||(templateObject_11$4=__makeTemplateObject(["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"],["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"])),function(p){return p.isBannerClickable&&css$2(templateObject_10$8||(templateObject_10$8=__makeTemplateObject(["\n [data-page-tile-content] {\n position: relative;\n }\n "],["\n [data-page-tile-content] {\n position: relative;\n }\n "])));},maxScreenSize.medium);var StyledDocumentDownloadButton$3=_styled(DocumentDownloadButton).withConfig({displayName:"EmbeddedObjectTile__StyledDocumentDownloadButton",componentId:"sc-yfh5nh-8"})(templateObject_12$3||(templateObject_12$3=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.marginRight;},maxScreenSize.medium);var templateObject_1$1K,templateObject_2$11,templateObject_3$I,templateObject_4$u,templateObject_5$r,templateObject_6$h,templateObject_7$c,templateObject_8$b,templateObject_9$9,templateObject_10$8,templateObject_11$4,templateObject_12$3;var EmbeddedObjectList=function EmbeddedObjectList(_a){var attachments=_a.attachments,className=_a.className,onDeleteClick=_a.onDeleteClick,previewTheme=_a.previewTheme;var formatMessage=useIntl().formatMessage;var embeddedObjects=attachments.filter(function(f){return f.type===AttachmentType.Post||f.type===AttachmentType.News||f.type===AttachmentType.Page||f.type===AttachmentType.Event;});if(embeddedObjects.length===0){return null;}if(onDeleteClick){return jsx$1(Host$D,__assign({className:className,"data-embedded-object-attachment-list":true},{children:embeddedObjects.map(function(o){return jsx$1(AttachmentHost,__assign({domIdentifier:"embedded-object",deleteButton:jsx$1(DeleteAttachmentButton,{"data-remove-attachment-button":o.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(o);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsx$1(EmbeddedObjectTile,{id:o.id,type:o.type,previewTheme:previewTheme,readOnly:true},o.id)}),o.id);})}),void 0);}return jsx$1(PreviewHost,__assign({className:className,domIdentifier:"embedded-object-preview-"+embeddedObjects[0].id},{children:jsx$1(EmbeddedObjectTile,{id:embeddedObjects[0].id,type:embeddedObjects[0].type,previewTheme:previewTheme},void 0)}),void 0);};var Host$D=_styled.div.withConfig({displayName:"EmbeddedObjectList__Host",componentId:"sc-axja9n-0"})(templateObject_1$1J||(templateObject_1$1J=__makeTemplateObject(["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"],["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"])),spacingM,spacingM);var PreviewHost=_styled(AttachmentHost).withConfig({displayName:"EmbeddedObjectList__PreviewHost",componentId:"sc-axja9n-1"})(templateObject_2$10||(templateObject_2$10=__makeTemplateObject(["\n margin: ","px 0 0 0;\n"],["\n margin: ","px 0 0 0;\n"])),spacingM);var templateObject_1$1J,templateObject_2$10;var ImageAttachmentList=function ImageAttachmentList(_a){var images=_a.images,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,imageBackgroundColor=_a.imageBackgroundColor,className=_a.className;if(!images||images.length===0){return null;}return jsx$1(List,__assign({className:className},{children:images.map(function(i){return jsx$1(ListItem$1,{children:jsx$1(ImageAttachmentPreview,{attachment:i,disabled:disabled,onDeleteClick:function(){return onDeleteClick(i);},backgroundColor:imageBackgroundColor},void 0)},i.id);})}),void 0);};var List=_styled.ul.withConfig({displayName:"ImageAttachmentList__List",componentId:"sc-7el1kj-0"})(templateObject_1$1I||(templateObject_1$1I=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"])));var ListItem$1=_styled.li.withConfig({displayName:"ImageAttachmentList__ListItem",componentId:"sc-7el1kj-1"})(templateObject_2$$||(templateObject_2$$=__makeTemplateObject(["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"],["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"])),spacingS-5,minScreenSize.medium,spacingS-5);var ImageAttachmentPreview=function ImageAttachmentPreview(_a){var attachment=_a.attachment,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,backgroundColor=_a.backgroundColor;var formatMessage=useIntl().formatMessage;return jsxs(AttachmentHost,__assign({domIdentifier:"image",backgroundColor:backgroundColor,deleteButton:!disabled&&jsx$1(StyledDeleteAttachmentButton,{iconProps:{iconName:'Delete'},onClick:onDeleteClick,disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:[attachment.hasError&&jsx$1(AttachmentOverlay,{children:jsx$1("div",{children:jsx$1(WarningIcon,{iconName:"Warning"},void 0)},void 0)},void 0),attachment.isUploadInProgress&&jsx$1(AttachmentOverlay,{children:jsx$1(CenteredSpinner,{size:SpinnerSize.large},void 0)},void 0),jsx$1(Image$1,{src:attachment.previewUrl,height:225,imageFit:ImageFit.centerCover,title:attachment.filename},void 0)]}),void 0);};var AttachmentOverlay=_styled.div.withConfig({displayName:"ImageAttachmentList__AttachmentOverlay",componentId:"sc-7el1kj-2"})(templateObject_3$H||(templateObject_3$H=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"])),attachmentRoundedCornerSize);var CenteredSpinner=_styled(Spinner).withConfig({displayName:"ImageAttachmentList__CenteredSpinner",componentId:"sc-7el1kj-3"})(templateObject_4$t||(templateObject_4$t=__makeTemplateObject(["\n margin-top: auto;\n height: 100%;\n"],["\n margin-top: auto;\n height: 100%;\n"])));var WarningIcon=_styled(Icon).withConfig({displayName:"ImageAttachmentList__WarningIcon",componentId:"sc-7el1kj-4"})(templateObject_5$q||(templateObject_5$q=__makeTemplateObject(["\n font-size: 100px;\n color: ",";\n"],["\n font-size: 100px;\n color: ",";\n"])),function(p){return p.theme.palette.redDark;});var StyledDeleteAttachmentButton=_styled(DeleteAttachmentButton).withConfig({displayName:"ImageAttachmentList__StyledDeleteAttachmentButton",componentId:"sc-7el1kj-5"})(templateObject_6$g||(templateObject_6$g=__makeTemplateObject(["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"],["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"])),fontSizeMedium);var templateObject_1$1I,templateObject_2$$,templateObject_3$H,templateObject_4$t,templateObject_5$q,templateObject_6$g;var AttachmentList=function AttachmentList(_a){var className=_a.className,files=_a.files,onDeleteAttachmentClick=_a.onDeleteAttachmentClick,disabled=_a.disabled,previewTheme=_a.previewTheme,disableVideoPreview=_a.disableVideoPreview,disableEmbeddedObjectPreview=_a.disableEmbeddedObjectPreview;var attachedImages=files.filter(function(f){return f.type===AttachmentType.Image;});var attachedFiles=files.filter(function(f){return f.type===AttachmentType.File;});var palette=useContext(ThemeContext$1).theme.palette;return jsxs(Host$C,__assign({className:className,hasItems:files.length>0,"data-attachment-list":true},{children:[jsx$1(GifEditList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsx$1(ImageAttachmentList,{images:attachedImages,disabled:disabled,onDeleteClick:function(i){return onDeleteAttachmentClick(i);},imageBackgroundColor:previewTheme==='dark'?palette.neutralLight:palette.white},void 0),!disableVideoPreview&&jsx$1(VideoList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);}},void 0),!disableEmbeddedObjectPreview&&jsx$1(EmbeddedObjectList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsx$1(FilesList$1,{files:attachedFiles,onDeleteClick:function(f){return onDeleteAttachmentClick(f);},disabled:disabled},void 0),jsx$1("div",{style:{clear:'both'}},void 0)]}),void 0);};var FilesList$1=_styled(FileAttachmentList).withConfig({displayName:"AttachmentList__FilesList",componentId:"sc-1s0cqp9-0"})(templateObject_1$1H||(templateObject_1$1H=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var Host$C=_styled.div.withConfig({displayName:"AttachmentList__Host",componentId:"sc-1s0cqp9-1"})(templateObject_2$_||(templateObject_2$_=__makeTemplateObject(["\n margin-top: ",";\n"],["\n margin-top: ",";\n"])),function(_a){var hasItems=_a.hasItems;return hasItems?'8px':'0';});var templateObject_1$1H,templateObject_2$_;var RichCommentInputWithAttachmentList=/*#__PURE__*/forwardRef(function(props,ref){var _a;return jsxs(Fragment,{children:[jsx$1(RichCommentInput,__assign({},props,{ref:ref}),void 0),jsx$1(AttachmentList,{files:props.attachments,disabled:props.disabled,onDeleteAttachmentClick:props.onDeleteAttachment,previewTheme:(_a=props.inputTheme)!==null&&_a!==void 0?_a:props.attachmentPreviewTheme,disableVideoPreview:props.disableVideoPreview,disableEmbeddedObjectPreview:props.disableEmbeddedObjectPreview},void 0)]},void 0);});var CreateComment=function CreateComment(_a){var className=_a.className,onPost=_a.onPost,autoFocus=_a.autoFocus,readOnly=_a.readOnly,initialContent=_a.content,allowAttachments=_a.allowAttachments,mentionSearchHandler=_a.mentionSearchHandler,useLargeDropTarget=_a.useLargeDropTarget,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,_b=_a.focusAfterPost,focusAfterPost=_b===void 0?true:_b,onAttachmentsChanged=_a.onAttachmentsChanged,_c=_a.attachments,attachments=_c===void 0?[]:_c,deletedAttachmentUrls=_a.deletedAttachmentUrls,onDeleteAttachment=_a.onDeleteAttachment,disableDragAndDrop=_a.disableDragAndDrop,allowKeywords=_a.allowKeywords,allowSaveWithoutContent=_a.allowSaveWithoutContent,saveOnEnter=_a.saveOnEnter,saveOnCtrlEnter=_a.saveOnCtrlEnter,keywordSettings=_a.keywordSettings;var availableKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords)||[];var defaultKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.defaultKeywords)||[];var mandatoryKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords)||[];var _d=useState$2(false),isSaving=_d[0],setIsSaving=_d[1];var _e=useState$2(initialContent||''),content=_e[0],setContent=_e[1];var _f=useState$2(null),selectedKeywords=_f[0],setSelectedKeywords=_f[1];var _g=useState$2(false),showKeywordsPicker=_g[0],setShowKeywordsPicker=_g[1];var inputRef=useRef$1(null);var formatMessage=useIntl().formatMessage;var isReadOnly=readOnly||isSaving;var ignoreRef=useRef$1(false);useEffect$1(function(){return function(){ignoreRef.current=true;};},[]);var initialSelectedKeywords=defaultKeywords.concat(mandatoryKeywords);var initialSelectedKeywordIds=initialSelectedKeywords.map(function(k){return k.id;}).join('-');useEffect$1(function(){setSelectedKeywords(initialSelectedKeywords);if(initialSelectedKeywords.length===0){setShowKeywordsPicker(false);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126274
|
+
$$3({global:true,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation});function getMaxImageWidth(defaultMaxWidth){return defaultMaxWidth!==null&&defaultMaxWidth!==void 0?defaultMaxWidth:maxContentWidth;}function getImageWidth(image){var width=typeof image==='string'?parseInt(image):image===null||image===void 0?void 0:image.width;if(!width||isNaN(width)){return getMaxImageWidth();}return Math.min(width,getMaxImageWidth());}function getNewsCardIcon(item,intl){if(hasFlag(item.knownState,KnownNewsState.Alert)){return {name:'Warning',backgroundColor:'red',tooltipText:intl.formatMessage({id:'NewsArticle.alert'})};}if(hasFlag(item.knownState,KnownNewsState.Unconfirmed)){return {name:'Completed',backgroundColor:'green',tooltipText:intl.formatMessage({id:'NewsArticle.confirmationRequired'})};}return null;}var ItemTileLayoutMode;(function(ItemTileLayoutMode){ItemTileLayoutMode["BannerTopMode"]="bannerTop";ItemTileLayoutMode["BannerLeftMode"]="bannerLeft";})(ItemTileLayoutMode||(ItemTileLayoutMode={}));var NewsItemTile=function NewsItemTile(_a){var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,filterBaseUrl=_a.filterBaseUrl,dateLabelResourceKey=_a.dateLabelResourceKey,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUserContext().user;var token=useCurrentToken();var intl=useIntl();var features=useFeatures();var title=getTitle(item,user,intl.formatMessage);var headline=getHeadline(item,user);var language=NewsService.getLanguageForPublishableItem(item,user);var handleExternalContentClick=useExternalContentClickHandler();var targetRoute=NewsService.getNewsRouteWithRedirect(baseRoute,item.id,title,item.useExternalContent);var hasKeywords=Object.keys(item.keywords).length>0;var content=item.contents[language];var hasIntro=content.intro&&content.intro.length>0;var icon=getNewsCardIcon(item,intl);var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);return jsxs(Host$F,__assign({hasBanner:item.bannerInfo!=null,layoutMode:layoutMode,styleDefinition:styleDefinition,"data-item-id":item.id,className:className},{children:[!readOnly&&jsx$1(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.News,baseRoute:baseRoute,onClick:onClick,title:title,openTargetInNewWindow:openTargetInNewWindow,isExternalContent:item.useExternalContent},void 0),jsx$1(Banner$1$1,{item:item,token:item.fileAccessToken||token,resourceType:ItemResourceTypes.News,layoutMode:layoutMode,bannerDefaultWidth:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.bannerDefaultWidth,showPlaceholderIfNoBannerInfo:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showPlaceholderIfNoBannerInfo},void 0),jsxs(Content$5,{children:[jsxs(MetaInfoAndIcon,{children:[jsxs(MetaInfo$2,__assign({showChannelsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:[dateLabelResourceKey&&jsxs(Fragment,{children:[jsx$1(FormattedMessage$1,{id:dateLabelResourceKey},void 0),":\u00A0"]},void 0),jsx$1(DateTime,{value:item.publishingDate},void 0),jsxs(Fragment,{children:["\u2002",jsx$1(ClickableChannelTitles,{channels:item.channels.map(function(c){return c.name;}),language:getPreferredContentLanguage(user),channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0)]}),void 0),icon&&jsx$1(NewsCardIcon$1,{children:jsx$1(Tooltip,__assign({text:icon.tooltipText},{children:jsx$1(StyledIcon$4$1,{iconName:icon.name,backgroundColor:icon.backgroundColor},void 0)}),item.id+"-"+icon.name)},void 0)]},void 0),features.contentHeadline&&!!headline&&jsx$1(Headline$2,{children:headline},void 0),jsx$1(StyledTitle$2,{title:title,targetRoute:targetRoute,readOnly:readOnly,openTargetInNewWindow:openTargetInNewWindow,onClick:function(e){if(onClick){onClick(e,true);}else {handleExternalContentClick(e,item,ItemResourceTypes.News);}},isExternalContent:item.useExternalContent,resourceKey:"ExternalLinkButton.news.navigateTo",resourceValues:url},void 0),hasIntro&&jsx$1(Intro$1$1,{children:content.intro},void 0),hasKeywords&&jsx$1(StyledKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0),buttons&&jsx$1(Footer,__assign({alignItemsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:buttons}),void 0)]},void 0)]}),void 0);};var Host$F=_styled.article.withConfig({displayName:"NewsItemTile__Host",componentId:"sc-15drgb8-0"})(templateObject_4$v||(templateObject_4$v=__makeTemplateObject(["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"],["\n ","\n ",";\n\n ","\n\n ","\n\n ","\n\n position: relative;\n"])),function(p){var _a;return HostBaseStyle((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.backgroundColor);},function(p){var _a;return !((_a=p.styleDefinition)===null||_a===void 0?void 0:_a.noShadow)&&CardBorderInline(2,2);},function(p){return p.hasBanner&&css$2(templateObject_1$1M||(templateObject_1$1M=__makeTemplateObject(["\n min-height: 138px;\n "],["\n min-height: 138px;\n "])));},function(p){return (!p.layoutMode||p.layoutMode===ItemTileLayoutMode.BannerLeftMode)&&css$2(templateObject_2$12||(templateObject_2$12=__makeTemplateObject(["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "],["\n @media (max-width: ","px) {\n flex-direction: column;\n }\n "])),maxScreenSize.medium);},function(p){return p.layoutMode===ItemTileLayoutMode.BannerTopMode&&css$2(templateObject_3$J||(templateObject_3$J=__makeTemplateObject(["\n flex-direction: column;\n "],["\n flex-direction: column;\n "])));});var StyledTitle$2=_styled(Title$6).withConfig({displayName:"NewsItemTile__StyledTitle",componentId:"sc-15drgb8-1"})(templateObject_5$s||(templateObject_5$s=__makeTemplateObject(["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"],["\n i[data-external-content] {\n font-size: ","px;\n line-height: ","px;\n }\n"])),fontSizeMedium,fontSizeSmall);var Content$5=_styled.div.withConfig({displayName:"NewsItemTile__Content",componentId:"sc-15drgb8-2"})(templateObject_6$i||(templateObject_6$i=__makeTemplateObject(["\n ","\n padding: ","px;\n"],["\n ","\n padding: ","px;\n"])),ContentStyle,spacingM);var Headline$2=_styled.div.withConfig({displayName:"NewsItemTile__Headline",componentId:"sc-15drgb8-3"})(templateObject_7$d||(templateObject_7$d=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"],["\n font-size: ","px;\n font-weight: bold;\n margin-bottom: ","px;\n"])),fontSizeSmall,spacingS);var Intro$1$1=_styled.p.withConfig({displayName:"NewsItemTile__Intro",componentId:"sc-15drgb8-4"})(templateObject_8$c||(templateObject_8$c=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n"])),fontSizeNormal);var MetaInfoAndIcon=_styled.div.withConfig({displayName:"NewsItemTile__MetaInfoAndIcon",componentId:"sc-15drgb8-5"})(templateObject_9$a||(templateObject_9$a=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var MetaInfo$2=_styled.div.withConfig({displayName:"NewsItemTile__MetaInfo",componentId:"sc-15drgb8-6"})(templateObject_11$5||(templateObject_11$5=__makeTemplateObject(["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"],["\n ","\n color: ",";\n margin-bottom: ","px;\n\n ","\n"])),MetaInfoStyle(),function(p){return p.theme.palette.neutralTertiary;},spacingS,function(p){return p.showChannelsToTheRight&&css$2(templateObject_10$9||(templateObject_10$9=__makeTemplateObject(["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "],["\n width: 100%;\n\n time {\n margin-right: auto;\n }\n "])));});var NewsCardIcon$1=_styled.div.withConfig({displayName:"NewsItemTile__NewsCardIcon",componentId:"sc-15drgb8-7"})(templateObject_12$4||(templateObject_12$4=__makeTemplateObject(["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"],["\n display: flex;\n margin-left: auto;\n z-index: 10;\n"])));var StyledIcon$4$1=_styled(Icon).withConfig({displayName:"NewsItemTile__StyledIcon",componentId:"sc-15drgb8-8"})(templateObject_13$3||(templateObject_13$3=__makeTemplateObject(["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"],["\n font-size: ","px;\n width: 24px;\n height: 24px;\n border-radius: 50%;\n display: flex;\n align-items: center;\n justify-content: center;\n margin-left: ","px;\n cursor: pointer;\n\n background-color: ",";\n color: ",";\n"])),fontSizeSmaller,spacingXs,function(p){return p.backgroundColor;},function(p){return p.theme.palette.white;});var StyledKeywords=_styled(FlatKeywords).withConfig({displayName:"NewsItemTile__StyledKeywords",componentId:"sc-15drgb8-9"})(templateObject_14$3||(templateObject_14$3=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n && a {\n &,\n :link,\n :visited {\n color: ",";\n }\n }\n"])),spacingS,fontSizeSmall,function(p){return p.theme.palette.neutralTertiary;});var Footer=_styled.footer.withConfig({displayName:"NewsItemTile__Footer",componentId:"sc-15drgb8-10"})(templateObject_16$3||(templateObject_16$3=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"],["\n display: flex;\n align-items: center;\n padding-top: ","px;\n margin-top: auto;\n ","\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n\n .ms-TooltipHost {\n display: flex;\n align-items: center;\n margin-right: ","px;\n\n i {\n font-size: 22px;\n }\n }\n"])),spacingS,function(p){return p.alignItemsToTheRight&&css$2(templateObject_15$3||(templateObject_15$3=__makeTemplateObject(["\n justify-content: flex-end;\n "],["\n justify-content: flex-end;\n "])));},spacingS+5);var Banner$1$1=function Banner(_a){var item=_a.item,token=_a.token,resourceType=_a.resourceType,layoutMode=_a.layoutMode,bannerDefaultWidth=_a.bannerDefaultWidth,showPlaceholderIfNoBannerInfo=_a.showPlaceholderIfNoBannerInfo;var bannerInfo=item.bannerInfo;if(!bannerInfo&&!showPlaceholderIfNoBannerInfo){return null;}var banner=getBanner();return jsx$1("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsx$1(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(TopBannerInner,{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(),token:item.fileAccessToken||token,resourceType:resourceType},void 0)},void 0)}),void 0);}return jsx$1(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsx$1(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:item.fileAccessToken?'read':'edit',width:getMaxImageWidth(450),token:item.fileAccessToken||token,resourceType:resourceType},void 0)}),void 0);}};var TopBannerWrapper=_styled.div.withConfig({displayName:"NewsItemTile__TopBannerWrapper",componentId:"sc-15drgb8-11"})(templateObject_18$1||(templateObject_18$1=__makeTemplateObject(["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"],["\n position: relative;\n width: 100%;\n padding-top: calc(100% * (1 / ","));\n ","\n"])),bannerAspectRatio,function(p){return p.showPlaceholder&&css$2(templateObject_17$2||(templateObject_17$2=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled.div.withConfig({displayName:"NewsItemTile__TopBannerInner",componentId:"sc-15drgb8-12"})(templateObject_19$1||(templateObject_19$1=__makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"],["\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n"])));var templateObject_1$1M,templateObject_2$12,templateObject_3$J,templateObject_4$v,templateObject_5$s,templateObject_6$i,templateObject_7$d,templateObject_8$c,templateObject_9$a,templateObject_10$9,templateObject_11$5,templateObject_12$4,templateObject_13$3,templateObject_14$3,templateObject_15$3,templateObject_16$3,templateObject_17$2,templateObject_18$1,templateObject_19$1;var DocumentDownloadButton=function DocumentDownloadButton(_a){var _b;var page=_a.page,basePath=_a.basePath,onClick=_a.onClick,className=_a.className;var formatMessage=useIntl().formatMessage;var currentUser=useCurrentUser();var createDocumentClickHandler=usePagesClickHandler().createDocumentClickHandler;if(page.pageType!==PageType.Document){return null;}var _c=getContentForPage(page,currentUser),content=_c.content,language=_c.language;var fileInfo=content===null||content===void 0?void 0:content.fileInfo;var title=content===null||content===void 0?void 0:content.title;if(!fileInfo||!language){return null;}return jsx$1(StyledTooltip$1,__assign({resourceKey:'Pages.documents.downloadButton.tooltip',values:{fileName:title||fileInfo.fileName},className:className},{children:jsx$1(IconButton,{iconProps:{iconName:'Download'},onClick:createDocumentClickHandler(page.id,fileInfo.fileId,language,fileInfo.shouldOpenInBrowser,(_b=page)===null||_b===void 0?void 0:_b.fileAccessToken,basePath,onClick),ariaLabel:formatMessage({id:'Pages.documents.downloadButton.tooltip'},{fileName:title||fileInfo.fileName})},void 0)}),void 0);};var StyledTooltip$1=_styled(Tooltip).withConfig({displayName:"DocumentDownloadButton__StyledTooltip",componentId:"sc-1lgs2rp-0"})(templateObject_1$1L||(templateObject_1$1L=__makeTemplateObject(["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"],["\n display: inline-flex;\n\n > button {\n border: 0;\n padding: 0;\n height: 28px; // this is needed for the focus indicator\n\n i {\n color: ",";\n }\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$1L;var EmbeddedObjectTile=function EmbeddedObjectTile(_a){var _b;var id=_a.id,type=_a.type,readOnly=_a.readOnly,previewTheme=_a.previewTheme,buttons=_a.buttons,groupIds=_a.groupIds,className=_a.className;var getPost=usePostsApi().getPost;var getNews=useNewsApi().get;var loadPage=usePagesApi().loadPage;var getEvent=useEventsApi().getEvent;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var _c=usePromise$2(fetchItem),item=_c[0],isLoading=_c[1],error=_c[2];var useDarkTheme=previewTheme==='dark';var palette=useContext(ThemeContext$1).theme.palette;var user=useCurrentUser();var backgroundColor=useDarkTheme?palette.neutralLight:palette.white;if(isLoading){return jsx$1(SpinnerHost,{children:jsx$1(StyledSpinner$2,{size:SpinnerSize.large},void 0)},void 0);}if(((_b=error===null||error===void 0?void 0:error.response)===null||_b===void 0?void 0:_b.statusCode)===403){return jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-access-denied":true},{children:[buttons,jsx$1(EmbeddedObjectWarningTile,{iconName:"LockSolid",iconLabel:"Generic.noAccess",messageResourceKey:"Generic.noAccessReason"},void 0)]}),void 0);}if(error||!item){return jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-not-found":true},{children:[buttons,jsx$1(EmbeddedObjectWarningTile,{iconName:"AlertSolid",iconLabel:"Generic.itemNotFound",messageResourceKey:"Generic.deletedItemReason"},void 0)]}),void 0);}var itemGroupIds=getItemGroupIds();return jsxs(Fragment,{children:[jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-embedded-object-id":id},{children:[buttons,renderEmbeddedObjectTile()]}),void 0),groupIds&&groupIds.every(function(gid){return !itemGroupIds.includes(gid);})&&jsx$1(DifferentGroupWarning,__assign({"data-warning-different-group":true},{children:jsx$1(EmbeddedObjectWarningTile,{messageResourceKey:"Generic.differentGroupWarning"},void 0)}),void 0)]},void 0);function getItemGroupIds(){var _a,_b;var groupIds=(_a=item)===null||_a===void 0?void 0:_a.groupIds;if(groupIds){return groupIds;}var groupId=(_b=item)===null||_b===void 0?void 0:_b.groupId;return groupId?[groupId]:null;}function fetchItem(){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:_a=type;switch(_a){case AttachmentType.Post:return [3/*break*/,1];case AttachmentType.News:return [3/*break*/,3];case AttachmentType.Page:return [3/*break*/,5];case AttachmentType.Event:return [3/*break*/,7];}return [3/*break*/,9];case 1:return [4/*yield*/,getPost(id)];case 2:return [2/*return*/,_b.sent()];case 3:return [4/*yield*/,getNews(id).toPromise()];case 4:return [2/*return*/,_b.sent()];case 5:return [4/*yield*/,loadPage(id)];case 6:return [2/*return*/,_b.sent()];case 7:return [4/*yield*/,getEvent(id)];case 8:return [2/*return*/,_b.sent()];case 9:throw Error('Invalid type');}});});}function renderEmbeddedObjectTile(){var _a;if(type===AttachmentType.Post){return jsx$1(PostItemTile,{post:item,backgroundColor:backgroundColor,readOnly:readOnly},void 0);}if(type===AttachmentType.News){var newsItem=item;return jsx$1(NewsItemTile,{item:newsItem,baseRoute:buildPath('news'),styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white},readOnly:readOnly},void 0);}if(type===AttachmentType.Page){var pageItem=item;return jsx$1(StyledPageItemTile$1,{item:pageItem,baseRoute:buildPath('pages'),styleDefinition:{backgroundColor:backgroundColor,bannerDefaultWidth:150,bannerFontSize:60},readOnly:readOnly,isBannerClickable:((_a=pageItem.bannerInfo)===null||_a===void 0?void 0:_a.type)==='video',additionalMetadata:jsx$1(StyledDocumentDownloadButton$3,{page:item,marginRight:readOnly?spacingM:0},void 0),showBreadcrumb:true,showIntro:true},void 0);}var language=NewsService.getLanguageForPublishableItem(item,user);return jsx$1(EventCard,{item:item,language:language,styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white,bannerHostWidth:150},readOnly:readOnly},void 0);}};var Host$E=_styled.div.withConfig({displayName:"EmbeddedObjectTile__Host",componentId:"sc-yfh5nh-0"})(templateObject_3$I||(templateObject_3$I=__makeTemplateObject(["\n width: 100%;\n ","\n"],["\n width: 100%;\n ","\n"])),function(p){return p.backgroundColor?css$2(templateObject_1$1K||(templateObject_1$1K=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):css$2(templateObject_2$11||(templateObject_2$11=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),function(p){return p.theme.palette.white;});});var DifferentGroupWarning=_styled.div.withConfig({displayName:"EmbeddedObjectTile__DifferentGroupWarning",componentId:"sc-yfh5nh-1"})(templateObject_4$u||(templateObject_4$u=__makeTemplateObject(["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"],["\n background-color: ",";\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.semanticColors.errorBackground;},function(p){return p.theme.palette.red;},fontSizeSmall);var EmbeddedObjectWarningTile=function EmbeddedObjectWarningTile(_a){var messageResourceKey=_a.messageResourceKey,iconName=_a.iconName,iconLabel=_a.iconLabel;return jsxs(WarningHost,{children:[(iconName||iconLabel)&&jsxs(Title$5,{children:[iconName&&jsx$1(StyleIcon,{iconName:iconName},void 0),iconLabel&&jsx$1(FormattedMessageWithStyle,{id:iconLabel},void 0)]},void 0),jsx$1(FormattedMessageWithStyle,{id:messageResourceKey},void 0)]},void 0);};var WarningHost=_styled.div.withConfig({displayName:"EmbeddedObjectTile__WarningHost",componentId:"sc-yfh5nh-2"})(templateObject_5$r||(templateObject_5$r=__makeTemplateObject(["\n padding: ","px;\n"],["\n padding: ","px;\n"])),spacingM);var Title$5=_styled.div.withConfig({displayName:"EmbeddedObjectTile__Title",componentId:"sc-yfh5nh-3"})(templateObject_6$h||(templateObject_6$h=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n font-weight: bold;\n font-size: ","px;\n margin-bottom: ","px;\n"])),fontSizeMedium,spacingS);var SpinnerHost=_styled.div.withConfig({displayName:"EmbeddedObjectTile__SpinnerHost",componentId:"sc-yfh5nh-4"})(templateObject_7$c||(templateObject_7$c=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n margin-top: ","px;\n"])),spacingL);var StyledSpinner$2=_styled(Spinner).withConfig({displayName:"EmbeddedObjectTile__StyledSpinner",componentId:"sc-yfh5nh-5"})(templateObject_8$b||(templateObject_8$b=__makeTemplateObject(["\n margin-top: 0;\n margin-bottom: ","px;\n"],["\n margin-top: 0;\n margin-bottom: ","px;\n"])),spacingL);var StyleIcon=_styled(Icon).withConfig({displayName:"EmbeddedObjectTile__StyleIcon",componentId:"sc-yfh5nh-6"})(templateObject_9$9||(templateObject_9$9=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledPageItemTile$1=_styled(PageItemTile).withConfig({displayName:"EmbeddedObjectTile__StyledPageItemTile",componentId:"sc-yfh5nh-7"})(templateObject_11$4||(templateObject_11$4=__makeTemplateObject(["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"],["\n ","\n\n @media (max-width: ","px) {\n > div {\n flex-direction: column;\n }\n\n [data-page-tile-content] {\n max-width: 100%;\n }\n }\n"])),function(p){return p.isBannerClickable&&css$2(templateObject_10$8||(templateObject_10$8=__makeTemplateObject(["\n [data-page-tile-content] {\n position: relative;\n }\n "],["\n [data-page-tile-content] {\n position: relative;\n }\n "])));},maxScreenSize.medium);var StyledDocumentDownloadButton$3=_styled(DocumentDownloadButton).withConfig({displayName:"EmbeddedObjectTile__StyledDocumentDownloadButton",componentId:"sc-yfh5nh-8"})(templateObject_12$3||(templateObject_12$3=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button i {\n margin: 0;\n color: ",";\n }\n\n margin-right: ","px;\n\n @media (max-width: ","px) {\n margin-right: 0;\n }\n"])),function(p){return p.theme.textColors.default;},function(p){return p.marginRight;},maxScreenSize.medium);var templateObject_1$1K,templateObject_2$11,templateObject_3$I,templateObject_4$u,templateObject_5$r,templateObject_6$h,templateObject_7$c,templateObject_8$b,templateObject_9$9,templateObject_10$8,templateObject_11$4,templateObject_12$3;var EmbeddedObjectList=function EmbeddedObjectList(_a){var attachments=_a.attachments,className=_a.className,onDeleteClick=_a.onDeleteClick,previewTheme=_a.previewTheme;var formatMessage=useIntl().formatMessage;var embeddedObjects=attachments.filter(function(f){return f.type===AttachmentType.Post||f.type===AttachmentType.News||f.type===AttachmentType.Page||f.type===AttachmentType.Event;});if(embeddedObjects.length===0){return null;}if(onDeleteClick){return jsx$1(Host$D,__assign({className:className,"data-embedded-object-attachment-list":true},{children:embeddedObjects.map(function(o){return jsx$1(AttachmentHost,__assign({domIdentifier:"embedded-object",deleteButton:jsx$1(DeleteAttachmentButton,{"data-remove-attachment-button":o.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(o);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsx$1(EmbeddedObjectTile,{id:o.id,type:o.type,previewTheme:previewTheme,readOnly:true},o.id)}),o.id);})}),void 0);}return jsx$1(PreviewHost,__assign({className:className,domIdentifier:"embedded-object-preview-"+embeddedObjects[0].id},{children:jsx$1(EmbeddedObjectTile,{id:embeddedObjects[0].id,type:embeddedObjects[0].type,previewTheme:previewTheme},void 0)}),void 0);};var Host$D=_styled.div.withConfig({displayName:"EmbeddedObjectList__Host",componentId:"sc-axja9n-0"})(templateObject_1$1J||(templateObject_1$1J=__makeTemplateObject(["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"],["\n display: inline-flex;\n flex-wrap: wrap;\n width: 100%;\n padding-bottom: ","px;\n\n > div {\n margin-top: ","px;\n }\n"])),spacingM,spacingM);var PreviewHost=_styled(AttachmentHost).withConfig({displayName:"EmbeddedObjectList__PreviewHost",componentId:"sc-axja9n-1"})(templateObject_2$10||(templateObject_2$10=__makeTemplateObject(["\n margin: ","px 0 0 0;\n"],["\n margin: ","px 0 0 0;\n"])),spacingM);var templateObject_1$1J,templateObject_2$10;var ImageAttachmentList=function ImageAttachmentList(_a){var images=_a.images,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,imageBackgroundColor=_a.imageBackgroundColor,className=_a.className;if(!images||images.length===0){return null;}return jsx$1(List,__assign({className:className},{children:images.map(function(i){return jsx$1(ListItem$1,{children:jsx$1(ImageAttachmentPreview,{attachment:i,disabled:disabled,onDeleteClick:function(){return onDeleteClick(i);},backgroundColor:imageBackgroundColor},void 0)},i.id);})}),void 0);};var List=_styled.ul.withConfig({displayName:"ImageAttachmentList__List",componentId:"sc-7el1kj-0"})(templateObject_1$1I||(templateObject_1$1I=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"],["\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n margin: 0;\n padding: 0;\n list-style: none;\n"])));var ListItem$1=_styled.li.withConfig({displayName:"ImageAttachmentList__ListItem",componentId:"sc-7el1kj-1"})(templateObject_2$$||(templateObject_2$$=__makeTemplateObject(["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"],["\n width: calc(100% - ","px);\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n }\n"])),spacingS-5,minScreenSize.medium,spacingS-5);var ImageAttachmentPreview=function ImageAttachmentPreview(_a){var attachment=_a.attachment,onDeleteClick=_a.onDeleteClick,disabled=_a.disabled,backgroundColor=_a.backgroundColor;var formatMessage=useIntl().formatMessage;return jsxs(AttachmentHost,__assign({domIdentifier:"image",backgroundColor:backgroundColor,deleteButton:!disabled&&jsx$1(StyledDeleteAttachmentButton,{iconProps:{iconName:'Delete'},onClick:onDeleteClick,disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:[attachment.hasError&&jsx$1(AttachmentOverlay,{children:jsx$1("div",{children:jsx$1(WarningIcon,{iconName:"Warning"},void 0)},void 0)},void 0),attachment.isUploadInProgress&&jsx$1(AttachmentOverlay,{children:jsx$1(CenteredSpinner,{size:SpinnerSize.large},void 0)},void 0),jsx$1(Image$1,{src:attachment.previewUrl,height:225,imageFit:ImageFit.centerCover,title:attachment.filename},void 0)]}),void 0);};var AttachmentOverlay=_styled.div.withConfig({displayName:"ImageAttachmentList__AttachmentOverlay",componentId:"sc-7el1kj-2"})(templateObject_3$H||(templateObject_3$H=__makeTemplateObject(["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"],["\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n left: 0;\n z-index: 2;\n\n background-color: rgba(146, 146, 146, 0.33);\n\n display: flex;\n align-items: center;\n justify-content: center;\n\n border-radius: ","px;\n overflow: hidden;\n /* fix for iOS and Safari: overflow: hidden with border-radius */\n transform: translateZ(0);\n"])),attachmentRoundedCornerSize);var CenteredSpinner=_styled(Spinner).withConfig({displayName:"ImageAttachmentList__CenteredSpinner",componentId:"sc-7el1kj-3"})(templateObject_4$t||(templateObject_4$t=__makeTemplateObject(["\n margin-top: auto;\n height: 100%;\n"],["\n margin-top: auto;\n height: 100%;\n"])));var WarningIcon=_styled(Icon).withConfig({displayName:"ImageAttachmentList__WarningIcon",componentId:"sc-7el1kj-4"})(templateObject_5$q||(templateObject_5$q=__makeTemplateObject(["\n font-size: 100px;\n color: ",";\n"],["\n font-size: 100px;\n color: ",";\n"])),function(p){return p.theme.palette.redDark;});var StyledDeleteAttachmentButton=_styled(DeleteAttachmentButton).withConfig({displayName:"ImageAttachmentList__StyledDeleteAttachmentButton",componentId:"sc-7el1kj-5"})(templateObject_6$g||(templateObject_6$g=__makeTemplateObject(["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"],["\n && {\n i {\n font-size: ","px;\n margin: 0;\n }\n }\n"])),fontSizeMedium);var templateObject_1$1I,templateObject_2$$,templateObject_3$H,templateObject_4$t,templateObject_5$q,templateObject_6$g;var AttachmentList=function AttachmentList(_a){var className=_a.className,files=_a.files,onDeleteAttachmentClick=_a.onDeleteAttachmentClick,disabled=_a.disabled,previewTheme=_a.previewTheme,disableVideoPreview=_a.disableVideoPreview,disableEmbeddedObjectPreview=_a.disableEmbeddedObjectPreview;var attachedImages=files.filter(function(f){return f.type===AttachmentType.Image;});var attachedFiles=files.filter(function(f){return f.type===AttachmentType.File;});var palette=useContext(ThemeContext$1).theme.palette;return jsxs(Host$C,__assign({className:className,hasItems:files.length>0,"data-attachment-list":true},{children:[jsx$1(GifEditList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsx$1(ImageAttachmentList,{images:attachedImages,disabled:disabled,onDeleteClick:function(i){return onDeleteAttachmentClick(i);},imageBackgroundColor:previewTheme==='dark'?palette.neutralLight:palette.white},void 0),!disableVideoPreview&&jsx$1(VideoList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);}},void 0),!disableEmbeddedObjectPreview&&jsx$1(EmbeddedObjectList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsx$1(FilesList$1,{files:attachedFiles,onDeleteClick:function(f){return onDeleteAttachmentClick(f);},disabled:disabled},void 0),jsx$1("div",{style:{clear:'both'}},void 0)]}),void 0);};var FilesList$1=_styled(FileAttachmentList).withConfig({displayName:"AttachmentList__FilesList",componentId:"sc-1s0cqp9-0"})(templateObject_1$1H||(templateObject_1$1H=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);var Host$C=_styled.div.withConfig({displayName:"AttachmentList__Host",componentId:"sc-1s0cqp9-1"})(templateObject_2$_||(templateObject_2$_=__makeTemplateObject(["\n margin-top: ",";\n"],["\n margin-top: ",";\n"])),function(_a){var hasItems=_a.hasItems;return hasItems?'8px':'0';});var templateObject_1$1H,templateObject_2$_;var RichCommentInputWithAttachmentList=/*#__PURE__*/forwardRef(function(props,ref){var _a;return jsxs(Fragment,{children:[jsx$1(RichCommentInput,__assign({},props,{ref:ref}),void 0),jsx$1(AttachmentList,{files:props.attachments,disabled:props.disabled,onDeleteAttachmentClick:props.onDeleteAttachment,previewTheme:(_a=props.inputTheme)!==null&&_a!==void 0?_a:props.attachmentPreviewTheme,disableVideoPreview:props.disableVideoPreview,disableEmbeddedObjectPreview:props.disableEmbeddedObjectPreview},void 0)]},void 0);});var CreateComment=function CreateComment(_a){var className=_a.className,onPost=_a.onPost,autoFocus=_a.autoFocus,readOnly=_a.readOnly,initialContent=_a.content,allowAttachments=_a.allowAttachments,mentionSearchHandler=_a.mentionSearchHandler,useLargeDropTarget=_a.useLargeDropTarget,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,_b=_a.focusAfterPost,focusAfterPost=_b===void 0?true:_b,onAttachmentsChanged=_a.onAttachmentsChanged,_c=_a.attachments,attachments=_c===void 0?[]:_c,deletedAttachmentUrls=_a.deletedAttachmentUrls,onDeleteAttachment=_a.onDeleteAttachment,disableDragAndDrop=_a.disableDragAndDrop,allowKeywords=_a.allowKeywords,allowSaveWithoutContent=_a.allowSaveWithoutContent,saveOnEnter=_a.saveOnEnter,saveOnCtrlEnter=_a.saveOnCtrlEnter,keywordSettings=_a.keywordSettings;var availableKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords)||[];var defaultKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.defaultKeywords)||[];var mandatoryKeywords=(keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords)||[];var _d=useState$2(false),isSaving=_d[0],setIsSaving=_d[1];var _e=useState$2(initialContent||''),content=_e[0],setContent=_e[1];var _f=useState$2(null),selectedKeywords=_f[0],setSelectedKeywords=_f[1];var _g=useState$2(false),showKeywordsPicker=_g[0],setShowKeywordsPicker=_g[1];var inputRef=useRef$1(null);var formatMessage=useIntl().formatMessage;var isReadOnly=readOnly||isSaving;var ignoreRef=useRef$1(false);useEffect$1(function(){return function(){ignoreRef.current=true;};},[]);var initialSelectedKeywords=defaultKeywords.concat(mandatoryKeywords);var initialSelectedKeywordIds=initialSelectedKeywords.map(function(k){return k.id;}).join('-');useEffect$1(function(){setSelectedKeywords(initialSelectedKeywords);if(initialSelectedKeywords.length===0){setShowKeywordsPicker(false);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126277
126275
|
},[initialSelectedKeywordIds]);return jsx$1("div",__assign({className:className},{children:jsx$1(RichCommentInputWithAttachmentList,{defaultKeywords:getGroupedKeywords(selectedKeywords!==null&&selectedKeywords!==void 0?selectedKeywords:defaultKeywords),ref:inputRef,content:content,attachments:attachments,deletedAttachmentUrls:deletedAttachmentUrls,onAttachmentsChange:onAttachmentsChanged,onDeleteAttachment:onDeleteAttachment,onEnter:saveOnEnter&&handleSave,onCtrlEnter:saveOnCtrlEnter&&handleSave,onChange:function(value){return setContent(value);},onFocus:function(){if(initialSelectedKeywords.length>0){setShowKeywordsPicker(true);}},disabled:isReadOnly,autoFocus:autoFocus,mentionSearchHandler:mentionSearchHandler,allowAttachments:allowAttachments,allowKeywords:allowKeywords,availableKeywords:availableKeywords,mandatoryKeywords:mandatoryKeywords,onKeywordsChange:function(keywords){return setSelectedKeywords(keywords);},showKeywordsPicker:showKeywordsPicker,disableDragAndDrop:disableDragAndDrop,useLargeDropTarget:useLargeDropTarget,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:placeHolderStringResourceValues,buttons:jsxs(Fragment,{children:[allowKeywords&&jsx$1(IconButton,{iconProps:{iconName:'Tag'},onClick:function(){setShowKeywordsPicker(!showKeywordsPicker);},disabled:isReadOnly,"data-button-type":"keywords",ariaLabel:formatMessage({id:'AriaLabel.keywordsButton'})},void 0),jsx$1(IconButton,{iconProps:{iconName:'Send'},disabled:isSaveDisabled(),onClick:handleSave,"data-button-type":"save",ariaLabel:formatMessage({id:'AriaLabel.sendButton'})},'saveButton'+isSaveDisabled())]},void 0)},void 0)}),void 0);function handleSave(){return __awaiter(this,void 0,void 0,function(){var groupedKeywords;return __generator(this,function(_a){switch(_a.label){case 0:if(isSaveDisabled()){return [2/*return*/];}setIsSaving(true);groupedKeywords=getGroupedKeywords(selectedKeywords);return [4/*yield*/,onPost({content:content.trim()},groupedKeywords)];case 1:_a.sent();setShowKeywordsPicker(false);setSelectedKeywords(defaultKeywords||[]);if(!ignoreRef.current){setIsSaving(false);setContent('');if(focusAfterPost){inputRef.current.focus();}}return [2/*return*/];}});});}function isSaveDisabled(){return isReadOnly||!canSaveInput(allowSaveWithoutContent,attachments,content);}};var gutter=2;_styled.div.withConfig({displayName:"LegacyPostPhotoGallery__Gallery",componentId:"sc-ir1n2k-0"})(templateObject_1$1G||(templateObject_1$1G=__makeTemplateObject(["\n overflow: hidden;\n\n margin-left: -","px;\n margin-right: -","px;\n"],["\n overflow: hidden;\n\n margin-left: -","px;\n margin-right: -","px;\n"])),gutter,gutter);_styled.a.withConfig({displayName:"LegacyPostPhotoGallery__ImageItem",componentId:"sc-ir1n2k-1"})(templateObject_2$Z||(templateObject_2$Z=__makeTemplateObject(["\n background-color: #eee;\n box-sizing: border-box;\n float: left;\n margin: ","px;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 200px;\n cursor: pointer;\n\n :hover {\n opacity: 0.9;\n }\n\n > * {\n height: 100%;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n height: 200px;\n }\n\n @media (min-width: ","px) {\n width: calc(25% - ","px);\n height: 150px;\n }\n"],["\n background-color: #eee;\n box-sizing: border-box;\n float: left;\n margin: ","px;\n overflow: hidden;\n position: relative;\n width: 100%;\n height: 200px;\n cursor: pointer;\n\n :hover {\n opacity: 0.9;\n }\n\n > * {\n height: 100%;\n }\n\n @media (min-width: ","px) {\n width: calc(50% - ","px);\n height: 200px;\n }\n\n @media (min-width: ","px) {\n width: calc(25% - ","px);\n height: 150px;\n }\n"])),gutter,minScreenSize.small,gutter*2,minScreenSize.medium,gutter*2);var templateObject_1$1G,templateObject_2$Z;var ImagesAndFilesList=function ImagesAndFilesList(_a){var item=_a.item,basePath=_a.basePath,imagesGridBackgroundColor=_a.imagesGridBackgroundColor,className=_a.className;var user=useCurrentUser();var _b=useAttachmentsApi(),getImageUrl=_b.getImageUrl,getFileUrl=_b.getFileUrl;var subscriptionId=user.subscription.id;var files=item.attachments.filter(function(a){return a.type===AttachmentType.File;});var images=item.attachments.filter(function(a){return a.type===AttachmentType.Image;});var maxContentWidth=minScreenSize.medium-spacingX;var galleryDetails=useMemo(function(){var galleryImages=images.map(function(a){var _a;return {previewUrl:(_a=a.previewUrl)!==null&&_a!==void 0?_a:getImageUrl(basePath,subscriptionId,item,a.id,maxContentWidth),imageId:a.id,width:a.width,height:a.height};});return {galleryId:createId(),images:galleryImages};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126278
126276
|
},[item.attachments,item.fileAccessToken,item.attachmentContainerId]);if(images.length===0&&files.length===0){return null;}return jsxs("div",__assign({className:className},{children:[jsx$1(PhotoGrid,{images:galleryDetails.images,imageUrlResolver:function(imageId,width,height){return getImageUrl(basePath,subscriptionId,item,imageId,width,height);},gridBackgroundColor:imagesGridBackgroundColor},void 0),jsx$1(FilesList,{files:files,getFileUrl:function(attachmentId,token){return getFileUrl(basePath,subscriptionId,item,attachmentId,token);},fileAccessToken:item.fileAccessToken},void 0)]}),void 0);};var FilesList=_styled(FileAttachmentList).withConfig({displayName:"ImagesAndFilesList__FilesList",componentId:"sc-1wjy8l6-0"})(templateObject_1$1F||(templateObject_1$1F=__makeTemplateObject(["\n :not(:first-child) {\n margin-top: ","px;\n }\n"],["\n :not(:first-child) {\n margin-top: ","px;\n }\n"])),spacingM);var templateObject_1$1F;var EditComment=function EditComment(_a){var content=_a.content,files=_a.files,deletedFileUrls=_a.deletedFileUrls,onSave=_a.onSave,onCancel=_a.onCancel,className=_a.className,mentionSearchHandler=_a.mentionSearchHandler,allowAttachments=_a.allowAttachments,inputTheme=_a.inputTheme,onAttachmentAdded=_a.onAttachmentAdded,onDeleteAttachment=_a.onDeleteAttachment,allowKeywords=_a.allowKeywords,availableKeywords=_a.availableKeywords,mandatoryKeywords=_a.mandatoryKeywords,keywords=_a.keywords,allowSaveWithoutContent=_a.allowSaveWithoutContent,saveOnEnter=_a.saveOnEnter,saveOnCtrlEnter=_a.saveOnCtrlEnter;var formatMessage=useIntl().formatMessage;var _b=useState$2(content||''),newContent=_b[0],setContent=_b[1];var _c=useState$2(false),showKeywordsPicker=_c[0],setShowKeywordsPicker=_c[1];var _d=useState$2(getFlatKeywordList(keywords)||[]),selectedKeywords=_d[0],setSelectedKeywords=_d[1];var hasMandatoryKeywords=(mandatoryKeywords===null||mandatoryKeywords===void 0?void 0:mandatoryKeywords.length)>0;var automaticallyShowKeywordsPicker=allowKeywords&&(hasMandatoryKeywords||selectedKeywords.length!==0);return jsx$1(RichCommentInputWithAttachmentList,{className:className,content:newContent,attachments:files,deletedAttachmentUrls:deletedFileUrls,autoFocus:true,mentionSearchHandler:mentionSearchHandler,onChange:function(value){return setContent(value);},onEnter:saveOnEnter&&handleSave,onCtrlEnter:saveOnCtrlEnter&&handleSave,onAttachmentsChange:onAttachmentAdded,onDeleteAttachment:onDeleteAttachment,allowAttachments:allowAttachments,allowKeywords:allowKeywords,availableKeywords:availableKeywords,mandatoryKeywords:mandatoryKeywords,defaultKeywords:keywords,onKeywordsChange:function(keywords){return setSelectedKeywords(keywords);},showKeywordsPicker:showKeywordsPicker||automaticallyShowKeywordsPicker,inputTheme:inputTheme,buttons:jsxs(Fragment,{children:[allowKeywords&&jsx$1(IconButton,{iconProps:{iconName:'Tag'},onClick:function(){setShowKeywordsPicker(!showKeywordsPicker);},"data-button-type":"keywords","aria-label":formatMessage({id:'AriaLabel.keywordsButton'})},void 0),jsx$1(IconButton,{iconProps:{iconName:'CheckMark'},disabled:!canSaveInput(allowSaveWithoutContent,files,newContent),onClick:handleSave,"data-button":"save",ariaLabel:formatMessage({id:'AriaLabel.sendButton'})},void 0),jsx$1(IconButton,{iconProps:{iconName:'Cancel'},onClick:onCancel,"data-button":"cancel",ariaLabel:formatMessage({id:'AriaLabel.cancelButton'})},void 0)]},void 0)},void 0);function handleSave(){var groupedKeywords=getGroupedKeywords(selectedKeywords);onSave(newContent.trim(),groupedKeywords);setShowKeywordsPicker(false);}};function useAttachmentUploader(initialAttachments,containerId,basePath){var ignoreRef=useRef$1(false);var warningToastHandle=useRef$1();var _a=useAttachmentsApi(),uploadFile=_a.uploadFile,uploadImage=_a.uploadImage;var showToastWarning=useNotificationContext().showToastWarning;useEffect$1(function(){return function(){ignoreRef.current=true;};},[]);var user=useCurrentUser();var _b=useState$2(initialAttachments),attachments=_b[0],setAttachments=_b[1];var _c=useState$2([]),deletedAttachmentUrls=_c[0],setDeletedAttachmentUrls=_c[1];// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126279
126277
|
var handleAttachmentCallback=useCallback(handleAttachmentsAdded,[attachments,setAttachments,basePath,containerId]);return [attachments,handleAttachmentCallback,clearAttachments,deletedAttachmentUrls,deleteAttachment];function handleAttachmentsAdded(updatedAttachments){return __awaiter(this,void 0,void 0,function(){var newAttachments,_loop_1,_i,newAttachments_1,newAttachment;return __generator(this,function(_a){newAttachments=updatedAttachments.filter(function(a){return attachments.every(function(old){return old.id!==a.id;});});setAttachments(updatedAttachments.map(function(a){return __assign(__assign({},a),{isUploadInProgress:(a.type===AttachmentType.Image||a.type===AttachmentType.File)&&!!newAttachments.find(function(x){return x.id===a.id;})});}));_loop_1=function(newAttachment){(newAttachment.type===AttachmentType.Image||newAttachment.type===AttachmentType.File)&&uploadAttachment(basePath,newAttachment).then(function(response){if((response===null||response===void 0?void 0:response.status)!==200&&(response===null||response===void 0?void 0:response.status)!==204){throw new Error("Request failed with status "+(response===null||response===void 0?void 0:response.status));}})// todo: add proper error handling when uploading a attachment fails
|
|
@@ -126313,7 +126311,7 @@ var showPagingDots=hasMoreImages&&images.length<=15;return jsxs(Fragment,{childr
|
|
|
126313
126311
|
if(pullToRefreshContext){pullToRefreshContext.setEnabled(false);}}function handleCloseFullScreen(){setIsFullScreenOpen(false);if(pullToRefreshContext){pullToRefreshContext.setEnabled(true);}}};var GalleryContainer=_styled.div.withConfig({displayName:"PhotoGallery__GalleryContainer",componentId:"sc-peu8jt-0"})(templateObject_1$1q||(templateObject_1$1q=__makeTemplateObject(["\n position: relative;\n display: flex;\n width: 100%;\n margin-bottom: ","px;\n\n .slider:focus {\n outline: 2px solid ",";\n outline-offset: 2px;\n }\n\n .slider-frame {\n height: auto !important;\n }\n\n .slider-list {\n cursor: default !important;\n }\n\n figure {\n margin: 0;\n }\n\n .slider-control-bottomcenter {\n position: relative !important;\n left: 0 !important;\n transform: none !important;\n }\n\n .slider-dots {\n top: 0 !important;\n justify-content: center;\n .paging-item {\n margin-bottom: 0 !important;\n button {\n width: 18px !important;\n max-width: 18px !important;\n padding: 0 6px !important;\n }\n &:not(.active) button {\n fill: "," !important;\n }\n }\n }\n"],["\n position: relative;\n display: flex;\n width: 100%;\n margin-bottom: ","px;\n\n .slider:focus {\n outline: 2px solid ",";\n outline-offset: 2px;\n }\n\n .slider-frame {\n height: auto !important;\n }\n\n .slider-list {\n cursor: default !important;\n }\n\n figure {\n margin: 0;\n }\n\n .slider-control-bottomcenter {\n position: relative !important;\n left: 0 !important;\n transform: none !important;\n }\n\n .slider-dots {\n top: 0 !important;\n justify-content: center;\n .paging-item {\n margin-bottom: 0 !important;\n button {\n width: 18px !important;\n max-width: 18px !important;\n padding: 0 6px !important;\n }\n &:not(.active) button {\n fill: "," !important;\n }\n }\n }\n"])),spacingS+5,function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.neutralTertiary;});var CarouselButton=_styled(IconButton).withConfig({displayName:"PhotoGallery__CarouselButton",componentId:"sc-peu8jt-1"})(templateObject_2$R||(templateObject_2$R=__makeTemplateObject(["\n && {\n margin: 0 ","px;\n background-color: #fff;\n border-radius: 50%;\n\n &:hover {\n background-color: #fff;\n }\n\n i {\n margin: 0;\n }\n\n &[data-button='prev'] {\n i {\n transform: translate(-1px, 0);\n }\n }\n\n &[data-button='next'] {\n i {\n transform: translate(1px, 0);\n }\n }\n }\n"],["\n && {\n margin: 0 ","px;\n background-color: #fff;\n border-radius: 50%;\n\n &:hover {\n background-color: #fff;\n }\n\n i {\n margin: 0;\n }\n\n &[data-button='prev'] {\n i {\n transform: translate(-1px, 0);\n }\n }\n\n &[data-button='next'] {\n i {\n transform: translate(1px, 0);\n }\n }\n }\n"])),spacingS);var Slide=_styled.div.withConfig({displayName:"PhotoGallery__Slide",componentId:"sc-peu8jt-2"})(templateObject_3$A||(templateObject_3$A=__makeTemplateObject(["\n width: 100%;\n height: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"],["\n width: 100%;\n height: auto;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n"])));_styled.div.withConfig({displayName:"PhotoGallery__SlideIndicator",componentId:"sc-peu8jt-3"})(templateObject_4$n||(templateObject_4$n=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n margin-top: 10px;\n background-color: rgba(0, 0, 0, 0.7);\n color: #fff;\n border-radius: 15px;\n font-size: 12px;\n padding: 3px 6px;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 10px;\n margin-top: 10px;\n background-color: rgba(0, 0, 0, 0.7);\n color: #fff;\n border-radius: 15px;\n font-size: 12px;\n padding: 3px 6px;\n"])));var Figure$1=_styled.figure.withConfig({displayName:"PhotoGallery__Figure",componentId:"sc-peu8jt-4"})(templateObject_7$a||(templateObject_7$a=__makeTemplateObject(["\n && {\n width: 100%;\n ",";\n\n background-color: ",";\n\n @media (min-width: ","px) {\n ","\n }\n\n img {\n max-width: 100%;\n height: auto;\n position: absolute;\n max-height: 100%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"],["\n && {\n width: 100%;\n ",";\n\n background-color: ",";\n\n @media (min-width: ","px) {\n ","\n }\n\n img {\n max-width: 100%;\n height: auto;\n position: absolute;\n max-height: 100%;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n }\n"])),function(p){return p.height?css$2(templateObject_5$m||(templateObject_5$m=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.height-100):'height: 300px;';},function(p){return p.theme.palette.neutralLighter;},minScreenSize.medium,function(p){return p.height?css$2(templateObject_6$d||(templateObject_6$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.height):'height: 400px;';});var Caption=_styled.span.withConfig({displayName:"PhotoGallery__Caption",componentId:"sc-peu8jt-5"})(templateObject_8$9||(templateObject_8$9=__makeTemplateObject(["\n padding-top: 5px;\n text-align: center;\n ","\n"],["\n padding-top: 5px;\n text-align: center;\n ","\n"])),LineClamp(2,fontSizeSmall,1.2));var ImageWrapper=_styled.div.withConfig({displayName:"PhotoGallery__ImageWrapper",componentId:"sc-peu8jt-6"})(templateObject_9$7||(templateObject_9$7=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n"])));_styled.a.withConfig({displayName:"PhotoGallery__ClickableImageWrapper",componentId:"sc-peu8jt-7"})(templateObject_10$6||(templateObject_10$6=__makeTemplateObject(["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n text-decoration: none;\n"],["\n position: relative;\n display: block;\n height: 100%;\n width: 100%;\n text-decoration: none;\n"])));var templateObject_1$1q,templateObject_2$R,templateObject_3$A,templateObject_4$n,templateObject_5$m,templateObject_6$d,templateObject_7$a,templateObject_8$9,templateObject_9$7,templateObject_10$6;var InlineGallery=function InlineGallery(_a){var galleryDetails=_a.blockProps;var _b=useDetailViewContext(),item=_b.item,resourceType=_b.resourceType;var user=useCurrentUser();var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;return jsx$1(PhotoGallerySlider,{gallery:galleryDetails,imageUrlResolver:getImageUrl,showFullScreenButton:true},void 0);function getImageUrl(imageId,width,height){if(!item.fileAccessToken){return null;}return getImageUrlWithToken(item.fileAccessToken,item.id,user.subscription.id,resourceType,imageId,width!==null&&width!==void 0?width:getMaxImageWidth(),height);}};var InlineGalleryMapper={component:InlineGallery,type:EntityType.Gallery,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var galleryId=node.getAttribute('data-gallery-id');if(galleryId==null){return null;}return {galleryId:galleryId,images:Array.from(node.querySelectorAll('img')).map(function(imageNode){return {imageId:imageNode.getAttribute('data-image-id'),imageTitle:imageNode.getAttribute('data-image-title'),width:imageNode.getAttribute('width'),height:imageNode.getAttribute('height')};}).filter(function(image){return image.imageId!==null;})};}};var InlineCodeViewer=function InlineCodeViewer(_a){var codeDetails=_a.codeDetails,showJsPlaceholder=_a.showJsPlaceholder,readOnly=_a.readOnly;var htmlContainerRef=useRef$1(null);var javascriptContainerRef=useRef$1(null);useEffect$1(function(){if(readOnly){return;}if(htmlContainerRef.current!=null){if(htmlContainerRef.current.innerHTML!==codeDetails.html){htmlContainerRef.current.innerHTML=codeDetails.html;refreshScripts(htmlContainerRef.current);}}if(javascriptContainerRef.current!=null){var oldScript=javascriptContainerRef.current.querySelector('script');var newScriptText=";\n (function() {\n try {\n "+codeDetails.javascript+";\n } catch (err) {\n console.error(err);\n }\n })();";if(!oldScript||oldScript.innerText!==newScriptText){oldScript===null||oldScript===void 0?void 0:oldScript.remove();var script=document.createElement('script');script.type='text/javascript';var scriptContent=document.createTextNode(newScriptText);script.appendChild(scriptContent);javascriptContainerRef.current.appendChild(script);}}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126314
126312
|
},[codeDetails.html,codeDetails.javascript]);if(readOnly){return jsxs(Host$y,{children:[jsx$1("div",{children:codeDetails.html&&JSON.stringify(codeDetails.html)},void 0),jsx$1("div",{children:codeDetails.javascript&&JSON.stringify(codeDetails.javascript)},void 0)]},void 0);}return jsxs(Host$y,{children:[codeDetails.html&&jsx$1("div",{ref:function(c){return htmlContainerRef.current=c;}},void 0),codeDetails.javascript&&jsx$1("div",__assign({ref:function(c){return javascriptContainerRef.current=c;}},{children:!codeDetails.html&&showJsPlaceholder&&jsx$1(JavascriptPlaceholder,{},void 0)}),void 0)]},void 0);};var Host$y=_styled.div.withConfig({displayName:"InlineCodeViewer__Host",componentId:"sc-q9v8du-0"})(templateObject_1$1p||(templateObject_1$1p=__makeTemplateObject(["\n /* Draft js is setting white-space: pre-wrap and it's causing extra spaces */\n /* fix: reset the white-space value (default one) */\n white-space: normal;\n"],["\n /* Draft js is setting white-space: pre-wrap and it's causing extra spaces */\n /* fix: reset the white-space value (default one) */\n white-space: normal;\n"])));var JavascriptPlaceholder=_styled.div.withConfig({displayName:"InlineCodeViewer__JavascriptPlaceholder",componentId:"sc-q9v8du-1"})(templateObject_2$Q||(templateObject_2$Q=__makeTemplateObject(["\n position: relative;\n height: 2em;\n\n &::before {\n position: absolute;\n content: '<!-- code -->';\n padding-top: 0.5em;\n padding-left: 1em;\n color: grey;\n }\n"],["\n position: relative;\n height: 2em;\n\n &::before {\n position: absolute;\n content: '<!-- code -->';\n padding-top: 0.5em;\n padding-left: 1em;\n color: grey;\n }\n"])));var templateObject_1$1p,templateObject_2$Q;var InlineCode=function InlineCode(_a){var _b=_a.blockProps,id=_b.id,html=_b.html,javascript=_b.javascript;var features=useFeatures();if(!features.editorInlineMarkup){return null;}return jsx$1(InlineCodeViewer,{codeDetails:{id:id,html:html,javascript:javascript}},void 0);};var InlineCodeMapper={component:InlineCode,type:EntityType.InlineCode,getPropsFromHtml:function(nodeName,node){var _a,_b,_c,_d;if(nodeName!=='div'){return null;}var codeId=node.getAttribute('data-code-id');if(codeId==null){return null;}var html=(_b=(_a=node.querySelector('[data-code-html]'))===null||_a===void 0?void 0:_a.innerHTML)!==null&&_b!==void 0?_b:node.getAttribute('data-code-html');var javascript=(_d=(_c=node.querySelector('script[type="text/javascript"][data-code-javascript]'))===null||_c===void 0?void 0:_c.innerHTML)!==null&&_d!==void 0?_d:node.getAttribute('data-code-javascript');return {id:codeId,html:html,javascript:javascript};},prepareRootNode:function(node){// detect if we a have new (draftJS) content. If not remove innerHTML
|
|
126315
126313
|
// in order to ensure parsing old blocks
|
|
126316
|
-
if(node.querySelector('[data-code-html]')==null){node.innerHTML='';}}};var InlineVideo=function InlineVideo(_a){var _b=_a.blockProps,id=_b.id,source=_b.source,url=_b.url,isDirectUrl=_b.isDirectUrl;var user=useCurrentUser();var token=useCurrentToken();var getVideoThumbnailUrl=useVideosApi().getVideoThumbnailUrl;var onOpenExternalLink=useContext(LinkContext).onOpenExternalLink;var isStreamVideo=source===VideoSource.MicrosoftStream;if(isStreamVideo&&env.isAnyMobileApp){return jsx$1(PrimaryButton,__assign({onClick:handleMicrosoftStreamClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.watchMicrosoftStream"},void 0)}),void 0);}return jsx$1(InlineVideoViewer,{videoInfo:{id:id,source:source,url:url,isDirectUrl:isDirectUrl},videoThumbnailUrl:isDirectUrl?getVideoThumbnailUrl(token,user.subscription.id,source,id):null},void 0);function handleMicrosoftStreamClick(){return __awaiter(this,void 0,void 0,function(){var url;return __generator(this,function(_a){switch(_a.label){case 0:url=getMicrosoftStreamVideoUrl(id);return [4/*yield*/,onOpenExternalLink(url,true)];case 1:_a.sent();return [2/*return*/];}});});}};var InlineVideoViewer=_styled(VideoWithThumbnailView).withConfig({displayName:"InlineVideo__InlineVideoViewer",componentId:"sc-12qdsy1-0"})(templateObject_1$1o||(templateObject_1$1o=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var InlineVideoMapper={component:InlineVideo,type:EntityType.Video,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var videoId=node.getAttribute('data-video-id');if(videoId==null){return null;}var source=node.getAttribute('data-video-source');return {id:videoId,source:parseInt(source,10),url:node.getAttribute('data-video-url'),isDirectUrl:node.getAttribute('data-is-direct-video-url')==='true'};},prepareRootNode:function(node){if(node.childNodes.length>0){node.innerHTML='';}}};var templateObject_1$1o;var InlineImage=function InlineImage(_a){var _b;var image=_a.blockProps;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType;var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var imageWidth=getImageWidth(image);var imageUrl=(_b=image.previewUrl)!==null&&_b!==void 0?_b:getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,imageWidth);return jsx$1(Host$x,{children:jsxs(Figure,__assign({onClick:function(){return showPhoto(getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,'default'));}},{children:[jsx$1("img",{src:imageUrl,alt:image.imageTitle||'',width:imageWidth},void 0),image.imageTitle&&jsx$1("figcaption",{children:image.imageTitle},void 0)]}),void 0)},void 0);};var Host$x=_styled.div.withConfig({displayName:"InlineImage__Host",componentId:"sc-14k2cj1-0"})(templateObject_1$1n||(templateObject_1$1n=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var Figure=_styled.figure.withConfig({displayName:"InlineImage__Figure",componentId:"sc-14k2cj1-1"})(templateObject_2$P||(templateObject_2$P=__makeTemplateObject(["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n }\n"],["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n }\n"])));var InlineImageMapper={component:InlineImage,type:EntityType.Image,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var imageId=node.getAttribute('data-image-id');if(imageId==null){return null;}return {imageId:imageId,imageTitle:node.getAttribute('data-image-caption'),width:getImageWidth(node.getAttribute('data-image-width')),height:node.getAttribute('data-image-height')};}};var templateObject_1$1n,templateObject_2$P;var HeaderFormat=css$2(templateObject_1$1m||(templateObject_1$1m=__makeTemplateObject(["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"],["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.palette.neutralSecondaryAlt;},function(p){return p.theme.palette.neutralLight;});var FooterFormat=css$2(templateObject_2$O||(templateObject_2$O=__makeTemplateObject(["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"],["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"])),function(p){return p.theme.palette.white;},function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var Grid=css$2(templateObject_3$z||(templateObject_3$z=__makeTemplateObject(["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"],["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;});var AlternateLines=css$2(templateObject_4$m||(templateObject_4$m=__makeTemplateObject(["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"],["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;});var Table=_styled.table.withConfig({displayName:"InlineTableStyles__Table",componentId:"sc-10dcamf-0"})(templateObject_5$l||(templateObject_5$l=__makeTemplateObject(["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"],["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"])),fontSizeNormal,fontSizeNormal,function(_a){var showGrid=_a.format.showGrid;return showGrid&&Grid;},function(_a){var alternateLines=_a.format.alternateLines;return alternateLines&&AlternateLines;},function(_a){var hasHeaderRow=_a.format.hasHeaderRow;return hasHeaderRow&&HeaderFormat;},function(_a){var hasFooterRow=_a.format.hasFooterRow;return hasFooterRow&&FooterFormat;});var templateObject_1$1m,templateObject_2$O,templateObject_3$z,templateObject_4$m,templateObject_5$l;var TableViewer=function TableViewer(_a){var tableDefinition=_a.blockProps.tableDefinition;var lastRowIndex=tableDefinition.rows.length-1;return jsx$1(Host$w,{children:jsx$1(Table,__assign({format:tableDefinition.format},{children:jsx$1("tbody",{children:tableDefinition.rows.map(function(r,rowIndex){return jsx$1("tr",{children:r.cells.map(function(c,index){var _a,_b,_c;return jsx$1("td",__assign({style:__assign(__assign({},cellStyleToCssProps(c.style,tableDefinition.format.alternateLines||tableDefinition.format.hasHeaderRow&&rowIndex===0||tableDefinition.format.hasFooterRow&&rowIndex===lastRowIndex)),rowIndex===0&&{width:(_b=(_a=tableDefinition.columns)===null||_a===void 0?void 0:_a[index])===null||_b===void 0?void 0:_b.width}),title:c.value,"data-multiline":c.isMultiline},{children:c.url?jsx$1(TextLink,__assign({url:c.url,style:{color:(_c=c.style.fontColor)!==null&&_c!==void 0?_c:null}},{children:c.value}),void 0):c.value}),index);})},rowIndex);})},void 0)}),void 0)},void 0);};function cssPropsToCellStyle(style,alternateLines,isHeaderRow){if(style==null){return {};}return {isBold:style.fontWeight==='bold',isItalic:style.fontStyle==='italic',textAlign:style.textAlign==='left'||style.textAlign==='right'||style.textAlign==='center'?style.textAlign:null,fontColor:style.color,backgroundColor:!alternateLines&&!isHeaderRow?style.backgroundColor:null};}function cellStyleToCssProps(cellStyle,disableCustomColors){if(cellStyle==null){return {};}return __assign(__assign(__assign(__assign(__assign({},cellStyle.isBold&&{fontWeight:'bold'}),cellStyle.isItalic&&{fontStyle:'italic'}),cellStyle.textAlign&&{textAlign:cellStyle.textAlign}),cellStyle.fontColor&&!disableCustomColors&&{color:cellStyle.fontColor}),cellStyle.backgroundColor&&!disableCustomColors&&{backgroundColor:cellStyle.backgroundColor});}var InlineTable={component:TableViewer,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var tableId=node.getAttribute('data-table-id');if(tableId==null){return null;}var table=node.querySelector('table');var body=table===null||table===void 0?void 0:table.querySelector('tbody');if(body==null){return null;}var firstRow=body.querySelector('tr:first-child');return {tableId:tableId,tableDefinition:{columns:Array.from(firstRow.querySelectorAll('td')).map(function(c){var _a,_b;return {width:(_b=(_a=c.style)===null||_a===void 0?void 0:_a.width)!==null&&_b!==void 0?_b:null};}),rows:Array.from(body.querySelectorAll('tr')).map(function(row){return {rowId:createId(),cells:Array.from(row.querySelectorAll('td')).map(function(cell){var _a,_b;return {cellId:createId(),value:cell.innerText,style:cssPropsToCellStyle(cell.style,table.classList.contains('condense-table--alternateLines'),table.classList.contains('condense-table--hasHeader')&&row.rowIndex===0),isMultiline:cell.innerText.includes('\n'),url:(_b=(_a=cell.querySelector('a'))===null||_a===void 0?void 0:_a.getAttribute('href'))!==null&&_b!==void 0?_b:null};})};}),format:{showGrid:table.classList.contains('condense-table--showGrid'),alternateLines:table.classList.contains('condense-table--alternateLines'),hasHeaderRow:table.classList.contains('condense-table--hasHeader'),hasFooterRow:table.classList.contains('condense-table--hasFooter')}}};},type:EntityType.Table};var Host$w=_styled.div.withConfig({displayName:"InlineTable__Host",componentId:"sc-8db5xf-0"})(templateObject_1$1l||(templateObject_1$1l=__makeTemplateObject(["\n width: 100%;\n overflow-x: auto;\n"],["\n width: 100%;\n overflow-x: auto;\n"])));var templateObject_1$1l;var InlineContactViewer=function InlineContactViewer(_a){var _b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x;var contact=_a.contact;var user=useCurrentUser();var userInfo=usePromise$2(function(){return getContactInfo();},null,[contact])[0];var getUserInfo=useAccountApi().getUserInfo;var additionalPropertyKeys=['mail','company','mobilePhone','officePhone','address','additionalInfo'];var showMoreProperties=contact.properties&&Object.keys(contact.properties).filter(function(key){return additionalPropertyKeys.indexOf(key)>=0&&contact.properties[key].value!==null;}).length>0;return jsxs(Host$v,{children:[jsx$1(StyledAvatar$1,{upn:contact.upn,text:contact.properties.displayName.shouldAutoLoad&&userInfo?userInfo.displayName||contact.properties.displayName.value:contact.properties.displayName.value,secondaryText:((_b=contact.properties.department)===null||_b===void 0?void 0:_b.shouldAutoLoad)&&userInfo?((_c=userInfo.properties)===null||_c===void 0?void 0:_c.department)||((_d=contact.properties.department)===null||_d===void 0?void 0:_d.value):(_e=contact.properties.department)===null||_e===void 0?void 0:_e.value,tertiaryText:((_f=contact.properties.jobTitle)===null||_f===void 0?void 0:_f.shouldAutoLoad)&&userInfo?((_g=userInfo.properties)===null||_g===void 0?void 0:_g.jobTitle)||((_h=contact.properties.jobTitle)===null||_h===void 0?void 0:_h.value):(_j=contact.properties.jobTitle)===null||_j===void 0?void 0:_j.value},void 0),showMoreProperties&&jsx$1(PropertiesContainer,{children:jsxs("ul",{children:[((_k=contact.properties.company)===null||_k===void 0?void 0:_k.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"EMI",tooltipResourceKey:"Generic.company"},{children:contact.properties.company.shouldAutoLoad&&userInfo?((_l=userInfo.properties)===null||_l===void 0?void 0:_l.company)||contact.properties.company.value:contact.properties.company.value}),void 0)},void 0),((_m=contact.properties.mail)===null||_m===void 0?void 0:_m.value)&&jsx$1("li",{children:jsx$1(EmailProperty,{email:contact.properties.mail.shouldAutoLoad&&userInfo?userInfo.mail||contact.properties.mail.value:contact.properties.mail.value},void 0)},void 0),((_o=contact.properties.officePhone)===null||_o===void 0?void 0:_o.value)&&jsx$1("li",{children:jsx$1(OfficePhoneProperty,{value:contact.properties.officePhone.shouldAutoLoad&&userInfo?((_p=userInfo.properties)===null||_p===void 0?void 0:_p.businessPhones[0])||contact.properties.officePhone.value:contact.properties.officePhone.value},void 0)},void 0),((_q=contact.properties.mobilePhone)===null||_q===void 0?void 0:_q.value)&&jsx$1("li",{children:jsx$1(MobilePhoneProperty,{value:contact.properties.mobilePhone.shouldAutoLoad&&userInfo?((_r=userInfo.properties)===null||_r===void 0?void 0:_r.mobilePhone)||contact.properties.mobilePhone.value:contact.properties.mobilePhone.value},void 0)},void 0),((_s=contact.properties.address)===null||_s===void 0?void 0:_s.value)&&jsx$1("li",{children:jsx$1(LocationProperty,{value:contact.properties.address.shouldAutoLoad&&userInfo?((_u=(_t=userInfo.properties)===null||_t===void 0?void 0:_t.officeLocation)!==null&&_u!==void 0?_u:(_v=userInfo.properties)===null||_v===void 0?void 0:_v.address)||contact.properties.address.value:contact.properties.address.value,tooltipResourceKey:"Generic.address"},void 0)},void 0),((_w=contact.properties.additionalInfo)===null||_w===void 0?void 0:_w.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"ContactInfo",tooltipResourceKey:"Generic.additionalInfo"},{children:contact.properties.additionalInfo.shouldAutoLoad&&userInfo?((_x=userInfo.properties)===null||_x===void 0?void 0:_x.notes)||contact.properties.additionalInfo.value:contact.properties.additionalInfo.value}),void 0)},void 0)]},void 0)},void 0)]},void 0);function getContactInfo(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!contact.upn||user.isPublicUser){return [2/*return*/,null];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,getUserInfo(contact.upn)];case 2:return [2/*return*/,_a.sent()];case 3:_a.sent();// no exception is thrown because the backup values will be set from the contact
|
|
126314
|
+
if(node.querySelector('[data-code-html]')==null){node.innerHTML='';}}};var InlineVideo=function InlineVideo(_a){var _b=_a.blockProps,id=_b.id,source=_b.source,url=_b.url,isDirectUrl=_b.isDirectUrl;var user=useCurrentUser();var token=useCurrentToken();var getVideoThumbnailUrl=useVideosApi().getVideoThumbnailUrl;var onOpenExternalLink=useContext(LinkContext).onOpenExternalLink;var isStreamVideo=source===VideoSource.MicrosoftStream;if(isStreamVideo&&env.isAnyMobileApp){return jsx$1(PrimaryButton,__assign({onClick:handleMicrosoftStreamClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.watchMicrosoftStream"},void 0)}),void 0);}return jsx$1(InlineVideoViewer,{videoInfo:{id:id,source:source,url:url,isDirectUrl:isDirectUrl},videoThumbnailUrl:isDirectUrl?getVideoThumbnailUrl(token,user.subscription.id,source,id):null},void 0);function handleMicrosoftStreamClick(){return __awaiter(this,void 0,void 0,function(){var url;return __generator(this,function(_a){switch(_a.label){case 0:url=getMicrosoftStreamVideoUrl(id);return [4/*yield*/,onOpenExternalLink(url,true)];case 1:_a.sent();return [2/*return*/];}});});}};var InlineVideoViewer=_styled(VideoWithThumbnailView).withConfig({displayName:"InlineVideo__InlineVideoViewer",componentId:"sc-12qdsy1-0"})(templateObject_1$1o||(templateObject_1$1o=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var InlineVideoMapper={component:InlineVideo,type:EntityType.Video,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var videoId=node.getAttribute('data-video-id');if(videoId==null){return null;}var source=node.getAttribute('data-video-source');return {id:videoId,source:parseInt(source,10),url:node.getAttribute('data-video-url'),isDirectUrl:node.getAttribute('data-is-direct-video-url')==='true'};},prepareRootNode:function(node){if(node.childNodes.length>0){node.innerHTML='';}}};var templateObject_1$1o;var InlineImage=function InlineImage(_a){var _b;var image=_a.blockProps;var _c=useDetailViewContext(),item=_c.item,resourceType=_c.resourceType;var getImageUrlWithToken=useNewsApi().getImageUrlWithToken;var imageWidth=getImageWidth(image);var imageUrl=(_b=image.previewUrl)!==null&&_b!==void 0?_b:getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,imageWidth);return jsx$1(Host$x,{children:jsxs(Figure,__assign({width:imageWidth,onClick:function(){return showPhoto(getImageUrlWithToken(item.fileAccessToken,item.id,null,resourceType,image.imageId,'default'));}},{children:[jsx$1("img",{src:imageUrl,alt:image.imageTitle||'',width:imageWidth},void 0),image.imageTitle&&jsx$1("figcaption",{children:image.imageTitle},void 0)]}),void 0)},void 0);};var Host$x=_styled.div.withConfig({displayName:"InlineImage__Host",componentId:"sc-14k2cj1-0"})(templateObject_1$1n||(templateObject_1$1n=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var Figure=_styled.figure.withConfig({displayName:"InlineImage__Figure",componentId:"sc-14k2cj1-1"})(templateObject_2$P||(templateObject_2$P=__makeTemplateObject(["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n width: ","px;\n }\n"],["\n display: inline-block;\n max-width: 100%;\n img {\n max-width: 100%;\n }\n\n figcaption {\n text-align: center;\n width: ","px;\n }\n"])),function(p){return p.width;});var InlineImageMapper={component:InlineImage,type:EntityType.Image,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var imageId=node.getAttribute('data-image-id');if(imageId==null){return null;}return {imageId:imageId,imageTitle:node.getAttribute('data-image-caption'),width:getImageWidth(node.getAttribute('data-image-width')),height:node.getAttribute('data-image-height')};}};var templateObject_1$1n,templateObject_2$P;var HeaderFormat=css$2(templateObject_1$1m||(templateObject_1$1m=__makeTemplateObject(["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"],["\n tr:first-child {\n td {\n border: solid 1px ",";\n }\n\n td,\n textarea {\n font-weight: bold;\n color: ",";\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.palette.neutralSecondaryAlt;},function(p){return p.theme.palette.neutralLight;});var FooterFormat=css$2(templateObject_2$O||(templateObject_2$O=__makeTemplateObject(["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"],["\n tr:last-child {\n background-color: ",";\n > td {\n border-bottom: solid 2px ",";\n }\n }\n\n tr:nth-last-child(2) {\n > td {\n border-bottom: solid 1px ",";\n }\n }\n"])),function(p){return p.theme.palette.white;},function(p){return p.theme.palette.neutralPrimary;},function(p){return p.theme.palette.neutralPrimary;});var Grid=css$2(templateObject_3$z||(templateObject_3$z=__makeTemplateObject(["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"],["\n && {\n tr > td {\n border-color: ",";\n border-style: solid;\n }\n }\n"])),function(p){return p.theme.palette.neutralLight;});var AlternateLines=css$2(templateObject_4$m||(templateObject_4$m=__makeTemplateObject(["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"],["\n tr:nth-child(odd) {\n background-color: ",";\n td {\n background-color: ",";\n }\n\n td,\n textarea {\n background-color: ",";\n }\n }\n"])),function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;},function(p){return p.theme.palette.neutralLighter;});var Table=_styled.table.withConfig({displayName:"InlineTableStyles__Table",componentId:"sc-10dcamf-0"})(templateObject_5$l||(templateObject_5$l=__makeTemplateObject(["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"],["\n border-collapse: collapse;\n table-layout: fixed;\n width: 51px;\n\n tr {\n height: 43px;\n > td {\n border: solid 1px transparent;\n font-size: ","px;\n padding: 5px;\n vertical-align: top;\n\n &[data-multiline=\"true\"] {\n white-space: pre-wrap;\n }\n }\n\n textarea {\n font-size: ","px;\n border: none;\n padding: 0;\n }\n }\n }\n\n ","\n ","\n ","\n ","\n"])),fontSizeNormal,fontSizeNormal,function(_a){var showGrid=_a.format.showGrid;return showGrid&&Grid;},function(_a){var alternateLines=_a.format.alternateLines;return alternateLines&&AlternateLines;},function(_a){var hasHeaderRow=_a.format.hasHeaderRow;return hasHeaderRow&&HeaderFormat;},function(_a){var hasFooterRow=_a.format.hasFooterRow;return hasFooterRow&&FooterFormat;});var templateObject_1$1m,templateObject_2$O,templateObject_3$z,templateObject_4$m,templateObject_5$l;var TableViewer=function TableViewer(_a){var tableDefinition=_a.blockProps.tableDefinition;var lastRowIndex=tableDefinition.rows.length-1;return jsx$1(Host$w,{children:jsx$1(Table,__assign({format:tableDefinition.format},{children:jsx$1("tbody",{children:tableDefinition.rows.map(function(r,rowIndex){return jsx$1("tr",{children:r.cells.map(function(c,index){var _a,_b,_c;return jsx$1("td",__assign({style:__assign(__assign({},cellStyleToCssProps(c.style,tableDefinition.format.alternateLines||tableDefinition.format.hasHeaderRow&&rowIndex===0||tableDefinition.format.hasFooterRow&&rowIndex===lastRowIndex)),rowIndex===0&&{width:(_b=(_a=tableDefinition.columns)===null||_a===void 0?void 0:_a[index])===null||_b===void 0?void 0:_b.width}),title:c.value,"data-multiline":c.isMultiline},{children:c.url?jsx$1(TextLink,__assign({url:c.url,style:{color:(_c=c.style.fontColor)!==null&&_c!==void 0?_c:null}},{children:c.value}),void 0):c.value}),index);})},rowIndex);})},void 0)}),void 0)},void 0);};function cssPropsToCellStyle(style,alternateLines,isHeaderRow){if(style==null){return {};}return {isBold:style.fontWeight==='bold',isItalic:style.fontStyle==='italic',textAlign:style.textAlign==='left'||style.textAlign==='right'||style.textAlign==='center'?style.textAlign:null,fontColor:style.color,backgroundColor:!alternateLines&&!isHeaderRow?style.backgroundColor:null};}function cellStyleToCssProps(cellStyle,disableCustomColors){if(cellStyle==null){return {};}return __assign(__assign(__assign(__assign(__assign({},cellStyle.isBold&&{fontWeight:'bold'}),cellStyle.isItalic&&{fontStyle:'italic'}),cellStyle.textAlign&&{textAlign:cellStyle.textAlign}),cellStyle.fontColor&&!disableCustomColors&&{color:cellStyle.fontColor}),cellStyle.backgroundColor&&!disableCustomColors&&{backgroundColor:cellStyle.backgroundColor});}var InlineTable={component:TableViewer,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var tableId=node.getAttribute('data-table-id');if(tableId==null){return null;}var table=node.querySelector('table');var body=table===null||table===void 0?void 0:table.querySelector('tbody');if(body==null){return null;}var firstRow=body.querySelector('tr:first-child');return {tableId:tableId,tableDefinition:{columns:Array.from(firstRow.querySelectorAll('td')).map(function(c){var _a,_b;return {width:(_b=(_a=c.style)===null||_a===void 0?void 0:_a.width)!==null&&_b!==void 0?_b:null};}),rows:Array.from(body.querySelectorAll('tr')).map(function(row){return {rowId:createId(),cells:Array.from(row.querySelectorAll('td')).map(function(cell){var _a,_b;return {cellId:createId(),value:cell.innerText,style:cssPropsToCellStyle(cell.style,table.classList.contains('condense-table--alternateLines'),table.classList.contains('condense-table--hasHeader')&&row.rowIndex===0),isMultiline:cell.innerText.includes('\n'),url:(_b=(_a=cell.querySelector('a'))===null||_a===void 0?void 0:_a.getAttribute('href'))!==null&&_b!==void 0?_b:null};})};}),format:{showGrid:table.classList.contains('condense-table--showGrid'),alternateLines:table.classList.contains('condense-table--alternateLines'),hasHeaderRow:table.classList.contains('condense-table--hasHeader'),hasFooterRow:table.classList.contains('condense-table--hasFooter')}}};},type:EntityType.Table};var Host$w=_styled.div.withConfig({displayName:"InlineTable__Host",componentId:"sc-8db5xf-0"})(templateObject_1$1l||(templateObject_1$1l=__makeTemplateObject(["\n width: 100%;\n overflow-x: auto;\n"],["\n width: 100%;\n overflow-x: auto;\n"])));var templateObject_1$1l;var InlineContactViewer=function InlineContactViewer(_a){var _b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x;var contact=_a.contact;var user=useCurrentUser();var userInfo=usePromise$2(function(){return getContactInfo();},null,[contact])[0];var getUserInfo=useAccountApi().getUserInfo;var additionalPropertyKeys=['mail','company','mobilePhone','officePhone','address','additionalInfo'];var showMoreProperties=contact.properties&&Object.keys(contact.properties).filter(function(key){return additionalPropertyKeys.indexOf(key)>=0&&contact.properties[key].value!==null;}).length>0;return jsxs(Host$v,{children:[jsx$1(StyledAvatar$1,{upn:contact.upn,text:contact.properties.displayName.shouldAutoLoad&&userInfo?userInfo.displayName||contact.properties.displayName.value:contact.properties.displayName.value,secondaryText:((_b=contact.properties.department)===null||_b===void 0?void 0:_b.shouldAutoLoad)&&userInfo?((_c=userInfo.properties)===null||_c===void 0?void 0:_c.department)||((_d=contact.properties.department)===null||_d===void 0?void 0:_d.value):(_e=contact.properties.department)===null||_e===void 0?void 0:_e.value,tertiaryText:((_f=contact.properties.jobTitle)===null||_f===void 0?void 0:_f.shouldAutoLoad)&&userInfo?((_g=userInfo.properties)===null||_g===void 0?void 0:_g.jobTitle)||((_h=contact.properties.jobTitle)===null||_h===void 0?void 0:_h.value):(_j=contact.properties.jobTitle)===null||_j===void 0?void 0:_j.value},void 0),showMoreProperties&&jsx$1(PropertiesContainer,{children:jsxs("ul",{children:[((_k=contact.properties.company)===null||_k===void 0?void 0:_k.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"EMI",tooltipResourceKey:"Generic.company"},{children:contact.properties.company.shouldAutoLoad&&userInfo?((_l=userInfo.properties)===null||_l===void 0?void 0:_l.company)||contact.properties.company.value:contact.properties.company.value}),void 0)},void 0),((_m=contact.properties.mail)===null||_m===void 0?void 0:_m.value)&&jsx$1("li",{children:jsx$1(EmailProperty,{email:contact.properties.mail.shouldAutoLoad&&userInfo?userInfo.mail||contact.properties.mail.value:contact.properties.mail.value},void 0)},void 0),((_o=contact.properties.officePhone)===null||_o===void 0?void 0:_o.value)&&jsx$1("li",{children:jsx$1(OfficePhoneProperty,{value:contact.properties.officePhone.shouldAutoLoad&&userInfo?((_p=userInfo.properties)===null||_p===void 0?void 0:_p.businessPhones[0])||contact.properties.officePhone.value:contact.properties.officePhone.value},void 0)},void 0),((_q=contact.properties.mobilePhone)===null||_q===void 0?void 0:_q.value)&&jsx$1("li",{children:jsx$1(MobilePhoneProperty,{value:contact.properties.mobilePhone.shouldAutoLoad&&userInfo?((_r=userInfo.properties)===null||_r===void 0?void 0:_r.mobilePhone)||contact.properties.mobilePhone.value:contact.properties.mobilePhone.value},void 0)},void 0),((_s=contact.properties.address)===null||_s===void 0?void 0:_s.value)&&jsx$1("li",{children:jsx$1(LocationProperty,{value:contact.properties.address.shouldAutoLoad&&userInfo?((_u=(_t=userInfo.properties)===null||_t===void 0?void 0:_t.officeLocation)!==null&&_u!==void 0?_u:(_v=userInfo.properties)===null||_v===void 0?void 0:_v.address)||contact.properties.address.value:contact.properties.address.value,tooltipResourceKey:"Generic.address"},void 0)},void 0),((_w=contact.properties.additionalInfo)===null||_w===void 0?void 0:_w.value)&&jsx$1("li",{children:jsx$1(UserPropertyWrapper,__assign({iconName:"ContactInfo",tooltipResourceKey:"Generic.additionalInfo"},{children:contact.properties.additionalInfo.shouldAutoLoad&&userInfo?((_x=userInfo.properties)===null||_x===void 0?void 0:_x.notes)||contact.properties.additionalInfo.value:contact.properties.additionalInfo.value}),void 0)},void 0)]},void 0)},void 0)]},void 0);function getContactInfo(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:if(!contact.upn||user.isPublicUser){return [2/*return*/,null];}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,getUserInfo(contact.upn)];case 2:return [2/*return*/,_a.sent()];case 3:_a.sent();// no exception is thrown because the backup values will be set from the contact
|
|
126317
126315
|
return [2/*return*/,null];case 4:return [2/*return*/];}});});}};var Host$v=_styled.div.withConfig({displayName:"InlineContactViewer__Host",componentId:"sc-1rvwltt-0"})(templateObject_1$1k||(templateObject_1$1k=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS+5);var PropertiesContainer=_styled.div.withConfig({displayName:"InlineContactViewer__PropertiesContainer",componentId:"sc-1rvwltt-1"})(templateObject_2$N||(templateObject_2$N=__makeTemplateObject(["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"],["\n margin: ","px;\n\n && {\n ul {\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: ","px;\n }\n }\n"])),spacingS,fontSizeSmall);var StyledAvatar$1=_styled(Avatar).withConfig({displayName:"InlineContactViewer__StyledAvatar",componentId:"sc-1rvwltt-2"})(templateObject_3$y||(templateObject_3$y=__makeTemplateObject(["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"],["\n && {\n .ms-Persona-tertiaryText,\n .ms-Persona-secondaryText {\n display: block;\n font-size: ","px;\n }\n }\n"])),fontSizeSmall);var templateObject_1$1k,templateObject_2$N,templateObject_3$y;var InlineContact=function InlineContact(_a){var contact=__rest(_a.blockProps,[]);return jsx$1(InlineContactViewer,{contact:contact},void 0);};var InlineContactMapper={component:InlineContact,type:EntityType.Contact,getPropsFromHtml:function(nodeName,node){if(nodeName!=='div'){return null;}var contactId=node.getAttribute('data-contact-id');if(contactId==null){return null;}var properties={};Array.from(node.querySelectorAll('li')).forEach(function(childNode){var _a;var propertyKey=childNode.getAttribute('data-contact-property');var shouldAutoLoad=(_a=childNode.getAttribute('data-auto-load'))!==null&&_a!==void 0?_a:childNode.getAttribute('data-from-directory');var propertyValue=childNode.innerText;properties[propertyKey]={value:propertyValue,shouldAutoLoad:shouldAutoLoad==='true'};});return {id:contactId,tenantId:node.getAttribute('data-contact-tenantid'),upn:node.getAttribute('data-contact-upn'),properties:properties};}};var InlinePageListViewer=function InlinePageListViewer(_a){var items=_a.items,baseRoute=_a.baseRoute,filterBaseUrl=_a.filterBaseUrl,isInitialLoading=_a.isInitialLoading;var theme=useTheme$2();if(!items||items.length===0){return null;}return jsx$1(PagesList,__assign({"data-inline-page-list":true},{children:items.map(function(item){var isPublished=!item.hasHiddenAncestor&&(item.isCurrentPublishedVersion||!!item.publishedVersionId);return jsx$1(StyledPageItemTile,{item:item,baseRoute:baseRoute,filterBaseUrl:filterBaseUrl,styleDefinition:{backgroundColor:theme.palette.neutralLighter,bannerDefaultWidth:70,height:70,applyRoundedCorners:true,titleFontSize:fontSizeSmall,titleMargin:'0',contentPadding:spacingS-2+"px "+(spacingM-5)+"px"},additionalContent:jsx$1(StyledDocumentDownloadButton$2,{page:item},void 0),showBannerPlaceholder:true,isVisible:isPublished||isInitialLoading},item.id);})}),void 0);};var PagesList=_styled.div.withConfig({displayName:"InlinePageListViewer__PagesList",componentId:"sc-qn2xdx-0"})(templateObject_1$1j||(templateObject_1$1j=__makeTemplateObject(["\n a {\n &,\n :link,\n :visited {\n color: "," !important;\n text-decoration: none !important;\n }\n }\n\n > article:not(:first-child) {\n margin-top: ","px;\n }\n"],["\n a {\n &,\n :link,\n :visited {\n color: "," !important;\n text-decoration: none !important;\n }\n }\n\n > article:not(:first-child) {\n margin-top: ","px;\n }\n"])),function(p){return p.theme.textColors.default;},spacingS);var StyledPageItemTile=_styled(PageItemTile).withConfig({displayName:"InlinePageListViewer__StyledPageItemTile",componentId:"sc-qn2xdx-1"})(templateObject_2$M||(templateObject_2$M=__makeTemplateObject(["\n opacity: ",";\n"],["\n opacity: ",";\n"])),function(p){return p.isVisible?'1':'0.3';});var StyledDocumentDownloadButton$2=_styled(DocumentDownloadButton).withConfig({displayName:"InlinePageListViewer__StyledDocumentDownloadButton",componentId:"sc-qn2xdx-2"})(templateObject_3$x||(templateObject_3$x=__makeTemplateObject(["\n margin-left: auto;\n z-index: 1;\n\n > button {\n width: 22px;\n height: 22px;\n i {\n margin: 0;\n }\n }\n"],["\n margin-left: auto;\n z-index: 1;\n\n > button {\n width: 22px;\n height: 22px;\n i {\n margin: 0;\n }\n }\n"])));var templateObject_1$1j,templateObject_2$M,templateObject_3$x;var InlinePageListWithPaging=function InlinePageListWithPaging(_a){var pages=_a.pages,baseRoute=_a.baseRoute,_b=_a.pagingProps,getNextPage=_b.getNextPage,getFirstPage=_b.getFirstPage,getPrevPage=_b.getPrevPage,isFirstPage=_b.isFirstPage,isInitialLoading=_b.isInitialLoading,isLoadingNextPage=_b.isLoadingNextPage,hideNextButton=_b.hideNextButton,filterBaseUrl=_a.filterBaseUrl;return jsxs(Fragment,{children:[jsx$1(InlinePageListViewer,{items:pages,baseRoute:baseRoute,filterBaseUrl:filterBaseUrl,isInitialLoading:isInitialLoading},void 0),jsx$1(HorizontalPager,{onNextClick:getNextPage,onPrevClick:getPrevPage,onFirstClick:getFirstPage,hidePrevButton:isFirstPage||isInitialLoading,hideNextButton:hideNextButton,isLoadingNextPage:isLoadingNextPage},void 0)]},void 0);};function useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType){var searchPublishedPages=usePagesApi().searchPublishedPages;return function(pageSize,token){return searchPublishedPages({keywords:keywords,token:token,pageSize:pageSize,pageType:showPagesAndDocuments?undefined:pageType});};}var InlinePageListSkeleton=function InlinePageListSkeleton(_a){var isDataLoaded=_a.isDataLoaded,_b=_a.pageSize,pageSize=_b===void 0?5:_b,children=_a.children;var items=Array.from(Array(pageSize).keys());var uniqueId=createId();var palette=useContext(ThemeContext$1).theme.palette;return jsx$1(Shimmer,__assign({isDataLoaded:isDataLoaded,shimmerColors:{shimmer:palette.neutralTertiaryAlt,shimmerWave:palette.neutralTertiary},customElementsGroup:jsx$1(Fragment,{children:items.map(function(i){return jsx$1(PageItemShimmer,{},uniqueId+"-"+i);})},void 0)},{children:children}),void 0);};var PageItemShimmer=function PageItemShimmer(){var palette=useContext(ThemeContext$1).theme.palette;return jsxs(Host$u,{children:[jsxs(Inner$2$1,{children:[jsx$1(ShimmerElementsGroup,{styles:{root:{backgroundColor:palette.accent,borderRadius:5}},width:'70px',shimmerElements:[{type:ShimmerElementType.line,height:70,width:70}]},void 0),jsx$1(ShimmerElementsGroup,{backgroundColor:palette.neutralLighter,width:"calc(100% - 70px)",flexWrap:true,shimmerElements:[{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(20% - "+spacingM+"px)",height:spacingS},{type:ShimmerElementType.gap,width:'80%',height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(100% - "+2*spacingM+"px",height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS},{type:ShimmerElementType.gap,width:spacingM+"px",height:spacingS},{type:ShimmerElementType.line,width:"calc(40% - "+spacingM+"px)",height:spacingS},{type:ShimmerElementType.gap,width:'60%',height:spacingS},{type:ShimmerElementType.gap,width:'100%',height:spacingS}]},void 0)]},void 0),jsx$1(ShimmerElementsGroup,{shimmerElements:[{type:ShimmerElementType.gap,width:'100%',height:spacingS}]},void 0)]},void 0);};var Host$u=_styled.div.withConfig({displayName:"InlinePageListSkeleton__Host",componentId:"sc-13wpgyn-0"})(templateObject_1$1i||(templateObject_1$1i=__makeTemplateObject([""],[""])));var Inner$2$1=_styled.div.withConfig({displayName:"InlinePageListSkeleton__Inner",componentId:"sc-13wpgyn-1"})(templateObject_2$L||(templateObject_2$L=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var templateObject_1$1i,templateObject_2$L;var InlinePageListByKeywords=function InlinePageListByKeywords(_a){var keywords=_a.keywords,showDocuments=_a.showDocuments,showPages=_a.showPages;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var showPagesAndDocuments=showPages&&showDocuments;var pageType=showPages?PageType.Page:PageType.Document;var defaultPageSize=10;var _b=useItemLoaderWithPreFetch(defaultPageSize,useLoadPublishedItemsByKeywords(keywords,showPagesAndDocuments,pageType),[keywords]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsx$1(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:pagingProps.isLastPage}),baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0)}),void 0);};function useLoadPublishedItemsByPageId(pageId,showPagesAndDocuments,pageType){var getSubpages=usePagesApi().getSubpages;try{return function(pageSize,token){return getSubpages(pageId,{pageType:showPagesAndDocuments?undefined:pageType,token:token,pageSize:pageSize});};}catch(error){logger.error(error);return null;}}var defaultPageSize$1=10;var InlinePageListByPageId=function InlinePageListByPageId(_a){var pageId=_a.pageId,showPages=_a.showPages,showDocuments=_a.showDocuments;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var showSubpagesAndDocuments=showPages&&showDocuments;var pageType=showPages?PageType.Page:PageType.Document;var _b=useItemLoaderWithPreFetch(defaultPageSize$1,useLoadPublishedItemsByPageId(pageId,showSubpagesAndDocuments,pageType),[pageId]),items=_b.items,pagingProps=__rest(_b,["items"]);return jsx$1(InlinePageListSkeleton,__assign({isDataLoaded:!pagingProps.isInitialLoading},{children:jsx$1(InlinePageListWithPaging,{pages:items,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:pagingProps.isLastPage}),baseRoute:buildPath('pages'),filterBaseUrl:buildPath('/pages/search')},void 0)}),void 0);};function useItemLoaderByCurrentPage(currentPageId,pageSize,navigationContext,settings,getAllItemsHandler,deps){var _a=useState$2(getAllItems()),allItems=_a[0],setAllItems=_a[1];var allItemIdsString=allItems===null||allItems===void 0?void 0:allItems.map(function(i){return i.id;}).join(',');var _b=useItemLoaderWithPreFetch(pageSize,loadNextItems,[allItemIdsString]),items=_b.items,pagingProps=__rest(_b,["items"]);useEffect$1(function(){setAllItems(getAllItems());},__spreadArray([],deps||[]));var skeletonItems=getNextItems();var pageItems=pagingProps.isInitialLoading?skeletonItems:items;var hideNextButton=pagingProps.isInitialLoading?allItems.length<=pageSize:pagingProps.isLastPage;return {pageItems:pageItems,pagingProps:__assign(__assign({},pagingProps),{hideNextButton:hideNextButton})};function getAllItems(){var _a;var children=(_a=navigationContext===null||navigationContext===void 0?void 0:navigationContext.children)!==null&&_a!==void 0?_a:[];if(settings.showPages&&settings.showDocuments){return children;}var filteredChildren=children.filter(function(c){return c.pageType===(settings.showPages?PageType.Page:PageType.Document);});return filteredChildren;}function getNextItems(startIndex,paginationToken){if(startIndex===void 0){startIndex=0;}if(paginationToken===void 0){paginationToken=pageSize;}return allItems.slice(startIndex,paginationToken);}function loadNextItems(pageSize,paginationToken){return __awaiter(this,void 0,void 0,function(){var showSubpagesAndDocuments,pageType,result_1,fullAllItems,token,newPaginationToken;return __generator(this,function(_a){switch(_a.label){case 0:if(!!paginationToken)return [3/*break*/,2];showSubpagesAndDocuments=settings.showPages&&settings.showDocuments;pageType=settings.showPages?PageType.Page:PageType.Document;return [4/*yield*/,getAllItemsHandler(currentPageId,showSubpagesAndDocuments?undefined:pageType)];case 1:result_1=_a.sent();fullAllItems=allItems.map(function(i){return result_1.find(function(r){return r.id===i.id;});});setAllItems(fullAllItems);return [2/*return*/,{items:fullAllItems.slice(0,pageSize),paginationToken:pageSize,nextItem:fullAllItems[pageSize]}];case 2:token=parseInt(paginationToken);newPaginationToken=token+pageSize;return [2/*return*/,{items:getNextItems(token,newPaginationToken),paginationToken:newPaginationToken,nextItem:allItems[newPaginationToken]}];}});});}}var defaultPageSize=10;// the inline page list should be auto-added on a page with no content
|
|
126318
126316
|
// by default pages and documents should be shown
|
|
126319
126317
|
// for this case the blockProps would be an empty object and
|
|
@@ -126327,19 +126325,19 @@ var delayedFetchPollResult=useDebouncedCallback(fetchPollResults,500)[0];if(isLo
|
|
|
126327
126325
|
if((error_2===null||error_2===void 0?void 0:error_2.response.statusCode)!==404){throw error_2;}feedback={records:[]};return [3/*break*/,3];case 3:return [2/*return*/,createUsersAnswersFromFeedback(feedback)];}});});}function createUsersAnswersFromFeedback(feedback){var pollFeedback=feedback.records.find(function(r){return r.type==='poll';});var answers=pollFeedback?pollFeedback.answers:[];return questionDefinitions.map(function(q){return {questionId:q.questionId,choiceIds:answers.filter(function(a){return a.questionId===q.questionId;}).map(function(a){return a.choiceIds;})[0]||[]};}).concat(getAdditionalUserAnswers?getAdditionalUserAnswers(feedback.records)||[]:[]);}function getQuestionResult(questionId){var userSelectedChoices=userAnswers.filter(function(a){return a.questionId===questionId;}).map(function(a){return a.choiceIds;})[0]||[];return {showResults:showResult||unsavedQuestionsIds.every(function(id){return id!==questionId;})&&userSelectedChoices.length>0,userSelectedChoices:userSelectedChoices,totalFeedbackCount:pollResult.totalFeedbackCount,choiceResults:pollResult.answers.filter(function(a){return a.questionId===questionId;}).reduce(function(result,answer){return __spreadArray(__spreadArray([],result),answer.choices);},[]).reduce(function(result,next){var _a;return __assign(__assign({},result),(_a={},_a[next.choiceId]=next.count,_a));},{})};}};var DetailViewSectionPadding=css$2(templateObject_1$1a||(templateObject_1$1a=__makeTemplateObject(["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"],["\n padding: ","px ","px 0 ","px;\n\n @media (min-width: ","px) {\n padding: 0 ","px 0 ","px;\n }\n"])),spacingXs,spacingM,spacingM,minScreenSize.small,spacingXl,spacingXl);var templateObject_1$1a;var PollResultFeedbackCount=function PollResultFeedbackCount(){var _a=useContext(PollUserContext),showResult=_a.showResult,pollResult=_a.pollResult;if(!showResult){return null;}return jsx$1("div",__assign({className:"ms-fontColor-neutralTertiary","data-poll-result-total-count":pollResult.totalFeedbackCount},{children:jsx$1(FormattedMessage$1,{id:"Polls.editor.totalFeedbackCount",values:{count:pollResult.totalFeedbackCount},tagName:"span"},void 0)}),void 0);};var DetailViewPoll=function DetailViewPoll(){var _a=useDetailViewContext(),item=_a.item,contentLanguage=_a.contentLanguage,resourceType=_a.resourceType,isReadOnly=_a.isReadOnly;var features=useFeatures();var getPollResult=useFeedbackApi().getPollResult;if(!features.polls||item==null||item.poll==null||item.poll.questions==null||item.poll.questions.length===0){return null;}return jsx$1(PollUserContextProvider,__assign({item:item,resourceType:resourceType,language:contentLanguage,getPollResults:function(itemId){return getPollResult(resourceType,itemId);}},{children:jsxs(StyledPollDisplay$1,{children:[jsx$1(PollResultFeedbackCount,{},void 0),jsx$1(DetailViewPollsSubmitButton,{isReadOnly:isReadOnly},void 0),jsx$1(StyledPollResultExport,{},void 0)]},void 0)}),void 0);};var StyledPollResultExport=_styled(DetailViewPollExportButton).withConfig({displayName:"DetailViewPoll__StyledPollResultExport",componentId:"sc-gvqgh8-0"})(templateObject_1$19||(templateObject_1$19=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var StyledPollDisplay$1=_styled(PollDisplay).withConfig({displayName:"DetailViewPoll__StyledPollDisplay",componentId:"sc-gvqgh8-1"})(templateObject_2$I||(templateObject_2$I=__makeTemplateObject(["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"],["\n ",";\n margin-bottom: ","px;\n\n max-width: 500px;\n"])),DetailViewSectionPadding,spacingL);var templateObject_1$19,templateObject_2$I;var EventDetailViewResponseExportButton=function EventDetailViewResponseExportButton(_a){var className=_a.className;var features=useFeatures();if(!features.events){return null;}return jsx$1(DetailViewCsvExportButton,{className:className,path:"feedback/registration/result/export",stringResource:"Events.registration.exportResultsAsCsv"},void 0);};var FeedbackItemType;(function(FeedbackItemType){FeedbackItemType["comment"]="comment";FeedbackItemType["like"]="like";FeedbackItemType["confirm"]="confirm";FeedbackItemType["poll"]="poll";FeedbackItemType["eventRegistration"]="eventRegistration";})(FeedbackItemType||(FeedbackItemType={}));var EventRegistrationContextProvider=function EventRegistrationContextProvider(_a){var _b;var onBehalfOfUpn=_a.onBehalfOfUpn,children=_a.children;var formatMessage=useIntl().formatMessage;var features=useFeatures();var _c=useDetailViewContext(),item=_c.item,contentLanguage=_c.contentLanguage;var getEventRegistrationResults=useEventRegistrationApi().getEventRegistrationResults;if(!features.events||item==null){return null;}var locationQuestionId=getLocationQuestionId(item);var isCancelled=(_b=item.cancelInformation)===null||_b===void 0?void 0:_b.isCancelled;return jsx$1(PollUserContextProvider,__assign({item:item,onBehalfOfUpn:onBehalfOfUpn,resourceType:ItemResourceTypes.Events,language:contentLanguage,getAdditionalQuestions:function(result){return getAdditionalQuestions(result);},getAdditionalUserAnswers:extractLocationAnswers,getPollResults:getRegistrationResult,showResult:!!isCancelled},{children:children}),void 0);function getAdditionalQuestions(result){var _a=getLocationPollDefinitions(item,formatMessage,result,!!onBehalfOfUpn),question=_a.question,translations=_a.translations;return {questions:question?[question]:null,translations:translations};}function extractLocationAnswers(records){if(!item.locations||item.locations.length<2){return null;}var eventResponse=records.find(function(r){return r.type===FeedbackItemType.eventRegistration;});return [{questionId:locationQuestionId,choiceIds:eventResponse&&eventResponse.locationId?[eventResponse.locationId]:[]}];}function getRegistrationResult(itemId){return __awaiter(this,void 0,void 0,function(){var result;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getEventRegistrationResults(itemId)];case 1:result=_a.sent();return [2/*return*/,{totalFeedbackCount:result.totalFeedbackCount,answers:result.answers.concat([{questionId:locationQuestionId,choices:result.locationAnswers.map(function(l){return {choiceId:l.locationId,count:l.count};})}])}];}});});}};var EventDetailViewUserRegistration=function EventDetailViewUserRegistration(_a){var className=_a.className,hideInfoMessage=_a.hideInfoMessage;var pollUserContext=useContext(PollUserContext);var getFeedback=useFeedbackApi().getFeedback;var item=pollUserContext.item;var isLoadingPollResult=pollUserContext.isLoadingPollResult,pollResult=pollUserContext.pollResult,onBehalfOfUpn=pollUserContext.onBehalfOfUpn;var _b=usePromise$2(getEventResponse,item.userResponse,[item]),eventResponse=_b[0],isLoading=_b[1],setEventResponse=_b[3];// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126328
126326
|
var seatsResult=useMemo(getSeatsLeft,[isLoading,isLoadingPollResult,pollResult,item.id]);return jsx$1(EventUserRegistrationContext.Provider,__assign({value:__assign(__assign({},pollUserContext),{hasPollContext:true,eventResponse:eventResponse,setEventResponse:setEventResponse,isLoading:isLoadingPollResult||isLoading,seatsInfo:seatsResult})},{children:jsx$1(EventUserRegistration,{className:className,hideInfoMessage:hideInfoMessage},void 0)}),void 0);function getEventResponse(){return __awaiter(this,void 0,void 0,function(){var feedback,eventRecord;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,getFeedback(ItemResourceTypes.Events,item.id,onBehalfOfUpn)];case 1:feedback=_a.sent();eventRecord=feedback&&feedback.records.find(function(r){return r.type==='eventRegistration';});return [2/*return*/,eventRecord?eventRecord.eventResponse:EventResponse.NotSet];}});});}function getSeatsLeft(){var _a,_b,_c,_d;if(isLoading||!item.registrationSettings||!item.registrationSettings.enabled||((_a=item.cancelInformation)===null||_a===void 0?void 0:_a.isCancelled)||!((_b=pollResult===null||pollResult===void 0?void 0:pollResult.answers)===null||_b===void 0?void 0:_b.length)||isLoadingPollResult){return {hasAnySeatsLeft:true};}var locationsWithSeats=item.locations.filter(function(l){return l.maxNumberOfSeats>0;});var hasLocationsWithoutSeats=locationsWithSeats.length!==item.locations.length;if(!locationsWithSeats.length||hasLocationsWithoutSeats){return {hasAnySeatsLeft:true};}var locationAnswers=(_d=(_c=pollResult.answers.find(function(a){return a.questionId===getLocationQuestionId(item);}))===null||_c===void 0?void 0:_c.choices)===null||_d===void 0?void 0:_d.reduce(function(prev,curr){prev[curr.choiceId]=curr.count;return prev;},{});var locationsWithSeatsLeft=locationsWithSeats.map(function(l){return __assign(__assign({},l),{seatsLeft:Math.max(l.maxNumberOfSeats-(locationAnswers[l.locationId]||0),0)});});return {hasAnySeatsLeft:locationsWithSeatsLeft.some(function(l){return l.seatsLeft>0;}),locations:locationsWithSeatsLeft};}};var EventRegistrationRegisterSomeoneElseDialog=function EventRegistrationRegisterSomeoneElseDialog(_a){var show=_a.show,onDismiss=_a.onDismiss,onUpdate=_a.onUpdate;var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var features=useFeatures();var _b=useState$2(),onBehalfOfUser=_b[0],setOnBehalfOfUser=_b[1];var item=useDetailViewContext().item;var isGroupAdmin=hasMinRoleInAllGroups(GroupRoles.Admin,user,item);useListener(EventResponseTriggerAction.type,function(action){if(action.itemId!==item.id){return false;}onUpdate({upn:onBehalfOfUser.userPrincipalName,displayName:onBehalfOfUser.displayName,locationId:action.locationId},action.response);onDismiss();return true;},[item.id,onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.userPrincipalName]);return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:true,className:'dialog-register-user'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.registerSomeoneElse.title'})},onDismiss:onDismiss},{children:jsxs(Host$r,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$2,{},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.peoplePickerLabel"},void 0),jsx$1(StyledPeoplePicker,{accountType:AccountType.User,allowMailItems:isGroupAdmin&&features.userInvitation,localOnly:!isGroupAdmin,includePendingInvitationUsers:true,includePendingRegistrationUsers:true,selectionMode:SelectionMode.single,selectedItems:onBehalfOfUser?[onBehalfOfUser]:[],onChange:function(accounts){return setOnBehalfOfUser(accounts[0]);},placeholderStringResourceKey:"Events.registration.registerSomeoneElse.peoplePickerPlaceholder",excludedItems:[user]},void 0),onBehalfOfUser&&jsxs(EventRegistrationContextProvider,__assign({onBehalfOfUpn:onBehalfOfUser.userPrincipalName},{children:[jsxs(DialogMainContent,__assign({isScrollable:!env.isAnyMobileApp},{children:[!(onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.id)&&jsx$1(InvitationInfoMessage,{subscriptionName:getSubscriptionName(user.subscription)},void 0),jsx$1(StyledPollDisplay,{},void 0)]}),void 0),jsx$1(DialogFooter,{children:jsxs(Buttons,{children:[jsx$1(CancelButton,{onClick:onDismiss},void 0),jsx$1(EventDetailViewUserRegistration,{hideInfoMessage:true},void 0)]},void 0)},void 0)]}),onBehalfOfUser.userPrincipalName)]}),void 0)}),void 0);};var Host$r=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Host",componentId:"sc-1rziepe-0"})(templateObject_1$18||(templateObject_1$18=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n\n @media (min-width: ","px) {\n width: 400px;\n }\n\n .ms-Dialog-action {\n display: block;\n margin: 0;\n }\n"])),minScreenSize.small);var Buttons=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__Buttons",componentId:"sc-1rziepe-1"})(templateObject_2$H||(templateObject_2$H=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"],["\n display: flex;\n justify-content: space-between;\n align-items: flex-end;\n margin-right: 4px; /* buttons alignment on the right */\n"])));var StyledPeoplePicker=_styled(PeoplePicker).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPeoplePicker",componentId:"sc-1rziepe-2"})(templateObject_3$u||(templateObject_3$u=__makeTemplateObject(["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"],["\n margin: ","px 0 ","px 0;\n\n .ms-BasePicker-text {\n padding: 0 !important;\n }\n"])),spacingS,spacingM);var DialogMainContent=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__DialogMainContent",componentId:"sc-1rziepe-3"})(templateObject_5$j||(templateObject_5$j=__makeTemplateObject(["\n ","\n margin-bottom: auto;\n"],["\n ","\n margin-bottom: auto;\n"])),function(p){return p.isScrollable&&css$2(templateObject_4$k||(templateObject_4$k=__makeTemplateObject(["\n max-height: 300px;\n overflow: auto;\n "],["\n max-height: 300px;\n overflow: auto;\n "])));});var StyledPollDisplay=_styled(PollDisplay).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledPollDisplay",componentId:"sc-1rziepe-4"})(templateObject_6$b||(templateObject_6$b=__makeTemplateObject(["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"],["\n max-width: calc(100% - 10px);\n padding-left: 4px; // needed for the focus indicator\n"])));var CancelButton=function CancelButton(_a){var onClick=_a.onClick;return jsx$1(StyledCancelButton,__assign({onClick:onClick},{children:jsx$1(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0);};var InvitationInfoMessage=function InvitationInfoMessage(_a){var subscriptionName=_a.subscriptionName;return jsxs(InfoMessageHost,{children:[jsx$1(InfoIcon,{iconName:"info"},void 0),jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.userWillBeInvited",values:{subscriptionName:subscriptionName}},void 0)]},void 0);};var InfoMessageHost=_styled.div.withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoMessageHost",componentId:"sc-1rziepe-5"})(templateObject_7$8||(templateObject_7$8=__makeTemplateObject(["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n padding-bottom: ","px;\n"])),spacingM);var InfoIcon=_styled(Icon).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__InfoIcon",componentId:"sc-1rziepe-6"})(templateObject_8$7||(templateObject_8$7=__makeTemplateObject(["\n padding-right: ","px;\n"],["\n padding-right: ","px;\n"])),spacingS);var StyledCancelButton=_styled(DefaultButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseDialog__StyledCancelButton",componentId:"sc-1rziepe-7"})(templateObject_9$5||(templateObject_9$5=__makeTemplateObject(["\n && {\n margin-right: ","px;\n }\n"],["\n && {\n margin-right: ","px;\n }\n"])),spacingM);var DialogGlobalStyle$2=createGlobalStyle(templateObject_10$4||(templateObject_10$4=__makeTemplateObject(["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"],["\n .dialog-register-user {\n .ms-Overlay {\n background-color: transparent !important;\n }\n\n .ms-Dialog-main {\n box-shadow: none !important;\n\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n min-height: 466px;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$18,templateObject_2$H,templateObject_3$u,templateObject_4$k,templateObject_5$j,templateObject_6$b,templateObject_7$8,templateObject_8$7,templateObject_9$5,templateObject_10$4;var EventRegistrationRegisterSomeoneElseButton=function EventRegistrationRegisterSomeoneElseButton(_a){var item=_a.item,onRegister=_a.onRegister,onDeregister=_a.onDeregister;var user=useCurrentUser();var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs(Fragment,{children:[jsx$1(StyledButton$1,__assign({iconProps:{iconName:'AddFriend'},onClick:function(){return setShowDialog(true);}},{children:jsx$1(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.title"},void 0)}),void 0),showDialog&&jsx$1(EventRegistrationRegisterSomeoneElseDialog,{onDismiss:handleDismiss,onUpdate:handleUpdate,show:showDialog},void 0)]},void 0);function handleDismiss(){setShowDialog(false);}function handleUpdate(participant,response){if(response===EventResponse.Registered){onRegister===null||onRegister===void 0?void 0:onRegister(participant);}else {onDeregister===null||onDeregister===void 0?void 0:onDeregister(participant);}}};var StyledButton$1=_styled(ActionButton).withConfig({displayName:"EventRegistrationRegisterSomeoneElseButton__StyledButton",componentId:"sc-mgwolr-0"})(templateObject_1$17||(templateObject_1$17=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n margin-bottom: ","px;\n border: 0;\n }\n"])),spacingS);var templateObject_1$17;var EventRegistrationDeregisterPersonButton=function EventRegistrationDeregisterPersonButton(_a){var item=_a.item,participant=_a.participant,onDeregistered=_a.onDeregistered;var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var setEventRegistration=useEventRegistrationApi().setEventRegistration;var showToast=useNotificationContext().showToast;var formatMessage=useIntl().formatMessage;var _b=useState$2(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxs("div",{children:[jsx$1(Tooltip,__assign({resourceKey:"Events.registration.deRegisterSomeoneElse.title",values:{name:participant.displayName}},{children:jsx$1(IconButton,{iconProps:{iconName:'Delete'},onClick:function(){return setShowDialog(true);},ariaLabel:formatMessage({id:'Events.registration.deRegisterSomeoneElse.title'},{name:participant.displayName})},void 0)}),void 0),showDialog&&jsx$1(ConfirmDialog,{showDialog:showDialog,titleResourceKey:"Events.registration.deRegisterSomeoneElse.confirmTitle",titleResourceValues:{name:participant.displayName},onConfirm:deRegister,onClose:function(){return setShowDialog(false);}},void 0)]},void 0);function deRegister(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:onDeregistered();return [4/*yield*/,setEventRegistration(item.id,EventResponse.NotSet,null,null,participant.upn)];case 1:_a.sent();refreshUserDetails();showToast('Events.registration.onBehalfOfDeregistrationSuccess',{mail:participant.displayName});return [2/*return*/];}});});}};var EventRegistrationParticipantsDialog=function EventRegistrationParticipantsDialog(_a){var numberOfParticipants=_a.numberOfParticipants,show=_a.show,onDismiss=_a.onDismiss;var formatMessage=useIntl().formatMessage;return jsx$1(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:false,className:'dialog-event-participants'},dialogContentProps:{type:DialogType.close,title:formatMessage({id:'Events.registration.participants'},{count:numberOfParticipants})},onDismiss:onDismiss},{children:jsxs(Host$q,__assign({className:"dialog-content-host"},{children:[jsx$1(DialogGlobalStyle$1,{},void 0),jsx$1(ParticipantsList,{},void 0)]}),void 0)}),void 0);};var Host$q=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__Host",componentId:"sc-1biaauh-0"})(templateObject_1$16||(templateObject_1$16=__makeTemplateObject(["\n @media (min-width: ","px) {\n width: 400px;\n }\n"],["\n @media (min-width: ","px) {\n width: 400px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle$1=createGlobalStyle(templateObject_2$G||(templateObject_2$G=__makeTemplateObject(["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"],["\n .dialog-event-participants {\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .dialog-content-host {\n height: 466px;\n }\n}\n"])),maxScreenSize.small);var ParticipantsList=function ParticipantsList(){var formatMessage=useIntl().formatMessage;var user=useCurrentUser();var getParticipants=useEventRegistrationApi().getParticipants;var textColors=useContext(ThemeContext$1).theme.textColors;var _a=useContext(PollUserContext),fetchPollResults=_a.fetchPollResults,publishableItem=_a.item;var item=publishableItem;var _b=usePromise$2(getSortedParticipants,[],[item.id]),unfilteredParticipants=_b[0],isLoading=_b[1],setParticipants=_b[3];var handleSearchDebounced=useDebouncedCallback(handleSearch,300)[0];var _c=useState$2(),filteredParticipants=_c[0],setFilteredParticipants=_c[1];var participants=filteredParticipants||unfilteredParticipants;return jsxs(ListHost,{children:[jsx$1(EventRegistrationRegisterSomeoneElseButton,{item:item,onDeregister:handleDeregister,onRegister:handleRegister},void 0),jsx$1(SearchArea,{children:jsx$1(StyledSearchBox$1,{placeholder:formatMessage({id:'Events.registration.participants.search.placeholder'}),disabled:isLoading,onChange:function(_,value){return handleSearchDebounced(unfilteredParticipants,value);},iconProps:{style:{color:textColors.default}}},void 0)},void 0),isLoading&&jsx$1(Spinner,{},void 0),jsx$1(ListContainer,__assign({isScrollable:!env.isAnyMobileApp},{children:participants.map(function(p){var showDeregisterButton=p.upn!==user.userPrincipalName;return jsxs(ListRow,{children:[jsx$1(PersonaCardWrapper,__assign({showDeregisterButton:showDeregisterButton},{children:jsx$1(StyledPersonaCard,__assign({upn:p.upn},{children:jsx$1(StyledAvatar,{upn:p.upn,text:p.displayName,secondaryText:p.location&&formatMessage({id:'Events.registration.participants.location'},{location:p.location})},void 0)}),void 0)}),void 0),showDeregisterButton&&jsx$1(EventRegistrationDeregisterPersonButton,{item:item,participant:p,onDeregistered:function(){return handleDeregister(p);}},void 0)]},p.upn);})}),void 0),!isLoading&&!participants.length&&jsx$1(FormattedMessage$1,{id:"Generic.noResultsFound"},void 0)]},void 0);function getSortedParticipants(){return __awaiter(this,void 0,void 0,function(){var numberOfLocations,locationsMap,participants;return __generator(this,function(_a){switch(_a.label){case 0:numberOfLocations=item===null||item===void 0?void 0:item.locations.length;locationsMap=getLocations();return [4/*yield*/,getParticipants(item.id)];case 1:participants=_a.sent()||[];return [2/*return*/,participants.map(function(p){return __assign(__assign({},p),{location:numberOfLocations>1?locationsMap[p.locationId]||'':''});}).sort(function(a,b){var locationCompare=(locationsMap[a.locationId]||'').localeCompare(locationsMap[b.locationId]||'');if(locationCompare!==0){return locationCompare;}return a.displayName.localeCompare(b.displayName);})];}});});}function getLocations(){var _a;return ((_a=item.locations)===null||_a===void 0?void 0:_a.reduce(function(prev,curr){prev[curr.locationId]=curr.name;return prev;},{}))||{};}function handleSearch(unfilteredParticipants,searchValue){if(!searchValue){setFilteredParticipants(null);return;}var filter=new RegExp(searchValue,'i');setFilteredParticipants(unfilteredParticipants.filter(function(p){return (p.displayName+"|"+p.upn+"|"+p.location).search(filter)>-1;}));}function handleDeregister(participant){setParticipants(function(ps){return ps.filter(function(p){return p.upn!==participant.upn;});});fetchPollResults();setFilteredParticipants(null);}function handleRegister(participant){setParticipants(function(ps){return ps.concat([__assign(__assign({},participant),{location:getLocations()[participant.locationId]||''})]);});fetchPollResults();setFilteredParticipants(null);}};var ListContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListContainer",componentId:"sc-1biaauh-1"})(templateObject_4$j||(templateObject_4$j=__makeTemplateObject(["\n padding: 4px;\n\n ","\n"],["\n padding: 4px;\n\n ","\n"])),function(p){return p.isScrollable&&css$2(templateObject_3$t||(templateObject_3$t=__makeTemplateObject(["\n max-height: 382px;\n overflow: auto;\n "],["\n max-height: 382px;\n overflow: auto;\n "])));});var SearchArea=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__SearchArea",componentId:"sc-1biaauh-2"})(templateObject_5$i||(templateObject_5$i=__makeTemplateObject(["\n margin-bottom: ","px;\n display: flex;\n"],["\n margin-bottom: ","px;\n display: flex;\n"])),spacingM);var StyledSearchBox$1=_styled(SearchBox$1).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledSearchBox",componentId:"sc-1biaauh-3"})(templateObject_6$a||(templateObject_6$a=__makeTemplateObject(["\n flex-grow: 1;\n"],["\n flex-grow: 1;\n"])));var ListRow=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListRow",componentId:"sc-1biaauh-4"})(templateObject_7$7||(templateObject_7$7=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"],["\n display: flex;\n align-items: center;\n margin-bottom: ","px;\n"])),spacingS);var PersonaCardWrapper=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__PersonaCardWrapper",componentId:"sc-1biaauh-5"})(templateObject_8$6||(templateObject_8$6=__makeTemplateObject(["\n width: calc(100% - ","px);\n"],["\n width: calc(100% - ","px);\n"])),function(p){return p.showDeregisterButton?32:0;});var StyledPersonaCard=_styled(PersonaCard).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledPersonaCard",componentId:"sc-1biaauh-6"})(templateObject_9$4||(templateObject_9$4=__makeTemplateObject(["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"],["\n width: 100%;\n\n & > * {\n width: 100%;\n }\n"])));var StyledAvatar=_styled(Avatar).withConfig({displayName:"EventRegistrationParticipantsDialog__StyledAvatar",componentId:"sc-1biaauh-7"})(templateObject_10$3||(templateObject_10$3=__makeTemplateObject(["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"],["\n .ms-Persona-secondaryText {\n white-space: initial;\n }\n\n height: auto;\n\n > div:first-child {\n align-self: flex-start;\n }\n"])));var ListHost=_styled.div.withConfig({displayName:"EventRegistrationParticipantsDialog__ListHost",componentId:"sc-1biaauh-8"})(templateObject_11$2$1||(templateObject_11$2$1=__makeTemplateObject([""],[""])));var templateObject_1$16,templateObject_2$G,templateObject_3$t,templateObject_4$j,templateObject_5$i,templateObject_6$a,templateObject_7$7,templateObject_8$6,templateObject_9$4,templateObject_10$3,templateObject_11$2$1;var EventRegistrationParticipantsLink=function EventRegistrationParticipantsLink(){var _a;var user=useCurrentUser();var _b=useContext(PollUserContext),pollResult=_b.pollResult,publishableItem=_b.item;var item=publishableItem;var _c=useState$2(false),showParticipants=_c[0],setShowParticipants=_c[1];var palette=useContext(ThemeContext$1).theme.palette;if(user.isPublicUser||(pollResult===null||pollResult===void 0?void 0:pollResult.totalFeedbackCount)==null){return null;}var isUserAuthor=hasMinRoleInAllGroups(GroupRoles.Author,user,item);var canOpenParticipantsDialog=isUserAuthor||pollResult.totalFeedbackCount>0&&((_a=item.registrationSettings)===null||_a===void 0?void 0:_a.showParticipantsToEverybody);return jsxs("div",__assign({"data-poll-result-total-count":pollResult.totalFeedbackCount},{children:[!canOpenParticipantsDialog?jsx$1(NoParticipantsContainer,{children:jsx$1(FormattedMessage$1,{id:"Events.registration.participants.count",values:{count:pollResult.totalFeedbackCount}},void 0)},void 0):jsx$1(ParticipantsButton,__assign({onClick:function(){return setShowParticipants(true);},color:palette.accent},{children:jsx$1(FormattedMessage$1,{id:isUserAuthor?'Events.registration.participants.viewAndManage':'Events.registration.participants.count',values:{count:pollResult.totalFeedbackCount}},void 0)}),void 0),jsx$1(EventRegistrationParticipantsDialog,{numberOfParticipants:pollResult.totalFeedbackCount,show:showParticipants,onDismiss:function(){return setShowParticipants(false);}},void 0)]}),void 0);};var NoParticipantsContainer=_styled.div.withConfig({displayName:"EventRegistrationParticipantsLink__NoParticipantsContainer",componentId:"sc-44nkgi-0"})(templateObject_1$15||(templateObject_1$15=__makeTemplateObject(["\n color: ",";\n font-size: ","px;\n"],["\n color: ",";\n font-size: ","px;\n"])),function(p){return p.theme.palette.neutralTertiary;},fontSizeSmall);var ParticipantsButton=_styled(ActionButton).withConfig({displayName:"EventRegistrationParticipantsLink__ParticipantsButton",componentId:"sc-44nkgi-1"})(templateObject_2$F||(templateObject_2$F=__makeTemplateObject(["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"],["\n && {\n height: auto;\n padding: 0;\n font-size: ","px;\n }\n"])),fontSizeSmall);var templateObject_1$15,templateObject_2$F;var EventDetailViewRegistrationPoll=function EventDetailViewRegistrationPoll(){return jsx$1(EventRegistrationContextProvider,{children:jsxs(StyledPollDisplay$1,{children:[jsx$1(EventRegistrationParticipantsLink,{},void 0),jsx$1(StyledEventUserRegistration,{},void 0),jsx$1(StyledResponseExportButton,{},void 0)]},void 0)},void 0);};var StyledEventUserRegistration=_styled(EventDetailViewUserRegistration).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledEventUserRegistration",componentId:"sc-1kxjndz-0"})(templateObject_1$14||(templateObject_1$14=__makeTemplateObject(["\n && {\n margin-top: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n }\n"])),spacingS);var StyledResponseExportButton=_styled(EventDetailViewResponseExportButton).withConfig({displayName:"EventDetailViewRegistrationPoll__StyledResponseExportButton",componentId:"sc-1kxjndz-1"})(templateObject_2$E||(templateObject_2$E=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);var templateObject_1$14,templateObject_2$E;var EventDetailViewRegistration=function EventDetailViewRegistration(){var item=useDetailViewContext().item;var isRegistrationEnabled=item.registrationSettings&&item.registrationSettings.enabled;if(isRegistrationEnabled){return jsx$1(EventDetailViewRegistrationPoll,{},void 0);}return jsx$1(DetailViewPoll,{},void 0);};var classof$a=classofRaw$1;// `IsArray` abstract operation
|
|
126329
126327
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
126330
|
-
var isArray$
|
|
126328
|
+
var isArray$3=Array.isArray||function isArray(arg){return classof$a(arg)=='Array';};var $$2=_export;var isArray$2=isArray$3;var nativeReverse=[].reverse;var test=[1,2];// `Array.prototype.reverse` method
|
|
126331
126329
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
|
|
126332
126330
|
// fix for Safari 12.0 bug
|
|
126333
126331
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
126334
|
-
$$
|
|
126335
|
-
if(isArray(this))this.length=this.length;return nativeReverse.call(this);}});var CommentList=function CommentList(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,items=_a.items,groupIds=_a.groupIds,isLoading=_a.isLoading,onCommentDeleted=_a.onCommentDeleted,scope=_a.scope,mentionSearchHandler=_a.mentionSearchHandler,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,getHashtagFilterRoute=_a.getHashtagFilterRoute,onReply=_a.onReply,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var _b=useState$2(true),isDialogHidden=_b[0],setIsDialogHidden=_b[1];var commentRef=useRef$1(null);var deleteComment=useCommentApi().deleteComment;var showError=useNotificationContext().showError;return jsxs("div",__assign({className:classNames(className,'comment-list'),"data-list":"comments"},{children:[jsx$1(ConfirmDialog,{onClose:function(){return setIsDialogHidden(true);},onConfirm:handleDelete,showDialog:!isDialogHidden,titleResourceKey:"Comment.delete.title",infoResourceKey:"Comment.delete.description"},void 0),jsx$1(OpacityAnimation,__assign({leaveDuration:500},{children:items!=null&&items.map(function(comment){var _a;var showAutoTranslate=comment.sender.id!==user.id;return jsx$1(CommentDisplay,{readOnly:readOnly,scope:scope,message:comment,showDelete:canDelete(comment),showEdit:canEdit(comment),onDelete:showDialog,showAutoTranslate:showAutoTranslate,mentionSearchHandler:mentionSearchHandler,type:type,baseAttachmentPath:baseAttachmentPath,getHashtagFilterRoute:getHashtagFilterRoute,highlight:comment.isUnread,isInitialLiked:comment.isLiked,onReply:onReply,replyCount:comment.threadId==null?(_a=comment.statistics)===null||_a===void 0?void 0:_a.replyCount:null},comment.receivedDateTime+comment.sender.id);})}),void 0),items!=null&&items.length===0&&!isLoading&&jsx$1("p",__assign({className:"ms-font-m ms-fontColor-neutralSecondary"},{children:jsx$1(FormattedMessage$1,{id:noItemsYetStringResourceKey},void 0)}),void 0)]}),void 0);function handleDelete(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:if(commentRef.current==null){return [2/*return*/];}onCommentDeleted&&onCommentDeleted(commentRef.current);_b.label=1;case 1:_b.trys.push([1,3,,4]);return [4/*yield*/,deleteComment(type,commentRef.current.conversationScope,commentRef.current.parentItemId,commentRef.current.id)];case 2:_b.sent();return [3/*break*/,4];case 3:_b.sent();showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}function showDialog(comment){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){commentRef.current=comment;setIsDialogHidden(false);return [2/*return*/];});});}function canDelete(comment){return canEdit(comment)||hasMinRoleInAllGroups(GroupRoles.Admin,user,groupIds);}function canEdit(comment){return comment.sender&&comment.sender.id===user.id;}};var CreateCommentWithAttachments=function CreateCommentWithAttachments(props){var ignoreRef=useRef$1(false);useEffect$1(function(){return function(){ignoreRef.current=true;};},[]);var _a=useState$2(createId()),attachmentContainerId=_a[0],setAttachmentContainerId=_a[1];var _b=useAttachmentUploader([],attachmentContainerId,props.baseAttachmentPath),attachments=_b[0],handleAttachmentsAdded=_b[1],clearAttachments=_b[2],deletedAttachmentUrls=_b[3],onDeleteAttachment=_b[4];return jsx$1(CreateComment,__assign({},props,{onPost:handlePost,onAttachmentsChanged:handleAttachmentsAdded,attachments:attachments,deletedAttachmentUrls:deletedAttachmentUrls,onDeleteAttachment:onDeleteAttachment,allowAttachments:!!props.baseAttachmentPath,allowKeywords:props.allowKeywords,placeHolderStringResourceKey:props.placeHolderStringResourceKey,placeHolderStringResourceValues:props.placeHolderStringResourceValues}),void 0);function handlePost(message,keywords){return __awaiter(this,void 0,void 0,function(){var newAttachments;return __generator(this,function(_a){switch(_a.label){case 0:newAttachments=__spreadArray([],attachments);clearAttachments();return [4/*yield*/,props.onPost(message,attachmentContainerId,newAttachments,keywords)];case 1:_a.sent();if(!ignoreRef.current){setAttachmentContainerId(createId());}return [2/*return*/];}});});}};var SortOrder;(function(SortOrder){SortOrder[SortOrder["Asc"]=0]="Asc";SortOrder[SortOrder["Desc"]=1]="Desc";})(SortOrder||(SortOrder={}));var PagedCommentsSection=function PagedCommentsSection(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,itemId=_a.itemId,groupIds=_a.groupIds,readOnly=_a.readOnly,loadInReadOnlyMode=_a.loadInReadOnlyMode,scope=_a.scope,_b=_a.initialPageSize,initialPageSize=_b===void 0?2:_b,_c=_a.pageSize,pageSize=_c===void 0?5:_c,mentionSearchHandler=_a.mentionSearchHandler,initialComments=_a.initialComments,onCommentAdded=_a.onCommentAdded,onCommentDeleted=_a.onCommentDeleted,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,autoFocusReplyField=_a.autoFocusReplyField,getHashtagFilterRoute=_a.getHashtagFilterRoute,buttons=_a.buttons,threadId=_a.threadId,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,showReplyBox=_a.showReplyBox,title=_a.title,onThreadReply=_a.onThreadReply,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var createComment=useCommentApi().createComment;var user=useCurrentUser();var features=useFeatures();var history=useHistory();var location=useLocation$1();var formatMessage=useIntl().formatMessage;var showError=useNotificationContext().showError;var _d=useState$2((initialComments===null||initialComments===void 0?void 0:initialComments.items.length)===0||type!==ItemResourceTypes.Posts||showReplyBox),showNewComment=_d[0],setShowNewComment=_d[1];var _e=useState$2(),commentToReplyTo=_e[0],setCommentToReplyTo=_e[1];var _f=useState$2(autoFocusReplyField),autoFocusNewCommentInput=_f[0],setAutoFocusNewCommentInput=_f[1];var preventLoading=readOnly&&!loadInReadOnlyMode;var _g=usePageLoader(type,scope,itemId,pageSize,initialPageSize,initialComments,preventLoading,threadId),comments=_g[0],isLoading=_g[1],hasNextPage=_g[2],loadNextPage=_g[3],setComments=_g[4],hasMoreUnreadComments=_g[5];var commentIdsString=(comments!==null&&comments!==void 0?comments:[]).map(function(c){return c.id;}).join(',');useEffect$1(function(){var _a;if(commentIdsString.length>0&&((_a=location.state)===null||_a===void 0?void 0:_a.parentCommentId)){if(autoFocusNewCommentInput){return;}var commentContainer=document.getElementById(location.state.parentCommentId);commentContainer===null||commentContainer===void 0?void 0:commentContainer.scrollIntoView(true);history.replace(__assign(__assign({},location),{state:__assign(__assign({},location.state),{parentCommentId:null})}));}// comments changes implicitly 'validates' location state changes
|
|
126332
|
+
$$2({target:'Array',proto:true,forced:String(test)===String(test.reverse())},{reverse:function reverse(){// eslint-disable-next-line no-self-assign
|
|
126333
|
+
if(isArray$2(this))this.length=this.length;return nativeReverse.call(this);}});var CommentList=function CommentList(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,items=_a.items,groupIds=_a.groupIds,isLoading=_a.isLoading,onCommentDeleted=_a.onCommentDeleted,scope=_a.scope,mentionSearchHandler=_a.mentionSearchHandler,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,getHashtagFilterRoute=_a.getHashtagFilterRoute,onReply=_a.onReply,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUser();var _b=useState$2(true),isDialogHidden=_b[0],setIsDialogHidden=_b[1];var commentRef=useRef$1(null);var deleteComment=useCommentApi().deleteComment;var showError=useNotificationContext().showError;return jsxs("div",__assign({className:classNames(className,'comment-list'),"data-list":"comments"},{children:[jsx$1(ConfirmDialog,{onClose:function(){return setIsDialogHidden(true);},onConfirm:handleDelete,showDialog:!isDialogHidden,titleResourceKey:"Comment.delete.title",infoResourceKey:"Comment.delete.description"},void 0),jsx$1(OpacityAnimation,__assign({leaveDuration:500},{children:items!=null&&items.map(function(comment){var _a;var showAutoTranslate=comment.sender.id!==user.id;return jsx$1(CommentDisplay,{readOnly:readOnly,scope:scope,message:comment,showDelete:canDelete(comment),showEdit:canEdit(comment),onDelete:showDialog,showAutoTranslate:showAutoTranslate,mentionSearchHandler:mentionSearchHandler,type:type,baseAttachmentPath:baseAttachmentPath,getHashtagFilterRoute:getHashtagFilterRoute,highlight:comment.isUnread,isInitialLiked:comment.isLiked,onReply:onReply,replyCount:comment.threadId==null?(_a=comment.statistics)===null||_a===void 0?void 0:_a.replyCount:null},comment.receivedDateTime+comment.sender.id);})}),void 0),items!=null&&items.length===0&&!isLoading&&jsx$1("p",__assign({className:"ms-font-m ms-fontColor-neutralSecondary"},{children:jsx$1(FormattedMessage$1,{id:noItemsYetStringResourceKey},void 0)}),void 0)]}),void 0);function handleDelete(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_b){switch(_b.label){case 0:if(commentRef.current==null){return [2/*return*/];}onCommentDeleted&&onCommentDeleted(commentRef.current);_b.label=1;case 1:_b.trys.push([1,3,,4]);return [4/*yield*/,deleteComment(type,commentRef.current.conversationScope,commentRef.current.parentItemId,commentRef.current.id)];case 2:_b.sent();return [3/*break*/,4];case 3:_b.sent();showError('Generic.error');return [3/*break*/,4];case 4:return [2/*return*/];}});});}function showDialog(comment){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){commentRef.current=comment;setIsDialogHidden(false);return [2/*return*/];});});}function canDelete(comment){return canEdit(comment)||hasMinRoleInAllGroups(GroupRoles.Admin,user,groupIds);}function canEdit(comment){return comment.sender&&comment.sender.id===user.id;}};var CreateCommentWithAttachments=function CreateCommentWithAttachments(props){var ignoreRef=useRef$1(false);useEffect$1(function(){return function(){ignoreRef.current=true;};},[]);var _a=useState$2(createId()),attachmentContainerId=_a[0],setAttachmentContainerId=_a[1];var _b=useAttachmentUploader([],attachmentContainerId,props.baseAttachmentPath),attachments=_b[0],handleAttachmentsAdded=_b[1],clearAttachments=_b[2],deletedAttachmentUrls=_b[3],onDeleteAttachment=_b[4];return jsx$1(CreateComment,__assign({},props,{onPost:handlePost,onAttachmentsChanged:handleAttachmentsAdded,attachments:attachments,deletedAttachmentUrls:deletedAttachmentUrls,onDeleteAttachment:onDeleteAttachment,allowAttachments:!!props.baseAttachmentPath,allowKeywords:props.allowKeywords,placeHolderStringResourceKey:props.placeHolderStringResourceKey,placeHolderStringResourceValues:props.placeHolderStringResourceValues}),void 0);function handlePost(message,keywords){return __awaiter(this,void 0,void 0,function(){var newAttachments;return __generator(this,function(_a){switch(_a.label){case 0:newAttachments=__spreadArray([],attachments);clearAttachments();return [4/*yield*/,props.onPost(message,attachmentContainerId,newAttachments,keywords)];case 1:_a.sent();if(!ignoreRef.current){setAttachmentContainerId(createId());}return [2/*return*/];}});});}};var SortOrder;(function(SortOrder){SortOrder[SortOrder["Asc"]=0]="Asc";SortOrder[SortOrder["Desc"]=1]="Desc";})(SortOrder||(SortOrder={}));var PagedCommentsSection=function PagedCommentsSection(_a){var type=_a.type,baseAttachmentPath=_a.baseAttachmentPath,itemId=_a.itemId,groupIds=_a.groupIds,readOnly=_a.readOnly,loadInReadOnlyMode=_a.loadInReadOnlyMode,scope=_a.scope,_b=_a.initialPageSize,initialPageSize=_b===void 0?2:_b,_c=_a.pageSize,pageSize=_c===void 0?5:_c,mentionSearchHandler=_a.mentionSearchHandler,initialComments=_a.initialComments,onCommentAdded=_a.onCommentAdded,onCommentDeleted=_a.onCommentDeleted,noItemsYetStringResourceKey=_a.noItemsYetStringResourceKey,autoFocusReplyField=_a.autoFocusReplyField,getHashtagFilterRoute=_a.getHashtagFilterRoute,buttons=_a.buttons,threadId=_a.threadId,placeHolderStringResourceKey=_a.placeHolderStringResourceKey,placeHolderStringResourceValues=_a.placeHolderStringResourceValues,showReplyBox=_a.showReplyBox,title=_a.title,onThreadReply=_a.onThreadReply,className=_a.className;var refreshStatistics=useNewsApi().refreshStatistics;var createComment=useCommentApi().createComment;var user=useCurrentUser();var features=useFeatures();var history=useHistory();var location=useLocation$1();var formatMessage=useIntl().formatMessage;var showError=useNotificationContext().showError;var _d=useState$2((initialComments===null||initialComments===void 0?void 0:initialComments.items.length)===0||type!==ItemResourceTypes.Posts||showReplyBox),showNewComment=_d[0],setShowNewComment=_d[1];var _e=useState$2(),commentToReplyTo=_e[0],setCommentToReplyTo=_e[1];var _f=useState$2(autoFocusReplyField),autoFocusNewCommentInput=_f[0],setAutoFocusNewCommentInput=_f[1];var preventLoading=readOnly&&!loadInReadOnlyMode;var _g=usePageLoader(type,scope,itemId,pageSize,initialPageSize,initialComments,preventLoading,threadId),comments=_g[0],isLoading=_g[1],hasNextPage=_g[2],loadNextPage=_g[3],setComments=_g[4],hasMoreUnreadComments=_g[5];var commentIdsString=(comments!==null&&comments!==void 0?comments:[]).map(function(c){return c.id;}).join(',');useEffect$1(function(){var _a;if(commentIdsString.length>0&&((_a=location.state)===null||_a===void 0?void 0:_a.parentCommentId)){if(autoFocusNewCommentInput){return;}var commentContainer=document.getElementById(location.state.parentCommentId);commentContainer===null||commentContainer===void 0?void 0:commentContainer.scrollIntoView(true);history.replace(__assign(__assign({},location),{state:__assign(__assign({},location.state),{parentCommentId:null})}));}// comments changes implicitly 'validates' location state changes
|
|
126336
126334
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126337
126335
|
},[commentIdsString]);var showSpinner=!preventLoading&&isLoading;var showLoadMore=!preventLoading&&hasNextPage&&!isLoading;var showComments=!preventLoading&&(comments===null||comments===void 0?void 0:comments.length)>0;return jsxs("div",__assign({className:className},{children:[jsxs(TitleAndSpinner,{children:[title,showSpinner&&jsx$1(StyledSpinner$1,{},void 0)]},void 0),showLoadMore&&jsx$1(LoadMoreContainer,__assign({"data-load-more-comments-container":true,"data-show-highlight":hasMoreUnreadComments,highlight:hasMoreUnreadComments},{children:jsx$1(LoadMore,{text:formatMessage({id:type===ItemResourceTypes.Posts||threadId!=null?'Post.comments.loadMore':'Comment.loadMore'}),onClick:function(){return loadNextPage();},iconProps:{iconName:'ScrollUpDown'},"data-load-more-comments":true},void 0)}),void 0),showComments&&jsx$1(CommentList,{scope:ConversationScope.Public,items:comments,groupIds:groupIds,isLoading:isLoading,onCommentDeleted:handleCommentDeleted,mentionSearchHandler:mentionSearchHandler,type:type,baseAttachmentPath:baseAttachmentPath,noItemsYetStringResourceKey:noItemsYetStringResourceKey,getHashtagFilterRoute:getHashtagFilterRoute,onReply:handleOnReply,readOnly:readOnly},void 0),!showNewComment&&jsx$1(ReplyButton,{iconProps:{iconName:'Reply'},text:formatMessage({id:'Post.comments.addReply'}),onClick:showNewCommentInput,"data-add-comment":true},void 0),showNewComment&&jsxs(Fragment,{children:[jsx$1(NewComment// the key is required to autofocus the reply field when replying to comments
|
|
126338
126336
|
,{readOnly:readOnly,onPost:handleCommentCreated,mentionSearchHandler:mentionSearchHandler,autoFocus:autoFocusNewCommentInput,focusAfterPost:!env.isNativeMobileApp,baseAttachmentPath:baseAttachmentPath,placeHolderStringResourceKey:placeHolderStringResourceKey,placeHolderStringResourceValues:placeHolderStringResourceValues,content:getContent(),allowSaveWithoutContent:true,saveOnCtrlEnter:true},commentToReplyTo===null||commentToReplyTo===void 0?void 0:commentToReplyTo.commentId),!readOnly&&buttons]},void 0)]}),void 0);function getContent(){var _a;return ((_a=commentToReplyTo===null||commentToReplyTo===void 0?void 0:commentToReplyTo.commentSender)===null||_a===void 0?void 0:_a.id)&&commentToReplyTo.commentSender.id!==user.id?constructUserMention(commentToReplyTo.commentSender):null;}function handleOnReply(commentId,commentSender){if(features.replyToComments){history.replace(__assign(__assign({},location),{state:{parentCommentId:"Comment-"+commentId}}));onThreadReply===null||onThreadReply===void 0?void 0:onThreadReply(commentId);setCommentToReplyTo({commentId:commentId,commentSender:commentSender});return;}showNewCommentInput();setCommentToReplyTo({commentId:commentId,commentSender:commentSender});setAutoFocusNewCommentInput(true);}function showNewCommentInput(){if(user.isPublicUser){triggerEvent(PromptPublicUserLoginAction.create());return;}setShowNewComment(true);}function handleCommentDeleted(comment){return __awaiter(this,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:setComments(function(stateComments){return stateComments.filter(function(c){return c.id!==comment.id;});});onCommentDeleted===null||onCommentDeleted===void 0?void 0:onCommentDeleted(comment);_a=!threadId;if(!_a)return [3/*break*/,2];return [4/*yield*/,refreshStatistics(itemId,{commentCount:-1})];case 1:_a=_b.sent();_b.label=2;case 2:return [2/*return*/];}});});}function handleCommentCreated(commentDelta,attachmentContainerId,attachments){return __awaiter(this,void 0,void 0,function(){var newComment,comment_1,_a,error_1;return __generator(this,function(_b){switch(_b.label){case 0:newComment={id:null,parentItemId:itemId,content:commentDelta.content,conversationScope:scope,sender:user,receivedDateTime:moment.utc().toISOString(),attachmentContainerId:attachmentContainerId,attachments:attachments,threadId:threadId,isUnread:false};setComments(function(stateComments){return __spreadArray(__spreadArray([],stateComments),[newComment]);});onCommentAdded===null||onCommentAdded===void 0?void 0:onCommentAdded();_b.label=1;case 1:_b.trys.push([1,5,6,7]);return [4/*yield*/,createComment(type,scope,itemId,__assign(__assign({},commentDelta),{attachmentContainerId:attachmentContainerId,attachments:attachments,threadId:threadId}))];case 2:comment_1=_b.sent();_a=!threadId;if(!_a)return [3/*break*/,4];return [4/*yield*/,refreshStatistics(itemId,{commentCount:1})];case 3:_a=_b.sent();_b.label=4;case 4:setComments(function(stateComments){var _a;return update(stateComments,(_a={},_a[stateComments.length-1]={$merge:{id:comment_1.id,fileAccessToken:comment_1.fileAccessToken}},_a));});return [3/*break*/,7];case 5:error_1=_b.sent();logger.error(error_1);showError('Comment.errorMessage');return [3/*break*/,7];case 6:setAutoFocusNewCommentInput(false);setCommentToReplyTo(null);return [7/*endfinally*/];case 7:return [2/*return*/];}});});}};var TitleAndSpinner=_styled.div.withConfig({displayName:"PagedCommentsSection__TitleAndSpinner",componentId:"sc-1f3hft1-0"})(templateObject_1$13||(templateObject_1$13=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));var ReplyButton=_styled(ActionButton).withConfig({displayName:"PagedCommentsSection__ReplyButton",componentId:"sc-1f3hft1-1"})(templateObject_2$D||(templateObject_2$D=__makeTemplateObject(["\n && {\n padding: 0;\n height: auto;\n min-height: 20px;\n border: none;\n color: ",";\n align-self: flex-start;\n }\n"],["\n && {\n padding: 0;\n height: auto;\n min-height: 20px;\n border: none;\n color: ",";\n align-self: flex-start;\n }\n"])),function(p){return p.theme.palette.accent;});var NewComment=_styled(CreateCommentWithAttachments).withConfig({displayName:"PagedCommentsSection__NewComment",componentId:"sc-1f3hft1-2"})(templateObject_3$s||(templateObject_3$s=__makeTemplateObject(["\n margin: 10px 0;\n position: relative;\n\n .comment-input__host {\n border: none;\n }\n"],["\n margin: 10px 0;\n position: relative;\n\n .comment-input__host {\n border: none;\n }\n"])));var LoadMoreContainer=_styled.div.withConfig({displayName:"PagedCommentsSection__LoadMoreContainer",componentId:"sc-1f3hft1-3"})(templateObject_5$h||(templateObject_5$h=__makeTemplateObject(["\n & ~ .comment-list {\n margin-top: 15px;\n }\n\n ","\n"],["\n & ~ .comment-list {\n margin-top: 15px;\n }\n\n ","\n"])),function(p){return p.highlight&&css$2(templateObject_4$i||(templateObject_4$i=__makeTemplateObject(["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: -","px;\n bottom: 0;\n right: -","px;\n width: ","px;\n display: block;\n background-color: ",";\n }\n "])),postsSectionPadding,postsSectionPadding,spacingXs,function(p){return p.theme.palette.accent;});});var LoadMore=_styled(ActionButton).withConfig({displayName:"PagedCommentsSection__LoadMore",componentId:"sc-1f3hft1-4"})(templateObject_6$9||(templateObject_6$9=__makeTemplateObject(["\n && {\n text-align: left;\n }\n"],["\n && {\n text-align: left;\n }\n"])));var StyledSpinner$1=_styled(Spinner).withConfig({displayName:"PagedCommentsSection__StyledSpinner",componentId:"sc-1f3hft1-5"})(templateObject_7$6||(templateObject_7$6=__makeTemplateObject(["\n margin: 0 auto;\n padding: 15px 0;\n"],["\n margin: 0 auto;\n padding: 15px 0;\n"])));function usePageLoader(type,scope,itemId,pageSize,initialPageSize,initialComments,preventLoading,threadId){var _a=useState$2(function(){return __spreadArray([],(initialComments===null||initialComments===void 0?void 0:initialComments.items)||[]).reverse();}),comments=_a[0],setComments=_a[1];var _b=useState$2({token:initialComments===null||initialComments===void 0?void 0:initialComments.paginationToken,hasMoreUnreadComments:initialComments===null||initialComments===void 0?void 0:initialComments.hasMoreUnreadComments}),nextPageInfos=_b[0],setNextPageInfos=_b[1];var _c=useState$2(!initialComments),isLoading=_c[0],setIsLoading=_c[1];var pullToRefreshContext=useContext(PullToRefreshContext);var _d=useCommentApi(),listComments=_d.listComments,getCommentReplies=_d.getCommentReplies;// the context can be null, in case we are in the editor
|
|
126339
126337
|
var refreshToken=pullToRefreshContext===null||pullToRefreshContext===void 0?void 0:pullToRefreshContext.refreshToken;var refreshUserDetails=useRefreshUserDetails();var isValid=true;useEffect$1(function(){if(!isValid||preventLoading){return undefined;}if(!initialComments||refreshToken){// pass the pageToken explicitly since it's possible that the nextPageTokenState has not been updated yet
|
|
126340
126338
|
loadNextPage(null,initialPageSize,!!initialComments).then(function(){return null;},logger.error);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126341
126339
|
return function(){isValid=false;};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126342
|
-
},[initialComments,itemId,refreshToken]);return [comments,isLoading,!!(nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.token),loadNextPage,setComments,nextPageInfos.hasMoreUnreadComments];function loadNextPage(nextPageTokenOverride,pageSizeOverride,doNotSetIsLoading){return __awaiter(this,void 0,void 0,function(){var nextPage,_a;return __generator(this,function(_b){switch(_b.label){case 0:if(!isValid){return [2/*return*/];}if(!doNotSetIsLoading){setIsLoading(true);}if(!(threadId!=null))return [3/*break*/,2];return [4/*yield*/,getCommentReplies(type,scope,itemId,threadId,{sortOrder:SortOrder.Desc,pageSize:pageSizeOverride!==null&&pageSizeOverride!==void 0?pageSizeOverride:pageSize,token:
|
|
126340
|
+
},[initialComments,itemId,refreshToken]);return [comments,isLoading,!!(nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.token),loadNextPage,setComments,nextPageInfos.hasMoreUnreadComments];function loadNextPage(nextPageTokenOverride,pageSizeOverride,doNotSetIsLoading){return __awaiter(this,void 0,void 0,function(){var token,nextPage,_a;return __generator(this,function(_b){switch(_b.label){case 0:if(!isValid){return [2/*return*/];}if(!doNotSetIsLoading){setIsLoading(true);}token=nextPageTokenOverride!==undefined?nextPageTokenOverride:nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.token;if(!(threadId!=null))return [3/*break*/,2];return [4/*yield*/,getCommentReplies(type,scope,itemId,threadId,{sortOrder:SortOrder.Desc,pageSize:pageSizeOverride!==null&&pageSizeOverride!==void 0?pageSizeOverride:pageSize,token:token})];case 1:_a=_b.sent();return [3/*break*/,4];case 2:return [4/*yield*/,listComments(type,scope,itemId,{sortOrder:SortOrder.Desc,pageSize:pageSizeOverride!==null&&pageSizeOverride!==void 0?pageSizeOverride:pageSize,token:token})];case 3:_a=_b.sent();_b.label=4;case 4:nextPage=_a;if(isValid){setIsLoading(false);setComments(function(stateComments){return token!=null?__spreadArray(__spreadArray([],__spreadArray([],nextPage.items).reverse()),stateComments):nextPage.items.reverse();});// refresh the unread count every time we load a new page of comments
|
|
126343
126341
|
refreshUserDetails();setNextPageInfos({token:nextPage.paginationToken,hasMoreUnreadComments:nextPage.hasMoreUnreadComments});}return [2/*return*/];}});});}}var templateObject_1$13,templateObject_2$D,templateObject_3$s,templateObject_4$i,templateObject_5$h,templateObject_6$9,templateObject_7$6;var PublicUserFullAccessButton=function PublicUserFullAccessButton(_a){var user=_a.user,onClick=_a.onClick,descriptionResourceKeyPrefix=_a.descriptionResourceKeyPrefix,descriptionValues=_a.descriptionValues,className=_a.className;var formatMessage=useIntl().formatMessage;var history=useHistory();var location=useLocation$1();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var shouldRegister=user.subscription.allowSelfRegistration&&user.authenticationType!==AuthenticationType.public;return jsxs("div",__assign({className:className},{children:[jsx$1(PublicUserButtonFocusStyle,{},void 0),descriptionResourceKeyPrefix&&jsx$1(Description$1,{id:descriptionResourceKeyPrefix+"."+(shouldRegister?'register':'login'),values:descriptionValues,tagName:"p"},void 0),jsx$1(PrimaryButton,{"data-public-access-button":true,text:formatMessage({id:shouldRegister?'SelfRegistration.register':'Subscription.login.caption'}),onClick:handleOnClick},void 0)]}),void 0);function handleOnClick(){onClick===null||onClick===void 0?void 0:onClick();if(shouldRegister){history.push({pathname:buildPath('/register')});}else {history.push({pathname:'/logout',search:queryString.stringify({source:getAppUrl()+buildPath("/login?"+queryString.stringify({source:location.pathname}))})});}}};var PublicUserButtonFocusStyle=createGlobalStyle(templateObject_1$12||(templateObject_1$12=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),function(p){return applyFocusStyle("\n button[data-public-access-button]:focus::after {\n outline-color: "+p.theme.palette.accent+" !important;\n outline-offset: 2px;\n }\n ");});var Description$1=_styled(FormattedMessageWithStyle).withConfig({displayName:"PublicUserFullAccessButton__Description",componentId:"sc-tjhzmp-0"})(templateObject_2$C||(templateObject_2$C=__makeTemplateObject(["\n margin-top: 0;\n color: ",";\n"],["\n margin-top: 0;\n color: ",";\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$12,templateObject_2$C;var PublishableItemComments=function PublishableItemComments(_a){var item=_a.item,readOnly=_a.readOnly,loadInReadOnlyMode=_a.loadInReadOnlyMode,type=_a.type,onThreadReply=_a.onThreadReply,hideProfileUrl=_a.hideProfileUrl,disableLoginForPublicUser=_a.disableLoginForPublicUser;var container=useRef$1();var location=useLocation$1();var searchAccountsByItemId=useAccountApi().searchAccountsByItemId;var user=useCurrentUser();useEffect$1(function(){// scroll comments container into view if there is the corresponding hash in the path.
|
|
126344
126342
|
// HACK: a regular anchor does not work, because content is rendered
|
|
126345
126343
|
// dynamically and the comments might not be in DOM at the right time.
|
|
@@ -126360,11 +126358,20 @@ result.items.forEach(function(page){var _a;var node=convertToNavigationNode(page
|
|
|
126360
126358
|
// we don't want to add the same node again, instead we just need to
|
|
126361
126359
|
// append the children of the node
|
|
126362
126360
|
// we also know then that we don't have to traverse the tree further up and can stop
|
|
126363
|
-
var existingNode=allNodesById[node.id];if(existingNode){if(existingNode.id===page.id){existingNode.isSearchMatch=true;}ensureChildren.apply(void 0,__spreadArray([existingNode],node.children||[]));break;}allNodesById[node.id]=node;if(!((_a=node.parent)===null||_a===void 0?void 0:_a.id)){break;}ensureChildren(node.parent,node);node=node.parent;}});onSearchResultChange(Object.values(allNodesById).filter(function(n){var _a;return !((_a=n.parent)===null||_a===void 0?void 0:_a.id);}));return [2/*return*/];}});});}function ensureChildren(parent){var _a;var children=[];for(var _i=1;_i<arguments.length;_i++){children[_i-1]=arguments[_i];}if(!parent.children){parent.children=[];}parent.children=parent.children.concat(children).sort(function(a,b){return a.position-b.position;});parent.firstChildId=(_a=parent.children[0])===null||_a===void 0?void 0:_a.id;}};var StyledSearchBox=_styled(SearchBox$1).withConfig({displayName:"PageTocSearch__StyledSearchBox",componentId:"sc-1enxv6b-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);var templateObject_1$B;function filterChildren(page,activePage){if(!activePage){return true;}if(activePage.status===WorkflowStatus.deleted){return page.status===WorkflowStatus.deleted;}return page.status!==WorkflowStatus.deleted&&activePage.isUnlinked===page.isUnlinked;}var ExternalPagesLinkButton=function ExternalPagesLinkButton(_a){var item=_a.item,disabled=_a.disabled,onClick=_a.onClick,className=_a.className;var user=useCurrentUser();var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;if(!item.useExternalContent){return null;}var resourceKey="ExternalLinkButton.pages"+(!url?'.noUrl':'')+".navigateTo";return jsx$1(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsx$1(StyledIconButton$4,{iconProps:{iconName:'NavigateExternalInline',styles:{root:{fontSize:fontSizeMedium+4+"px",height:fontSizeMedium+4+"px"}}},onClick:handleClick,disabled:disabled,"aria-label":formatMessage({id:resourceKey},url?{url:url}:undefined)},void 0)}),void 0);function handleClick(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){if(onClick){onClick(e);return [2/*return*/];}createPageClickHandler(item)(e);return [2/*return*/];});});}};var StyledIconButton$4=_styled(IconButton).withConfig({displayName:"ExternalPagesLinkButton__StyledIconButton",componentId:"sc-1n1ybv7-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$A;var PageNode=function PageNode(_a){var node=_a.node,activePage=_a.activePage,navigationContext=_a.navigationContext,loadChildren=_a.loadChildren,basePath=_a.basePath,path=_a.path,className=_a.className,isRootNode=_a.isRootNode,hide=_a.hide,onPageSelected=_a.onPageSelected,selectedPageId=_a.selectedPageId;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var nodesContainNavigation=navigationContext==null;var _b=useState$2(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=useState$2(undefined),forceShowChildren=_c[0],setForceShowChildren=_c[1];var showChildren=forceShowChildren||children&&forceShowChildren!==false&&(nodesContainNavigation||path.some(function(p){return p===node.id;})||(activePage===null||activePage===void 0?void 0:activePage.id)===node.id);var title=getTitle(node,user,formatMessage);var isSelectedPageNode=(activePage===null||activePage===void 0?void 0:activePage.id)===node.id||selectedPageId===node.id;var iconName=getIconName();var isExpanded=iconName==='ChevronDown';var isHighlighted=isSelectedPageNode||path.some(function(p){return p===node.id;});var appBasePath=basePath?buildPath(basePath):null;var isSearchMatch=node.isSearchMatch?'true':null;var isDocument=node.pageType===PageType.Document;var detailViewUrl=""+NewsService.getNewsRoute(appBasePath,node.id,title)+(node.useExternalContent?"?"+queryString.stringify({noRedirect:true}):'');return jsxs(Fragment,{children:[jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsx$1(StyledIconButton$3,{iconProps:{iconName:iconName},onClick:function(){return __awaiter(void 0,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(!!(children===null||children===void 0?void 0:children.length))return [3/*break*/,2];_a=setLazyLoadedChildren;return [4/*yield*/,loadChildren(node.id)];case 1:_a.apply(void 0,[_b.sent()]);_b.label=2;case 2:setForceShowChildren(!showChildren);return [2/*return*/];}});});},isHighlighted:isHighlighted,isExpanded:isExpanded,ariaLabel:formatMessage({id:isExpanded?'AriaLabel.hideChildren':'AriaLabel.seeChildren'}),"data-toc-node-toggle-children":node.id},void 0):jsx$1(StyledIcon$2$1,{isHighlighted:isHighlighted},void 0),basePath?jsx$1(NodeTitleLink,__assign({onClick:createPageClickHandler(node,basePath,function(){return onPageSelected===null||onPageSelected===void 0?void 0:onPageSelected(node.id);},true),to:detailViewUrl,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):onPageSelected?jsx$1(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsx$1(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsx$1(StyledExternalLinkButton,{item:node},void 0),jsx$1(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsx$1(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsx$1("li",{children:jsx$1(PageNode,{hide:!showChildren,basePath:basePath,node:c,activePage:activePage,navigationContext:navigationContext,loadChildren:loadChildren,path:path,isRootNode:false,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id);})}),void 0)]},void 0);function getIconName(){var _a;if(!nodesContainNavigation&&!node.firstChildId||nodesContainNavigation&&!((_a=node.children)===null||_a===void 0?void 0:_a.length)){return null;}if(showChildren){return 'ChevronDown';}return 'ChevronRight';}function getChildren(nodeId){if(nodesContainNavigation){return node.children||[];}if((activePage===null||activePage===void 0?void 0:activePage.id)===nodeId){return navigationContext.children||[];}var result=navigationContext.parent;while(result!=null&&result.id!==nodeId){result=result.parent;}return result?result.children:[];}};var NodeWrapper=_styled.div.withConfig({displayName:"PageTocNode__NodeWrapper",componentId:"sc-1ftr1ym-0"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"],["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"])),function(p){return p.hide&&'display: none;';},function(p){return !p.isFirstLevel&&css$2(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n padding-left: ","px;\n margin-top: ","px;\n "],["\n padding-left: ","px;\n margin-top: ","px;\n "])),spacingS,spacingS+5);},function(p){return p.isActive&&css$2(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.neutralQuaternaryAlt;});},spacingXs,minScreenSize.small);var IconNormalSize=20;var IconLargeSize=26;var IconBubbleStyle=function IconBubbleStyle(isHighlighted){return css$2(templateObject_6$6||(templateObject_6$6=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?css$2(templateObject_4$d||(templateObject_4$d=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.white;}):css$2(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.neutralQuaternary;},function(p){return p.theme.palette.black;}));};var StyledIconButton$3=_styled(IconButton$1).withConfig({displayName:"PageTocNode__StyledIconButton",componentId:"sc-1ftr1ym-1"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"],["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"])),IconLargeSize,IconLargeSize,IconLargeSize,function(p){return p.isExpanded&&css$2(templateObject_7$4$1||(templateObject_7$4$1=__makeTemplateObject(["\n i {\n transform: translate(0, 1px);\n }\n "],["\n i {\n transform: translate(0, 1px);\n }\n "])));},function(p){return IconBubbleStyle(p.isHighlighted);},minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledIcon$2$1=_styled(Icon).withConfig({displayName:"PageTocNode__StyledIcon",componentId:"sc-1ftr1ym-2"})(templateObject_9$3||(templateObject_9$3=__makeTemplateObject(["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"],["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"])),IconLargeSize,IconLargeSize,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize,function(p){return IconBubbleStyle(p.isHighlighted);});var NodeTitleStyle=css$2(templateObject_11$1$1||(templateObject_11$1$1=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"],["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"])),spacingM,fontSizeNormal,function(p){return p.theme.textColors.default;},function(p){return p.bold&&css$2(templateObject_10$2$1||(templateObject_10$2$1=__makeTemplateObject(["\n font-weight: bold;\n "],["\n font-weight: bold;\n "])));},minScreenSize.small,fontSizeSmall);var NodeTitleLink=_styled(NavLink).withConfig({displayName:"PageTocNode__NodeTitleLink",componentId:"sc-1ftr1ym-3"})(templateObject_12$1$1||(templateObject_12$1$1=__makeTemplateObject(["\n ",";\n\n && {\n color: ",";\n }\n"],["\n ",";\n\n && {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.textColors.default;});var NodeTitleButton=_styled(ActionButton).withConfig({displayName:"PageTocNode__NodeTitleButton",componentId:"sc-1ftr1ym-4"})(templateObject_13$1$1||(templateObject_13$1$1=__makeTemplateObject(["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"],["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.palette.neutralQuaternary;});var NodeTitle=_styled.div.withConfig({displayName:"PageTocNode__NodeTitle",componentId:"sc-1ftr1ym-5"})(templateObject_14$1$1||(templateObject_14$1$1=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),NodeTitleStyle);var ChildrenList=_styled.ul.withConfig({displayName:"PageTocNode__ChildrenList",componentId:"sc-1ftr1ym-6"})(templateObject_15$1$1||(templateObject_15$1$1=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"])),function(p){return p.hide&&'display: none;';},spacingS);var StyledExternalLinkButton=_styled(ExternalPagesLinkButton).withConfig({displayName:"PageTocNode__StyledExternalLinkButton",componentId:"sc-1ftr1ym-7"})(templateObject_16$1$1||(templateObject_16$1$1=__makeTemplateObject(["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"])),spacingS,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledDocumentDownloadButton$1=_styled(DocumentDownloadButton).withConfig({displayName:"PageTocNode__StyledDocumentDownloadButton",componentId:"sc-1ftr1ym-8"})(templateObject_17$1||(templateObject_17$1=__makeTemplateObject(["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"])),IconLargeSize,spacingS-5,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var templateObject_1$z,templateObject_2$q,templateObject_3$l,templateObject_4$d,templateObject_5$c,templateObject_6$6,templateObject_7$4$1,templateObject_8$4$1,templateObject_9$3,templateObject_10$2$1,templateObject_11$1$1,templateObject_12$1$1,templateObject_13$1$1,templateObject_14$1$1,templateObject_15$1$1,templateObject_16$1$1,templateObject_17$1;var PageTableOfContents$1=function PageTableOfContents(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onPageSelected=_a.onPageSelected,className=_a.className,selectedPageId=_a.selectedPageId,isLoading=_a.isLoading,disableScrollableList=_a.disableScrollableList;var user=useCurrentUser();var _b=getRootNodes(),rootNodes=_b.rootNodes,path=_b.path;var _c=useState$2(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsx$1(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsx$1(FormattedMessageWithStyle,{id:"ContentEditor.parentPage.emptyToc",tagName:"div",className:className},void 0);}var activePage=activePageId&&navigationContext.siblings.find(function(p){return p.id===activePageId;});var nodesToDisplay=sortPageNodesByGroupAndPosition(user.groups,(searchResult||rootNodes).filter(function(p){return filterChildren(p,activePage);}));return jsx$1(Fragment,{children:jsxs("div",__assign({className:className},{children:[jsx$1("div",__assign({"data-toc-search-container":true},{children:jsx$1(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsx$1(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsx$1(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsx$1(TocList,{children:nodesToDisplay.map(function(c){return jsx$1(ToCItem,{children:jsx$1(PageNode,{basePath:basePath,node:c,activePage:activePage,navigationContext:searchResult?null:navigationContext,loadChildren:loadChildren,path:path,isRootNode:true,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id+!!searchResult);})},void 0)}),void 0)]}),void 0)},void 0);function getRootNodes(){if(!(navigationContext===null||navigationContext===void 0?void 0:navigationContext.parent)){return {rootNodes:(navigationContext===null||navigationContext===void 0?void 0:navigationContext.siblings)||[],path:[]};}var path=[];var currentParent=navigationContext.parent;while(currentParent!=null&¤tParent.parent!=null){path.push(currentParent.id);currentParent=currentParent.parent;}return {rootNodes:(currentParent===null||currentParent===void 0?void 0:currentParent.children)||[],path:path};}};var TocEmptyList=_styled(EmptyList).withConfig({displayName:"PageTableOfContents__TocEmptyList",componentId:"sc-3llzkd-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"],["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"])),fontSizeLarger+10);var TocListContainer=_styled.div.withConfig({displayName:"PageTableOfContents__TocListContainer",componentId:"sc-3llzkd-1"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n padding-top: ","px;\n\n ","\n"],["\n padding-top: ","px;\n\n ","\n"])),spacingXs,function(p){return p.isScrollable&&css$2(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "],["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "])));});var TocList=_styled.ul.withConfig({displayName:"PageTableOfContents__TocList",componentId:"sc-3llzkd-2"})(templateObject_4$c||(templateObject_4$c=__makeTemplateObject(["\n list-style: none;\n padding: 0;\n margin: 0;\n"],["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));var ToCItem=_styled.li.withConfig({displayName:"PageTableOfContents__ToCItem",componentId:"sc-3llzkd-3"})(templateObject_5$b||(templateObject_5$b=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);_styled(PageTableOfContents$1).withConfig({displayName:"PageTableOfContents__StyledPageToC",componentId:"sc-3llzkd-4"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"],["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"])),spacingM,spacingM,spacingM);var templateObject_1$y,templateObject_2$p,templateObject_3$k,templateObject_4$c,templateObject_5$b,templateObject_6$5$1;var PageTableOfContentsDialog=function PageTableOfContentsDialog(_a){var isOpen=_a.isOpen,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onDismiss=_a.onDismiss,basePath=_a.basePath;var formatMessage=useIntl().formatMessage;if(!navigationContext){return null;}return jsx$1(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsx$1(DialogGlobalStyle,{},void 0),jsx$1(PageTableOfContents$1,{basePath:basePath,activePageId:activePageId,navigationContext:navigationContext,loadChildren:loadChildren,onSearch:onSearch,onPageSelected:onDismiss,disableScrollableList:true},void 0)]}),void 0)}),void 0);};var DialogContent=_styled.div.withConfig({displayName:"PageTableOfContentsDialog__DialogContent",componentId:"sc-z2sdu7-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"],["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle=createGlobalStyle(templateObject_2$o||(templateObject_2$o=__makeTemplateObject(["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"],["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$x,templateObject_2$o;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$w;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$v;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$u||(templateObject_1$u=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$u;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},filter,{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);_styled.div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$t||(templateObject_1$t=__makeTemplateObject(["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"],["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"])),spacingS);var templateObject_1$t;_styled.div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$s||(templateObject_1$s=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);_styled(ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$n||(templateObject_2$n=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);_styled(Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));_styled.span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a||(templateObject_5$a=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&css$2(templateObject_4$b||(templateObject_4$b=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled.ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&css$2(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled.li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$s,templateObject_2$n,templateObject_3$j,templateObject_4$b,templateObject_5$a,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;_styled.div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$r||(templateObject_1$r=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled(ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled.div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$i||(templateObject_3$i=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));_styled.div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$a||(templateObject_4$a=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));_styled(IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9||(templateObject_5$9=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$r,templateObject_2$m,templateObject_3$i,templateObject_4$a,templateObject_5$9;var $$f=_export;var requireObjectCoercible$c=requireObjectCoercible$b;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$l=wellKnownSymbol$k;var REPLACE$2=wellKnownSymbol$l('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
126361
|
+
var existingNode=allNodesById[node.id];if(existingNode){if(existingNode.id===page.id){existingNode.isSearchMatch=true;}ensureChildren.apply(void 0,__spreadArray([existingNode],node.children||[]));break;}allNodesById[node.id]=node;if(!((_a=node.parent)===null||_a===void 0?void 0:_a.id)){break;}ensureChildren(node.parent,node);node=node.parent;}});onSearchResultChange(Object.values(allNodesById).filter(function(n){var _a;return !((_a=n.parent)===null||_a===void 0?void 0:_a.id);}));return [2/*return*/];}});});}function ensureChildren(parent){var _a;var children=[];for(var _i=1;_i<arguments.length;_i++){children[_i-1]=arguments[_i];}if(!parent.children){parent.children=[];}parent.children=parent.children.concat(children).sort(function(a,b){return a.position-b.position;});parent.firstChildId=(_a=parent.children[0])===null||_a===void 0?void 0:_a.id;}};var StyledSearchBox=_styled(SearchBox$1).withConfig({displayName:"PageTocSearch__StyledSearchBox",componentId:"sc-1enxv6b-0"})(templateObject_1$B||(templateObject_1$B=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);var templateObject_1$B;function filterChildren(page,activePage){if(!activePage){return true;}if(activePage.status===WorkflowStatus.deleted){return page.status===WorkflowStatus.deleted;}return page.status!==WorkflowStatus.deleted&&activePage.isUnlinked===page.isUnlinked;}var ExternalPagesLinkButton=function ExternalPagesLinkButton(_a){var item=_a.item,disabled=_a.disabled,onClick=_a.onClick,className=_a.className;var user=useCurrentUser();var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;if(!item.useExternalContent){return null;}var resourceKey="ExternalLinkButton.pages"+(!url?'.noUrl':'')+".navigateTo";return jsx$1(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsx$1(StyledIconButton$4,{iconProps:{iconName:'NavigateExternalInline',styles:{root:{fontSize:fontSizeMedium+4+"px",height:fontSizeMedium+4+"px"}}},onClick:handleClick,disabled:disabled,"aria-label":formatMessage({id:resourceKey},url?{url:url}:undefined)},void 0)}),void 0);function handleClick(e){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){if(onClick){onClick(e);return [2/*return*/];}createPageClickHandler(item)(e);return [2/*return*/];});});}};var StyledIconButton$4=_styled(IconButton).withConfig({displayName:"ExternalPagesLinkButton__StyledIconButton",componentId:"sc-1n1ybv7-0"})(templateObject_1$A||(templateObject_1$A=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin: 0;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$A;var PageNode=function PageNode(_a){var node=_a.node,activePage=_a.activePage,navigationContext=_a.navigationContext,loadChildren=_a.loadChildren,basePath=_a.basePath,path=_a.path,className=_a.className,isRootNode=_a.isRootNode,hide=_a.hide,onPageSelected=_a.onPageSelected,selectedPageId=_a.selectedPageId;var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var createPageClickHandler=usePagesClickHandler().createPageClickHandler;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var nodesContainNavigation=navigationContext==null;var _b=useState$2(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=useState$2(undefined),forceShowChildren=_c[0],setForceShowChildren=_c[1];var showChildren=forceShowChildren||children&&forceShowChildren!==false&&(nodesContainNavigation||path.some(function(p){return p===node.id;})||(activePage===null||activePage===void 0?void 0:activePage.id)===node.id);var title=getTitle(node,user,formatMessage);var isSelectedPageNode=(activePage===null||activePage===void 0?void 0:activePage.id)===node.id||selectedPageId===node.id;var iconName=getIconName();var isExpanded=iconName==='ChevronDown';var isHighlighted=isSelectedPageNode||path.some(function(p){return p===node.id;});var appBasePath=basePath?buildPath(basePath):null;var isSearchMatch=node.isSearchMatch?'true':null;var isDocument=node.pageType===PageType.Document;var detailViewUrl=""+NewsService.getNewsRoute(appBasePath,node.id,title)+(node.useExternalContent?"?"+queryString.stringify({noRedirect:true}):'');return jsxs(Fragment,{children:[jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsx$1(StyledIconButton$3,{iconProps:{iconName:iconName},onClick:function(){return __awaiter(void 0,void 0,void 0,function(){var _a;return __generator(this,function(_b){switch(_b.label){case 0:if(!!(children===null||children===void 0?void 0:children.length))return [3/*break*/,2];_a=setLazyLoadedChildren;return [4/*yield*/,loadChildren(node.id)];case 1:_a.apply(void 0,[_b.sent()]);_b.label=2;case 2:setForceShowChildren(!showChildren);return [2/*return*/];}});});},isHighlighted:isHighlighted,isExpanded:isExpanded,ariaLabel:formatMessage({id:isExpanded?'AriaLabel.hideChildren':'AriaLabel.seeChildren'}),"data-toc-node-toggle-children":node.id},void 0):jsx$1(StyledIcon$2$1,{isHighlighted:isHighlighted},void 0),basePath?jsx$1(NodeTitleLink,__assign({onClick:createPageClickHandler(node,basePath,function(){return onPageSelected===null||onPageSelected===void 0?void 0:onPageSelected(node.id);},true),to:detailViewUrl,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):onPageSelected?jsx$1(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsx$1(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsx$1(StyledExternalLinkButton,{item:node},void 0),jsx$1(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsx$1(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsx$1("li",{children:jsx$1(PageNode,{hide:!showChildren,basePath:basePath,node:c,activePage:activePage,navigationContext:navigationContext,loadChildren:loadChildren,path:path,isRootNode:false,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id);})}),void 0)]},void 0);function getIconName(){var _a;if(!nodesContainNavigation&&!node.firstChildId||nodesContainNavigation&&!((_a=node.children)===null||_a===void 0?void 0:_a.length)){return null;}if(showChildren){return 'ChevronDown';}return 'ChevronRight';}function getChildren(nodeId){if(nodesContainNavigation){return node.children||[];}if((activePage===null||activePage===void 0?void 0:activePage.id)===nodeId){return navigationContext.children||[];}var result=navigationContext.parent;while(result!=null&&result.id!==nodeId){result=result.parent;}return result?result.children:[];}};var NodeWrapper=_styled.div.withConfig({displayName:"PageTocNode__NodeWrapper",componentId:"sc-1ftr1ym-0"})(templateObject_3$l||(templateObject_3$l=__makeTemplateObject(["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"],["\n display: inline-flex;\n min-width: 240px; /* this value is very important for the ToC in Panel: icon + title + external page icon */\n margin-right: 4px;\n\n ","\n ",";\n\n ","\n\n padding: ","px;\n\n @media (min-width: ","px) {\n padding: 0;\n }\n"])),function(p){return p.hide&&'display: none;';},function(p){return !p.isFirstLevel&&css$2(templateObject_1$z||(templateObject_1$z=__makeTemplateObject(["\n padding-left: ","px;\n margin-top: ","px;\n "],["\n padding-left: ","px;\n margin-top: ","px;\n "])),spacingS,spacingS+5);},function(p){return p.isActive&&css$2(templateObject_2$q||(templateObject_2$q=__makeTemplateObject(["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "],["\n position: relative;\n font-weight: bold;\n\n &::before {\n content: '';\n position: absolute;\n left: -9999px;\n right: -9999px;\n top: -3px;\n bottom: -3px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.neutralQuaternaryAlt;});},spacingXs,minScreenSize.small);var IconNormalSize=20;var IconLargeSize=26;var IconBubbleStyle=function IconBubbleStyle(isHighlighted){return css$2(templateObject_6$6||(templateObject_6$6=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?css$2(templateObject_4$d||(templateObject_4$d=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.accent;},function(p){return p.theme.palette.white;}):css$2(templateObject_5$c||(templateObject_5$c=__makeTemplateObject(["\n background: ",";\n color: ",";\n "],["\n background: ",";\n color: ",";\n "])),function(p){return p.theme.palette.neutralQuaternary;},function(p){return p.theme.palette.black;}));};var StyledIconButton$3=_styled(IconButton$1).withConfig({displayName:"PageTocNode__StyledIconButton",componentId:"sc-1ftr1ym-1"})(templateObject_8$4$1||(templateObject_8$4$1=__makeTemplateObject(["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"],["\n && {\n margin: 0;\n padding: 0;\n flex-shrink: 0;\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 50%;\n\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n margin: 0;\n font-size: 14px;\n line-height: ","px;\n }\n\n &&,\n &&:hover,\n &&:active,\n &&:focus {\n ","\n\n ","\n }\n\n @media (min-width: ","px) {\n &,\n i {\n width: ","px;\n height: ","px;\n }\n\n i {\n font-size: 10px;\n line-height: ","px;\n }\n }\n }\n"])),IconLargeSize,IconLargeSize,IconLargeSize,function(p){return p.isExpanded&&css$2(templateObject_7$4$1||(templateObject_7$4$1=__makeTemplateObject(["\n i {\n transform: translate(0, 1px);\n }\n "],["\n i {\n transform: translate(0, 1px);\n }\n "])));},function(p){return IconBubbleStyle(p.isHighlighted);},minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledIcon$2$1=_styled(Icon).withConfig({displayName:"PageTocNode__StyledIcon",componentId:"sc-1ftr1ym-2"})(templateObject_9$3||(templateObject_9$3=__makeTemplateObject(["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"],["\n width: ","px;\n min-width: ","px;\n height: ","px;\n border-radius: 50%;\n z-index: 1;\n\n @media (min-width: ","px) {\n & {\n width: ","px;\n min-width: ","px;\n height: ","px;\n }\n }\n\n ","\n"])),IconLargeSize,IconLargeSize,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize,function(p){return IconBubbleStyle(p.isHighlighted);});var NodeTitleStyle=css$2(templateObject_11$1$1||(templateObject_11$1$1=__makeTemplateObject(["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"],["\n display: inline-flex;\n align-items: center;\n box-sizing: border-box;\n margin-left: ","px;\n z-index: 1;\n && {\n font-size: ","px;\n color: ",";\n\n ","\n }\n\n @media (min-width: ","px) {\n && {\n font-size: ","px;\n }\n }\n"])),spacingM,fontSizeNormal,function(p){return p.theme.textColors.default;},function(p){return p.bold&&css$2(templateObject_10$2$1||(templateObject_10$2$1=__makeTemplateObject(["\n font-weight: bold;\n "],["\n font-weight: bold;\n "])));},minScreenSize.small,fontSizeSmall);var NodeTitleLink=_styled(NavLink).withConfig({displayName:"PageTocNode__NodeTitleLink",componentId:"sc-1ftr1ym-3"})(templateObject_12$1$1||(templateObject_12$1$1=__makeTemplateObject(["\n ",";\n\n && {\n color: ",";\n }\n"],["\n ",";\n\n && {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.textColors.default;});var NodeTitleButton=_styled(ActionButton).withConfig({displayName:"PageTocNode__NodeTitleButton",componentId:"sc-1ftr1ym-4"})(templateObject_13$1$1||(templateObject_13$1$1=__makeTemplateObject(["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"],["\n padding: 0;\n height: auto;\n text-align: left;\n ",";\n\n &[disabled] {\n color: ",";\n }\n"])),NodeTitleStyle,function(p){return p.theme.palette.neutralQuaternary;});var NodeTitle=_styled.div.withConfig({displayName:"PageTocNode__NodeTitle",componentId:"sc-1ftr1ym-5"})(templateObject_14$1$1||(templateObject_14$1$1=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),NodeTitleStyle);var ChildrenList=_styled.ul.withConfig({displayName:"PageTocNode__ChildrenList",componentId:"sc-1ftr1ym-6"})(templateObject_15$1$1||(templateObject_15$1$1=__makeTemplateObject(["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"],["\n list-style: none;\n margin: 0;\n padding: 0;\n\n ",";\n\n > li {\n padding-left: ","px;\n }\n"])),function(p){return p.hide&&'display: none;';},spacingS);var StyledExternalLinkButton=_styled(ExternalPagesLinkButton).withConfig({displayName:"PageTocNode__StyledExternalLinkButton",componentId:"sc-1ftr1ym-7"})(templateObject_16$1$1||(templateObject_16$1$1=__makeTemplateObject(["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n margin-left: ","px;\n height: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n font-size: ","px;\n height: ","px;\n }\n }\n"])),spacingS,IconLargeSize,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var StyledDocumentDownloadButton$1=_styled(DocumentDownloadButton).withConfig({displayName:"PageTocNode__StyledDocumentDownloadButton",componentId:"sc-1ftr1ym-8"})(templateObject_17$1||(templateObject_17$1=__makeTemplateObject(["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"],["\n display: flex;\n height: ","px;\n margin-left: ","px;\n\n @media (min-width: ","px) {\n height: ","px;\n }\n\n > button {\n height: auto;\n\n i {\n line-height: ","px;\n height: ","px;\n }\n }\n"])),IconLargeSize,spacingS-5,minScreenSize.small,IconNormalSize,IconNormalSize,IconNormalSize);var templateObject_1$z,templateObject_2$q,templateObject_3$l,templateObject_4$d,templateObject_5$c,templateObject_6$6,templateObject_7$4$1,templateObject_8$4$1,templateObject_9$3,templateObject_10$2$1,templateObject_11$1$1,templateObject_12$1$1,templateObject_13$1$1,templateObject_14$1$1,templateObject_15$1$1,templateObject_16$1$1,templateObject_17$1;var PageTableOfContents$1=function PageTableOfContents(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onPageSelected=_a.onPageSelected,className=_a.className,selectedPageId=_a.selectedPageId,isLoading=_a.isLoading,disableScrollableList=_a.disableScrollableList;var user=useCurrentUser();var _b=getRootNodes(),rootNodes=_b.rootNodes,path=_b.path;var _c=useState$2(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsx$1(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsx$1(FormattedMessageWithStyle,{id:"ContentEditor.parentPage.emptyToc",tagName:"div",className:className},void 0);}var activePage=activePageId&&navigationContext.siblings.find(function(p){return p.id===activePageId;});var nodesToDisplay=sortPageNodesByGroupAndPosition(user.groups,(searchResult||rootNodes).filter(function(p){return filterChildren(p,activePage);}));return jsx$1(Fragment,{children:jsxs("div",__assign({className:className},{children:[jsx$1("div",__assign({"data-toc-search-container":true},{children:jsx$1(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsx$1(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsx$1(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsx$1(TocList,{children:nodesToDisplay.map(function(c){return jsx$1(ToCItem,{children:jsx$1(PageNode,{basePath:basePath,node:c,activePage:activePage,navigationContext:searchResult?null:navigationContext,loadChildren:loadChildren,path:path,isRootNode:true,onPageSelected:onPageSelected,selectedPageId:selectedPageId},void 0)},c.id+!!searchResult);})},void 0)}),void 0)]}),void 0)},void 0);function getRootNodes(){if(!(navigationContext===null||navigationContext===void 0?void 0:navigationContext.parent)){return {rootNodes:(navigationContext===null||navigationContext===void 0?void 0:navigationContext.siblings)||[],path:[]};}var path=[];var currentParent=navigationContext.parent;while(currentParent!=null&¤tParent.parent!=null){path.push(currentParent.id);currentParent=currentParent.parent;}return {rootNodes:(currentParent===null||currentParent===void 0?void 0:currentParent.children)||[],path:path};}};var TocEmptyList=_styled(EmptyList).withConfig({displayName:"PageTableOfContents__TocEmptyList",componentId:"sc-3llzkd-0"})(templateObject_1$y||(templateObject_1$y=__makeTemplateObject(["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"],["\n i {\n padding-top: 0;\n font-size: ","px;\n }\n"])),fontSizeLarger+10);var TocListContainer=_styled.div.withConfig({displayName:"PageTableOfContents__TocListContainer",componentId:"sc-3llzkd-1"})(templateObject_3$k||(templateObject_3$k=__makeTemplateObject(["\n padding-top: ","px;\n\n ","\n"],["\n padding-top: ","px;\n\n ","\n"])),spacingXs,function(p){return p.isScrollable&&css$2(templateObject_2$p||(templateObject_2$p=__makeTemplateObject(["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "],["\n overflow-y: auto;\n overflow-x: hidden;\n height: calc(100% - 52px); /* full height - search box height */\n "])));});var TocList=_styled.ul.withConfig({displayName:"PageTableOfContents__TocList",componentId:"sc-3llzkd-2"})(templateObject_4$c||(templateObject_4$c=__makeTemplateObject(["\n list-style: none;\n padding: 0;\n margin: 0;\n"],["\n list-style: none;\n padding: 0;\n margin: 0;\n"])));var ToCItem=_styled.li.withConfig({displayName:"PageTableOfContents__ToCItem",componentId:"sc-3llzkd-3"})(templateObject_5$b||(templateObject_5$b=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingM);_styled(PageTableOfContents$1).withConfig({displayName:"PageTableOfContents__StyledPageToC",componentId:"sc-3llzkd-4"})(templateObject_6$5$1||(templateObject_6$5$1=__makeTemplateObject(["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"],["\n height: 100%;\n\n [data-toc-scrollable-container] {\n overflow-x: auto;\n padding-left: ","px;\n /* ensure node titles are aligned with SearchBox input & Close button */\n /* if the title is too long, horizontal scrollbar is shown */\n margin-right: ","px;\n }\n\n [data-nothing-found],\n [data-toc-search-container] {\n padding: 0 ","px;\n box-sizing: border-box;\n }\n\n [data-page-toc-node] {\n &[data-is-active='true'] {\n &::before {\n left: -10px;\n right: -10px;\n }\n }\n }\n"])),spacingM,spacingM,spacingM);var templateObject_1$y,templateObject_2$p,templateObject_3$k,templateObject_4$c,templateObject_5$b,templateObject_6$5$1;var PageTableOfContentsDialog=function PageTableOfContentsDialog(_a){var isOpen=_a.isOpen,navigationContext=_a.navigationContext,activePageId=_a.activePageId,loadChildren=_a.loadChildren,onSearch=_a.onSearch,onDismiss=_a.onDismiss,basePath=_a.basePath;var formatMessage=useIntl().formatMessage;if(!navigationContext){return null;}return jsx$1(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsx$1(DialogGlobalStyle,{},void 0),jsx$1(PageTableOfContents$1,{basePath:basePath,activePageId:activePageId,navigationContext:navigationContext,loadChildren:loadChildren,onSearch:onSearch,onPageSelected:onDismiss,disableScrollableList:true},void 0)]}),void 0)}),void 0);};var DialogContent=_styled.div.withConfig({displayName:"PageTableOfContentsDialog__DialogContent",componentId:"sc-z2sdu7-0"})(templateObject_1$x||(templateObject_1$x=__makeTemplateObject(["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"],["\n margin-top: 5px;\n\n @media (min-width: ","px) {\n width: 450px;\n }\n"])),minScreenSize.small);var DialogGlobalStyle=createGlobalStyle(templateObject_2$o||(templateObject_2$o=__makeTemplateObject(["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"],["\n .dialog-toc {\n a {\n text-decoration: none;\n }\n\n .ms-Dialog-main {\n @media (max-width: ","px) {\n width: 100% !important;\n }\n }\n\n .ms-Dialog-inner {\n overflow-x: hidden;\n }\n }\n"])),maxScreenSize.small);var templateObject_1$x,templateObject_2$o;var LanguageSelector=function LanguageSelector(props){var history=useHistory();var currentUser=useCurrentUser();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var getAllLanguagesLocalized=useLanguageApi().getAllLanguagesLocalized;var intl=useIntl();var formatMessage=intl.formatMessage;var languageDefinitions=usePromise$2(function(){return getAllLanguagesLocalized(intl);})[0];var features=useFeatures();if(languageDefinitions==null){return null;}if(props.chromeless)return jsx$1(ActionButton,__assign({iconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout'},className:classNames(props.className,'header-button')},{children:formatMessage({id:"Generic.languages."+props.selectedLanguage})}),void 0);return jsx$1(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsx$1(LanguageSelectorButton,{menuIconProps:{iconName:'World'},menuProps:{items:getContextualMenuItems(),className:'lt-reach-callout',isBeakVisible:props.showBeak},className:classNames(props.className,'header-button'),"data-language-selector-button":true,ariaLabel:formatMessage({id:'AriaLabel.autoTranslation'})},void 0)}),void 0);function getContextualMenuItems(){if(props.languages==null){return [];}var menuItems=[];var preferredLanguageItem=getPreferredLanguageItem();if(preferredLanguageItem){menuItems.push(preferredLanguageItem);}var activeLanguagesItems=getActiveLanguagesItems();activeLanguagesItems.sort(function(a,b){return a.text.localeCompare(b.text);});menuItems=menuItems.concat(activeLanguagesItems);if(!props.hideEditLanguagePreferences){var editLanguagePreferencesItem={key:'edit',text:formatMessage({id:'Generic.editLanguagePreferences'}),iconProps:{iconName:'PlayerSettings'},onClick:handleEditLanguagePreferences,className:'lt-reach-languageselector-menu-item'};menuItems.push(editLanguagePreferencesItem);}return menuItems;}function handleEditLanguagePreferences(){if(props.onEditLanguagePreferencesClick){props.onEditLanguagePreferencesClick();}else {history.push(buildPath('/user'));}}function getActiveLanguagesItems(){return props.languages.map(function(l){var fullLanguage=languageDefinitions.find(function(ld){return ld.code===l;});return {key:l,text:fullLanguage.localizedName,iconProps:{iconName:'World'},onClick:function(){return props.onLanguageChange(l.toString());},className:classNames('lt-reach-languageselector-menu-item',l===props.selectedLanguage&&'selected')};});}function getPreferredLanguageItem(){if(!features.automaticTranslation){return null;}if(!props.onTranslateClick){return null;}var preferredContentLanguage=getPreferredContentLanguage(currentUser);var shouldAddPreferredContentLanguage=preferredContentLanguage!=null&&!contentLanguagesWithoutAutomaticTranslation.includes(preferredContentLanguage)&&allAvailableContentLanguages.includes(preferredContentLanguage)&&props.languages.indexOf(preferredContentLanguage)<0;if(!shouldAddPreferredContentLanguage){return null;}return {key:preferredContentLanguage,text:formatMessage({id:'Generic.automaticTranslation'},{language:formatMessage({id:"Generic.languages."+preferredContentLanguage})}),iconProps:{iconName:'Robot'},onClick:function(){return props.onTranslateClick(preferredContentLanguage);},className:classNames('lt-reach-languageselector-menu-item',preferredContentLanguage===props.selectedLanguage&&'selected')};}};var LanguageSelectorButton=_styled(IconButton).withConfig({displayName:"LanguageSelector__LanguageSelectorButton",componentId:"sc-48zwek-0"})(templateObject_1$w||(templateObject_1$w=__makeTemplateObject(["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"],["\n && {\n height: 100%;\n margin: 0;\n background-color: transparent;\n }\n"])));var templateObject_1$w;_styled.article.withConfig({displayName:"DetailViewArticle__Host",componentId:"sc-we2q7z-0"})(templateObject_1$v||(templateObject_1$v=__makeTemplateObject(["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"],["\n min-width: 300px;\n width: 100%;\n\n flex: 1 0 auto;\n display: flex;\n flex-flow: column nowrap;\n\n @media (min-width: ","px) {\n box-shadow: 1px 1px 4px grey;\n max-width: ","px;\n }\n"])),minScreenSize.large+1,maxContentWidth);var templateObject_1$v;_styled(ItemMetaInfo).withConfig({displayName:"NewsDetailViewMetaInfo__DetailMetaInfo",componentId:"sc-kib7we-0"})(templateObject_1$u||(templateObject_1$u=__makeTemplateObject(["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"],["\n display: flex;\n font-size: ","px;\n margin-top: 12px;\n"])),fontSizeSmall);var templateObject_1$u;var StateIcon=function StateIcon(_a){var status=_a.status,isActive=_a.isActive,_b=_a.width,width=_b===void 0?16:_b,activeColor=_a.activeColor;var textColors=useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsx$1(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsx$1(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsx$1(Ready,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}return null;};var Draft=function Draft(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?16.25:_b;var ratio=20/16.25;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 16.25 20",enableBackground:"new 0 0 16.25 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25V0h0.89l5.36,5.361V6.25H10z M11.25,5h2.861L11.25,2.139V5z M10,0H9.25v1.25H10V0z M7.675,1.25H6.1\n\tV0h1.575V1.25z M4.525,1.25H2.95V0h1.575V1.25z M1.25,17.057H0v-1.567h1.25V17.057z M1.25,13.921H0v-1.568h1.25V13.921z\n\t M1.25,10.784H0V9.216h1.25V10.784z M1.25,7.647H0V6.08h1.25V7.647z M1.25,4.512H0V2.943h1.25V4.512z M13.375,\n\t 20h-1.5v-1.25h1.5V20z\n\t M10.375,20h-1.5v-1.25h1.5V20z M7.375,20h-1.5v-1.25h1.5V20z M4.375,20h-1.5v-1.25h1.5V20z M16.25,\n\t 16.964H15v-1.661h1.25V16.964z\n\t M16.25,13.643H15v-1.661h1.25V13.643z M16.25,10.321H15V8.66h1.25V10.321z M16.25,6.25H15V7h1.25V6.25z\n\t M1.25,18.75H0V20h1.25\n\tV18.75z M1.25,0H0v1.25h1.25V0z M16.25,18.75H15V20h1.25V18.75z"},void 0)}),void 0);};var Ready=function Ready(_a){var color=_a.color,className=_a.className,_b=_a.width,width=_b===void 0?18.564:_b;var ratio=20/18.564;return jsx$1("svg",__assign({className:className,version:"1.1",id:"Layer_1",x:"0px",y:"0px",width:width+"px",height:width*ratio+"px",viewBox:"0 0 18.564 20",enableBackground:"new 0 0 18.564 20"},{children:jsx$1("path",{fill:color,d:"M10,6.25v-5H1.25v17.5H10V20H0V0h10.889l5.361,5.361V12.5L15,13.75v-7.5H10z M18.564,14.551L13.125,20\n \tl-2.627-2.637l0.879-0.879l1.748,1.738l4.561-4.551L18.564,14.551z M11.25,5h2.861L11.25,2.139V5z"},void 0)}),void 0);};function useCommonEditorApi(){var api=useApi();return useMemo(function(){return {list:list,getTaskViewCounts:getTaskViewCounts};function list(type,filter,token,sortDefinition){var params=Object.assign({},filter,{token:token},sortDefinition);return api.custom("editor/"+type+"?"+queryString.stringify(params)).get().then(function(res){return res.body().data();});}function getTaskViewCounts(type,groupId){return __awaiter(this,void 0,void 0,function(){var response;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,api.custom("editor/"+type+"/taskcounts?"+queryString.stringify({groupId:groupId})).get(groupId)];case 1:response=_a.sent();return [4/*yield*/,response.body().data()];case 2:return [2/*return*/,_a.sent()];}});});}},[api]);}var SortFieldsDefinitionBuilder=/** @class */function(){function SortFieldsDefinitionBuilder(){this.sort=[];}SortFieldsDefinitionBuilder.prototype.addSortField=function(field,direction){this.sort.push(field+":"+SortFieldsDefinitionBuilder.getSortDirectionAsString(direction));return this;};SortFieldsDefinitionBuilder.getSortDirectionAsString=function(direction){return direction===SortDirection.asc?'asc':'desc';};return SortFieldsDefinitionBuilder;}();var EventSortFieldsDefinitionBuilder=/** @class */function(_super){__extends(EventSortFieldsDefinitionBuilder,_super);function EventSortFieldsDefinitionBuilder(){return _super!==null&&_super.apply(this,arguments)||this;}EventSortFieldsDefinitionBuilder.create=function(){return new EventSortFieldsDefinitionBuilder();};return EventSortFieldsDefinitionBuilder;}(SortFieldsDefinitionBuilder);EventSortFieldsDefinitionBuilder.create().addSortField('startDate',SortDirection.desc);EventSortFieldsDefinitionBuilder.create().addSortField('publishingDate',SortDirection.desc);var BaseFilterDefinitionImpl=/** @class */function(){function BaseFilterDefinitionImpl(){}return BaseFilterDefinitionImpl;}();__spreadArray(__spreadArray([],Object.keys(new BaseFilterDefinitionImpl())),['hideChrome','teams']);_styled.div.withConfig({displayName:"InsertVideoDialog__VideoHost",componentId:"sc-12gp7sa-0"})(templateObject_1$t||(templateObject_1$t=__makeTemplateObject(["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"],["\n max-width: 510px;\n margin-top: ","px;\n\n .video-view-container--youtube {\n &:after {\n padding-bottom: calc(9 / 16 * 100%);\n }\n }\n"])),spacingS);var templateObject_1$t;_styled.div.withConfig({displayName:"KeywordPickerGroup__Host",componentId:"sc-pu16jm-0"})(templateObject_1$s||(templateObject_1$s=__makeTemplateObject(["\n margin-bottom: ","px;\n"],["\n margin-bottom: ","px;\n"])),spacingS);_styled(ActionButton).withConfig({displayName:"KeywordPickerGroup__GroupButton",componentId:"sc-pu16jm-1"})(templateObject_2$n||(templateObject_2$n=__makeTemplateObject(["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"],["\n && {\n height: auto;\n font-size: ","px;\n padding: 0;\n border: 0;\n\n i {\n font-size: ","px;\n\n &:first-child {\n margin: 0;\n }\n }\n }\n"])),fontSizeNormal,fontSizeSmall);_styled(Icon).withConfig({displayName:"KeywordPickerGroup__CheckMarkIcon",componentId:"sc-pu16jm-2"})(templateObject_3$j||(templateObject_3$j=__makeTemplateObject(["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"],["\n margin-right: 6px;\n margin-left: 12px;\n width: 15px;\n"])));_styled.span.withConfig({displayName:"KeywordPickerGroup__ButtonLabel",componentId:"sc-pu16jm-3"})(templateObject_5$a||(templateObject_5$a=__makeTemplateObject(["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"],["\n display: inline-flex;\n flex: 1 0 auto;\n\n ","\n"])),function(p){return !p.isSelected&&css$2(templateObject_4$b||(templateObject_4$b=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled.ul.withConfig({displayName:"KeywordPickerGroup__KeywordsList",componentId:"sc-pu16jm-4"})(templateObject_7$3$1||(templateObject_7$3$1=__makeTemplateObject(["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"],["\n ","\n padding: 0;\n margin: 0 0 0 ","px;\n list-style: none;\n"])),function(p){return p.isCollapsed&&css$2(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled.li.withConfig({displayName:"KeywordPickerGroup__KeywordItem",componentId:"sc-pu16jm-5"})(templateObject_8$3$1||(templateObject_8$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"],["\n display: flex;\n align-items: center;\n margin-top: 9px;\n"])));var templateObject_1$s,templateObject_2$n,templateObject_3$j,templateObject_4$b,templateObject_5$a,templateObject_6$4$1,templateObject_7$3$1,templateObject_8$3$1;_styled.div.withConfig({displayName:"KeywordPicker__KeywordPickerTree",componentId:"sc-1ejjfwa-0"})(templateObject_1$r||(templateObject_1$r=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled(ToggleAllButtons).withConfig({displayName:"KeywordPicker__StyledToggleAllButtons",componentId:"sc-1ejjfwa-1"})(templateObject_2$m||(templateObject_2$m=__makeTemplateObject(["\n padding-left: 4px;\n"],["\n padding-left: 4px;\n"])));_styled.div.withConfig({displayName:"KeywordPicker__Host",componentId:"sc-1ejjfwa-2"})(templateObject_3$i||(templateObject_3$i=__makeTemplateObject(["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"],["\n overflow-x: hidden;\n overflow-y: auto;\n\n .ms-TextField-fieldGroup {\n background: none;\n }\n"])));_styled.div.withConfig({displayName:"KeywordPicker__SearchHost",componentId:"sc-1ejjfwa-3"})(templateObject_4$a||(templateObject_4$a=__makeTemplateObject(["\n position: relative;\n margin-bottom: 8px;\n"],["\n position: relative;\n margin-bottom: 8px;\n"])));_styled(IconButton).withConfig({displayName:"KeywordPicker__SearchCancelButton",componentId:"sc-1ejjfwa-4"})(templateObject_5$9||(templateObject_5$9=__makeTemplateObject(["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"],["\n position: absolute;\n top: 0;\n right: 0;\n z-index: 10;\n\n &&&:focus::after {\n outline-offset: -2px;\n }\n"])));var templateObject_1$r,templateObject_2$m,templateObject_3$i,templateObject_4$a,templateObject_5$9;var $$1$1=_export;var requireObjectCoercible$c=requireObjectCoercible$b;var isRegExp=isRegexp;var getRegExpFlags=regexpFlags$1$1;var wellKnownSymbol$1=wellKnownSymbol$l;var REPLACE$2=wellKnownSymbol$1('replace');var RegExpPrototype$3=RegExp.prototype;// `String.prototype.replaceAll` method
|
|
126364
126362
|
// https://github.com/tc39/proposal-string-replace-all
|
|
126365
|
-
$$f({target:'String',proto:true},{replaceAll:function replaceAll(searchValue,replaceValue){var O=requireObjectCoercible$c(this);var IS_REG_EXP,flags,replacer,string,searchString,template,result,position,index;if(searchValue!=null){IS_REG_EXP=isRegExp(searchValue);if(IS_REG_EXP){flags=String(requireObjectCoercible$c('flags'in RegExpPrototype$3?searchValue.flags:getRegExpFlags.call(searchValue)));if(!~flags.indexOf('g'))throw TypeError('`.replaceAll` does not allow non-global regexes');}replacer=searchValue[REPLACE$2];if(replacer!==undefined){return replacer.call(searchValue,O,replaceValue);}}string=String(O);searchString=String(searchValue);if(searchString==='')return replaceAll.call(string,/(?:)/g,replaceValue);template=string.split(searchString);if(typeof replaceValue!=='function'){return template.join(String(replaceValue));}result=template[0];position=result.length;for(index=1;index<template.length;index++){result+=String(replaceValue(searchString,position,string));position+=searchString.length+template[index].length;result+=template[index];}return result;}});_styled.div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$q||(templateObject_1$q=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n position: relative;\n"],["\n display: flex;\n align-items: flex-end;\n position: relative;\n"])));_styled.textarea.withConfig({displayName:"Textarea__StyledTextarea",componentId:"sc-170lrb4-1"})(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"],["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"])),InputPlaceholder('font-style: italic'));_styled(IconButton$1).withConfig({displayName:"Textarea__StyledIconButton",componentId:"sc-170lrb4-2"})(templateObject_3$h||(templateObject_3$h=__makeTemplateObject(["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"],["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"])));var templateObject_1$q,templateObject_2$l,templateObject_3$h;createGlobalStyle(templateObject_1$p||(templateObject_1$p=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));createGlobalStyle(templateObject_2$k||(templateObject_2$k=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});_styled.div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$g||(templateObject_3$g=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$p,templateObject_2$k,templateObject_3$g;var InsertFilesDialogHost=_styled.div.withConfig({displayName:"InsertFilesButton__InsertFilesDialogHost",componentId:"sc-1q7gx3n-0"})(templateObject_2$j||(templateObject_2$j=__makeTemplateObject(["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])),function(p){return p.isActive&&css$2(templateObject_1$o||(templateObject_1$o=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "])));},spacingM);_styled.p.withConfig({displayName:"InsertFilesButton__DragAndDropText",componentId:"sc-1q7gx3n-1"})(templateObject_3$f||(templateObject_3$f=__makeTemplateObject(["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"],["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"])),fontSizeSmall,spacingS);_styled(DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$9$1||(templateObject_4$9$1=__makeTemplateObject(["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"],["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"])),spacingM);_styled.div.withConfig({displayName:"InsertFilesButton__ButtonsContainer",componentId:"sc-1q7gx3n-3"})(templateObject_5$8||(templateObject_5$8=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var templateObject_1$o,templateObject_2$j,templateObject_3$f,templateObject_4$9$1,templateObject_5$8;_styled(InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$n||(templateObject_1$n=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled(PrimaryButton).withConfig({displayName:"InsertImagesButton__StyledButton",componentId:"sc-63tjy6-1"})(templateObject_2$i||(templateObject_2$i=__makeTemplateObject(["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"],["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"])));_styled.div.withConfig({displayName:"InsertImagesButton__Text",componentId:"sc-63tjy6-2"})(templateObject_3$e||(templateObject_3$e=__makeTemplateObject(["\n max-width: 100%;\n font-size: large;\n"],["\n max-width: 100%;\n font-size: large;\n"])));var templateObject_1$n,templateObject_2$i,templateObject_3$e;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled.div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$m||(templateObject_1$m=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$d||(templateObject_3$d=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$m,templateObject_2$h,templateObject_3$d;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$l||(templateObject_1$l=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$l;_styled.div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$k||(templateObject_1$k=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled.p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$g||(templateObject_2$g=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$k,templateObject_2$g;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$f||(templateObject_2$f=__makeTemplateObject(["\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$c||(templateObject_3$c=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$j$1,templateObject_2$f,templateObject_3$c,templateObject_4$8$1,templateObject_5$7$1;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$i$1||(templateObject_1$i$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$e||(templateObject_2$e=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$i$1,templateObject_2$e;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$h$1||(templateObject_1$h$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$d||(templateObject_2$d=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$b||(templateObject_3$b=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$h$1,templateObject_2$d,templateObject_3$b,templateObject_4$7$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var PageTitle=function PageTitle(_a){var page=_a.page,title=_a.title,search=_a.search,className=_a.className;var user=useCurrentUser();var isDocument=page.pageType===PageType.Document;var language=getLanguageForPage(page,user);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var handleExternalContentClick=useExternalContentClickHandler();var pageTitle=jsx$1(Fragment,{children:search?jsx$1(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0):title},void 0);if(page.useExternalContent){var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(page,preferredContentLanguage);var targetRoute=NewsService.getNewsRoute(buildPath('/pages'),page.id,title);return jsx$1(Title$1$1,{children:jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsx$1(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsx$1(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var Title$1$1=_styled.h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$g$1||(templateObject_1$g$1=__makeTemplateObject(["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"],["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"])),spacingS+5,spacingS,fontSizeMedium);var FileIcon=_styled(Icon).withConfig({displayName:"PageTitle__FileIcon",componentId:"sc-gsx6ad-1"})(templateObject_2$c||(templateObject_2$c=__makeTemplateObject(["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"],["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"])),fontSizeMedium+4,spacingS);var StyledNavLink=_styled(NavLink).withConfig({displayName:"PageTitle__StyledNavLink",componentId:"sc-gsx6ad-2"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$g$1,templateObject_2$c,templateObject_3$a$1;_styled.div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$f$1||(templateObject_1$f$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageTitle).withConfig({displayName:"PageCard__StyledPageTitle",componentId:"sc-13xtreq-1"})(templateObject_2$b$1||(templateObject_2$b$1=__makeTemplateObject(["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"],["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"])));_styled(Intro$3).withConfig({displayName:"PageCard__StyledIntro",componentId:"sc-13xtreq-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"])),spacingS,spacingS);_styled.div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"],["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageCard__Inner",componentId:"sc-13xtreq-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"],["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"])),spacingM,spacingS);_styled(DocumentDownloadButton).withConfig({displayName:"PageCard__StyledDocumentDownloadButton",componentId:"sc-13xtreq-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n align-self: flex-start;\n z-index: 1;\n"],["\n align-self: flex-start;\n z-index: 1;\n"])));var templateObject_1$f$1,templateObject_2$b$1,templateObject_3$9$1,templateObject_4$6$1,templateObject_5$5$1,templateObject_6$2$1;_styled.p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$e$1||(templateObject_1$e$1=__makeTemplateObject(["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"],["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"])),spacingM-5,fontSizeSmall);_styled.div.withConfig({displayName:"PageListItemBody__CutContentContainer",componentId:"sc-7voum-1"})(templateObject_2$a$1||(templateObject_2$a$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"])),spacingM-5);_styled.p.withConfig({displayName:"PageListItemBody__CutContent",componentId:"sc-7voum-2"})(templateObject_3$8$1||(templateObject_3$8$1=__makeTemplateObject(["\n padding: 0;\n margin: 0;\n ","\n"],["\n padding: 0;\n margin: 0;\n ","\n"])),LineClamp(5,fontSizeSmall,1.5));_styled(ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"],["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"])),spacingXs,spacingXs,spacingXs,fontSizeSmaller);var templateObject_1$e$1,templateObject_2$a$1,templateObject_3$8$1,templateObject_4$5$1;_styled.div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$d$1||(templateObject_1$d$1=__makeTemplateObject(["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"],["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"])),CardBorderInline(2,2),spacingM);_styled.div.withConfig({displayName:"PageListItem__Keywords",componentId:"sc-lz5d51-1"})(templateObject_2$9$1||(templateObject_2$9$1=__makeTemplateObject(["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageListItem__LastUpdated",componentId:"sc-lz5d51-2"})(templateObject_3$7$1||(templateObject_3$7$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$4$1||(templateObject_4$4$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled.div.withConfig({displayName:"PageListItem__Inner",componentId:"sc-lz5d51-4"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var templateObject_1$d$1,templateObject_2$9$1,templateObject_3$7$1,templateObject_4$4$1,templateObject_5$4$1;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
|
|
126366
|
-
var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxs(Host$2$1,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsx$1(PageLinkButton,{isNextNode:false,basePath:basePath,page:previousPage,icon:"ChevronLeftSmall","data-detail-page-navigation-previous-node":previousPage.id,"data-detail-page-navigation-node":previousPage.id},void 0),nextPage&&jsx$1(PageLinkButton,{isNextNode:true,className:"next-page-link-button",basePath:basePath,page:nextPage,icon:"ChevronRightSmall","data-detail-page-navigation-next-node":nextPage.id,"data-detail-page-navigation-node":nextPage.id},void 0)]}),void 0);function getSibling(offset){var index=pages.findIndex(function(s){return s.id===activePageId;});return pages[index+offset];}};var Host$2$1=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Host",componentId:"sc-19ae9g3-0"})(templateObject_1$c$1||(templateObject_1$c$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n"],["\n display: flex;\n flex-wrap: wrap;\n"])));var PageLinkButton=function PageLinkButton(_a){var basePath=_a.basePath,page=_a.page,icon=_a.icon,isNextNode=_a.isNextNode,className=_a.className,props=__rest(_a,["basePath","page","icon","isNextNode","className"]);var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var title=getTitle(page,user,formatMessage);return jsxs(Link,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0),jsx$1(Content$2$1,__assign({},props,{isNextNode:isNextNode},{children:jsx$1("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0)]}),void 0);function getUrl(){var baseUrl=NewsService.getNewsRoute(basePath,page.id,title);return page.useExternalContent?baseUrl+"?"+queryString.stringify({noRedirect:true}):baseUrl;}};var Link=_styled(NavLink).withConfig({displayName:"PagesDetailViewNavigation__Link",componentId:"sc-19ae9g3-1"})(templateObject_2$8$1||(templateObject_2$8$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"])),spacingS,spacingS,maxScreenSize.small,spacingS,function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.textColors.default;});var LinkIcon=_styled(Icon).withConfig({displayName:"PagesDetailViewNavigation__LinkIcon",componentId:"sc-19ae9g3-2"})(templateObject_3$6$1||(templateObject_3$6$1=__makeTemplateObject(["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"],["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"])),fontSizeNormal,spacingM);var Content$2$1=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Content",componentId:"sc-19ae9g3-3"})(templateObject_5$3$1||(templateObject_5$3$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"])),function(p){return p.isNextNode&&css$2(templateObject_4$3$1||(templateObject_4$3$1=__makeTemplateObject(["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "],["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "])));});var templateObject_1$c$1,templateObject_2$8$1,templateObject_3$6$1,templateObject_4$3$1,templateObject_5$3$1;_styled(Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$b$1||(templateObject_1$b$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled(NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$7$1||(templateObject_2$7$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);createGlobalStyle(templateObject_3$5$1||(templateObject_3$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$b$1,templateObject_2$7$1,templateObject_3$5$1;_styled.div.withConfig({displayName:"GroupNotificationsSettings__Host",componentId:"sc-1z0rxrb-0"})(templateObject_1$a$1||(templateObject_1$a$1=__makeTemplateObject(["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"],["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"GroupNotificationsSettings__Title",componentId:"sc-1z0rxrb-1"})(templateObject_2$6$1||(templateObject_2$6$1=__makeTemplateObject(["\n margin-top: 0;\n"],["\n margin-top: 0;\n"])));_styled.div.withConfig({displayName:"GroupNotificationsSettings__Infos",componentId:"sc-1z0rxrb-2"})(templateObject_3$4$1||(templateObject_3$4$1=__makeTemplateObject(["\n color: ",";\n padding-left: 55px;\n"],["\n color: ",";\n padding-left: 55px;\n"])),function(p){return p.theme.palette.neutralTertiaryAlt;});var templateObject_1$a$1,templateObject_2$6$1,templateObject_3$4$1;function getPostGroups(user){return getGroupsWithExplicitMinRole(GroupRoles.LimitedReader,user,function(g){return g.allowPosts;});}function getPostsBaseRoute(post,user){var _a;var postGroups=getPostGroups(user);var subscriptionHandle=(_a=user.subscription.subscriptionHandle)!==null&&_a!==void 0?_a:user.subscription.id;return postGroups.length>1?"/"+subscriptionHandle+"/posts/groups/"+((post===null||post===void 0?void 0:post.groupId)||''):"/"+subscriptionHandle+"/posts";}function getPostsHashtagFilterRoute(post,user,hashtag){return getPostsBaseRoute(post,user)+"?"+queryString.stringify({search:""+hashtag});}var PostReplies=function PostReplies(_a){var className=_a.className,post=_a.post,comments=_a.comments,autoFocusReplyField=_a.autoFocusReplyField,onReplyAdded=_a.onReplyAdded,onReplyDeleted=_a.onReplyDeleted,onThreadReply=_a.onThreadReply;var user=useCurrentUser();var searchPostMentionUsers=usePostsApi().searchPostMentionUsers;if(!post||!post.id){return null;}return jsx$1(StyledPagedCommentsSection,{className:className,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},type:ItemResourceTypes.Posts,scope:ConversationScope.Posts,itemId:post.id,groupIds:[post.groupId],readOnly:false,pageSize:5,initialPageSize:2,initialComments:comments,onCommentAdded:onReplyAdded,onCommentDeleted:onReplyDeleted,noItemsYetStringResourceKey:"Posts.replies.empty",autoFocusReplyField:autoFocusReplyField,baseAttachmentPath:"/posts/"+post.id+"/comments",getHashtagFilterRoute:function(hashtag){return getPostsHashtagFilterRoute(post,user,hashtag);},onThreadReply:onThreadReply},post.id);};var StyledPagedCommentsSection=_styled(PagedCommentsSection).withConfig({displayName:"PostReplies__StyledPagedCommentsSection",componentId:"sc-8mrgcg-0"})(templateObject_1$9$1||(templateObject_1$9$1=__makeTemplateObject(["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"],["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"])));var templateObject_1$9$1;var PostEditor=function PostEditor(_a){var className=_a.className,post=_a.post,onBeforeSave=_a.onBeforeSave,onSaved=_a.onSaved,onCancel=_a.onCancel,keywordSettings=_a.keywordSettings;var features=useFeatures();var _b=usePostsApi(),searchPostMentionUsers=_b.searchPostMentionUsers,updatePost=_b.updatePost;var _c=useContext(LazySubscriptionContext),allKeywords=_c.allKeywords,keywordsByGroupId=_c.keywordsByGroupId;var _d=useNotificationContext(),showToast=_d.showToast,showError=_d.showError;if(allKeywords==null||keywordsByGroupId==null){return null;}return jsx$1(EditCommentWithAttachments,{className:className,onCancel:onCancel,content:post.content,onSave:handleSavePost,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},inputTheme:"dark",item:post,basePath:'/posts',allowKeywords:features.keywords&&features.postKeywords,availableKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords,mandatoryKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords,keywords:post.keywords,saveOnCtrlEnter:true},void 0);function handleSavePost(newContent,attachments,keywords){return __awaiter(this,void 0,void 0,function(){var updatedPost,error_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);onBeforeSave(__assign(__assign({},post),{content:newContent,attachments:attachments,keywords:keywords}));return [4/*yield*/,updatePost(post.id,newContent,attachments,keywords)];case 1:updatedPost=_a.sent();onSaved(updatedPost);showToast('Posts.successfullyUpdated');return [3/*break*/,3];case 2:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}};_styled(IconButton).withConfig({displayName:"PostFollowButton__StyledIconButton",componentId:"sc-1i97syp-0"})(templateObject_1$8$1||(templateObject_1$8$1=__makeTemplateObject(["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"],["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"])));var templateObject_1$8$1;var PostGroup=function PostGroup(_a){var groupId=_a.groupId,to=_a.to,className=_a.className;var intl=useIntl();var user=useCurrentUser();var group=user.groups.find(function(g){return g.id===groupId;});var groupName=getGroupName(group,user,intl);return jsx$1(Group,__assign({"data-post-group":groupId,title:groupName,to:to,className:className},{children:jsx$1("span",{children:groupName},void 0)}),void 0);};var Group=_styled(NavLink).withConfig({displayName:"PostGroup__Group",componentId:"sc-182l34m-0"})(templateObject_1$7$1||(templateObject_1$7$1=__makeTemplateObject(["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"],["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"])),fontSizeSmall,function(){return HighlightBubble();});var templateObject_1$7$1;_styled.div.withConfig({displayName:"PostDisplay__Host",componentId:"sc-1tope3b-0"})(templateObject_1$6$1||(templateObject_1$6$1=__makeTemplateObject(["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"],["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"])),CardBorderInline(2,2),fontSizeSmall,spacingM);_styled.div.withConfig({displayName:"PostDisplay__Header",componentId:"sc-1tope3b-1"})(templateObject_2$5$1||(templateObject_2$5$1=__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n"],["\n display: flex;\n align-items: flex-start;\n"])));var avatarWidth=40;var maxButtonsWidth=120;// max 4 buttons at 30 px each (translate, notifications, like and context menu)
|
|
126367
|
-
var paddingLeft=spacingS;var postGroupWidth=250;var postGroupWidthSmall=215;_styled.div.withConfig({displayName:"PostDisplay__HeaderMetadata",componentId:"sc-1tope3b-2"})(templateObject_3$3$1||(templateObject_3$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"],["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"])),fontSizeSmall,paddingLeft,avatarWidth,maxButtonsWidth,paddingLeft,function(p){return p.addSafetySpace?postGroupWidth:0;},maxScreenSize.medium,avatarWidth,maxButtonsWidth,paddingLeft);_styled.div.withConfig({displayName:"PostDisplay__Content",componentId:"sc-1tope3b-3"})(templateObject_4$2$1||(templateObject_4$2$1=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"])));_styled.div.withConfig({displayName:"PostDisplay__ActionButtons",componentId:"sc-1tope3b-4"})(templateObject_5$2$1||(templateObject_5$2$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: auto;\n"],["\n display: flex;\n align-items: center;\n margin-left: auto;\n"])));_styled.div.withConfig({displayName:"PostDisplay__PostDisplayName",componentId:"sc-1tope3b-5"})(templateObject_6$1$1||(templateObject_6$1$1=__makeTemplateObject(["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));_styled(DateTime).withConfig({displayName:"PostDisplay__PostDateTime",componentId:"sc-1tope3b-6"})(templateObject_7$1$1||(templateObject_7$1$1=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);_styled(ActionButton).withConfig({displayName:"PostDisplay__AddReplyButton",componentId:"sc-1tope3b-7"})(templateObject_8$1$1||(templateObject_8$1$1=__makeTemplateObject(["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"],["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"])),spacingM,function(p){return p.theme.palette.accent;});_styled.div.withConfig({displayName:"PostDisplay__InnerHost",componentId:"sc-1tope3b-8"})(templateObject_10$d||(templateObject_10$d=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"],["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"])),postsSectionPadding,function(p){return p.highlight&&css$2(templateObject_9$1$1||(templateObject_9$1$1=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.accent;});});_styled(PostReplies).withConfig({displayName:"PostDisplay__StyledPostComments",componentId:"sc-1tope3b-9"})(templateObject_11$8||(templateObject_11$8=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});_styled(PostEditor).withConfig({displayName:"PostDisplay__StyledPostEditor",componentId:"sc-1tope3b-10"})(templateObject_12$7||(templateObject_12$7=__makeTemplateObject(["\n margin-top: 7px;\n position: relative;\n"],["\n margin-top: 7px;\n position: relative;\n"])));_styled(NavLink).withConfig({displayName:"PostDisplay__PostLink",componentId:"sc-1tope3b-11"})(templateObject_13$6||(templateObject_13$6=__makeTemplateObject(["\n display: block;\n width: 100%;\n"],["\n display: block;\n width: 100%;\n"])));_styled(PostGroup).withConfig({displayName:"PostDisplay__StyledPostGroup",componentId:"sc-1tope3b-12"})(templateObject_14$6||(templateObject_14$6=__makeTemplateObject(["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"],["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"])),spacingM,postGroupWidth,maxScreenSize.medium,spacingS,postGroupWidthSmall);_styled(LikeButton).withConfig({displayName:"PostDisplay__StyledLikeButton",componentId:"sc-1tope3b-13"})(templateObject_15$6||(templateObject_15$6=__makeTemplateObject(["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"],["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"])));_styled(ImagesAndFilesList).withConfig({displayName:"PostDisplay__StyledImagesAndFilesList",componentId:"sc-1tope3b-14"})(templateObject_16$6||(templateObject_16$6=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled(IconButton).withConfig({displayName:"PostDisplay__MenuButton",componentId:"sc-1tope3b-15"})(templateObject_17$5||(templateObject_17$5=__makeTemplateObject(["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"],["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"])));_styled(KeywordsInfo).withConfig({displayName:"PostDisplay__StyledKeywordsInfo",componentId:"sc-1tope3b-16"})(templateObject_18$4||(templateObject_18$4=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled(ThreadView).withConfig({displayName:"PostDisplay__StyledThreadView",componentId:"sc-1tope3b-17"})(templateObject_19$4||(templateObject_19$4=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});var templateObject_1$6$1,templateObject_2$5$1,templateObject_3$3$1,templateObject_4$2$1,templateObject_5$2$1,templateObject_6$1$1,templateObject_7$1$1,templateObject_8$1$1,templateObject_9$1$1,templateObject_10$d,templateObject_11$8,templateObject_12$7,templateObject_13$6,templateObject_14$6,templateObject_15$6,templateObject_16$6,templateObject_17$5,templateObject_18$4,templateObject_19$4;_styled(Dropdown).withConfig({displayName:"PostGroupsSelector__StyledDropdown",componentId:"sc-g6rhck-0"})(templateObject_1$5$1||(templateObject_1$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled(NavLink).withConfig({displayName:"PostGroupsSelector__DropdownOption",componentId:"sc-g6rhck-1"})(templateObject_2$4$1||(templateObject_2$4$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);createGlobalStyle(templateObject_3$2$1||(templateObject_3$2$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$5$1,templateObject_2$4$1,templateObject_3$2$1;gql(templateObject_1$4$1||(templateObject_1$4$1=__makeTemplateObject(["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"],["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"])));var templateObject_1$4$1;var EditorListItem=function EditorListItem(props){var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var itemDomRef=useRef$1();var webAppUrl=useConfiguration().webAppUrl;if(props.language==null){return null;}var item=props.item;var className=classNames(props.className,'editor-list-item',{'editor-list-item-rejected ms-borderColor-red':item.status===WorkflowStatus.rejected&&isCurrentUserItemOwner()},{'editor-list-item-selected ms-fontColor-onSecondary ms-bgColor-themeSecondary':props.isSelected},{'ms-bgColor-white':!props.isSelected},{'editor-list-item--highlighted':props.highlighted});return jsxs(ListItem,__assign({className:className,"data-item-is-published":props.isPublishedItem,"data-is-focusable":true,"data-item-is-selected":props.isSelected,"data-item-id":item.id,ref:itemDomRef},{children:[props.useExternalLink?jsx$1(ExternalLink,__assign({href:""+webAppUrl+props.basePath+"/"+item.id+"/"+props.language,className:"editor-list-content",target:"_blank",rel:"noopener noreferrer",onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());}},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0):jsx$1(Content$9,__assign({to:props.basePath+"/"+item.id+"/"+props.language,onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());},className:"editor-list-content"},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0),jsxs(Options,{children:[props.allowSelection&&jsx$1(SelectedIconOption,{children:jsx$1(SelectedIcon,{"data-item-select":true,iconProps:{iconName:'CompletedSolid'},ariaLabel:formatMessage({id:'AriaLabel.editor.selectItemButton'}),onClick:toggleSelect,isTouch:env.isTouchDevice,isSelected:props.isSelected,className:classNames('ms-fontColor-neutralTertiary',{'ms-fontColor-themeDarkAlt':props.isSelected})},void 0)},void 0),jsx$1(StatusOption,{status:item.status,isActive:props.isSelected},void 0),jsx$1(Option,__assign({className:"editor-list-persona"},{children:item.owner&&jsx$1(Avatar,{upn:item.owner.userPrincipalName,size:props.useLargeAvatar?PersonaSize.size48:PersonaSize.size32,text:props.item.owner.displayName,hidePersonaDetails:true},void 0)}),void 0)]},void 0)]}),void 0);function isCurrentUserItemOwner(){return props.item.owner&&props.item.owner.userPrincipalName===user.userPrincipalName;}function getTitle(){var title=props.item.contents[props.language].title;return title==null||title.trim().length===0?"<"+formatMessage({id:'Generic.noTitle'})+">":title;}function toggleSelect(){props.onSelect(props.item,!props.isSelected);}};var EditorItemTitle=_styled.h2.withConfig({displayName:"EditorListItem__EditorItemTitle",componentId:"sc-zoqzrc-0"})(templateObject_1$3$1||(templateObject_1$3$1=__makeTemplateObject(["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"],["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"])));var SelectedIcon=_styled(IconButton$1).withConfig({displayName:"EditorListItem__SelectedIcon",componentId:"sc-zoqzrc-1"})(templateObject_2$3$1||(templateObject_2$3$1=__makeTemplateObject(["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"],["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"])),function(p){return p.isSelected?1:p.isTouch?0.1:0;});var ListItem=_styled.div.withConfig({displayName:"EditorListItem__ListItem",componentId:"sc-zoqzrc-2"})(templateObject_3$1$1||(templateObject_3$1$1=__makeTemplateObject(["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"],["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"])),CardBorderInline(2,2),function(p){return p.theme.textColors.default;},SelectedIcon);var Options=_styled.div.withConfig({displayName:"EditorListItem__Options",componentId:"sc-zoqzrc-3"})(templateObject_4$1$1||(templateObject_4$1$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"])));var Option=_styled.div.withConfig({displayName:"EditorListItem__Option",componentId:"sc-zoqzrc-4"})(templateObject_5$1$1||(templateObject_5$1$1=__makeTemplateObject(["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"],["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"])));var SelectedIconOption=_styled(Option).withConfig({displayName:"EditorListItem__SelectedIconOption",componentId:"sc-zoqzrc-5"})(templateObject_6$r||(templateObject_6$r=__makeTemplateObject(["\n padding: 6px;\n"],["\n padding: 6px;\n"])));var LinkStyle=css$2(templateObject_7$m||(templateObject_7$m=__makeTemplateObject(["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"],["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"])),spacingXs,spacingS,spacingS,spacingS,spacingS+6,spacingXs);var Content$9=_styled(Link$4).withConfig({displayName:"EditorListItem__Content",componentId:"sc-zoqzrc-6"})(templateObject_8$k||(templateObject_8$k=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var ExternalLink=_styled.a.withConfig({displayName:"EditorListItem__ExternalLink",componentId:"sc-zoqzrc-7"})(templateObject_9$f||(templateObject_9$f=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var StatusOption=function StatusOption(_a){var _b=_a.status,status=_b===void 0?WorkflowStatus.draft:_b,isActive=_a.isActive;if(status===WorkflowStatus.deleted){return null;}return jsx$1(Option,{children:status===WorkflowStatus.approved?jsx$1("img",{style:{width:'20px'},alt:""},void 0):jsx$1(Tooltip,__assign({resourceKey:'EditorList.'+status||WorkflowStatus.draft},{children:jsx$1(StateIcon,{status:status||WorkflowStatus.draft,width:20,isActive:isActive},void 0)}),void 0)},void 0);};var templateObject_1$3$1,templateObject_2$3$1,templateObject_3$1$1,templateObject_4$1$1,templateObject_5$1$1,templateObject_6$r,templateObject_7$m,templateObject_8$k,templateObject_9$f;var NewsEditorItem=function NewsEditorItem(_a){var title=_a.title,item=_a.item,isSelected=_a.isSelected;return jsxs(Fragment,{children:[jsx$1(EditorItemTitle,__assign({className:classNames({'ms-fontColor-onSecondary':isSelected})},{children:title}),void 0),jsx$1(DateInfo,__assign({className:classNames('ms-fontSize-m',{'ms-fontColor-onSecondary':isSelected})},{children:jsx$1(MetaInfo$1,{dateMode:DateMode.Published,item:item,expiryDate:item.expiryDate,channels:item.channels,readOnly:true,showChannels:true,hideAvatar:true,hideDisplayName:true},void 0)}),void 0)]},void 0);};var MetaInfo$1=_styled(ItemMetaInfo).withConfig({displayName:"NewsEditorItem__MetaInfo",componentId:"sc-1kz3wt0-0"})(templateObject_1$2$1||(templateObject_1$2$1=__makeTemplateObject(["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"],["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"])));var DateInfo=_styled.div.withConfig({displayName:"NewsEditorItem__DateInfo",componentId:"sc-1kz3wt0-1"})(templateObject_2$2$1||(templateObject_2$2$1=__makeTemplateObject(["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"],["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"])));var templateObject_1$2$1,templateObject_2$2$1;var EventDates=_styled.div.withConfig({displayName:"EventEditorItem__EventDates",componentId:"sc-1irp2hc-0"})(templateObject_1$1$1||(templateObject_1$1$1=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"])),spacingS,fontSizeSmall);_styled.div.withConfig({displayName:"EventEditorItem__EmptyEventDates",componentId:"sc-1irp2hc-1"})(templateObject_2$1$1||(templateObject_2$1$1=__makeTemplateObject(["\n font-style: italic;\n"],["\n font-style: italic;\n"])));_styled.div.withConfig({displayName:"EventEditorItem__EventDateAndRecurrenceInfo",componentId:"sc-1irp2hc-2"})(templateObject_3$12||(templateObject_3$12=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventEditorItem__RecurrenceSeriesInfo",componentId:"sc-1irp2hc-3"})(templateObject_4$K||(templateObject_4$K=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);_styled(EventDates).withConfig({displayName:"EventEditorItem__DatesInfo",componentId:"sc-1irp2hc-4"})(templateObject_5$D||(templateObject_5$D=__makeTemplateObject(["\n margin-right: ","px;\n"],["\n margin-right: ","px;\n"])),spacingM);var templateObject_1$1$1,templateObject_2$1$1,templateObject_3$12,templateObject_4$K,templateObject_5$D;var CreateNewItemButton=function CreateNewItemButton(_a){var type=_a.type,groupId=_a.groupId,onClick=_a.onClick,className=_a.className;var baseRoute=useBaseRoute();var history=useHistory();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var intl=useIntl();var user=useCurrentUser();var hasSelectedGroup=!!groupId;var groups=getGroupItems();if(hasSelectedGroup||groups.length===1){return jsx$1(StyledPrimaryButton,__assign({iconProps:{iconName:'AddTo'},onClick:function(){return handleOnClick(hasSelectedGroup?undefined:groups[0].key);},className:className,"data-button-create":type},{children:jsx$1(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);}if(!groups.length){return null;}return jsx$1(MenuButton,__assign({iconProps:{iconName:'AddTo'},menuProps:{items:groups,calloutProps:{calloutMaxWidth:300},className:'lt-reach-callout'},className:className,"data-button-create":type},{children:jsx$1(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);function getGroupItems(){return getGroupsWithExplicitMinRole(GroupRoles.Author,user).map(function(g){return {key:g.id,onClick:function(){return handleOnClick(g.id);},text:getGroupName(g,user,intl)};});}function openEditor(id){history.push(buildPath("/editor/"+type+"/groups/"+id+"/new"));}function handleOnClick(id){if(onClick){onClick(groupId||id);}else {hasSelectedGroup?history.push(baseRoute+"/new"):openEditor(id);}}};var MenuButton=_styled(CommandBarButton).withConfig({displayName:"CreateNewItemButton__MenuButton",componentId:"sc-18o74g9-0"})(templateObject_1$2k||(templateObject_1$2k=__makeTemplateObject(["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),function(p){return p.theme.semanticColors.primaryButtonBackground;},function(p){return p.theme.semanticColors.primaryButtonBackgroundHovered;},function(p){return p.theme.semanticColors.primaryButtonTextHovered;},function(p){return p.theme.semanticColors.primaryButtonText;},spacingS,spacingS);var StyledPrimaryButton=_styled(PrimaryButton).withConfig({displayName:"CreateNewItemButton__StyledPrimaryButton",componentId:"sc-18o74g9-1"})(templateObject_2$1w||(templateObject_2$1w=__makeTemplateObject(["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),spacingS,spacingS);var templateObject_1$2k,templateObject_2$1w;function useEditorApi(){var api=useApi();var fetchFromApi=useApiFactory().fetchFromApi;var sendBeacon=useBeaconHandler();var onRequestToken=useContext(AuthenticationContext).onRequestToken;return useMemo(function(){return {cloneItem:cloneItem,getDeletedItems:getDeletedItems,getVersion:getVersion,getVersions:getVersions,deleteDraft:deleteDraft,deleteRange:deleteRange,deletePermanently:deletePermanently,bulkSetStatus:bulkSetStatus,setStatus:setStatus,removeLease:removeLease,keepLeaseAlive:keepLeaseAlive,saveItem:saveItem,updateGroups:updateGroups};function updateGroups(itemType,itemId,groupIds){return api.custom("editor/"+itemType+"/"+itemId+"/groups").put(groupIds).then(function(response){return response.body().data();});}function cloneItem(itemType,itemId){return api.all("editor/"+itemType+"?"+queryString.stringify({cloneFromItem:itemId})).post({}).then(function(response){return response.body().data();});}function getDeletedItems(type,filter,token){var params=Object.assign({},filter,{token:token,pageSize:30});return api.all("editor/"+type+"/recyclebin").get('',params).then(function(res){return res.body().data();});}function getVersions(type,itemId){return from(api.all("editor/"+type+"/"+itemId+"/versions").getAll()).pipe(map(function(response){return response.body().map(function(group){return group.data();});}));}function getVersion(type,itemId,versionId){return api.all("editor/"+type+"/"+itemId+"/versions").get(versionId).then(function(response){return response.body().data();});}function deleteDraft(leaseId,itemId,type){var url="editor/"+type+"/"+itemId+"/draft";if(leaseId){url+="?leaseId="+leaseId;}return api.custom(url).delete();}function deleteRange(type,ids){var data=ids.map(function(id){return {id:id,status:WorkflowStatus.deleted};});return api.custom("editor/"+type).patch(data).then(function(response){return response.body().map(function(item){return item.data();});}).catch(function(){// set null as a result in case of error
|
|
126363
|
+
$$1$1({target:'String',proto:true},{replaceAll:function replaceAll(searchValue,replaceValue){var O=requireObjectCoercible$c(this);var IS_REG_EXP,flags,replacer,string,searchString,template,result,position,index;if(searchValue!=null){IS_REG_EXP=isRegExp(searchValue);if(IS_REG_EXP){flags=String(requireObjectCoercible$c('flags'in RegExpPrototype$3?searchValue.flags:getRegExpFlags.call(searchValue)));if(!~flags.indexOf('g'))throw TypeError('`.replaceAll` does not allow non-global regexes');}replacer=searchValue[REPLACE$2];if(replacer!==undefined){return replacer.call(searchValue,O,replaceValue);}}string=String(O);searchString=String(searchValue);if(searchString==='')return replaceAll.call(string,/(?:)/g,replaceValue);template=string.split(searchString);if(typeof replaceValue!=='function'){return template.join(String(replaceValue));}result=template[0];position=result.length;for(index=1;index<template.length;index++){result+=String(replaceValue(searchString,position,string));position+=searchString.length+template[index].length;result+=template[index];}return result;}});_styled.div.withConfig({displayName:"Textarea__Host",componentId:"sc-170lrb4-0"})(templateObject_1$q||(templateObject_1$q=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n position: relative;\n"],["\n display: flex;\n align-items: flex-end;\n position: relative;\n"])));_styled.textarea.withConfig({displayName:"Textarea__StyledTextarea",componentId:"sc-170lrb4-1"})(templateObject_2$l||(templateObject_2$l=__makeTemplateObject(["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"],["\n flex: 1 0 auto;\n justify-content: space-between;\n overflow: hidden;\n resize: none;\n min-height: 5px;\n\n ","\n"])),InputPlaceholder('font-style: italic'));_styled(IconButton$1).withConfig({displayName:"Textarea__StyledIconButton",componentId:"sc-170lrb4-2"})(templateObject_3$h||(templateObject_3$h=__makeTemplateObject(["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"],["\n position: absolute;\n bottom: 2px;\n right: 2px;\n"])));var templateObject_1$q,templateObject_2$l,templateObject_3$h;createGlobalStyle(templateObject_1$p||(templateObject_1$p=__makeTemplateObject(["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"],["\n .browser-name-ie {\n button.ms-DatePicker-goToday {\n left: 15px;\n }\n }\n"])));createGlobalStyle(templateObject_2$k||(templateObject_2$k=__makeTemplateObject(["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"],["\n button.ms-DatePicker-day--today {\n background: "," !important;\n }\n"])),function(p){return p.theme.palette.accent;});_styled.div.withConfig({displayName:"DateTimePicker__Host",componentId:"sc-zzs3p0-0"})(templateObject_3$g||(templateObject_3$g=__makeTemplateObject(["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"],["\n .ms-TextField {\n &.is-disabled {\n opacity: 0.5;\n }\n &-field {\n ","\n }\n\n > &-wrapper {\n > &-fieldGroup {\n background: none;\n > i {\n color: initial;\n }\n }\n }\n }\n\n .ms-TextField:not(:first-of-type) {\n margin-top: 5px;\n }\n"])),InputPlaceholder("\n color: inherit;\n font-style: italic;\n "));var templateObject_1$p,templateObject_2$k,templateObject_3$g;var InsertFilesDialogHost=_styled.div.withConfig({displayName:"InsertFilesButton__InsertFilesDialogHost",componentId:"sc-1q7gx3n-0"})(templateObject_2$j||(templateObject_2$j=__makeTemplateObject(["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"],["\n ","\n\n position: relative;\n padding: ","px;\n text-align: center;\n\n > div {\n display: flex;\n align-items: center;\n justify-content: center;\n }\n"])),function(p){return p.isActive&&css$2(templateObject_1$o||(templateObject_1$o=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n\n border: 2px black dashed;\n }\n "])));},spacingM);_styled.p.withConfig({displayName:"InsertFilesButton__DragAndDropText",componentId:"sc-1q7gx3n-1"})(templateObject_3$f||(templateObject_3$f=__makeTemplateObject(["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"],["\n font-size: ","px;\n margin: ","px auto 0 auto;\n"])),fontSizeSmall,spacingS);_styled(DefaultButton).withConfig({displayName:"InsertFilesButton__SelectFileButton",componentId:"sc-1q7gx3n-2"})(templateObject_4$9$1||(templateObject_4$9$1=__makeTemplateObject(["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"],["\n margin-top: ","px;\n\n span {\n font-weight: normal;\n }\n"])),spacingM);_styled.div.withConfig({displayName:"InsertFilesButton__ButtonsContainer",componentId:"sc-1q7gx3n-3"})(templateObject_5$8||(templateObject_5$8=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n"],["\n display: flex;\n flex-direction: column;\n"])));var templateObject_1$o,templateObject_2$j,templateObject_3$f,templateObject_4$9$1,templateObject_5$8;_styled(InsertFilesDialogHost).withConfig({displayName:"InsertImagesButton__Host",componentId:"sc-63tjy6-0"})(templateObject_1$n||(templateObject_1$n=__makeTemplateObject(["\n cursor: pointer;\n"],["\n cursor: pointer;\n"])));_styled(PrimaryButton).withConfig({displayName:"InsertImagesButton__StyledButton",componentId:"sc-63tjy6-1"})(templateObject_2$i||(templateObject_2$i=__makeTemplateObject(["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"],["\n && {\n display: block;\n margin: 10px auto;\n background-color: transparent;\n color: inherit;\n font-size: large;\n line-height: 2em;\n border: none;\n\n &:hover {\n background-color: transparent;\n color: inherit;\n border: 0;\n }\n }\n"])));_styled.div.withConfig({displayName:"InsertImagesButton__Text",componentId:"sc-63tjy6-2"})(templateObject_3$e||(templateObject_3$e=__makeTemplateObject(["\n max-width: 100%;\n font-size: large;\n"],["\n max-width: 100%;\n font-size: large;\n"])));var templateObject_1$n,templateObject_2$i,templateObject_3$e;var DateRange;(function(DateRange){DateRange[DateRange["TwoYears"]=0]="TwoYears";DateRange[DateRange["OneYear"]=1]="OneYear";DateRange[DateRange["SixMonths"]=2]="SixMonths";DateRange[DateRange["TwoMonths"]=3]="TwoMonths";DateRange[DateRange["OneMonth"]=4]="OneMonth";DateRange[DateRange["SevenDays"]=5]="SevenDays";DateRange[DateRange["YesterDay"]=6]="YesterDay";DateRange[DateRange["Today"]=7]="Today";})(DateRange||(DateRange={}));Object.keys(DateRange).length/2-1;_styled.div.withConfig({displayName:"DateRangeSlider__Host",componentId:"sc-1o5vacm-0"})(templateObject_1$m||(templateObject_1$m=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"],["\n display: flex;\n flex-direction: column;\n width: 100%;\n\n .ms-Slider {\n margin-bottom: 0;\n }\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Value",componentId:"sc-1o5vacm-1"})(templateObject_2$h||(templateObject_2$h=__makeTemplateObject(["\n align-self: flex-end;\n margin-right: 10px;\n"],["\n align-self: flex-end;\n margin-right: 10px;\n"])));_styled.div.withConfig({displayName:"DateRangeSlider__Labels",componentId:"sc-1o5vacm-2"})(templateObject_3$d||(templateObject_3$d=__makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"],["\n display: flex;\n justify-content: space-between;\n margin: 0px 10px;\n"])));var templateObject_1$m,templateObject_2$h,templateObject_3$d;_styled(IconButton).withConfig({displayName:"ExternalNewsLinkButton__StyledIconButton",componentId:"sc-txzoyq-0"})(templateObject_1$l||(templateObject_1$l=__makeTemplateObject(["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"],["\n && {\n padding-left: 0;\n padding-right: 0;\n margin-left: -3px;\n\n &[disabled] {\n background-color: transparent;\n }\n }\n"])));var templateObject_1$l;_styled.div.withConfig({displayName:"CardStyles__Host",componentId:"sc-ovm8js-0"})(templateObject_1$k||(templateObject_1$k=__makeTemplateObject(["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"],["\n display: block;\n padding: 0 ","px ","px ","px;\n flex: 1 1 auto;\n\n &:not([data-banner='image']) {\n position: relative;\n }\n"])),spacingM,spacingM,spacingM);var Intro$3=_styled.p.withConfig({displayName:"CardStyles__Intro",componentId:"sc-ovm8js-1"})(templateObject_2$g||(templateObject_2$g=__makeTemplateObject(["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"],["\n margin: 0;\n font-size: ","px;\n margin-top: ","px;\n"])),fontSizeSmall,spacingM-3);var templateObject_1$k,templateObject_2$g;_styled.p.withConfig({displayName:"NewsCard__Headline",componentId:"sc-rf9b9y-0"})(templateObject_1$j$1||(templateObject_1$j$1=__makeTemplateObject(["\n font-size: ","px;\n font-weight: bold;\n"],["\n font-size: ","px;\n font-weight: bold;\n"])),fontSizeSmall);_styled.h2.withConfig({displayName:"NewsCard__Title",componentId:"sc-rf9b9y-1"})(templateObject_2$f||(templateObject_2$f=__makeTemplateObject(["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"],["\n display: inline-block;\n & + .card-metaInfo {\n padding-top: ","px !important;\n }\n"])),spacingS);_styled(NavLink).withConfig({displayName:"NewsCard__StyledNavLink",componentId:"sc-rf9b9y-2"})(templateObject_3$c||(templateObject_3$c=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});_styled.div.withConfig({displayName:"NewsCard__MetaInfo",componentId:"sc-rf9b9y-3"})(templateObject_4$8$1||(templateObject_4$8$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"],["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n"])));_styled(ClickableChannelTitles).withConfig({displayName:"NewsCard__Channels",componentId:"sc-rf9b9y-4"})(templateObject_5$7$1||(templateObject_5$7$1=__makeTemplateObject(["\n display: contents;\n"],["\n display: contents;\n"])));var templateObject_1$j$1,templateObject_2$f,templateObject_3$c,templateObject_4$8$1,templateObject_5$7$1;_styled.div.withConfig({displayName:"EmptyChannelsView__Host",componentId:"sc-b5s0oy-0"})(templateObject_1$i$1||(templateObject_1$i$1=__makeTemplateObject(["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"],["\n color: ",";\n text-align: center;\n display: flex;\n flex-direction: column;\n\n > p {\n font-size: 14px;\n margin: 0;\n padding: 3px 0;\n }\n"])),function(p){return p.theme.palette.neutralTertiary;});_styled(Icon).withConfig({displayName:"EmptyChannelsView__StyledIcon",componentId:"sc-b5s0oy-1"})(templateObject_2$e||(templateObject_2$e=__makeTemplateObject(["\n font-size: 100px;\n padding: 30px 0;\n"],["\n font-size: 100px;\n padding: 30px 0;\n"])));var templateObject_1$i$1,templateObject_2$e;_styled.div.withConfig({displayName:"PromotedNewsItem__Host",componentId:"sc-drndfq-0"})(templateObject_1$h$1||(templateObject_1$h$1=__makeTemplateObject(["\n position: relative;\n"],["\n position: relative;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__Alert",componentId:"sc-drndfq-1"})(templateObject_2$d||(templateObject_2$d=__makeTemplateObject(["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"],["\n display: flex;\n background-color: white;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n cursor: pointer;\n width: 100%;\n margin-bottom: 10px;\n border-bottom-width: 4px;\n border-bottom-style: solid;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__AlertIconOuterContainer",componentId:"sc-drndfq-2"})(templateObject_3$b||(templateObject_3$b=__makeTemplateObject(["\n display: flex;\n"],["\n display: flex;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__IconContainer",componentId:"sc-drndfq-3"})(templateObject_4$7$1||(templateObject_4$7$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: center;\n width: 50px;\n min-height: 50px;\n height: 100%;\n"])));_styled(Icon).withConfig({displayName:"PromotedNewsItem__StyledIcon",componentId:"sc-drndfq-4"})(templateObject_5$6$1||(templateObject_5$6$1=__makeTemplateObject(["\n font-size: 25px;\n color: white;\n"],["\n font-size: 25px;\n color: white;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__ContentContainer",componentId:"sc-drndfq-5"})(templateObject_6$3$1||(templateObject_6$3$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n"],["\n display: flex;\n width: 100%;\n"])));_styled(DateTime).withConfig({displayName:"PromotedNewsItem__StyledDate",componentId:"sc-drndfq-6"})(templateObject_7$2$1||(templateObject_7$2$1=__makeTemplateObject(["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"],["\n font-size: 0.9em;\n color: #666;\n margin-left: 20px;\n min-width: 150px;\n\n @media (max-width: ","px) {\n display: none;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"PromotedNewsItem__Title",componentId:"sc-drndfq-7"})(templateObject_8$2$1||(templateObject_8$2$1=__makeTemplateObject(["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"],["\n font-size: 1.1em;\n margin-top: 0;\n margin-bottom: 0;\n max-width: 1000px;\n\n @media (max-width: ","px) {\n max-width: 700px;\n }\n\n @media (max-width: ","px) {\n max-width: 450px;\n }\n\n @media (max-width: ","px) {\n max-width: 300px;\n }\n\n @media (max-width: ","px) {\n margin-left: 20px;\n max-width: 280px;\n }\n"])),maxScreenSize.xLarge,maxScreenSize.large,maxScreenSize.medium,maxScreenSize.small);_styled.div.withConfig({displayName:"PromotedNewsItem__BookmarkContainer",componentId:"sc-drndfq-8"})(templateObject_9$2$1||(templateObject_9$2$1=__makeTemplateObject(["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"],["\n margin-right: 10px;\n align-self: flex-end;\n padding-bottom: 10px;\n"])));_styled.div.withConfig({displayName:"PromotedNewsItem__TextContainer",componentId:"sc-drndfq-9"})(templateObject_10$1$1||(templateObject_10$1$1=__makeTemplateObject(["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"],["\n display: flex;\n width: 100%;\n align-items: center;\n padding: 10px 0;\n"])));var templateObject_1$h$1,templateObject_2$d,templateObject_3$b,templateObject_4$7$1,templateObject_5$6$1,templateObject_6$3$1,templateObject_7$2$1,templateObject_8$2$1,templateObject_9$2$1,templateObject_10$1$1;function useTranslateApi(){var api=useApi();return useMemo(function(){return {translateContents:translateContents};function translateContents(type,itemId,language){return api.custom(type+"/"+itemId+"/contents/"+language).get().then(function(res){return res.body().data();});}},[api]);}var PageTitle=function PageTitle(_a){var page=_a.page,title=_a.title,search=_a.search,className=_a.className;var user=useCurrentUser();var isDocument=page.pageType===PageType.Document;var language=getLanguageForPage(page,user);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var handleExternalContentClick=useExternalContentClickHandler();var pageTitle=jsx$1(Fragment,{children:search?jsx$1(Highlighter,{searchWords:[search],autoEscape:true,textToHighlight:title},void 0):title},void 0);if(page.useExternalContent){var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(page,preferredContentLanguage);var targetRoute=NewsService.getNewsRoute(buildPath('/pages'),page.id,title);return jsx$1(Title$1$1,{children:jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsx$1(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsx$1(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var Title$1$1=_styled.h2.withConfig({displayName:"PageTitle__Title",componentId:"sc-gsx6ad-0"})(templateObject_1$g$1||(templateObject_1$g$1=__makeTemplateObject(["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"],["\n display: flex;\n margin: ","px 0 ","px 0;\n font-weight: bold;\n font-size: ","px;\n padding: 0;\n"])),spacingS+5,spacingS,fontSizeMedium);var FileIcon=_styled(Icon).withConfig({displayName:"PageTitle__FileIcon",componentId:"sc-gsx6ad-1"})(templateObject_2$c||(templateObject_2$c=__makeTemplateObject(["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"],["\n font-size: ","px;\n margin-right: ","px;\n align-self: flex-start;\n"])),fontSizeMedium+4,spacingS);var StyledNavLink=_styled(NavLink).withConfig({displayName:"PageTitle__StyledNavLink",componentId:"sc-gsx6ad-2"})(templateObject_3$a$1||(templateObject_3$a$1=__makeTemplateObject(["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"],["\n && {\n position: relative;\n z-index: 1;\n color: ",";\n display: block;\n }\n"])),function(p){return p.theme.textColors.default;});var templateObject_1$g$1,templateObject_2$c,templateObject_3$a$1;_styled.div.withConfig({displayName:"PageCard__PageModifiedInfo",componentId:"sc-13xtreq-0"})(templateObject_1$f$1||(templateObject_1$f$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageTitle).withConfig({displayName:"PageCard__StyledPageTitle",componentId:"sc-13xtreq-1"})(templateObject_2$b$1||(templateObject_2$b$1=__makeTemplateObject(["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"],["\n && {\n margin: 0;\n flex: 1 1 auto;\n }\n"])));_styled(Intro$3).withConfig({displayName:"PageCard__StyledIntro",componentId:"sc-13xtreq-2"})(templateObject_3$9$1||(templateObject_3$9$1=__makeTemplateObject(["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"],["\n && {\n margin-top: ","px;\n margin-bottom: ","px;\n }\n"])),spacingS,spacingS);_styled.div.withConfig({displayName:"PageCard__Keywords",componentId:"sc-13xtreq-3"})(templateObject_4$6$1||(templateObject_4$6$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"],["\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageCard__Inner",componentId:"sc-13xtreq-4"})(templateObject_5$5$1||(templateObject_5$5$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"],["\n display: flex;\n align-items: center;\n margin: ","px 0 ","px 0;\n"])),spacingM,spacingS);_styled(DocumentDownloadButton).withConfig({displayName:"PageCard__StyledDocumentDownloadButton",componentId:"sc-13xtreq-5"})(templateObject_6$2$1||(templateObject_6$2$1=__makeTemplateObject(["\n align-self: flex-start;\n z-index: 1;\n"],["\n align-self: flex-start;\n z-index: 1;\n"])));var templateObject_1$f$1,templateObject_2$b$1,templateObject_3$9$1,templateObject_4$6$1,templateObject_5$5$1,templateObject_6$2$1;_styled.p.withConfig({displayName:"PageListItemBody__FullContent",componentId:"sc-7voum-0"})(templateObject_1$e$1||(templateObject_1$e$1=__makeTemplateObject(["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"],["\n padding: 0;\n margin: 0 0 ","px 0;\n font-size: ","px;\n line-height: 1.5;\n"])),spacingM-5,fontSizeSmall);_styled.div.withConfig({displayName:"PageListItemBody__CutContentContainer",componentId:"sc-7voum-1"})(templateObject_2$a$1||(templateObject_2$a$1=__makeTemplateObject(["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"],["\n display: flex;\n flex-direction: column;\n margin-bottom: ","px;\n"])),spacingM-5);_styled.p.withConfig({displayName:"PageListItemBody__CutContent",componentId:"sc-7voum-2"})(templateObject_3$8$1||(templateObject_3$8$1=__makeTemplateObject(["\n padding: 0;\n margin: 0;\n ","\n"],["\n padding: 0;\n margin: 0;\n ","\n"])),LineClamp(5,fontSizeSmall,1.5));_styled(ActionButton).withConfig({displayName:"PageListItemBody__StyledActionButton",componentId:"sc-7voum-3"})(templateObject_4$5$1||(templateObject_4$5$1=__makeTemplateObject(["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"],["\n && {\n height: auto;\n margin: 0 0 0 auto;\n padding: ","px ","px 0 ","px;\n font-size: ","px;\n z-index: 1;\n\n &:hover {\n text-decoration: underline;\n }\n }\n"])),spacingXs,spacingXs,spacingXs,fontSizeSmaller);var templateObject_1$e$1,templateObject_2$a$1,templateObject_3$8$1,templateObject_4$5$1;_styled.div.withConfig({displayName:"PageListItem__Host",componentId:"sc-lz5d51-0"})(templateObject_1$d$1||(templateObject_1$d$1=__makeTemplateObject(["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"],["\n ",";\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n\n padding: ","px;\n"])),CardBorderInline(2,2),spacingM);_styled.div.withConfig({displayName:"PageListItem__Keywords",componentId:"sc-lz5d51-1"})(templateObject_2$9$1||(templateObject_2$9$1=__makeTemplateObject(["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n position: relative;\n font-size: ","px;\n color: ",";\n padding-bottom: ","px;\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;},spacingS);_styled.div.withConfig({displayName:"PageListItem__LastUpdated",componentId:"sc-lz5d51-2"})(templateObject_3$7$1||(templateObject_3$7$1=__makeTemplateObject(["\n font-size: ","px;\n color: ",";\n"],["\n font-size: ","px;\n color: ",";\n"])),fontSizeSmall,function(p){return p.theme.palette.neutralSecondaryAlt;});_styled(PageBreadcrumb).withConfig({displayName:"PageListItem__StyledPageBreadcrumb",componentId:"sc-lz5d51-3"})(templateObject_4$4$1||(templateObject_4$4$1=__makeTemplateObject(["\n flex: 1 1 auto;\n width: ","%;\n"],["\n flex: 1 1 auto;\n width: ","%;\n"])),function(p){return p.maxWidth;});_styled.div.withConfig({displayName:"PageListItem__Inner",componentId:"sc-lz5d51-4"})(templateObject_5$4$1||(templateObject_5$4$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"],["\n display: flex;\n align-items: center;\n\n a,\n button {\n position: relative;\n z-index: 1;\n }\n"])));var templateObject_1$d$1,templateObject_2$9$1,templateObject_3$7$1,templateObject_4$4$1,templateObject_5$4$1;var PagesDetailViewNavigation=function PagesDetailViewNavigation(_a){var basePath=_a.basePath,navigationContext=_a.navigationContext,activePageId=_a.activePageId,className=_a.className;var features=useFeatures();var user=useCurrentUser();if(!features.inPageNavigation){return null;}var currentPage=navigationContext.siblings.find(function(s){return s.id===activePageId;});if(currentPage==null){return null;}// sort by group and position only the root pages
|
|
126364
|
+
var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxs(Host$2$1,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsx$1(PageLinkButton,{isNextNode:false,basePath:basePath,page:previousPage,icon:"ChevronLeftSmall","data-detail-page-navigation-previous-node":previousPage.id,"data-detail-page-navigation-node":previousPage.id},void 0),nextPage&&jsx$1(PageLinkButton,{isNextNode:true,className:"next-page-link-button",basePath:basePath,page:nextPage,icon:"ChevronRightSmall","data-detail-page-navigation-next-node":nextPage.id,"data-detail-page-navigation-node":nextPage.id},void 0)]}),void 0);function getSibling(offset){var index=pages.findIndex(function(s){return s.id===activePageId;});return pages[index+offset];}};var Host$2$1=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Host",componentId:"sc-19ae9g3-0"})(templateObject_1$c$1||(templateObject_1$c$1=__makeTemplateObject(["\n display: flex;\n flex-wrap: wrap;\n"],["\n display: flex;\n flex-wrap: wrap;\n"])));var PageLinkButton=function PageLinkButton(_a){var basePath=_a.basePath,page=_a.page,icon=_a.icon,isNextNode=_a.isNextNode,className=_a.className,props=__rest(_a,["basePath","page","icon","isNextNode","className"]);var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var title=getTitle(page,user,formatMessage);return jsxs(Link,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0),jsx$1(Content$2$1,__assign({},props,{isNextNode:isNextNode},{children:jsx$1("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsx$1(LinkIcon,{iconName:icon},void 0)]}),void 0);function getUrl(){var baseUrl=NewsService.getNewsRoute(basePath,page.id,title);return page.useExternalContent?baseUrl+"?"+queryString.stringify({noRedirect:true}):baseUrl;}};var Link=_styled(NavLink).withConfig({displayName:"PagesDetailViewNavigation__Link",componentId:"sc-19ae9g3-1"})(templateObject_2$8$1||(templateObject_2$8$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"],["\n display: flex;\n align-items: center;\n\n padding-top: ","px;\n padding-bottom: ","px;\n margin-bottom: 2px;\n\n max-width: 45%;\n width: auto;\n border-radius: 5px;\n\n &.next-page-link-button {\n margin-left: auto;\n }\n\n @media (max-width: ","px) {\n max-width: 100% !important;\n margin-bottom: ","px;\n }\n\n background-color: ",";\n && {\n color: ",";\n }\n"])),spacingS,spacingS,maxScreenSize.small,spacingS,function(p){return p.theme.palette.neutralLight;},function(p){return p.theme.textColors.default;});var LinkIcon=_styled(Icon).withConfig({displayName:"PagesDetailViewNavigation__LinkIcon",componentId:"sc-19ae9g3-2"})(templateObject_3$6$1||(templateObject_3$6$1=__makeTemplateObject(["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"],["\n && {\n display: flex;\n justify-content: center;\n font-size: ","px;\n padding: 0 ","px;\n }\n"])),fontSizeNormal,spacingM);var Content$2$1=_styled.div.withConfig({displayName:"PagesDetailViewNavigation__Content",componentId:"sc-19ae9g3-3"})(templateObject_5$3$1||(templateObject_5$3$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-direction: column;\n padding-right: 23px;\n\n white-space: nowrap;\n overflow: hidden;\n\n div {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n\n ","\n"])),function(p){return p.isNextNode&&css$2(templateObject_4$3$1||(templateObject_4$3$1=__makeTemplateObject(["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "],["\n margin-left: auto;\n padding-left: 23px;\n padding-right: 0;\n "])));});var templateObject_1$c$1,templateObject_2$8$1,templateObject_3$6$1,templateObject_4$3$1,templateObject_5$3$1;_styled(Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$b$1||(templateObject_1$b$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled(NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$7$1||(templateObject_2$7$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);createGlobalStyle(templateObject_3$5$1||(templateObject_3$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$b$1,templateObject_2$7$1,templateObject_3$5$1;_styled.div.withConfig({displayName:"GroupNotificationsSettings__Host",componentId:"sc-1z0rxrb-0"})(templateObject_1$a$1||(templateObject_1$a$1=__makeTemplateObject(["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"],["\n width: 400px;\n\n @media (max-width: ","px) {\n width: 100%;\n }\n"])),maxScreenSize.small);_styled.h2.withConfig({displayName:"GroupNotificationsSettings__Title",componentId:"sc-1z0rxrb-1"})(templateObject_2$6$1||(templateObject_2$6$1=__makeTemplateObject(["\n margin-top: 0;\n"],["\n margin-top: 0;\n"])));_styled.div.withConfig({displayName:"GroupNotificationsSettings__Infos",componentId:"sc-1z0rxrb-2"})(templateObject_3$4$1||(templateObject_3$4$1=__makeTemplateObject(["\n color: ",";\n padding-left: 55px;\n"],["\n color: ",";\n padding-left: 55px;\n"])),function(p){return p.theme.palette.neutralTertiaryAlt;});var templateObject_1$a$1,templateObject_2$6$1,templateObject_3$4$1;function getPostGroups(user){return getGroupsWithExplicitMinRole(GroupRoles.LimitedReader,user,function(g){return g.allowPosts;});}function getPostsBaseRoute(post,user){var _a;var postGroups=getPostGroups(user);var subscriptionHandle=(_a=user.subscription.subscriptionHandle)!==null&&_a!==void 0?_a:user.subscription.id;return postGroups.length>1?"/"+subscriptionHandle+"/posts/groups/"+((post===null||post===void 0?void 0:post.groupId)||''):"/"+subscriptionHandle+"/posts";}function getPostsHashtagFilterRoute(post,user,hashtag){return getPostsBaseRoute(post,user)+"?"+queryString.stringify({search:""+hashtag});}var PostReplies=function PostReplies(_a){var className=_a.className,post=_a.post,comments=_a.comments,initialPageSize=_a.initialPageSize,autoFocusReplyField=_a.autoFocusReplyField,onReplyAdded=_a.onReplyAdded,onReplyDeleted=_a.onReplyDeleted,onThreadReply=_a.onThreadReply;var user=useCurrentUser();var searchPostMentionUsers=usePostsApi().searchPostMentionUsers;if(!post||!post.id){return null;}return jsx$1(StyledPagedCommentsSection,{className:className,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},type:ItemResourceTypes.Posts,scope:ConversationScope.Posts,itemId:post.id,groupIds:[post.groupId],readOnly:false,pageSize:5,initialPageSize:initialPageSize,initialComments:comments,onCommentAdded:onReplyAdded,onCommentDeleted:onReplyDeleted,noItemsYetStringResourceKey:"Posts.replies.empty",autoFocusReplyField:autoFocusReplyField,baseAttachmentPath:"/posts/"+post.id+"/comments",getHashtagFilterRoute:function(hashtag){return getPostsHashtagFilterRoute(post,user,hashtag);},onThreadReply:onThreadReply},post.id);};var StyledPagedCommentsSection=_styled(PagedCommentsSection).withConfig({displayName:"PostReplies__StyledPagedCommentsSection",componentId:"sc-8mrgcg-0"})(templateObject_1$9$1||(templateObject_1$9$1=__makeTemplateObject(["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"],["\n display: flex;\n flex: 1 1 auto;\n flex-direction: column;\n > div {\n width: 100%;\n }\n"])));var templateObject_1$9$1;var PostEditor=function PostEditor(_a){var className=_a.className,post=_a.post,onBeforeSave=_a.onBeforeSave,onSaved=_a.onSaved,onCancel=_a.onCancel,keywordSettings=_a.keywordSettings;var features=useFeatures();var _b=usePostsApi(),searchPostMentionUsers=_b.searchPostMentionUsers,updatePost=_b.updatePost;var _c=useContext(LazySubscriptionContext),allKeywords=_c.allKeywords,keywordsByGroupId=_c.keywordsByGroupId;var _d=useNotificationContext(),showToast=_d.showToast,showError=_d.showError;if(allKeywords==null||keywordsByGroupId==null){return null;}return jsx$1(EditCommentWithAttachments,{className:className,onCancel:onCancel,content:post.content,onSave:handleSavePost,mentionSearchHandler:function(text){return searchPostMentionUsers(text,post.groupId);},inputTheme:"dark",item:post,basePath:'/posts',allowKeywords:features.keywords&&features.postKeywords,availableKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.availableKeywords,mandatoryKeywords:keywordSettings===null||keywordSettings===void 0?void 0:keywordSettings.mandatoryKeywords,keywords:post.keywords,saveOnCtrlEnter:true},void 0);function handleSavePost(newContent,attachments,keywords){return __awaiter(this,void 0,void 0,function(){var updatedPost,error_1;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);onBeforeSave(__assign(__assign({},post),{content:newContent,attachments:attachments,keywords:keywords}));return [4/*yield*/,updatePost(post.id,newContent,attachments,keywords)];case 1:updatedPost=_a.sent();onSaved(updatedPost);showToast('Posts.successfullyUpdated');return [3/*break*/,3];case 2:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}};_styled(IconButton).withConfig({displayName:"PostFollowButton__StyledIconButton",componentId:"sc-1i97syp-0"})(templateObject_1$8$1||(templateObject_1$8$1=__makeTemplateObject(["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"],["\n && {\n margin: 0;\n font-size: inherit;\n\n &[disabled] {\n background: transparent;\n }\n }\n\n i {\n font-size: 20px;\n }\n user-select: none;\n"])));var templateObject_1$8$1;var PostGroup=function PostGroup(_a){var groupId=_a.groupId,to=_a.to,className=_a.className;var intl=useIntl();var user=useCurrentUser();var group=user.groups.find(function(g){return g.id===groupId;});var groupName=getGroupName(group,user,intl);return jsx$1(Group,__assign({"data-post-group":groupId,title:groupName,to:to,className:className},{children:jsx$1("span",{children:groupName},void 0)}),void 0);};var Group=_styled(NavLink).withConfig({displayName:"PostGroup__Group",componentId:"sc-182l34m-0"})(templateObject_1$7$1||(templateObject_1$7$1=__makeTemplateObject(["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"],["\n font-size: ","px;\n height: 100%;\n\n span {\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n }\n ","\n"])),fontSizeSmall,function(){return HighlightBubble();});var templateObject_1$7$1;_styled.div.withConfig({displayName:"PostDisplay__Host",componentId:"sc-1tope3b-0"})(templateObject_1$6$1||(templateObject_1$6$1=__makeTemplateObject(["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"],["\n ",";\n\n position: relative;\n\n // TODO: The font-sizes should be cleaned up as well,\n // there are too many different places where these are set\n // We set it here to 14px in order to have the same font-size as in the comment editor / comment input\n font-size: ","px;\n line-height: ","px;\n\n display: flex;\n flex-direction: column;\n .ms-layer {\n display: none;\n }\n"])),CardBorderInline(2,2),fontSizeSmall,spacingM);_styled.div.withConfig({displayName:"PostDisplay__Header",componentId:"sc-1tope3b-1"})(templateObject_2$5$1||(templateObject_2$5$1=__makeTemplateObject(["\n display: flex;\n align-items: flex-start;\n"],["\n display: flex;\n align-items: flex-start;\n"])));var avatarWidth=40;var maxButtonsWidth=120;// max 4 buttons at 30 px each (translate, notifications, like and context menu)
|
|
126365
|
+
var paddingLeft=spacingS;var postGroupWidth=250;var postGroupWidthSmall=215;_styled.div.withConfig({displayName:"PostDisplay__HeaderMetadata",componentId:"sc-1tope3b-2"})(templateObject_3$3$1||(templateObject_3$3$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"],["\n display: flex;\n align-items: center;\n\n font-size: ","px;\n padding-left: ","px;\n max-width: calc(\n 100% - ","px - ","px - ","px -\n ","px\n );\n\n @media (max-width: ","px) {\n flex-direction: column;\n max-width: calc(\n 100% - ","px - ","px - ","px\n );\n }\n"])),fontSizeSmall,paddingLeft,avatarWidth,maxButtonsWidth,paddingLeft,function(p){return p.addSafetySpace?postGroupWidth:0;},maxScreenSize.medium,avatarWidth,maxButtonsWidth,paddingLeft);_styled.div.withConfig({displayName:"PostDisplay__Content",componentId:"sc-1tope3b-3"})(templateObject_4$2$1||(templateObject_4$2$1=__makeTemplateObject(["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"],["\n padding-top: 15px;\n a {\n text-decoration: underline;\n }\n"])));_styled.div.withConfig({displayName:"PostDisplay__ActionButtons",componentId:"sc-1tope3b-4"})(templateObject_5$2$1||(templateObject_5$2$1=__makeTemplateObject(["\n display: flex;\n align-items: center;\n margin-left: auto;\n"],["\n display: flex;\n align-items: center;\n margin-left: auto;\n"])));_styled.div.withConfig({displayName:"PostDisplay__PostDisplayName",componentId:"sc-1tope3b-5"})(templateObject_6$1$1||(templateObject_6$1$1=__makeTemplateObject(["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"],["\n font-weight: bold;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n"])));_styled(DateTime).withConfig({displayName:"PostDisplay__PostDateTime",componentId:"sc-1tope3b-6"})(templateObject_7$1$1||(templateObject_7$1$1=__makeTemplateObject(["\n font-size: ","px;\n"],["\n font-size: ","px;\n"])),fontSizeSmaller);_styled(ActionButton).withConfig({displayName:"PostDisplay__AddReplyButton",componentId:"sc-1tope3b-7"})(templateObject_8$1$1||(templateObject_8$1$1=__makeTemplateObject(["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"],["\n margin-top: ","px;\n\n && {\n height: auto;\n min-height: 20px;\n border: none;\n padding: 0;\n color: ",";\n align-self: flex-start;\n }\n"])),spacingM,function(p){return p.theme.palette.accent;});_styled.div.withConfig({displayName:"PostDisplay__InnerHost",componentId:"sc-1tope3b-8"})(templateObject_10$d||(templateObject_10$d=__makeTemplateObject(["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"],["\n position: relative;\n padding: ","px;\n display: flex;\n flex-direction: column;\n\n ","\n"])),postsSectionPadding,function(p){return p.highlight&&css$2(templateObject_9$1$1||(templateObject_9$1$1=__makeTemplateObject(["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "],["\n &::after {\n content: '';\n position: absolute;\n top: 0;\n bottom: 0;\n right: 0;\n width: 6px;\n display: block;\n background-color: ",";\n }\n "])),function(p){return p.theme.palette.accent;});});_styled(PostReplies).withConfig({displayName:"PostDisplay__StyledPostComments",componentId:"sc-1tope3b-9"})(templateObject_11$8||(templateObject_11$8=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});_styled(PostEditor).withConfig({displayName:"PostDisplay__StyledPostEditor",componentId:"sc-1tope3b-10"})(templateObject_12$7||(templateObject_12$7=__makeTemplateObject(["\n margin-top: 7px;\n position: relative;\n"],["\n margin-top: 7px;\n position: relative;\n"])));_styled(NavLink).withConfig({displayName:"PostDisplay__PostLink",componentId:"sc-1tope3b-11"})(templateObject_13$6||(templateObject_13$6=__makeTemplateObject(["\n display: block;\n width: 100%;\n"],["\n display: block;\n width: 100%;\n"])));_styled(PostGroup).withConfig({displayName:"PostDisplay__StyledPostGroup",componentId:"sc-1tope3b-12"})(templateObject_14$6||(templateObject_14$6=__makeTemplateObject(["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"],["\n margin-left: ","px;\n max-width: ","px;\n\n @media (max-width: ","px) {\n margin-left: 0;\n margin-top: ","px;\n max-width: ","px;\n align-self: flex-start;\n }\n"])),spacingM,postGroupWidth,maxScreenSize.medium,spacingS,postGroupWidthSmall);_styled(LikeButton).withConfig({displayName:"PostDisplay__StyledLikeButton",componentId:"sc-1tope3b-13"})(templateObject_15$6||(templateObject_15$6=__makeTemplateObject(["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"],["\n min-width: 1px;\n margin: 0;\n margin-right: 0 !important; /* IE fix */\n padding: 0 4px;\n i {\n font-size: 20px;\n }\n"])));_styled(ImagesAndFilesList).withConfig({displayName:"PostDisplay__StyledImagesAndFilesList",componentId:"sc-1tope3b-14"})(templateObject_16$6||(templateObject_16$6=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled(IconButton).withConfig({displayName:"PostDisplay__MenuButton",componentId:"sc-1tope3b-15"})(templateObject_17$5||(templateObject_17$5=__makeTemplateObject(["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"],["\n && {\n padding: 0;\n i {\n margin: 0;\n font-size: 20px;\n }\n }\n"])));_styled(KeywordsInfo).withConfig({displayName:"PostDisplay__StyledKeywordsInfo",componentId:"sc-1tope3b-16"})(templateObject_18$4||(templateObject_18$4=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingM);_styled(ThreadView).withConfig({displayName:"PostDisplay__StyledThreadView",componentId:"sc-1tope3b-17"})(templateObject_19$4||(templateObject_19$4=__makeTemplateObject(["\n padding: ","px;\n background-color: ",";\n"],["\n padding: ","px;\n background-color: ",";\n"])),postsSectionPadding,function(p){return p.theme.palette.neutralLight;});var templateObject_1$6$1,templateObject_2$5$1,templateObject_3$3$1,templateObject_4$2$1,templateObject_5$2$1,templateObject_6$1$1,templateObject_7$1$1,templateObject_8$1$1,templateObject_9$1$1,templateObject_10$d,templateObject_11$8,templateObject_12$7,templateObject_13$6,templateObject_14$6,templateObject_15$6,templateObject_16$6,templateObject_17$5,templateObject_18$4,templateObject_19$4;_styled(Dropdown).withConfig({displayName:"PostGroupsSelector__StyledDropdown",componentId:"sc-g6rhck-0"})(templateObject_1$5$1||(templateObject_1$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled(NavLink).withConfig({displayName:"PostGroupsSelector__DropdownOption",componentId:"sc-g6rhck-1"})(templateObject_2$4$1||(templateObject_2$4$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);createGlobalStyle(templateObject_3$2$1||(templateObject_3$2$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarGlobalDropdownStyles);var templateObject_1$5$1,templateObject_2$4$1,templateObject_3$2$1;var isArray$1=isArray$3;var toLength$1=toLength$a;var bind=functionBindContext;// `FlattenIntoArray` abstract operation
|
|
126366
|
+
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
126367
|
+
var flattenIntoArray$1=function(target,original,source,sourceLen,start,depth,mapper,thisArg){var targetIndex=start;var sourceIndex=0;var mapFn=mapper?bind(mapper,thisArg,3):false;var element;while(sourceIndex<sourceLen){if(sourceIndex in source){element=mapFn?mapFn(source[sourceIndex],sourceIndex,original):source[sourceIndex];if(depth>0&&isArray$1(element)){targetIndex=flattenIntoArray$1(target,original,element,toLength$1(element.length),targetIndex,depth-1)-1;}else {if(targetIndex>=0x1FFFFFFFFFFFFF)throw TypeError('Exceed the acceptable array length');target[targetIndex]=element;}targetIndex++;}sourceIndex++;}return targetIndex;};var flattenIntoArray_1=flattenIntoArray$1;var isObject=isObject$c;var isArray=isArray$3;var wellKnownSymbol$m=wellKnownSymbol$l;var SPECIES$5=wellKnownSymbol$m('species');// `ArraySpeciesCreate` abstract operation
|
|
126368
|
+
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
126369
|
+
var arraySpeciesCreate$1=function(originalArray,length){var C;if(isArray(originalArray)){C=originalArray.constructor;// cross-realm fallback
|
|
126370
|
+
if(typeof C=='function'&&(C===Array||isArray(C.prototype)))C=undefined;else if(isObject(C)){C=C[SPECIES$5];if(C===null)C=undefined;}}return new(C===undefined?Array:C)(length===0?0:length);};var $$g=_export;var flattenIntoArray=flattenIntoArray_1;var toObject=toObject$7;var toLength$b=toLength$a;var aFunction=aFunction$7;var arraySpeciesCreate=arraySpeciesCreate$1;// `Array.prototype.flatMap` method
|
|
126371
|
+
// https://github.com/tc39/proposal-flatMap
|
|
126372
|
+
$$g({target:'Array',proto:true},{flatMap:function flatMap(callbackfn/* , thisArg */){var O=toObject(this);var sourceLen=toLength$b(O.length);var A;aFunction(callbackfn);A=arraySpeciesCreate(O,0);A.length=flattenIntoArray(A,O,O,sourceLen,0,1,callbackfn,arguments.length>1?arguments[1]:undefined);return A;}});// this method was added to unscopables after implementation
|
|
126373
|
+
// in popular engines, so it's moved to a separate module
|
|
126374
|
+
var addToUnscopables=addToUnscopables$2;addToUnscopables('flatMap');gql(templateObject_1$4$1||(templateObject_1$4$1=__makeTemplateObject(["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"],["\n mutation MarkItemsAsRead($itemIds: [String]) {\n markItemsAsRead(itemIds: $itemIds)\n }\n"])));var templateObject_1$4$1;var EditorListItem=function EditorListItem(props){var user=useCurrentUser();var formatMessage=useIntl().formatMessage;var itemDomRef=useRef$1();var webAppUrl=useConfiguration().webAppUrl;if(props.language==null){return null;}var item=props.item;var className=classNames(props.className,'editor-list-item',{'editor-list-item-rejected ms-borderColor-red':item.status===WorkflowStatus.rejected&&isCurrentUserItemOwner()},{'editor-list-item-selected ms-fontColor-onSecondary ms-bgColor-themeSecondary':props.isSelected},{'ms-bgColor-white':!props.isSelected},{'editor-list-item--highlighted':props.highlighted});return jsxs(ListItem,__assign({className:className,"data-item-is-published":props.isPublishedItem,"data-is-focusable":true,"data-item-is-selected":props.isSelected,"data-item-id":item.id,ref:itemDomRef},{children:[props.useExternalLink?jsx$1(ExternalLink,__assign({href:""+webAppUrl+props.basePath+"/"+item.id+"/"+props.language,className:"editor-list-content",target:"_blank",rel:"noopener noreferrer",onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());}},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0):jsx$1(Content$9,__assign({to:props.basePath+"/"+item.id+"/"+props.language,onClick:function(e){var _a;return (_a=props.onClick)===null||_a===void 0?void 0:_a.call(props,e,itemDomRef.current,item,getTitle());},className:"editor-list-content"},{children:props.onRenderContent(item,getTitle(),props.isSelected)}),void 0),jsxs(Options,{children:[props.allowSelection&&jsx$1(SelectedIconOption,{children:jsx$1(SelectedIcon,{"data-item-select":true,iconProps:{iconName:'CompletedSolid'},ariaLabel:formatMessage({id:'AriaLabel.editor.selectItemButton'}),onClick:toggleSelect,isTouch:env.isTouchDevice,isSelected:props.isSelected,className:classNames('ms-fontColor-neutralTertiary',{'ms-fontColor-themeDarkAlt':props.isSelected})},void 0)},void 0),jsx$1(StatusOption,{status:item.status,isActive:props.isSelected},void 0),jsx$1(Option,__assign({className:"editor-list-persona"},{children:item.owner&&jsx$1(Avatar,{upn:item.owner.userPrincipalName,size:props.useLargeAvatar?PersonaSize.size48:PersonaSize.size32,text:props.item.owner.displayName,hidePersonaDetails:true},void 0)}),void 0)]},void 0)]}),void 0);function isCurrentUserItemOwner(){return props.item.owner&&props.item.owner.userPrincipalName===user.userPrincipalName;}function getTitle(){var title=props.item.contents[props.language].title;return title==null||title.trim().length===0?"<"+formatMessage({id:'Generic.noTitle'})+">":title;}function toggleSelect(){props.onSelect(props.item,!props.isSelected);}};var EditorItemTitle=_styled.h2.withConfig({displayName:"EditorListItem__EditorItemTitle",componentId:"sc-zoqzrc-0"})(templateObject_1$3$1||(templateObject_1$3$1=__makeTemplateObject(["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"],["\n && {\n font-weight: 600;\n margin: 0;\n font-size: 17px;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n @media (max-width: 700px) {\n font-size: 15px;\n }\n }\n"])));var SelectedIcon=_styled(IconButton$1).withConfig({displayName:"EditorListItem__SelectedIcon",componentId:"sc-zoqzrc-1"})(templateObject_2$3$1||(templateObject_2$3$1=__makeTemplateObject(["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"],["\n padding: 0;\n height: 100%;\n width: auto;\n font-size: inherit;\n\n opacity: ",";\n\n &:focus {\n opacity: 1;\n }\n\n i {\n font-size: inherit;\n line-height: unset;\n height: auto;\n width: auto;\n padding: 0 19px 0 10px;\n }\n"])),function(p){return p.isSelected?1:p.isTouch?0.1:0;});var ListItem=_styled.div.withConfig({displayName:"EditorListItem__ListItem",componentId:"sc-zoqzrc-2"})(templateObject_3$1$1||(templateObject_3$1$1=__makeTemplateObject(["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"],["\n position: relative;\n font-family: 'Roboto', sans-serif;\n text-decoration: none;\n ",";\n\n display: flex;\n flex-flow: row nowrap;\n text-align: left;\n\n a,\n a:hover,\n a:active,\n a:visited {\n color: ",";\n text-decoration: none;\n }\n\n &.editor-list-item-rejected {\n border-left-width: 10px;\n border-style: solid;\n border-top: 0;\n border-bottom: 0;\n border-right: 0;\n > .editor-list-content {\n margin-left: 6px;\n }\n }\n\n &:hover {\n "," {\n opacity: 1;\n }\n }\n"])),CardBorderInline(2,2),function(p){return p.theme.textColors.default;},SelectedIcon);var Options=_styled.div.withConfig({displayName:"EditorListItem__Options",componentId:"sc-zoqzrc-3"})(templateObject_4$1$1||(templateObject_4$1$1=__makeTemplateObject(["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"],["\n flex: 0 1 auto;\n display: flex;\n flex-flow: row nowrap;\n padding-right: 15px;\n\n @media (max-width: 700px) {\n padding-right: 6px;\n }\n"])));var Option=_styled.div.withConfig({displayName:"EditorListItem__Option",componentId:"sc-zoqzrc-4"})(templateObject_5$1$1||(templateObject_5$1$1=__makeTemplateObject(["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"],["\n padding: 6px 25px 6px 6px;\n font-size: 24px;\n text-align: center;\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n justify-content: center;\n\n flex: 0 1 auto;\n\n &.editor-list-persona {\n width: 32px;\n }\n > div {\n height: 24px;\n }\n\n @media (max-width: 700px) {\n padding: 5px;\n i {\n font-size: 0.9em !important;\n padding: 0;\n }\n }\n"])));var SelectedIconOption=_styled(Option).withConfig({displayName:"EditorListItem__SelectedIconOption",componentId:"sc-zoqzrc-5"})(templateObject_6$r||(templateObject_6$r=__makeTemplateObject(["\n padding: 6px;\n"],["\n padding: 6px;\n"])));var LinkStyle=css$2(templateObject_7$m||(templateObject_7$m=__makeTemplateObject(["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"],["\n padding: ","px;\n flex: 1 0 auto;\n /* todo: This smells, but it's required to make the ellipsis work. How to avoid it?*/\n width: 100px;\n margin: ","px ","px ","px ","px;\n\n @media (max-width: 700px) {\n margin: ","px;\n }\n"])),spacingXs,spacingS,spacingS,spacingS,spacingS+6,spacingXs);var Content$9=_styled(Link$4).withConfig({displayName:"EditorListItem__Content",componentId:"sc-zoqzrc-6"})(templateObject_8$k||(templateObject_8$k=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var ExternalLink=_styled.a.withConfig({displayName:"EditorListItem__ExternalLink",componentId:"sc-zoqzrc-7"})(templateObject_9$f||(templateObject_9$f=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var StatusOption=function StatusOption(_a){var _b=_a.status,status=_b===void 0?WorkflowStatus.draft:_b,isActive=_a.isActive;if(status===WorkflowStatus.deleted){return null;}return jsx$1(Option,{children:status===WorkflowStatus.approved?jsx$1("img",{style:{width:'20px'},alt:""},void 0):jsx$1(Tooltip,__assign({resourceKey:'EditorList.'+status||WorkflowStatus.draft},{children:jsx$1(StateIcon,{status:status||WorkflowStatus.draft,width:20,isActive:isActive},void 0)}),void 0)},void 0);};var templateObject_1$3$1,templateObject_2$3$1,templateObject_3$1$1,templateObject_4$1$1,templateObject_5$1$1,templateObject_6$r,templateObject_7$m,templateObject_8$k,templateObject_9$f;var NewsEditorItem=function NewsEditorItem(_a){var title=_a.title,item=_a.item,isSelected=_a.isSelected;return jsxs(Fragment,{children:[jsx$1(EditorItemTitle,__assign({className:classNames({'ms-fontColor-onSecondary':isSelected})},{children:title}),void 0),jsx$1(DateInfo,__assign({className:classNames('ms-fontSize-m',{'ms-fontColor-onSecondary':isSelected})},{children:jsx$1(MetaInfo$1,{dateMode:DateMode.Published,item:item,expiryDate:item.expiryDate,channels:item.channels,readOnly:true,showChannels:true,hideAvatar:true,hideDisplayName:true},void 0)}),void 0)]},void 0);};var MetaInfo$1=_styled(ItemMetaInfo).withConfig({displayName:"NewsEditorItem__MetaInfo",componentId:"sc-1kz3wt0-0"})(templateObject_1$2$1||(templateObject_1$2$1=__makeTemplateObject(["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"],["\n [data-meta-info-details] {\n padding-left: 0;\n }\n"])));var DateInfo=_styled.div.withConfig({displayName:"NewsEditorItem__DateInfo",componentId:"sc-1kz3wt0-1"})(templateObject_2$2$1||(templateObject_2$2$1=__makeTemplateObject(["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"],["\n padding-top: 8px;\n @media (max-width: 700px) {\n font-size: 12px;\n }\n"])));var templateObject_1$2$1,templateObject_2$2$1;var EventDates=_styled.div.withConfig({displayName:"EventEditorItem__EventDates",componentId:"sc-1irp2hc-0"})(templateObject_1$1$1||(templateObject_1$1$1=__makeTemplateObject(["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"],["\n margin-top: ","px;\n font-size: ","px;\n\n display: flex;\n flex-direction: column;\n"])),spacingS,fontSizeSmall);_styled.div.withConfig({displayName:"EventEditorItem__EmptyEventDates",componentId:"sc-1irp2hc-1"})(templateObject_2$1$1||(templateObject_2$1$1=__makeTemplateObject(["\n font-style: italic;\n"],["\n font-style: italic;\n"])));_styled.div.withConfig({displayName:"EventEditorItem__EventDateAndRecurrenceInfo",componentId:"sc-1irp2hc-2"})(templateObject_3$12||(templateObject_3$12=__makeTemplateObject(["\n display: flex;\n align-items: center;\n"],["\n display: flex;\n align-items: center;\n"])));_styled(EventRecurrenceSeriesInfo).withConfig({displayName:"EventEditorItem__RecurrenceSeriesInfo",componentId:"sc-1irp2hc-3"})(templateObject_4$K||(templateObject_4$K=__makeTemplateObject(["\n margin-top: ","px;\n"],["\n margin-top: ","px;\n"])),spacingS);_styled(EventDates).withConfig({displayName:"EventEditorItem__DatesInfo",componentId:"sc-1irp2hc-4"})(templateObject_5$D||(templateObject_5$D=__makeTemplateObject(["\n margin-right: ","px;\n"],["\n margin-right: ","px;\n"])),spacingM);var templateObject_1$1$1,templateObject_2$1$1,templateObject_3$12,templateObject_4$K,templateObject_5$D;var CreateNewItemButton=function CreateNewItemButton(_a){var type=_a.type,groupId=_a.groupId,onClick=_a.onClick,className=_a.className;var baseRoute=useBaseRoute();var history=useHistory();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var intl=useIntl();var user=useCurrentUser();var hasSelectedGroup=!!groupId;var groups=getGroupItems();if(hasSelectedGroup||groups.length===1){return jsx$1(StyledPrimaryButton,__assign({iconProps:{iconName:'AddTo'},onClick:function(){return handleOnClick(hasSelectedGroup?undefined:groups[0].key);},className:className,"data-button-create":type},{children:jsx$1(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);}if(!groups.length){return null;}return jsx$1(MenuButton,__assign({iconProps:{iconName:'AddTo'},menuProps:{items:groups,calloutProps:{calloutMaxWidth:300},className:'lt-reach-callout'},className:className,"data-button-create":type},{children:jsx$1(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);function getGroupItems(){return getGroupsWithExplicitMinRole(GroupRoles.Author,user).map(function(g){return {key:g.id,onClick:function(){return handleOnClick(g.id);},text:getGroupName(g,user,intl)};});}function openEditor(id){history.push(buildPath("/editor/"+type+"/groups/"+id+"/new"));}function handleOnClick(id){if(onClick){onClick(groupId||id);}else {hasSelectedGroup?history.push(baseRoute+"/new"):openEditor(id);}}};var MenuButton=_styled(CommandBarButton).withConfig({displayName:"CreateNewItemButton__MenuButton",componentId:"sc-18o74g9-0"})(templateObject_1$2k||(templateObject_1$2k=__makeTemplateObject(["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n && {\n background-color: ",";\n &:hover {\n background-color: ",";\n i,\n span {\n color: ",";\n background-color: transparent;\n }\n }\n\n // the ms-fontColor on the button is not applied on the icons\n i,\n span {\n color: ",";\n }\n }\n\n height: 32px;\n padding: 0 ","px;\n\n i:first-child {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),function(p){return p.theme.semanticColors.primaryButtonBackground;},function(p){return p.theme.semanticColors.primaryButtonBackgroundHovered;},function(p){return p.theme.semanticColors.primaryButtonTextHovered;},function(p){return p.theme.semanticColors.primaryButtonText;},spacingS,spacingS);var StyledPrimaryButton=_styled(PrimaryButton).withConfig({displayName:"CreateNewItemButton__StyledPrimaryButton",componentId:"sc-18o74g9-1"})(templateObject_2$1w||(templateObject_2$1w=__makeTemplateObject(["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"],["\n padding: 0 ","px;\n\n i {\n margin: 0 ","px 0 0;\n }\n\n span {\n white-space: pre;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n"])),spacingS,spacingS);var templateObject_1$2k,templateObject_2$1w;function useEditorApi(){var api=useApi();var fetchFromApi=useApiFactory().fetchFromApi;var sendBeacon=useBeaconHandler();var onRequestToken=useContext(AuthenticationContext).onRequestToken;return useMemo(function(){return {cloneItem:cloneItem,getDeletedItems:getDeletedItems,getVersion:getVersion,getVersions:getVersions,deleteDraft:deleteDraft,deleteRange:deleteRange,deletePermanently:deletePermanently,bulkSetStatus:bulkSetStatus,setStatus:setStatus,removeLease:removeLease,keepLeaseAlive:keepLeaseAlive,saveItem:saveItem,updateGroups:updateGroups};function updateGroups(itemType,itemId,groupIds){return api.custom("editor/"+itemType+"/"+itemId+"/groups").put(groupIds).then(function(response){return response.body().data();});}function cloneItem(itemType,itemId){return api.all("editor/"+itemType+"?"+queryString.stringify({cloneFromItem:itemId})).post({}).then(function(response){return response.body().data();});}function getDeletedItems(type,filter,token){var params=Object.assign({},filter,{token:token,pageSize:30});return api.all("editor/"+type+"/recyclebin").get('',params).then(function(res){return res.body().data();});}function getVersions(type,itemId){return from(api.all("editor/"+type+"/"+itemId+"/versions").getAll()).pipe(map(function(response){return response.body().map(function(group){return group.data();});}));}function getVersion(type,itemId,versionId){return api.all("editor/"+type+"/"+itemId+"/versions").get(versionId).then(function(response){return response.body().data();});}function deleteDraft(leaseId,itemId,type){var url="editor/"+type+"/"+itemId+"/draft";if(leaseId){url+="?leaseId="+leaseId;}return api.custom(url).delete();}function deleteRange(type,ids){var data=ids.map(function(id){return {id:id,status:WorkflowStatus.deleted};});return api.custom("editor/"+type).patch(data).then(function(response){return response.body().map(function(item){return item.data();});}).catch(function(){// set null as a result in case of error
|
|
126368
126375
|
return null;});}function deletePermanently(type,ids){var itemIds=ids.join(',');return api.custom("editor/"+type+"/recyclebin?"+queryString.stringify({itemIds:itemIds})).delete();}function bulkSetStatus(type,items){return api.custom("editor/"+type).patch(items).then(function(response){return response.body().map(function(item){return item.data();});});}function setStatus(type,itemId,status,leaseId){return __awaiter(this,void 0,void 0,function(){var path,response,ex_1;return __generator(this,function(_a){switch(_a.label){case 0:path="editor/"+type+"/"+itemId+"/status";if(leaseId!=null){path+='?'+queryString.stringify({leaseId:leaseId});}_a.label=1;case 1:_a.trys.push([1,3,,4]);return [4/*yield*/,api.custom(path).put(status)];case 2:response=_a.sent();return [2/*return*/,response.body().data()];case 3:ex_1=_a.sent();throw ex_1.response.statusCode===409?{account:ex_1.response.data}:ex_1;case 4:return [2/*return*/];}});});}function removeLease(itemId,leaseId){return api.custom("editor/"+itemId+"/lease?"+queryString.stringify({leaseId:leaseId})).delete();}function keepLeaseAlive(itemId,leaseId,token,subscriptionId){var _this=this;var expireLeaseToken=token;// every 10 seconds
|
|
126369
126376
|
var timer=setInterval(function(){return __awaiter(_this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:// update the lease
|
|
126370
126377
|
return [4/*yield*/,api.custom("editor/"+itemId+"/lease").put({leaseId:leaseId})];case 1:// update the lease
|
|
@@ -126672,7 +126679,7 @@ $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
|
126672
126679
|
|
|
126673
126680
|
var redefine$1 = redefine$k.exports;
|
|
126674
126681
|
var fails$2 = fails$w;
|
|
126675
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
126682
|
+
var wellKnownSymbol = wellKnownSymbol$E;
|
|
126676
126683
|
var regexpExec$1 = regexpExec$2;
|
|
126677
126684
|
var createNonEnumerableProperty = createNonEnumerableProperty$k;
|
|
126678
126685
|
|
|
@@ -126853,7 +126860,7 @@ var regexpExecAbstract = function (R, S) {
|
|
|
126853
126860
|
|
|
126854
126861
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
126855
126862
|
var anObject$1 = anObject$v;
|
|
126856
|
-
var toLength = toLength$
|
|
126863
|
+
var toLength = toLength$k;
|
|
126857
126864
|
var requireObjectCoercible$1 = requireObjectCoercible$l;
|
|
126858
126865
|
var advanceStringIndex = advanceStringIndex$1;
|
|
126859
126866
|
var regExpExec = regexpExecAbstract;
|
|
@@ -129244,39 +129251,26 @@ var ToolbarManageNewsItemButton = function ToolbarManageNewsItemButton(_a) {
|
|
|
129244
129251
|
}, void 0);
|
|
129245
129252
|
};
|
|
129246
129253
|
|
|
129247
|
-
var
|
|
129254
|
+
var NewsItemPreviewContextProvider = function NewsItemPreviewContextProvider(_a) {
|
|
129248
129255
|
var itemId = _a.itemId,
|
|
129249
129256
|
versionId = _a.versionId,
|
|
129250
|
-
|
|
129257
|
+
children = _a.children;
|
|
129251
129258
|
var getNews = useNewsEditorApi().getNews;
|
|
129252
129259
|
var getVersion = useEditorApi().getVersion;
|
|
129253
|
-
var itemContext = useDetailViewContext();
|
|
129254
129260
|
|
|
129255
|
-
if (!
|
|
129261
|
+
if (!itemId) {
|
|
129256
129262
|
return null;
|
|
129257
129263
|
}
|
|
129258
129264
|
|
|
129259
|
-
|
|
129260
|
-
|
|
129261
|
-
|
|
129262
|
-
|
|
129263
|
-
|
|
129264
|
-
|
|
129265
|
-
|
|
129266
|
-
return loadNewsPreview(itemId);
|
|
129267
|
-
},
|
|
129268
|
-
isReadOnly: true,
|
|
129269
|
-
type: ItemResourceTypes.News
|
|
129270
|
-
}, {
|
|
129271
|
-
children: jsx$1(NewsDetailPreviewInternal, {}, void 0)
|
|
129272
|
-
}), void 0)
|
|
129273
|
-
}), void 0);
|
|
129274
|
-
}
|
|
129275
|
-
|
|
129276
|
-
return jsx$1(Host, __assign$g({
|
|
129277
|
-
className: className
|
|
129265
|
+
return jsx$1(DetailViewContextProvider, __assign$g({
|
|
129266
|
+
itemId: itemId,
|
|
129267
|
+
loadItemFunc: function (itemId) {
|
|
129268
|
+
return loadNewsPreview(itemId);
|
|
129269
|
+
},
|
|
129270
|
+
isReadOnly: true,
|
|
129271
|
+
type: ItemResourceTypes.News
|
|
129278
129272
|
}, {
|
|
129279
|
-
children:
|
|
129273
|
+
children: children
|
|
129280
129274
|
}), void 0);
|
|
129281
129275
|
|
|
129282
129276
|
function loadNewsPreview(itemId) {
|
|
@@ -129311,6 +129305,36 @@ var NewsDetailPreview = function NewsDetailPreview(_a) {
|
|
|
129311
129305
|
}
|
|
129312
129306
|
};
|
|
129313
129307
|
|
|
129308
|
+
var NewsDetailPreview = function NewsDetailPreview(_a) {
|
|
129309
|
+
var itemId = _a.itemId,
|
|
129310
|
+
versionId = _a.versionId,
|
|
129311
|
+
className = _a.className;
|
|
129312
|
+
var itemContext = useDetailViewContext();
|
|
129313
|
+
|
|
129314
|
+
if (!itemContext && !itemId) {
|
|
129315
|
+
return null;
|
|
129316
|
+
}
|
|
129317
|
+
|
|
129318
|
+
if (!itemContext) {
|
|
129319
|
+
return jsx$1(Host, __assign$g({
|
|
129320
|
+
className: className
|
|
129321
|
+
}, {
|
|
129322
|
+
children: jsx$1(NewsItemPreviewContextProvider, __assign$g({
|
|
129323
|
+
itemId: itemId,
|
|
129324
|
+
versionId: versionId
|
|
129325
|
+
}, {
|
|
129326
|
+
children: jsx$1(NewsDetailPreviewInternal, {}, void 0)
|
|
129327
|
+
}), void 0)
|
|
129328
|
+
}), void 0);
|
|
129329
|
+
}
|
|
129330
|
+
|
|
129331
|
+
return jsx$1(Host, __assign$g({
|
|
129332
|
+
className: className
|
|
129333
|
+
}, {
|
|
129334
|
+
children: jsx$1(NewsDetailPreviewInternal, {}, void 0)
|
|
129335
|
+
}), void 0);
|
|
129336
|
+
};
|
|
129337
|
+
|
|
129314
129338
|
var NewsDetailPreviewInternal = function NewsDetailPreviewInternal() {
|
|
129315
129339
|
return jsxs(PublishableItemDetailViewContainer, __assign$g({
|
|
129316
129340
|
preventExternalContentAutoRedirect: true
|
|
@@ -129326,4 +129350,4 @@ var Host = _styled.div.withConfig({
|
|
|
129326
129350
|
|
|
129327
129351
|
var templateObject_1;
|
|
129328
129352
|
|
|
129329
|
-
export { Avatar as A, EventDetail as E, ItemLayoutMode as I, ManageChannels as M, NewsDetail as N, PropTypes$2 as P, ReachContextProvider as R, ThemeContext$1 as T, UserDetails as U, _assertThisInitialized$b as _, commonjsGlobal$7 as a, _setPrototypeOf$6 as b, commonjsRequire as c, _defineProperty$p as d, _extends$9 as e, minScreenSize as f, PageDetail as g, NewsList as h, NewsGrid as i, useCurrentUser as j, NewsHero as k, NewsEditorDashboard as l, moment$1 as m, Toolbar$1 as n, ToolbarIconButton as o, ToolbarChannelSelector as p, ToolbarMarkAllEventsAsReadButton as q, ToolbarMarkAllNewsAsReadButton as r, ToolbarCloseButton as s, NewsItemContextProvider as t, useWindowSize$2 as u, ToolbarNewsLanguageSelector as v, ToolbarManageNewsItemButton as w, NewsDetailPreview as x };
|
|
129353
|
+
export { Avatar as A, EventDetail as E, ItemLayoutMode as I, ManageChannels as M, NewsDetail as N, PropTypes$2 as P, ReachContextProvider as R, ThemeContext$1 as T, UserDetails as U, _assertThisInitialized$b as _, commonjsGlobal$7 as a, _setPrototypeOf$6 as b, commonjsRequire as c, _defineProperty$p as d, _extends$9 as e, minScreenSize as f, PageDetail as g, NewsList as h, NewsGrid as i, useCurrentUser as j, NewsHero as k, NewsEditorDashboard as l, moment$1 as m, Toolbar$1 as n, ToolbarIconButton as o, ToolbarChannelSelector as p, ToolbarMarkAllEventsAsReadButton as q, ToolbarMarkAllNewsAsReadButton as r, ToolbarCloseButton as s, NewsItemContextProvider as t, useWindowSize$2 as u, ToolbarNewsLanguageSelector as v, ToolbarManageNewsItemButton as w, NewsDetailPreview as x, NewsItemPreviewContextProvider as y };
|