Version Description
- Fixed blank page when opening Translation Editor in some localized languages
Download this release
Release Info
Developer | madalin.ungureanu |
Plugin | TranslatePress – Translate Multilingual sites |
Version | 1.5.3 |
Comparing to | |
See all releases |
Code changes from version 1.5.2 to 1.5.3
- assets/js/trp-editor.js +1 -1
- class-translate-press.php +1 -1
- includes/class-translation-manager.php +3 -0
- index.php +1 -1
- languages/translatepress-multilingual.pot +19 -19
- partials/translation-manager.php +0 -1
- readme.txt +4 -2
assets/js/trp-editor.js
CHANGED
@@ -715,7 +715,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var he__
|
|
715 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
716 |
|
717 |
"use strict";
|
718 |
-
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! select2/dist/js/select2.min.js */ \"./node_modules/select2/dist/js/select2.min.js\");\n/* harmony import */ var select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./assets/src/js/utils.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _components_language_boxes_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/language-boxes.vue */ \"./assets/src/js/components/language-boxes.vue\");\n/* harmony import */ var _components_save_translations_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/save-translations.vue */ \"./assets/src/js/components/save-translations.vue\");\n/* harmony import */ var _components_hover_actions_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/hover-actions.vue */ \"./assets/src/js/components/hover-actions.vue\");\n/* harmony import */ var _components_extra_content_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/extra-content.vue */ \"./assets/src/js/components/extra-content.vue\");\n/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! he */ \"./node_modules/he/he.js\");\n/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(he__WEBPACK_IMPORTED_MODULE_7__);\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: ['trp_settings', 'language_names', 'ordered_secondary_languages', 'current_language', 'on_screen_language', 'view_as_roles', 'url_to_load', 'string_selectors', 'data_attributes', 'ajax_url', 'editor_nonces', 'string_group_order', 'merge_rules', 'localized_text', 'paid_version', 'flags_path'],\n components: {\n languageBoxes: _components_language_boxes_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n saveTranslations: _components_save_translations_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n hoverActions: _components_hover_actions_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n extraContent: _components_extra_content_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n },\n data: function data() {\n return {\n //props\n settings: JSON.parse(this.trp_settings),\n languageNames: JSON.parse(this.language_names),\n orderedSecondaryLanguages: JSON.parse(this.ordered_secondary_languages),\n roles: JSON.parse(this.view_as_roles),\n nonces: JSON.parse(this.editor_nonces),\n stringGroupOrder: JSON.parse(this.string_group_order),\n selectors: JSON.parse(this.string_selectors),\n dataAttributes: JSON.parse(this.data_attributes),\n mergeRules: JSON.parse(this.merge_rules),\n editorStrings: JSON.parse(this.localized_text),\n flagsPath: JSON.parse(this.flags_path),\n //data\n currentLanguage: this.current_language,\n onScreenLanguage: this.on_screen_language,\n currentURL: this.url_to_load,\n urlToLoad: this.url_to_load,\n iframe: '',\n dictionary: [],\n selectedString: null,\n selectedIndexesArray: [],\n detectedSelectorAndId: [],\n stringGroups: [],\n mergingString: false,\n mergeData: [],\n showChangesUnsavedMessage: false,\n viewAs: '',\n loading_strings: 0,\n translationNotLoadedYet: false\n };\n },\n created: function created() {\n this.settings['default-language-name'] = this.languageNames[this.settings['default-language']]; //set default value for the View As select\n\n var params = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getUrlParameters(this.currentURL);\n if (Object.keys(params).length > 1 && params['trp-view-as']) this.viewAs = params['trp-view-as'];else this.viewAs = 'current_user';\n },\n mounted: function mounted() {\n this.addKeyboardShortcutsListener();\n var self = this; // initialize select2\n\n jQuery('#trp-language-select, #trp-view-as-select').select2({\n width: '100%'\n }); //init strings dropdown\n\n this.stringsDropdownLoading(); // show overlay when select is opened\n\n jQuery('#trp-language-select, #trp-string-categories').on('select2:open', function () {\n jQuery('#trp_select2_overlay').fadeIn('100');\n }).on('select2:close', function () {\n jQuery('#trp_select2_overlay').hide();\n }).on('select2:opening', function (e) {\n /* when we have unsaved changes prevent the strings dropdown from opening so we do not have a disconnect between the textareas and the dropdown */\n if (self.hasUnsavedChanges()) {\n e.preventDefault();\n }\n }); // resize sidebar and consequently the iframe\n\n var previewContainer = jQuery('#trp-preview');\n var total_width = jQuery(window).width();\n jQuery('#trp-controls').resizable({\n start: function start() {\n previewContainer.toggle();\n },\n stop: function stop() {\n previewContainer.toggle();\n },\n handles: 'e',\n minWidth: 285,\n maxWidth: total_width - 20\n }).bind(\"resize\", this.resizeIframe); // resize iframe when resizing window\n\n jQuery(window).resize(function () {\n self.resizeIframe();\n });\n },\n watch: {\n currentLanguage: function currentLanguage(_currentLanguage) {\n var self = this; //grab the correct URL from the iFrame\n\n var newURL = this.iframe.querySelector('link[hreflang=\"' + _currentLanguage.replace('_', '-') + '\"]').getAttribute('href');\n this.currentURL = newURL;\n this.iframe.location = newURL; //reset vue props\n\n this.selectedString = '';\n this.selectedIndexesArray = []; //set strings dropdown to loading state\n\n jQuery('#trp-string-categories').val('').trigger('change');\n this.stringsDropdownLoading();\n this.onScreenLanguage = _currentLanguage;\n\n if (this.settings['default-language'] == this.currentLanguage && this.settings['translation-languages'].length > 1) {\n this.settings['translation-languages'].some(function (language) {\n if (language != self.settings['default-language']) {\n // return the first language not default\n self.onScreenLanguage = language;\n return true;\n }\n });\n }\n },\n currentURL: function currentURL(newUrl, oldUrl) {\n window.history.replaceState(null, null, this.parentURL(newUrl));\n },\n viewAs: function viewAs(role) {\n if (!this.currentURL || !this.iframe) return;\n var url = this.cleanURL(this.currentURL);\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-edit-translation', 'preview');\n\n if (role == 'current_user') {\n this.iframe.location = url;\n return;\n } //if nonce not available, an update to the Browse as Other Roles add-on is required\n\n\n if (!this.nonces[role]) {\n alert(this.editorStrings.bor_update_notice);\n return;\n }\n\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-view-as', role);\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-view-as-nonce', this.nonces[role]);\n this.iframe.location = url;\n },\n selectedString: function selectedString(selectedStringArrayIndex, oldString) {\n if (this.hasUnsavedChanges() || !selectedStringArrayIndex && selectedStringArrayIndex !== 0) return;\n jQuery('#trp-string-categories').val(selectedStringArrayIndex !== null ? selectedStringArrayIndex : '').trigger('change');\n var selectedString = this.dictionary[selectedStringArrayIndex];\n if (!selectedString) return;\n var currentNode = this.iframe.querySelector(\"[\" + selectedString.selector + \"='\" + selectedString.dbID + \"']\");\n var selectedIndexesArray = []; //when merging we do not have a valid current node, so we just add the fake id\n\n if (currentNode) {\n var self = this;\n var selectors = self.getAllSelectors();\n var nodes = [];\n nodes.push(currentNode);\n\n if (currentNode.tagName != \"A\") {\n // include the anchor's translatable attributes\n var anchorParent = currentNode.closest('a');\n\n if (anchorParent != null) {\n nodes.push(anchorParent);\n }\n }\n\n if (currentNode.tagName == \"A\" && currentNode.children.length > 0) {\n // include all the translatable attributes inside the anchor\n var childrenArray = _toConsumableArray(currentNode.children);\n\n childrenArray.forEach(function (child) {\n nodes.push(child);\n });\n }\n\n nodes.forEach(function (node) {\n selectors.forEach(function (selector) {\n var stringId = node.getAttribute(selector);\n\n if (stringId) {\n var found = false;\n var i;\n\n for (i = 0; i < selectedIndexesArray.length; i++) {\n if (typeof self.dictionary[selectedIndexesArray[i]] !== 'undefined' && self.dictionary[selectedIndexesArray[i]].dbID !== 'undefined' && self.dictionary[selectedIndexesArray[i]].dbID === stringId) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n selectedIndexesArray.push(self.getStringIndex(selector, stringId));\n }\n }\n });\n });\n } else selectedIndexesArray.push(selectedStringArrayIndex);\n\n this.selectedIndexesArray = selectedIndexesArray;\n }\n },\n computed: {\n closeURL: function closeURL() {\n return this.cleanURL(this.currentURL);\n }\n },\n methods: {\n iFrameLoaded: function iFrameLoaded() {\n var self = this;\n var iframeElement = document.querySelector('#trp-preview-iframe');\n this.iframe = iframeElement.contentDocument || iframeElement.contentWindow.document; //sync iFrame URL with parent\n\n if (this.currentURL != this.iframe.URL) this.currentURL = this.iframe.URL; //hide iFrame loader\n\n this.iframeLoader('hide');\n self.detectedSelectorAndId = [];\n self.dictionary = [];\n this.scanIframeForStrings();\n window.addEventListener('trp_iframe_page_updated', this.scanIframeForStrings); //event that is fired when the iFrame is navigated\n\n iframeElement.contentWindow.onbeforeunload = function () {\n self.iframeLoader('show');\n self.selectedString = null;\n self.selectedIndexesArray = [];\n self.translationNotLoadedYet = false;\n self.stringsDropdownLoading();\n };\n },\n scanIframeForStrings: function scanIframeForStrings() {\n this.scanForSelector('data-trp-translate-id', 'regular', this.onScreenLanguage);\n this.scanForSelector('data-trpgettextoriginal', 'gettext', this.currentLanguage);\n this.scanForSelector('data-trp-post-slug', 'postslug', this.currentLanguage);\n },\n scanForSelector: function scanForSelector(baseSelector, typeSlug, languageOfIds) {\n this.loading_strings++;\n var self = this;\n var selectors = this.prepareSelectorStrings(baseSelector);\n\n var nodes = _toConsumableArray(this.iframe.querySelectorAll('[' + selectors.join('],[') + ']'));\n\n var stringIdsArray = [],\n nodeData = [],\n nodeEntries = [];\n nodes.forEach(function (node) {\n nodeEntries = self.getNodeInfo(node, baseSelector);\n nodeEntries.forEach(function (entry) {\n // this check ensures that we don't create duplicates when rescanning after ajax complete\n if (!self.alreadyDetected(entry.selector, entry.dbID)) {\n stringIdsArray.push(entry.dbID);\n nodeData.push(entry);\n }\n });\n self.setupEventListener(node);\n }); //unique ids only\n\n stringIdsArray = _toConsumableArray(new Set(stringIdsArray));\n\n if (stringIdsArray.length > 0) {\n var data = new FormData();\n data.append('action', 'trp_get_translations_' + typeSlug);\n data.append('all_languages', 'true');\n data.append('security', this.nonces['gettranslationsnonce' + typeSlug]);\n data.append('language', languageOfIds);\n data.append('string_ids', JSON.stringify(stringIdsArray));\n axios__WEBPACK_IMPORTED_MODULE_2___default.a.post(this.ajax_url, data).then(function (response) {\n self.loading_strings--;\n self.addToDictionary(response.data, nodeData);\n })[\"catch\"](function (error) {\n console.log(error);\n });\n } else {\n self.loading_strings--;\n }\n },\n alreadyDetected: function alreadyDetected(selector, dbId) {\n var combined = selector + '=' + dbId;\n\n if (_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].arrayContainsItem(this.detectedSelectorAndId, combined)) {\n return true;\n } else {\n this.detectedSelectorAndId.push(combined);\n return false;\n }\n },\n setupEventListener: function setupEventListener(node) {\n if (node.tagName == 'A' && !node.hasAttribute('data-trpgettextoriginal')) return false;\n var self = this;\n node.addEventListener('mouseenter', self.$refs.hoverActions.showPencilIcon);\n },\n addToDictionary: function addToDictionary(responseData) {\n var nodeInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var self = this;\n\n if (responseData != null) {\n if (nodeInfo) {\n nodeInfo.forEach(function (infoRow, index) {\n responseData.some(function (responseDataRow) {\n if (infoRow.dbID == responseDataRow.dbID) {\n //bring block_type to the top level object\n if (responseDataRow.type != 'gettext' && typeof responseDataRow.block_type == 'undefined') {\n var firstLanguage = self.orderedSecondaryLanguages[0];\n if (typeof responseDataRow.translationsArray[firstLanguage].block_type != 'undefined') responseDataRow.block_type = responseDataRow.translationsArray[firstLanguage].block_type;\n }\n\n nodeInfo[index] = Object.assign({}, responseDataRow, infoRow);\n return true; // a sort of break\n }\n });\n });\n } else {\n nodeInfo = responseData;\n }\n\n this.stringGroups = this.addToStringGroups(nodeInfo);\n this.dictionary = this.dictionary.concat(nodeInfo);\n this.initStringsDropdown();\n }\n },\n addToStringGroups: function addToStringGroups(strings) {\n // see what node groups are found\n var foundStringGroups = this.stringGroups;\n strings.forEach(function (string) {\n if (foundStringGroups.indexOf(string.group) === -1 && (typeof string.blockType === 'undefined' || string.blockType !== '2')) {\n foundStringGroups.push(string.group);\n }\n }); // put the node groups in the order that we want, according to the prop this.stringGroupOrder\n\n var orderedStringGroups = [];\n\n if (this.editorStrings.seo_update_notice != 'seo_pack_update_not_needed') {\n orderedStringGroups.push(this.editorStrings.seo_update_notice);\n }\n\n this.stringGroupOrder.forEach(function (group) {\n if (foundStringGroups.indexOf(group) !== -1) {\n orderedStringGroups.push(group);\n }\n }); // if there were any other string groups that were not in the prop, add them at the end.\n\n foundStringGroups.forEach(function (group) {\n if (orderedStringGroups.indexOf(group) === -1) {\n orderedStringGroups.push(group);\n }\n });\n return orderedStringGroups;\n },\n getStringIndex: function getStringIndex(selector, dbID) {\n var found = null;\n this.dictionary.some(function (string, index) {\n if (string.dbID == dbID && string.selector == selector) {\n found = index;\n return true;\n }\n });\n return found;\n },\n getNodeInfo: function getNodeInfo(node) {\n var baseSelector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var stringId;\n var nodeData = [];\n var selectors = this.prepareSelectorStrings(baseSelector);\n selectors.forEach(function (selector) {\n stringId = node.getAttribute(selector);\n\n if (stringId) {\n var nodeAttribute = selector.replace(baseSelector, '');\n var nodeGroup = node.getAttribute('data-trp-node-group' + nodeAttribute);\n var nodeDescription = node.getAttribute('data-trp-node-description' + nodeAttribute);\n var entry = {\n dbID: stringId,\n selector: selector,\n attribute: nodeAttribute.substr(1) // substr(1) is used to trim prefixing line - ex. -alt will result in alt (no line)\n\n };\n if (nodeGroup) entry.group = nodeGroup;\n if (nodeDescription) entry.description = nodeDescription;\n nodeData.push(entry);\n }\n });\n return nodeData;\n },\n getAllSelectors: function getAllSelectors() {\n var selectors = [];\n var self = this;\n this.dataAttributes.forEach(function (dataAttribute) {\n selectors = selectors.concat(self.prepareSelectorStrings(dataAttribute));\n });\n return selectors;\n },\n prepareSelectorStrings: function prepareSelectorStrings(baseNameSelector) {\n var parsed_selectors = [];\n this.selectors.forEach(function (selectorSuffix, index) {\n parsed_selectors.push(baseNameSelector + selectorSuffix);\n });\n return parsed_selectors;\n },\n parentURL: function parentURL(url) {\n return url.replace('trp-edit-translation=preview', 'trp-edit-translation=true');\n },\n cleanURL: function cleanURL(url) {\n //make removeUrlParameter recursive and only call it once with all the parameters that\n //need to stripped ?\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'lang');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-view-as');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-view-as-nonce');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-edit-translation');\n return url;\n },\n showString: function showString(string, type) {\n if (typeof string.blockType !== 'undefined' && string.blockType === '2') {\n // don't show deprecated translation blocks in the dropdown\n return false;\n }\n\n if (type === this.editorStrings.images && typeof string.attribute != 'undefined' && string.attribute == 'src') return true;\n if (typeof string.attribute !== 'undefined' && (string.attribute == 'href' || string.attribute == 'src')) return false;\n if (string.group === type) return true;\n return false;\n },\n initStringsDropdown: function initStringsDropdown() {\n var self = this;\n\n if (!this.isStringsDropdownOpen()) {\n jQuery('#trp-string-categories').select2('destroy');\n jQuery('#trp-string-categories').select2({\n placeholder: self.editorStrings.select_string,\n templateResult: function templateResult(option) {\n var original = he__WEBPACK_IMPORTED_MODULE_7___default.a.decode(option.text.substring(0, 90)) + (option.text.length <= 90 ? '' : '...');\n var description = option.title ? '(' + option.title + ')' : '';\n return jQuery('<div>' + original + '</div><div class=\"string-selector-description\">' + description + '</div>');\n },\n width: '100%'\n }).prop('disabled', false);\n jQuery('#trp_select2_overlay').hide();\n }\n },\n stringsDropdownLoading: function stringsDropdownLoading() {\n jQuery('#trp-string-categories').select2({\n placeholder: this.editorStrings.strings_loading,\n width: '100%'\n }).prop('disabled', true);\n },\n processOptionName: function processOptionName(name, type) {\n if (type == 'Images') return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getFilename(name);\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].escapeHtml(name);\n },\n isStringsDropdownOpen: function isStringsDropdownOpen() {\n return jQuery('#trp-string-categories').select2('isOpen');\n },\n hasUnsavedChanges: function hasUnsavedChanges() {\n var unsavedChanges = false;\n var self = this;\n\n if (this.selectedIndexesArray.length > 0) {\n this.selectedIndexesArray.forEach(function (selectedIndex) {\n self.settings['translation-languages'].forEach(function (languageCode) {\n if (self.dictionary[selectedIndex] && self.dictionary[selectedIndex].translationsArray[languageCode] && self.dictionary[selectedIndex].translationsArray[languageCode].translated !== self.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation) {\n unsavedChanges = true;\n }\n });\n });\n }\n\n this.showChangesUnsavedMessage = unsavedChanges;\n return unsavedChanges;\n },\n iframeLoader: function iframeLoader(status) {\n var loader = document.getElementById('trp-preview-loader');\n if (status == 'show') loader.style.display = 'flex';else if (status == 'hide') loader.style.display = 'none';\n },\n previousString: function previousString() {\n var currentValue = document.getElementById('trp-string-categories').value;\n var newValue = +currentValue - 1;\n\n while (newValue >= 0 && document.querySelectorAll('#trp-string-categories option[value=\"' + newValue + '\"]').length === 0) {\n newValue--;\n }\n\n if (newValue < 0) return;\n this.selectedString = newValue.toString();\n },\n nextString: function nextString() {\n var currentValue = document.getElementById('trp-string-categories').value,\n newValue = 0;\n if (currentValue != '') newValue = +currentValue + 1;\n\n while (newValue < this.dictionary.length && document.querySelectorAll('#trp-string-categories option[value=\"' + newValue + '\"]').length === 0) {\n newValue++;\n }\n\n if (newValue >= this.dictionary.length) {\n return;\n }\n\n this.selectedString = newValue.toString();\n },\n addKeyboardShortcutsListener: function addKeyboardShortcutsListener() {\n document.addEventListener(\"keydown\", function (e) {\n if ((window.navigator.platform.match(\"Mac\") ? e.metaKey : e.ctrlKey) && e.altKey) {\n // CTRL + ALT + right arrow\n if (e.keyCode === 39) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_next_string_event'));\n } else {\n // CTRL + ALT + left arrow\n if (e.keyCode === 37) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_previous_string_event'));\n }\n }\n }\n }, false);\n window.addEventListener('trp_trigger_next_string_event', this.nextString);\n window.addEventListener('trp_trigger_previous_string_event', this.previousString);\n },\n resizeIframe: function resizeIframe(event, ui) {\n var total_width = jQuery(window).width();\n var width = jQuery('#trp-controls').width();\n\n if (width > total_width) {\n width = total_width;\n controls.css('width', width);\n }\n\n var previewContainer = jQuery('#trp-preview');\n previewContainer.css('right', width);\n previewContainer.css('left', width - 348);\n previewContainer.css('width', total_width - width);\n }\n },\n //add support for v-model in select2\n directives: {\n select2: {\n inserted: function inserted(el) {\n jQuery(el).on('select2:select', function () {\n var event = new Event('change', {\n bubbles: true,\n cancelable: true\n });\n el.dispatchEvent(event);\n });\n jQuery(el).on('select2:unselect', function () {\n var event = new Event('change', {\n bubbles: true,\n cancelable: true\n });\n el.dispatchEvent(event);\n });\n }\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vYXNzZXRzL3NyYy9qcy9lZGl0b3IudnVlP2E3NjUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQXdIQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBRUE7QUFDQSxVQUNBLGNBREEsRUFFQSx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i9hc3NldHMvc3JjL2pzL2VkaXRvci52dWU/dnVlJnR5cGU9c2NyaXB0Jmxhbmc9anMmLmpzIiwic291cmNlc0NvbnRlbnQiOlsiPHRlbXBsYXRlPlxyXG4gICAgPGRpdiBpZD1cInRycC1lZGl0b3JcIj5cclxuXHJcbiAgICAgICAgPGRpdiBpZD1cInRycC1jb250cm9sc1wiPlxyXG4gICAgICAgICAgICA8ZGl2IGNsYXNzPVwidHJwLWNvbnRyb2xzLWNvbnRhaW5lclwiPlxyXG5cclxuICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJ0cnAtY2xvc2Utc2F2ZVwiPlxyXG4gICAgICAgICAgICAgICAgICAgIDxhIGlkPVwidHJwLWNvbnRyb2xzLWNsb3NlXCIgOmhyZWY9XCJjbG9zZVVSTFwiIDp0aXRsZT1cImVkaXRvclN0cmluZ3MuY2xvc2VcIj48L2E+XHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cInRycC1zYXZlLWFuZC1sb2FkZXItc3Bpbm5lclwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBjbGFzcz1cInRycC1hamF4LWxvYWRlclwiIHYtc2hvdz1cImxvYWRpbmdfc3RyaW5ncyA+IDBcIiBpZD1cInRycC1zdHJpbmctc2F2ZWQtYWpheC1sb2FkZXJcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtc3Bpbm5lclwiPjwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxzYXZlLXRyYW5zbGF0aW9uc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzZWxlY3RlZEluZGV4ZXNBcnJheT1cInNlbGVjdGVkSW5kZXhlc0FycmF5XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZGljdGlvbmFyeT1cImRpY3Rpb25hcnlcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzZXR0aW5ncz1cInNldHRpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bm9uY2VzPVwibm9uY2VzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6YWpheF91cmw9XCJhamF4X3VybFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmN1cnJlbnRMYW5ndWFnZT1cImN1cnJlbnRMYW5ndWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm9uU2NyZWVuTGFuZ3VhZ2U9XCJvblNjcmVlbkxhbmd1YWdlXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6aWZyYW1lPVwiaWZyYW1lXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Y3VycmVudFVSTD1cImN1cnJlbnRVUkxcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDptZXJnaW5nU3RyaW5nPVwibWVyZ2luZ1N0cmluZ1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm1lcmdlRGF0YT1cIm1lcmdlRGF0YVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQHRyYW5zbGF0aW9ucy1zYXZlZD1cInNob3dDaGFuZ2VzVW5zYXZlZE1lc3NhZ2UgPSBmYWxzZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmVkaXRvclN0cmluZ3M9XCJlZGl0b3JTdHJpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3NhdmUtdHJhbnNsYXRpb25zPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRycC1jb250cm9scy1zZWN0aW9uXCI+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvbi1jb250ZW50XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJ0cnAtbGFuZ3VhZ2Utc3dpdGNoXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGlkPVwidHJwLWxhbmd1YWdlLXNlbGVjdFwiIG5hbWU9XCJsYW5nXCIgdi1tb2RlbD1cImN1cnJlbnRMYW5ndWFnZVwiIHYtc2VsZWN0Mj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHYtZm9yPVwiKGxhbmcsIGxhbmdJbmRleCkgaW4gbGFuZ3VhZ2VOYW1lc1wiIDp2YWx1ZT1cImxhbmdJbmRleFwiPnt7bGFuZ319PC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwidHJwLXN0cmluZy1saXN0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGlkPVwidHJwLXN0cmluZy1jYXRlZ29yaWVzXCIgdi1tb2RlbD1cInNlbGVjdGVkU3RyaW5nXCIgdi1zZWxlY3QyPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRncm91cCB2LWZvcj1cIihncm91cCkgaW4gc3RyaW5nR3JvdXBzXCIgOmxhYmVsPVwiZ3JvdXBcIj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPG9wdGlvbiB2LWZvcj1cIihzdHJpbmcsIGluZGV4KSBpbiBkaWN0aW9uYXJ5XCIgOnZhbHVlPVwiaW5kZXhcIiB2LWlmPVwic2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b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cInRycC12aWV3LWFzXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwidHJwLXZpZXctYXMtZGVzY3JpcHRpb25cIj57eyBlZGl0b3JTdHJpbmdzLnZpZXdfYXMgfX08L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgaWQ9XCJ0cnAtdmlldy1hcy1zZWxlY3RcIiB2LW1vZGVsPVwidmlld0FzXCIgdi1zZWxlY3QyPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdi1mb3I9XCIocm9sZSwgcm9sZUluZGV4KSBpbiByb2xlc1wiIDp2YWx1ZT1cInJvbGVcIiA6ZGlzYWJsZWQ9XCIhcm9sZVwiIDp0aXRsZT1cIiFyb2xlID8gZWRpdG9yU3RyaW5ncy52aWV3X2FzX3BybyA6ICcnXCI+e3tyb2xlSW5kZXh9fTwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvblwiIHYtc2hvdz1cInNlbGVjdGVkU3RyaW5nICE9PSBudWxsXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGxhbmd1YWdlLWJveGVzXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6c2VsZWN0ZWRJbmRleGVzQXJyYXk9XCJzZWxlY3RlZEluZGV4ZXNBcnJheVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZGljdGlvbmFyeT1cImRpY3Rpb25hcnlcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOmN1cnJlbnRMYW5ndWFnZT1cImN1cnJlbnRMYW5ndWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6b25TY3JlZW5MYW5ndWFnZT1cIm9uU2NyZWVuTGFuZ3VhZ2VcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxhbmd1YWdlTmFtZXM9XCJsYW5ndWFnZU5hbWVzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzZXR0aW5ncz1cInNldHRpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlPVwic2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBAZGlzY2FyZGVkLWNoYW5nZXM9XCJoYXNVbnNhdmVkQ2hhbmdlcygpXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDplZGl0b3JTdHJpbmdzPVwiZWRpdG9yU3RyaW5nc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZmxhZ3NQYXRoPVwiZmxhZ3NQYXRoXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDppZnJhbWU9XCJpZnJhbWVcIlxyXG4gICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICA8L2xhbmd1YWdlLWJveGVzPlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgPGV4dHJhLWNvbnRlbnQgOmxhbmd1YWdlTmFtZXM9XCJsYW5ndWFnZU5hbWVzXCIgOmVkaXRvclN0cmluZ3M9XCJlZGl0b3JTdHJpbmdzXCIgOnBhaWRWZXJzaW9uPVwicGFpZF92ZXJzaW9uXCI+PC9leHRyYS1jb250ZW50PlxyXG5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvblwiIHYtc2hvdz1cInRyYW5zbGF0aW9uTm90TG9hZGVkWWV0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cInRycC10cmFuc2xhdGlvbi1ub3QtcmVhZHktc2VjdGlvblwiIGNsYXNzPVwidHJwLWNvbnRyb2xzLXNlY3Rpb24tY29udGVudFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8cCB2LWh0bWw9XCJlZGl0b3JTdHJpbmdzLnRyYW5zbGF0aW9uX25vdF9sb2FkZWRfeWV0XCI+PC9wPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgPGRpdiBpZD1cInRycF9zZWxlY3QyX292ZXJsYXlcIj48L2Rpdj5cclxuXHJcbiAgICAgICAgICAgIDxob3Zlci1hY3Rpb25zXHJcbiAgICAgICAgICAgICAgICByZWY9XCJob3ZlckFjdGlvbnNcIlxyXG4gICAgICAgICAgICAgICAgOmRpY3Rpb25hcnk9XCJkaWN0aW9uYXJ5XCJcclxuICAgICAgICAgICAgICAgIDpzZXR0aW5ncz1cInNldHRpbmdzXCJcclxuICAgICAgICAgICAgICAgIDppZnJhbWU9XCJpZnJhbWVcIlxyXG4gICAgICAgICAgICAgICAgOmRhdGFBdHRyaWJ1dGVzPVwiZGF0YUF0dHJpYnV0ZXNcIlxyXG4gICAgICAgICAgICAgICAgOm1lcmdlUnVsZXM9XCJtZXJnZVJ1bGVzXCJcclxuICAgICAgICAgICAgICAgIDpub25jZXM9XCJub25jZXNcIlxyXG4gICAgICAgICAgICAgICAgOmFqYXhfdXJsPVwiYWpheF91cmxcIlxyXG4gICAgICAgICAgICAgICAgOm1lcmdlRGF0YT1cIm1lcmdlRGF0YVwiXHJcbiAg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ICAgICAgICAgICAgZnJvbSAnLi91dGlscydcclxuICAgIGltcG9ydCBheGlvcyAgICAgICAgICAgIGZyb20gJ2F4aW9zJ1xyXG4gICAgaW1wb3J0IGxhbmd1YWdlQm94ZXMgICAgZnJvbSAnLi9jb21wb25lbnRzL2xhbmd1YWdlLWJveGVzLnZ1ZSdcclxuICAgIGltcG9ydCBzYXZlVHJhbnNsYXRpb25zIGZyb20gJy4vY29tcG9uZW50cy9zYXZlLXRyYW5zbGF0aW9ucy52dWUnXHJcbiAgICBpbXBvcnQgaG92ZXJBY3Rpb25zICAgICBmcm9tICcuL2NvbXBvbmVudHMvaG92ZXItYWN0aW9ucy52dWUnXHJcbiAgICBpbXBvcnQgZXh0cmFDb250ZW50ICAgICBmcm9tICcuL2NvbXBvbmVudHMvZXh0cmEtY29udGVudC52dWUnXHJcbiAgICBpbXBvcnQgaGUgICAgICAgICAgICAgICBmcm9tICdoZSdcclxuXHJcbiAgICBleHBvcnQgZGVmYXVsdCB7XHJcbiAgICAgICAgcHJvcHM6IFtcclxuICAgICAgICAgICAgJ3RycF9zZXR0aW5ncycsXHJcbiAgICAgICAgICAgICdsYW5ndWFnZV9uYW1lcycsXHJcbiAgICAgICAgICAgICdvcmRlcmVkX3NlY29uZGFyeV9sYW5ndWFnZXMnLFxyXG4gICAgICAgICAgICAnY3VycmVudF9sYW5ndWFnZScsXHJcbiAgICAgICAgICAgICdvbl9zY3JlZW5fbGFuZ3VhZ2UnLFxyXG4gICAgICAgICAgICAndmlld19hc19yb2xlcycsXHJcbiAgICAgICAgICAgICd1cmxfdG9fbG9hZCcsXHJcbiAgICAgICAgICAgICdzdHJpbmdfc2VsZWN0b3JzJyxcclxuICAgICAgICAgICAgJ2RhdGFfYXR0cmlidXRlcycsXHJcbiAgICAgICAgICAgICdhamF4X3VybCcsXHJcbiAgICAgICAgICAgICdlZGl0b3Jfbm9uY2VzJyxcclxuICAgICAgICAgICAgJ3N0cmluZ19ncm91cF9vcmRlcicsXHJcbiAgICAgICAgICAgICdtZXJnZV9ydWxlcycsXHJcbiAgICAgICAgICAgICdsb2NhbGl6ZWRfdGV4dCcsXHJcbiAgICAgICAgICAgICdwYWlkX3ZlcnNpb24nLFxyXG4gICAgICAgICAgICAnZmxhZ3NfcGF0aCdcclxuICAgICAgICBdLFxyXG4gICAgICAgIGNvbXBvbmVudHM6e1xyXG4gICAgICAgICAgICBsYW5ndWFnZUJveGVzLFxyXG4gICAgICAgICAgICBzYXZlVHJhbnNsYXRpb25zLFxyXG4gICAgICAgICAgICBob3ZlckFjdGlvbnMsXHJcbiAgICAgICAgICAgIGV4dHJhQ29udGVudFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZGF0YSgpe1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgLy9wcm9wc1xyXG4gICAgICAgICAgICAgICAgc2V0dGluZ3MgICAgICAgICAgICAgICAgICA6IEpTT04ucGFyc2UoIHRoaXMudHJwX3NldHRpbmdzICksXHJcbiAgICAgICAgICAgICAgICBsYW5ndWFnZU5hbWVzICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5sYW5ndWFnZV9uYW1lcyApLFxyXG4gICAgICAgICAgICAgICAgb3JkZXJlZFNlY29uZGFyeUxhbmd1YWdlcyA6IEpTT04ucGFyc2UoIHRoaXMub3JkZXJlZF9zZWNvbmRhcnlfbGFuZ3VhZ2VzICksXHJcbiAgICAgICAgICAgICAgICByb2xlcyAgICAgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy52aWV3X2FzX3JvbGVzICksXHJcbiAgICAgICAgICAgICAgICBub25jZXMgICAgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5lZGl0b3Jfbm9uY2VzKSxcclxuICAgICAgICAgICAgICAgIHN0cmluZ0dyb3VwT3JkZXIgICAgICAgICAgOiBKU09OLnBhcnNlKCB0aGlzLnN0cmluZ19ncm91cF9vcmRlciksXHJcbiAgICAgICAgICAgICAgICBzZWxlY3RvcnMgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5zdHJpbmdfc2VsZWN0b3JzICksXHJcbiAgICAgICAgICAgICAgICBkYXRhQXR0cmlidXRlcyAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5kYXRhX2F0dHJpYnV0ZXMgKSxcclxuICAgICAgICAgICAgICAgIG1lcmdlUnVsZXMgICAgICAgICAgICAgICAgOiBKU09OLnBhcnNlKCB0aGlzLm1lcmdlX3J1bGVzICksXHJcbiAgICAgICAgICAgICAgICBlZGl0b3JTdHJpbmdzICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5sb2NhbGl6ZWRfdGV4dCApLFxyXG4gICAgICAgICAgICAgICAgZmxhZ3NQYXRoICAgICAgICAgICAgICAgICA6IEpTT04ucGFyc2UoIHRoaXMuZmxhZ3NfcGF0aCApLFxyXG4gICAgICAgICAgICAgICAgLy9kYXRhXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2UgICAgICAgICAgIDogdGhpcy5jdXJyZW50X2xhbmd1YWdlLFxyXG4gICAgICAgICAgICAgICAgb25TY3JlZW5MYW5ndWFnZSAgICAgICAgICA6IHRoaXMub25fc2NyZWVuX2xhbmd1YWdlLFxyXG4gICAgICAgICAgICAgICAgY3VycmVudFVSTCAgICAgICAgICAgICAgICA6IHRoaXMudXJsX3RvX2xvYWQsXHJcbiAgICAgICAgICAgICAgICB1cmxUb0xvYWQgICAgICAgICAgICAgICAgIDogdGhpcy51cmxfdG9fbG9hZCxcclxuICAgICAgICAgICAgICAgIGlmcmFtZSAgICAgICAgICAgICAgICAgICAgOiAnJyxcclxuICAgICAgICAgICAgICAgIGRpY3Rpb25hcnkgICAgICAgICAgICAgICAgOiBbXSxcclxuICAgICAgICAgICAgICAgIHNlbGVjdGVkU3RyaW5nICAgICAgICAgICAgOiBudWxsLFxyXG4gICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleGVzQXJyYXkgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgZGV0ZWN0ZWRTZWxlY3RvckFuZElkICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgc3RyaW5nR3JvdXBzICAgICAgICAgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgbWVyZ2luZ1N0cmluZyAgICAgICAgICAgICA6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgbWVyZ2VEYXRhICAgICAgICAgICAgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgc2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZSA6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgdmlld0FzICAgICAgICAgICAgICAgICAgICA6ICcnLFxyXG4gICAgICAgICAgICAgICAgbG9hZGluZ19zdHJpbmdzICAgICAgICAgICA6IDAsXHJcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbk5vdExvYWRlZFlldCAgIDogZmFsc2UsXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGNyZWF0ZWQoKXtcclxuICAgICAgICAgICAgdGhpcy5zZXR0aW5nc1snZGVmYXVsdC1sYW5ndWFnZS1uYW1lJ10gPSB0aGlzLmxhbmd1YWdlTmFtZXNbIHRoaXMuc2V0dGluZ3NbJ2RlZmF1bHQtbGFuZ3VhZ2UnXSBdXHJcblxyXG4gICAgICAgICAgICAvL3NldCBkZWZhdWx0IHZhbHVlIGZvciB0aGUgVmlldyBBcyBzZWxlY3RcclxuICAgICAgICAgICAgbGV0IHBhcmFtcyA9IHV0aWxzLmdldFVybFBhcmFtZXRlcnMoIHRoaXMuY3VycmVudFVSTCApXHJcblxyXG4gICAgICAgICAgICBpZiggT2JqZWN0LmtleXMocGFyYW1zKS5sZW5ndGggPiAxICYmIHBhcmFtc1sndHJwLXZpZXctYXMnXSApXHJcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdBcyA9IHBhcmFtc1sndHJwL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gaGF2ZSB1bnNhdmVkIGNoYW5nZXMgcHJldmVudCB0aGUgc3RyaW5ncyBkcm9wZG93biBmcm9tIG9wZW5pbmcgc28gd2UgZG8gbm90IGhhdmUgYSBkaXNjb25uZWN0IGJldHdlZW4gdGhlIHRleHRhcmVhcyBhbmQgdGhlIGRyb3Bkb3duICovXHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5oYXNVbnNhdmVkQ2hhbmdlcygpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAvLyByZXNpemUgc2lkZWJhciBhbmQgY29uc2VxdWVudGx5IHRoZSBpZnJhbWVcclxuICAgICAgICAgICAgbGV0IHByZXZpZXdDb250YWluZXIgPSBqUXVlcnkoICcjdHJwLXByZXZpZXcnICk7XHJcbiAgICAgICAgICAgIGxldCB0b3RhbF93aWR0aCA9IGpRdWVyeSh3aW5kb3cpLndpZHRoKCk7XHJcbiAgICAgICAgICAgIGpRdWVyeSggJyN0cnAtY29udHJvbHMnICkucmVzaXphYmxlKHtcclxuICAgICAgICAgICAgICAgIHN0YXJ0OiBmdW5jdGlvbiggKSB7IHByZXZpZXdDb250YWluZXIudG9nZ2xlKCk7IH0sXHJcbiAgICAgICAgICAgICAgICBzdG9wOiBmdW5jdGlvbiggKSB7IHByZXZpZXdDb250YWluZXIudG9nZ2xlKCk7IH0sXHJcbiAgICAgICAgICAgICAgICBoYW5kbGVzOiAnZScsXHJcbiAgICAgICAgICAgICAgICBtaW5XaWR0aDogMjg1LFxyXG4gICAgICAgICAgICAgICAgbWF4V2lkdGg6IHRvdGFsX3dpZHRoIC0gMjBcclxuICAgICAgICAgICAgfSkuYmluZCggXCJyZXNpemVcIiwgdGhpcy5yZXNpemVJZnJhbWUgKTtcclxuXHJcbiAgICAgICAgICAgIC8vIHJlc2l6ZSBpZnJhbWUgd2hlbiByZXNpemluZyB3aW5kb3dcclxuICAgICAgICAgICAgalF1ZXJ5KCB3aW5kb3cgKS5yZXNpemUoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5yZXNpemVJZnJhbWUoKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICB3YXRjaDoge1xyXG4gICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2U6IGZ1bmN0aW9uKCBjdXJyZW50TGFuZ3VhZ2UgKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIC8vZ3JhYiB0aGUgY29ycmVjdCBVUkwgZnJvbSB0aGUgaUZyYW1lXHJcbiAgICAgICAgICAgICAgICBsZXQgbmV3VVJMID0gdGhpcy5pZnJhbWUucXVlcnlTZWxlY3RvciggJ2xpbmtbaHJlZmxhbmc9XCInICsgY3VycmVudExhbmd1YWdlLnJlcGxhY2UoICdfJywgJy0nICkgKydcIl0nICkuZ2V0QXR0cmlidXRlKCdocmVmJylcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRVUkwgICAgICAgICAgID0gbmV3VVJMXHJcbiAgICAgICAgICAgICAgICB0aGlzLmlmcmFtZS5sb2NhdGlvbiAgICAgID0gbmV3VVJMXHJcblxyXG4gICAgICAgICAgICAgICAgLy9yZXNldCB2dWUgcHJvcHNcclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRTdHJpbmcgICAgICAgPSAnJ1xyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZEluZGV4ZXNBcnJheSA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgLy9zZXQgc3RyaW5ncyBkcm9wZG93biB0byBsb2FkaW5nIHN0YXRlXHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoJyN0cnAtc3RyaW5nLWNhdGVnb3JpZXMnKS52YWwoJycpLnRyaWdnZXIoJ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cbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHZpZXdBczogZnVuY3Rpb24oIHJvbGUgKSB7XHJcbiAgICAgICAgICAgICAgICBpZiggIXRoaXMuY3VycmVudFVSTCB8fCAhdGhpcy5pZnJhbWUgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxyXG5cclxuICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmNsZWFuVVJMKCB0aGlzLmN1cnJlbnRVUkwgKVxyXG5cclxuICAgICAgICAgICAgICAgIHVybCA9IHV0aWxzLnVwZGF0ZVVybFBhcmFtZXRlciggdXJsLCAndHJwLWVkaXQtdHJhbnNsYXRpb24nLCAncHJldmlldycgKVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCByb2xlID09ICdjdXJyZW50X3VzZXInICkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaWZyYW1lLmxvY2F0aW9uID0gdXJsXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy9pZiBub25jZSBub3QgYXZhaWxhYmxlLCBhbiB1cGRhdGUgdG8gdGhlIEJyb3dzZSBhcyBPdGhlciBSb2xlcyBhZGQtb24gaXMgcmVxdWlyZWRcclxuICAgICAgICAgICAgICAgIGlmKCAhdGhpcy5ub25jZXNbcm9sZV0gKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWxlcnQoIHRoaXMuZWRpdG9yU3RyaW5ncy5ib3JfdXBkYXRlX25vdGljZSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMudXBkYXRlVXJsUGFyYW1ldGVyKCB1cmwsICd0cnAtdmlldy1hcycsIHJvbGUgKVxyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMudXBkYXRlVXJsUGFyYW1ldGVyKCB1cmwsICd0cnAtdmlldy1hcy1ub25jZScsIHRoaXMubm9uY2VzW3JvbGVdIClcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmlmcmFtZS5sb2NhdGlvbiA9IHVybFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzZWxlY3RlZFN0cmluZzogZnVuY3Rpb24gKCBzZWxlY3RlZFN0cmluZ0FycmF5SW5kZXgsIG9sZFN0cmluZyApe1xyXG5cclxuICAgICAgICAgICAgICAgIGlmKCB0aGlzLmhhc1Vuc2F2ZWRDaGFuZ2VzKCkgfHwgKCAhc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4ICYmIHNlbGVjdGVkU3RyaW5nQXJyYXlJbmRleCAhPT0gMCApIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29yaWVzJyApLnZhbCggc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4ICE9PSBudWxsID8gc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4IDogJycgKS50cmlnZ2VyKCAnY2hhbmdlJyApXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkU3RyaW5nICAgICAgID0gdGhpcy5kaWN0aW9uYXJ5W3NlbGVjdGVkU3RyaW5nQXJyYXlJbmRleF1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiggIXNlbGVjdGVkU3RyaW5nIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudE5vZGUgICAgICAgICAgPSB0aGlzLmlmcmFtZS5xdWVyeVNlbGVjdG9yKCBcIltcIiArIHNlbGVjdGVkU3RyaW5nLnNlbGVjdG9yICsgXCI9J1wiICsgc2VsZWN0ZWRTdHJpbmcuZGJJRCArIFwiJ11cIilcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZEluZGV4ZXNBcnJheSA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgLy93aGVuIG1lcmdpbmcgd2UgZG8gbm90IGhhdmUgYSB2YWxpZCBjdXJyZW50IG5vZGUsIHNvIHdlIGp1c3QgYWRkIHRoZSBmYWtlIGlkXHJcbiAgICAgICAgICAgICAgICBpZiggY3VycmVudE5vZGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGYgPSB0aGlzXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdG9ycyA9IHNlbGYuZ2V0QWxsU2VsZWN0b3JzKClcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZXMgPSBbXVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2Rlcy5wdXNoKCBjdXJyZW50Tm9kZSApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggY3VycmVudE5vZGUudGFnTmFtZSAhPSBcIkFcIiApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpbmNsdWRlIHRoZSBhbmNob3IncyB0cmFuc2xhdGFibGUgYXR0cmlidXRlc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYW5jaG9yUGFyZW50ICA9IGN1cnJlbnROb2RlLmNsb3Nlc3QoJ2EnKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiggIGFuY2hvclBhcmVudCAhPSBudWxsICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChhbmNob3JQYXJlbnQpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggY3VycmVudE5vZGUudGFnTmFtZSA9PSBcIkFcIiAmJiBjdXJyZW50Tm9kZS5jaGlsZHJlbi5sZW5ndGggPiAwICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGluY2x1ZGUgYWxsIHRoZSB0cmFuc2xhdGFibGUgYXR0cmlidXRlcyBpbnNpZGUgdGhlIGFuY2hvclxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2hpbGRyZW5BcnJheSA9IFsgLi4uY3VycmVudE5vZGUuY2hpbGRyZW4gXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW5BcnJheS5mb3JFYWNoKCBmdW5jdGlvbiAoIGNoaWxkICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChjaGlsZClcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2Rlcy5mb3JFYWNoKCBmdW5jdGlvbiggbm9kZSApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3JzLmZvckVhY2goZnVuY3Rpb24gKHNlbGVjdG9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RyaW5nSWQgPSBub2RlLmdldEF0dHJpYnV0ZShzZWxlY3RvcilcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdHJpbmdJZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmb3VuZCA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IoIGkgPSAwOyBpIDwgc2VsZWN0ZWRJbmRleGVzQXJyYXkubGVuZ3RoOyBpKysgKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCB0eXBlb2Ygc2VsZi5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhlc0FycmF5W2ldXSAhPT0gJ3VuZGVmaW5lZCcgJiYgc2VsZi5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhlc0FycmF5W2ldXS5kYklEICE9PSAndW5kZWZpbmVkJyAmJiBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleGVzQXJyYXlbaV1dLmRiSUQgPT09IHN0cmluZ0lkICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggISBmb3VuZCApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleGVzQXJyYXkucHVzaChzZWxmLmdldFN0cmluZ0luZGV4KHNlbGVjdG9yLCBzdHJpbmdJZCkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9IGVsc2VcclxuICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEluZGV4ZXNBcnJheS5wdXNoKCBzZWxlY3RlZFN0cmluZ0FycmF5SW5kZXggKVxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleGVzQXJyYXkgPSBzZWxlY3RlZEluZGV4ZXNBcnJheVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29tcHV0ZWQ6IHtcclxuICAgICAgICAgICAgY2xvc2VVUkw6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2xlYW5VUkwoIHRoaXMuY3VycmVudFVSTCApXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIG1ldGhvZHM6IHtcclxuICAgICAgICAgICAgaUZyYW1lTG9hZGVkKCl7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBpZnJhbWVFbGVtZW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RycC1wcmV2aWV3LWlmcmFtZScpXHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5pZnJhbWUgPSBpZnJhbWVFbGVtZW50LmNvbnRlbnREb2N1bWVudCB8fCBpZnJhbWVFbGVtZW50LmNvbnRlbnRXaW5kb3cuZG9jdW1lbnRcclxuXHJcbiAgICAgICAgICAgICAgICAvL3N5bmMgaUZyYW1lIFVSTCB3aXRoIHBhcmVudFxyXG4gICAgICAgICAgICAgICAgaWYgKCB0aGlzLmN1cnJlbnRVUkwgIT0gdGhpcy5pZnJhbWUuVVJMIClcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRVUkwgPSB0aGlzLmlmcmFtZS5VUkxcclxuXHJcbiAgICAgICAgICAgICAgICAvL2hpZGUgaUZyYW1lIGxvYWRlclxyXG4gICAgICAgICAgICAgICAgdGhpcy5pZnJhbWVMb2FkZXIoICdoaWRlJyApXHJcblxyXG4gICAgICAgICAgICAgICAgc2VsZi5kZXRlY3RlZFNlbGVjdG9yQW5kSWQgPSBbXVxyXG4gICAgICAgICAgICAgICAgc2VsZi5kaWN0aW9uYXJ5ICAgICAgICAgICAgPSBbXVxyXG4gICAgICAgICAgICAgICAgdGhpcy5zY2FuSWZyYW1lRm9yU3RyaW5ncygpXHJcblxyXG4gICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICd0cnBfaWZyYW1lX3BhZ2VfdXBkYXRlZCcsIHRoaXMuc2NhbklmcmFtZUZvclN0cmluZ3MgKVxyXG5cclxuICAgICAgICAgICAgICAgIC8vZXZlbnQg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lwZVNsdWcsIGxhbmd1YWdlT2ZJZHMgKXtcclxuICAgICAgICAgICAgICAgIHRoaXMubG9hZGluZ19zdHJpbmdzKytcclxuICAgICAgICAgICAgICAgIGxldCBzZWxmICAgICAgICAgICA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RvcnMgICAgICA9IHRoaXMucHJlcGFyZVNlbGVjdG9yU3RyaW5ncyggYmFzZVNlbGVjdG9yIClcclxuICAgICAgICAgICAgICAgIGxldCBub2RlcyAgICAgICAgICA9IFsuLi50aGlzLmlmcmFtZS5xdWVyeVNlbGVjdG9yQWxsKCAnWycgKyBzZWxlY3RvcnMuam9pbignXSxbJykgKyAnXScgKV1cclxuICAgICAgICAgICAgICAgIGxldCBzdHJpbmdJZHNBcnJheSA9IFtdLCBub2RlRGF0YSA9IFtdLCBub2RlRW50cmllcyA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgbm9kZXMuZm9yRWFjaCggZnVuY3Rpb24gKCBub2RlICl7XHJcbiAgICAgICAgICAgICAgICAgICAgbm9kZUVudHJpZXMgPSBzZWxmLmdldE5vZGVJbmZvKCBub2RlLCBiYXNlU2VsZWN0b3IgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2RlRW50cmllcy5mb3JFYWNoKCBmdW5jdGlvbiggZW50cnkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgY2hlY2sgZW5zdXJlcyB0aGF0IHdlIGRvbid0IGNyZWF0ZSBkdXBsaWNhdGVzIHdoZW4gcmVzY2FubmluZyBhZnRlciBhamF4IGNvbXBsZXRlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggIXNlbGYuYWxyZWFkeURldGVjdGVkKCBlbnRyeS5zZWxlY3RvciwgZW50cnkuZGJJRCApICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nSWRzQXJyYXkucHVzaChlbnRyeS5kYklEKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZURhdGEucHVzaChlbnRyeSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuc2V0dXBFdmVudExpc3RlbmVyKCBub2RlIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgLy91bmlxdWUgaWRzIG9ubHlcclxuICAgICAgICAgICAgICAgIHN0cmluZ0lkc0FycmF5ID0gWy4uLm5ldyBTZXQoc3RyaW5nSWRzQXJyYXkpXVxyXG4gICAgICAgICAgICAgICAgaWYgKCBzdHJpbmdJZHNBcnJheS5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gbmV3IEZvcm1EYXRhKClcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCgnYWN0aW9uJyAgICAgICAsICd0cnBfZ2V0X3RyYW5zbGF0aW9uc18nICsgdHlwZVNsdWcpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5hcHBlbmQoJ2FsbF9sYW5ndWFnZXMnLCAndHJ1ZScpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5hcHBlbmQoJ3NlY3VyaXR5JyAgICAgLCB0aGlzLm5vbmNlc1snZ2V0dHJhbnNsYXRpb25zbm9uY2UnICsgdHlwZVNsdWddKVxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuYXBwZW5kKCdsYW5ndWFnZScgICAgICwgbGFuZ3VhZ2VPZklkcylcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCgnc3RyaW5nX2lkcycgICAsIEpTT04uc3RyaW5naWZ5KHN0cmluZ0lkc0FycmF5KSlcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgYXhpb3MucG9zdCh0aGlzLmFqYXhfdXJsLCBkYXRhKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYubG9hZGluZ19zdHJpbmdzLS1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuYWRkVG9EaWN0aW9uYXJ5KHJlc3BvbnNlLmRhdGEsIG5vZGVEYXRhKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlcnJvcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfWVsc2V7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5sb2FkaW5nX3N0cmluZ3MtLVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWxyZWFkeURldGVjdGVkKCBzZWxlY3RvciwgZGJJZCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IGNvbWJpbmVkID0gc2VsZWN0b3IgKyAnPScgKyBkYklkXHJcbiAgICAgICAgICAgICAgICBpZiAoIHV0aWxzLmFycmF5Q29udGFpbnNJdGVtKCB0aGlzLmRldGVjdGVkU2VsZWN0b3JBbmRJZCwgY29tYmluZWQgKSApIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfWVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGV0ZWN0ZWRTZWxlY3RvckFuZElkLnB1c2goY29tYmluZWQpXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNldHVwRXZlbnRMaXN0ZW5lciggbm9kZSApe1xyXG4gICAgICAgICAgICAgICAgaWYgKCBub2RlLnRhZ05hbWUgPT0gJ0EnICYmICFub2RlLmhhc0F0dHJpYnV0ZSggJ2RhdGEtdHJwZ2V0dGV4dG9yaWdpbmFsJyApIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICBub2RlLmFkZEV2ZW50TGlzdGVuZXIoICdtb3VzZWVudGVyJywgc2VsZi4kcmVmcy5ob3ZlckFjdGlvbnMuc2hvd1BlbmNpbEljb24gKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBhZGRUb0RpY3Rpb25hcnkoIHJlc3BvbnNlRGF0YSwgbm9kZUluZm8gPSBudWxsICl7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHJlc3BvbnNlRGF0YSAhPSBudWxsICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICggbm9kZUluZm8gKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZm8uZm9yRWFjaChmdW5jdGlvbiAoIGluZm9Sb3csIGluZGV4ICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZURhdGEuc29tZSggZnVuY3Rpb24gKCByZXNwb25zZURhdGFSb3cgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggaW5mb1Jvdy5kYklEID09IHJlc3BvbnNlRGF0YVJvdy5kYklEICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2JyaW5nIGJsb2NrX3R5cGUgdG8gdGhlIHRvcCBsZXZlbCBvYmplY3RcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCByZXNwb25zZURhdGFSb3cudHlwZSAhPSAnZ2V0dGV4dCcgJiYgdHlwZW9mIHJlc3BvbnNlRGF0YVJvdy5ibG9ja190eXBlID09ICd1bmRlZmluZWQnICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZpcnN0TGFuZ3VhZ2UgPSBzZWxmLm9yZGVyZWRTZWNvbmRhcnlMYW5ndWFnZXNbMF1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiByZXNwb25zZURhdGFSb3cudHJhbnNsYXRpb25zQXJyYXlbZmlyc3RMYW5ndWFnZV0uYmxvY2tfdHlwZSAhPSAndW5kZWZpbmVkJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2VEYXRhUm93LmJsb2NrX3R5cGUgPSByZXNwb25zZURhdGFSb3cudHJhbnNsYXRpb25zQXJyYXlbZmlyc3RMYW5ndWFnZV0uYmxvY2tfdHlwZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlSW5mb1tpbmRleF0gPSBPYmplY3QuYXNzaWduKCB7fSwgcmVzcG9uc2VEYXRhUm93LCBpbmZvUm93IClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWUgLy8gYSBzb3J0IG9mIGJyZWFrXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZm8gPSByZXNwb25zZURhdGFcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RyaW5nR3JvdXBzID0gdGhpcy5hZGRUb1N0cmluZ0dyb3Vwcyggbm9kZUluZm8gKVxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGljdGlvbmFyeSA9IHRoaXMuZGljdGlvbmFyeS5jb25jYXQoIG5vZGVJbmZvIClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbml0U3RyaW5nc0Ryb3Bkb3duKClcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWRkVG9TdHJpbmdHcm91cHMoIHN0cmluZ3MgKXtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBzZWUgd2hhdCBub2RlIGdyb3VwcyBhcmUgZm91bmRcclxuICAgICAgICAgICAgICAgIGxldCBmb3VuZFN0cmluZ0dyb3VwcyA9IHRoaXMuc3RyaW5nR3JvdXBzO1xyXG4gICAgICAgICAgICAgICAgc3RyaW5ncy5mb3JFYWNoKCBmdW5jdGlvbiAoIHN0cmluZyApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIGZvdW5kU3RyaW5nR3JvdXBzLmluZGV4T2YoIHN0cmluZy5ncm91cCApID09PSAtMSAmJiAoICggdHlwZW9mIHN0cmluZy5ibG9ja1R5cGUgPT09ICd1bmRlZmluZWQnICkgfHwgc3RyaW5nLmJsb2NrVHlwZSAhPT0gJzInICkgKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm91bmRTdHJpbmdHcm91cHMucHVzaCggc3RyaW5nLmdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIHB1dCB0aGUgbm9kZSBncm91cHMgaW4gdGhlIG9yZGVyIHRoYXQgd2Ugd2FudCwgYWNjb3JkaW5nIHRvIHRoZSBwcm9wIHRoaXMuc3RyaW5nR3JvdXBPcmRlclxyXG4gICAgICAgICAgICAgICAgbGV0IG9yZGVyZWRTdHJpbmdHcm91cHMgPSBbXTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHRoaXMuZWRpdG9yU3RyaW5ncy5zZW9fdXBkYXRlX25vdGljZSAhPSAnc2VvX3BhY2tfdXBkYXRlX25vdF9uZWVkZWQnICl7XHJcbiAgICAgICAgICAgICAgICAgICAgb3JkZXJlZFN0cmluZ0dyb3Vwcy5wdXNoKCB0aGlzLmVkaXRvclN0cmluZ3Muc2VvX3VwZGF0ZV9ub3RpY2UgKTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLnN0cmluZ0dyb3VwT3JkZXIuZm9yRWFjaCggZnVuY3Rpb24oIGdyb3VwICl7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBmb3VuZFN0cmluZ0dyb3Vwcy5pbmRleE9mKCBncm91cCApICE9PSAtMSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmRlcmVkU3RyaW5nR3JvdXBzLnB1c2goIGdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIGlmIHRoZXJlIHdlcmUgYW55IG90aGVyIHN0cmluZyBncm91cHMgdGhhdCB3ZXJlIG5vdCBpbiB0aGUgcHJvcCwgYWRkIHRoZW0gYXQgdGhlIGVuZC5cclxuICAgICAgICAgICAgICAgIGZvdW5kU3RyaW5nR3JvdXBzLmZvckVhY2goIGZ1bmN0aW9uIChncm91cCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICggb3JkZXJlZFN0cmluZ0dyb3Vwcy5pbmRleE9mKCBncm91cCApID09PSAtMSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmRlcmVkU3RyaW5nR3JvdXBzLnB1c2goZ3JvdXApO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG9yZGVyZWRTdHJpbmdHcm91cHM7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdldFN0cmluZ0luZGV4KCBzZWxlY3RvciwgZGJJRCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IGZvdW5kID0gbnVsbFxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuZGljdGlvbmFyeS5zb21lKGZ1bmN0aW9uICggc3RyaW5nLCBpbmRleCApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIHN0cmluZy5kYklEID09IGRiSUQgJiYgc3RyaW5nLnNlbGVjdG9yID09IHNlbGVjdG9yICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gaW5kZXhcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBmb3VuZFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXROb2RlSW5mbyggbm9kZSwgYmFzZVNlbGVjdG9yID0gJycgKXtcclxuICAgICAgICAgICAgICAgIGxldCBzdHJpbmdJZFxyXG4gICAgICAgICAgICAgICAgbGV0IG5vZGVEYXRhICA9IFtdXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0b3JzID0gdGhpcy5wcmVwYXJlU2VsZWN0b3JTdHJpbmdzKCBiYXNlU2VsZWN0b3IgKVxyXG5cclxuICAgICAgICAgICAgICAgIHNlbGVjdG9ycy5mb3JFYWNoKCBmdW5jdGlvbiAoIHNlbGVjdG9yICkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBzdHJpbmdJZCA9IG5vZGUuZ2V0QXR0cmlidXRlKCBzZWxlY3RvciApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggc3RyaW5nSWQgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZUF0dHJpYnV0ZSAgID0gc2VsZWN0b3IucmVwbGFjZSggYmFzZVNlbGVjdG9yLCAnJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlR3JvdXAgICAgICAgPSBub2RlLmdldEF0dHJpYnV0ZSggJ2RhdGEtdHJwLW5vZGUtZ3JvdXAnICsgbm9kZUF0dHJpYnV0ZSApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlRGVzY3JpcHRpb24gPSBub2RlLmdldEF0dHJpYnV0ZSggJ2RhdGEtdHJwLW5vZGUtZGVzY3JpcHRpb24nICsgbm9kZUF0dHJpYnV0ZSApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZW50cnkgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYklEICAgICAgOiBzdHJpbmdJZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yICA6IHNlbGVjdG9yLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlIDogbm9kZUF0dHJpYnV0ZS5zdWJzdHIoMSksIC8vIHN1YnN0cigxKSBpcyB1c2VkIHRvIHRyaW0gcHJlZml4aW5nIGxpbmUgLSBleC4gLWFsdCB3aWxsIHJlc3VsdCBpbiBhbHQgKG5vIGxpbmUpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggbm9kZUdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJ5Lmdyb3VwID0gbm9kZUdyb3VwXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIG5vZGVEZXNjcmlwdGlvbiApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeS5kZXNjcmlwdGlvbiA9IG5vZGVEZXNjcmlwdGlvblxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZURhdGEucHVzaCggZW50cnkgKVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBub2RlRGF0YVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRBbGxTZWxlY3RvcnMoKXtcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RvcnMgPSBbXVxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGYgICAgICA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmRhdGFBdHRyaWJ1dGVzLmZvckVhY2goIGZ1bmN0aW9uICggZGF0YUF0dHJpYnV0ZSApe1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdG9ycyA9IHNlbGVjdG9ycy5jb25jYXQoIHNlbGYucHJlcGFyZVNlbGVjdG9yU3RyaW5ncyggZGF0YUF0dHJpYnV0ZSApIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdG9yc1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwcmVwYXJlU2VsZWN0b3JTdHJpbmdzKCBiYXNlTmFtZVNlbGVjdG9yICl7XHJcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VkX3NlbGVjdG9ycyA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RvcnMuZm9yRWFjaCggZnVuY3Rpb24gKCBzZWxlY3RvclN1ZmZpeCwgaW5kZXggKXtcclxuICAgICAgICAgICAgICAgICAgICBwYXJzZWRfc2VsZWN0b3JzLnB1c2goIGJhc2VOYW1lU2VsZWN0b3IgKyBzZWxlY3RvclN1ZmZpeCAgKVxyXG4gICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VkX3NlbGVjdG9yc1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwYXJlbnRVUkwoIHVybCApe1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybC5yZXBsYWNlKCAndHJwLWVkaXQtdHJhbnNsYXRpb249cHJldmlldycsICd0cnAtZWRpdC10cmFuc2xhdGlvbj10cnVlJyApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGNsZWFuVVJMKCB1cmwgKXtcclxuICAgICAgICAgICAgICAgIC8vbWFrZSByZW1vdmVVcmxQYXJhbWV0ZXIgcmVjdXJzaXZlIGFuZCBvbmx5IGNhbGwgaXQgb25jZSB3aXRoIGFsbCB0aGUgcGFyYW1ldGVycyB0aGF0XHJcbiAgICAgICAgICAgICAgICAvL25lZWQgdG8gc3RyaXBwZWQgP1xyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMucmVtb3ZlVXJsUGFyYW1ldGVyKCB1cmwsICdsYW5nJyApXHJcbiAgICAgICAgICAgICAgICB1cmwgPSB1dGlscy5yZW1vdmVVcmxQYXJhbWV0ZXIoIHVybCwgJ3RycC12aWV3LWFzJyApXHJcbiAgICAgICAgICAgICAgICB1cmwgPSB1dGlscy5yZW1vdmVVcmxQYXJhbWV0ZXIoIHVybCwgJ3RycC12aWV3LWFzLW5vbmNlJyApXHJcbiAgICAgICAgICAgICAgICB1cmwgPSB1dGlscy5yZW1vdmVVcmxQYXJhbWV0ZXIoIHVybCwgJ3RycC1lZGl0LXRyYW5zbGF0aW9uJyApXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzaG93U3RyaW5nKCBzdHJpbmcsIHR5cGUgKXtcclxuICAgICAgICAgICAgICAgIGlmICggdHlwZW9mIHN0cmluZy5ibG9ja1R5cGUgIT09ICd1bmRlZmluZWQnICYmIHN0cmluZy5ibG9ja1R5cGUgPT09ICcyJyApe1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIGRvbid0IHNob3cgZGVwcmVjYXRlZCB0cmFuc2xhdGlvbiBibG9ja3MgaW4gdGhlIGRyb3Bkb3duXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGUgPT09IHRoaXMuZWRpdG9yU3RyaW5ncy5pbWFnZXMgJiYgdHlwZW9mIHN0cmluZy5hdHRyaWJ1dGUgIT0gJ3VuZGVmaW5lZCcgJiYgc3RyaW5nLmF0dHJpYnV0ZSA9PSAnc3JjJyApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiBzdHJpbmcuYXR0cmlidXRlICE9PSAndW5kZWZpbmVkJyAmJiAoIHN0cmluZy5hdHRyaWJ1dGUgPT0gJ2hyZWYnIHx8IHN0cmluZy5hdHRyaWJ1dGUgPT0gJ3NyYycgKSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCBzdHJpbmcuZ3JvdXAgPT09IHR5cGUgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGluaXRTdHJpbmdzRHJvcGRvd24oKXtcclxuICAgICAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICggIXRoaXMuaXNTdHJpbmdzRHJvcGRvd25PcGVuKCkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1zdHJpbmctY2F0ZWdvcmllcycgKS5zZWxlY3QyKCAnZGVzdHJveScgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29y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2Rpc2FibGVkJywgdHJ1ZSApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHByb2Nlc3NPcHRpb25OYW1lKCBuYW1lLCB0eXBlICl7XHJcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGUgPT0gJ0ltYWdlcycgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1dGlscy5nZXRGaWxlbmFtZSggbmFtZSApXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHV0aWxzLmVzY2FwZUh0bWwoIG5hbWUgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBpc1N0cmluZ3NEcm9wZG93bk9wZW4oKXtcclxuICAgICAgICAgICAgICAgIHJldHVybiBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29yaWVzJyApLnNlbGVjdDIoICdpc09wZW4nIClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgaGFzVW5zYXZlZENoYW5nZXMoKXtcclxuICAgICAgICAgICAgICAgIGxldCB1bnNhdmVkQ2hhbmdlcyA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGlmICggdGhpcy5zZWxlY3RlZEluZGV4ZXNBcnJheS5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleGVzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoc2VsZWN0ZWRJbmRleCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnNldHRpbmdzWyd0cmFuc2xhdGlvbi1sYW5ndWFnZXMnXS5mb3JFYWNoKGZ1bmN0aW9uIChsYW5ndWFnZUNvZGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0gJiZcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXSAmJlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS50cmFuc2xhdGVkICE9PSBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS5lZGl0ZWRUcmFuc2xhdGlvbikpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNhdmVkQ2hhbmdlcyA9IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgdGhpcy5zaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlID0gdW5zYXZlZENoYW5nZXNcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5zYXZlZENoYW5nZXNcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgaWZyYW1lTG9hZGVyKCBzdGF0dXMgKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgbG9hZGVyID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoICd0cnAtcHJldmlldy1sb2FkZXInIClcclxuXHJcbiAgICAgICAgICAgICAgICBpZiggc3RhdHVzID09ICdzaG93JyApXHJcbiAgICAgICAgICAgICAgICAgICAgbG9hZGVyLnN0eWxlLmRpc3BsYXkgPSAnZmxleCdcclxuICAgICAgICAgICAgICAgIGVsc2UgaWYoIHN0YXR1cyA9PSAnaGlkZScgKVxyXG4gICAgICAgICAgICAgICAgICAgIGxvYWRlci5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHByZXZpb3VzU3RyaW5nKCl7XHJcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudFZhbHVlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3RycC1zdHJpbmctY2F0ZWdvcmllcycpLnZhbHVlXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IG5ld1ZhbHVlID0gK2N1cnJlbnRWYWx1ZSAtIDFcclxuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSggbmV3VmFsdWUgPj0gMCAmJiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcjdHJwLXN0cmluZy1jYXRlZ29yaWVzIG9wdGlvblt2YWx1ZT1cIicgKyBuZXdWYWx1ZSArICdcIl0nKS5sZW5ndGggPT09IDAgKXtcclxuICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZS0tO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCBuZXdWYWx1ZSA8IDAgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRTdHJpbmcgPSBuZXdWYWx1ZS50b1N0cmluZygpXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG5leHRTdHJpbmcoKXtcclxuICAgICAgICAgICAgICAgIGxldCBjdXJyZW50VmFsdWUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndHJwLXN0cmluZy1jYXRlZ29yaWVzJykudmFsdWUsIG5ld1ZhbHVlID0gMFxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCBjdXJyZW50VmFsdWUgIT0gJycgKVxyXG4gICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlID0gK2N1cnJlbnRWYWx1ZSArIDFcclxuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSggbmV3VmFsdWUgPCB0aGlzLmRpY3Rpb25hcnkubGVuZ3RoICYmIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJyN0cnAtc3RyaW5nLWNhdGVnb3JpZXMgb3B0aW9uW3ZhbHVlPVwiJyArIG5ld1ZhbHVlICsgJ1wiXScpLmxlbmd0aCA9PT0gMCApe1xyXG4gICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlKys7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCBuZXdWYWx1ZSA+PSB0aGlzLmRpY3Rpb25hcnkubGVuZ3RoICl7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZFN0cmluZyA9IG5ld1ZhbHVlLnRvU3RyaW5nKClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWRkS2V5Ym9hcmRTaG9ydGN1dHNMaXN0ZW5lcigpe1xyXG4gICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcImtleWRvd25cIiwgZnVuY3Rpb24oZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgod2luZG93Lm5hdmlnYXRvci5wbGF0Zm9ybS5tYXRjaChcIk1hY1wiKSA/IGUubWV0YUtleSA6IGUuY3RybEtleSkgJiYgZS5hbHRLZXkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIENUUkwgKyBBTFQgKyByaWdodCBhcnJvd1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiggZS5rZXlDb2RlID09PSAzOSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmRpc3BhdGNoRXZlbnQoIG5ldyBFdmVudCggJ3RycF90cmlnZ2VyX25leHRfc3RyaW5nX2V2ZW50JyApICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ1RSTCArIEFMVCArIGxlZnQgYXJyb3dcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBlLmtleUNvZGUgPT09IDM3ICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuZGlzcGF0Y2hFdmVudCggbmV3IEV2ZW50KCAndHJwX3RyaWdnZXJfcHJldmlvdXNfc3RyaW5nX2V2ZW50JyApICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICd0cnBfdHJpZ2dlcl9uZXh0X3N0cmluZ19ldmVudCcsIHRoaXMubmV4dFN0cmluZyApXHJcbiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lciggJ3RycF90cmlnZ2VyX3ByZXZpb3VzX3N0cmluZ19ldmVudCcsIHRoaXMucHJldmlvdXNTdHJpbmcgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICByZXNpemVJZnJhbWUgKGV2ZW50LCB1aSkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRvdGFsX3dpZHRoID0galF1ZXJ5KHdpbmRvdykud2lkdGgoKTtcclxuICAgICAgICAgICAgICAgIGxldCB3aWR0aCA9IGpRdWVyeSggJyN0cnAtY29udHJvbHMnICkud2lkdGgoKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZih3aWR0aCA+IHRvdGFsX3dpZHRoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGggPSB0b3RhbF93aWR0aDtcclxuICAgICAgICAgICAgICAgICAgICBjb250cm9scy5jc3MoJ3dpZHRoJywgd2lkdGgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbGV0IHByZXZpZXdDb250YWluZXIgPSBqUXVlcnkoICcjdHJwLXByZXZpZXcnICk7XHJcbiAgICAgICAgICAgICAgICBwcmV2aWV3Q29udGFpbmVyLmNzcygncmlnaHQnLCB3aWR0aCApO1xyXG4gICAgICAgICAgICAgICAgcHJldmlld0NvbnRhaW5lci5jc3MoJ2xlZnQnLCAoIHdpZHRoIC0gMzQ4ICkgKTtcclxuICAgICAgICAgICAgICAgIHByZXZpZXdDb250YWluZXIuY3NzKCd3aWR0aCcsICh0b3RhbF93aWR0aCAtIHdpZHRoKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIC8vYWRkIHN1cHBvcnQgZm9yIHYtbW9kZWwgaW4gc2VsZWN0MlxyXG4gICAgICAgIGRpcmVjdGl2ZXM6IHtcclxuICAgICAgICAgICAgc2VsZWN0Mjoge1xyXG4gICAgICAgICAgICAgICAgaW5zZXJ0ZWQoZWwpIHtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoZWwpLm9uKCdzZWxlY3QyOnNlbGVjdCcsICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZXZlbnQgPSBuZXcgRXZlbnQoJ2NoYW5nZScsIHsgYnViYmxlczogdHJ1ZSwgY2FuY2VsYWJsZTogdHJ1ZSB9KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbC5kaXNwYXRjaEV2ZW50KGV2ZW50KVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeShlbCkub24oJ3NlbGVjdDI6dW5zZWxlY3QnLCAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGV2ZW50ID0gbmV3IEV2ZW50KCdjaGFuZ2UnLCB7IGJ1YmJsZXM6IHRydWUsIGNhbmNlbGFibGU6IHRydWUgfSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgZWwuZGlzcGF0Y2hFdmVudChldmVudClcclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuPC9zY3JpcHQ+XHJcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/editor.vue?vue&type=script&lang=js&\n");
|
719 |
|
720 |
/***/ }),
|
721 |
|
715 |
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
716 |
|
717 |
"use strict";
|
718 |
+
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! select2/dist/js/select2.min.js */ \"./node_modules/select2/dist/js/select2.min.js\");\n/* harmony import */ var select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(select2_dist_js_select2_min_js__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./utils */ \"./assets/src/js/utils.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! axios */ \"./node_modules/axios/index.js\");\n/* harmony import */ var axios__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(axios__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _components_language_boxes_vue__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/language-boxes.vue */ \"./assets/src/js/components/language-boxes.vue\");\n/* harmony import */ var _components_save_translations_vue__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./components/save-translations.vue */ \"./assets/src/js/components/save-translations.vue\");\n/* harmony import */ var _components_hover_actions_vue__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./components/hover-actions.vue */ \"./assets/src/js/components/hover-actions.vue\");\n/* harmony import */ var _components_extra_content_vue__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./components/extra-content.vue */ \"./assets/src/js/components/extra-content.vue\");\n/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! he */ \"./node_modules/he/he.js\");\n/* harmony import */ var he__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(he__WEBPACK_IMPORTED_MODULE_7__);\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance\"); }\n\nfunction _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } }\n\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\n\n\n\n\n\n\n\n/* harmony default export */ __webpack_exports__[\"default\"] = ({\n props: ['trp_settings', 'language_names', 'ordered_secondary_languages', 'current_language', 'on_screen_language', 'view_as_roles', 'url_to_load', 'string_selectors', 'data_attributes', 'ajax_url', 'editor_nonces', 'string_group_order', 'merge_rules', 'localized_text', 'paid_version', 'flags_path'],\n components: {\n languageBoxes: _components_language_boxes_vue__WEBPACK_IMPORTED_MODULE_3__[\"default\"],\n saveTranslations: _components_save_translations_vue__WEBPACK_IMPORTED_MODULE_4__[\"default\"],\n hoverActions: _components_hover_actions_vue__WEBPACK_IMPORTED_MODULE_5__[\"default\"],\n extraContent: _components_extra_content_vue__WEBPACK_IMPORTED_MODULE_6__[\"default\"]\n },\n data: function data() {\n return {\n //props\n settings: JSON.parse(this.trp_settings),\n languageNames: JSON.parse(this.language_names),\n orderedSecondaryLanguages: JSON.parse(this.ordered_secondary_languages),\n roles: JSON.parse(this.view_as_roles),\n nonces: JSON.parse(this.editor_nonces),\n stringGroupOrder: JSON.parse(this.string_group_order),\n selectors: JSON.parse(this.string_selectors),\n dataAttributes: JSON.parse(this.data_attributes),\n mergeRules: JSON.parse(this.merge_rules),\n editorStrings: trp_localized_strings,\n flagsPath: JSON.parse(this.flags_path),\n //data\n currentLanguage: this.current_language,\n onScreenLanguage: this.on_screen_language,\n currentURL: this.url_to_load,\n urlToLoad: this.url_to_load,\n iframe: '',\n dictionary: [],\n selectedString: null,\n selectedIndexesArray: [],\n detectedSelectorAndId: [],\n stringGroups: [],\n mergingString: false,\n mergeData: [],\n showChangesUnsavedMessage: false,\n viewAs: '',\n loading_strings: 0,\n translationNotLoadedYet: false\n };\n },\n created: function created() {\n this.settings['default-language-name'] = this.languageNames[this.settings['default-language']]; //set default value for the View As select\n\n var params = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getUrlParameters(this.currentURL);\n if (Object.keys(params).length > 1 && params['trp-view-as']) this.viewAs = params['trp-view-as'];else this.viewAs = 'current_user';\n },\n mounted: function mounted() {\n this.addKeyboardShortcutsListener();\n var self = this; // initialize select2\n\n jQuery('#trp-language-select, #trp-view-as-select').select2({\n width: '100%'\n }); //init strings dropdown\n\n this.stringsDropdownLoading(); // show overlay when select is opened\n\n jQuery('#trp-language-select, #trp-string-categories').on('select2:open', function () {\n jQuery('#trp_select2_overlay').fadeIn('100');\n }).on('select2:close', function () {\n jQuery('#trp_select2_overlay').hide();\n }).on('select2:opening', function (e) {\n /* when we have unsaved changes prevent the strings dropdown from opening so we do not have a disconnect between the textareas and the dropdown */\n if (self.hasUnsavedChanges()) {\n e.preventDefault();\n }\n }); // resize sidebar and consequently the iframe\n\n var previewContainer = jQuery('#trp-preview');\n var total_width = jQuery(window).width();\n jQuery('#trp-controls').resizable({\n start: function start() {\n previewContainer.toggle();\n },\n stop: function stop() {\n previewContainer.toggle();\n },\n handles: 'e',\n minWidth: 285,\n maxWidth: total_width - 20\n }).bind(\"resize\", this.resizeIframe); // resize iframe when resizing window\n\n jQuery(window).resize(function () {\n self.resizeIframe();\n });\n },\n watch: {\n currentLanguage: function currentLanguage(_currentLanguage) {\n var self = this; //grab the correct URL from the iFrame\n\n var newURL = this.iframe.querySelector('link[hreflang=\"' + _currentLanguage.replace('_', '-') + '\"]').getAttribute('href');\n this.currentURL = newURL;\n this.iframe.location = newURL; //reset vue props\n\n this.selectedString = '';\n this.selectedIndexesArray = []; //set strings dropdown to loading state\n\n jQuery('#trp-string-categories').val('').trigger('change');\n this.stringsDropdownLoading();\n this.onScreenLanguage = _currentLanguage;\n\n if (this.settings['default-language'] == this.currentLanguage && this.settings['translation-languages'].length > 1) {\n this.settings['translation-languages'].some(function (language) {\n if (language != self.settings['default-language']) {\n // return the first language not default\n self.onScreenLanguage = language;\n return true;\n }\n });\n }\n },\n currentURL: function currentURL(newUrl, oldUrl) {\n window.history.replaceState(null, null, this.parentURL(newUrl));\n },\n viewAs: function viewAs(role) {\n if (!this.currentURL || !this.iframe) return;\n var url = this.cleanURL(this.currentURL);\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-edit-translation', 'preview');\n\n if (role == 'current_user') {\n this.iframe.location = url;\n return;\n } //if nonce not available, an update to the Browse as Other Roles add-on is required\n\n\n if (!this.nonces[role]) {\n alert(this.editorStrings.bor_update_notice);\n return;\n }\n\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-view-as', role);\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].updateUrlParameter(url, 'trp-view-as-nonce', this.nonces[role]);\n this.iframe.location = url;\n },\n selectedString: function selectedString(selectedStringArrayIndex, oldString) {\n if (this.hasUnsavedChanges() || !selectedStringArrayIndex && selectedStringArrayIndex !== 0) return;\n jQuery('#trp-string-categories').val(selectedStringArrayIndex !== null ? selectedStringArrayIndex : '').trigger('change');\n var selectedString = this.dictionary[selectedStringArrayIndex];\n if (!selectedString) return;\n var currentNode = this.iframe.querySelector(\"[\" + selectedString.selector + \"='\" + selectedString.dbID + \"']\");\n var selectedIndexesArray = []; //when merging we do not have a valid current node, so we just add the fake id\n\n if (currentNode) {\n var self = this;\n var selectors = self.getAllSelectors();\n var nodes = [];\n nodes.push(currentNode);\n\n if (currentNode.tagName != \"A\") {\n // include the anchor's translatable attributes\n var anchorParent = currentNode.closest('a');\n\n if (anchorParent != null) {\n nodes.push(anchorParent);\n }\n }\n\n if (currentNode.tagName == \"A\" && currentNode.children.length > 0) {\n // include all the translatable attributes inside the anchor\n var childrenArray = _toConsumableArray(currentNode.children);\n\n childrenArray.forEach(function (child) {\n nodes.push(child);\n });\n }\n\n nodes.forEach(function (node) {\n selectors.forEach(function (selector) {\n var stringId = node.getAttribute(selector);\n\n if (stringId) {\n var found = false;\n var i;\n\n for (i = 0; i < selectedIndexesArray.length; i++) {\n if (typeof self.dictionary[selectedIndexesArray[i]] !== 'undefined' && self.dictionary[selectedIndexesArray[i]].dbID !== 'undefined' && self.dictionary[selectedIndexesArray[i]].dbID === stringId) {\n found = true;\n break;\n }\n }\n\n if (!found) {\n selectedIndexesArray.push(self.getStringIndex(selector, stringId));\n }\n }\n });\n });\n } else selectedIndexesArray.push(selectedStringArrayIndex);\n\n this.selectedIndexesArray = selectedIndexesArray;\n }\n },\n computed: {\n closeURL: function closeURL() {\n return this.cleanURL(this.currentURL);\n }\n },\n methods: {\n iFrameLoaded: function iFrameLoaded() {\n var self = this;\n var iframeElement = document.querySelector('#trp-preview-iframe');\n this.iframe = iframeElement.contentDocument || iframeElement.contentWindow.document; //sync iFrame URL with parent\n\n if (this.currentURL != this.iframe.URL) this.currentURL = this.iframe.URL; //hide iFrame loader\n\n this.iframeLoader('hide');\n self.detectedSelectorAndId = [];\n self.dictionary = [];\n this.scanIframeForStrings();\n window.addEventListener('trp_iframe_page_updated', this.scanIframeForStrings); //event that is fired when the iFrame is navigated\n\n iframeElement.contentWindow.onbeforeunload = function () {\n self.iframeLoader('show');\n self.selectedString = null;\n self.selectedIndexesArray = [];\n self.translationNotLoadedYet = false;\n self.stringsDropdownLoading();\n };\n },\n scanIframeForStrings: function scanIframeForStrings() {\n this.scanForSelector('data-trp-translate-id', 'regular', this.onScreenLanguage);\n this.scanForSelector('data-trpgettextoriginal', 'gettext', this.currentLanguage);\n this.scanForSelector('data-trp-post-slug', 'postslug', this.currentLanguage);\n },\n scanForSelector: function scanForSelector(baseSelector, typeSlug, languageOfIds) {\n this.loading_strings++;\n var self = this;\n var selectors = this.prepareSelectorStrings(baseSelector);\n\n var nodes = _toConsumableArray(this.iframe.querySelectorAll('[' + selectors.join('],[') + ']'));\n\n var stringIdsArray = [],\n nodeData = [],\n nodeEntries = [];\n nodes.forEach(function (node) {\n nodeEntries = self.getNodeInfo(node, baseSelector);\n nodeEntries.forEach(function (entry) {\n // this check ensures that we don't create duplicates when rescanning after ajax complete\n if (!self.alreadyDetected(entry.selector, entry.dbID)) {\n stringIdsArray.push(entry.dbID);\n nodeData.push(entry);\n }\n });\n self.setupEventListener(node);\n }); //unique ids only\n\n stringIdsArray = _toConsumableArray(new Set(stringIdsArray));\n\n if (stringIdsArray.length > 0) {\n var data = new FormData();\n data.append('action', 'trp_get_translations_' + typeSlug);\n data.append('all_languages', 'true');\n data.append('security', this.nonces['gettranslationsnonce' + typeSlug]);\n data.append('language', languageOfIds);\n data.append('string_ids', JSON.stringify(stringIdsArray));\n axios__WEBPACK_IMPORTED_MODULE_2___default.a.post(this.ajax_url, data).then(function (response) {\n self.loading_strings--;\n self.addToDictionary(response.data, nodeData);\n })[\"catch\"](function (error) {\n console.log(error);\n });\n } else {\n self.loading_strings--;\n }\n },\n alreadyDetected: function alreadyDetected(selector, dbId) {\n var combined = selector + '=' + dbId;\n\n if (_utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].arrayContainsItem(this.detectedSelectorAndId, combined)) {\n return true;\n } else {\n this.detectedSelectorAndId.push(combined);\n return false;\n }\n },\n setupEventListener: function setupEventListener(node) {\n if (node.tagName == 'A' && !node.hasAttribute('data-trpgettextoriginal')) return false;\n var self = this;\n node.addEventListener('mouseenter', self.$refs.hoverActions.showPencilIcon);\n },\n addToDictionary: function addToDictionary(responseData) {\n var nodeInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;\n var self = this;\n\n if (responseData != null) {\n if (nodeInfo) {\n nodeInfo.forEach(function (infoRow, index) {\n responseData.some(function (responseDataRow) {\n if (infoRow.dbID == responseDataRow.dbID) {\n //bring block_type to the top level object\n if (responseDataRow.type != 'gettext' && typeof responseDataRow.block_type == 'undefined') {\n var firstLanguage = self.orderedSecondaryLanguages[0];\n if (typeof responseDataRow.translationsArray[firstLanguage].block_type != 'undefined') responseDataRow.block_type = responseDataRow.translationsArray[firstLanguage].block_type;\n }\n\n nodeInfo[index] = Object.assign({}, responseDataRow, infoRow);\n return true; // a sort of break\n }\n });\n });\n } else {\n nodeInfo = responseData;\n }\n\n this.stringGroups = this.addToStringGroups(nodeInfo);\n this.dictionary = this.dictionary.concat(nodeInfo);\n this.initStringsDropdown();\n }\n },\n addToStringGroups: function addToStringGroups(strings) {\n // see what node groups are found\n var foundStringGroups = this.stringGroups;\n strings.forEach(function (string) {\n if (foundStringGroups.indexOf(string.group) === -1 && (typeof string.blockType === 'undefined' || string.blockType !== '2')) {\n foundStringGroups.push(string.group);\n }\n }); // put the node groups in the order that we want, according to the prop this.stringGroupOrder\n\n var orderedStringGroups = [];\n\n if (this.editorStrings.seo_update_notice != 'seo_pack_update_not_needed') {\n orderedStringGroups.push(this.editorStrings.seo_update_notice);\n }\n\n this.stringGroupOrder.forEach(function (group) {\n if (foundStringGroups.indexOf(group) !== -1) {\n orderedStringGroups.push(group);\n }\n }); // if there were any other string groups that were not in the prop, add them at the end.\n\n foundStringGroups.forEach(function (group) {\n if (orderedStringGroups.indexOf(group) === -1) {\n orderedStringGroups.push(group);\n }\n });\n return orderedStringGroups;\n },\n getStringIndex: function getStringIndex(selector, dbID) {\n var found = null;\n this.dictionary.some(function (string, index) {\n if (string.dbID == dbID && string.selector == selector) {\n found = index;\n return true;\n }\n });\n return found;\n },\n getNodeInfo: function getNodeInfo(node) {\n var baseSelector = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';\n var stringId;\n var nodeData = [];\n var selectors = this.prepareSelectorStrings(baseSelector);\n selectors.forEach(function (selector) {\n stringId = node.getAttribute(selector);\n\n if (stringId) {\n var nodeAttribute = selector.replace(baseSelector, '');\n var nodeGroup = node.getAttribute('data-trp-node-group' + nodeAttribute);\n var nodeDescription = node.getAttribute('data-trp-node-description' + nodeAttribute);\n var entry = {\n dbID: stringId,\n selector: selector,\n attribute: nodeAttribute.substr(1) // substr(1) is used to trim prefixing line - ex. -alt will result in alt (no line)\n\n };\n if (nodeGroup) entry.group = nodeGroup;\n if (nodeDescription) entry.description = nodeDescription;\n nodeData.push(entry);\n }\n });\n return nodeData;\n },\n getAllSelectors: function getAllSelectors() {\n var selectors = [];\n var self = this;\n this.dataAttributes.forEach(function (dataAttribute) {\n selectors = selectors.concat(self.prepareSelectorStrings(dataAttribute));\n });\n return selectors;\n },\n prepareSelectorStrings: function prepareSelectorStrings(baseNameSelector) {\n var parsed_selectors = [];\n this.selectors.forEach(function (selectorSuffix, index) {\n parsed_selectors.push(baseNameSelector + selectorSuffix);\n });\n return parsed_selectors;\n },\n parentURL: function parentURL(url) {\n return url.replace('trp-edit-translation=preview', 'trp-edit-translation=true');\n },\n cleanURL: function cleanURL(url) {\n //make removeUrlParameter recursive and only call it once with all the parameters that\n //need to stripped ?\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'lang');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-view-as');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-view-as-nonce');\n url = _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].removeUrlParameter(url, 'trp-edit-translation');\n return url;\n },\n showString: function showString(string, type) {\n if (typeof string.blockType !== 'undefined' && string.blockType === '2') {\n // don't show deprecated translation blocks in the dropdown\n return false;\n }\n\n if (type === this.editorStrings.images && typeof string.attribute != 'undefined' && string.attribute == 'src') return true;\n if (typeof string.attribute !== 'undefined' && (string.attribute == 'href' || string.attribute == 'src')) return false;\n if (string.group === type) return true;\n return false;\n },\n initStringsDropdown: function initStringsDropdown() {\n var self = this;\n\n if (!this.isStringsDropdownOpen()) {\n jQuery('#trp-string-categories').select2('destroy');\n jQuery('#trp-string-categories').select2({\n placeholder: self.editorStrings.select_string,\n templateResult: function templateResult(option) {\n var original = he__WEBPACK_IMPORTED_MODULE_7___default.a.decode(option.text.substring(0, 90)) + (option.text.length <= 90 ? '' : '...');\n var description = option.title ? '(' + option.title + ')' : '';\n return jQuery('<div>' + original + '</div><div class=\"string-selector-description\">' + description + '</div>');\n },\n width: '100%'\n }).prop('disabled', false);\n jQuery('#trp_select2_overlay').hide();\n }\n },\n stringsDropdownLoading: function stringsDropdownLoading() {\n jQuery('#trp-string-categories').select2({\n placeholder: this.editorStrings.strings_loading,\n width: '100%'\n }).prop('disabled', true);\n },\n processOptionName: function processOptionName(name, type) {\n if (type == 'Images') return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].getFilename(name);\n return _utils__WEBPACK_IMPORTED_MODULE_1__[\"default\"].escapeHtml(name);\n },\n isStringsDropdownOpen: function isStringsDropdownOpen() {\n return jQuery('#trp-string-categories').select2('isOpen');\n },\n hasUnsavedChanges: function hasUnsavedChanges() {\n var unsavedChanges = false;\n var self = this;\n\n if (this.selectedIndexesArray.length > 0) {\n this.selectedIndexesArray.forEach(function (selectedIndex) {\n self.settings['translation-languages'].forEach(function (languageCode) {\n if (self.dictionary[selectedIndex] && self.dictionary[selectedIndex].translationsArray[languageCode] && self.dictionary[selectedIndex].translationsArray[languageCode].translated !== self.dictionary[selectedIndex].translationsArray[languageCode].editedTranslation) {\n unsavedChanges = true;\n }\n });\n });\n }\n\n this.showChangesUnsavedMessage = unsavedChanges;\n return unsavedChanges;\n },\n iframeLoader: function iframeLoader(status) {\n var loader = document.getElementById('trp-preview-loader');\n if (status == 'show') loader.style.display = 'flex';else if (status == 'hide') loader.style.display = 'none';\n },\n previousString: function previousString() {\n var currentValue = document.getElementById('trp-string-categories').value;\n var newValue = +currentValue - 1;\n\n while (newValue >= 0 && document.querySelectorAll('#trp-string-categories option[value=\"' + newValue + '\"]').length === 0) {\n newValue--;\n }\n\n if (newValue < 0) return;\n this.selectedString = newValue.toString();\n },\n nextString: function nextString() {\n var currentValue = document.getElementById('trp-string-categories').value,\n newValue = 0;\n if (currentValue != '') newValue = +currentValue + 1;\n\n while (newValue < this.dictionary.length && document.querySelectorAll('#trp-string-categories option[value=\"' + newValue + '\"]').length === 0) {\n newValue++;\n }\n\n if (newValue >= this.dictionary.length) {\n return;\n }\n\n this.selectedString = newValue.toString();\n },\n addKeyboardShortcutsListener: function addKeyboardShortcutsListener() {\n document.addEventListener(\"keydown\", function (e) {\n if ((window.navigator.platform.match(\"Mac\") ? e.metaKey : e.ctrlKey) && e.altKey) {\n // CTRL + ALT + right arrow\n if (e.keyCode === 39) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_next_string_event'));\n } else {\n // CTRL + ALT + left arrow\n if (e.keyCode === 37) {\n e.preventDefault();\n window.dispatchEvent(new Event('trp_trigger_previous_string_event'));\n }\n }\n }\n }, false);\n window.addEventListener('trp_trigger_next_string_event', this.nextString);\n window.addEventListener('trp_trigger_previous_string_event', this.previousString);\n },\n resizeIframe: function resizeIframe(event, ui) {\n var total_width = jQuery(window).width();\n var width = jQuery('#trp-controls').width();\n\n if (width > total_width) {\n width = total_width;\n controls.css('width', width);\n }\n\n var previewContainer = jQuery('#trp-preview');\n previewContainer.css('right', width);\n previewContainer.css('left', width - 348);\n previewContainer.css('width', total_width - width);\n }\n },\n //add support for v-model in select2\n directives: {\n select2: {\n inserted: function inserted(el) {\n jQuery(el).on('select2:select', function () {\n var event = new Event('change', {\n bubbles: true,\n cancelable: true\n });\n el.dispatchEvent(event);\n });\n jQuery(el).on('select2:unselect', function () {\n var event = new Event('change', {\n bubbles: true,\n cancelable: true\n });\n el.dispatchEvent(event);\n });\n }\n }\n }\n});//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vYXNzZXRzL3NyYy9qcy9lZGl0b3IudnVlP2E3NjUiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7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zZWxlY3RlZEluZGV4ZXNBcnJheT1cInNlbGVjdGVkSW5kZXhlc0FycmF5XCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZGljdGlvbmFyeT1cImRpY3Rpb25hcnlcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzZXR0aW5ncz1cInNldHRpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6bm9uY2VzPVwibm9uY2VzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6YWpheF91cmw9XCJhamF4X3VybFwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmN1cnJlbnRMYW5ndWFnZT1cImN1cnJlbnRMYW5ndWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm9uU2NyZWVuTGFuZ3VhZ2U9XCJvblNjcmVlbkxhbmd1YWdlXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6aWZyYW1lPVwiaWZyYW1lXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA6Y3VycmVudFVSTD1cImN1cnJlbnRVUkxcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDptZXJnaW5nU3RyaW5nPVwibWVyZ2luZ1N0cmluZ1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOm1lcmdlRGF0YT1cIm1lcmdlRGF0YVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgQHRyYW5zbGF0aW9ucy1zYXZlZD1cInNob3dDaGFuZ2VzVW5zYXZlZE1lc3NhZ2UgPSBmYWxzZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgOmVkaXRvclN0cmluZ3M9XCJlZGl0b3JTdHJpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8L3NhdmUtdHJhbnNsYXRpb25zPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgPGRpdiBjbGFzcz1cInRycC1jb250cm9scy1zZWN0aW9uXCI+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvbi1jb250ZW50XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgaWQ9XCJ0cnAtbGFuZ3VhZ2Utc3dpdGNoXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGlkPVwidHJwLWxhbmd1YWdlLXNlbGVjdFwiIG5hbWU9XCJsYW5nXCIgdi1tb2RlbD1cImN1cnJlbnRMYW5ndWFnZVwiIHYtc2VsZWN0Mj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8b3B0aW9uIHYtZm9yPVwiKGxhbmcsIGxhbmdJbmRleCkgaW4gbGFuZ3VhZ2VOYW1lc1wiIDp2YWx1ZT1cImxhbmdJbmRleFwiPnt7bGFuZ319PC9vcHRpb24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NlbGVjdD5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwidHJwLXN0cmluZy1saXN0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c2VsZWN0IGlkPVwidHJwLXN0cmluZy1jYXRlZ29yaWVzXCIgdi1tb2RlbD1cInNlbGVjdGVkU3RyaW5nXCIgdi1zZWxlY3QyPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRncm91cCB2LWZvcj1cIihncm91cCkgaW4gc3RyaW5nR3JvdXBzXCIgOmxhYmVsPVwiZ3JvdXBcIj5cclxuICAgICA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pbmcoKVwiIDp0aXRsZT1cImVkaXRvclN0cmluZ3MubmV4dF90aXRsZV9hdHRyXCI+e3sgZWRpdG9yU3RyaW5ncy5uZXh0IH19IDxzcGFuPiZyYXF1bzs8L3NwYW4+PC9idXR0b24+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cInRycC12aWV3LWFzXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZGl2IGlkPVwidHJwLXZpZXctYXMtZGVzY3JpcHRpb25cIj57eyBlZGl0b3JTdHJpbmdzLnZpZXdfYXMgfX08L2Rpdj5cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxzZWxlY3QgaWQ9XCJ0cnAtdmlldy1hcy1zZWxlY3RcIiB2LW1vZGVsPVwidmlld0FzXCIgdi1zZWxlY3QyPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxvcHRpb24gdi1mb3I9XCIocm9sZSwgcm9sZUluZGV4KSBpbiByb2xlc1wiIDp2YWx1ZT1cInJvbGVcIiA6ZGlzYWJsZWQ9XCIhcm9sZVwiIDp0aXRsZT1cIiFyb2xlID8gZWRpdG9yU3RyaW5ncy52aWV3X2FzX3BybyA6ICcnXCI+e3tyb2xlSW5kZXh9fTwvb3B0aW9uPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9zZWxlY3Q+XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvblwiIHYtc2hvdz1cInNlbGVjdGVkU3RyaW5nICE9PSBudWxsXCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGxhbmd1YWdlLWJveGVzXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6c2VsZWN0ZWRJbmRleGVzQXJyYXk9XCJzZWxlY3RlZEluZGV4ZXNBcnJheVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZGljdGlvbmFyeT1cImRpY3Rpb25hcnlcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOmN1cnJlbnRMYW5ndWFnZT1cImN1cnJlbnRMYW5ndWFnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6b25TY3JlZW5MYW5ndWFnZT1cIm9uU2NyZWVuTGFuZ3VhZ2VcIlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgOmxhbmd1YWdlTmFtZXM9XCJsYW5ndWFnZU5hbWVzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzZXR0aW5ncz1cInNldHRpbmdzXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDpzaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlPVwic2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZVwiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBAZGlzY2FyZGVkLWNoYW5nZXM9XCJoYXNVbnNhdmVkQ2hhbmdlcygpXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDplZGl0b3JTdHJpbmdzPVwiZWRpdG9yU3RyaW5nc1wiXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA6ZmxhZ3NQYXRoPVwiZmxhZ3NQYXRoXCJcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIDppZnJhbWU9XCJpZnJhbWVcIlxyXG4gICAgICAgICAgICAgICAgICAgID5cclxuICAgICAgICAgICAgICAgICAgICA8L2xhbmd1YWdlLWJveGVzPlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcblxyXG4gICAgICAgICAgICAgICAgPGV4dHJhLWNvbnRlbnQgOmxhbmd1YWdlTmFtZXM9XCJsYW5ndWFnZU5hbWVzXCIgOmVkaXRvclN0cmluZ3M9XCJlZGl0b3JTdHJpbmdzXCIgOnBhaWRWZXJzaW9uPVwicGFpZF92ZXJzaW9uXCI+PC9leHRyYS1jb250ZW50PlxyXG5cclxuICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9XCJ0cnAtY29udHJvbHMtc2VjdGlvblwiIHYtc2hvdz1cInRyYW5zbGF0aW9uTm90TG9hZGVkWWV0XCI+XHJcbiAgICAgICAgICAgICAgICAgICAgPGRpdiBpZD1cInRycC10cmFuc2xhdGlvbi1ub3QtcmVhZHktc2VjdGlvblwiIGNsYXNzPVwidHJwLWNvbnRyb2xzLXNlY3Rpb24tY29udGVudFwiPlxyXG4gICAgICAgICAgICAgICAgICAgICAgICA8cCB2LWh0bWw9XCJlZGl0b3JTdHJpbmdzLnRyYW5zbGF0aW9uX25vdF9sb2FkZWRfeWV0XCI+PC9wPlxyXG4gICAgICAgICAgICAgICAgICAgIDwvZGl2PlxyXG4gICAgICAgICAgICAgICAgPC9kaXY+XHJcbiAgICAgICAgICAgIDwvZGl2PlxyXG5cclxuICAgICAgICAgICAgPGRpdiBpZD1cInRycF9zZWxlY3QyX292ZXJsYXlcIj48L2Rpdj5cclxuXHJcbiAgICAgICAgICAgIDxob3Zlci1hY3Rpb25zXHJcbiAgICAgICAgICAgICAgICByZWY9XCJob3ZlckFjdGlvbnNcIlxyXG4gICAgICAgICAgICAgICAgOmRpY3Rpb25hcnk9XCJkaWN0aW9uYXJ5XCJcclxuICAgICAgICAgICAgICAgIDpzZXR0aW5ncz1cInNldHRpbmdzXCJcclxuICAgICAgICAgICAgICAgIDppZnJhbWU9XCJpZnJhbWVcIlxyXG4gICAgICAgICAgICAgICAgOmRhdGFBdHRyaWJ1dGVzPVwiZGF0YUF0dHJpYnV0ZXNcIlxyXG4gICAgICAgICAgICAgICAgOm1lcmdlUnVsZXM9XCJtZXJnZVJ1bGVzXCJcclxuICAgICAgICAgICAgICAgIDpub25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2PlxyXG48L3RlbXBsYXRlPlxyXG5cclxuPHNjcmlwdD5cclxuICAgIGltcG9ydCAnc2VsZWN0Mi9kaXN0L2pzL3NlbGVjdDIubWluLmpzJ1xyXG4gICAgaW1wb3J0IHV0aWxzICAgICAgICAgICAgZnJvbSAnLi91dGlscydcclxuICAgIGltcG9ydCBheGlvcyAgICAgICAgICAgIGZyb20gJ2F4aW9zJ1xyXG4gICAgaW1wb3J0IGxhbmd1YWdlQm94ZXMgICAgZnJvbSAnLi9jb21wb25lbnRzL2xhbmd1YWdlLWJveGVzLnZ1ZSdcclxuICAgIGltcG9ydCBzYXZlVHJhbnNsYXRpb25zIGZyb20gJy4vY29tcG9uZW50cy9zYXZlLXRyYW5zbGF0aW9ucy52dWUnXHJcbiAgICBpbXBvcnQgaG92ZXJBY3Rpb25zICAgICBmcm9tICcuL2NvbXBvbmVudHMvaG92ZXItYWN0aW9ucy52dWUnXHJcbiAgICBpbXBvcnQgZXh0cmFDb250ZW50ICAgICBmcm9tICcuL2NvbXBvbmVudHMvZXh0cmEtY29udGVudC52dWUnXHJcbiAgICBpbXBvcnQgaGUgICAgICAgICAgICAgICBmcm9tICdoZSdcclxuXHJcbiAgICBleHBvcnQgZGVmYXVsdCB7XHJcbiAgICAgICAgcHJvcHM6IFtcclxuICAgICAgICAgICAgJ3RycF9zZXR0aW5ncycsXHJcbiAgICAgICAgICAgICdsYW5ndWFnZV9uYW1lcycsXHJcbiAgICAgICAgICAgICdvcmRlcmVkX3NlY29uZGFyeV9sYW5ndWFnZXMnLFxyXG4gICAgICAgICAgICAnY3VycmVudF9sYW5ndWFnZScsXHJcbiAgICAgICAgICAgICdvbl9zY3JlZW5fbGFuZ3VhZ2UnLFxyXG4gICAgICAgICAgICAndmlld19hc19yb2xlcycsXHJcbiAgICAgICAgICAgICd1cmxfdG9fbG9hZCcsXHJcbiAgICAgICAgICAgICdzdHJpbmdfc2VsZWN0b3JzJyxcclxuICAgICAgICAgICAgJ2RhdGFfYXR0cmlidXRlcycsXHJcbiAgICAgICAgICAgICdhamF4X3VybCcsXHJcbiAgICAgICAgICAgICdlZGl0b3Jfbm9uY2VzJyxcclxuICAgICAgICAgICAgJ3N0cmluZ19ncm91cF9vcmRlcicsXHJcbiAgICAgICAgICAgICdtZXJnZV9ydWxlcycsXHJcbiAgICAgICAgICAgICdsb2NhbGl6ZWRfdGV4dCcsXHJcbiAgICAgICAgICAgICdwYWlkX3ZlcnNpb24nLFxyXG4gICAgICAgICAgICAnZmxhZ3NfcGF0aCdcclxuICAgICAgICBdLFxyXG4gICAgICAgIGNvbXBvbmVudHM6e1xyXG4gICAgICAgICAgICBsYW5ndWFnZUJveGVzLFxyXG4gICAgICAgICAgICBzYXZlVHJhbnNsYXRpb25zLFxyXG4gICAgICAgICAgICBob3ZlckFjdGlvbnMsXHJcbiAgICAgICAgICAgIGV4dHJhQ29udGVudFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgZGF0YSgpe1xyXG4gICAgICAgICAgICByZXR1cm4ge1xyXG4gICAgICAgICAgICAgICAgLy9wcm9wc1xyXG4gICAgICAgICAgICAgICAgc2V0dGluZ3MgICAgICAgICAgICAgICAgICA6IEpTT04ucGFyc2UoIHRoaXMudHJwX3NldHRpbmdzICksXHJcbiAgICAgICAgICAgICAgICBsYW5ndWFnZU5hbWVzICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5sYW5ndWFnZV9uYW1lcyApLFxyXG4gICAgICAgICAgICAgICAgb3JkZXJlZFNlY29uZGFyeUxhbmd1YWdlcyA6IEpTT04ucGFyc2UoIHRoaXMub3JkZXJlZF9zZWNvbmRhcnlfbGFuZ3VhZ2VzICksXHJcbiAgICAgICAgICAgICAgICByb2xlcyAgICAgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy52aWV3X2FzX3JvbGVzICksXHJcbiAgICAgICAgICAgICAgICBub25jZXMgICAgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5lZGl0b3Jfbm9uY2VzKSxcclxuICAgICAgICAgICAgICAgIHN0cmluZ0dyb3VwT3JkZXIgICAgICAgICAgOiBKU09OLnBhcnNlKCB0aGlzLnN0cmluZ19ncm91cF9vcmRlciksXHJcbiAgICAgICAgICAgICAgICBzZWxlY3RvcnMgICAgICAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5zdHJpbmdfc2VsZWN0b3JzICksXHJcbiAgICAgICAgICAgICAgICBkYXRhQXR0cmlidXRlcyAgICAgICAgICAgIDogSlNPTi5wYXJzZSggdGhpcy5kYXRhX2F0dHJpYnV0ZXMgKSxcclxuICAgICAgICAgICAgICAgIG1lcmdlUnVsZXMgICAgICAgICAgICAgICAgOiBKU09OLnBhcnNlKCB0aGlzLm1lcmdlX3J1bGVzICksXHJcbiAgICAgICAgICAgICAgICBlZGl0b3JTdHJpbmdzICAgICAgICAgICAgIDogdHJwX2xvY2FsaXplZF9zdHJpbmdzLFxyXG4gICAgICAgICAgICAgICAgZmxhZ3NQYXRoICAgICAgICAgICAgICAgICA6IEpTT04ucGFyc2UoIHRoaXMuZmxhZ3NfcGF0aCApLFxyXG4gICAgICAgICAgICAgICAgLy9kYXRhXHJcbiAgICAgICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2UgICAgICAgICAgIDogdGhpcy5jdXJyZW50X2xhbmd1YWdlLFxyXG4gICAgICAgICAgICAgICAgb25TY3JlZW5MYW5ndWFnZSAgICAgICAgICA6IHRoaXMub25fc2NyZWVuX2xhbmd1YWdlLFxyXG4gICAgICAgICAgICAgICAgY3VycmVudFVSTCAgICAgICAgICAgICAgICA6IHRoaXMudXJsX3RvX2xvYWQsXHJcbiAgICAgICAgICAgICAgICB1cmxUb0xvYWQgICAgICAgICAgICAgICAgIDogdGhpcy51cmxfdG9fbG9hZCxcclxuICAgICAgICAgICAgICAgIGlmcmFtZSAgICAgICAgICAgICAgICAgICAgOiAnJyxcclxuICAgICAgICAgICAgICAgIGRpY3Rpb25hcnkgICAgICAgICAgICAgICAgOiBbXSxcclxuICAgICAgICAgICAgICAgIHNlbGVjdGVkU3RyaW5nICAgICAgICAgICAgOiBudWxsLFxyXG4gICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleGVzQXJyYXkgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgZGV0ZWN0ZWRTZWxlY3RvckFuZElkICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgc3RyaW5nR3JvdXBzICAgICAgICAgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgbWVyZ2luZ1N0cmluZyAgICAgICAgICAgICA6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgbWVyZ2VEYXRhICAgICAgICAgICAgICAgICA6IFtdLFxyXG4gICAgICAgICAgICAgICAgc2hvd0NoYW5nZXNVbnNhdmVkTWVzc2FnZSA6IGZhbHNlLFxyXG4gICAgICAgICAgICAgICAgdmlld0FzICAgICAgICAgICAgICAgICAgICA6ICcnLFxyXG4gICAgICAgICAgICAgICAgbG9hZGluZ19zdHJpbmdzICAgICAgICAgICA6IDAsXHJcbiAgICAgICAgICAgICAgICB0cmFuc2xhdGlvbk5vdExvYWRlZFlldCAgIDogZmFsc2UsXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIGNyZWF0ZWQoKXtcclxuICAgICAgICAgICAgdGhpcy5zZXR0aW5nc1snZGVmYXVsdC1sYW5ndWFnZS1uYW1lJ10gPSB0aGlzLmxhbmd1YWdlTmFtZXNbIHRoaXMuc2V0dGluZ3NbJ2RlZmF1bHQtbGFuZ3VhZ2UnXSBdXHJcblxyXG4gICAgICAgICAgICAvL3NldCBkZWZhdWx0IHZhbHVlIGZvciB0aGUgVmlldyBBcyBzZWxlY3RcclxuICAgICAgICAgICAgbGV0IHBhcmFtcyA9IHV0aWxzLmdldFVybFBhcmFtZXRlcnMoIHRoaXMuY3VycmVudFVSTCApXHJcblxyXG4gICAgICAgICAgICBpZiggT2JqZWN0LmtleXMocGFyYW1zKS5sZW5ndGggPiAxICYmIHBhcmFtc1sndHJwLXZpZXctYXMnXSApXHJcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdBcyA9IHBhcmFtc1sndHJwLXZpZXctYXMnXVxyXG4gICAgICAgICAgICBlbHNlXHJcbiAgICAgICAgICAgICAgICB0aGlzLnZpZXdBcyA9ICdjdXJyZW50X3VzZXInXHJcbiAgICAgICAgfSxcclxuICAgICAgICBtb3VudGVkKCl7XHJcbiAgICAgICAgICAgIHRoaXMuYWRkS2V5Ym9hcmRTaG9ydGN1dHNMaXN0ZW5lcigpXHJcbiAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG4gICAgICAgICAgICAvLyBpbml0aWFsaXplIHNlbGVjdDJcclxuICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1sYW5ndWFnZS1zZWxlY3QsICN0cnAtdmlldy1hcy1zZWxlY3QnICkuc2VsZWN0MiggeyB3aWR0aCA6ICcxMDAlJyB9KVxyXG5cclxuICAgICAgICAgICAgLy9pbml0IHN0cmluZ3MgZHJvcGRvd25cclxuICAgICAgICAgICAgdGhpcy5zdHJpbmdzRHJvcGRvd25Mb2FkaW5nKClcclxuXHJcbiAgICAgICAgICAgIC8vIHNob3cgb3ZlcmxheSB3aGVuIHNlbGVjdCBpcyBvcGVuZWRcclxuICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1sYW5ndWFnZS1zZWxlY3QsICN0cnAtc3RyaW5nLWNhdGVnb3JpZXMnICkub24oICdzZWxlY3QyOm9wZW4nLCBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSggJyN0cnBfc2VsZWN0Ml9vdmVybGF5JyApLmZhZGVJbiggJzEwMCcgKVxyXG4gICAgICAgICAgICB9KS5vbiggJ3NlbGVjdDI6Y2xvc2UnLCBmdW5jdGlvbigpIHtcclxuICAgICAgICAgICAgICAgIGpRdWVyeSggJyN0cnBfc2VsZWN0Ml9vdmVybGF5JyApLmhpZGUoKVxyXG4gICAgICAgICAgICB9KS5vbiggJ3NlbGVjdDI6b3BlbmluZycsIGZ1bmN0aW9uKGUpIHtcclxuICAgICAgICAgICAgICAgIC8qIHdoZW4gd2UgaGF2ZSB1bnNhdmVkIGNoYW5nZXMgcHJldmVudCB0aGUgc3RyaW5ncyBkcm9wZG93biBmcm9tIG9wZW5pbmcgc28gd2UgZG8gbm90IGhhdmUgYSBkaXNjb25uZWN0IGJldHdlZW4gdGhlIHRleHRhcmVhcyBhbmQgdGhlIGRyb3Bkb3duICovXHJcbiAgICAgICAgICAgICAgICBpZiAoc2VsZi5oYXNVbnNhdmVkQ2hhbmdlcygpKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAvLyByZXNpemUgc2lkZWJhciBhbmQgY29uc2VxdWVudGx5IHRoZSBpZnJhbWVcclxuICAgICAgICAgICAgbGV0IHByZXZpZXdDb250YWluZXIgPSBqUXVlcnkoICcjdHJwLXByZXZpZXcnICk7XHJcbiAgICAgICAgICAgIGxldCB0b3RhbF93aWR0aCA9IGpRdWVyeSh3aW5kb3cpLndpZHRoKCk7XHJcbiAgICAgICAgICAgIGpRdWVyeSggJyN0cnAtY29udHJvbHMnICkucmVzaXphYmxlKHtcclxuICAgICAgICAgICAgICAgIHN0YXJ0OiBmdW5jdGlvbiggKSB7IHByZXZpZXdDb250YWluZXIudG9nZ2xlKCk7IH0sXHJcbiAgICAgICAgICAgICAgICBzdG9wOiBmdW5jdGlvbiggKSB7IHByZXZpZXdDb250YWluZXIudG9nZ2xlKCk7IH0sXHJcbiAgICAgICAgICAgICAgICBoYW5kbGVzOiAnZScsXHJcbiAgICAgICAgICAgICAgICBtaW5XaWR0aDogMjg1LFxyXG4gICAgICAgICAgICAgICAgbWF4V2lkdGg6IHRvdGFsX3dpZHRoIC0gMjBcclxuICAgICAgICAgICAgfSkuYmluZCggXCJyZXNpemVcIiwgdGhpcy5yZXNpemVJZnJhbWUgKTtcclxuXHJcbiAgICAgICAgICAgIC8vIHJlc2l6ZSBpZnJhbWUgd2hlbiByZXNpemluZyB3aW5kb3dcclxuICAgICAgICAgICAgalF1ZXJ5KCB3aW5kb3cgKS5yZXNpemUoZnVuY3Rpb24gKCkge1xyXG4gICAgICAgICAgICAgICAgc2VsZi5yZXNpemVJZnJhbWUoKTtcclxuICAgICAgICAgICAgfSk7XHJcbiAgICAgICAgfSxcclxuICAgICAgICB3YXRjaDoge1xyXG4gICAgICAgICAgICBjdXJyZW50TGFuZ3VhZ2U6IGZ1bmN0aW9uKCBjdXJyZW50TGFuZ3VhZ2UgKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIC8vZ3JhYiB0aGUgY29ycmVjdCBVUkwgZnJvbSB0aGUgaUZyYW1lXHJcbiAgICAgICAgICAgICAgICBsZXQgbmV3VVJMID0gdGhpcy5pZnJhbWUucXVlcnlTZWxlY3RvciggJ2xpbmtbaHJlZmxhbmc9XCInICsgY3VycmVudExhbmd1YWdlLnJlcGxhY2UoICdfJywgJy0nICkgKydcIl0nICkuZ2V0QXR0cmlidXRlKCdocmVmJylcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRVUkwgICAgICAgICAgID0gbmV3VVJMXHJcbiAgICAgICAgICAgICAgICB0aGlzLmlmcmFtZS5sb2NhdGlvbiAgICAgID0gbmV3VVJMXHJcblxyXG4gICAgICAgICAgICAgICAgLy9yZXNldCB2dWUgcHJvcHNcclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRTdHJpbmcgICAgICAgPSAnJ1xyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZEluZGV4ZXNBcnJheSA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgLy9zZXQgc3RyaW5ncyBkcm9w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B7XHJcbiAgICAgICAgICAgICAgICB3aW5kb3cuaGlzdG9yeS5yZXBsYWNlU3RhdGUoIG51bGwsIG51bGwsIHRoaXMucGFyZW50VVJMKCBuZXdVcmwgKSApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHZpZXdBczogZnVuY3Rpb24oIHJvbGUgKSB7XHJcbiAgICAgICAgICAgICAgICBpZiggIXRoaXMuY3VycmVudFVSTCB8fCAhdGhpcy5pZnJhbWUgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxyXG5cclxuICAgICAgICAgICAgICAgIGxldCB1cmwgPSB0aGlzLmNsZWFuVVJMKCB0aGlzLmN1cnJlbnRVUkwgKVxyXG5cclxuICAgICAgICAgICAgICAgIHVybCA9IHV0aWxzLnVwZGF0ZVVybFBhcmFtZXRlciggdXJsLCAndHJwLWVkaXQtdHJhbnNsYXRpb24nLCAncHJldmlldycgKVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCByb2xlID09ICdjdXJyZW50X3VzZXInICkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuaWZyYW1lLmxvY2F0aW9uID0gdXJsXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgLy9pZiBub25jZSBub3QgYXZhaWxhYmxlLCBhbiB1cGRhdGUgdG8gdGhlIEJyb3dzZSBhcyBPdGhlciBSb2xlcyBhZGQtb24gaXMgcmVxdWlyZWRcclxuICAgICAgICAgICAgICAgIGlmKCAhdGhpcy5ub25jZXNbcm9sZV0gKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgYWxlcnQoIHRoaXMuZWRpdG9yU3RyaW5ncy5ib3JfdXBkYXRlX25vdGljZSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMudXBkYXRlVXJsUGFyYW1ldGVyKCB1cmwsICd0cnAtdmlldy1hcycsIHJvbGUgKVxyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMudXBkYXRlVXJsUGFyYW1ldGVyKCB1cmwsICd0cnAtdmlldy1hcy1ub25jZScsIHRoaXMubm9uY2VzW3JvbGVdIClcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmlmcmFtZS5sb2NhdGlvbiA9IHVybFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzZWxlY3RlZFN0cmluZzogZnVuY3Rpb24gKCBzZWxlY3RlZFN0cmluZ0FycmF5SW5kZXgsIG9sZFN0cmluZyApe1xyXG5cclxuICAgICAgICAgICAgICAgIGlmKCB0aGlzLmhhc1Vuc2F2ZWRDaGFuZ2VzKCkgfHwgKCAhc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4ICYmIHNlbGVjdGVkU3RyaW5nQXJyYXlJbmRleCAhPT0gMCApIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29yaWVzJyApLnZhbCggc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4ICE9PSBudWxsID8gc2VsZWN0ZWRTdHJpbmdBcnJheUluZGV4IDogJycgKS50cmlnZ2VyKCAnY2hhbmdlJyApXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGVjdGVkU3RyaW5nICAgICAgID0gdGhpcy5kaWN0aW9uYXJ5W3NlbGVjdGVkU3RyaW5nQXJyYXlJbmRleF1cclxuXHJcbiAgICAgICAgICAgICAgICBpZiggIXNlbGVjdGVkU3RyaW5nIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm5cclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudE5vZGUgICAgICAgICAgPSB0aGlzLmlmcmFtZS5xdWVyeVNlbGVjdG9yKCBcIltcIiArIHNlbGVjdGVkU3RyaW5nLnNlbGVjdG9yICsgXCI9J1wiICsgc2VsZWN0ZWRTdHJpbmcuZGJJRCArIFwiJ11cIilcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RlZEluZGV4ZXNBcnJheSA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgLy93aGVuIG1lcmdpbmcgd2UgZG8gbm90IGhhdmUgYSB2YWxpZCBjdXJyZW50IG5vZGUsIHNvIHdlIGp1c3QgYWRkIHRoZSBmYWtlIGlkXHJcbiAgICAgICAgICAgICAgICBpZiggY3VycmVudE5vZGUgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGYgPSB0aGlzXHJcbiAgICAgICAgICAgICAgICAgICAgbGV0IHNlbGVjdG9ycyA9IHNlbGYuZ2V0QWxsU2VsZWN0b3JzKClcclxuICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZXMgPSBbXVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2Rlcy5wdXNoKCBjdXJyZW50Tm9kZSApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggY3VycmVudE5vZGUudGFnTmFtZSAhPSBcIkFcIiApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBpbmNsdWRlIHRoZSBhbmNob3IncyB0cmFuc2xhdGFibGUgYXR0cmlidXRlc1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgYW5jaG9yUGFyZW50ICA9IGN1cnJlbnROb2RlLmNsb3Nlc3QoJ2EnKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiggIGFuY2hvclBhcmVudCAhPSBudWxsICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChhbmNob3JQYXJlbnQpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggY3VycmVudE5vZGUudGFnTmFtZSA9PSBcIkFcIiAmJiBjdXJyZW50Tm9kZS5jaGlsZHJlbi5sZW5ndGggPiAwICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGluY2x1ZGUgYWxsIHRoZSB0cmFuc2xhdGFibGUgYXR0cmlidXRlcyBpbnNpZGUgdGhlIGFuY2hvclxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgY2hpbGRyZW5BcnJheSA9IFsgLi4uY3VycmVudE5vZGUuY2hpbGRyZW4gXTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY2hpbGRyZW5BcnJheS5mb3JFYWNoKCBmdW5jdGlvbiAoIGNoaWxkICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZXMucHVzaChjaGlsZClcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2Rlcy5mb3JFYWNoKCBmdW5jdGlvbiggbm9kZSApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0b3JzLmZvckVhY2goZnVuY3Rpb24gKHNlbGVjdG9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBsZXQgc3RyaW5nSWQgPSBub2RlLmdldEF0dHJpYnV0ZShzZWxlY3RvcilcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzdHJpbmdJZCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGxldCBmb3VuZCA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGlcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3IoIGkgPSAwOyBpIDwgc2VsZWN0ZWRJbmRleGVzQXJyYXkubGVuZ3RoOyBpKysgKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCB0eXBlb2Ygc2VsZi5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhlc0FycmF5W2ldXSAhPT0gJ3VuZGVmaW5lZCcgJiYgc2VsZi5kaWN0aW9uYXJ5W3NlbGVjdGVkSW5kZXhlc0FycmF5W2ldXS5kYklEICE9PSAndW5kZWZpbmVkJyAmJiBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleGVzQXJyYXlbaV1dLmRiSUQgPT09IHN0cmluZ0lkICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmb3VuZCA9IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggISBmb3VuZCApIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgc2VsZWN0ZWRJbmRleGVzQXJyYXkucHVzaChzZWxmLmdldFN0cmluZ0luZGV4KHNlbGVjdG9yLCBzdHJpbmdJZCkpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcbiAgICAgICAgICAgICAgICB9IGVsc2VcclxuICAgICAgICAgICAgICAgICAgICBzZWxlY3RlZEluZGV4ZXNBcnJheS5wdXNoKCBzZWxlY3RlZFN0cmluZ0FycmF5SW5kZXggKVxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleGVzQXJyYXkgPSBzZWxlY3RlZEluZGV4ZXNBcnJheVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgIH0sXHJcbiAgICAgICAgY29tcHV0ZWQ6IHtcclxuICAgICAgICAgICAgY2xvc2VVUkw6IGZ1bmN0aW9uKCkge1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHRoaXMuY2xlYW5VUkwoIHRoaXMuY3VycmVudFVSTCApXHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIG1ldGhvZHM6IHtcclxuICAgICAgICAgICAgaUZyYW1lTG9hZGVkKCl7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBpZnJhbWVFbGVtZW50ID0gZG9jdW1lbnQucXVlcnlTZWxlY3RvcignI3RycC1wcmV2aWV3LWlmcmFtZScpXHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5pZnJhbWUgPSBpZnJhbWVFbGVtZW50LmNvbnRlbnREb2N1bWVudCB8fCBpZnJhbWVFbGVtZW50LmNvbnRlbnRXaW5kb3cuZG9jdW1lbnRcclxuXHJcbiAgICAgICAgICAgICAgICAvL3N5bmMgaUZyYW1lIFVSTCB3aXRoIHBhcmVudFxyXG4gICAgICAgICAgICAgICAgaWYgKCB0aGlzLmN1cnJlbnRVUkwgIT0gdGhpcy5pZnJhbWUuVVJMIClcclxuICAgICAgICAgICAgICAgICAgICB0aGlzLmN1cnJlbnRVUkwgPSB0aGlzLmlmcmFtZS5VUkxcclxuXHJcbiAgICAgICAgICAgICAgICAvL2hpZGUgaUZyYW1lIGxvYWRlclxyXG4gICAgICAgICAgICAgICAgdGhpcy5pZnJhbWVMb2FkZXIoICdoaWRlJyApXHJcblxyXG4gICAgICAgICAgICAgICAgc2VsZi5kZXRlY3RlZFNlbGVjdG9yQW5kSWQgPSBbXVxyXG4gICAgICAgICAgICAgICAgc2VsZi5kaWN0aW9uYXJ5ICAgICAgICAgICAgPSBbXVxyXG4gICAgICAgICAgICAgICAgdGhpcy5zY2FuSWZyYW1lRm9yU3RyaW5ncygpXHJcblxyXG4gICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZ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gdGhpcy5jdXJyZW50TGFuZ3VhZ2UgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzY2FuRm9yU2VsZWN0b3IoIGJhc2VTZWxlY3RvciwgdHlwZVNsdWcsIGxhbmd1YWdlT2ZJZHMgKXtcclxuICAgICAgICAgICAgICAgIHRoaXMubG9hZGluZ19zdHJpbmdzKytcclxuICAgICAgICAgICAgICAgIGxldCBzZWxmICAgICAgICAgICA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RvcnMgICAgICA9IHRoaXMucHJlcGFyZVNlbGVjdG9yU3RyaW5ncyggYmFzZVNlbGVjdG9yIClcclxuICAgICAgICAgICAgICAgIGxldCBub2RlcyAgICAgICAgICA9IFsuLi50aGlzLmlmcmFtZS5xdWVyeVNlbGVjdG9yQWxsKCAnWycgKyBzZWxlY3RvcnMuam9pbignXSxbJykgKyAnXScgKV1cclxuICAgICAgICAgICAgICAgIGxldCBzdHJpbmdJZHNBcnJheSA9IFtdLCBub2RlRGF0YSA9IFtdLCBub2RlRW50cmllcyA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgbm9kZXMuZm9yRWFjaCggZnVuY3Rpb24gKCBub2RlICl7XHJcbiAgICAgICAgICAgICAgICAgICAgbm9kZUVudHJpZXMgPSBzZWxmLmdldE5vZGVJbmZvKCBub2RlLCBiYXNlU2VsZWN0b3IgKVxyXG5cclxuICAgICAgICAgICAgICAgICAgICBub2RlRW50cmllcy5mb3JFYWNoKCBmdW5jdGlvbiggZW50cnkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgY2hlY2sgZW5zdXJlcyB0aGF0IHdlIGRvbid0IGNyZWF0ZSBkdXBsaWNhdGVzIHdoZW4gcmVzY2FubmluZyBhZnRlciBhamF4IGNvbXBsZXRlXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggIXNlbGYuYWxyZWFkeURldGVjdGVkKCBlbnRyeS5zZWxlY3RvciwgZW50cnkuZGJJRCApICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc3RyaW5nSWRzQXJyYXkucHVzaChlbnRyeS5kYklEKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgbm9kZURhdGEucHVzaChlbnRyeSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHNlbGYuc2V0dXBFdmVudExpc3RlbmVyKCBub2RlIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgLy91bmlxdWUgaWRzIG9ubHlcclxuICAgICAgICAgICAgICAgIHN0cmluZ0lkc0FycmF5ID0gWy4uLm5ldyBTZXQoc3RyaW5nSWRzQXJyYXkpXVxyXG4gICAgICAgICAgICAgICAgaWYgKCBzdHJpbmdJZHNBcnJheS5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGxldCBkYXRhID0gbmV3IEZvcm1EYXRhKClcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCgnYWN0aW9uJyAgICAgICAsICd0cnBfZ2V0X3RyYW5zbGF0aW9uc18nICsgdHlwZVNsdWcpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5hcHBlbmQoJ2FsbF9sYW5ndWFnZXMnLCAndHJ1ZScpXHJcbiAgICAgICAgICAgICAgICAgICAgZGF0YS5hcHBlbmQoJ3NlY3VyaXR5JyAgICAgLCB0aGlzLm5vbmNlc1snZ2V0dHJhbnNsYXRpb25zbm9uY2UnICsgdHlwZVNsdWddKVxyXG4gICAgICAgICAgICAgICAgICAgIGRhdGEuYXBwZW5kKCdsYW5ndWFnZScgICAgICwgbGFuZ3VhZ2VPZklkcylcclxuICAgICAgICAgICAgICAgICAgICBkYXRhLmFwcGVuZCgnc3RyaW5nX2lkcycgICAsIEpTT04uc3RyaW5naWZ5KHN0cmluZ0lkc0FycmF5KSlcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgYXhpb3MucG9zdCh0aGlzLmFqYXhfdXJsLCBkYXRhKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAudGhlbihmdW5jdGlvbiAocmVzcG9uc2UpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYubG9hZGluZ19zdHJpbmdzLS1cclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGYuYWRkVG9EaWN0aW9uYXJ5KHJlc3BvbnNlLmRhdGEsIG5vZGVEYXRhKVxyXG4gICAgICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAuY2F0Y2goZnVuY3Rpb24gKGVycm9yKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBjb25zb2xlLmxvZyhlcnJvcik7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH0pO1xyXG4gICAgICAgICAgICAgICAgfWVsc2V7XHJcbiAgICAgICAgICAgICAgICAgICAgc2VsZi5sb2FkaW5nX3N0cmluZ3MtLVxyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWxyZWFkeURldGVjdGVkKCBzZWxlY3RvciwgZGJJZCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IGNvbWJpbmVkID0gc2VsZWN0b3IgKyAnPScgKyBkYklkXHJcbiAgICAgICAgICAgICAgICBpZiAoIHV0aWxzLmFycmF5Q29udGFpbnNJdGVtKCB0aGlzLmRldGVjdGVkU2VsZWN0b3JBbmRJZCwgY29tYmluZWQgKSApIHtcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gdHJ1ZVxyXG4gICAgICAgICAgICAgICAgfWVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGV0ZWN0ZWRTZWxlY3RvckFuZElkLnB1c2goY29tYmluZWQpXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHNldHVwRXZlbnRMaXN0ZW5lciggbm9kZSApe1xyXG4gICAgICAgICAgICAgICAgaWYgKCBub2RlLnRhZ05hbWUgPT0gJ0EnICYmICFub2RlLmhhc0F0dHJpYnV0ZSggJ2RhdGEtdHJwZ2V0dGV4dG9yaWdpbmFsJyApIClcclxuICAgICAgICAgICAgICAgICAgICByZXR1cm4gZmFsc2VcclxuXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICBub2RlLmFkZEV2ZW50TGlzdGVuZXIoICdtb3VzZWVudGVyJywgc2VsZi4kcmVmcy5ob3ZlckFjdGlvbnMuc2hvd1BlbmNpbEljb24gKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBhZGRUb0RpY3Rpb25hcnkoIHJlc3BvbnNlRGF0YSwgbm9kZUluZm8gPSBudWxsICl7XHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHJlc3BvbnNlRGF0YSAhPSBudWxsICkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICggbm9kZUluZm8gKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZm8uZm9yRWFjaChmdW5jdGlvbiAoIGluZm9Sb3csIGluZGV4ICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICByZXNwb25zZURhdGEuc29tZSggZnVuY3Rpb24gKCByZXNwb25zZURhdGFSb3cgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmICggaW5mb1Jvdy5kYklEID09IHJlc3BvbnNlRGF0YVJvdy5kYklEICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvL2JyaW5nIGJsb2NrX3R5cGUgdG8gdGhlIHRvcCBsZXZlbCBvYmplY3RcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKCByZXNwb25zZURhdGFSb3cudHlwZSAhPSAnZ2V0dGV4dCcgJiYgdHlwZW9mIHJlc3BvbnNlRGF0YVJvdy5ibG9ja190eXBlID09ICd1bmRlZmluZWQnICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgbGV0IGZpcnN0TGFuZ3VhZ2UgPSBzZWxmLm9yZGVyZWRTZWNvbmRhcnlMYW5ndWFnZXNbMF1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiByZXNwb25zZURhdGFSb3cudHJhbnNsYXRpb25zQXJyYXlbZmlyc3RMYW5ndWFnZV0uYmxvY2tfdHlwZSAhPSAndW5kZWZpbmVkJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVzcG9uc2VEYXRhUm93LmJsb2NrX3R5cGUgPSByZXNwb25zZURhdGFSb3cudHJhbnNsYXRpb25zQXJyYXlbZmlyc3RMYW5ndWFnZV0uYmxvY2tfdHlwZVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBub2RlSW5mb1tpbmRleF0gPSBPYmplY3QuYXNzaWduKCB7fSwgcmVzcG9uc2VEYXRhUm93LCBpbmZvUm93IClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWUgLy8gYSBzb3J0IG9mIGJyZWFrXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICB9ZWxzZXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZUluZm8gPSByZXNwb25zZURhdGFcclxuICAgICAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc3RyaW5nR3JvdXBzID0gdGhpcy5hZGRUb1N0cmluZ0dyb3Vwcyggbm9kZUluZm8gKVxyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuZGljdGlvbmFyeSA9IHRoaXMuZGljdGlvbmFyeS5jb25jYXQoIG5vZGVJbmZvIClcclxuXHJcbiAgICAgICAgICAgICAgICAgICAgdGhpcy5pbml0U3RyaW5nc0Ryb3Bkb3duKClcclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWRkVG9TdHJpbmdHcm91cHMoIHN0cmluZ3MgKXtcclxuXHJcbiAgICAgICAgICAgICAgICAvLyBzZWUgd2hhdCBub2RlIGdyb3VwcyBhcmUgZm91bmRcclxuICAgICAgICAgICAgICAgIGxldCBmb3VuZFN0cmluZ0dyb3VwcyA9IHRoaXMuc3RyaW5nR3JvdXBzO1xyXG4gICAgICAgICAgICAgICAgc3RyaW5ncy5mb3JFYWNoKCBmdW5jdGlvbiAoIHN0cmluZyApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIGZvdW5kU3RyaW5nR3JvdXBzLmluZGV4T2YoIHN0cmluZy5ncm91cCApID09PSAtMSAmJiAoICggdHlwZW9mIHN0cmluZy5ibG9ja1R5cGUgPT09ICd1bmRlZmluZWQnICkgfHwgc3RyaW5nLmJsb2NrVHlwZSAhPT0gJzInICkgKXtcclxuICAgICAgICAgICAgICAgICAgICAgICAgZm91bmRTdHJpbmdHcm91cHMucHVzaCggc3RyaW5nLmdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIHB1dCB0aGUgbm9kZSBncm91cHMgaW4gdGhlIG9yZGVyIHRoYXQgd2Ugd2FudCwgYWNjb3JkaW5nIHRvIHRoZSBwcm9wIHRoaXMuc3RyaW5nR3JvdXBPcmRlclxyXG4gICAgICAgICAgICAgICAgbGV0IG9yZGVyZWRTdHJpbmdHcm91cHMgPSBbXTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHRoaXMuZWRpdG9yU3RyaW5ncy5zZW9fdXBkYXRlX25vdGljZSAhPSAnc2VvX3BhY2tfdXBkYXRlX25vdF9uZWVkZWQnICl7XHJcbiAgICAgICAgICAgICAgICAgICAgb3JkZXJlZFN0cmluZ0dyb3Vwcy5wdXNoKCB0aGlzLmVkaXRvclN0cmluZ3Muc2VvX3VwZGF0ZV9ub3RpY2UgKTtcclxuICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLnN0cmluZ0dyb3VwT3JkZXIuZm9yRWFjaCggZnVuY3Rpb24oIGdyb3VwICl7XHJcbiAgICAgICAgICAgICAgICAgICAgaWYgKCBmb3VuZFN0cmluZ0dyb3Vwcy5pbmRleE9mKCBncm91cCApICE9PSAtMSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmRlcmVkU3RyaW5nR3JvdXBzLnB1c2goIGdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIC8vIGlmIHRoZXJlIHdlcmUgYW55IG90aGVyIHN0cmluZyBncm91cHMgdGhhdCB3ZXJlIG5vdCBpbiB0aGUgcHJvcCwgYWRkIHRoZW0gYXQgdGhlIGVuZC5cclxuICAgICAgICAgICAgICAgIGZvdW5kU3RyaW5nR3JvdXBzLmZvckVhY2goIGZ1bmN0aW9uIChncm91cCkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICggb3JkZXJlZFN0cmluZ0dyb3Vwcy5pbmRleE9mKCBncm91cCApID09PSAtMSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBvcmRlcmVkU3RyaW5nR3JvdXBzLnB1c2goZ3JvdXApO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIG9yZGVyZWRTdHJpbmdHcm91cHM7XHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGdldFN0cmluZ0luZGV4KCBzZWxlY3RvciwgZGJJRCApe1xyXG4gICAgICAgICAgICAgICAgbGV0IGZvdW5kID0gbnVsbFxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuZGljdGlvbmFyeS5zb21lKGZ1bmN0aW9uICggc3RyaW5nLCBpbmRleCApIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoIHN0cmluZy5kYklEID09IGRiSUQgJiYgc3RyaW5nLnNlbGVjdG9yID09IHNlbGVjdG9yICl7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGZvdW5kID0gaW5kZXhcclxuICAgICAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBmb3VuZFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXROb2RlSW5mbyggbm9kZSwgYmFzZVNlbGVjdG9yID0gJycgKXtcclxuICAgICAgICAgICAgICAgIGxldCBzdHJpbmdJZFxyXG4gICAgICAgICAgICAgICAgbGV0IG5vZGVEYXRhICA9IFtdXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZWN0b3JzID0gdGhpcy5wcmVwYXJlU2VsZWN0b3JTdHJpbmdzKCBiYXNlU2VsZWN0b3IgKVxyXG5cclxuICAgICAgICAgICAgICAgIHNlbGVjdG9ycy5mb3JFYWNoKCBmdW5jdGlvbiAoIHNlbGVjdG9yICkge1xyXG5cclxuICAgICAgICAgICAgICAgICAgICBzdHJpbmdJZCA9IG5vZGUuZ2V0QXR0cmlidXRlKCBzZWxlY3RvciApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGlmICggc3RyaW5nSWQgKSB7XHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgbm9kZUF0dHJpYnV0ZSAgID0gc2VsZWN0b3IucmVwbGFjZSggYmFzZVNlbGVjdG9yLCAnJyApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlR3JvdXAgICAgICAgPSBub2RlLmdldEF0dHJpYnV0ZSggJ2RhdGEtdHJwLW5vZGUtZ3JvdXAnICsgbm9kZUF0dHJpYnV0ZSApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGxldCBub2RlRGVzY3JpcHRpb24gPSBub2RlLmdldEF0dHJpYnV0ZSggJ2RhdGEtdHJwLW5vZGUtZGVzY3JpcHRpb24nICsgbm9kZUF0dHJpYnV0ZSApXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBsZXQgZW50cnkgPSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBkYklEICAgICAgOiBzdHJpbmdJZCxcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdG9yICA6IHNlbGVjdG9yLFxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgYXR0cmlidXRlIDogbm9kZUF0dHJpYnV0ZS5zdWJzdHIoMSksIC8vIHN1YnN0cigxKSBpcyB1c2VkIHRvIHRyaW0gcHJlZml4aW5nIGxpbmUgLSBleC4gLWFsdCB3aWxsIHJlc3VsdCBpbiBhbHQgKG5vIGxpbmUpXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGlmICggbm9kZUdyb3VwIClcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGVudHJ5Lmdyb3VwID0gbm9kZUdyb3VwXHJcblxyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoIG5vZGVEZXNjcmlwdGlvbiApXHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBlbnRyeS5kZXNjcmlwdGlvbiA9IG5vZGVEZXNjcmlwdGlvblxyXG5cclxuICAgICAgICAgICAgICAgICAgICAgICAgbm9kZURhdGEucHVzaCggZW50cnkgKVxyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuXHJcbiAgICAgICAgICAgICAgICB9KVxyXG5cclxuICAgICAgICAgICAgICAgIHJldHVybiBub2RlRGF0YVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBnZXRBbGxTZWxlY3RvcnMoKXtcclxuICAgICAgICAgICAgICAgIGxldCBzZWxlY3RvcnMgPSBbXVxyXG4gICAgICAgICAgICAgICAgbGV0IHNlbGYgICAgICA9IHRoaXNcclxuXHJcbiAgICAgICAgICAgICAgICB0aGlzLmRhdGFBdHRyaWJ1dGVzLmZvckVhY2goIGZ1bmN0aW9uICggZGF0YUF0dHJpYnV0ZSApe1xyXG4gICAgICAgICAgICAgICAgICAgIHNlbGVjdG9ycyA9IHNlbGVjdG9ycy5jb25jYXQoIHNlbGYucHJlcGFyZVNlbGVjdG9yU3RyaW5ncyggZGF0YUF0dHJpYnV0ZSApIClcclxuICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHNlbGVjdG9yc1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwcmVwYXJlU2VsZWN0b3JTdHJpbmdzKCBiYXNlTmFtZVNlbGVjdG9yICl7XHJcbiAgICAgICAgICAgICAgICBsZXQgcGFyc2VkX3NlbGVjdG9ycyA9IFtdXHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RvcnMuZm9yRWFjaCggZnVuY3Rpb24gKCBzZWxlY3RvclN1ZmZpeCwgaW5kZXggKXtcclxuICAgICAgICAgICAgICAgICAgICBwYXJzZWRfc2VsZWN0b3JzLnB1c2goIGJhc2VOYW1lU2VsZWN0b3IgKyBzZWxlY3RvclN1ZmZpeCAgKVxyXG4gICAgICAgICAgICAgICAgfSlcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gcGFyc2VkX3NlbGVjdG9yc1xyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBwYXJlbnRVUkwoIHVybCApe1xyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybC5yZXBsYWNlKCAndHJwLWVkaXQtdHJhbnNsYXRpb249cHJldmlldycsICd0cnAtZWRpdC10cmFuc2xhdGlvbj10cnVlJyApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGNsZWFuVVJMKCB1cmwgKXtcclxuICAgICAgICAgICAgICAgIC8vbWFrZSByZW1vdmVVcmxQYXJhbWV0ZXIgcmVjdXJzaXZlIGFuZCBvbmx5IGNhbGwgaXQgb25jZSB3aXRoIGFsbCB0aGUgcGFyYW1ldGVycyB0aGF0XHJcbiAgICAgICAgICAgICAgICAvL25lZWQgdG8gc3RyaXBwZWQgP1xyXG4gICAgICAgICAgICAgICAgdXJsID0gdXRpbHMucmVtb3ZlVXJsUGFyYW1ldGVyKCB1cmwsICdsYW5nJyApXHJcbiAgICAgICAgICAgICAgICB1cmwgPSB1dGlscy5yZW1vdmVVcmxQYXJhbWV0ZXIoIHVybCwgJ3RycC12aWV3LWFzJyApXHJcbiAgICAgICAgICAgICAgICB1cmwgPSB1dGlscy5yZW1vdmVVcmxQYXJhbWV0ZXIoIHVybCwgJ3RycC12aWV3LWFzLW5vbmNlJyApXHJcbiAgICAgICAgICAgICAgICB1cmwgPSB1dGlscy5yZW1vdmVVcmxQYXJhbWV0ZXIoIHVybCwgJ3RycC1lZGl0LXRyYW5zbGF0aW9uJyApXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHVybFxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBzaG93U3RyaW5nKCBzdHJpbmcsIHR5cGUgKXtcclxuICAgICAgICAgICAgICAgIGlmICggdHlwZW9mIHN0cmluZy5ibG9ja1R5cGUgIT09ICd1bmRlZmluZWQnICYmIHN0cmluZy5ibG9ja1R5cGUgPT09ICcyJyApe1xyXG4gICAgICAgICAgICAgICAgICAgIC8vIGRvbid0IHNob3cgZGVwcmVjYXRlZCB0cmFuc2xhdGlvbiBibG9ja3MgaW4gdGhlIGRyb3Bkb3duXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGUgPT09IHRoaXMuZWRpdG9yU3RyaW5ncy5pbWFnZXMgJiYgdHlwZW9mIHN0cmluZy5hdHRyaWJ1dGUgIT0gJ3VuZGVmaW5lZCcgJiYgc3RyaW5nLmF0dHJpYnV0ZSA9PSAnc3JjJyApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIHRydWVcclxuXHJcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGVvZiBzdHJpbmcuYXR0cmlidXRlICE9PSAndW5kZWZpbmVkJyAmJiAoIHN0cmluZy5hdHRyaWJ1dGUgPT0gJ2hyZWYnIHx8IHN0cmluZy5hdHRyaWJ1dGUgPT0gJ3NyYycgKSApXHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCBzdHJpbmcuZ3JvdXAgPT09IHR5cGUgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB0cnVlXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIGZhbHNlXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIGluaXRTdHJpbmdzRHJvcGRvd24oKXtcclxuICAgICAgICAgICAgICAgIGxldCBzZWxmID0gdGhpc1xyXG5cclxuICAgICAgICAgICAgICAgIGlmICggIXRoaXMuaXNTdHJpbmdzRHJvcGRvd25PcGVuKCkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgalF1ZXJ5KCAnI3RycC1zdHJ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lbGVjdDIoIHsgcGxhY2Vob2xkZXIgOiB0aGlzLmVkaXRvclN0cmluZ3Muc3RyaW5nc19sb2FkaW5nLCB3aWR0aCA6ICcxMDAlJyB9ICkucHJvcCggJ2Rpc2FibGVkJywgdHJ1ZSApXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHByb2Nlc3NPcHRpb25OYW1lKCBuYW1lLCB0eXBlICl7XHJcbiAgICAgICAgICAgICAgICBpZiAoIHR5cGUgPT0gJ0ltYWdlcycgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVybiB1dGlscy5nZXRGaWxlbmFtZSggbmFtZSApXHJcblxyXG4gICAgICAgICAgICAgICAgcmV0dXJuIHV0aWxzLmVzY2FwZUh0bWwoIG5hbWUgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICBpc1N0cmluZ3NEcm9wZG93bk9wZW4oKXtcclxuICAgICAgICAgICAgICAgIHJldHVybiBqUXVlcnkoICcjdHJwLXN0cmluZy1jYXRlZ29yaWVzJyApLnNlbGVjdDIoICdpc09wZW4nIClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgaGFzVW5zYXZlZENoYW5nZXMoKXtcclxuICAgICAgICAgICAgICAgIGxldCB1bnNhdmVkQ2hhbmdlcyA9IGZhbHNlXHJcbiAgICAgICAgICAgICAgICBsZXQgc2VsZiA9IHRoaXNcclxuICAgICAgICAgICAgICAgIGlmICggdGhpcy5zZWxlY3RlZEluZGV4ZXNBcnJheS5sZW5ndGggPiAwICkge1xyXG4gICAgICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRJbmRleGVzQXJyYXkuZm9yRWFjaChmdW5jdGlvbiAoc2VsZWN0ZWRJbmRleCkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBzZWxmLnNldHRpbmdzWyd0cmFuc2xhdGlvbi1sYW5ndWFnZXMnXS5mb3JFYWNoKGZ1bmN0aW9uIChsYW5ndWFnZUNvZGUpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0gJiZcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXSAmJlxyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIChzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS50cmFuc2xhdGVkICE9PSBzZWxmLmRpY3Rpb25hcnlbc2VsZWN0ZWRJbmRleF0udHJhbnNsYXRpb25zQXJyYXlbbGFuZ3VhZ2VDb2RlXS5lZGl0ZWRUcmFuc2xhdGlvbikpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB1bnNhdmVkQ2hhbmdlcyA9IHRydWVcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICAgICAgfSlcclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgdGhpcy5zaG93Q2hhbmdlc1Vuc2F2ZWRNZXNzYWdlID0gdW5zYXZlZENoYW5nZXNcclxuXHJcbiAgICAgICAgICAgICAgICByZXR1cm4gdW5zYXZlZENoYW5nZXNcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgaWZyYW1lTG9hZGVyKCBzdGF0dXMgKSB7XHJcbiAgICAgICAgICAgICAgICBsZXQgbG9hZGVyID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoICd0cnAtcHJldmlldy1sb2FkZXInIClcclxuXHJcbiAgICAgICAgICAgICAgICBpZiggc3RhdHVzID09ICdzaG93JyApXHJcbiAgICAgICAgICAgICAgICAgICAgbG9hZGVyLnN0eWxlLmRpc3BsYXkgPSAnZmxleCdcclxuICAgICAgICAgICAgICAgIGVsc2UgaWYoIHN0YXR1cyA9PSAnaGlkZScgKVxyXG4gICAgICAgICAgICAgICAgICAgIGxvYWRlci5zdHlsZS5kaXNwbGF5ID0gJ25vbmUnXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIHByZXZpb3VzU3RyaW5nKCl7XHJcbiAgICAgICAgICAgICAgICBsZXQgY3VycmVudFZhbHVlID0gZG9jdW1lbnQuZ2V0RWxlbWVudEJ5SWQoJ3RycC1zdHJpbmctY2F0ZWdvcmllcycpLnZhbHVlXHJcblxyXG4gICAgICAgICAgICAgICAgbGV0IG5ld1ZhbHVlID0gK2N1cnJlbnRWYWx1ZSAtIDFcclxuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSggbmV3VmFsdWUgPj0gMCAmJiBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcjdHJwLXN0cmluZy1jYXRlZ29yaWVzIG9wdGlvblt2YWx1ZT1cIicgKyBuZXdWYWx1ZSArICdcIl0nKS5sZW5ndGggPT09IDAgKXtcclxuICAgICAgICAgICAgICAgICAgICBuZXdWYWx1ZS0tO1xyXG4gICAgICAgICAgICAgICAgfVxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCBuZXdWYWx1ZSA8IDAgKVxyXG4gICAgICAgICAgICAgICAgICAgIHJldHVyblxyXG5cclxuICAgICAgICAgICAgICAgIHRoaXMuc2VsZWN0ZWRTdHJpbmcgPSBuZXdWYWx1ZS50b1N0cmluZygpXHJcbiAgICAgICAgICAgIH0sXHJcbiAgICAgICAgICAgIG5leHRTdHJpbmcoKXtcclxuICAgICAgICAgICAgICAgIGxldCBjdXJyZW50VmFsdWUgPSBkb2N1bWVudC5nZXRFbGVtZW50QnlJZCgndHJwLXN0cmluZy1jYXRlZ29yaWVzJykudmFsdWUsIG5ld1ZhbHVlID0gMFxyXG5cclxuICAgICAgICAgICAgICAgIGlmKCBjdXJyZW50VmFsdWUgIT0gJycgKVxyXG4gICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlID0gK2N1cnJlbnRWYWx1ZSArIDFcclxuXHJcbiAgICAgICAgICAgICAgICB3aGlsZSggbmV3VmFsdWUgPCB0aGlzLmRpY3Rpb25hcnkubGVuZ3RoICYmIGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJyN0cnAtc3RyaW5nLWNhdGVnb3JpZXMgb3B0aW9uW3ZhbHVlPVwiJyArIG5ld1ZhbHVlICsgJ1wiXScpLmxlbmd0aCA9PT0gMCApe1xyXG4gICAgICAgICAgICAgICAgICAgIG5ld1ZhbHVlKys7XHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgaWYgKCBuZXdWYWx1ZSA+PSB0aGlzLmRpY3Rpb25hcnkubGVuZ3RoICl7XHJcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuXHJcbiAgICAgICAgICAgICAgICB9XHJcblxyXG4gICAgICAgICAgICAgICAgdGhpcy5zZWxlY3RlZFN0cmluZyA9IG5ld1ZhbHVlLnRvU3RyaW5nKClcclxuICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgYWRkS2V5Ym9hcmRTaG9ydGN1dHNMaXN0ZW5lcigpe1xyXG4gICAgICAgICAgICAgICAgZG9jdW1lbnQuYWRkRXZlbnRMaXN0ZW5lcihcImtleWRvd25cIiwgZnVuY3Rpb24oZSkge1xyXG4gICAgICAgICAgICAgICAgICAgIGlmICgod2luZG93Lm5hdmlnYXRvci5wbGF0Zm9ybS5tYXRjaChcIk1hY1wiKSA/IGUubWV0YUtleSA6IGUuY3RybEtleSkgJiYgZS5hbHRLZXkgKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIENUUkwgKyBBTFQgKyByaWdodCBhcnJvd1xyXG4gICAgICAgICAgICAgICAgICAgICAgICBpZiggZS5rZXlDb2RlID09PSAzOSApe1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgZS5wcmV2ZW50RGVmYXVsdCgpO1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgd2luZG93LmRpc3BhdGNoRXZlbnQoIG5ldyBFdmVudCggJ3RycF90cmlnZ2VyX25leHRfc3RyaW5nX2V2ZW50JyApICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1lbHNle1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gQ1RSTCArIEFMVCArIGxlZnQgYXJyb3dcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmKCBlLmtleUNvZGUgPT09IDM3ICkge1xyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGUucHJldmVudERlZmF1bHQoKTtcclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB3aW5kb3cuZGlzcGF0Y2hFdmVudCggbmV3IEV2ZW50KCAndHJwX3RyaWdnZXJfcHJldmlvdXNfc3RyaW5nX2V2ZW50JyApICk7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICB9LCBmYWxzZSk7XHJcblxyXG4gICAgICAgICAgICAgICAgd2luZG93LmFkZEV2ZW50TGlzdGVuZXIoICd0cnBfdHJpZ2dlcl9uZXh0X3N0cmluZ19ldmVudCcsIHRoaXMubmV4dFN0cmluZyApXHJcbiAgICAgICAgICAgICAgICB3aW5kb3cuYWRkRXZlbnRMaXN0ZW5lciggJ3RycF90cmlnZ2VyX3ByZXZpb3VzX3N0cmluZ19ldmVudCcsIHRoaXMucHJldmlvdXNTdHJpbmcgKVxyXG4gICAgICAgICAgICB9LFxyXG4gICAgICAgICAgICByZXNpemVJZnJhbWUgKGV2ZW50LCB1aSkge1xyXG4gICAgICAgICAgICAgICAgbGV0IHRvdGFsX3dpZHRoID0galF1ZXJ5KHdpbmRvdykud2lkdGgoKTtcclxuICAgICAgICAgICAgICAgIGxldCB3aWR0aCA9IGpRdWVyeSggJyN0cnAtY29udHJvbHMnICkud2lkdGgoKTtcclxuXHJcbiAgICAgICAgICAgICAgICBpZih3aWR0aCA+IHRvdGFsX3dpZHRoKSB7XHJcbiAgICAgICAgICAgICAgICAgICAgd2lkdGggPSB0b3RhbF93aWR0aDtcclxuICAgICAgICAgICAgICAgICAgICBjb250cm9scy5jc3MoJ3dpZHRoJywgd2lkdGgpO1xyXG4gICAgICAgICAgICAgICAgfVxyXG4gICAgICAgICAgICAgICAgbGV0IHByZXZpZXdDb250YWluZXIgPSBqUXVlcnkoICcjdHJwLXByZXZpZXcnICk7XHJcbiAgICAgICAgICAgICAgICBwcmV2aWV3Q29udGFpbmVyLmNzcygncmlnaHQnLCB3aWR0aCApO1xyXG4gICAgICAgICAgICAgICAgcHJldmlld0NvbnRhaW5lci5jc3MoJ2xlZnQnLCAoIHdpZHRoIC0gMzQ4ICkgKTtcclxuICAgICAgICAgICAgICAgIHByZXZpZXdDb250YWluZXIuY3NzKCd3aWR0aCcsICh0b3RhbF93aWR0aCAtIHdpZHRoKSk7XHJcbiAgICAgICAgICAgIH1cclxuICAgICAgICB9LFxyXG4gICAgICAgIC8vYWRkIHN1cHBvcnQgZm9yIHYtbW9kZWwgaW4gc2VsZWN0MlxyXG4gICAgICAgIGRpcmVjdGl2ZXM6IHtcclxuICAgICAgICAgICAgc2VsZWN0Mjoge1xyXG4gICAgICAgICAgICAgICAgaW5zZXJ0ZWQoZWwpIHtcclxuICAgICAgICAgICAgICAgICAgICBqUXVlcnkoZWwpLm9uKCdzZWxlY3QyOnNlbGVjdCcsICgpID0+IHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgY29uc3QgZXZlbnQgPSBuZXcgRXZlbnQoJ2NoYW5nZScsIHsgYnViYmxlczogdHJ1ZSwgY2FuY2VsYWJsZTogdHJ1ZSB9KVxyXG4gICAgICAgICAgICAgICAgICAgICAgICBlbC5kaXNwYXRjaEV2ZW50KGV2ZW50KVxyXG4gICAgICAgICAgICAgICAgICAgIH0pXHJcblxyXG4gICAgICAgICAgICAgICAgICAgIGpRdWVyeShlbCkub24oJ3NlbGVjdDI6dW5zZWxlY3QnLCAoKSA9PiB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnN0IGV2ZW50ID0gbmV3IEV2ZW50KCdjaGFuZ2UnLCB7IGJ1YmJsZXM6IHRydWUsIGNhbmNlbGFibGU6IHRydWUgfSlcclxuICAgICAgICAgICAgICAgICAgICAgICAgZWwuZGlzcGF0Y2hFdmVudChldmVudClcclxuICAgICAgICAgICAgICAgICAgICB9KVxyXG4gICAgICAgICAgICAgICAgfSxcclxuICAgICAgICAgICAgfVxyXG4gICAgICAgIH1cclxuICAgIH1cclxuPC9zY3JpcHQ+XHJcbiJdLCJzb3VyY2VSb290IjoiIn0=\n//# sourceURL=webpack-internal:///./node_modules/babel-loader/lib/index.js?!./node_modules/vue-loader/lib/index.js?!./assets/src/js/editor.vue?vue&type=script&lang=js&\n");
|
719 |
|
720 |
/***/ }),
|
721 |
|
class-translate-press.php
CHANGED
@@ -47,7 +47,7 @@ class TRP_Translate_Press{
|
|
47 |
define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
48 |
define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
|
49 |
define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
|
50 |
-
define( 'TRP_PLUGIN_VERSION', '1.5.
|
51 |
|
52 |
wp_cache_add_non_persistent_groups(array('trp'));
|
53 |
|
47 |
define( 'TRP_PLUGIN_URL', plugin_dir_url( __FILE__ ) );
|
48 |
define( 'TRP_PLUGIN_BASE', plugin_basename( __DIR__ . '/index.php' ) );
|
49 |
define( 'TRP_PLUGIN_SLUG', 'translatepress-multilingual' );
|
50 |
+
define( 'TRP_PLUGIN_VERSION', '1.5.3' );
|
51 |
|
52 |
wp_cache_add_non_persistent_groups(array('trp'));
|
53 |
|
includes/class-translation-manager.php
CHANGED
@@ -182,6 +182,9 @@ class TRP_Translation_Manager{
|
|
182 |
wp_enqueue_style( 'trp-editor-style', TRP_PLUGIN_URL . 'assets/css/trp-editor.css', array('dashicons', 'buttons'), TRP_PLUGIN_VERSION );
|
183 |
wp_enqueue_script( 'trp-editor', TRP_PLUGIN_URL . 'assets/js/trp-editor.js', array(), TRP_PLUGIN_VERSION );
|
184 |
|
|
|
|
|
|
|
185 |
// Show upload media dialog in default language
|
186 |
switch_to_locale( $this->settings['default-language'] );
|
187 |
// Necessary for add media button
|
182 |
wp_enqueue_style( 'trp-editor-style', TRP_PLUGIN_URL . 'assets/css/trp-editor.css', array('dashicons', 'buttons'), TRP_PLUGIN_VERSION );
|
183 |
wp_enqueue_script( 'trp-editor', TRP_PLUGIN_URL . 'assets/js/trp-editor.js', array(), TRP_PLUGIN_VERSION );
|
184 |
|
185 |
+
wp_localize_script( 'trp-editor', 'trp_localized_strings', $this->localized_text() );
|
186 |
+
|
187 |
+
|
188 |
// Show upload media dialog in default language
|
189 |
switch_to_locale( $this->settings['default-language'] );
|
190 |
// Necessary for add media button
|
index.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: TranslatePress - Multilingual
|
4 |
Plugin URI: https://translatepress.com/
|
5 |
Description: Experience a better way of translating your WordPress site, with full support for WooCommerce and site builders.
|
6 |
-
Version: 1.5.
|
7 |
Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
|
8 |
Author URI: https://cozmoslabs.com/
|
9 |
Text Domain: translatepress-multilingual
|
3 |
Plugin Name: TranslatePress - Multilingual
|
4 |
Plugin URI: https://translatepress.com/
|
5 |
Description: Experience a better way of translating your WordPress site, with full support for WooCommerce and site builders.
|
6 |
+
Version: 1.5.3
|
7 |
Author: Cozmoslabs, Razvan Mocanu, Madalin Ungureanu, Cristophor Hurduban
|
8 |
Author URI: https://cozmoslabs.com/
|
9 |
Text Domain: translatepress-multilingual
|
languages/translatepress-multilingual.pot
CHANGED
@@ -13,51 +13,51 @@ msgstr ""
|
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
-
#: includes/class-ald-settings.php:37
|
17 |
msgid "First by browser language, then IP address (recommended)"
|
18 |
msgstr ""
|
19 |
|
20 |
-
#: includes/class-ald-settings.php:38
|
21 |
msgid "First by IP address, then by browser language"
|
22 |
msgstr ""
|
23 |
|
24 |
-
#: includes/class-ald-settings.php:39
|
25 |
msgid "Only by browser language"
|
26 |
msgstr ""
|
27 |
|
28 |
-
#: includes/class-ald-settings.php:40
|
29 |
msgid "Only by IP address"
|
30 |
msgstr ""
|
31 |
|
32 |
-
#: includes/class-ald-settings.php:110
|
33 |
msgid "WARNING. Cannot determine your language preference based on your current IP.<br>This is most likely because the website is on a local environment."
|
34 |
msgstr ""
|
35 |
|
36 |
-
#: partials/license-settings-page.php:4, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:4, ../tp-add-on-extra-languages/partials/license-settings-page.php:4,
|
37 |
msgid "TranslatePress Settings"
|
38 |
msgstr ""
|
39 |
|
40 |
-
#: partials/license-settings-page.php:10, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:10, ../tp-add-on-extra-languages/partials/license-settings-page.php:10,
|
41 |
msgid "License Key"
|
42 |
msgstr ""
|
43 |
|
44 |
-
#: partials/license-settings-page.php:15, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:15, ../tp-add-on-extra-languages/partials/license-settings-page.php:15,
|
45 |
msgid "Enter your license key."
|
46 |
msgstr ""
|
47 |
|
48 |
-
#: partials/license-settings-page.php:22, partials/license-settings-page.php:31, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:22, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:31, ../tp-add-on-extra-languages/partials/license-settings-page.php:22, ../tp-add-on-extra-languages/partials/license-settings-page.php:31,
|
49 |
msgid "Activate License"
|
50 |
msgstr ""
|
51 |
|
52 |
-
#: partials/license-settings-page.php:28, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:28, ../tp-add-on-extra-languages/partials/license-settings-page.php:28,
|
53 |
msgid "Deactivate License"
|
54 |
msgstr ""
|
55 |
|
56 |
-
#: partials/settings-option.php:2
|
57 |
msgid "Method of language detection"
|
58 |
msgstr ""
|
59 |
|
60 |
-
#: partials/settings-option.php:14
|
61 |
msgid "Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies."
|
62 |
msgstr ""
|
63 |
|
@@ -109,11 +109,11 @@ msgstr ""
|
|
109 |
msgid "Limit this menu item to the following languages"
|
110 |
msgstr ""
|
111 |
|
112 |
-
#:
|
113 |
msgid "The Yoast SEO Sitemaps will now contain the default language slug: example.com/en/sitemap_index.xml <br/> This works perfectly, just take it into account when submitting the sitemap to Google."
|
114 |
msgstr ""
|
115 |
|
116 |
-
#:
|
117 |
msgid "Post Slug"
|
118 |
msgstr ""
|
119 |
|
@@ -301,7 +301,7 @@ msgstr ""
|
|
301 |
msgid "General"
|
302 |
msgstr ""
|
303 |
|
304 |
-
#: ../translatepress/includes/class-settings.php:389, ../translatepress/includes/class-translation-manager.php:
|
305 |
msgid "Translate Site"
|
306 |
msgstr ""
|
307 |
|
@@ -313,7 +313,7 @@ msgstr ""
|
|
313 |
msgid "License"
|
314 |
msgstr ""
|
315 |
|
316 |
-
#: ../translatepress/includes/class-settings.php:430, ../translatepress/includes/class-translation-manager.php:
|
317 |
msgid "Settings"
|
318 |
msgstr ""
|
319 |
|
@@ -549,15 +549,15 @@ msgstr ""
|
|
549 |
msgid "Dynamically Added Strings"
|
550 |
msgstr ""
|
551 |
|
552 |
-
#: ../translatepress/includes/class-translation-manager.php:
|
553 |
msgid "Translate Page"
|
554 |
msgstr ""
|
555 |
|
556 |
-
#: ../translatepress/includes/class-translation-manager.php:
|
557 |
msgid "Security check"
|
558 |
msgstr ""
|
559 |
|
560 |
-
#: ../translatepress/includes/class-translation-manager.php:
|
561 |
msgid "<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting."
|
562 |
msgstr ""
|
563 |
|
13 |
"X-Poedit-SourceCharset: UTF-8\n"
|
14 |
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
15 |
|
16 |
+
#: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:37
|
17 |
msgid "First by browser language, then IP address (recommended)"
|
18 |
msgstr ""
|
19 |
|
20 |
+
#: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:38
|
21 |
msgid "First by IP address, then by browser language"
|
22 |
msgstr ""
|
23 |
|
24 |
+
#: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:39
|
25 |
msgid "Only by browser language"
|
26 |
msgstr ""
|
27 |
|
28 |
+
#: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:40
|
29 |
msgid "Only by IP address"
|
30 |
msgstr ""
|
31 |
|
32 |
+
#: ../tp-add-on-automatic-language-detection/includes/class-ald-settings.php:110
|
33 |
msgid "WARNING. Cannot determine your language preference based on your current IP.<br>This is most likely because the website is on a local environment."
|
34 |
msgstr ""
|
35 |
|
36 |
+
#: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:4, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:4, ../tp-add-on-extra-languages/partials/license-settings-page.php:4, partials/license-settings-page.php:4, ../translatepress/partials/addons-settings-page.php:3, ../translatepress/partials/license-settings-page.php:8, ../translatepress/partials/license-settings-page.php:46, ../translatepress/partials/main-settings-page.php:5, ../translatepress/partials/test-google-key-settings-page.php:10, ../translatepress/partials/trp-remove-duplicate-rows.php:3, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:4
|
37 |
msgid "TranslatePress Settings"
|
38 |
msgstr ""
|
39 |
|
40 |
+
#: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:10, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:10, ../tp-add-on-extra-languages/partials/license-settings-page.php:10, partials/license-settings-page.php:10, ../translatepress/partials/license-settings-page.php:14, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:10
|
41 |
msgid "License Key"
|
42 |
msgstr ""
|
43 |
|
44 |
+
#: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:15, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:15, ../tp-add-on-extra-languages/partials/license-settings-page.php:15, partials/license-settings-page.php:15, ../translatepress/partials/license-settings-page.php:38, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:15
|
45 |
msgid "Enter your license key."
|
46 |
msgstr ""
|
47 |
|
48 |
+
#: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:22, ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:31, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:22, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:31, ../tp-add-on-extra-languages/partials/license-settings-page.php:22, ../tp-add-on-extra-languages/partials/license-settings-page.php:31, partials/license-settings-page.php:22, partials/license-settings-page.php:31, ../translatepress/partials/license-settings-page.php:32, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:22, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:31
|
49 |
msgid "Activate License"
|
50 |
msgstr ""
|
51 |
|
52 |
+
#: ../tp-add-on-automatic-language-detection/partials/license-settings-page.php:28, ../tp-add-on-browse-as-other-roles/partials/license-settings-page.php:28, ../tp-add-on-extra-languages/partials/license-settings-page.php:28, partials/license-settings-page.php:28, ../translatepress/partials/license-settings-page.php:22, ../trp-add-on-translator-accounts-add-on/partials/license-settings-page.php:28
|
53 |
msgid "Deactivate License"
|
54 |
msgstr ""
|
55 |
|
56 |
+
#: ../tp-add-on-automatic-language-detection/partials/settings-option.php:2
|
57 |
msgid "Method of language detection"
|
58 |
msgstr ""
|
59 |
|
60 |
+
#: ../tp-add-on-automatic-language-detection/partials/settings-option.php:14
|
61 |
msgid "Select how the language should be detected for first time visitors.<br>The visitor's last displayed language will be remembered through cookies."
|
62 |
msgstr ""
|
63 |
|
109 |
msgid "Limit this menu item to the following languages"
|
110 |
msgstr ""
|
111 |
|
112 |
+
#: class-seo-pack.php:143
|
113 |
msgid "The Yoast SEO Sitemaps will now contain the default language slug: example.com/en/sitemap_index.xml <br/> This works perfectly, just take it into account when submitting the sitemap to Google."
|
114 |
msgstr ""
|
115 |
|
116 |
+
#: includes/class-slug-manager.php:32
|
117 |
msgid "Post Slug"
|
118 |
msgstr ""
|
119 |
|
301 |
msgid "General"
|
302 |
msgstr ""
|
303 |
|
304 |
+
#: ../translatepress/includes/class-settings.php:389, ../translatepress/includes/class-translation-manager.php:237
|
305 |
msgid "Translate Site"
|
306 |
msgstr ""
|
307 |
|
313 |
msgid "License"
|
314 |
msgstr ""
|
315 |
|
316 |
+
#: ../translatepress/includes/class-settings.php:430, ../translatepress/includes/class-translation-manager.php:268
|
317 |
msgid "Settings"
|
318 |
msgstr ""
|
319 |
|
549 |
msgid "Dynamically Added Strings"
|
550 |
msgstr ""
|
551 |
|
552 |
+
#: ../translatepress/includes/class-translation-manager.php:249
|
553 |
msgid "Translate Page"
|
554 |
msgstr ""
|
555 |
|
556 |
+
#: ../translatepress/includes/class-translation-manager.php:944
|
557 |
msgid "Security check"
|
558 |
msgstr ""
|
559 |
|
560 |
+
#: ../translatepress/includes/class-translation-manager.php:1018
|
561 |
msgid "<strong>Warning:</strong> Some strings have possibly incorrectly encoded characters. This may result in breaking the queries, rendering the page untranslated in live mode. Consider revising the following strings or their method of outputting."
|
562 |
msgstr ""
|
563 |
|
partials/translation-manager.php
CHANGED
@@ -75,7 +75,6 @@
|
|
75 |
ajax_url='<?php echo esc_url( apply_filters( 'trp_wp_ajax_url', admin_url( 'admin-ajax.php' ) ) ); ?>'
|
76 |
string_group_order='<?php echo esc_attr( json_encode( $string_groups ) ); ?>'
|
77 |
merge_rules='<?php echo esc_attr( json_encode( $translation_manager->get_merge_rules() ) ); ?>'
|
78 |
-
localized_text='<?php echo esc_attr( json_encode( $translation_manager->localized_text() ) ); ?>'
|
79 |
paid_version="<?php echo esc_attr( trp_is_paid_version() ? 'true' : 'false' ); ?>"
|
80 |
flags_path="<?php echo esc_attr( json_encode( $flags_path ) ); ?>"
|
81 |
>
|
75 |
ajax_url='<?php echo esc_url( apply_filters( 'trp_wp_ajax_url', admin_url( 'admin-ajax.php' ) ) ); ?>'
|
76 |
string_group_order='<?php echo esc_attr( json_encode( $string_groups ) ); ?>'
|
77 |
merge_rules='<?php echo esc_attr( json_encode( $translation_manager->get_merge_rules() ) ); ?>'
|
|
|
78 |
paid_version="<?php echo esc_attr( trp_is_paid_version() ? 'true' : 'false' ); ?>"
|
79 |
flags_path="<?php echo esc_attr( json_encode( $flags_path ) ); ?>"
|
80 |
>
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: translate, translation, multilingual, automatic translation, bilingual, fr
|
|
5 |
Requires at least: 3.1.0
|
6 |
Tested up to: 5.2.2
|
7 |
Requires PHP: 5.6.20
|
8 |
-
Stable tag: 1.5.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -142,8 +142,10 @@ For more information please check out [TranslatePress - Multilingual plugin docu
|
|
142 |
|
143 |
|
144 |
== Changelog ==
|
145 |
-
= 1.5.
|
146 |
* Fixed blank page when opening Translation Editor in some localized languages
|
|
|
|
|
147 |
* Added -Advanced- tab with various custom settings
|
148 |
* Added compatibility to allow translating SeedProd plugin Coming Soon page
|
149 |
|
5 |
Requires at least: 3.1.0
|
6 |
Tested up to: 5.2.2
|
7 |
Requires PHP: 5.6.20
|
8 |
+
Stable tag: 1.5.3
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
142 |
|
143 |
|
144 |
== Changelog ==
|
145 |
+
= 1.5.3 =
|
146 |
* Fixed blank page when opening Translation Editor in some localized languages
|
147 |
+
|
148 |
+
= 1.5.2 =
|
149 |
* Added -Advanced- tab with various custom settings
|
150 |
* Added compatibility to allow translating SeedProd plugin Coming Soon page
|
151 |
|