@bigbinary/neeto-commons-frontend 2.0.12 → 2.0.14
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 +54 -0
- package/initializers.js +55 -1
- package/package.json +1 -1
- package/pure.cjs.js +117 -46
- package/pure.d.ts +157 -1
- package/pure.js +92 -48
- package/react-utils.cjs.js +318 -250
- package/react-utils.d.ts +11 -2
- package/react-utils.js +320 -252
- package/utils.cjs.js +64 -0
- package/utils.js +65 -1
package/react-utils.cjs.js
CHANGED
|
@@ -11,11 +11,11 @@ var relativeTime = require('dayjs/plugin/relativeTime');
|
|
|
11
11
|
var updateLocale = require('dayjs/plugin/updateLocale');
|
|
12
12
|
var react = require('@honeybadger-io/react');
|
|
13
13
|
var reactI18next = require('react-i18next');
|
|
14
|
-
var reactQuery = require('react-query');
|
|
15
14
|
var i18next = require('i18next');
|
|
15
|
+
var yup = require('yup');
|
|
16
|
+
var reactQuery = require('react-query');
|
|
16
17
|
var formik$1 = require('@bigbinary/neetoui/formik');
|
|
17
18
|
var formik = require('formik');
|
|
18
|
-
var yup = require('yup');
|
|
19
19
|
var reactRouterDom = require('react-router-dom');
|
|
20
20
|
var layouts = require('@bigbinary/neetoui/layouts');
|
|
21
21
|
var axios$1 = require('axios');
|
|
@@ -152,9 +152,57 @@ function _typeof$3(obj) {
|
|
|
152
152
|
}, _typeof$3(obj);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
/**
|
|
156
|
+
* @template {Function} T
|
|
157
|
+
* @param {T} func
|
|
158
|
+
* @returns {T}
|
|
159
|
+
*/
|
|
160
|
+
|
|
161
|
+
var nullSafe = function nullSafe(func) {
|
|
162
|
+
return (// @ts-ignore
|
|
163
|
+
ramda.curryN(func.length, function () {
|
|
164
|
+
var _ref;
|
|
165
|
+
|
|
166
|
+
var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
|
|
167
|
+
return ramda.isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
|
|
168
|
+
})
|
|
169
|
+
);
|
|
170
|
+
};
|
|
171
|
+
var noop$2 = function noop() {};
|
|
172
|
+
var isNotEmpty = /*#__PURE__*/ramda.complement(ramda.isEmpty);
|
|
173
|
+
|
|
174
|
+
var slugify = function slugify(string) {
|
|
175
|
+
return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
|
|
176
|
+
.replace(/&/g, "-and-") // Replace & with 'and'
|
|
177
|
+
.replace(/[^\w-]+/g, "") // Remove all non-word characters
|
|
178
|
+
.replace(/--+/g, "-") // Replace multiple - with single -
|
|
179
|
+
.replace(/^-+/, "") // Trim - from start of text
|
|
180
|
+
.replace(/-+$/, "");
|
|
181
|
+
}; // Trim - from end of text
|
|
182
|
+
|
|
183
|
+
var humanize = function humanize(string) {
|
|
184
|
+
string = string.replace(/[_-]+/g, " ").replace(/\s{2,}/g, " ").replace(/([a-z\d])([A-Z])/g, "$1" + " " + "$2").replace(/([A-Z]+)([A-Z][a-z\d]+)/g, "$1" + " " + "$2").toLowerCase().trim();
|
|
185
|
+
string = string.charAt(0).toUpperCase() + string.slice(1);
|
|
186
|
+
return string;
|
|
187
|
+
};
|
|
188
|
+
var snakeToCamelCase = function snakeToCamelCase(string) {
|
|
189
|
+
return string.replace(/(_\w)/g, function (letter) {
|
|
190
|
+
return letter[1].toUpperCase();
|
|
191
|
+
});
|
|
192
|
+
};
|
|
193
|
+
var camelToSnakeCase = function camelToSnakeCase(string) {
|
|
194
|
+
return string.replace(/[A-Z]/g, function (letter) {
|
|
195
|
+
return "_".concat(letter.toLowerCase());
|
|
196
|
+
});
|
|
197
|
+
};
|
|
155
198
|
var capitalize = function capitalize(string) {
|
|
156
199
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
157
200
|
};
|
|
201
|
+
nullSafe(slugify);
|
|
202
|
+
nullSafe(humanize);
|
|
203
|
+
nullSafe(snakeToCamelCase);
|
|
204
|
+
nullSafe(camelToSnakeCase);
|
|
205
|
+
nullSafe(capitalize);
|
|
158
206
|
|
|
159
207
|
var matchesImpl = function matchesImpl(pattern, object) {
|
|
160
208
|
var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
|
|
@@ -174,6 +222,21 @@ var matchesImpl = function matchesImpl(pattern, object) {
|
|
|
174
222
|
var matches = /*#__PURE__*/ramda.curry(function (pattern, object) {
|
|
175
223
|
return matchesImpl(pattern, object);
|
|
176
224
|
});
|
|
225
|
+
var filterNonNull = function filterNonNull(object) {
|
|
226
|
+
return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
|
|
227
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
228
|
+
v = _ref6[1];
|
|
229
|
+
|
|
230
|
+
return !ramda.isNil(v);
|
|
231
|
+
}).map(function (_ref7) {
|
|
232
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
233
|
+
k = _ref8[0],
|
|
234
|
+
v = _ref8[1];
|
|
235
|
+
|
|
236
|
+
return [k, _typeof$3(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
|
|
237
|
+
}));
|
|
238
|
+
};
|
|
239
|
+
nullSafe(filterNonNull);
|
|
177
240
|
|
|
178
241
|
function _defineProperty$1(obj, key, value) {
|
|
179
242
|
if (key in obj) {
|
|
@@ -194,9 +257,6 @@ var removeBy = /*#__PURE__*/ramda.curry(function (pattern, array) {
|
|
|
194
257
|
return array.filter(ramda.complement(matches(pattern)));
|
|
195
258
|
});
|
|
196
259
|
|
|
197
|
-
var noop$2 = function noop() {};
|
|
198
|
-
var isNotEmpty = /*#__PURE__*/ramda.complement(ramda.isEmpty);
|
|
199
|
-
|
|
200
260
|
var getStorageValue = function getStorageValue(key, defaultValue) {
|
|
201
261
|
var saved = localStorage.getItem(key);
|
|
202
262
|
return JSON.parse(saved) || defaultValue;
|
|
@@ -230,8 +290,8 @@ var removeFixedColumns = function removeFixedColumns(fixedColumns, columnData) {
|
|
|
230
290
|
};
|
|
231
291
|
var filterBySearchTerm = function filterBySearchTerm(searchTerm, columns) {
|
|
232
292
|
return ramda.filter(function (_ref) {
|
|
233
|
-
var
|
|
234
|
-
return ramda.includes(ramda.trim(ramda.toLower(searchTerm)), ramda.trim(ramda.toLower(
|
|
293
|
+
var title = _ref.title;
|
|
294
|
+
return ramda.includes(ramda.trim(ramda.toLower(searchTerm)), ramda.trim(ramda.toLower(title)));
|
|
235
295
|
}, columns);
|
|
236
296
|
};
|
|
237
297
|
|
|
@@ -309,16 +369,18 @@ var Columns = function Columns(_ref) {
|
|
|
309
369
|
}, searchProps)), isNotEmpty(filteredColumns) ? filteredColumns.map(function (_ref4) {
|
|
310
370
|
var dataIndex = _ref4.dataIndex,
|
|
311
371
|
key = _ref4.key,
|
|
312
|
-
|
|
313
|
-
return /*#__PURE__*/React__default["default"].createElement(MenuItem
|
|
372
|
+
title = _ref4.title;
|
|
373
|
+
return /*#__PURE__*/React__default["default"].createElement(MenuItem, {
|
|
314
374
|
key: key
|
|
315
|
-
}, /*#__PURE__*/React__default["default"].createElement(
|
|
316
|
-
className: "neeto-ui-w-full"
|
|
375
|
+
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Label, {
|
|
376
|
+
className: "neeto-ui-w-full neeto-ui-px-3 neeto-ui-py-2 hover:neeto-ui-bg-gray-200 neeto-ui-cursor-pointer",
|
|
377
|
+
htmlFor: dataIndex
|
|
317
378
|
}, /*#__PURE__*/React__default["default"].createElement(neetoui.Checkbox, _extends$4({
|
|
379
|
+
id: dataIndex,
|
|
318
380
|
name: dataIndex,
|
|
319
381
|
checked: !hiddenColumns.includes(dataIndex),
|
|
320
382
|
"data-cy": "neeto-ui-columns-checkbox",
|
|
321
|
-
label:
|
|
383
|
+
label: title,
|
|
322
384
|
onChange: handleChange
|
|
323
385
|
}, checkboxProps))));
|
|
324
386
|
}) : /*#__PURE__*/React__default["default"].createElement("span", {
|
|
@@ -464,6 +526,27 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
464
526
|
}, children);
|
|
465
527
|
};
|
|
466
528
|
|
|
529
|
+
var EMBED_WIDGET_S3_SCRIPT_STRING = "<script src=\"https://neeto-widget.s3.ap-south-1.amazonaws.com/embedNeetoWidget.js\"></script>";
|
|
530
|
+
var DISABLE_NEETO_CHAT = "disableNeetoChat: true,";
|
|
531
|
+
var DISABLE_NEETO_CHANGELOG = "disableNeetoChangelog: true,";
|
|
532
|
+
var DISABLE_NEETO_REPLAY = "disableNeetoReplay: true,";
|
|
533
|
+
var SAMPLE_CONTEXT_CODE_STRING = "window.NeetoReplayWidgetSessionContext = {\n key1: \"value\",\n key2: [\"array\", \"of\", \"values\"],\n /* More key-value pairs */\n}";
|
|
534
|
+
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}";
|
|
535
|
+
var WIDGET_TYPES = {
|
|
536
|
+
changelog: "changelog",
|
|
537
|
+
chat: "chat",
|
|
538
|
+
replay: "replay"
|
|
539
|
+
};
|
|
540
|
+
var WIDGET_TYPES_VALUES = ramda.values(WIDGET_TYPES);
|
|
541
|
+
var EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA = yup__namespace.object({
|
|
542
|
+
emails: yup__namespace.array().required().label(i18next__default["default"].t("neetoCommons.widget.email.fields.emails.label")),
|
|
543
|
+
subject: yup__namespace.string().required().label(i18next__default["default"].t("neetoCommons.widget.email.fields.subject.label"))
|
|
544
|
+
});
|
|
545
|
+
var QUERY_KEYS = {
|
|
546
|
+
apiKey: "neetoWidgetApiKey"
|
|
547
|
+
};
|
|
548
|
+
var DEFAULT_QUERY_STALE_TIME = 60 * 60 * 1000; // 1 hour in milliseconds
|
|
549
|
+
|
|
467
550
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
468
551
|
|
|
469
552
|
var propTypes = {exports: {}};
|
|
@@ -51483,7 +51566,7 @@ var languageLoaders = {
|
|
|
51483
51566
|
return Promise.resolve().then(function () { return ada$2; });
|
|
51484
51567
|
}),
|
|
51485
51568
|
agda: createLanguageAsyncLoader("agda", function () {
|
|
51486
|
-
return Promise.resolve().then(function () { return agda; });
|
|
51569
|
+
return Promise.resolve().then(function () { return agda$1; });
|
|
51487
51570
|
}),
|
|
51488
51571
|
al: createLanguageAsyncLoader("al", function () {
|
|
51489
51572
|
return Promise.resolve().then(function () { return al$1; });
|
|
@@ -51531,7 +51614,7 @@ var languageLoaders = {
|
|
|
51531
51614
|
return Promise.resolve().then(function () { return autoit$2; });
|
|
51532
51615
|
}),
|
|
51533
51616
|
avisynth: createLanguageAsyncLoader("avisynth", function () {
|
|
51534
|
-
return Promise.resolve().then(function () { return avisynth
|
|
51617
|
+
return Promise.resolve().then(function () { return avisynth; });
|
|
51535
51618
|
}),
|
|
51536
51619
|
avroIdl: createLanguageAsyncLoader("avroIdl", function () {
|
|
51537
51620
|
return Promise.resolve().then(function () { return avroIdl; });
|
|
@@ -60971,45 +61054,41 @@ var ada$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
60971
61054
|
'default': ada_1
|
|
60972
61055
|
}, [ada_1]);
|
|
60973
61056
|
|
|
60974
|
-
var agda_1;
|
|
60975
|
-
|
|
60976
|
-
|
|
60977
|
-
function
|
|
60978
|
-
if (hasRequiredAgda) return agda_1;
|
|
60979
|
-
hasRequiredAgda = 1;
|
|
60980
|
-
|
|
60981
|
-
agda_1 = agda;
|
|
60982
|
-
agda.displayName = 'agda';
|
|
60983
|
-
agda.aliases = [];
|
|
60984
|
-
function agda(Prism) {
|
|
61057
|
+
var agda_1 = agda;
|
|
61058
|
+
agda.displayName = 'agda';
|
|
61059
|
+
agda.aliases = [];
|
|
61060
|
+
function agda(Prism) {
|
|
60985
61061
|
(function (Prism) {
|
|
60986
|
-
|
|
60987
|
-
|
|
60988
|
-
|
|
60989
|
-
|
|
60990
|
-
|
|
60991
|
-
|
|
60992
|
-
|
|
60993
|
-
|
|
60994
|
-
|
|
60995
|
-
|
|
60996
|
-
|
|
60997
|
-
|
|
60998
|
-
|
|
60999
|
-
|
|
61000
|
-
|
|
61001
|
-
|
|
61002
|
-
|
|
61003
|
-
|
|
61004
|
-
|
|
61005
|
-
|
|
61006
|
-
|
|
61007
|
-
|
|
61008
|
-
|
|
61009
|
-
}
|
|
61010
|
-
return agda_1;
|
|
61062
|
+
Prism.languages.agda = {
|
|
61063
|
+
comment: /\{-[\s\S]*?(?:-\}|$)|--.*/,
|
|
61064
|
+
string: {
|
|
61065
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
|
|
61066
|
+
greedy: true
|
|
61067
|
+
},
|
|
61068
|
+
punctuation: /[(){}⦃⦄.;@]/,
|
|
61069
|
+
'class-name': {
|
|
61070
|
+
pattern: /((?:data|record) +)\S+/,
|
|
61071
|
+
lookbehind: true
|
|
61072
|
+
},
|
|
61073
|
+
function: {
|
|
61074
|
+
pattern: /(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,
|
|
61075
|
+
lookbehind: true
|
|
61076
|
+
},
|
|
61077
|
+
operator: {
|
|
61078
|
+
pattern: /(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,
|
|
61079
|
+
lookbehind: true
|
|
61080
|
+
},
|
|
61081
|
+
keyword:
|
|
61082
|
+
/\b(?:Set|abstract|constructor|data|eta-equality|field|forall|hiding|import|in|inductive|infix|infixl|infixr|instance|let|macro|module|mutual|no-eta-equality|open|overlap|pattern|postulate|primitive|private|public|quote|quoteContext|quoteGoal|quoteTerm|record|renaming|rewrite|syntax|tactic|unquote|unquoteDecl|unquoteDef|using|variable|where|with)\b/
|
|
61083
|
+
};
|
|
61084
|
+
})(Prism);
|
|
61011
61085
|
}
|
|
61012
61086
|
|
|
61087
|
+
var agda$1 = /*#__PURE__*/_mergeNamespaces({
|
|
61088
|
+
__proto__: null,
|
|
61089
|
+
'default': agda_1
|
|
61090
|
+
}, [agda_1]);
|
|
61091
|
+
|
|
61013
61092
|
var al_1 = al;
|
|
61014
61093
|
al.displayName = 'al';
|
|
61015
61094
|
al.aliases = [];
|
|
@@ -62683,179 +62762,183 @@ var autoit$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
62683
62762
|
'default': autoit_1
|
|
62684
62763
|
}, [autoit_1]);
|
|
62685
62764
|
|
|
62686
|
-
var avisynth_1
|
|
62687
|
-
|
|
62688
|
-
|
|
62689
|
-
function
|
|
62765
|
+
var avisynth_1;
|
|
62766
|
+
var hasRequiredAvisynth;
|
|
62767
|
+
|
|
62768
|
+
function requireAvisynth () {
|
|
62769
|
+
if (hasRequiredAvisynth) return avisynth_1;
|
|
62770
|
+
hasRequiredAvisynth = 1;
|
|
62771
|
+
|
|
62772
|
+
avisynth_1 = avisynth;
|
|
62773
|
+
avisynth.displayName = 'avisynth';
|
|
62774
|
+
avisynth.aliases = ['avs'];
|
|
62775
|
+
function avisynth(Prism) {
|
|
62690
62776
|
(function (Prism) {
|
|
62691
|
-
|
|
62692
|
-
|
|
62693
|
-
|
|
62694
|
-
|
|
62695
|
-
|
|
62696
|
-
|
|
62697
|
-
|
|
62698
|
-
|
|
62699
|
-
|
|
62700
|
-
|
|
62701
|
-
|
|
62702
|
-
|
|
62703
|
-
|
|
62704
|
-
|
|
62705
|
-
|
|
62706
|
-
|
|
62707
|
-
|
|
62708
|
-
|
|
62709
|
-
|
|
62710
|
-
|
|
62711
|
-
|
|
62712
|
-
|
|
62713
|
-
|
|
62714
|
-
|
|
62715
|
-
|
|
62716
|
-
|
|
62717
|
-
|
|
62718
|
-
|
|
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
|
-
|
|
62777
|
+
function replace(pattern, replacements) {
|
|
62778
|
+
return pattern.replace(/<<(\d+)>>/g, function (m, index) {
|
|
62779
|
+
return replacements[+index]
|
|
62780
|
+
})
|
|
62781
|
+
}
|
|
62782
|
+
function re(pattern, replacements, flags) {
|
|
62783
|
+
return RegExp(replace(pattern, replacements), flags || '')
|
|
62784
|
+
}
|
|
62785
|
+
var types = /bool|clip|float|int|string|val/.source;
|
|
62786
|
+
var internals = [
|
|
62787
|
+
// bools
|
|
62788
|
+
/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/
|
|
62789
|
+
.source, // control
|
|
62790
|
+
/apply|assert|default|eval|import|nop|select|undefined/.source, // global
|
|
62791
|
+
/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/
|
|
62792
|
+
.source, // conv
|
|
62793
|
+
/hex(?:value)?|value/.source, // numeric
|
|
62794
|
+
/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/
|
|
62795
|
+
.source, // trig
|
|
62796
|
+
/a?sinh?|a?cosh?|a?tan[2h]?/.source, // bit
|
|
62797
|
+
/(?: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?))/
|
|
62798
|
+
.source, // runtime
|
|
62799
|
+
/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/
|
|
62800
|
+
.source, // script
|
|
62801
|
+
/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/
|
|
62802
|
+
.source, // string
|
|
62803
|
+
/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/
|
|
62804
|
+
.source, // version
|
|
62805
|
+
/isversionorgreater|version(?:number|string)/.source, // helper
|
|
62806
|
+
/buildpixeltype|colorspacenametopixeltype/.source, // avsplus
|
|
62807
|
+
/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source
|
|
62808
|
+
].join('|');
|
|
62809
|
+
var properties = [
|
|
62810
|
+
// content
|
|
62811
|
+
/has(?:audio|video)/.source, // resolution
|
|
62812
|
+
/height|width/.source, // framerate
|
|
62813
|
+
/frame(?:count|rate)|framerate(?:denominator|numerator)/.source, // interlacing
|
|
62814
|
+
/getparity|is(?:field|frame)based/.source, // color format
|
|
62815
|
+
/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/
|
|
62816
|
+
.source, // audio
|
|
62817
|
+
/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/
|
|
62818
|
+
.source
|
|
62819
|
+
].join('|');
|
|
62820
|
+
var filters = [
|
|
62821
|
+
// source
|
|
62822
|
+
/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/
|
|
62823
|
+
.source, // color
|
|
62824
|
+
/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/
|
|
62825
|
+
.source, // overlay
|
|
62826
|
+
/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source, // geometry
|
|
62827
|
+
/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)/
|
|
62828
|
+
.source, // pixel
|
|
62829
|
+
/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/
|
|
62830
|
+
.source, // timeline
|
|
62831
|
+
/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)/
|
|
62832
|
+
.source, // interlace
|
|
62833
|
+
/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/
|
|
62834
|
+
.source, // audio
|
|
62835
|
+
/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/
|
|
62836
|
+
.source, // conditional
|
|
62837
|
+
/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/
|
|
62838
|
+
.source, // export
|
|
62839
|
+
/imagewriter/.source, // debug
|
|
62840
|
+
/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/
|
|
62841
|
+
.source
|
|
62842
|
+
].join('|');
|
|
62843
|
+
var allinternals = [internals, properties, filters].join('|');
|
|
62844
|
+
Prism.languages.avisynth = {
|
|
62845
|
+
comment: [
|
|
62846
|
+
{
|
|
62847
|
+
// Matches [* *] nestable block comments, but only supports 1 level of nested comments
|
|
62848
|
+
// /\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|<self>)*\*\]/
|
|
62849
|
+
pattern:
|
|
62850
|
+
/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,
|
|
62851
|
+
lookbehind: true,
|
|
62852
|
+
greedy: true
|
|
62853
|
+
},
|
|
62854
|
+
{
|
|
62855
|
+
// Matches /* */ block comments
|
|
62856
|
+
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
62857
|
+
lookbehind: true,
|
|
62858
|
+
greedy: true
|
|
62859
|
+
},
|
|
62860
|
+
{
|
|
62861
|
+
// Matches # comments
|
|
62862
|
+
pattern: /(^|[^\\$])#.*/,
|
|
62863
|
+
lookbehind: true,
|
|
62864
|
+
greedy: true
|
|
62865
|
+
}
|
|
62866
|
+
],
|
|
62867
|
+
// Handle before strings because optional arguments are surrounded by double quotes
|
|
62868
|
+
argument: {
|
|
62869
|
+
pattern: re(/\b(?:<<0>>)\s+("?)\w+\1/.source, [types], 'i'),
|
|
62870
|
+
inside: {
|
|
62871
|
+
keyword: /^\w+/
|
|
62872
|
+
}
|
|
62873
|
+
},
|
|
62874
|
+
// Optional argument assignment
|
|
62875
|
+
'argument-label': {
|
|
62876
|
+
pattern: /([,(][\s\\]*)\w+\s*=(?!=)/,
|
|
62877
|
+
lookbehind: true,
|
|
62878
|
+
inside: {
|
|
62879
|
+
'argument-name': {
|
|
62880
|
+
pattern: /^\w+/,
|
|
62881
|
+
alias: 'punctuation'
|
|
62882
|
+
},
|
|
62883
|
+
punctuation: /=$/
|
|
62884
|
+
}
|
|
62885
|
+
},
|
|
62886
|
+
string: [
|
|
62887
|
+
{
|
|
62888
|
+
// triple double-quoted
|
|
62889
|
+
pattern: /"""[\s\S]*?"""/,
|
|
62890
|
+
greedy: true
|
|
62891
|
+
},
|
|
62892
|
+
{
|
|
62893
|
+
// single double-quoted
|
|
62894
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
62895
|
+
greedy: true,
|
|
62896
|
+
inside: {
|
|
62897
|
+
constant: {
|
|
62898
|
+
// These *are* case-sensitive!
|
|
62899
|
+
pattern:
|
|
62900
|
+
/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/
|
|
62901
|
+
}
|
|
62902
|
+
}
|
|
62903
|
+
}
|
|
62904
|
+
],
|
|
62905
|
+
// The special "last" variable that takes the value of the last implicitly returned clip
|
|
62906
|
+
variable: /\b(?:last)\b/i,
|
|
62907
|
+
boolean: /\b(?:false|no|true|yes)\b/i,
|
|
62908
|
+
keyword:
|
|
62909
|
+
/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,
|
|
62910
|
+
constant: /\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,
|
|
62911
|
+
// AviSynth's internal functions, filters, and properties
|
|
62912
|
+
'builtin-function': {
|
|
62913
|
+
pattern: re(/\b(?:<<0>>)\b/.source, [allinternals], 'i'),
|
|
62914
|
+
alias: 'function'
|
|
62915
|
+
},
|
|
62916
|
+
'type-cast': {
|
|
62917
|
+
pattern: re(/\b(?:<<0>>)(?=\s*\()/.source, [types], 'i'),
|
|
62918
|
+
alias: 'keyword'
|
|
62919
|
+
},
|
|
62920
|
+
// External/user-defined filters
|
|
62921
|
+
function: {
|
|
62922
|
+
pattern: /\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,
|
|
62923
|
+
lookbehind: true
|
|
62924
|
+
},
|
|
62925
|
+
// Matches a \ as the first or last character on a line
|
|
62926
|
+
'line-continuation': {
|
|
62927
|
+
pattern: /(^[ \t]*)\\|\\(?=[ \t]*$)/m,
|
|
62928
|
+
lookbehind: true,
|
|
62929
|
+
alias: 'punctuation'
|
|
62930
|
+
},
|
|
62931
|
+
number:
|
|
62932
|
+
/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,
|
|
62933
|
+
operator: /\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,
|
|
62934
|
+
punctuation: /[{}\[\]();,.]/
|
|
62935
|
+
};
|
|
62936
|
+
Prism.languages.avs = Prism.languages.avisynth;
|
|
62937
|
+
})(Prism);
|
|
62938
|
+
}
|
|
62939
|
+
return avisynth_1;
|
|
62852
62940
|
}
|
|
62853
62941
|
|
|
62854
|
-
var avisynth$1 = /*#__PURE__*/_mergeNamespaces({
|
|
62855
|
-
__proto__: null,
|
|
62856
|
-
'default': avisynth_1
|
|
62857
|
-
}, [avisynth_1]);
|
|
62858
|
-
|
|
62859
62942
|
var avroIdl_1;
|
|
62860
62943
|
var hasRequiredAvroIdl;
|
|
62861
62944
|
|
|
@@ -84084,7 +84167,7 @@ refractor.register(abap_1);
|
|
|
84084
84167
|
refractor.register(abnf_1);
|
|
84085
84168
|
refractor.register(actionscript_1);
|
|
84086
84169
|
refractor.register(ada_1);
|
|
84087
|
-
refractor.register(
|
|
84170
|
+
refractor.register(agda_1);
|
|
84088
84171
|
refractor.register(al_1);
|
|
84089
84172
|
refractor.register(antlr4_1);
|
|
84090
84173
|
refractor.register(apacheconf_1);
|
|
@@ -84100,7 +84183,7 @@ refractor.register(asmatmel_1);
|
|
|
84100
84183
|
refractor.register(aspnet_1);
|
|
84101
84184
|
refractor.register(autohotkey_1);
|
|
84102
84185
|
refractor.register(autoit_1);
|
|
84103
|
-
refractor.register(
|
|
84186
|
+
refractor.register(requireAvisynth());
|
|
84104
84187
|
refractor.register(requireAvroIdl());
|
|
84105
84188
|
refractor.register(requireBash());
|
|
84106
84189
|
refractor.register(requireBasic());
|
|
@@ -85603,27 +85686,6 @@ CodeBlock.propTypes = {
|
|
|
85603
85686
|
codeStyles: propTypes.exports.object
|
|
85604
85687
|
};
|
|
85605
85688
|
|
|
85606
|
-
var EMBED_WIDGET_S3_SCRIPT_STRING = "<script src=\"https://neeto-widget.s3.ap-south-1.amazonaws.com/embedNeetoWidget.js\"></script>";
|
|
85607
|
-
var DISABLE_NEETO_CHAT = "disableNeetoChat: true,";
|
|
85608
|
-
var DISABLE_NEETO_CHANGELOG = "disableNeetoChangelog: true,";
|
|
85609
|
-
var DISABLE_NEETO_REPLAY = "disableNeetoReplay: true,";
|
|
85610
|
-
var SAMPLE_CONTEXT_CODE_STRING = "window.NeetoReplayWidgetSessionContext = {\n key1: \"value\",\n key2: [\"array\", \"of\", \"values\"],\n /* More key-value pairs */\n}";
|
|
85611
|
-
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}";
|
|
85612
|
-
var WIDGET_TYPES = {
|
|
85613
|
-
changelog: "changelog",
|
|
85614
|
-
chat: "chat",
|
|
85615
|
-
replay: "replay"
|
|
85616
|
-
};
|
|
85617
|
-
var WIDGET_TYPES_VALUES = ramda.values(WIDGET_TYPES);
|
|
85618
|
-
var EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA = yup__namespace.object({
|
|
85619
|
-
emails: yup__namespace.array().required().label(i18next__default["default"].t("neetoCommons.widget.email.fields.emails.label")),
|
|
85620
|
-
subject: yup__namespace.string().required().label(i18next__default["default"].t("neetoCommons.widget.email.fields.subject.label"))
|
|
85621
|
-
});
|
|
85622
|
-
var QUERY_KEYS = {
|
|
85623
|
-
apiKey: "neetoWidgetApiKey"
|
|
85624
|
-
};
|
|
85625
|
-
var DEFAULT_QUERY_STALE_TIME = 60 * 60 * 1000; // 1 hour in milliseconds
|
|
85626
|
-
|
|
85627
85689
|
var getWidgetApiKeyUrl = function getWidgetApiKeyUrl() {
|
|
85628
85690
|
return "api/v1/widget/api_keys/".concat(window.globalProps.organization.subdomain);
|
|
85629
85691
|
};
|
|
@@ -85867,6 +85929,12 @@ CodeSnippet.propTypes = {
|
|
|
85867
85929
|
|
|
85868
85930
|
var useFetchApiKey = function useFetchApiKey() {
|
|
85869
85931
|
return reactQuery.useQuery(QUERY_KEYS.apiKey, function () {
|
|
85932
|
+
if (window.globalProps.railsEnv === "heroku" || !process.env.ENABLE_SSO) {
|
|
85933
|
+
return Promise.resolve({
|
|
85934
|
+
widgetApiKey: "placeholder-api-key"
|
|
85935
|
+
});
|
|
85936
|
+
}
|
|
85937
|
+
|
|
85870
85938
|
return queryWidgetApiKey();
|
|
85871
85939
|
}, {
|
|
85872
85940
|
staleTime: DEFAULT_QUERY_STALE_TIME
|
|
@@ -85884,9 +85952,8 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
85884
85952
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
85885
85953
|
className: "mb-1",
|
|
85886
85954
|
key: widget
|
|
85887
|
-
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default["default"].createElement(neetoui.
|
|
85955
|
+
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default["default"].createElement(neetoui.Switch, {
|
|
85888
85956
|
label: "neeto".concat(capitalize(widget)),
|
|
85889
|
-
size: "small",
|
|
85890
85957
|
checked: selectedWidgets.includes(widget),
|
|
85891
85958
|
onChange: function onChange() {
|
|
85892
85959
|
return updateSelectedWidgets(widget);
|
|
@@ -86197,7 +86264,8 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
86197
86264
|
};
|
|
86198
86265
|
|
|
86199
86266
|
var NeetoWidget = {
|
|
86200
|
-
EmbedCode: EmbedCodeQueryClient
|
|
86267
|
+
EmbedCode: EmbedCodeQueryClient,
|
|
86268
|
+
WIDGET_TYPES: WIDGET_TYPES
|
|
86201
86269
|
};
|
|
86202
86270
|
|
|
86203
86271
|
function useDebounce(value) {
|
|
@@ -88012,12 +88080,12 @@ var zephir = /*#__PURE__*/_mergeNamespaces({
|
|
|
88012
88080
|
'default': zephirExports
|
|
88013
88081
|
}, [zephirExports]);
|
|
88014
88082
|
|
|
88015
|
-
var
|
|
88083
|
+
var avisynthExports = requireAvisynth();
|
|
88016
88084
|
|
|
88017
|
-
var
|
|
88085
|
+
var avisynth = /*#__PURE__*/_mergeNamespaces({
|
|
88018
88086
|
__proto__: null,
|
|
88019
|
-
'default':
|
|
88020
|
-
}, [
|
|
88087
|
+
'default': avisynthExports
|
|
88088
|
+
}, [avisynthExports]);
|
|
88021
88089
|
|
|
88022
88090
|
var avroIdlExports = requireAvroIdl();
|
|
88023
88091
|
|