Skip to content

Instantly share code, notes, and snippets.

@cszhu
Created March 13, 2023 16:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cszhu/39f23bf6c5e93b9463c93fa54133847d to your computer and use it in GitHub Desktop.
Save cszhu/39f23bf6c5e93b9463c93fa54133847d to your computer and use it in GitHub Desktop.
JSON for Retools AI Regex Editor
{"uuid":"7ebe5b0c-ad9b-11ed-9a14-b340b1d5ec13","page":{"id":135058432,"data":{"appState":"[\"~#iR\",[\"^ \",\"n\",\"appTemplate\",\"v\",[\"^ \",\"isFetching\",false,\"plugins\",[\"~#iOM\",[\"currentRegexText\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"currentRegexText\",\"type\",\"state\",\"subtype\",\"State\",\"namespace\",null,\"resourceName\",null,\"resourceDisplayName\",null,\"template\",[\"^3\",[\"_persistedValueGetter\",null,\"_persistedValueSetter\",null,\"persistValue\",false,\"persistedValueKey\",\"\",\"value\",\"/\\\\{[^\\\\}]*\\\\}/g\"]],\"style\",null,\"position2\",null,\"mobilePosition2\",null,\"mobileAppPosition\",null,\"tabIndex\",null,\"container\",\"\",\"createdAt\",\"~m1676994406355\",\"updatedAt\",\"~m1676994601498\",\"folder\",\"appState\",\"screen\",null]]],\"currentTestString\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"currentTestString\",\"^4\",\"state\",\"^5\",\"State\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"_persistedValueGetter\",null,\"_persistedValueSetter\",null,\"persistValue\",false,\"persistedValueKey\",\"\",\"value\",\"{Hello} {World}!!\"]],\"^:\",null,\"^;\",null,\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676994432526\",\"^A\",\"~m1676994612815\",\"^B\",\"appState\",\"^C\",null]]],\"lastRunIndex\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"lastRunIndex\",\"^4\",\"state\",\"^5\",\"State\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"_persistedValueGetter\",null,\"_persistedValueSetter\",null,\"persistValue\",false,\"persistedValueKey\",\"\",\"value\",\"0\"]],\"^:\",null,\"^;\",null,\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676995197232\",\"^A\",\"~m1676995207923\",\"^B\",\"appState\",\"^C\",null]]],\"promptHistory\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"promptHistory\",\"^4\",\"state\",\"^5\",\"State\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"_persistedValueGetter\",null,\"_persistedValueSetter\",null,\"persistValue\",false,\"persistedValueKey\",\"\",\"value\",\"[]\"]],\"^:\",null,\"^;\",null,\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676992467499\",\"^A\",\"~m1676992476513\",\"^B\",\"appState\",\"^C\",null]]],\"resetIndex\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"resetIndex\",\"^4\",\"state\",\"^5\",\"State\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"_persistedValueGetter\",null,\"_persistedValueSetter\",null,\"persistValue\",false,\"persistedValueKey\",\"\",\"value\",\"0\"]],\"^:\",null,\"^;\",null,\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676997455281\",\"^A\",\"~m1676997467159\",\"^B\",\"appState\",\"^C\",null]]],\"codeEditor\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"codeEditor\",\"^4\",\"widget\",\"^5\",\"CustomComponentWidget\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"allowTopNavigation\",false,\"heightType\",\"fixed\",\"allowDownloads\",false,\"allowFullscreen\",false,\"allowForms\",false,\"model\",\"{\\n \\\"regex\\\": \\\"{{ currentRegexText.value }}\\\",\\n \\\"testString\\\": \\\"{{ currentTestString.value }}\\\",\\n \\\"lastRunIndex\\\": {{ lastRunIndex.value }},\\n \\\"runResult\\\": [],\\n \\\"resetIndex\\\": {{ resetIndex.value }}\\n}\",\"allowCamera\",false,\"allowModals\",false,\"allowPopups\",false,\"iframeCode\",\"<script \\n src=\\\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/codemirror.min.js\\\" \\n integrity=\\\"sha512-rdFIN28+neM8H8zNsjRClhJb1fIYby2YCNmoqwnqBDEvZgpcp7MJiX8Wd+Oi6KcJOMOuvGztjrsI59rly9BsVQ==\\\" \\n crossorigin=\\\"anonymous\\\" \\n referrerpolicy=\\\"no-referrer\\\">\\n</script>\\n<script \\n src=\\\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/mode/javascript/javascript.min.js\\\" \\n integrity=\\\"sha512-Cbz+kvn+l5pi5HfXsEB/FYgZVKjGIhOgYNBwj4W2IHP2y8r3AdyDCQRnEUqIQ+6aJjygKPTyaNT2eIihaykJlw==\\\" \\n crossorigin=\\\"anonymous\\\" \\n referrerpolicy=\\\"no-referrer\\\">\\n</script>\\n\\n<style>\\n @import url('https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/codemirror.min.css');\\n @import url('https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/theme/eclipse.min.css');\\n\\n html, body {\\n height: 100%;\\n width: 100%;\\n overflow: hidden;\\n padding: 0;\\n margin: 0;\\n box-sizing: border-box;\\n }\\n\\n html {\\n border: 1px solid #d1d1d1;\\n border-radius: 4px;\\n }\\n\\n body {\\n padding: 0 4px;\\n }\\n\\n .CodeMirror {\\n height: auto;\\n }\\n</style>\\n\\n<script>\\n// Prefix any variables in the window scope with \\\"r_\\\" since we know we'll be\\n// evaluating developer code and want to try as best we can to avoid collision\\nlet r_codeEditor = null;\\nlet r_lastTest = '';\\nlet r_lastRegex = '';\\nlet r_runIndex = 0;\\nlet r_resetIndex = 0;\\n\\n// Send an object to be JSON printed in the Retool app\\nfunction print(obj) {\\n if (!window.Retool || !window.Retool.modelUpdate) return;\\n\\n window.Retool.modelUpdate({\\n runResult: obj\\n });\\n}\\n\\n// Init a CodeMirror editor (with timeouts to ensure scripts are loaded first)\\nfunction r_createEditor() {\\n if (!CodeMirror) {\\n setTimeout(createEditor, 50);\\n } else {\\n // Initialize code editor\\n r_codeEditor = CodeMirror(document.body, {\\n value: '// Initializing...',\\n mode: 'javascript',\\n tabSize: 2,\\n lineNumbers: true\\n });\\n }\\n}\\n\\n// Set the contents of the CodeMirror editor (with timeouts to ensure the\\n// editor has been created first)\\nfunction r_setCode(code) {\\n if (!r_codeEditor) {\\n // If code editor is not initialized, wait and retry\\n setTimeout(() => {\\n r_setCode(code);\\n }, 60);\\n } else {\\n r_codeEditor.setValue(code);\\n }\\n}\\n\\n// Evaluate the current content of the code editor and return the result\\nfunction r_runCode() {\\n if (!r_codeEditor) return;\\n\\n const code = r_codeEditor.getValue();\\n if (!code) return;\\n\\n // If we have a code string, try and eval it - YOLO!\\n try {\\n eval(code);\\n } catch(e) {\\n // Print the error from the eval attempt to help debug\\n console.error('Error running test code in editor:');\\n console.error(e);\\n print('Error running code snippet: \\\\n' + e.message);\\n } finally {\\n r_runIndex++;\\n }\\n}\\n\\nfunction initCodeFromModel(model) {\\n\\n}\\n\\n// Subscribe for updates from the Retool host page\\nwindow.Retool.subscribe(function(model) {\\n function initCode() {\\n r_lastTest = model.testString;\\n r_lastRegex = model.regex;\\n\\n const code = `const regex = ${r_lastRegex.trimStart()};\\nconst t = ${JSON.stringify(r_lastTest)};\\nconst matches = t.match(regex);\\n\\n// \\\"print\\\" is a special function that will \\n// log the results of your regex matches \\n// to the text field below.\\nprint(matches);\\n`;\\n\\n // Update the code in the code editor when initialized\\n r_setCode(code);\\n }\\n\\n // If the model hasn't been initialized yet, ignore\\n if (!model) return;\\n\\n // Check for a requested test run - if the index is greater than zero and is \\n // greater than the last code run, eval the contents of the editor\\n if (model.lastRunIndex > r_runIndex) {\\n r_runCode();\\n }\\n\\n // If the code and test string haven't changed, don't do anything else\\n if (\\n model.regex === r_lastRegex &&\\n model.testString === r_lastTest\\n ) {\\n if (model.resetIndex > r_resetIndex) {\\n // In this case, we have a reset request and should update code from \\n // the retool model\\n r_resetIndex++;\\n initCode();\\n }\\n } else {\\n initCode();\\n }\\n});\\n\\n// Run initial load for the code editor\\nr_createEditor();\\n</script>\",\"allowMicrophone\",false,\"allowSameOrigin\",false,\"allowPopupsToEscapeSandbox\",false,\"allowPayment\",false,\"allowGeolocation\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"rowGroup\",\"body\",\"subcontainer\",\"\",\"row\",1.800000000000002,\"col\",6,\"height\",4.199999999999999,\"width\",6,\"tabNum\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676512075585\",\"^A\",\"~m1677077741415\",\"^B\",\"\",\"^C\",null]]],\"$main\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"$main\",\"^4\",\"frame\",\"^5\",\"Frame\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"type\",\"main\",\"sticky\",false,\"isHiddenOnDesktop\",false,\"isHiddenOnMobile\",false,\"style\",[\"^3\",[\"canvas\",\"#f5f5f5\"]]]],\"^:\",[\"^3\",[]],\"^;\",null,\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676512075620\",\"^A\",\"~m1676990086271\",\"^B\",\"\",\"^C\",null]]],\"headerText\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"headerText\",\"^4\",\"widget\",\"^5\",\"TextWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"heightType\",\"auto\",\"horizontalAlign\",\"left\",\"hidden\",false,\"imageWidth\",\"fit\",\"showInEditor\",false,\"verticalAlign\",\"center\",\"tooltipText\",\"\",\"value\",\"## 🤖 AI RegEx Developer\",\"_disclosedFields\",[],\"disableMarkdown\",false,\"overflowType\",\"scroll\",\"maintainSpaceWhenHidden\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",0,\"col\",0,\"^F\",0.6,\"^G\",9,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676512982256\",\"^A\",\"~m1676686873959\",\"^B\",\"\",\"^C\",null]]],\"runButton\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"runButton\",\"^4\",\"widget\",\"^5\",\"ButtonWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"horizontalAlign\",\"stretch\",\"clickable\",false,\"iconAfter\",\"\",\"submitTargetId\",null,\"hidden\",false,\"text\",\"Run\",\"showInEditor\",false,\"tooltipText\",\"\",\"style\",[\"^3\",[\"background\",\"success\"]],\"_disclosedFields\",[],\"styleVariant\",\"solid\",\"submit\",false,\"iconBefore\",\"bold/entertainment-control-button-play\",\"events\",[\"~#iL\",[[\"^3\",[\"event\",\"click\",\"type\",\"script\",\"method\",\"run\",\"pluginId\",\"\",\"targetId\",null,\"params\",[\"^3\",[\"src\",\"lastRunIndex.setValue(\\n lastRunIndex.value + 1\\n);\"]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"loading\",false,\"loaderPosition\",\"auto\",\"disabled\",false,\"maintainSpaceWhenHidden\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",6.000000000000001,\"col\",6,\"^F\",1,\"^G\",2,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676513304606\",\"^A\",\"~m1676995335954\",\"^B\",\"\",\"^C\",null]]],\"resetButton\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"resetButton\",\"^4\",\"widget\",\"^5\",\"ButtonWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"horizontalAlign\",\"stretch\",\"clickable\",false,\"iconAfter\",\"\",\"submitTargetId\",null,\"hidden\",false,\"text\",\"Reset\",\"showInEditor\",false,\"tooltipText\",\"\",\"style\",[\"^3\",[\"background\",\"highlight\"]],\"_disclosedFields\",[],\"styleVariant\",\"solid\",\"submit\",false,\"iconBefore\",\"bold/interface-arrows-reload-2-alternate\",\"events\",[\"^I\",[[\"^3\",[\"event\",\"click\",\"type\",\"script\",\"method\",\"run\",\"pluginId\",\"\",\"targetId\",null,\"params\",[\"^3\",[\"src\",\"resetIndex.setValue(\\n resetIndex.value + 1\\n);\"]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"loading\",false,\"loaderPosition\",\"auto\",\"disabled\",false,\"maintainSpaceWhenHidden\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",5.999999999999999,\"col\",8,\"^F\",1,\"^G\",2,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676702207552\",\"^A\",\"~m1676997523856\",\"^B\",\"\",\"^C\",null]]],\"regexPrompt\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"regexPrompt\",\"^4\",\"widget\",\"^5\",\"TextAreaWidget\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"spellCheck\",false,\"readOnly\",false,\"autoResize\",true,\"showCharacterCount\",false,\"autoComplete\",false,\"maxLength\",null,\"hidden\",false,\"customValidation\",\"\",\"hideValidationMessage\",false,\"minLines\",\"4\",\"validationMessage\",\"\",\"showInEditor\",false,\"pattern\",\"\",\"tooltipText\",\"\",\"labelAlign\",\"left\",\"formDataKey\",\"{{ self.id }}\",\"value\",\"captures all text between \\\"{\\\" and \\\"}\\\" characters in an entire string globally\",\"labelCaption\",\"\",\"labelWidth\",\"33\",\"autoFill\",\"\",\"placeholder\",\"Enter a prompt - e.g. \\\"captures all text between \\\"{\\\" and \\\"}\\\" characters in an entire string globally\\\"\",\"_disclosedFields\",[],\"label\",\"Write me a JavaScript regular expression that...\",\"_validate\",false,\"labelWidthUnit\",\"%\",\"invalid\",false,\"minLength\",null,\"inputTooltip\",\"\",\"events\",[\"^3\",[]],\"autoCapitalize\",\"none\",\"maxLines\",null,\"loading\",false,\"disabled\",false,\"labelPosition\",\"top\",\"labelWrap\",false,\"maintainSpaceWhenHidden\",false,\"required\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",0.8,\"col\",0,\"^F\",1,\"^G\",6,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676702657788\",\"^A\",\"~m1677077555115\",\"^B\",\"\",\"^C\",null]]],\"generateRegexButton\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"generateRegexButton\",\"^4\",\"widget\",\"^5\",\"ButtonWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"horizontalAlign\",\"stretch\",\"clickable\",false,\"iconAfter\",\"bold/interface-arrows-right-circle-2\",\"submitTargetId\",null,\"hidden\",false,\"text\",\"Generate Code\",\"showInEditor\",false,\"tooltipText\",\"\",\"_disclosedFields\",[],\"styleVariant\",\"solid\",\"submit\",false,\"iconBefore\",\"\",\"events\",[\"^I\",[[\"^3\",[\"event\",\"click\",\"type\",\"datasource\",\"method\",\"trigger\",\"pluginId\",\"generateRegex\",\"targetId\",null,\"params\",[\"^3\",[]],\"waitType\",\"debounce\",\"waitMs\",\"50\"]]]],\"loading\",\"{{ generateRegex.isFetching }}\",\"loaderPosition\",\"auto\",\"disabled\",\"{{ generateRegex.isFetching }}\",\"maintainSpaceWhenHidden\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",3.8000000000000007,\"col\",0,\"^F\",1,\"^G\",2,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676703003162\",\"^A\",\"~m1676999166192\",\"^B\",\"\",\"^C\",null]]],\"regexMatchesDisplay\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"regexMatchesDisplay\",\"^4\",\"widget\",\"^5\",\"TextAreaWidget\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"spellCheck\",false,\"readOnly\",\"true\",\"autoResize\",true,\"showCharacterCount\",false,\"autoComplete\",false,\"maxLength\",null,\"hidden\",false,\"customValidation\",\"\",\"hideValidationMessage\",false,\"minLines\",\"1\",\"validationMessage\",\"\",\"showInEditor\",false,\"pattern\",\"\",\"tooltipText\",\"\",\"labelAlign\",\"left\",\"formDataKey\",\"{{ self.id }}\",\"value\",\"{{ \\n (typeof codeEditor.model.runResult === 'string') ? \\n codeEditor.model.runResult :\\n JSON.stringify(codeEditor.model.runResult, null, 2) \\n}}\",\"labelCaption\",\"\",\"labelWidth\",\"33\",\"autoFill\",\"\",\"placeholder\",\"[ ]\",\"_disclosedFields\",[],\"label\",\"RegEx Matches\",\"_validate\",false,\"labelWidthUnit\",\"%\",\"invalid\",false,\"minLength\",null,\"inputTooltip\",\"\",\"events\",[\"^3\",[]],\"autoCapitalize\",\"none\",\"maxLines\",null,\"loading\",false,\"disabled\",false,\"labelPosition\",\"top\",\"labelWrap\",false,\"maintainSpaceWhenHidden\",false,\"required\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",7.000000000000001,\"col\",6,\"^F\",1,\"^G\",6,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676990186925\",\"^A\",\"~m1676997104156\",\"^B\",\"\",\"^C\",null]]],\"generatedRegEx\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"generatedRegEx\",\"^4\",\"widget\",\"^5\",\"TextInputWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"spellCheck\",false,\"readOnly\",\"true\",\"iconAfter\",\"\",\"showCharacterCount\",false,\"autoComplete\",false,\"maxLength\",null,\"hidden\",false,\"customValidation\",\"\",\"patternType\",\"\",\"hideValidationMessage\",false,\"textBefore\",\"\",\"validationMessage\",\"\",\"textAfter\",\"\",\"showInEditor\",false,\"showClear\",false,\"pattern\",\"\",\"tooltipText\",\"\",\"labelAlign\",\"left\",\"formDataKey\",\"{{ self.id }}\",\"value\",\"/\\\\{[^\\\\}]*\\\\}/g\",\"labelCaption\",\"\",\"labelWidth\",\"33\",\"autoFill\",\"\",\"placeholder\",\"Create a RegEx from a prompt above...\",\"_disclosedFields\",[],\"label\",\"Generated RegEx\",\"_validate\",false,\"labelWidthUnit\",\"%\",\"invalid\",false,\"iconBefore\",\"\",\"minLength\",null,\"inputTooltip\",\"\",\"events\",[\"^3\",[]],\"autoCapitalize\",\"none\",\"loading\",false,\"disabled\",\"true\",\"labelPosition\",\"left\",\"labelWrap\",false,\"maintainSpaceWhenHidden\",false,\"required\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",1.7999999999999996,\"col\",0,\"^F\",1,\"^G\",6,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676990756095\",\"^A\",\"~m1676994331879\",\"^B\",\"\",\"^C\",null]]],\"regexTestString\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"regexTestString\",\"^4\",\"widget\",\"^5\",\"TextInputWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"spellCheck\",false,\"readOnly\",false,\"iconAfter\",\"\",\"showCharacterCount\",false,\"autoComplete\",false,\"maxLength\",null,\"hidden\",false,\"customValidation\",\"\",\"patternType\",\"\",\"hideValidationMessage\",false,\"textBefore\",\"\",\"validationMessage\",\"\",\"textAfter\",\"\",\"showInEditor\",false,\"showClear\",false,\"pattern\",\"\",\"tooltipText\",\"\",\"labelAlign\",\"left\",\"formDataKey\",\"{{ self.id }}\",\"value\",\"{Hello} {World}!!\",\"labelCaption\",\"\",\"labelWidth\",\"33\",\"autoFill\",\"\",\"placeholder\",\"Enter a test string...\",\"_disclosedFields\",[],\"label\",\"Test String\",\"_validate\",false,\"labelWidthUnit\",\"%\",\"invalid\",false,\"iconBefore\",\"\",\"minLength\",null,\"inputTooltip\",\"\",\"events\",[\"^3\",[]],\"autoCapitalize\",\"none\",\"loading\",false,\"disabled\",false,\"labelPosition\",\"left\",\"labelWrap\",false,\"maintainSpaceWhenHidden\",false,\"required\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",2.8,\"col\",0,\"^F\",1,\"^G\",6,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676990800927\",\"^A\",\"~m1676991676533\",\"^B\",\"\",\"^C\",null]]],\"mdnHelpLink\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"mdnHelpLink\",\"^4\",\"widget\",\"^5\",\"LinkWidget\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"horizontalAlign\",\"right\",\"clickable\",false,\"iconAfter\",\"bold/interface-link-square-alternate\",\"hidden\",false,\"text\",\"RegEx Help\",\"showUnderline\",\"always\",\"showInEditor\",false,\"tooltipText\",\"\",\"allowWrap\",false,\"_disclosedFields\",[],\"iconBefore\",\"\",\"events\",[\"^I\",[[\"^3\",[\"event\",\"click\",\"type\",\"util\",\"method\",\"openUrl\",\"pluginId\",\"\",\"targetId\",null,\"params\",[\"^3\",[\"url\",\"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions\"]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"loading\",false,\"loaderPosition\",\"auto\",\"disabled\",false,\"maintainSpaceWhenHidden\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",6,\"col\",10,\"^F\",0.6,\"^G\",2,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676991215708\",\"^A\",\"~m1676991896409\",\"^B\",\"\",\"^C\",null]]],\"sidebarFrame1\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"sidebarFrame1\",\"^4\",\"frame\",\"^5\",\"SidebarFrameWidget\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"loading\",false,\"showFooter\",false,\"showHeader\",true,\"hidden\",false,\"isInEditMode\",false,\"isHiddenOnDesktop\",false,\"isHiddenOnMobile\",true,\"width\",\"small\"]],\"^:\",[\"^3\",[]],\"^;\",null,\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676991776451\",\"^A\",\"~m1676991825990\",\"^B\",\"\",\"^C\",null]]],\"promptHistoryNav\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"promptHistoryNav\",\"^4\",\"widget\",\"^5\",\"NavigationWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"_disabledByIndex\",[\"^I\",[]],\"heightType\",\"auto\",\"iconByIndex\",[],\"srcWidth\",null,\"_iconByIndex\",[\"^I\",[]],\"src\",\"\",\"overflowMode\",\"scroll\",\"_parentKeyByIndex\",[\"^I\",[]],\"_highlightByIndex\",[\"^I\",[]],\"parentKeyByIndex\",[],\"highlightByIndex\",\"false\",\"_appTargetByIndex\",[\"^I\",[\"\",\"\",\"\"]],\"appTargetByIndex\",[],\"hidden\",false,\"data\",\"{{ promptHistory.value }}\",\"srcHeight\",null,\"itemTypeByIndex\",[],\"showInEditor\",false,\"_itemTypeByIndex\",[\"^I\",[\"\",\"\",\"\"]],\"orientation\",\"vertical\",\"tooltipText\",\"\",\"hiddenByIndex\",[],\"_hiddenByIndex\",[\"^I\",[]],\"storageBlobId\",\"\",\"_captionByIndex\",[\"^I\",[]],\"_disclosedFields\",[],\"_hasMigratedNestedItems\",true,\"captionByIndex\",[],\"altText\",\"\",\"itemMode\",\"dynamic\",\"dbBlobId\",\"\",\"_tooltipByIndex\",[\"^I\",[]],\"_automaticallyHighlightedIndices\",[],\"tooltipByIndex\",[],\"events\",[\"^I\",[[\"^3\",[\"event\",\"click\",\"type\",\"script\",\"method\",\"run\",\"pluginId\",\"\",\"targetId\",null,\"params\",[\"^3\",[\"src\",\"regexPrompt.setValue(promptHistory.value[i]);\\ngenerateRegex.trigger();\\n\"]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"_ids\",[\"^I\",[]],\"iconPositionByIndex\",[],\"_iconPositionByIndex\",[\"^I\",[]],\"_keyByIndex\",[\"^I\",[]],\"disabled\",false,\"keyByIndex\",[],\"_labels\",[\"^I\",[]],\"srcType\",\"src\",\"disabledByIndex\",\"{{ generateRegex.isFetching }}\",\"horizontalAlignment\",\"left\",\"maintainSpaceWhenHidden\",false,\"labels\",\"{{ item }}\"]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"sidebarFrame1\",\"row\",0,\"col\",0,\"^F\",0.8,\"^G\",1,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676991776588\",\"^A\",\"~m1677077406966\",\"^B\",\"\",\"^C\",null]]],\"sidebarHeader\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"sidebarHeader\",\"^4\",\"widget\",\"^5\",\"TextWidget2\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"heightType\",\"auto\",\"horizontalAlign\",\"left\",\"hidden\",false,\"imageWidth\",\"fit\",\"showInEditor\",false,\"verticalAlign\",\"center\",\"tooltipText\",\"\",\"value\",\"##### Prompt History\",\"_disclosedFields\",[],\"disableMarkdown\",false,\"overflowType\",\"scroll\",\"maintainSpaceWhenHidden\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"header\",\"^E\",\"sidebarFrame1\",\"row\",0,\"col\",0,\"^F\",0.6,\"^G\",1,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676991800252\",\"^A\",\"~m1676991817124\",\"^B\",\"\",\"^C\",null]]],\"divider1\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"divider1\",\"^4\",\"widget\",\"^5\",\"DividerWidget\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"hidden\",false,\"maintainSpaceWhenHidden\",false,\"showInEditor\",false,\"_disclosedFields\",[],\"tooltipText\",\"\",\"horizontalAlign\",\"center\",\"text\",\"\",\"textSize\",\"default\"]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",0.6,\"col\",0,\"^F\",0.2,\"^G\",12,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676992244825\",\"^A\",\"~m1676992244825\",\"^B\",\"\",\"^C\",null]]],\"openAILink\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"openAILink\",\"^4\",\"widget\",\"^5\",\"LinkWidget\",\"^6\",null,\"^7\",null,\"^8\",null,\"^9\",[\"^3\",[\"horizontalAlign\",\"right\",\"clickable\",false,\"iconAfter\",\"bold/interface-link-square-alternate\",\"hidden\",false,\"text\",\"OpenAI Playground\",\"showUnderline\",\"always\",\"showInEditor\",false,\"tooltipText\",\"\",\"allowWrap\",false,\"_disclosedFields\",[],\"iconBefore\",\"\",\"events\",[\"^I\",[[\"^3\",[\"event\",\"click\",\"type\",\"util\",\"method\",\"openUrl\",\"pluginId\",\"\",\"targetId\",null,\"params\",[\"^3\",[\"url\",\"https://platform.openai.com/playground\"]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"loading\",false,\"loaderPosition\",\"auto\",\"disabled\",false,\"maintainSpaceWhenHidden\",false]],\"^:\",[\"^3\",[]],\"^;\",[\"^0\",[\"^ \",\"n\",\"position2\",\"v\",[\"^ \",\"^?\",\"\",\"^D\",\"body\",\"^E\",\"\",\"row\",0,\"col\",9,\"^F\",0.6,\"^G\",3,\"^H\",0]]],\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676992391724\",\"^A\",\"~m1676992422171\",\"^B\",\"\",\"^C\",null]]],\"generateRegex\",[\"^0\",[\"^ \",\"n\",\"pluginTemplate\",\"v\",[\"^ \",\"id\",\"generateRegex\",\"^4\",\"datasource\",\"^5\",\"RESTQuery\",\"^6\",null,\"^7\",\"7380f337-a9ab-43a8-aed2-89addd3ce4d6\",\"^8\",\"OpenAI API\",\"^9\",[\"^3\",[\"queryRefreshTime\",\"\",\"paginationLimit\",\"\",\"body\",\"[{\\\"key\\\":\\\"model\\\",\\\"value\\\":\\\"text-davinci-003\\\"},{\\\"key\\\":\\\"prompt\\\",\\\"value\\\":\\\"write me a JavaScript regular expression that {{ regexPrompt.value }}, as a literal without a variable declaration.\\\"},{\\\"key\\\":\\\"temperature\\\",\\\"value\\\":\\\"0.7\\\"},{\\\"key\\\":\\\"max_tokens\\\",\\\"value\\\":\\\"256\\\"},{\\\"key\\\":\\\"top_p\\\",\\\"value\\\":\\\"1\\\"},{\\\"key\\\":\\\"frequency_penalty\\\",\\\"value\\\":\\\"0\\\"},{\\\"key\\\":\\\"presence_penalty\\\",\\\"value\\\":\\\"0\\\"}]\",\"lastReceivedFromResourceAt\",null,\"queryDisabledMessage\",\"\",\"servedFromCache\",false,\"offlineUserQueryInputs\",\"\",\"successMessage\",\"\",\"queryDisabled\",\"\",\"playgroundQuerySaveId\",\"latest\",\"resourceNameOverride\",\"\",\"runWhenModelUpdates\",false,\"paginationPaginationField\",\"\",\"headers\",\"\",\"showFailureToaster\",true,\"paginationEnabled\",false,\"query\",\"completions\",\"playgroundQueryUuid\",\"\",\"playgroundQueryId\",null,\"error\",null,\"privateParams\",[\"^I\",[]],\"runWhenPageLoadsDelay\",\"\",\"data\",null,\"importedQueryInputs\",[\"^3\",[]],\"isImported\",false,\"showSuccessToaster\",false,\"cacheKeyTtl\",300,\"requestSentTimestamp\",null,\"cookies\",\"\",\"metadata\",null,\"queryRunTime\",null,\"changesetObject\",\"\",\"errorTransformer\",\"// The variable 'data' allows you to reference the request's data in the transformer. \\n// example: return data.find(element => element.isError)\\nreturn data.error\",\"finished\",null,\"confirmationMessage\",null,\"isFetching\",false,\"changeset\",\"\",\"rawData\",null,\"queryTriggerDelay\",\"0\",\"resourceTypeOverride\",\"\",\"watchedParams\",[\"^I\",[]],\"enableErrorTransformer\",false,\"showLatestVersionUpdatedWarning\",false,\"paginationDataField\",\"\",\"timestamp\",0,\"importedQueryDefaults\",[\"^3\",[]],\"enableTransformer\",false,\"showUpdateSetValueDynamicallyToggle\",true,\"runWhenPageLoads\",false,\"transformer\",\"// type your code here\\n// example: return formatDataAsArray(data).filter(row => row.quantity > 20)\\nreturn data\",\"events\",[\"^I\",[[\"^3\",[\"event\",\"success\",\"type\",\"script\",\"method\",\"run\",\"pluginId\",\"\",\"targetId\",null,\"params\",[\"^3\",[\"src\",\"const history = promptHistory.value;\\nif (!history.includes(regexPrompt.value)) {\\n history.unshift(regexPrompt.value);\\n promptHistory.setValue(history);\\n}\\n\\n// Update text fields\\nif (\\n generateRegex.data && \\n generateRegex.data?.choices?.length > 0\\n) {\\n const choice = generateRegex.data.choices[0];\\n generatedRegEx.setValue(choice.text);\\n \\n // Update UI + state\\n currentRegexText.setValue(choice.text);\\n currentTestString.setValue(regexTestString.value);\\n \\n codeEditor.updateModel({\\n regex: choice.text,\\n testString: regexTestString.value\\n });\\n}\"]],\"waitType\",\"debounce\",\"waitMs\",\"0\"]]]],\"queryTimeout\",\"10000\",\"requireConfirmation\",false,\"type\",\"POST\",\"queryFailureConditions\",\"\",\"changesetIsObject\",false,\"enableCaching\",true,\"allowedGroups\",[\"^I\",[]],\"bodyType\",\"json\",\"offlineQueryType\",\"None\",\"queryThrottleTime\",\"750\",\"updateSetValueDynamically\",false,\"notificationDuration\",\"\"]],\"^:\",null,\"^;\",null,\"^<\",null,\"^=\",null,\"^>\",null,\"^?\",\"\",\"^@\",\"~m1676998297782\",\"^A\",\"~m1677077037862\",\"^B\",\"\",\"^C\",null]]]]],\"^@\",null,\"version\",\"2.113.1\",\"appThemeId\",null,\"appMaxWidth\",\"1560px\",\"preloadedAppJavaScript\",null,\"preloadedAppJSLinks\",[],\"testEntities\",[],\"tests\",[],\"appStyles\",\"\",\"responsiveLayoutDisabled\",false,\"loadingIndicatorsDisabled\",false,\"urlFragmentDefinitions\",[\"^I\",[]],\"pageLoadValueOverrides\",[\"^I\",[]],\"customDocumentTitle\",\"\",\"customDocumentTitleEnabled\",false,\"customShortcuts\",[],\"isGlobalWidget\",false,\"isMobileApp\",false,\"multiScreenMobileApp\",false,\"mobileAppSettings\",[\"^ \",\"mobileOfflineModeEnabled\",false,\"mobileOfflineModeDelaySync\",false],\"folders\",[\"^I\",[\"appState\"]],\"queryStatusVisibility\",false,\"markdownLinkBehavior\",\"auto\",\"inAppRetoolPillAppearance\",\"NO_OVERRIDE\",\"rootScreen\",null,\"instrumentationEnabled\",false,\"experimentalPerfFeatures\",[\"^ \",\"serverDepGraphEnabled\",false,\"useRuntimeV2\",false,\"runtimeV2OptOut\",false],\"experimentalStabilityFeatures\",[\"^ \",\"lockModelForUpdates\",false],\"experimentalDataTabEnabled\",true]]]"},"changesRecord":[{"type":"MIGRATIONS_SUCCESS","payload":{"migratedAppTemplate":{"tests":[],"folders":["appState"],"plugins":{"$main":{"id":"$main","type":"frame","style":{},"folder":"","screen":null,"subtype":"Frame","tabIndex":null,"template":{"type":"main","style":{"canvas":"#f5f5f5"},"sticky":false,"isHiddenOnMobile":false,"isHiddenOnDesktop":false},"container":"","createdAt":"2023-02-16T01:47:55.620Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T14:34:46.271Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"divider1":{"id":"divider1","type":"widget","style":{},"folder":"","screen":null,"subtype":"DividerWidget","tabIndex":null,"template":{"text":"","hidden":false,"textSize":"default","tooltipText":"","showInEditor":false,"horizontalAlign":"center","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T15:10:44.825Z","namespace":null,"position2":{"col":0,"row":0.6,"width":12,"height":0.2,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:10:44.825Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"runButton":{"id":"runButton","type":"widget","style":{},"folder":"","screen":null,"subtype":"ButtonWidget2","tabIndex":null,"template":{"text":"Run","style":{"background":"success"},"events":[{"type":"script","event":"click","method":"run","params":{"src":"lastRunIndex.setValue(\n lastRunIndex.value + 1\n);"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"submit":false,"loading":false,"disabled":false,"clickable":false,"iconAfter":"","iconBefore":"bold/entertainment-control-button-play","tooltipText":"","showInEditor":false,"styleVariant":"solid","loaderPosition":"auto","submitTargetId":null,"horizontalAlign":"stretch","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-16T02:08:24.606Z","namespace":null,"position2":{"col":6,"row":6.000000000000001,"width":2,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T16:02:15.954Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"codeEditor":{"id":"codeEditor","type":"widget","style":{},"folder":"","screen":null,"subtype":"CustomComponentWidget","tabIndex":null,"template":{"model":"{\n \"regex\": \"{{ currentRegexText.value }}\",\n \"testString\": \"{{ currentTestString.value }}\",\n \"lastRunIndex\": {{ lastRunIndex.value }},\n \"runResult\": [],\n \"resetIndex\": {{ resetIndex.value }}\n}","allowForms":false,"heightType":"fixed","iframeCode":"<script \n src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/codemirror.min.js\" \n integrity=\"sha512-rdFIN28+neM8H8zNsjRClhJb1fIYby2YCNmoqwnqBDEvZgpcp7MJiX8Wd+Oi6KcJOMOuvGztjrsI59rly9BsVQ==\" \n crossorigin=\"anonymous\" \n referrerpolicy=\"no-referrer\">\n</script>\n<script \n src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/mode/javascript/javascript.min.js\" \n integrity=\"sha512-Cbz+kvn+l5pi5HfXsEB/FYgZVKjGIhOgYNBwj4W2IHP2y8r3AdyDCQRnEUqIQ+6aJjygKPTyaNT2eIihaykJlw==\" \n crossorigin=\"anonymous\" \n referrerpolicy=\"no-referrer\">\n</script>\n\n<style>\n @import url('https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/codemirror.min.css');\n @import url('https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/theme/eclipse.min.css');\n\n html, body {\n height: 100%;\n width: 100%;\n overflow: hidden;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n }\n\n html {\n border: 1px solid #d1d1d1;\n border-radius: 4px;\n }\n\n body {\n padding: 0 4px;\n }\n\n .CodeMirror {\n height: auto;\n }\n</style>\n\n<script>\n// Prefix any variables in the window scope with \"r_\" since we know we'll be\n// evaluating developer code and want to try as best we can to avoid collision\nlet r_codeEditor = null;\nlet r_lastTest = '';\nlet r_lastRegex = '';\nlet r_runIndex = 0;\nlet r_resetIndex = 0;\n\n// Send an object to be JSON printed in the Retool app\nfunction print(obj) {\n if (!window.Retool || !window.Retool.modelUpdate) return;\n\n window.Retool.modelUpdate({\n runResult: obj\n });\n}\n\n// Init a CodeMirror editor (with timeouts to ensure scripts are loaded first)\nfunction r_createEditor() {\n if (!CodeMirror) {\n setTimeout(createEditor, 50);\n } else {\n // Initialize code editor\n r_codeEditor = CodeMirror(document.body, {\n value: '// Initializing...',\n mode: 'javascript',\n tabSize: 2,\n lineNumbers: true\n });\n }\n}\n\n// Set the contents of the CodeMirror editor (with timeouts to ensure the\n// editor has been created first)\nfunction r_setCode(code) {\n if (!r_codeEditor) {\n // If code editor is not initialized, wait and retry\n setTimeout(() => {\n r_setCode(code);\n }, 60);\n } else {\n r_codeEditor.setValue(code);\n }\n}\n\n// Evaluate the current content of the code editor and return the result\nfunction r_runCode() {\n if (!r_codeEditor) return;\n\n const code = r_codeEditor.getValue();\n if (!code) return;\n\n // If we have a code string, try and eval it - YOLO!\n try {\n eval(code);\n } catch(e) {\n // Print the error from the eval attempt to help debug\n console.error('Error running test code in editor:');\n console.error(e);\n print('Error running code snippet: \\n' + e.message);\n } finally {\n r_runIndex++;\n }\n}\n\nfunction initCodeFromModel(model) {\n\n}\n\n// Subscribe for updates from the Retool host page\nwindow.Retool.subscribe(function(model) {\n function initCode() {\n r_lastTest = model.testString;\n r_lastRegex = model.regex;\n\n const code = `const regex = ${r_lastRegex.trimStart()};\nconst t = ${JSON.stringify(r_lastTest)};\nconst matches = t.match(regex);\n\n// \"print\" is a special function that will \n// log the results of your regex matches \n// to the text field below.\nprint(matches);\n`;\n\n // Update the code in the code editor when initialized\n r_setCode(code);\n }\n\n // If the model hasn't been initialized yet, ignore\n if (!model) return;\n\n // Check for a requested test run - if the index is greater than zero and is \n // greater than the last code run, eval the contents of the editor\n if (model.lastRunIndex > r_runIndex) {\n r_runCode();\n }\n\n // If the code and test string haven't changed, don't do anything else\n if (\n model.regex === r_lastRegex &&\n model.testString === r_lastTest\n ) {\n if (model.resetIndex > r_resetIndex) {\n // In this case, we have a reset request and should update code from \n // the retool model\n r_resetIndex++;\n initCode();\n }\n } else {\n initCode();\n }\n});\n\n// Run initial load for the code editor\nr_createEditor();\n</script>","allowCamera":false,"allowModals":false,"allowPopups":false,"allowPayment":false,"allowDownloads":false,"allowFullscreen":false,"allowMicrophone":false,"allowSameOrigin":false,"allowGeolocation":false,"allowTopNavigation":false,"allowPopupsToEscapeSandbox":false},"container":"","createdAt":"2023-02-16T01:47:55.585Z","namespace":null,"position2":{"col":6,"row":1.800000000000002,"width":6,"height":4.199999999999999,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-22T14:55:41.415Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"headerText":{"id":"headerText","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextWidget2","tabIndex":null,"template":{"value":"## 🤖 AI RegEx Developer","hidden":false,"heightType":"auto","imageWidth":"fit","tooltipText":"","overflowType":"scroll","showInEditor":false,"verticalAlign":"center","disableMarkdown":false,"horizontalAlign":"left","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-16T02:03:02.256Z","namespace":null,"position2":{"col":0,"row":0,"width":9,"height":0.6,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-18T02:21:13.959Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"openAILink":{"id":"openAILink","type":"widget","style":{},"folder":"","screen":null,"subtype":"LinkWidget","tabIndex":null,"template":{"text":"OpenAI Playground","events":[{"type":"util","event":"click","method":"openUrl","params":{"url":"https://platform.openai.com/playground"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"loading":false,"disabled":false,"allowWrap":false,"clickable":false,"iconAfter":"bold/interface-link-square-alternate","iconBefore":"","tooltipText":"","showInEditor":false,"showUnderline":"always","loaderPosition":"auto","horizontalAlign":"right","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T15:13:11.724Z","namespace":null,"position2":{"col":9,"row":0,"width":3,"height":0.6,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:13:42.171Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"resetIndex":{"id":"resetIndex","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"0","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T16:37:35.281Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T16:37:47.159Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"mdnHelpLink":{"id":"mdnHelpLink","type":"widget","style":{},"folder":"","screen":null,"subtype":"LinkWidget","tabIndex":null,"template":{"text":"RegEx Help","events":[{"type":"util","event":"click","method":"openUrl","params":{"url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"loading":false,"disabled":false,"allowWrap":false,"clickable":false,"iconAfter":"bold/interface-link-square-alternate","iconBefore":"","tooltipText":"","showInEditor":false,"showUnderline":"always","loaderPosition":"auto","horizontalAlign":"right","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T14:53:35.708Z","namespace":null,"position2":{"col":10,"row":6,"width":2,"height":0.6,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:04:56.409Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"regexPrompt":{"id":"regexPrompt","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextAreaWidget","tabIndex":null,"template":{"label":"Write me a JavaScript regular expression that...","value":"captures all text between \"{\" and \"}\" characters in an entire string globally","events":{},"hidden":false,"invalid":false,"loading":false,"pattern":"","autoFill":"","disabled":false,"maxLines":null,"minLines":"4","readOnly":false,"required":false,"_validate":false,"labelWrap":false,"maxLength":null,"minLength":null,"autoResize":true,"labelAlign":"left","labelWidth":"33","spellCheck":false,"formDataKey":"{{ self.id }}","placeholder":"Enter a prompt - e.g. \"captures all text between \"{\" and \"}\" characters in an entire string globally\"","tooltipText":"","autoComplete":false,"inputTooltip":"","labelCaption":"","showInEditor":false,"labelPosition":"top","autoCapitalize":"none","labelWidthUnit":"%","_disclosedFields":[],"customValidation":"","validationMessage":"","showCharacterCount":false,"hideValidationMessage":false,"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-18T06:44:17.788Z","namespace":null,"position2":{"col":0,"row":0.8,"width":6,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-22T14:52:35.115Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"resetButton":{"id":"resetButton","type":"widget","style":{},"folder":"","screen":null,"subtype":"ButtonWidget2","tabIndex":null,"template":{"text":"Reset","style":{"background":"highlight"},"events":[{"type":"script","event":"click","method":"run","params":{"src":"resetIndex.setValue(\n resetIndex.value + 1\n);"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"submit":false,"loading":false,"disabled":false,"clickable":false,"iconAfter":"","iconBefore":"bold/interface-arrows-reload-2-alternate","tooltipText":"","showInEditor":false,"styleVariant":"solid","loaderPosition":"auto","submitTargetId":null,"horizontalAlign":"stretch","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-18T06:36:47.552Z","namespace":null,"position2":{"col":8,"row":5.999999999999999,"width":2,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T16:38:43.856Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"lastRunIndex":{"id":"lastRunIndex","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"0","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T15:59:57.232Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T16:00:07.923Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"generateRegex":{"id":"generateRegex","type":"datasource","style":null,"folder":"","screen":null,"subtype":"RESTQuery","tabIndex":null,"template":{"body":"[{\"key\":\"model\",\"value\":\"text-davinci-003\"},{\"key\":\"prompt\",\"value\":\"write me a JavaScript regular expression that {{ regexPrompt.value }}, as a literal without a variable declaration.\"},{\"key\":\"temperature\",\"value\":\"0.7\"},{\"key\":\"max_tokens\",\"value\":\"256\"},{\"key\":\"top_p\",\"value\":\"1\"},{\"key\":\"frequency_penalty\",\"value\":\"0\"},{\"key\":\"presence_penalty\",\"value\":\"0\"}]","data":null,"type":"POST","error":null,"query":"completions","events":[{"type":"script","event":"success","method":"run","params":{"src":"const history = promptHistory.value;\nif (!history.includes(regexPrompt.value)) {\n history.unshift(regexPrompt.value);\n promptHistory.setValue(history);\n}\n\n// Update text fields\nif (\n generateRegex.data && \n generateRegex.data?.choices?.length > 0\n) {\n const choice = generateRegex.data.choices[0];\n generatedRegEx.setValue(choice.text);\n \n // Update UI + state\n currentRegexText.setValue(choice.text);\n currentTestString.setValue(regexTestString.value);\n \n codeEditor.updateModel({\n regex: choice.text,\n testString: regexTestString.value\n });\n}"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"cookies":"","headers":"","rawData":null,"bodyType":"json","finished":null,"metadata":null,"changeset":"","timestamp":0,"isFetching":false,"isImported":false,"cacheKeyTtl":300,"transformer":"// type your code here\n// example: return formatDataAsArray(data).filter(row => row.quantity > 20)\nreturn data","queryRunTime":null,"queryTimeout":"10000","allowedGroups":[],"enableCaching":true,"privateParams":[],"queryDisabled":"","watchedParams":[],"successMessage":"","changesetObject":"","paginationLimit":"","servedFromCache":false,"errorTransformer":"// The variable 'data' allows you to reference the request's data in the transformer. \n// example: return data.find(element => element.isError)\nreturn data.error","offlineQueryType":"None","queryRefreshTime":"","runWhenPageLoads":false,"changesetIsObject":false,"enableTransformer":false,"paginationEnabled":false,"playgroundQueryId":null,"queryThrottleTime":"750","queryTriggerDelay":"0","showFailureToaster":true,"showSuccessToaster":false,"confirmationMessage":null,"importedQueryInputs":{},"paginationDataField":"","playgroundQueryUuid":"","requireConfirmation":false,"runWhenModelUpdates":false,"notificationDuration":"","queryDisabledMessage":"","requestSentTimestamp":null,"resourceNameOverride":"","resourceTypeOverride":"","importedQueryDefaults":{},"playgroundQuerySaveId":"latest","runWhenPageLoadsDelay":"","enableErrorTransformer":false,"offlineUserQueryInputs":"","queryFailureConditions":"","paginationPaginationField":"","updateSetValueDynamically":false,"lastReceivedFromResourceAt":null,"showLatestVersionUpdatedWarning":false,"showUpdateSetValueDynamicallyToggle":true},"container":"","createdAt":"2023-02-21T16:51:37.782Z","namespace":null,"position2":null,"updatedAt":"2023-02-22T14:43:57.862Z","resourceName":"7380f337-a9ab-43a8-aed2-89addd3ce4d6","mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"promptHistory":{"id":"promptHistory","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"[]","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T15:14:27.499Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T15:14:36.513Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"sidebarFrame1":{"id":"sidebarFrame1","type":"frame","style":{},"folder":"","screen":null,"subtype":"SidebarFrameWidget","tabIndex":null,"template":{"width":"small","hidden":false,"loading":false,"showFooter":false,"showHeader":true,"isInEditMode":false,"isHiddenOnMobile":true,"isHiddenOnDesktop":false},"container":"","createdAt":"2023-02-21T15:02:56.451Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T15:03:45.990Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"sidebarHeader":{"id":"sidebarHeader","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextWidget2","tabIndex":null,"template":{"value":"##### Prompt History","hidden":false,"heightType":"auto","imageWidth":"fit","tooltipText":"","overflowType":"scroll","showInEditor":false,"verticalAlign":"center","disableMarkdown":false,"horizontalAlign":"left","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T15:03:20.252Z","namespace":null,"position2":{"col":0,"row":0,"width":1,"height":0.6,"tabNum":0,"rowGroup":"header","container":"","subcontainer":"sidebarFrame1"},"updatedAt":"2023-02-21T15:03:37.124Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"generatedRegEx":{"id":"generatedRegEx","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextInputWidget2","tabIndex":null,"template":{"label":"Generated RegEx","value":"/\\{[^\\}]*\\}/g","events":{},"hidden":false,"invalid":false,"loading":false,"pattern":"","autoFill":"","disabled":"true","readOnly":"true","required":false,"_validate":false,"iconAfter":"","labelWrap":false,"maxLength":null,"minLength":null,"showClear":false,"textAfter":"","iconBefore":"","labelAlign":"left","labelWidth":"33","spellCheck":false,"textBefore":"","formDataKey":"{{ self.id }}","patternType":"","placeholder":"Create a RegEx from a prompt above...","tooltipText":"","autoComplete":false,"inputTooltip":"","labelCaption":"","showInEditor":false,"labelPosition":"left","autoCapitalize":"none","labelWidthUnit":"%","_disclosedFields":[],"customValidation":"","validationMessage":"","showCharacterCount":false,"hideValidationMessage":false,"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T14:45:56.095Z","namespace":null,"position2":{"col":0,"row":1.7999999999999996,"width":6,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:45:31.879Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"regexTestString":{"id":"regexTestString","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextInputWidget2","tabIndex":null,"template":{"label":"Test String","value":"{Hello} {World}!!","events":{},"hidden":false,"invalid":false,"loading":false,"pattern":"","autoFill":"","disabled":false,"readOnly":false,"required":false,"_validate":false,"iconAfter":"","labelWrap":false,"maxLength":null,"minLength":null,"showClear":false,"textAfter":"","iconBefore":"","labelAlign":"left","labelWidth":"33","spellCheck":false,"textBefore":"","formDataKey":"{{ self.id }}","patternType":"","placeholder":"Enter a test string...","tooltipText":"","autoComplete":false,"inputTooltip":"","labelCaption":"","showInEditor":false,"labelPosition":"left","autoCapitalize":"none","labelWidthUnit":"%","_disclosedFields":[],"customValidation":"","validationMessage":"","showCharacterCount":false,"hideValidationMessage":false,"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T14:46:40.927Z","namespace":null,"position2":{"col":0,"row":2.8,"width":6,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:01:16.533Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"currentRegexText":{"id":"currentRegexText","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"/\\{[^\\}]*\\}/g","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T15:46:46.355Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T15:50:01.498Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"promptHistoryNav":{"id":"promptHistoryNav","type":"widget","style":{},"folder":"","screen":null,"subtype":"NavigationWidget2","tabIndex":null,"template":{"src":"","_ids":[],"data":"{{ promptHistory.value }}","events":[{"type":"script","event":"click","method":"run","params":{"src":"regexPrompt.setValue(promptHistory.value[i]);\ngenerateRegex.trigger();\n"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"labels":"{{ item }}","_labels":[],"altText":"","srcType":"src","dbBlobId":"","disabled":false,"itemMode":"dynamic","srcWidth":null,"srcHeight":null,"heightType":"auto","keyByIndex":[],"_keyByIndex":[],"iconByIndex":[],"orientation":"vertical","tooltipText":"","_iconByIndex":[],"overflowMode":"scroll","showInEditor":false,"hiddenByIndex":[],"storageBlobId":"","_hiddenByIndex":[],"captionByIndex":[],"tooltipByIndex":[],"_captionByIndex":[],"_tooltipByIndex":[],"disabledByIndex":"{{ generateRegex.isFetching }}","itemTypeByIndex":[],"_disabledByIndex":[],"_disclosedFields":[],"_itemTypeByIndex":["","",""],"appTargetByIndex":[],"highlightByIndex":"false","parentKeyByIndex":[],"_appTargetByIndex":["","",""],"_highlightByIndex":[],"_parentKeyByIndex":[],"horizontalAlignment":"left","iconPositionByIndex":[],"_iconPositionByIndex":[],"_hasMigratedNestedItems":true,"maintainSpaceWhenHidden":false,"_automaticallyHighlightedIndices":[]},"container":"","createdAt":"2023-02-21T15:02:56.588Z","namespace":null,"position2":{"col":0,"row":0,"width":1,"height":0.8,"tabNum":0,"rowGroup":"body","container":"","subcontainer":"sidebarFrame1"},"updatedAt":"2023-02-22T14:50:06.966Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"currentTestString":{"id":"currentTestString","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"{Hello} {World}!!","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T15:47:12.526Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T15:50:12.815Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"generateRegexButton":{"id":"generateRegexButton","type":"widget","style":{},"folder":"","screen":null,"subtype":"ButtonWidget2","tabIndex":null,"template":{"text":"Generate Code","events":[{"type":"datasource","event":"click","method":"trigger","params":{},"waitMs":"50","pluginId":"generateRegex","targetId":null,"waitType":"debounce"}],"hidden":false,"submit":false,"loading":"{{ generateRegex.isFetching }}","disabled":"{{ generateRegex.isFetching }}","clickable":false,"iconAfter":"bold/interface-arrows-right-circle-2","iconBefore":"","tooltipText":"","showInEditor":false,"styleVariant":"solid","loaderPosition":"auto","submitTargetId":null,"horizontalAlign":"stretch","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-18T06:50:03.162Z","namespace":null,"position2":{"col":0,"row":3.8000000000000007,"width":2,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T17:06:06.192Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"regexMatchesDisplay":{"id":"regexMatchesDisplay","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextAreaWidget","tabIndex":null,"template":{"label":"RegEx Matches","value":"{{ \n (typeof codeEditor.model.runResult === 'string') ? \n codeEditor.model.runResult :\n JSON.stringify(codeEditor.model.runResult, null, 2) \n}}","events":{},"hidden":false,"invalid":false,"loading":false,"pattern":"","autoFill":"","disabled":false,"maxLines":null,"minLines":"1","readOnly":"true","required":false,"_validate":false,"labelWrap":false,"maxLength":null,"minLength":null,"autoResize":true,"labelAlign":"left","labelWidth":"33","spellCheck":false,"formDataKey":"{{ self.id }}","placeholder":"[ ]","tooltipText":"","autoComplete":false,"inputTooltip":"","labelCaption":"","showInEditor":false,"labelPosition":"top","autoCapitalize":"none","labelWidthUnit":"%","_disclosedFields":[],"customValidation":"","validationMessage":"","showCharacterCount":false,"hideValidationMessage":false,"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T14:36:26.925Z","namespace":null,"position2":{"col":6,"row":7.000000000000001,"width":6,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T16:31:44.156Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null}},"version":"2.113.1","appStyles":"","createdAt":null,"appThemeId":null,"isFetching":false,"rootScreen":null,"appMaxWidth":"1560px","isMobileApp":false,"testEntities":[],"isGlobalWidget":false,"customShortcuts":[],"mobileAppSettings":{"mobileOfflineModeEnabled":false,"mobileOfflineModeDelaySync":false},"customDocumentTitle":"","preloadedAppJSLinks":[],"markdownLinkBehavior":"auto","multiScreenMobileApp":false,"queryStatusVisibility":false,"instrumentationEnabled":false,"pageLoadValueOverrides":[],"preloadedAppJavaScript":null,"urlFragmentDefinitions":[],"experimentalPerfFeatures":{"useRuntimeV2":false,"runtimeV2OptOut":false,"serverDepGraphEnabled":false},"responsiveLayoutDisabled":false,"inAppRetoolPillAppearance":"NO_OVERRIDE","loadingIndicatorsDisabled":false,"customDocumentTitleEnabled":false,"experimentalDataTabEnabled":true,"experimentalStabilityFeatures":{"lockModelForUpdates":false}}}},{"type":"MIGRATIONS_SUCCESS","payload":{"migratedAppTemplate":{"tests":[],"folders":["appState"],"plugins":{"$main":{"id":"$main","type":"frame","style":{},"folder":"","screen":null,"subtype":"Frame","tabIndex":null,"template":{"type":"main","style":{"canvas":"#f5f5f5"},"sticky":false,"isHiddenOnMobile":false,"isHiddenOnDesktop":false},"container":"","createdAt":"2023-02-16T01:47:55.620Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T14:34:46.271Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"divider1":{"id":"divider1","type":"widget","style":{},"folder":"","screen":null,"subtype":"DividerWidget","tabIndex":null,"template":{"text":"","hidden":false,"textSize":"default","tooltipText":"","showInEditor":false,"horizontalAlign":"center","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T15:10:44.825Z","namespace":null,"position2":{"col":0,"row":0.6,"width":12,"height":0.2,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:10:44.825Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"runButton":{"id":"runButton","type":"widget","style":{},"folder":"","screen":null,"subtype":"ButtonWidget2","tabIndex":null,"template":{"text":"Run","style":{"background":"success"},"events":[{"type":"script","event":"click","method":"run","params":{"src":"lastRunIndex.setValue(\n lastRunIndex.value + 1\n);"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"submit":false,"loading":false,"disabled":false,"clickable":false,"iconAfter":"","iconBefore":"bold/entertainment-control-button-play","tooltipText":"","showInEditor":false,"styleVariant":"solid","loaderPosition":"auto","submitTargetId":null,"horizontalAlign":"stretch","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-16T02:08:24.606Z","namespace":null,"position2":{"col":6,"row":6.000000000000001,"width":2,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T16:02:15.954Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"codeEditor":{"id":"codeEditor","type":"widget","style":{},"folder":"","screen":null,"subtype":"CustomComponentWidget","tabIndex":null,"template":{"model":"{\n \"regex\": \"{{ currentRegexText.value }}\",\n \"testString\": \"{{ currentTestString.value }}\",\n \"lastRunIndex\": {{ lastRunIndex.value }},\n \"runResult\": [],\n \"resetIndex\": {{ resetIndex.value }}\n}","allowForms":false,"heightType":"fixed","iframeCode":"<script \n src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/codemirror.min.js\" \n integrity=\"sha512-rdFIN28+neM8H8zNsjRClhJb1fIYby2YCNmoqwnqBDEvZgpcp7MJiX8Wd+Oi6KcJOMOuvGztjrsI59rly9BsVQ==\" \n crossorigin=\"anonymous\" \n referrerpolicy=\"no-referrer\">\n</script>\n<script \n src=\"https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/mode/javascript/javascript.min.js\" \n integrity=\"sha512-Cbz+kvn+l5pi5HfXsEB/FYgZVKjGIhOgYNBwj4W2IHP2y8r3AdyDCQRnEUqIQ+6aJjygKPTyaNT2eIihaykJlw==\" \n crossorigin=\"anonymous\" \n referrerpolicy=\"no-referrer\">\n</script>\n\n<style>\n @import url('https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/codemirror.min.css');\n @import url('https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.11/theme/eclipse.min.css');\n\n html, body {\n height: 100%;\n width: 100%;\n overflow: hidden;\n padding: 0;\n margin: 0;\n box-sizing: border-box;\n }\n\n html {\n border: 1px solid #d1d1d1;\n border-radius: 4px;\n }\n\n body {\n padding: 0 4px;\n }\n\n .CodeMirror {\n height: auto;\n }\n</style>\n\n<script>\n// Prefix any variables in the window scope with \"r_\" since we know we'll be\n// evaluating developer code and want to try as best we can to avoid collision\nlet r_codeEditor = null;\nlet r_lastTest = '';\nlet r_lastRegex = '';\nlet r_runIndex = 0;\nlet r_resetIndex = 0;\n\n// Send an object to be JSON printed in the Retool app\nfunction print(obj) {\n if (!window.Retool || !window.Retool.modelUpdate) return;\n\n window.Retool.modelUpdate({\n runResult: obj\n });\n}\n\n// Init a CodeMirror editor (with timeouts to ensure scripts are loaded first)\nfunction r_createEditor() {\n if (!CodeMirror) {\n setTimeout(createEditor, 50);\n } else {\n // Initialize code editor\n r_codeEditor = CodeMirror(document.body, {\n value: '// Initializing...',\n mode: 'javascript',\n tabSize: 2,\n lineNumbers: true\n });\n }\n}\n\n// Set the contents of the CodeMirror editor (with timeouts to ensure the\n// editor has been created first)\nfunction r_setCode(code) {\n if (!r_codeEditor) {\n // If code editor is not initialized, wait and retry\n setTimeout(() => {\n r_setCode(code);\n }, 60);\n } else {\n r_codeEditor.setValue(code);\n }\n}\n\n// Evaluate the current content of the code editor and return the result\nfunction r_runCode() {\n if (!r_codeEditor) return;\n\n const code = r_codeEditor.getValue();\n if (!code) return;\n\n // If we have a code string, try and eval it - YOLO!\n try {\n eval(code);\n } catch(e) {\n // Print the error from the eval attempt to help debug\n console.error('Error running test code in editor:');\n console.error(e);\n print('Error running code snippet: \\n' + e.message);\n } finally {\n r_runIndex++;\n }\n}\n\nfunction initCodeFromModel(model) {\n\n}\n\n// Subscribe for updates from the Retool host page\nwindow.Retool.subscribe(function(model) {\n function initCode() {\n r_lastTest = model.testString;\n r_lastRegex = model.regex;\n\n const code = `const regex = ${r_lastRegex.trimStart()};\nconst t = ${JSON.stringify(r_lastTest)};\nconst matches = t.match(regex);\n\n// \"print\" is a special function that will \n// log the results of your regex matches \n// to the text field below.\nprint(matches);\n`;\n\n // Update the code in the code editor when initialized\n r_setCode(code);\n }\n\n // If the model hasn't been initialized yet, ignore\n if (!model) return;\n\n // Check for a requested test run - if the index is greater than zero and is \n // greater than the last code run, eval the contents of the editor\n if (model.lastRunIndex > r_runIndex) {\n r_runCode();\n }\n\n // If the code and test string haven't changed, don't do anything else\n if (\n model.regex === r_lastRegex &&\n model.testString === r_lastTest\n ) {\n if (model.resetIndex > r_resetIndex) {\n // In this case, we have a reset request and should update code from \n // the retool model\n r_resetIndex++;\n initCode();\n }\n } else {\n initCode();\n }\n});\n\n// Run initial load for the code editor\nr_createEditor();\n</script>","allowCamera":false,"allowModals":false,"allowPopups":false,"allowPayment":false,"allowDownloads":false,"allowFullscreen":false,"allowMicrophone":false,"allowSameOrigin":false,"allowGeolocation":false,"allowTopNavigation":false,"allowPopupsToEscapeSandbox":false},"container":"","createdAt":"2023-02-16T01:47:55.585Z","namespace":null,"position2":{"col":6,"row":1.800000000000002,"width":6,"height":4.199999999999999,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-22T14:55:41.415Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"headerText":{"id":"headerText","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextWidget2","tabIndex":null,"template":{"value":"## 🤖 AI RegEx Developer","hidden":false,"heightType":"auto","imageWidth":"fit","tooltipText":"","overflowType":"scroll","showInEditor":false,"verticalAlign":"center","disableMarkdown":false,"horizontalAlign":"left","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-16T02:03:02.256Z","namespace":null,"position2":{"col":0,"row":0,"width":9,"height":0.6,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-18T02:21:13.959Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"openAILink":{"id":"openAILink","type":"widget","style":{},"folder":"","screen":null,"subtype":"LinkWidget","tabIndex":null,"template":{"text":"OpenAI Playground","events":[{"type":"util","event":"click","method":"openUrl","params":{"url":"https://platform.openai.com/playground"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"loading":false,"disabled":false,"allowWrap":false,"clickable":false,"iconAfter":"bold/interface-link-square-alternate","iconBefore":"","tooltipText":"","showInEditor":false,"showUnderline":"always","loaderPosition":"auto","horizontalAlign":"right","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T15:13:11.724Z","namespace":null,"position2":{"col":9,"row":0,"width":3,"height":0.6,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:13:42.171Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"resetIndex":{"id":"resetIndex","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"0","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T16:37:35.281Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T16:37:47.159Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"mdnHelpLink":{"id":"mdnHelpLink","type":"widget","style":{},"folder":"","screen":null,"subtype":"LinkWidget","tabIndex":null,"template":{"text":"RegEx Help","events":[{"type":"util","event":"click","method":"openUrl","params":{"url":"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"loading":false,"disabled":false,"allowWrap":false,"clickable":false,"iconAfter":"bold/interface-link-square-alternate","iconBefore":"","tooltipText":"","showInEditor":false,"showUnderline":"always","loaderPosition":"auto","horizontalAlign":"right","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T14:53:35.708Z","namespace":null,"position2":{"col":10,"row":6,"width":2,"height":0.6,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:04:56.409Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"regexPrompt":{"id":"regexPrompt","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextAreaWidget","tabIndex":null,"template":{"label":"Write me a JavaScript regular expression that...","value":"captures all text between \"{\" and \"}\" characters in an entire string globally","events":{},"hidden":false,"invalid":false,"loading":false,"pattern":"","autoFill":"","disabled":false,"maxLines":null,"minLines":"4","readOnly":false,"required":false,"_validate":false,"labelWrap":false,"maxLength":null,"minLength":null,"autoResize":true,"labelAlign":"left","labelWidth":"33","spellCheck":false,"formDataKey":"{{ self.id }}","placeholder":"Enter a prompt - e.g. \"captures all text between \"{\" and \"}\" characters in an entire string globally\"","tooltipText":"","autoComplete":false,"inputTooltip":"","labelCaption":"","showInEditor":false,"labelPosition":"top","autoCapitalize":"none","labelWidthUnit":"%","_disclosedFields":[],"customValidation":"","validationMessage":"","showCharacterCount":false,"hideValidationMessage":false,"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-18T06:44:17.788Z","namespace":null,"position2":{"col":0,"row":0.8,"width":6,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-22T14:52:35.115Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"resetButton":{"id":"resetButton","type":"widget","style":{},"folder":"","screen":null,"subtype":"ButtonWidget2","tabIndex":null,"template":{"text":"Reset","style":{"background":"highlight"},"events":[{"type":"script","event":"click","method":"run","params":{"src":"resetIndex.setValue(\n resetIndex.value + 1\n);"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"submit":false,"loading":false,"disabled":false,"clickable":false,"iconAfter":"","iconBefore":"bold/interface-arrows-reload-2-alternate","tooltipText":"","showInEditor":false,"styleVariant":"solid","loaderPosition":"auto","submitTargetId":null,"horizontalAlign":"stretch","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-18T06:36:47.552Z","namespace":null,"position2":{"col":8,"row":5.999999999999999,"width":2,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T16:38:43.856Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"lastRunIndex":{"id":"lastRunIndex","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"0","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T15:59:57.232Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T16:00:07.923Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"generateRegex":{"id":"generateRegex","type":"datasource","style":null,"folder":"","screen":null,"subtype":"RESTQuery","tabIndex":null,"template":{"body":"[{\"key\":\"model\",\"value\":\"text-davinci-003\"},{\"key\":\"prompt\",\"value\":\"write me a JavaScript regular expression that {{ regexPrompt.value }}, as a literal without a variable declaration.\"},{\"key\":\"temperature\",\"value\":\"0.7\"},{\"key\":\"max_tokens\",\"value\":\"256\"},{\"key\":\"top_p\",\"value\":\"1\"},{\"key\":\"frequency_penalty\",\"value\":\"0\"},{\"key\":\"presence_penalty\",\"value\":\"0\"}]","data":null,"type":"POST","error":null,"query":"completions","events":[{"type":"script","event":"success","method":"run","params":{"src":"const history = promptHistory.value;\nif (!history.includes(regexPrompt.value)) {\n history.unshift(regexPrompt.value);\n promptHistory.setValue(history);\n}\n\n// Update text fields\nif (\n generateRegex.data && \n generateRegex.data?.choices?.length > 0\n) {\n const choice = generateRegex.data.choices[0];\n generatedRegEx.setValue(choice.text);\n \n // Update UI + state\n currentRegexText.setValue(choice.text);\n currentTestString.setValue(regexTestString.value);\n \n codeEditor.updateModel({\n regex: choice.text,\n testString: regexTestString.value\n });\n}"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"cookies":"","headers":"","rawData":null,"bodyType":"json","finished":null,"metadata":null,"changeset":"","timestamp":0,"isFetching":false,"isImported":false,"cacheKeyTtl":300,"transformer":"// type your code here\n// example: return formatDataAsArray(data).filter(row => row.quantity > 20)\nreturn data","queryRunTime":null,"queryTimeout":"10000","allowedGroups":[],"enableCaching":true,"privateParams":[],"queryDisabled":"","watchedParams":[],"successMessage":"","changesetObject":"","paginationLimit":"","servedFromCache":false,"errorTransformer":"// The variable 'data' allows you to reference the request's data in the transformer. \n// example: return data.find(element => element.isError)\nreturn data.error","offlineQueryType":"None","queryRefreshTime":"","runWhenPageLoads":false,"changesetIsObject":false,"enableTransformer":false,"paginationEnabled":false,"playgroundQueryId":null,"queryThrottleTime":"750","queryTriggerDelay":"0","showFailureToaster":true,"showSuccessToaster":false,"confirmationMessage":null,"importedQueryInputs":{},"paginationDataField":"","playgroundQueryUuid":"","requireConfirmation":false,"runWhenModelUpdates":false,"notificationDuration":"","queryDisabledMessage":"","requestSentTimestamp":null,"resourceNameOverride":"","resourceTypeOverride":"","importedQueryDefaults":{},"playgroundQuerySaveId":"latest","runWhenPageLoadsDelay":"","enableErrorTransformer":false,"offlineUserQueryInputs":"","queryFailureConditions":"","paginationPaginationField":"","updateSetValueDynamically":false,"lastReceivedFromResourceAt":null,"showLatestVersionUpdatedWarning":false,"showUpdateSetValueDynamicallyToggle":true},"container":"","createdAt":"2023-02-21T16:51:37.782Z","namespace":null,"position2":null,"updatedAt":"2023-02-22T14:43:57.862Z","resourceName":"7380f337-a9ab-43a8-aed2-89addd3ce4d6","mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"promptHistory":{"id":"promptHistory","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"[]","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T15:14:27.499Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T15:14:36.513Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"sidebarFrame1":{"id":"sidebarFrame1","type":"frame","style":{},"folder":"","screen":null,"subtype":"SidebarFrameWidget","tabIndex":null,"template":{"width":"small","hidden":false,"loading":false,"showFooter":false,"showHeader":true,"isInEditMode":false,"isHiddenOnMobile":true,"isHiddenOnDesktop":false},"container":"","createdAt":"2023-02-21T15:02:56.451Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T15:03:45.990Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"sidebarHeader":{"id":"sidebarHeader","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextWidget2","tabIndex":null,"template":{"value":"##### Prompt History","hidden":false,"heightType":"auto","imageWidth":"fit","tooltipText":"","overflowType":"scroll","showInEditor":false,"verticalAlign":"center","disableMarkdown":false,"horizontalAlign":"left","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T15:03:20.252Z","namespace":null,"position2":{"col":0,"row":0,"width":1,"height":0.6,"tabNum":0,"rowGroup":"header","container":"","subcontainer":"sidebarFrame1"},"updatedAt":"2023-02-21T15:03:37.124Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"generatedRegEx":{"id":"generatedRegEx","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextInputWidget2","tabIndex":null,"template":{"label":"Generated RegEx","value":"/\\{[^\\}]*\\}/g","events":{},"hidden":false,"invalid":false,"loading":false,"pattern":"","autoFill":"","disabled":"true","readOnly":"true","required":false,"_validate":false,"iconAfter":"","labelWrap":false,"maxLength":null,"minLength":null,"showClear":false,"textAfter":"","iconBefore":"","labelAlign":"left","labelWidth":"33","spellCheck":false,"textBefore":"","formDataKey":"{{ self.id }}","patternType":"","placeholder":"Create a RegEx from a prompt above...","tooltipText":"","autoComplete":false,"inputTooltip":"","labelCaption":"","showInEditor":false,"labelPosition":"left","autoCapitalize":"none","labelWidthUnit":"%","_disclosedFields":[],"customValidation":"","validationMessage":"","showCharacterCount":false,"hideValidationMessage":false,"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T14:45:56.095Z","namespace":null,"position2":{"col":0,"row":1.7999999999999996,"width":6,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:45:31.879Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"regexTestString":{"id":"regexTestString","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextInputWidget2","tabIndex":null,"template":{"label":"Test String","value":"{Hello} {World}!!","events":{},"hidden":false,"invalid":false,"loading":false,"pattern":"","autoFill":"","disabled":false,"readOnly":false,"required":false,"_validate":false,"iconAfter":"","labelWrap":false,"maxLength":null,"minLength":null,"showClear":false,"textAfter":"","iconBefore":"","labelAlign":"left","labelWidth":"33","spellCheck":false,"textBefore":"","formDataKey":"{{ self.id }}","patternType":"","placeholder":"Enter a test string...","tooltipText":"","autoComplete":false,"inputTooltip":"","labelCaption":"","showInEditor":false,"labelPosition":"left","autoCapitalize":"none","labelWidthUnit":"%","_disclosedFields":[],"customValidation":"","validationMessage":"","showCharacterCount":false,"hideValidationMessage":false,"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T14:46:40.927Z","namespace":null,"position2":{"col":0,"row":2.8,"width":6,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T15:01:16.533Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"currentRegexText":{"id":"currentRegexText","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"/\\{[^\\}]*\\}/g","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T15:46:46.355Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T15:50:01.498Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"promptHistoryNav":{"id":"promptHistoryNav","type":"widget","style":{},"folder":"","screen":null,"subtype":"NavigationWidget2","tabIndex":null,"template":{"src":"","_ids":[],"data":"{{ promptHistory.value }}","events":[{"type":"script","event":"click","method":"run","params":{"src":"regexPrompt.setValue(promptHistory.value[i]);\ngenerateRegex.trigger();\n"},"waitMs":"0","pluginId":"","targetId":null,"waitType":"debounce"}],"hidden":false,"labels":"{{ item }}","_labels":[],"altText":"","srcType":"src","dbBlobId":"","disabled":false,"itemMode":"dynamic","srcWidth":null,"srcHeight":null,"heightType":"auto","keyByIndex":[],"_keyByIndex":[],"iconByIndex":[],"orientation":"vertical","tooltipText":"","_iconByIndex":[],"overflowMode":"scroll","showInEditor":false,"hiddenByIndex":[],"storageBlobId":"","_hiddenByIndex":[],"captionByIndex":[],"tooltipByIndex":[],"_captionByIndex":[],"_tooltipByIndex":[],"disabledByIndex":"{{ generateRegex.isFetching }}","itemTypeByIndex":[],"_disabledByIndex":[],"_disclosedFields":[],"_itemTypeByIndex":["","",""],"appTargetByIndex":[],"highlightByIndex":"false","parentKeyByIndex":[],"_appTargetByIndex":["","",""],"_highlightByIndex":[],"_parentKeyByIndex":[],"horizontalAlignment":"left","iconPositionByIndex":[],"_iconPositionByIndex":[],"_hasMigratedNestedItems":true,"maintainSpaceWhenHidden":false,"_automaticallyHighlightedIndices":[]},"container":"","createdAt":"2023-02-21T15:02:56.588Z","namespace":null,"position2":{"col":0,"row":0,"width":1,"height":0.8,"tabNum":0,"rowGroup":"body","container":"","subcontainer":"sidebarFrame1"},"updatedAt":"2023-02-22T14:50:06.966Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"currentTestString":{"id":"currentTestString","type":"state","style":null,"folder":"appState","screen":null,"subtype":"State","tabIndex":null,"template":{"value":"{Hello} {World}!!","persistValue":false,"persistedValueKey":"","_persistedValueGetter":null,"_persistedValueSetter":null},"container":"","createdAt":"2023-02-21T15:47:12.526Z","namespace":null,"position2":null,"updatedAt":"2023-02-21T15:50:12.815Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"generateRegexButton":{"id":"generateRegexButton","type":"widget","style":{},"folder":"","screen":null,"subtype":"ButtonWidget2","tabIndex":null,"template":{"text":"Generate Code","events":[{"type":"datasource","event":"click","method":"trigger","params":{},"waitMs":"50","pluginId":"generateRegex","targetId":null,"waitType":"debounce"}],"hidden":false,"submit":false,"loading":"{{ generateRegex.isFetching }}","disabled":"{{ generateRegex.isFetching }}","clickable":false,"iconAfter":"bold/interface-arrows-right-circle-2","iconBefore":"","tooltipText":"","showInEditor":false,"styleVariant":"solid","loaderPosition":"auto","submitTargetId":null,"horizontalAlign":"stretch","_disclosedFields":[],"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-18T06:50:03.162Z","namespace":null,"position2":{"col":0,"row":3.8000000000000007,"width":2,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T17:06:06.192Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null},"regexMatchesDisplay":{"id":"regexMatchesDisplay","type":"widget","style":{},"folder":"","screen":null,"subtype":"TextAreaWidget","tabIndex":null,"template":{"label":"RegEx Matches","value":"{{ \n (typeof codeEditor.model.runResult === 'string') ? \n codeEditor.model.runResult :\n JSON.stringify(codeEditor.model.runResult, null, 2) \n}}","events":{},"hidden":false,"invalid":false,"loading":false,"pattern":"","autoFill":"","disabled":false,"maxLines":null,"minLines":"1","readOnly":"true","required":false,"_validate":false,"labelWrap":false,"maxLength":null,"minLength":null,"autoResize":true,"labelAlign":"left","labelWidth":"33","spellCheck":false,"formDataKey":"{{ self.id }}","placeholder":"[ ]","tooltipText":"","autoComplete":false,"inputTooltip":"","labelCaption":"","showInEditor":false,"labelPosition":"top","autoCapitalize":"none","labelWidthUnit":"%","_disclosedFields":[],"customValidation":"","validationMessage":"","showCharacterCount":false,"hideValidationMessage":false,"maintainSpaceWhenHidden":false},"container":"","createdAt":"2023-02-21T14:36:26.925Z","namespace":null,"position2":{"col":6,"row":7.000000000000001,"width":6,"height":1,"tabNum":0,"rowGroup":"body","container":"","subcontainer":""},"updatedAt":"2023-02-21T16:31:44.156Z","resourceName":null,"mobilePosition2":null,"mobileAppPosition":null,"resourceDisplayName":null}},"version":"2.113.1","appStyles":"","createdAt":null,"appThemeId":null,"isFetching":false,"rootScreen":null,"appMaxWidth":"1560px","isMobileApp":false,"testEntities":[],"isGlobalWidget":false,"customShortcuts":[],"mobileAppSettings":{"mobileOfflineModeEnabled":false,"mobileOfflineModeDelaySync":false},"customDocumentTitle":"","preloadedAppJSLinks":[],"markdownLinkBehavior":"auto","multiScreenMobileApp":false,"queryStatusVisibility":false,"instrumentationEnabled":false,"pageLoadValueOverrides":[],"preloadedAppJavaScript":null,"urlFragmentDefinitions":[],"experimentalPerfFeatures":{"useRuntimeV2":false,"runtimeV2OptOut":false,"serverDepGraphEnabled":false},"responsiveLayoutDisabled":false,"inAppRetoolPillAppearance":"NO_OVERRIDE","loadingIndicatorsDisabled":false,"customDocumentTitleEnabled":false,"experimentalDataTabEnabled":true,"experimentalStabilityFeatures":{"lockModelForUpdates":false}}}}],"gitSha":null,"checksum":null,"createdAt":"2023-03-13T16:17:50.833Z","updatedAt":"2023-03-13T16:17:50.833Z","pageId":1834160,"userId":485746,"branchId":null},"modules":{}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment