@bigbinary/neeto-commons-frontend 2.0.13 → 2.0.15
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/README.md +1 -1
- package/initializers.cjs.js +16 -4
- package/initializers.js +16 -4
- package/package.json +1 -1
- package/react-utils.cjs.js +532 -431
- package/react-utils.d.ts +11 -2
- package/react-utils.js +534 -433
package/react-utils.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import React__default, { useState, useEffect,
|
|
2
|
+
import React__default, { useState, useEffect, useRef, useReducer } from 'react';
|
|
3
3
|
import { Search, Check, Copy, Help, LeftArrow as LeftArrow$1, User, Settings } from '@bigbinary/neeto-icons';
|
|
4
|
-
import { Dropdown, Input, Checkbox, Typography, Tooltip, Button, Toastr, Modal, PageLoader } from '@bigbinary/neetoui';
|
|
4
|
+
import { Dropdown, Input, Label, Checkbox, Typography, Tooltip, Button, Toastr, Modal, Switch, PageLoader } from '@bigbinary/neetoui';
|
|
5
5
|
import { curryN, isNil, complement as complement$1, isEmpty, curry, includes, __, filter, trim, toLower, identity, without, append, fromPairs, keys, values, last, pluck, any, uniq, intersection, mergeLeft, not as not$2, toPairs, assoc } from 'ramda';
|
|
6
6
|
import dayjs from 'dayjs';
|
|
7
7
|
import relativeTime from 'dayjs/plugin/relativeTime';
|
|
8
8
|
import updateLocale from 'dayjs/plugin/updateLocale';
|
|
9
9
|
import { Honeybadger, HoneybadgerErrorBoundary as HoneybadgerErrorBoundary$1 } from '@honeybadger-io/react';
|
|
10
10
|
import { useTranslation, Trans } from 'react-i18next';
|
|
11
|
-
import { useMutation, useQuery, QueryClient, QueryClientProvider } from 'react-query';
|
|
12
11
|
import i18next from 'i18next';
|
|
12
|
+
import * as yup from 'yup';
|
|
13
|
+
import { useMutation, useQuery, QueryClient, QueryClientProvider } from 'react-query';
|
|
13
14
|
import { EmailInput, Input as Input$1, Button as Button$1 } from '@bigbinary/neetoui/formik';
|
|
14
15
|
import { Formik, Form } from 'formik';
|
|
15
|
-
import * as yup from 'yup';
|
|
16
16
|
import { Route, Redirect, useLocation } from 'react-router-dom';
|
|
17
17
|
import { Sidebar as Sidebar$1, AppSwitcher } from '@bigbinary/neetoui/layouts';
|
|
18
18
|
import axios$1 from 'axios';
|
|
@@ -258,8 +258,8 @@ var removeFixedColumns = function removeFixedColumns(fixedColumns, columnData) {
|
|
|
258
258
|
};
|
|
259
259
|
var filterBySearchTerm = function filterBySearchTerm(searchTerm, columns) {
|
|
260
260
|
return filter(function (_ref) {
|
|
261
|
-
var
|
|
262
|
-
return includes(trim(toLower(searchTerm)), trim(toLower(
|
|
261
|
+
var title = _ref.title;
|
|
262
|
+
return includes(trim(toLower(searchTerm)), trim(toLower(title)));
|
|
263
263
|
}, columns);
|
|
264
264
|
};
|
|
265
265
|
|
|
@@ -337,16 +337,18 @@ var Columns = function Columns(_ref) {
|
|
|
337
337
|
}, searchProps)), isNotEmpty(filteredColumns) ? filteredColumns.map(function (_ref4) {
|
|
338
338
|
var dataIndex = _ref4.dataIndex,
|
|
339
339
|
key = _ref4.key,
|
|
340
|
-
|
|
341
|
-
return /*#__PURE__*/React__default.createElement(MenuItem
|
|
340
|
+
title = _ref4.title;
|
|
341
|
+
return /*#__PURE__*/React__default.createElement(MenuItem, {
|
|
342
342
|
key: key
|
|
343
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
344
|
-
className: "neeto-ui-w-full"
|
|
343
|
+
}, /*#__PURE__*/React__default.createElement(Label, {
|
|
344
|
+
className: "neeto-ui-w-full neeto-ui-px-3 neeto-ui-py-2 hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer",
|
|
345
|
+
htmlFor: dataIndex
|
|
345
346
|
}, /*#__PURE__*/React__default.createElement(Checkbox, _extends$4({
|
|
347
|
+
id: dataIndex,
|
|
346
348
|
name: dataIndex,
|
|
347
349
|
checked: !hiddenColumns.includes(dataIndex),
|
|
348
350
|
"data-cy": "neeto-ui-columns-checkbox",
|
|
349
|
-
label:
|
|
351
|
+
label: title,
|
|
350
352
|
onChange: handleChange
|
|
351
353
|
}, checkboxProps))));
|
|
352
354
|
}) : /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -492,6 +494,36 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
492
494
|
}, children);
|
|
493
495
|
};
|
|
494
496
|
|
|
497
|
+
var EMBED_WIDGET_S3_SCRIPT_STRING = "<script src=\"https://neeto-widget.s3.ap-south-1.amazonaws.com/embedNeetoWidget.js\"></script>";
|
|
498
|
+
var NEETO_WIDGET_USER_IDENTITY_KEY = "NeetoWidgetUserIdentity";
|
|
499
|
+
var SESSION_CONTEXT_KEY = "NeetoReplayWidgetSessionContext";
|
|
500
|
+
var DISABLE_NEETO_CHAT = "enableNeetoChat: false,";
|
|
501
|
+
var DISABLE_NEETO_CHANGELOG = "enableNeetoChangelog: false,";
|
|
502
|
+
var DISABLE_NEETO_REPLAY = "enableNeetoReplay: false,";
|
|
503
|
+
var SAMPLE_CONTEXT_CODE_STRING = "window.".concat(SESSION_CONTEXT_KEY, " = {\n key1: \"value\",\n key2: [\"array\", \"of\", \"values\"],\n /* More key-value pairs */\n}");
|
|
504
|
+
var SAMPLE_USER_IDENTITY_CODE_STRING = "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {\n user_identifier: \"USER_ID_HERE\",\n name: \"USER_NAME_HERE\",\n email: \"USER_EMAIL_HERE\",\n started_at: \"YYYY-MM-DD\",\n}");
|
|
505
|
+
var WIDGET_TYPES = {
|
|
506
|
+
changelog: "changelog",
|
|
507
|
+
chat: "chat",
|
|
508
|
+
replay: "replay"
|
|
509
|
+
};
|
|
510
|
+
var WIDGET_TYPES_VALUES = values(WIDGET_TYPES);
|
|
511
|
+
var EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA = yup.object({
|
|
512
|
+
emails: yup.array().required().label(i18next.t("neetoCommons.widget.email.fields.emails.label")),
|
|
513
|
+
subject: yup.string().required().label(i18next.t("neetoCommons.widget.email.fields.subject.label"))
|
|
514
|
+
});
|
|
515
|
+
var QUERY_KEYS = {
|
|
516
|
+
apiKey: "neetoWidgetApiKey"
|
|
517
|
+
};
|
|
518
|
+
var DEFAULT_QUERY_STALE_TIME = 60 * 60 * 1000; // 1 hour in milliseconds
|
|
519
|
+
|
|
520
|
+
var EMAIL_TYPES = {
|
|
521
|
+
embedCode: "embedCode",
|
|
522
|
+
userIdentity: "userIdentity",
|
|
523
|
+
sessionContext: "sessionContext",
|
|
524
|
+
"null": ""
|
|
525
|
+
};
|
|
526
|
+
|
|
495
527
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
496
528
|
|
|
497
529
|
var propTypes = {exports: {}};
|
|
@@ -1676,6 +1708,125 @@ if (process.env.NODE_ENV !== 'production') {
|
|
|
1676
1708
|
propTypes.exports = requireFactoryWithThrowingShims()();
|
|
1677
1709
|
}
|
|
1678
1710
|
|
|
1711
|
+
function useDebounce(value) {
|
|
1712
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
1713
|
+
|
|
1714
|
+
var _useState = useState(value),
|
|
1715
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1716
|
+
debouncedValue = _useState2[0],
|
|
1717
|
+
setDebouncedValue = _useState2[1];
|
|
1718
|
+
|
|
1719
|
+
useEffect(function () {
|
|
1720
|
+
var handler = setTimeout(function () {
|
|
1721
|
+
setDebouncedValue(value);
|
|
1722
|
+
}, delay);
|
|
1723
|
+
return function () {
|
|
1724
|
+
clearTimeout(handler);
|
|
1725
|
+
};
|
|
1726
|
+
}, [value]);
|
|
1727
|
+
return debouncedValue;
|
|
1728
|
+
}
|
|
1729
|
+
|
|
1730
|
+
var useFuncDebounce = function useFuncDebounce(func) {
|
|
1731
|
+
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
1732
|
+
var timer = useRef(null);
|
|
1733
|
+
|
|
1734
|
+
var debouncedFunc = function debouncedFunc() {
|
|
1735
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1736
|
+
args[_key] = arguments[_key];
|
|
1737
|
+
}
|
|
1738
|
+
|
|
1739
|
+
clearTimeout(timer.current);
|
|
1740
|
+
timer.current = setTimeout(function () {
|
|
1741
|
+
return func.apply(void 0, args);
|
|
1742
|
+
}, delay);
|
|
1743
|
+
};
|
|
1744
|
+
|
|
1745
|
+
debouncedFunc.cancel = function () {
|
|
1746
|
+
return clearTimeout(timer.current);
|
|
1747
|
+
};
|
|
1748
|
+
|
|
1749
|
+
return debouncedFunc;
|
|
1750
|
+
};
|
|
1751
|
+
|
|
1752
|
+
var useForceUpdate = function useForceUpdate() {
|
|
1753
|
+
var _useState = useState(0),
|
|
1754
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1755
|
+
setValue = _useState2[1];
|
|
1756
|
+
|
|
1757
|
+
return function () {
|
|
1758
|
+
return setValue(function (value) {
|
|
1759
|
+
return value + 1;
|
|
1760
|
+
});
|
|
1761
|
+
};
|
|
1762
|
+
};
|
|
1763
|
+
|
|
1764
|
+
var useIsElementVisibleInDom = function useIsElementVisibleInDom(target) {
|
|
1765
|
+
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
1766
|
+
|
|
1767
|
+
var _useState = useState(false),
|
|
1768
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1769
|
+
isIntersecting = _useState2[0],
|
|
1770
|
+
setIntersecting = _useState2[1];
|
|
1771
|
+
|
|
1772
|
+
var forceUpdate = useForceUpdate();
|
|
1773
|
+
useEffect(function () {
|
|
1774
|
+
if (!target) return forceUpdate();
|
|
1775
|
+
var observer = new IntersectionObserver(function (_ref) {
|
|
1776
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
|
1777
|
+
entry = _ref2[0];
|
|
1778
|
+
|
|
1779
|
+
return setIntersecting(entry.isIntersecting);
|
|
1780
|
+
}, options);
|
|
1781
|
+
observer.observe(target);
|
|
1782
|
+
return function () {
|
|
1783
|
+
return observer.unobserve(target);
|
|
1784
|
+
};
|
|
1785
|
+
}, [target, options]);
|
|
1786
|
+
return isIntersecting;
|
|
1787
|
+
};
|
|
1788
|
+
|
|
1789
|
+
var useOnClickOutside = function useOnClickOutside(ref, handler) {
|
|
1790
|
+
useEffect(function () {
|
|
1791
|
+
var listener = function listener(event) {
|
|
1792
|
+
// Do nothing if clicking ref's element or descendent elements
|
|
1793
|
+
if (!ref.current || ref.current.contains(event.target)) {
|
|
1794
|
+
return;
|
|
1795
|
+
}
|
|
1796
|
+
|
|
1797
|
+
handler(event);
|
|
1798
|
+
};
|
|
1799
|
+
|
|
1800
|
+
document.addEventListener("mousedown", listener);
|
|
1801
|
+
document.addEventListener("touchstart", listener);
|
|
1802
|
+
return function () {
|
|
1803
|
+
document.removeEventListener("mousedown", listener);
|
|
1804
|
+
document.removeEventListener("touchstart", listener);
|
|
1805
|
+
};
|
|
1806
|
+
}, [handler]);
|
|
1807
|
+
};
|
|
1808
|
+
|
|
1809
|
+
var usePrevious = function usePrevious(value) {
|
|
1810
|
+
var ref = useRef(value);
|
|
1811
|
+
useEffect(function () {
|
|
1812
|
+
ref.current = value;
|
|
1813
|
+
}, [value]);
|
|
1814
|
+
return ref.current;
|
|
1815
|
+
};
|
|
1816
|
+
|
|
1817
|
+
var useUpdateEffect = function useUpdateEffect(callback) {
|
|
1818
|
+
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
1819
|
+
var isInitialMount = useRef(true);
|
|
1820
|
+
useEffect(function () {
|
|
1821
|
+
if (isInitialMount.current) {
|
|
1822
|
+
isInitialMount.current = false;
|
|
1823
|
+
return;
|
|
1824
|
+
}
|
|
1825
|
+
|
|
1826
|
+
callback();
|
|
1827
|
+
}, dependencies);
|
|
1828
|
+
};
|
|
1829
|
+
|
|
1679
1830
|
var classnames$1 = {exports: {}};
|
|
1680
1831
|
|
|
1681
1832
|
/*!
|
|
@@ -51526,7 +51677,7 @@ var languageLoaders = {
|
|
|
51526
51677
|
return Promise.resolve().then(function () { return apex$1; });
|
|
51527
51678
|
}),
|
|
51528
51679
|
apl: createLanguageAsyncLoader("apl", function () {
|
|
51529
|
-
return Promise.resolve().then(function () { return apl; });
|
|
51680
|
+
return Promise.resolve().then(function () { return apl$1; });
|
|
51530
51681
|
}),
|
|
51531
51682
|
applescript: createLanguageAsyncLoader("applescript", function () {
|
|
51532
51683
|
return Promise.resolve().then(function () { return applescript$2; });
|
|
@@ -51559,7 +51710,7 @@ var languageLoaders = {
|
|
|
51559
51710
|
return Promise.resolve().then(function () { return autoit$2; });
|
|
51560
51711
|
}),
|
|
51561
51712
|
avisynth: createLanguageAsyncLoader("avisynth", function () {
|
|
51562
|
-
return Promise.resolve().then(function () { return avisynth
|
|
51713
|
+
return Promise.resolve().then(function () { return avisynth; });
|
|
51563
51714
|
}),
|
|
51564
51715
|
avroIdl: createLanguageAsyncLoader("avroIdl", function () {
|
|
51565
51716
|
return Promise.resolve().then(function () { return avroIdl; });
|
|
@@ -61343,54 +61494,50 @@ var apex$1 = /*#__PURE__*/_mergeNamespaces({
|
|
|
61343
61494
|
'default': apex_1
|
|
61344
61495
|
}, [apex_1]);
|
|
61345
61496
|
|
|
61346
|
-
var apl_1;
|
|
61347
|
-
|
|
61348
|
-
|
|
61349
|
-
function
|
|
61350
|
-
|
|
61351
|
-
|
|
61352
|
-
|
|
61353
|
-
|
|
61354
|
-
|
|
61355
|
-
|
|
61356
|
-
|
|
61357
|
-
|
|
61358
|
-
|
|
61359
|
-
|
|
61360
|
-
|
|
61361
|
-
|
|
61362
|
-
|
|
61363
|
-
|
|
61364
|
-
|
|
61365
|
-
|
|
61366
|
-
|
|
61367
|
-
|
|
61368
|
-
|
|
61369
|
-
|
|
61370
|
-
|
|
61371
|
-
|
|
61372
|
-
|
|
61373
|
-
|
|
61374
|
-
|
|
61375
|
-
|
|
61376
|
-
|
|
61377
|
-
|
|
61378
|
-
|
|
61379
|
-
|
|
61380
|
-
|
|
61381
|
-
|
|
61382
|
-
|
|
61383
|
-
},
|
|
61384
|
-
punctuation: /[\[;\]()◇⋄]/,
|
|
61385
|
-
dfn: {
|
|
61386
|
-
pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
|
|
61387
|
-
alias: 'builtin'
|
|
61388
|
-
}
|
|
61389
|
-
};
|
|
61390
|
-
}
|
|
61391
|
-
return apl_1;
|
|
61497
|
+
var apl_1 = apl;
|
|
61498
|
+
apl.displayName = 'apl';
|
|
61499
|
+
apl.aliases = [];
|
|
61500
|
+
function apl(Prism) {
|
|
61501
|
+
Prism.languages.apl = {
|
|
61502
|
+
comment: /(?:⍝|#[! ]).*$/m,
|
|
61503
|
+
string: {
|
|
61504
|
+
pattern: /'(?:[^'\r\n]|'')*'/,
|
|
61505
|
+
greedy: true
|
|
61506
|
+
},
|
|
61507
|
+
number:
|
|
61508
|
+
/¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,
|
|
61509
|
+
statement: /:[A-Z][a-z][A-Za-z]*\b/,
|
|
61510
|
+
'system-function': {
|
|
61511
|
+
pattern: /⎕[A-Z]+/i,
|
|
61512
|
+
alias: 'function'
|
|
61513
|
+
},
|
|
61514
|
+
constant: /[⍬⌾#⎕⍞]/,
|
|
61515
|
+
function: /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,
|
|
61516
|
+
'monadic-operator': {
|
|
61517
|
+
pattern: /[\\\/⌿⍀¨⍨⌶&∥]/,
|
|
61518
|
+
alias: 'operator'
|
|
61519
|
+
},
|
|
61520
|
+
'dyadic-operator': {
|
|
61521
|
+
pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/,
|
|
61522
|
+
alias: 'operator'
|
|
61523
|
+
},
|
|
61524
|
+
assignment: {
|
|
61525
|
+
pattern: /←/,
|
|
61526
|
+
alias: 'keyword'
|
|
61527
|
+
},
|
|
61528
|
+
punctuation: /[\[;\]()◇⋄]/,
|
|
61529
|
+
dfn: {
|
|
61530
|
+
pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
|
|
61531
|
+
alias: 'builtin'
|
|
61532
|
+
}
|
|
61533
|
+
};
|
|
61392
61534
|
}
|
|
61393
61535
|
|
|
61536
|
+
var apl$1 = /*#__PURE__*/_mergeNamespaces({
|
|
61537
|
+
__proto__: null,
|
|
61538
|
+
'default': apl_1
|
|
61539
|
+
}, [apl_1]);
|
|
61540
|
+
|
|
61394
61541
|
var applescript_1 = applescript$1;
|
|
61395
61542
|
applescript$1.displayName = 'applescript';
|
|
61396
61543
|
applescript$1.aliases = [];
|
|
@@ -62711,179 +62858,183 @@ var autoit$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
62711
62858
|
'default': autoit_1
|
|
62712
62859
|
}, [autoit_1]);
|
|
62713
62860
|
|
|
62714
|
-
var avisynth_1
|
|
62715
|
-
|
|
62716
|
-
|
|
62717
|
-
function
|
|
62861
|
+
var avisynth_1;
|
|
62862
|
+
var hasRequiredAvisynth;
|
|
62863
|
+
|
|
62864
|
+
function requireAvisynth () {
|
|
62865
|
+
if (hasRequiredAvisynth) return avisynth_1;
|
|
62866
|
+
hasRequiredAvisynth = 1;
|
|
62867
|
+
|
|
62868
|
+
avisynth_1 = avisynth;
|
|
62869
|
+
avisynth.displayName = 'avisynth';
|
|
62870
|
+
avisynth.aliases = ['avs'];
|
|
62871
|
+
function avisynth(Prism) {
|
|
62718
62872
|
(function (Prism) {
|
|
62719
|
-
|
|
62720
|
-
|
|
62721
|
-
|
|
62722
|
-
|
|
62723
|
-
|
|
62724
|
-
|
|
62725
|
-
|
|
62726
|
-
|
|
62727
|
-
|
|
62728
|
-
|
|
62729
|
-
|
|
62730
|
-
|
|
62731
|
-
|
|
62732
|
-
|
|
62733
|
-
|
|
62734
|
-
|
|
62735
|
-
|
|
62736
|
-
|
|
62737
|
-
|
|
62738
|
-
|
|
62739
|
-
|
|
62740
|
-
|
|
62741
|
-
|
|
62742
|
-
|
|
62743
|
-
|
|
62744
|
-
|
|
62745
|
-
|
|
62746
|
-
|
|
62747
|
-
|
|
62748
|
-
|
|
62749
|
-
|
|
62750
|
-
|
|
62751
|
-
|
|
62752
|
-
|
|
62753
|
-
|
|
62754
|
-
|
|
62755
|
-
|
|
62756
|
-
|
|
62757
|
-
|
|
62758
|
-
|
|
62759
|
-
|
|
62760
|
-
|
|
62761
|
-
|
|
62762
|
-
|
|
62763
|
-
|
|
62764
|
-
|
|
62765
|
-
|
|
62766
|
-
|
|
62767
|
-
|
|
62768
|
-
|
|
62769
|
-
|
|
62770
|
-
|
|
62771
|
-
|
|
62772
|
-
|
|
62773
|
-
|
|
62774
|
-
|
|
62775
|
-
|
|
62776
|
-
|
|
62777
|
-
|
|
62778
|
-
|
|
62779
|
-
|
|
62780
|
-
|
|
62781
|
-
|
|
62782
|
-
|
|
62783
|
-
|
|
62784
|
-
|
|
62785
|
-
|
|
62786
|
-
|
|
62787
|
-
|
|
62788
|
-
|
|
62789
|
-
|
|
62790
|
-
|
|
62791
|
-
|
|
62792
|
-
|
|
62793
|
-
|
|
62794
|
-
|
|
62795
|
-
|
|
62796
|
-
|
|
62797
|
-
|
|
62798
|
-
|
|
62799
|
-
|
|
62800
|
-
|
|
62801
|
-
|
|
62802
|
-
|
|
62803
|
-
|
|
62804
|
-
|
|
62805
|
-
|
|
62806
|
-
|
|
62807
|
-
|
|
62808
|
-
|
|
62809
|
-
|
|
62810
|
-
|
|
62811
|
-
|
|
62812
|
-
|
|
62813
|
-
|
|
62814
|
-
|
|
62815
|
-
|
|
62816
|
-
|
|
62817
|
-
|
|
62818
|
-
|
|
62819
|
-
|
|
62820
|
-
|
|
62821
|
-
|
|
62822
|
-
|
|
62823
|
-
|
|
62824
|
-
|
|
62825
|
-
|
|
62826
|
-
|
|
62827
|
-
|
|
62828
|
-
|
|
62829
|
-
|
|
62830
|
-
|
|
62831
|
-
|
|
62832
|
-
|
|
62833
|
-
|
|
62834
|
-
|
|
62835
|
-
|
|
62836
|
-
|
|
62837
|
-
|
|
62838
|
-
|
|
62839
|
-
|
|
62840
|
-
|
|
62841
|
-
|
|
62842
|
-
|
|
62843
|
-
|
|
62844
|
-
|
|
62845
|
-
|
|
62846
|
-
|
|
62847
|
-
|
|
62848
|
-
|
|
62849
|
-
|
|
62850
|
-
|
|
62851
|
-
|
|
62852
|
-
|
|
62853
|
-
|
|
62854
|
-
|
|
62855
|
-
|
|
62856
|
-
|
|
62857
|
-
|
|
62858
|
-
|
|
62859
|
-
|
|
62860
|
-
|
|
62861
|
-
|
|
62862
|
-
|
|
62863
|
-
|
|
62864
|
-
|
|
62865
|
-
|
|
62866
|
-
|
|
62867
|
-
|
|
62868
|
-
|
|
62869
|
-
|
|
62870
|
-
|
|
62871
|
-
|
|
62872
|
-
|
|
62873
|
-
|
|
62874
|
-
|
|
62875
|
-
|
|
62876
|
-
|
|
62877
|
-
|
|
62878
|
-
|
|
62879
|
-
|
|
62873
|
+
function replace(pattern, replacements) {
|
|
62874
|
+
return pattern.replace(/<<(\d+)>>/g, function (m, index) {
|
|
62875
|
+
return replacements[+index]
|
|
62876
|
+
})
|
|
62877
|
+
}
|
|
62878
|
+
function re(pattern, replacements, flags) {
|
|
62879
|
+
return RegExp(replace(pattern, replacements), flags || '')
|
|
62880
|
+
}
|
|
62881
|
+
var types = /bool|clip|float|int|string|val/.source;
|
|
62882
|
+
var internals = [
|
|
62883
|
+
// bools
|
|
62884
|
+
/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/
|
|
62885
|
+
.source, // control
|
|
62886
|
+
/apply|assert|default|eval|import|nop|select|undefined/.source, // global
|
|
62887
|
+
/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/
|
|
62888
|
+
.source, // conv
|
|
62889
|
+
/hex(?:value)?|value/.source, // numeric
|
|
62890
|
+
/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/
|
|
62891
|
+
.source, // trig
|
|
62892
|
+
/a?sinh?|a?cosh?|a?tan[2h]?/.source, // bit
|
|
62893
|
+
/(?:bit(?:and|not|x?or|[lr]?shift[aslu]?|sh[lr]|sa[lr]|[lr]rotatel?|ro[rl]|te?st|set(?:count)?|cl(?:ea)?r|ch(?:an)?ge?))/
|
|
62894
|
+
.source, // runtime
|
|
62895
|
+
/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/
|
|
62896
|
+
.source, // script
|
|
62897
|
+
/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/
|
|
62898
|
+
.source, // string
|
|
62899
|
+
/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/
|
|
62900
|
+
.source, // version
|
|
62901
|
+
/isversionorgreater|version(?:number|string)/.source, // helper
|
|
62902
|
+
/buildpixeltype|colorspacenametopixeltype/.source, // avsplus
|
|
62903
|
+
/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source
|
|
62904
|
+
].join('|');
|
|
62905
|
+
var properties = [
|
|
62906
|
+
// content
|
|
62907
|
+
/has(?:audio|video)/.source, // resolution
|
|
62908
|
+
/height|width/.source, // framerate
|
|
62909
|
+
/frame(?:count|rate)|framerate(?:denominator|numerator)/.source, // interlacing
|
|
62910
|
+
/getparity|is(?:field|frame)based/.source, // color format
|
|
62911
|
+
/bitspercomponent|componentsize|hasalpha|is(?:planar(?:rgba?)?|interleaved|rgb(?:24|32|48|64)?|y(?:8|u(?:va?|y2))?|yv(?:12|16|24|411)|420|422|444|packedrgb)|numcomponents|pixeltype/
|
|
62912
|
+
.source, // audio
|
|
62913
|
+
/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/
|
|
62914
|
+
.source
|
|
62915
|
+
].join('|');
|
|
62916
|
+
var filters = [
|
|
62917
|
+
// source
|
|
62918
|
+
/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/
|
|
62919
|
+
.source, // color
|
|
62920
|
+
/coloryuv|convertbacktoyuy2|convertto(?:RGB(?:24|32|48|64)|(?:planar)?RGBA?|Y8?|YV(?:12|16|24|411)|YUVA?(?:411|420|422|444)|YUY2)|fixluminance|gr[ae]yscale|invert|levels|limiter|mergea?rgb|merge(?:chroma|luma)|rgbadjust|show(?:alpha|blue|green|red)|swapuv|tweak|[uv]toy8?|ytouv/
|
|
62921
|
+
.source, // overlay
|
|
62922
|
+
/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source, // geometry
|
|
62923
|
+
/addborders|(?:bicubic|bilinear|blackman|gauss|lanczos4|lanczos|point|sinc|spline(?:16|36|64))resize|crop(?:bottom)?|flip(?:horizontal|vertical)|(?:horizontal|vertical)?reduceby2|letterbox|skewrows|turn(?:180|left|right)/
|
|
62924
|
+
.source, // pixel
|
|
62925
|
+
/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/
|
|
62926
|
+
.source, // timeline
|
|
62927
|
+
/trim|(?:un)?alignedsplice|(?:assume|assumescaled|change|convert)FPS|(?:delete|duplicate)frame|dissolve|fade(?:in|io|out)[02]?|freezeframe|interleave|loop|reverse|select(?:even|odd|(?:range)?every)/
|
|
62928
|
+
.source, // interlace
|
|
62929
|
+
/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/
|
|
62930
|
+
.source, // audio
|
|
62931
|
+
/amplify(?:db)?|assumesamplerate|audiodub(?:ex)?|audiotrim|convertaudioto(?:(?:8|16|24|32)bit|float)|converttomono|delayaudio|ensurevbrmp3sync|get(?:left|right)?channel|kill(?:audio|video)|mergechannels|mixaudio|monotostereo|normalize|resampleaudio|ssrc|supereq|timestretch/
|
|
62932
|
+
.source, // conditional
|
|
62933
|
+
/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/
|
|
62934
|
+
.source, // export
|
|
62935
|
+
/imagewriter/.source, // debug
|
|
62936
|
+
/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/
|
|
62937
|
+
.source
|
|
62938
|
+
].join('|');
|
|
62939
|
+
var allinternals = [internals, properties, filters].join('|');
|
|
62940
|
+
Prism.languages.avisynth = {
|
|
62941
|
+
comment: [
|
|
62942
|
+
{
|
|
62943
|
+
// Matches [* *] nestable block comments, but only supports 1 level of nested comments
|
|
62944
|
+
// /\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|<self>)*\*\]/
|
|
62945
|
+
pattern:
|
|
62946
|
+
/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,
|
|
62947
|
+
lookbehind: true,
|
|
62948
|
+
greedy: true
|
|
62949
|
+
},
|
|
62950
|
+
{
|
|
62951
|
+
// Matches /* */ block comments
|
|
62952
|
+
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
62953
|
+
lookbehind: true,
|
|
62954
|
+
greedy: true
|
|
62955
|
+
},
|
|
62956
|
+
{
|
|
62957
|
+
// Matches # comments
|
|
62958
|
+
pattern: /(^|[^\\$])#.*/,
|
|
62959
|
+
lookbehind: true,
|
|
62960
|
+
greedy: true
|
|
62961
|
+
}
|
|
62962
|
+
],
|
|
62963
|
+
// Handle before strings because optional arguments are surrounded by double quotes
|
|
62964
|
+
argument: {
|
|
62965
|
+
pattern: re(/\b(?:<<0>>)\s+("?)\w+\1/.source, [types], 'i'),
|
|
62966
|
+
inside: {
|
|
62967
|
+
keyword: /^\w+/
|
|
62968
|
+
}
|
|
62969
|
+
},
|
|
62970
|
+
// Optional argument assignment
|
|
62971
|
+
'argument-label': {
|
|
62972
|
+
pattern: /([,(][\s\\]*)\w+\s*=(?!=)/,
|
|
62973
|
+
lookbehind: true,
|
|
62974
|
+
inside: {
|
|
62975
|
+
'argument-name': {
|
|
62976
|
+
pattern: /^\w+/,
|
|
62977
|
+
alias: 'punctuation'
|
|
62978
|
+
},
|
|
62979
|
+
punctuation: /=$/
|
|
62980
|
+
}
|
|
62981
|
+
},
|
|
62982
|
+
string: [
|
|
62983
|
+
{
|
|
62984
|
+
// triple double-quoted
|
|
62985
|
+
pattern: /"""[\s\S]*?"""/,
|
|
62986
|
+
greedy: true
|
|
62987
|
+
},
|
|
62988
|
+
{
|
|
62989
|
+
// single double-quoted
|
|
62990
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
62991
|
+
greedy: true,
|
|
62992
|
+
inside: {
|
|
62993
|
+
constant: {
|
|
62994
|
+
// These *are* case-sensitive!
|
|
62995
|
+
pattern:
|
|
62996
|
+
/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/
|
|
62997
|
+
}
|
|
62998
|
+
}
|
|
62999
|
+
}
|
|
63000
|
+
],
|
|
63001
|
+
// The special "last" variable that takes the value of the last implicitly returned clip
|
|
63002
|
+
variable: /\b(?:last)\b/i,
|
|
63003
|
+
boolean: /\b(?:false|no|true|yes)\b/i,
|
|
63004
|
+
keyword:
|
|
63005
|
+
/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,
|
|
63006
|
+
constant: /\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,
|
|
63007
|
+
// AviSynth's internal functions, filters, and properties
|
|
63008
|
+
'builtin-function': {
|
|
63009
|
+
pattern: re(/\b(?:<<0>>)\b/.source, [allinternals], 'i'),
|
|
63010
|
+
alias: 'function'
|
|
63011
|
+
},
|
|
63012
|
+
'type-cast': {
|
|
63013
|
+
pattern: re(/\b(?:<<0>>)(?=\s*\()/.source, [types], 'i'),
|
|
63014
|
+
alias: 'keyword'
|
|
63015
|
+
},
|
|
63016
|
+
// External/user-defined filters
|
|
63017
|
+
function: {
|
|
63018
|
+
pattern: /\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,
|
|
63019
|
+
lookbehind: true
|
|
63020
|
+
},
|
|
63021
|
+
// Matches a \ as the first or last character on a line
|
|
63022
|
+
'line-continuation': {
|
|
63023
|
+
pattern: /(^[ \t]*)\\|\\(?=[ \t]*$)/m,
|
|
63024
|
+
lookbehind: true,
|
|
63025
|
+
alias: 'punctuation'
|
|
63026
|
+
},
|
|
63027
|
+
number:
|
|
63028
|
+
/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,
|
|
63029
|
+
operator: /\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,
|
|
63030
|
+
punctuation: /[{}\[\]();,.]/
|
|
63031
|
+
};
|
|
63032
|
+
Prism.languages.avs = Prism.languages.avisynth;
|
|
63033
|
+
})(Prism);
|
|
63034
|
+
}
|
|
63035
|
+
return avisynth_1;
|
|
62880
63036
|
}
|
|
62881
63037
|
|
|
62882
|
-
var avisynth$1 = /*#__PURE__*/_mergeNamespaces({
|
|
62883
|
-
__proto__: null,
|
|
62884
|
-
'default': avisynth_1
|
|
62885
|
-
}, [avisynth_1]);
|
|
62886
|
-
|
|
62887
63038
|
var avroIdl_1;
|
|
62888
63039
|
var hasRequiredAvroIdl;
|
|
62889
63040
|
|
|
@@ -84117,7 +84268,7 @@ refractor.register(al_1);
|
|
|
84117
84268
|
refractor.register(antlr4_1);
|
|
84118
84269
|
refractor.register(apacheconf_1);
|
|
84119
84270
|
refractor.register(apex_1);
|
|
84120
|
-
refractor.register(
|
|
84271
|
+
refractor.register(apl_1);
|
|
84121
84272
|
refractor.register(applescript_1);
|
|
84122
84273
|
refractor.register(aql_1);
|
|
84123
84274
|
refractor.register(arduino_1);
|
|
@@ -84128,7 +84279,7 @@ refractor.register(asmatmel_1);
|
|
|
84128
84279
|
refractor.register(aspnet_1);
|
|
84129
84280
|
refractor.register(autohotkey_1);
|
|
84130
84281
|
refractor.register(autoit_1);
|
|
84131
|
-
refractor.register(
|
|
84282
|
+
refractor.register(requireAvisynth());
|
|
84132
84283
|
refractor.register(requireAvroIdl());
|
|
84133
84284
|
refractor.register(requireBash());
|
|
84134
84285
|
refractor.register(requireBasic());
|
|
@@ -85562,7 +85713,7 @@ var copyToClipboard = /*#__PURE__*/function () {
|
|
|
85562
85713
|
|
|
85563
85714
|
var CodeBlock = function CodeBlock(_ref) {
|
|
85564
85715
|
var _ref$title = _ref.title,
|
|
85565
|
-
title = _ref$title === void 0 ? "Code snippet" : _ref$title,
|
|
85716
|
+
title = _ref$title === void 0 ? /*#__PURE__*/React__default.createElement("div", null, "Code snippet") : _ref$title,
|
|
85566
85717
|
codeString = _ref.codeString,
|
|
85567
85718
|
_ref$showCopyButton = _ref.showCopyButton,
|
|
85568
85719
|
showCopyButton = _ref$showCopyButton === void 0 ? true : _ref$showCopyButton,
|
|
@@ -85623,7 +85774,7 @@ var CodeBlock = function CodeBlock(_ref) {
|
|
|
85623
85774
|
};
|
|
85624
85775
|
|
|
85625
85776
|
CodeBlock.propTypes = {
|
|
85626
|
-
title: propTypes.exports.
|
|
85777
|
+
title: propTypes.exports.object,
|
|
85627
85778
|
codeString: propTypes.exports.string,
|
|
85628
85779
|
showCopyButton: propTypes.exports.bool,
|
|
85629
85780
|
className: propTypes.exports.string,
|
|
@@ -85631,32 +85782,13 @@ CodeBlock.propTypes = {
|
|
|
85631
85782
|
codeStyles: propTypes.exports.object
|
|
85632
85783
|
};
|
|
85633
85784
|
|
|
85634
|
-
var EMBED_WIDGET_S3_SCRIPT_STRING = "<script src=\"https://neeto-widget.s3.ap-south-1.amazonaws.com/embedNeetoWidget.js\"></script>";
|
|
85635
|
-
var DISABLE_NEETO_CHAT = "disableNeetoChat: true,";
|
|
85636
|
-
var DISABLE_NEETO_CHANGELOG = "disableNeetoChangelog: true,";
|
|
85637
|
-
var DISABLE_NEETO_REPLAY = "disableNeetoReplay: true,";
|
|
85638
|
-
var SAMPLE_CONTEXT_CODE_STRING = "window.NeetoReplayWidgetSessionContext = {\n key1: \"value\",\n key2: [\"array\", \"of\", \"values\"],\n /* More key-value pairs */\n}";
|
|
85639
|
-
var SAMPLE_USER_IDENTITY_CODE_STRING = "window.NeetoWidgetUserIdentity = {\n user_identifier: \"USER_ID_HERE\",\n name: \"USER_NAME_HERE\",\n email: \"USER_EMAIL_HERE\",\n started_at: \"YYYY-MM-DD\",\n}";
|
|
85640
|
-
var WIDGET_TYPES = {
|
|
85641
|
-
changelog: "changelog",
|
|
85642
|
-
chat: "chat",
|
|
85643
|
-
replay: "replay"
|
|
85644
|
-
};
|
|
85645
|
-
var WIDGET_TYPES_VALUES = values(WIDGET_TYPES);
|
|
85646
|
-
var EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA = yup.object({
|
|
85647
|
-
emails: yup.array().required().label(i18next.t("neetoCommons.widget.email.fields.emails.label")),
|
|
85648
|
-
subject: yup.string().required().label(i18next.t("neetoCommons.widget.email.fields.subject.label"))
|
|
85649
|
-
});
|
|
85650
|
-
var QUERY_KEYS = {
|
|
85651
|
-
apiKey: "neetoWidgetApiKey"
|
|
85652
|
-
};
|
|
85653
|
-
var DEFAULT_QUERY_STALE_TIME = 60 * 60 * 1000; // 1 hour in milliseconds
|
|
85654
|
-
|
|
85655
85785
|
var getWidgetApiKeyUrl = function getWidgetApiKeyUrl() {
|
|
85656
85786
|
return "api/v1/widget/api_keys/".concat(window.globalProps.organization.subdomain);
|
|
85657
85787
|
};
|
|
85658
85788
|
var EMBED_CODE_EMAIL_URL = "api/v1/widget/email_snippets";
|
|
85659
85789
|
var WIDGET_KB_BASE_URL = "https://neetowidgethelp.neetokb.com";
|
|
85790
|
+
var NEETO_REPLAY_CONFIGURE_URL = "".concat(WIDGET_KB_BASE_URL, "/articles/configure-neetoreplay");
|
|
85791
|
+
var NEETO_CHAT_USER_IDENTITY_URL = "".concat(WIDGET_KB_BASE_URL, "/articles/configuring-neetochat");
|
|
85660
85792
|
var WIDGET_KB_HELP_URL = {
|
|
85661
85793
|
changelog: "".concat(WIDGET_KB_BASE_URL, "/categories/getting-started-with-neetochangelog"),
|
|
85662
85794
|
chat: "".concat(WIDGET_KB_BASE_URL, "/categories/getting-started-with-neetochat"),
|
|
@@ -85716,16 +85848,6 @@ var embedWidgetEnvironment = function embedWidgetEnvironment() {
|
|
|
85716
85848
|
}
|
|
85717
85849
|
};
|
|
85718
85850
|
|
|
85719
|
-
var getSampleUserIdentity = function getSampleUserIdentity(enabledWidgets) {
|
|
85720
|
-
return indentAndFormat(SAMPLE_USER_IDENTITY_CODE_STRING, function (cmd) {
|
|
85721
|
-
if (!enabledWidgets.chat && !cmd.includes("email") && !cmd.includes("{") && !cmd.includes("}") || !enabledWidgets.chat && !enabledWidgets.replay) {
|
|
85722
|
-
return getCommentedCommand(cmd, false, true);
|
|
85723
|
-
}
|
|
85724
|
-
|
|
85725
|
-
return cmd;
|
|
85726
|
-
});
|
|
85727
|
-
};
|
|
85728
|
-
|
|
85729
85851
|
var embedWidgetApiKey = function embedWidgetApiKey(apiKey) {
|
|
85730
85852
|
return "apiKey: \"".concat(apiKey, "\",");
|
|
85731
85853
|
};
|
|
@@ -85748,17 +85870,28 @@ var embedWidgetFunctionCall = function embedWidgetFunctionCall(enabledWidgets, a
|
|
|
85748
85870
|
}), "\n});");
|
|
85749
85871
|
};
|
|
85750
85872
|
|
|
85873
|
+
var filterMarkedCommands = function filterMarkedCommands(queryString) {
|
|
85874
|
+
return queryString.split("\n").filter(function (line) {
|
|
85875
|
+
return !line.includes("///") && line.trim();
|
|
85876
|
+
}).join("\n");
|
|
85877
|
+
};
|
|
85878
|
+
|
|
85879
|
+
var getSampleUserIdentity = function getSampleUserIdentity(enabledWidgets) {
|
|
85880
|
+
return filterMarkedCommands(SAMPLE_USER_IDENTITY_CODE_STRING.split("\n").map(function (cmd) {
|
|
85881
|
+
if (!enabledWidgets.chat && !cmd.includes("email") && !cmd.includes("{") && !cmd.includes("}") || !enabledWidgets.chat && !enabledWidgets.replay) {
|
|
85882
|
+
return getCommentedCommand(cmd, false, true);
|
|
85883
|
+
}
|
|
85884
|
+
|
|
85885
|
+
return cmd;
|
|
85886
|
+
}).join("\n"));
|
|
85887
|
+
};
|
|
85751
85888
|
var sampleConsolidatedCodeString = function sampleConsolidatedCodeString(enabledWidgets, apiKey) {
|
|
85752
|
-
return "".concat(EMBED_WIDGET_S3_SCRIPT_STRING, "\n<script>\n ").concat(
|
|
85753
|
-
return getCommentedCommand(cmd, enabledWidgets.replay, true);
|
|
85754
|
-
}), "\n\n ").concat(indentAndFormat(embedWidgetFunctionCall(enabledWidgets, apiKey)), "\n</script>");
|
|
85889
|
+
return filterMarkedCommands("".concat(EMBED_WIDGET_S3_SCRIPT_STRING, "\n<script>\n ").concat(enabledWidgets.chat || enabledWidgets.replay ? "window.".concat(NEETO_WIDGET_USER_IDENTITY_KEY, " = {};") : "", "\n ").concat(enabledWidgets.replay ? "window.".concat(SESSION_CONTEXT_KEY, " = {};") : "", "\n\n ").concat(indentAndFormat(embedWidgetFunctionCall(enabledWidgets, apiKey)), "\n</script>"));
|
|
85755
85890
|
};
|
|
85756
|
-
var getEmailWidgetSnippetFormInitialValues = function getEmailWidgetSnippetFormInitialValues(
|
|
85891
|
+
var getEmailWidgetSnippetFormInitialValues = function getEmailWidgetSnippetFormInitialValues(subject) {
|
|
85757
85892
|
return {
|
|
85758
85893
|
emails: "",
|
|
85759
|
-
subject:
|
|
85760
|
-
selectedWidgets: selectedWidgets
|
|
85761
|
-
})
|
|
85894
|
+
subject: subject
|
|
85762
85895
|
};
|
|
85763
85896
|
};
|
|
85764
85897
|
var getSelectedWidgetsCombinedText = function getSelectedWidgetsCombinedText(widgets) {
|
|
@@ -85784,7 +85917,10 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
85784
85917
|
_ref$onSent = _ref.onSent,
|
|
85785
85918
|
onSent = _ref$onSent === void 0 ? noop$2 : _ref$onSent,
|
|
85786
85919
|
codeString = _ref.codeString,
|
|
85787
|
-
|
|
85920
|
+
_ref$subject = _ref.subject,
|
|
85921
|
+
subject = _ref$subject === void 0 ? "" : _ref$subject,
|
|
85922
|
+
_ref$body = _ref.body,
|
|
85923
|
+
body = _ref$body === void 0 ? "" : _ref$body;
|
|
85788
85924
|
|
|
85789
85925
|
var _useTranslation = useTranslation(),
|
|
85790
85926
|
t = _useTranslation.t;
|
|
@@ -85812,7 +85948,7 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
85812
85948
|
emailMutation.mutate({
|
|
85813
85949
|
subject: formData.subject,
|
|
85814
85950
|
emails: pluck("value", formData.emails),
|
|
85815
|
-
message:
|
|
85951
|
+
message: body,
|
|
85816
85952
|
snippet: codeString
|
|
85817
85953
|
});
|
|
85818
85954
|
|
|
@@ -85829,19 +85965,13 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
85829
85965
|
};
|
|
85830
85966
|
}();
|
|
85831
85967
|
|
|
85832
|
-
var getDefaultBody = function getDefaultBody() {
|
|
85833
|
-
return t("neetoCommons.widget.email.body", {
|
|
85834
|
-
selectedWidgets: getSelectedWidgetsCombinedText(selectedWidgets)
|
|
85835
|
-
});
|
|
85836
|
-
};
|
|
85837
|
-
|
|
85838
85968
|
return /*#__PURE__*/React__default.createElement(Modal, {
|
|
85839
85969
|
className: "rounded-lg w-1/2 mx-auto",
|
|
85840
85970
|
isOpen: isModalOpen,
|
|
85841
85971
|
size: "medium",
|
|
85842
85972
|
onClose: onClose
|
|
85843
85973
|
}, /*#__PURE__*/React__default.createElement(Formik, {
|
|
85844
|
-
initialValues: getEmailWidgetSnippetFormInitialValues(
|
|
85974
|
+
initialValues: getEmailWidgetSnippetFormInitialValues(subject),
|
|
85845
85975
|
validationSchema: EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA,
|
|
85846
85976
|
onSubmit: handleSubmit
|
|
85847
85977
|
}, /*#__PURE__*/React__default.createElement(Form, null, /*#__PURE__*/React__default.createElement(Modal.Header, null, /*#__PURE__*/React__default.createElement(Typography, {
|
|
@@ -85864,7 +85994,7 @@ var CodeSnippet = function CodeSnippet(_ref) {
|
|
|
85864
85994
|
}, /*#__PURE__*/React__default.createElement(Typography, {
|
|
85865
85995
|
className: "mb-6",
|
|
85866
85996
|
style: "body1"
|
|
85867
|
-
},
|
|
85997
|
+
}, body), /*#__PURE__*/React__default.createElement(CodeBlock, {
|
|
85868
85998
|
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
85869
85999
|
codeString: codeString,
|
|
85870
86000
|
copyButton: false,
|
|
@@ -85890,11 +86020,18 @@ CodeSnippet.propTypes = {
|
|
|
85890
86020
|
onClose: propTypes.exports.func,
|
|
85891
86021
|
onSent: propTypes.exports.func,
|
|
85892
86022
|
codeString: propTypes.exports.string,
|
|
85893
|
-
|
|
86023
|
+
subject: propTypes.exports.string,
|
|
86024
|
+
body: propTypes.exports.string
|
|
85894
86025
|
};
|
|
85895
86026
|
|
|
85896
86027
|
var useFetchApiKey = function useFetchApiKey() {
|
|
85897
86028
|
return useQuery(QUERY_KEYS.apiKey, function () {
|
|
86029
|
+
if (window.globalProps.railsEnv === "heroku" || !process.env.ENABLE_SSO) {
|
|
86030
|
+
return Promise.resolve({
|
|
86031
|
+
widgetApiKey: "placeholder-api-key"
|
|
86032
|
+
});
|
|
86033
|
+
}
|
|
86034
|
+
|
|
85898
86035
|
return queryWidgetApiKey();
|
|
85899
86036
|
}, {
|
|
85900
86037
|
staleTime: DEFAULT_QUERY_STALE_TIME
|
|
@@ -85912,9 +86049,8 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
85912
86049
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
85913
86050
|
className: "mb-1",
|
|
85914
86051
|
key: widget
|
|
85915
|
-
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default.createElement(
|
|
86052
|
+
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default.createElement(Switch, {
|
|
85916
86053
|
label: "neeto".concat(capitalize(widget)),
|
|
85917
|
-
size: "small",
|
|
85918
86054
|
checked: selectedWidgets.includes(widget),
|
|
85919
86055
|
onChange: function onChange() {
|
|
85920
86056
|
return updateSelectedWidgets(widget);
|
|
@@ -85926,7 +86062,7 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
85926
86062
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
85927
86063
|
className: "mb-4 px-2 w-full flex items-center justify-between gap-2"
|
|
85928
86064
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
85929
|
-
className: "flex items-center justify-start gap-
|
|
86065
|
+
className: "flex items-center justify-start gap-1"
|
|
85930
86066
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
85931
86067
|
className: "font-semibold text-base"
|
|
85932
86068
|
}, "neeto", formattedPrimaryWidget), /*#__PURE__*/React__default.createElement("a", {
|
|
@@ -85934,7 +86070,7 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
85934
86070
|
target: "_blank",
|
|
85935
86071
|
rel: "noreferrer"
|
|
85936
86072
|
}, /*#__PURE__*/React__default.createElement(Help, {
|
|
85937
|
-
size:
|
|
86073
|
+
size: 16
|
|
85938
86074
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
85939
86075
|
className: "flex items-center justify-end gap-2"
|
|
85940
86076
|
}, renderSelectedTab()));
|
|
@@ -85947,8 +86083,6 @@ SelectionTabs.propTypes = {
|
|
|
85947
86083
|
};
|
|
85948
86084
|
|
|
85949
86085
|
var EmbedCode = function EmbedCode(_ref) {
|
|
85950
|
-
var _apiKeyResult$data2;
|
|
85951
|
-
|
|
85952
86086
|
var _ref$primaryApp = _ref.primaryApp,
|
|
85953
86087
|
primaryApp = _ref$primaryApp === void 0 ? "" : _ref$primaryApp,
|
|
85954
86088
|
_ref$initialSelectedW = _ref.initialSelectedWidgets,
|
|
@@ -85960,16 +86094,18 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
85960
86094
|
var apiKeyResult = useFetchApiKey();
|
|
85961
86095
|
var initialWidgets = uniq(intersection(append(primaryApp, initialSelectedWidgets), WIDGET_TYPES_VALUES));
|
|
85962
86096
|
|
|
85963
|
-
var _useState = useState(
|
|
86097
|
+
var _useState = useState(EMAIL_TYPES["null"]),
|
|
85964
86098
|
_useState2 = _slicedToArray(_useState, 2),
|
|
85965
|
-
|
|
85966
|
-
|
|
86099
|
+
emailType = _useState2[0],
|
|
86100
|
+
setEmailType = _useState2[1];
|
|
85967
86101
|
|
|
85968
86102
|
var _useState3 = useState(intersection(initialWidgets, WIDGET_TYPES_VALUES)),
|
|
85969
86103
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
85970
86104
|
selectedWidgets = _useState4[0],
|
|
85971
86105
|
setSelectedWidgets = _useState4[1];
|
|
85972
86106
|
|
|
86107
|
+
var previousEmailType = usePrevious(emailType);
|
|
86108
|
+
|
|
85973
86109
|
var updateSelectedWidgets = function updateSelectedWidgets(widget) {
|
|
85974
86110
|
if (selectedWidgets.includes(widget)) {
|
|
85975
86111
|
setSelectedWidgets(without([widget], selectedWidgets));
|
|
@@ -85981,25 +86117,64 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
85981
86117
|
var enabledWidgets = fromPairs(selectedWidgets.map(function (widget) {
|
|
85982
86118
|
return [widget, true];
|
|
85983
86119
|
}));
|
|
85984
|
-
|
|
86120
|
+
|
|
86121
|
+
var getEmbedCodeString = function getEmbedCodeString() {
|
|
85985
86122
|
var _apiKeyResult$data;
|
|
85986
86123
|
|
|
85987
86124
|
if ((_apiKeyResult$data = apiKeyResult.data) !== null && _apiKeyResult$data !== void 0 && _apiKeyResult$data.widgetApiKey) {
|
|
85988
|
-
return sampleConsolidatedCodeString(enabledWidgets, apiKeyResult.data.widgetApiKey)
|
|
85989
|
-
return !line.includes("///") && line.trim();
|
|
85990
|
-
}).join("\n");
|
|
86125
|
+
return sampleConsolidatedCodeString(enabledWidgets, apiKeyResult.data.widgetApiKey);
|
|
85991
86126
|
}
|
|
85992
86127
|
|
|
85993
86128
|
return "";
|
|
85994
|
-
}
|
|
86129
|
+
};
|
|
86130
|
+
|
|
86131
|
+
var getSnippetProps = function getSnippetProps(selectedEmailType) {
|
|
86132
|
+
switch (selectedEmailType) {
|
|
86133
|
+
case EMAIL_TYPES.embedCode:
|
|
86134
|
+
return {
|
|
86135
|
+
codeString: getEmbedCodeString(),
|
|
86136
|
+
subject: t("neetoCommons.widget.email.fields.subject.values.embedCode", {
|
|
86137
|
+
selectedWidgets: getSelectedWidgetsCombinedText(selectedWidgets)
|
|
86138
|
+
}),
|
|
86139
|
+
body: t("neetoCommons.widget.email.body.values.embedCode", {
|
|
86140
|
+
selectedWidgets: getSelectedWidgetsCombinedText(selectedWidgets),
|
|
86141
|
+
neetoKbUrl: WIDGET_KB_BASE_URL
|
|
86142
|
+
})
|
|
86143
|
+
};
|
|
86144
|
+
|
|
86145
|
+
case EMAIL_TYPES.userIdentity:
|
|
86146
|
+
return {
|
|
86147
|
+
codeString: getSampleUserIdentity(enabledWidgets),
|
|
86148
|
+
subject: t("neetoCommons.widget.email.fields.subject.values.userIdentity"),
|
|
86149
|
+
body: t("neetoCommons.widget.email.body.values.userIdentity", {
|
|
86150
|
+
userIdentityKbUrl: enabledWidgets.chat ? NEETO_CHAT_USER_IDENTITY_URL : NEETO_REPLAY_CONFIGURE_URL
|
|
86151
|
+
})
|
|
86152
|
+
};
|
|
86153
|
+
|
|
86154
|
+
case EMAIL_TYPES.sessionContext:
|
|
86155
|
+
return {
|
|
86156
|
+
codeString: SAMPLE_CONTEXT_CODE_STRING,
|
|
86157
|
+
subject: t("neetoCommons.widget.email.fields.subject.values.sessionContext"),
|
|
86158
|
+
body: t("neetoCommons.widget.email.body.values.sessionContext", {
|
|
86159
|
+
sessionContextKbUrl: NEETO_REPLAY_CONFIGURE_URL
|
|
86160
|
+
})
|
|
86161
|
+
};
|
|
86162
|
+
|
|
86163
|
+
case EMAIL_TYPES["null"]:
|
|
86164
|
+
return previousEmailType !== EMAIL_TYPES["null"] ? getSnippetProps(previousEmailType) : {};
|
|
86165
|
+
|
|
86166
|
+
default:
|
|
86167
|
+
throw new Error("Invalid email type received.");
|
|
86168
|
+
}
|
|
86169
|
+
};
|
|
85995
86170
|
|
|
85996
|
-
var handleSendViaEmail = function handleSendViaEmail() {
|
|
86171
|
+
var handleSendViaEmail = function handleSendViaEmail(selectedEmail) {
|
|
85997
86172
|
if (isEmpty(selectedWidgets)) {
|
|
85998
86173
|
Toastr.error(t("neetoCommons.widget.installation.snippet.disabledError"));
|
|
85999
86174
|
return;
|
|
86000
86175
|
}
|
|
86001
86176
|
|
|
86002
|
-
|
|
86177
|
+
setEmailType(selectedEmail);
|
|
86003
86178
|
};
|
|
86004
86179
|
|
|
86005
86180
|
if (apiKeyResult.isLoading) {
|
|
@@ -86009,20 +86184,22 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
86009
86184
|
}
|
|
86010
86185
|
|
|
86011
86186
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
86012
|
-
className: "mx-auto w-full flex-col items-center justify-start"
|
|
86187
|
+
className: "mx-auto w-full flex-col items-center justify-start mb-10"
|
|
86013
86188
|
}, /*#__PURE__*/React__default.createElement(SelectionTabs, {
|
|
86014
86189
|
primarySelectedWidget: primaryApp,
|
|
86015
86190
|
selectedWidgets: selectedWidgets,
|
|
86016
86191
|
updateSelectedWidgets: updateSelectedWidgets
|
|
86017
86192
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
86018
|
-
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start"
|
|
86193
|
+
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start mb-6"
|
|
86019
86194
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
86020
86195
|
className: "mx-auto mb-4 w-full"
|
|
86021
86196
|
}, /*#__PURE__*/React__default.createElement(CodeBlock, {
|
|
86022
|
-
codeString:
|
|
86197
|
+
codeString: getEmbedCodeString(),
|
|
86023
86198
|
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
86024
|
-
title: "Embed
|
|
86025
|
-
sendViaEmail:
|
|
86199
|
+
title: /*#__PURE__*/React__default.createElement("div", null, "Embed code"),
|
|
86200
|
+
sendViaEmail: function sendViaEmail() {
|
|
86201
|
+
return handleSendViaEmail(EMAIL_TYPES.embedCode);
|
|
86202
|
+
}
|
|
86026
86203
|
})), /*#__PURE__*/React__default.createElement("div", {
|
|
86027
86204
|
className: "w-full"
|
|
86028
86205
|
}, /*#__PURE__*/React__default.createElement(Trans, {
|
|
@@ -86038,14 +86215,56 @@ var EmbedCode = function EmbedCode(_ref) {
|
|
|
86038
86215
|
className: "font-normal"
|
|
86039
86216
|
})
|
|
86040
86217
|
}
|
|
86041
|
-
}, "Place the embed code in your HTML file. This will embed the selected widgets in your website.")), /*#__PURE__*/React__default.createElement(
|
|
86042
|
-
|
|
86043
|
-
|
|
86044
|
-
|
|
86218
|
+
}, "Place the embed code in your HTML file. This will embed the selected widgets in your website."))), enabledWidgets.chat || enabledWidgets.replay ? /*#__PURE__*/React__default.createElement("div", {
|
|
86219
|
+
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start mb-6"
|
|
86220
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
86221
|
+
className: "mx-auto mb-4 w-full"
|
|
86222
|
+
}, /*#__PURE__*/React__default.createElement(CodeBlock, {
|
|
86223
|
+
codeString: getSampleUserIdentity(enabledWidgets),
|
|
86224
|
+
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
86225
|
+
sendViaEmail: function sendViaEmail() {
|
|
86226
|
+
return handleSendViaEmail(EMAIL_TYPES.userIdentity);
|
|
86227
|
+
},
|
|
86228
|
+
title: /*#__PURE__*/React__default.createElement("div", {
|
|
86229
|
+
className: "flex items-center justify-start"
|
|
86230
|
+
}, /*#__PURE__*/React__default.createElement("div", null, "User identity (Optional)"), /*#__PURE__*/React__default.createElement("a", {
|
|
86231
|
+
href: enabledWidgets.chat ? NEETO_CHAT_USER_IDENTITY_URL : NEETO_REPLAY_CONFIGURE_URL,
|
|
86232
|
+
target: "_blank",
|
|
86233
|
+
rel: "noreferrer",
|
|
86234
|
+
className: "ml-1"
|
|
86235
|
+
}, /*#__PURE__*/React__default.createElement(Help, {
|
|
86236
|
+
size: 16
|
|
86237
|
+
})))
|
|
86238
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
86239
|
+
className: "w-full"
|
|
86240
|
+
}, t("neetoCommons.widget.installation.instructions.userIdentity"))) : null, enabledWidgets.replay ? /*#__PURE__*/React__default.createElement("div", {
|
|
86241
|
+
className: "mx-auto w-full max-w-2xl flex-grow flex-col items-center justify-start"
|
|
86242
|
+
}, /*#__PURE__*/React__default.createElement("div", {
|
|
86243
|
+
className: "mx-auto mb-4 w-full"
|
|
86244
|
+
}, /*#__PURE__*/React__default.createElement(CodeBlock, {
|
|
86245
|
+
codeString: SAMPLE_CONTEXT_CODE_STRING,
|
|
86246
|
+
className: "neeto-ui-bg-primary-100 neeto-ui-rounded-xl overflow-hidden",
|
|
86247
|
+
sendViaEmail: function sendViaEmail() {
|
|
86248
|
+
return handleSendViaEmail(EMAIL_TYPES.sessionContext);
|
|
86249
|
+
},
|
|
86250
|
+
title: /*#__PURE__*/React__default.createElement("div", {
|
|
86251
|
+
className: "flex items-center justify-start"
|
|
86252
|
+
}, /*#__PURE__*/React__default.createElement("div", null, "Session context (Optional)"), /*#__PURE__*/React__default.createElement("a", {
|
|
86253
|
+
href: NEETO_REPLAY_CONFIGURE_URL,
|
|
86254
|
+
target: "_blank",
|
|
86255
|
+
rel: "noreferrer",
|
|
86256
|
+
className: "ml-1"
|
|
86257
|
+
}, /*#__PURE__*/React__default.createElement(Help, {
|
|
86258
|
+
size: 16
|
|
86259
|
+
})))
|
|
86260
|
+
})), /*#__PURE__*/React__default.createElement("div", {
|
|
86261
|
+
className: "w-full"
|
|
86262
|
+
}, t("neetoCommons.widget.installation.instructions.sessionContext"))) : null, /*#__PURE__*/React__default.createElement(CodeSnippet, _extends$4({
|
|
86263
|
+
isModalOpen: !!emailType && isNotEmpty(selectedWidgets),
|
|
86045
86264
|
onClose: function onClose() {
|
|
86046
|
-
return
|
|
86265
|
+
return setEmailType(EMAIL_TYPES["null"]);
|
|
86047
86266
|
}
|
|
86048
|
-
})));
|
|
86267
|
+
}, getSnippetProps(emailType))));
|
|
86049
86268
|
};
|
|
86050
86269
|
|
|
86051
86270
|
EmbedCode.propTypes = {
|
|
@@ -86225,126 +86444,8 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
86225
86444
|
};
|
|
86226
86445
|
|
|
86227
86446
|
var NeetoWidget = {
|
|
86228
|
-
EmbedCode: EmbedCodeQueryClient
|
|
86229
|
-
|
|
86230
|
-
|
|
86231
|
-
function useDebounce(value) {
|
|
86232
|
-
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
86233
|
-
|
|
86234
|
-
var _useState = useState(value),
|
|
86235
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
86236
|
-
debouncedValue = _useState2[0],
|
|
86237
|
-
setDebouncedValue = _useState2[1];
|
|
86238
|
-
|
|
86239
|
-
useEffect(function () {
|
|
86240
|
-
var handler = setTimeout(function () {
|
|
86241
|
-
setDebouncedValue(value);
|
|
86242
|
-
}, delay);
|
|
86243
|
-
return function () {
|
|
86244
|
-
clearTimeout(handler);
|
|
86245
|
-
};
|
|
86246
|
-
}, [value]);
|
|
86247
|
-
return debouncedValue;
|
|
86248
|
-
}
|
|
86249
|
-
|
|
86250
|
-
var useFuncDebounce = function useFuncDebounce(func) {
|
|
86251
|
-
var delay = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 350;
|
|
86252
|
-
var timer = useRef(null);
|
|
86253
|
-
|
|
86254
|
-
var debouncedFunc = function debouncedFunc() {
|
|
86255
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
86256
|
-
args[_key] = arguments[_key];
|
|
86257
|
-
}
|
|
86258
|
-
|
|
86259
|
-
clearTimeout(timer.current);
|
|
86260
|
-
timer.current = setTimeout(function () {
|
|
86261
|
-
return func.apply(void 0, args);
|
|
86262
|
-
}, delay);
|
|
86263
|
-
};
|
|
86264
|
-
|
|
86265
|
-
debouncedFunc.cancel = function () {
|
|
86266
|
-
return clearTimeout(timer.current);
|
|
86267
|
-
};
|
|
86268
|
-
|
|
86269
|
-
return debouncedFunc;
|
|
86270
|
-
};
|
|
86271
|
-
|
|
86272
|
-
var useForceUpdate = function useForceUpdate() {
|
|
86273
|
-
var _useState = useState(0),
|
|
86274
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
86275
|
-
setValue = _useState2[1];
|
|
86276
|
-
|
|
86277
|
-
return function () {
|
|
86278
|
-
return setValue(function (value) {
|
|
86279
|
-
return value + 1;
|
|
86280
|
-
});
|
|
86281
|
-
};
|
|
86282
|
-
};
|
|
86283
|
-
|
|
86284
|
-
var useIsElementVisibleInDom = function useIsElementVisibleInDom(target) {
|
|
86285
|
-
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
|
|
86286
|
-
|
|
86287
|
-
var _useState = useState(false),
|
|
86288
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
86289
|
-
isIntersecting = _useState2[0],
|
|
86290
|
-
setIntersecting = _useState2[1];
|
|
86291
|
-
|
|
86292
|
-
var forceUpdate = useForceUpdate();
|
|
86293
|
-
useEffect(function () {
|
|
86294
|
-
if (!target) return forceUpdate();
|
|
86295
|
-
var observer = new IntersectionObserver(function (_ref) {
|
|
86296
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
|
86297
|
-
entry = _ref2[0];
|
|
86298
|
-
|
|
86299
|
-
return setIntersecting(entry.isIntersecting);
|
|
86300
|
-
}, options);
|
|
86301
|
-
observer.observe(target);
|
|
86302
|
-
return function () {
|
|
86303
|
-
return observer.unobserve(target);
|
|
86304
|
-
};
|
|
86305
|
-
}, [target, options]);
|
|
86306
|
-
return isIntersecting;
|
|
86307
|
-
};
|
|
86308
|
-
|
|
86309
|
-
var useOnClickOutside = function useOnClickOutside(ref, handler) {
|
|
86310
|
-
useEffect(function () {
|
|
86311
|
-
var listener = function listener(event) {
|
|
86312
|
-
// Do nothing if clicking ref's element or descendent elements
|
|
86313
|
-
if (!ref.current || ref.current.contains(event.target)) {
|
|
86314
|
-
return;
|
|
86315
|
-
}
|
|
86316
|
-
|
|
86317
|
-
handler(event);
|
|
86318
|
-
};
|
|
86319
|
-
|
|
86320
|
-
document.addEventListener("mousedown", listener);
|
|
86321
|
-
document.addEventListener("touchstart", listener);
|
|
86322
|
-
return function () {
|
|
86323
|
-
document.removeEventListener("mousedown", listener);
|
|
86324
|
-
document.removeEventListener("touchstart", listener);
|
|
86325
|
-
};
|
|
86326
|
-
}, [handler]);
|
|
86327
|
-
};
|
|
86328
|
-
|
|
86329
|
-
var usePrevious = function usePrevious(value) {
|
|
86330
|
-
var ref = useRef(value);
|
|
86331
|
-
useEffect(function () {
|
|
86332
|
-
ref.current = value;
|
|
86333
|
-
}, [value]);
|
|
86334
|
-
return ref.current;
|
|
86335
|
-
};
|
|
86336
|
-
|
|
86337
|
-
var useUpdateEffect = function useUpdateEffect(callback) {
|
|
86338
|
-
var dependencies = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];
|
|
86339
|
-
var isInitialMount = useRef(true);
|
|
86340
|
-
useEffect(function () {
|
|
86341
|
-
if (isInitialMount.current) {
|
|
86342
|
-
isInitialMount.current = false;
|
|
86343
|
-
return;
|
|
86344
|
-
}
|
|
86345
|
-
|
|
86346
|
-
callback();
|
|
86347
|
-
}, dependencies);
|
|
86447
|
+
EmbedCode: EmbedCodeQueryClient,
|
|
86448
|
+
WIDGET_TYPES: WIDGET_TYPES
|
|
86348
86449
|
};
|
|
86349
86450
|
|
|
86350
86451
|
var ReducerBasedProvider = function ReducerBasedProvider(initialValue, StateContext, DispatchContext, reducer) {
|
|
@@ -88040,12 +88141,12 @@ var zephir = /*#__PURE__*/_mergeNamespaces({
|
|
|
88040
88141
|
'default': zephirExports
|
|
88041
88142
|
}, [zephirExports]);
|
|
88042
88143
|
|
|
88043
|
-
var
|
|
88144
|
+
var avisynthExports = requireAvisynth();
|
|
88044
88145
|
|
|
88045
|
-
var
|
|
88146
|
+
var avisynth = /*#__PURE__*/_mergeNamespaces({
|
|
88046
88147
|
__proto__: null,
|
|
88047
|
-
'default':
|
|
88048
|
-
}, [
|
|
88148
|
+
'default': avisynthExports
|
|
88149
|
+
}, [avisynthExports]);
|
|
88049
88150
|
|
|
88050
88151
|
var avroIdlExports = requireAvroIdl();
|
|
88051
88152
|
|