@bigbinary/neeto-commons-frontend 2.0.13 → 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/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';
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 name = _ref.name;
262
- return includes(trim(toLower(searchTerm)), trim(toLower(name)));
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
- name = _ref4.name;
341
- return /*#__PURE__*/React__default.createElement(MenuItem.Button, {
340
+ title = _ref4.title;
341
+ return /*#__PURE__*/React__default.createElement(MenuItem, {
342
342
  key: key
343
- }, /*#__PURE__*/React__default.createElement("label", {
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: name,
351
+ label: title,
350
352
  onChange: handleChange
351
353
  }, checkboxProps))));
352
354
  }) : /*#__PURE__*/React__default.createElement("span", {
@@ -492,6 +494,27 @@ 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 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
+
495
518
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
496
519
 
497
520
  var propTypes = {exports: {}};
@@ -51526,7 +51549,7 @@ var languageLoaders = {
51526
51549
  return Promise.resolve().then(function () { return apex$1; });
51527
51550
  }),
51528
51551
  apl: createLanguageAsyncLoader("apl", function () {
51529
- return Promise.resolve().then(function () { return apl; });
51552
+ return Promise.resolve().then(function () { return apl$1; });
51530
51553
  }),
51531
51554
  applescript: createLanguageAsyncLoader("applescript", function () {
51532
51555
  return Promise.resolve().then(function () { return applescript$2; });
@@ -51559,7 +51582,7 @@ var languageLoaders = {
51559
51582
  return Promise.resolve().then(function () { return autoit$2; });
51560
51583
  }),
51561
51584
  avisynth: createLanguageAsyncLoader("avisynth", function () {
51562
- return Promise.resolve().then(function () { return avisynth$1; });
51585
+ return Promise.resolve().then(function () { return avisynth; });
51563
51586
  }),
51564
51587
  avroIdl: createLanguageAsyncLoader("avroIdl", function () {
51565
51588
  return Promise.resolve().then(function () { return avroIdl; });
@@ -61343,54 +61366,50 @@ var apex$1 = /*#__PURE__*/_mergeNamespaces({
61343
61366
  'default': apex_1
61344
61367
  }, [apex_1]);
61345
61368
 
61346
- var apl_1;
61347
- var hasRequiredApl;
61348
-
61349
- function requireApl () {
61350
- if (hasRequiredApl) return apl_1;
61351
- hasRequiredApl = 1;
61352
-
61353
- apl_1 = apl;
61354
- apl.displayName = 'apl';
61355
- apl.aliases = [];
61356
- function apl(Prism) {
61357
- Prism.languages.apl = {
61358
- comment: /(?:⍝|#[! ]).*$/m,
61359
- string: {
61360
- pattern: /'(?:[^'\r\n]|'')*'/,
61361
- greedy: true
61362
- },
61363
- number:
61364
- /¯?(?:\d*\.?\b\d+(?:e[]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,
61365
- statement: /:[A-Z][a-z][A-Za-z]*\b/,
61366
- 'system-function': {
61367
- pattern: /⎕[A-Z]+/i,
61368
- alias: 'function'
61369
- },
61370
- constant: /[⍬⌾#⎕⍞]/,
61371
- function: /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,
61372
- 'monadic-operator': {
61373
- pattern: /[\\\/⌿⍀¨⍨⌶&∥]/,
61374
- alias: 'operator'
61375
- },
61376
- 'dyadic-operator': {
61377
- pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/,
61378
- alias: 'operator'
61379
- },
61380
- assignment: {
61381
- pattern: /←/,
61382
- alias: 'keyword'
61383
- },
61384
- punctuation: /[\[;\]()◇⋄]/,
61385
- dfn: {
61386
- pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
61387
- alias: 'builtin'
61388
- }
61389
- };
61390
- }
61391
- return apl_1;
61369
+ var apl_1 = apl;
61370
+ apl.displayName = 'apl';
61371
+ apl.aliases = [];
61372
+ function apl(Prism) {
61373
+ Prism.languages.apl = {
61374
+ comment: /(?:⍝|#[! ]).*$/m,
61375
+ string: {
61376
+ pattern: /'(?:[^'\r\n]|'')*'/,
61377
+ greedy: true
61378
+ },
61379
+ number:
61380
+ /¯?(?:\d*\.?\b\d+(?:e[+¯]?\d+)?|¯|∞)(?:j¯?(?:(?:\d+(?:\.\d+)?|\.\d+)(?:e[+¯]?\d+)?|¯|∞))?/i,
61381
+ statement: /:[A-Z][a-z][A-Za-z]*\b/,
61382
+ 'system-function': {
61383
+ pattern: /⎕[A-Z]+/i,
61384
+ alias: 'function'
61385
+ },
61386
+ constant: /[⍬⌾#⎕⍞]/,
61387
+ function: /[-+×÷⌈⌊∣|⍳⍸?*⍟○!⌹<≤=>≥≠≡≢∊⍷∪∩~∨∧⍱⍲⍴,⍪⌽⊖⍉↑↓⊂⊃⊆⊇⌷⍋⍒⊤⊥⍕⍎⊣⊢⍁⍂≈⍯↗¤→]/,
61388
+ 'monadic-operator': {
61389
+ pattern: /[\\\/⌿⍀¨⍨⌶&∥]/,
61390
+ alias: 'operator'
61391
+ },
61392
+ 'dyadic-operator': {
61393
+ pattern: /[.⍣⍠⍤∘⌸@⌺⍥]/,
61394
+ alias: 'operator'
61395
+ },
61396
+ assignment: {
61397
+ pattern: /←/,
61398
+ alias: 'keyword'
61399
+ },
61400
+ punctuation: /[\[;\]()◇⋄]/,
61401
+ dfn: {
61402
+ pattern: /[{}⍺⍵⍶⍹∇⍫:]/,
61403
+ alias: 'builtin'
61404
+ }
61405
+ };
61392
61406
  }
61393
61407
 
61408
+ var apl$1 = /*#__PURE__*/_mergeNamespaces({
61409
+ __proto__: null,
61410
+ 'default': apl_1
61411
+ }, [apl_1]);
61412
+
61394
61413
  var applescript_1 = applescript$1;
61395
61414
  applescript$1.displayName = 'applescript';
61396
61415
  applescript$1.aliases = [];
@@ -62711,179 +62730,183 @@ var autoit$2 = /*#__PURE__*/_mergeNamespaces({
62711
62730
  'default': autoit_1
62712
62731
  }, [autoit_1]);
62713
62732
 
62714
- var avisynth_1 = avisynth;
62715
- avisynth.displayName = 'avisynth';
62716
- avisynth.aliases = ['avs'];
62717
- function avisynth(Prism) {
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) {
62718
62744
  (function (Prism) {
62719
- function replace(pattern, replacements) {
62720
- return pattern.replace(/<<(\d+)>>/g, function (m, index) {
62721
- return replacements[+index]
62722
- })
62723
- }
62724
- function re(pattern, replacements, flags) {
62725
- return RegExp(replace(pattern, replacements), flags || '')
62726
- }
62727
- var types = /bool|clip|float|int|string|val/.source;
62728
- var internals = [
62729
- // bools
62730
- /is(?:bool|clip|float|int|string)|defined|(?:(?:internal)?function|var)?exists?/
62731
- .source, // control
62732
- /apply|assert|default|eval|import|nop|select|undefined/.source, // global
62733
- /opt_(?:allowfloataudio|avipadscanlines|dwchannelmask|enable_(?:b64a|planartopackedrgb|v210|y3_10_10|y3_10_16)|usewaveextensible|vdubplanarhack)|set(?:cachemode|maxcpu|memorymax|planarlegacyalignment|workingdir)/
62734
- .source, // conv
62735
- /hex(?:value)?|value/.source, // numeric
62736
- /abs|ceil|continued(?:denominator|numerator)?|exp|floor|fmod|frac|log(?:10)?|max|min|muldiv|pi|pow|rand|round|sign|spline|sqrt/
62737
- .source, // trig
62738
- /a?sinh?|a?cosh?|a?tan[2h]?/.source, // bit
62739
- /(?: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?))/
62740
- .source, // runtime
62741
- /average(?:[bgr]|chroma[uv]|luma)|(?:[rgb]|chroma[uv]|luma|rgb|[yuv](?=difference(?:fromprevious|tonext)))difference(?:fromprevious|tonext)?|[yuvrgb]plane(?:median|min|max|minmaxdifference)/
62742
- .source, // script
62743
- /getprocessinfo|logmsg|script(?:dir(?:utf8)?|file(?:utf8)?|name(?:utf8)?)|setlogparams/
62744
- .source, // string
62745
- /chr|(?:fill|find|left|mid|replace|rev|right)str|format|[lu]case|ord|str(?:cmpi?|fromutf8|len|toutf8)|time|trim(?:all|left|right)/
62746
- .source, // version
62747
- /isversionorgreater|version(?:number|string)/.source, // helper
62748
- /buildpixeltype|colorspacenametopixeltype/.source, // avsplus
62749
- /addautoloaddir|on(?:cpu|cuda)|prefetch|setfiltermtmode/.source
62750
- ].join('|');
62751
- var properties = [
62752
- // content
62753
- /has(?:audio|video)/.source, // resolution
62754
- /height|width/.source, // framerate
62755
- /frame(?:count|rate)|framerate(?:denominator|numerator)/.source, // interlacing
62756
- /getparity|is(?:field|frame)based/.source, // color format
62757
- /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/
62758
- .source, // audio
62759
- /audio(?:bits|channels|duration|length(?:[fs]|hi|lo)?|rate)|isaudio(?:float|int)/
62760
- .source
62761
- ].join('|');
62762
- var filters = [
62763
- // source
62764
- /avi(?:file)?source|directshowsource|image(?:reader|source|sourceanim)|opendmlsource|segmented(?:avisource|directshowsource)|wavsource/
62765
- .source, // color
62766
- /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/
62767
- .source, // overlay
62768
- /(?:colorkey|reset)mask|layer|mask(?:hs)?|merge|overlay|subtract/.source, // geometry
62769
- /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)/
62770
- .source, // pixel
62771
- /blur|fixbrokenchromaupsampling|generalconvolution|(?:spatial|temporal)soften|sharpen/
62772
- .source, // timeline
62773
- /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)/
62774
- .source, // interlace
62775
- /assume[bt]ff|assume(?:field|frame)based|bob|complementparity|doubleweave|peculiarblend|pulldown|separate(?:columns|fields|rows)|swapfields|weave(?:columns|rows)?/
62776
- .source, // audio
62777
- /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/
62778
- .source, // conditional
62779
- /animate|applyrange|conditional(?:filter|reader|select)|frameevaluate|scriptclip|tcp(?:server|source)|writefile(?:end|if|start)?/
62780
- .source, // export
62781
- /imagewriter/.source, // debug
62782
- /blackness|blankclip|colorbars(?:hd)?|compare|dumpfiltergraph|echo|histogram|info|messageclip|preroll|setgraphanalysis|show(?:framenumber|smpte|time)|showfiveversions|stack(?:horizontal|vertical)|subtitle|tone|version/
62783
- .source
62784
- ].join('|');
62785
- var allinternals = [internals, properties, filters].join('|');
62786
- Prism.languages.avisynth = {
62787
- comment: [
62788
- {
62789
- // Matches [* *] nestable block comments, but only supports 1 level of nested comments
62790
- // /\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|<self>)*\*\]/
62791
- pattern:
62792
- /(^|[^\\])\[\*(?:[^\[*]|\[(?!\*)|\*(?!\])|\[\*(?:[^\[*]|\[(?!\*)|\*(?!\]))*\*\])*\*\]/,
62793
- lookbehind: true,
62794
- greedy: true
62795
- },
62796
- {
62797
- // Matches /* */ block comments
62798
- pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
62799
- lookbehind: true,
62800
- greedy: true
62801
- },
62802
- {
62803
- // Matches # comments
62804
- pattern: /(^|[^\\$])#.*/,
62805
- lookbehind: true,
62806
- greedy: true
62807
- }
62808
- ],
62809
- // Handle before strings because optional arguments are surrounded by double quotes
62810
- argument: {
62811
- pattern: re(/\b(?:<<0>>)\s+("?)\w+\1/.source, [types], 'i'),
62812
- inside: {
62813
- keyword: /^\w+/
62814
- }
62815
- },
62816
- // Optional argument assignment
62817
- 'argument-label': {
62818
- pattern: /([,(][\s\\]*)\w+\s*=(?!=)/,
62819
- lookbehind: true,
62820
- inside: {
62821
- 'argument-name': {
62822
- pattern: /^\w+/,
62823
- alias: 'punctuation'
62824
- },
62825
- punctuation: /=$/
62826
- }
62827
- },
62828
- string: [
62829
- {
62830
- // triple double-quoted
62831
- pattern: /"""[\s\S]*?"""/,
62832
- greedy: true
62833
- },
62834
- {
62835
- // single double-quoted
62836
- pattern: /"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,
62837
- greedy: true,
62838
- inside: {
62839
- constant: {
62840
- // These *are* case-sensitive!
62841
- pattern:
62842
- /\b(?:DEFAULT_MT_MODE|(?:MAINSCRIPT|PROGRAM|SCRIPT)DIR|(?:MACHINE|USER)_(?:CLASSIC|PLUS)_PLUGINS)\b/
62843
- }
62844
- }
62845
- }
62846
- ],
62847
- // The special "last" variable that takes the value of the last implicitly returned clip
62848
- variable: /\b(?:last)\b/i,
62849
- boolean: /\b(?:false|no|true|yes)\b/i,
62850
- keyword:
62851
- /\b(?:catch|else|for|function|global|if|return|try|while|__END__)\b/i,
62852
- constant: /\bMT_(?:MULTI_INSTANCE|NICE_FILTER|SERIALIZED|SPECIAL_MT)\b/,
62853
- // AviSynth's internal functions, filters, and properties
62854
- 'builtin-function': {
62855
- pattern: re(/\b(?:<<0>>)\b/.source, [allinternals], 'i'),
62856
- alias: 'function'
62857
- },
62858
- 'type-cast': {
62859
- pattern: re(/\b(?:<<0>>)(?=\s*\()/.source, [types], 'i'),
62860
- alias: 'keyword'
62861
- },
62862
- // External/user-defined filters
62863
- function: {
62864
- pattern: /\b[a-z_]\w*(?=\s*\()|(\.)[a-z_]\w*\b/i,
62865
- lookbehind: true
62866
- },
62867
- // Matches a \ as the first or last character on a line
62868
- 'line-continuation': {
62869
- pattern: /(^[ \t]*)\\|\\(?=[ \t]*$)/m,
62870
- lookbehind: true,
62871
- alias: 'punctuation'
62872
- },
62873
- number:
62874
- /\B\$(?:[\da-f]{6}|[\da-f]{8})\b|(?:(?:\b|\B-)\d+(?:\.\d*)?\b|\B\.\d+\b)/i,
62875
- operator: /\+\+?|[!=<>]=?|&&|\|\||[?:*/%-]/,
62876
- punctuation: /[{}\[\]();,.]/
62877
- };
62878
- Prism.languages.avs = Prism.languages.avisynth;
62879
- })(Prism);
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;
62880
62908
  }
62881
62909
 
62882
- var avisynth$1 = /*#__PURE__*/_mergeNamespaces({
62883
- __proto__: null,
62884
- 'default': avisynth_1
62885
- }, [avisynth_1]);
62886
-
62887
62910
  var avroIdl_1;
62888
62911
  var hasRequiredAvroIdl;
62889
62912
 
@@ -84117,7 +84140,7 @@ refractor.register(al_1);
84117
84140
  refractor.register(antlr4_1);
84118
84141
  refractor.register(apacheconf_1);
84119
84142
  refractor.register(apex_1);
84120
- refractor.register(requireApl());
84143
+ refractor.register(apl_1);
84121
84144
  refractor.register(applescript_1);
84122
84145
  refractor.register(aql_1);
84123
84146
  refractor.register(arduino_1);
@@ -84128,7 +84151,7 @@ refractor.register(asmatmel_1);
84128
84151
  refractor.register(aspnet_1);
84129
84152
  refractor.register(autohotkey_1);
84130
84153
  refractor.register(autoit_1);
84131
- refractor.register(avisynth_1);
84154
+ refractor.register(requireAvisynth());
84132
84155
  refractor.register(requireAvroIdl());
84133
84156
  refractor.register(requireBash());
84134
84157
  refractor.register(requireBasic());
@@ -85631,27 +85654,6 @@ CodeBlock.propTypes = {
85631
85654
  codeStyles: propTypes.exports.object
85632
85655
  };
85633
85656
 
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
85657
  var getWidgetApiKeyUrl = function getWidgetApiKeyUrl() {
85656
85658
  return "api/v1/widget/api_keys/".concat(window.globalProps.organization.subdomain);
85657
85659
  };
@@ -85895,6 +85897,12 @@ CodeSnippet.propTypes = {
85895
85897
 
85896
85898
  var useFetchApiKey = function useFetchApiKey() {
85897
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
+
85898
85906
  return queryWidgetApiKey();
85899
85907
  }, {
85900
85908
  staleTime: DEFAULT_QUERY_STALE_TIME
@@ -85912,9 +85920,8 @@ var SelectionTabs = function SelectionTabs(_ref) {
85912
85920
  return /*#__PURE__*/React__default.createElement("div", {
85913
85921
  className: "mb-1",
85914
85922
  key: widget
85915
- }, primarySelectedWidget !== widget ? /*#__PURE__*/React__default.createElement(Checkbox, {
85923
+ }, primarySelectedWidget !== widget ? /*#__PURE__*/React__default.createElement(Switch, {
85916
85924
  label: "neeto".concat(capitalize(widget)),
85917
- size: "small",
85918
85925
  checked: selectedWidgets.includes(widget),
85919
85926
  onChange: function onChange() {
85920
85927
  return updateSelectedWidgets(widget);
@@ -86225,7 +86232,8 @@ var Sidebar = function Sidebar(_ref) {
86225
86232
  };
86226
86233
 
86227
86234
  var NeetoWidget = {
86228
- EmbedCode: EmbedCodeQueryClient
86235
+ EmbedCode: EmbedCodeQueryClient,
86236
+ WIDGET_TYPES: WIDGET_TYPES
86229
86237
  };
86230
86238
 
86231
86239
  function useDebounce(value) {
@@ -88040,12 +88048,12 @@ var zephir = /*#__PURE__*/_mergeNamespaces({
88040
88048
  'default': zephirExports
88041
88049
  }, [zephirExports]);
88042
88050
 
88043
- var aplExports = requireApl();
88051
+ var avisynthExports = requireAvisynth();
88044
88052
 
88045
- var apl = /*#__PURE__*/_mergeNamespaces({
88053
+ var avisynth = /*#__PURE__*/_mergeNamespaces({
88046
88054
  __proto__: null,
88047
- 'default': aplExports
88048
- }, [aplExports]);
88055
+ 'default': avisynthExports
88056
+ }, [avisynthExports]);
88049
88057
 
88050
88058
  var avroIdlExports = requireAvroIdl();
88051
88059