@livetiles/reach-components-react 0.4.0-preview.49 → 0.4.0-preview.55
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/en.async.esm.esm.js +2 -1
- package/index.d.ts +9 -2
- package/index.esm.css +1103 -0
- package/index.esm.js +1 -1
- package/index.esm2.js +517 -518
- package/index.umd.css +1103 -0
- package/index.umd.js +519 -518
- 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
|
}
|
|
@@ -48821,12 +48821,12 @@ var path$1$2 = global$c$2;
|
|
|
48821
48821
|
var path$3 = path$1$2;
|
|
48822
48822
|
var global$b$2 = global$j$2;
|
|
48823
48823
|
|
|
48824
|
-
var aFunction$8$
|
|
48824
|
+
var aFunction$8$2 = function (variable) {
|
|
48825
48825
|
return typeof variable == 'function' ? variable : undefined;
|
|
48826
48826
|
};
|
|
48827
48827
|
|
|
48828
48828
|
var getBuiltIn$5$2 = function (namespace, method) {
|
|
48829
|
-
return arguments.length < 2 ? aFunction$8$
|
|
48829
|
+
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];
|
|
48830
48830
|
};
|
|
48831
48831
|
|
|
48832
48832
|
var objectGetOwnPropertyNames$2 = {};
|
|
@@ -52021,7 +52021,7 @@ if (ArrayPrototype$3[UNSCOPABLES$2] == undefined) {
|
|
|
52021
52021
|
} // add a key to Array.prototype[@@unscopables]
|
|
52022
52022
|
|
|
52023
52023
|
|
|
52024
|
-
var addToUnscopables$2$
|
|
52024
|
+
var addToUnscopables$2$2 = function (key) {
|
|
52025
52025
|
ArrayPrototype$3[UNSCOPABLES$2][key] = true;
|
|
52026
52026
|
};
|
|
52027
52027
|
|
|
@@ -52255,7 +52255,7 @@ var defineIterator$1$2 = function (Iterable, NAME, IteratorConstructor, next, DE
|
|
|
52255
52255
|
};
|
|
52256
52256
|
|
|
52257
52257
|
var toIndexedObject$6 = toIndexedObject$4$2;
|
|
52258
|
-
var addToUnscopables$1$2 = addToUnscopables$2$
|
|
52258
|
+
var addToUnscopables$1$2 = addToUnscopables$2$2;
|
|
52259
52259
|
var Iterators$6 = iterators$2;
|
|
52260
52260
|
var InternalStateModule$7 = internalState$2;
|
|
52261
52261
|
var defineIterator$4 = defineIterator$1$2;
|
|
@@ -53467,27 +53467,27 @@ var PluginWrapper = function PluginWrapper(_a) {
|
|
|
53467
53467
|
var classof$d = classofRaw$1$2; // `IsArray` abstract operation
|
|
53468
53468
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
53469
53469
|
|
|
53470
|
-
var isArray$3$
|
|
53470
|
+
var isArray$3$2 = Array.isArray || function isArray(arg) {
|
|
53471
53471
|
return classof$d(arg) == 'Array';
|
|
53472
53472
|
};
|
|
53473
53473
|
|
|
53474
|
-
var isArray$2$
|
|
53474
|
+
var isArray$2$2 = isArray$3$2;
|
|
53475
53475
|
var toLength$3$2 = toLength$a$1;
|
|
53476
|
-
var bind$
|
|
53476
|
+
var bind$9 = functionBindContext$2; // `FlattenIntoArray` abstract operation
|
|
53477
53477
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
53478
53478
|
|
|
53479
|
-
var flattenIntoArray$1$
|
|
53479
|
+
var flattenIntoArray$1$2 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
53480
53480
|
var targetIndex = start;
|
|
53481
53481
|
var sourceIndex = 0;
|
|
53482
|
-
var mapFn = mapper ? bind$
|
|
53482
|
+
var mapFn = mapper ? bind$9(mapper, thisArg, 3) : false;
|
|
53483
53483
|
var element;
|
|
53484
53484
|
|
|
53485
53485
|
while (sourceIndex < sourceLen) {
|
|
53486
53486
|
if (sourceIndex in source) {
|
|
53487
53487
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
53488
53488
|
|
|
53489
|
-
if (depth > 0 && isArray$2$
|
|
53490
|
-
targetIndex = flattenIntoArray$1$
|
|
53489
|
+
if (depth > 0 && isArray$2$2(element)) {
|
|
53490
|
+
targetIndex = flattenIntoArray$1$2(target, original, element, toLength$3$2(element.length), targetIndex, depth - 1) - 1;
|
|
53491
53491
|
} else {
|
|
53492
53492
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
53493
53493
|
target[targetIndex] = element;
|
|
@@ -53502,21 +53502,21 @@ var flattenIntoArray$1$1 = function (target, original, source, sourceLen, start,
|
|
|
53502
53502
|
return targetIndex;
|
|
53503
53503
|
};
|
|
53504
53504
|
|
|
53505
|
-
var flattenIntoArray_1$
|
|
53506
|
-
var isObject$
|
|
53507
|
-
var isArray$1$2 = isArray$3$
|
|
53508
|
-
var wellKnownSymbol$
|
|
53509
|
-
var SPECIES$
|
|
53505
|
+
var flattenIntoArray_1$2 = flattenIntoArray$1$2;
|
|
53506
|
+
var isObject$g = isObject$9$2;
|
|
53507
|
+
var isArray$1$2 = isArray$3$2;
|
|
53508
|
+
var wellKnownSymbol$q = wellKnownSymbol$h$2;
|
|
53509
|
+
var SPECIES$7 = wellKnownSymbol$q('species'); // `ArraySpeciesCreate` abstract operation
|
|
53510
53510
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
53511
53511
|
|
|
53512
|
-
var arraySpeciesCreate$1$
|
|
53512
|
+
var arraySpeciesCreate$1$2 = function (originalArray, length) {
|
|
53513
53513
|
var C;
|
|
53514
53514
|
|
|
53515
53515
|
if (isArray$1$2(originalArray)) {
|
|
53516
53516
|
C = originalArray.constructor; // cross-realm fallback
|
|
53517
53517
|
|
|
53518
|
-
if (typeof C == 'function' && (C === Array || isArray$1$2(C.prototype))) C = undefined;else if (isObject$
|
|
53519
|
-
C = C[SPECIES$
|
|
53518
|
+
if (typeof C == 'function' && (C === Array || isArray$1$2(C.prototype))) C = undefined;else if (isObject$g(C)) {
|
|
53519
|
+
C = C[SPECIES$7];
|
|
53520
53520
|
if (C === null) C = undefined;
|
|
53521
53521
|
}
|
|
53522
53522
|
}
|
|
@@ -53525,11 +53525,11 @@ var arraySpeciesCreate$1$1 = function (originalArray, length) {
|
|
|
53525
53525
|
};
|
|
53526
53526
|
|
|
53527
53527
|
var $$5$2 = _export$2;
|
|
53528
|
-
var flattenIntoArray$
|
|
53528
|
+
var flattenIntoArray$3 = flattenIntoArray_1$2;
|
|
53529
53529
|
var toObject$2$2 = toObject$6$2;
|
|
53530
53530
|
var toLength$2$2 = toLength$a$1;
|
|
53531
53531
|
var aFunction$1$2 = aFunction$7$2;
|
|
53532
|
-
var arraySpeciesCreate$
|
|
53532
|
+
var arraySpeciesCreate$3 = arraySpeciesCreate$1$2; // `Array.prototype.flatMap` method
|
|
53533
53533
|
// https://github.com/tc39/proposal-flatMap
|
|
53534
53534
|
|
|
53535
53535
|
$$5$2({
|
|
@@ -53543,14 +53543,14 @@ $$5$2({
|
|
|
53543
53543
|
var sourceLen = toLength$2$2(O.length);
|
|
53544
53544
|
var A;
|
|
53545
53545
|
aFunction$1$2(callbackfn);
|
|
53546
|
-
A = arraySpeciesCreate$
|
|
53547
|
-
A.length = flattenIntoArray$
|
|
53546
|
+
A = arraySpeciesCreate$3(O, 0);
|
|
53547
|
+
A.length = flattenIntoArray$3(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
53548
53548
|
return A;
|
|
53549
53549
|
}
|
|
53550
53550
|
}); // this method was added to unscopables after implementation
|
|
53551
53551
|
// in popular engines, so it's moved to a separate module
|
|
53552
53552
|
|
|
53553
|
-
var addToUnscopables$4 = addToUnscopables$2$
|
|
53553
|
+
var addToUnscopables$4 = addToUnscopables$2$2;
|
|
53554
53554
|
addToUnscopables$4('flatMap'); // `SameValue` abstract operation
|
|
53555
53555
|
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
53556
53556
|
|
|
@@ -53966,7 +53966,7 @@ var anObject$1$3 = anObject$f$1;
|
|
|
53966
53966
|
var requireObjectCoercible$f = requireObjectCoercible$b$1;
|
|
53967
53967
|
var speciesConstructor$4 = speciesConstructor$2$2;
|
|
53968
53968
|
var advanceStringIndex$6 = advanceStringIndex$3$1;
|
|
53969
|
-
var toLength$
|
|
53969
|
+
var toLength$d = toLength$a$1;
|
|
53970
53970
|
var callRegExpExec$2 = regexpExecAbstract$3;
|
|
53971
53971
|
var regexpExec$6 = regexpExec$3$2;
|
|
53972
53972
|
var fails$3$3 = fails$g$2;
|
|
@@ -54061,7 +54061,7 @@ fixRegExpWellKnownSymbolLogic$6('split', 2, function (SPLIT, nativeSplit, maybeC
|
|
|
54061
54061
|
var z = callRegExpExec$2(splitter, SUPPORTS_Y$2 ? S : S.slice(q));
|
|
54062
54062
|
var e;
|
|
54063
54063
|
|
|
54064
|
-
if (z === null || (e = min$6(toLength$
|
|
54064
|
+
if (z === null || (e = min$6(toLength$d(splitter.lastIndex + (SUPPORTS_Y$2 ? 0 : q)), S.length)) === p) {
|
|
54065
54065
|
q = advanceStringIndex$6(S, q, unicodeMatching);
|
|
54066
54066
|
} else {
|
|
54067
54067
|
A.push(S.slice(p, q));
|
|
@@ -54993,9 +54993,9 @@ var ToastNotificationHost = function ToastNotificationHost() {
|
|
|
54993
54993
|
var ToastGlobalStyles = createGlobalStyle(templateObject_3$1f || (templateObject_3$1f = __makeTemplateObject$k(["\n .lt-reach .Toastify .Toastify__toast-container {\n ", "\n\n ", "\n }\n\n .Toastify {\n .Toastify__toast-container {\n // This allows us to have wider toasts that do not wrap too soon.\n // Toastify itself will add responsive design at 480px and span the\n // toast the full width...\n max-width: 540px;\n width: auto;\n z-index: 1000001;\n\n @media (max-width: 480px) {\n padding: 0 10px !important;\n }\n }\n\n .Toastify__toast-body {\n display: flex;\n flex: 1 1 540px;\n height: 100%;\n justify-content: center;\n flex-direction: column;\n // IE fix: this is a default value from Toastify but doesn't work properly unless added here too\n min-height: 48px;\n }\n }\n"], ["\n .lt-reach .Toastify .Toastify__toast-container {\n ", "\n\n ", "\n }\n\n .Toastify {\n .Toastify__toast-container {\n // This allows us to have wider toasts that do not wrap too soon.\n // Toastify itself will add responsive design at 480px and span the\n // toast the full width...\n max-width: 540px;\n width: auto;\n z-index: 1000001;\n\n @media (max-width: 480px) {\n padding: 0 10px !important;\n }\n }\n\n .Toastify__toast-body {\n display: flex;\n flex: 1 1 540px;\n height: 100%;\n justify-content: center;\n flex-direction: column;\n // IE fix: this is a default value from Toastify but doesn't work properly unless added here too\n min-height: 48px;\n }\n }\n"])), function (p) {
|
|
54994
54994
|
return !p.chromeless && css$2(templateObject_1$2F || (templateObject_1$2F = __makeTemplateObject$k(["\n top: 4em;\n "], ["\n top: 4em;\n "])));
|
|
54995
54995
|
}, function (p) {
|
|
54996
|
-
return p.chromeless && css$2(templateObject_2$
|
|
54996
|
+
return p.chromeless && css$2(templateObject_2$1M || (templateObject_2$1M = __makeTemplateObject$k(["\n @media all and (max-width: ", "px) {\n top: 0.5em;\n right: 0.5em;\n }\n "], ["\n @media all and (max-width: ", "px) {\n top: 0.5em;\n right: 0.5em;\n }\n "])), maxScreenSize.small);
|
|
54997
54997
|
});
|
|
54998
|
-
var templateObject_1$2F, templateObject_2$
|
|
54998
|
+
var templateObject_1$2F, templateObject_2$1M, templateObject_3$1f;
|
|
54999
54999
|
|
|
55000
55000
|
function useKeywordsApi() {
|
|
55001
55001
|
var api = useApi();
|
|
@@ -55340,15 +55340,15 @@ $$1$3({
|
|
|
55340
55340
|
return comparefn === undefined ? nativeSort$2.call(toObject$9(this)) : nativeSort$2.call(toObject$9(this), aFunction$a(comparefn));
|
|
55341
55341
|
}
|
|
55342
55342
|
});
|
|
55343
|
-
var $$
|
|
55344
|
-
var isArray$9 = isArray$3$
|
|
55343
|
+
var $$j = _export$2;
|
|
55344
|
+
var isArray$9 = isArray$3$2;
|
|
55345
55345
|
var nativeReverse$1 = [].reverse;
|
|
55346
55346
|
var test$4 = [1, 2]; // `Array.prototype.reverse` method
|
|
55347
55347
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
|
|
55348
55348
|
// fix for Safari 12.0 bug
|
|
55349
55349
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
55350
55350
|
|
|
55351
|
-
$$
|
|
55351
|
+
$$j({
|
|
55352
55352
|
target: 'Array',
|
|
55353
55353
|
proto: true,
|
|
55354
55354
|
forced: String(test$4) === String(test$4.reverse())
|
|
@@ -55407,39 +55407,6 @@ function useBaseRoute() {
|
|
|
55407
55407
|
}
|
|
55408
55408
|
}
|
|
55409
55409
|
|
|
55410
|
-
function styleInject(css, ref) {
|
|
55411
|
-
if ( ref === void 0 ) ref = {};
|
|
55412
|
-
var insertAt = ref.insertAt;
|
|
55413
|
-
|
|
55414
|
-
if (!css || typeof document === 'undefined') { return; }
|
|
55415
|
-
|
|
55416
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
55417
|
-
var style = document.createElement('style');
|
|
55418
|
-
style.type = 'text/css';
|
|
55419
|
-
|
|
55420
|
-
if (insertAt === 'top') {
|
|
55421
|
-
if (head.firstChild) {
|
|
55422
|
-
head.insertBefore(style, head.firstChild);
|
|
55423
|
-
} else {
|
|
55424
|
-
head.appendChild(style);
|
|
55425
|
-
}
|
|
55426
|
-
} else {
|
|
55427
|
-
head.appendChild(style);
|
|
55428
|
-
}
|
|
55429
|
-
|
|
55430
|
-
if (style.styleSheet) {
|
|
55431
|
-
style.styleSheet.cssText = css;
|
|
55432
|
-
} else {
|
|
55433
|
-
style.appendChild(document.createTextNode(css));
|
|
55434
|
-
}
|
|
55435
|
-
}
|
|
55436
|
-
|
|
55437
|
-
var css_248z$3 = "/*! PhotoSwipe main CSS by Dmitry Semenov | photoswipe.com | MIT license */\n/*\n\tStyles for basic PhotoSwipe functionality (sliding area, open/close transitions)\n*/\n/* pswp = photoswipe */\n.pswp {\n display: none;\n position: absolute;\n width: 100%;\n height: 100%;\n left: 0;\n top: 0;\n overflow: hidden;\n touch-action: none;\n z-index: 1500;\n -webkit-text-size-adjust: 100%;\n /* create separate layer, to avoid paint on window.onscroll in webkit/blink */\n -webkit-backface-visibility: hidden;\n outline: none; }\n .pswp * {\n box-sizing: border-box; }\n .pswp img {\n max-width: none; }\n\n/* style is added when JS option showHideOpacity is set to true */\n.pswp--animate_opacity {\n /* 0.001, because opacity:0 doesn't trigger Paint action, which causes lag at start of transition */\n opacity: 0.001;\n will-change: opacity;\n /* for open/close transition */\n transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }\n\n.pswp--open {\n display: block; }\n\n.pswp--zoom-allowed .pswp__img {\n /* autoprefixer: off */\n cursor: -webkit-zoom-in;\n cursor: -moz-zoom-in;\n cursor: zoom-in; }\n\n.pswp--zoomed-in .pswp__img {\n /* autoprefixer: off */\n cursor: -webkit-grab;\n cursor: -moz-grab;\n cursor: grab; }\n\n.pswp--dragging .pswp__img {\n /* autoprefixer: off */\n cursor: -webkit-grabbing;\n cursor: -moz-grabbing;\n cursor: grabbing; }\n\n/*\n\tBackground is added as a separate element.\n\tAs animating opacity is much faster than animating rgba() background-color.\n*/\n.pswp__bg {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background: #000;\n opacity: 0;\n transform: translateZ(0);\n -webkit-backface-visibility: hidden;\n will-change: opacity; }\n\n.pswp__scroll-wrap {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n overflow: hidden; }\n\n.pswp__container,\n.pswp__zoom-wrap {\n touch-action: none;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0; }\n\n/* Prevent selection and tap highlights */\n.pswp__container,\n.pswp__img {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n -webkit-tap-highlight-color: transparent;\n -webkit-touch-callout: none; }\n\n.pswp__zoom-wrap {\n position: absolute;\n width: 100%;\n transform-origin: left top;\n /* for open/close transition */\n transition: transform 333ms cubic-bezier(0.4, 0, 0.22, 1); }\n\n.pswp__bg {\n will-change: opacity;\n /* for open/close transition */\n transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }\n\n.pswp--animated-in .pswp__bg,\n.pswp--animated-in .pswp__zoom-wrap {\n transition: none; }\n\n.pswp__container,\n.pswp__zoom-wrap {\n -webkit-backface-visibility: hidden; }\n\n.pswp__item {\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n overflow: hidden; }\n\n.pswp__img {\n position: absolute;\n width: auto;\n height: auto;\n top: 0;\n left: 0; }\n\n/*\n\tstretched thumbnail or div placeholder element (see below)\n\tstyle is added to avoid flickering in webkit/blink when layers overlap\n*/\n.pswp__img--placeholder {\n -webkit-backface-visibility: hidden; }\n\n/*\n\tdiv element that matches size of large image\n\tlarge image loads on top of it\n*/\n.pswp__img--placeholder--blank {\n background: #222; }\n\n.pswp--ie .pswp__img {\n width: 100% !important;\n height: auto !important;\n left: 0;\n top: 0; }\n\n/*\n\tError message appears when image is not loaded\n\t(JS option errorMsg controls markup)\n*/\n.pswp__error-msg {\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n text-align: center;\n font-size: 14px;\n line-height: 16px;\n margin-top: -8px;\n color: #CCC; }\n\n.pswp__error-msg a {\n color: #CCC;\n text-decoration: underline; }\n";
|
|
55438
|
-
styleInject(css_248z$3);
|
|
55439
|
-
|
|
55440
|
-
var css_248z$2 = "/*! PhotoSwipe Default UI CSS by Dmitry Semenov | photoswipe.com | MIT license */\n/*\n\n\tContents:\n\n\t1. Buttons\n\t2. Share modal and links\n\t3. Index indicator (\"1 of X\" counter)\n\t4. Caption\n\t5. Loading indicator\n\t6. Additional styles (root element, top bar, idle state, hidden state, etc.)\n\n*/\n/*\n\t\n\t1. Buttons\n\n */\n/* <button> css reset */\n.pswp__button {\n width: 44px;\n height: 44px;\n position: relative;\n background: none;\n cursor: pointer;\n overflow: visible;\n -webkit-appearance: none;\n display: block;\n border: 0;\n padding: 0;\n margin: 0;\n float: right;\n opacity: 0.75;\n transition: opacity 0.2s;\n box-shadow: none; }\n .pswp__button:focus, .pswp__button:hover {\n opacity: 1; }\n .pswp__button:active {\n outline: none;\n opacity: 0.9; }\n .pswp__button::-moz-focus-inner {\n padding: 0;\n border: 0; }\n\n/* pswp__ui--over-close class it added when mouse is over element that should close gallery */\n.pswp__ui--over-close .pswp__button--close {\n opacity: 1; }\n\n.pswp__button,\n.pswp__button--arrow--left:before,\n.pswp__button--arrow--right:before {\n background: url(default-skin.png) 0 0 no-repeat;\n background-size: 264px 88px;\n width: 44px;\n height: 44px; }\n\n@media (-webkit-min-device-pixel-ratio: 1.1), (-webkit-min-device-pixel-ratio: 1.09375), (min-resolution: 105dpi), (min-resolution: 1.1dppx) {\n /* Serve SVG sprite if browser supports SVG and resolution is more than 105dpi */\n .pswp--svg .pswp__button,\n .pswp--svg .pswp__button--arrow--left:before,\n .pswp--svg .pswp__button--arrow--right:before {\n background-image: url(default-skin.svg); }\n .pswp--svg .pswp__button--arrow--left,\n .pswp--svg .pswp__button--arrow--right {\n background: none; } }\n\n.pswp__button--close {\n background-position: 0 -44px; }\n\n.pswp__button--share {\n background-position: -44px -44px; }\n\n.pswp__button--fs {\n display: none; }\n\n.pswp--supports-fs .pswp__button--fs {\n display: block; }\n\n.pswp--fs .pswp__button--fs {\n background-position: -44px 0; }\n\n.pswp__button--zoom {\n display: none;\n background-position: -88px 0; }\n\n.pswp--zoom-allowed .pswp__button--zoom {\n display: block; }\n\n.pswp--zoomed-in .pswp__button--zoom {\n background-position: -132px 0; }\n\n/* no arrows on touch screens */\n.pswp--touch .pswp__button--arrow--left,\n.pswp--touch .pswp__button--arrow--right {\n visibility: hidden; }\n\n/*\n\tArrow buttons hit area\n\t(icon is added to :before pseudo-element)\n*/\n.pswp__button--arrow--left,\n.pswp__button--arrow--right {\n background: none;\n top: 50%;\n margin-top: -50px;\n width: 70px;\n height: 100px;\n position: absolute; }\n\n.pswp__button--arrow--left {\n left: 0; }\n\n.pswp__button--arrow--right {\n right: 0; }\n\n.pswp__button--arrow--left:before,\n.pswp__button--arrow--right:before {\n content: '';\n top: 35px;\n background-color: rgba(0, 0, 0, 0.3);\n height: 30px;\n width: 32px;\n position: absolute; }\n\n.pswp__button--arrow--left:before {\n left: 6px;\n background-position: -138px -44px; }\n\n.pswp__button--arrow--right:before {\n right: 6px;\n background-position: -94px -44px; }\n\n/*\n\n\t2. Share modal/popup and links\n\n */\n.pswp__counter,\n.pswp__share-modal {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n\n.pswp__share-modal {\n display: block;\n background: rgba(0, 0, 0, 0.5);\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n padding: 10px;\n position: absolute;\n z-index: 1600;\n opacity: 0;\n transition: opacity 0.25s ease-out;\n -webkit-backface-visibility: hidden;\n will-change: opacity; }\n\n.pswp__share-modal--hidden {\n display: none; }\n\n.pswp__share-tooltip {\n z-index: 1620;\n position: absolute;\n background: #FFF;\n top: 56px;\n border-radius: 2px;\n display: block;\n width: auto;\n right: 44px;\n box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);\n transform: translateY(6px);\n transition: transform 0.25s;\n -webkit-backface-visibility: hidden;\n will-change: transform; }\n .pswp__share-tooltip a {\n display: block;\n padding: 8px 12px;\n color: #000;\n text-decoration: none;\n font-size: 14px;\n line-height: 18px; }\n .pswp__share-tooltip a:hover {\n text-decoration: none;\n color: #000; }\n .pswp__share-tooltip a:first-child {\n /* round corners on the first/last list item */\n border-radius: 2px 2px 0 0; }\n .pswp__share-tooltip a:last-child {\n border-radius: 0 0 2px 2px; }\n\n.pswp__share-modal--fade-in {\n opacity: 1; }\n .pswp__share-modal--fade-in .pswp__share-tooltip {\n transform: translateY(0); }\n\n/* increase size of share links on touch devices */\n.pswp--touch .pswp__share-tooltip a {\n padding: 16px 12px; }\n\na.pswp__share--facebook:before {\n content: '';\n display: block;\n width: 0;\n height: 0;\n position: absolute;\n top: -12px;\n right: 15px;\n border: 6px solid transparent;\n border-bottom-color: #FFF;\n -webkit-pointer-events: none;\n -moz-pointer-events: none;\n pointer-events: none; }\n\na.pswp__share--facebook:hover {\n background: #3E5C9A;\n color: #FFF; }\n a.pswp__share--facebook:hover:before {\n border-bottom-color: #3E5C9A; }\n\na.pswp__share--twitter:hover {\n background: #55ACEE;\n color: #FFF; }\n\na.pswp__share--pinterest:hover {\n background: #CCC;\n color: #CE272D; }\n\na.pswp__share--download:hover {\n background: #DDD; }\n\n/*\n\n\t3. Index indicator (\"1 of X\" counter)\n\n */\n.pswp__counter {\n position: absolute;\n left: 0;\n top: 0;\n height: 44px;\n font-size: 13px;\n line-height: 44px;\n color: #FFF;\n opacity: 0.75;\n padding: 0 10px; }\n\n/*\n\t\n\t4. Caption\n\n */\n.pswp__caption {\n position: absolute;\n left: 0;\n bottom: 0;\n width: 100%;\n min-height: 44px; }\n .pswp__caption small {\n font-size: 11px;\n color: #BBB; }\n\n.pswp__caption__center {\n text-align: left;\n max-width: 420px;\n margin: 0 auto;\n font-size: 13px;\n padding: 10px;\n line-height: 20px;\n color: #CCC; }\n\n.pswp__caption--empty {\n display: none; }\n\n/* Fake caption element, used to calculate height of next/prev image */\n.pswp__caption--fake {\n visibility: hidden; }\n\n/*\n\n\t5. Loading indicator (preloader)\n\n\tYou can play with it here - http://codepen.io/dimsemenov/pen/yyBWoR\n\n */\n.pswp__preloader {\n width: 44px;\n height: 44px;\n position: absolute;\n top: 0;\n left: 50%;\n margin-left: -22px;\n opacity: 0;\n transition: opacity 0.25s ease-out;\n will-change: opacity;\n direction: ltr; }\n\n.pswp__preloader__icn {\n width: 20px;\n height: 20px;\n margin: 12px; }\n\n.pswp__preloader--active {\n opacity: 1; }\n .pswp__preloader--active .pswp__preloader__icn {\n /* We use .gif in browsers that don't support CSS animation */\n background: url(preloader.gif) 0 0 no-repeat; }\n\n.pswp--css_animation .pswp__preloader--active {\n opacity: 1; }\n .pswp--css_animation .pswp__preloader--active .pswp__preloader__icn {\n -webkit-animation: clockwise 500ms linear infinite;\n animation: clockwise 500ms linear infinite; }\n .pswp--css_animation .pswp__preloader--active .pswp__preloader__donut {\n -webkit-animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite;\n animation: donut-rotate 1000ms cubic-bezier(0.4, 0, 0.22, 1) infinite; }\n\n.pswp--css_animation .pswp__preloader__icn {\n background: none;\n opacity: 0.75;\n width: 14px;\n height: 14px;\n position: absolute;\n left: 15px;\n top: 15px;\n margin: 0; }\n\n.pswp--css_animation .pswp__preloader__cut {\n /* \n\t\t\tThe idea of animating inner circle is based on Polymer (\"material\") loading indicator \n\t\t\t by Keanu Lee https://blog.keanulee.com/2014/10/20/the-tale-of-three-spinners.html\n\t\t*/\n position: relative;\n width: 7px;\n height: 14px;\n overflow: hidden; }\n\n.pswp--css_animation .pswp__preloader__donut {\n box-sizing: border-box;\n width: 14px;\n height: 14px;\n border: 2px solid #FFF;\n border-radius: 50%;\n border-left-color: transparent;\n border-bottom-color: transparent;\n position: absolute;\n top: 0;\n left: 0;\n background: none;\n margin: 0; }\n\n@media screen and (max-width: 1024px) {\n .pswp__preloader {\n position: relative;\n left: auto;\n top: auto;\n margin: 0;\n float: right; } }\n\n@-webkit-keyframes clockwise {\n 0% {\n transform: rotate(0deg); }\n 100% {\n transform: rotate(360deg); } }\n\n@keyframes clockwise {\n 0% {\n transform: rotate(0deg); }\n 100% {\n transform: rotate(360deg); } }\n\n@-webkit-keyframes donut-rotate {\n 0% {\n transform: rotate(0); }\n 50% {\n transform: rotate(-140deg); }\n 100% {\n transform: rotate(0); } }\n\n@keyframes donut-rotate {\n 0% {\n transform: rotate(0); }\n 50% {\n transform: rotate(-140deg); }\n 100% {\n transform: rotate(0); } }\n\n/*\n\t\n\t6. Additional styles\n\n */\n/* root element of UI */\n.pswp__ui {\n -webkit-font-smoothing: auto;\n visibility: visible;\n opacity: 1;\n z-index: 1550; }\n\n/* top black bar with buttons and \"1 of X\" indicator */\n.pswp__top-bar {\n position: absolute;\n left: 0;\n top: 0;\n height: 44px;\n width: 100%; }\n\n.pswp__caption,\n.pswp__top-bar,\n.pswp--has_mouse .pswp__button--arrow--left,\n.pswp--has_mouse .pswp__button--arrow--right {\n -webkit-backface-visibility: hidden;\n will-change: opacity;\n transition: opacity 333ms cubic-bezier(0.4, 0, 0.22, 1); }\n\n/* pswp--has_mouse class is added only when two subsequent mousemove events occur */\n.pswp--has_mouse .pswp__button--arrow--left,\n.pswp--has_mouse .pswp__button--arrow--right {\n visibility: visible; }\n\n.pswp__top-bar,\n.pswp__caption {\n background-color: rgba(0, 0, 0, 0.5); }\n\n/* pswp__ui--fit class is added when main image \"fits\" between top bar and bottom bar (caption) */\n.pswp__ui--fit .pswp__top-bar,\n.pswp__ui--fit .pswp__caption {\n background-color: rgba(0, 0, 0, 0.3); }\n\n/* pswp__ui--idle class is added when mouse isn't moving for several seconds (JS option timeToIdle) */\n.pswp__ui--idle .pswp__top-bar {\n opacity: 0; }\n\n.pswp__ui--idle .pswp__button--arrow--left,\n.pswp__ui--idle .pswp__button--arrow--right {\n opacity: 0; }\n\n/*\n\tpswp__ui--hidden class is added when controls are hidden\n\te.g. when user taps to toggle visibility of controls\n*/\n.pswp__ui--hidden .pswp__top-bar,\n.pswp__ui--hidden .pswp__caption,\n.pswp__ui--hidden .pswp__button--arrow--left,\n.pswp__ui--hidden .pswp__button--arrow--right {\n /* Force paint & create composition layer for controls. */\n opacity: 0.001; }\n\n/* pswp__ui--one-slide class is added when there is just one item in gallery */\n.pswp__ui--one-slide .pswp__button--arrow--left,\n.pswp__ui--one-slide .pswp__button--arrow--right,\n.pswp__ui--one-slide .pswp__counter {\n display: none; }\n\n.pswp__element--disabled {\n display: none !important; }\n\n.pswp--minimal--dark .pswp__top-bar {\n background: none; }\n";
|
|
55441
|
-
styleInject(css_248z$2);
|
|
55442
|
-
|
|
55443
55410
|
var photoswipe = {exports: {}};
|
|
55444
55411
|
|
|
55445
55412
|
/*! PhotoSwipe - v4.1.3 - 2019-01-08
|
|
@@ -61070,9 +61037,6 @@ module.exports = exports['default'];
|
|
|
61070
61037
|
|
|
61071
61038
|
var reactAddonsCssTransitionGroup = CSSTransitionGroup.exports;
|
|
61072
61039
|
|
|
61073
|
-
var css_248z$1 = ".emoji-mart,\n.emoji-mart * {\n box-sizing: border-box;\n line-height: 1.15;\n}\n\n.emoji-mart {\n font-family: -apple-system, BlinkMacSystemFont, \"Helvetica Neue\", sans-serif;\n font-size: 16px;\n display: inline-block;\n color: #222427;\n border: 1px solid #d9d9d9;\n border-radius: 5px;\n background: #fff;\n}\n\n.emoji-mart .emoji-mart-emoji {\n padding: 6px;\n}\n\n.emoji-mart-bar {\n border: 0 solid #d9d9d9;\n}\n.emoji-mart-bar:first-child {\n border-bottom-width: 1px;\n border-top-left-radius: 5px;\n border-top-right-radius: 5px;\n}\n.emoji-mart-bar:last-child {\n border-top-width: 1px;\n border-bottom-left-radius: 5px;\n border-bottom-right-radius: 5px;\n}\n\n.emoji-mart-anchors {\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n padding: 0 6px;\n line-height: 0;\n}\n\n.emoji-mart-anchor {\n position: relative;\n display: block;\n flex: 1 1 auto;\n color: #858585;\n text-align: center;\n padding: 12px 4px;\n overflow: hidden;\n transition: color .1s ease-out;\n margin: 0;\n box-shadow: none;\n background: none;\n border: none;\n}\n.emoji-mart-anchor:focus { outline: 0 }\n.emoji-mart-anchor:hover,\n.emoji-mart-anchor:focus,\n.emoji-mart-anchor-selected {\n color: #464646;\n}\n\n.emoji-mart-anchor-selected .emoji-mart-anchor-bar {\n bottom: 0;\n}\n\n.emoji-mart-anchor-bar {\n position: absolute;\n bottom: -3px; left: 0;\n width: 100%; height: 3px;\n background-color: #464646;\n}\n\n.emoji-mart-anchors i {\n display: inline-block;\n width: 100%;\n max-width: 22px;\n}\n\n.emoji-mart-anchors svg,\n.emoji-mart-anchors img {\n fill: currentColor;\n height: 18px;\n width: 18px;\n}\n\n.emoji-mart-scroll {\n overflow-y: scroll;\n overflow-x: hidden;\n height: 270px;\n padding: 0 6px 6px 6px;\n will-change: transform; /* avoids \"repaints on scroll\" in mobile Chrome */\n}\n\n.emoji-mart-search {\n margin-top: 6px;\n padding: 0 6px;\n position: relative;\n}\n\n.emoji-mart-search input {\n font-size: 16px;\n display: block;\n width: 100%;\n padding: 5px 25px 6px 10px;\n border-radius: 5px;\n border: 1px solid #d9d9d9;\n outline: 0;\n}\n\n.emoji-mart-search input,\n.emoji-mart-search input::-webkit-search-decoration,\n.emoji-mart-search input::-webkit-search-cancel-button,\n.emoji-mart-search input::-webkit-search-results-button,\n.emoji-mart-search input::-webkit-search-results-decoration {\n /* remove webkit/blink styles for <input type=\"search\">\n * via https://stackoverflow.com/a/9422689 */\n -webkit-appearance: none;\n}\n\n.emoji-mart-search-icon {\n position: absolute;\n top: 7px;\n right: 11px;\n z-index: 2;\n padding: 2px 5px 1px;\n border: none;\n background: none;\n}\n\n.emoji-mart-category .emoji-mart-emoji span {\n z-index: 1;\n position: relative;\n text-align: center;\n cursor: default;\n}\n\n.emoji-mart-category .emoji-mart-emoji:hover:before {\n z-index: 0;\n content: \"\";\n position: absolute;\n top: 0; left: 0;\n width: 100%; height: 100%;\n background-color: #f4f4f4;\n border-radius: 100%;\n}\n\n.emoji-mart-category-label {\n z-index: 2;\n position: relative;\n position: -webkit-sticky;\n position: sticky;\n top: 0;\n}\n\n.emoji-mart-category-label span {\n display: block;\n width: 100%;\n font-weight: 500;\n padding: 5px 6px;\n background-color: #fff;\n background-color: rgba(255, 255, 255, .95);\n}\n\n.emoji-mart-category-list {\n margin: 0;\n padding: 0;\n}\n\n.emoji-mart-category-list li {\n list-style: none;\n margin: 0;\n padding: 0;\n display: inline-block;\n}\n\n.emoji-mart-emoji {\n position: relative;\n display: inline-block;\n font-size: 0;\n margin: 0;\n padding: 0;\n border: none;\n background: none;\n box-shadow: none;\n}\n\n.emoji-mart-emoji-native {\n font-family: \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Segoe UI\", \"Apple Color Emoji\", \"Twemoji Mozilla\", \"Noto Color Emoji\", \"Android Emoji\";\n}\n\n.emoji-mart-no-results {\n font-size: 14px;\n text-align: center;\n padding-top: 70px;\n color: #858585;\n}\n.emoji-mart-no-results-img {\n display: block;\n margin-left: auto;\n margin-right: auto;\n width: 50%;\n}\n.emoji-mart-no-results .emoji-mart-category-label {\n display: none;\n}\n.emoji-mart-no-results .emoji-mart-no-results-label {\n margin-top: .2em;\n}\n.emoji-mart-no-results .emoji-mart-emoji:hover:before {\n content: none;\n}\n\n.emoji-mart-preview {\n position: relative;\n height: 70px;\n}\n\n.emoji-mart-preview-emoji,\n.emoji-mart-preview-data,\n.emoji-mart-preview-skins {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n\n.emoji-mart-preview-emoji {\n left: 12px;\n}\n\n.emoji-mart-preview-data {\n left: 68px; right: 12px;\n word-break: break-all;\n}\n\n.emoji-mart-preview-skins {\n right: 30px;\n text-align: right;\n}\n\n.emoji-mart-preview-skins.custom {\n right: 10px;\n text-align: right;\n}\n\n.emoji-mart-preview-name {\n font-size: 14px;\n}\n\n.emoji-mart-preview-shortname {\n font-size: 12px;\n color: #888;\n}\n.emoji-mart-preview-shortname + .emoji-mart-preview-shortname,\n.emoji-mart-preview-shortname + .emoji-mart-preview-emoticon,\n.emoji-mart-preview-emoticon + .emoji-mart-preview-emoticon {\n margin-left: .5em;\n}\n\n.emoji-mart-preview-emoticon {\n font-size: 11px;\n color: #bbb;\n}\n\n.emoji-mart-title span {\n display: inline-block;\n vertical-align: middle;\n}\n\n.emoji-mart-title .emoji-mart-emoji {\n padding: 0;\n}\n\n.emoji-mart-title-label {\n color: #999A9C;\n font-size: 26px;\n font-weight: 300;\n}\n\n.emoji-mart-skin-swatches {\n font-size: 0;\n padding: 2px 0;\n border: 1px solid #d9d9d9;\n border-radius: 12px;\n background-color: #fff;\n}\n\n.emoji-mart-skin-swatches.custom {\n font-size: 0;\n border: none;\n background-color: #fff;\n}\n\n.emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch {\n width: 16px;\n padding: 0 2px;\n}\n\n.emoji-mart-skin-swatches.opened .emoji-mart-skin-swatch.selected:after {\n opacity: .75;\n}\n\n.emoji-mart-skin-swatch {\n display: inline-block;\n width: 0;\n vertical-align: middle;\n transition-property: width, padding;\n transition-duration: .125s;\n transition-timing-function: ease-out;\n}\n\n.emoji-mart-skin-swatch:nth-child(1) { transition-delay: 0s }\n.emoji-mart-skin-swatch:nth-child(2) { transition-delay: .03s }\n.emoji-mart-skin-swatch:nth-child(3) { transition-delay: .06s }\n.emoji-mart-skin-swatch:nth-child(4) { transition-delay: .09s }\n.emoji-mart-skin-swatch:nth-child(5) { transition-delay: .12s }\n.emoji-mart-skin-swatch:nth-child(6) { transition-delay: .15s }\n\n.emoji-mart-skin-swatch.selected {\n position: relative;\n width: 16px;\n padding: 0 2px;\n}\n\n.emoji-mart-skin-swatch.selected:after {\n content: \"\";\n position: absolute;\n top: 50%; left: 50%;\n width: 4px; height: 4px;\n margin: -2px 0 0 -2px;\n background-color: #fff;\n border-radius: 100%;\n pointer-events: none;\n opacity: 0;\n transition: opacity .2s ease-out;\n}\n\n.emoji-mart-skin-swatch.custom {\n display: inline-block;\n width: 0;\n height: 38px;\n overflow: hidden;\n vertical-align: middle;\n transition-property: width, height;\n transition-duration: .125s;\n transition-timing-function: ease-out;\n cursor: default;\n}\n\n.emoji-mart-skin-swatch.custom.selected {\n position: relative;\n width: 36px;\n height: 38px;\n padding: 0 2px 0 0;\n}\n\n.emoji-mart-skin-swatch.custom.selected:after {\n content: \"\";\n width: 0;\n height: 0;\n}\n\n.emoji-mart-skin-swatches.custom .emoji-mart-skin-swatch.custom:hover {\n background-color: #f4f4f4;\n border-radius: 10%;\n}\n\n.emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom {\n width: 36px;\n height: 38px;\n padding: 0 2px 0 0;\n}\n\n.emoji-mart-skin-swatches.custom.opened .emoji-mart-skin-swatch.custom.selected:after {\n opacity: .75;\n}\n\n.emoji-mart-skin-text.opened {\n display: inline-block;\n vertical-align: middle;\n text-align: left;\n color: #888;\n font-size: 11px;\n padding: 5px 2px;\n width: 95px;\n height: 40px;\n border-radius: 10%;\n background-color: #fff;\n}\n\n.emoji-mart-skin {\n display: inline-block;\n width: 100%;\n padding-top: 100%;\n max-width: 12px;\n border-radius: 100%;\n}\n\n.emoji-mart-skin-tone-1 { background-color: #ffc93a }\n.emoji-mart-skin-tone-2 { background-color: #fadcbc }\n.emoji-mart-skin-tone-3 { background-color: #e0bb95 }\n.emoji-mart-skin-tone-4 { background-color: #bf8f68 }\n.emoji-mart-skin-tone-5 { background-color: #9b643d }\n.emoji-mart-skin-tone-6 { background-color: #594539 }\n\n/* For screenreaders only, via https://stackoverflow.com/a/19758620 */\n.emoji-mart-sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n border: 0;\n}\n\n/*\n * Dark mode styles\n */\n\n.emoji-mart-dark {\n color: #fff;\n border-color: #555453;\n background-color: #222;\n}\n\n.emoji-mart-dark .emoji-mart-bar {\n border-color: #555453;\n}\n\n.emoji-mart-dark .emoji-mart-search input {\n color: #fff;\n border-color: #555453;\n background-color: #2f2f2f;\n}\n\n.emoji-mart-dark .emoji-mart-search-icon svg {\n fill: #fff;\n}\n\n.emoji-mart-dark .emoji-mart-category .emoji-mart-emoji:hover:before {\n background-color: #444;\n}\n\n.emoji-mart-dark .emoji-mart-category-label span {\n background-color: #222;\n color: #fff;\n}\n\n.emoji-mart-dark .emoji-mart-skin-swatches {\n border-color: #555453;\n background-color: #222;\n}\n\n.emoji-mart-dark .emoji-mart-anchor:hover,\n.emoji-mart-dark .emoji-mart-anchor:focus,\n.emoji-mart-dark .emoji-mart-anchor-selected {\n color: #bfbfbf;\n}\n";
|
|
61074
|
-
styleInject(css_248z$1);
|
|
61075
|
-
|
|
61076
61040
|
var dist$4 = {};
|
|
61077
61041
|
|
|
61078
61042
|
var dist$3 = {};
|
|
@@ -65416,9 +65380,9 @@ var emotion_1 = require$$0$3;
|
|
|
65416
65380
|
var colors_1 = colors;
|
|
65417
65381
|
var bouncer$1 = emotion_1.keyframes(templateObject_1$2D || (templateObject_1$2D = __makeTemplateObject$i(["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"], ["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"])));
|
|
65418
65382
|
var loaderHeight$1 = 37;
|
|
65419
|
-
var loader$1 = emotion_1.css(templateObject_2$
|
|
65383
|
+
var loader$1 = emotion_1.css(templateObject_2$1L || (templateObject_2$1L = __makeTemplateObject$i(["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n div {\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n &:nth-child(5n + 1) {\n background: ", ";\n animation-delay: 0;\n }\n &:nth-child(5n + 2) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 1));\n }\n &:nth-child(5n + 3) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 2));\n }\n &:nth-child(5n + 4) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 3));\n }\n &:nth-child(5n + 5) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 4));\n }\n }\n"], ["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n div {\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n &:nth-child(5n + 1) {\n background: ", ";\n animation-delay: 0;\n }\n &:nth-child(5n + 2) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 1));\n }\n &:nth-child(5n + 3) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 2));\n }\n &:nth-child(5n + 4) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 3));\n }\n &:nth-child(5n + 5) {\n background: ", ";\n animation-delay: calc(0s + (0.1s * 4));\n }\n }\n"])), loaderHeight$1, loaderHeight$1, bouncer$1, colors_1.giphyGreen, colors_1.giphyBlue, colors_1.giphyPurple, colors_1.giphyRed, colors_1.giphyYellow);
|
|
65420
65384
|
loader$2.default = loader$1;
|
|
65421
|
-
var templateObject_1$2D, templateObject_2$
|
|
65385
|
+
var templateObject_1$2D, templateObject_2$1L;
|
|
65422
65386
|
|
|
65423
65387
|
var typography = {};
|
|
65424
65388
|
|
|
@@ -65549,7 +65513,7 @@ var react_1$s = __importDefault$k(React__default);
|
|
|
65549
65513
|
var avatar_1$3 = __importDefault$k(avatar);
|
|
65550
65514
|
var user_1$1 = __importDefault$k(user);
|
|
65551
65515
|
var Container$b = styled_1$a.default.div(templateObject_1$2C || (templateObject_1$2C = __makeTemplateObject$h(["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n"], ["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n"])));
|
|
65552
|
-
var Avatar$4 = styled_1$a.default(avatar_1$3.default)(templateObject_2$
|
|
65516
|
+
var Avatar$4 = styled_1$a.default(avatar_1$3.default)(templateObject_2$1K || (templateObject_2$1K = __makeTemplateObject$h(["\n flex-shrink: 0;\n"], ["\n flex-shrink: 0;\n"])));
|
|
65553
65517
|
var Attribution$2 = function (_a) {
|
|
65554
65518
|
var gif = _a.gif, className = _a.className, onClick = _a.onClick;
|
|
65555
65519
|
var user = gif.user;
|
|
@@ -65573,7 +65537,7 @@ var Attribution$2 = function (_a) {
|
|
|
65573
65537
|
};
|
|
65574
65538
|
Attribution$2.className = 'giphy-attribution';
|
|
65575
65539
|
attribution$1.default = Attribution$2;
|
|
65576
|
-
var templateObject_1$2C, templateObject_2$
|
|
65540
|
+
var templateObject_1$2C, templateObject_2$1K;
|
|
65577
65541
|
|
|
65578
65542
|
var overlay = {};
|
|
65579
65543
|
|
|
@@ -65608,7 +65572,7 @@ var styled_1$9 = __importDefault$j(require$$0$4);
|
|
|
65608
65572
|
var react_1$r = __importStar$c(React__default);
|
|
65609
65573
|
var _1$1 = __importDefault$j(attribution$1);
|
|
65610
65574
|
var Background = styled_1$9.default.div(templateObject_1$2B || (templateObject_1$2B = __makeTemplateObject$g(["\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(18, 18, 18, 0.6));\n cursor: default;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 75px;\n pointer-events: none;\n"], ["\n background: linear-gradient(rgba(0, 0, 0, 0), rgba(18, 18, 18, 0.6));\n cursor: default;\n position: absolute;\n bottom: 0;\n left: 0;\n right: 0;\n height: 75px;\n pointer-events: none;\n"])));
|
|
65611
|
-
var Attribution$1 = styled_1$9.default(_1$1.default)(templateObject_2$
|
|
65575
|
+
var Attribution$1 = styled_1$9.default(_1$1.default)(templateObject_2$1J || (templateObject_2$1J = __makeTemplateObject$g(["\n position: absolute;\n bottom: 10px;\n left: 10px;\n right: 10px;\n"], ["\n position: absolute;\n bottom: 10px;\n left: 10px;\n right: 10px;\n"])));
|
|
65612
65576
|
var Container$a = styled_1$9.default.div(templateObject_3$1e || (templateObject_3$1e = __makeTemplateObject$g(["\n transition: opacity 150ms ease-in;\n"], ["\n transition: opacity 150ms ease-in;\n"])));
|
|
65613
65577
|
var AttributionOverlay = function (_a) {
|
|
65614
65578
|
var gif = _a.gif, isHovered = _a.isHovered, onClick = _a.onClick;
|
|
@@ -65622,7 +65586,7 @@ var AttributionOverlay = function (_a) {
|
|
|
65622
65586
|
react_1$r.default.createElement(Attribution$1, { gif: gif, onClick: onClick }))) : null;
|
|
65623
65587
|
};
|
|
65624
65588
|
overlay.default = AttributionOverlay;
|
|
65625
|
-
var templateObject_1$2B, templateObject_2$
|
|
65589
|
+
var templateObject_1$2B, templateObject_2$1J, templateObject_3$1e;
|
|
65626
65590
|
|
|
65627
65591
|
var carousel = {};
|
|
65628
65592
|
|
|
@@ -65748,9 +65712,9 @@ var implementation = implementation$1;
|
|
|
65748
65712
|
|
|
65749
65713
|
var functionBind = Function.prototype.bind || implementation;
|
|
65750
65714
|
|
|
65751
|
-
var bind$
|
|
65715
|
+
var bind$8 = functionBind;
|
|
65752
65716
|
|
|
65753
|
-
var src = bind$
|
|
65717
|
+
var src = bind$8.call(Function.call, Object.prototype.hasOwnProperty);
|
|
65754
65718
|
|
|
65755
65719
|
var undefined$1;
|
|
65756
65720
|
|
|
@@ -65948,12 +65912,12 @@ var LEGACY_ALIASES = {
|
|
|
65948
65912
|
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
65949
65913
|
};
|
|
65950
65914
|
|
|
65951
|
-
var bind$
|
|
65915
|
+
var bind$7 = functionBind;
|
|
65952
65916
|
var hasOwn$2 = src;
|
|
65953
|
-
var $concat = bind$
|
|
65954
|
-
var $spliceApply = bind$
|
|
65955
|
-
var $replace = bind$
|
|
65956
|
-
var $strSlice = bind$
|
|
65917
|
+
var $concat = bind$7.call(Function.call, Array.prototype.concat);
|
|
65918
|
+
var $spliceApply = bind$7.call(Function.apply, Array.prototype.splice);
|
|
65919
|
+
var $replace = bind$7.call(Function.call, String.prototype.replace);
|
|
65920
|
+
var $strSlice = bind$7.call(Function.call, String.prototype.slice);
|
|
65957
65921
|
|
|
65958
65922
|
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
65959
65923
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
@@ -68889,7 +68853,7 @@ var observer_1$1 = __importDefault$f(observer);
|
|
|
68889
68853
|
var gif_1$1 = __importDefault$f(gif);
|
|
68890
68854
|
var pingback_context_manager_1$1 = __importDefault$f(pingbackContextManager);
|
|
68891
68855
|
var Container$9 = styled_1$8.default.div(templateObject_1$2A || (templateObject_1$2A = __makeTemplateObject$f(["\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: hidden;\n white-space: nowrap;\n position: relative;\n"], ["\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n overflow-y: hidden;\n white-space: nowrap;\n position: relative;\n"])));
|
|
68892
|
-
var Gif = styled_1$8.default(gif_1$1.default)(templateObject_2$
|
|
68856
|
+
var Gif = styled_1$8.default(gif_1$1.default)(templateObject_2$1I || (templateObject_2$1I = __makeTemplateObject$f(["\n position: relative;\n display: inline-block;\n list-style: none;\n margin-left: ", "px;\n /* make sure gifs are fully visible with a scrollbar */\n margin-bottom: 1px;\n\n &:first-of-type {\n margin-left: 0;\n }\n .", " {\n position: absolute;\n top: 0;\n left: 0;\n }\n"], ["\n position: relative;\n display: inline-block;\n list-style: none;\n margin-left: ", "px;\n /* make sure gifs are fully visible with a scrollbar */\n margin-bottom: 1px;\n\n &:first-of-type {\n margin-left: 0;\n }\n .", " {\n position: absolute;\n top: 0;\n left: 0;\n }\n"])), function (props) { return props.ml; }, gif_1$1.default.imgClassName);
|
|
68893
68857
|
var Observer = styled_1$8.default(observer_1$1.default)(templateObject_3$1d || (templateObject_3$1d = __makeTemplateObject$f(["\n display: inline-block;\n"], ["\n display: inline-block;\n"])));
|
|
68894
68858
|
var Loader$2 = styled_1$8.default.div(templateObject_4$Q || (templateObject_4$Q = __makeTemplateObject$f(["\n width: 30px;\n display: inline-block;\n opacity: ", ";\n height: ", "px;\n"], ["\n width: 30px;\n display: inline-block;\n opacity: ", ";\n height: ", "px;\n"])), function (props) { return (props.isFirstLoad ? 0 : 1); }, function (props) { return props.height; });
|
|
68895
68859
|
var defaultProps$1 = Object.freeze({ gutter: 6, user: {}, initialGifs: [] });
|
|
@@ -68979,7 +68943,7 @@ var Carousel$1 = /** @class */ (function (_super) {
|
|
|
68979
68943
|
return Carousel;
|
|
68980
68944
|
}(react_1$p.PureComponent));
|
|
68981
68945
|
carousel.default = Carousel$1;
|
|
68982
|
-
var templateObject_1$2A, templateObject_2$
|
|
68946
|
+
var templateObject_1$2A, templateObject_2$1I, templateObject_3$1d, templateObject_4$Q;
|
|
68983
68947
|
|
|
68984
68948
|
var grid = {};
|
|
68985
68949
|
|
|
@@ -69022,7 +68986,7 @@ var js_brand_1$4 = dist$2;
|
|
|
69022
68986
|
var react_1$n = __importDefault$d(React__default);
|
|
69023
68987
|
var bouncer = core_1$4.keyframes(templateObject_1$2y || (templateObject_1$2y = __makeTemplateObject$d(["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"], ["\n to {\n transform: scale(1.75) translateY(-20px);\n }\n"])));
|
|
69024
68988
|
var loaderHeight = 37;
|
|
69025
|
-
var Loader$1 = styled_1$6.default.div(templateObject_2$
|
|
68989
|
+
var Loader$1 = styled_1$6.default.div(templateObject_2$1H || (templateObject_2$1H = __makeTemplateObject$d(["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n"], ["\n display: flex;\n align-items: center;\n height: ", "px;\n padding-top: 15px;\n margin: 0 auto;\n text-align: center;\n justify-content: center;\n animation: pulse 0.8s ease-in-out 0s infinite alternate backwards;\n"])), loaderHeight);
|
|
69026
68990
|
var Dot = styled_1$6.default.div(templateObject_3$1c || (templateObject_3$1c = __makeTemplateObject$d(["\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n background: ", ";\n animation-delay: ", ";\n"], ["\n display: inline-block;\n height: 10px;\n width: 10px;\n margin: ", "px 10px 10px 10px;\n position: relative;\n box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.3);\n animation: ", " cubic-bezier(0.455, 0.03, 0.515, 0.955) 0.75s infinite alternate;\n background: ", ";\n animation-delay: ", ";\n"])), loaderHeight, bouncer, function (props) { return props.color; }, function (props) { return props.delay; });
|
|
69027
68991
|
loader.default = (function (_a) {
|
|
69028
68992
|
var _b = _a.className, className = _b === void 0 ? '' : _b;
|
|
@@ -69033,7 +68997,7 @@ loader.default = (function (_a) {
|
|
|
69033
68997
|
react_1$n.default.createElement(Dot, { color: js_brand_1$4.giphyRed, delay: ".3s" }),
|
|
69034
68998
|
react_1$n.default.createElement(Dot, { color: js_brand_1$4.giphyYellow, delay: ".4s" })));
|
|
69035
68999
|
});
|
|
69036
|
-
var templateObject_1$2y, templateObject_2$
|
|
69000
|
+
var templateObject_1$2y, templateObject_2$1H, templateObject_3$1c;
|
|
69037
69001
|
|
|
69038
69002
|
var masonryGrid = {};
|
|
69039
69003
|
|
|
@@ -69467,11 +69431,11 @@ theme.initTheme = initTheme;
|
|
|
69467
69431
|
// DRY but kinda ugly
|
|
69468
69432
|
var getSize = function (theme, includeWidth) {
|
|
69469
69433
|
if (includeWidth === void 0) { includeWidth = false; }
|
|
69470
|
-
return core_1$3.css(templateObject_3$1b || (templateObject_3$1b = __makeTemplateObject$b(["\n height: ", "px;\n ", ";\n @media (", ") {\n height: ", "px;\n ", ";\n }\n"], ["\n height: ", "px;\n ", ";\n @media (", ") {\n height: ", "px;\n ", ";\n }\n"])), theme.searchbarHeight, includeWidth && core_1$3.css(templateObject_1$2w || (templateObject_1$2w = __makeTemplateObject$b(["\n width: ", "px;\n "], ["\n width: ", "px;\n "])), theme.searchbarHeight), theme.condensedMediaQuery, theme.smallSearchbarHeight, includeWidth && core_1$3.css(templateObject_2$
|
|
69434
|
+
return core_1$3.css(templateObject_3$1b || (templateObject_3$1b = __makeTemplateObject$b(["\n height: ", "px;\n ", ";\n @media (", ") {\n height: ", "px;\n ", ";\n }\n"], ["\n height: ", "px;\n ", ";\n @media (", ") {\n height: ", "px;\n ", ";\n }\n"])), theme.searchbarHeight, includeWidth && core_1$3.css(templateObject_1$2w || (templateObject_1$2w = __makeTemplateObject$b(["\n width: ", "px;\n "], ["\n width: ", "px;\n "])), theme.searchbarHeight), theme.condensedMediaQuery, theme.smallSearchbarHeight, includeWidth && core_1$3.css(templateObject_2$1G || (templateObject_2$1G = __makeTemplateObject$b(["\n width: ", "px;\n "], ["\n width: ", "px;\n "])), theme.smallSearchbarHeight));
|
|
69471
69435
|
};
|
|
69472
69436
|
theme.getSize = getSize;
|
|
69473
69437
|
theme.default = styled_1$4.default;
|
|
69474
|
-
var templateObject_1$2w, templateObject_2$
|
|
69438
|
+
var templateObject_1$2w, templateObject_2$1G, templateObject_3$1b;
|
|
69475
69439
|
|
|
69476
69440
|
(function (exports) {
|
|
69477
69441
|
var __assign = (commonjsGlobal$7 && commonjsGlobal$7.__assign) || function () {
|
|
@@ -69715,7 +69679,7 @@ var channelMargin = 6;
|
|
|
69715
69679
|
var channelSearchHeight = function (theme) { return theme.searchbarHeight - channelMargin * 2; };
|
|
69716
69680
|
var smallChannelSearchHeight = function (theme) { return theme.smallSearchbarHeight - 3 * 2; };
|
|
69717
69681
|
var animateAvatar = function (h) { return core_1$2.keyframes(templateObject_1$2v || (templateObject_1$2v = __makeTemplateObject$a(["\nto {\n width: ", "px;\n}\n"], ["\nto {\n width: ", "px;\n}\n"])), h); };
|
|
69718
|
-
var Avatar$3 = theme_1$4.default(avatar_1$2.default)(templateObject_2$
|
|
69682
|
+
var Avatar$3 = theme_1$4.default(avatar_1$2.default)(templateObject_2$1F || (templateObject_2$1F = __makeTemplateObject$a(["\n height: ", "px;\n margin: 0;\n width: 0;\n animation: ", " 100ms ease-in-out forwards;\n @media (", ") {\n height: ", "px;\n animation: ", " 100ms ease-in-out forwards;\n }\n"], ["\n height: ", "px;\n margin: 0;\n width: 0;\n animation: ", " 100ms ease-in-out forwards;\n @media (", ") {\n height: ", "px;\n animation: ", " 100ms ease-in-out forwards;\n }\n"])), function (props) { return channelSearchHeight(props.theme); }, function (props) { return animateAvatar(channelSearchHeight(props.theme)); }, function (props) { return props.theme.condensedMediaQuery; }, function (props) { return smallChannelSearchHeight(props.theme); }, function (props) { return animateAvatar(smallChannelSearchHeight(props.theme)); });
|
|
69719
69683
|
var Username = theme_1$4.default.div(templateObject_3$1a || (templateObject_3$1a = __makeTemplateObject$a(["\n background: ", ";\n display: flex;\n align-items: center;\n padding-left: ", "px;\n"], ["\n background: ", ";\n display: flex;\n align-items: center;\n padding-left: ", "px;\n"])), function (props) { return (props.theme.mode === 'dark' ? js_brand_1$3.giphyCharcoal : js_brand_1$3.giphyWhite); }, channelMargin);
|
|
69720
69684
|
var UsernamePill = theme_1$4.default.div(templateObject_4$P || (templateObject_4$P = __makeTemplateObject$a(["\n background: ", ";\n display: flex;\n padding: 0 4px;\n color: ", ";\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n font-weight: 600;\n font-size: 12px;\n align-items: center;\n height: ", "px;\n @media (", ") {\n display: none;\n }\n"], ["\n background: ", ";\n display: flex;\n padding: 0 4px;\n color: ", ";\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n font-weight: 600;\n font-size: 12px;\n align-items: center;\n height: ", "px;\n @media (", ") {\n display: none;\n }\n"])), js_brand_1$3.giphyWhiteSmoke, js_brand_1$3.giphyDarkCharcoal, function (props) { return channelSearchHeight(props.theme); }, function (props) { return props.theme.condensedMediaQuery; });
|
|
69721
69685
|
var SearchBarChannel = function (_a) {
|
|
@@ -69730,7 +69694,7 @@ var SearchBarChannel = function (_a) {
|
|
|
69730
69694
|
activeChannel.user.is_verified && react_1$i.default.createElement(verified_badge_1$1.default, { size: 14 })))) : null;
|
|
69731
69695
|
};
|
|
69732
69696
|
searchBarChannel.default = SearchBarChannel;
|
|
69733
|
-
var templateObject_1$2v, templateObject_2$
|
|
69697
|
+
var templateObject_1$2v, templateObject_2$1F, templateObject_3$1a, templateObject_4$P;
|
|
69734
69698
|
|
|
69735
69699
|
var searchButton = {};
|
|
69736
69700
|
|
|
@@ -69857,7 +69821,7 @@ var purp = '#9933FF';
|
|
|
69857
69821
|
var pink = '#FF6666';
|
|
69858
69822
|
var strongEasing = 'cubic-bezier(0.920, 0.240, 0.185, 0.730)';
|
|
69859
69823
|
var searchFx = core_1$1.keyframes(templateObject_1$2u || (templateObject_1$2u = __makeTemplateObject$9(["\n 0% {\n transform: rotate(34deg) translate(-10px, 80px);\n };\n \n 100% {\n transform: rotate(34deg) translate(-10px, -20px);\n }\n"], ["\n 0% {\n transform: rotate(34deg) translate(-10px, 80px);\n };\n \n 100% {\n transform: rotate(34deg) translate(-10px, -20px);\n }\n"])));
|
|
69860
|
-
var plus$1 = core_1$1.keyframes(templateObject_2$
|
|
69824
|
+
var plus$1 = core_1$1.keyframes(templateObject_2$1E || (templateObject_2$1E = __makeTemplateObject$9(["\n 0% { \n transform: translate(0px, 0px);\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: translate(10px, -17px);\n opacity: 0;\n }\n"], ["\n 0% { \n transform: translate(0px, 0px);\n opacity: 0;\n }\n 50% {\n opacity: 1;\n }\n 100% {\n transform: translate(10px, -17px);\n opacity: 0;\n }\n"])));
|
|
69861
69825
|
var gradientFade = core_1$1.keyframes(templateObject_3$19 || (templateObject_3$19 = __makeTemplateObject$9(["\n 0% {\n opacity: 0;\n transform: translateX(-400%);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n transform: translateX(0);\n }\n"], ["\n 0% {\n opacity: 0;\n transform: translateX(-400%);\n }\n 50% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n transform: translateX(0);\n }\n"])));
|
|
69862
69826
|
var Container$8 = theme_1$3.default.div(templateObject_4$O || (templateObject_4$O = __makeTemplateObject$9(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n cursor: pointer;\n @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {\n display: none;\n }\n ", "\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n cursor: pointer;\n @media screen and (-ms-high-contrast: active), screen and (-ms-high-contrast: none) {\n display: none;\n }\n ", "\n"])), function (props) { return theme_1$3.getSize(props.theme, true); });
|
|
69863
69827
|
var GradientBox = theme_1$3.default.div(templateObject_5$G || (templateObject_5$G = __makeTemplateObject$9(["\n position: absolute;\n height: 100%;\n width: 100%;\n background: linear-gradient(45deg, ", " 0%, ", " 100%);\n overflow: hidden;\n &:before {\n animation: ", " ", " linear 0s infinite;\n background-image: linear-gradient(45deg, ", " 0%, ", " 50%, ", " 100%);\n background-size: 400%;\n background-position: 0% 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n width: 400%;\n }\n"], ["\n position: absolute;\n height: 100%;\n width: 100%;\n background: linear-gradient(45deg, ", " 0%, ", " 100%);\n overflow: hidden;\n &:before {\n animation: ", " ", " linear 0s infinite;\n background-image: linear-gradient(45deg, ", " 0%, ", " 50%, ", " 100%);\n background-size: 400%;\n background-position: 0% 100%;\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n right: 0;\n bottom: 0;\n width: 400%;\n }\n"])), purp, pink, gradientFade, time, purp, pink, purp);
|
|
@@ -69875,7 +69839,7 @@ var SearchButton = function () {
|
|
|
69875
69839
|
react_1$d.default.createElement(Scanner, null)))));
|
|
69876
69840
|
};
|
|
69877
69841
|
searchButton.default = SearchButton;
|
|
69878
|
-
var templateObject_1$2u, templateObject_2$
|
|
69842
|
+
var templateObject_1$2u, templateObject_2$1E, templateObject_3$19, templateObject_4$O, templateObject_5$G, templateObject_6$u, templateObject_7$o, templateObject_8$m;
|
|
69879
69843
|
|
|
69880
69844
|
var __makeTemplateObject$8 = (commonjsGlobal$7 && commonjsGlobal$7.__makeTemplateObject) || function (cooked, raw) {
|
|
69881
69845
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
@@ -69922,7 +69886,7 @@ function usePrevious$1(value) {
|
|
|
69922
69886
|
var SEARCH_DEBOUNCE = 500;
|
|
69923
69887
|
var Container$7 = theme_1$2.default.div(templateObject_1$2t || (templateObject_1$2t = __makeTemplateObject$8(["\n display: flex;\n background: white;\n ", "\n"], ["\n display: flex;\n background: white;\n ", "\n"])), function (props) { return theme_1$2.getSize(props.theme); });
|
|
69924
69888
|
var Input = theme_1$2.default.input(templateObject_3$18 || (templateObject_3$18 = __makeTemplateObject$8(["\n background: ", ";\n box-sizing: border-box;\n border: 0;\n appearance: none;\n font-weight: normal;\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n outline: 0;\n font-size: 15px;\n padding: 0 10px;\n border-radius: 0;\n text-overflow: ellipsis;\n color: ", ";\n &::placeholder {\n color: ", ";\n }\n min-width: 150px;\n flex: 1;\n ", "\n"], ["\n background: ", ";\n box-sizing: border-box;\n border: 0;\n appearance: none;\n font-weight: normal;\n font-family: interface, Helvetica Neue, helvetica, sans-serif;\n outline: 0;\n font-size: 15px;\n padding: 0 10px;\n border-radius: 0;\n text-overflow: ellipsis;\n color: ", ";\n &::placeholder {\n color: ", ";\n }\n min-width: 150px;\n flex: 1;\n ", "\n"])), function (props) { return (props.theme.mode === 'dark' ? js_brand_1$2.giphyCharcoal : js_brand_1$2.giphyWhite); }, function (props) { return (props.theme.mode === 'dark' ? js_brand_1$2.giphyWhite : js_brand_1$2.giphyBlack); }, function (props) { return (props.theme.mode === 'dark' ? js_brand_1$2.giphyLightGrey : js_brand_1$2.giphyLightGrey); }, function (props) {
|
|
69925
|
-
return props.isUsernameSearch && core_1.css(templateObject_2$
|
|
69889
|
+
return props.isUsernameSearch && core_1.css(templateObject_2$1D || (templateObject_2$1D = __makeTemplateObject$8(["\n color: ", ";\n "], ["\n color: ", ";\n "])), js_brand_1$2.giphyIndigo);
|
|
69926
69890
|
});
|
|
69927
69891
|
var SearchBar = function (_a) {
|
|
69928
69892
|
var className = _a.className, _b = _a.placeholder, placeholder = _b === void 0 ? "Search GIPHY" : _b, _c = _a.clear, clear = _c === void 0 ? false : _c, autoFocus = _a.autoFocus;
|
|
@@ -69989,7 +69953,7 @@ var SearchBar = function (_a) {
|
|
|
69989
69953
|
};
|
|
69990
69954
|
SearchBar.className = 'giphy-search-bar';
|
|
69991
69955
|
searchBar.default = SearchBar;
|
|
69992
|
-
var templateObject_1$2t, templateObject_2$
|
|
69956
|
+
var templateObject_1$2t, templateObject_2$1D, templateObject_3$18;
|
|
69993
69957
|
|
|
69994
69958
|
var suggestionBar = {};
|
|
69995
69959
|
|
|
@@ -70049,7 +70013,7 @@ var theme_1$1 = __importStar$4(theme);
|
|
|
70049
70013
|
var trending_icon_1 = __importDefault$5(trendingIcon);
|
|
70050
70014
|
var margin = 9;
|
|
70051
70015
|
var ChannelPillContainer = theme_1$1.default.div(templateObject_1$2s || (templateObject_1$2s = __makeTemplateObject$7(["\n background: ", ";\n display: flex;\n padding-right: 4px;\n align-items: center;\n margin-right: ", "px;\n cursor: pointer;\n"], ["\n background: ", ";\n display: flex;\n padding-right: 4px;\n align-items: center;\n margin-right: ", "px;\n cursor: pointer;\n"])), js_brand_1$1.giphyDarkestGrey, margin);
|
|
70052
|
-
var TrendingSearchPillContainer = theme_1$1.default.div(templateObject_2$
|
|
70016
|
+
var TrendingSearchPillContainer = theme_1$1.default.div(templateObject_2$1C || (templateObject_2$1C = __makeTemplateObject$7(["\n background: ", ";\n display: flex;\n padding: 14px;\n align-items: center;\n margin-right: ", "px;\n white-space: nowrap;\n cursor: pointer;\n font-style: italic;\n border-radius: 20px;\n"], ["\n background: ", ";\n display: flex;\n padding: 14px;\n align-items: center;\n margin-right: ", "px;\n white-space: nowrap;\n cursor: pointer;\n font-style: italic;\n border-radius: 20px;\n"])), js_brand_1$1.giphyDarkestGrey, margin);
|
|
70053
70017
|
var Avatar$2 = theme_1$1.default(avatar_1$1.default)(templateObject_3$17 || (templateObject_3$17 = __makeTemplateObject$7(["\n ", "\n"], ["\n ", "\n"])), function (props) { return theme_1$1.getSize(props.theme, true); });
|
|
70054
70018
|
var TrendingIcon = theme_1$1.default(trending_icon_1.default)(templateObject_4$N || (templateObject_4$N = __makeTemplateObject$7(["\n margin-right: 2px;\n"], ["\n margin-right: 2px;\n"])));
|
|
70055
70019
|
var ChannelPill = function (_a) {
|
|
@@ -70071,7 +70035,7 @@ var TrendingSearchPill = function (_a) {
|
|
|
70071
70035
|
trendingSearch));
|
|
70072
70036
|
};
|
|
70073
70037
|
pills.TrendingSearchPill = TrendingSearchPill;
|
|
70074
|
-
var templateObject_1$2s, templateObject_2$
|
|
70038
|
+
var templateObject_1$2s, templateObject_2$1C, templateObject_3$17, templateObject_4$N;
|
|
70075
70039
|
|
|
70076
70040
|
var __makeTemplateObject$6 = (commonjsGlobal$7 && commonjsGlobal$7.__makeTemplateObject) || function (cooked, raw) {
|
|
70077
70041
|
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
@@ -74972,7 +74936,7 @@ var avatar_1 = __importDefault$3(avatar);
|
|
|
74972
74936
|
var user_1 = __importDefault$3(user);
|
|
74973
74937
|
var clips_branding_1 = __importDefault$3(clipsBranding);
|
|
74974
74938
|
var Container$5 = styled_1$3.default.div(templateObject_1$2q || (templateObject_1$2q = __makeTemplateObject$5(["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n cursor: pointer;\n"], ["\n display: flex;\n align-items: center;\n font-family: interface, helvetica, arial;\n cursor: pointer;\n"])));
|
|
74975
|
-
var Avatar$1 = styled_1$3.default(avatar_1.default)(templateObject_2$
|
|
74939
|
+
var Avatar$1 = styled_1$3.default(avatar_1.default)(templateObject_2$1B || (templateObject_2$1B = __makeTemplateObject$5(["\n flex-shrink: 0;\n"], ["\n flex-shrink: 0;\n"])));
|
|
74976
74940
|
var Right = styled_1$3.default.div(templateObject_3$16 || (templateObject_3$16 = __makeTemplateObject$5(["\n display: flex;\n flex-direction: column;\n"], ["\n display: flex;\n flex-direction: column;\n"])));
|
|
74977
74941
|
var Attribution = function (_a) {
|
|
74978
74942
|
var gif = _a.gif, className = _a.className, onClick = _a.onClick;
|
|
@@ -75008,7 +74972,7 @@ var Attribution = function (_a) {
|
|
|
75008
74972
|
};
|
|
75009
74973
|
Attribution.className = 'giphy-attribution';
|
|
75010
74974
|
attribution.default = Attribution;
|
|
75011
|
-
var templateObject_1$2q, templateObject_2$
|
|
74975
|
+
var templateObject_1$2q, templateObject_2$1B, templateObject_3$16;
|
|
75012
74976
|
|
|
75013
74977
|
var volume = {};
|
|
75014
74978
|
|
|
@@ -75480,7 +75444,7 @@ var volume_1$1 = volume;
|
|
|
75480
75444
|
var progress_bar_1 = __importDefault$1(progressBar);
|
|
75481
75445
|
var video_1 = __importDefault$1(video);
|
|
75482
75446
|
var Container$4 = styled_1$1.default.div(templateObject_1$2o || (templateObject_1$2o = __makeTemplateObject$3(["\n position: relative;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: black;\n font-family: interface, helvetica, arial;\n -webkit-font-smoothing: antialiased;\n"], ["\n position: relative;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: black;\n font-family: interface, helvetica, arial;\n -webkit-font-smoothing: antialiased;\n"])));
|
|
75483
|
-
var Volume = styled_1$1.default.div(templateObject_2$
|
|
75447
|
+
var Volume = styled_1$1.default.div(templateObject_2$1A || (templateObject_2$1A = __makeTemplateObject$3(["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n cursor: pointer;\n"], ["\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n cursor: pointer;\n"])));
|
|
75484
75448
|
var Controls = styled_1$1.default.div(templateObject_3$15 || (templateObject_3$15 = __makeTemplateObject$3(["\n position: absolute;\n top: 10px;\n right: 10px;\n left: 10px;\n bottom: 0;\n display: flex;\n justify-content: space-between;\n opacity: ", ";\n transition: opacity ease-out 250ms;\n align-items: flex-start;\n"], ["\n position: absolute;\n top: 10px;\n right: 10px;\n left: 10px;\n bottom: 0;\n display: flex;\n justify-content: space-between;\n opacity: ", ";\n transition: opacity ease-out 250ms;\n align-items: flex-start;\n"])), function (props) { return (props.isHovered ? 1 : 0); });
|
|
75485
75449
|
var Title$9 = styled_1$1.default.div(templateObject_4$M || (templateObject_4$M = __makeTemplateObject$3(["\n font-size: 26px;\n color: white;\n margin-bottom: 5px;\n font-weight: bold;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n"], ["\n font-size: 26px;\n color: white;\n margin-bottom: 5px;\n font-weight: bold;\n text-overflow: ellipsis;\n overflow: hidden;\n white-space: nowrap;\n user-select: none;\n cursor: pointer;\n"])));
|
|
75486
75450
|
var TitleContainer$1 = styled_1$1.default.div(templateObject_5$F || (templateObject_5$F = __makeTemplateObject$3(["\n position: relative;\n min-width: 0;\n"], ["\n position: relative;\n min-width: 0;\n"])));
|
|
@@ -75564,7 +75528,7 @@ var VideoWrapper = function (props) {
|
|
|
75564
75528
|
return props.controls ? react_1$1.default.createElement(VideoPlayer, __assign$3({}, props)) : react_1$1.default.createElement(video_1.default, __assign$3({}, props));
|
|
75565
75529
|
};
|
|
75566
75530
|
video$1.default = VideoWrapper;
|
|
75567
|
-
var templateObject_1$2o, templateObject_2$
|
|
75531
|
+
var templateObject_1$2o, templateObject_2$1A, templateObject_3$15, templateObject_4$M, templateObject_5$F, templateObject_6$t;
|
|
75568
75532
|
|
|
75569
75533
|
var playPause = {};
|
|
75570
75534
|
|
|
@@ -75640,7 +75604,7 @@ var react_1 = __importStar(React__default);
|
|
|
75640
75604
|
var _1 = __importDefault(video$1);
|
|
75641
75605
|
var volume_1 = volume;
|
|
75642
75606
|
var VideoContainer = styled_1.default.div(templateObject_1$2n || (templateObject_1$2n = __makeTemplateObject$2(["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 100%;\n"], ["\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n height: 100%;\n width: 100%;\n"])));
|
|
75643
|
-
var VideoStyled = styled_1.default(_1.default)(templateObject_2$
|
|
75607
|
+
var VideoStyled = styled_1.default(_1.default)(templateObject_2$1z || (templateObject_2$1z = __makeTemplateObject$2(["\n height: 100%;\n display: inline-block;\n object-fit: fill;\n pointer-events: none;\n background: rgb(0, 0, 0, 0);\n"], ["\n height: 100%;\n display: inline-block;\n object-fit: fill;\n pointer-events: none;\n background: rgb(0, 0, 0, 0);\n"])));
|
|
75644
75608
|
var Button$1 = styled_1.default.div(templateObject_3$14 || (templateObject_3$14 = __makeTemplateObject$2(["\n position: absolute;\n top: 6px;\n right: 6px;\n cursor: pointer;\n opacity: ", ";\n transition: opacity ease-out 800ms;\n"], ["\n position: absolute;\n top: 6px;\n right: 6px;\n cursor: pointer;\n opacity: ", ";\n transition: opacity ease-out 800ms;\n"])), function (props) { return (props.isHovered ? 1 : 0.8); });
|
|
75645
75609
|
var speakerClassName = 'giphy-video-overlay-button';
|
|
75646
75610
|
var VolumeButton = function (_a) {
|
|
@@ -75675,7 +75639,7 @@ var VideoOverlay = function (_a) {
|
|
|
75675
75639
|
};
|
|
75676
75640
|
VideoOverlay.imgClassName = speakerClassName;
|
|
75677
75641
|
videoOverlay.default = VideoOverlay;
|
|
75678
|
-
var templateObject_1$2n, templateObject_2$
|
|
75642
|
+
var templateObject_1$2n, templateObject_2$1z, templateObject_3$14;
|
|
75679
75643
|
|
|
75680
75644
|
var _args = [
|
|
75681
75645
|
[
|
|
@@ -77432,12 +77396,12 @@ var path$1$1 = global$c$1;
|
|
|
77432
77396
|
var path$2 = path$1$1;
|
|
77433
77397
|
var global$b$1 = global$j$1;
|
|
77434
77398
|
|
|
77435
|
-
var aFunction$8 = function (variable) {
|
|
77399
|
+
var aFunction$8$1 = function (variable) {
|
|
77436
77400
|
return typeof variable == 'function' ? variable : undefined;
|
|
77437
77401
|
};
|
|
77438
77402
|
|
|
77439
77403
|
var getBuiltIn$5$1 = function (namespace, method) {
|
|
77440
|
-
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];
|
|
77404
|
+
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];
|
|
77441
77405
|
};
|
|
77442
77406
|
|
|
77443
77407
|
var objectGetOwnPropertyNames$1 = {};
|
|
@@ -77648,12 +77612,12 @@ var aFunction$7$1 = function (it) {
|
|
|
77648
77612
|
var requireObjectCoercible$7$1 = requireObjectCoercible$9$1; // `ToObject` abstract operation
|
|
77649
77613
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
77650
77614
|
|
|
77651
|
-
var toObject$7 = function (argument) {
|
|
77615
|
+
var toObject$7$1 = function (argument) {
|
|
77652
77616
|
return Object(requireObjectCoercible$7$1(argument));
|
|
77653
77617
|
};
|
|
77654
77618
|
|
|
77655
77619
|
var aFunction$6$1 = aFunction$7$1;
|
|
77656
|
-
var toObject$6$1 = toObject$7;
|
|
77620
|
+
var toObject$6$1 = toObject$7$1;
|
|
77657
77621
|
var IndexedObject$1$1 = indexedObject$1;
|
|
77658
77622
|
var toLength$6$1 = toLength$8$1; // `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
77659
77623
|
|
|
@@ -77771,7 +77735,7 @@ var fails$a$1 = fails$h$1;
|
|
|
77771
77735
|
var objectKeys$1$1 = objectKeys$2$1;
|
|
77772
77736
|
var getOwnPropertySymbolsModule$2 = objectGetOwnPropertySymbols$1;
|
|
77773
77737
|
var propertyIsEnumerableModule$2 = objectPropertyIsEnumerable$1;
|
|
77774
|
-
var toObject$5$1 = toObject$7;
|
|
77738
|
+
var toObject$5$1 = toObject$7$1;
|
|
77775
77739
|
var IndexedObject$3 = indexedObject$1;
|
|
77776
77740
|
var nativeAssign$1 = Object.assign;
|
|
77777
77741
|
var defineProperty$2$1 = Object.defineProperty; // `Object.assign` method
|
|
@@ -78046,7 +78010,7 @@ if (ArrayPrototype$1$1[UNSCOPABLES$1] == undefined) {
|
|
|
78046
78010
|
} // add a key to Array.prototype[@@unscopables]
|
|
78047
78011
|
|
|
78048
78012
|
|
|
78049
|
-
var addToUnscopables$2 = function (key) {
|
|
78013
|
+
var addToUnscopables$2$1 = function (key) {
|
|
78050
78014
|
ArrayPrototype$1$1[UNSCOPABLES$1][key] = true;
|
|
78051
78015
|
};
|
|
78052
78016
|
|
|
@@ -78061,7 +78025,7 @@ var correctPrototypeGetter$1 = !fails$8$1(function () {
|
|
|
78061
78025
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
78062
78026
|
});
|
|
78063
78027
|
var has$4$1 = has$c$1;
|
|
78064
|
-
var toObject$4$1 = toObject$7;
|
|
78028
|
+
var toObject$4$1 = toObject$7$1;
|
|
78065
78029
|
var sharedKey$4 = sharedKey$3$1;
|
|
78066
78030
|
var CORRECT_PROTOTYPE_GETTER$1 = correctPrototypeGetter$1;
|
|
78067
78031
|
var IE_PROTO$2 = sharedKey$4('IE_PROTO');
|
|
@@ -78295,7 +78259,7 @@ var defineIterator$1$1 = function (Iterable, NAME, IteratorConstructor, next, DE
|
|
|
78295
78259
|
};
|
|
78296
78260
|
|
|
78297
78261
|
var toIndexedObject$5 = toIndexedObject$4$1;
|
|
78298
|
-
var addToUnscopables$1$1 = addToUnscopables$2;
|
|
78262
|
+
var addToUnscopables$1$1 = addToUnscopables$2$1;
|
|
78299
78263
|
var Iterators$2$1 = iterators$1;
|
|
78300
78264
|
var InternalStateModule$1$1 = internalState$1;
|
|
78301
78265
|
var defineIterator$3 = defineIterator$1$1;
|
|
@@ -78834,7 +78798,7 @@ var PeoplePicker = function PeoplePicker(props) {
|
|
|
78834
78798
|
}
|
|
78835
78799
|
|
|
78836
78800
|
function prepareEmptyInputFocusItems(accounts) {
|
|
78837
|
-
if (isArray$3(accounts)) {
|
|
78801
|
+
if (isArray$3$1(accounts)) {
|
|
78838
78802
|
return excludeSelectedItems(accounts).map(toPersona);
|
|
78839
78803
|
}
|
|
78840
78804
|
|
|
@@ -78943,7 +78907,7 @@ function isSameAccount(a, b) {
|
|
|
78943
78907
|
return a.userPrincipalName === b.userPrincipalName;
|
|
78944
78908
|
}
|
|
78945
78909
|
|
|
78946
|
-
function isArray$3(accounts) {
|
|
78910
|
+
function isArray$3$1(accounts) {
|
|
78947
78911
|
return typeof accounts.length !== 'undefined';
|
|
78948
78912
|
}
|
|
78949
78913
|
|
|
@@ -79507,7 +79471,7 @@ var advanceStringIndex$2$1 = function (S, index, unicode) {
|
|
|
79507
79471
|
|
|
79508
79472
|
var fixRegExpWellKnownSymbolLogic$1$1 = fixRegexpWellKnownSymbolLogic$2;
|
|
79509
79473
|
var anObject$5$1 = anObject$e$1;
|
|
79510
|
-
var toObject$3$1 = toObject$7;
|
|
79474
|
+
var toObject$3$1 = toObject$7$1;
|
|
79511
79475
|
var toLength$4$1 = toLength$8$1;
|
|
79512
79476
|
var toInteger$6 = toInteger$4$1;
|
|
79513
79477
|
var requireObjectCoercible$2$2 = requireObjectCoercible$9$1;
|
|
@@ -81126,7 +81090,7 @@ var hasFlag = function hasFlag(baseValue, flag) {
|
|
|
81126
81090
|
|
|
81127
81091
|
var $$2$1 = _export$1;
|
|
81128
81092
|
var aFunction$1$1 = aFunction$7$1;
|
|
81129
|
-
var toObject$2$1 = toObject$7;
|
|
81093
|
+
var toObject$2$1 = toObject$7$1;
|
|
81130
81094
|
var fails$2$2 = fails$h$1;
|
|
81131
81095
|
var arrayMethodIsStrict$3 = arrayMethodIsStrict$2$1;
|
|
81132
81096
|
var test$3 = [];
|
|
@@ -82486,6 +82450,61 @@ function showPhoto(url, title) {
|
|
|
82486
82450
|
return;
|
|
82487
82451
|
}
|
|
82488
82452
|
}
|
|
82453
|
+
// eslint-disable-next-line max-len
|
|
82454
|
+
|
|
82455
|
+
|
|
82456
|
+
var whitespaces$2$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
82457
|
+
var requireObjectCoercible$e = requireObjectCoercible$9$1;
|
|
82458
|
+
var whitespaces$1$2 = whitespaces$2$2;
|
|
82459
|
+
var whitespace$2 = '[' + whitespaces$1$2 + ']';
|
|
82460
|
+
var ltrim$2 = RegExp('^' + whitespace$2 + whitespace$2 + '*');
|
|
82461
|
+
var rtrim$2 = RegExp(whitespace$2 + whitespace$2 + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
82462
|
+
|
|
82463
|
+
var createMethod$5 = function (TYPE) {
|
|
82464
|
+
return function ($this) {
|
|
82465
|
+
var string = String(requireObjectCoercible$e($this));
|
|
82466
|
+
if (TYPE & 1) string = string.replace(ltrim$2, '');
|
|
82467
|
+
if (TYPE & 2) string = string.replace(rtrim$2, '');
|
|
82468
|
+
return string;
|
|
82469
|
+
};
|
|
82470
|
+
};
|
|
82471
|
+
|
|
82472
|
+
var stringTrim$2 = {
|
|
82473
|
+
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
82474
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
|
|
82475
|
+
start: createMethod$5(1),
|
|
82476
|
+
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
82477
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
|
|
82478
|
+
end: createMethod$5(2),
|
|
82479
|
+
// `String.prototype.trim` method
|
|
82480
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
82481
|
+
trim: createMethod$5(3)
|
|
82482
|
+
};
|
|
82483
|
+
var fails$k = fails$h$1;
|
|
82484
|
+
var whitespaces$5 = whitespaces$2$2;
|
|
82485
|
+
var non$2 = '\u200B\u0085\u180E'; // check that a method works with the correct list
|
|
82486
|
+
// of whitespaces and has a correct name
|
|
82487
|
+
|
|
82488
|
+
var stringTrimForced$2 = function (METHOD_NAME) {
|
|
82489
|
+
return fails$k(function () {
|
|
82490
|
+
return !!whitespaces$5[METHOD_NAME]() || non$2[METHOD_NAME]() != non$2 || whitespaces$5[METHOD_NAME].name !== METHOD_NAME;
|
|
82491
|
+
});
|
|
82492
|
+
};
|
|
82493
|
+
|
|
82494
|
+
var $$1$2 = _export$1;
|
|
82495
|
+
var $trim$2 = stringTrim$2.trim;
|
|
82496
|
+
var forcedStringTrimMethod$2 = stringTrimForced$2; // `String.prototype.trim` method
|
|
82497
|
+
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
82498
|
+
|
|
82499
|
+
$$1$2({
|
|
82500
|
+
target: 'String',
|
|
82501
|
+
proto: true,
|
|
82502
|
+
forced: forcedStringTrimMethod$2('trim')
|
|
82503
|
+
}, {
|
|
82504
|
+
trim: function trim() {
|
|
82505
|
+
return $trim$2(this);
|
|
82506
|
+
}
|
|
82507
|
+
});
|
|
82489
82508
|
|
|
82490
82509
|
var TextLink = function TextLink(_a) {
|
|
82491
82510
|
var url = _a.url,
|
|
@@ -82553,7 +82572,10 @@ var ExternalLinkHandler = function ExternalLinkHandler(_a) {
|
|
|
82553
82572
|
};
|
|
82554
82573
|
|
|
82555
82574
|
var ToolbarIconButtonWithToolTip = function ToolbarIconButtonWithToolTip(_a) {
|
|
82575
|
+
var _b;
|
|
82576
|
+
|
|
82556
82577
|
var iconName = _a.iconName,
|
|
82578
|
+
ariaLabelText = _a.ariaLabel,
|
|
82557
82579
|
ariaLabelResourceKey = _a.ariaLabelResourceKey,
|
|
82558
82580
|
onClick = _a.onClick,
|
|
82559
82581
|
to = _a.to,
|
|
@@ -82562,10 +82584,10 @@ var ToolbarIconButtonWithToolTip = function ToolbarIconButtonWithToolTip(_a) {
|
|
|
82562
82584
|
tooltipResourceKey = _a.tooltipResourceKey,
|
|
82563
82585
|
disabled = _a.disabled,
|
|
82564
82586
|
className = _a.className,
|
|
82565
|
-
rest = __rest$1(_a, ["iconName", "ariaLabelResourceKey", "onClick", "to", "target", "tooltipText", "tooltipResourceKey", "disabled", "className"]);
|
|
82587
|
+
rest = __rest$1(_a, ["iconName", "ariaLabel", "ariaLabelResourceKey", "onClick", "to", "target", "tooltipText", "tooltipResourceKey", "disabled", "className"]);
|
|
82566
82588
|
|
|
82567
82589
|
var formatMessage = useIntl().formatMessage;
|
|
82568
|
-
var ariaLabel = formatMessage({
|
|
82590
|
+
var ariaLabel = ariaLabelText || ((_b = ariaLabelResourceKey === null || ariaLabelResourceKey === void 0 ? void 0 : ariaLabelResourceKey.trim()) === null || _b === void 0 ? void 0 : _b.length) > 0 && formatMessage({
|
|
82569
82591
|
id: ariaLabelResourceKey
|
|
82570
82592
|
});
|
|
82571
82593
|
return jsxs(Tooltip, __assign$1({
|
|
@@ -84378,62 +84400,8 @@ var inlineObjectsClassNames = {
|
|
|
84378
84400
|
video: 'video-view-container',
|
|
84379
84401
|
code: 'news-inline-code',
|
|
84380
84402
|
quote: 'news-inline-quote'
|
|
84381
|
-
}; // a string of all valid unicode whitespaces
|
|
84382
|
-
// eslint-disable-next-line max-len
|
|
84383
|
-
|
|
84384
|
-
var whitespaces$2$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
|
|
84385
|
-
var requireObjectCoercible$e = requireObjectCoercible$9$1;
|
|
84386
|
-
var whitespaces$1$2 = whitespaces$2$2;
|
|
84387
|
-
var whitespace$2 = '[' + whitespaces$1$2 + ']';
|
|
84388
|
-
var ltrim$2 = RegExp('^' + whitespace$2 + whitespace$2 + '*');
|
|
84389
|
-
var rtrim$2 = RegExp(whitespace$2 + whitespace$2 + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
84390
|
-
|
|
84391
|
-
var createMethod$5 = function (TYPE) {
|
|
84392
|
-
return function ($this) {
|
|
84393
|
-
var string = String(requireObjectCoercible$e($this));
|
|
84394
|
-
if (TYPE & 1) string = string.replace(ltrim$2, '');
|
|
84395
|
-
if (TYPE & 2) string = string.replace(rtrim$2, '');
|
|
84396
|
-
return string;
|
|
84397
|
-
};
|
|
84398
84403
|
};
|
|
84399
84404
|
|
|
84400
|
-
var stringTrim$2 = {
|
|
84401
|
-
// `String.prototype.{ trimLeft, trimStart }` methods
|
|
84402
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimstart
|
|
84403
|
-
start: createMethod$5(1),
|
|
84404
|
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
84405
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trimend
|
|
84406
|
-
end: createMethod$5(2),
|
|
84407
|
-
// `String.prototype.trim` method
|
|
84408
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
84409
|
-
trim: createMethod$5(3)
|
|
84410
|
-
};
|
|
84411
|
-
var fails$k = fails$h$1;
|
|
84412
|
-
var whitespaces$5 = whitespaces$2$2;
|
|
84413
|
-
var non$2 = '\u200B\u0085\u180E'; // check that a method works with the correct list
|
|
84414
|
-
// of whitespaces and has a correct name
|
|
84415
|
-
|
|
84416
|
-
var stringTrimForced$2 = function (METHOD_NAME) {
|
|
84417
|
-
return fails$k(function () {
|
|
84418
|
-
return !!whitespaces$5[METHOD_NAME]() || non$2[METHOD_NAME]() != non$2 || whitespaces$5[METHOD_NAME].name !== METHOD_NAME;
|
|
84419
|
-
});
|
|
84420
|
-
};
|
|
84421
|
-
|
|
84422
|
-
var $$1$2 = _export$1;
|
|
84423
|
-
var $trim$2 = stringTrim$2.trim;
|
|
84424
|
-
var forcedStringTrimMethod$2 = stringTrimForced$2; // `String.prototype.trim` method
|
|
84425
|
-
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
84426
|
-
|
|
84427
|
-
$$1$2({
|
|
84428
|
-
target: 'String',
|
|
84429
|
-
proto: true,
|
|
84430
|
-
forced: forcedStringTrimMethod$2('trim')
|
|
84431
|
-
}, {
|
|
84432
|
-
trim: function trim() {
|
|
84433
|
-
return $trim$2(this);
|
|
84434
|
-
}
|
|
84435
|
-
});
|
|
84436
|
-
|
|
84437
84405
|
function isNullOrWhitespace(s, isHtml) {
|
|
84438
84406
|
if (isHtml === void 0) {
|
|
84439
84407
|
isHtml = false;
|
|
@@ -84615,19 +84583,19 @@ var templateObject_1$9$2, templateObject_2$7$2, templateObject_3$6$2, templateOb
|
|
|
84615
84583
|
var classof$c = classofRaw$1$1; // `IsArray` abstract operation
|
|
84616
84584
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
84617
84585
|
|
|
84618
|
-
var isArray$2 = Array.isArray || function isArray(arg) {
|
|
84586
|
+
var isArray$2$1 = Array.isArray || function isArray(arg) {
|
|
84619
84587
|
return classof$c(arg) == 'Array';
|
|
84620
84588
|
};
|
|
84621
84589
|
|
|
84622
|
-
var isArray$1$1 = isArray$2;
|
|
84590
|
+
var isArray$1$1 = isArray$2$1;
|
|
84623
84591
|
var toLength$1$1 = toLength$8$1;
|
|
84624
|
-
var bind$
|
|
84592
|
+
var bind$6 = functionBindContext$1; // `FlattenIntoArray` abstract operation
|
|
84625
84593
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
84626
84594
|
|
|
84627
|
-
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
84595
|
+
var flattenIntoArray$1$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
84628
84596
|
var targetIndex = start;
|
|
84629
84597
|
var sourceIndex = 0;
|
|
84630
|
-
var mapFn = mapper ? bind$
|
|
84598
|
+
var mapFn = mapper ? bind$6(mapper, thisArg, 3) : false;
|
|
84631
84599
|
var element;
|
|
84632
84600
|
|
|
84633
84601
|
while (sourceIndex < sourceLen) {
|
|
@@ -84635,7 +84603,7 @@ var flattenIntoArray$1 = function (target, original, source, sourceLen, start, d
|
|
|
84635
84603
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
84636
84604
|
|
|
84637
84605
|
if (depth > 0 && isArray$1$1(element)) {
|
|
84638
|
-
targetIndex = flattenIntoArray$1(target, original, element, toLength$1$1(element.length), targetIndex, depth - 1) - 1;
|
|
84606
|
+
targetIndex = flattenIntoArray$1$1(target, original, element, toLength$1$1(element.length), targetIndex, depth - 1) - 1;
|
|
84639
84607
|
} else {
|
|
84640
84608
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
84641
84609
|
target[targetIndex] = element;
|
|
@@ -84650,21 +84618,21 @@ var flattenIntoArray$1 = function (target, original, source, sourceLen, start, d
|
|
|
84650
84618
|
return targetIndex;
|
|
84651
84619
|
};
|
|
84652
84620
|
|
|
84653
|
-
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
84654
|
-
var isObject$
|
|
84655
|
-
var isArray$4 = isArray$2;
|
|
84656
|
-
var wellKnownSymbol$
|
|
84657
|
-
var SPECIES$
|
|
84621
|
+
var flattenIntoArray_1$1 = flattenIntoArray$1$1;
|
|
84622
|
+
var isObject$f = isObject$a$1;
|
|
84623
|
+
var isArray$4 = isArray$2$1;
|
|
84624
|
+
var wellKnownSymbol$p = wellKnownSymbol$i$1;
|
|
84625
|
+
var SPECIES$6 = wellKnownSymbol$p('species'); // `ArraySpeciesCreate` abstract operation
|
|
84658
84626
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
84659
84627
|
|
|
84660
|
-
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
84628
|
+
var arraySpeciesCreate$1$1 = function (originalArray, length) {
|
|
84661
84629
|
var C;
|
|
84662
84630
|
|
|
84663
84631
|
if (isArray$4(originalArray)) {
|
|
84664
84632
|
C = originalArray.constructor; // cross-realm fallback
|
|
84665
84633
|
|
|
84666
|
-
if (typeof C == 'function' && (C === Array || isArray$4(C.prototype))) C = undefined;else if (isObject$
|
|
84667
|
-
C = C[SPECIES$
|
|
84634
|
+
if (typeof C == 'function' && (C === Array || isArray$4(C.prototype))) C = undefined;else if (isObject$f(C)) {
|
|
84635
|
+
C = C[SPECIES$6];
|
|
84668
84636
|
if (C === null) C = undefined;
|
|
84669
84637
|
}
|
|
84670
84638
|
}
|
|
@@ -84672,15 +84640,15 @@ var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
|
84672
84640
|
return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
84673
84641
|
};
|
|
84674
84642
|
|
|
84675
|
-
var $$
|
|
84676
|
-
var flattenIntoArray = flattenIntoArray_1;
|
|
84677
|
-
var toObject$1$1 = toObject$7;
|
|
84678
|
-
var toLength$
|
|
84643
|
+
var $$i = _export$1;
|
|
84644
|
+
var flattenIntoArray$2 = flattenIntoArray_1$1;
|
|
84645
|
+
var toObject$1$1 = toObject$7$1;
|
|
84646
|
+
var toLength$c = toLength$8$1;
|
|
84679
84647
|
var aFunction$9 = aFunction$7$1;
|
|
84680
|
-
var arraySpeciesCreate = arraySpeciesCreate$1; // `Array.prototype.flatMap` method
|
|
84648
|
+
var arraySpeciesCreate$2 = arraySpeciesCreate$1$1; // `Array.prototype.flatMap` method
|
|
84681
84649
|
// https://github.com/tc39/proposal-flatMap
|
|
84682
84650
|
|
|
84683
|
-
$$
|
|
84651
|
+
$$i({
|
|
84684
84652
|
target: 'Array',
|
|
84685
84653
|
proto: true
|
|
84686
84654
|
}, {
|
|
@@ -84688,17 +84656,17 @@ $$h({
|
|
|
84688
84656
|
/* , thisArg */
|
|
84689
84657
|
) {
|
|
84690
84658
|
var O = toObject$1$1(this);
|
|
84691
|
-
var sourceLen = toLength$
|
|
84659
|
+
var sourceLen = toLength$c(O.length);
|
|
84692
84660
|
var A;
|
|
84693
84661
|
aFunction$9(callbackfn);
|
|
84694
|
-
A = arraySpeciesCreate(O, 0);
|
|
84695
|
-
A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
84662
|
+
A = arraySpeciesCreate$2(O, 0);
|
|
84663
|
+
A.length = flattenIntoArray$2(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
84696
84664
|
return A;
|
|
84697
84665
|
}
|
|
84698
84666
|
}); // this method was added to unscopables after implementation
|
|
84699
84667
|
// in popular engines, so it's moved to a separate module
|
|
84700
84668
|
|
|
84701
|
-
var addToUnscopables$3 = addToUnscopables$2;
|
|
84669
|
+
var addToUnscopables$3 = addToUnscopables$2$1;
|
|
84702
84670
|
addToUnscopables$3('flatMap');
|
|
84703
84671
|
|
|
84704
84672
|
function useItemLoaderWithPreFetch(pageSize, handler, deps) {
|
|
@@ -86215,7 +86183,7 @@ var Host$e = _styled.div.withConfig({
|
|
|
86215
86183
|
var Content$a = _styled.div.withConfig({
|
|
86216
86184
|
displayName: "PageAlert__Content",
|
|
86217
86185
|
componentId: "sc-gj7gx6-1"
|
|
86218
|
-
})(templateObject_2$
|
|
86186
|
+
})(templateObject_2$1y || (templateObject_2$1y = __makeTemplateObject$1(["\n padding: 30px;\n text-align: center;\n"], ["\n padding: 30px;\n text-align: center;\n"])));
|
|
86219
86187
|
|
|
86220
86188
|
var SvgContainer = _styled.div.withConfig({
|
|
86221
86189
|
displayName: "PageAlert__SvgContainer",
|
|
@@ -86237,7 +86205,7 @@ _styled.div.withConfig({
|
|
|
86237
86205
|
componentId: "sc-gj7gx6-5"
|
|
86238
86206
|
})(templateObject_6$s || (templateObject_6$s = __makeTemplateObject$1(["\n display: flex;\n justify-content: space-around;\n"], ["\n display: flex;\n justify-content: space-around;\n"])));
|
|
86239
86207
|
|
|
86240
|
-
var templateObject_1$2m, templateObject_2$
|
|
86208
|
+
var templateObject_1$2m, templateObject_2$1y, templateObject_3$13, templateObject_4$L, templateObject_5$E, templateObject_6$s;
|
|
86241
86209
|
var propTypes$1 = {
|
|
86242
86210
|
exports: {}
|
|
86243
86211
|
};
|
|
@@ -87366,9 +87334,9 @@ var AuthenticationContextProvider = function AuthenticationContextProvider(_a) {
|
|
|
87366
87334
|
}), void 0);
|
|
87367
87335
|
};
|
|
87368
87336
|
|
|
87369
|
-
var version$1 = "0.
|
|
87370
|
-
var buildId = "
|
|
87371
|
-
var commitId = "
|
|
87337
|
+
var version$1 = "0.3.48";
|
|
87338
|
+
var buildId = "95616";
|
|
87339
|
+
var commitId = "8bb428aa6fbd7c23ad4e9d2fc104de48d50d0419";
|
|
87372
87340
|
var isCustomerBuild = false;
|
|
87373
87341
|
var buildInfo = {
|
|
87374
87342
|
version: version$1,
|
|
@@ -87377,17 +87345,17 @@ var buildInfo = {
|
|
|
87377
87345
|
isCustomerBuild: isCustomerBuild
|
|
87378
87346
|
};
|
|
87379
87347
|
|
|
87380
|
-
var isObject$
|
|
87348
|
+
var isObject$e = isObject$u;
|
|
87381
87349
|
var classof$b = classofRaw$9;
|
|
87382
|
-
var wellKnownSymbol$
|
|
87350
|
+
var wellKnownSymbol$o = wellKnownSymbol$E;
|
|
87383
87351
|
|
|
87384
|
-
var MATCH$4 = wellKnownSymbol$
|
|
87352
|
+
var MATCH$4 = wellKnownSymbol$o('match');
|
|
87385
87353
|
|
|
87386
87354
|
// `IsRegExp` abstract operation
|
|
87387
87355
|
// https://tc39.github.io/ecma262/#sec-isregexp
|
|
87388
87356
|
var isRegexp$1 = function (it) {
|
|
87389
87357
|
var isRegExp;
|
|
87390
|
-
return isObject$
|
|
87358
|
+
return isObject$e(it) && ((isRegExp = it[MATCH$4]) !== undefined ? !!isRegExp : classof$b(it) == 'RegExp');
|
|
87391
87359
|
};
|
|
87392
87360
|
|
|
87393
87361
|
var isRegExp$5 = isRegexp$1;
|
|
@@ -87398,9 +87366,9 @@ var notARegexp$1 = function (it) {
|
|
|
87398
87366
|
} return it;
|
|
87399
87367
|
};
|
|
87400
87368
|
|
|
87401
|
-
var wellKnownSymbol$
|
|
87369
|
+
var wellKnownSymbol$n = wellKnownSymbol$E;
|
|
87402
87370
|
|
|
87403
|
-
var MATCH$3 = wellKnownSymbol$
|
|
87371
|
+
var MATCH$3 = wellKnownSymbol$n('match');
|
|
87404
87372
|
|
|
87405
87373
|
var correctIsRegexpLogic$1 = function (METHOD_NAME) {
|
|
87406
87374
|
var regexp = /./;
|
|
@@ -87414,14 +87382,14 @@ var correctIsRegexpLogic$1 = function (METHOD_NAME) {
|
|
|
87414
87382
|
} return false;
|
|
87415
87383
|
};
|
|
87416
87384
|
|
|
87417
|
-
var $$
|
|
87385
|
+
var $$h = _export$7;
|
|
87418
87386
|
var notARegExp$2 = notARegexp$1;
|
|
87419
87387
|
var requireObjectCoercible$d = requireObjectCoercible$l;
|
|
87420
87388
|
var correctIsRegExpLogic$2 = correctIsRegexpLogic$1;
|
|
87421
87389
|
|
|
87422
87390
|
// `String.prototype.includes` method
|
|
87423
87391
|
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
|
87424
|
-
$$
|
|
87392
|
+
$$h({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
|
|
87425
87393
|
includes: function includes(searchString /* , position = 0 */) {
|
|
87426
87394
|
return !!~String(requireObjectCoercible$d(this))
|
|
87427
87395
|
.indexOf(notARegExp$2(searchString), arguments.length > 1 ? arguments[1] : undefined);
|
|
@@ -87763,9 +87731,9 @@ var DetailsContainer = _styled.div.withConfig({
|
|
|
87763
87731
|
var Details = _styled.p.withConfig({
|
|
87764
87732
|
displayName: "ReachErrorProvider__Details",
|
|
87765
87733
|
componentId: "sc-15225g3-1"
|
|
87766
|
-
})(templateObject_2$
|
|
87734
|
+
})(templateObject_2$1x || (templateObject_2$1x = __makeTemplateObject$l(["\n opacity: 0.4;\n font-size: small;\n"], ["\n opacity: 0.4;\n font-size: small;\n"])));
|
|
87767
87735
|
|
|
87768
|
-
var templateObject_1$2l, templateObject_2$
|
|
87736
|
+
var templateObject_1$2l, templateObject_2$1x;
|
|
87769
87737
|
|
|
87770
87738
|
var ReachLinkContextProvider = function ReachLinkContextProvider(_a) {
|
|
87771
87739
|
var children = _a.children;
|
|
@@ -87852,52 +87820,52 @@ var ReachContextProvider = function ReachContextProvider(props) {
|
|
|
87852
87820
|
}, void 0);
|
|
87853
87821
|
}
|
|
87854
87822
|
|
|
87855
|
-
return jsx$1(
|
|
87856
|
-
|
|
87823
|
+
return jsx$1(EnvironmentContext.Provider, __assign$g({
|
|
87824
|
+
value: envContextValue
|
|
87857
87825
|
}, {
|
|
87858
|
-
children: jsx$1(
|
|
87859
|
-
|
|
87860
|
-
|
|
87861
|
-
|
|
87862
|
-
children: jsx$1(
|
|
87863
|
-
|
|
87864
|
-
|
|
87865
|
-
|
|
87866
|
-
children: jsx$1(
|
|
87867
|
-
|
|
87826
|
+
children: jsx$1(MemoryRouter, {
|
|
87827
|
+
children: jsx$1(StorageContext.Provider, __assign$g({
|
|
87828
|
+
value: memoryStorageInstance
|
|
87829
|
+
}, {
|
|
87830
|
+
children: jsx$1(LibraryClientConfigProvider, {
|
|
87831
|
+
children: jsx$1(ResourceContextProvider, __assign$g({
|
|
87832
|
+
language: props.language
|
|
87833
|
+
}, {
|
|
87834
|
+
children: jsx$1(ThemeContextProvider, __assign$g({
|
|
87835
|
+
disableUiFabricThemeOverwrite: props.disableUiFabricThemeOverwrite
|
|
87868
87836
|
}, {
|
|
87869
|
-
children: jsx$1(
|
|
87870
|
-
|
|
87871
|
-
|
|
87872
|
-
|
|
87873
|
-
|
|
87874
|
-
|
|
87837
|
+
children: jsx$1(ReachErrorContextProvider, {
|
|
87838
|
+
children: jsx$1(AuthenticationContextProvider, __assign$g({
|
|
87839
|
+
onRequestToken: props.onRequestToken,
|
|
87840
|
+
subscriptionId: props.subscriptionId
|
|
87841
|
+
}, {
|
|
87842
|
+
children: jsx$1(SubscriptionIdContextProvider, __assign$g({
|
|
87875
87843
|
subscriptionId: props.subscriptionId
|
|
87876
87844
|
}, {
|
|
87877
|
-
children: jsx$1(
|
|
87878
|
-
subscriptionId: props.subscriptionId
|
|
87845
|
+
children: jsx$1(PublicAccessHandler, __assign$g({
|
|
87846
|
+
subscriptionId: props.subscriptionId,
|
|
87847
|
+
shouldUsePublicAccess: !props.onRequestToken
|
|
87879
87848
|
}, {
|
|
87880
|
-
children: jsx$1(
|
|
87881
|
-
|
|
87882
|
-
|
|
87883
|
-
|
|
87884
|
-
|
|
87885
|
-
|
|
87886
|
-
|
|
87887
|
-
|
|
87888
|
-
|
|
87889
|
-
|
|
87890
|
-
|
|
87891
|
-
|
|
87892
|
-
|
|
87893
|
-
|
|
87894
|
-
|
|
87895
|
-
|
|
87896
|
-
|
|
87897
|
-
|
|
87898
|
-
|
|
87899
|
-
|
|
87900
|
-
children: [jsx$1(ToastNotificationHost, {}, void 0), jsx$1(NotificationBar, {}, void 0), jsx$1(Styles, {}, void 0), jsxs(Switch, {
|
|
87849
|
+
children: jsx$1(ReachLinkContextProvider, {
|
|
87850
|
+
children: jsx$1(ChromeSettingsContext.Provider, __assign$g({
|
|
87851
|
+
value: {
|
|
87852
|
+
hideChrome: false
|
|
87853
|
+
}
|
|
87854
|
+
}, {
|
|
87855
|
+
children: jsx$1(CurrentUserContextProvider, {
|
|
87856
|
+
children: jsx$1(GraphQlClientProvider, __assign$g({
|
|
87857
|
+
gqlClientConfig: {
|
|
87858
|
+
endPoint: envContextValue.appConfig.api3Endpoint,
|
|
87859
|
+
webSocketsEndpoint: envContextValue.appConfig.webSocketsEndpoint
|
|
87860
|
+
}
|
|
87861
|
+
}, {
|
|
87862
|
+
children: jsx$1(CurrentUserDetailContextProvider, {
|
|
87863
|
+
children: jsx$1(LazySubscriptionContextProvider, {
|
|
87864
|
+
children: jsxs(NotificationContextProvider, {
|
|
87865
|
+
children: [jsx$1(ToastNotificationHost, {}, void 0), jsx$1(NotificationBar, {}, void 0), jsx$1(Styles, {}, void 0), jsx$1("div", __assign$g({
|
|
87866
|
+
className: reachClassNames
|
|
87867
|
+
}, {
|
|
87868
|
+
children: jsxs(Switch, {
|
|
87901
87869
|
children: [jsx$1(Route, {
|
|
87902
87870
|
path: "/:subscriptionHandleOrId",
|
|
87903
87871
|
render: function () {
|
|
@@ -87908,24 +87876,24 @@ var ReachContextProvider = function ReachContextProvider(props) {
|
|
|
87908
87876
|
return props.children;
|
|
87909
87877
|
}
|
|
87910
87878
|
}, void 0)]
|
|
87911
|
-
}, void 0)
|
|
87912
|
-
}, void 0)
|
|
87879
|
+
}, void 0)
|
|
87880
|
+
}), void 0)]
|
|
87913
87881
|
}, void 0)
|
|
87914
87882
|
}, void 0)
|
|
87915
|
-
}
|
|
87916
|
-
}, void 0)
|
|
87917
|
-
}
|
|
87918
|
-
}, void 0)
|
|
87919
|
-
}
|
|
87883
|
+
}, void 0)
|
|
87884
|
+
}), void 0)
|
|
87885
|
+
}, void 0)
|
|
87886
|
+
}), void 0)
|
|
87887
|
+
}, void 0)
|
|
87920
87888
|
}), void 0)
|
|
87921
87889
|
}), void 0)
|
|
87922
|
-
}, void 0)
|
|
87923
|
-
}
|
|
87890
|
+
}), void 0)
|
|
87891
|
+
}, void 0)
|
|
87924
87892
|
}), void 0)
|
|
87925
|
-
}, void 0)
|
|
87926
|
-
}
|
|
87927
|
-
}, void 0)
|
|
87928
|
-
}
|
|
87893
|
+
}), void 0)
|
|
87894
|
+
}, void 0)
|
|
87895
|
+
}), void 0)
|
|
87896
|
+
}, void 0)
|
|
87929
87897
|
}), void 0);
|
|
87930
87898
|
|
|
87931
87899
|
function getEnvValue() {
|
|
@@ -88264,7 +88232,7 @@ function assign$2(obj /*from1, from2, from3, ...*/) {
|
|
|
88264
88232
|
|
|
88265
88233
|
function _class(obj) { return Object.prototype.toString.call(obj); }
|
|
88266
88234
|
function isString(obj) { return _class(obj) === '[object String]'; }
|
|
88267
|
-
function isObject$
|
|
88235
|
+
function isObject$d(obj) { return _class(obj) === '[object Object]'; }
|
|
88268
88236
|
function isRegExp$4(obj) { return _class(obj) === '[object RegExp]'; }
|
|
88269
88237
|
function isFunction(obj) { return _class(obj) === '[object Function]'; }
|
|
88270
88238
|
|
|
@@ -88435,7 +88403,7 @@ function compile(self) {
|
|
|
88435
88403
|
|
|
88436
88404
|
self.__compiled__[name] = compiled;
|
|
88437
88405
|
|
|
88438
|
-
if (isObject$
|
|
88406
|
+
if (isObject$d(val)) {
|
|
88439
88407
|
if (isRegExp$4(val.validate)) {
|
|
88440
88408
|
compiled.validate = createValidator(val.validate);
|
|
88441
88409
|
} else if (isFunction(val.validate)) {
|
|
@@ -119700,9 +119668,6 @@ var convertFromHTML$1 = (function () {
|
|
|
119700
119668
|
return convertFromHTML.apply(void 0, arguments);
|
|
119701
119669
|
});
|
|
119702
119670
|
|
|
119703
|
-
var css_248z = "/**\n * Draft v0.11.6\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n.DraftEditor-editorContainer,.DraftEditor-root,.public-DraftEditor-content{height:inherit;text-align:initial}.public-DraftEditor-content[contenteditable=true]{-webkit-user-modify:read-write-plaintext-only}.DraftEditor-root{position:relative}.DraftEditor-editorContainer{background-color:rgba(255,255,255,0);border-left:.1px solid transparent;position:relative;z-index:1}.public-DraftEditor-block{position:relative}.DraftEditor-alignLeft .public-DraftStyleDefault-block{text-align:left}.DraftEditor-alignLeft .public-DraftEditorPlaceholder-root{left:0;text-align:left}.DraftEditor-alignCenter .public-DraftStyleDefault-block{text-align:center}.DraftEditor-alignCenter .public-DraftEditorPlaceholder-root{margin:0 auto;text-align:center;width:100%}.DraftEditor-alignRight .public-DraftStyleDefault-block{text-align:right}.DraftEditor-alignRight .public-DraftEditorPlaceholder-root{right:0;text-align:right}.public-DraftEditorPlaceholder-root{color:#9197a3;position:absolute;width:100%;z-index:1}.public-DraftEditorPlaceholder-hasFocus{color:#bdc1c9}.DraftEditorPlaceholder-hidden{display:none}.public-DraftStyleDefault-block{position:relative;white-space:pre-wrap}.public-DraftStyleDefault-ltr{direction:ltr;text-align:left}.public-DraftStyleDefault-rtl{direction:rtl;text-align:right}.public-DraftStyleDefault-listLTR{direction:ltr}.public-DraftStyleDefault-listRTL{direction:rtl}.public-DraftStyleDefault-ol,.public-DraftStyleDefault-ul{margin:16px 0;padding:0}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listLTR{margin-left:1.5em}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-listRTL{margin-right:1.5em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listLTR{margin-left:3em}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-listRTL{margin-right:3em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listLTR{margin-left:4.5em}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-listRTL{margin-right:4.5em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listLTR{margin-left:6em}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-listRTL{margin-right:6em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listLTR{margin-left:7.5em}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-listRTL{margin-right:7.5em}.public-DraftStyleDefault-unorderedListItem{list-style-type:square;position:relative}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth0{list-style-type:disc}.public-DraftStyleDefault-unorderedListItem.public-DraftStyleDefault-depth1{list-style-type:circle}.public-DraftStyleDefault-orderedListItem{list-style-type:none;position:relative}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listLTR:before{left:-36px;position:absolute;text-align:right;width:30px}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-listRTL:before{position:absolute;right:-36px;text-align:left;width:30px}.public-DraftStyleDefault-orderedListItem:before{content:counter(ol0) \". \";counter-increment:ol0}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth1:before{content:counter(ol1,lower-alpha) \". \";counter-increment:ol1}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth2:before{content:counter(ol2,lower-roman) \". \";counter-increment:ol2}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth3:before{content:counter(ol3) \". \";counter-increment:ol3}.public-DraftStyleDefault-orderedListItem.public-DraftStyleDefault-depth4:before{content:counter(ol4,lower-alpha) \". \";counter-increment:ol4}.public-DraftStyleDefault-depth0.public-DraftStyleDefault-reset{counter-reset:ol0}.public-DraftStyleDefault-depth1.public-DraftStyleDefault-reset{counter-reset:ol1}.public-DraftStyleDefault-depth2.public-DraftStyleDefault-reset{counter-reset:ol2}.public-DraftStyleDefault-depth3.public-DraftStyleDefault-reset{counter-reset:ol3}.public-DraftStyleDefault-depth4.public-DraftStyleDefault-reset{counter-reset:ol4}";
|
|
119704
|
-
styleInject(css_248z);
|
|
119705
|
-
|
|
119706
119671
|
var exenv = {exports: {}};
|
|
119707
119672
|
|
|
119708
119673
|
/*!
|
|
@@ -125480,28 +125445,28 @@ var indexedObject=fails$g(function(){// throws an error in rhino, see https://gi
|
|
|
125480
125445
|
return !Object('z').propertyIsEnumerable(0);})?function(it){return classof$9(it)=='String'?split.call(it,''):Object(it);}:Object;// `RequireObjectCoercible` abstract operation
|
|
125481
125446
|
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
|
125482
125447
|
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
|
|
125483
|
-
var IndexedObject$2=indexedObject;var requireObjectCoercible$a=requireObjectCoercible$b;var toIndexedObject$4=function(it){return IndexedObject$2(requireObjectCoercible$a(it));};var isObject$
|
|
125448
|
+
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
|
|
125484
125449
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
125485
125450
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
125486
125451
|
// and the second argument - flag - preferred type is a string
|
|
125487
|
-
var toPrimitive$3=function(input,PREFERRED_STRING){if(!isObject$
|
|
125488
|
-
var EXISTS=isObject$
|
|
125452
|
+
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
|
|
125453
|
+
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
|
|
125489
125454
|
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
|
|
125490
125455
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
|
125491
|
-
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$
|
|
125456
|
+
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
|
|
125492
125457
|
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
|
125493
125458
|
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
|
|
125494
|
-
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$
|
|
125495
|
-
})(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$
|
|
125459
|
+
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
|
|
125460
|
+
})(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
|
|
125496
125461
|
// https://tc39.github.io/ecma262/#sec-tointeger
|
|
125497
125462
|
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
|
|
125498
125463
|
// https://tc39.github.io/ecma262/#sec-tolength
|
|
125499
|
-
var toLength$
|
|
125464
|
+
var toLength$a=function(argument){return argument>0?min$5(toInteger$3(argument),0x1FFFFFFFFFFFFF):0;// 2 ** 53 - 1 == 9007199254740991
|
|
125500
125465
|
};var toInteger$2=toInteger$4;var max$2=Math.max;var min$4=Math.min;// Helper for a popular repeating case of the spec:
|
|
125501
125466
|
// Let integer be ? ToInteger(index).
|
|
125502
125467
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
125503
|
-
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$
|
|
125504
|
-
var createMethod$3=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIndexedObject$2($this);var length=toLength$
|
|
125468
|
+
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
|
|
125469
|
+
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
|
|
125505
125470
|
// eslint-disable-next-line no-self-compare
|
|
125506
125471
|
if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];// eslint-disable-next-line no-self-compare
|
|
125507
125472
|
if(value!=value)return true;// Array#indexOf ignores holes, Array#includes - not
|
|
@@ -125534,11 +125499,11 @@ redefine$8(target,key,sourceProperty,options);}};var fails$d=fails$i;var nativeS
|
|
|
125534
125499
|
// eslint-disable-next-line no-undef
|
|
125535
125500
|
return !String(Symbol());});var NATIVE_SYMBOL$1=nativeSymbol;var useSymbolAsUid=NATIVE_SYMBOL$1// eslint-disable-next-line no-undef
|
|
125536
125501
|
&&!Symbol.sham// eslint-disable-next-line no-undef
|
|
125537
|
-
&&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$
|
|
125502
|
+
&&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
|
|
125538
125503
|
// https://tc39.github.io/ecma262/#sec-isregexp
|
|
125539
|
-
var isRegexp=function(it){var isRegExp;return isObject$
|
|
125504
|
+
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
|
|
125540
125505
|
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
|
125541
|
-
$$
|
|
125506
|
+
$$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
|
|
125542
125507
|
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
|
125543
125508
|
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,
|
|
125544
125509
|
// so we use an intermediate function.
|
|
@@ -125553,32 +125518,32 @@ if(re.lastIndex>0&&(!re.multiline||re.multiline&&str[re.lastIndex-1]!=='\n')){so
|
|
|
125553
125518
|
// simulate the 'y' flag.
|
|
125554
125519
|
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`
|
|
125555
125520
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
125556
|
-
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 $$
|
|
125557
|
-
var redefine$7=redefine$9.exports;var fails$b=fails$i;var wellKnownSymbol$
|
|
125521
|
+
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
|
|
125522
|
+
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.
|
|
125558
125523
|
// #match works fine because it just return the exec results, even if it has
|
|
125559
125524
|
// a "grops" property.
|
|
125560
125525
|
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 $&
|
|
125561
125526
|
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
125562
|
-
var REPLACE_KEEPS_$0$1=function(){return 'a'.replace(/./,'$0')==='$0';}();var REPLACE$1=wellKnownSymbol$
|
|
125527
|
+
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
|
|
125563
125528
|
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
|
|
125564
125529
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
125565
|
-
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$
|
|
125530
|
+
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
|
|
125566
125531
|
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
|
|
125567
125532
|
var execCalled=false;var re=/a/;if(KEY==='split'){// We can't use real regex here since it causes deoptimization
|
|
125568
125533
|
// and serious performance degradation in V8
|
|
125569
125534
|
// https://github.com/zloirock/core-js/issues/306
|
|
125570
125535
|
re={};// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
125571
125536
|
// a new one. We need to return the patched regex when creating the new one.
|
|
125572
|
-
re.constructor={};re.constructor[SPECIES$
|
|
125537
|
+
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
|
|
125573
125538
|
// polyfilled function), leasing to infinite recursion.
|
|
125574
125539
|
// We avoid it by directly calling the native @@method method.
|
|
125575
125540
|
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)
|
|
125576
125541
|
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
|
125577
125542
|
?function(string,arg){return regexMethod.call(string,this,arg);}// 21.2.5.6 RegExp.prototype[@@match](string)
|
|
125578
125543
|
// 21.2.5.9 RegExp.prototype[@@search](string)
|
|
125579
|
-
:function(string){return regexMethod.call(string,this);});}if(sham)createNonEnumerableProperty$3(RegExp.prototype[SYMBOL],'sham',true);};var aFunction$
|
|
125544
|
+
: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
|
|
125580
125545
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
125581
|
-
var speciesConstructor$2=function(O,defaultConstructor){var C=anObject$d(O).constructor;var S;return C===undefined||(S=anObject$d(C)[SPECIES$
|
|
125546
|
+
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
|
|
125582
125547
|
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
|
|
125583
125548
|
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
|
125584
125549
|
codeAt:createMethod$2(false),// `String.prototype.at` method
|
|
@@ -125587,7 +125552,7 @@ charAt:createMethod$2(true)};var charAt$1=stringMultibyte$1.charAt;// `AdvanceSt
|
|
|
125587
125552
|
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
|
125588
125553
|
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
|
|
125589
125554
|
// https://tc39.github.io/ecma262/#sec-regexpexec
|
|
125590
|
-
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$
|
|
125555
|
+
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
|
|
125591
125556
|
var SUPPORTS_Y=!fails$a(function(){return !RegExp(MAX_UINT32,'y');});// @@split logic
|
|
125592
125557
|
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
|
|
125593
125558
|
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
|
|
@@ -125603,12 +125568,12 @@ function split(separator,limit){var O=requireObjectCoercible$7(this);var splitte
|
|
|
125603
125568
|
// the 'y' flag.
|
|
125604
125569
|
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
|
|
125605
125570
|
// simulate the 'y' flag.
|
|
125606
|
-
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$
|
|
125571
|
+
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
|
|
125607
125572
|
fixRegExpWellKnownSymbolLogic$2('match',1,function(MATCH,nativeMatch,maybeCallNative){return [// `String.prototype.match` method
|
|
125608
125573
|
// https://tc39.github.io/ecma262/#sec-string.prototype.match
|
|
125609
125574
|
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
|
|
125610
125575
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
|
|
125611
|
-
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$
|
|
125576
|
+
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;}];});/*! *****************************************************************************
|
|
125612
125577
|
Copyright (c) Microsoft Corporation.
|
|
125613
125578
|
|
|
125614
125579
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -125634,10 +125599,10 @@ return "@[@"+user.displayName+"]("+user.id+")";}var ContentDisplay=function Cont
|
|
|
125634
125599
|
if(path==null&&port==null){var segments=urlMatch.split('.');if(segments.length<2){return null;}var lastSegment=segments[segments.length-1];var domainName=segments[segments.length-2];if(// all segments must not be empty
|
|
125635
125600
|
segments.some(function(s){return s==='';})||// domainName must at least be 3 characters
|
|
125636
125601
|
domainName.length<3||// last segment may not be a number
|
|
125637
|
-
lastSegment.match(/^\d+$/)){return null;}}if(!linkify.match(urlMatch)){return null;}return {url:"https://"+urlMatch,label:urlMatch};}function transformContent(content){var matches=__spreadArray([],Array.from(getAllMatches(content,regex)));var result=[];var lastStart=0;for(var _i=0,matches_1=matches;_i<matches_1.length;_i++){var match=matches_1[_i];result.push(content.substring(lastStart,match.index));var email=match[2];var urlMatch=match[3];var protocol=match[4];var port=match[6];var path=match[7];var fullMention=match[8];var name_1=match[10];var id=match[11];var hashtag=match[12];var d3Link=match[14];var link=getLink(email,urlMatch,protocol,path,port);result.push(__assign({fullMatch:match[0],isLineBreak:match[1]!=null,hashtag:hashtag,link:d3Link?{url:d3Link}:link},fullMention&&{mention:{name:name_1,id:id}}));lastStart=match.index+match[0].length;}result.push(content.substring(lastStart));return result;}var Mention=function Mention(_a){var userDisplayName=_a.userDisplayName,userId=_a.userId;var _b=useState$2(false),showUserInfo=_b[0],setShowUserInfo=_b[1];var mentionContainer=useRef$1(null);return jsxs(Fragment,{children:[jsx$1(MentionHost,__assign({"data-mention":true,onClick:function(){return setShowUserInfo(true);},ref:mentionContainer},{children:userDisplayName}),void 0),showUserInfo&&jsx$1(Callout,__assign({target:mentionContainer.current,directionalHint:DirectionalHint.bottomCenter,onDismiss:function(){return setShowUserInfo(false);},calloutMaxWidth:300},{children:jsx$1(CalloutContent,{children:jsx$1(UserDetails,{upn:null,id:userId,showAvatar:true},void 0)},void 0)}),void 0)]},void 0);};var MentionHost=_styled.span.withConfig({displayName:"ContentDisplay__MentionHost",componentId:"sc-1yxe01n-0"})(templateObject_1$2j||(templateObject_1$2j=__makeTemplateObject(["\n font-weight: bold;\n cursor: pointer;\n color: ",";\n"],["\n font-weight: bold;\n cursor: pointer;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var CalloutContent=_styled.div.withConfig({displayName:"ContentDisplay__CalloutContent",componentId:"sc-1yxe01n-1"})(templateObject_2$
|
|
125602
|
+
lastSegment.match(/^\d+$/)){return null;}}if(!linkify.match(urlMatch)){return null;}return {url:"https://"+urlMatch,label:urlMatch};}function transformContent(content){var matches=__spreadArray([],Array.from(getAllMatches(content,regex)));var result=[];var lastStart=0;for(var _i=0,matches_1=matches;_i<matches_1.length;_i++){var match=matches_1[_i];result.push(content.substring(lastStart,match.index));var email=match[2];var urlMatch=match[3];var protocol=match[4];var port=match[6];var path=match[7];var fullMention=match[8];var name_1=match[10];var id=match[11];var hashtag=match[12];var d3Link=match[14];var link=getLink(email,urlMatch,protocol,path,port);result.push(__assign({fullMatch:match[0],isLineBreak:match[1]!=null,hashtag:hashtag,link:d3Link?{url:d3Link}:link},fullMention&&{mention:{name:name_1,id:id}}));lastStart=match.index+match[0].length;}result.push(content.substring(lastStart));return result;}var Mention=function Mention(_a){var userDisplayName=_a.userDisplayName,userId=_a.userId;var _b=useState$2(false),showUserInfo=_b[0],setShowUserInfo=_b[1];var mentionContainer=useRef$1(null);return jsxs(Fragment,{children:[jsx$1(MentionHost,__assign({"data-mention":true,onClick:function(){return setShowUserInfo(true);},ref:mentionContainer},{children:userDisplayName}),void 0),showUserInfo&&jsx$1(Callout,__assign({target:mentionContainer.current,directionalHint:DirectionalHint.bottomCenter,onDismiss:function(){return setShowUserInfo(false);},calloutMaxWidth:300},{children:jsx$1(CalloutContent,{children:jsx$1(UserDetails,{upn:null,id:userId,showAvatar:true},void 0)},void 0)}),void 0)]},void 0);};var MentionHost=_styled.span.withConfig({displayName:"ContentDisplay__MentionHost",componentId:"sc-1yxe01n-0"})(templateObject_1$2j||(templateObject_1$2j=__makeTemplateObject(["\n font-weight: bold;\n cursor: pointer;\n color: ",";\n"],["\n font-weight: bold;\n cursor: pointer;\n color: ",";\n"])),function(p){return p.theme.palette.accent;});var CalloutContent=_styled.div.withConfig({displayName:"ContentDisplay__CalloutContent",componentId:"sc-1yxe01n-1"})(templateObject_2$1v||(templateObject_2$1v=__makeTemplateObject(["\n padding: ","px ","px;\n"],["\n padding: ","px ","px;\n"])),spacingM-5,spacingM);var HashtagLink=_styled(Link$2).withConfig({displayName:"ContentDisplay__HashtagLink",componentId:"sc-1yxe01n-2"})(templateObject_3$11||(templateObject_3$11=__makeTemplateObject(["\n && {\n font-weight: bold;\n text-decoration: none;\n }\n"],["\n && {\n font-weight: bold;\n text-decoration: none;\n }\n"])));var templateObject_1$2j,templateObject_2$1v,templateObject_3$11;var NeutralCheckBox=_styled(Checkbox).withConfig({displayName:"NeutralCheckbox__NeutralCheckBox",componentId:"sc-18jxdgn-0"})(templateObject_1$2i||(templateObject_1$2i=__makeTemplateObject(["\n display: inline-block;\n &.is-checked .ms-Checkbox-checkbox {\n border-color: #656565;\n background-color: #919191;\n }\n"],["\n display: inline-block;\n &.is-checked .ms-Checkbox-checkbox {\n border-color: #656565;\n background-color: #919191;\n }\n"])));var templateObject_1$2i;var EventResponseTriggerAction=/** @class */function(){function EventResponseTriggerAction(){this.type=EventResponseTriggerAction.type;}EventResponseTriggerAction.create=function(itemId,response,locationId,onBehalfOfUpn){var dispatch=new EventResponseTriggerAction();dispatch.itemId=itemId;dispatch.response=response;dispatch.locationId=locationId;dispatch.onBehalfOfUpn=onBehalfOfUpn;return dispatch;};EventResponseTriggerAction.type='update_event_response';return EventResponseTriggerAction;}();var RegisterFullSeriesTriggerAction=/** @class */function(){function RegisterFullSeriesTriggerAction(){this.type=RegisterFullSeriesTriggerAction.type;}RegisterFullSeriesTriggerAction.create=function(recurrenceSeriesId,response){var dispatch=new RegisterFullSeriesTriggerAction();dispatch.recurrenceSeriesId=recurrenceSeriesId;dispatch.response=response;return dispatch;};RegisterFullSeriesTriggerAction.type='update_register_button_state';return RegisterFullSeriesTriggerAction;}();var FollowCommentsTriggerAction=/** @class */function(){function FollowCommentsTriggerAction(){this.type=FollowCommentsTriggerAction.type;}FollowCommentsTriggerAction.create=function(itemId,followState){var dispatch=new FollowCommentsTriggerAction();dispatch.itemId=itemId;dispatch.followState=followState;return dispatch;};FollowCommentsTriggerAction.type='update_follow_comments';return FollowCommentsTriggerAction;}();var ForbiddenErrorTriggerAction=/** @class */function(){function ForbiddenErrorTriggerAction(){this.type=ForbiddenErrorTriggerAction.type;}ForbiddenErrorTriggerAction.create=function(){return new ForbiddenErrorTriggerAction();};ForbiddenErrorTriggerAction.type='forbidden_error';return ForbiddenErrorTriggerAction;}();var PromptPublicUserLoginAction=/** @class */function(){function PromptPublicUserLoginAction(){this.type=ForbiddenErrorTriggerAction.type;}PromptPublicUserLoginAction.create=function(){return new ForbiddenErrorTriggerAction();};return PromptPublicUserLoginAction;}();var commentCreatedSubject=new Subject();var onCommentCreated$=commentCreatedSubject.asObservable();function useCommentApi(){var api=useApi();return useMemo(function(){return {createComment:createComment,createEditorComment:createEditorComment,listComments:listComments,getCommentReplies:getCommentReplies,getCommentThread:getCommentThread,getEditorConversations:getEditorConversations,translateComment:translateComment,deleteComment:deleteComment,deleteEditorComment:deleteEditorComment,toggleCommentLike:toggleCommentLike,updateComment:updateComment,onCommentCreated$:onCommentCreated$};function createComment(type,scope,itemId,comment){return api.all(getRoute(scope,itemId,type)).post(comment).then(function(result){commentCreatedSubject.next(itemId);return result.body().data();});}function createEditorComment(itemId,comment){return api.all(getRoute(ConversationScope.Editor,itemId)).post(comment).then(function(result){commentCreatedSubject.next(itemId);return result.body().data();});}function listComments(type,scope,itemId,filter){return api.custom(getRoute(scope,itemId,type,null,filter)).get().then(function(res){return res.body().data();});}function getCommentReplies(type,scope,itemId,commentId,filter){return api.custom(getRoute(scope,itemId,type,commentId,filter,true)).get().then(function(res){return res.body().data();});}function getCommentThread(type,itemId,commentId){return api.custom(type+"/"+itemId+"/comments/"+commentId+"/thread").get().then(function(res){return res.body().data();});}function getEditorConversations(itemId){return api.all(getRoute(ConversationScope.Editor,itemId)).getAll().then(function(res){return res.body().map(function(comment){return comment.data();});});}function translateComment(type,scope,itemId,commentId,targetLanguage){return api.custom(getRoute(scope,itemId,type,commentId)+"/"+(type===ItemResourceTypes.Posts?'content':'contents')+"/"+targetLanguage).get().then(function(res){return res.body().data();});}function deleteComment(type,scope,itemId,commentId){return api// note: commentId is passed as argument for delete method
|
|
125638
125603
|
.all(getRoute(scope,itemId,type)).delete(commentId);}function deleteEditorComment(itemId,commentId){return api// note: commentId is passed as argument for delete method
|
|
125639
125604
|
.all(getRoute(ConversationScope.Editor,itemId)).delete(commentId);}function toggleCommentLike(commentId,isLiked){if(isLiked){return api.custom("comments/"+commentId+"/feedback/like").put({});}else {return api.custom("comments/"+commentId+"/feedback/like").delete();}}function updateComment(scope,itemId,commentId,content,attachments,type){return api.all(getRoute(scope,itemId,type,commentId)).put('',{id:commentId,content:content,parentItemId:itemId,attachments:attachments});}},[api]);}function getRoute(scope,itemId,type,commentId,filter,isThread){var baseRoute='';switch(scope){case ConversationScope.Editor:baseRoute="editor/"+itemId+"/messages";break;case ConversationScope.Public:baseRoute=type+"/"+itemId+"/comments";break;case ConversationScope.Posts:baseRoute=type+"/"+itemId+"/comments";break;default:throw new Error('Cannot determine route for unsupported scope '+scope);}var route=commentId?baseRoute+"/"+commentId:baseRoute;route=isThread?baseRoute+"/"+commentId+"/replies":route;return filter?route+"?"+queryString.stringify(filter):route;}var FollowComments=function FollowComments(props){var user=useCurrentUser();var _a=useManageCurrentUserApi(),getFollowCommentsStatus=_a.getFollowCommentsStatus,toggleFollowComments=_a.toggleFollowComments;var formatMessage=useIntl().formatMessage;var buildPath=useSubscriptionHandlePathBuilder().buildPath;var isSavingRef=useRef$1(false);var currentToastIdRef=useRef$1(null);var onCommentCreated$=useCommentApi().onCommentCreated$;var _b=useNotificationContext(),dismissToast=_b.dismissToast,showToast=_b.showToast,showError=_b.showError;var _c=usePromise$2(function(){return getFollowCommentsStatus(props.itemId,props.type,props.scope);},false),isFollowing=_c[0],setIsFollowing=_c[3];useListener(FollowCommentsTriggerAction.type,function(action){if(action.itemId!==props.itemId){return false;}setIsFollowing(action.followState);return true;},[setIsFollowing,props.itemId]);useEffect$1(function(){var subscription=onCommentCreated$.pipe(filter(function(id){return id===props.itemId;}),tap(function(){return handleCommentCreated();})).subscribe(function(){return null;});return function(){return subscription.unsubscribe();};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125640
|
-
},[isFollowing,props.itemId,props.scope]);var showWarning=isFollowing&&hasDisabledNotificationSettings();var followLabelStringResourceKey=props.scope===ConversationScope.Public?'Comment.followLabel':'Comment.followEditorLabel';return jsxs(Host$V,__assign({className:props.className},{children:[jsx$1(NeutralCheckBox,{checked:isFollowing,onChange:function(_e,checked){return handleOnChange(checked);},label:formatMessage({id:followLabelStringResourceKey})},void 0),showWarning&&jsxs(WarningContainer,__assign({className:"ms-font-m"},{children:[jsx$1(Icon,{className:"ms-fontColor-red",iconName:"warning"},void 0),jsxs(WarningMessage,{children:[jsx$1(FormattedMessage$1,{id:"Profile.notificationSettings.conversationsDisabled"},void 0),!props.hideProfileUrl&&jsxs(Fragment,{children:["\u00A0",jsx$1(Link$2,__assign({to:buildPath('/user')},{children:jsx$1(FormattedMessage$1,{id:"Profile.notificationSettings.conversationsDisabledChangeSettings"},void 0)}),void 0)]},void 0)]},void 0)]}),void 0)]}),void 0);function handleCommentCreated(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,updateFollow(true)];case 1:_a.sent();return [2/*return*/];}});});}function handleOnChange(newFollowState){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,updateFollow(newFollowState)];case 1:_a.sent();if(currentToastIdRef.current){dismissToast(currentToastIdRef.current);}currentToastIdRef.current=showToast(newFollowState?'Comment.followSuccessful':'Comment.unfollowSuccessful');return [2/*return*/];}});});}function updateFollow(newFollowState){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(isSavingRef.current){return [2/*return*/];}if(newFollowState===isFollowing){return [2/*return*/];}setIsFollowing(newFollowState);isSavingRef.current=true;_a.label=1;case 1:_a.trys.push([1,3,4,5]);return [4/*yield*/,toggleFollowComments(props.itemId,props.type,props.scope,newFollowState)];case 2:_a.sent();return [3/*break*/,5];case 3:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,5];case 4:isSavingRef.current=false;return [7/*endfinally*/];case 5:return [2/*return*/];}});});}function hasDisabledNotificationSettings(){var notificationSettings=user.notificationTypeSettings||{};return notificationSettings.comments===NotificationType.None;}};var Host$V=_styled.div.withConfig({displayName:"FollowComments__Host",componentId:"sc-1vcax52-0"})(templateObject_1$2h||(templateObject_1$2h=__makeTemplateObject([""],[""])));var WarningContainer=_styled.div.withConfig({displayName:"FollowComments__WarningContainer",componentId:"sc-1vcax52-1"})(templateObject_2$
|
|
125605
|
+
},[isFollowing,props.itemId,props.scope]);var showWarning=isFollowing&&hasDisabledNotificationSettings();var followLabelStringResourceKey=props.scope===ConversationScope.Public?'Comment.followLabel':'Comment.followEditorLabel';return jsxs(Host$V,__assign({className:props.className},{children:[jsx$1(NeutralCheckBox,{checked:isFollowing,onChange:function(_e,checked){return handleOnChange(checked);},label:formatMessage({id:followLabelStringResourceKey})},void 0),showWarning&&jsxs(WarningContainer,__assign({className:"ms-font-m"},{children:[jsx$1(Icon,{className:"ms-fontColor-red",iconName:"warning"},void 0),jsxs(WarningMessage,{children:[jsx$1(FormattedMessage$1,{id:"Profile.notificationSettings.conversationsDisabled"},void 0),!props.hideProfileUrl&&jsxs(Fragment,{children:["\u00A0",jsx$1(Link$2,__assign({to:buildPath('/user')},{children:jsx$1(FormattedMessage$1,{id:"Profile.notificationSettings.conversationsDisabledChangeSettings"},void 0)}),void 0)]},void 0)]},void 0)]}),void 0)]}),void 0);function handleCommentCreated(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,updateFollow(true)];case 1:_a.sent();return [2/*return*/];}});});}function handleOnChange(newFollowState){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,updateFollow(newFollowState)];case 1:_a.sent();if(currentToastIdRef.current){dismissToast(currentToastIdRef.current);}currentToastIdRef.current=showToast(newFollowState?'Comment.followSuccessful':'Comment.unfollowSuccessful');return [2/*return*/];}});});}function updateFollow(newFollowState){return __awaiter(this,void 0,void 0,function(){var error_1;return __generator(this,function(_a){switch(_a.label){case 0:if(isSavingRef.current){return [2/*return*/];}if(newFollowState===isFollowing){return [2/*return*/];}setIsFollowing(newFollowState);isSavingRef.current=true;_a.label=1;case 1:_a.trys.push([1,3,4,5]);return [4/*yield*/,toggleFollowComments(props.itemId,props.type,props.scope,newFollowState)];case 2:_a.sent();return [3/*break*/,5];case 3:error_1=_a.sent();logger.error(error_1);showError('Generic.error');return [3/*break*/,5];case 4:isSavingRef.current=false;return [7/*endfinally*/];case 5:return [2/*return*/];}});});}function hasDisabledNotificationSettings(){var notificationSettings=user.notificationTypeSettings||{};return notificationSettings.comments===NotificationType.None;}};var Host$V=_styled.div.withConfig({displayName:"FollowComments__Host",componentId:"sc-1vcax52-0"})(templateObject_1$2h||(templateObject_1$2h=__makeTemplateObject([""],[""])));var WarningContainer=_styled.div.withConfig({displayName:"FollowComments__WarningContainer",componentId:"sc-1vcax52-1"})(templateObject_2$1u||(templateObject_2$1u=__makeTemplateObject(["\n margin-top: ","px;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n width: 100%;\n i {\n font-size: 1.5em;\n margin-right: 7px;\n }\n"],["\n margin-top: ","px;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n width: 100%;\n i {\n font-size: 1.5em;\n margin-right: 7px;\n }\n"])),spacingS);var WarningMessage=_styled.div.withConfig({displayName:"FollowComments__WarningMessage",componentId:"sc-1vcax52-2"})(templateObject_3$10||(templateObject_3$10=__makeTemplateObject(["\n flex: 1;\n"],["\n flex: 1;\n"])));var templateObject_1$2h,templateObject_2$1u,templateObject_3$10;// a string of all valid unicode whitespaces
|
|
125641
125606
|
// eslint-disable-next-line max-len
|
|
125642
125607
|
var whitespaces$3='\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';var requireObjectCoercible$5=requireObjectCoercible$b;var whitespaces$2$1=whitespaces$3;var whitespace$1='['+whitespaces$2$1+']';var ltrim$1=RegExp('^'+whitespace$1+whitespace$1+'*');var rtrim$1=RegExp(whitespace$1+whitespace$1+'*$');// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
125643
125608
|
var createMethod$1$1=function(TYPE){return function($this){var string=String(requireObjectCoercible$5($this));if(TYPE&1)string=string.replace(ltrim$1,'');if(TYPE&2)string=string.replace(rtrim$1,'');return string;};};var stringTrim$1={// `String.prototype.{ trimLeft, trimStart }` methods
|
|
@@ -125648,9 +125613,9 @@ end:createMethod$1$1(2),// `String.prototype.trim` method
|
|
|
125648
125613
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
125649
125614
|
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
|
|
125650
125615
|
// of whitespaces and has a correct name
|
|
125651
|
-
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 $$
|
|
125616
|
+
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
|
|
125652
125617
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
125653
|
-
$$
|
|
125618
|
+
$$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
|
|
125654
125619
|
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
125655
125620
|
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
|
|
125656
125621
|
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
@@ -125667,26 +125632,26 @@ iframe.src=String(JS);iframeDocument=iframe.contentWindow.document;iframeDocumen
|
|
|
125667
125632
|
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
|
|
125668
125633
|
// https://tc39.github.io/ecma262/#sec-object.create
|
|
125669
125634
|
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
|
|
125670
|
-
result[IE_PROTO$1]=O;}else result=NullProtoObject();return Properties===undefined?result:defineProperties$1(result,Properties);};var wellKnownSymbol$
|
|
125635
|
+
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]
|
|
125671
125636
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
125672
125637
|
if(ArrayPrototype$1[UNSCOPABLES]==undefined){definePropertyModule$2.f(ArrayPrototype$1,UNSCOPABLES,{configurable:true,value:create$2(null)});}// add a key to Array.prototype[@@unscopables]
|
|
125673
|
-
var addToUnscopables$
|
|
125638
|
+
var addToUnscopables$2=function(key){ArrayPrototype$1[UNSCOPABLES][key]=true;};var iterators={};var requireObjectCoercible$4=requireObjectCoercible$b;// `ToObject` abstract operation
|
|
125674
125639
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
125675
|
-
var toObject$
|
|
125640
|
+
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
|
|
125676
125641
|
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
|
125677
|
-
var objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?Object.getPrototypeOf:function(O){O=toObject$
|
|
125642
|
+
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
|
|
125678
125643
|
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
|
|
125679
125644
|
var IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;if([].keys){arrayIterator=[].keys();// Safari 8 has buggy iterators w/o `next`
|
|
125680
125645
|
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]()
|
|
125681
|
-
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$
|
|
125646
|
+
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
|
|
125682
125647
|
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
|
|
125683
125648
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
125684
|
-
/* 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 $$
|
|
125649
|
+
/* 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
|
|
125685
125650
|
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
|
|
125686
125651
|
setToStringTag$3(CurrentIteratorPrototype,TO_STRING_TAG,true);}}// fix Array#{values, @@iterator}.name in V8 / FF
|
|
125687
125652
|
if(DEFAULT==VALUES&&nativeIterator&&nativeIterator.name!==VALUES){INCORRECT_VALUES_NAME=true;defaultIterator=function values(){return nativeIterator.call(this);};}// define iterator
|
|
125688
125653
|
if(IterablePrototype[ITERATOR$6]!==defaultIterator){createNonEnumerableProperty$1(IterablePrototype,ITERATOR$6,defaultIterator);}Iterators$3[NAME]=defaultIterator;// export additional methods
|
|
125689
|
-
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 $$
|
|
125654
|
+
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
|
|
125690
125655
|
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
|
|
125691
125656
|
// `Array.prototype.keys` method
|
|
125692
125657
|
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
|
|
@@ -125705,39 +125670,39 @@ kind:kind// kind
|
|
|
125705
125670
|
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
|
|
125706
125671
|
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
|
|
125707
125672
|
Iterators$2.Arguments=Iterators$2.Array;// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
125708
|
-
addToUnscopables('keys');addToUnscopables('values');addToUnscopables('entries');// iterable DOM collections
|
|
125673
|
+
addToUnscopables$1('keys');addToUnscopables$1('values');addToUnscopables$1('entries');// iterable DOM collections
|
|
125709
125674
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
125710
|
-
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$
|
|
125675
|
+
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
|
|
125711
125676
|
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
|
|
125712
125677
|
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
|
|
125713
125678
|
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
|
125714
125679
|
defineIterator(String,'String',function(iterated){setInternalState$4(this,{type:STRING_ITERATOR,string:String(iterated),index:0});// `%StringIteratorPrototype%.next` method
|
|
125715
125680
|
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
|
125716
|
-
},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$
|
|
125681
|
+
},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
|
|
125717
125682
|
||new URL('https://a@b').username!=='a'||new URLSearchParams(new URLSearchParams('a=b')).get('a')!=='b'// not punycoded in Edge
|
|
125718
125683
|
||new URL('http://тест').host!=='xn--e1aybc'// not escaped in Chrome 62-
|
|
125719
125684
|
||new URL('http://a#б').hash!=='#%D0%B1'// fails in Chrome 66-
|
|
125720
125685
|
||result!=='a1c3'// throws in Safari
|
|
125721
|
-
||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$
|
|
125686
|
+
||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
|
|
125722
125687
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
125723
125688
|
var objectAssign=!nativeAssign||fails$6(function(){// should have correct order of operations (Edge bug)
|
|
125724
125689
|
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)
|
|
125725
125690
|
var A={};var B={};// eslint-disable-next-line no-undef
|
|
125726
125691
|
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
|
|
125727
|
-
var T=toObject$
|
|
125728
|
-
var functionBindContext=function(fn,that,length){aFunction$
|
|
125692
|
+
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
|
|
125693
|
+
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
|
|
125729
125694
|
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)
|
|
125730
|
-
}catch(error){var returnMethod=iterator['return'];if(returnMethod!==undefined)anObject$7(returnMethod.call(iterator));throw error;}};var wellKnownSymbol$
|
|
125731
|
-
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$
|
|
125695
|
+
}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
|
|
125696
|
+
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
|
|
125732
125697
|
var CORRECT_ARGUMENTS=classofRaw(function(){return arguments;}())=='Arguments';// fallback for IE11 Script Access Denied error
|
|
125733
125698
|
var tryGet=function(it,key){try{return it[key];}catch(error){/* empty */}};// getting tag from ES6+ `Object.prototype.toString`
|
|
125734
125699
|
var classof$6=TO_STRING_TAG_SUPPORT?classofRaw:function(it){var O,tag,result;return it===undefined?'Undefined':it===null?'Null'// @@toStringTag case
|
|
125735
125700
|
:typeof(tag=tryGet(O=Object(it),TO_STRING_TAG))=='string'?tag// builtinTag case
|
|
125736
125701
|
:CORRECT_ARGUMENTS?classofRaw(O)// ES3 arguments fallback
|
|
125737
|
-
:(result=classofRaw(O))=='Object'&&typeof O.callee=='function'?'Arguments':result;};var classof$5=classof$6;var Iterators=iterators;var wellKnownSymbol$
|
|
125702
|
+
:(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
|
|
125738
125703
|
// https://tc39.github.io/ecma262/#sec-array.from
|
|
125739
|
-
var arrayFrom$1=function from(arrayLike/* , mapfn = undefined, thisArg = undefined */){var O=toObject$
|
|
125740
|
-
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$
|
|
125704
|
+
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
|
|
125705
|
+
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
|
|
125741
125706
|
var maxInt=2147483647;// aka. 0x7FFFFFFF or 2^31-1
|
|
125742
125707
|
var base=36;var tMin=1;var tMax=26;var skew=38;var damp=700;var initialBias=72;var initialN=128;// 0x80
|
|
125743
125708
|
var delimiter='-';// '\x2D'
|
|
@@ -125776,9 +125741,9 @@ while(handledCPCount<inputLength){// All non-basic code points < n have been han
|
|
|
125776
125741
|
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.
|
|
125777
125742
|
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.
|
|
125778
125743
|
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`
|
|
125779
|
-
var $$
|
|
125744
|
+
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
|
|
125780
125745
|
// https://url.spec.whatwg.org/#interface-urlsearchparams
|
|
125781
|
-
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$
|
|
125746
|
+
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
|
|
125782
125747
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
125783
125748
|
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
|
|
125784
125749
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
@@ -125794,16 +125759,16 @@ set:function set(name,value){validateArgumentsLength(arguments.length,1);var sta
|
|
|
125794
125759
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
|
|
125795
125760
|
sort:function sort(){var state=getInternalParamsState(this);var entries=state.entries;// Array#sort is not stable in some engines
|
|
125796
125761
|
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
|
|
125797
|
-
forEach:function forEach(callback/* , thisArg */){var entries=getInternalParamsState(this).entries;var boundFunction=bind$
|
|
125762
|
+
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
|
|
125798
125763
|
keys:function keys(){return new URLSearchParamsIterator(this,'keys');},// `URLSearchParams.prototype.values` method
|
|
125799
125764
|
values:function values(){return new URLSearchParamsIterator(this,'values');},// `URLSearchParams.prototype.entries` method
|
|
125800
125765
|
entries:function entries(){return new URLSearchParamsIterator(this,'entries');}},{enumerable:true});// `URLSearchParams.prototype[@@iterator]` method
|
|
125801
125766
|
redefine$4(URLSearchParamsPrototype,ITERATOR$1,URLSearchParamsPrototype.entries);// `URLSearchParams.prototype.toString` method
|
|
125802
125767
|
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
|
|
125803
|
-
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);$$
|
|
125768
|
+
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`
|
|
125804
125769
|
// https://github.com/zloirock/core-js/issues/674
|
|
125805
|
-
if(!USE_NATIVE_URL$1&&typeof $fetch$1=='function'&&typeof Headers$1=='function'){$$
|
|
125806
|
-
var $$
|
|
125770
|
+
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`
|
|
125771
|
+
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
|
|
125807
125772
|
var FORBIDDEN_HOST_CODE_POINT=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/;// eslint-disable-next-line no-control-regex
|
|
125808
125773
|
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/;// eslint-disable-next-line no-control-regex
|
|
125809
125774
|
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;// eslint-disable-next-line no-control-regex
|
|
@@ -125850,10 +125815,10 @@ redefine$3(URLPrototype,'toString',function toString(){return serializeURL.call(
|
|
|
125850
125815
|
if(nativeCreateObjectURL)redefine$3(URLConstructor,'createObjectURL',function createObjectURL(blob){return nativeCreateObjectURL.apply(NativeURL,arguments);});// `URL.revokeObjectURL` method
|
|
125851
125816
|
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
|
|
125852
125817
|
// eslint-disable-next-line no-unused-vars
|
|
125853
|
-
if(nativeRevokeObjectURL)redefine$3(URLConstructor,'revokeObjectURL',function revokeObjectURL(url){return nativeRevokeObjectURL.apply(NativeURL,arguments);});}setToStringTag$1(URLConstructor,'URL');$$
|
|
125818
|
+
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
|
|
125854
125819
|
var MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var descriptor=getOwnPropertyDescriptor$1(String.prototype,'startsWith');return descriptor&&!descriptor.writable;}();// `String.prototype.startsWith` method
|
|
125855
125820
|
// https://tc39.github.io/ecma262/#sec-string.prototype.startswith
|
|
125856
|
-
$$
|
|
125821
|
+
$$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
|
|
125857
125822
|
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
|
|
125858
125823
|
// right away. Postpone it for a couple of ms
|
|
125859
125824
|
// Unfortunately autoFocus={true} is not supported
|
|
@@ -125877,17 +125842,17 @@ suggestionsContainer.style.maxWidth=hostRect.width-4+"px";// this block fixes th
|
|
|
125877
125842
|
// the mention library is not entirely correct, therefore we add our own
|
|
125878
125843
|
// top / bottom values
|
|
125879
125844
|
if(inputBox.top<500){suggestionsContainer.style.top=inputBox.height-10+"px";}else {suggestionsContainer.style.bottom=inputBox.height+"px";suggestionsContainer.style.top='unset';}}function getPlaceholder(){var placeholder=formatMessage({id:placeHolderStringResourceKey||inputPlaceholder},placeHolderStringResourceValues);if(!onCtrlEnter){return placeholder;}var browserHint=formatMessage({id:'PostMessage.inputPlaceholderHint'},{keyName:'CTRL'});return placeholder+" "+browserHint;}});function useMentionsSearch(mentionSearchHandler,handleSearchComplete){var _this=this;var searchSubject=useRef$1(new Subject());useEffect$1(function(){var subscription=searchSubject.current.pipe(debounceTime(500),switchMap(function(args){return __awaiter(_this,void 0,void 0,function(){var users;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,mentionSearchHandler(args.searchText)];case 1:users=_a.sent();args.updateSuggestions(users.map(function(u){return {id:u.id,upn:u.userPrincipalName,displayName:u.displayName,display:'@'+u.displayName};}));return [2/*return*/,users];}});});})).subscribe(function(){return handleSearchComplete();});return function(){subscription&&subscription.unsubscribe();};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125880
|
-
},[]);return function(searchText,updateSuggestions){searchSubject.current.next({searchText:searchText,updateSuggestions:updateSuggestions});};}function getBackgroundColor(theme){switch(theme){case'dark':return defaultPageBackgroundColor;default:case'light':return '#fff';}}var Host$U=_styled.div.withConfig({displayName:"CommentInput__Host",componentId:"sc-777bqz-0"})(templateObject_1$2g||(templateObject_1$2g=__makeTemplateObject(["\n display: flex;\n position: relative;\n flex-wrap: wrap;\n flex: 1 1 auto;\n background-color: ",";\n border: 1px solid #656565;\n\n textarea {\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n }\n\n .comment-input__suggestions {\n @media (max-width: ","px) {\n max-height: 300px;\n overflow-y: auto;\n padding-right: ","px;\n }\n\n &__list {\n background-color: white;\n border: 1px solid rgba(0, 0, 0, 0.15);\n width: 100%;\n }\n &__item {\n padding: 5px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.15);\n\n &:last-of-type {\n border-bottom: none;\n }\n\n &--focused {\n background-color: ",";\n }\n }\n }\n"],["\n display: flex;\n position: relative;\n flex-wrap: wrap;\n flex: 1 1 auto;\n background-color: ",";\n border: 1px solid #656565;\n\n textarea {\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n }\n\n .comment-input__suggestions {\n @media (max-width: ","px) {\n max-height: 300px;\n overflow-y: auto;\n padding-right: ","px;\n }\n\n &__list {\n background-color: white;\n border: 1px solid rgba(0, 0, 0, 0.15);\n width: 100%;\n }\n &__item {\n padding: 5px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.15);\n\n &:last-of-type {\n border-bottom: none;\n }\n\n &--focused {\n background-color: ",";\n }\n }\n }\n"])),function(_a){var scheme=_a.scheme;return getBackgroundColor(scheme);},spacingM,maxScreenSize.medium,spacingXxs,defaultPageBackgroundColor);var Buttons$3=_styled.div.withConfig({displayName:"CommentInput__Buttons",componentId:"sc-777bqz-1"})(templateObject_2$
|
|
125845
|
+
},[]);return function(searchText,updateSuggestions){searchSubject.current.next({searchText:searchText,updateSuggestions:updateSuggestions});};}function getBackgroundColor(theme){switch(theme){case'dark':return defaultPageBackgroundColor;default:case'light':return '#fff';}}var Host$U=_styled.div.withConfig({displayName:"CommentInput__Host",componentId:"sc-777bqz-0"})(templateObject_1$2g||(templateObject_1$2g=__makeTemplateObject(["\n display: flex;\n position: relative;\n flex-wrap: wrap;\n flex: 1 1 auto;\n background-color: ",";\n border: 1px solid #656565;\n\n textarea {\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n }\n\n .comment-input__suggestions {\n @media (max-width: ","px) {\n max-height: 300px;\n overflow-y: auto;\n padding-right: ","px;\n }\n\n &__list {\n background-color: white;\n border: 1px solid rgba(0, 0, 0, 0.15);\n width: 100%;\n }\n &__item {\n padding: 5px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.15);\n\n &:last-of-type {\n border-bottom: none;\n }\n\n &--focused {\n background-color: ",";\n }\n }\n }\n"],["\n display: flex;\n position: relative;\n flex-wrap: wrap;\n flex: 1 1 auto;\n background-color: ",";\n border: 1px solid #656565;\n\n textarea {\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n }\n\n .comment-input__suggestions {\n @media (max-width: ","px) {\n max-height: 300px;\n overflow-y: auto;\n padding-right: ","px;\n }\n\n &__list {\n background-color: white;\n border: 1px solid rgba(0, 0, 0, 0.15);\n width: 100%;\n }\n &__item {\n padding: 5px 15px;\n border-bottom: 1px solid rgba(0, 0, 0, 0.15);\n\n &:last-of-type {\n border-bottom: none;\n }\n\n &--focused {\n background-color: ",";\n }\n }\n }\n"])),function(_a){var scheme=_a.scheme;return getBackgroundColor(scheme);},spacingM,maxScreenSize.medium,spacingXxs,defaultPageBackgroundColor);var Buttons$3=_styled.div.withConfig({displayName:"CommentInput__Buttons",componentId:"sc-777bqz-1"})(templateObject_2$1t||(templateObject_2$1t=__makeTemplateObject(["\n display: flex;\n align-items: flex-end;\n padding-bottom: 2px;\n margin: 0 ","px 0 ","px;\n\n && button {\n background-color: transparent;\n\n i {\n font-size: 22px;\n }\n }\n"],["\n display: flex;\n align-items: flex-end;\n padding-bottom: 2px;\n margin: 0 ","px 0 ","px;\n\n && button {\n background-color: transparent;\n\n i {\n font-size: 22px;\n }\n }\n"])),spacingXs,spacingXxs);var InputContainer=_styled.div.withConfig({displayName:"CommentInput__InputContainer",componentId:"sc-777bqz-2"})(templateObject_3$$||(templateObject_3$$=__makeTemplateObject(["\n flex: 1;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n .comment-input {\n &__control {\n background-color: transparent;\n font-size: 14px;\n font-weight: normal;\n border: none;\n }\n &__input {\n /*\n * on small screens the MentionsInput renders a margin-left: -3px directly on the element\n * Use !important to remove the minus margin to match our layout.\n */\n margin: 0 !important;\n padding: 5px;\n outline: 0;\n border: 0;\n }\n &__highlighter {\n padding: 5px;\n border: 0;\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n\n strong {\n ","\n }\n }\n }\n"],["\n flex: 1;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n\n .comment-input {\n &__control {\n background-color: transparent;\n font-size: 14px;\n font-weight: normal;\n border: none;\n }\n &__input {\n /*\n * on small screens the MentionsInput renders a margin-left: -3px directly on the element\n * Use !important to remove the minus margin to match our layout.\n */\n margin: 0 !important;\n padding: 5px;\n outline: 0;\n border: 0;\n }\n &__highlighter {\n padding: 5px;\n border: 0;\n font-family: 'Roboto', sans-serif !important;\n font-size: 14px;\n line-height: ","px;\n\n strong {\n ","\n }\n }\n }\n"])),spacingM,"background-color: "+defaultPageBackgroundColor+";");var templateObject_1$2g,templateObject_2$1t,templateObject_3$$;var DropTarget=_styled.div.withConfig({displayName:"DropInfo__DropTarget",componentId:"sc-1ky6ew9-0"})(templateObject_1$2f||(templateObject_1$2f=__makeTemplateObject(["\n position: ",";\n top: ",";\n left: 0;\n right: 0;\n bottom: 0;\n z-index: ",";\n\n background-color: ",";\n\n display: flex;\n justify-content: center;\n"],["\n position: ",";\n top: ",";\n left: 0;\n right: 0;\n bottom: 0;\n z-index: ",";\n\n background-color: ",";\n\n display: flex;\n justify-content: center;\n"])),function(_a){var isLarge=_a.isLarge,isActive=_a.isActive;return isLarge&&isActive?'fixed':'absolute';},function(_a){var isLarge=_a.isLarge;return isLarge?headerHeight+"px":'0';},function(_a){var isActive=_a.isActive;return isActive?300:0;},function(_a){var isActive=_a.isActive;return isActive?'rgba(253, 253, 253, 0.95)':'transparent';});var DropInfo=function DropInfo(_a){var isLarge=_a.isLarge;return jsx$1(Host$T,__assign({isLarge:isLarge},{children:jsxs(CenteredContainer,__assign({isLarge:isLarge},{children:[jsx$1(StyledIcon$8,{isLarge:isLarge,iconName:"bulkUpload",className:"ms-fontColor-accent"},void 0),jsx$1(FormattedMessage$1,{id:"Generic.dragToUploadTitle",tagName:"h2"},void 0),jsx$1(FormattedMessage$1,{id:"Generic.dragToUploadDescription",tagName:"p"},void 0)]}),void 0)}),void 0);};var Host$T=_styled.div.withConfig({displayName:"DropInfo__Host",componentId:"sc-1ky6ew9-1"})(templateObject_2$1s||(templateObject_2$1s=__makeTemplateObject(["\n ",";\n ",";\n"],["\n ",";\n ",";\n"])),function(_a){var isLarge=_a.isLarge;return !isLarge&&'display: flex';},function(_a){var isLarge=_a.isLarge;return !isLarge&&'align-items: center';});var CenteredContainer=_styled.div.withConfig({displayName:"DropInfo__CenteredContainer",componentId:"sc-1ky6ew9-2"})(templateObject_3$_||(templateObject_3$_=__makeTemplateObject(["\n position: relative;\n top: ",";\n\n display: flex;\n flex-direction: column;\n align-items: center;\n\n h2 {\n margin-bottom: 0;\n }\n p {\n margin-top: 3px;\n }\n"],["\n position: relative;\n top: ",";\n\n display: flex;\n flex-direction: column;\n align-items: center;\n\n h2 {\n margin-bottom: 0;\n }\n p {\n margin-top: 3px;\n }\n"])),function(_a){var isLarge=_a.isLarge;return isLarge?'20%':0;});var StyledIcon$8=_styled(Icon).withConfig({displayName:"DropInfo__StyledIcon",componentId:"sc-1ky6ew9-3"})(templateObject_4$J||(templateObject_4$J=__makeTemplateObject(["\n font-size: ",";\n"],["\n font-size: ",";\n"])),function(p){return p.isLarge?'100px':'50px';});var templateObject_1$2f,templateObject_2$1s,templateObject_3$_,templateObject_4$J;var KeywordsPicker=function KeywordsPicker(props){var _a;var _b=useContext(LazySubscriptionContext),allKeywords=_b.allKeywords,selectedKeywordGroups=_b.selectedKeywordGroups;var availableKeywords=(_a=props.availableKeywords)!==null&&_a!==void 0?_a:allKeywords;if(!allKeywords||!selectedKeywordGroups||!availableKeywords){return null;}return jsx$1(KeywordsPickerInternal,__assign({},props,{availableKeywords:availableKeywords,selectedKeywordGroups:selectedKeywordGroups}),void 0);};var KeywordsPickerInternal=function KeywordsPickerInternal(_a){var selectedKeywordGroups=_a.selectedKeywordGroups,defaultKeywords=_a.defaultKeywords,availableKeywords=_a.availableKeywords,mandatoryKeywords=_a.mandatoryKeywords,onChangeKeywords=_a.onChangeKeywords;var pickerInputId=createId();var user=useCurrentUser();var mandatoryKeywordIds=(mandatoryKeywords===null||mandatoryKeywords===void 0?void 0:mandatoryKeywords.map(function(k){return k.id;}))||[];var _b=useState$2(),selectedItems=_b[0],setSelectedItems=_b[1];useEffect$1(function(){init();// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
125881
125846
|
},[]);var allSuggestions=getAllSuggestions();var noKeywords=availableKeywords.length===0;return jsxs(Host$S,__assign({"data-keywords-picker":true},{children:[noKeywords&&jsx$1(FormattedMessage$1,{id:"KeywordPicker.noGroupsDefined"},void 0),!noKeywords&&jsxs(Fragment,{children:[jsxs(LabelHost,{children:[jsx$1("label",__assign({htmlFor:pickerInputId},{children:jsx$1(FormattedMessage$1,{id:"Keywords.picker.selectKeywords"},void 0)}),void 0),(mandatoryKeywords===null||mandatoryKeywords===void 0?void 0:mandatoryKeywords.length)>0&&jsx$1(MandatoryKeywordsInfoIcon,{},void 0)]},void 0),jsx$1(StyledTagPicker,{onResolveSuggestions:handleResolveKeywords,inputProps:{id:pickerInputId},selectedItems:selectedItems,onEmptyResolveSuggestions:getAllSuggestions,onChange:handleOnChange,pickerCalloutProps:{preventDismissOnResize:true},onRenderItem:function(item){return jsx$1(Tag,{item:item.item,onRemoveItem:removeItem},item.key);}},void 0)]},void 0)]}),void 0);function handleResolveKeywords(searchText,selectedItems){searchText=searchText===null||searchText===void 0?void 0:searchText.toLowerCase();return allSuggestions===null||allSuggestions===void 0?void 0:allSuggestions.filter(function(k){return (searchText.length===0||k.name.toLowerCase().indexOf(searchText)>-1)&&selectedItems.every(function(i){return i.name.toLowerCase().indexOf(searchText)===-1;});});}function init(){var flatDefaultKeywords=getFlatKeywordList(defaultKeywords)||[];var filteredKeywords=ensureMandatoryKeywords(mandatoryKeywords,flatDefaultKeywords);var availableKeywordIds=availableKeywords.map(function(k){return k.id;});filteredKeywords=filteredKeywords.filter(function(k){return availableKeywordIds.includes(k.id);});// it is possible an older post does not have any/all mandatory or available keywords of its group
|
|
125882
125847
|
// here we detect this (if the post is getting edited) and update the keywords accordingly
|
|
125883
125848
|
if(filteredKeywords.length!==flatDefaultKeywords.length){onChangeKeywords(filteredKeywords);}setSelectedItems(filteredKeywords.map(function(k){return {name:getKeywordDisplayValue(selectedKeywordGroups,user,k.groupId,k.name),key:k.id,isMandatory:mandatoryKeywordIds.includes(k.id)};}));}function getAllSuggestions(selectedItems){return availableKeywords===null||availableKeywords===void 0?void 0:availableKeywords.filter(function(k){return (selectedItems||[]).every(function(i){return i.key!==k.id;});}).map(function(k){return {key:k.id,name:getKeywordDisplayValue(selectedKeywordGroups,user,k.groupId,k.name)};});}function handleOnChange(items){var itemKeys=items.map(function(i){return i.key;});// this prevents the user from removing a mandatory keyword by using the backspace button
|
|
125884
|
-
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$
|
|
125849
|
+
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)
|
|
125885
125850
|
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
|
|
125886
125851
|
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
|
|
125887
|
-
function getAdditionalVideoSources(){return [];}var isObject$
|
|
125852
|
+
function getAdditionalVideoSources(){return [];}var isObject$4=isObject$c;var setPrototypeOf=objectSetPrototypeOf;// makes subclassing work correct for wrapped built-ins
|
|
125888
125853
|
var inheritIfRequired$1=function($this,dummy,Wrapper){var NewTarget,NewTargetPrototype;if(// it can work only with native `setPrototypeOf`
|
|
125889
125854
|
setPrototypeOf&&// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
125890
|
-
typeof(NewTarget=dummy.constructor)=='function'&&NewTarget!==Wrapper&&isObject$
|
|
125855
|
+
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
|
|
125891
125856
|
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
|
|
125892
125857
|
return NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||NativeRegExp(re1,'i')!='/a/i';}));// `RegExp` constructor
|
|
125893
125858
|
// https://tc39.github.io/ecma262/#sec-regexp-constructor
|
|
@@ -125896,9 +125861,9 @@ setSpecies$1('RegExp');var redefine$1$1=redefine$9.exports;var anObject$4=anObje
|
|
|
125896
125861
|
var INCORRECT_NAME$1=nativeToString$1.name!=TO_STRING$1;// `RegExp.prototype.toString` method
|
|
125897
125862
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
|
|
125898
125863
|
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
|
|
125899
|
-
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$
|
|
125900
|
-
if(isArrayIteratorMethod(iterFn)){for(index=0,length=toLength$
|
|
125901
|
-
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$
|
|
125864
|
+
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
|
|
125865
|
+
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
|
|
125866
|
+
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
|
|
125902
125867
|
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
|
|
125903
125868
|
global$7.postMessage(id+'',location$1.protocol+'//'+location$1.host);};// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
125904
125869
|
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
|
|
@@ -125906,7 +125871,7 @@ if(!set||!clear){set=function setImmediate(fn){var args=[];var i=1;while(argumen
|
|
|
125906
125871
|
if(classof$3(process$3)=='process'){defer=function(id){process$3.nextTick(runner(id));};// Sphere (JS game engine) Dispatch API
|
|
125907
125872
|
}else if(Dispatch&&Dispatch.now){defer=function(id){Dispatch.now(runner(id));};// Browsers with MessageChannel, includes WebWorkers
|
|
125908
125873
|
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
125909
|
-
}else if(MessageChannel$1&&!IS_IOS$1){channel=new MessageChannel$1();port=channel.port2;channel.port1.onmessage=listener;defer=bind$
|
|
125874
|
+
}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
|
|
125910
125875
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
125911
125876
|
}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-
|
|
125912
125877
|
}else if(ONREADYSTATECHANGE in createElement('script')){defer=function(id){html.appendChild(createElement('script'))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run(id);};};// Rest old browsers
|
|
@@ -125923,8 +125888,8 @@ promise=Promise$1.resolve(undefined);then=promise.then;notify$1=function(){then.
|
|
|
125923
125888
|
// - onreadystatechange
|
|
125924
125889
|
// - setTimeout
|
|
125925
125890
|
}else {notify$1=function(){// strange IE + webpack dev server bug - use .call(global)
|
|
125926
|
-
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$
|
|
125927
|
-
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$
|
|
125891
|
+
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)
|
|
125892
|
+
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
|
|
125928
125893
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
125929
125894
|
// We can't detect it synchronously, so just check versions
|
|
125930
125895
|
if(V8_VERSION===66)return true;// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
@@ -125932,31 +125897,31 @@ if(!IS_NODE&&typeof PromiseRejectionEvent!='function')return true;}// We can't u
|
|
|
125932
125897
|
// deoptimization and performance degradation
|
|
125933
125898
|
// https://github.com/zloirock/core-js/issues/679
|
|
125934
125899
|
if(V8_VERSION>=51&&/native code/.test(PromiseConstructor))return false;// Detect correctness of subclassing with @@species support
|
|
125935
|
-
var promise=PromiseConstructor.resolve(1);var FakePromise=function(exec){exec(function(){/* empty */},function(){/* empty */});};var constructor=promise.constructor={};constructor[SPECIES$
|
|
125936
|
-
var isThenable=function(it){var then;return isObject$
|
|
125900
|
+
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
|
|
125901
|
+
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
|
|
125937
125902
|
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
|
|
125938
125903
|
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
|
|
125939
|
-
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
|
|
125904
|
+
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
|
|
125940
125905
|
if(FORCED$2){// 25.4.3.1 Promise(executor)
|
|
125941
|
-
PromiseConstructor=function Promise(executor){anInstance(this,PromiseConstructor,PROMISE);aFunction$
|
|
125906
|
+
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
|
|
125942
125907
|
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
|
|
125943
125908
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.then
|
|
125944
125909
|
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
|
|
125945
125910
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.catch
|
|
125946
|
-
'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
|
|
125911
|
+
'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
|
|
125947
125912
|
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
|
|
125948
125913
|
},{unsafe:true});// wrap fetch result
|
|
125949
|
-
if(typeof $fetch=='function')$$
|
|
125950
|
-
fetch:function fetch(input/* , init */){return promiseResolve(PromiseConstructor,$fetch.apply(global$3,arguments));}});}}$$
|
|
125951
|
-
$$
|
|
125914
|
+
if(typeof $fetch=='function')$$8({global:true,enumerable:true,forced:true},{// eslint-disable-next-line no-unused-vars
|
|
125915
|
+
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
|
|
125916
|
+
$$8({target:PROMISE,stat:true,forced:FORCED$2},{// `Promise.reject` method
|
|
125952
125917
|
// https://tc39.github.io/ecma262/#sec-promise.reject
|
|
125953
|
-
reject:function reject(r){var capability=newPromiseCapability(this);capability.reject.call(undefined,r);return capability.promise;}});$$
|
|
125918
|
+
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
|
|
125954
125919
|
// https://tc39.github.io/ecma262/#sec-promise.resolve
|
|
125955
|
-
resolve:function resolve(x){return promiseResolve(this,x);}});$$
|
|
125920
|
+
resolve:function resolve(x){return promiseResolve(this,x);}});$$8({target:PROMISE,stat:true,forced:INCORRECT_ITERATION},{// `Promise.all` method
|
|
125956
125921
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
125957
|
-
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$
|
|
125922
|
+
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
|
|
125958
125923
|
// https://tc39.github.io/ecma262/#sec-promise.race
|
|
125959
|
-
race:function race(iterable){var C=this;var capability=newPromiseCapability(C);var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$
|
|
125924
|
+
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
|
|
125960
125925
|
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
125961
125926
|
var sameValue$1=Object.is||function is(x,y){// eslint-disable-next-line no-self-compare
|
|
125962
125927
|
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
|
|
@@ -125964,9 +125929,9 @@ fixRegExpWellKnownSymbolLogic$1('search',1,function(SEARCH,nativeSearch,maybeCal
|
|
|
125964
125929
|
// https://tc39.github.io/ecma262/#sec-string.prototype.search
|
|
125965
125930
|
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
|
|
125966
125931
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
|
|
125967
|
-
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 $$
|
|
125932
|
+
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
|
|
125968
125933
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
125969
|
-
$$
|
|
125934
|
+
$$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)
|
|
125970
125935
|
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
|
|
125971
125936
|
item.fileAccessToken=null;}});observer.next(cachedPage);}return [4/*yield*/,apiLoader];case 2:apiPage_1=_a.sent();// no need to wait for updating the cache
|
|
125972
125937
|
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
|
|
@@ -125992,15 +125957,15 @@ return this.getVideoElement(getMicrosoftStreamEmbedVideoUrl(this.videoInfo.id,th
|
|
|
125992
125957
|
// ></iframe>;
|
|
125993
125958
|
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
|
|
125994
125959
|
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
|
|
125995
|
-
},[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$
|
|
125996
|
-
var createMethod$4=function(IS_RIGHT){return function(that,callbackfn,argumentsLength,memo){aFunction$
|
|
125960
|
+
},[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
|
|
125961
|
+
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
|
|
125997
125962
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
125998
125963
|
left:createMethod$4(false),// `Array.prototype.reduceRight` method
|
|
125999
125964
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
|
126000
125965
|
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
|
|
126001
|
-
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 $$
|
|
125966
|
+
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
|
|
126002
125967
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
126003
|
-
$$5({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$1m||(templateObject_2$1m=__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$1m,templateObject_3$X,templateObject_4$H,templateObject_5$B;var NewsService=/** @class */function(){function NewsService(){}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$1l||(templateObject_2$1l=__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$1l,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$1k||(templateObject_2$1k=__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$1k,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$1j||(templateObject_2$1j=__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$1j,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};/**
|
|
125968
|
+
$$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 NewsService=/** @class */function(){function NewsService(){}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};/**
|
|
126004
125969
|
* Retrieve information on a given image. Does not return the actual image.
|
|
126005
125970
|
*/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
|
|
126006
125971
|
if(!newImage.identifier){// identifer defaults to 'banner'
|
|
@@ -126008,11 +125973,11 @@ newImage.identifier='banner';}fd=new FormData();fd.append('image',newImage.image
|
|
|
126008
125973
|
// any promise failures are expected be handled from the code consuming the observable
|
|
126009
125974
|
return [4/*yield*/,fetchFromApi("/editor/"+resourceType+"/"+newImage.itemId+"/images/"+newImage.identifier+"/"+newImage.variant,config)];case 2:// error handling is not done here
|
|
126010
125975
|
// any promise failures are expected be handled from the code consuming the observable
|
|
126011
|
-
_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$1i||(templateObject_2$1i=__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$1i,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$1h||(templateObject_2$1h=__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$1h,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$1g||(templateObject_2$1g=__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$1g;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$1f||(templateObject_2$1f=__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$1f,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$1e||(templateObject_2$1e=__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$1e,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
|
|
125976
|
+
_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
|
|
126012
125977
|
NativeSymbol().description!==undefined)){var EmptyStringDescriptionStore={};// wrap Symbol constructor for correct work with undefined description
|
|
126013
125978
|
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)'
|
|
126014
|
-
: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;}});$$
|
|
126015
|
-
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$1d||(templateObject_2$1d=__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$1d;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$1c||(templateObject_2$1c=__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$1c,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
|
|
125979
|
+
: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
|
|
125980
|
+
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
|
|
126016
125981
|
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
|
|
126017
125982
|
// since to get this information we need to load all results of all items
|
|
126018
125983
|
// we don't want to do this, so we just return "true"
|
|
@@ -126020,12 +125985,12 @@ var seatsInfo=useMemo(getSeatsInfo,[isRegistered,item.id]);return jsx$1(EventUse
|
|
|
126020
125985
|
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
|
|
126021
125986
|
// or we are already loading the next page
|
|
126022
125987
|
if(likersInfo.token==null||isLoading){return [2/*return*/];}// check if user scrolled enough
|
|
126023
|
-
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$1b||(templateObject_2$1b=__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$1b,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$1a||(templateObject_2$1a=__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$1a;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$19||(templateObject_2$19=__makeTemplateObject(["\n font-weight: bold;\n"],["\n font-weight: bold;\n"])));var templateObject_1$1W,templateObject_2$19;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$18||(templateObject_2$18=__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$18,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$17||(templateObject_2$17=__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$17,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$1=toObject$6;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
|
|
125988
|
+
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$2=toObject$7;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
|
|
126024
125989
|
var FAILS_ON_UNDEFINED=fails$j(function(){test$1.sort(undefined);});// V8 bug
|
|
126025
125990
|
var FAILS_ON_NULL=fails$j(function(){test$1.sort(null);});// Old WebKit
|
|
126026
125991
|
var STRICT_METHOD=arrayMethodIsStrict('sort');var FORCED$1=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD;// `Array.prototype.sort` method
|
|
126027
125992
|
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
|
|
126028
|
-
$$
|
|
125993
|
+
$$4({target:'Array',proto:true,forced:FORCED$1},{sort:function sort(comparefn){return comparefn===undefined?nativeSort.call(toObject$2(this)):nativeSort.call(toObject$2(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
|
|
126029
125994
|
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
|
|
126030
125995
|
},[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
|
|
126031
125996
|
},[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
|
|
@@ -126040,11 +126005,11 @@ return nodes.slice().sort(function(a,b){return compareRootPages(groupPositions,a
|
|
|
126040
126005
|
// we just use the id for that, because this one is always different
|
|
126041
126006
|
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
|
|
126042
126007
|
},[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
|
|
126043
|
-
},[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$16||(templateObject_2$16=__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$16,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$15||(templateObject_2$15=__makeTemplateObject(["\n margin-left: ","px;\n"],["\n margin-left: ","px;\n"])),spacingXs);var templateObject_1$1Q,templateObject_2$15;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({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_1$1P||(templateObject_1$1P=__makeTemplateObject(["\n font-size: ","px;\n z-index: 1;\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 margin: 0 0 ","px 0;\n\n a {\n &,\n :link,\n :visited {\n color: ",";\n text-decoration: none;\n }\n }\n }\n"])),fontSizeMedium,spacingS,function(p){return p.theme.textColors.default;});var templateObject_1$1P;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
|
|
126008
|
+
},[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
|
|
126044
126009
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
126045
|
-
var numberParseInt=FORCED?function parseInt(string,radix){var S=trim(String(string));return $parseInt(S,radix>>>0||(hex.test(S)?16:10));}:$parseInt;var $$
|
|
126010
|
+
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
|
|
126046
126011
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
126047
|
-
$$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 buildPath=useSubscriptionHandlePathBuilder().buildPath;var targetRoute=NewsService.getNewsRoute(item.useExternalContent?buildPath('/redirect/news'):baseRoute,item.id,title);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
|
|
126012
|
+
$$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 buildPath=useSubscriptionHandlePathBuilder().buildPath;var targetRoute=NewsService.getNewsRoute(item.useExternalContent?buildPath('/redirect/news'):baseRoute,item.id,title);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
|
|
126048
126013
|
},[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
|
|
126049
126014
|
},[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
|
|
126050
126015
|
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
|
|
@@ -126096,33 +126061,33 @@ return {id:pageListId,showChildren:showChildren,showPages:true,showDocuments:fal
|
|
|
126096
126061
|
// Delay the pollResult a bit so the users sees the animation
|
|
126097
126062
|
var delayedFetchPollResult=useDebouncedCallback(fetchPollResults,500)[0];if(isLoading){return null;}var actualQuestions=__spreadArray(__spreadArray([],questionDefinitions),(additionalQuestions===null||additionalQuestions===void 0?void 0:additionalQuestions.questions)||[]);var hasMissingAnswers=!!userAnswers.find(function(a){return a.choiceIds.length===0;});var hasMissingUnsavedAnswer=unsavedQuestionsIds.length>0||userAnswers.some(function(a){return !a.choiceIds.length;});showResult=(showResult||!hasMissingUnsavedAnswer)&&actualQuestions.length>0;return jsx$1(PollUserContext.Provider,__assign({value:{item:item,resourceType:resourceType,questions:actualQuestions,answers:userAnswers,addAnswer:handleAddAnswer,setAnswers:setUserAnswers,pollResult:pollResult,isLoadingPollResult:isLoadingPollResult,showResult:showResult,hasMissingAnswers:hasMissingAnswers,hasMissingUnsavedAnswer:hasMissingUnsavedAnswer,submitPoll:handleSubmitPoll,getQuestionResult:getQuestionResult,reset:reset,onBehalfOfUpn:onBehalfOfUpn,fetchPollResults:fetchPollResults}},{children:jsx$1(PollTranslationContextProvider,__assign({contents:item.contents,language:language,additionalTranslations:additionalQuestions===null||additionalQuestions===void 0?void 0:additionalQuestions.translations},{children:children}),void 0)}),void 0);function handleAddAnswer(questionId,selectedChoiceIds){setUnsavedQuestionsIds(function(a){return __spreadArray(__spreadArray([],a),[questionId]);});setUserAnswers(function(answers){return answers.map(function(a){return a.questionId===questionId?__assign(__assign({},a),{choiceIds:__spreadArray([],selectedChoiceIds)}):a;});});}function handleSubmitPoll(savePollAnswers){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);setUnsavedQuestionsIds([]);return [4/*yield*/,savePollAnswers()];case 1:_a.sent();delayedFetchPollResult();return [3/*break*/,3];case 2:_a.sent();showError('Generic.error');return [3/*break*/,3];case 3:return [2/*return*/];}});});}function reset(){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){setUnsavedQuestionsIds([]);setUserAnswers(createUsersAnswersFromFeedback({records:[]}));fetchPollResults();return [2/*return*/];});});}function loadUserAnswers(){return __awaiter(this,void 0,void 0,function(){var feedback,error_2;return __generator(this,function(_a){switch(_a.label){case 0:_a.trys.push([0,2,,3]);return [4/*yield*/,getFeedback(resourceType,itemId,onBehalfOfUpn)];case 1:feedback=_a.sent();return [3/*break*/,3];case 2:error_2=_a.sent();// if we got a 404, the user doesn't exist, in this case we simply treat the feedback as it is not set yet
|
|
126098
126063
|
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
|
|
126099
|
-
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 fixRegExpWellKnownSymbolLogic$4=fixRegexpWellKnownSymbolLogic$1;var anObject$i=anObject$h;var toObject=toObject$6;var toLength$9=toLength$8;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
|
|
126064
|
+
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 fixRegExpWellKnownSymbolLogic$4=fixRegexpWellKnownSymbolLogic$1;var anObject$i=anObject$h;var toObject$1=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
|
|
126100
126065
|
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
|
|
126101
126066
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
|
126102
126067
|
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
|
|
126103
126068
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
|
126104
|
-
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$
|
|
126069
|
+
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
|
|
126105
126070
|
// captures = result.slice(1).map(maybeToString)
|
|
126106
126071
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
126107
126072
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
126108
126073
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
126109
126074
|
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
|
|
126110
|
-
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(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?
|
|
126075
|
+
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$1(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?
|
|
126111
126076
|
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 classof$a=classofRaw$1;// `IsArray` abstract operation
|
|
126112
126077
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
126113
|
-
var isArray$
|
|
126078
|
+
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
|
|
126114
126079
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
|
|
126115
126080
|
// fix for Safari 12.0 bug
|
|
126116
126081
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
126117
|
-
$$
|
|
126118
|
-
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
|
|
126082
|
+
$$2({target:'Array',proto:true,forced:String(test)===String(test.reverse())},{reverse:function reverse(){// eslint-disable-next-line no-self-assign
|
|
126083
|
+
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
|
|
126119
126084
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126120
126085
|
},[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
|
|
126121
126086
|
,{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
|
|
126122
126087
|
var refreshToken=pullToRefreshContext===null||pullToRefreshContext===void 0?void 0:pullToRefreshContext.refreshToken;var refreshUserDetails=useRefreshUserDetails();var isValid=true;useEffect$1(function(){if(!isValid||preventLoading){return null;}if(!initialComments||refreshToken){// pass the pageToken explicitly since it's possible that the nextPageTokenState has not been updated yet
|
|
126123
126088
|
loadNextPage(null,initialPageSize,!!initialComments).then(function(){return null;},logger.error);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126124
126089
|
return function(){isValid=false;};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126125
|
-
},[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:
|
|
126090
|
+
},[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
|
|
126126
126091
|
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.
|
|
126127
126092
|
// HACK: a regular anchor does not work, because content is rendered
|
|
126128
126093
|
// dynamically and the comments might not be in DOM at the right time.
|
|
@@ -126143,11 +126108,20 @@ result.items.forEach(function(page){var _a;var node=convertToNavigationNode(page
|
|
|
126143
126108
|
// we don't want to add the same node again, instead we just need to
|
|
126144
126109
|
// append the children of the node
|
|
126145
126110
|
// we also know then that we don't have to traverse the tree further up and can stop
|
|
126146
|
-
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
|
|
126111
|
+
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
|
|
126147
126112
|
// https://github.com/tc39/proposal-string-replace-all
|
|
126148
|
-
$$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
|
|
126149
|
-
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)
|
|
126150
|
-
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$1v||(templateObject_2$1v=__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$1v;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
|
|
126113
|
+
$$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 & + .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
|
|
126114
|
+
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)
|
|
126115
|
+
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
|
|
126116
|
+
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
126117
|
+
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
|
|
126118
|
+
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
126119
|
+
var arraySpeciesCreate$1=function(originalArray,length){var C;if(isArray(originalArray)){C=originalArray.constructor;// cross-realm fallback
|
|
126120
|
+
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
|
|
126121
|
+
// https://github.com/tc39/proposal-flatMap
|
|
126122
|
+
$$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
|
|
126123
|
+
// in popular engines, so it's moved to a separate module
|
|
126124
|
+
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
|
|
126151
126125
|
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
|
|
126152
126126
|
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
|
|
126153
126127
|
return [4/*yield*/,api.custom("editor/"+itemId+"/lease").put({leaseId:leaseId})];case 1:// update the lease
|
|
@@ -126455,7 +126429,7 @@ $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
|
126455
126429
|
|
|
126456
126430
|
var redefine$1 = redefine$k.exports;
|
|
126457
126431
|
var fails$2 = fails$w;
|
|
126458
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
126432
|
+
var wellKnownSymbol = wellKnownSymbol$E;
|
|
126459
126433
|
var regexpExec$1 = regexpExec$2;
|
|
126460
126434
|
var createNonEnumerableProperty = createNonEnumerableProperty$k;
|
|
126461
126435
|
|
|
@@ -126636,7 +126610,7 @@ var regexpExecAbstract = function (R, S) {
|
|
|
126636
126610
|
|
|
126637
126611
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
126638
126612
|
var anObject$1 = anObject$v;
|
|
126639
|
-
var toLength = toLength$
|
|
126613
|
+
var toLength = toLength$k;
|
|
126640
126614
|
var requireObjectCoercible$1 = requireObjectCoercible$l;
|
|
126641
126615
|
var advanceStringIndex = advanceStringIndex$1;
|
|
126642
126616
|
var regExpExec = regexpExecAbstract;
|
|
@@ -127768,6 +127742,7 @@ var NewsGridCard = function NewsGridCard(_a) {
|
|
|
127768
127742
|
var intl = useIntl();
|
|
127769
127743
|
var token = useCurrentToken();
|
|
127770
127744
|
var features = useFeatures();
|
|
127745
|
+
var buildPath = useSubscriptionHandlePathBuilder().buildPath;
|
|
127771
127746
|
|
|
127772
127747
|
if (!item) {
|
|
127773
127748
|
return null;
|
|
@@ -127777,7 +127752,6 @@ var NewsGridCard = function NewsGridCard(_a) {
|
|
|
127777
127752
|
var headline = getHeadline(item, user);
|
|
127778
127753
|
var showHeadline = features.contentHeadline && headline != null;
|
|
127779
127754
|
var language = NewsService.getLanguageForPublishableItem(item, user);
|
|
127780
|
-
var targetRoute = NewsService.getNewsRoute(baseRoute, item.id, title);
|
|
127781
127755
|
var hasKeywords = Object.keys(item.keywords).length > 0;
|
|
127782
127756
|
var content = item.contents[language];
|
|
127783
127757
|
var hasIntro = content.intro && content.intro.length > 0;
|
|
@@ -127833,7 +127807,7 @@ var NewsGridCard = function NewsGridCard(_a) {
|
|
|
127833
127807
|
children: headline
|
|
127834
127808
|
}, void 0), jsx$1(StyledTitle, {
|
|
127835
127809
|
title: title,
|
|
127836
|
-
targetRoute:
|
|
127810
|
+
targetRoute: getTargetRoute(true),
|
|
127837
127811
|
openTargetInNewWindow: openTargetInNewWindow,
|
|
127838
127812
|
onClick: onTitleClick,
|
|
127839
127813
|
isExternalContent: item.useExternalContent
|
|
@@ -127846,12 +127820,20 @@ var NewsGridCard = function NewsGridCard(_a) {
|
|
|
127846
127820
|
}, void 0)
|
|
127847
127821
|
}, void 0), jsx$1(CardFooter, {
|
|
127848
127822
|
item: newsItem,
|
|
127849
|
-
targetRoute:
|
|
127823
|
+
targetRoute: getTargetRoute(),
|
|
127850
127824
|
showComments: true
|
|
127851
127825
|
}, void 0)]
|
|
127852
127826
|
}, void 0)]
|
|
127853
127827
|
}), void 0)]
|
|
127854
127828
|
}), void 0);
|
|
127829
|
+
|
|
127830
|
+
function getTargetRoute(redirect) {
|
|
127831
|
+
if (redirect) {
|
|
127832
|
+
return NewsService.getNewsRoute(item.useExternalContent ? buildPath('/redirect/news') : baseRoute, item.id, title);
|
|
127833
|
+
}
|
|
127834
|
+
|
|
127835
|
+
return NewsService.getNewsRoute(baseRoute, item.id, title);
|
|
127836
|
+
}
|
|
127855
127837
|
};
|
|
127856
127838
|
var Host$5 = _styled.div(templateObject_2$4 || (templateObject_2$4 = __makeTemplateObject$l(["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"], ["\n display: flex;\n flex-direction: column;\n width: 100%;\n box-shadow: 1px 1px 4px grey;\n box-sizing: border-box;\n position: relative;\n\n ", "\n"])), function (p) {
|
|
127857
127839
|
return p.showHighlight && css$2(templateObject_1$a || (templateObject_1$a = __makeTemplateObject$l(["\n position: relative;\n &::after {\n ", ";\n }\n "], ["\n position: relative;\n &::after {\n ", ";\n }\n "])), BannerHighlightStyle);
|
|
@@ -129013,39 +128995,26 @@ var ToolbarManageNewsItemButton = function ToolbarManageNewsItemButton(_a) {
|
|
|
129013
128995
|
}, void 0);
|
|
129014
128996
|
};
|
|
129015
128997
|
|
|
129016
|
-
var
|
|
128998
|
+
var NewsItemPreviewContextProvider = function NewsItemPreviewContextProvider(_a) {
|
|
129017
128999
|
var itemId = _a.itemId,
|
|
129018
129000
|
versionId = _a.versionId,
|
|
129019
|
-
|
|
129001
|
+
children = _a.children;
|
|
129020
129002
|
var getNews = useNewsEditorApi().getNews;
|
|
129021
129003
|
var getVersion = useEditorApi().getVersion;
|
|
129022
|
-
var itemContext = useDetailViewContext();
|
|
129023
129004
|
|
|
129024
|
-
if (!
|
|
129005
|
+
if (!itemId) {
|
|
129025
129006
|
return null;
|
|
129026
129007
|
}
|
|
129027
129008
|
|
|
129028
|
-
|
|
129029
|
-
|
|
129030
|
-
|
|
129031
|
-
|
|
129032
|
-
|
|
129033
|
-
|
|
129034
|
-
|
|
129035
|
-
return loadNewsPreview(itemId);
|
|
129036
|
-
},
|
|
129037
|
-
isReadOnly: true,
|
|
129038
|
-
type: ItemResourceTypes.News
|
|
129039
|
-
}, {
|
|
129040
|
-
children: jsx$1(NewsDetailPreviewInternal, {}, void 0)
|
|
129041
|
-
}), void 0)
|
|
129042
|
-
}), void 0);
|
|
129043
|
-
}
|
|
129044
|
-
|
|
129045
|
-
return jsx$1(Host, __assign$g({
|
|
129046
|
-
className: className
|
|
129009
|
+
return jsx$1(DetailViewContextProvider, __assign$g({
|
|
129010
|
+
itemId: itemId,
|
|
129011
|
+
loadItemFunc: function (itemId) {
|
|
129012
|
+
return loadNewsPreview(itemId);
|
|
129013
|
+
},
|
|
129014
|
+
isReadOnly: true,
|
|
129015
|
+
type: ItemResourceTypes.News
|
|
129047
129016
|
}, {
|
|
129048
|
-
children:
|
|
129017
|
+
children: children
|
|
129049
129018
|
}), void 0);
|
|
129050
129019
|
|
|
129051
129020
|
function loadNewsPreview(itemId) {
|
|
@@ -129080,6 +129049,36 @@ var NewsDetailPreview = function NewsDetailPreview(_a) {
|
|
|
129080
129049
|
}
|
|
129081
129050
|
};
|
|
129082
129051
|
|
|
129052
|
+
var NewsDetailPreview = function NewsDetailPreview(_a) {
|
|
129053
|
+
var itemId = _a.itemId,
|
|
129054
|
+
versionId = _a.versionId,
|
|
129055
|
+
className = _a.className;
|
|
129056
|
+
var itemContext = useDetailViewContext();
|
|
129057
|
+
|
|
129058
|
+
if (!itemContext && !itemId) {
|
|
129059
|
+
return null;
|
|
129060
|
+
}
|
|
129061
|
+
|
|
129062
|
+
if (!itemContext) {
|
|
129063
|
+
return jsx$1(Host, __assign$g({
|
|
129064
|
+
className: className
|
|
129065
|
+
}, {
|
|
129066
|
+
children: jsx$1(NewsItemPreviewContextProvider, __assign$g({
|
|
129067
|
+
itemId: itemId,
|
|
129068
|
+
versionId: versionId
|
|
129069
|
+
}, {
|
|
129070
|
+
children: jsx$1(NewsDetailPreviewInternal, {}, void 0)
|
|
129071
|
+
}), void 0)
|
|
129072
|
+
}), void 0);
|
|
129073
|
+
}
|
|
129074
|
+
|
|
129075
|
+
return jsx$1(Host, __assign$g({
|
|
129076
|
+
className: className
|
|
129077
|
+
}, {
|
|
129078
|
+
children: jsx$1(NewsDetailPreviewInternal, {}, void 0)
|
|
129079
|
+
}), void 0);
|
|
129080
|
+
};
|
|
129081
|
+
|
|
129083
129082
|
var NewsDetailPreviewInternal = function NewsDetailPreviewInternal() {
|
|
129084
129083
|
return jsxs(PublishableItemDetailViewContainer, __assign$g({
|
|
129085
129084
|
preventExternalContentAutoRedirect: true
|
|
@@ -129095,4 +129094,4 @@ var Host = _styled.div.withConfig({
|
|
|
129095
129094
|
|
|
129096
129095
|
var templateObject_1;
|
|
129097
129096
|
|
|
129098
|
-
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 };
|
|
129097
|
+
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 };
|