@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.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import React__default, { useState, useEffect, useMemo, 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';
|
|
5
|
-
import {
|
|
4
|
+
import { Dropdown, Input, Label, Checkbox, Typography, Tooltip, Button, Toastr, Modal, Switch, PageLoader } from '@bigbinary/neetoui';
|
|
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';
|
|
@@ -120,9 +120,57 @@ function _typeof$3(obj) {
|
|
|
120
120
|
}, _typeof$3(obj);
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
+
/**
|
|
124
|
+
* @template {Function} T
|
|
125
|
+
* @param {T} func
|
|
126
|
+
* @returns {T}
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
var nullSafe = function nullSafe(func) {
|
|
130
|
+
return (// @ts-ignore
|
|
131
|
+
curryN(func.length, function () {
|
|
132
|
+
var _ref;
|
|
133
|
+
|
|
134
|
+
var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
|
|
135
|
+
return isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
|
|
136
|
+
})
|
|
137
|
+
);
|
|
138
|
+
};
|
|
139
|
+
var noop$2 = function noop() {};
|
|
140
|
+
var isNotEmpty = /*#__PURE__*/complement$1(isEmpty);
|
|
141
|
+
|
|
142
|
+
var slugify = function slugify(string) {
|
|
143
|
+
return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
|
|
144
|
+
.replace(/&/g, "-and-") // Replace & with 'and'
|
|
145
|
+
.replace(/[^\w-]+/g, "") // Remove all non-word characters
|
|
146
|
+
.replace(/--+/g, "-") // Replace multiple - with single -
|
|
147
|
+
.replace(/^-+/, "") // Trim - from start of text
|
|
148
|
+
.replace(/-+$/, "");
|
|
149
|
+
}; // Trim - from end of text
|
|
150
|
+
|
|
151
|
+
var humanize = function humanize(string) {
|
|
152
|
+
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();
|
|
153
|
+
string = string.charAt(0).toUpperCase() + string.slice(1);
|
|
154
|
+
return string;
|
|
155
|
+
};
|
|
156
|
+
var snakeToCamelCase = function snakeToCamelCase(string) {
|
|
157
|
+
return string.replace(/(_\w)/g, function (letter) {
|
|
158
|
+
return letter[1].toUpperCase();
|
|
159
|
+
});
|
|
160
|
+
};
|
|
161
|
+
var camelToSnakeCase = function camelToSnakeCase(string) {
|
|
162
|
+
return string.replace(/[A-Z]/g, function (letter) {
|
|
163
|
+
return "_".concat(letter.toLowerCase());
|
|
164
|
+
});
|
|
165
|
+
};
|
|
123
166
|
var capitalize = function capitalize(string) {
|
|
124
167
|
return string.charAt(0).toUpperCase() + string.slice(1);
|
|
125
168
|
};
|
|
169
|
+
nullSafe(slugify);
|
|
170
|
+
nullSafe(humanize);
|
|
171
|
+
nullSafe(snakeToCamelCase);
|
|
172
|
+
nullSafe(camelToSnakeCase);
|
|
173
|
+
nullSafe(capitalize);
|
|
126
174
|
|
|
127
175
|
var matchesImpl = function matchesImpl(pattern, object) {
|
|
128
176
|
var __parent = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : object;
|
|
@@ -142,6 +190,21 @@ var matchesImpl = function matchesImpl(pattern, object) {
|
|
|
142
190
|
var matches = /*#__PURE__*/curry(function (pattern, object) {
|
|
143
191
|
return matchesImpl(pattern, object);
|
|
144
192
|
});
|
|
193
|
+
var filterNonNull = function filterNonNull(object) {
|
|
194
|
+
return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
|
|
195
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
196
|
+
v = _ref6[1];
|
|
197
|
+
|
|
198
|
+
return !isNil(v);
|
|
199
|
+
}).map(function (_ref7) {
|
|
200
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
|
201
|
+
k = _ref8[0],
|
|
202
|
+
v = _ref8[1];
|
|
203
|
+
|
|
204
|
+
return [k, _typeof$3(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
|
|
205
|
+
}));
|
|
206
|
+
};
|
|
207
|
+
nullSafe(filterNonNull);
|
|
145
208
|
|
|
146
209
|
function _defineProperty$1(obj, key, value) {
|
|
147
210
|
if (key in obj) {
|
|
@@ -162,9 +225,6 @@ var removeBy = /*#__PURE__*/curry(function (pattern, array) {
|
|
|
162
225
|
return array.filter(complement$1(matches(pattern)));
|
|
163
226
|
});
|
|
164
227
|
|
|
165
|
-
var noop$2 = function noop() {};
|
|
166
|
-
var isNotEmpty = /*#__PURE__*/complement$1(isEmpty);
|
|
167
|
-
|
|
168
228
|
var getStorageValue = function getStorageValue(key, defaultValue) {
|
|
169
229
|
var saved = localStorage.getItem(key);
|
|
170
230
|
return JSON.parse(saved) || defaultValue;
|
|
@@ -198,8 +258,8 @@ var removeFixedColumns = function removeFixedColumns(fixedColumns, columnData) {
|
|
|
198
258
|
};
|
|
199
259
|
var filterBySearchTerm = function filterBySearchTerm(searchTerm, columns) {
|
|
200
260
|
return filter(function (_ref) {
|
|
201
|
-
var
|
|
202
|
-
return includes(trim(toLower(searchTerm)), trim(toLower(
|
|
261
|
+
var title = _ref.title;
|
|
262
|
+
return includes(trim(toLower(searchTerm)), trim(toLower(title)));
|
|
203
263
|
}, columns);
|
|
204
264
|
};
|
|
205
265
|
|
|
@@ -277,16 +337,18 @@ var Columns = function Columns(_ref) {
|
|
|
277
337
|
}, searchProps)), isNotEmpty(filteredColumns) ? filteredColumns.map(function (_ref4) {
|
|
278
338
|
var dataIndex = _ref4.dataIndex,
|
|
279
339
|
key = _ref4.key,
|
|
280
|
-
|
|
281
|
-
return /*#__PURE__*/React__default.createElement(MenuItem
|
|
340
|
+
title = _ref4.title;
|
|
341
|
+
return /*#__PURE__*/React__default.createElement(MenuItem, {
|
|
282
342
|
key: key
|
|
283
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
284
|
-
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
|
|
285
346
|
}, /*#__PURE__*/React__default.createElement(Checkbox, _extends$4({
|
|
347
|
+
id: dataIndex,
|
|
286
348
|
name: dataIndex,
|
|
287
349
|
checked: !hiddenColumns.includes(dataIndex),
|
|
288
350
|
"data-cy": "neeto-ui-columns-checkbox",
|
|
289
|
-
label:
|
|
351
|
+
label: title,
|
|
290
352
|
onChange: handleChange
|
|
291
353
|
}, checkboxProps))));
|
|
292
354
|
}) : /*#__PURE__*/React__default.createElement("span", {
|
|
@@ -432,6 +494,27 @@ var HoneybadgerErrorBoundary = function HoneybadgerErrorBoundary(_ref) {
|
|
|
432
494
|
}, children);
|
|
433
495
|
};
|
|
434
496
|
|
|
497
|
+
var EMBED_WIDGET_S3_SCRIPT_STRING = "<script src=\"https://neeto-widget.s3.ap-south-1.amazonaws.com/embedNeetoWidget.js\"></script>";
|
|
498
|
+
var DISABLE_NEETO_CHAT = "disableNeetoChat: true,";
|
|
499
|
+
var DISABLE_NEETO_CHANGELOG = "disableNeetoChangelog: true,";
|
|
500
|
+
var DISABLE_NEETO_REPLAY = "disableNeetoReplay: true,";
|
|
501
|
+
var SAMPLE_CONTEXT_CODE_STRING = "window.NeetoReplayWidgetSessionContext = {\n key1: \"value\",\n key2: [\"array\", \"of\", \"values\"],\n /* More key-value pairs */\n}";
|
|
502
|
+
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}";
|
|
503
|
+
var WIDGET_TYPES = {
|
|
504
|
+
changelog: "changelog",
|
|
505
|
+
chat: "chat",
|
|
506
|
+
replay: "replay"
|
|
507
|
+
};
|
|
508
|
+
var WIDGET_TYPES_VALUES = values(WIDGET_TYPES);
|
|
509
|
+
var EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA = yup.object({
|
|
510
|
+
emails: yup.array().required().label(i18next.t("neetoCommons.widget.email.fields.emails.label")),
|
|
511
|
+
subject: yup.string().required().label(i18next.t("neetoCommons.widget.email.fields.subject.label"))
|
|
512
|
+
});
|
|
513
|
+
var QUERY_KEYS = {
|
|
514
|
+
apiKey: "neetoWidgetApiKey"
|
|
515
|
+
};
|
|
516
|
+
var DEFAULT_QUERY_STALE_TIME = 60 * 60 * 1000; // 1 hour in milliseconds
|
|
517
|
+
|
|
435
518
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
436
519
|
|
|
437
520
|
var propTypes = {exports: {}};
|
|
@@ -51451,7 +51534,7 @@ var languageLoaders = {
|
|
|
51451
51534
|
return Promise.resolve().then(function () { return ada$2; });
|
|
51452
51535
|
}),
|
|
51453
51536
|
agda: createLanguageAsyncLoader("agda", function () {
|
|
51454
|
-
return Promise.resolve().then(function () { return agda; });
|
|
51537
|
+
return Promise.resolve().then(function () { return agda$1; });
|
|
51455
51538
|
}),
|
|
51456
51539
|
al: createLanguageAsyncLoader("al", function () {
|
|
51457
51540
|
return Promise.resolve().then(function () { return al$1; });
|
|
@@ -51499,7 +51582,7 @@ var languageLoaders = {
|
|
|
51499
51582
|
return Promise.resolve().then(function () { return autoit$2; });
|
|
51500
51583
|
}),
|
|
51501
51584
|
avisynth: createLanguageAsyncLoader("avisynth", function () {
|
|
51502
|
-
return Promise.resolve().then(function () { return avisynth
|
|
51585
|
+
return Promise.resolve().then(function () { return avisynth; });
|
|
51503
51586
|
}),
|
|
51504
51587
|
avroIdl: createLanguageAsyncLoader("avroIdl", function () {
|
|
51505
51588
|
return Promise.resolve().then(function () { return avroIdl; });
|
|
@@ -60939,45 +61022,41 @@ var ada$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
60939
61022
|
'default': ada_1
|
|
60940
61023
|
}, [ada_1]);
|
|
60941
61024
|
|
|
60942
|
-
var agda_1;
|
|
60943
|
-
|
|
60944
|
-
|
|
60945
|
-
function
|
|
60946
|
-
if (hasRequiredAgda) return agda_1;
|
|
60947
|
-
hasRequiredAgda = 1;
|
|
60948
|
-
|
|
60949
|
-
agda_1 = agda;
|
|
60950
|
-
agda.displayName = 'agda';
|
|
60951
|
-
agda.aliases = [];
|
|
60952
|
-
function agda(Prism) {
|
|
61025
|
+
var agda_1 = agda;
|
|
61026
|
+
agda.displayName = 'agda';
|
|
61027
|
+
agda.aliases = [];
|
|
61028
|
+
function agda(Prism) {
|
|
60953
61029
|
(function (Prism) {
|
|
60954
|
-
|
|
60955
|
-
|
|
60956
|
-
|
|
60957
|
-
|
|
60958
|
-
|
|
60959
|
-
|
|
60960
|
-
|
|
60961
|
-
|
|
60962
|
-
|
|
60963
|
-
|
|
60964
|
-
|
|
60965
|
-
|
|
60966
|
-
|
|
60967
|
-
|
|
60968
|
-
|
|
60969
|
-
|
|
60970
|
-
|
|
60971
|
-
|
|
60972
|
-
|
|
60973
|
-
|
|
60974
|
-
|
|
60975
|
-
|
|
60976
|
-
|
|
60977
|
-
}
|
|
60978
|
-
return agda_1;
|
|
61030
|
+
Prism.languages.agda = {
|
|
61031
|
+
comment: /\{-[\s\S]*?(?:-\}|$)|--.*/,
|
|
61032
|
+
string: {
|
|
61033
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/,
|
|
61034
|
+
greedy: true
|
|
61035
|
+
},
|
|
61036
|
+
punctuation: /[(){}⦃⦄.;@]/,
|
|
61037
|
+
'class-name': {
|
|
61038
|
+
pattern: /((?:data|record) +)\S+/,
|
|
61039
|
+
lookbehind: true
|
|
61040
|
+
},
|
|
61041
|
+
function: {
|
|
61042
|
+
pattern: /(^[ \t]*)(?!\s)[^:\r\n]+(?=:)/m,
|
|
61043
|
+
lookbehind: true
|
|
61044
|
+
},
|
|
61045
|
+
operator: {
|
|
61046
|
+
pattern: /(^\s*|\s)(?:[=|:∀→λ\\?_]|->)(?=\s)/,
|
|
61047
|
+
lookbehind: true
|
|
61048
|
+
},
|
|
61049
|
+
keyword:
|
|
61050
|
+
/\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/
|
|
61051
|
+
};
|
|
61052
|
+
})(Prism);
|
|
60979
61053
|
}
|
|
60980
61054
|
|
|
61055
|
+
var agda$1 = /*#__PURE__*/_mergeNamespaces({
|
|
61056
|
+
__proto__: null,
|
|
61057
|
+
'default': agda_1
|
|
61058
|
+
}, [agda_1]);
|
|
61059
|
+
|
|
60981
61060
|
var al_1 = al;
|
|
60982
61061
|
al.displayName = 'al';
|
|
60983
61062
|
al.aliases = [];
|
|
@@ -62651,179 +62730,183 @@ var autoit$2 = /*#__PURE__*/_mergeNamespaces({
|
|
|
62651
62730
|
'default': autoit_1
|
|
62652
62731
|
}, [autoit_1]);
|
|
62653
62732
|
|
|
62654
|
-
var avisynth_1
|
|
62655
|
-
|
|
62656
|
-
|
|
62657
|
-
function
|
|
62733
|
+
var avisynth_1;
|
|
62734
|
+
var hasRequiredAvisynth;
|
|
62735
|
+
|
|
62736
|
+
function requireAvisynth () {
|
|
62737
|
+
if (hasRequiredAvisynth) return avisynth_1;
|
|
62738
|
+
hasRequiredAvisynth = 1;
|
|
62739
|
+
|
|
62740
|
+
avisynth_1 = avisynth;
|
|
62741
|
+
avisynth.displayName = 'avisynth';
|
|
62742
|
+
avisynth.aliases = ['avs'];
|
|
62743
|
+
function avisynth(Prism) {
|
|
62658
62744
|
(function (Prism) {
|
|
62659
|
-
|
|
62660
|
-
|
|
62661
|
-
|
|
62662
|
-
|
|
62663
|
-
|
|
62664
|
-
|
|
62665
|
-
|
|
62666
|
-
|
|
62667
|
-
|
|
62668
|
-
|
|
62669
|
-
|
|
62670
|
-
|
|
62671
|
-
|
|
62672
|
-
|
|
62673
|
-
|
|
62674
|
-
|
|
62675
|
-
|
|
62676
|
-
|
|
62677
|
-
|
|
62678
|
-
|
|
62679
|
-
|
|
62680
|
-
|
|
62681
|
-
|
|
62682
|
-
|
|
62683
|
-
|
|
62684
|
-
|
|
62685
|
-
|
|
62686
|
-
|
|
62687
|
-
|
|
62688
|
-
|
|
62689
|
-
|
|
62690
|
-
|
|
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
|
-
|
|
62745
|
+
function replace(pattern, replacements) {
|
|
62746
|
+
return pattern.replace(/<<(\d+)>>/g, function (m, index) {
|
|
62747
|
+
return replacements[+index]
|
|
62748
|
+
})
|
|
62749
|
+
}
|
|
62750
|
+
function re(pattern, replacements, flags) {
|
|
62751
|
+
return RegExp(replace(pattern, replacements), flags || '')
|
|
62752
|
+
}
|
|
62753
|
+
var types = /bool|clip|float|int|string|val/.source;
|
|
62754
|
+
var internals = [
|
|
62755
|
+
// bools
|
|
62756
|
+
/is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/
|
|
62757
|
+
.source, // control
|
|
62758
|
+
/apply|assert|default|eval|import|nop|select|undefined/.source, // global
|
|
62759
|
+
/opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/
|
|
62760
|
+
.source, // conv
|
|
62761
|
+
/hex(?:value)?|value/.source, // numeric
|
|
62762
|
+
/abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/
|
|
62763
|
+
.source, // trig
|
|
62764
|
+
/a?sinh?|a?cosh?|a?tan[2h]?/.source, // bit
|
|
62765
|
+
/(?: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?))/
|
|
62766
|
+
.source, // runtime
|
|
62767
|
+
/average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/
|
|
62768
|
+
.source, // script
|
|
62769
|
+
/getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/
|
|
62770
|
+
.source, // string
|
|
62771
|
+
/chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/
|
|
62772
|
+
.source, // version
|
|
62773
|
+
/isversionorgreater|version(?:number|string)/.source, // helper
|
|
62774
|
+
/buildpixeltype|colorspacenametopixeltype/.source, // avsplus
|
|
62775
|
+
/addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source
|
|
62776
|
+
].join('|');
|
|
62777
|
+
var properties = [
|
|
62778
|
+
// content
|
|
62779
|
+
/has(?:audio|video)/.source, // resolution
|
|
62780
|
+
/height|width/.source, // framerate
|
|
62781
|
+
/frame(?:count|rate)|framerate(?:denominator|numerator)/.source, // interlacing
|
|
62782
|
+
/getparity|is(?:field|frame)based/.source, // color format
|
|
62783
|
+
/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/
|
|
62784
|
+
.source, // audio
|
|
62785
|
+
/audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/
|
|
62786
|
+
.source
|
|
62787
|
+
].join('|');
|
|
62788
|
+
var filters = [
|
|
62789
|
+
// source
|
|
62790
|
+
/avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/
|
|
62791
|
+
.source, // color
|
|
62792
|
+
/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/
|
|
62793
|
+
.source, // overlay
|
|
62794
|
+
/(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source, // geometry
|
|
62795
|
+
/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)/
|
|
62796
|
+
.source, // pixel
|
|
62797
|
+
/blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/
|
|
62798
|
+
.source, // timeline
|
|
62799
|
+
/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)/
|
|
62800
|
+
.source, // interlace
|
|
62801
|
+
/assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/
|
|
62802
|
+
.source, // audio
|
|
62803
|
+
/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/
|
|
62804
|
+
.source, // conditional
|
|
62805
|
+
/animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/
|
|
62806
|
+
.source, // export
|
|
62807
|
+
/imagewriter/.source, // debug
|
|
62808
|
+
/blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/
|
|
62809
|
+
.source
|
|
62810
|
+
].join('|');
|
|
62811
|
+
var allinternals = [internals, properties, filters].join('|');
|
|
62812
|
+
Prism.languages.avisynth = {
|
|
62813
|
+
comment: [
|
|
62814
|
+
{
|
|
62815
|
+
// Matches [* *] nestable block comments, but only supports 1 level of nested comments
|
|
62816
|
+
// /\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|<self>)*\*\]/
|
|
62817
|
+
pattern:
|
|
62818
|
+
/(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,
|
|
62819
|
+
lookbehind: true,
|
|
62820
|
+
greedy: true
|
|
62821
|
+
},
|
|
62822
|
+
{
|
|
62823
|
+
// Matches /* */ block comments
|
|
62824
|
+
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
|
62825
|
+
lookbehind: true,
|
|
62826
|
+
greedy: true
|
|
62827
|
+
},
|
|
62828
|
+
{
|
|
62829
|
+
// Matches # comments
|
|
62830
|
+
pattern: /(^|[^\\$])#.*/,
|
|
62831
|
+
lookbehind: true,
|
|
62832
|
+
greedy: true
|
|
62833
|
+
}
|
|
62834
|
+
],
|
|
62835
|
+
// Handle before strings because optional arguments are surrounded by double quotes
|
|
62836
|
+
argument: {
|
|
62837
|
+
pattern: re(/\b(?:<<0>>)\s+("?)\w+\1/.source, [types], 'i'),
|
|
62838
|
+
inside: {
|
|
62839
|
+
keyword: /^\w+/
|
|
62840
|
+
}
|
|
62841
|
+
},
|
|
62842
|
+
// Optional argument assignment
|
|
62843
|
+
'argument-label': {
|
|
62844
|
+
pattern: /([,(][\s\\]*)\w+\s*=(?!=)/,
|
|
62845
|
+
lookbehind: true,
|
|
62846
|
+
inside: {
|
|
62847
|
+
'argument-name': {
|
|
62848
|
+
pattern: /^\w+/,
|
|
62849
|
+
alias: 'punctuation'
|
|
62850
|
+
},
|
|
62851
|
+
punctuation: /=$/
|
|
62852
|
+
}
|
|
62853
|
+
},
|
|
62854
|
+
string: [
|
|
62855
|
+
{
|
|
62856
|
+
// triple double-quoted
|
|
62857
|
+
pattern: /"""[\s\S]*?"""/,
|
|
62858
|
+
greedy: true
|
|
62859
|
+
},
|
|
62860
|
+
{
|
|
62861
|
+
// single double-quoted
|
|
62862
|
+
pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
|
|
62863
|
+
greedy: true,
|
|
62864
|
+
inside: {
|
|
62865
|
+
constant: {
|
|
62866
|
+
// These *are* case-sensitive!
|
|
62867
|
+
pattern:
|
|
62868
|
+
/\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/
|
|
62869
|
+
}
|
|
62870
|
+
}
|
|
62871
|
+
}
|
|
62872
|
+
],
|
|
62873
|
+
// The special "last" variable that takes the value of the last implicitly returned clip
|
|
62874
|
+
variable: /\b(?:last)\b/i,
|
|
62875
|
+
boolean: /\b(?:false|no|true|yes)\b/i,
|
|
62876
|
+
keyword:
|
|
62877
|
+
/\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,
|
|
62878
|
+
constant: /\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,
|
|
62879
|
+
// AviSynth's internal functions, filters, and properties
|
|
62880
|
+
'builtin-function': {
|
|
62881
|
+
pattern: re(/\b(?:<<0>>)\b/.source, [allinternals], 'i'),
|
|
62882
|
+
alias: 'function'
|
|
62883
|
+
},
|
|
62884
|
+
'type-cast': {
|
|
62885
|
+
pattern: re(/\b(?:<<0>>)(?=\s*\()/.source, [types], 'i'),
|
|
62886
|
+
alias: 'keyword'
|
|
62887
|
+
},
|
|
62888
|
+
// External/user-defined filters
|
|
62889
|
+
function: {
|
|
62890
|
+
pattern: /\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,
|
|
62891
|
+
lookbehind: true
|
|
62892
|
+
},
|
|
62893
|
+
// Matches a \ as the first or last character on a line
|
|
62894
|
+
'line-continuation': {
|
|
62895
|
+
pattern: /(^[ \t]*)\\|\\(?=[ \t]*$)/m,
|
|
62896
|
+
lookbehind: true,
|
|
62897
|
+
alias: 'punctuation'
|
|
62898
|
+
},
|
|
62899
|
+
number:
|
|
62900
|
+
/\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,
|
|
62901
|
+
operator: /\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,
|
|
62902
|
+
punctuation: /[{}\[\]();,.]/
|
|
62903
|
+
};
|
|
62904
|
+
Prism.languages.avs = Prism.languages.avisynth;
|
|
62905
|
+
})(Prism);
|
|
62906
|
+
}
|
|
62907
|
+
return avisynth_1;
|
|
62820
62908
|
}
|
|
62821
62909
|
|
|
62822
|
-
var avisynth$1 = /*#__PURE__*/_mergeNamespaces({
|
|
62823
|
-
__proto__: null,
|
|
62824
|
-
'default': avisynth_1
|
|
62825
|
-
}, [avisynth_1]);
|
|
62826
|
-
|
|
62827
62910
|
var avroIdl_1;
|
|
62828
62911
|
var hasRequiredAvroIdl;
|
|
62829
62912
|
|
|
@@ -84052,7 +84135,7 @@ refractor.register(abap_1);
|
|
|
84052
84135
|
refractor.register(abnf_1);
|
|
84053
84136
|
refractor.register(actionscript_1);
|
|
84054
84137
|
refractor.register(ada_1);
|
|
84055
|
-
refractor.register(
|
|
84138
|
+
refractor.register(agda_1);
|
|
84056
84139
|
refractor.register(al_1);
|
|
84057
84140
|
refractor.register(antlr4_1);
|
|
84058
84141
|
refractor.register(apacheconf_1);
|
|
@@ -84068,7 +84151,7 @@ refractor.register(asmatmel_1);
|
|
|
84068
84151
|
refractor.register(aspnet_1);
|
|
84069
84152
|
refractor.register(autohotkey_1);
|
|
84070
84153
|
refractor.register(autoit_1);
|
|
84071
|
-
refractor.register(
|
|
84154
|
+
refractor.register(requireAvisynth());
|
|
84072
84155
|
refractor.register(requireAvroIdl());
|
|
84073
84156
|
refractor.register(requireBash());
|
|
84074
84157
|
refractor.register(requireBasic());
|
|
@@ -85571,27 +85654,6 @@ CodeBlock.propTypes = {
|
|
|
85571
85654
|
codeStyles: propTypes.exports.object
|
|
85572
85655
|
};
|
|
85573
85656
|
|
|
85574
|
-
var EMBED_WIDGET_S3_SCRIPT_STRING = "<script src=\"https://neeto-widget.s3.ap-south-1.amazonaws.com/embedNeetoWidget.js\"></script>";
|
|
85575
|
-
var DISABLE_NEETO_CHAT = "disableNeetoChat: true,";
|
|
85576
|
-
var DISABLE_NEETO_CHANGELOG = "disableNeetoChangelog: true,";
|
|
85577
|
-
var DISABLE_NEETO_REPLAY = "disableNeetoReplay: true,";
|
|
85578
|
-
var SAMPLE_CONTEXT_CODE_STRING = "window.NeetoReplayWidgetSessionContext = {\n key1: \"value\",\n key2: [\"array\", \"of\", \"values\"],\n /* More key-value pairs */\n}";
|
|
85579
|
-
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}";
|
|
85580
|
-
var WIDGET_TYPES = {
|
|
85581
|
-
changelog: "changelog",
|
|
85582
|
-
chat: "chat",
|
|
85583
|
-
replay: "replay"
|
|
85584
|
-
};
|
|
85585
|
-
var WIDGET_TYPES_VALUES = values(WIDGET_TYPES);
|
|
85586
|
-
var EMAIL_WIDGET_SNIPPET_FORM_VALIDATION_SCHEMA = yup.object({
|
|
85587
|
-
emails: yup.array().required().label(i18next.t("neetoCommons.widget.email.fields.emails.label")),
|
|
85588
|
-
subject: yup.string().required().label(i18next.t("neetoCommons.widget.email.fields.subject.label"))
|
|
85589
|
-
});
|
|
85590
|
-
var QUERY_KEYS = {
|
|
85591
|
-
apiKey: "neetoWidgetApiKey"
|
|
85592
|
-
};
|
|
85593
|
-
var DEFAULT_QUERY_STALE_TIME = 60 * 60 * 1000; // 1 hour in milliseconds
|
|
85594
|
-
|
|
85595
85657
|
var getWidgetApiKeyUrl = function getWidgetApiKeyUrl() {
|
|
85596
85658
|
return "api/v1/widget/api_keys/".concat(window.globalProps.organization.subdomain);
|
|
85597
85659
|
};
|
|
@@ -85835,6 +85897,12 @@ CodeSnippet.propTypes = {
|
|
|
85835
85897
|
|
|
85836
85898
|
var useFetchApiKey = function useFetchApiKey() {
|
|
85837
85899
|
return useQuery(QUERY_KEYS.apiKey, function () {
|
|
85900
|
+
if (window.globalProps.railsEnv === "heroku" || !process.env.ENABLE_SSO) {
|
|
85901
|
+
return Promise.resolve({
|
|
85902
|
+
widgetApiKey: "placeholder-api-key"
|
|
85903
|
+
});
|
|
85904
|
+
}
|
|
85905
|
+
|
|
85838
85906
|
return queryWidgetApiKey();
|
|
85839
85907
|
}, {
|
|
85840
85908
|
staleTime: DEFAULT_QUERY_STALE_TIME
|
|
@@ -85852,9 +85920,8 @@ var SelectionTabs = function SelectionTabs(_ref) {
|
|
|
85852
85920
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
85853
85921
|
className: "mb-1",
|
|
85854
85922
|
key: widget
|
|
85855
|
-
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default.createElement(
|
|
85923
|
+
}, primarySelectedWidget !== widget ? /*#__PURE__*/React__default.createElement(Switch, {
|
|
85856
85924
|
label: "neeto".concat(capitalize(widget)),
|
|
85857
|
-
size: "small",
|
|
85858
85925
|
checked: selectedWidgets.includes(widget),
|
|
85859
85926
|
onChange: function onChange() {
|
|
85860
85927
|
return updateSelectedWidgets(widget);
|
|
@@ -86165,7 +86232,8 @@ var Sidebar = function Sidebar(_ref) {
|
|
|
86165
86232
|
};
|
|
86166
86233
|
|
|
86167
86234
|
var NeetoWidget = {
|
|
86168
|
-
EmbedCode: EmbedCodeQueryClient
|
|
86235
|
+
EmbedCode: EmbedCodeQueryClient,
|
|
86236
|
+
WIDGET_TYPES: WIDGET_TYPES
|
|
86169
86237
|
};
|
|
86170
86238
|
|
|
86171
86239
|
function useDebounce(value) {
|
|
@@ -87980,12 +88048,12 @@ var zephir = /*#__PURE__*/_mergeNamespaces({
|
|
|
87980
88048
|
'default': zephirExports
|
|
87981
88049
|
}, [zephirExports]);
|
|
87982
88050
|
|
|
87983
|
-
var
|
|
88051
|
+
var avisynthExports = requireAvisynth();
|
|
87984
88052
|
|
|
87985
|
-
var
|
|
88053
|
+
var avisynth = /*#__PURE__*/_mergeNamespaces({
|
|
87986
88054
|
__proto__: null,
|
|
87987
|
-
'default':
|
|
87988
|
-
}, [
|
|
88055
|
+
'default': avisynthExports
|
|
88056
|
+
}, [avisynthExports]);
|
|
87989
88057
|
|
|
87990
88058
|
var avroIdlExports = requireAvroIdl();
|
|
87991
88059
|
|