@livetiles/reach-components-react 0.4.0-preview.64 → 0.4.0-preview.66
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/en.async.esm.esm.js +1 -2
- package/index.d.ts +1 -6
- package/index.esm.js +1 -1
- package/index.esm2.js +332 -356
- package/index.umd.js +332 -358
- package/package.json +1 -1
- package/NewsItemPreviewContextProvider.d.ts +0 -5
package/index.umd.js
CHANGED
|
@@ -163,22 +163,22 @@
|
|
|
163
163
|
return IndexedObject$9(requireObjectCoercible$k(it));
|
|
164
164
|
};
|
|
165
165
|
|
|
166
|
-
var isObject$
|
|
166
|
+
var isObject$t = function (it) {
|
|
167
167
|
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
168
168
|
};
|
|
169
169
|
|
|
170
|
-
var isObject$
|
|
170
|
+
var isObject$s = isObject$t;
|
|
171
171
|
|
|
172
172
|
// `ToPrimitive` abstract operation
|
|
173
173
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
174
174
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
175
175
|
// and the second argument - flag - preferred type is a string
|
|
176
176
|
var toPrimitive$c = function (input, PREFERRED_STRING) {
|
|
177
|
-
if (!isObject$
|
|
177
|
+
if (!isObject$s(input)) return input;
|
|
178
178
|
var fn, val;
|
|
179
|
-
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$
|
|
180
|
-
if (typeof (fn = input.valueOf) == 'function' && !isObject$
|
|
181
|
-
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$
|
|
179
|
+
if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$s(val = fn.call(input))) return val;
|
|
180
|
+
if (typeof (fn = input.valueOf) == 'function' && !isObject$s(val = fn.call(input))) return val;
|
|
181
|
+
if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject$s(val = fn.call(input))) return val;
|
|
182
182
|
throw TypeError("Can't convert object to primitive value");
|
|
183
183
|
};
|
|
184
184
|
|
|
@@ -189,11 +189,11 @@
|
|
|
189
189
|
};
|
|
190
190
|
|
|
191
191
|
var global$F = global$G;
|
|
192
|
-
var isObject$
|
|
192
|
+
var isObject$r = isObject$t;
|
|
193
193
|
|
|
194
194
|
var document$4 = global$F.document;
|
|
195
195
|
// typeof document.createElement is 'object' in old IE
|
|
196
|
-
var EXISTS$7 = isObject$
|
|
196
|
+
var EXISTS$7 = isObject$r(document$4) && isObject$r(document$4.createElement);
|
|
197
197
|
|
|
198
198
|
var documentCreateElement$8 = function (it) {
|
|
199
199
|
return EXISTS$7 ? document$4.createElement(it) : {};
|
|
@@ -233,10 +233,10 @@
|
|
|
233
233
|
|
|
234
234
|
var objectDefineProperty$7 = {};
|
|
235
235
|
|
|
236
|
-
var isObject$
|
|
236
|
+
var isObject$q = isObject$t;
|
|
237
237
|
|
|
238
238
|
var anObject$v = function (it) {
|
|
239
|
-
if (!isObject$
|
|
239
|
+
if (!isObject$q(it)) {
|
|
240
240
|
throw TypeError(String(it) + ' is not an object');
|
|
241
241
|
} return it;
|
|
242
242
|
};
|
|
@@ -346,7 +346,7 @@
|
|
|
346
346
|
|
|
347
347
|
var NATIVE_WEAK_MAP$7 = nativeWeakMap$7;
|
|
348
348
|
var global$B = global$G;
|
|
349
|
-
var isObject$
|
|
349
|
+
var isObject$p = isObject$t;
|
|
350
350
|
var createNonEnumerableProperty$i = createNonEnumerableProperty$k;
|
|
351
351
|
var objectHas$7 = has$w;
|
|
352
352
|
var sharedKey$a = sharedKey$b;
|
|
@@ -362,7 +362,7 @@
|
|
|
362
362
|
var getterFor$7 = function (TYPE) {
|
|
363
363
|
return function (it) {
|
|
364
364
|
var state;
|
|
365
|
-
if (!isObject$
|
|
365
|
+
if (!isObject$p(it) || (state = get$9(it)).type !== TYPE) {
|
|
366
366
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
367
367
|
} return state;
|
|
368
368
|
};
|
|
@@ -474,7 +474,7 @@
|
|
|
474
474
|
|
|
475
475
|
// `ToLength` abstract operation
|
|
476
476
|
// https://tc39.github.io/ecma262/#sec-tolength
|
|
477
|
-
var toLength$
|
|
477
|
+
var toLength$i = function (argument) {
|
|
478
478
|
return argument > 0 ? min$c(toInteger$d(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
479
479
|
};
|
|
480
480
|
|
|
@@ -492,14 +492,14 @@
|
|
|
492
492
|
};
|
|
493
493
|
|
|
494
494
|
var toIndexedObject$c = toIndexedObject$e;
|
|
495
|
-
var toLength$
|
|
495
|
+
var toLength$h = toLength$i;
|
|
496
496
|
var toAbsoluteIndex$8 = toAbsoluteIndex$9;
|
|
497
497
|
|
|
498
498
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
499
499
|
var createMethod$b = function (IS_INCLUDES) {
|
|
500
500
|
return function ($this, el, fromIndex) {
|
|
501
501
|
var O = toIndexedObject$c($this);
|
|
502
|
-
var length = toLength$
|
|
502
|
+
var length = toLength$h(O.length);
|
|
503
503
|
var index = toAbsoluteIndex$8(fromIndex, length);
|
|
504
504
|
var value;
|
|
505
505
|
// Array#includes uses SameValueZero equality algorithm
|
|
@@ -710,7 +710,7 @@
|
|
|
710
710
|
var Symbol$2 = global$v.Symbol;
|
|
711
711
|
var createWellKnownSymbol$7 = USE_SYMBOL_AS_UID$7 ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$9;
|
|
712
712
|
|
|
713
|
-
var wellKnownSymbol$
|
|
713
|
+
var wellKnownSymbol$D = function (name) {
|
|
714
714
|
if (!has$q(WellKnownSymbolsStore$7, name)) {
|
|
715
715
|
if (NATIVE_SYMBOL$8 && has$q(Symbol$2, name)) WellKnownSymbolsStore$7[name] = Symbol$2[name];
|
|
716
716
|
else WellKnownSymbolsStore$7[name] = createWellKnownSymbol$7('Symbol.' + name);
|
|
@@ -719,9 +719,9 @@
|
|
|
719
719
|
|
|
720
720
|
var defineProperty$b = objectDefineProperty$7.f;
|
|
721
721
|
var has$p = has$w;
|
|
722
|
-
var wellKnownSymbol$
|
|
722
|
+
var wellKnownSymbol$C = wellKnownSymbol$D;
|
|
723
723
|
|
|
724
|
-
var TO_STRING_TAG$b = wellKnownSymbol$
|
|
724
|
+
var TO_STRING_TAG$b = wellKnownSymbol$C('toStringTag');
|
|
725
725
|
|
|
726
726
|
var setToStringTag$c = function (it, TAG, STATIC) {
|
|
727
727
|
if (it && !has$p(it = STATIC ? it : it.prototype, TO_STRING_TAG$b)) {
|
|
@@ -731,17 +731,17 @@
|
|
|
731
731
|
|
|
732
732
|
var getBuiltIn$g = getBuiltIn$i;
|
|
733
733
|
var definePropertyModule$c = objectDefineProperty$7;
|
|
734
|
-
var wellKnownSymbol$
|
|
734
|
+
var wellKnownSymbol$B = wellKnownSymbol$D;
|
|
735
735
|
var DESCRIPTORS$h = descriptors$7;
|
|
736
736
|
|
|
737
|
-
var SPECIES$
|
|
737
|
+
var SPECIES$c = wellKnownSymbol$B('species');
|
|
738
738
|
|
|
739
739
|
var setSpecies$7 = function (CONSTRUCTOR_NAME) {
|
|
740
740
|
var Constructor = getBuiltIn$g(CONSTRUCTOR_NAME);
|
|
741
741
|
var defineProperty = definePropertyModule$c.f;
|
|
742
742
|
|
|
743
|
-
if (DESCRIPTORS$h && Constructor && !Constructor[SPECIES$
|
|
744
|
-
defineProperty(Constructor, SPECIES$
|
|
743
|
+
if (DESCRIPTORS$h && Constructor && !Constructor[SPECIES$c]) {
|
|
744
|
+
defineProperty(Constructor, SPECIES$c, {
|
|
745
745
|
configurable: true,
|
|
746
746
|
get: function () { return this; }
|
|
747
747
|
});
|
|
@@ -764,10 +764,10 @@
|
|
|
764
764
|
|
|
765
765
|
var iterators$6 = {};
|
|
766
766
|
|
|
767
|
-
var wellKnownSymbol$
|
|
767
|
+
var wellKnownSymbol$A = wellKnownSymbol$D;
|
|
768
768
|
var Iterators$b = iterators$6;
|
|
769
769
|
|
|
770
|
-
var ITERATOR$f = wellKnownSymbol$
|
|
770
|
+
var ITERATOR$f = wellKnownSymbol$A('iterator');
|
|
771
771
|
var ArrayPrototype$7 = Array.prototype;
|
|
772
772
|
|
|
773
773
|
// check on default Array iterator
|
|
@@ -800,9 +800,9 @@
|
|
|
800
800
|
};
|
|
801
801
|
};
|
|
802
802
|
|
|
803
|
-
var wellKnownSymbol$
|
|
803
|
+
var wellKnownSymbol$z = wellKnownSymbol$D;
|
|
804
804
|
|
|
805
|
-
var TO_STRING_TAG$a = wellKnownSymbol$
|
|
805
|
+
var TO_STRING_TAG$a = wellKnownSymbol$z('toStringTag');
|
|
806
806
|
var test$7 = {};
|
|
807
807
|
|
|
808
808
|
test$7[TO_STRING_TAG$a] = 'z';
|
|
@@ -811,9 +811,9 @@
|
|
|
811
811
|
|
|
812
812
|
var TO_STRING_TAG_SUPPORT$5 = toStringTagSupport$5;
|
|
813
813
|
var classofRaw$8 = classofRaw$9;
|
|
814
|
-
var wellKnownSymbol$
|
|
814
|
+
var wellKnownSymbol$y = wellKnownSymbol$D;
|
|
815
815
|
|
|
816
|
-
var TO_STRING_TAG$9 = wellKnownSymbol$
|
|
816
|
+
var TO_STRING_TAG$9 = wellKnownSymbol$y('toStringTag');
|
|
817
817
|
// ES3 wrong here
|
|
818
818
|
var CORRECT_ARGUMENTS$5 = classofRaw$8(function () { return arguments; }()) == 'Arguments';
|
|
819
819
|
|
|
@@ -838,9 +838,9 @@
|
|
|
838
838
|
|
|
839
839
|
var classof$l = classof$m;
|
|
840
840
|
var Iterators$a = iterators$6;
|
|
841
|
-
var wellKnownSymbol$
|
|
841
|
+
var wellKnownSymbol$x = wellKnownSymbol$D;
|
|
842
842
|
|
|
843
|
-
var ITERATOR$e = wellKnownSymbol$
|
|
843
|
+
var ITERATOR$e = wellKnownSymbol$x('iterator');
|
|
844
844
|
|
|
845
845
|
var getIteratorMethod$a = function (it) {
|
|
846
846
|
if (it != undefined) return it[ITERATOR$e]
|
|
@@ -864,8 +864,8 @@
|
|
|
864
864
|
|
|
865
865
|
var anObject$r = anObject$v;
|
|
866
866
|
var isArrayIteratorMethod$7 = isArrayIteratorMethod$8;
|
|
867
|
-
var toLength$
|
|
868
|
-
var bind$
|
|
867
|
+
var toLength$g = toLength$i;
|
|
868
|
+
var bind$d = functionBindContext$5;
|
|
869
869
|
var getIteratorMethod$9 = getIteratorMethod$a;
|
|
870
870
|
var callWithSafeIterationClosing$7 = callWithSafeIterationClosing$8;
|
|
871
871
|
|
|
@@ -875,7 +875,7 @@
|
|
|
875
875
|
};
|
|
876
876
|
|
|
877
877
|
var iterate$7 = iterate$8.exports = function (iterable, fn, that, AS_ENTRIES, IS_ITERATOR) {
|
|
878
|
-
var boundFunction = bind$
|
|
878
|
+
var boundFunction = bind$d(fn, that, AS_ENTRIES ? 2 : 1);
|
|
879
879
|
var iterator, iterFn, index, length, result, next, step;
|
|
880
880
|
|
|
881
881
|
if (IS_ITERATOR) {
|
|
@@ -885,7 +885,7 @@
|
|
|
885
885
|
if (typeof iterFn != 'function') throw TypeError('Target is not iterable');
|
|
886
886
|
// optimisation for array iterators
|
|
887
887
|
if (isArrayIteratorMethod$7(iterFn)) {
|
|
888
|
-
for (index = 0, length = toLength$
|
|
888
|
+
for (index = 0, length = toLength$g(iterable.length); length > index; index++) {
|
|
889
889
|
result = AS_ENTRIES
|
|
890
890
|
? boundFunction(anObject$r(step = iterable[index])[0], step[1])
|
|
891
891
|
: boundFunction(iterable[index]);
|
|
@@ -906,9 +906,9 @@
|
|
|
906
906
|
return new Result$4(true, result);
|
|
907
907
|
};
|
|
908
908
|
|
|
909
|
-
var wellKnownSymbol$
|
|
909
|
+
var wellKnownSymbol$w = wellKnownSymbol$D;
|
|
910
910
|
|
|
911
|
-
var ITERATOR$d = wellKnownSymbol$
|
|
911
|
+
var ITERATOR$d = wellKnownSymbol$w('iterator');
|
|
912
912
|
var SAFE_CLOSING$4 = false;
|
|
913
913
|
|
|
914
914
|
try {
|
|
@@ -947,16 +947,16 @@
|
|
|
947
947
|
|
|
948
948
|
var anObject$q = anObject$v;
|
|
949
949
|
var aFunction$h = aFunction$j;
|
|
950
|
-
var wellKnownSymbol$
|
|
950
|
+
var wellKnownSymbol$v = wellKnownSymbol$D;
|
|
951
951
|
|
|
952
|
-
var SPECIES$
|
|
952
|
+
var SPECIES$b = wellKnownSymbol$v('species');
|
|
953
953
|
|
|
954
954
|
// `SpeciesConstructor` abstract operation
|
|
955
955
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
956
956
|
var speciesConstructor$8 = function (O, defaultConstructor) {
|
|
957
957
|
var C = anObject$q(O).constructor;
|
|
958
958
|
var S;
|
|
959
|
-
return C === undefined || (S = anObject$q(C)[SPECIES$
|
|
959
|
+
return C === undefined || (S = anObject$q(C)[SPECIES$b]) == undefined ? defaultConstructor : aFunction$h(S);
|
|
960
960
|
};
|
|
961
961
|
|
|
962
962
|
var getBuiltIn$f = getBuiltIn$i;
|
|
@@ -974,7 +974,7 @@
|
|
|
974
974
|
var global$u = global$G;
|
|
975
975
|
var fails$q = fails$w;
|
|
976
976
|
var classof$k = classofRaw$9;
|
|
977
|
-
var bind$
|
|
977
|
+
var bind$c = functionBindContext$5;
|
|
978
978
|
var html$8 = html$9;
|
|
979
979
|
var createElement$8 = documentCreateElement$8;
|
|
980
980
|
var IS_IOS$6 = engineIsIos$4;
|
|
@@ -1046,7 +1046,7 @@
|
|
|
1046
1046
|
channel$4 = new MessageChannel$5();
|
|
1047
1047
|
port$4 = channel$4.port2;
|
|
1048
1048
|
channel$4.port1.onmessage = listener$4;
|
|
1049
|
-
defer$4 = bind$
|
|
1049
|
+
defer$4 = bind$c(port$4.postMessage, port$4, 1);
|
|
1050
1050
|
// Browsers with postMessage, skip WebWorkers
|
|
1051
1051
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
1052
1052
|
} else if (
|
|
@@ -1179,12 +1179,12 @@
|
|
|
1179
1179
|
};
|
|
1180
1180
|
|
|
1181
1181
|
var anObject$p = anObject$v;
|
|
1182
|
-
var isObject$
|
|
1182
|
+
var isObject$o = isObject$t;
|
|
1183
1183
|
var newPromiseCapability$7 = newPromiseCapability$8;
|
|
1184
1184
|
|
|
1185
1185
|
var promiseResolve$6 = function (C, x) {
|
|
1186
1186
|
anObject$p(C);
|
|
1187
|
-
if (isObject$
|
|
1187
|
+
if (isObject$o(x) && x.constructor === C) return x;
|
|
1188
1188
|
var promiseCapability = newPromiseCapability$7.f(C);
|
|
1189
1189
|
var resolve = promiseCapability.resolve;
|
|
1190
1190
|
resolve(x);
|
|
@@ -1229,7 +1229,7 @@
|
|
|
1229
1229
|
|
|
1230
1230
|
var engineV8Version$4 = version$a && +version$a;
|
|
1231
1231
|
|
|
1232
|
-
var $$
|
|
1232
|
+
var $$n = _export$7;
|
|
1233
1233
|
var global$q = global$G;
|
|
1234
1234
|
var getBuiltIn$d = getBuiltIn$i;
|
|
1235
1235
|
var NativePromise$4 = nativePromiseConstructor$4;
|
|
@@ -1237,7 +1237,7 @@
|
|
|
1237
1237
|
var redefineAll$7 = redefineAll$8;
|
|
1238
1238
|
var setToStringTag$b = setToStringTag$c;
|
|
1239
1239
|
var setSpecies$6 = setSpecies$7;
|
|
1240
|
-
var isObject$
|
|
1240
|
+
var isObject$n = isObject$t;
|
|
1241
1241
|
var aFunction$f = aFunction$j;
|
|
1242
1242
|
var anInstance$8 = anInstance$9;
|
|
1243
1243
|
var classof$i = classofRaw$9;
|
|
@@ -1253,10 +1253,10 @@
|
|
|
1253
1253
|
var perform$5 = perform$6;
|
|
1254
1254
|
var InternalStateModule$c = internalState$7;
|
|
1255
1255
|
var isForced$a = isForced_1$7;
|
|
1256
|
-
var wellKnownSymbol$
|
|
1256
|
+
var wellKnownSymbol$u = wellKnownSymbol$D;
|
|
1257
1257
|
var V8_VERSION$4 = engineV8Version$4;
|
|
1258
1258
|
|
|
1259
|
-
var SPECIES$
|
|
1259
|
+
var SPECIES$a = wellKnownSymbol$u('species');
|
|
1260
1260
|
var PROMISE$4 = 'Promise';
|
|
1261
1261
|
var getInternalState$a = InternalStateModule$c.get;
|
|
1262
1262
|
var setInternalState$b = InternalStateModule$c.set;
|
|
@@ -1299,7 +1299,7 @@
|
|
|
1299
1299
|
exec(function () { /* empty */ }, function () { /* empty */ });
|
|
1300
1300
|
};
|
|
1301
1301
|
var constructor = promise.constructor = {};
|
|
1302
|
-
constructor[SPECIES$
|
|
1302
|
+
constructor[SPECIES$a] = FakePromise;
|
|
1303
1303
|
return !(promise.then(function () { /* empty */ }) instanceof FakePromise);
|
|
1304
1304
|
});
|
|
1305
1305
|
|
|
@@ -1310,7 +1310,7 @@
|
|
|
1310
1310
|
// helpers
|
|
1311
1311
|
var isThenable$4 = function (it) {
|
|
1312
1312
|
var then;
|
|
1313
|
-
return isObject$
|
|
1313
|
+
return isObject$n(it) && typeof (then = it.then) == 'function' ? then : false;
|
|
1314
1314
|
};
|
|
1315
1315
|
|
|
1316
1316
|
var notify$5 = function (promise, state, isReject) {
|
|
@@ -1404,7 +1404,7 @@
|
|
|
1404
1404
|
});
|
|
1405
1405
|
};
|
|
1406
1406
|
|
|
1407
|
-
var bind$
|
|
1407
|
+
var bind$b = function (fn, promise, state, unwrap) {
|
|
1408
1408
|
return function (value) {
|
|
1409
1409
|
fn(promise, state, value, unwrap);
|
|
1410
1410
|
};
|
|
@@ -1431,8 +1431,8 @@
|
|
|
1431
1431
|
var wrapper = { done: false };
|
|
1432
1432
|
try {
|
|
1433
1433
|
then.call(value,
|
|
1434
|
-
bind$
|
|
1435
|
-
bind$
|
|
1434
|
+
bind$b(internalResolve$4, promise, wrapper, state),
|
|
1435
|
+
bind$b(internalReject$4, promise, wrapper, state)
|
|
1436
1436
|
);
|
|
1437
1437
|
} catch (error) {
|
|
1438
1438
|
internalReject$4(promise, wrapper, error, state);
|
|
@@ -1457,7 +1457,7 @@
|
|
|
1457
1457
|
Internal$4.call(this);
|
|
1458
1458
|
var state = getInternalState$a(this);
|
|
1459
1459
|
try {
|
|
1460
|
-
executor(bind$
|
|
1460
|
+
executor(bind$b(internalResolve$4, this, state), bind$b(internalReject$4, this, state));
|
|
1461
1461
|
} catch (error) {
|
|
1462
1462
|
internalReject$4(this, state, error);
|
|
1463
1463
|
}
|
|
@@ -1499,8 +1499,8 @@
|
|
|
1499
1499
|
var promise = new Internal$4();
|
|
1500
1500
|
var state = getInternalState$a(promise);
|
|
1501
1501
|
this.promise = promise;
|
|
1502
|
-
this.resolve = bind$
|
|
1503
|
-
this.reject = bind$
|
|
1502
|
+
this.resolve = bind$b(internalResolve$4, promise, state);
|
|
1503
|
+
this.reject = bind$b(internalReject$4, promise, state);
|
|
1504
1504
|
};
|
|
1505
1505
|
newPromiseCapabilityModule$4.f = newPromiseCapability$6 = function (C) {
|
|
1506
1506
|
return C === PromiseConstructor$4 || C === PromiseWrapper$4
|
|
@@ -1521,7 +1521,7 @@
|
|
|
1521
1521
|
}, { unsafe: true });
|
|
1522
1522
|
|
|
1523
1523
|
// wrap fetch result
|
|
1524
|
-
if (typeof $fetch$6 == 'function') $$
|
|
1524
|
+
if (typeof $fetch$6 == 'function') $$n({ global: true, enumerable: true, forced: true }, {
|
|
1525
1525
|
// eslint-disable-next-line no-unused-vars
|
|
1526
1526
|
fetch: function fetch(input /* , init */) {
|
|
1527
1527
|
return promiseResolve$5(PromiseConstructor$4, $fetch$6.apply(global$q, arguments));
|
|
@@ -1530,7 +1530,7 @@
|
|
|
1530
1530
|
}
|
|
1531
1531
|
}
|
|
1532
1532
|
|
|
1533
|
-
$$
|
|
1533
|
+
$$n({ global: true, wrap: true, forced: FORCED$9 }, {
|
|
1534
1534
|
Promise: PromiseConstructor$4
|
|
1535
1535
|
});
|
|
1536
1536
|
|
|
@@ -1540,7 +1540,7 @@
|
|
|
1540
1540
|
PromiseWrapper$4 = getBuiltIn$d(PROMISE$4);
|
|
1541
1541
|
|
|
1542
1542
|
// statics
|
|
1543
|
-
$$
|
|
1543
|
+
$$n({ target: PROMISE$4, stat: true, forced: FORCED$9 }, {
|
|
1544
1544
|
// `Promise.reject` method
|
|
1545
1545
|
// https://tc39.github.io/ecma262/#sec-promise.reject
|
|
1546
1546
|
reject: function reject(r) {
|
|
@@ -1550,7 +1550,7 @@
|
|
|
1550
1550
|
}
|
|
1551
1551
|
});
|
|
1552
1552
|
|
|
1553
|
-
$$
|
|
1553
|
+
$$n({ target: PROMISE$4, stat: true, forced: FORCED$9 }, {
|
|
1554
1554
|
// `Promise.resolve` method
|
|
1555
1555
|
// https://tc39.github.io/ecma262/#sec-promise.resolve
|
|
1556
1556
|
resolve: function resolve(x) {
|
|
@@ -1558,7 +1558,7 @@
|
|
|
1558
1558
|
}
|
|
1559
1559
|
});
|
|
1560
1560
|
|
|
1561
|
-
$$
|
|
1561
|
+
$$n({ target: PROMISE$4, stat: true, forced: INCORRECT_ITERATION$4 }, {
|
|
1562
1562
|
// `Promise.all` method
|
|
1563
1563
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
1564
1564
|
all: function all(iterable) {
|
|
@@ -14710,7 +14710,7 @@
|
|
|
14710
14710
|
var toObject$d = toObject$3$3;
|
|
14711
14711
|
var callWithSafeIterationClosing$6 = callWithSafeIterationClosing$1$4;
|
|
14712
14712
|
var isArrayIteratorMethod$6 = isArrayIteratorMethod$1$4;
|
|
14713
|
-
var toLength$
|
|
14713
|
+
var toLength$f = toLength$2$5;
|
|
14714
14714
|
var createProperty$2 = createProperty$1$1;
|
|
14715
14715
|
var getIteratorMethod$2$1 = getIteratorMethod$3$1; // `Array.from` method implementation
|
|
14716
14716
|
// https://tc39.github.io/ecma262/#sec-array.from
|
|
@@ -14738,7 +14738,7 @@
|
|
|
14738
14738
|
createProperty$2(result, index, value);
|
|
14739
14739
|
}
|
|
14740
14740
|
} else {
|
|
14741
|
-
length = toLength$
|
|
14741
|
+
length = toLength$f(O.length);
|
|
14742
14742
|
result = new C(length);
|
|
14743
14743
|
|
|
14744
14744
|
for (; length > index; index++) {
|
|
@@ -14973,18 +14973,18 @@
|
|
|
14973
14973
|
var InternalStateModule$1$5 = internalState$6;
|
|
14974
14974
|
var anInstance$1$4 = anInstance$2$1;
|
|
14975
14975
|
var hasOwn$4 = has$a$3;
|
|
14976
|
-
var bind$
|
|
14976
|
+
var bind$a = functionBindContext$4;
|
|
14977
14977
|
var classof$h = classof$2$5;
|
|
14978
14978
|
var anObject$o = anObject$8$5;
|
|
14979
|
-
var isObject$
|
|
14979
|
+
var isObject$m = isObject$6$5;
|
|
14980
14980
|
var create$8 = objectCreate$5;
|
|
14981
14981
|
var createPropertyDescriptor$b = createPropertyDescriptor$5$1;
|
|
14982
14982
|
var getIterator$2 = getIterator$1$1;
|
|
14983
14983
|
var getIteratorMethod$8 = getIteratorMethod$3$1;
|
|
14984
|
-
var wellKnownSymbol$
|
|
14984
|
+
var wellKnownSymbol$t = wellKnownSymbol$b$4;
|
|
14985
14985
|
var $fetch$5 = getBuiltIn$c('fetch');
|
|
14986
14986
|
var Headers$2 = getBuiltIn$c('Headers');
|
|
14987
|
-
var ITERATOR$c = wellKnownSymbol$
|
|
14987
|
+
var ITERATOR$c = wellKnownSymbol$t('iterator');
|
|
14988
14988
|
var URL_SEARCH_PARAMS$1 = 'URLSearchParams';
|
|
14989
14989
|
var URL_SEARCH_PARAMS_ITERATOR$1 = URL_SEARCH_PARAMS$1 + 'Iterator';
|
|
14990
14990
|
var setInternalState$1$3 = InternalStateModule$1$5.set;
|
|
@@ -15105,7 +15105,7 @@
|
|
|
15105
15105
|
});
|
|
15106
15106
|
|
|
15107
15107
|
if (init !== undefined) {
|
|
15108
|
-
if (isObject$
|
|
15108
|
+
if (isObject$m(init)) {
|
|
15109
15109
|
iteratorMethod = getIteratorMethod$8(init);
|
|
15110
15110
|
|
|
15111
15111
|
if (typeof iteratorMethod === 'function') {
|
|
@@ -15261,7 +15261,7 @@
|
|
|
15261
15261
|
/* , thisArg */
|
|
15262
15262
|
) {
|
|
15263
15263
|
var entries = getInternalParamsState$1(this).entries;
|
|
15264
|
-
var boundFunction = bind$
|
|
15264
|
+
var boundFunction = bind$a(callback, arguments.length > 1 ? arguments[1] : undefined, 3);
|
|
15265
15265
|
var index = 0;
|
|
15266
15266
|
var entry;
|
|
15267
15267
|
|
|
@@ -15328,7 +15328,7 @@
|
|
|
15328
15328
|
if (arguments.length > 1) {
|
|
15329
15329
|
init = arguments[1];
|
|
15330
15330
|
|
|
15331
|
-
if (isObject$
|
|
15331
|
+
if (isObject$m(init)) {
|
|
15332
15332
|
body = init.body;
|
|
15333
15333
|
|
|
15334
15334
|
if (classof$h(body) === URL_SEARCH_PARAMS$1) {
|
|
@@ -16560,11 +16560,11 @@
|
|
|
16560
16560
|
var S = trim$3(String(string));
|
|
16561
16561
|
return $parseInt$3(S, radix >>> 0 || (hex$3.test(S) ? 16 : 10));
|
|
16562
16562
|
} : $parseInt$3;
|
|
16563
|
-
var $$
|
|
16563
|
+
var $$m = _export$6;
|
|
16564
16564
|
var parseIntImplementation$3 = numberParseInt$3; // `parseInt` method
|
|
16565
16565
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
16566
16566
|
|
|
16567
|
-
$$
|
|
16567
|
+
$$m({
|
|
16568
16568
|
global: true,
|
|
16569
16569
|
forced: parseInt != parseIntImplementation$3
|
|
16570
16570
|
}, {
|
|
@@ -18591,7 +18591,7 @@
|
|
|
18591
18591
|
if (sham) createNonEnumerableProperty$e(RegExp.prototype[SYMBOL], 'sham', true);
|
|
18592
18592
|
};
|
|
18593
18593
|
|
|
18594
|
-
var isObject$
|
|
18594
|
+
var isObject$l = isObject$6$4;
|
|
18595
18595
|
var classof$1$5 = classofRaw$6;
|
|
18596
18596
|
var wellKnownSymbol$1$5 = wellKnownSymbol$8$4;
|
|
18597
18597
|
var MATCH$8 = wellKnownSymbol$1$5('match'); // `IsRegExp` abstract operation
|
|
@@ -18599,7 +18599,7 @@
|
|
|
18599
18599
|
|
|
18600
18600
|
var isRegexp$5 = function (it) {
|
|
18601
18601
|
var isRegExp;
|
|
18602
|
-
return isObject$
|
|
18602
|
+
return isObject$l(it) && ((isRegExp = it[MATCH$8]) !== undefined ? !!isRegExp : classof$1$5(it) == 'RegExp');
|
|
18603
18603
|
};
|
|
18604
18604
|
|
|
18605
18605
|
var aFunction$1$4 = function (it) {
|
|
@@ -18612,14 +18612,14 @@
|
|
|
18612
18612
|
|
|
18613
18613
|
var anObject$2$6 = anObject$9$3;
|
|
18614
18614
|
var aFunction$d = aFunction$1$4;
|
|
18615
|
-
var wellKnownSymbol$
|
|
18616
|
-
var SPECIES$
|
|
18615
|
+
var wellKnownSymbol$s = wellKnownSymbol$8$4;
|
|
18616
|
+
var SPECIES$9 = wellKnownSymbol$s('species'); // `SpeciesConstructor` abstract operation
|
|
18617
18617
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
18618
18618
|
|
|
18619
18619
|
var speciesConstructor$1$4 = function (O, defaultConstructor) {
|
|
18620
18620
|
var C = anObject$2$6(O).constructor;
|
|
18621
18621
|
var S;
|
|
18622
|
-
return C === undefined || (S = anObject$2$6(C)[SPECIES$
|
|
18622
|
+
return C === undefined || (S = anObject$2$6(C)[SPECIES$9]) == undefined ? defaultConstructor : aFunction$d(S);
|
|
18623
18623
|
};
|
|
18624
18624
|
|
|
18625
18625
|
var toInteger$1$5 = toInteger$4$4;
|
|
@@ -18833,7 +18833,7 @@
|
|
|
18833
18833
|
var fixRegExpWellKnownSymbolLogic$8 = fixRegexpWellKnownSymbolLogic$5;
|
|
18834
18834
|
var anObject$n = anObject$9$3;
|
|
18835
18835
|
var toObject$c = toObject$2$3;
|
|
18836
|
-
var toLength$
|
|
18836
|
+
var toLength$e = toLength$3$4;
|
|
18837
18837
|
var toInteger$a = toInteger$4$4;
|
|
18838
18838
|
var requireObjectCoercible$1$6 = requireObjectCoercible$6$3;
|
|
18839
18839
|
var advanceStringIndex$7 = advanceStringIndex$2$3;
|
|
@@ -18886,7 +18886,7 @@
|
|
|
18886
18886
|
results.push(result);
|
|
18887
18887
|
if (!global) break;
|
|
18888
18888
|
var matchStr = String(result[0]);
|
|
18889
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex$7(S, toLength$
|
|
18889
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex$7(S, toLength$e(rx.lastIndex), fullUnicode);
|
|
18890
18890
|
}
|
|
18891
18891
|
|
|
18892
18892
|
var accumulatedResult = '';
|
|
@@ -19013,11 +19013,11 @@
|
|
|
19013
19013
|
var S = trim$2(String(string));
|
|
19014
19014
|
return $parseInt$2(S, radix >>> 0 || (hex$2.test(S) ? 16 : 10));
|
|
19015
19015
|
} : $parseInt$2;
|
|
19016
|
-
var $$
|
|
19016
|
+
var $$l = _export$5;
|
|
19017
19017
|
var parseIntImplementation$2 = numberParseInt$2; // `parseInt` method
|
|
19018
19018
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
19019
19019
|
|
|
19020
|
-
$$
|
|
19020
|
+
$$l({
|
|
19021
19021
|
global: true,
|
|
19022
19022
|
forced: parseInt != parseIntImplementation$2
|
|
19023
19023
|
}, {
|
|
@@ -25247,7 +25247,7 @@
|
|
|
25247
25247
|
var hiddenKeys$3$4 = {};
|
|
25248
25248
|
var NATIVE_WEAK_MAP$4 = nativeWeakMap$4;
|
|
25249
25249
|
var global$6$4 = global$b$4;
|
|
25250
|
-
var isObject$
|
|
25250
|
+
var isObject$k = isObject$4$4;
|
|
25251
25251
|
var createNonEnumerableProperty$3$4 = createNonEnumerableProperty$5$3;
|
|
25252
25252
|
var objectHas$4 = has$6$4;
|
|
25253
25253
|
var sharedKey$7 = sharedKey$1$4;
|
|
@@ -25263,7 +25263,7 @@
|
|
|
25263
25263
|
return function (it) {
|
|
25264
25264
|
var state;
|
|
25265
25265
|
|
|
25266
|
-
if (!isObject$
|
|
25266
|
+
if (!isObject$k(it) || (state = get$6(it)).type !== TYPE) {
|
|
25267
25267
|
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
25268
25268
|
}
|
|
25269
25269
|
|
|
@@ -25388,13 +25388,13 @@
|
|
|
25388
25388
|
};
|
|
25389
25389
|
|
|
25390
25390
|
var toIndexedObject$1$4 = toIndexedObject$3$4;
|
|
25391
|
-
var toLength$
|
|
25391
|
+
var toLength$d = toLength$1$4;
|
|
25392
25392
|
var toAbsoluteIndex$5 = toAbsoluteIndex$1$4; // `Array.prototype.{ indexOf, includes }` methods implementation
|
|
25393
25393
|
|
|
25394
25394
|
var createMethod$8 = function (IS_INCLUDES) {
|
|
25395
25395
|
return function ($this, el, fromIndex) {
|
|
25396
25396
|
var O = toIndexedObject$1$4($this);
|
|
25397
|
-
var length = toLength$
|
|
25397
|
+
var length = toLength$d(O.length);
|
|
25398
25398
|
var index = toAbsoluteIndex$5(fromIndex, length);
|
|
25399
25399
|
var value; // Array#includes uses SameValueZero equality algorithm
|
|
25400
25400
|
// eslint-disable-next-line no-self-compare
|
|
@@ -25676,9 +25676,9 @@
|
|
|
25676
25676
|
}
|
|
25677
25677
|
|
|
25678
25678
|
var regexpExec$2$4 = patchedExec$4;
|
|
25679
|
-
var $$
|
|
25679
|
+
var $$k = _export$4;
|
|
25680
25680
|
var exec$4 = regexpExec$2$4;
|
|
25681
|
-
$$
|
|
25681
|
+
$$k({
|
|
25682
25682
|
target: 'RegExp',
|
|
25683
25683
|
proto: true,
|
|
25684
25684
|
forced: /./.exec !== exec$4
|
|
@@ -25716,10 +25716,10 @@
|
|
|
25716
25716
|
|
|
25717
25717
|
var redefine$e = redefine$2$4.exports;
|
|
25718
25718
|
var fails$n = fails$7$4;
|
|
25719
|
-
var wellKnownSymbol$
|
|
25719
|
+
var wellKnownSymbol$r = wellKnownSymbol$1$4;
|
|
25720
25720
|
var regexpExec$1$4 = regexpExec$2$4;
|
|
25721
25721
|
var createNonEnumerableProperty$d = createNonEnumerableProperty$5$3;
|
|
25722
|
-
var SPECIES$
|
|
25722
|
+
var SPECIES$8 = wellKnownSymbol$r('species');
|
|
25723
25723
|
var REPLACE_SUPPORTS_NAMED_GROUPS$4 = !fails$n(function () {
|
|
25724
25724
|
// #replace needs built-in support for named groups.
|
|
25725
25725
|
// #match works fine because it just return the exec results, even if it has
|
|
@@ -25742,7 +25742,7 @@
|
|
|
25742
25742
|
return 'a'.replace(/./, '$0') === '$0';
|
|
25743
25743
|
}();
|
|
25744
25744
|
|
|
25745
|
-
var REPLACE$5 = wellKnownSymbol$
|
|
25745
|
+
var REPLACE$5 = wellKnownSymbol$r('replace'); // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
25746
25746
|
|
|
25747
25747
|
var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE$4 = function () {
|
|
25748
25748
|
if (/./[REPLACE$5]) {
|
|
@@ -25767,7 +25767,7 @@
|
|
|
25767
25767
|
});
|
|
25768
25768
|
|
|
25769
25769
|
var fixRegexpWellKnownSymbolLogic$4 = function (KEY, length, exec, sham) {
|
|
25770
|
-
var SYMBOL = wellKnownSymbol$
|
|
25770
|
+
var SYMBOL = wellKnownSymbol$r(KEY);
|
|
25771
25771
|
var DELEGATES_TO_SYMBOL = !fails$n(function () {
|
|
25772
25772
|
// String methods call symbol-named RegEp methods
|
|
25773
25773
|
var O = {};
|
|
@@ -25792,7 +25792,7 @@
|
|
|
25792
25792
|
|
|
25793
25793
|
re.constructor = {};
|
|
25794
25794
|
|
|
25795
|
-
re.constructor[SPECIES$
|
|
25795
|
+
re.constructor[SPECIES$8] = function () {
|
|
25796
25796
|
return re;
|
|
25797
25797
|
};
|
|
25798
25798
|
|
|
@@ -38433,13 +38433,13 @@
|
|
|
38433
38433
|
}
|
|
38434
38434
|
isString$3.default = isString$2;
|
|
38435
38435
|
|
|
38436
|
-
var isObject$
|
|
38436
|
+
var isObject$j = {};
|
|
38437
38437
|
|
|
38438
|
-
Object.defineProperty(isObject$
|
|
38439
|
-
function isObject$
|
|
38438
|
+
Object.defineProperty(isObject$j, "__esModule", { value: true });
|
|
38439
|
+
function isObject$i(value) {
|
|
38440
38440
|
return ((value !== null) && (typeof value === 'object'));
|
|
38441
38441
|
}
|
|
38442
|
-
isObject$
|
|
38442
|
+
isObject$j.default = isObject$i;
|
|
38443
38443
|
|
|
38444
38444
|
var printer = {};
|
|
38445
38445
|
|
|
@@ -39876,7 +39876,7 @@
|
|
|
39876
39876
|
var Backoff = backo2;
|
|
39877
39877
|
var eventemitter3_1 = eventemitter3.exports;
|
|
39878
39878
|
var is_string_1 = isString$3;
|
|
39879
|
-
var is_object_1 = isObject$
|
|
39879
|
+
var is_object_1 = isObject$j;
|
|
39880
39880
|
var printer_1 = printer;
|
|
39881
39881
|
var getOperationAST_1 = getOperationAST$1;
|
|
39882
39882
|
var symbol_observable_1 = require$$6$1;
|
|
@@ -42556,19 +42556,19 @@
|
|
|
42556
42556
|
var classof$e = classofRaw$1$3; // `IsArray` abstract operation
|
|
42557
42557
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
42558
42558
|
|
|
42559
|
-
var isArray$2$
|
|
42559
|
+
var isArray$2$2 = Array.isArray || function isArray(arg) {
|
|
42560
42560
|
return classof$e(arg) == 'Array';
|
|
42561
42561
|
};
|
|
42562
42562
|
|
|
42563
|
-
var isArray$1$3 = isArray$2$
|
|
42563
|
+
var isArray$1$3 = isArray$2$2;
|
|
42564
42564
|
var toLength$1$3 = toLength$5$3;
|
|
42565
|
-
var bind$
|
|
42565
|
+
var bind$9 = functionBindContext$3; // `FlattenIntoArray` abstract operation
|
|
42566
42566
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
42567
42567
|
|
|
42568
|
-
var flattenIntoArray$1$
|
|
42568
|
+
var flattenIntoArray$1$2 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
42569
42569
|
var targetIndex = start;
|
|
42570
42570
|
var sourceIndex = 0;
|
|
42571
|
-
var mapFn = mapper ? bind$
|
|
42571
|
+
var mapFn = mapper ? bind$9(mapper, thisArg, 3) : false;
|
|
42572
42572
|
var element;
|
|
42573
42573
|
|
|
42574
42574
|
while (sourceIndex < sourceLen) {
|
|
@@ -42576,7 +42576,7 @@
|
|
|
42576
42576
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
42577
42577
|
|
|
42578
42578
|
if (depth > 0 && isArray$1$3(element)) {
|
|
42579
|
-
targetIndex = flattenIntoArray$1$
|
|
42579
|
+
targetIndex = flattenIntoArray$1$2(target, original, element, toLength$1$3(element.length), targetIndex, depth - 1) - 1;
|
|
42580
42580
|
} else {
|
|
42581
42581
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
42582
42582
|
target[targetIndex] = element;
|
|
@@ -42591,7 +42591,7 @@
|
|
|
42591
42591
|
return targetIndex;
|
|
42592
42592
|
};
|
|
42593
42593
|
|
|
42594
|
-
var flattenIntoArray_1$
|
|
42594
|
+
var flattenIntoArray_1$2 = flattenIntoArray$1$2;
|
|
42595
42595
|
var requireObjectCoercible$g = requireObjectCoercible$4$3; // `ToObject` abstract operation
|
|
42596
42596
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
42597
42597
|
|
|
@@ -42599,20 +42599,20 @@
|
|
|
42599
42599
|
return Object(requireObjectCoercible$g(argument));
|
|
42600
42600
|
};
|
|
42601
42601
|
|
|
42602
|
-
var isObject$
|
|
42603
|
-
var isArray$b = isArray$2$
|
|
42602
|
+
var isObject$h = isObject$8$3;
|
|
42603
|
+
var isArray$b = isArray$2$2;
|
|
42604
42604
|
var wellKnownSymbol$1$3 = wellKnownSymbol$d$3;
|
|
42605
|
-
var SPECIES$
|
|
42605
|
+
var SPECIES$7 = wellKnownSymbol$1$3('species'); // `ArraySpeciesCreate` abstract operation
|
|
42606
42606
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
42607
42607
|
|
|
42608
|
-
var arraySpeciesCreate$1$
|
|
42608
|
+
var arraySpeciesCreate$1$2 = function (originalArray, length) {
|
|
42609
42609
|
var C;
|
|
42610
42610
|
|
|
42611
42611
|
if (isArray$b(originalArray)) {
|
|
42612
42612
|
C = originalArray.constructor; // cross-realm fallback
|
|
42613
42613
|
|
|
42614
|
-
if (typeof C == 'function' && (C === Array || isArray$b(C.prototype))) C = undefined;else if (isObject$
|
|
42615
|
-
C = C[SPECIES$
|
|
42614
|
+
if (typeof C == 'function' && (C === Array || isArray$b(C.prototype))) C = undefined;else if (isObject$h(C)) {
|
|
42615
|
+
C = C[SPECIES$7];
|
|
42616
42616
|
if (C === null) C = undefined;
|
|
42617
42617
|
}
|
|
42618
42618
|
}
|
|
@@ -42620,15 +42620,15 @@
|
|
|
42620
42620
|
return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
42621
42621
|
};
|
|
42622
42622
|
|
|
42623
|
-
var $$
|
|
42624
|
-
var flattenIntoArray$
|
|
42623
|
+
var $$j = _export$3;
|
|
42624
|
+
var flattenIntoArray$3 = flattenIntoArray_1$2;
|
|
42625
42625
|
var toObject$b = toObject$1$3;
|
|
42626
|
-
var toLength$
|
|
42626
|
+
var toLength$c = toLength$5$3;
|
|
42627
42627
|
var aFunction$b = aFunction$5$3;
|
|
42628
|
-
var arraySpeciesCreate$
|
|
42628
|
+
var arraySpeciesCreate$3 = arraySpeciesCreate$1$2; // `Array.prototype.flatMap` method
|
|
42629
42629
|
// https://github.com/tc39/proposal-flatMap
|
|
42630
42630
|
|
|
42631
|
-
$$
|
|
42631
|
+
$$j({
|
|
42632
42632
|
target: 'Array',
|
|
42633
42633
|
proto: true
|
|
42634
42634
|
}, {
|
|
@@ -42636,11 +42636,11 @@
|
|
|
42636
42636
|
/* , thisArg */
|
|
42637
42637
|
) {
|
|
42638
42638
|
var O = toObject$b(this);
|
|
42639
|
-
var sourceLen = toLength$
|
|
42639
|
+
var sourceLen = toLength$c(O.length);
|
|
42640
42640
|
var A;
|
|
42641
42641
|
aFunction$b(callbackfn);
|
|
42642
|
-
A = arraySpeciesCreate$
|
|
42643
|
-
A.length = flattenIntoArray$
|
|
42642
|
+
A = arraySpeciesCreate$3(O, 0);
|
|
42643
|
+
A.length = flattenIntoArray$3(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
42644
42644
|
return A;
|
|
42645
42645
|
}
|
|
42646
42646
|
});
|
|
@@ -42757,10 +42757,10 @@
|
|
|
42757
42757
|
return Properties === undefined ? result : defineProperties$4(result, Properties);
|
|
42758
42758
|
};
|
|
42759
42759
|
|
|
42760
|
-
var wellKnownSymbol$
|
|
42760
|
+
var wellKnownSymbol$q = wellKnownSymbol$d$3;
|
|
42761
42761
|
var create$6 = objectCreate$3;
|
|
42762
42762
|
var definePropertyModule$8 = objectDefineProperty$3;
|
|
42763
|
-
var UNSCOPABLES$3 = wellKnownSymbol$
|
|
42763
|
+
var UNSCOPABLES$3 = wellKnownSymbol$q('unscopables');
|
|
42764
42764
|
var ArrayPrototype$4 = Array.prototype; // Array.prototype[@@unscopables]
|
|
42765
42765
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
42766
42766
|
|
|
@@ -42981,7 +42981,7 @@
|
|
|
42981
42981
|
var isArray$a = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();
|
|
42982
42982
|
|
|
42983
42983
|
/** PURE_IMPORTS_START PURE_IMPORTS_END */
|
|
42984
|
-
function isObject$
|
|
42984
|
+
function isObject$g(x) {
|
|
42985
42985
|
return x !== null && typeof x === 'object';
|
|
42986
42986
|
}
|
|
42987
42987
|
|
|
@@ -43041,7 +43041,7 @@
|
|
|
43041
43041
|
var len = _subscriptions.length;
|
|
43042
43042
|
while (++index < len) {
|
|
43043
43043
|
var sub = _subscriptions[index];
|
|
43044
|
-
if (isObject$
|
|
43044
|
+
if (isObject$g(sub)) {
|
|
43045
43045
|
try {
|
|
43046
43046
|
sub.unsubscribe();
|
|
43047
43047
|
}
|
|
@@ -44285,7 +44285,7 @@
|
|
|
44285
44285
|
return subscribeToIterable(result);
|
|
44286
44286
|
}
|
|
44287
44287
|
else {
|
|
44288
|
-
var value = isObject$
|
|
44288
|
+
var value = isObject$g(result) ? 'an invalid object' : "'" + result + "'";
|
|
44289
44289
|
var msg = "You provided " + value + " where a stream was expected."
|
|
44290
44290
|
+ ' You can provide an Observable, Promise, Array, or Iterable.';
|
|
44291
44291
|
throw new TypeError(msg);
|
|
@@ -44550,7 +44550,7 @@
|
|
|
44550
44550
|
if (isArray$a(first_1)) {
|
|
44551
44551
|
return forkJoinInternal(first_1, null);
|
|
44552
44552
|
}
|
|
44553
|
-
if (isObject$
|
|
44553
|
+
if (isObject$g(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {
|
|
44554
44554
|
var keys = Object.keys(first_1);
|
|
44555
44555
|
return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);
|
|
44556
44556
|
}
|
|
@@ -48871,12 +48871,12 @@
|
|
|
48871
48871
|
var path$3 = path$1$2;
|
|
48872
48872
|
var global$b$2 = global$j$2;
|
|
48873
48873
|
|
|
48874
|
-
var aFunction$8$
|
|
48874
|
+
var aFunction$8$1 = function (variable) {
|
|
48875
48875
|
return typeof variable == 'function' ? variable : undefined;
|
|
48876
48876
|
};
|
|
48877
48877
|
|
|
48878
48878
|
var getBuiltIn$5$2 = function (namespace, method) {
|
|
48879
|
-
return arguments.length < 2 ? aFunction$8$
|
|
48879
|
+
return arguments.length < 2 ? aFunction$8$1(path$3[namespace]) || aFunction$8$1(global$b$2[namespace]) : path$3[namespace] && path$3[namespace][method] || global$b$2[namespace] && global$b$2[namespace][method];
|
|
48880
48880
|
};
|
|
48881
48881
|
|
|
48882
48882
|
var objectGetOwnPropertyNames$2 = {};
|
|
@@ -51909,7 +51909,7 @@
|
|
|
51909
51909
|
} // add a key to Array.prototype[@@unscopables]
|
|
51910
51910
|
|
|
51911
51911
|
|
|
51912
|
-
var addToUnscopables$2$
|
|
51912
|
+
var addToUnscopables$2$1 = function (key) {
|
|
51913
51913
|
ArrayPrototype$3[UNSCOPABLES$2][key] = true;
|
|
51914
51914
|
};
|
|
51915
51915
|
|
|
@@ -52143,7 +52143,7 @@
|
|
|
52143
52143
|
};
|
|
52144
52144
|
|
|
52145
52145
|
var toIndexedObject$6 = toIndexedObject$4$2;
|
|
52146
|
-
var addToUnscopables$1$2 = addToUnscopables$2$
|
|
52146
|
+
var addToUnscopables$1$2 = addToUnscopables$2$1;
|
|
52147
52147
|
var Iterators$6 = iterators$2;
|
|
52148
52148
|
var InternalStateModule$7 = internalState$2;
|
|
52149
52149
|
var defineIterator$4 = defineIterator$1$2;
|
|
@@ -53355,27 +53355,27 @@
|
|
|
53355
53355
|
var classof$d = classofRaw$1$2; // `IsArray` abstract operation
|
|
53356
53356
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
53357
53357
|
|
|
53358
|
-
var isArray$3$
|
|
53358
|
+
var isArray$3$1 = Array.isArray || function isArray(arg) {
|
|
53359
53359
|
return classof$d(arg) == 'Array';
|
|
53360
53360
|
};
|
|
53361
53361
|
|
|
53362
|
-
var isArray$2$
|
|
53362
|
+
var isArray$2$1 = isArray$3$1;
|
|
53363
53363
|
var toLength$3$2 = toLength$a$1;
|
|
53364
|
-
var bind$
|
|
53364
|
+
var bind$8 = functionBindContext$2; // `FlattenIntoArray` abstract operation
|
|
53365
53365
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
53366
53366
|
|
|
53367
|
-
var flattenIntoArray$1$
|
|
53367
|
+
var flattenIntoArray$1$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
53368
53368
|
var targetIndex = start;
|
|
53369
53369
|
var sourceIndex = 0;
|
|
53370
|
-
var mapFn = mapper ? bind$
|
|
53370
|
+
var mapFn = mapper ? bind$8(mapper, thisArg, 3) : false;
|
|
53371
53371
|
var element;
|
|
53372
53372
|
|
|
53373
53373
|
while (sourceIndex < sourceLen) {
|
|
53374
53374
|
if (sourceIndex in source) {
|
|
53375
53375
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
53376
53376
|
|
|
53377
|
-
if (depth > 0 && isArray$2$
|
|
53378
|
-
targetIndex = flattenIntoArray$1$
|
|
53377
|
+
if (depth > 0 && isArray$2$1(element)) {
|
|
53378
|
+
targetIndex = flattenIntoArray$1$1(target, original, element, toLength$3$2(element.length), targetIndex, depth - 1) - 1;
|
|
53379
53379
|
} else {
|
|
53380
53380
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
53381
53381
|
target[targetIndex] = element;
|
|
@@ -53390,21 +53390,21 @@
|
|
|
53390
53390
|
return targetIndex;
|
|
53391
53391
|
};
|
|
53392
53392
|
|
|
53393
|
-
var flattenIntoArray_1$
|
|
53394
|
-
var isObject$
|
|
53395
|
-
var isArray$1$2 = isArray$3$
|
|
53396
|
-
var wellKnownSymbol$
|
|
53397
|
-
var SPECIES$
|
|
53393
|
+
var flattenIntoArray_1$1 = flattenIntoArray$1$1;
|
|
53394
|
+
var isObject$f = isObject$9$2;
|
|
53395
|
+
var isArray$1$2 = isArray$3$1;
|
|
53396
|
+
var wellKnownSymbol$p = wellKnownSymbol$h$2;
|
|
53397
|
+
var SPECIES$6 = wellKnownSymbol$p('species'); // `ArraySpeciesCreate` abstract operation
|
|
53398
53398
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
53399
53399
|
|
|
53400
|
-
var arraySpeciesCreate$1$
|
|
53400
|
+
var arraySpeciesCreate$1$1 = function (originalArray, length) {
|
|
53401
53401
|
var C;
|
|
53402
53402
|
|
|
53403
53403
|
if (isArray$1$2(originalArray)) {
|
|
53404
53404
|
C = originalArray.constructor; // cross-realm fallback
|
|
53405
53405
|
|
|
53406
|
-
if (typeof C == 'function' && (C === Array || isArray$1$2(C.prototype))) C = undefined;else if (isObject$
|
|
53407
|
-
C = C[SPECIES$
|
|
53406
|
+
if (typeof C == 'function' && (C === Array || isArray$1$2(C.prototype))) C = undefined;else if (isObject$f(C)) {
|
|
53407
|
+
C = C[SPECIES$6];
|
|
53408
53408
|
if (C === null) C = undefined;
|
|
53409
53409
|
}
|
|
53410
53410
|
}
|
|
@@ -53413,11 +53413,11 @@
|
|
|
53413
53413
|
};
|
|
53414
53414
|
|
|
53415
53415
|
var $$5$2 = _export$2;
|
|
53416
|
-
var flattenIntoArray$
|
|
53416
|
+
var flattenIntoArray$2 = flattenIntoArray_1$1;
|
|
53417
53417
|
var toObject$2$2 = toObject$6$2;
|
|
53418
53418
|
var toLength$2$2 = toLength$a$1;
|
|
53419
53419
|
var aFunction$1$2 = aFunction$7$2;
|
|
53420
|
-
var arraySpeciesCreate$
|
|
53420
|
+
var arraySpeciesCreate$2 = arraySpeciesCreate$1$1; // `Array.prototype.flatMap` method
|
|
53421
53421
|
// https://github.com/tc39/proposal-flatMap
|
|
53422
53422
|
|
|
53423
53423
|
$$5$2({
|
|
@@ -53431,14 +53431,14 @@
|
|
|
53431
53431
|
var sourceLen = toLength$2$2(O.length);
|
|
53432
53432
|
var A;
|
|
53433
53433
|
aFunction$1$2(callbackfn);
|
|
53434
|
-
A = arraySpeciesCreate$
|
|
53435
|
-
A.length = flattenIntoArray$
|
|
53434
|
+
A = arraySpeciesCreate$2(O, 0);
|
|
53435
|
+
A.length = flattenIntoArray$2(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
53436
53436
|
return A;
|
|
53437
53437
|
}
|
|
53438
53438
|
}); // this method was added to unscopables after implementation
|
|
53439
53439
|
// in popular engines, so it's moved to a separate module
|
|
53440
53440
|
|
|
53441
|
-
var addToUnscopables$4 = addToUnscopables$2$
|
|
53441
|
+
var addToUnscopables$4 = addToUnscopables$2$1;
|
|
53442
53442
|
addToUnscopables$4('flatMap'); // `SameValue` abstract operation
|
|
53443
53443
|
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
53444
53444
|
|
|
@@ -53854,7 +53854,7 @@
|
|
|
53854
53854
|
var requireObjectCoercible$f = requireObjectCoercible$b$1;
|
|
53855
53855
|
var speciesConstructor$4 = speciesConstructor$2$2;
|
|
53856
53856
|
var advanceStringIndex$6 = advanceStringIndex$3$1;
|
|
53857
|
-
var toLength$
|
|
53857
|
+
var toLength$b = toLength$a$1;
|
|
53858
53858
|
var callRegExpExec$2 = regexpExecAbstract$3;
|
|
53859
53859
|
var regexpExec$6 = regexpExec$3$2;
|
|
53860
53860
|
var fails$3$3 = fails$g$2;
|
|
@@ -53949,7 +53949,7 @@
|
|
|
53949
53949
|
var z = callRegExpExec$2(splitter, SUPPORTS_Y$2 ? S : S.slice(q));
|
|
53950
53950
|
var e;
|
|
53951
53951
|
|
|
53952
|
-
if (z === null || (e = min$6(toLength$
|
|
53952
|
+
if (z === null || (e = min$6(toLength$b(splitter.lastIndex + (SUPPORTS_Y$2 ? 0 : q)), S.length)) === p) {
|
|
53953
53953
|
q = advanceStringIndex$6(S, q, unicodeMatching);
|
|
53954
53954
|
} else {
|
|
53955
53955
|
A.push(S.slice(p, q));
|
|
@@ -55228,15 +55228,15 @@
|
|
|
55228
55228
|
return comparefn === undefined ? nativeSort$2.call(toObject$9(this)) : nativeSort$2.call(toObject$9(this), aFunction$a(comparefn));
|
|
55229
55229
|
}
|
|
55230
55230
|
});
|
|
55231
|
-
var $$
|
|
55232
|
-
var isArray$9 = isArray$3$
|
|
55231
|
+
var $$i = _export$2;
|
|
55232
|
+
var isArray$9 = isArray$3$1;
|
|
55233
55233
|
var nativeReverse$1 = [].reverse;
|
|
55234
55234
|
var test$4 = [1, 2]; // `Array.prototype.reverse` method
|
|
55235
55235
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
|
|
55236
55236
|
// fix for Safari 12.0 bug
|
|
55237
55237
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
55238
55238
|
|
|
55239
|
-
$$
|
|
55239
|
+
$$i({
|
|
55240
55240
|
target: 'Array',
|
|
55241
55241
|
proto: true,
|
|
55242
55242
|
forced: String(test$4) === String(test$4.reverse())
|
|
@@ -65609,9 +65609,9 @@
|
|
|
65609
65609
|
|
|
65610
65610
|
var functionBind = Function.prototype.bind || implementation;
|
|
65611
65611
|
|
|
65612
|
-
var bind$
|
|
65612
|
+
var bind$7 = functionBind;
|
|
65613
65613
|
|
|
65614
|
-
var src = bind$
|
|
65614
|
+
var src = bind$7.call(Function.call, Object.prototype.hasOwnProperty);
|
|
65615
65615
|
|
|
65616
65616
|
var undefined$1;
|
|
65617
65617
|
|
|
@@ -65809,12 +65809,12 @@
|
|
|
65809
65809
|
'%WeakSetPrototype%': ['WeakSet', 'prototype']
|
|
65810
65810
|
};
|
|
65811
65811
|
|
|
65812
|
-
var bind$
|
|
65812
|
+
var bind$6 = functionBind;
|
|
65813
65813
|
var hasOwn$2 = src;
|
|
65814
|
-
var $concat = bind$
|
|
65815
|
-
var $spliceApply = bind$
|
|
65816
|
-
var $replace = bind$
|
|
65817
|
-
var $strSlice = bind$
|
|
65814
|
+
var $concat = bind$6.call(Function.call, Array.prototype.concat);
|
|
65815
|
+
var $spliceApply = bind$6.call(Function.apply, Array.prototype.splice);
|
|
65816
|
+
var $replace = bind$6.call(Function.call, String.prototype.replace);
|
|
65817
|
+
var $strSlice = bind$6.call(Function.call, String.prototype.slice);
|
|
65818
65818
|
|
|
65819
65819
|
/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
|
|
65820
65820
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
@@ -77293,12 +77293,12 @@
|
|
|
77293
77293
|
var path$2 = path$1$1;
|
|
77294
77294
|
var global$b$1 = global$j$1;
|
|
77295
77295
|
|
|
77296
|
-
var aFunction$8
|
|
77296
|
+
var aFunction$8 = function (variable) {
|
|
77297
77297
|
return typeof variable == 'function' ? variable : undefined;
|
|
77298
77298
|
};
|
|
77299
77299
|
|
|
77300
77300
|
var getBuiltIn$5$1 = function (namespace, method) {
|
|
77301
|
-
return arguments.length < 2 ? aFunction$8
|
|
77301
|
+
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];
|
|
77302
77302
|
};
|
|
77303
77303
|
|
|
77304
77304
|
var objectGetOwnPropertyNames$1 = {};
|
|
@@ -77509,12 +77509,12 @@
|
|
|
77509
77509
|
var requireObjectCoercible$7$1 = requireObjectCoercible$9$1; // `ToObject` abstract operation
|
|
77510
77510
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
77511
77511
|
|
|
77512
|
-
var toObject$7
|
|
77512
|
+
var toObject$7 = function (argument) {
|
|
77513
77513
|
return Object(requireObjectCoercible$7$1(argument));
|
|
77514
77514
|
};
|
|
77515
77515
|
|
|
77516
77516
|
var aFunction$6$1 = aFunction$7$1;
|
|
77517
|
-
var toObject$6$1 = toObject$7
|
|
77517
|
+
var toObject$6$1 = toObject$7;
|
|
77518
77518
|
var IndexedObject$1$1 = indexedObject$1;
|
|
77519
77519
|
var toLength$6$1 = toLength$8$1; // `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
77520
77520
|
|
|
@@ -77632,7 +77632,7 @@
|
|
|
77632
77632
|
var objectKeys$1$1 = objectKeys$2$1;
|
|
77633
77633
|
var getOwnPropertySymbolsModule$2 = objectGetOwnPropertySymbols$1;
|
|
77634
77634
|
var propertyIsEnumerableModule$2 = objectPropertyIsEnumerable$1;
|
|
77635
|
-
var toObject$5$1 = toObject$7
|
|
77635
|
+
var toObject$5$1 = toObject$7;
|
|
77636
77636
|
var IndexedObject$3 = indexedObject$1;
|
|
77637
77637
|
var nativeAssign$1 = Object.assign;
|
|
77638
77638
|
var defineProperty$2$1 = Object.defineProperty; // `Object.assign` method
|
|
@@ -77907,7 +77907,7 @@
|
|
|
77907
77907
|
} // add a key to Array.prototype[@@unscopables]
|
|
77908
77908
|
|
|
77909
77909
|
|
|
77910
|
-
var addToUnscopables$2
|
|
77910
|
+
var addToUnscopables$2 = function (key) {
|
|
77911
77911
|
ArrayPrototype$1$1[UNSCOPABLES$1][key] = true;
|
|
77912
77912
|
};
|
|
77913
77913
|
|
|
@@ -77922,7 +77922,7 @@
|
|
|
77922
77922
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
77923
77923
|
});
|
|
77924
77924
|
var has$4$1 = has$c$1;
|
|
77925
|
-
var toObject$4$1 = toObject$7
|
|
77925
|
+
var toObject$4$1 = toObject$7;
|
|
77926
77926
|
var sharedKey$4 = sharedKey$3$1;
|
|
77927
77927
|
var CORRECT_PROTOTYPE_GETTER$1 = correctPrototypeGetter$1;
|
|
77928
77928
|
var IE_PROTO$2 = sharedKey$4('IE_PROTO');
|
|
@@ -78156,7 +78156,7 @@
|
|
|
78156
78156
|
};
|
|
78157
78157
|
|
|
78158
78158
|
var toIndexedObject$5 = toIndexedObject$4$1;
|
|
78159
|
-
var addToUnscopables$1$1 = addToUnscopables$2
|
|
78159
|
+
var addToUnscopables$1$1 = addToUnscopables$2;
|
|
78160
78160
|
var Iterators$2$1 = iterators$1;
|
|
78161
78161
|
var InternalStateModule$1$1 = internalState$1;
|
|
78162
78162
|
var defineIterator$3 = defineIterator$1$1;
|
|
@@ -78695,7 +78695,7 @@
|
|
|
78695
78695
|
}
|
|
78696
78696
|
|
|
78697
78697
|
function prepareEmptyInputFocusItems(accounts) {
|
|
78698
|
-
if (isArray$3
|
|
78698
|
+
if (isArray$3(accounts)) {
|
|
78699
78699
|
return excludeSelectedItems(accounts).map(toPersona);
|
|
78700
78700
|
}
|
|
78701
78701
|
|
|
@@ -78804,7 +78804,7 @@
|
|
|
78804
78804
|
return a.userPrincipalName === b.userPrincipalName;
|
|
78805
78805
|
}
|
|
78806
78806
|
|
|
78807
|
-
function isArray$3
|
|
78807
|
+
function isArray$3(accounts) {
|
|
78808
78808
|
return typeof accounts.length !== 'undefined';
|
|
78809
78809
|
}
|
|
78810
78810
|
|
|
@@ -79368,7 +79368,7 @@
|
|
|
79368
79368
|
|
|
79369
79369
|
var fixRegExpWellKnownSymbolLogic$1$1 = fixRegexpWellKnownSymbolLogic$2;
|
|
79370
79370
|
var anObject$5$1 = anObject$e$1;
|
|
79371
|
-
var toObject$3$1 = toObject$7
|
|
79371
|
+
var toObject$3$1 = toObject$7;
|
|
79372
79372
|
var toLength$4$1 = toLength$8$1;
|
|
79373
79373
|
var toInteger$6 = toInteger$4$1;
|
|
79374
79374
|
var requireObjectCoercible$2$2 = requireObjectCoercible$9$1;
|
|
@@ -80987,7 +80987,7 @@
|
|
|
80987
80987
|
|
|
80988
80988
|
var $$2$1 = _export$1;
|
|
80989
80989
|
var aFunction$1$1 = aFunction$7$1;
|
|
80990
|
-
var toObject$2$1 = toObject$7
|
|
80990
|
+
var toObject$2$1 = toObject$7;
|
|
80991
80991
|
var fails$2$2 = fails$h$1;
|
|
80992
80992
|
var arrayMethodIsStrict$3 = arrayMethodIsStrict$2$1;
|
|
80993
80993
|
var test$3 = [];
|
|
@@ -84480,19 +84480,19 @@
|
|
|
84480
84480
|
var classof$c = classofRaw$1$1; // `IsArray` abstract operation
|
|
84481
84481
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
84482
84482
|
|
|
84483
|
-
var isArray$2
|
|
84483
|
+
var isArray$2 = Array.isArray || function isArray(arg) {
|
|
84484
84484
|
return classof$c(arg) == 'Array';
|
|
84485
84485
|
};
|
|
84486
84486
|
|
|
84487
|
-
var isArray$1$1 = isArray$2
|
|
84487
|
+
var isArray$1$1 = isArray$2;
|
|
84488
84488
|
var toLength$1$1 = toLength$8$1;
|
|
84489
|
-
var bind$
|
|
84489
|
+
var bind$5 = functionBindContext$1; // `FlattenIntoArray` abstract operation
|
|
84490
84490
|
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
84491
84491
|
|
|
84492
|
-
var flattenIntoArray$1
|
|
84492
|
+
var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
|
|
84493
84493
|
var targetIndex = start;
|
|
84494
84494
|
var sourceIndex = 0;
|
|
84495
|
-
var mapFn = mapper ? bind$
|
|
84495
|
+
var mapFn = mapper ? bind$5(mapper, thisArg, 3) : false;
|
|
84496
84496
|
var element;
|
|
84497
84497
|
|
|
84498
84498
|
while (sourceIndex < sourceLen) {
|
|
@@ -84500,7 +84500,7 @@
|
|
|
84500
84500
|
element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
|
|
84501
84501
|
|
|
84502
84502
|
if (depth > 0 && isArray$1$1(element)) {
|
|
84503
|
-
targetIndex = flattenIntoArray$1
|
|
84503
|
+
targetIndex = flattenIntoArray$1(target, original, element, toLength$1$1(element.length), targetIndex, depth - 1) - 1;
|
|
84504
84504
|
} else {
|
|
84505
84505
|
if (targetIndex >= 0x1FFFFFFFFFFFFF) throw TypeError('Exceed the acceptable array length');
|
|
84506
84506
|
target[targetIndex] = element;
|
|
@@ -84515,21 +84515,21 @@
|
|
|
84515
84515
|
return targetIndex;
|
|
84516
84516
|
};
|
|
84517
84517
|
|
|
84518
|
-
var flattenIntoArray_1
|
|
84519
|
-
var isObject$
|
|
84520
|
-
var isArray$4 = isArray$2
|
|
84521
|
-
var wellKnownSymbol$
|
|
84522
|
-
var SPECIES$
|
|
84518
|
+
var flattenIntoArray_1 = flattenIntoArray$1;
|
|
84519
|
+
var isObject$e = isObject$a$1;
|
|
84520
|
+
var isArray$4 = isArray$2;
|
|
84521
|
+
var wellKnownSymbol$o = wellKnownSymbol$i$1;
|
|
84522
|
+
var SPECIES$5 = wellKnownSymbol$o('species'); // `ArraySpeciesCreate` abstract operation
|
|
84523
84523
|
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
84524
84524
|
|
|
84525
|
-
var arraySpeciesCreate$1
|
|
84525
|
+
var arraySpeciesCreate$1 = function (originalArray, length) {
|
|
84526
84526
|
var C;
|
|
84527
84527
|
|
|
84528
84528
|
if (isArray$4(originalArray)) {
|
|
84529
84529
|
C = originalArray.constructor; // cross-realm fallback
|
|
84530
84530
|
|
|
84531
|
-
if (typeof C == 'function' && (C === Array || isArray$4(C.prototype))) C = undefined;else if (isObject$
|
|
84532
|
-
C = C[SPECIES$
|
|
84531
|
+
if (typeof C == 'function' && (C === Array || isArray$4(C.prototype))) C = undefined;else if (isObject$e(C)) {
|
|
84532
|
+
C = C[SPECIES$5];
|
|
84533
84533
|
if (C === null) C = undefined;
|
|
84534
84534
|
}
|
|
84535
84535
|
}
|
|
@@ -84537,15 +84537,15 @@
|
|
|
84537
84537
|
return new (C === undefined ? Array : C)(length === 0 ? 0 : length);
|
|
84538
84538
|
};
|
|
84539
84539
|
|
|
84540
|
-
var $$
|
|
84541
|
-
var flattenIntoArray
|
|
84542
|
-
var toObject$1$1 = toObject$7
|
|
84543
|
-
var toLength$
|
|
84540
|
+
var $$h = _export$1;
|
|
84541
|
+
var flattenIntoArray = flattenIntoArray_1;
|
|
84542
|
+
var toObject$1$1 = toObject$7;
|
|
84543
|
+
var toLength$a = toLength$8$1;
|
|
84544
84544
|
var aFunction$9 = aFunction$7$1;
|
|
84545
|
-
var arraySpeciesCreate
|
|
84545
|
+
var arraySpeciesCreate = arraySpeciesCreate$1; // `Array.prototype.flatMap` method
|
|
84546
84546
|
// https://github.com/tc39/proposal-flatMap
|
|
84547
84547
|
|
|
84548
|
-
$$
|
|
84548
|
+
$$h({
|
|
84549
84549
|
target: 'Array',
|
|
84550
84550
|
proto: true
|
|
84551
84551
|
}, {
|
|
@@ -84553,17 +84553,17 @@
|
|
|
84553
84553
|
/* , thisArg */
|
|
84554
84554
|
) {
|
|
84555
84555
|
var O = toObject$1$1(this);
|
|
84556
|
-
var sourceLen = toLength$
|
|
84556
|
+
var sourceLen = toLength$a(O.length);
|
|
84557
84557
|
var A;
|
|
84558
84558
|
aFunction$9(callbackfn);
|
|
84559
|
-
A = arraySpeciesCreate
|
|
84560
|
-
A.length = flattenIntoArray
|
|
84559
|
+
A = arraySpeciesCreate(O, 0);
|
|
84560
|
+
A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
84561
84561
|
return A;
|
|
84562
84562
|
}
|
|
84563
84563
|
}); // this method was added to unscopables after implementation
|
|
84564
84564
|
// in popular engines, so it's moved to a separate module
|
|
84565
84565
|
|
|
84566
|
-
var addToUnscopables$3 = addToUnscopables$2
|
|
84566
|
+
var addToUnscopables$3 = addToUnscopables$2;
|
|
84567
84567
|
addToUnscopables$3('flatMap');
|
|
84568
84568
|
|
|
84569
84569
|
function useItemLoaderWithPreFetch(pageSize, handler, deps) {
|
|
@@ -87231,9 +87231,9 @@
|
|
|
87231
87231
|
}), void 0);
|
|
87232
87232
|
};
|
|
87233
87233
|
|
|
87234
|
-
var version$1 = "0.4.0-preview.
|
|
87235
|
-
var buildId = "
|
|
87236
|
-
var commitId = "
|
|
87234
|
+
var version$1 = "0.4.0-preview.66";
|
|
87235
|
+
var buildId = "95719";
|
|
87236
|
+
var commitId = "d12b73ed624839d545e7b7e7d62f91775eff9625";
|
|
87237
87237
|
var isCustomerBuild = false;
|
|
87238
87238
|
var buildInfo = {
|
|
87239
87239
|
version: version$1,
|
|
@@ -87242,17 +87242,17 @@
|
|
|
87242
87242
|
isCustomerBuild: isCustomerBuild
|
|
87243
87243
|
};
|
|
87244
87244
|
|
|
87245
|
-
var isObject$
|
|
87245
|
+
var isObject$d = isObject$t;
|
|
87246
87246
|
var classof$b = classofRaw$9;
|
|
87247
|
-
var wellKnownSymbol$
|
|
87247
|
+
var wellKnownSymbol$n = wellKnownSymbol$D;
|
|
87248
87248
|
|
|
87249
|
-
var MATCH$4 = wellKnownSymbol$
|
|
87249
|
+
var MATCH$4 = wellKnownSymbol$n('match');
|
|
87250
87250
|
|
|
87251
87251
|
// `IsRegExp` abstract operation
|
|
87252
87252
|
// https://tc39.github.io/ecma262/#sec-isregexp
|
|
87253
87253
|
var isRegexp$1 = function (it) {
|
|
87254
87254
|
var isRegExp;
|
|
87255
|
-
return isObject$
|
|
87255
|
+
return isObject$d(it) && ((isRegExp = it[MATCH$4]) !== undefined ? !!isRegExp : classof$b(it) == 'RegExp');
|
|
87256
87256
|
};
|
|
87257
87257
|
|
|
87258
87258
|
var isRegExp$5 = isRegexp$1;
|
|
@@ -87263,9 +87263,9 @@
|
|
|
87263
87263
|
} return it;
|
|
87264
87264
|
};
|
|
87265
87265
|
|
|
87266
|
-
var wellKnownSymbol$
|
|
87266
|
+
var wellKnownSymbol$m = wellKnownSymbol$D;
|
|
87267
87267
|
|
|
87268
|
-
var MATCH$3 = wellKnownSymbol$
|
|
87268
|
+
var MATCH$3 = wellKnownSymbol$m('match');
|
|
87269
87269
|
|
|
87270
87270
|
var correctIsRegexpLogic$1 = function (METHOD_NAME) {
|
|
87271
87271
|
var regexp = /./;
|
|
@@ -87279,14 +87279,14 @@
|
|
|
87279
87279
|
} return false;
|
|
87280
87280
|
};
|
|
87281
87281
|
|
|
87282
|
-
var $$
|
|
87282
|
+
var $$g = _export$7;
|
|
87283
87283
|
var notARegExp$2 = notARegexp$1;
|
|
87284
87284
|
var requireObjectCoercible$d = requireObjectCoercible$l;
|
|
87285
87285
|
var correctIsRegExpLogic$2 = correctIsRegexpLogic$1;
|
|
87286
87286
|
|
|
87287
87287
|
// `String.prototype.includes` method
|
|
87288
87288
|
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
|
87289
|
-
$$
|
|
87289
|
+
$$g({ target: 'String', proto: true, forced: !correctIsRegExpLogic$2('includes') }, {
|
|
87290
87290
|
includes: function includes(searchString /* , position = 0 */) {
|
|
87291
87291
|
return !!~String(requireObjectCoercible$d(this))
|
|
87292
87292
|
.indexOf(notARegExp$2(searchString), arguments.length > 1 ? arguments[1] : undefined);
|
|
@@ -87345,9 +87345,11 @@
|
|
|
87345
87345
|
canva: {
|
|
87346
87346
|
apiKey: "6vvsr2srHeve85SXxMX1k1LD"
|
|
87347
87347
|
},
|
|
87348
|
-
|
|
87348
|
+
intercom: {
|
|
87349
87349
|
enable: true,
|
|
87350
|
-
|
|
87350
|
+
appId: "f74vgfao",
|
|
87351
|
+
productId: "Condense",
|
|
87352
|
+
unauthenticatedProductId: "Condense Login"
|
|
87351
87353
|
},
|
|
87352
87354
|
webAppUrl: "http://localhost:3000",
|
|
87353
87355
|
hyperfish: {
|
|
@@ -88336,7 +88338,7 @@
|
|
|
88336
88338
|
|
|
88337
88339
|
function _class(obj) { return Object.prototype.toString.call(obj); }
|
|
88338
88340
|
function isString(obj) { return _class(obj) === '[object String]'; }
|
|
88339
|
-
function isObject$
|
|
88341
|
+
function isObject$c(obj) { return _class(obj) === '[object Object]'; }
|
|
88340
88342
|
function isRegExp$4(obj) { return _class(obj) === '[object RegExp]'; }
|
|
88341
88343
|
function isFunction(obj) { return _class(obj) === '[object Function]'; }
|
|
88342
88344
|
|
|
@@ -88507,7 +88509,7 @@
|
|
|
88507
88509
|
|
|
88508
88510
|
self.__compiled__[name] = compiled;
|
|
88509
88511
|
|
|
88510
|
-
if (isObject$
|
|
88512
|
+
if (isObject$c(val)) {
|
|
88511
88513
|
if (isRegExp$4(val.validate)) {
|
|
88512
88514
|
compiled.validate = createValidator(val.validate);
|
|
88513
88515
|
} else if (isFunction(val.validate)) {
|
|
@@ -125568,28 +125570,28 @@
|
|
|
125568
125570
|
return !Object('z').propertyIsEnumerable(0);})?function(it){return classof$9(it)=='String'?split.call(it,''):Object(it);}:Object;// `RequireObjectCoercible` abstract operation
|
|
125569
125571
|
// https://tc39.github.io/ecma262/#sec-requireobjectcoercible
|
|
125570
125572
|
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
|
|
125571
|
-
var IndexedObject$2=indexedObject;var requireObjectCoercible$a=requireObjectCoercible$b;var toIndexedObject$4=function(it){return IndexedObject$2(requireObjectCoercible$a(it));};var isObject$
|
|
125573
|
+
var IndexedObject$2=indexedObject;var requireObjectCoercible$a=requireObjectCoercible$b;var toIndexedObject$4=function(it){return IndexedObject$2(requireObjectCoercible$a(it));};var isObject$b=function(it){return typeof it==='object'?it!==null:typeof it==='function';};var isObject$a=isObject$b;// `ToPrimitive` abstract operation
|
|
125572
125574
|
// https://tc39.github.io/ecma262/#sec-toprimitive
|
|
125573
125575
|
// instead of the ES6 spec version, we didn't implement @@toPrimitive case
|
|
125574
125576
|
// and the second argument - flag - preferred type is a string
|
|
125575
|
-
var toPrimitive$3=function(input,PREFERRED_STRING){if(!isObject$
|
|
125576
|
-
var EXISTS=isObject$
|
|
125577
|
+
var toPrimitive$3=function(input,PREFERRED_STRING){if(!isObject$a(input))return input;var fn,val;if(PREFERRED_STRING&&typeof(fn=input.toString)=='function'&&!isObject$a(val=fn.call(input)))return val;if(typeof(fn=input.valueOf)=='function'&&!isObject$a(val=fn.call(input)))return val;if(!PREFERRED_STRING&&typeof(fn=input.toString)=='function'&&!isObject$a(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$9=isObject$b;var document$2=global$l.document;// typeof document.createElement is 'object' in old IE
|
|
125578
|
+
var EXISTS=isObject$9(document$2)&&isObject$9(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
|
|
125577
125579
|
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
|
|
125578
125580
|
// https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
|
|
125579
|
-
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$
|
|
125581
|
+
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$8=isObject$b;var anObject$h=function(it){if(!isObject$8(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
|
|
125580
125582
|
// https://tc39.github.io/ecma262/#sec-object.defineproperty
|
|
125581
125583
|
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
|
|
125582
|
-
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$3=0;var postfix=Math.random();var uid$2=function(key){return 'Symbol('+String(key===undefined?'':key)+')_'+(++id$3+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$
|
|
125583
|
-
})(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$
|
|
125584
|
+
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$3=0;var postfix=Math.random();var uid$2=function(key){return 'Symbol('+String(key===undefined?'':key)+')_'+(++id$3+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$7=isObject$b;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$2,has$a;var enforce=function(it){return has$a(it)?get$2(it):set$1(it,{});};var getterFor=function(TYPE){return function(it){var state;if(!isObject$7(it)||(state=get$2(it)).type!==TYPE){throw TypeError('Incompatible receiver, '+TYPE+' required');}return state;};};if(NATIVE_WEAK_MAP){var store$4=new WeakMap$2();var wmget=store$4.get;var wmhas=store$4.has;var wmset=store$4.set;set$1=function(it,metadata){wmset.call(store$4,it,metadata);return metadata;};get$2=function(it){return wmget.call(store$4,it)||{};};has$a=function(it){return wmhas.call(store$4,it);};}else {var STATE=sharedKey$2('state');hiddenKeys$3[STATE]=true;set$1=function(it,metadata){createNonEnumerableProperty$6(it,STATE,metadata);return metadata;};get$2=function(it){return objectHas(it,STATE)?it[STATE]:{};};has$a=function(it){return objectHas(it,STATE);};}var internalState={set:set$1,get:get$2,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
|
|
125585
|
+
})(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$7=function(variable){return typeof variable=='function'?variable:undefined;};var getBuiltIn$6=function(namespace,method){return arguments.length<2?aFunction$7(path[namespace])||aFunction$7(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
|
|
125584
125586
|
// https://tc39.github.io/ecma262/#sec-tointeger
|
|
125585
125587
|
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
|
|
125586
125588
|
// https://tc39.github.io/ecma262/#sec-tolength
|
|
125587
|
-
var toLength$
|
|
125589
|
+
var toLength$8=function(argument){return argument>0?min$5(toInteger$3(argument),0x1FFFFFFFFFFFFF):0;// 2 ** 53 - 1 == 9007199254740991
|
|
125588
125590
|
};var toInteger$2=toInteger$4;var max$2=Math.max;var min$4=Math.min;// Helper for a popular repeating case of the spec:
|
|
125589
125591
|
// Let integer be ? ToInteger(index).
|
|
125590
125592
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
125591
|
-
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$
|
|
125592
|
-
var createMethod$3=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIndexedObject$2($this);var length=toLength$
|
|
125593
|
+
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$7=toLength$8;var toAbsoluteIndex=toAbsoluteIndex$1;// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
125594
|
+
var createMethod$3=function(IS_INCLUDES){return function($this,el,fromIndex){var O=toIndexedObject$2($this);var length=toLength$7(O.length);var index=toAbsoluteIndex(fromIndex,length);var value;// Array#includes uses SameValueZero equality algorithm
|
|
125593
125595
|
// eslint-disable-next-line no-self-compare
|
|
125594
125596
|
if(IS_INCLUDES&&el!=el)while(length>index){value=O[index++];// eslint-disable-next-line no-self-compare
|
|
125595
125597
|
if(value!=value)return true;// Array#indexOf ignores holes, Array#includes - not
|
|
@@ -125622,11 +125624,11 @@
|
|
|
125622
125624
|
// eslint-disable-next-line no-undef
|
|
125623
125625
|
return !String(Symbol());});var NATIVE_SYMBOL$1=nativeSymbol;var useSymbolAsUid=NATIVE_SYMBOL$1// eslint-disable-next-line no-undef
|
|
125624
125626
|
&&!Symbol.sham// eslint-disable-next-line no-undef
|
|
125625
|
-
&&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$
|
|
125627
|
+
&&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$k=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$6=isObject$b;var classof$8=classofRaw$1;var wellKnownSymbol$j=wellKnownSymbol$k;var MATCH$2=wellKnownSymbol$j('match');// `IsRegExp` abstract operation
|
|
125626
125628
|
// https://tc39.github.io/ecma262/#sec-isregexp
|
|
125627
|
-
var isRegexp=function(it){var isRegExp;return isObject$
|
|
125629
|
+
var isRegexp=function(it){var isRegExp;return isObject$6(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$i=wellKnownSymbol$k;var MATCH$1=wellKnownSymbol$i('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 $$e=_export;var notARegExp$1=notARegexp;var requireObjectCoercible$9=requireObjectCoercible$b;var correctIsRegExpLogic$1=correctIsRegexpLogic;// `String.prototype.includes` method
|
|
125628
125630
|
// https://tc39.github.io/ecma262/#sec-string.prototype.includes
|
|
125629
|
-
$$
|
|
125631
|
+
$$e({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
|
|
125630
125632
|
// https://tc39.github.io/ecma262/#sec-get-regexp.prototype.flags
|
|
125631
125633
|
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,
|
|
125632
125634
|
// so we use an intermediate function.
|
|
@@ -125641,32 +125643,32 @@
|
|
|
125641
125643
|
// simulate the 'y' flag.
|
|
125642
125644
|
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`
|
|
125643
125645
|
// for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
|
|
125644
|
-
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 $$
|
|
125645
|
-
var redefine$7=redefine$9.exports;var fails$b=fails$i;var wellKnownSymbol$
|
|
125646
|
+
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 $$d=_export;var exec$1=regexpExec$3;$$d({target:'RegExp',proto:true,forced:/./.exec!==exec$1},{exec:exec$1});// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
125647
|
+
var redefine$7=redefine$9.exports;var fails$b=fails$i;var wellKnownSymbol$h=wellKnownSymbol$k;var regexpExec$2$1=regexpExec$3;var createNonEnumerableProperty$3=createNonEnumerableProperty$8;var SPECIES$3=wellKnownSymbol$h('species');var REPLACE_SUPPORTS_NAMED_GROUPS$1=!fails$b(function(){// #replace needs built-in support for named groups.
|
|
125646
125648
|
// #match works fine because it just return the exec results, even if it has
|
|
125647
125649
|
// a "grops" property.
|
|
125648
125650
|
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 $&
|
|
125649
125651
|
// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
|
|
125650
|
-
var REPLACE_KEEPS_$0$1=function(){return 'a'.replace(/./,'$0')==='$0';}();var REPLACE$1=wellKnownSymbol$
|
|
125652
|
+
var REPLACE_KEEPS_$0$1=function(){return 'a'.replace(/./,'$0')==='$0';}();var REPLACE$1=wellKnownSymbol$h('replace');// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
|
|
125651
125653
|
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
|
|
125652
125654
|
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
125653
|
-
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$
|
|
125655
|
+
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$h(KEY);var DELEGATES_TO_SYMBOL=!fails$b(function(){// String methods call symbol-named RegEp methods
|
|
125654
125656
|
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
|
|
125655
125657
|
var execCalled=false;var re=/a/;if(KEY==='split'){// We can't use real regex here since it causes deoptimization
|
|
125656
125658
|
// and serious performance degradation in V8
|
|
125657
125659
|
// https://github.com/zloirock/core-js/issues/306
|
|
125658
125660
|
re={};// RegExp[@@split] doesn't call the regex's exec method, but first creates
|
|
125659
125661
|
// a new one. We need to return the patched regex when creating the new one.
|
|
125660
|
-
re.constructor={};re.constructor[SPECIES$
|
|
125662
|
+
re.constructor={};re.constructor[SPECIES$3]=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
|
|
125661
125663
|
// polyfilled function), leasing to infinite recursion.
|
|
125662
125664
|
// We avoid it by directly calling the native @@method method.
|
|
125663
125665
|
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)
|
|
125664
125666
|
// 21.2.5.11 RegExp.prototype[@@split](string, limit)
|
|
125665
125667
|
?function(string,arg){return regexMethod.call(string,this,arg);}// 21.2.5.6 RegExp.prototype[@@match](string)
|
|
125666
125668
|
// 21.2.5.9 RegExp.prototype[@@search](string)
|
|
125667
|
-
:function(string){return regexMethod.call(string,this);});}if(sham)createNonEnumerableProperty$3(RegExp.prototype[SYMBOL],'sham',true);};var aFunction$
|
|
125669
|
+
:function(string){return regexMethod.call(string,this);});}if(sham)createNonEnumerableProperty$3(RegExp.prototype[SYMBOL],'sham',true);};var aFunction$6=function(it){if(typeof it!='function'){throw TypeError(String(it)+' is not a function');}return it;};var anObject$d=anObject$h;var aFunction$5=aFunction$6;var wellKnownSymbol$g=wellKnownSymbol$k;var SPECIES$2=wellKnownSymbol$g('species');// `SpeciesConstructor` abstract operation
|
|
125668
125670
|
// https://tc39.github.io/ecma262/#sec-speciesconstructor
|
|
125669
|
-
var speciesConstructor$2=function(O,defaultConstructor){var C=anObject$d(O).constructor;var S;return C===undefined||(S=anObject$d(C)[SPECIES$
|
|
125671
|
+
var speciesConstructor$2=function(O,defaultConstructor){var C=anObject$d(O).constructor;var S;return C===undefined||(S=anObject$d(C)[SPECIES$2])==undefined?defaultConstructor:aFunction$5(S);};var toInteger$1=toInteger$4;var requireObjectCoercible$8=requireObjectCoercible$b;// `String.prototype.{ codePointAt, at }` methods implementation
|
|
125670
125672
|
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
|
|
125671
125673
|
// https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
|
|
125672
125674
|
codeAt:createMethod$2(false),// `String.prototype.at` method
|
|
@@ -125675,7 +125677,7 @@
|
|
|
125675
125677
|
// https://tc39.github.io/ecma262/#sec-advancestringindex
|
|
125676
125678
|
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
|
|
125677
125679
|
// https://tc39.github.io/ecma262/#sec-regexpexec
|
|
125678
|
-
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$
|
|
125680
|
+
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$6=toLength$8;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
|
|
125679
125681
|
var SUPPORTS_Y=!fails$a(function(){return !RegExp(MAX_UINT32,'y');});// @@split logic
|
|
125680
125682
|
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
|
|
125681
125683
|
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
|
|
@@ -125691,12 +125693,12 @@
|
|
|
125691
125693
|
// the 'y' flag.
|
|
125692
125694
|
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
|
|
125693
125695
|
// simulate the 'y' flag.
|
|
125694
|
-
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$
|
|
125696
|
+
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$6(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$5=toLength$8;var requireObjectCoercible$6=requireObjectCoercible$b;var advanceStringIndex$1$1=advanceStringIndex$3;var regExpExec$2=regexpExecAbstract$1;// @@match logic
|
|
125695
125697
|
fixRegExpWellKnownSymbolLogic$2('match',1,function(MATCH,nativeMatch,maybeCallNative){return [// `String.prototype.match` method
|
|
125696
125698
|
// https://tc39.github.io/ecma262/#sec-string.prototype.match
|
|
125697
125699
|
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
|
|
125698
125700
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@match
|
|
125699
|
-
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$
|
|
125701
|
+
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$5(rx.lastIndex),fullUnicode);n++;}return n===0?null:A;}];});/*! *****************************************************************************
|
|
125700
125702
|
Copyright (c) Microsoft Corporation.
|
|
125701
125703
|
|
|
125702
125704
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -125736,9 +125738,9 @@
|
|
|
125736
125738
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
125737
125739
|
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
|
|
125738
125740
|
// of whitespaces and has a correct name
|
|
125739
|
-
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 $$
|
|
125741
|
+
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 $$c=_export;var $trim$1=stringTrim$1.trim;var forcedStringTrimMethod$1=stringTrimForced$1;// `String.prototype.trim` method
|
|
125740
125742
|
// https://tc39.github.io/ecma262/#sec-string.prototype.trim
|
|
125741
|
-
$$
|
|
125743
|
+
$$c({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
|
|
125742
125744
|
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
125743
125745
|
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
|
|
125744
125746
|
// https://tc39.github.io/ecma262/#sec-object.defineproperties
|
|
@@ -125755,26 +125757,26 @@
|
|
|
125755
125757
|
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
|
|
125756
125758
|
// https://tc39.github.io/ecma262/#sec-object.create
|
|
125757
125759
|
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
|
|
125758
|
-
result[IE_PROTO$1]=O;}else result=NullProtoObject();return Properties===undefined?result:defineProperties$1(result,Properties);};var wellKnownSymbol$
|
|
125760
|
+
result[IE_PROTO$1]=O;}else result=NullProtoObject();return Properties===undefined?result:defineProperties$1(result,Properties);};var wellKnownSymbol$f=wellKnownSymbol$k;var create$2=objectCreate;var definePropertyModule$2=objectDefineProperty;var UNSCOPABLES=wellKnownSymbol$f('unscopables');var ArrayPrototype$1=Array.prototype;// Array.prototype[@@unscopables]
|
|
125759
125761
|
// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
125760
125762
|
if(ArrayPrototype$1[UNSCOPABLES]==undefined){definePropertyModule$2.f(ArrayPrototype$1,UNSCOPABLES,{configurable:true,value:create$2(null)});}// add a key to Array.prototype[@@unscopables]
|
|
125761
|
-
var addToUnscopables$
|
|
125763
|
+
var addToUnscopables$1=function(key){ArrayPrototype$1[UNSCOPABLES][key]=true;};var iterators={};var requireObjectCoercible$4=requireObjectCoercible$b;// `ToObject` abstract operation
|
|
125762
125764
|
// https://tc39.github.io/ecma262/#sec-toobject
|
|
125763
|
-
var toObject$
|
|
125765
|
+
var toObject$6=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$5=toObject$6;var sharedKey=sharedKey$3;var CORRECT_PROTOTYPE_GETTER=correctPrototypeGetter;var IE_PROTO=sharedKey('IE_PROTO');var ObjectPrototype=Object.prototype;// `Object.getPrototypeOf` method
|
|
125764
125766
|
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
|
125765
|
-
var objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?Object.getPrototypeOf:function(O){O=toObject$
|
|
125767
|
+
var objectGetPrototypeOf=CORRECT_PROTOTYPE_GETTER?Object.getPrototypeOf:function(O){O=toObject$5(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$e=wellKnownSymbol$k;var ITERATOR$7=wellKnownSymbol$e('iterator');var BUGGY_SAFARI_ITERATORS$1=false;var returnThis$2=function(){return this;};// `%IteratorPrototype%` object
|
|
125766
125768
|
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
|
|
125767
125769
|
var IteratorPrototype$2,PrototypeOfArrayIteratorPrototype,arrayIterator;if([].keys){arrayIterator=[].keys();// Safari 8 has buggy iterators w/o `next`
|
|
125768
125770
|
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]()
|
|
125769
|
-
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$
|
|
125771
|
+
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$d=wellKnownSymbol$k;var TO_STRING_TAG$3=wellKnownSymbol$d('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$5=isObject$b;var aPossiblePrototype$1=function(it){if(!isObject$5(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
|
|
125770
125772
|
// https://tc39.github.io/ecma262/#sec-object.setprototypeof
|
|
125771
125773
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
125772
|
-
/* 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 $$
|
|
125774
|
+
/* 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 $$b=_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$c=wellKnownSymbol$k;var Iterators$3=iterators;var IteratorsCore=iteratorsCore;var IteratorPrototype=IteratorsCore.IteratorPrototype;var BUGGY_SAFARI_ITERATORS=IteratorsCore.BUGGY_SAFARI_ITERATORS;var ITERATOR$6=wellKnownSymbol$c('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
|
|
125773
125775
|
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
|
|
125774
125776
|
setToStringTag$3(CurrentIteratorPrototype,TO_STRING_TAG,true);}}// fix Array#{values, @@iterator}.name in V8 / FF
|
|
125775
125777
|
if(DEFAULT==VALUES&&nativeIterator&&nativeIterator.name!==VALUES){INCORRECT_VALUES_NAME=true;defaultIterator=function values(){return nativeIterator.call(this);};}// define iterator
|
|
125776
125778
|
if(IterablePrototype[ITERATOR$6]!==defaultIterator){createNonEnumerableProperty$1(IterablePrototype,ITERATOR$6,defaultIterator);}Iterators$3[NAME]=defaultIterator;// export additional methods
|
|
125777
|
-
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 $$
|
|
125779
|
+
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 $$b({target:NAME,proto:true,forced:BUGGY_SAFARI_ITERATORS||INCORRECT_VALUES_NAME},methods);}return methods;};var toIndexedObject=toIndexedObject$4;var addToUnscopables=addToUnscopables$1;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
|
|
125778
125780
|
// https://tc39.github.io/ecma262/#sec-array.prototype.entries
|
|
125779
125781
|
// `Array.prototype.keys` method
|
|
125780
125782
|
// https://tc39.github.io/ecma262/#sec-array.prototype.keys
|
|
@@ -125793,39 +125795,39 @@
|
|
|
125793
125795
|
// https://tc39.github.io/ecma262/#sec-createunmappedargumentsobject
|
|
125794
125796
|
// https://tc39.github.io/ecma262/#sec-createmappedargumentsobject
|
|
125795
125797
|
Iterators$2.Arguments=Iterators$2.Array;// https://tc39.github.io/ecma262/#sec-array.prototype-@@unscopables
|
|
125796
|
-
addToUnscopables
|
|
125798
|
+
addToUnscopables('keys');addToUnscopables('values');addToUnscopables('entries');// iterable DOM collections
|
|
125797
125799
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
125798
|
-
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$
|
|
125800
|
+
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$b=wellKnownSymbol$k;var ITERATOR$5=wellKnownSymbol$b('iterator');var TO_STRING_TAG$2=wellKnownSymbol$b('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
|
|
125799
125801
|
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
|
|
125800
125802
|
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
|
|
125801
125803
|
// https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
|
|
125802
125804
|
defineIterator(String,'String',function(iterated){setInternalState$4(this,{type:STRING_ITERATOR,string:String(iterated),index:0});// `%StringIteratorPrototype%.next` method
|
|
125803
125805
|
// https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
|
|
125804
|
-
},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$
|
|
125806
|
+
},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$a=wellKnownSymbol$k;var IS_PURE=isPure;var ITERATOR$4=wellKnownSymbol$a('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
|
|
125805
125807
|
||new URL('https://a@b').username!=='a'||new URLSearchParams(new URLSearchParams('a=b')).get('a')!=='b'// not punycoded in Edge
|
|
125806
125808
|
||new URL('http://тест').host!=='xn--e1aybc'// not escaped in Chrome 62-
|
|
125807
125809
|
||new URL('http://a#б').hash!=='#%D0%B1'// fails in Chrome 66-
|
|
125808
125810
|
||result!=='a1c3'// throws in Safari
|
|
125809
|
-
||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$
|
|
125811
|
+
||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$4=toObject$6;var IndexedObject$1=indexedObject;var nativeAssign=Object.assign;var defineProperty$3=Object.defineProperty;// `Object.assign` method
|
|
125810
125812
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
125811
125813
|
var objectAssign=!nativeAssign||fails$6(function(){// should have correct order of operations (Edge bug)
|
|
125812
125814
|
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)
|
|
125813
125815
|
var A={};var B={};// eslint-disable-next-line no-undef
|
|
125814
125816
|
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
|
|
125815
|
-
var T=toObject$
|
|
125816
|
-
var functionBindContext=function(fn,that,length){aFunction$
|
|
125817
|
+
var T=toObject$4(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$4=aFunction$6;// optional / simple context binding
|
|
125818
|
+
var functionBindContext=function(fn,that,length){aFunction$4(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
|
|
125817
125819
|
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)
|
|
125818
|
-
}catch(error){var returnMethod=iterator['return'];if(returnMethod!==undefined)anObject$7(returnMethod.call(iterator));throw error;}};var wellKnownSymbol$
|
|
125819
|
-
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$
|
|
125820
|
+
}catch(error){var returnMethod=iterator['return'];if(returnMethod!==undefined)anObject$7(returnMethod.call(iterator));throw error;}};var wellKnownSymbol$9=wellKnownSymbol$k;var Iterators$1=iterators;var ITERATOR$3=wellKnownSymbol$9('iterator');var ArrayPrototype=Array.prototype;// check on default Array iterator
|
|
125821
|
+
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$8=wellKnownSymbol$k;var TO_STRING_TAG$1=wellKnownSymbol$8('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$7=wellKnownSymbol$k;var TO_STRING_TAG=wellKnownSymbol$7('toStringTag');// ES3 wrong here
|
|
125820
125822
|
var CORRECT_ARGUMENTS=classofRaw(function(){return arguments;}())=='Arguments';// fallback for IE11 Script Access Denied error
|
|
125821
125823
|
var tryGet=function(it,key){try{return it[key];}catch(error){/* empty */}};// getting tag from ES6+ `Object.prototype.toString`
|
|
125822
125824
|
var classof$6=TO_STRING_TAG_SUPPORT?classofRaw:function(it){var O,tag,result;return it===undefined?'Undefined':it===null?'Null'// @@toStringTag case
|
|
125823
125825
|
:typeof(tag=tryGet(O=Object(it),TO_STRING_TAG))=='string'?tag// builtinTag case
|
|
125824
125826
|
:CORRECT_ARGUMENTS?classofRaw(O)// ES3 arguments fallback
|
|
125825
|
-
:(result=classofRaw(O))=='Object'&&typeof O.callee=='function'?'Arguments':result;};var classof$5=classof$6;var Iterators=iterators;var wellKnownSymbol$
|
|
125827
|
+
:(result=classofRaw(O))=='Object'&&typeof O.callee=='function'?'Arguments':result;};var classof$5=classof$6;var Iterators=iterators;var wellKnownSymbol$6=wellKnownSymbol$k;var ITERATOR$2=wellKnownSymbol$6('iterator');var getIteratorMethod$4=function(it){if(it!=undefined)return it[ITERATOR$2]||it['@@iterator']||Iterators[classof$5(it)];};var bind$4=functionBindContext;var toObject$3=toObject$6;var callWithSafeIterationClosing$1=callWithSafeIterationClosing$2;var isArrayIteratorMethod$1=isArrayIteratorMethod$2;var toLength$4=toLength$8;var createProperty=createProperty$1;var getIteratorMethod$3=getIteratorMethod$4;// `Array.from` method implementation
|
|
125826
125828
|
// https://tc39.github.io/ecma262/#sec-array.from
|
|
125827
|
-
var arrayFrom$1=function from(arrayLike/* , mapfn = undefined, thisArg = undefined */){var O=toObject$
|
|
125828
|
-
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$
|
|
125829
|
+
var arrayFrom$1=function from(arrayLike/* , mapfn = undefined, thisArg = undefined */){var O=toObject$3(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$4(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
|
|
125830
|
+
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$4(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
|
|
125829
125831
|
var maxInt=2147483647;// aka. 0x7FFFFFFF or 2^31-1
|
|
125830
125832
|
var base=36;var tMin=1;var tMax=26;var skew=38;var damp=700;var initialBias=72;var initialN=128;// 0x80
|
|
125831
125833
|
var delimiter='-';// '\x2D'
|
|
@@ -125864,9 +125866,9 @@
|
|
|
125864
125866
|
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.
|
|
125865
125867
|
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.
|
|
125866
125868
|
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`
|
|
125867
|
-
var $$
|
|
125869
|
+
var $$a=_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$3=functionBindContext;var classof$4=classof$6;var anObject$5=anObject$h;var isObject$4=isObject$b;var create=objectCreate;var createPropertyDescriptor=createPropertyDescriptor$5;var getIterator=getIterator$1;var getIteratorMethod$1=getIteratorMethod$4;var wellKnownSymbol$5=wellKnownSymbol$k;var $fetch$1=getBuiltIn$3('fetch');var Headers$1=getBuiltIn$3('Headers');var ITERATOR$1=wellKnownSymbol$5('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
|
|
125868
125870
|
// https://url.spec.whatwg.org/#interface-urlsearchparams
|
|
125869
|
-
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$
|
|
125871
|
+
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$4(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
|
|
125870
125872
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-append
|
|
125871
125873
|
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
|
|
125872
125874
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-delete
|
|
@@ -125882,16 +125884,16 @@
|
|
|
125882
125884
|
// https://url.spec.whatwg.org/#dom-urlsearchparams-sort
|
|
125883
125885
|
sort:function sort(){var state=getInternalParamsState(this);var entries=state.entries;// Array#sort is not stable in some engines
|
|
125884
125886
|
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
|
|
125885
|
-
forEach:function forEach(callback/* , thisArg */){var entries=getInternalParamsState(this).entries;var boundFunction=bind$
|
|
125887
|
+
forEach:function forEach(callback/* , thisArg */){var entries=getInternalParamsState(this).entries;var boundFunction=bind$3(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
|
|
125886
125888
|
keys:function keys(){return new URLSearchParamsIterator(this,'keys');},// `URLSearchParams.prototype.values` method
|
|
125887
125889
|
values:function values(){return new URLSearchParamsIterator(this,'values');},// `URLSearchParams.prototype.entries` method
|
|
125888
125890
|
entries:function entries(){return new URLSearchParamsIterator(this,'entries');}},{enumerable:true});// `URLSearchParams.prototype[@@iterator]` method
|
|
125889
125891
|
redefine$4(URLSearchParamsPrototype,ITERATOR$1,URLSearchParamsPrototype.entries);// `URLSearchParams.prototype.toString` method
|
|
125890
125892
|
// https://url.spec.whatwg.org/#urlsearchparams-stringification-behavior
|
|
125891
|
-
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);$$
|
|
125893
|
+
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);$$a({global:true,forced:!USE_NATIVE_URL$1},{URLSearchParams:URLSearchParamsConstructor});// Wrap `fetch` for correct work with polyfilled `URLSearchParams`
|
|
125892
125894
|
// https://github.com/zloirock/core-js/issues/674
|
|
125893
|
-
if(!USE_NATIVE_URL$1&&typeof $fetch$1=='function'&&typeof Headers$1=='function'){$$
|
|
125894
|
-
var $$
|
|
125895
|
+
if(!USE_NATIVE_URL$1&&typeof $fetch$1=='function'&&typeof Headers$1=='function'){$$a({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$4(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`
|
|
125896
|
+
var $$9=_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
|
|
125895
125897
|
var FORBIDDEN_HOST_CODE_POINT=/[\u0000\u0009\u000A\u000D #%/:?@[\\]]/;// eslint-disable-next-line no-control-regex
|
|
125896
125898
|
var FORBIDDEN_HOST_CODE_POINT_EXCLUDING_PERCENT=/[\u0000\u0009\u000A\u000D #/:?@[\\]]/;// eslint-disable-next-line no-control-regex
|
|
125897
125899
|
var LEADING_AND_TRAILING_C0_CONTROL_OR_SPACE=/^[\u0000-\u001F ]+|[\u0000-\u001F ]+$/g;// eslint-disable-next-line no-control-regex
|
|
@@ -125938,10 +125940,10 @@
|
|
|
125938
125940
|
if(nativeCreateObjectURL)redefine$3(URLConstructor,'createObjectURL',function createObjectURL(blob){return nativeCreateObjectURL.apply(NativeURL,arguments);});// `URL.revokeObjectURL` method
|
|
125939
125941
|
// https://developer.mozilla.org/en-US/docs/Web/API/URL/revokeObjectURL
|
|
125940
125942
|
// eslint-disable-next-line no-unused-vars
|
|
125941
|
-
if(nativeRevokeObjectURL)redefine$3(URLConstructor,'revokeObjectURL',function revokeObjectURL(url){return nativeRevokeObjectURL.apply(NativeURL,arguments);});}setToStringTag$1(URLConstructor,'URL');$$
|
|
125943
|
+
if(nativeRevokeObjectURL)redefine$3(URLConstructor,'revokeObjectURL',function revokeObjectURL(url){return nativeRevokeObjectURL.apply(NativeURL,arguments);});}setToStringTag$1(URLConstructor,'URL');$$9({global:true,forced:!USE_NATIVE_URL,sham:!DESCRIPTORS$4},{URL:URLConstructor});var $$8=_export;var getOwnPropertyDescriptor$1=objectGetOwnPropertyDescriptor.f;var toLength$3=toLength$8;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
|
|
125942
125944
|
var MDN_POLYFILL_BUG=!CORRECT_IS_REGEXP_LOGIC&&!!function(){var descriptor=getOwnPropertyDescriptor$1(String.prototype,'startsWith');return descriptor&&!descriptor.writable;}();// `String.prototype.startsWith` method
|
|
125943
125945
|
// https://tc39.github.io/ecma262/#sec-string.prototype.startswith
|
|
125944
|
-
$$
|
|
125946
|
+
$$8({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$3(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__*/React$d.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=React$d.useRef(null);var hostRef=React$d.useRef(null);// exists only for e2e tests, so we know when the focus has been set
|
|
125945
125947
|
var _b=React$d.useState(false),didInitialFocus=_b[0],setDidInitialFocus=_b[1];var screenSize=useWindowSize$2();var inputPlaceholder=screenSize.width>maxScreenSize.medium?'PostMessage.inputPlaceholder':'PostMessage.inputPlaceholder.mobile';React$d.useImperativeHandle(ref,function(){return inputRef.current;},[inputRef]);React$d.useEffect(function(){if(autoFocus&&inputRef.current&&!didInitialFocus&&!disabled){// HACK: it seems as the react-mentions input does not like setting the focus
|
|
125946
125948
|
// right away. Postpone it for a couple of ms
|
|
125947
125949
|
// Unfortunately autoFocus={true} is not supported
|
|
@@ -125972,10 +125974,10 @@
|
|
|
125972
125974
|
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=React$d.useState(false),showCallout=_a[0],setShowCallout=_a[1];var infoButtonRef=React$d.useRef();return jsxRuntime.jsxs("div",__assign({ref:infoButtonRef},{children:[jsxRuntime.jsx(StyledIconButton$7,{iconProps:{iconName:'Info'},onClick:function(){return setShowCallout(!showCallout);},ariaLabel:formatMessage({id:'Keywords.picker.tooltipAriaLabel'})},void 0),showCallout&&jsxRuntime.jsx(StyledCallout$1,__assign({onDismiss:function(){return setShowCallout(false);},target:infoButtonRef.current},{children:jsxRuntime.jsx(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 jsxRuntime.jsxs(TagWrapper,__assign({"data-keyword-tag":item.name},{children:[jsxRuntime.jsx(KeywordName,{children:item.name},void 0),canBeRemoved&&jsxRuntime.jsx(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__default["default"].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__default["default"].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__default["default"](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__default["default"](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__default["default"].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__default["default"].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__default["default"](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__default["default"](officeUiFabricReact.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)
|
|
125973
125975
|
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
|
|
125974
125976
|
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
|
|
125975
|
-
function getAdditionalVideoSources(){return [];}var isObject$
|
|
125977
|
+
function getAdditionalVideoSources(){return [];}var isObject$3=isObject$b;var setPrototypeOf=objectSetPrototypeOf;// makes subclassing work correct for wrapped built-ins
|
|
125976
125978
|
var inheritIfRequired$1=function($this,dummy,Wrapper){var NewTarget,NewTargetPrototype;if(// it can work only with native `setPrototypeOf`
|
|
125977
125979
|
setPrototypeOf&&// we haven't completely correct pre-ES6 way for getting `new.target`, so use this
|
|
125978
|
-
typeof(NewTarget=dummy.constructor)=='function'&&NewTarget!==Wrapper&&isObject$
|
|
125980
|
+
typeof(NewTarget=dummy.constructor)=='function'&&NewTarget!==Wrapper&&isObject$3(NewTargetPrototype=NewTarget.prototype)&&NewTargetPrototype!==Wrapper.prototype)setPrototypeOf($this,NewTargetPrototype);return $this;};var getBuiltIn$2=getBuiltIn$6;var definePropertyModule=objectDefineProperty;var wellKnownSymbol$4=wellKnownSymbol$k;var DESCRIPTORS$3=descriptors;var SPECIES$1=wellKnownSymbol$4('species');var setSpecies$2=function(CONSTRUCTOR_NAME){var Constructor=getBuiltIn$2(CONSTRUCTOR_NAME);var defineProperty=definePropertyModule.f;if(DESCRIPTORS$3&&Constructor&&!Constructor[SPECIES$1]){defineProperty(Constructor,SPECIES$1,{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$3=wellKnownSymbol$k;var MATCH=wellKnownSymbol$3('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
|
|
125979
125981
|
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
|
|
125980
125982
|
return NativeRegExp(re1)!=re1||NativeRegExp(re2)==re2||NativeRegExp(re1,'i')!='/a/i';}));// `RegExp` constructor
|
|
125981
125983
|
// https://tc39.github.io/ecma262/#sec-regexp-constructor
|
|
@@ -125984,9 +125986,9 @@
|
|
|
125984
125986
|
var INCORRECT_NAME$1=nativeToString$1.name!=TO_STRING$1;// `RegExp.prototype.toString` method
|
|
125985
125987
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype.tostring
|
|
125986
125988
|
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
|
|
125987
|
-
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$
|
|
125988
|
-
if(isArrayIteratorMethod(iterFn)){for(index=0,length=toLength$
|
|
125989
|
-
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$
|
|
125989
|
+
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$2=toLength$8;var bind$2=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$2(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
|
|
125990
|
+
if(isArrayIteratorMethod(iterFn)){for(index=0,length=toLength$2(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$2=wellKnownSymbol$k;var ITERATOR=wellKnownSymbol$2('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
|
|
125991
|
+
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$1=functionBindContext;var html=html$2;var createElement=documentCreateElement$1;var IS_IOS$1=engineIsIos;var location$1=global$7.location;var set$2=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
|
|
125990
125992
|
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
|
|
125991
125993
|
global$7.postMessage(id+'',location$1.protocol+'//'+location$1.host);};// Node.js 0.9+ & IE10+ has setImmediate, otherwise:
|
|
125992
125994
|
if(!set$2||!clear){set$2=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
|
|
@@ -125994,7 +125996,7 @@
|
|
|
125994
125996
|
if(classof$3(process$3)=='process'){defer=function(id){process$3.nextTick(runner(id));};// Sphere (JS game engine) Dispatch API
|
|
125995
125997
|
}else if(Dispatch&&Dispatch.now){defer=function(id){Dispatch.now(runner(id));};// Browsers with MessageChannel, includes WebWorkers
|
|
125996
125998
|
// except iOS - https://github.com/zloirock/core-js/issues/624
|
|
125997
|
-
}else if(MessageChannel$1&&!IS_IOS$1){channel=new MessageChannel$1();port=channel.port2;channel.port1.onmessage=listener;defer=bind$
|
|
125999
|
+
}else if(MessageChannel$1&&!IS_IOS$1){channel=new MessageChannel$1();port=channel.port2;channel.port1.onmessage=listener;defer=bind$1(port.postMessage,port,1);// Browsers with postMessage, skip WebWorkers
|
|
125998
126000
|
// IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
|
|
125999
126001
|
}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-
|
|
126000
126002
|
}else if(ONREADYSTATECHANGE in createElement('script')){defer=function(id){html.appendChild(createElement('script'))[ONREADYSTATECHANGE]=function(){html.removeChild(this);run(id);};};// Rest old browsers
|
|
@@ -126011,8 +126013,8 @@
|
|
|
126011
126013
|
// - onreadystatechange
|
|
126012
126014
|
// - setTimeout
|
|
126013
126015
|
}else {notify$1=function(){// strange IE + webpack dev server bug - use .call(global)
|
|
126014
|
-
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$
|
|
126015
|
-
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$
|
|
126016
|
+
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$3=aFunction$6;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$3(resolve);this.reject=aFunction$3(reject);};// 25.4.1.5 NewPromiseCapability(C)
|
|
126017
|
+
newPromiseCapability$2.f=function(C){return new PromiseCapability(C);};var anObject$2$1=anObject$h;var isObject$2=isObject$b;var newPromiseCapability$1=newPromiseCapability$2;var promiseResolve$1=function(C,x){anObject$2$1(C);if(isObject$2(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 $$7=_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$1=isObject$b;var aFunction$2=aFunction$6;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$1=wellKnownSymbol$k;var V8_VERSION=engineV8Version;var SPECIES$4=wellKnownSymbol$1('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
|
|
126016
126018
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=830565
|
|
126017
126019
|
// We can't detect it synchronously, so just check versions
|
|
126018
126020
|
if(V8_VERSION===66)return true;// Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
|
|
@@ -126020,31 +126022,31 @@
|
|
|
126020
126022
|
// deoptimization and performance degradation
|
|
126021
126023
|
// https://github.com/zloirock/core-js/issues/679
|
|
126022
126024
|
if(V8_VERSION>=51&&/native code/.test(PromiseConstructor))return false;// Detect correctness of subclassing with @@species support
|
|
126023
|
-
var promise=PromiseConstructor.resolve(1);var FakePromise=function(exec){exec(function(){/* empty */},function(){/* empty */});};var constructor=promise.constructor={};constructor[SPECIES$
|
|
126024
|
-
var isThenable=function(it){var then;return isObject$
|
|
126025
|
+
var promise=PromiseConstructor.resolve(1);var FakePromise=function(exec){exec(function(){/* empty */},function(){/* empty */});};var constructor=promise.constructor={};constructor[SPECIES$4]=FakePromise;return !(promise.then(function(){/* empty */})instanceof FakePromise);});var INCORRECT_ITERATION=FORCED$2||!checkCorrectnessOfIteration(function(iterable){PromiseConstructor.all(iterable)['catch'](function(){/* empty */});});// helpers
|
|
126026
|
+
var isThenable=function(it){var then;return isObject$1(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
|
|
126025
126027
|
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
|
|
126026
126028
|
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
|
|
126027
|
-
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
|
|
126029
|
+
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
|
|
126028
126030
|
if(FORCED$2){// 25.4.3.1 Promise(executor)
|
|
126029
|
-
PromiseConstructor=function Promise(executor){anInstance(this,PromiseConstructor,PROMISE);aFunction$
|
|
126031
|
+
PromiseConstructor=function Promise(executor){anInstance(this,PromiseConstructor,PROMISE);aFunction$2(executor);Internal.call(this);var state=getInternalState(this);try{executor(bind(internalResolve,this,state),bind(internalReject,this,state));}catch(error){internalReject(this,state,error);}};// eslint-disable-next-line no-unused-vars
|
|
126030
126032
|
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
|
|
126031
126033
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.then
|
|
126032
126034
|
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
|
|
126033
126035
|
// https://tc39.github.io/ecma262/#sec-promise.prototype.catch
|
|
126034
|
-
'catch':function(onRejected){return this.then(undefined,onRejected);}});OwnPromiseCapability=function(){var promise=new Internal();var state=getInternalState(promise);this.promise=promise;this.resolve=bind
|
|
126036
|
+
'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
|
|
126035
126037
|
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
|
|
126036
126038
|
},{unsafe:true});// wrap fetch result
|
|
126037
|
-
if(typeof $fetch=='function')$$
|
|
126038
|
-
fetch:function fetch(input/* , init */){return promiseResolve(PromiseConstructor,$fetch.apply(global$3,arguments));}});}}$$
|
|
126039
|
-
$$
|
|
126039
|
+
if(typeof $fetch=='function')$$7({global:true,enumerable:true,forced:true},{// eslint-disable-next-line no-unused-vars
|
|
126040
|
+
fetch:function fetch(input/* , init */){return promiseResolve(PromiseConstructor,$fetch.apply(global$3,arguments));}});}}$$7({global:true,wrap:true,forced:FORCED$2},{Promise:PromiseConstructor});setToStringTag(PromiseConstructor,PROMISE,false);setSpecies(PROMISE);PromiseWrapper=getBuiltIn(PROMISE);// statics
|
|
126041
|
+
$$7({target:PROMISE,stat:true,forced:FORCED$2},{// `Promise.reject` method
|
|
126040
126042
|
// https://tc39.github.io/ecma262/#sec-promise.reject
|
|
126041
|
-
reject:function reject(r){var capability=newPromiseCapability(this);capability.reject.call(undefined,r);return capability.promise;}});$$
|
|
126043
|
+
reject:function reject(r){var capability=newPromiseCapability(this);capability.reject.call(undefined,r);return capability.promise;}});$$7({target:PROMISE,stat:true,forced:FORCED$2},{// `Promise.resolve` method
|
|
126042
126044
|
// https://tc39.github.io/ecma262/#sec-promise.resolve
|
|
126043
|
-
resolve:function resolve(x){return promiseResolve(this,x);}});$$
|
|
126045
|
+
resolve:function resolve(x){return promiseResolve(this,x);}});$$7({target:PROMISE,stat:true,forced:INCORRECT_ITERATION},{// `Promise.all` method
|
|
126044
126046
|
// https://tc39.github.io/ecma262/#sec-promise.all
|
|
126045
|
-
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$
|
|
126047
|
+
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$2(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
|
|
126046
126048
|
// https://tc39.github.io/ecma262/#sec-promise.race
|
|
126047
|
-
race:function race(iterable){var C=this;var capability=newPromiseCapability(C);var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$
|
|
126049
|
+
race:function race(iterable){var C=this;var capability=newPromiseCapability(C);var reject=capability.reject;var result=perform(function(){var $promiseResolve=aFunction$2(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 React$d.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
|
|
126048
126050
|
// https://tc39.github.io/ecma262/#sec-samevalue
|
|
126049
126051
|
var sameValue$1=Object.is||function is(x,y){// eslint-disable-next-line no-self-compare
|
|
126050
126052
|
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
|
|
@@ -126052,9 +126054,9 @@
|
|
|
126052
126054
|
// https://tc39.github.io/ecma262/#sec-string.prototype.search
|
|
126053
126055
|
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
|
|
126054
126056
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@search
|
|
126055
|
-
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 $$
|
|
126057
|
+
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 $$6=_export;var assign=objectAssign;// `Object.assign` method
|
|
126056
126058
|
// https://tc39.github.io/ecma262/#sec-object.assign
|
|
126057
|
-
$$
|
|
126059
|
+
$$6({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)
|
|
126058
126060
|
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
|
|
126059
126061
|
item.fileAccessToken=null;}});observer.next(cachedPage);}return [4/*yield*/,apiLoader];case 2:apiPage_1=_a.sent();// no need to wait for updating the cache
|
|
126060
126062
|
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
|
|
@@ -126080,26 +126082,26 @@
|
|
|
126080
126082
|
// ></iframe>;
|
|
126081
126083
|
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
|
|
126082
126084
|
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=React$d.useRef();React$d.useEffect(function(){renderContents();// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126083
|
-
},[videoInfo.id,videoInfo.source]);return jsxRuntime.jsx(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__default["default"].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&&_styled.css(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=React$d.useState(!videoInfo.isDirectUrl),showPlayer=_b[0],setShowPlayer=_b[1];if(showPlayer){return jsxRuntime.jsx(VideoView,{videoInfo:videoInfo,autoplay:videoInfo.isDirectUrl,className:className},void 0);}if(videoThumbnailUrl){return jsxRuntime.jsxs(Host$Q,__assign({className:className},{children:[jsxRuntime.jsx(StyledImage,{src:videoThumbnailUrl,imageFit:officeUiFabricReact.ImageFit.cover,maximizeFrame:true},void 0),jsxRuntime.jsx(PlayButton,{onClick:function(){return setShowPlayer(true);},iconProps:{iconName:'MSNVideosSolid'}},void 0)]}),void 0);}return null;};var Host$Q=_styled__default["default"].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__default["default"](officeUiFabricReact.Image).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__default["default"](officeUiFabricReact.IconButton).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 jsxRuntime.jsx(Host$P,__assign({className:className,"data-video-attachment-list":true},{children:videos.map(function(video){return jsxRuntime.jsx(AttachmentHost,__assign({domIdentifier:"video",deleteButton:jsxRuntime.jsx(DeleteAttachmentButton,{"data-remove-attachment-button":video.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(video);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsxRuntime.jsx(VideoPreview,{video:video},void 0)}),video.id);})}),void 0);}var video=videos[0];return jsxRuntime.jsx(PreviewHost$1,__assign({className:className,domIdentifier:"video-url-preview-"+video.id},{children:jsxRuntime.jsx(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 jsxRuntime.jsx(VideoWithThumbnailView,{videoInfo:{id:video.id,source:source,url:video.url,isDirectUrl:parser.isDirectVideoUrl},videoThumbnailUrl:videoThumbnailUrl},void 0);};var Host$P=_styled__default["default"].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__default["default"](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$
|
|
126084
|
-
var createMethod$4=function(IS_RIGHT){return function(that,callbackfn,argumentsLength,memo){aFunction$
|
|
126085
|
+
},[videoInfo.id,videoInfo.source]);return jsxRuntime.jsx(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__default["default"].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&&_styled.css(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=React$d.useState(!videoInfo.isDirectUrl),showPlayer=_b[0],setShowPlayer=_b[1];if(showPlayer){return jsxRuntime.jsx(VideoView,{videoInfo:videoInfo,autoplay:videoInfo.isDirectUrl,className:className},void 0);}if(videoThumbnailUrl){return jsxRuntime.jsxs(Host$Q,__assign({className:className},{children:[jsxRuntime.jsx(StyledImage,{src:videoThumbnailUrl,imageFit:officeUiFabricReact.ImageFit.cover,maximizeFrame:true},void 0),jsxRuntime.jsx(PlayButton,{onClick:function(){return setShowPlayer(true);},iconProps:{iconName:'MSNVideosSolid'}},void 0)]}),void 0);}return null;};var Host$Q=_styled__default["default"].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__default["default"](officeUiFabricReact.Image).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__default["default"](officeUiFabricReact.IconButton).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 jsxRuntime.jsx(Host$P,__assign({className:className,"data-video-attachment-list":true},{children:videos.map(function(video){return jsxRuntime.jsx(AttachmentHost,__assign({domIdentifier:"video",deleteButton:jsxRuntime.jsx(DeleteAttachmentButton,{"data-remove-attachment-button":video.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(video);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsxRuntime.jsx(VideoPreview,{video:video},void 0)}),video.id);})}),void 0);}var video=videos[0];return jsxRuntime.jsx(PreviewHost$1,__assign({className:className,domIdentifier:"video-url-preview-"+video.id},{children:jsxRuntime.jsx(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 jsxRuntime.jsx(VideoWithThumbnailView,{videoInfo:{id:video.id,source:source,url:video.url,isDirectUrl:parser.isDirectVideoUrl},videoThumbnailUrl:videoThumbnailUrl},void 0);};var Host$P=_styled__default["default"].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__default["default"](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$1=aFunction$6;var toObject$2=toObject$6;var IndexedObject=indexedObject;var toLength$1=toLength$8;// `Array.prototype.{ reduce, reduceRight }` methods implementation
|
|
126086
|
+
var createMethod$4=function(IS_RIGHT){return function(that,callbackfn,argumentsLength,memo){aFunction$1(callbackfn);var O=toObject$2(that);var self=IndexedObject(O);var length=toLength$1(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
|
|
126085
126087
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
126086
126088
|
left:createMethod$4(false),// `Array.prototype.reduceRight` method
|
|
126087
126089
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduceright
|
|
126088
126090
|
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
|
|
126089
|
-
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 $$
|
|
126091
|
+
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 $$5=_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
|
|
126090
126092
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reduce
|
|
126091
|
-
$$
|
|
126093
|
+
$$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=React$d.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 jsxRuntime.jsx(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&&jsxRuntime.jsx(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 jsxRuntime.jsxs(KeywordsList$1,__assign({className:classNames('ms-fontColor-neutralSecondaryAlt',className)},{children:[jsxRuntime.jsxs(KeywordsListTitle,{children:[jsxRuntime.jsx(KeywordTitle,{groupName:groupName,language:language},void 0),":"]},void 0),keywords[groupId].map(function(k){var Title=jsxRuntime.jsx(KeywordTitle,{groupName:groupName,keywordName:k.name,language:language},void 0);return jsxRuntime.jsx(KeywordsListItem,{children:filterBaseUrl?jsxRuntime.jsx(ReactRouterDom.NavLink,__assign({"data-keyword":true,className:"ms-fontColor-neutralSecondaryAlt",to:filterBaseUrl+"?"+queryString.stringify({keywords:k.id})},{children:Title}),void 0):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[" ",Title," "]},void 0)},groupName+k.name);})]}),void 0);};var Host$O=_styled__default["default"].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__default["default"].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__default["default"].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__default["default"].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=ReactRouterDom.useLocation();var currentParamsObject=queryString.parse(location.search);var selectedKeywordGroups=React$d.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 jsxRuntime.jsx("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 jsxRuntime.jsx(ReactRouterDom.NavLink,__assign({"data-keyword":true,to:filterBaseUrl+"?"+queryString.stringify(currentParamsObject)},{children:useGridKeywordTitle?jsxRuntime.jsx(GridKeywordTitle,{keywordName:keyword.name,groupId:groupId},void 0):jsxRuntime.jsx(KeywordTitle,{keywordName:keyword.name,groupId:groupId,underlined:true},void 0)}),groupId+keyword.id);}return useGridKeywordTitle?jsxRuntime.jsx(GridKeywordTitle,{keywordName:keyword.name,groupId:groupId},groupId+keyword.id):jsxRuntime.jsx(KeywordTitle,{keywordName:keyword.name,groupId:groupId},groupId+keyword.id);});}).reduce(function(result,next){return result.concat(next);},[])}),void 0);};var FlatKeywords=_styled__default["default"](Keywords$3).withConfig({displayName:"KeywordsInfo__FlatKeywords",componentId:"sc-woteiy-4"})(templateObject_5$B||(templateObject_5$B=__makeTemplateObject(["\n > a,\n > a:link,\n > a:visited,\n > span {\n color: ",";\n\n &:not(:last-child) {\n &::after {\n content: ', ';\n }\n }\n }\n\n a {\n position: relative;\n z-index: 1;\n }\n"],["\n > a,\n > a:link,\n > a:visited,\n > span {\n color: ",";\n\n &:not(:last-child) {\n &::after {\n content: ', ';\n }\n }\n }\n\n a {\n position: relative;\n z-index: 1;\n }\n"])),function(p){return p.theme.palette.neutralSecondaryAlt;});var templateObject_1$2a,templateObject_2$1n,templateObject_3$X,templateObject_4$H,templateObject_5$B;var fixRegExpWellKnownSymbolLogic$4=fixRegexpWellKnownSymbolLogic$1;var anObject$i=anObject$h;var toObject$1=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
|
|
126092
126094
|
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
|
|
126093
126095
|
// https://tc39.github.io/ecma262/#sec-string.prototype.replace
|
|
126094
126096
|
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
|
|
126095
126097
|
// https://tc39.github.io/ecma262/#sec-regexp.prototype-@@replace
|
|
126096
|
-
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$
|
|
126098
|
+
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$9(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
|
|
126097
126099
|
// captures = result.slice(1).map(maybeToString)
|
|
126098
126100
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
126099
126101
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
126100
126102
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
126101
126103
|
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
|
|
126102
|
-
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$
|
|
126104
|
+
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?
|
|
126103
126105
|
var n=+ch;if(n===0)return match;if(n>m){var f=floor(n/10);if(f===0)return match;if(f<=m)return captures[f-1]===undefined?ch.charAt(1):captures[f-1]+ch.charAt(1);return match;}capture=captures[n-1];}return capture===undefined?'':capture;});}});var NewsService=/** @class */function(){function NewsService(){}NewsService.getNewsRouteWithRedirect=function(baseRoute,newsId,newsTitle,isExternalContent){var route=!isExternalContent?baseRoute:baseRoute.replace('/news','/redirect/news');return this.getNewsRoute(route,newsId,newsTitle,isExternalContent);};NewsService.getNewsRoute=function(baseRoute,newsId,newsTitle,isExternalContent){var route=baseRoute+"/"+encodeURIComponent(newsId);if(newsTitle){route=route+"/"+slugify(newsTitle,{remove:/[%.#]/});}return isExternalContent?route+"?"+queryString.stringify({noRedirect:true}):route;};NewsService.getItemContentLanguages=function(item,languages){if(!item){return [];}return NewsService.getContentLanguages(item.contents,languages);};NewsService.getContentLanguages=function(contents,languages,contentValidator){if(!contents){return [];}var allLanguages=Object.keys(contents);if(!allLanguages.length){return [];}var activeLanguages=allLanguages.filter(function(l){return contents[l].active&&languages.find(function(sl){return sl.code===l;})&&(!contentValidator||contentValidator(contents[l]));});if(contentValidator){return activeLanguages;}return activeLanguages.length?activeLanguages:[allLanguages[0]];};NewsService.getLanguageForPublishableItem=function(item,user,contentValidator){if(!user||!item||!item.contents||!user.subscription){return null;}return NewsService.getLanguageForContent(item.contents,user,contentValidator);};NewsService.getLanguageForContent=function(contents,user,contentValidator){if(!contents){return null;}var activeLanguages=NewsService.getContentLanguages(contents,user.subscription.languages,contentValidator);return NewsService.getUserPreferredLanguage(activeLanguages,user);};NewsService.getUserPreferredLanguage=function(languages,user){if(!languages){return null;}var preferredLanguage=getPreferredContentLanguage(user);var subscription=user.subscription;if(languages.find(function(l){return l===preferredLanguage;})){return preferredLanguage;}if(languages.find(function(l){return l===subscription.defaultLanguage;})){return subscription.defaultLanguage;}return languages[0];};return NewsService;}();var ClickableOverlay=function ClickableOverlay(_a){var title=_a.title,itemId=_a.itemId,itemType=_a.itemType,baseRoute=_a.baseRoute,ariaLabelResourceKey=_a.ariaLabelResourceKey,onClick=_a.onClick,openTargetInNewWindow=_a.openTargetInNewWindow,isExternalContent=_a.isExternalContent;var formatMessage=useIntl().formatMessage;var targetRoute=itemType===ItemResourceTypes.Posts||itemType===ItemResourceTypes.Comments?baseRoute:NewsService.getNewsRoute(baseRoute,itemId,title,isExternalContent);if(openTargetInNewWindow){return jsxRuntime.jsx(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 jsxRuntime.jsx(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=_styled.css(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__default["default"](ReactRouterDom.Link).withConfig({displayName:"ClickableOverlay__StyledLink",componentId:"sc-yfxl9c-0"})(templateObject_2$1m||(templateObject_2$1m=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),Style);var ExternalLink$1=_styled__default["default"].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 jsxRuntime.jsxs(PostHost,__assign({className:className,backgroundColor:backgroundColor},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{baseRoute:buildPath("/posts/"+post.id),itemId:post.id,itemType:ItemResourceTypes.Posts,ariaLabelResourceKey:"AriaLabel.itemLink"},void 0),jsxRuntime.jsxs(Header$3,{children:[jsxRuntime.jsx(StyledPersonaCard$3,__assign({upn:post.author.userPrincipalName,domIdentifier:"avatar"},{children:jsxRuntime.jsx(Avatar,{upn:post.author.userPrincipalName,text:post.author.displayName,size:officeUiFabricReact.PersonaSize.size40,hidePersonaDetails:true},void 0)}),void 0),jsxRuntime.jsxs(HeaderMetadata$2,{children:[jsxRuntime.jsx(PostDisplayName$1,__assign({"data-author":true},{children:post.author.displayName}),void 0),jsxRuntime.jsx(PostDateTime$1,{className:"ms-fontColor-neutralTertiary",value:post.publishingDate},void 0),jsxRuntime.jsx(Modified,{modified:post.modified},void 0)]},void 0)]},void 0),jsxRuntime.jsx(Content$8,{children:jsxRuntime.jsx(ContentDisplay,{content:post.content,handlers:[ContentDisplayHandler.LineBreak,ContentDisplayHandler.Link,ContentDisplayHandler.Mention,ContentDisplayHandler.Hashtag]},void 0)},void 0),features.keywords&&features.postKeywords&&post.keywords&&jsxRuntime.jsx(StyledKeywordsInfo$1,{keywords:post.keywords},void 0)]}),void 0);};var PostHost=_styled__default["default"].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?_styled.css(templateObject_1$28||(templateObject_1$28=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):_styled.css(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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"](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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:locationLink?jsxRuntime.jsx(TextLink,__assign({url:locationLink,ariaLabel:alternativeCaption||location.name},{children:alternativeCaption||location.name}),void 0):jsxRuntime.jsx("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 jsxRuntime.jsx(Host$N,__assign({className:className},{children:jsxRuntime.jsxs(ListWrapper,__assign({"data-event-locations":true,isMultiLine:isMultiLine},{children:[jsxRuntime.jsx(Label,{resourceKey:"Events.locationsLabel",count:locations.length},void 0),jsxRuntime.jsx(List$2,__assign({isMultiLine:isMultiLine},{children:locations.map(function(l){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(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 jsxRuntime.jsxs(Host$N,__assign({className:className},{children:[contactsCount>0&&jsxRuntime.jsxs(Contacts$1,__assign({"data-event-people":"contacts",isMultiLine:isMultiLine,hideAnnouncer:hideAnnouncer},{children:[jsxRuntime.jsx(Label,{resourceKey:"Events.contactsLabel",count:contactsCount},void 0),jsxRuntime.jsx(List$2,__assign({isMultiLine:isMultiLine},{children:item.contacts.map(function(c){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(EventUser,{user:c,className:"ms-fontColor-accent"},void 0)},c.userPrincipalName);})}),void 0)]}),void 0),!hideAnnouncer&&author&&jsxRuntime.jsxs(ListWrapper,__assign({"data-event-people":"author",isMultiLine:false},{children:[jsxRuntime.jsx(Label,{resourceKey:"Events.authorLabel"},void 0),jsxRuntime.jsx(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 jsxRuntime.jsx("div",__assign({className:className},{children:jsxRuntime.jsx(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 jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(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 jsxRuntime.jsx(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__default["default"].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__default["default"].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__default["default"](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__default["default"](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__default["default"].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&&_styled.css(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__default["default"](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 jsxRuntime.jsxs(Host$M,__assign({onClick:function(){return openImageUrl&&showPhoto();},className:classNames('bannerImage',className)},{children:[jsxRuntime.jsx(officeUiFabricReact.Image,{src:imageUrl,imageFit:officeUiFabricReact.ImageFit.cover,maximizeFrame:true,alt:""},void 0),children]}),void 0);};var Host$M=_styled__default["default"].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=React$d.useContext(AuthenticationContext).onRequestToken;return React$d.useMemo(function(){return {getImageInfo:getImageInfo,getImageEditorUrl:getImageEditorUrl,getOriginalImageEditorUrlWithToken:getOriginalImageEditorUrlWithToken,getImageEditorUrlWithToken:getImageEditorUrlWithToken,uploadImage:uploadImage};/**
|
|
126104
126106
|
* Retrieve information on a given image. Does not return the actual image.
|
|
126105
126107
|
*/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
|
|
@@ -126108,10 +126110,10 @@
|
|
|
126108
126110
|
// any promise failures are expected be handled from the code consuming the observable
|
|
126109
126111
|
return [4/*yield*/,fetchFromApi("/editor/"+resourceType+"/"+newImage.itemId+"/images/"+newImage.identifier+"/"+newImage.variant,config)];case 2:// error handling is not done here
|
|
126110
126112
|
// any promise failures are expected be handled from the code consuming the observable
|
|
126111
|
-
_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=React$d.useState(false),showPlayer=_b[0],setShowPlayer=_b[1];var user=useCurrentUser();var features=useFeatures();var onOpenExternalLink=React$d.useContext(LinkContext).onOpenExternalLink;var formatMessage=useIntl().formatMessage;React$d.useEffect(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 jsxRuntime.jsx(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 jsxRuntime.jsxs(StyledBannerImage,__assign({isVideo:!isImage,imageUrl:imageUrl,openImageUrl:props.canOpenImage&&env.isNativeMobileApp?getImageUrl(isEdit,true,'default'):null,className:props.className},{children:[isPlayableVideo&&jsxRuntime.jsx(VideoButtonOverlay,{onClick:handlePlayClick,iconProps:{iconName:'MSNVideosSolid',className:'video-icon'},ariaLabel:formatMessage({id:'Generic.watchVideo'})},void 0),isStreamVideo&&env.isNativeMobileApp&&(features.inAppBrowser?jsxRuntime.jsx(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:jsxRuntime.jsx(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0):jsxRuntime.jsx(VideoLinkOverlay,__assign({url:streamVideoUrl,ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsxRuntime.jsx(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__default["default"](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&&_styled.css(templateObject_1$25||(templateObject_1$25=__makeTemplateObject(["\n position: relative;\n "],["\n position: relative;\n "])));});var BannerVideoOverlay=_styled.css(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=_styled.css(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__default["default"](officeUiFabricReact.IconButton).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__default["default"](ExternalLinkHandler).withConfig({displayName:"PublishableItemBanner__VideoLinkOverlay",componentId:"sc-bjnycc-2"})(templateObject_6$n||(templateObject_6$n=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),BannerVideoOverlay);var VideoIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PublishableItemBanner__VideoIcon",componentId:"sc-bjnycc-3"})(templateObject_7$i||(templateObject_7$i=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),VideoIconStyle);var StyledVideoView=_styled__default["default"](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 jsxRuntime.jsx("div",{children:jsxRuntime.jsx(LeftBannerWrapper,__assign({defaultWidth:bannerHostDefaultWidth,showPlaceholder:showPlaceholder},{children:jsxRuntime.jsx(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 jsxRuntime.jsxs(CountButtonHost,__assign({className:className,"data-feedback":feedbackType,"data-feedback-button-isactive":isActive!==null&&isActive!==void 0?isActive:false,"data-feedback-count":count},{children:[jsxRuntime.jsx(IEMarginFix,{},void 0),jsxRuntime.jsx(PreloadIcons,{icons:[activeIconName,iconName]},void 0),jsxRuntime.jsx(TooltipHost,__assign({resourceKey:resourceKey,values:resourceValues,hidden:hideTooltip},{children:onClick?jsxRuntime.jsx(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:jsxRuntime.jsx(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount},void 0)}),void 0):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(StyledIcon$7,{iconName:isActive?activeIconName:iconName,highlight:highlight,"data-unread-comment-highlight":highlight},void 0),jsxRuntime.jsx(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 jsxRuntime.jsx(CountLabel,__assign({isHidden:shouldHideZeroCount,"aria-label":ariaLabel},{children:count}),void 0);};var TooltipHost=_styled__default["default"](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__default["default"].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=_styled.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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"].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&&_styled.css(templateObject_6$m||(templateObject_6$m=__makeTemplateObject(["\n visibility: hidden;\n "],["\n visibility: hidden;\n "])));},function(p){return p.isDisabled&&_styled.css(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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:icons.filter(function(i){return i;}).map(function(i){return jsxRuntime.jsx(PreloadIcon,{iconName:i},i);})},void 0);};var PreloadIcon=_styled__default["default"](officeUiFabricReact.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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(IEFix$1,{},void 0),jsxRuntime.jsx(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__default["default"](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=_styled.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 jsxRuntime.jsxs(Host$L,__assign({className:className,"data-event-cancelled-info":true},{children:[jsxRuntime.jsxs(TitleContainer,{children:[jsxRuntime.jsx(CancelIcon,{iconName:"RemoveEvent"},void 0),jsxRuntime.jsx(Title$8,{id:"Events.cancel.cancelled"},void 0)]},void 0),reason]}),void 0);};var Host$L=_styled__default["default"].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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"](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__*/React$d.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 jsxRuntime.jsxs(Host$K,__assign({className:className,"aria-label":formatMessage({id:'Events.registration.sectionLabel'})},{children:[jsxRuntime.jsx(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&&jsxRuntime.jsxs(InfoMessage,__assign({"data-event-register-info":true},{children:[jsxRuntime.jsx(officeUiFabricReact.Icon,{iconName:"Info"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:infoMessageResourceKey},void 0)]}),void 0)]}),void 0);};var Host$K=_styled__default["default"].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__default["default"](officeUiFabricReact.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&&_styled.css(templateObject_2$1f||(templateObject_2$1f=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.neutralQuaternaryAlt);},function(p){return p.isRegistered&&_styled.css(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__default["default"].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
|
|
126113
|
+
_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=React$d.useState(false),showPlayer=_b[0],setShowPlayer=_b[1];var user=useCurrentUser();var features=useFeatures();var onOpenExternalLink=React$d.useContext(LinkContext).onOpenExternalLink;var formatMessage=useIntl().formatMessage;React$d.useEffect(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 jsxRuntime.jsx(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 jsxRuntime.jsxs(StyledBannerImage,__assign({isVideo:!isImage,imageUrl:imageUrl,openImageUrl:props.canOpenImage&&env.isNativeMobileApp?getImageUrl(isEdit,true,'default'):null,className:props.className},{children:[isPlayableVideo&&jsxRuntime.jsx(VideoButtonOverlay,{onClick:handlePlayClick,iconProps:{iconName:'MSNVideosSolid',className:'video-icon'},ariaLabel:formatMessage({id:'Generic.watchVideo'})},void 0),isStreamVideo&&env.isNativeMobileApp&&(features.inAppBrowser?jsxRuntime.jsx(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:jsxRuntime.jsx(VideoIcon,{iconName:"MSNVideosSolid",className:"video-icon"},void 0)}),void 0):jsxRuntime.jsx(VideoLinkOverlay,__assign({url:streamVideoUrl,ariaLabel:formatMessage({id:'Generic.watchMicrosoftStream'})},{children:jsxRuntime.jsx(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__default["default"](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&&_styled.css(templateObject_1$25||(templateObject_1$25=__makeTemplateObject(["\n position: relative;\n "],["\n position: relative;\n "])));});var BannerVideoOverlay=_styled.css(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=_styled.css(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__default["default"](officeUiFabricReact.IconButton).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__default["default"](ExternalLinkHandler).withConfig({displayName:"PublishableItemBanner__VideoLinkOverlay",componentId:"sc-bjnycc-2"})(templateObject_6$n||(templateObject_6$n=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),BannerVideoOverlay);var VideoIcon=_styled__default["default"](officeUiFabricReact.Icon).withConfig({displayName:"PublishableItemBanner__VideoIcon",componentId:"sc-bjnycc-3"})(templateObject_7$i||(templateObject_7$i=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),VideoIconStyle);var StyledVideoView=_styled__default["default"](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 jsxRuntime.jsx("div",{children:jsxRuntime.jsx(LeftBannerWrapper,__assign({defaultWidth:bannerHostDefaultWidth,showPlaceholder:showPlaceholder},{children:jsxRuntime.jsx(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 jsxRuntime.jsxs(CountButtonHost,__assign({className:className,"data-feedback":feedbackType,"data-feedback-button-isactive":isActive!==null&&isActive!==void 0?isActive:false,"data-feedback-count":count},{children:[jsxRuntime.jsx(IEMarginFix,{},void 0),jsxRuntime.jsx(PreloadIcons,{icons:[activeIconName,iconName]},void 0),jsxRuntime.jsx(TooltipHost,__assign({resourceKey:resourceKey,values:resourceValues,hidden:hideTooltip},{children:onClick?jsxRuntime.jsx(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:jsxRuntime.jsx(CountDisplay,{count:count,doNotRenderZeroCount:doNotRenderZeroCount,hideZeroCount:hideZeroCount},void 0)}),void 0):jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(StyledIcon$7,{iconName:isActive?activeIconName:iconName,highlight:highlight,"data-unread-comment-highlight":highlight},void 0),jsxRuntime.jsx(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 jsxRuntime.jsx(CountLabel,__assign({isHidden:shouldHideZeroCount,"aria-label":ariaLabel},{children:count}),void 0);};var TooltipHost=_styled__default["default"](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__default["default"].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=_styled.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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"].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&&_styled.css(templateObject_6$m||(templateObject_6$m=__makeTemplateObject(["\n visibility: hidden;\n "],["\n visibility: hidden;\n "])));},function(p){return p.isDisabled&&_styled.css(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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:icons.filter(function(i){return i;}).map(function(i){return jsxRuntime.jsx(PreloadIcon,{iconName:i},i);})},void 0);};var PreloadIcon=_styled__default["default"](officeUiFabricReact.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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(IEFix$1,{},void 0),jsxRuntime.jsx(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__default["default"](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=_styled.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 jsxRuntime.jsxs(Host$L,__assign({className:className,"data-event-cancelled-info":true},{children:[jsxRuntime.jsxs(TitleContainer,{children:[jsxRuntime.jsx(CancelIcon,{iconName:"RemoveEvent"},void 0),jsxRuntime.jsx(Title$8,{id:"Events.cancel.cancelled"},void 0)]},void 0),reason]}),void 0);};var Host$L=_styled__default["default"].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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"](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__*/React$d.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 jsxRuntime.jsxs(Host$K,__assign({className:className,"aria-label":formatMessage({id:'Events.registration.sectionLabel'})},{children:[jsxRuntime.jsx(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&&jsxRuntime.jsxs(InfoMessage,__assign({"data-event-register-info":true},{children:[jsxRuntime.jsx(officeUiFabricReact.Icon,{iconName:"Info"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:infoMessageResourceKey},void 0)]}),void 0)]}),void 0);};var Host$K=_styled__default["default"].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__default["default"](officeUiFabricReact.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&&_styled.css(templateObject_2$1f||(templateObject_2$1f=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.neutralQuaternaryAlt);},function(p){return p.isRegistered&&_styled.css(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__default["default"].span.withConfig({displayName:"EventRegistrationButton__InfoMessage",componentId:"sc-rvaf0t-2"})(templateObject_5$w||(templateObject_5$w=__makeTemplateObject(["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"],["\n display: flex;\n align-items: center;\n font-style: italic;\n margin-top: ","px;\n font-size: ","px;\n\n i {\n padding-right: ","px;\n }\n"])),spacingXs,fontSizeSmall,spacingXs);var templateObject_1$21,templateObject_2$1f,templateObject_3$Q,templateObject_4$B,templateObject_5$w;var $$4=_export;var DESCRIPTORS=descriptors;var global$2=global$m;var has=has$c;var isObject=isObject$b;var defineProperty=objectDefineProperty.f;var copyConstructorProperties=copyConstructorProperties$2;var NativeSymbol=global$2.Symbol;if(DESCRIPTORS&&typeof NativeSymbol=='function'&&(!('description'in NativeSymbol.prototype)||// Safari 12 bug
|
|
126112
126114
|
NativeSymbol().description!==undefined)){var EmptyStringDescriptionStore={};// wrap Symbol constructor for correct work with undefined description
|
|
126113
126115
|
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)'
|
|
126114
|
-
: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
|
|
126116
|
+
: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;}});$$4({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 jsxRuntime.jsx("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
|
|
126115
126117
|
return null;}return jsxRuntime.jsx(MessageContainer,__assign({domIdentifier:"multi-location-no-seats-left",className:className},{children:jsxRuntime.jsx(NoSeatsMessage,{id:"Events.registration.locations.noSeatsLeft"},void 0)}),void 0);}var location=locations[0];if(hasAnySeatsLeft){return jsxRuntime.jsx(MessageContainer,__assign({domIdentifier:"one-location-number-of-seats-left",className:className},{children:jsxRuntime.jsx(SeatsInfoMessage,{id:"Events.registration.locations.seatsLeftInLocation",values:{available:location.seatsLeft,b:function(text){return jsxRuntime.jsx("span",{children:text},void 0);}}},void 0)}),void 0);}return jsxRuntime.jsx(MessageContainer,__assign({domIdentifier:"one-location-no-seats-left",className:className},{children:jsxRuntime.jsx(NoSeatsMessage,{id:"Events.registration.locations.leftSeats",values:{total:location.maxNumberOfSeats,available:location.seatsLeft,b:function(text){return jsxRuntime.jsx("span",{children:text},void 0);}}},void 0)}),void 0);};var SeatsInfoMessage=_styled__default["default"](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__default["default"](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 jsxRuntime.jsx("div",__assign({"data-seats-info":domIdentifier,className:className},{children:children}),void 0);};var templateObject_1$20,templateObject_2$1e;var EventRegistrationInfoDescription=_styled__default["default"](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 jsxRuntime.jsx(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 jsxRuntime.jsx(EventRegistrationInfoDescription,{className:className,id:"Events.registration.deadline.title",values:{isPast:isPastDeadline,deadlineRelative:hasDeadline&&jsxRuntime.jsx(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 jsxRuntime.jsxs(Dialog,__assign({hidden:!visible,modalProps:{isBlocking:false},dialogContentProps:{type:officeUiFabricReact.DialogType.normal,title:formatMessage({id:isRegistered?'Events.registration.recurringEvent.deregister':'Events.registration.recurringEvent.register'})},onDismiss:onDismiss},{children:[jsxRuntime.jsxs(DialogContent$1,__assign({"data-registration-full-series":true},{children:[recurrenceSettingsEndDate&&jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.lastOccurrence",values:{date:moment(recurrenceSettingsEndDate).format('L')},tagName:"p"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:isRegistered?'Events.registration.fullSeriesDeregistered':'Events.registration.fullSeriesRegistered',tagName:"p"},void 0)]}),void 0),jsxRuntime.jsxs(officeUiFabricReact.DialogFooter,{children:[jsxRuntime.jsx(officeUiFabricReact.DefaultButton,__assign({onClick:onDismiss,"data-button":"cancel"},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0),jsxRuntime.jsx(officeUiFabricReact.PrimaryButton,__assign({onClick:function(){return onClick(!isRegistered);},"data-button":"save"},{children:jsxRuntime.jsx(FormattedMessage$1,{id:isRegistered?'Events.registration.deregisterButtonCaption':'Events.registration.registerButtonCaption'},void 0)}),void 0)]},void 0)]}),void 0);};var DialogContent$1=_styled__default["default"].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 React$d.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 React$d.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=ReactRouterDom.useHistory();var user=useCurrentUserContext().user;var refreshUserDetails=useRefreshUserDetails();var _d=React$d.useState(false),isSaving=_d[0],setIsSaving=_d[1];var _e=React$d.useState(false),showRegisterFullSeriesDialog=_e[0],setShowRegisterFullSeriesDialog=_e[1];var toastHandleRef=React$d.useRef(null);var buildPath=useSubscriptionHandlePathBuilder().buildPath;var followPublicPublishableItemComments=useManageCurrentUserApi().followPublicPublishableItemComments;var setEventRegistration=useEventRegistrationApi().setEventRegistration;var _f=React$d.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 jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx(DeadlineInfo,{item:item,isRegistered:isRegistered},void 0),jsxRuntime.jsx(SeatsInfo,{hasAnySeatsLeft:seatsInfo.hasAnySeatsLeft,locations:seatsInfo.locations},void 0),jsxRuntime.jsx(StatusInfo,{isRegistered:isRegistered,onBehalfOfUpn:onBehalfOfUpn},void 0),jsxRuntime.jsx(EventRegistrationButton,{isRegistered:isRegistered,disabled:isButtonDisabled(),onClick:function(){return handleClick(!isRegistered);},showInfoMessage:showInfoMessage,infoMessageResourceKey:isRegistered?'Events.registration.fullSeriesDeregistered':'Events.registration.fullSeriesRegistered'},void 0),showRegisterFullSeriesDialog&&jsxRuntime.jsx(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__default["default"](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__default["default"](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__default["default"](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=React$d.useState(item.userResponse),eventResponse=_b[0],setEventResponse=_b[1];var isRegistered=eventResponse===EventResponse.Registered;// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126116
126118
|
var seatsInfo=React$d.useMemo(getSeatsInfo,[isRegistered,item.id]);return jsxRuntime.jsx(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:jsxRuntime.jsx(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
|
|
126117
126119
|
// since to get this information we need to load all results of all items
|
|
@@ -126120,12 +126122,12 @@
|
|
|
126120
126122
|
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=React$d.useRef(null);return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(LikersListShimmer,__assign({count:Math.min(likersCount,defaultShimmerCount),isLoading:isInitialLoading&&likersCount>0},{children:jsxRuntime.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 jsxRuntime.jsx("li",{children:jsxRuntime.jsx(PersonaCard,__assign({upn:i.userPrincipalName},{children:jsxRuntime.jsx(StyledAvatar$2,{"data-liker":i.userPrincipalName,upn:i.userPrincipalName,text:i.displayName},void 0)}),void 0)},i.id);}),isLoadingNextPage&&jsxRuntime.jsx(StyledSpinner$3,{},void 0),likersInfo&&!likersInfo.token&&likersInfo.likers.length>defaultShimmerCount&&jsxRuntime.jsx(UsersLoadedIndicator,{children:jsxRuntime.jsx(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&&jsxRuntime.jsx(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
|
|
126121
126123
|
// or we are already loading the next page
|
|
126122
126124
|
if(likersInfo.token==null||isLoading){return [2/*return*/];}// check if user scrolled enough
|
|
126123
|
-
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__default["default"](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__default["default"].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__default["default"](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 jsxRuntime.jsx(officeUiFabricReact.Shimmer,__assign({isDataLoaded:!isLoading,customElementsGroup:Array.from(Array(count)).map(function(_,i){return jsxRuntime.jsx(UserShimmer,{},i);})},{children:children}),void 0);};var UserShimmer=function UserShimmer(){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(officeUiFabricReact.ShimmerElementsGroup,{shimmerElements:[{type:officeUiFabricReact.ShimmerElementType.gap,height:10,width:'100%'}]},void 0),jsxRuntime.jsx(officeUiFabricReact.ShimmerElementsGroup,{shimmerElements:[{type:officeUiFabricReact.ShimmerElementType.circle,height:48,verticalAlign:'bottom'},{type:officeUiFabricReact.ShimmerElementType.gap,height:15},{type:officeUiFabricReact.ShimmerElementType.gap,height:15},{type:officeUiFabricReact.ShimmerElementType.line,height:18}]},void 0)]},void 0);};var UsersLoadedIndicator=_styled__default["default"].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__default["default"].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"])));_styled.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=React$d.useState(false),showCallout=_b[0],setshowCallout=_b[1];var buttonRef=React$d.useRef(null);var timeout=React$d.useRef(null);React$d.useEffect(function(){return function(){return window.clearTimeout(timeout.current);};},[]);return jsxRuntime.jsxs("div",__assign({ref:buttonRef,onMouseEnter:handleOnMouseEnter,onMouseLeave:handleOnMouseLeave},{children:[jsxRuntime.jsx("div",{children:children},void 0),showCallout&&jsxRuntime.jsx(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 jsxRuntime.jsxs(StyledCallout,__assign({target:target,onDismiss:onDismiss,directionalHint:DirectionalHint.DirectionalHint.leftCenter},{children:[jsxRuntime.jsxs(LikedBy,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.likers"},void 0),":"]},void 0),jsxRuntime.jsx(LikersList,{itemId:itemId,itemType:itemType,likersCount:likersCount},void 0)]}),void 0);};var StyledCallout=_styled__default["default"](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__default["default"].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=jsxRuntime.jsx(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 jsxRuntime.jsx(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=React$d.useState(item.isLiked),isLiked=_e[0],setIsLiked=_e[1];var _f=React$d.useState((_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=React$d.useState(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 jsxRuntime.jsx(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__default["default"](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 jsxRuntime.jsx(Host$J,__assign({className:className},{children:jsxRuntime.jsx(StyledTooltip$3,__assign({resourceKey:"Events.editor.recurrence.iconTooltip",values:{endDate:moment(endDate).format('LL')},hidden:!endDate},{children:jsxRuntime.jsxs(Container$2,{children:[jsxRuntime.jsx(StyledIcon$6,{iconName:"RecurringEvent"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.editor.recurrence.series"},void 0)]},void 0)}),void 0)}),void 0);};var Host$J=_styled__default["default"].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__default["default"](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__default["default"].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__default["default"](officeUiFabricReact.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 jsxRuntime.jsx(StyledNavLink$2,__assign({to:buildPath("/events/upcoming?"+queryString.stringify({seriesId:recurrenceSeriesId,seriesTitle:title})),className:className},{children:children}),void 0);};var StyledNavLink$2=_styled__default["default"](ReactRouterDom.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 jsxRuntime.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:[jsxRuntime.jsx(IEFix,{},void 0),!readOnly&&jsxRuntime.jsx(ClickableOverlay,{baseRoute:buildPath('/events'),title:contents.title,itemId:item.id,itemType:ItemResourceTypes.Events},void 0),jsxRuntime.jsx(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),jsxRuntime.jsxs(Content$7,{children:[jsxRuntime.jsxs(Header$2,__assign({"data-card-header":true},{children:[jsxRuntime.jsx(Dates,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled,className:"event-card-dates"},void 0),showFeedbackButtons&&jsxRuntime.jsx(Feedback,{item:item,type:"header",targetRoute:targetRoute},void 0)]}),void 0),readOnly?jsxRuntime.jsx(RecurrenceSeriesInfo$1,{eventItem:item},void 0):jsxRuntime.jsx(EventRecurrenceSeriesInfoNavLink,{recurrenceSeriesId:item.recurrenceSeriesId,title:contents.title,children:jsxRuntime.jsx(RecurrenceSeriesInfo$1,{eventItem:item},void 0)},void 0),jsxRuntime.jsx(Title$7,{children:readOnly?contents.title:jsxRuntime.jsx(StyledLink,__assign({to:targetRoute},{children:contents.title}),void 0)},void 0),jsxRuntime.jsxs(Footer$1,{children:[jsxRuntime.jsxs(FooterStart,{children:[jsxRuntime.jsx(Locations,{locations:item.locations},void 0),jsxRuntime.jsx(Contacts,{item:item,hideAnnouncer:true},void 0),jsxRuntime.jsx(EventChannelsDisplay,{item:item,language:userLanguage,allowFilterByChannels:allowFilterByChannels,channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0),jsxRuntime.jsxs(FooterEnd,{children:[jsxRuntime.jsx(Registration,{item:item,disabled:readOnly},void 0),jsxRuntime.jsx(CancelInfo,{item:item},void 0),showFeedbackButtons&&jsxRuntime.jsx(Feedback,{item:item,type:"footer",targetRoute:targetRoute},void 0)]},void 0)]},void 0)]},void 0)]}),void 0);};var Host$I=_styled__default["default"].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?_styled.css(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)):_styled.css(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&&_styled.css(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=_styled.css(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__default["default"](ReactRouterDom.Link).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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"].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=_styled.css(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=_styled.css(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__default["default"].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 jsxRuntime.jsxs(FeedbackHost,__assign({isHeader:type==='header'},{children:[jsxRuntime.jsx(EventCardLikeButton,{item:item,itemResourceType:ItemResourceTypes.Events},void 0),showCommentCount&&jsxRuntime.jsx(StyledLink,__assign({to:targetRoute+"#comments","aria-hidden":"true"},{children:jsxRuntime.jsx(EventCardCommentCount,{item:item},void 0)}),void 0)]}),void 0);};var EventCardLikeButton=_styled__default["default"](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__default["default"](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__default["default"](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__default["default"](EventLocationInfo).withConfig({displayName:"EventCard__Locations",componentId:"sc-19skrau-13"})(templateObject_20$1||(templateObject_20$1=__makeTemplateObject([""],[""])));var Contacts=_styled__default["default"](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__default["default"](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=_styled.createGlobalStyle(templateObject_23$1||(templateObject_23$1=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"])));var templateObject_1$1S,templateObject_2$18,templateObject_3$M,templateObject_4$y,templateObject_5$v,templateObject_6$l,templateObject_7$g,templateObject_8$f,templateObject_9$c,templateObject_10$b,templateObject_11$7,templateObject_12$6,templateObject_13$5,templateObject_14$5,templateObject_15$5,templateObject_16$5,templateObject_17$4,templateObject_18$3,templateObject_19$3,templateObject_20$1,templateObject_21$1,templateObject_22$1,templateObject_23$1;var $$4=_export;var aFunction$1=aFunction$7;var toObject$1=toObject$7;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
|
|
126125
|
+
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__default["default"](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__default["default"].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__default["default"](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 jsxRuntime.jsx(officeUiFabricReact.Shimmer,__assign({isDataLoaded:!isLoading,customElementsGroup:Array.from(Array(count)).map(function(_,i){return jsxRuntime.jsx(UserShimmer,{},i);})},{children:children}),void 0);};var UserShimmer=function UserShimmer(){return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(officeUiFabricReact.ShimmerElementsGroup,{shimmerElements:[{type:officeUiFabricReact.ShimmerElementType.gap,height:10,width:'100%'}]},void 0),jsxRuntime.jsx(officeUiFabricReact.ShimmerElementsGroup,{shimmerElements:[{type:officeUiFabricReact.ShimmerElementType.circle,height:48,verticalAlign:'bottom'},{type:officeUiFabricReact.ShimmerElementType.gap,height:15},{type:officeUiFabricReact.ShimmerElementType.gap,height:15},{type:officeUiFabricReact.ShimmerElementType.line,height:18}]},void 0)]},void 0);};var UsersLoadedIndicator=_styled__default["default"].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__default["default"].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"])));_styled.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=React$d.useState(false),showCallout=_b[0],setshowCallout=_b[1];var buttonRef=React$d.useRef(null);var timeout=React$d.useRef(null);React$d.useEffect(function(){return function(){return window.clearTimeout(timeout.current);};},[]);return jsxRuntime.jsxs("div",__assign({ref:buttonRef,onMouseEnter:handleOnMouseEnter,onMouseLeave:handleOnMouseLeave},{children:[jsxRuntime.jsx("div",{children:children},void 0),showCallout&&jsxRuntime.jsx(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 jsxRuntime.jsxs(StyledCallout,__assign({target:target,onDismiss:onDismiss,directionalHint:DirectionalHint.DirectionalHint.leftCenter},{children:[jsxRuntime.jsxs(LikedBy,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.likers"},void 0),":"]},void 0),jsxRuntime.jsx(LikersList,{itemId:itemId,itemType:itemType,likersCount:likersCount},void 0)]}),void 0);};var StyledCallout=_styled__default["default"](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__default["default"].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=jsxRuntime.jsx(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 jsxRuntime.jsx(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=React$d.useState(item.isLiked),isLiked=_e[0],setIsLiked=_e[1];var _f=React$d.useState((_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=React$d.useState(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 jsxRuntime.jsx(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__default["default"](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 jsxRuntime.jsx(Host$J,__assign({className:className},{children:jsxRuntime.jsx(StyledTooltip$3,__assign({resourceKey:"Events.editor.recurrence.iconTooltip",values:{endDate:moment(endDate).format('LL')},hidden:!endDate},{children:jsxRuntime.jsxs(Container$2,{children:[jsxRuntime.jsx(StyledIcon$6,{iconName:"RecurringEvent"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.editor.recurrence.series"},void 0)]},void 0)}),void 0)}),void 0);};var Host$J=_styled__default["default"].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__default["default"](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__default["default"].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__default["default"](officeUiFabricReact.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 jsxRuntime.jsx(StyledNavLink$2,__assign({to:buildPath("/events/upcoming?"+queryString.stringify({seriesId:recurrenceSeriesId,seriesTitle:title})),className:className},{children:children}),void 0);};var StyledNavLink$2=_styled__default["default"](ReactRouterDom.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 jsxRuntime.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:[jsxRuntime.jsx(IEFix,{},void 0),!readOnly&&jsxRuntime.jsx(ClickableOverlay,{baseRoute:buildPath('/events'),title:contents.title,itemId:item.id,itemType:ItemResourceTypes.Events},void 0),jsxRuntime.jsx(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),jsxRuntime.jsxs(Content$7,{children:[jsxRuntime.jsxs(Header$2,__assign({"data-card-header":true},{children:[jsxRuntime.jsx(Dates,{startDate:item.startDate,endDate:item.endDate,isCancelled:isCancelled,className:"event-card-dates"},void 0),showFeedbackButtons&&jsxRuntime.jsx(Feedback,{item:item,type:"header",targetRoute:targetRoute},void 0)]}),void 0),readOnly?jsxRuntime.jsx(RecurrenceSeriesInfo$1,{eventItem:item},void 0):jsxRuntime.jsx(EventRecurrenceSeriesInfoNavLink,{recurrenceSeriesId:item.recurrenceSeriesId,title:contents.title,children:jsxRuntime.jsx(RecurrenceSeriesInfo$1,{eventItem:item},void 0)},void 0),jsxRuntime.jsx(Title$7,{children:readOnly?contents.title:jsxRuntime.jsx(StyledLink,__assign({to:targetRoute},{children:contents.title}),void 0)},void 0),jsxRuntime.jsxs(Footer$1,{children:[jsxRuntime.jsxs(FooterStart,{children:[jsxRuntime.jsx(Locations,{locations:item.locations},void 0),jsxRuntime.jsx(Contacts,{item:item,hideAnnouncer:true},void 0),jsxRuntime.jsx(EventChannelsDisplay,{item:item,language:userLanguage,allowFilterByChannels:allowFilterByChannels,channelBackgroundColor:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.channelsBackgroundColor},void 0)]},void 0),jsxRuntime.jsxs(FooterEnd,{children:[jsxRuntime.jsx(Registration,{item:item,disabled:readOnly},void 0),jsxRuntime.jsx(CancelInfo,{item:item},void 0),showFeedbackButtons&&jsxRuntime.jsx(Feedback,{item:item,type:"footer",targetRoute:targetRoute},void 0)]},void 0)]},void 0)]},void 0)]}),void 0);};var Host$I=_styled__default["default"].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?_styled.css(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)):_styled.css(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&&_styled.css(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=_styled.css(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__default["default"](ReactRouterDom.Link).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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"].div.withConfig({displayName:"EventCard__FooterEnd",componentId:"sc-19skrau-8"})(templateObject_13$5||(templateObject_13$5=__makeTemplateObject(["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"],["\n flex: 0 0 200px;\n\n @media (max-width: ","px) {\n margin-top: ","px;\n flex: 1 1 auto;\n }\n"])),maxScreenSize.medium,spacingM);var HeaderFeedback=_styled.css(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=_styled.css(templateObject_15$5||(templateObject_15$5=__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"],["\n display: flex;\n align-items: center;\n justify-content: flex-end;\n margin-top: ","px;\n\n @media (min-width: ","px) {\n display: none;\n }\n"])),spacingM,minScreenSize.medium);var FeedbackHost=_styled__default["default"].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 jsxRuntime.jsxs(FeedbackHost,__assign({isHeader:type==='header'},{children:[jsxRuntime.jsx(EventCardLikeButton,{item:item,itemResourceType:ItemResourceTypes.Events},void 0),showCommentCount&&jsxRuntime.jsx(StyledLink,__assign({to:targetRoute+"#comments","aria-hidden":"true"},{children:jsxRuntime.jsx(EventCardCommentCount,{item:item},void 0)}),void 0)]}),void 0);};var EventCardLikeButton=_styled__default["default"](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__default["default"](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__default["default"](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__default["default"](EventLocationInfo).withConfig({displayName:"EventCard__Locations",componentId:"sc-19skrau-13"})(templateObject_20$1||(templateObject_20$1=__makeTemplateObject([""],[""])));var Contacts=_styled__default["default"](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__default["default"](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=_styled.createGlobalStyle(templateObject_23$1||(templateObject_23$1=__makeTemplateObject(["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"],["\n .browser-name-ie {\n .event-card-dates {\n flex: 1 1 0%;\n flex-basis: 0%;\n }\n }\n"])));var templateObject_1$1S,templateObject_2$18,templateObject_3$M,templateObject_4$y,templateObject_5$v,templateObject_6$l,templateObject_7$g,templateObject_8$f,templateObject_9$c,templateObject_10$b,templateObject_11$7,templateObject_12$6,templateObject_13$5,templateObject_14$5,templateObject_15$5,templateObject_16$5,templateObject_17$4,templateObject_18$3,templateObject_19$3,templateObject_20$1,templateObject_21$1,templateObject_22$1,templateObject_23$1;var $$3=_export;var aFunction=aFunction$6;var toObject=toObject$6;var fails$j=fails$i;var arrayMethodIsStrict=arrayMethodIsStrict$2;var test$1=[];var nativeSort=test$1.sort;// IE8-
|
|
126124
126126
|
var FAILS_ON_UNDEFINED=fails$j(function(){test$1.sort(undefined);});// V8 bug
|
|
126125
126127
|
var FAILS_ON_NULL=fails$j(function(){test$1.sort(null);});// Old WebKit
|
|
126126
126128
|
var STRICT_METHOD=arrayMethodIsStrict('sort');var FORCED$1=FAILS_ON_UNDEFINED||!FAILS_ON_NULL||!STRICT_METHOD;// `Array.prototype.sort` method
|
|
126127
126129
|
// https://tc39.github.io/ecma262/#sec-array.prototype.sort
|
|
126128
|
-
$$
|
|
126130
|
+
$$3({target:'Array',proto:true,forced:FORCED$1},{sort:function sort(comparefn){return comparefn===undefined?nativeSort.call(toObject(this)):nativeSort.call(toObject(this),aFunction(comparefn));}});function useExternalContentHandler(){var _this=this;var history=ReactRouterDom.useHistory();var onRequestToken=React$d.useContext(AuthenticationContext).onRequestToken;var trackExternalItem=useNewsApi().trackExternalItem;var createApiUrl=useApiFactory().createApiUrl;var currentUser=useCurrentUser();var webAppUrls=useSubscriptionWebAppUrls();var _a=React$d.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
|
|
126129
126131
|
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();React$d.useEffect(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
|
|
126130
126132
|
},[item===null||item===void 0?void 0:item.id]);}function usePagesClickHandler(){var user=useCurrentUser();var userToken=useCurrentToken();var onOpenExternalLink=React$d.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 React$d.useMemo(function(){return {createPageClickHandler:createPageClickHandler,createDocumentClickHandler:createDocumentClickHandler};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126131
126133
|
},[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
|
|
@@ -126140,11 +126142,11 @@
|
|
|
126140
126142
|
// we just use the id for that, because this one is always different
|
|
126141
126143
|
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=React$d.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
|
|
126142
126144
|
},[extension,pageId]),fileUrl=_a.fileUrl,iconName=_a.iconName;var _b=React$d.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
|
|
126143
|
-
},[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 _styled.css(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?_styled.css(templateObject_1$1R||(templateObject_1$1R=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),backgroundColor||p.theme.palette.white):_styled.css(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=_styled.css(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 _styled.css(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 _styled.css(templateObject_8$e||(templateObject_8$e=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),rightSideOnly?_styled.css(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):_styled.css(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 jsxRuntime.jsx(StyledTooltip$2,__assign({className:className,resourceKey:tooltipResourceKey,values:{url:tooltipResourceValues},width:400},{children:jsxRuntime.jsx(StyledIcon$5,{iconName:"NavigateExternalInline","data-external-content":true},void 0)}),void 0);};var StyledTooltip$2=_styled__default["default"](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__default["default"](officeUiFabricReact.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 jsxRuntime.jsx(TitleHost,__assign({expandClickArea:!isExternalContent,className:className,"data-title":true},{children:readOnly?jsxRuntime.jsx("span",{children:title},void 0):isDownloadLink?jsxRuntime.jsx("a",__assign({href:targetRoute,rel:"noopener noreferrer",onClick:onClick},{children:jsxRuntime.jsx("span",{children:title},void 0)}),void 0):openTargetInNewWindow?jsxRuntime.jsxs("a",__assign({href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick},{children:[jsxRuntime.jsx("span",{children:title},void 0),isExternalContent&&jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0):jsxRuntime.jsxs(ReactRouterDom.Link,__assign({to:targetRoute,onClick:onClick},{children:[jsxRuntime.jsx("span",{children:title},void 0),isExternalContent&&jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0)}),void 0);};var TitleHost=_styled__default["default"].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&&_styled.css(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 jsxRuntime.jsx(Host$H,__assign({className:className},{children:breadcrumbItems.map(function(b,i){return jsxRuntime.jsxs(React$d.Fragment,{children:[i!==0&&jsxRuntime.jsx(RightChevronIcon,{iconName:"ChevronRight"},void 0),jsxRuntime.jsx("span",{children:b.text},void 0)]},b.key);})}),void 0);};var Host$H=_styled__default["default"].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__default["default"](officeUiFabricReact.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 jsxRuntime.jsxs(Host$G,__assign({"data-item-id":item.id,className:className},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.Pages,baseRoute:baseRoute,title:title,isExternalContent:item.useExternalContent},void 0),jsxRuntime.jsxs(Inner$3,__assign({styleDefinition:styleDefinition,hasBanner:item.bannerInfo!=null||showBannerPlaceholder||isDocument},{children:[jsxRuntime.jsx(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),jsxRuntime.jsxs(Content$6,__assign({padding:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.contentPadding,"data-page-tile-content":true},{children:[jsxRuntime.jsxs(MetaInfo$3,__assign({paddingRight:showBreadcrumb&&!isDocument&&readOnly?spacingM:0},{children:[showBreadcrumb&&jsxRuntime.jsx(StyledListItemBreadcrumb,{page:item},void 0),!showBreadcrumb&&item.modified&&jsxRuntime.jsx(DateTime,{value:item.modified},void 0),additionalMetadata]}),void 0),jsxRuntime.jsxs(MainContent,{children:[jsxRuntime.jsxs(TitleAndIntro,__assign({addDownloadButtonSafetySpace:isDocument},{children:[jsxRuntime.jsx(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&&jsxRuntime.jsx(Intro$2,{children:content.intro},void 0)]}),void 0),additionalContent]},void 0),hasKeywords&&jsxRuntime.jsx(Keywords$2,{children:jsxRuntime.jsx(FlatKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0)},void 0),buttons&&jsxRuntime.jsx(Buttons$2,{children:buttons},void 0)]}),void 0)]}),void 0)]}),void 0);};var StyledTitle$1=_styled__default["default"](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&&_styled.css(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&&_styled.css(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?_styled.css(templateObject_3$K||(templateObject_3$K=__makeTemplateObject(["\n margin: "," !important;\n "],["\n margin: "," !important;\n "])),p.margin):_styled.css(templateObject_4$w||(templateObject_4$w=__makeTemplateObject(["\n margin: 0 !important;\n "],["\n margin: 0 !important;\n "])));});var Intro$2=_styled__default["default"].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__default["default"].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__default["default"].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)?_styled.css(templateObject_8$d||(templateObject_8$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.styleDefinition.height):_styled.css(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&&_styled.css(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__default["default"].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?_styled.css(templateObject_12$5||(templateObject_12$5=__makeTemplateObject(["\n padding: ",";\n "],["\n padding: ",";\n "])),p.padding):_styled.css(templateObject_13$4||(templateObject_13$4=__makeTemplateObject(["\n padding: ","px;\n "],["\n padding: ","px;\n "])),spacingM);});var MetaInfo$3=_styled__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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 jsxRuntime.jsx(BannerHost$1,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(FileIcon$1,{iconName:fileIcon,fontSize:bannerFontSize,color:getIconColor(fileIcon)},void 0)}),void 0);}if(!bannerInfo&&!showBannerPlaceholder){return null;}if(bannerDefaultWidth<100){return jsxRuntime.jsx(SmallBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:isEditor?'edit':'read',width:200,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0);}return jsxRuntime.jsx("div",{children:jsxRuntime.jsx(LargeBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(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__default["default"].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&&_styled.css(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&&_styled.css(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__default["default"](officeUiFabricReact.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__default["default"].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&&_styled.css(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__default["default"](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&&_styled.css(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
|
|
126145
|
+
},[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 _styled.css(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?_styled.css(templateObject_1$1R||(templateObject_1$1R=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),backgroundColor||p.theme.palette.white):_styled.css(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=_styled.css(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 _styled.css(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 _styled.css(templateObject_8$e||(templateObject_8$e=__makeTemplateObject(["\n ","\n "],["\n ","\n "])),rightSideOnly?_styled.css(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):_styled.css(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 jsxRuntime.jsx(StyledTooltip$2,__assign({className:className,resourceKey:tooltipResourceKey,values:{url:tooltipResourceValues},width:400},{children:jsxRuntime.jsx(StyledIcon$5,{iconName:"NavigateExternalInline","data-external-content":true},void 0)}),void 0);};var StyledTooltip$2=_styled__default["default"](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__default["default"](officeUiFabricReact.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 jsxRuntime.jsx(TitleHost,__assign({expandClickArea:!isExternalContent,className:className},{children:readOnly?jsxRuntime.jsx("span",{children:title},void 0):isDownloadLink?jsxRuntime.jsx("a",__assign({href:targetRoute,rel:"noopener noreferrer",onClick:onClick},{children:jsxRuntime.jsx("span",{children:title},void 0)}),void 0):openTargetInNewWindow?jsxRuntime.jsxs("a",__assign({href:targetRoute,target:"_blank",rel:"noopener noreferrer",onClick:onClick},{children:[jsxRuntime.jsx("span",{children:title},void 0),isExternalContent&&jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0):jsxRuntime.jsxs(ReactRouterDom.Link,__assign({to:targetRoute,onClick:onClick},{children:[jsxRuntime.jsx("span",{children:title},void 0),isExternalContent&&jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:resourceKey,tooltipResourceValues:resourceValues},void 0)]}),void 0)}),void 0);};var TitleHost=_styled__default["default"].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&&_styled.css(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 jsxRuntime.jsx(Host$H,__assign({className:className},{children:breadcrumbItems.map(function(b,i){return jsxRuntime.jsxs(React$d.Fragment,{children:[i!==0&&jsxRuntime.jsx(RightChevronIcon,{iconName:"ChevronRight"},void 0),jsxRuntime.jsx("span",{children:b.text},void 0)]},b.key);})}),void 0);};var Host$H=_styled__default["default"].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__default["default"](officeUiFabricReact.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 jsxRuntime.jsxs(Host$G,__assign({"data-item-id":item.id,className:className},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.Pages,baseRoute:baseRoute,title:title,isExternalContent:item.useExternalContent},void 0),jsxRuntime.jsxs(Inner$3,__assign({styleDefinition:styleDefinition,hasBanner:item.bannerInfo!=null||showBannerPlaceholder||isDocument},{children:[jsxRuntime.jsx(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),jsxRuntime.jsxs(Content$6,__assign({padding:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.contentPadding,"data-page-tile-content":true},{children:[jsxRuntime.jsxs(MetaInfo$3,__assign({paddingRight:showBreadcrumb&&!isDocument&&readOnly?spacingM:0},{children:[showBreadcrumb&&jsxRuntime.jsx(StyledListItemBreadcrumb,{page:item},void 0),!showBreadcrumb&&item.modified&&jsxRuntime.jsx(DateTime,{value:item.modified},void 0),additionalMetadata]}),void 0),jsxRuntime.jsxs(MainContent,{children:[jsxRuntime.jsxs(TitleAndIntro,__assign({addDownloadButtonSafetySpace:isDocument},{children:[jsxRuntime.jsx(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&&jsxRuntime.jsx(Intro$2,{children:content.intro},void 0)]}),void 0),additionalContent]},void 0),hasKeywords&&jsxRuntime.jsx(Keywords$2,{children:jsxRuntime.jsx(FlatKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0)},void 0),buttons&&jsxRuntime.jsx(Buttons$2,{children:buttons},void 0)]}),void 0)]}),void 0)]}),void 0);};var StyledTitle$1=_styled__default["default"](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&&_styled.css(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&&_styled.css(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?_styled.css(templateObject_3$K||(templateObject_3$K=__makeTemplateObject(["\n margin: "," !important;\n "],["\n margin: "," !important;\n "])),p.margin):_styled.css(templateObject_4$w||(templateObject_4$w=__makeTemplateObject(["\n margin: 0 !important;\n "],["\n margin: 0 !important;\n "])));});var Intro$2=_styled__default["default"].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__default["default"].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__default["default"].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)?_styled.css(templateObject_8$d||(templateObject_8$d=__makeTemplateObject(["\n height: ","px;\n "],["\n height: ","px;\n "])),p.styleDefinition.height):_styled.css(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&&_styled.css(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__default["default"].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?_styled.css(templateObject_12$5||(templateObject_12$5=__makeTemplateObject(["\n padding: ",";\n "],["\n padding: ",";\n "])),p.padding):_styled.css(templateObject_13$4||(templateObject_13$4=__makeTemplateObject(["\n padding: ","px;\n "],["\n padding: ","px;\n "])),spacingM);});var MetaInfo$3=_styled__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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 jsxRuntime.jsx(BannerHost$1,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(FileIcon$1,{iconName:fileIcon,fontSize:bannerFontSize,color:getIconColor(fileIcon)},void 0)}),void 0);}if(!bannerInfo&&!showBannerPlaceholder){return null;}if(bannerDefaultWidth<100){return jsxRuntime.jsx(SmallBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(PublishableItemBanner,{itemId:item.id,bannerInfo:bannerInfo,mode:isEditor?'edit':'read',width:200,token:item.fileAccessToken,resourceType:ItemResourceTypes.Pages},void 0)}),void 0);}return jsxRuntime.jsx("div",{children:jsxRuntime.jsx(LargeBannerWrapper,__assign({defaultWidth:bannerDefaultWidth,applyRoundedCorners:applyRoundedCorners},{children:jsxRuntime.jsx(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__default["default"].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&&_styled.css(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&&_styled.css(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__default["default"](officeUiFabricReact.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__default["default"].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&&_styled.css(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__default["default"](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&&_styled.css(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
|
|
126144
126146
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
126145
|
-
var numberParseInt=FORCED?function parseInt(string,radix){var S=trim(String(string));return $parseInt(S,radix>>>0||(hex.test(S)?16:10));}:$parseInt;var $$
|
|
126147
|
+
var numberParseInt=FORCED?function parseInt(string,radix){var S=trim(String(string));return $parseInt(S,radix>>>0||(hex.test(S)?16:10));}:$parseInt;var $$2=_export;var parseIntImplementation=numberParseInt;// `parseInt` method
|
|
126146
126148
|
// https://tc39.github.io/ecma262/#sec-parseint-string-radix
|
|
126147
|
-
$$3({global:true,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation});function getMaxImageWidth(defaultMaxWidth){return defaultMaxWidth!==null&&defaultMaxWidth!==void 0?defaultMaxWidth:maxContentWidth;}function getImageWidth(image){var width=typeof image==='string'?parseInt(image):image===null||image===void 0?void 0:image.width;if(!width||isNaN(width)){return getMaxImageWidth();}return Math.min(width,getMaxImageWidth());}function getNewsCardIcon(item,intl){if(hasFlag(item.knownState,KnownNewsState.Alert)){return {name:'Warning',backgroundColor:'red',tooltipText:intl.formatMessage({id:'NewsArticle.alert'})};}if(hasFlag(item.knownState,KnownNewsState.Unconfirmed)){return {name:'Completed',backgroundColor:'green',tooltipText:intl.formatMessage({id:'NewsArticle.confirmationRequired'})};}return null;}var ItemTileLayoutMode;(function(ItemTileLayoutMode){ItemTileLayoutMode["BannerTopMode"]="bannerTop";ItemTileLayoutMode["BannerLeftMode"]="bannerLeft";})(ItemTileLayoutMode||(ItemTileLayoutMode={}));var NewsItemTile=function NewsItemTile(_a){var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,filterBaseUrl=_a.filterBaseUrl,dateLabelResourceKey=_a.dateLabelResourceKey,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUserContext().user;var token=useCurrentToken();var intl=useIntl();var features=useFeatures();var title=getTitle(item,user,intl.formatMessage);var headline=getHeadline(item,user);var language=NewsService.getLanguageForPublishableItem(item,user);var handleExternalContentClick=useExternalContentClickHandler();var targetRoute=NewsService.getNewsRouteWithRedirect(baseRoute,item.id,title,item.useExternalContent);var hasKeywords=Object.keys(item.keywords).length>0;var content=item.contents[language];var hasIntro=content.intro&&content.intro.length>0;var icon=getNewsCardIcon(item,intl);var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);return jsxRuntime.jsxs(Host$F,__assign({hasBanner:item.bannerInfo!=null,layoutMode:layoutMode,styleDefinition:styleDefinition,"data-item-id":item.id,className:className},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.News,baseRoute:baseRoute,onClick:onClick,title:title,openTargetInNewWindow:openTargetInNewWindow,isExternalContent:item.useExternalContent},void 0),jsxRuntime.jsx(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),jsxRuntime.jsxs(Content$5,{children:[jsxRuntime.jsxs(MetaInfoAndIcon,{children:[jsxRuntime.jsxs(MetaInfo$2,__assign({showChannelsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:[dateLabelResourceKey&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:dateLabelResourceKey},void 0),":\u00A0"]},void 0),jsxRuntime.jsx(DateTime,{value:item.publishingDate},void 0),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["\u2002",jsxRuntime.jsx(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&&jsxRuntime.jsx(NewsCardIcon$1,{children:jsxRuntime.jsx(Tooltip,__assign({text:icon.tooltipText},{children:jsxRuntime.jsx(StyledIcon$4$1,{iconName:icon.name,backgroundColor:icon.backgroundColor},void 0)}),item.id+"-"+icon.name)},void 0)]},void 0),features.contentHeadline&&!!headline&&jsxRuntime.jsx(Headline$2,{children:headline},void 0),jsxRuntime.jsx(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&&jsxRuntime.jsx(Intro$1$1,{children:content.intro},void 0),hasKeywords&&jsxRuntime.jsx(StyledKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0),buttons&&jsxRuntime.jsx(Footer,__assign({alignItemsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:buttons}),void 0)]},void 0)]}),void 0);};var Host$F=_styled__default["default"].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&&_styled.css(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)&&_styled.css(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&&_styled.css(templateObject_3$J||(templateObject_3$J=__makeTemplateObject(["\n flex-direction: column;\n "],["\n flex-direction: column;\n "])));});var StyledTitle$2=_styled__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"].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&&_styled.css(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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"](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__default["default"].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&&_styled.css(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 jsxRuntime.jsx("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsxRuntime.jsx(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsxRuntime.jsx(TopBannerInner,{children:jsxRuntime.jsx(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 jsxRuntime.jsx(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsxRuntime.jsx(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__default["default"].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&&_styled.css(templateObject_17$2||(templateObject_17$2=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled__default["default"].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 jsxRuntime.jsx(StyledTooltip$1,__assign({resourceKey:'Pages.documents.downloadButton.tooltip',values:{fileName:title||fileInfo.fileName},className:className},{children:jsxRuntime.jsx(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__default["default"](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=React$d.useContext(ThemeContext$1).theme.palette;var user=useCurrentUser();var backgroundColor=useDarkTheme?palette.neutralLight:palette.white;if(isLoading){return jsxRuntime.jsx(SpinnerHost,{children:jsxRuntime.jsx(StyledSpinner$2,{size:officeUiFabricReact.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 jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-access-denied":true},{children:[buttons,jsxRuntime.jsx(EmbeddedObjectWarningTile,{iconName:"LockSolid",iconLabel:"Generic.noAccess",messageResourceKey:"Generic.noAccessReason"},void 0)]}),void 0);}if(error||!item){return jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-not-found":true},{children:[buttons,jsxRuntime.jsx(EmbeddedObjectWarningTile,{iconName:"AlertSolid",iconLabel:"Generic.itemNotFound",messageResourceKey:"Generic.deletedItemReason"},void 0)]}),void 0);}var itemGroupIds=getItemGroupIds();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.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);})&&jsxRuntime.jsx(DifferentGroupWarning,__assign({"data-warning-different-group":true},{children:jsxRuntime.jsx(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 jsxRuntime.jsx(PostItemTile,{post:item,backgroundColor:backgroundColor,readOnly:readOnly},void 0);}if(type===AttachmentType.News){var newsItem=item;return jsxRuntime.jsx(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 jsxRuntime.jsx(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:jsxRuntime.jsx(StyledDocumentDownloadButton$3,{page:item,marginRight:readOnly?spacingM:0},void 0),showBreadcrumb:true,showIntro:true},void 0);}var language=NewsService.getLanguageForPublishableItem(item,user);return jsxRuntime.jsx(EventCard,{item:item,language:language,styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white,bannerHostWidth:150},readOnly:readOnly},void 0);}};var Host$E=_styled__default["default"].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?_styled.css(templateObject_1$1K||(templateObject_1$1K=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):_styled.css(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__default["default"].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 jsxRuntime.jsxs(WarningHost,{children:[(iconName||iconLabel)&&jsxRuntime.jsxs(Title$5,{children:[iconName&&jsxRuntime.jsx(StyleIcon,{iconName:iconName},void 0),iconLabel&&jsxRuntime.jsx(FormattedMessageWithStyle,{id:iconLabel},void 0)]},void 0),jsxRuntime.jsx(FormattedMessageWithStyle,{id:messageResourceKey},void 0)]},void 0);};var WarningHost=_styled__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"](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&&_styled.css(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__default["default"](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 jsxRuntime.jsx(Host$D,__assign({className:className,"data-embedded-object-attachment-list":true},{children:embeddedObjects.map(function(o){return jsxRuntime.jsx(AttachmentHost,__assign({domIdentifier:"embedded-object",deleteButton:jsxRuntime.jsx(DeleteAttachmentButton,{"data-remove-attachment-button":o.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(o);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsxRuntime.jsx(EmbeddedObjectTile,{id:o.id,type:o.type,previewTheme:previewTheme,readOnly:true},o.id)}),o.id);})}),void 0);}return jsxRuntime.jsx(PreviewHost,__assign({className:className,domIdentifier:"embedded-object-preview-"+embeddedObjects[0].id},{children:jsxRuntime.jsx(EmbeddedObjectTile,{id:embeddedObjects[0].id,type:embeddedObjects[0].type,previewTheme:previewTheme},void 0)}),void 0);};var Host$D=_styled__default["default"].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__default["default"](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 jsxRuntime.jsx(List,__assign({className:className},{children:images.map(function(i){return jsxRuntime.jsx(ListItem$1,{children:jsxRuntime.jsx(ImageAttachmentPreview,{attachment:i,disabled:disabled,onDeleteClick:function(){return onDeleteClick(i);},backgroundColor:imageBackgroundColor},void 0)},i.id);})}),void 0);};var List=_styled__default["default"].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__default["default"].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 jsxRuntime.jsxs(AttachmentHost,__assign({domIdentifier:"image",backgroundColor:backgroundColor,deleteButton:!disabled&&jsxRuntime.jsx(StyledDeleteAttachmentButton,{iconProps:{iconName:'Delete'},onClick:onDeleteClick,disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:[attachment.hasError&&jsxRuntime.jsx(AttachmentOverlay,{children:jsxRuntime.jsx("div",{children:jsxRuntime.jsx(WarningIcon,{iconName:"Warning"},void 0)},void 0)},void 0),attachment.isUploadInProgress&&jsxRuntime.jsx(AttachmentOverlay,{children:jsxRuntime.jsx(CenteredSpinner,{size:officeUiFabricReact.SpinnerSize.large},void 0)},void 0),jsxRuntime.jsx(officeUiFabricReact.Image,{src:attachment.previewUrl,height:225,imageFit:officeUiFabricReact.ImageFit.centerCover,title:attachment.filename},void 0)]}),void 0);};var AttachmentOverlay=_styled__default["default"].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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"](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=React$d.useContext(ThemeContext$1).theme.palette;return jsxRuntime.jsxs(Host$C,__assign({className:className,hasItems:files.length>0,"data-attachment-list":true},{children:[jsxRuntime.jsx(GifEditList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsxRuntime.jsx(ImageAttachmentList,{images:attachedImages,disabled:disabled,onDeleteClick:function(i){return onDeleteAttachmentClick(i);},imageBackgroundColor:previewTheme==='dark'?palette.neutralLight:palette.white},void 0),!disableVideoPreview&&jsxRuntime.jsx(VideoList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);}},void 0),!disableEmbeddedObjectPreview&&jsxRuntime.jsx(EmbeddedObjectList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsxRuntime.jsx(FilesList$1,{files:attachedFiles,onDeleteClick:function(f){return onDeleteAttachmentClick(f);},disabled:disabled},void 0),jsxRuntime.jsx("div",{style:{clear:'both'}},void 0)]}),void 0);};var FilesList$1=_styled__default["default"](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__default["default"].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__*/React$d.forwardRef(function(props,ref){var _a;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(RichCommentInput,__assign({},props,{ref:ref}),void 0),jsxRuntime.jsx(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=React$d.useState(false),isSaving=_d[0],setIsSaving=_d[1];var _e=React$d.useState(initialContent||''),content=_e[0],setContent=_e[1];var _f=React$d.useState(null),selectedKeywords=_f[0],setSelectedKeywords=_f[1];var _g=React$d.useState(false),showKeywordsPicker=_g[0],setShowKeywordsPicker=_g[1];var inputRef=React$d.useRef(null);var formatMessage=useIntl().formatMessage;var isReadOnly=readOnly||isSaving;var ignoreRef=React$d.useRef(false);React$d.useEffect(function(){return function(){ignoreRef.current=true;};},[]);var initialSelectedKeywords=defaultKeywords.concat(mandatoryKeywords);var initialSelectedKeywordIds=initialSelectedKeywords.map(function(k){return k.id;}).join('-');React$d.useEffect(function(){setSelectedKeywords(initialSelectedKeywords);if(initialSelectedKeywords.length===0){setShowKeywordsPicker(false);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126149
|
+
$$2({global:true,forced:parseInt!=parseIntImplementation},{parseInt:parseIntImplementation});function getMaxImageWidth(defaultMaxWidth){return defaultMaxWidth!==null&&defaultMaxWidth!==void 0?defaultMaxWidth:maxContentWidth;}function getImageWidth(image){var width=typeof image==='string'?parseInt(image):image===null||image===void 0?void 0:image.width;if(!width||isNaN(width)){return getMaxImageWidth();}return Math.min(width,getMaxImageWidth());}function getNewsCardIcon(item,intl){if(hasFlag(item.knownState,KnownNewsState.Alert)){return {name:'Warning',backgroundColor:'red',tooltipText:intl.formatMessage({id:'NewsArticle.alert'})};}if(hasFlag(item.knownState,KnownNewsState.Unconfirmed)){return {name:'Completed',backgroundColor:'green',tooltipText:intl.formatMessage({id:'NewsArticle.confirmationRequired'})};}return null;}var ItemTileLayoutMode;(function(ItemTileLayoutMode){ItemTileLayoutMode["BannerTopMode"]="bannerTop";ItemTileLayoutMode["BannerLeftMode"]="bannerLeft";})(ItemTileLayoutMode||(ItemTileLayoutMode={}));var NewsItemTile=function NewsItemTile(_a){var item=_a.item,baseRoute=_a.baseRoute,layoutMode=_a.layoutMode,filterBaseUrl=_a.filterBaseUrl,dateLabelResourceKey=_a.dateLabelResourceKey,buttons=_a.buttons,openTargetInNewWindow=_a.openTargetInNewWindow,onClick=_a.onClick,styleDefinition=_a.styleDefinition,readOnly=_a.readOnly,className=_a.className;var user=useCurrentUserContext().user;var token=useCurrentToken();var intl=useIntl();var features=useFeatures();var title=getTitle(item,user,intl.formatMessage);var headline=getHeadline(item,user);var language=NewsService.getLanguageForPublishableItem(item,user);var handleExternalContentClick=useExternalContentClickHandler();var targetRoute=NewsService.getNewsRouteWithRedirect(baseRoute,item.id,title,item.useExternalContent);var hasKeywords=Object.keys(item.keywords).length>0;var content=item.contents[language];var hasIntro=content.intro&&content.intro.length>0;var icon=getNewsCardIcon(item,intl);var preferredContentLanguage=getPreferredContentLanguage(user);var url=getExternalContentUrl(item,preferredContentLanguage);return jsxRuntime.jsxs(Host$F,__assign({hasBanner:item.bannerInfo!=null,layoutMode:layoutMode,styleDefinition:styleDefinition,"data-item-id":item.id,className:className},{children:[!readOnly&&jsxRuntime.jsx(ClickableOverlay,{itemId:item.id,itemType:ItemResourceTypes.News,baseRoute:baseRoute,onClick:onClick,title:title,openTargetInNewWindow:openTargetInNewWindow,isExternalContent:item.useExternalContent},void 0),jsxRuntime.jsx(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),jsxRuntime.jsxs(Content$5,{children:[jsxRuntime.jsxs(MetaInfoAndIcon,{children:[jsxRuntime.jsxs(MetaInfo$2,__assign({showChannelsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:[dateLabelResourceKey&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(FormattedMessage$1,{id:dateLabelResourceKey},void 0),":\u00A0"]},void 0),jsxRuntime.jsx(DateTime,{value:item.publishingDate},void 0),jsxRuntime.jsxs(jsxRuntime.Fragment,{children:["\u2002",jsxRuntime.jsx(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&&jsxRuntime.jsx(NewsCardIcon$1,{children:jsxRuntime.jsx(Tooltip,__assign({text:icon.tooltipText},{children:jsxRuntime.jsx(StyledIcon$4$1,{iconName:icon.name,backgroundColor:icon.backgroundColor},void 0)}),item.id+"-"+icon.name)},void 0)]},void 0),features.contentHeadline&&!!headline&&jsxRuntime.jsx(Headline$2,{children:headline},void 0),jsxRuntime.jsx(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&&jsxRuntime.jsx(Intro$1$1,{children:content.intro},void 0),hasKeywords&&jsxRuntime.jsx(StyledKeywords,{item:item,filterBaseUrl:filterBaseUrl},void 0),buttons&&jsxRuntime.jsx(Footer,__assign({alignItemsToTheRight:styleDefinition===null||styleDefinition===void 0?void 0:styleDefinition.showChannelsToTheRight},{children:buttons}),void 0)]},void 0)]}),void 0);};var Host$F=_styled__default["default"].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&&_styled.css(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)&&_styled.css(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&&_styled.css(templateObject_3$J||(templateObject_3$J=__makeTemplateObject(["\n flex-direction: column;\n "],["\n flex-direction: column;\n "])));});var StyledTitle$2=_styled__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"].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&&_styled.css(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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"](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__default["default"].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&&_styled.css(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 jsxRuntime.jsx("div",{children:banner},void 0);function getBanner(){if(layoutMode===ItemTileLayoutMode.BannerTopMode){return jsxRuntime.jsx(TopBannerWrapper,__assign({showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsxRuntime.jsx(TopBannerInner,{children:jsxRuntime.jsx(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 jsxRuntime.jsx(LeftBannerWrapper,__assign({defaultWidth:bannerDefaultWidth!==null&&bannerDefaultWidth!==void 0?bannerDefaultWidth:150,showPlaceholder:!bannerInfo&&showPlaceholderIfNoBannerInfo},{children:jsxRuntime.jsx(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__default["default"].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&&_styled.css(templateObject_17$2||(templateObject_17$2=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.theme.palette.accent);});var TopBannerInner=_styled__default["default"].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 jsxRuntime.jsx(StyledTooltip$1,__assign({resourceKey:'Pages.documents.downloadButton.tooltip',values:{fileName:title||fileInfo.fileName},className:className},{children:jsxRuntime.jsx(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__default["default"](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=React$d.useContext(ThemeContext$1).theme.palette;var user=useCurrentUser();var backgroundColor=useDarkTheme?palette.neutralLight:palette.white;if(isLoading){return jsxRuntime.jsx(SpinnerHost,{children:jsxRuntime.jsx(StyledSpinner$2,{size:officeUiFabricReact.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 jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-access-denied":true},{children:[buttons,jsxRuntime.jsx(EmbeddedObjectWarningTile,{iconName:"LockSolid",iconLabel:"Generic.noAccess",messageResourceKey:"Generic.noAccessReason"},void 0)]}),void 0);}if(error||!item){return jsxRuntime.jsxs(Host$E,__assign({backgroundColor:backgroundColor,className:className,"data-warning-not-found":true},{children:[buttons,jsxRuntime.jsx(EmbeddedObjectWarningTile,{iconName:"AlertSolid",iconLabel:"Generic.itemNotFound",messageResourceKey:"Generic.deletedItemReason"},void 0)]}),void 0);}var itemGroupIds=getItemGroupIds();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.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);})&&jsxRuntime.jsx(DifferentGroupWarning,__assign({"data-warning-different-group":true},{children:jsxRuntime.jsx(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 jsxRuntime.jsx(PostItemTile,{post:item,backgroundColor:backgroundColor,readOnly:readOnly},void 0);}if(type===AttachmentType.News){var newsItem=item;return jsxRuntime.jsx(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 jsxRuntime.jsx(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:jsxRuntime.jsx(StyledDocumentDownloadButton$3,{page:item,marginRight:readOnly?spacingM:0},void 0),showBreadcrumb:true,showIntro:true},void 0);}var language=NewsService.getLanguageForPublishableItem(item,user);return jsxRuntime.jsx(EventCard,{item:item,language:language,styleDefinition:{backgroundColor:backgroundColor,noShadow:true,channelsBackgroundColor:useDarkTheme&&palette.white,bannerHostWidth:150},readOnly:readOnly},void 0);}};var Host$E=_styled__default["default"].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?_styled.css(templateObject_1$1K||(templateObject_1$1K=__makeTemplateObject(["\n background-color: ",";\n "],["\n background-color: ",";\n "])),p.backgroundColor):_styled.css(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__default["default"].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 jsxRuntime.jsxs(WarningHost,{children:[(iconName||iconLabel)&&jsxRuntime.jsxs(Title$5,{children:[iconName&&jsxRuntime.jsx(StyleIcon,{iconName:iconName},void 0),iconLabel&&jsxRuntime.jsx(FormattedMessageWithStyle,{id:iconLabel},void 0)]},void 0),jsxRuntime.jsx(FormattedMessageWithStyle,{id:messageResourceKey},void 0)]},void 0);};var WarningHost=_styled__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"](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&&_styled.css(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__default["default"](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 jsxRuntime.jsx(Host$D,__assign({className:className,"data-embedded-object-attachment-list":true},{children:embeddedObjects.map(function(o){return jsxRuntime.jsx(AttachmentHost,__assign({domIdentifier:"embedded-object",deleteButton:jsxRuntime.jsx(DeleteAttachmentButton,{"data-remove-attachment-button":o.id,iconProps:{iconName:'ChromeClose'},onClick:function(){onDeleteClick(o);},ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:jsxRuntime.jsx(EmbeddedObjectTile,{id:o.id,type:o.type,previewTheme:previewTheme,readOnly:true},o.id)}),o.id);})}),void 0);}return jsxRuntime.jsx(PreviewHost,__assign({className:className,domIdentifier:"embedded-object-preview-"+embeddedObjects[0].id},{children:jsxRuntime.jsx(EmbeddedObjectTile,{id:embeddedObjects[0].id,type:embeddedObjects[0].type,previewTheme:previewTheme},void 0)}),void 0);};var Host$D=_styled__default["default"].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__default["default"](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 jsxRuntime.jsx(List,__assign({className:className},{children:images.map(function(i){return jsxRuntime.jsx(ListItem$1,{children:jsxRuntime.jsx(ImageAttachmentPreview,{attachment:i,disabled:disabled,onDeleteClick:function(){return onDeleteClick(i);},backgroundColor:imageBackgroundColor},void 0)},i.id);})}),void 0);};var List=_styled__default["default"].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__default["default"].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 jsxRuntime.jsxs(AttachmentHost,__assign({domIdentifier:"image",backgroundColor:backgroundColor,deleteButton:!disabled&&jsxRuntime.jsx(StyledDeleteAttachmentButton,{iconProps:{iconName:'Delete'},onClick:onDeleteClick,disabled:attachment.isUploadInProgress,ariaLabel:formatMessage({id:'AriaLabel.removeAttachmentButton'})},void 0)},{children:[attachment.hasError&&jsxRuntime.jsx(AttachmentOverlay,{children:jsxRuntime.jsx("div",{children:jsxRuntime.jsx(WarningIcon,{iconName:"Warning"},void 0)},void 0)},void 0),attachment.isUploadInProgress&&jsxRuntime.jsx(AttachmentOverlay,{children:jsxRuntime.jsx(CenteredSpinner,{size:officeUiFabricReact.SpinnerSize.large},void 0)},void 0),jsxRuntime.jsx(officeUiFabricReact.Image,{src:attachment.previewUrl,height:225,imageFit:officeUiFabricReact.ImageFit.centerCover,title:attachment.filename},void 0)]}),void 0);};var AttachmentOverlay=_styled__default["default"].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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"](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=React$d.useContext(ThemeContext$1).theme.palette;return jsxRuntime.jsxs(Host$C,__assign({className:className,hasItems:files.length>0,"data-attachment-list":true},{children:[jsxRuntime.jsx(GifEditList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsxRuntime.jsx(ImageAttachmentList,{images:attachedImages,disabled:disabled,onDeleteClick:function(i){return onDeleteAttachmentClick(i);},imageBackgroundColor:previewTheme==='dark'?palette.neutralLight:palette.white},void 0),!disableVideoPreview&&jsxRuntime.jsx(VideoList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);}},void 0),!disableEmbeddedObjectPreview&&jsxRuntime.jsx(EmbeddedObjectList,{attachments:files,onDeleteClick:function(v){return onDeleteAttachmentClick(v);},previewTheme:previewTheme},void 0),jsxRuntime.jsx(FilesList$1,{files:attachedFiles,onDeleteClick:function(f){return onDeleteAttachmentClick(f);},disabled:disabled},void 0),jsxRuntime.jsx("div",{style:{clear:'both'}},void 0)]}),void 0);};var FilesList$1=_styled__default["default"](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__default["default"].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__*/React$d.forwardRef(function(props,ref){var _a;return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(RichCommentInput,__assign({},props,{ref:ref}),void 0),jsxRuntime.jsx(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=React$d.useState(false),isSaving=_d[0],setIsSaving=_d[1];var _e=React$d.useState(initialContent||''),content=_e[0],setContent=_e[1];var _f=React$d.useState(null),selectedKeywords=_f[0],setSelectedKeywords=_f[1];var _g=React$d.useState(false),showKeywordsPicker=_g[0],setShowKeywordsPicker=_g[1];var inputRef=React$d.useRef(null);var formatMessage=useIntl().formatMessage;var isReadOnly=readOnly||isSaving;var ignoreRef=React$d.useRef(false);React$d.useEffect(function(){return function(){ignoreRef.current=true;};},[]);var initialSelectedKeywords=defaultKeywords.concat(mandatoryKeywords);var initialSelectedKeywordIds=initialSelectedKeywords.map(function(k){return k.id;}).join('-');React$d.useEffect(function(){setSelectedKeywords(initialSelectedKeywords);if(initialSelectedKeywords.length===0){setShowKeywordsPicker(false);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126148
126150
|
},[initialSelectedKeywordIds]);return jsxRuntime.jsx("div",__assign({className:className},{children:jsxRuntime.jsx(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:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[allowKeywords&&jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Tag'},onClick:function(){setShowKeywordsPicker(!showKeywordsPicker);},disabled:isReadOnly,"data-button-type":"keywords",ariaLabel:formatMessage({id:'AriaLabel.keywordsButton'})},void 0),jsxRuntime.jsx(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__default["default"].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__default["default"].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=React$d.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
|
|
126149
126151
|
},[item.attachments,item.fileAccessToken,item.attachmentContainerId]);if(images.length===0&&files.length===0){return null;}return jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx(PhotoGrid,{images:galleryDetails.images,imageUrlResolver:function(imageId,width,height){return getImageUrl(basePath,subscriptionId,item,imageId,width,height);},gridBackgroundColor:imagesGridBackgroundColor},void 0),jsxRuntime.jsx(FilesList,{files:files,getFileUrl:function(attachmentId,token){return getFileUrl(basePath,subscriptionId,item,attachmentId,token);},fileAccessToken:item.fileAccessToken},void 0)]}),void 0);};var FilesList=_styled__default["default"](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=React$d.useState(content||''),newContent=_b[0],setContent=_b[1];var _c=React$d.useState(false),showKeywordsPicker=_c[0],setShowKeywordsPicker=_c[1];var _d=React$d.useState(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 jsxRuntime.jsx(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:jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[allowKeywords&&jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Tag'},onClick:function(){setShowKeywordsPicker(!showKeywordsPicker);},"data-button-type":"keywords","aria-label":formatMessage({id:'AriaLabel.keywordsButton'})},void 0),jsxRuntime.jsx(IconButton,{iconProps:{iconName:'CheckMark'},disabled:!canSaveInput(allowSaveWithoutContent,files,newContent),onClick:handleSave,"data-button":"save",ariaLabel:formatMessage({id:'AriaLabel.sendButton'})},void 0),jsxRuntime.jsx(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=React$d.useRef(false);var warningToastHandle=React$d.useRef();var _a=useAttachmentsApi(),uploadFile=_a.uploadFile,uploadImage=_a.uploadImage;var showToastWarning=useNotificationContext().showToastWarning;React$d.useEffect(function(){return function(){ignoreRef.current=true;};},[]);var user=useCurrentUser();var _b=React$d.useState(initialAttachments),attachments=_b[0],setAttachments=_b[1];var _c=React$d.useState([]),deletedAttachmentUrls=_c[0],setDeletedAttachmentUrls=_c[1];// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126150
126152
|
var handleAttachmentCallback=React$d.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
|
|
@@ -126198,19 +126200,19 @@
|
|
|
126198
126200
|
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=_styled.css(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=React$d.useContext(PollUserContext),showResult=_a.showResult,pollResult=_a.pollResult;if(!showResult){return null;}return jsxRuntime.jsx("div",__assign({className:"ms-fontColor-neutralTertiary","data-poll-result-total-count":pollResult.totalFeedbackCount},{children:jsxRuntime.jsx(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 jsxRuntime.jsx(PollUserContextProvider,__assign({item:item,resourceType:resourceType,language:contentLanguage,getPollResults:function(itemId){return getPollResult(resourceType,itemId);}},{children:jsxRuntime.jsxs(StyledPollDisplay$1,{children:[jsxRuntime.jsx(PollResultFeedbackCount,{},void 0),jsxRuntime.jsx(DetailViewPollsSubmitButton,{isReadOnly:isReadOnly},void 0),jsxRuntime.jsx(StyledPollResultExport,{},void 0)]},void 0)}),void 0);};var StyledPollResultExport=_styled__default["default"](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__default["default"](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 jsxRuntime.jsx(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 jsxRuntime.jsx(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=React$d.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
|
|
126199
126201
|
var seatsResult=React$d.useMemo(getSeatsLeft,[isLoading,isLoadingPollResult,pollResult,item.id]);return jsxRuntime.jsx(EventUserRegistrationContext.Provider,__assign({value:__assign(__assign({},pollUserContext),{hasPollContext:true,eventResponse:eventResponse,setEventResponse:setEventResponse,isLoading:isLoadingPollResult||isLoading,seatsInfo:seatsResult})},{children:jsxRuntime.jsx(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=React$d.useState(),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 jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:true,className:'dialog-register-user'},dialogContentProps:{type:officeUiFabricReact.DialogType.close,title:formatMessage({id:'Events.registration.registerSomeoneElse.title'})},onDismiss:onDismiss},{children:jsxRuntime.jsxs(Host$r,__assign({className:"dialog-content-host"},{children:[jsxRuntime.jsx(DialogGlobalStyle$2,{},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.peoplePickerLabel"},void 0),jsxRuntime.jsx(StyledPeoplePicker,{accountType:AccountType.User,allowMailItems:isGroupAdmin&&features.userInvitation,localOnly:!isGroupAdmin,includePendingInvitationUsers:true,includePendingRegistrationUsers:true,selectionMode:officeUiFabricReact.SelectionMode.single,selectedItems:onBehalfOfUser?[onBehalfOfUser]:[],onChange:function(accounts){return setOnBehalfOfUser(accounts[0]);},placeholderStringResourceKey:"Events.registration.registerSomeoneElse.peoplePickerPlaceholder",excludedItems:[user]},void 0),onBehalfOfUser&&jsxRuntime.jsxs(EventRegistrationContextProvider,__assign({onBehalfOfUpn:onBehalfOfUser.userPrincipalName},{children:[jsxRuntime.jsxs(DialogMainContent,__assign({isScrollable:!env.isAnyMobileApp},{children:[!(onBehalfOfUser===null||onBehalfOfUser===void 0?void 0:onBehalfOfUser.id)&&jsxRuntime.jsx(InvitationInfoMessage,{subscriptionName:getSubscriptionName(user.subscription)},void 0),jsxRuntime.jsx(StyledPollDisplay,{},void 0)]}),void 0),jsxRuntime.jsx(officeUiFabricReact.DialogFooter,{children:jsxRuntime.jsxs(Buttons,{children:[jsxRuntime.jsx(CancelButton,{onClick:onDismiss},void 0),jsxRuntime.jsx(EventDetailViewUserRegistration,{hideInfoMessage:true},void 0)]},void 0)},void 0)]}),onBehalfOfUser.userPrincipalName)]}),void 0)}),void 0);};var Host$r=_styled__default["default"].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__default["default"].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__default["default"](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__default["default"].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&&_styled.css(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__default["default"](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 jsxRuntime.jsx(StyledCancelButton,__assign({onClick:onClick},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Generic.Cancel"},void 0)}),void 0);};var InvitationInfoMessage=function InvitationInfoMessage(_a){var subscriptionName=_a.subscriptionName;return jsxRuntime.jsxs(InfoMessageHost,{children:[jsxRuntime.jsx(InfoIcon,{iconName:"info"},void 0),jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.userWillBeInvited",values:{subscriptionName:subscriptionName}},void 0)]},void 0);};var InfoMessageHost=_styled__default["default"].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__default["default"](officeUiFabricReact.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__default["default"](officeUiFabricReact.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=_styled.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=React$d.useState(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(StyledButton$1,__assign({iconProps:{iconName:'AddFriend'},onClick:function(){return setShowDialog(true);}},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.registerSomeoneElse.title"},void 0)}),void 0),showDialog&&jsxRuntime.jsx(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__default["default"](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=React$d.useState(false),showDialog=_b[0],setShowDialog=_b[1];if(!hasMinRoleInAllGroups(GroupRoles.Author,user,item)){return null;}return jsxRuntime.jsxs("div",{children:[jsxRuntime.jsx(Tooltip,__assign({resourceKey:"Events.registration.deRegisterSomeoneElse.title",values:{name:participant.displayName}},{children:jsxRuntime.jsx(IconButton,{iconProps:{iconName:'Delete'},onClick:function(){return setShowDialog(true);},ariaLabel:formatMessage({id:'Events.registration.deRegisterSomeoneElse.title'},{name:participant.displayName})},void 0)}),void 0),showDialog&&jsxRuntime.jsx(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 jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!show,modalProps:{isBlocking:false,className:'dialog-event-participants'},dialogContentProps:{type:officeUiFabricReact.DialogType.close,title:formatMessage({id:'Events.registration.participants'},{count:numberOfParticipants})},onDismiss:onDismiss},{children:jsxRuntime.jsxs(Host$q,__assign({className:"dialog-content-host"},{children:[jsxRuntime.jsx(DialogGlobalStyle$1,{},void 0),jsxRuntime.jsx(ParticipantsList,{},void 0)]}),void 0)}),void 0);};var Host$q=_styled__default["default"].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=_styled.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=React$d.useContext(ThemeContext$1).theme.textColors;var _a=React$d.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=React$d.useState(),filteredParticipants=_c[0],setFilteredParticipants=_c[1];var participants=filteredParticipants||unfilteredParticipants;return jsxRuntime.jsxs(ListHost,{children:[jsxRuntime.jsx(EventRegistrationRegisterSomeoneElseButton,{item:item,onDeregister:handleDeregister,onRegister:handleRegister},void 0),jsxRuntime.jsx(SearchArea,{children:jsxRuntime.jsx(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&&jsxRuntime.jsx(Spinner,{},void 0),jsxRuntime.jsx(ListContainer,__assign({isScrollable:!env.isAnyMobileApp},{children:participants.map(function(p){var showDeregisterButton=p.upn!==user.userPrincipalName;return jsxRuntime.jsxs(ListRow,{children:[jsxRuntime.jsx(PersonaCardWrapper,__assign({showDeregisterButton:showDeregisterButton},{children:jsxRuntime.jsx(StyledPersonaCard,__assign({upn:p.upn},{children:jsxRuntime.jsx(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&&jsxRuntime.jsx(EventRegistrationDeregisterPersonButton,{item:item,participant:p,onDeregistered:function(){return handleDeregister(p);}},void 0)]},p.upn);})}),void 0),!isLoading&&!participants.length&&jsxRuntime.jsx(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__default["default"].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&&_styled.css(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__default["default"].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__default["default"](officeUiFabricReact.SearchBox).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__default["default"].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__default["default"].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__default["default"](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__default["default"](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__default["default"].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=React$d.useContext(PollUserContext),pollResult=_b.pollResult,publishableItem=_b.item;var item=publishableItem;var _c=React$d.useState(false),showParticipants=_c[0],setShowParticipants=_c[1];var palette=React$d.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 jsxRuntime.jsxs("div",__assign({"data-poll-result-total-count":pollResult.totalFeedbackCount},{children:[!canOpenParticipantsDialog?jsxRuntime.jsx(NoParticipantsContainer,{children:jsxRuntime.jsx(FormattedMessage$1,{id:"Events.registration.participants.count",values:{count:pollResult.totalFeedbackCount}},void 0)},void 0):jsxRuntime.jsx(ParticipantsButton,__assign({onClick:function(){return setShowParticipants(true);},color:palette.accent},{children:jsxRuntime.jsx(FormattedMessage$1,{id:isUserAuthor?'Events.registration.participants.viewAndManage':'Events.registration.participants.count',values:{count:pollResult.totalFeedbackCount}},void 0)}),void 0),jsxRuntime.jsx(EventRegistrationParticipantsDialog,{numberOfParticipants:pollResult.totalFeedbackCount,show:showParticipants,onDismiss:function(){return setShowParticipants(false);}},void 0)]}),void 0);};var NoParticipantsContainer=_styled__default["default"].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__default["default"](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 jsxRuntime.jsx(EventRegistrationContextProvider,{children:jsxRuntime.jsxs(StyledPollDisplay$1,{children:[jsxRuntime.jsx(EventRegistrationParticipantsLink,{},void 0),jsxRuntime.jsx(StyledEventUserRegistration,{},void 0),jsxRuntime.jsx(StyledResponseExportButton,{},void 0)]},void 0)},void 0);};var StyledEventUserRegistration=_styled__default["default"](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__default["default"](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 jsxRuntime.jsx(EventDetailViewRegistrationPoll,{},void 0);}return jsxRuntime.jsx(DetailViewPoll,{},void 0);};var classof$a=classofRaw$1;// `IsArray` abstract operation
|
|
126200
126202
|
// https://tc39.github.io/ecma262/#sec-isarray
|
|
126201
|
-
var isArray$
|
|
126203
|
+
var isArray$1=Array.isArray||function isArray(arg){return classof$a(arg)=='Array';};var $$1$1=_export;var isArray=isArray$1;var nativeReverse=[].reverse;var test=[1,2];// `Array.prototype.reverse` method
|
|
126202
126204
|
// https://tc39.github.io/ecma262/#sec-array.prototype.reverse
|
|
126203
126205
|
// fix for Safari 12.0 bug
|
|
126204
126206
|
// https://bugs.webkit.org/show_bug.cgi?id=188794
|
|
126205
|
-
$$
|
|
126206
|
-
if(isArray
|
|
126207
|
+
$$1$1({target:'Array',proto:true,forced:String(test)===String(test.reverse())},{reverse:function reverse(){// eslint-disable-next-line no-self-assign
|
|
126208
|
+
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=React$d.useState(true),isDialogHidden=_b[0],setIsDialogHidden=_b[1];var commentRef=React$d.useRef(null);var deleteComment=useCommentApi().deleteComment;var showError=useNotificationContext().showError;return jsxRuntime.jsxs("div",__assign({className:classNames(className,'comment-list'),"data-list":"comments"},{children:[jsxRuntime.jsx(ConfirmDialog,{onClose:function(){return setIsDialogHidden(true);},onConfirm:handleDelete,showDialog:!isDialogHidden,titleResourceKey:"Comment.delete.title",infoResourceKey:"Comment.delete.description"},void 0),jsxRuntime.jsx(OpacityAnimation,__assign({leaveDuration:500},{children:items!=null&&items.map(function(comment){var _a;var showAutoTranslate=comment.sender.id!==user.id;return jsxRuntime.jsx(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&&jsxRuntime.jsx("p",__assign({className:"ms-font-m ms-fontColor-neutralSecondary"},{children:jsxRuntime.jsx(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=React$d.useRef(false);React$d.useEffect(function(){return function(){ignoreRef.current=true;};},[]);var _a=React$d.useState(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 jsxRuntime.jsx(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=ReactRouterDom.useHistory();var location=ReactRouterDom.useLocation();var formatMessage=useIntl().formatMessage;var showError=useNotificationContext().showError;var _d=React$d.useState((initialComments===null||initialComments===void 0?void 0:initialComments.items.length)===0||type!==ItemResourceTypes.Posts||showReplyBox),showNewComment=_d[0],setShowNewComment=_d[1];var _e=React$d.useState(),commentToReplyTo=_e[0],setCommentToReplyTo=_e[1];var _f=React$d.useState(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(',');React$d.useEffect(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
|
|
126207
126209
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126208
126210
|
},[commentIdsString]);var showSpinner=!preventLoading&&isLoading;var showLoadMore=!preventLoading&&hasNextPage&&!isLoading;var showComments=!preventLoading&&(comments===null||comments===void 0?void 0:comments.length)>0;return jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsxs(TitleAndSpinner,{children:[title,showSpinner&&jsxRuntime.jsx(StyledSpinner$1,{},void 0)]},void 0),showLoadMore&&jsxRuntime.jsx(LoadMoreContainer,__assign({"data-load-more-comments-container":true,"data-show-highlight":hasMoreUnreadComments,highlight:hasMoreUnreadComments},{children:jsxRuntime.jsx(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&&jsxRuntime.jsx(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&&jsxRuntime.jsx(ReplyButton,{iconProps:{iconName:'Reply'},text:formatMessage({id:'Post.comments.addReply'}),onClick:showNewCommentInput,"data-add-comment":true},void 0),showNewComment&&jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(NewComment// the key is required to autofocus the reply field when replying to comments
|
|
126209
126211
|
,{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$1(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__default["default"].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__default["default"](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__default["default"](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__default["default"].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&&_styled.css(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__default["default"](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__default["default"](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=React$d.useState(function(){return __spreadArray([],(initialComments===null||initialComments===void 0?void 0:initialComments.items)||[]).reverse();}),comments=_a[0],setComments=_a[1];var _b=React$d.useState({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=React$d.useState(!initialComments),isLoading=_c[0],setIsLoading=_c[1];var pullToRefreshContext=React$d.useContext(PullToRefreshContext);var _d=useCommentApi(),listComments=_d.listComments,getCommentReplies=_d.getCommentReplies;// the context can be null, in case we are in the editor
|
|
126210
126212
|
var refreshToken=pullToRefreshContext===null||pullToRefreshContext===void 0?void 0:pullToRefreshContext.refreshToken;var refreshUserDetails=useRefreshUserDetails();var isValid=true;React$d.useEffect(function(){if(!isValid||preventLoading){return undefined;}if(!initialComments||refreshToken){// pass the pageToken explicitly since it's possible that the nextPageTokenState has not been updated yet
|
|
126211
126213
|
loadNextPage(null,initialPageSize,!!initialComments).then(function(){return null;},logger.error);}// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126212
126214
|
return function(){isValid=false;};// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
126213
|
-
},[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
|
|
126215
|
+
},[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:nextPageTokenOverride!==null&&nextPageTokenOverride!==void 0?nextPageTokenOverride:nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.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:nextPageTokenOverride!==null&&nextPageTokenOverride!==void 0?nextPageTokenOverride:nextPageInfos===null||nextPageInfos===void 0?void 0:nextPageInfos.token})];case 3:_a=_b.sent();_b.label=4;case 4:nextPage=_a;if(isValid){setIsLoading(false);setComments(function(stateComments){return __spreadArray(__spreadArray([],__spreadArray([],nextPage.items).reverse()),stateComments);});// refresh the unread count every time we load a new page of comments
|
|
126214
126216
|
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=ReactRouterDom.useHistory();var location=ReactRouterDom.useLocation();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var shouldRegister=user.subscription.allowSelfRegistration&&user.authenticationType!==AuthenticationType.public;return jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx(PublicUserButtonFocusStyle,{},void 0),descriptionResourceKeyPrefix&&jsxRuntime.jsx(Description$1,{id:descriptionResourceKeyPrefix+"."+(shouldRegister?'register':'login'),values:descriptionValues,tagName:"p"},void 0),jsxRuntime.jsx(officeUiFabricReact.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=_styled.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__default["default"](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=React$d.useRef();var location=ReactRouterDom.useLocation();var searchAccountsByItemId=useAccountApi().searchAccountsByItemId;var user=useCurrentUser();React$d.useEffect(function(){// scroll comments container into view if there is the corresponding hash in the path.
|
|
126215
126217
|
// HACK: a regular anchor does not work, because content is rendered
|
|
126216
126218
|
// dynamically and the comments might not be in DOM at the right time.
|
|
@@ -126231,20 +126233,11 @@
|
|
|
126231
126233
|
// we don't want to add the same node again, instead we just need to
|
|
126232
126234
|
// append the children of the node
|
|
126233
126235
|
// we also know then that we don't have to traverse the tree further up and can stop
|
|
126234
|
-
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__default["default"](officeUiFabricReact.SearchBox).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 jsxRuntime.jsx(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsxRuntime.jsx(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__default["default"](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=React$d.useState(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=React$d.useState(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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsxRuntime.jsx(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):jsxRuntime.jsx(StyledIcon$2$1,{isHighlighted:isHighlighted},void 0),basePath?jsxRuntime.jsx(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?jsxRuntime.jsx(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsxRuntime.jsx(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsxRuntime.jsx(StyledExternalLinkButton,{item:node},void 0),jsxRuntime.jsx(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsxRuntime.jsx(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(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__default["default"].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&&_styled.css(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&&_styled.css(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 _styled.css(templateObject_6$6||(templateObject_6$6=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?_styled.css(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;}):_styled.css(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__default["default"](officeUiFabricReact.IconButton).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&&_styled.css(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__default["default"](officeUiFabricReact.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=_styled.css(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&&_styled.css(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__default["default"](ReactRouterDom.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__default["default"](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__default["default"].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__default["default"].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__default["default"](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__default["default"](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=React$d.useState(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsxRuntime.jsx(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsxRuntime.jsx(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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx("div",__assign({"data-toc-search-container":true},{children:jsxRuntime.jsx(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsxRuntime.jsx(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsxRuntime.jsx(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsxRuntime.jsx(TocList,{children:nodesToDisplay.map(function(c){return jsxRuntime.jsx(ToCItem,{children:jsxRuntime.jsx(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__default["default"](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__default["default"].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&&_styled.css(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__default["default"].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__default["default"].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__default["default"](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 jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:officeUiFabricReact.DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxRuntime.jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsxRuntime.jsx(DialogGlobalStyle,{},void 0),jsxRuntime.jsx(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__default["default"].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=_styled.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=ReactRouterDom.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 jsxRuntime.jsx(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 jsxRuntime.jsx(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsxRuntime.jsx(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__default["default"](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__default["default"].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__default["default"](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=React$d.useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsxRuntime.jsx(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 jsxRuntime.jsx("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:jsxRuntime.jsx("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 jsxRuntime.jsx("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:jsxRuntime.jsx("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 React$d.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__default["default"].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__default["default"].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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"].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&&_styled.css(templateObject_4$b||(templateObject_4$b=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled__default["default"].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&&_styled.css(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"](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
|
|
126236
|
+
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__default["default"](officeUiFabricReact.SearchBox).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 jsxRuntime.jsx(Tooltip,__assign({className:className,resourceKey:resourceKey,values:url?{url:url}:undefined,width:url?400:undefined},{children:jsxRuntime.jsx(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__default["default"](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=React$d.useState(null),lazyLoadedChildren=_b[0],setLazyLoadedChildren=_b[1];var children=lazyLoadedChildren||getChildren(node.id).filter(function(n){return filterChildren(n,activePage);});var _c=React$d.useState(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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(NodeWrapper,__assign({isFirstLevel:isRootNode,hide:hide,className:className,isActive:isSelectedPageNode,"data-page-toc-node":true,"data-is-active":isSelectedPageNode},{children:[!!iconName?jsxRuntime.jsx(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):jsxRuntime.jsx(StyledIcon$2$1,{isHighlighted:isHighlighted},void 0),basePath?jsxRuntime.jsx(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?jsxRuntime.jsx(NodeTitleButton,__assign({onClick:function(){return onPageSelected(node.id);},disabled:isDocument,bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0):jsxRuntime.jsx(NodeTitle,__assign({bold:isSearchMatch,"data-toc-node-title":node.id},{children:title}),void 0),jsxRuntime.jsx(StyledExternalLinkButton,{item:node},void 0),jsxRuntime.jsx(StyledDocumentDownloadButton$1,{page:node,basePath:basePath},void 0)]}),void 0),children.length>0&&jsxRuntime.jsx(ChildrenList,__assign({hide:hide},{children:children.map(function(c){return jsxRuntime.jsx("li",{children:jsxRuntime.jsx(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__default["default"].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&&_styled.css(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&&_styled.css(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 _styled.css(templateObject_6$6||(templateObject_6$6=__makeTemplateObject(["\n ",";\n "],["\n ",";\n "])),isHighlighted?_styled.css(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;}):_styled.css(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__default["default"](officeUiFabricReact.IconButton).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&&_styled.css(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__default["default"](officeUiFabricReact.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=_styled.css(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&&_styled.css(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__default["default"](ReactRouterDom.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__default["default"](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__default["default"].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__default["default"].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__default["default"](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__default["default"](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=React$d.useState(),searchResult=_c[0],setSearchResult=_c[1];if(isLoading){return jsxRuntime.jsx(Spinner,{},void 0);}if(!rootNodes||(rootNodes===null||rootNodes===void 0?void 0:rootNodes.length)===0){return jsxRuntime.jsx(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 jsxRuntime.jsx(jsxRuntime.Fragment,{children:jsxRuntime.jsxs("div",__assign({className:className},{children:[jsxRuntime.jsx("div",__assign({"data-toc-search-container":true},{children:jsxRuntime.jsx(PageTocSearch,{onSearch:onSearch,onSearchResultChange:setSearchResult},void 0)}),void 0),searchResult&&!searchResult.length&&jsxRuntime.jsx(TocEmptyList,{icon:"Search",emptyMessageResources:['EmptySearchResult.info']},void 0),nodesToDisplay&&jsxRuntime.jsx(TocListContainer,__assign({"data-toc-scrollable-container":true,isScrollable:!disableScrollableList},{children:jsxRuntime.jsx(TocList,{children:nodesToDisplay.map(function(c){return jsxRuntime.jsx(ToCItem,{children:jsxRuntime.jsx(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__default["default"](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__default["default"].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&&_styled.css(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__default["default"].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__default["default"].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__default["default"](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 jsxRuntime.jsx(MobileFullHeightDialog,__assign({hidden:!isOpen,modalProps:{className:'dialog-toc'},dialogContentProps:{type:officeUiFabricReact.DialogType.close},onDismiss:onDismiss,title:formatMessage({id:'Pages.pagesTableOfContents'})},{children:jsxRuntime.jsxs(DialogContent,__assign({className:"dialog-content-host","data-toc-dialog":true},{children:[jsxRuntime.jsx(DialogGlobalStyle,{},void 0),jsxRuntime.jsx(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__default["default"].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=_styled.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=ReactRouterDom.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 jsxRuntime.jsx(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 jsxRuntime.jsx(Tooltip,__assign({resourceKey:"Generic.translate"},{children:jsxRuntime.jsx(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__default["default"](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__default["default"].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__default["default"](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=React$d.useContext(ThemeContext$1).theme.textColors;if(status===WorkflowStatus.draft){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor||textColors.onSecondary:textColors.default},void 0);}else if(status===WorkflowStatus.rejected){return jsxRuntime.jsx(Draft,{width:width,color:isActive?activeColor:'#b90000'},void 0);}else if(status===WorkflowStatus.ready){return jsxRuntime.jsx(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 jsxRuntime.jsx("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:jsxRuntime.jsx("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 jsxRuntime.jsx("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:jsxRuntime.jsx("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 React$d.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__default["default"].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__default["default"].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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"].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&&_styled.css(templateObject_4$b||(templateObject_4$b=__makeTemplateObject(["\n margin-left: 33px; // checkmark icon space\n "],["\n margin-left: 33px; // checkmark icon space\n "])));});_styled__default["default"].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&&_styled.css(templateObject_6$4$1||(templateObject_6$4$1=__makeTemplateObject(["\n display: none;\n "],["\n display: none;\n "])));},spacingX+10);_styled__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"](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
|
|
126235
126237
|
// https://github.com/tc39/proposal-string-replace-all
|
|
126236
|
-
$$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__default["default"].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__default["default"].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__default["default"](officeUiFabricReact.IconButton).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;_styled.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"])));_styled.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__default["default"].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__default["default"].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&&_styled.css(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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](ReactRouterDom.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__default["default"].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__default["default"](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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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 React$d.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=jsxRuntime.jsx(jsxRuntime.Fragment,{children:search?jsxRuntime.jsx(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 jsxRuntime.jsx(Title$1$1,{children:jsxRuntime.jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxRuntime.jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsxRuntime.jsx(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var Title$1$1=_styled__default["default"].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__default["default"](officeUiFabricReact.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__default["default"](ReactRouterDom.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__default["default"].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__default["default"](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__default["default"](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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"].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
|
|
126237
|
-
var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxRuntime.jsxs(Host$2$1,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsxRuntime.jsx(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&&jsxRuntime.jsx(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__default["default"].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 jsxRuntime.jsxs(Link,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsxRuntime.jsx(LinkIcon,{iconName:icon},void 0),jsxRuntime.jsx(Content$2$1,__assign({},props,{isNextNode:isNextNode},{children:jsxRuntime.jsx("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsxRuntime.jsx(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__default["default"](ReactRouterDom.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__default["default"](officeUiFabricReact.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__default["default"].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&&_styled.css(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__default["default"](Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$b$1||(templateObject_1$b$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$7$1||(templateObject_2$7$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.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__default["default"].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__default["default"].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__default["default"].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 jsxRuntime.jsx(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__default["default"](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=React$d.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 jsxRuntime.jsx(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__default["default"](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 jsxRuntime.jsx(Group,__assign({"data-post-group":groupId,title:groupName,to:to,className:className},{children:jsxRuntime.jsx("span",{children:groupName},void 0)}),void 0);};var Group=_styled__default["default"](ReactRouterDom.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__default["default"].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__default["default"].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)
|
|
126238
|
-
var paddingLeft=spacingS;var postGroupWidth=250;var postGroupWidthSmall=215;_styled__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"](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__default["default"].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&&_styled.css(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__default["default"](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__default["default"](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__default["default"](ReactRouterDom.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__default["default"](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__default["default"](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__default["default"](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__default["default"](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__default["default"](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__default["default"](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__default["default"](Dropdown).withConfig({displayName:"PostGroupsSelector__StyledDropdown",componentId:"sc-g6rhck-0"})(templateObject_1$5$1||(templateObject_1$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostGroupsSelector__DropdownOption",componentId:"sc-g6rhck-1"})(templateObject_2$4$1||(templateObject_2$4$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.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
|
|
126239
|
-
// https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
|
|
126240
|
-
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
|
|
126241
|
-
// https://tc39.github.io/ecma262/#sec-arrayspeciescreate
|
|
126242
|
-
var arraySpeciesCreate$1=function(originalArray,length){var C;if(isArray(originalArray)){C=originalArray.constructor;// cross-realm fallback
|
|
126243
|
-
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
|
|
126244
|
-
// https://github.com/tc39/proposal-flatMap
|
|
126245
|
-
$$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
|
|
126246
|
-
// in popular engines, so it's moved to a separate module
|
|
126247
|
-
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=React$d.useRef();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 jsxRuntime.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?jsxRuntime.jsx(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):jsxRuntime.jsx(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),jsxRuntime.jsxs(Options,{children:[props.allowSelection&&jsxRuntime.jsx(SelectedIconOption,{children:jsxRuntime.jsx(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),jsxRuntime.jsx(StatusOption,{status:item.status,isActive:props.isSelected},void 0),jsxRuntime.jsx(Option,__assign({className:"editor-list-persona"},{children:item.owner&&jsxRuntime.jsx(Avatar,{upn:item.owner.userPrincipalName,size:props.useLargeAvatar?officeUiFabricReact.PersonaSize.size48:officeUiFabricReact.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__default["default"].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__default["default"](officeUiFabricReact.IconButton).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__default["default"].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__default["default"].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__default["default"].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__default["default"](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=_styled.css(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__default["default"](ReactRouterDom.Link).withConfig({displayName:"EditorListItem__Content",componentId:"sc-zoqzrc-6"})(templateObject_8$k||(templateObject_8$k=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var ExternalLink=_styled__default["default"].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 jsxRuntime.jsx(Option,{children:status===WorkflowStatus.approved?jsxRuntime.jsx("img",{style:{width:'20px'},alt:""},void 0):jsxRuntime.jsx(Tooltip,__assign({resourceKey:'EditorList.'+status||WorkflowStatus.draft},{children:jsxRuntime.jsx(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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(EditorItemTitle,__assign({className:classNames({'ms-fontColor-onSecondary':isSelected})},{children:title}),void 0),jsxRuntime.jsx(DateInfo,__assign({className:classNames('ms-fontSize-m',{'ms-fontColor-onSecondary':isSelected})},{children:jsxRuntime.jsx(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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"](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=ReactRouterDom.useHistory();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var intl=useIntl();var user=useCurrentUser();var hasSelectedGroup=!!groupId;var groups=getGroupItems();if(hasSelectedGroup||groups.length===1){return jsxRuntime.jsx(StyledPrimaryButton,__assign({iconProps:{iconName:'AddTo'},onClick:function(){return handleOnClick(hasSelectedGroup?undefined:groups[0].key);},className:className,"data-button-create":type},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);}if(!groups.length){return null;}return jsxRuntime.jsx(MenuButton,__assign({iconProps:{iconName:'AddTo'},menuProps:{items:groups,calloutProps:{calloutMaxWidth:300},className:'lt-reach-callout'},className:className,"data-button-create":type},{children:jsxRuntime.jsx(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__default["default"](officeUiFabricReact.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__default["default"](officeUiFabricReact.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=React$d.useContext(AuthenticationContext).onRequestToken;return React$d.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
|
|
126238
|
+
$$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__default["default"].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__default["default"].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__default["default"](officeUiFabricReact.IconButton).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;_styled.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"])));_styled.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__default["default"].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__default["default"].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&&_styled.css(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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"](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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](ReactRouterDom.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__default["default"].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__default["default"](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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](officeUiFabricReact.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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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 React$d.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=jsxRuntime.jsx(jsxRuntime.Fragment,{children:search?jsxRuntime.jsx(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 jsxRuntime.jsx(Title$1$1,{children:jsxRuntime.jsxs(StyledNavLink,__assign({to:targetRoute,onClick:function(e){return handleExternalContentClick(e,page,ItemResourceTypes.Pages);}},{children:[pageTitle,jsxRuntime.jsx(ExternalContentIcon,{tooltipResourceKey:'ExternalLinkButton.pages.navigateTo',tooltipResourceValues:url},void 0)]}),void 0)},void 0);}return jsxRuntime.jsxs(Title$1$1,__assign({className:className},{children:[isDocument&&jsxRuntime.jsx(FileIcon,{iconName:getFileIconByExtension(page.contents[language].fileInfo.extension)},void 0),pageTitle]}),void 0);};var Title$1$1=_styled__default["default"].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__default["default"](officeUiFabricReact.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__default["default"](ReactRouterDom.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__default["default"].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__default["default"](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__default["default"](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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"].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
|
|
126239
|
+
var pages=!navigationContext.parent||!navigationContext.parent.id?sortPageNodesByGroupAndPosition(user.groups,navigationContext.siblings):navigationContext.siblings;var previousPage=getSibling(-1);var nextPage=getSibling(1);return jsxRuntime.jsxs(Host$2$1,__assign({className:className,"data-detail-page-navigation":activePageId},{children:[previousPage&&jsxRuntime.jsx(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&&jsxRuntime.jsx(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__default["default"].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 jsxRuntime.jsxs(Link,__assign({to:getUrl(),className:className},{children:[!isNextNode&&jsxRuntime.jsx(LinkIcon,{iconName:icon},void 0),jsxRuntime.jsx(Content$2$1,__assign({},props,{isNextNode:isNextNode},{children:jsxRuntime.jsx("div",__assign({title:title},{children:title}),void 0)}),void 0),isNextNode&&jsxRuntime.jsx(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__default["default"](ReactRouterDom.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__default["default"](officeUiFabricReact.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__default["default"].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&&_styled.css(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__default["default"](Dropdown).withConfig({displayName:"PagesGroupsSelector__StyledDropdown",componentId:"sc-13yd888-0"})(templateObject_1$b$1||(templateObject_1$b$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PagesGroupsSelector__DropdownOption",componentId:"sc-13yd888-1"})(templateObject_2$7$1||(templateObject_2$7$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.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__default["default"].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__default["default"].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__default["default"].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 jsxRuntime.jsx(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__default["default"](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=React$d.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 jsxRuntime.jsx(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__default["default"](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 jsxRuntime.jsx(Group,__assign({"data-post-group":groupId,title:groupName,to:to,className:className},{children:jsxRuntime.jsx("span",{children:groupName},void 0)}),void 0);};var Group=_styled__default["default"](ReactRouterDom.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__default["default"].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__default["default"].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)
|
|
126240
|
+
var paddingLeft=spacingS;var postGroupWidth=250;var postGroupWidthSmall=215;_styled__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"](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__default["default"].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&&_styled.css(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__default["default"](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__default["default"](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__default["default"](ReactRouterDom.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__default["default"](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__default["default"](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__default["default"](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__default["default"](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__default["default"](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__default["default"](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__default["default"](Dropdown).withConfig({displayName:"PostGroupsSelector__StyledDropdown",componentId:"sc-g6rhck-0"})(templateObject_1$5$1||(templateObject_1$5$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarDropdownStyles);_styled__default["default"](ReactRouterDom.NavLink).withConfig({displayName:"PostGroupsSelector__DropdownOption",componentId:"sc-g6rhck-1"})(templateObject_2$4$1||(templateObject_2$4$1=__makeTemplateObject(["\n ","\n"],["\n ","\n"])),ToolbarOptionStyles);_styled.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=React$d.useRef();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 jsxRuntime.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?jsxRuntime.jsx(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):jsxRuntime.jsx(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),jsxRuntime.jsxs(Options,{children:[props.allowSelection&&jsxRuntime.jsx(SelectedIconOption,{children:jsxRuntime.jsx(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),jsxRuntime.jsx(StatusOption,{status:item.status,isActive:props.isSelected},void 0),jsxRuntime.jsx(Option,__assign({className:"editor-list-persona"},{children:item.owner&&jsxRuntime.jsx(Avatar,{upn:item.owner.userPrincipalName,size:props.useLargeAvatar?officeUiFabricReact.PersonaSize.size48:officeUiFabricReact.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__default["default"].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__default["default"](officeUiFabricReact.IconButton).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__default["default"].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__default["default"].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__default["default"].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__default["default"](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=_styled.css(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__default["default"](ReactRouterDom.Link).withConfig({displayName:"EditorListItem__Content",componentId:"sc-zoqzrc-6"})(templateObject_8$k||(templateObject_8$k=__makeTemplateObject(["\n ",";\n"],["\n ",";\n"])),LinkStyle);var ExternalLink=_styled__default["default"].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 jsxRuntime.jsx(Option,{children:status===WorkflowStatus.approved?jsxRuntime.jsx("img",{style:{width:'20px'},alt:""},void 0):jsxRuntime.jsx(Tooltip,__assign({resourceKey:'EditorList.'+status||WorkflowStatus.draft},{children:jsxRuntime.jsx(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 jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsx(EditorItemTitle,__assign({className:classNames({'ms-fontColor-onSecondary':isSelected})},{children:title}),void 0),jsxRuntime.jsx(DateInfo,__assign({className:classNames('ms-fontSize-m',{'ms-fontColor-onSecondary':isSelected})},{children:jsxRuntime.jsx(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__default["default"](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__default["default"].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__default["default"].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__default["default"].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__default["default"].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__default["default"](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__default["default"](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=ReactRouterDom.useHistory();var buildPath=useSubscriptionHandlePathBuilder().buildPath;var intl=useIntl();var user=useCurrentUser();var hasSelectedGroup=!!groupId;var groups=getGroupItems();if(hasSelectedGroup||groups.length===1){return jsxRuntime.jsx(StyledPrimaryButton,__assign({iconProps:{iconName:'AddTo'},onClick:function(){return handleOnClick(hasSelectedGroup?undefined:groups[0].key);},className:className,"data-button-create":type},{children:jsxRuntime.jsx(FormattedMessage$1,{id:"EditorList."+type+"CreateButton"},void 0)}),void 0);}if(!groups.length){return null;}return jsxRuntime.jsx(MenuButton,__assign({iconProps:{iconName:'AddTo'},menuProps:{items:groups,calloutProps:{calloutMaxWidth:300},className:'lt-reach-callout'},className:className,"data-button-create":type},{children:jsxRuntime.jsx(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__default["default"](officeUiFabricReact.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__default["default"](officeUiFabricReact.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=React$d.useContext(AuthenticationContext).onRequestToken;return React$d.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
|
|
126248
126241
|
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
|
|
126249
126242
|
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
|
|
126250
126243
|
return [4/*yield*/,api.custom("editor/"+itemId+"/lease").put({leaseId:leaseId})];case 1:// update the lease
|
|
@@ -126552,7 +126545,7 @@
|
|
|
126552
126545
|
|
|
126553
126546
|
var redefine$1 = redefine$k.exports;
|
|
126554
126547
|
var fails$2 = fails$w;
|
|
126555
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
126548
|
+
var wellKnownSymbol = wellKnownSymbol$D;
|
|
126556
126549
|
var regexpExec$1 = regexpExec$2;
|
|
126557
126550
|
var createNonEnumerableProperty = createNonEnumerableProperty$k;
|
|
126558
126551
|
|
|
@@ -126733,7 +126726,7 @@
|
|
|
126733
126726
|
|
|
126734
126727
|
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
126735
126728
|
var anObject$1 = anObject$v;
|
|
126736
|
-
var toLength = toLength$
|
|
126729
|
+
var toLength = toLength$i;
|
|
126737
126730
|
var requireObjectCoercible$1 = requireObjectCoercible$l;
|
|
126738
126731
|
var advanceStringIndex = advanceStringIndex$1;
|
|
126739
126732
|
var regExpExec = regexpExecAbstract;
|
|
@@ -129124,26 +129117,39 @@
|
|
|
129124
129117
|
}, void 0);
|
|
129125
129118
|
};
|
|
129126
129119
|
|
|
129127
|
-
var
|
|
129120
|
+
var NewsDetailPreview = function NewsDetailPreview(_a) {
|
|
129128
129121
|
var itemId = _a.itemId,
|
|
129129
129122
|
versionId = _a.versionId,
|
|
129130
|
-
|
|
129123
|
+
className = _a.className;
|
|
129131
129124
|
var getNews = useNewsEditorApi().getNews;
|
|
129132
129125
|
var getVersion = useEditorApi().getVersion;
|
|
129126
|
+
var itemContext = useDetailViewContext();
|
|
129133
129127
|
|
|
129134
|
-
if (!itemId) {
|
|
129128
|
+
if (!itemContext && !itemId) {
|
|
129135
129129
|
return null;
|
|
129136
129130
|
}
|
|
129137
129131
|
|
|
129138
|
-
|
|
129139
|
-
|
|
129140
|
-
|
|
129141
|
-
|
|
129142
|
-
|
|
129143
|
-
|
|
129144
|
-
|
|
129132
|
+
if (!itemContext) {
|
|
129133
|
+
return jsxRuntime.jsx(Host, __assign$g({
|
|
129134
|
+
className: className
|
|
129135
|
+
}, {
|
|
129136
|
+
children: jsxRuntime.jsx(DetailViewContextProvider, __assign$g({
|
|
129137
|
+
itemId: itemId,
|
|
129138
|
+
loadItemFunc: function (itemId) {
|
|
129139
|
+
return loadNewsPreview(itemId);
|
|
129140
|
+
},
|
|
129141
|
+
isReadOnly: true,
|
|
129142
|
+
type: ItemResourceTypes.News
|
|
129143
|
+
}, {
|
|
129144
|
+
children: jsxRuntime.jsx(NewsDetailPreviewInternal, {}, void 0)
|
|
129145
|
+
}), void 0)
|
|
129146
|
+
}), void 0);
|
|
129147
|
+
}
|
|
129148
|
+
|
|
129149
|
+
return jsxRuntime.jsx(Host, __assign$g({
|
|
129150
|
+
className: className
|
|
129145
129151
|
}, {
|
|
129146
|
-
children:
|
|
129152
|
+
children: jsxRuntime.jsx(NewsDetailPreviewInternal, {}, void 0)
|
|
129147
129153
|
}), void 0);
|
|
129148
129154
|
|
|
129149
129155
|
function loadNewsPreview(itemId) {
|
|
@@ -129178,36 +129184,6 @@
|
|
|
129178
129184
|
}
|
|
129179
129185
|
};
|
|
129180
129186
|
|
|
129181
|
-
var NewsDetailPreview = function NewsDetailPreview(_a) {
|
|
129182
|
-
var itemId = _a.itemId,
|
|
129183
|
-
versionId = _a.versionId,
|
|
129184
|
-
className = _a.className;
|
|
129185
|
-
var itemContext = useDetailViewContext();
|
|
129186
|
-
|
|
129187
|
-
if (!itemContext && !itemId) {
|
|
129188
|
-
return null;
|
|
129189
|
-
}
|
|
129190
|
-
|
|
129191
|
-
if (!itemContext) {
|
|
129192
|
-
return jsxRuntime.jsx(Host, __assign$g({
|
|
129193
|
-
className: className
|
|
129194
|
-
}, {
|
|
129195
|
-
children: jsxRuntime.jsx(NewsItemPreviewContextProvider, __assign$g({
|
|
129196
|
-
itemId: itemId,
|
|
129197
|
-
versionId: versionId
|
|
129198
|
-
}, {
|
|
129199
|
-
children: jsxRuntime.jsx(NewsDetailPreviewInternal, {}, void 0)
|
|
129200
|
-
}), void 0)
|
|
129201
|
-
}), void 0);
|
|
129202
|
-
}
|
|
129203
|
-
|
|
129204
|
-
return jsxRuntime.jsx(Host, __assign$g({
|
|
129205
|
-
className: className
|
|
129206
|
-
}, {
|
|
129207
|
-
children: jsxRuntime.jsx(NewsDetailPreviewInternal, {}, void 0)
|
|
129208
|
-
}), void 0);
|
|
129209
|
-
};
|
|
129210
|
-
|
|
129211
129187
|
var NewsDetailPreviewInternal = function NewsDetailPreviewInternal() {
|
|
129212
129188
|
return jsxRuntime.jsxs(PublishableItemDetailViewContainer, __assign$g({
|
|
129213
129189
|
preventExternalContentAutoRedirect: true
|
|
@@ -145098,7 +145074,7 @@
|
|
|
145098
145074
|
"MetadataEditor.keywordTitle": "Select keywords",
|
|
145099
145075
|
"MetadataEditor.customProperties": "Custom Fields",
|
|
145100
145076
|
"MetadataEditor.channelsLabel": "Channels",
|
|
145101
|
-
"MetadataEditor.addATranslationTitle": "
|
|
145077
|
+
"MetadataEditor.addATranslationTitle": "Add a translation",
|
|
145102
145078
|
"MetadataEditor.newsGroupTooltip": "This article is part of the group {group}",
|
|
145103
145079
|
"MetadataEditor.alerts.title": "Alert",
|
|
145104
145080
|
"MetadataEditor.alerts.enable": "Display an alert banner to readers of the selected channels",
|
|
@@ -145580,7 +145556,6 @@
|
|
|
145580
145556
|
"Languages.language": "Language",
|
|
145581
145557
|
"Languages.limitReached": "All translations have been added for the available languages.",
|
|
145582
145558
|
"Languages.setDefaultLanguage": "Set default language",
|
|
145583
|
-
"Languages.selectionPrompt": "In which languages do you want to offer this article to the readers?",
|
|
145584
145559
|
"Audience.title": "Audience Targeting",
|
|
145585
145560
|
"Audience.backToChannels": "Back to Channels",
|
|
145586
145561
|
"Audience.infoMsg1": "With audience targeting you can configure channel settings for specific user groups.",
|
|
@@ -206008,7 +205983,6 @@
|
|
|
206008
205983
|
exports.NewsGrid = NewsGrid;
|
|
206009
205984
|
exports.NewsHero = NewsHero;
|
|
206010
205985
|
exports.NewsItemContextProvider = NewsItemContextProvider;
|
|
206011
|
-
exports.NewsItemPreviewContextProvider = NewsItemPreviewContextProvider;
|
|
206012
205986
|
exports.NewsList = NewsList;
|
|
206013
205987
|
exports.PageDetail = PageDetail;
|
|
206014
205988
|
exports.ReachContextProvider = ReachContextProvider;
|