From b1a4eee273de1e6d661ae0bc19d08e03ecc02058 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 27 Nov 2024 16:17:12 +1300 Subject: [PATCH 01/10] Added the ability to copy triggers --- Controller.php | 52 ++++++++ Model/BaseModel.php | 19 +++ Model/Tag.php | 15 +-- Model/Trigger.php | 34 ++++++ stylesheets/manageList.less | 10 ++ tests/Integration/Model/TriggerTest.php | 88 ++++++++++++- vue/dist/TagManager.umd.js | 156 ++++++++++++++---------- vue/dist/TagManager.umd.min.js | 4 +- vue/src/CopyDialog/CopyDialog.less | 2 +- vue/src/CopyDialog/CopyDialog.vue | 4 +- vue/src/Trigger/TriggerList.vue | 29 ++++- 11 files changed, 326 insertions(+), 87 deletions(-) diff --git a/Controller.php b/Controller.php index a7586b106..e4c54e22a 100644 --- a/Controller.php +++ b/Controller.php @@ -23,6 +23,7 @@ use Piwik\Plugins\TagManager\Model\Container; use Piwik\Plugins\TagManager\Model\Environment; use Piwik\Plugins\TagManager\Model\Tag; +use Piwik\Plugins\TagManager\Model\Trigger; use Piwik\Site; use Piwik\Url; use Piwik\View; @@ -32,6 +33,7 @@ class Controller extends \Piwik\Plugin\Controller { public const COPY_CONTAINER_NONCE = 'TagManager.copyContainer'; public const COPY_TAG_NONCE = 'TagManager.copyTag'; + public const COPY_TRIGGER_NONCE = 'TagManager.copyTrigger'; /** * @var AccessValidator @@ -442,6 +444,56 @@ public function copyTag() return json_encode(['isSuccess' => true, 'urlToNewCopy' => $url]); } + public function copyTriggerDialog() + { + $this->accessValidator->checkWriteCapability($this->idSite); + $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); + + $request = \Piwik\Request::fromRequest(); + $idTrigger = $request->getIntegerParameter('idTrigger'); + $idSourceContainer = $request->getStringParameter('idContainer'); + $idContainerVersion = $request->getIntegerParameter('idContainerVersion'); + + $view = new View("@TagManager/copyDialog"); + $view->defaultSiteDecoded = [ + 'id' => $this->idSite, + 'name' => Common::unsanitizeInputValue(Site::getNameFor($this->idSite)), + ]; + $view->idToCopy = $idTrigger; + $view->copyType = 'trigger'; + $view->idSourceContainer = $idSourceContainer; + $view->idContainerVersion = $idContainerVersion; + $view->copyNonce = Nonce::getNonce(self::COPY_TRIGGER_NONCE); + return $view->render(); + } + + public function copyTrigger() + { + $this->accessValidator->checkWriteCapability($this->idSite); + $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); + Nonce::checkNonce(self::COPY_TRIGGER_NONCE); + + $request = \Piwik\Request::fromRequest(); + $idDestinationSite = $request->getIntegerParameter('idDestinationSite'); + $idDestinationContainer = $request->getStringParameter('idDestinationContainer'); + // Confirm tha the user has permission to copy to the selected site + $this->accessValidator->checkWriteCapability($idDestinationSite); + $idTrigger = $request->getIntegerParameter('idTrigger'); + $idContainerVersion = $request->getIntegerParameter('idContainerVersion'); + + $idTriggerNew = StaticContainer::get(Trigger::class)->copyTrigger($this->idSite, $idContainerVersion, $idTrigger, $idDestinationSite, $idDestinationContainer); + + $url = 'index.php?module=TagManager&action=manageTriggers&' + . Url::getQueryStringFromParameters([ + 'idSite' => $idDestinationSite, + 'idContainer' => $idDestinationContainer + ]) . '#?' . Url::getQueryStringFromParameters([ + 'idTrigger' => $idTriggerNew, + ]); + + return json_encode(['isSuccess' => true, 'urlToNewCopy' => $url]); + } + protected function renderTemplate($template, array $variables = array()) { if (false === strpos($template, '@') || false === strpos($template, '/')) { diff --git a/Model/BaseModel.php b/Model/BaseModel.php index 1821d7aff..9876d8791 100644 --- a/Model/BaseModel.php +++ b/Model/BaseModel.php @@ -9,7 +9,9 @@ namespace Piwik\Plugins\TagManager\Model; +use Piwik\Container\StaticContainer; use Piwik\Date; +use Piwik\Piwik; use Piwik\Site; class BaseModel @@ -38,4 +40,21 @@ protected function formatDate($date, $idSite) $timezone = Site::getTimezoneFor($idSite); return Date::factory($date, $timezone)->getLocalized(Date::DATETIME_FORMAT_SHORT); } + + protected function getDraftContainerVersion(int $idSite, string $idContainer): int + { + $container = StaticContainer::get(Container::class)->getContainer($idSite, $idContainer); + if (empty($container)) { + throw new \Exception(Piwik::translate('TagManager_ErrorContainerDoesNotExist', [$idContainer])); + } + + // Copy the new trigger to the draft version of the destination container + $idContainerVersion = $container['draft']['idcontainerversion'] ?? null; + // Make sure that the version is set and is an integer value + if (empty($idContainerVersion) || !(is_int($idContainerVersion) || (is_string($idContainerVersion) && ctype_digit($idContainerVersion)))) { + throw new \Exception(Piwik::translate('TagManager_ErrorContainerVersionDoesNotExist')); + } + // Make sure that the type is int + return intval($idContainerVersion); + } } diff --git a/Model/Tag.php b/Model/Tag.php index d5776a6a1..4c9bb7c81 100644 --- a/Model/Tag.php +++ b/Model/Tag.php @@ -232,20 +232,7 @@ public function copyTag(int $idSite, int $idContainerVersion, int $idTag, ?int $ private function copyReferencedVariablesAndTriggers(array &$tag, int $idSite, int $idContainerVersion, int $idDestinationSite, string $idDestinationContainer): int { - $container = StaticContainer::get(Container::class); - $destinationContainer = $container->getContainer($idDestinationSite, $idDestinationContainer); - if (empty($destinationContainer)) { - throw new \Exception(Piwik::translate('TagManager_ErrorContainerDoesNotExist', [$idDestinationContainer])); - } - - // Copy the new tag to the draft version of the destination container - $idDestinationVersion = $destinationContainer['draft']['idcontainerversion'] ?? null; - // Make sure that the version is set and is an integer value - if (empty($idDestinationVersion) || !(is_int($idDestinationVersion) || (is_string($idDestinationVersion) && ctype_digit($idDestinationVersion)))) { - throw new \Exception(Piwik::translate('TagManager_ErrorContainerVersionDoesNotExist')); - } - // Make sure that the type is int - $idDestinationVersion = intval($idDestinationVersion); + $idDestinationVersion = $this->getDraftContainerVersion($idDestinationSite, $idDestinationContainer); // Copy all the referenced variables and triggers and replace those references with references to the newly copied ones StaticContainer::get(Variable::class)->copyReferencedVariables($tag, $idSite, $idContainerVersion, $idDestinationSite, $idDestinationVersion); diff --git a/Model/Trigger.php b/Model/Trigger.php index 58cef8524..9c7cabb04 100644 --- a/Model/Trigger.php +++ b/Model/Trigger.php @@ -193,6 +193,40 @@ public function copyTriggerIfNoEquivalent(int $idSite, int $idContainerVersion, ); } + /** + * Make a copy of the trigger and return the ID. + * + * @param int $idSite + * @param int $idContainerVersion + * @param int $idTrigger + * @param null|int $idDestinationSite Optional ID of the site to which to copy the trigger. If empty, isSite is used + * @param string|null $idDestinationContainer Optional ID of the container to copy the tag to. If not provided the + * copy goes to the source site and container + * @return int ID of the newly created trigger + */ + public function copyTrigger(int $idSite, int $idContainerVersion, int $idTrigger, ?int $idDestinationSite = 0, ?string $idDestinationContainer = null): int + { + $idDestinationSite = $idDestinationSite ?: $idSite; + $idDestinationVersion = $idContainerVersion; + if ($idDestinationSite !== null && !empty($idDestinationContainer)) { + $idDestinationVersion = $this->getDraftContainerVersion($idDestinationSite, $idDestinationContainer); + } + + $trigger = $this->getContainerTrigger($idSite, $idContainerVersion, $idTrigger); + StaticContainer::get(Variable::class)->copyReferencedVariables($trigger, $idSite, $idContainerVersion, $idDestinationSite, $idDestinationVersion); + + $newName = $this->dao->makeCopyNameUnique($idDestinationSite, $trigger['name'], $idDestinationVersion); + return $this->addContainerTrigger( + $idDestinationSite, + $idDestinationVersion, + $trigger['type'], + $newName, + $trigger['parameters'], + $trigger['conditions'], + $trigger['description'] + ); + } + private function updateTriggerColumns($idSite, $idContainerVersion, $idTrigger, $columns) { if (!isset($columns['updated_date'])) { diff --git a/stylesheets/manageList.less b/stylesheets/manageList.less index b735204bd..44b6d1fae 100644 --- a/stylesheets/manageList.less +++ b/stylesheets/manageList.less @@ -59,6 +59,12 @@ } } +.tagManagerTriggerList { + td.action.hasCopyAction { + width: 170px; + } +} + .tagManagerContainerList { th.action, td.action { width: 240px; @@ -79,6 +85,10 @@ display: inline-block; color: #999; } + + td.action.hasCopyAction { + width: 170px; + } } .page:after { diff --git a/tests/Integration/Model/TriggerTest.php b/tests/Integration/Model/TriggerTest.php index ffdc2fac9..1a0fd0608 100644 --- a/tests/Integration/Model/TriggerTest.php +++ b/tests/Integration/Model/TriggerTest.php @@ -10,9 +10,11 @@ namespace Piwik\Plugins\TagManager\tests\Integration\Model; use Piwik\Container\StaticContainer; +use Piwik\Plugins\TagManager\Context\WebContext; use Piwik\Plugins\TagManager\Dao\TriggersDao; use Piwik\Plugins\TagManager\Input\Name; use Piwik\Plugins\TagManager\Model\Comparison; +use Piwik\Plugins\TagManager\Model\Container; use Piwik\Plugins\TagManager\Model\Tag; use Piwik\Plugins\TagManager\Model\Trigger; use Piwik\Plugins\TagManager\Model\Variable; @@ -589,7 +591,7 @@ public function testCopyTriggerIfNoEquivalent() public function testCopyTriggerIfNoEquivalentDifferentContainer() { $idNewTrigger = $this->model->copyTriggerIfNoEquivalent($this->idSite, $this->containerVersion1, $this->idTrigger1, $this->idSite, $this->containerVersion2); - $this->assertNotSame($this->idTrigger1, $idNewTrigger, 'The ID should be the same'); + $this->assertNotSame($this->idTrigger1, $idNewTrigger, 'The ID should not be the same'); $trigger1 = $this->model->getContainerTrigger($this->idSite, $this->containerVersion1, $this->idTrigger1); $trigger2 = $this->model->getContainerTrigger($this->idSite, $this->containerVersion2, $idNewTrigger); @@ -634,6 +636,90 @@ public function testCopyTriggerIfNoEquivalentReferencesVariable() $this->assertEquals($trigger1, $trigger2, 'The triggers should match'); } + public function testCopyTrigger() + { + $countTriggers = count($this->model->getContainerTriggers($this->idSite, $this->containerVersion1)); + $idNewTrigger = $this->model->copyTrigger($this->idSite, $this->containerVersion1, $this->idTrigger1); + $this->assertGreaterThan(0, $idNewTrigger); + $this->assertNotSame($this->idTrigger1, $idNewTrigger, 'The ID should not be the same'); + $this->assertCount($countTriggers + 1, $this->model->getContainerTriggers($this->idSite, $this->containerVersion1), 'The number of triggers should have increased by 1'); + + $trigger1 = $this->model->getContainerTrigger($this->idSite, $this->containerVersion1, $this->idTrigger1); + $trigger2 = $this->model->getContainerTrigger($this->idSite, $this->containerVersion1, $idNewTrigger); + + $this->assertSame($trigger1['name'] . ' (1)', $trigger2['name'], 'The name should have been updated'); + unset($trigger1['idtrigger']); + unset($trigger2['idtrigger']); + unset($trigger1['name']); + unset($trigger2['name']); + + $this->assertEquals($trigger1, $trigger2, 'The triggers should match'); + } + + public function testCopyTriggerDifferentContainer() + { + $containerModel = StaticContainer::get(Container::class); + $context = WebContext::ID; + $description = 'My description'; + + $idContainer = $containerModel->addContainer($this->idSite, $context, 'FooContainer', $description, 0, 0, 0); + $container = $containerModel->getContainer($this->idSite, $idContainer); + $idContainerVersion = $container['draft']['idcontainerversion']; + + $idNewTrigger = $this->model->copyTrigger($this->idSite, $this->containerVersion1, $this->idTrigger1, $this->idSite, $idContainer); + $this->assertNotSame($this->idTrigger1, $idNewTrigger, 'The ID should not be the same'); + + $trigger1 = $this->model->getContainerTrigger($this->idSite, $this->containerVersion1, $this->idTrigger1); + $trigger2 = $this->model->getContainerTrigger($this->idSite, $idContainerVersion, $idNewTrigger); + + unset($trigger1['idtrigger']); + unset($trigger2['idtrigger']); + unset($trigger1['idcontainerversion']); + unset($trigger2['idcontainerversion']); + + $this->assertEquals($trigger1, $trigger2, 'The triggers should match'); + + // Confirm that when trying to copy again, it does in fact create a new copy + $idSecondTrigger = $this->model->copyTrigger($this->idSite, $this->containerVersion1, $this->idTrigger1, $this->idSite, $idContainer); + $this->assertNotSame($idNewTrigger, $idSecondTrigger, 'The ID should not be the same'); + } + + public function testCopyTriggerReferencesVariable() + { + $trigger1 = $this->model->getContainerTrigger($this->idSite, $this->containerVersion1, $this->idTrigger1); + + $containerModel = StaticContainer::get(Container::class); + $context = WebContext::ID; + $description = 'My description'; + + $idContainer = $containerModel->addContainer($this->idSite, $context, 'FooContainer', $description, 0, 0, 0); + $container = $containerModel->getContainer($this->idSite, $idContainer); + $idContainerVersion = $container['draft']['idcontainerversion']; + + $variableName = 'TestVariableToReference'; + $variableModel = StaticContainer::get(Variable::class); + $variableModel->addContainerVariable($this->idSite, $this->containerVersion1, DataLayerVariable::ID, $variableName, ['dataLayerName' => 'myVariable'], '', []); + $conditions = [['comparison' => 'equals', 'actual' => $variableName, 'expected' => 'someValue']] ; + $this->model->updateContainerTrigger($this->idSite, $this->containerVersion1, $this->idTrigger1, $trigger1['name'], $trigger1['parameters'], $conditions, $trigger1['description']); + + $this->assertCount(0, $variableModel->getContainerVariables($this->idSite, $idContainerVersion), 'There should be no variables in the container.'); + + $idNewTrigger = $this->model->copyTrigger($this->idSite, $this->containerVersion1, $this->idTrigger1, $this->idSite, $idContainer); + $this->assertNotSame($this->idTrigger1, $idNewTrigger, 'The ID should be the same'); + + $this->assertCount(1, $variableModel->getContainerVariables($this->idSite, $idContainerVersion), 'The variable should have been copied to the new container.'); + + $trigger2 = $this->model->getContainerTrigger($this->idSite, $idContainerVersion, $idNewTrigger); + + unset($trigger1['idtrigger']); + unset($trigger2['idtrigger']); + unset($trigger1['idcontainerversion']); + unset($trigger2['idcontainerversion']); + $trigger1['conditions'] = $conditions; + + $this->assertEquals($trigger1, $trigger2, 'The triggers should match'); + } + private function updateContainerTrigger($idSite, $idContainerVersion, $idTrigger, $name = 'MyName', $parameters = [], $conditions = [], $description = '') { return $this->model->updateContainerTrigger($idSite, $idContainerVersion, $idTrigger, $name, $parameters, $conditions, $description); diff --git a/vue/dist/TagManager.umd.js b/vue/dist/TagManager.umd.js index 2c065c588..718002ffb 100644 --- a/vue/dist/TagManager.umd.js +++ b/vue/dist/TagManager.umd.js @@ -3403,88 +3403,86 @@ var TRIGGER_TYPE_TO_CONDITION_ACTUAL = { TriggerEditvue_type_script_lang_ts.render = TriggerEditvue_type_template_id_eb702f58_render /* harmony default export */ var TriggerEdit = (TriggerEditvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=template&id=5282b219 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=template&id=405ff103 -var TriggerListvue_type_template_id_5282b219_hoisted_1 = { +var TriggerListvue_type_template_id_405ff103_hoisted_1 = { class: "tagManagerManageList tagManagerTriggerList" }; -var TriggerListvue_type_template_id_5282b219_hoisted_2 = { +var TriggerListvue_type_template_id_405ff103_hoisted_2 = { class: "triggerSearchFilter" }; -var TriggerListvue_type_template_id_5282b219_hoisted_3 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_4 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_5 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_6 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_7 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_8 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_9 = { +var TriggerListvue_type_template_id_405ff103_hoisted_3 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_4 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_5 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_6 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_7 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_8 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_9 = { colspan: "7" }; -var TriggerListvue_type_template_id_5282b219_hoisted_10 = { +var TriggerListvue_type_template_id_405ff103_hoisted_10 = { class: "loadingPiwik" }; -var TriggerListvue_type_template_id_5282b219_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var TriggerListvue_type_template_id_405ff103_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1); -var TriggerListvue_type_template_id_5282b219_hoisted_12 = { +var TriggerListvue_type_template_id_405ff103_hoisted_12 = { colspan: "7" }; -var TriggerListvue_type_template_id_5282b219_hoisted_13 = ["id"]; -var TriggerListvue_type_template_id_5282b219_hoisted_14 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_15 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_16 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_17 = { +var TriggerListvue_type_template_id_405ff103_hoisted_13 = ["id"]; +var TriggerListvue_type_template_id_405ff103_hoisted_14 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_15 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_16 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_17 = { class: "conditions" }; -var TriggerListvue_type_template_id_5282b219_hoisted_18 = { +var TriggerListvue_type_template_id_405ff103_hoisted_18 = { class: "icon-ok" }; -var TriggerListvue_type_template_id_5282b219_hoisted_19 = ["title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_20 = { - class: "action" -}; -var TriggerListvue_type_template_id_5282b219_hoisted_21 = ["onClick", "title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_22 = ["onClick", "title"]; -var TriggerListvue_type_template_id_5282b219_hoisted_23 = { +var TriggerListvue_type_template_id_405ff103_hoisted_19 = ["title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_20 = ["onClick", "title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_21 = ["onClick", "title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_22 = ["onClick", "title"]; +var TriggerListvue_type_template_id_405ff103_hoisted_23 = { class: "tableActionBar" }; -var TriggerListvue_type_template_id_5282b219_hoisted_24 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var TriggerListvue_type_template_id_405ff103_hoisted_24 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, " ", -1); -var TriggerListvue_type_template_id_5282b219_hoisted_25 = { +var TriggerListvue_type_template_id_405ff103_hoisted_25 = { class: "ui-confirm", id: "confirmDeleteTrigger", ref: "confirmDeleteTrigger" }; -var TriggerListvue_type_template_id_5282b219_hoisted_26 = ["value"]; -var TriggerListvue_type_template_id_5282b219_hoisted_27 = ["value"]; -var TriggerListvue_type_template_id_5282b219_hoisted_28 = { +var TriggerListvue_type_template_id_405ff103_hoisted_26 = ["value"]; +var TriggerListvue_type_template_id_405ff103_hoisted_27 = ["value"]; +var TriggerListvue_type_template_id_405ff103_hoisted_28 = { class: "ui-confirm", id: "confirmDeleteTriggerNotPossible", ref: "confirmDeleteTriggerNotPossible" }; -var TriggerListvue_type_template_id_5282b219_hoisted_29 = { +var TriggerListvue_type_template_id_405ff103_hoisted_29 = { class: "collection" }; -var TriggerListvue_type_template_id_5282b219_hoisted_30 = ["value"]; -function TriggerListvue_type_template_id_5282b219_render(_ctx, _cache, $props, $setup, $data, $options) { +var TriggerListvue_type_template_id_405ff103_hoisted_30 = ["value"]; +function TriggerListvue_type_template_id_405ff103_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", TriggerListvue_type_template_id_5282b219_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", TriggerListvue_type_template_id_405ff103_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { feature: "Tag Manager", "content-title": _ctx.translate('TagManager_ManageX', _ctx.translate('TagManager_Triggers')), "help-text": _ctx.triggersHelpText }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_5282b219_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_405ff103_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "triggerSearch", title: _ctx.translate('General_Search'), @@ -3495,22 +3493,22 @@ function TriggerListvue_type_template_id_5282b219_render(_ctx, _cache, $props, $ }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.triggers.length > 0]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "name", title: _ctx.nameTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, TriggerListvue_type_template_id_5282b219_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, TriggerListvue_type_template_id_405ff103_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "description", title: _ctx.descriptionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, TriggerListvue_type_template_id_5282b219_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, TriggerListvue_type_template_id_405ff103_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "type", title: _ctx.typeTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, TriggerListvue_type_template_id_5282b219_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, TriggerListvue_type_template_id_405ff103_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "conditions", title: _ctx.filterTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Filter')), 9, TriggerListvue_type_template_id_5282b219_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Filter')), 9, TriggerListvue_type_template_id_405ff103_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "lastUpdated", title: _ctx.lastUpdatedTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, TriggerListvue_type_template_id_5282b219_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, TriggerListvue_type_template_id_405ff103_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "action", title: _ctx.actionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, TriggerListvue_type_template_id_5282b219_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_5282b219_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TriggerListvue_type_template_id_5282b219_hoisted_10, [TriggerListvue_type_template_id_5282b219_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_5282b219_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoTriggersFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, TriggerListvue_type_template_id_405ff103_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_405ff103_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TriggerListvue_type_template_id_405ff103_hoisted_10, [TriggerListvue_type_template_id_405ff103_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_405ff103_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoTriggersFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createContainerTriggerNow", onClick: _cache[1] || (_cache[1] = function ($event) { return _ctx.createTrigger(); @@ -3525,46 +3523,54 @@ function TriggerListvue_type_template_id_5282b219_render(_ctx, _cache, $props, $ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "name", title: trigger.name - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(trigger.name, 50)), 9, TriggerListvue_type_template_id_5282b219_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(trigger.name, 50)), 9, TriggerListvue_type_template_id_405ff103_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "description", title: trigger.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(trigger.description, 75)), 9, TriggerListvue_type_template_id_5282b219_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(trigger.description, 75)), 9, TriggerListvue_type_template_id_405ff103_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "type", title: trigger.typeMetadata.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(trigger.typeMetadata.name), 9, TriggerListvue_type_template_id_5282b219_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_5282b219_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TriggerListvue_type_template_id_5282b219_hoisted_18, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], (_trigger$conditions = trigger.conditions) === null || _trigger$conditions === void 0 ? void 0 : _trigger$conditions.length]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(trigger.typeMetadata.name), 9, TriggerListvue_type_template_id_405ff103_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_405ff103_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TriggerListvue_type_template_id_405ff103_hoisted_18, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], (_trigger$conditions = trigger.conditions) === null || _trigger$conditions === void 0 ? void 0 : _trigger$conditions.length]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "lastUpdated", title: _ctx.translate('TagManager_CreatedOnX', trigger.created_date_pretty) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(trigger.updated_date_pretty), 1)], 8, TriggerListvue_type_template_id_5282b219_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_5282b219_hoisted_20, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(trigger.updated_date_pretty), 1)], 8, TriggerListvue_type_template_id_405ff103_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.getActionClasses) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-edit", onClick: function onClick($event) { return _ctx.editTrigger(trigger.idtrigger, trigger.type); }, title: _ctx.translate('TagManager_EditTrigger') - }, null, 8, TriggerListvue_type_template_id_5282b219_hoisted_21), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_20), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-delete", onClick: function onClick($event) { return _ctx.deleteTrigger(trigger); }, title: _ctx.translate('TagManager_DeleteX', _ctx.translate('TagManager_Trigger')) - }, null, 8, TriggerListvue_type_template_id_5282b219_hoisted_22)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, TriggerListvue_type_template_id_5282b219_hoisted_13); - }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_5282b219_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_21), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + class: "table-action icon-content-copy", + onClick: function onClick($event) { + return _ctx.openCopyDialog(trigger); + }, + title: _ctx.translate('TagManager_CopyX', _ctx.translate('TagManager_Trigger')) + }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_22), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasPublishCapability()]])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, TriggerListvue_type_template_id_405ff103_hoisted_13); + }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_405ff103_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createNewTrigger", value: "", onClick: _cache[2] || (_cache[2] = function ($event) { return _ctx.createTrigger(); }) - }, [TriggerListvue_type_template_id_5282b219_hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewTrigger')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; + }, [TriggerListvue_type_template_id_405ff103_hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewTrigger')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; }), _: 1 - }, 8, ["content-title", "help-text"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_5282b219_hoisted_25, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteTriggerConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, 8, ["content-title", "help-text"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_405ff103_hoisted_25, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteTriggerConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') - }, null, 8, TriggerListvue_type_template_id_5282b219_hoisted_26), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_26), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "no", type: "button", value: _ctx.translate('General_No') - }, null, 8, TriggerListvue_type_template_id_5282b219_hoisted_27)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_5282b219_hoisted_28, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerCannotBeDeleted')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerBeingUsedBy')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", TriggerListvue_type_template_id_5282b219_hoisted_29, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.triggerReferences, function (reference) { + }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_27)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_405ff103_hoisted_28, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerCannotBeDeleted')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerBeingUsedBy')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", TriggerListvue_type_template_id_405ff103_hoisted_29, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.triggerReferences, function (reference) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: "collection-item", key: reference.referenceId @@ -3573,9 +3579,9 @@ function TriggerListvue_type_template_id_5282b219_render(_ctx, _cache, $props, $ role: "no", type: "button", value: _ctx.translate('General_Cancel') - }, null, 8, TriggerListvue_type_template_id_5282b219_hoisted_30)], 512)]); + }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_30)], 512)]); } -// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=template&id=5282b219 +// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=template&id=405ff103 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=script&lang=ts function TriggerListvue_type_script_lang_ts_toConsumableArray(arr) { return TriggerListvue_type_script_lang_ts_arrayWithoutHoles(arr) || TriggerListvue_type_script_lang_ts_iterableToArray(arr) || TriggerListvue_type_script_lang_ts_unsupportedIterableToArray(arr) || TriggerListvue_type_script_lang_ts_nonIterableSpread(); } @@ -3663,6 +3669,20 @@ var TriggerListvue_type_script_lang_ts_window = window, }, truncateText: function truncateText(text, length) { return TriggerListvue_type_script_lang_ts_tagManagerHelper.truncateText(text, length); + }, + hasPublishCapability: function hasPublishCapability() { + return external_CoreHome_["Matomo"].hasUserCapability('tagmanager_write') && external_CoreHome_["Matomo"].hasUserCapability('tagmanager_use_custom_templates'); + }, + openCopyDialog: function openCopyDialog(trigger) { + var url = external_CoreHome_["MatomoUrl"].stringify({ + module: 'TagManager', + action: 'copyTriggerDialog', + idSite: trigger.idsite, + idContainer: this.idContainer, + idTrigger: trigger.idtrigger, + idContainerVersion: this.idContainerVersion + }); + window.Piwik_Popover.createPopupAndLoadUrl(url, '', 'mtmCopyTrigger'); } }, computed: { @@ -3724,6 +3744,10 @@ var TriggerListvue_type_script_lang_ts_window = window, }, actionTranslatedText: function actionTranslatedText() { return this.translate('TagManager_TriggersActionDescription'); + }, + getActionClasses: function getActionClasses() { + var copyClass = this.hasPublishCapability() ? ' hasCopyAction' : ''; + return "action".concat(copyClass); } } })); @@ -3733,7 +3757,7 @@ var TriggerListvue_type_script_lang_ts_window = window, -TriggerListvue_type_script_lang_ts.render = TriggerListvue_type_template_id_5282b219_render +TriggerListvue_type_script_lang_ts.render = TriggerListvue_type_template_id_405ff103_render /* harmony default export */ var TriggerList = (TriggerListvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Trigger/TriggerManage.vue?vue&type=template&id=50893454 @@ -10741,18 +10765,18 @@ function getCircularReplacer() { Debuggingvue_type_script_lang_ts.render = Debuggingvue_type_template_id_1ae9acce_render /* harmony default export */ var Debugging = (Debuggingvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/CopyDialog/CopyDialog.vue?vue&type=template&id=7e821988 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/CopyDialog/CopyDialog.vue?vue&type=template&id=66250f10 -var CopyDialogvue_type_template_id_7e821988_hoisted_1 = { +var CopyDialogvue_type_template_id_66250f10_hoisted_1 = { class: "copyMtmObjectDialog" }; -var CopyDialogvue_type_template_id_7e821988_hoisted_2 = ["innerHTML"]; -function CopyDialogvue_type_template_id_7e821988_render(_ctx, _cache, $props, $setup, $data, $options) { +var CopyDialogvue_type_template_id_66250f10_hoisted_2 = ["innerHTML"]; +function CopyDialogvue_type_template_id_66250f10_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _directive_form = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("form"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", CopyDialogvue_type_template_id_7e821988_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getCopyDialogTitle), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getCopyDescription), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", CopyDialogvue_type_template_id_66250f10_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getCopyDialogTitle), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.getCopyDescription), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "site", name: "destinationSite", title: _ctx.translate('TagManager_ChooseWebsite'), @@ -10776,14 +10800,14 @@ function CopyDialogvue_type_template_id_7e821988_render(_ctx, _cache, $props, $s key: 1, class: "copyNote", innerHTML: _ctx.$sanitize(_ctx.getCopyContainerNote) - }, null, 8, CopyDialogvue_type_template_id_7e821988_hoisted_2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("button", { + }, null, 8, CopyDialogvue_type_template_id_66250f10_hoisted_2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("button", { class: "btn", onClick: _cache[2] || (_cache[2] = function () { return _ctx.performCopy && _ctx.performCopy.apply(_ctx, arguments); }) }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Copy')), 1)], 512), [[_directive_form]])]); } -// CONCATENATED MODULE: ./plugins/TagManager/vue/src/CopyDialog/CopyDialog.vue?vue&type=template&id=7e821988 +// CONCATENATED MODULE: ./plugins/TagManager/vue/src/CopyDialog/CopyDialog.vue?vue&type=template&id=66250f10 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/CopyDialog/CopyDialog.vue?vue&type=script&lang=ts @@ -10982,11 +11006,11 @@ function CopyDialogvue_type_template_id_7e821988_render(_ctx, _cache, $props, $s break; case 'trigger': - Triggers_store.fetchTriggers(this.idSourceContainer, this.idContainerVersion); + Triggers_store.reload(this.idSourceContainer, this.idContainerVersion); break; case 'variable': - Variables_store.fetchVariables(this.idSourceContainer, this.idContainerVersion); + Variables_store.reload(this.idSourceContainer, this.idContainerVersion); break; default: @@ -11149,7 +11173,7 @@ function CopyDialogvue_type_template_id_7e821988_render(_ctx, _cache, $props, $s -CopyDialogvue_type_script_lang_ts.render = CopyDialogvue_type_template_id_7e821988_render +CopyDialogvue_type_script_lang_ts.render = CopyDialogvue_type_template_id_66250f10_render /* harmony default export */ var CopyDialog = (CopyDialogvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/TagManager/vue/src/index.ts diff --git a/vue/dist/TagManager.umd.min.js b/vue/dist/TagManager.umd.min.js index b016a772c..ed21ba90d 100644 --- a/vue/dist/TagManager.umd.min.js +++ b/vue/dist/TagManager.umd.min.js @@ -16,7 +16,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var Ta=function(){function e(){var t=this;fa(this,e),Oa(this,"privateState",Object(r["reactive"])({triggers:[],isLoadingTriggers:!1,isLoadingSingle:!1,isUpdating:!1})),Oa(this,"state",Object(r["computed"])((function(){return Object(r["readonly"])(t.privateState)}))),Oa(this,"isUpdating",Object(r["computed"])((function(){return t.state.value.isUpdating}))),Oa(this,"isLoading",Object(r["computed"])((function(){var e=t.state.value;return e.isLoadingTriggers||e.isLoadingSingle}))),Oa(this,"triggers",Object(r["computed"])((function(){return t.state.value.triggers}))),Oa(this,"fetchPromise",null),Oa(this,"availableTriggersPromises",{})}return ja(e,[{key:"fetchTriggers",value:function(e,t){var n=this;return this.privateState.triggers=[],this.privateState.isLoadingTriggers=!0,this.fetchPromise||(this.fetchPromise=u["AjaxHelper"].fetch({method:"TagManager.getContainerTriggers",idContainer:e,idContainerVersion:t,filter_limit:"-1"})),Promise.resolve(this.fetchPromise).then((function(e){return n.privateState.triggers=e,n.triggers.value})).finally((function(){n.privateState.isLoadingTriggers=!1}))}},{key:"fetchTriggersIfNotLoaded",value:function(e,t){this.fetchPromise||this.fetchTriggers(e,t)}},{key:"fetchAvailableTriggers",value:function(e){return this.availableTriggersPromises[e]||(this.availableTriggersPromises[e]=u["AjaxHelper"].fetch({method:"TagManager.getAvailableTriggerTypesInContext",idContext:e,filter_limit:"-1"})),Promise.resolve(this.availableTriggersPromises[e])}},{key:"findTrigger",value:function(e,t,n){var a=this,i=this.triggers.value.find((function(e){return e.idtrigger===n}));return i?Promise.resolve(i):(this.privateState.isLoadingSingle=!0,u["AjaxHelper"].fetch({idTrigger:n,idContainer:e,idContainerVersion:t,method:"TagManager.getContainerTrigger",filter_limit:"-1"}).then((function(e){return a.privateState.triggers=[].concat(ua(a.privateState.triggers),[e]),Object(r["readonly"])(e)})).finally((function(){a.privateState.isLoadingSingle=!1})))}},{key:"suggestNameForType",value:function(e){for(var t=this,n=function(n){var a=e;n&&(a="".concat(a," (").concat(n,")"));var i=!t.triggers.value.some((function(e){return e.name===a}));if(i)return{v:a}},a=0;a<100;a+=1){var i=n(a);if("object"===da(i))return i.v}}},{key:"createOrUpdateTrigger",value:function(e,t,n,a,i){var r=this,o=Object.entries(i).map((function(e){var t=oa(e,2),n=t[0],a=t[1],i=a;return"boolean"===typeof a&&(i=(+a).toString()),[n,i]})),l=Object.fromEntries(o),c=e.conditions.filter((function(e){return e&&e.actual&&e.comparison&&e.expected}));return this.privateState.isUpdating=!0,u["AjaxHelper"].post({idTrigger:e.idtrigger,method:t,idContainer:n,idContainerVersion:a,type:e.type,name:e.name,description:e.description},{parameters:l,conditions:c},{withTokenInUrl:!0}).finally((function(){r.privateState.isUpdating=!1}))}},{key:"reload",value:function(e,t){return this.privateState.triggers=[],this.fetchPromise=null,this.availableTriggersPromises={},this.fetchTriggers(e,t)}},{key:"deleteTrigger",value:function(e,t,n){var a=this;return this.privateState.isUpdating=!0,this.privateState.triggers=[],u["AjaxHelper"].fetch({idTrigger:n,idContainerVersion:t,idContainer:e,method:"TagManager.deleteContainerTrigger"},{withTokenInUrl:!0}).finally((function(){a.privateState.isUpdating=!1}))}}]),e}(),ya=new Ta,Va="tagvariablemanagement",Ca={AllElementsClick:"ClickId",AllLinksClick:"ClickId",DownloadClick:"ClickId",ElementVisibility:"VisibleElementClasses",FormSubmit:"FormId",JavaScriptError:"ErrorMessage"},Na=Object(r["defineComponent"])({props:{idTrigger:Number,idContainer:{type:String,required:!0},idContainerVersion:{type:Number,required:!0},newTriggerType:String,isEmbedded:{type:Boolean,default:!1}},components:{ContentBlock:u["ContentBlock"],Field:g["Field"],GroupedSettings:g["GroupedSettings"],SaveButton:g["SaveButton"]},data:function(){return{isDirty:!1,chooseTriggerType:!1,availableTriggers:[],availableVariables:[],variableIdToName:{},editTitle:"",trigger:{},parameterValues:{},isUpdatingTrigger:!1}},emits:["changeTrigger"],created:function(){var e=this;Vt.init(),u["AjaxHelper"].fetch({method:"TagManager.getAvailableContainerVariables",filter_limit:"-1",idContainer:this.idContainer,idContainerVersion:this.idContainerVersion}).then((function(t){t.forEach((function(t){t.types.forEach((function(n){e.variableIdToName[n.id]=n.name,e.availableVariables.push({key:n.id,value:n.name,group:t.name,tooltip:n.description})}))}))})),ya.fetchTriggersIfNotLoaded(this.idContainer,this.idContainerVersion),this.initIdTrigger()},watch:{idTrigger:function(e){null!==e&&this.initIdTrigger()},triggerParameterValues:{handler:function(e,t){e&&t&&(this.isDirty=!0)},deep:!0}},methods:{checkRequiredFieldsAreSet:function(){return!!this.trigger.name||(this.showErrorFieldNotProvidedNotification(Object(u["translate"])("General_Name")),!1)},removeAnyTriggerNotification:function(){u["NotificationsStore"].remove(Va),u["NotificationsStore"].remove("ajaxHelper")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:Va,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},showErrorFieldNotProvidedNotification:function(e){var t=Object(u["translate"])("TagManager_ErrorXNotProvided",[e]);this.showNotification(t,"error")},initIdTrigger:function(){var e=this;this.trigger={},this.chooseTriggerType=!1,this.editTitle="",u["Matomo"].helper.lazyScrollToContent(),this.availableTriggers=[],u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer,filter_limit:"-1"}).then((function(e){return ya.fetchAvailableTriggers(e.context)})).then((function(t){e.availableTriggers=t})).then((function(){if(e.edit&&e.idTrigger)return e.editTitle=Object(u["translate"])("TagManager_EditTrigger"),void ya.findTrigger(e.idContainer,e.idContainerVersion,e.idTrigger).then((function(t){var n;t&&(e.trigger=Object(u["clone"])(t),e.parameterValues=Object.fromEntries(t.typeMetadata.parameters.map((function(e){return[e.name,e.value]}))),e.addConditionEntryIfNoneExists(),e.onConditionChange(),e.isDirty=!1,null!==(n=e.trigger.typeMetadata)&&void 0!==n&&n.name&&(e.editTitle+=": ".concat(e.trigger.typeMetadata.name)))}));e.create&&(e.editTitle=Object(u["translate"])("TagManager_ChooseTriggerToContinue"),e.chooseTriggerType=!0)}))},onConditionChange:function(){var e=(this.trigger.conditions||[]).every((function(e){return!(null===e||void 0===e||!e.expected)}));e&&this.addConditionEntry()},addConditionEntryIfNoneExists:function(){this.trigger.conditions&&Array.isArray(this.trigger.conditions)||(this.trigger.conditions=[]),this.trigger.conditions.length||this.trigger.conditions.push(this.makeDefaultCondition())},addConditionEntry:function(){this.trigger.conditions.push(this.makeDefaultCondition()),this.isDirty=!0},removeConditionEntry:function(e){if(e>-1){var t=this.trigger.conditions.length-1;t===e?this.trigger.conditions[e]=this.makeDefaultCondition():this.trigger.conditions.splice(e,1),this.isDirty=!0}},createTriggerType:function(e){var t,n=this;e&&this.isTriggerTemplateDisabled[e.id]||(this.chooseTriggerType=!1,this.editTitle=Object(u["translate"])("TagManager_CreateNewTrigger"),this.trigger={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:ya.suggestNameForType(e.name)||"",description:"",type:e.id,idcontainerversion:this.idContainerVersion,conditions:[],typeMetadata:e},null!==(t=this.trigger.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.trigger.typeMetadata.name)),this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.addConditionEntry(),this.isDirty=!0,Object(r["nextTick"])((function(){if(n.$refs.root){var e=n.$refs.root;e.scrollIntoView();var t=e.querySelector("#name");t&&t.focus()}})))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idTrigger,u["MatomoUrl"].updateHash(e)},createTrigger:function(){var e=this;this.removeAnyTriggerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTrigger=!0,ya.createOrUpdateTrigger(this.trigger,"TagManager.addContainerTrigger",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){var n=t.value;e.isDirty=!1,ya.reload(e.idContainer,e.idContainerVersion).then((function(){if(e.isEmbedded)return e.trigger.idtrigger=n,void e.$emit("changeTrigger",{trigger:e.trigger});e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Trigger")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)}))})).finally((function(){e.isUpdatingTrigger=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateTrigger:function(){var e=this;this.removeAnyTriggerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTrigger=!0,ya.createOrUpdateTrigger(this.trigger,"TagManager.updateContainerTrigger",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t){if(e.isEmbedded)return e.$emit("changeTrigger",{trigger:e.trigger}),void ya.reload(e.idContainer,e.idContainerVersion);e.isDirty=!1,ya.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdTrigger()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Trigger")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingTrigger=!1})))},makeDefaultCondition:function(){var e,t="PageUrl";if(null!==(e=this.trigger)&&void 0!==e&&e.typeMetadata){var n=this.trigger.typeMetadata.id;Ca[n]&&(t=Ca[n])}return{comparison:"equals",actual:t,expected:""}},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{isLoading:function(){return ya.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ya.isUpdating.value||this.isUpdatingTrigger},create:function(){return 0===this.idTrigger},edit:function(){return!this.create},canUseCustomTemplates:function(){return u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")},isTriggerDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.trigger.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},saveButtonText:function(){return this.edit?Object(u["translate"])("CoreUpdater_UpdateTitle"):Object(u["translate"])("TagManager_CreateNewTrigger")},collectionItemAvatarText:function(){return Object(u["translate"])("TagManager_UseCustomTemplateCapabilityRequired",Object(u["translate"])("TagManager_CapabilityUseCustomTemplates"))},triggerInlineHelpText:function(){return Object(u["translate"])("TagManager_TriggerConditionsHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/create-a-trigger-to-track-interactions-on-all-nested-elements/"),"")},availableComparisons:function(){return Vt.comparisonOptions.value},isTriggerTemplateDisabled:function(){var e=this,t={};return this.availableTriggers.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},triggerParameterValues:function(){var e;return null!==(e=this.trigger.typeMetadata)&&void 0!==e&&e.parameters?this.parameterValues:null}}});Na.render=ra;var Ea=Na,Sa={class:"tagManagerManageList tagManagerTriggerList"},wa={class:"triggerSearchFilter"},ka=["title"],Ma=["title"],_a=["title"],Da=["title"],Aa=["title"],xa=["title"],Ba={colspan:"7"},La={class:"loadingPiwik"},Ua=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Pa={colspan:"7"},Ia=["id"],Fa=["title"],Ha=["title"],Ga=["title"],$a={class:"conditions"},Ra={class:"icon-ok"},qa=["title"],za={class:"action"},Wa=["onClick","title"],Xa=["onClick","title"],Ka={class:"tableActionBar"},Ja=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Ya={class:"ui-confirm",id:"confirmDeleteTrigger",ref:"confirmDeleteTrigger"},Za=["value"],Qa=["value"],ei={class:"ui-confirm",id:"confirmDeleteTriggerNotPossible",ref:"confirmDeleteTriggerNotPossible"},ti={class:"collection"},ni=["value"];function ai(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Sa,[Object(r["createVNode"])(c,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerUsageBenefits")),1),Object(r["createElementVNode"])("div",wa,[Object(r["withDirectives"])(Object(r["createVNode"])(l,{uicontrol:"text",name:"triggerSearch",title:e.translate("General_Search"),modelValue:e.triggerSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.triggerSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.triggers.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,ka),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,Ma),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,_a),Object(r["createElementVNode"])("th",{class:"conditions",title:e.filterTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Filter")),9,Da),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,Aa),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,xa),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Ba,[Object(r["createElementVNode"])("span",La,[Ua,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Pa,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoTriggersFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerTriggerNow",onClick:t[1]||(t[1]=function(t){return e.createTrigger()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTriggerNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.triggers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t){var n;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"trigger".concat(t.idtrigger),class:"triggers",key:t.idtrigger},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Fa),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Ha),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,Ga),Object(r["createElementVNode"])("td",$a,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Ra,null,512),[[r["vShow"],null===(n=t.conditions)||void 0===n?void 0:n.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,qa),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",za,[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editTrigger(t.idtrigger,t.type)},title:e.translate("TagManager_EditTrigger")},null,8,Wa),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteTrigger(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Trigger"))},null,8,Xa)],512),[[r["vShow"],e.hasWriteAccess]])],8,Ia)})),128))])],512),[[s]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ka,[Object(r["createElementVNode"])("a",{class:"createNewTrigger",value:"",onClick:t[2]||(t[2]=function(t){return e.createTrigger()})},[Ja,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("div",Ya,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteTriggerConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Za),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Qa)],512),Object(r["createElementVNode"])("div",ei,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerCannotBeDeleted")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerBeingUsedBy")),1),Object(r["createElementVNode"])("ul",ti,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.triggerReferences,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:e.referenceId},Object(r["toDisplayString"])(e.referenceTypeName)+": "+Object(r["toDisplayString"])(e.referenceName),1)})),128))]),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerBeingUsedNeedsRemove")),1),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,ni)],512)])}function ii(e){return ci(e)||li(e)||oi(e)||ri()}function ri(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oi(e,t){if(e){if("string"===typeof e)return si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?si(e,t):void 0}}function li(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ci(e){if(Array.isArray(e))return si(e)}function si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.name?1:0})),t},nameTranslatedText:function(){return this.translate("TagManager_TriggersNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_TriggersDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_TriggersTypeDescription")},filterTranslatedText:function(){return this.translate("TagManager_TriggersFilterDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_TriggersLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_TriggersActionDescription")}}});gi.render=ai;var bi=gi,mi={class:"manageTrigger"};function pi(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TriggerList"),c=Object(r["resolveComponent"])("TriggerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",mi,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"triggers-help-text":e.triggersHelpText},null,8,["id-container","id-container-version","triggers-help-text"])])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"id-trigger":e.idTrigger},null,8,["id-container","id-container-version","id-trigger"])])],512),[[r["vShow"],e.editMode]])])}var hi=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,triggersHelpText:String},components:{TriggerList:bi,TriggerEdit:Ea},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idTrigger}),(function(t){e.onIdTriggerParamChange(t)})),u["NotificationsStore"].remove("triggertriggermanagement"),this.onIdTriggerParamChange(u["MatomoUrl"].hashParsed.value.idTrigger)},methods:{onIdTriggerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddTrigger",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idTrigger:function(){var e=u["MatomoUrl"].hashParsed.value.idTrigger;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idTrigger}}});hi.render=pi;var fi=hi;function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ji={class:"editTag tagManagerManageEdit",ref:"root"},Oi={class:"loadingPiwik"},Ti=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),yi={class:"loadingPiwik"},Vi=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Ci={class:"form-group row"},Ni={class:"col s12"},Ei={key:0},Si={class:"form-group row"},wi={class:"col s12"},ki={class:"form-group row"},Mi={class:"col s12"},_i={class:"form-group row tagStartDate"},Di={class:"col s12 m6"},Ai={class:"row"},xi={class:"col s12"},Bi={for:"start_date_date",class:"active"},Li={class:"tagStartDate"},Ui={class:"col s12 m6 "},Pi={class:"form-help"},Ii={class:"inline-help"},Fi=["innerHTML"],Hi=Object(r["createElementVNode"])("br",null,null,-1),Gi=["innerHTML"],$i={class:"form-group row tagEndDate"},Ri={class:"col s12 m6"},qi={class:"row"},zi={class:"col s12"},Wi={for:"end_date_date",class:"active"},Xi={class:"tagEndDate"},Ki={class:"col s12 m6"},Ji={class:"form-help"},Yi={class:"inline-help"},Zi=["innerHTML"],Qi=Object(r["createElementVNode"])("br",null,null,-1),er=["innerHTML"],tr={class:"entityCancel"},nr={id:"confirmSelectTagType"},ar={class:"collection-header"},ir=["onClick","title"],rr=["src"],or={class:"title"},lr={class:"secondary-content"},cr=["title"],sr={class:"entityCancel"};function dr(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("GroupedSettings"),s=Object(r["resolveComponent"])("TagTriggerArray"),d=Object(r["resolveComponent"])("TagDateInput"),u=Object(r["resolveComponent"])("SaveButton"),g=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ji,[Object(r["createVNode"])(g,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n,a,i,o,g;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Oi,[Ti,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",yi,[Vi,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("form",{onSubmit:t[18]||(t[18]=function(t){return e.edit?e.updateTag():e.createTag()})},[Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTagDisabled]]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","model-value":e.tag.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.tag.name=t,e.setValueHasChanged()}),maxlength:255,title:e.translate("General_Name"),"inline-help":e.translate("TagManager_TagNameHelpV2"),placeholder:e.translate("TagManager_TagNamePlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.tag.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.tag.description=t,e.setValueHasChanged()}),maxlength:1e3,title:e.translate("TagManager_Description"),placeholder:e.translate("TagManager_TagDescriptionPlaceholder")},null,8,["model-value","title","placeholder"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ci,[Object(r["createElementVNode"])("div",Ni,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureWhatTagDoes")),1)])],512),[[r["vShow"],null===(n=e.tag.typeMetadata)||void 0===n?void 0:n.parameters.length]]),e.tag?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ei,[Object(r["createVNode"])(c,{settings:(null===(a=e.tag.typeMetadata)||void 0===a?void 0:a.parameters)||[],"all-setting-values":e.parameterValues,onChange:t[2]||(t[2]=function(t){e.parameterValues[t.name]=t.value,e.setValueHasChanged()})},null,8,["settings","all-setting-values"])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Si,[Object(r["createElementVNode"])("div",wi,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureWhenTagDoes")),1)])],512),[[r["vShow"],null===(i=e.tag.typeMetadata)||void 0===i?void 0:i.parameters.length]]),Object(r["createVNode"])(s,{"container-triggers":e.containerTriggers,type:"fire",title:e.translate("TagManager_FireTriggerTitle"),help:e.translate("TagManager_FireTriggerHelp",e.translate("TagManager_FireLimit")),"model-value":e.fireTriggers,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.fireTriggers=t,e.setValueHasChanged(),e.onFireTriggerChange()}),onCreate:t[4]||(t[4]=function(t){return e.onCreateNewFireTrigger()}),onEdit:t[5]||(t[5]=function(t){return e.editTrigger(t)})},null,8,["container-triggers","title","help","model-value"]),Object(r["createVNode"])(s,{"container-triggers":e.containerTriggers,type:"block",title:e.translate("TagManager_BlockTriggerTitle"),help:e.translate("TagManager_BlockTriggerHelp"),"model-value":e.blockTriggers,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.blockTriggers=t,e.setValueHasChanged(),e.onBlockTriggerChange()}),onCreate:t[7]||(t[7]=function(t){return e.onCreateNewBlockTrigger()}),onEdit:t[8]||(t[8]=function(t){return e.editTrigger(t)})},null,8,["container-triggers","title","help","model-value"]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ki,[Object(r["createElementVNode"])("div",Mi,[Object(r["createElementVNode"])("h3",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{href:"",class:"showAdvancedSettings",onClick:t[9]||(t[9]=Object(r["withModifiers"])((function(t){return e.showAdvanced=!0}),["prevent"]))},Object(r["toDisplayString"])(e.translate("TagManager_ShowAdvancedSettings")),513),[[r["vShow"],!e.showAdvanced]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{href:"",class:"hideAdvancedSettings",onClick:t[10]||(t[10]=Object(r["withModifiers"])((function(t){return e.showAdvanced=!1}),["prevent"]))},Object(r["toDisplayString"])(e.translate("TagManager_HideAdvancedSettings")),513),[[r["vShow"],e.showAdvanced]])])])],512),[[r["vShow"],null===(o=e.tag.typeMetadata)||void 0===o?void 0:o.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"radio",name:"fire_limit","model-value":e.tag.fire_limit,"onUpdate:modelValue":t[11]||(t[11]=function(t){e.tag.fire_limit=t,e.setValueHasChanged()}),options:e.availableFireLimits,title:e.translate("TagManager_FireLimit"),"inline-help":e.fireLimitHelp},null,8,["model-value","options","title","inline-help"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"fire_delay","model-value":e.tag.fire_delay,"onUpdate:modelValue":t[12]||(t[12]=function(t){e.tag.fire_delay=t,e.setValueHasChanged()}),maxlength:8,title:e.translate("TagManager_FireDelay"),"inline-help":e.translate("TagManager_FireDelayHelp"),placeholder:e.translate("TagManager_PlaceholderZero")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"priority","model-value":e.tag.priority,"onUpdate:modelValue":t[13]||(t[13]=function(t){e.tag.priority=t,e.setValueHasChanged()}),maxlength:4,title:e.translate("TagManager_Priority"),"inline-help":e.translate("TagManager_PriorityHelp"),placeholder:e.translate("TagManager_PriorityPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",_i,[Object(r["createElementVNode"])("div",Di,[Object(r["createElementVNode"])("div",Ai,[Object(r["createElementVNode"])("div",xi,[Object(r["createElementVNode"])("label",Bi,Object(r["toDisplayString"])(e.translate("TagManager_StartDate"))+":",1)]),Object(r["createElementVNode"])("div",Li,[Object(r["createVNode"])(d,{name:"start_date","model-value":e.tag.start_date,"onUpdate:modelValue":t[14]||(t[14]=function(t){e.tag.start_date=t,e.setValueHasChanged()}),"default-time":"00:00:00"},null,8,["model-value"])])])]),Object(r["createElementVNode"])("div",Ui,[Object(r["createElementVNode"])("div",Pi,[Object(r["createElementVNode"])("span",Ii,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_TagStartDateHelp","",""))},null,8,Fi),Hi,Object(r["createElementVNode"])("span",{class:"currentLocalTime",innerHTML:e.$sanitize(e.translate("TagManager_CurrentTimeInLocalTimezone","",e.currentTime,""))},null,8,Gi)])])])])]),Object(r["createElementVNode"])("div",$i,[Object(r["createElementVNode"])("div",Ri,[Object(r["createElementVNode"])("div",qi,[Object(r["createElementVNode"])("div",zi,[Object(r["createElementVNode"])("label",Wi,Object(r["toDisplayString"])(e.translate("TagManager_EndDate"))+":",1)]),Object(r["createElementVNode"])("div",Xi,[Object(r["createVNode"])(d,{name:"end_date","model-value":e.tag.end_date,"onUpdate:modelValue":t[15]||(t[15]=function(t){e.tag.end_date=t,e.setValueHasChanged()}),"default-time":"23:59:59"},null,8,["model-value"])])])]),Object(r["createElementVNode"])("div",Ki,[Object(r["createElementVNode"])("div",Ji,[Object(r["createElementVNode"])("span",Yi,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_TagEndDateHelp","",""))},null,8,Zi),Qi,Object(r["createElementVNode"])("span",{class:"currentLocalTime",innerHTML:e.$sanitize(e.translate("TagManager_CurrentTimeInLocalTimezone","",e.currentTime,""))},null,8,er)])])])])])],512),[[r["vShow"],e.showAdvanced&&(null===(g=e.tag.typeMetadata)||void 0===g?void 0:g.hasAdvancedSettings)]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTagDisabled]]),Object(r["withDirectives"])(Object(r["createVNode"])(u,{class:"createButton",onConfirm:t[16]||(t[16]=function(t){return e.edit?e.updateTag():e.createTag()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.edit?e.translate("CoreUpdater_UpdateTitle"):e.translate("TagManager_CreateNewTag")},null,8,["disabled","saving","value"]),[[r["vShow"],!e.isTagDisabled]]),Object(r["createElementVNode"])("div",tr,[Object(r["createElementVNode"])("a",{onClick:t[17]||(t[17]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)])])],544),[[r["vShow"],!e.chooseTagType&&e.editTitle]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",nr,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.availableTags,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:t.name},[Object(r["createElementVNode"])("li",ar,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(t.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.types,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:n,class:Object(r["normalizeClass"])(["collection-item avatar",vi({disabledTemplate:e.isTagTemplateDisabled[t.id]},"templateType".concat(t.id),!0)]),onClick:function(n){return e.createTagType(t)},title:e.isTagTemplateDisabled[t.id]?e.collectionItemAvatarText:""},[t.icon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",{key:0,alt:"",class:"circle",src:t.icon},null,8,rr)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("span",or,Object(r["toDisplayString"])(t.name),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(t.description),513),[[r["vShow"],t.description]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",lr,[Object(r["createElementVNode"])("i",{class:"icon-help",title:t.help},null,8,cr)],512),[[r["vShow"],!!t.help]])],10,ir)})),128))])})),128)),Object(r["createElementVNode"])("div",sr,[Object(r["createElementVNode"])("a",{onClick:t[19]||(t[19]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)])],512),[[r["vShow"],e.chooseTagType]])]})),_:1},8,["content-title"])],512)}function ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gr(e,t){for(var n=0;n-1){var t=this.trigger.conditions.length-1;t===e?this.trigger.conditions[e]=this.makeDefaultCondition():this.trigger.conditions.splice(e,1),this.isDirty=!0}},createTriggerType:function(e){var t,n=this;e&&this.isTriggerTemplateDisabled[e.id]||(this.chooseTriggerType=!1,this.editTitle=Object(u["translate"])("TagManager_CreateNewTrigger"),this.trigger={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:ya.suggestNameForType(e.name)||"",description:"",type:e.id,idcontainerversion:this.idContainerVersion,conditions:[],typeMetadata:e},null!==(t=this.trigger.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.trigger.typeMetadata.name)),this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.addConditionEntry(),this.isDirty=!0,Object(r["nextTick"])((function(){if(n.$refs.root){var e=n.$refs.root;e.scrollIntoView();var t=e.querySelector("#name");t&&t.focus()}})))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idTrigger,u["MatomoUrl"].updateHash(e)},createTrigger:function(){var e=this;this.removeAnyTriggerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTrigger=!0,ya.createOrUpdateTrigger(this.trigger,"TagManager.addContainerTrigger",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){var n=t.value;e.isDirty=!1,ya.reload(e.idContainer,e.idContainerVersion).then((function(){if(e.isEmbedded)return e.trigger.idtrigger=n,void e.$emit("changeTrigger",{trigger:e.trigger});e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Trigger")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)}))})).finally((function(){e.isUpdatingTrigger=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateTrigger:function(){var e=this;this.removeAnyTriggerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTrigger=!0,ya.createOrUpdateTrigger(this.trigger,"TagManager.updateContainerTrigger",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t){if(e.isEmbedded)return e.$emit("changeTrigger",{trigger:e.trigger}),void ya.reload(e.idContainer,e.idContainerVersion);e.isDirty=!1,ya.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdTrigger()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Trigger")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingTrigger=!1})))},makeDefaultCondition:function(){var e,t="PageUrl";if(null!==(e=this.trigger)&&void 0!==e&&e.typeMetadata){var n=this.trigger.typeMetadata.id;Ca[n]&&(t=Ca[n])}return{comparison:"equals",actual:t,expected:""}},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{isLoading:function(){return ya.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ya.isUpdating.value||this.isUpdatingTrigger},create:function(){return 0===this.idTrigger},edit:function(){return!this.create},canUseCustomTemplates:function(){return u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")},isTriggerDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.trigger.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},saveButtonText:function(){return this.edit?Object(u["translate"])("CoreUpdater_UpdateTitle"):Object(u["translate"])("TagManager_CreateNewTrigger")},collectionItemAvatarText:function(){return Object(u["translate"])("TagManager_UseCustomTemplateCapabilityRequired",Object(u["translate"])("TagManager_CapabilityUseCustomTemplates"))},triggerInlineHelpText:function(){return Object(u["translate"])("TagManager_TriggerConditionsHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/create-a-trigger-to-track-interactions-on-all-nested-elements/"),"")},availableComparisons:function(){return Vt.comparisonOptions.value},isTriggerTemplateDisabled:function(){var e=this,t={};return this.availableTriggers.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},triggerParameterValues:function(){var e;return null!==(e=this.trigger.typeMetadata)&&void 0!==e&&e.parameters?this.parameterValues:null}}});Na.render=ra;var Ea=Na,Sa={class:"tagManagerManageList tagManagerTriggerList"},wa={class:"triggerSearchFilter"},ka=["title"],Ma=["title"],_a=["title"],Da=["title"],Aa=["title"],xa=["title"],Ba={colspan:"7"},La={class:"loadingPiwik"},Ua=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Pa={colspan:"7"},Ia=["id"],Fa=["title"],Ha=["title"],Ga=["title"],$a={class:"conditions"},Ra={class:"icon-ok"},qa=["title"],za=["onClick","title"],Wa=["onClick","title"],Xa=["onClick","title"],Ka={class:"tableActionBar"},Ja=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Ya={class:"ui-confirm",id:"confirmDeleteTrigger",ref:"confirmDeleteTrigger"},Za=["value"],Qa=["value"],ei={class:"ui-confirm",id:"confirmDeleteTriggerNotPossible",ref:"confirmDeleteTriggerNotPossible"},ti={class:"collection"},ni=["value"];function ai(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Sa,[Object(r["createVNode"])(c,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerUsageBenefits")),1),Object(r["createElementVNode"])("div",wa,[Object(r["withDirectives"])(Object(r["createVNode"])(l,{uicontrol:"text",name:"triggerSearch",title:e.translate("General_Search"),modelValue:e.triggerSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.triggerSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.triggers.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,ka),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,Ma),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,_a),Object(r["createElementVNode"])("th",{class:"conditions",title:e.filterTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Filter")),9,Da),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,Aa),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,xa),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Ba,[Object(r["createElementVNode"])("span",La,[Ua,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Pa,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoTriggersFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerTriggerNow",onClick:t[1]||(t[1]=function(t){return e.createTrigger()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTriggerNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.triggers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t){var n;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"trigger".concat(t.idtrigger),class:"triggers",key:t.idtrigger},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Fa),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Ha),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,Ga),Object(r["createElementVNode"])("td",$a,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Ra,null,512),[[r["vShow"],null===(n=t.conditions)||void 0===n?void 0:n.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,qa),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editTrigger(t.idtrigger,t.type)},title:e.translate("TagManager_EditTrigger")},null,8,za),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteTrigger(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Trigger"))},null,8,Wa),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Trigger"))},null,8,Xa),[[r["vShow"],e.hasPublishCapability()]])],2),[[r["vShow"],e.hasWriteAccess]])],8,Ia)})),128))])],512),[[s]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ka,[Object(r["createElementVNode"])("a",{class:"createNewTrigger",value:"",onClick:t[2]||(t[2]=function(t){return e.createTrigger()})},[Ja,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("div",Ya,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteTriggerConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Za),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Qa)],512),Object(r["createElementVNode"])("div",ei,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerCannotBeDeleted")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerBeingUsedBy")),1),Object(r["createElementVNode"])("ul",ti,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.triggerReferences,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:e.referenceId},Object(r["toDisplayString"])(e.referenceTypeName)+": "+Object(r["toDisplayString"])(e.referenceName),1)})),128))]),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerBeingUsedNeedsRemove")),1),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,ni)],512)])}function ii(e){return ci(e)||li(e)||oi(e)||ri()}function ri(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oi(e,t){if(e){if("string"===typeof e)return si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?si(e,t):void 0}}function li(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ci(e){if(Array.isArray(e))return si(e)}function si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.name?1:0})),t},nameTranslatedText:function(){return this.translate("TagManager_TriggersNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_TriggersDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_TriggersTypeDescription")},filterTranslatedText:function(){return this.translate("TagManager_TriggersFilterDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_TriggersLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_TriggersActionDescription")},getActionClasses:function(){var e=this.hasPublishCapability()?" hasCopyAction":"";return"action".concat(e)}}});gi.render=ai;var bi=gi,mi={class:"manageTrigger"};function pi(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TriggerList"),c=Object(r["resolveComponent"])("TriggerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",mi,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"triggers-help-text":e.triggersHelpText},null,8,["id-container","id-container-version","triggers-help-text"])])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"id-trigger":e.idTrigger},null,8,["id-container","id-container-version","id-trigger"])])],512),[[r["vShow"],e.editMode]])])}var hi=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,triggersHelpText:String},components:{TriggerList:bi,TriggerEdit:Ea},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idTrigger}),(function(t){e.onIdTriggerParamChange(t)})),u["NotificationsStore"].remove("triggertriggermanagement"),this.onIdTriggerParamChange(u["MatomoUrl"].hashParsed.value.idTrigger)},methods:{onIdTriggerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddTrigger",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idTrigger:function(){var e=u["MatomoUrl"].hashParsed.value.idTrigger;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idTrigger}}});hi.render=pi;var fi=hi;function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ji={class:"editTag tagManagerManageEdit",ref:"root"},Oi={class:"loadingPiwik"},Ti=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),yi={class:"loadingPiwik"},Vi=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Ci={class:"form-group row"},Ni={class:"col s12"},Ei={key:0},Si={class:"form-group row"},wi={class:"col s12"},ki={class:"form-group row"},Mi={class:"col s12"},_i={class:"form-group row tagStartDate"},Di={class:"col s12 m6"},Ai={class:"row"},xi={class:"col s12"},Bi={for:"start_date_date",class:"active"},Li={class:"tagStartDate"},Ui={class:"col s12 m6 "},Pi={class:"form-help"},Ii={class:"inline-help"},Fi=["innerHTML"],Hi=Object(r["createElementVNode"])("br",null,null,-1),Gi=["innerHTML"],$i={class:"form-group row tagEndDate"},Ri={class:"col s12 m6"},qi={class:"row"},zi={class:"col s12"},Wi={for:"end_date_date",class:"active"},Xi={class:"tagEndDate"},Ki={class:"col s12 m6"},Ji={class:"form-help"},Yi={class:"inline-help"},Zi=["innerHTML"],Qi=Object(r["createElementVNode"])("br",null,null,-1),er=["innerHTML"],tr={class:"entityCancel"},nr={id:"confirmSelectTagType"},ar={class:"collection-header"},ir=["onClick","title"],rr=["src"],or={class:"title"},lr={class:"secondary-content"},cr=["title"],sr={class:"entityCancel"};function dr(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("GroupedSettings"),s=Object(r["resolveComponent"])("TagTriggerArray"),d=Object(r["resolveComponent"])("TagDateInput"),u=Object(r["resolveComponent"])("SaveButton"),g=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ji,[Object(r["createVNode"])(g,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n,a,i,o,g;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Oi,[Ti,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",yi,[Vi,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("form",{onSubmit:t[18]||(t[18]=function(t){return e.edit?e.updateTag():e.createTag()})},[Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTagDisabled]]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","model-value":e.tag.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.tag.name=t,e.setValueHasChanged()}),maxlength:255,title:e.translate("General_Name"),"inline-help":e.translate("TagManager_TagNameHelpV2"),placeholder:e.translate("TagManager_TagNamePlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.tag.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.tag.description=t,e.setValueHasChanged()}),maxlength:1e3,title:e.translate("TagManager_Description"),placeholder:e.translate("TagManager_TagDescriptionPlaceholder")},null,8,["model-value","title","placeholder"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ci,[Object(r["createElementVNode"])("div",Ni,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureWhatTagDoes")),1)])],512),[[r["vShow"],null===(n=e.tag.typeMetadata)||void 0===n?void 0:n.parameters.length]]),e.tag?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ei,[Object(r["createVNode"])(c,{settings:(null===(a=e.tag.typeMetadata)||void 0===a?void 0:a.parameters)||[],"all-setting-values":e.parameterValues,onChange:t[2]||(t[2]=function(t){e.parameterValues[t.name]=t.value,e.setValueHasChanged()})},null,8,["settings","all-setting-values"])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Si,[Object(r["createElementVNode"])("div",wi,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureWhenTagDoes")),1)])],512),[[r["vShow"],null===(i=e.tag.typeMetadata)||void 0===i?void 0:i.parameters.length]]),Object(r["createVNode"])(s,{"container-triggers":e.containerTriggers,type:"fire",title:e.translate("TagManager_FireTriggerTitle"),help:e.translate("TagManager_FireTriggerHelp",e.translate("TagManager_FireLimit")),"model-value":e.fireTriggers,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.fireTriggers=t,e.setValueHasChanged(),e.onFireTriggerChange()}),onCreate:t[4]||(t[4]=function(t){return e.onCreateNewFireTrigger()}),onEdit:t[5]||(t[5]=function(t){return e.editTrigger(t)})},null,8,["container-triggers","title","help","model-value"]),Object(r["createVNode"])(s,{"container-triggers":e.containerTriggers,type:"block",title:e.translate("TagManager_BlockTriggerTitle"),help:e.translate("TagManager_BlockTriggerHelp"),"model-value":e.blockTriggers,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.blockTriggers=t,e.setValueHasChanged(),e.onBlockTriggerChange()}),onCreate:t[7]||(t[7]=function(t){return e.onCreateNewBlockTrigger()}),onEdit:t[8]||(t[8]=function(t){return e.editTrigger(t)})},null,8,["container-triggers","title","help","model-value"]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ki,[Object(r["createElementVNode"])("div",Mi,[Object(r["createElementVNode"])("h3",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{href:"",class:"showAdvancedSettings",onClick:t[9]||(t[9]=Object(r["withModifiers"])((function(t){return e.showAdvanced=!0}),["prevent"]))},Object(r["toDisplayString"])(e.translate("TagManager_ShowAdvancedSettings")),513),[[r["vShow"],!e.showAdvanced]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{href:"",class:"hideAdvancedSettings",onClick:t[10]||(t[10]=Object(r["withModifiers"])((function(t){return e.showAdvanced=!1}),["prevent"]))},Object(r["toDisplayString"])(e.translate("TagManager_HideAdvancedSettings")),513),[[r["vShow"],e.showAdvanced]])])])],512),[[r["vShow"],null===(o=e.tag.typeMetadata)||void 0===o?void 0:o.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"radio",name:"fire_limit","model-value":e.tag.fire_limit,"onUpdate:modelValue":t[11]||(t[11]=function(t){e.tag.fire_limit=t,e.setValueHasChanged()}),options:e.availableFireLimits,title:e.translate("TagManager_FireLimit"),"inline-help":e.fireLimitHelp},null,8,["model-value","options","title","inline-help"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"fire_delay","model-value":e.tag.fire_delay,"onUpdate:modelValue":t[12]||(t[12]=function(t){e.tag.fire_delay=t,e.setValueHasChanged()}),maxlength:8,title:e.translate("TagManager_FireDelay"),"inline-help":e.translate("TagManager_FireDelayHelp"),placeholder:e.translate("TagManager_PlaceholderZero")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"priority","model-value":e.tag.priority,"onUpdate:modelValue":t[13]||(t[13]=function(t){e.tag.priority=t,e.setValueHasChanged()}),maxlength:4,title:e.translate("TagManager_Priority"),"inline-help":e.translate("TagManager_PriorityHelp"),placeholder:e.translate("TagManager_PriorityPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",_i,[Object(r["createElementVNode"])("div",Di,[Object(r["createElementVNode"])("div",Ai,[Object(r["createElementVNode"])("div",xi,[Object(r["createElementVNode"])("label",Bi,Object(r["toDisplayString"])(e.translate("TagManager_StartDate"))+":",1)]),Object(r["createElementVNode"])("div",Li,[Object(r["createVNode"])(d,{name:"start_date","model-value":e.tag.start_date,"onUpdate:modelValue":t[14]||(t[14]=function(t){e.tag.start_date=t,e.setValueHasChanged()}),"default-time":"00:00:00"},null,8,["model-value"])])])]),Object(r["createElementVNode"])("div",Ui,[Object(r["createElementVNode"])("div",Pi,[Object(r["createElementVNode"])("span",Ii,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_TagStartDateHelp","",""))},null,8,Fi),Hi,Object(r["createElementVNode"])("span",{class:"currentLocalTime",innerHTML:e.$sanitize(e.translate("TagManager_CurrentTimeInLocalTimezone","",e.currentTime,""))},null,8,Gi)])])])])]),Object(r["createElementVNode"])("div",$i,[Object(r["createElementVNode"])("div",Ri,[Object(r["createElementVNode"])("div",qi,[Object(r["createElementVNode"])("div",zi,[Object(r["createElementVNode"])("label",Wi,Object(r["toDisplayString"])(e.translate("TagManager_EndDate"))+":",1)]),Object(r["createElementVNode"])("div",Xi,[Object(r["createVNode"])(d,{name:"end_date","model-value":e.tag.end_date,"onUpdate:modelValue":t[15]||(t[15]=function(t){e.tag.end_date=t,e.setValueHasChanged()}),"default-time":"23:59:59"},null,8,["model-value"])])])]),Object(r["createElementVNode"])("div",Ki,[Object(r["createElementVNode"])("div",Ji,[Object(r["createElementVNode"])("span",Yi,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_TagEndDateHelp","",""))},null,8,Zi),Qi,Object(r["createElementVNode"])("span",{class:"currentLocalTime",innerHTML:e.$sanitize(e.translate("TagManager_CurrentTimeInLocalTimezone","",e.currentTime,""))},null,8,er)])])])])])],512),[[r["vShow"],e.showAdvanced&&(null===(g=e.tag.typeMetadata)||void 0===g?void 0:g.hasAdvancedSettings)]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTagDisabled]]),Object(r["withDirectives"])(Object(r["createVNode"])(u,{class:"createButton",onConfirm:t[16]||(t[16]=function(t){return e.edit?e.updateTag():e.createTag()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.edit?e.translate("CoreUpdater_UpdateTitle"):e.translate("TagManager_CreateNewTag")},null,8,["disabled","saving","value"]),[[r["vShow"],!e.isTagDisabled]]),Object(r["createElementVNode"])("div",tr,[Object(r["createElementVNode"])("a",{onClick:t[17]||(t[17]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)])])],544),[[r["vShow"],!e.chooseTagType&&e.editTitle]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",nr,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.availableTags,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:t.name},[Object(r["createElementVNode"])("li",ar,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(t.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.types,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:n,class:Object(r["normalizeClass"])(["collection-item avatar",vi({disabledTemplate:e.isTagTemplateDisabled[t.id]},"templateType".concat(t.id),!0)]),onClick:function(n){return e.createTagType(t)},title:e.isTagTemplateDisabled[t.id]?e.collectionItemAvatarText:""},[t.icon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",{key:0,alt:"",class:"circle",src:t.icon},null,8,rr)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("span",or,Object(r["toDisplayString"])(t.name),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(t.description),513),[[r["vShow"],t.description]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",lr,[Object(r["createElementVNode"])("i",{class:"icon-help",title:t.help},null,8,cr)],512),[[r["vShow"],!!t.help]])],10,ir)})),128))])})),128)),Object(r["createElementVNode"])("div",sr,[Object(r["createElementVNode"])("a",{onClick:t[19]||(t[19]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)])],512),[[r["vShow"],e.chooseTagType]])]})),_:1},8,["content-title"])],512)}function ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gr(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.created_date?-1:0})),e},getManageContainersIntro:function(){var e=Object(u["externalLink"])("https://matomo.org/guide/tag-manager/getting-started-with-tag-manager/");return Object(u["translate"])("TagManager_ManageContainersIntro",e,"")},canCopyContainer:function(){return this.isSuperUser},getActionClasses:function(){var e=this.canCopyContainer?" hasCopyAction":"";return"action".concat(e)}},methods:{createContainer:function(){this.editContainer("0")},editContainer:function(e){u["MatomoUrl"].updateHash(Object.assign(Object.assign({},u["MatomoUrl"].hashParsed.value),{},{idContainer:e}))},installCode:function(e){Kd.showInstallCode(e)},deleteContainer:function(e){function t(){ud.deleteContainer(e.idcontainer).then((function(){ud.reload()}))}u["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteContainer,{yes:t})},truncateText:function(e,t){return e.length>t?"".concat(e.substr(0,t-3),"..."):e},openCopyDialog:function(e){var t=u["MatomoUrl"].stringify({module:"TagManager",action:"copyContainerDialog",idSite:e.idsite,idContainer:e.idcontainer});window.Piwik_Popover.createPopupAndLoadUrl(t,"","mtmCopyContainer")}}});Jd.render=Hd;var Yd=Jd,Zd={class:"manageContainer"};function Qd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContainerList"),c=Object(r["resolveComponent"])("ContainerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Zd,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"is-super-user":e.isSuperUser},null,8,["is-super-user"])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer},null,8,["id-container"])],512),[[r["vShow"],e.editMode]])])}var eu=Object(r["defineComponent"])({props:{isSuperUser:{type:Boolean,required:!0}},components:{ContainerList:Yd,ContainerEdit:md},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idContainer}),(function(t){e.onIdContainerParamChange(t)})),u["NotificationsStore"].remove("containertagmanagement"),this.onIdContainerParamChange(u["MatomoUrl"].hashParsed.value.idContainer)},computed:{idContainer:function(){var e=u["MatomoUrl"].hashParsed.value.idContainer;return this.isAddAllowed||""!==e?e:null},editMode:function(){return!!this.idContainer}},methods:{onIdContainerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVersion",t),this.isAddAllowed=!!t.isAllowed}}}});eu.render=Qd;var tu=eu,nu={class:"containerDashboard"},au={key:0},iu={class:"dashboardCreationDate"},ru={key:0},ou=Object(r["createElementVNode"])("br",null,null,-1),lu=["innerHTML"],cu={class:"row",style:{"margin-left":"-0.75rem"}},su={class:"col m6 s12"},du={key:0},uu=["href","title"],gu={key:0},bu=Object(r["createElementVNode"])("hr",null,null,-1),mu=["href"],pu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),hu=["href"],fu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),vu={class:"col m6 s12"},ju={key:0},Ou=["href","title"],Tu=Object(r["createElementVNode"])("hr",null,null,-1),yu=["href"],Vu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Cu=["href"],Nu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Eu={class:"row",style:{"margin-left":"-0.75rem"}},Su={class:"col m6 s12"},wu=["href","title"],ku={key:0},Mu=Object(r["createElementVNode"])("hr",null,null,-1),_u=["href"],Du=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Au=["href"],xu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Bu={class:"col m6 s12"},Lu=["title","href"],Uu={key:0},Pu=Object(r["createElementVNode"])("br",null,null,-1),Iu=["title"],Fu={key:0},Hu=Object(r["createElementVNode"])("hr",null,null,-1),Gu=["href"],$u=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Ru=["href"],qu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1);function zu(e,t,n,a,i,o){var l,c,s=Object(r["resolveComponent"])("ActivityIndicator"),d=Object(r["resolveComponent"])("EnrichedHeadline"),u=Object(r["resolveComponent"])("ContentBlock"),g=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",nu,[Object(r["createVNode"])(s,{loading:e.isLoading},null,8,["loading"]),e.isLoading?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",au,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(d,{"feature-name":"Tag Manager","inline-help":e.dashboardHelpText},{default:Object(r["withCtx"])((function(){var t;return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_ContainerX",null===(t=e.container)||void 0===t?void 0:t.name)),1)]})),_:1},8,["inline-help"])]),Object(r["createElementVNode"])("p",iu,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.containerMetaInformation)+" ",1),null!==(l=e.containerVersion)&&void 0!==l&&l.description?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ru,[ou,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_Description"))+": "+Object(r["toDisplayString"])(null===(c=e.containerVersion)||void 0===c?void 0:c.description),1)])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.containerDashboardDescription)},null,8,lu)],512),[[g]]),Object(r["createElementVNode"])("div",cu,[Object(r["createElementVNode"])("div",su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.tagCount," ").concat(e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.tagCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",du,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainerVersionTags,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTags",{idTag:t.idtag}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,uu),n!==e.sortedContainerVersionTags.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",gu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))])):Object(r["createCommentVNode"])("",!0)]),bu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags")},[pu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTags")),1)],8,mu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags",{idTag:0})},[fu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)],8,hu)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",vu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.triggerCount," ").concat(e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.triggerCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ju,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTriggers",{idTrigger:t.idtrigger}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,Ou),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,", ",512),[[r["vShow"],n!==e.sortedTriggers.length-1]])])})),128))])):Object(r["createCommentVNode"])("",!0)]),Tu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers")},[Vu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTriggers")),1)],8,yu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers",{idTrigger:0})},[Nu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)],8,Cu)]})),_:1},8,["content-title","help-text"])])]),Object(r["createElementVNode"])("div",Eu,[Object(r["createElementVNode"])("div",Su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.variableCount," ").concat(e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageVariables",{idVariable:t.idvariable}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,wu),n!==e.sortedVariables.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ku,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.variableCount]])]),Mu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables")},[Du,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVariables")),1)],8,_u),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables",{idVariable:0})},[xu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)],8,Au)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",Bu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.versionCount," ").concat(e.translate("TagManager_Versions")),"help-text":e.versionsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_LastVersions"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.lastVersions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{title:e.lastVersionLinkTitle(t),href:e.linkTo("manageVersions",{idContainerVersion:t.idcontainerversion})},Object(r["toDisplayString"])(t.name),9,Lu),n!==e.lastVersions.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Uu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.lastVersions.length]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Pu,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_Environments"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.container.releases,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("span",{title:e.releaseTooltip(t)},Object(r["toDisplayString"])(e.ucfirst(t.environment)),9,Iu),n!==e.container.releases.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Fu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.container.releases.length]])]),Hu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions")},[$u,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVersions")),1)],8,Gu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions",{idContainerVersion:0})},[qu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVersion")),1)],8,Ru)]})),_:1},8,["content-title","help-text"])])])]))])}function Wu(e){e.sort((function(e,t){return e.namet.name?1:0}))}var Xu=Object(r["defineComponent"])({props:{idContainer:String,dashboardHelpText:String,tagsHelpText:String,triggersHelpText:String,variablesHelpText:String,versionsHelpText:String},components:{ActivityIndicator:u["ActivityIndicator"],EnrichedHeadline:u["EnrichedHeadline"],ContentBlock:u["ContentBlock"]},directives:{ContentIntro:u["ContentIntro"]},data:function(){return{container:null,containerVersion:null,isLoading:!1}},created:function(){var e=this;Qs.init(),this.isLoading=!0;var t=u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer}).then((function(t){e.container=t})),n=u["AjaxHelper"].fetch({method:"TagManager.exportContainerVersion",idContainer:this.idContainer}).then((function(t){e.containerVersion=t}));Promise.all([t,n]).finally((function(){e.isLoading=!1}))},methods:{linkTo:function(e,t){var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e}));return t&&(n+="#?".concat(u["MatomoUrl"].stringify(t))),"?".concat(n)},lastVersionLinkTitle:function(e){return"Created on ".concat(e.created_date_pretty)+", description: '".concat(e.description,"'")},releaseTooltip:function(e){var t=Object(u["translate"])("TagManager_ReleaseInfo",e.release_login,e.release_date_pretty),n=Object(u["translate"])("TagManager_ReleaseVersionInfo",e.version_name);return"".concat(t," ").concat(n)},ucfirst:function(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}},computed:{lastVersions:function(){var e,t;return null!==(e=this.container)&&void 0!==e&&null!==(t=e.versions)&&void 0!==t&&t.length?this.container.versions.slice(0,5):[]},contexts:function(){var e={};return Qs.contexts.value.forEach((function(t){var n=t.id,a=t.name;e[n]=a})),e},containerMetaInformation:function(){var e;return Object(u["translate"])("TagManager_ContainerIdInformation",(null===(e=this.containerVersion)||void 0===e?void 0:e.idcontainer)||"")},containerDashboardDescription:function(){return Object(u["translate"])("TagManager_ContainerDashboardDescription",'',"")},sortedContainerVersionTags:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.tags)||[];return Wu(t),t},sortedTriggers:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.triggers)||[];return Wu(t),t},sortedVariables:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.variables)||[];return Wu(t),t},tagCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.tags.length},triggerCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.triggers.length},versionCount:function(){var e;return null===(e=this.container)||void 0===e?void 0:e.versions.length},variableCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.variables.length}}});Xu.render=zu;var Ku=Xu,Ju=["title"],Yu={class:"title"},Zu=Object(r["createElementVNode"])("span",{class:"icon icon-chevron-down"}," ",-1),Qu={class:"dropdown positionInViewport"},eg={class:"custom_select_container"},tg={class:"custom_select_ul_list"},ng=["title"],ag=["href"];function ig(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ActivityIndicator"),c=Object(r["resolveDirective"])("focus-anywhere-but-here");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])(["tagContainerSelector piwikSelector borderedControl",{expanded:e.showContainerList}]),onClick:t[1]||(t[1]=function(t){e.fetchContainers(),e.showContainerList=!e.showContainerList}),title:e.translate("TagManager_ChooseContainer")},[Object(r["createElementVNode"])("a",Yu,[Zu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.truncateText(e.actualContainerName,50)),1)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Qu,[Object(r["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(r["createElementVNode"])("div",eg,[Object(r["createElementVNode"])("ul",tg,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("a",{tabindex:"-1",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(){}),["prevent","stop"]))},Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound")),1)],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{title:"".concat(t.name," (").concat(t.idcontainer,")"),key:t.idcontainer},[Object(r["createElementVNode"])("a",{href:e.linkTo(t.idcontainer)},Object(r["toDisplayString"])(t.name)+" ("+Object(r["toDisplayString"])(t.idcontainer)+") ",9,ag)],8,ng)})),128))])])],512),[[r["vShow"],e.showContainerList]])],10,Ju)),[[c,{blur:e.onBlur}]])}var rg=window,og=rg.tagManagerHelper,lg=Object(r["defineComponent"])({props:{containerName:String},components:{ActivityIndicator:u["ActivityIndicator"]},directives:{FocusAnywhereButHere:u["FocusAnywhereButHere"]},data:function(){return{containers:[],isLoading:!1,showContainerList:!1}},created:function(){setTimeout((function(){window.initTopControls()}))},methods:{fetchContainers:function(){var e=this;this.isLoading=!0,this.containers=[],u["AjaxHelper"].fetch({method:"TagManager.getContainers"}).then((function(t){e.containers=t})).finally((function(){e.isLoading=!1}))},linkTo:function(e){var t=u["MatomoUrl"].urlParsed.value.action;t&&"manageContainers"!==t||(t=this.hasWriteAccess?"dashboard":"manageTags");var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{idContainer:e,action:t}));return"".concat(window.location.pathname,"?").concat(n)},onBlur:function(){this.showContainerList=!1},truncateText:function(e,t){return og.truncateText(e,t)}},computed:{actualContainerName:function(){return this.containerName?Object(u["translate"])("TagManager_ContainerX",this.containerName):Object(u["translate"])("TagManager_ChooseContainer")},hasWriteAccess:function(){return u["Matomo"].hasUserCapability("tagmanager_write")}}});lg.render=ig;var cg=lg,sg={style:{"margin-left":"-0.75rem"}},dg=Object(r["createElementVNode"])("br",null,null,-1),ug=["href"],gg=["textContent"],bg={style:{"margin-top":"1rem"}},mg=["innerHTML"],pg=Object(r["createElementVNode"])("br",null,null,-1),hg=["href"],fg={class:"environment"},vg={class:"name"},jg={class:"name"},Og={class:"released_by"},Tg={class:"released_on"},yg={key:0},Vg={colspan:"7"},Cg={class:"loadingPiwik"},Ng=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Eg={key:1},Sg={colspan:"7"},wg={class:"environment"},kg={class:"name"},Mg={class:"revision"},_g={class:"released_by"},Dg={class:"released_on"},Ag={class:"date"};function xg(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveDirective"])("copy-to-clipboard"),u=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createBlock"])(s,{class:"manageInstallTagCode",feature:"Tag Manager","content-title":"Install Code"},{default:Object(r["withCtx"])((function(){var n,a;return[Object(r["createElementVNode"])("div",sg,[Object(r["createVNode"])(l,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.environment=t,e.fetchInstallInstructions(e.environment)}),options:e.environments,title:e.translate("TagManager_Environment")},null,8,["model-value","options","title"])]),Object(r["createVNode"])(c,{loading:e.isLoading},null,8,["loading"]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n},[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),dg,t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,ug)):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",null,[t.embedCode?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("pre",{key:0,textContent:Object(r["toDisplayString"])(t.embedCode)},null,8,gg)),[[d,{}]]):Object(r["createCommentVNode"])("",!0)])])})),128)),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_InstallCodePublishEnvironmentNote","preview"))+" "+Object(r["toDisplayString"])(e.translate("TagManager_ConfigureEnvironmentsSuperUser")),1),Object(r["createElementVNode"])("p",bg,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_InstallCodeDataLayerNote","",""))},null,8,mg),pg,Object(r["createElementVNode"])("a",{target:"_blank",href:e.externalRawLink("https://matomo.org/faq/tag-manager/data-layer-in-matomo-tag-manager/")},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,hg)]),Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_ReleasesOverview")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fg,Object(r["toDisplayString"])(e.translate("TagManager_Environment")),1),Object(r["createElementVNode"])("th",vg,Object(r["toDisplayString"])(e.translate("TagManager_VersionName")),1),Object(r["createElementVNode"])("th",jg,Object(r["toDisplayString"])(e.translate("TagManager_VersionRevision")),1),Object(r["createElementVNode"])("th",Og,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedBy")),1),Object(r["createElementVNode"])("th",Tg,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedOn")),1)])]),Object(r["createElementVNode"])("tbody",null,[e.isLoading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",yg,[Object(r["createElementVNode"])("td",Vg,[Object(r["createElementVNode"])("span",Cg,[Ng,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])])):Object(r["createCommentVNode"])("",!0),e.isLoading||0!==(null===(n=e.container)||void 0===n||null===(a=n.releases)||void 0===a?void 0:a.length)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Eg,[Object(r["createElementVNode"])("td",Sg,Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFound")),1)])),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedReleases,(function(t){var n,a;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t.idcontainerrelease},[Object(r["createElementVNode"])("td",wg,Object(r["toDisplayString"])(e.ucfirst(t.environment)),1),Object(r["createElementVNode"])("td",kg,Object(r["toDisplayString"])(null===(n=e.releaseVersions[t.idcontainerrelease])||void 0===n?void 0:n.name),1),Object(r["createElementVNode"])("td",Mg,Object(r["toDisplayString"])(null===(a=e.releaseVersions[t.idcontainerrelease])||void 0===a?void 0:a.revision),1),Object(r["createElementVNode"])("td",_g,Object(r["toDisplayString"])(t.release_login),1),Object(r["createElementVNode"])("td",Dg,[Object(r["createElementVNode"])("span",Ag,Object(r["toDisplayString"])(t.release_date_pretty),1)])])})),128))])],512),[[u]])]})),_:1})}function Bg(e){return Pg(e)||Ug(e)||Hg(e)||Lg()}function Lg(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ug(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Pg(e){if(Array.isArray(e))return Gg(e)}function Ig(e,t){return Rg(e)||$g(e,t)||Hg(e,t)||Fg()}function Fg(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hg(e,t){if(e){if("string"===typeof e)return Gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gg(e,t):void 0}}function Gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.release_date?-1:t.index-e.index})),t}}});Wg.render=xg;var Xg=Wg,Kg={class:"tagManagerTrackingCode"},Jg={key:0},Yg={class:"trackingCodeAdvancedOptions"},Zg={class:"advance-option"},Qg=Object(r["createElementVNode"])("span",{class:"icon-chevron-down"},null,-1),eb=Object(r["createElementVNode"])("span",{class:"icon-chevron-up"},null,-1),tb={id:"mtm-advanced-options"},nb=["innerHTML"],ab={key:1,class:"row"},ib={class:"col s12 m4 "},rb={class:"form-group row"},ob={class:"col s12 input-field"},lb={for:"tagManagerTrackingCodeSite",class:"siteSelectorLabel"},cb={class:"sites_autocomplete"},sb={class:"col s12 m4"},db={class:"col s12 m4"},ub=["innerHTML"],gb={key:1,class:"alert alert-info"},bb={href:""},mb={key:0},pb=["href"],hb=Object(r["createTextVNode"])(". "),fb=["innerHTML"],vb=["textContent"],jb=["innerHTML"],Ob={key:1};function Tb(e,t,n,a,i,o){var l=this,c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("SiteSelector"),d=Object(r["resolveComponent"])("Field"),u=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Kg,[e.showContainerRow?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Jg,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_OptionallyCustomiseContainer"))+" ",1),Object(r["createElementVNode"])("div",Yg,[Object(r["createElementVNode"])("div",Zg,[Object(r["createElementVNode"])("span",null,[e.isAdvancedDisplayed?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,href:"javascript:;",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!0}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_ShowAdvancedOptions"))+" ",1),Qg])),e.isAdvancedDisplayed?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:1,href:"javascript:;",onClick:t[1]||(t[1]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!1}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_HideAdvancedOptions"))+" ",1),eb])):Object(r["createCommentVNode"])("",!0)])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",tb,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.getAdvancedStepText)},null,8,nb),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,loading:!0},null,512)),[[r["vShow"],e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ab,[Object(r["createElementVNode"])("div",ib,[Object(r["createElementVNode"])("div",rb,[Object(r["createElementVNode"])("div",ob,[Object(r["createElementVNode"])("label",lb,Object(r["toDisplayString"])(e.translate("General_Website")),1),Object(r["createElementVNode"])("div",cb,[Object(r["createVNode"])(s,{id:"tagManagerTrackingCodeSite",modelValue:e.site,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.site=t}),"show-all-sites-item":!1,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(r["createElementVNode"])("div",sb,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"containers","model-value":e.idContainer,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.idContainer=t,e.onContainerChange()}),options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container")},null,8,["model-value","options","disabled","title"])])]),Object(r["createElementVNode"])("div",db,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.environment=t,l.$emit("fetchInstallInstructions")}),options:e.environments,disabled:e.environments.length<=1,"full-width":!0,title:e.translate("TagManager_Environment")},null,8,["model-value","options","disabled","title"])])])],512)),[[r["vShow"],!e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.getAdvancedStepInfo)},null,8,ub)):Object(r["createCommentVNode"])("",!0)])],512),[[r["vShow"],e.isAdvancedDisplayed]])])])):Object(r["createCommentVNode"])("",!0),e.idContainer&&e.noReleaseFound?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFoundForContainer"))+" ",1),Object(r["createElementVNode"])("a",bb,Object(r["toDisplayString"])(e.translate("TagManager_PublishVersionToEnvironmentToViewEmbedCode")),1)])):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:n},[e.showDescription?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",mb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,pb)):Object(r["createCommentVNode"])("",!0),hb])):Object(r["createCommentVNode"])("",!0),e.showPlainMtmSteps?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.getMtmStep3)},null,8,fb)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,vb),[[u,{}]])])],64)})),128)),e.showBottom&&!e.noReleaseFound&&e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:2},[e.showTestSection?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Ob,[(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e.testComponent),{site:e.site},null,8,["site"]))])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.getCongratulationsText)},null,8,jb))],64)):Object(r["createCommentVNode"])("",!0)])}function yb(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}var Vb=Object(r["defineComponent"])({props:{showContainerRow:Boolean,showBottom:Boolean,showDescription:Boolean,showPlainMtmSteps:Boolean,showTestSection:Boolean,showAdvancedOptions:{required:!1,type:Boolean,default:!1}},components:{ActivityIndicator:u["ActivityIndicator"],SiteSelector:u["SiteSelector"],Field:g["Field"]},emits:["fetchInstallInstructions"],directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{containerVariables:[],isLoading:!1,idContainer:"",environment:"",environments:[],environmentNameMap:{},containerMap:{},containerOptions:[],site:{id:u["Matomo"].idSite,name:u["Matomo"].helper.htmlDecode(u["Matomo"].siteName)},matomoConfigs:[],releases:[],installInstructions:[],noReleaseFound:!1,isAdvancedDisplayed:!1}},created:function(){var e=this;u["AjaxHelper"].fetch({method:"TagManager.getAvailableEnvironments",filter_limit:"-1"}).then((function(t){var n;n=Array.isArray(t)?t:Object.values(t),e.environmentNameMap=Object.fromEntries(n.map((function(e){var t=e.id,n=e.name;return[t,n]})))})),this.onSiteChange(),this.isAdvancedDisplayed=this.showAdvancedOptions},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;this.installInstructions=[],this.containerOptions=[],this.containerMap={},this.environments=[],this.matomoConfigs=[],this.idContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&(this.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idContainer="",t.isAdvancedDisplayed=!0,void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idContainer||(t.idContainer=e.idcontainer),t.containerMap[e.idcontainer]=e,t.containerOptions.push({key:e.idcontainer,value:e.name})})),t.onContainerChange()})).finally((function(){t.isLoading=!1})))},onContainerChange:function(){var e=this;if(this.noReleaseFound=!1,this.idContainer){this.installInstructions=[];var t=this.containerMap[this.idContainer],n=t.draft.idcontainerversion;this.environment="",this.environments=[];var a=t.releases||[];a.find((function(e){return"live"===e.environment}))&&(this.environment="live"),a.forEach((function(t){if("preview"!==t.environment){e.environment||(e.environment=t.environment);var n=yb(t.environment);t.environment in e.environmentNameMap&&(n=e.environmentNameMap[t.environment]),e.environments.push({key:t.environment,value:n})}})),this.environments.length||(this.noReleaseFound=!0,this.environments.push({key:"",value:this.translate("TagManager_NoReleasesFound")})),this.$emit("fetchInstallInstructions"),this.fetchVariables(n)}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n})),r="".concat(window.location.pathname,"?").concat(i);return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),r},fetchVariables:function(e){var t,n=this;this.matomoConfigs=[],this.idContainer&&null!==(t=this.site)&&void 0!==t&&t.id&&e&&u["AjaxHelper"].fetch({method:"TagManager.getContainerVariables",filter_limit:"-1",idContainer:this.idContainer,idContainerVersion:e,idSite:this.site.id}).then((function(e){n.matomoConfigs=e.filter((function(e){return"MatomoConfiguration"===e.type}))})).finally((function(){n.isLoading=!1}))}},computed:{getLearnMoreLink:function(){return Object(u["translate"])("TagManager_CustomHtmlTagHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")},getMtmStep3:function(){return Object(u["translate"])("TagManager_CopyCodePasteInHeader","</head>")},getCongratulationsText:function(){return Object(u["translate"])("TagManager_SiteWithoutDataReactFollowStepCompleted","","")},testComponent:function(){return this.showTestSection?Object(u["useExternalPluginComponent"])("JsTrackerInstallCheck","JsTrackerInstallCheck"):""},getAdvancedStepText:function(){var e,t=Object(u["translate"])("TagManager_SelectContainerForWebsite","","");if(this.idContainer)return t;var n=this.linkTo("manageContainers",String(null===(e=this.site)||void 0===e?void 0:e.id),""),a=Object(u["translate"])("TagManager_ManageContainersLink",''),"");return"".concat(t," ").concat(a)},getAdvancedStepInfo:function(){var e=this.site&&this.site.id?this.site.id:"",t=this.linkTo("dashboard",e,this.idContainer,[]);return Object(u["translate"])("TagManager_CustomiseContainer",''),"",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")}}});Vb.render=Tb;var Cb=Vb,Nb=Object(r["createElementVNode"])("br",null,null,-1),Eb={class:"followStepsHeading"},Sb={style:{"list-style":"inside decimal"}};function wb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon");return Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])("getTrackingMethodsForSite"===e.currentAction?"div":"ContentBlock"),{anchor:"tagmanager","content-title":e.translate("TagManager_MatomoTagManager")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_MtmTrackingCodeIntro")),1),Nb,Object(r["createElementVNode"])("p",Eb,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(r["createElementVNode"])("ol",Sb,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!0,showDescription:!1,showPlainMtmSteps:!0,showAdvancedOptions:"trackingCodeGenerator"===e.currentAction,showTestSection:"getTrackingMethodsForSite"===e.currentAction&&e.isJsTrackerInstallCheckAvailable,onFetchInstallInstructions:e.fetchInstallInstructions,ref:"trackingCodeCommon"},null,8,["show-container-row","showAdvancedOptions","showTestSection","onFetchInstallInstructions"])])]})),_:1},8,["content-title"])}var kb=Object(r["defineComponent"])({props:{currentAction:String,showContainerRow:Boolean,isJsTrackerInstallCheckAvailable:Boolean},components:{ContentBlock:u["ContentBlock"],TrackingCodeCommon:Cb},methods:{fetchInstallInstructions:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;a.installInstructions=[],null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id&&null!==a&&void 0!==a&&a.environment&&(a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id}).then((function(e){a.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1})))}}});kb.render=wb;var Mb=kb,_b={class:"list-style-decimal"},Db={ref:"step1"},Ab=["innerHTML"],xb=["innerHTML"],Bb=["textContent"],Lb=["innerHTML"],Ub=["textContent"],Pb=["innerHTML"],Ib=["innerHTML"],Fb=["innerHTML"],Hb=["textContent"],Gb={style:{"list-style":"lower-alpha","list-style-position":"inside"}},$b=["innerHTML"],Rb=["innerHTML"],qb=["innerHTML"],zb=["textContent"],Wb=["textContent"],Xb=["innerHTML"],Kb=["textContent"],Jb=["innerHTML"],Yb=["innerHTML"],Zb=["textContent"];function Qb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon"),c=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("ol",_b,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",Db,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!1,showDescription:!1,onFetchInstallInstructions:e.fetchInstallInstructionsSPA,ref:"trackingCodeCommon"},null,8,["show-container-row","onFetchInstallInstructions"])],512),[[r["vShow"],e.step1HasContent]]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep2)},null,8,Ab),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep3)},null,8,xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Bb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep5)},null,8,Lb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Ub),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep7)},null,8,Pb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep8)},null,8,Ib),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep9)},null,8,Fb),Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("span",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep10)},null,8,Hb),Object(r["createElementVNode"])("ol",Gb,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10a)},null,8,$b),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10b)},null,8,Rb)])]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep11)},null,8,qb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("General_Update"))},null,8,zb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep13)},null,8,Wb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep14)},null,8,Xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep15)},null,8,Kb),Object(r["createElementVNode"])("li",null,["react"===e.jsFramework?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.fetchFollowStep16React)},null,8,Jb)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:1,innerHTML:e.$sanitize(e.fetchFollowStep16SPA)},null,8,Yb)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:t},[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(e.embedCode),ref:"codeblock"},null,8,Zb),[[c,{}]])])})),128))])])}var em=Object(r["defineComponent"])({props:{showContainerRow:Boolean,jsFramework:String},components:{TrackingCodeCommon:Cb},directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{setupStep1:"",setupStep2:"",setupStep7:"",installInstructions:[]}},methods:{fetchInstallInstructionsSPA:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;if(this.installInstructions=[],null!==a&&void 0!==a&&a.idContainer&&null!==a&&void 0!==a&&a.environment&&null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id){var i=this.linkTo("manageContainers",a.site.id,a.idContainer);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"");var o=this.linkTo("manageTriggers",a.site.id,a.idContainer);this.setupStep2=Object(u["translate"])("TagManager_SPAFollowStep2",''),"");var l=this.linkTo("manageTags",a.site.id,a.idContainer);this.setupStep7=Object(u["translate"])("TagManager_SPAFollowStep7",''),""),a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id,jsFramework:this.jsFramework}).then((function(e){n.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1}))}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(i+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(i)},fetchClickX:function(e){return Object(u["translate"])("General_ClickX",Object(u["translate"])(e))}},computed:{step1HasContent:function(){var e=this.$refs.step1;return e&&""!==e.textContent},fetchFollowStep3:function(){return Object(u["translate"])("TagManager_SPAFollowStep3","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-trigger"),"")},fetchFollowStep5:function(){return Object(u["translate"])("TagManager_SPAFollowStep5","".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),Object(u["translate"])("TagManager_CategoryUserEngagement"))},fetchFollowStep8:function(){return Object(u["translate"])("TagManager_SPAFollowStep8","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),"".concat(Object(u["translate"])("TagManager_MatomoTagName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-tag"),"")},fetchFollowStep9:function(){return Object(u["translate"])("TagManager_SPAFollowStep9",Object(u["translate"])("TagManager_ConfigureWhatTagDoes"),Object(u["translate"])("TagManager_CustomTitle"),"","")},fetchFollowStep10:function(){return Object(u["translate"])("TagManager_SPAFollowStep10",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10a:function(){return Object(u["translate"])("TagManager_SPAFollowStep10a","","",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10b:function(){return Object(u["translate"])("TagManager_SPAFollowStep10b",Object(u["translate"])("TagManager_CustomUrl"),"","")},fetchFollowStep11:function(){return Object(u["translate"])("TagManager_SPAFollowStep11",Object(u["translate"])("TagManager_ConfigureWhenTagDoes"),Object(u["translate"])("TagManager_FireTriggerTitle"),"".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),"".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""))},fetchFollowStep13:function(){return Object(u["translate"])("TagManager_SPAFollowStep13",Object(u["translate"])("TagManager_Publish"))},fetchFollowStep14:function(){return Object(u["translate"])("TagManager_SPAFollowStep14",Object(u["translate"])("TagManager_VersionName"),"","")},fetchFollowStep15:function(){return Object(u["translate"])("TagManager_SPAFollowStep15",Object(u["translate"])("TagManager_CreateVersionAndPublishRelease"))},fetchFollowStep16SPA:function(){return Object(u["translate"])("TagManager_SPAFollowStep16","</head>",Object(u["externalLink"])("https://developer.matomo.org/guides/tagmanager/embedding"),"")},fetchFollowStep16React:function(){return Object(u["translate"])("TagManager_ReactFollowStep16","","","App.js","React.useEffect","Hello World","React.js")}}});em.render=Qb;var tm,nm,am=em,im={class:"nav-wrapper"},rm={class:"pull-right"},om=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-close"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-close"})],-1),lm=[om],cm={class:"pull-right"},sm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("defs",null,[Object(r["createElementVNode"])("symbol",{id:"tm-icon-checkmark",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M27 4l-15 15-7-7-5 5 12 12 20-20z"})])])],-1),dm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("symbol",{id:"tm-icon-close",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M31.33 0.67c0.893 0.893 0.893 2.34 0 3.232l-27.427 27.427c-0.893 0.893-2.34\n 0.893-3.232 0s-0.893-2.34 0-3.232l27.427-27.427c0.892-0.893 2.34-0.893 3.232 0z"}),Object(r["createElementVNode"])("path",{d:"M0.67 0.67c0.893-0.893 2.34-0.893 3.232 0l27.427 27.427c0.893 0.892 0.893\n 2.34 0 3.232s-2.34 0.892-3.232 0l-27.427-27.427c-0.893-0.893-0.893-2.34 0-3.232z"})])],-1),um={class:"page",style:{clear:"both"}},gm={key:0,id:"secondNavBar",class:"Menu--dashboard z-depth-1"},bm={class:"navbar",role:"menu",style:{padding:"0"}},mm={class:"menuTab",role:"menuitem"},pm={class:"item",style:{"font-weight":"normal"}},hm=Object(r["createTextVNode"])(" Events "),fm={key:0},vm=Object(r["createElementVNode"])("br",null,null,-1),jm=Object(r["createElementVNode"])("br",null,null,-1),Om=Object(r["createElementVNode"])("label",{for:"onlyfiredTags",class:"lbl-onlyfiredTags"},"Only fired tags",-1),Tm={key:0,style:{padding:"0 0 1rem 1.2rem"}},ym=["onClick","title"],Vm={title:"This tag was fired"},Cm=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-checkmark"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-checkmark"})],-1),Nm=[Cm],Em={class:"pageWrap"},Sm={class:"home",id:"content"},wm=Object(r["createElementVNode"])("h3",null,"Fired Tags",-1),km={class:"entityTable"},Mm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Action"),Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Fired count")])],-1),_m={key:0},Dm=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Am=[Dm],xm=Object(r["createElementVNode"])("h3",{style:{"margin-top":"30px"}},"Not Yet Fired Tags",-1),Bm={class:"entityTable"},Lm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Um=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Pm=[Um],Im=Object(r["createElementVNode"])("h3",null,"Triggers",-1),Fm={class:"entityTable"},Hm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Gm={key:0},$m=Object(r["createElementVNode"])("td",{colspan:"4"},"No trigger",-1),Rm=[$m],qm={key:1},zm=Object(r["createElementVNode"])("h3",null,"Pushed data by this event",-1),Wm={class:"entityTable"},Xm={style:{"word-break":"break-all"}},Km=Object(r["createElementVNode"])("br",null,null,-1),Jm=Object(r["createElementVNode"])("h3",null,"Content after this event",-1),Ym={class:"entityTable"},Zm={style:{"word-break":"break-all"}},Qm={class:"entityTable"},ep=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Value")])],-1),tp={key:0},np=Object(r["createElementVNode"])("td",{colspan:"3"},"No variables",-1),ap=[np],ip={style:{"word-break":"break-all"}},rp={class:"entityTable"},op=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Time"),Object(r["createElementVNode"])("th",null,"Message")])],-1),lp={style:{"word-break":"break-all"}},cp=Object(r["createElementVNode"])("br",null,null,-1);function sp(e,t,n,a,i,o){var l,c,s,d,u,g,b,m,p,h;return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("nav",null,[Object(r["createElementVNode"])("div",im,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,[Object(r["renderSlot"])(e.$slots,"logo")]),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"tags"===e.contentTab||!e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(t){return e.contentTab="tags"})},"Tags")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"triggers"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[1]||(t[1]=function(t){return e.contentTab="triggers"})},"Triggers")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"variables"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[2]||(t[2]=function(t){return e.contentTab="variables"})},"Variables")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"dataLayer"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[3]||(t[3]=function(t){return e.contentTab="dataLayer"})},"Data Layer")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"logs"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.contentTab="logs"})},"Logs")],2),Object(r["createElementVNode"])("li",rm,[Object(r["createElementVNode"])("a",{id:"mtmCloseDebug",onClick:t[5]||(t[5]=function(t){return e.mtmCloseDebugWindow()})},lm)]),Object(r["createElementVNode"])("li",cm,[Object(r["createElementVNode"])("a",{id:"mtmUpdateDebugPosition",onClick:t[6]||(t[6]=function(t){return e.mtmUpdateDebugPosition()})},Object(r["toDisplayString"])(e.positionText),1)])])])]),sm,dm,Object(r["createElementVNode"])("div",um,["logs"!==e.contentTab?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gm,[Object(r["createElementVNode"])("ul",bm,[Object(r["createElementVNode"])("li",mm,[Object(r["createElementVNode"])("span",pm,[hm,e.mtmEvents.length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",fm,[vm,jm,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{type:"checkbox",class:"onlyFiredTags-chk",name:"onlyfiredTags",id:"onlyfiredTags",value:"1","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.onlyfiredTags=t}),style:{"margin-right":"3.5px"}},null,512),[[r["vModelCheckbox"],e.onlyfiredTags]]),Om])):Object(r["createCommentVNode"])("",!0)])]),0===e.mtmEvents.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Tm,"No event executed")):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmEventsReversed,(function(t,n){var a,i;return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["menuTab",{active:n===e.selectedEventIndex}]),role:"menuitem",key:n},[(t.tags||[]).length||!e.onlyfiredTags?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,class:"item",onClick:function(n){return e.selectEvent(t.index0)},title:"Time: ".concat(t.time,". Trigger: ").concat(null===(a=t.metTrigger)||void 0===a?void 0:a.name)},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.index)+": "+Object(r["toDisplayString"])(t.name)+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Vm,Nm,512),[[r["vShow"],null===(i=t.tags)||void 0===i?void 0:i.length]])],8,ym)):Object(r["createCommentVNode"])("",!0)],2)})),128))])])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",Em,[Object(r["createElementVNode"])("div",Sm,[Object(r["withDirectives"])(Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.homeTabTitle),513),[[r["vShow"],"logs"!==e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[wm,Object(r["createElementVNode"])("table",km,[Mm,Object(r["createElementVNode"])("tbody",null,[null!==(l=e.selectedEvent)&&void 0!==l&&null!==(c=l.tags)&&void 0!==c&&c.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",_m,Am)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(s=e.selectedEvent)||void 0===s?void 0:s.tags)||[],(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.action),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.numExecuted),1)])})),128))])]),xm,Object(r["createElementVNode"])("table",Bm,[Lm,Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,Pm,512),[[r["vShow"],0===e.notFiredTags.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.notFiredTags,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1)])})),128))])])],512),[[r["vShow"],"tags"===e.contentTab||!e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Im,Object(r["createElementVNode"])("table",Fm,[Hm,Object(r["createElementVNode"])("tbody",null,[null!==(d=e.selectedEvent)&&void 0!==d&&d.metTrigger?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Gm,Rm)),null!==(u=e.selectedEvent)&&void 0!==u&&u.metTrigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",qm,[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.type),1)])):Object(r["createCommentVNode"])("",!0)])])],512),[[r["vShow"],"triggers"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[zm,Object(r["createElementVNode"])("table",Wm,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Xm,Object(r["toDisplayString"])(e.selectedEventData),1)])])]),Km,Jm,Object(r["createElementVNode"])("table",Ym,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Zm,Object(r["toDisplayString"])(e.selectedEventContainerDataLayer),1)])])])],512),[[r["vShow"],"dataLayer"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",Qm,[ep,Object(r["createElementVNode"])("tbody",null,[null!==(g=e.selectedEvent)&&void 0!==g&&null!==(b=g.container)&&void 0!==b&&null!==(m=b.variables)&&void 0!==m&&m.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",tp,ap)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(p=e.selectedEvent)||void 0===p||null===(h=p.container)||void 0===h?void 0:h.variables)||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.type),1),Object(r["createElementVNode"])("td",ip,Object(r["toDisplayString"])(e.stringifySelectedVariable(t)),1)])})),128))])])],512),[[r["vShow"],"variables"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",rp,[op,Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmLogs,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.time),1),Object(r["createElementVNode"])("td",lp,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.messages,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:t},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e),1),cp])})),128))])])})),128))])])],512),[[r["vShow"],"logs"===e.contentTab]])])])])])}function dp(e){return mp(e)||bp(e)||gp(e)||up()}function up(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gp(e,t){if(e){if("string"===typeof e)return pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pp(e,t):void 0}}function bp(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function mp(e){if(Array.isArray(e))return pp(e)}function pp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt||n.push.apply(n,dp(e.tags.map((function(e){return e.name}))))}));var a=[];return this.selectedEvent.container.tags.forEach((function(e){-1===n.indexOf(e.name)&&a.push(e)})),a},selectedEvent:function(){return this.mtmEvents[this.selectedEventIndex]},mtmEvents:function(){return window.mtmDbgData.mtmEvents},mtmEventsReversed:function(){var e=dp(this.mtmEvents);return e.reverse(),e},mtmLogs:function(){return window.mtmDbgData.mtmLogs},selectedEventData:function(){var e;return(null===(e=this.selectedEvent)||void 0===e?void 0:e.eventData)&&JSON.stringify(this.selectedEvent.eventData,Op())},selectedEventContainerDataLayer:function(){var e,t;return(null===(e=this.selectedEvent)||void 0===e||null===(t=e.container)||void 0===t?void 0:t.dataLayer)&&JSON.stringify(this.selectedEvent.container.dataLayer,Op())}}});Tp.render=sp;var yp=Tp,Vp={class:"copyMtmObjectDialog"},Cp=["innerHTML"];function Np(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveDirective"])("form");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vp,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.getCopyDialogTitle),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.getCopyDescription),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"site",name:"destinationSite",title:e.translate("TagManager_ChooseWebsite"),modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t})},null,8,["title","modelValue"]),"container"!==e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:0,uicontrol:"select",name:"idDestinationContainer",options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container"),modelValue:e.idDestinationContainer,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.idDestinationContainer=t})},null,8,["options","disabled","title","modelValue"])):Object(r["createCommentVNode"])("",!0),"container"===e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:1,class:"copyNote",innerHTML:e.$sanitize(e.getCopyContainerNote)},null,8,Cp)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("button",{class:"btn",onClick:t[2]||(t[2]=function(){return e.performCopy&&e.performCopy.apply(e,arguments)})},Object(r["toDisplayString"])(e.translate("General_Copy")),1)],512),[[c]])])}var Ep=Object(r["defineComponent"])({props:{defaultSite:{type:Object,required:!0},copyType:{type:String,required:!0},copyNonce:{type:String,required:!1,default:""},idToCopy:{type:[String,Number],required:!0},idSourceContainer:{type:String,required:!1,default:""},idContainerVersion:{type:Number,required:!1,default:0}},directives:{Form:g["Form"]},components:{Field:g["Field"]},data:function(){return{site:this.defaultSite,idDestinationContainer:"",containerOptions:[]}},created:function(){this.onSiteChange(),this.idDestinationContainer=this.idSourceContainer},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;"container"!==this.copyType.toLowerCase()&&(this.containerOptions=[],this.idDestinationContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idDestinationContainer="",void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idDestinationContainer||(t.idDestinationContainer=e.idcontainer),t.containerOptions.push({key:e.idcontainer,value:e.name})}))})))},performCopy:function(){var e,t=this,n={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":n.action="copyContainer",n.idContainer=this.idToCopy;break;case"tag":n.action="copyTag",n.idTag=this.idToCopy;break;case"trigger":n.action="copyTrigger",n.idTrigger=this.idToCopy;break;case"variable":n.action="copyVariable",n.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}this.idDestinationContainer&&(n.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(n.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(n.idContainerVersion=this.idContainerVersion),u["AjaxHelper"].fetch(n).then((function(e){if(!e||!e.isSuccess||!e.urlToNewCopy){var n=Object(u["translate"])("General_ErrorRequest","",""),a=u["NotificationsStore"].show({message:n,id:"CopyDialogResultNotification",context:"error",type:"transient"});return u["NotificationsStore"].scrollToNotification(a),void window.Piwik_Popover.close()}t.reloadEntityStore(),t.displaySuccessNotification(e.urlToNewCopy),window.Piwik_Popover.close()}))},reloadEntityStore:function(){switch(this.copyType.toLowerCase()){case"container":ud.reload();break;case"tag":mo.reload(this.idSourceContainer,this.idContainerVersion);break;case"trigger":ya.fetchTriggers(this.idSourceContainer,this.idContainerVersion);break;case"variable":ft.fetchVariables(this.idSourceContainer,this.idContainerVersion);break;default:throw Error("Unrecognised copy object type.")}},displaySuccessNotification:function(e){var t="TagManager_CopyXSuccess",n="";switch(this.copyType.toLowerCase()){case"container":n="TagManager_ContainerLowercase";break;case"tag":n="TagManager_TagLowercase";break;case"trigger":n="TagManager_TriggerLowercase";break;case"variable":n="TagManager_VariableLowercase";break;default:throw Error("Unrecognised copy object type.")}var a=Object(u["translate"])(t,[''),Object(u["translate"])(n),""]),i=u["NotificationsStore"].show({message:a,id:"CopyDialogResultNotification",context:"success",type:"transient"});u["NotificationsStore"].scrollToNotification(i)}},computed:{getCopyDialogTitle:function(){var e="";switch(this.copyType.toLowerCase()){case"container":e=Object(u["translate"])("TagManager_Container");break;case"tag":e=Object(u["translate"])("TagManager_Tag");break;case"trigger":e=Object(u["translate"])("TagManager_Trigger");break;case"variable":e=Object(u["translate"])("TagManager_Variable");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyX",e)},getCopyDescription:function(){if("container"===this.copyType.toLowerCase())return Object(u["translate"])("TagManager_CopyContainerDescription");var e="";switch(this.copyType.toLowerCase()){case"tag":e=Object(u["translate"])("TagManager_TagLowercase");break;case"trigger":e=Object(u["translate"])("TagManager_TriggerLowercase");break;case"variable":e=Object(u["translate"])("TagManager_VariableLowercase");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyXDescription",e)},getCopyContainerNote:function(){return Object(u["translate"])("TagManager_CopyContainerNote","","")},getCopyUrl:function(){var e,t={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":t.action="copyContainer",t.idContainer=this.idToCopy;break;case"tag":t.action="copyTag",t.idTag=this.idToCopy;break;case"trigger":t.action="copyTrigger",t.idTrigger=this.idToCopy;break;case"variable":t.action="copyVariable",t.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}return this.idDestinationContainer&&(t.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(t.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(t.idContainerVersion=this.idContainerVersion),"?".concat(u["MatomoUrl"].stringify(t))}}});Ep.render=Np;var Sp=Ep; + */var dd=function(){function e(){var t=this;od(this,e),sd(this,"privateState",Object(r["reactive"])({containers:[],isLoadingContainers:!1,isLoadingSingle:!1,isUpdating:!1})),sd(this,"state",Object(r["computed"])((function(){return Object(r["readonly"])(t.privateState)}))),sd(this,"isLoading",Object(r["computed"])((function(){var e=t.state.value;return e.isLoadingContainers||e.isLoadingSingle}))),sd(this,"isUpdating",Object(r["computed"])((function(){return t.state.value.isUpdating}))),sd(this,"containers",Object(r["computed"])((function(){return t.state.value.containers}))),sd(this,"fetchPromise",null)}return cd(e,[{key:"reload",value:function(){return this.privateState.containers=[],this.fetchPromise=null,this.fetchContainers()}},{key:"fetchContainers",value:function(){var e=this;return this.privateState.isLoadingContainers=!0,this.privateState.containers=[],this.fetchPromise||(this.fetchPromise=u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1"})),Promise.resolve(this.fetchPromise).then((function(t){return e.privateState.containers=t,e.privateState.isLoadingContainers=!1,e.containers.value})).finally((function(){e.privateState.isLoadingContainers=!1}))}},{key:"findContainer",value:function(e){var t=this,n=this.containers.value.find((function(t){return t.idcontainer===e}));return n?Promise.resolve(n):(this.privateState.isLoadingSingle=!0,u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.getContainer",filter_limit:"-1"}).then((function(e){return t.privateState.containers=[].concat(ed(t.privateState.containers),[e]),Object(r["readonly"])(e)})).finally((function(){t.privateState.isLoadingSingle=!1})))}},{key:"deleteContainer",value:function(e){var t=this;return this.privateState.isUpdating=!0,this.privateState.containers=[],u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.deleteContainer"},{withTokenInUrl:!0}).finally((function(){t.privateState.isUpdating=!1}))}},{key:"createOrUpdateContainer",value:function(e,t){var n=this;return this.privateState.isUpdating=!0,u["AjaxHelper"].post({method:t,idContainer:e.idcontainer},{name:e.name,description:e.description,ignoreGtmDataLayer:e.ignoreGtmDataLayer,activelySyncGtmDataLayer:e.activelySyncGtmDataLayer,isTagFireLimitAllowedInPreviewMode:e.isTagFireLimitAllowedInPreviewMode,context:e.context},{withTokenInUrl:!0}).finally((function(){n.privateState.isUpdating=!1}))}}]),e}(),ud=new dd,gd="containertagmanagement",bd=Object(r["defineComponent"])({props:{idContainer:String},components:{ContentBlock:u["ContentBlock"],Field:g["Field"],SaveButton:g["SaveButton"]},data:function(){return{isDirty:!1,editTitle:"",isUpdatingVersion:!1,container:{}}},created:function(){Qs.init(),Vt.init(),this.initIdContainer()},watch:{idContainer:function(e){null!==e&&this.initIdContainer()}},methods:{removeAnyContainerNotification:function(){u["NotificationsStore"].remove(gd),u["NotificationsStore"].remove("ajaxHelper")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:gd,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},showErrorFieldNotProvidedNotification:function(e){var t=Object(u["translate"])("TagManager_ErrorXNotProvided",[e]);this.showNotification(t,"error")},initIdContainer:function(){var e=this;this.container={},u["Matomo"].helper.lazyScrollToContent(),this.edit&&this.idContainer?(this.editTitle=Object(u["translate"])("TagManager_EditContainer"),ud.findContainer(this.idContainer).then((function(t){t&&(e.container=Object(u["clone"])(t),e.isDirty=!1)}))):this.create&&(this.editTitle=Object(u["translate"])("TagManager_CreateNewContainer"),this.container={idSite:u["Matomo"].idSite,name:"",context:"web",description:"",activelySyncGtmDataLayer:!0},this.isDirty=!1)},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idContainer,u["MatomoUrl"].updateHash(e)},createContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVersion=!0,ud.createOrUpdateContainer(this.container,"TagManager.addContainer").then((function(t){if(e.isUpdatingVersion=!1,t){e.isDirty=!1;var n=t.value;e.showNotification(Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Container")),"success"),u["MatomoUrl"].updateUrl(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"dashboard",idContainer:n}))}})).finally((function(){e.isUpdatingVersion=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdating=!0,ud.createOrUpdateContainer(this.container,"TagManager.updateContainer").then((function(t){t&&(e.isDirty=!1,e.container={},ud.reload().then((function(){e.initIdContainer()})),e.showNotification(Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Container")),"success"))})))},checkRequiredFieldsAreSet:function(){if(!this.container.name){var e=Object(u["translate"])("General_Name");return this.showErrorFieldNotProvidedNotification(e),!1}return!0}},computed:{contexts:function(){return Qs.contextsOptions.value},create:function(){return"0"===this.idContainer},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVersion}}});bd.render=Ws;var md=bd,pd={class:"tagManagerManageList tagManagerContainerList"},hd=["innerHTML"],fd={class:"index"},vd={class:"name"},jd={class:"description"},Od={class:"created"},Td={class:"action"},yd={colspan:"5"},Vd={class:"loadingPiwik"},Cd=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Nd={colspan:"5"},Ed=["id"],Sd=["title"],wd=["title"],kd=["title"],Md={class:"created"},_d=["href","title"],Dd=["onClick","title"],Ad=["onClick","title"],xd=["onClick","title"],Bd=["onClick","title"],Ld={class:"tableActionBar"},Ud=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Pd={class:"ui-confirm",id:"confirmDeleteContainer",ref:"confirmDeleteContainer"},Id=["value"],Fd=["value"];function Hd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContentBlock"),c=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",pd,[Object(r["createVNode"])(l,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Containers"))},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.getManageContainersIntro)},null,8,hd),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fd,Object(r["toDisplayString"])(e.translate("General_Id")),1),Object(r["createElementVNode"])("th",vd,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",jd,Object(r["toDisplayString"])(e.translate("General_Description")),1),Object(r["createElementVNode"])("th",Od,Object(r["toDisplayString"])(e.translate("TagManager_CreatedDate")),1),Object(r["createElementVNode"])("th",Td,Object(r["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",yd,[Object(r["createElementVNode"])("span",Vd,[Cd,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Nd,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerNow",onClick:t[0]||(t[0]=function(t){return e.createContainer()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewContainerNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"container".concat(t.idcontainer),class:"containers",key:t.idcontainer},[Object(r["createElementVNode"])("td",{class:"index",title:"".concat(e.translate("TagManager_Context"),": ")+e.contexts[t.context]},Object(r["toDisplayString"])(t.idcontainer),9,Sd),Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,wd),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,kd),Object(r["createElementVNode"])("td",Md,[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.created_date_pretty),1)]),Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-configure",href:"?module=TagManager&action="+e.containerDefaultAction+"&idContainer="+t.idcontainer+"&idSite="+t.idsite+"&period=day&date=yesterday",title:e.translate("TagManager_ConfigureX",e.translate("TagManager_Container"))},null,8,_d),Object(r["createElementVNode"])("a",{class:"table-action installCode icon-embed",onClick:function(n){return e.installCode(t.idcontainer)},title:e.translate("TagManager_InstallCode")},null,8,Dd),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editContainer(t.idcontainer)},title:e.translate("TagManager_EditX",e.translate("TagManager_Container"))},null,8,Ad),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteContainer(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Container"))},null,8,xd),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Container"))},null,8,Bd),[[r["vShow"],e.canCopyContainer]])],2)],8,Ed)})),128))])],512),[[c]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ld,[Object(r["createElementVNode"])("a",{class:"createNewContainer",value:"",onClick:t[1]||(t[1]=function(t){return e.createContainer()})},[Ud,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewContainer")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title"]),Object(r["createElementVNode"])("div",Pd,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteContainerConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Id),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Fd)],512)])}function Gd(e){return zd(e)||qd(e)||Rd(e)||$d()}function $d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Rd(e,t){if(e){if("string"===typeof e)return Wd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wd(e,t):void 0}}function qd(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function zd(e){if(Array.isArray(e))return Wd(e)}function Wd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.created_date?-1:0})),e},getManageContainersIntro:function(){var e=Object(u["externalLink"])("https://matomo.org/guide/tag-manager/getting-started-with-tag-manager/");return Object(u["translate"])("TagManager_ManageContainersIntro",e,"")},canCopyContainer:function(){return this.isSuperUser},getActionClasses:function(){var e=this.canCopyContainer?" hasCopyAction":"";return"action".concat(e)}},methods:{createContainer:function(){this.editContainer("0")},editContainer:function(e){u["MatomoUrl"].updateHash(Object.assign(Object.assign({},u["MatomoUrl"].hashParsed.value),{},{idContainer:e}))},installCode:function(e){Kd.showInstallCode(e)},deleteContainer:function(e){function t(){ud.deleteContainer(e.idcontainer).then((function(){ud.reload()}))}u["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteContainer,{yes:t})},truncateText:function(e,t){return e.length>t?"".concat(e.substr(0,t-3),"..."):e},openCopyDialog:function(e){var t=u["MatomoUrl"].stringify({module:"TagManager",action:"copyContainerDialog",idSite:e.idsite,idContainer:e.idcontainer});window.Piwik_Popover.createPopupAndLoadUrl(t,"","mtmCopyContainer")}}});Jd.render=Hd;var Yd=Jd,Zd={class:"manageContainer"};function Qd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContainerList"),c=Object(r["resolveComponent"])("ContainerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Zd,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"is-super-user":e.isSuperUser},null,8,["is-super-user"])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer},null,8,["id-container"])],512),[[r["vShow"],e.editMode]])])}var eu=Object(r["defineComponent"])({props:{isSuperUser:{type:Boolean,required:!0}},components:{ContainerList:Yd,ContainerEdit:md},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idContainer}),(function(t){e.onIdContainerParamChange(t)})),u["NotificationsStore"].remove("containertagmanagement"),this.onIdContainerParamChange(u["MatomoUrl"].hashParsed.value.idContainer)},computed:{idContainer:function(){var e=u["MatomoUrl"].hashParsed.value.idContainer;return this.isAddAllowed||""!==e?e:null},editMode:function(){return!!this.idContainer}},methods:{onIdContainerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVersion",t),this.isAddAllowed=!!t.isAllowed}}}});eu.render=Qd;var tu=eu,nu={class:"containerDashboard"},au={key:0},iu={class:"dashboardCreationDate"},ru={key:0},ou=Object(r["createElementVNode"])("br",null,null,-1),lu=["innerHTML"],cu={class:"row",style:{"margin-left":"-0.75rem"}},su={class:"col m6 s12"},du={key:0},uu=["href","title"],gu={key:0},bu=Object(r["createElementVNode"])("hr",null,null,-1),mu=["href"],pu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),hu=["href"],fu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),vu={class:"col m6 s12"},ju={key:0},Ou=["href","title"],Tu=Object(r["createElementVNode"])("hr",null,null,-1),yu=["href"],Vu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Cu=["href"],Nu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Eu={class:"row",style:{"margin-left":"-0.75rem"}},Su={class:"col m6 s12"},wu=["href","title"],ku={key:0},Mu=Object(r["createElementVNode"])("hr",null,null,-1),_u=["href"],Du=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Au=["href"],xu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Bu={class:"col m6 s12"},Lu=["title","href"],Uu={key:0},Pu=Object(r["createElementVNode"])("br",null,null,-1),Iu=["title"],Fu={key:0},Hu=Object(r["createElementVNode"])("hr",null,null,-1),Gu=["href"],$u=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Ru=["href"],qu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1);function zu(e,t,n,a,i,o){var l,c,s=Object(r["resolveComponent"])("ActivityIndicator"),d=Object(r["resolveComponent"])("EnrichedHeadline"),u=Object(r["resolveComponent"])("ContentBlock"),g=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",nu,[Object(r["createVNode"])(s,{loading:e.isLoading},null,8,["loading"]),e.isLoading?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",au,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(d,{"feature-name":"Tag Manager","inline-help":e.dashboardHelpText},{default:Object(r["withCtx"])((function(){var t;return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_ContainerX",null===(t=e.container)||void 0===t?void 0:t.name)),1)]})),_:1},8,["inline-help"])]),Object(r["createElementVNode"])("p",iu,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.containerMetaInformation)+" ",1),null!==(l=e.containerVersion)&&void 0!==l&&l.description?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ru,[ou,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_Description"))+": "+Object(r["toDisplayString"])(null===(c=e.containerVersion)||void 0===c?void 0:c.description),1)])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.containerDashboardDescription)},null,8,lu)],512),[[g]]),Object(r["createElementVNode"])("div",cu,[Object(r["createElementVNode"])("div",su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.tagCount," ").concat(e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.tagCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",du,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainerVersionTags,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTags",{idTag:t.idtag}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,uu),n!==e.sortedContainerVersionTags.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",gu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))])):Object(r["createCommentVNode"])("",!0)]),bu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags")},[pu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTags")),1)],8,mu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags",{idTag:0})},[fu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)],8,hu)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",vu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.triggerCount," ").concat(e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.triggerCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ju,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTriggers",{idTrigger:t.idtrigger}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,Ou),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,", ",512),[[r["vShow"],n!==e.sortedTriggers.length-1]])])})),128))])):Object(r["createCommentVNode"])("",!0)]),Tu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers")},[Vu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTriggers")),1)],8,yu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers",{idTrigger:0})},[Nu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)],8,Cu)]})),_:1},8,["content-title","help-text"])])]),Object(r["createElementVNode"])("div",Eu,[Object(r["createElementVNode"])("div",Su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.variableCount," ").concat(e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageVariables",{idVariable:t.idvariable}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,wu),n!==e.sortedVariables.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ku,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.variableCount]])]),Mu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables")},[Du,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVariables")),1)],8,_u),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables",{idVariable:0})},[xu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)],8,Au)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",Bu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.versionCount," ").concat(e.translate("TagManager_Versions")),"help-text":e.versionsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_LastVersions"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.lastVersions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{title:e.lastVersionLinkTitle(t),href:e.linkTo("manageVersions",{idContainerVersion:t.idcontainerversion})},Object(r["toDisplayString"])(t.name),9,Lu),n!==e.lastVersions.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Uu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.lastVersions.length]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Pu,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_Environments"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.container.releases,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("span",{title:e.releaseTooltip(t)},Object(r["toDisplayString"])(e.ucfirst(t.environment)),9,Iu),n!==e.container.releases.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Fu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.container.releases.length]])]),Hu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions")},[$u,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVersions")),1)],8,Gu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions",{idContainerVersion:0})},[qu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVersion")),1)],8,Ru)]})),_:1},8,["content-title","help-text"])])])]))])}function Wu(e){e.sort((function(e,t){return e.namet.name?1:0}))}var Xu=Object(r["defineComponent"])({props:{idContainer:String,dashboardHelpText:String,tagsHelpText:String,triggersHelpText:String,variablesHelpText:String,versionsHelpText:String},components:{ActivityIndicator:u["ActivityIndicator"],EnrichedHeadline:u["EnrichedHeadline"],ContentBlock:u["ContentBlock"]},directives:{ContentIntro:u["ContentIntro"]},data:function(){return{container:null,containerVersion:null,isLoading:!1}},created:function(){var e=this;Qs.init(),this.isLoading=!0;var t=u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer}).then((function(t){e.container=t})),n=u["AjaxHelper"].fetch({method:"TagManager.exportContainerVersion",idContainer:this.idContainer}).then((function(t){e.containerVersion=t}));Promise.all([t,n]).finally((function(){e.isLoading=!1}))},methods:{linkTo:function(e,t){var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e}));return t&&(n+="#?".concat(u["MatomoUrl"].stringify(t))),"?".concat(n)},lastVersionLinkTitle:function(e){return"Created on ".concat(e.created_date_pretty)+", description: '".concat(e.description,"'")},releaseTooltip:function(e){var t=Object(u["translate"])("TagManager_ReleaseInfo",e.release_login,e.release_date_pretty),n=Object(u["translate"])("TagManager_ReleaseVersionInfo",e.version_name);return"".concat(t," ").concat(n)},ucfirst:function(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}},computed:{lastVersions:function(){var e,t;return null!==(e=this.container)&&void 0!==e&&null!==(t=e.versions)&&void 0!==t&&t.length?this.container.versions.slice(0,5):[]},contexts:function(){var e={};return Qs.contexts.value.forEach((function(t){var n=t.id,a=t.name;e[n]=a})),e},containerMetaInformation:function(){var e;return Object(u["translate"])("TagManager_ContainerIdInformation",(null===(e=this.containerVersion)||void 0===e?void 0:e.idcontainer)||"")},containerDashboardDescription:function(){return Object(u["translate"])("TagManager_ContainerDashboardDescription",'',"")},sortedContainerVersionTags:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.tags)||[];return Wu(t),t},sortedTriggers:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.triggers)||[];return Wu(t),t},sortedVariables:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.variables)||[];return Wu(t),t},tagCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.tags.length},triggerCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.triggers.length},versionCount:function(){var e;return null===(e=this.container)||void 0===e?void 0:e.versions.length},variableCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.variables.length}}});Xu.render=zu;var Ku=Xu,Ju=["title"],Yu={class:"title"},Zu=Object(r["createElementVNode"])("span",{class:"icon icon-chevron-down"}," ",-1),Qu={class:"dropdown positionInViewport"},eg={class:"custom_select_container"},tg={class:"custom_select_ul_list"},ng=["title"],ag=["href"];function ig(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ActivityIndicator"),c=Object(r["resolveDirective"])("focus-anywhere-but-here");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])(["tagContainerSelector piwikSelector borderedControl",{expanded:e.showContainerList}]),onClick:t[1]||(t[1]=function(t){e.fetchContainers(),e.showContainerList=!e.showContainerList}),title:e.translate("TagManager_ChooseContainer")},[Object(r["createElementVNode"])("a",Yu,[Zu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.truncateText(e.actualContainerName,50)),1)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Qu,[Object(r["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(r["createElementVNode"])("div",eg,[Object(r["createElementVNode"])("ul",tg,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("a",{tabindex:"-1",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(){}),["prevent","stop"]))},Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound")),1)],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{title:"".concat(t.name," (").concat(t.idcontainer,")"),key:t.idcontainer},[Object(r["createElementVNode"])("a",{href:e.linkTo(t.idcontainer)},Object(r["toDisplayString"])(t.name)+" ("+Object(r["toDisplayString"])(t.idcontainer)+") ",9,ag)],8,ng)})),128))])])],512),[[r["vShow"],e.showContainerList]])],10,Ju)),[[c,{blur:e.onBlur}]])}var rg=window,og=rg.tagManagerHelper,lg=Object(r["defineComponent"])({props:{containerName:String},components:{ActivityIndicator:u["ActivityIndicator"]},directives:{FocusAnywhereButHere:u["FocusAnywhereButHere"]},data:function(){return{containers:[],isLoading:!1,showContainerList:!1}},created:function(){setTimeout((function(){window.initTopControls()}))},methods:{fetchContainers:function(){var e=this;this.isLoading=!0,this.containers=[],u["AjaxHelper"].fetch({method:"TagManager.getContainers"}).then((function(t){e.containers=t})).finally((function(){e.isLoading=!1}))},linkTo:function(e){var t=u["MatomoUrl"].urlParsed.value.action;t&&"manageContainers"!==t||(t=this.hasWriteAccess?"dashboard":"manageTags");var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{idContainer:e,action:t}));return"".concat(window.location.pathname,"?").concat(n)},onBlur:function(){this.showContainerList=!1},truncateText:function(e,t){return og.truncateText(e,t)}},computed:{actualContainerName:function(){return this.containerName?Object(u["translate"])("TagManager_ContainerX",this.containerName):Object(u["translate"])("TagManager_ChooseContainer")},hasWriteAccess:function(){return u["Matomo"].hasUserCapability("tagmanager_write")}}});lg.render=ig;var cg=lg,sg={style:{"margin-left":"-0.75rem"}},dg=Object(r["createElementVNode"])("br",null,null,-1),ug=["href"],gg=["textContent"],bg={style:{"margin-top":"1rem"}},mg=["innerHTML"],pg=Object(r["createElementVNode"])("br",null,null,-1),hg=["href"],fg={class:"environment"},vg={class:"name"},jg={class:"name"},Og={class:"released_by"},Tg={class:"released_on"},yg={key:0},Vg={colspan:"7"},Cg={class:"loadingPiwik"},Ng=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Eg={key:1},Sg={colspan:"7"},wg={class:"environment"},kg={class:"name"},Mg={class:"revision"},_g={class:"released_by"},Dg={class:"released_on"},Ag={class:"date"};function xg(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveDirective"])("copy-to-clipboard"),u=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createBlock"])(s,{class:"manageInstallTagCode",feature:"Tag Manager","content-title":"Install Code"},{default:Object(r["withCtx"])((function(){var n,a;return[Object(r["createElementVNode"])("div",sg,[Object(r["createVNode"])(l,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.environment=t,e.fetchInstallInstructions(e.environment)}),options:e.environments,title:e.translate("TagManager_Environment")},null,8,["model-value","options","title"])]),Object(r["createVNode"])(c,{loading:e.isLoading},null,8,["loading"]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n},[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),dg,t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,ug)):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",null,[t.embedCode?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("pre",{key:0,textContent:Object(r["toDisplayString"])(t.embedCode)},null,8,gg)),[[d,{}]]):Object(r["createCommentVNode"])("",!0)])])})),128)),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_InstallCodePublishEnvironmentNote","preview"))+" "+Object(r["toDisplayString"])(e.translate("TagManager_ConfigureEnvironmentsSuperUser")),1),Object(r["createElementVNode"])("p",bg,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_InstallCodeDataLayerNote","",""))},null,8,mg),pg,Object(r["createElementVNode"])("a",{target:"_blank",href:e.externalRawLink("https://matomo.org/faq/tag-manager/data-layer-in-matomo-tag-manager/")},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,hg)]),Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_ReleasesOverview")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fg,Object(r["toDisplayString"])(e.translate("TagManager_Environment")),1),Object(r["createElementVNode"])("th",vg,Object(r["toDisplayString"])(e.translate("TagManager_VersionName")),1),Object(r["createElementVNode"])("th",jg,Object(r["toDisplayString"])(e.translate("TagManager_VersionRevision")),1),Object(r["createElementVNode"])("th",Og,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedBy")),1),Object(r["createElementVNode"])("th",Tg,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedOn")),1)])]),Object(r["createElementVNode"])("tbody",null,[e.isLoading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",yg,[Object(r["createElementVNode"])("td",Vg,[Object(r["createElementVNode"])("span",Cg,[Ng,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])])):Object(r["createCommentVNode"])("",!0),e.isLoading||0!==(null===(n=e.container)||void 0===n||null===(a=n.releases)||void 0===a?void 0:a.length)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Eg,[Object(r["createElementVNode"])("td",Sg,Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFound")),1)])),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedReleases,(function(t){var n,a;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t.idcontainerrelease},[Object(r["createElementVNode"])("td",wg,Object(r["toDisplayString"])(e.ucfirst(t.environment)),1),Object(r["createElementVNode"])("td",kg,Object(r["toDisplayString"])(null===(n=e.releaseVersions[t.idcontainerrelease])||void 0===n?void 0:n.name),1),Object(r["createElementVNode"])("td",Mg,Object(r["toDisplayString"])(null===(a=e.releaseVersions[t.idcontainerrelease])||void 0===a?void 0:a.revision),1),Object(r["createElementVNode"])("td",_g,Object(r["toDisplayString"])(t.release_login),1),Object(r["createElementVNode"])("td",Dg,[Object(r["createElementVNode"])("span",Ag,Object(r["toDisplayString"])(t.release_date_pretty),1)])])})),128))])],512),[[u]])]})),_:1})}function Bg(e){return Pg(e)||Ug(e)||Hg(e)||Lg()}function Lg(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ug(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Pg(e){if(Array.isArray(e))return Gg(e)}function Ig(e,t){return Rg(e)||$g(e,t)||Hg(e,t)||Fg()}function Fg(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hg(e,t){if(e){if("string"===typeof e)return Gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gg(e,t):void 0}}function Gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.release_date?-1:t.index-e.index})),t}}});Wg.render=xg;var Xg=Wg,Kg={class:"tagManagerTrackingCode"},Jg={key:0},Yg={class:"trackingCodeAdvancedOptions"},Zg={class:"advance-option"},Qg=Object(r["createElementVNode"])("span",{class:"icon-chevron-down"},null,-1),eb=Object(r["createElementVNode"])("span",{class:"icon-chevron-up"},null,-1),tb={id:"mtm-advanced-options"},nb=["innerHTML"],ab={key:1,class:"row"},ib={class:"col s12 m4 "},rb={class:"form-group row"},ob={class:"col s12 input-field"},lb={for:"tagManagerTrackingCodeSite",class:"siteSelectorLabel"},cb={class:"sites_autocomplete"},sb={class:"col s12 m4"},db={class:"col s12 m4"},ub=["innerHTML"],gb={key:1,class:"alert alert-info"},bb={href:""},mb={key:0},pb=["href"],hb=Object(r["createTextVNode"])(". "),fb=["innerHTML"],vb=["textContent"],jb=["innerHTML"],Ob={key:1};function Tb(e,t,n,a,i,o){var l=this,c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("SiteSelector"),d=Object(r["resolveComponent"])("Field"),u=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Kg,[e.showContainerRow?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Jg,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_OptionallyCustomiseContainer"))+" ",1),Object(r["createElementVNode"])("div",Yg,[Object(r["createElementVNode"])("div",Zg,[Object(r["createElementVNode"])("span",null,[e.isAdvancedDisplayed?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,href:"javascript:;",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!0}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_ShowAdvancedOptions"))+" ",1),Qg])),e.isAdvancedDisplayed?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:1,href:"javascript:;",onClick:t[1]||(t[1]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!1}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_HideAdvancedOptions"))+" ",1),eb])):Object(r["createCommentVNode"])("",!0)])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",tb,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.getAdvancedStepText)},null,8,nb),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,loading:!0},null,512)),[[r["vShow"],e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ab,[Object(r["createElementVNode"])("div",ib,[Object(r["createElementVNode"])("div",rb,[Object(r["createElementVNode"])("div",ob,[Object(r["createElementVNode"])("label",lb,Object(r["toDisplayString"])(e.translate("General_Website")),1),Object(r["createElementVNode"])("div",cb,[Object(r["createVNode"])(s,{id:"tagManagerTrackingCodeSite",modelValue:e.site,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.site=t}),"show-all-sites-item":!1,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(r["createElementVNode"])("div",sb,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"containers","model-value":e.idContainer,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.idContainer=t,e.onContainerChange()}),options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container")},null,8,["model-value","options","disabled","title"])])]),Object(r["createElementVNode"])("div",db,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.environment=t,l.$emit("fetchInstallInstructions")}),options:e.environments,disabled:e.environments.length<=1,"full-width":!0,title:e.translate("TagManager_Environment")},null,8,["model-value","options","disabled","title"])])])],512)),[[r["vShow"],!e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.getAdvancedStepInfo)},null,8,ub)):Object(r["createCommentVNode"])("",!0)])],512),[[r["vShow"],e.isAdvancedDisplayed]])])])):Object(r["createCommentVNode"])("",!0),e.idContainer&&e.noReleaseFound?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFoundForContainer"))+" ",1),Object(r["createElementVNode"])("a",bb,Object(r["toDisplayString"])(e.translate("TagManager_PublishVersionToEnvironmentToViewEmbedCode")),1)])):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:n},[e.showDescription?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",mb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,pb)):Object(r["createCommentVNode"])("",!0),hb])):Object(r["createCommentVNode"])("",!0),e.showPlainMtmSteps?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.getMtmStep3)},null,8,fb)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,vb),[[u,{}]])])],64)})),128)),e.showBottom&&!e.noReleaseFound&&e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:2},[e.showTestSection?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Ob,[(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e.testComponent),{site:e.site},null,8,["site"]))])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.getCongratulationsText)},null,8,jb))],64)):Object(r["createCommentVNode"])("",!0)])}function yb(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}var Vb=Object(r["defineComponent"])({props:{showContainerRow:Boolean,showBottom:Boolean,showDescription:Boolean,showPlainMtmSteps:Boolean,showTestSection:Boolean,showAdvancedOptions:{required:!1,type:Boolean,default:!1}},components:{ActivityIndicator:u["ActivityIndicator"],SiteSelector:u["SiteSelector"],Field:g["Field"]},emits:["fetchInstallInstructions"],directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{containerVariables:[],isLoading:!1,idContainer:"",environment:"",environments:[],environmentNameMap:{},containerMap:{},containerOptions:[],site:{id:u["Matomo"].idSite,name:u["Matomo"].helper.htmlDecode(u["Matomo"].siteName)},matomoConfigs:[],releases:[],installInstructions:[],noReleaseFound:!1,isAdvancedDisplayed:!1}},created:function(){var e=this;u["AjaxHelper"].fetch({method:"TagManager.getAvailableEnvironments",filter_limit:"-1"}).then((function(t){var n;n=Array.isArray(t)?t:Object.values(t),e.environmentNameMap=Object.fromEntries(n.map((function(e){var t=e.id,n=e.name;return[t,n]})))})),this.onSiteChange(),this.isAdvancedDisplayed=this.showAdvancedOptions},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;this.installInstructions=[],this.containerOptions=[],this.containerMap={},this.environments=[],this.matomoConfigs=[],this.idContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&(this.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idContainer="",t.isAdvancedDisplayed=!0,void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idContainer||(t.idContainer=e.idcontainer),t.containerMap[e.idcontainer]=e,t.containerOptions.push({key:e.idcontainer,value:e.name})})),t.onContainerChange()})).finally((function(){t.isLoading=!1})))},onContainerChange:function(){var e=this;if(this.noReleaseFound=!1,this.idContainer){this.installInstructions=[];var t=this.containerMap[this.idContainer],n=t.draft.idcontainerversion;this.environment="",this.environments=[];var a=t.releases||[];a.find((function(e){return"live"===e.environment}))&&(this.environment="live"),a.forEach((function(t){if("preview"!==t.environment){e.environment||(e.environment=t.environment);var n=yb(t.environment);t.environment in e.environmentNameMap&&(n=e.environmentNameMap[t.environment]),e.environments.push({key:t.environment,value:n})}})),this.environments.length||(this.noReleaseFound=!0,this.environments.push({key:"",value:this.translate("TagManager_NoReleasesFound")})),this.$emit("fetchInstallInstructions"),this.fetchVariables(n)}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n})),r="".concat(window.location.pathname,"?").concat(i);return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),r},fetchVariables:function(e){var t,n=this;this.matomoConfigs=[],this.idContainer&&null!==(t=this.site)&&void 0!==t&&t.id&&e&&u["AjaxHelper"].fetch({method:"TagManager.getContainerVariables",filter_limit:"-1",idContainer:this.idContainer,idContainerVersion:e,idSite:this.site.id}).then((function(e){n.matomoConfigs=e.filter((function(e){return"MatomoConfiguration"===e.type}))})).finally((function(){n.isLoading=!1}))}},computed:{getLearnMoreLink:function(){return Object(u["translate"])("TagManager_CustomHtmlTagHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")},getMtmStep3:function(){return Object(u["translate"])("TagManager_CopyCodePasteInHeader","</head>")},getCongratulationsText:function(){return Object(u["translate"])("TagManager_SiteWithoutDataReactFollowStepCompleted","","")},testComponent:function(){return this.showTestSection?Object(u["useExternalPluginComponent"])("JsTrackerInstallCheck","JsTrackerInstallCheck"):""},getAdvancedStepText:function(){var e,t=Object(u["translate"])("TagManager_SelectContainerForWebsite","","");if(this.idContainer)return t;var n=this.linkTo("manageContainers",String(null===(e=this.site)||void 0===e?void 0:e.id),""),a=Object(u["translate"])("TagManager_ManageContainersLink",''),"");return"".concat(t," ").concat(a)},getAdvancedStepInfo:function(){var e=this.site&&this.site.id?this.site.id:"",t=this.linkTo("dashboard",e,this.idContainer,[]);return Object(u["translate"])("TagManager_CustomiseContainer",''),"",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")}}});Vb.render=Tb;var Cb=Vb,Nb=Object(r["createElementVNode"])("br",null,null,-1),Eb={class:"followStepsHeading"},Sb={style:{"list-style":"inside decimal"}};function wb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon");return Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])("getTrackingMethodsForSite"===e.currentAction?"div":"ContentBlock"),{anchor:"tagmanager","content-title":e.translate("TagManager_MatomoTagManager")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_MtmTrackingCodeIntro")),1),Nb,Object(r["createElementVNode"])("p",Eb,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(r["createElementVNode"])("ol",Sb,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!0,showDescription:!1,showPlainMtmSteps:!0,showAdvancedOptions:"trackingCodeGenerator"===e.currentAction,showTestSection:"getTrackingMethodsForSite"===e.currentAction&&e.isJsTrackerInstallCheckAvailable,onFetchInstallInstructions:e.fetchInstallInstructions,ref:"trackingCodeCommon"},null,8,["show-container-row","showAdvancedOptions","showTestSection","onFetchInstallInstructions"])])]})),_:1},8,["content-title"])}var kb=Object(r["defineComponent"])({props:{currentAction:String,showContainerRow:Boolean,isJsTrackerInstallCheckAvailable:Boolean},components:{ContentBlock:u["ContentBlock"],TrackingCodeCommon:Cb},methods:{fetchInstallInstructions:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;a.installInstructions=[],null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id&&null!==a&&void 0!==a&&a.environment&&(a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id}).then((function(e){a.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1})))}}});kb.render=wb;var Mb=kb,_b={class:"list-style-decimal"},Db={ref:"step1"},Ab=["innerHTML"],xb=["innerHTML"],Bb=["textContent"],Lb=["innerHTML"],Ub=["textContent"],Pb=["innerHTML"],Ib=["innerHTML"],Fb=["innerHTML"],Hb=["textContent"],Gb={style:{"list-style":"lower-alpha","list-style-position":"inside"}},$b=["innerHTML"],Rb=["innerHTML"],qb=["innerHTML"],zb=["textContent"],Wb=["textContent"],Xb=["innerHTML"],Kb=["textContent"],Jb=["innerHTML"],Yb=["innerHTML"],Zb=["textContent"];function Qb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon"),c=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("ol",_b,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",Db,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!1,showDescription:!1,onFetchInstallInstructions:e.fetchInstallInstructionsSPA,ref:"trackingCodeCommon"},null,8,["show-container-row","onFetchInstallInstructions"])],512),[[r["vShow"],e.step1HasContent]]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep2)},null,8,Ab),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep3)},null,8,xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Bb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep5)},null,8,Lb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Ub),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep7)},null,8,Pb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep8)},null,8,Ib),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep9)},null,8,Fb),Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("span",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep10)},null,8,Hb),Object(r["createElementVNode"])("ol",Gb,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10a)},null,8,$b),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10b)},null,8,Rb)])]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep11)},null,8,qb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("General_Update"))},null,8,zb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep13)},null,8,Wb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep14)},null,8,Xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep15)},null,8,Kb),Object(r["createElementVNode"])("li",null,["react"===e.jsFramework?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.fetchFollowStep16React)},null,8,Jb)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:1,innerHTML:e.$sanitize(e.fetchFollowStep16SPA)},null,8,Yb)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:t},[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(e.embedCode),ref:"codeblock"},null,8,Zb),[[c,{}]])])})),128))])])}var em=Object(r["defineComponent"])({props:{showContainerRow:Boolean,jsFramework:String},components:{TrackingCodeCommon:Cb},directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{setupStep1:"",setupStep2:"",setupStep7:"",installInstructions:[]}},methods:{fetchInstallInstructionsSPA:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;if(this.installInstructions=[],null!==a&&void 0!==a&&a.idContainer&&null!==a&&void 0!==a&&a.environment&&null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id){var i=this.linkTo("manageContainers",a.site.id,a.idContainer);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"");var o=this.linkTo("manageTriggers",a.site.id,a.idContainer);this.setupStep2=Object(u["translate"])("TagManager_SPAFollowStep2",''),"");var l=this.linkTo("manageTags",a.site.id,a.idContainer);this.setupStep7=Object(u["translate"])("TagManager_SPAFollowStep7",''),""),a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id,jsFramework:this.jsFramework}).then((function(e){n.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1}))}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(i+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(i)},fetchClickX:function(e){return Object(u["translate"])("General_ClickX",Object(u["translate"])(e))}},computed:{step1HasContent:function(){var e=this.$refs.step1;return e&&""!==e.textContent},fetchFollowStep3:function(){return Object(u["translate"])("TagManager_SPAFollowStep3","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-trigger"),"")},fetchFollowStep5:function(){return Object(u["translate"])("TagManager_SPAFollowStep5","".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),Object(u["translate"])("TagManager_CategoryUserEngagement"))},fetchFollowStep8:function(){return Object(u["translate"])("TagManager_SPAFollowStep8","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),"".concat(Object(u["translate"])("TagManager_MatomoTagName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-tag"),"")},fetchFollowStep9:function(){return Object(u["translate"])("TagManager_SPAFollowStep9",Object(u["translate"])("TagManager_ConfigureWhatTagDoes"),Object(u["translate"])("TagManager_CustomTitle"),"","")},fetchFollowStep10:function(){return Object(u["translate"])("TagManager_SPAFollowStep10",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10a:function(){return Object(u["translate"])("TagManager_SPAFollowStep10a","","",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10b:function(){return Object(u["translate"])("TagManager_SPAFollowStep10b",Object(u["translate"])("TagManager_CustomUrl"),"","")},fetchFollowStep11:function(){return Object(u["translate"])("TagManager_SPAFollowStep11",Object(u["translate"])("TagManager_ConfigureWhenTagDoes"),Object(u["translate"])("TagManager_FireTriggerTitle"),"".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),"".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""))},fetchFollowStep13:function(){return Object(u["translate"])("TagManager_SPAFollowStep13",Object(u["translate"])("TagManager_Publish"))},fetchFollowStep14:function(){return Object(u["translate"])("TagManager_SPAFollowStep14",Object(u["translate"])("TagManager_VersionName"),"","")},fetchFollowStep15:function(){return Object(u["translate"])("TagManager_SPAFollowStep15",Object(u["translate"])("TagManager_CreateVersionAndPublishRelease"))},fetchFollowStep16SPA:function(){return Object(u["translate"])("TagManager_SPAFollowStep16","</head>",Object(u["externalLink"])("https://developer.matomo.org/guides/tagmanager/embedding"),"")},fetchFollowStep16React:function(){return Object(u["translate"])("TagManager_ReactFollowStep16","","","App.js","React.useEffect","Hello World","React.js")}}});em.render=Qb;var tm,nm,am=em,im={class:"nav-wrapper"},rm={class:"pull-right"},om=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-close"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-close"})],-1),lm=[om],cm={class:"pull-right"},sm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("defs",null,[Object(r["createElementVNode"])("symbol",{id:"tm-icon-checkmark",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M27 4l-15 15-7-7-5 5 12 12 20-20z"})])])],-1),dm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("symbol",{id:"tm-icon-close",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M31.33 0.67c0.893 0.893 0.893 2.34 0 3.232l-27.427 27.427c-0.893 0.893-2.34\n 0.893-3.232 0s-0.893-2.34 0-3.232l27.427-27.427c0.892-0.893 2.34-0.893 3.232 0z"}),Object(r["createElementVNode"])("path",{d:"M0.67 0.67c0.893-0.893 2.34-0.893 3.232 0l27.427 27.427c0.893 0.892 0.893\n 2.34 0 3.232s-2.34 0.892-3.232 0l-27.427-27.427c-0.893-0.893-0.893-2.34 0-3.232z"})])],-1),um={class:"page",style:{clear:"both"}},gm={key:0,id:"secondNavBar",class:"Menu--dashboard z-depth-1"},bm={class:"navbar",role:"menu",style:{padding:"0"}},mm={class:"menuTab",role:"menuitem"},pm={class:"item",style:{"font-weight":"normal"}},hm=Object(r["createTextVNode"])(" Events "),fm={key:0},vm=Object(r["createElementVNode"])("br",null,null,-1),jm=Object(r["createElementVNode"])("br",null,null,-1),Om=Object(r["createElementVNode"])("label",{for:"onlyfiredTags",class:"lbl-onlyfiredTags"},"Only fired tags",-1),Tm={key:0,style:{padding:"0 0 1rem 1.2rem"}},ym=["onClick","title"],Vm={title:"This tag was fired"},Cm=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-checkmark"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-checkmark"})],-1),Nm=[Cm],Em={class:"pageWrap"},Sm={class:"home",id:"content"},wm=Object(r["createElementVNode"])("h3",null,"Fired Tags",-1),km={class:"entityTable"},Mm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Action"),Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Fired count")])],-1),_m={key:0},Dm=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Am=[Dm],xm=Object(r["createElementVNode"])("h3",{style:{"margin-top":"30px"}},"Not Yet Fired Tags",-1),Bm={class:"entityTable"},Lm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Um=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Pm=[Um],Im=Object(r["createElementVNode"])("h3",null,"Triggers",-1),Fm={class:"entityTable"},Hm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Gm={key:0},$m=Object(r["createElementVNode"])("td",{colspan:"4"},"No trigger",-1),Rm=[$m],qm={key:1},zm=Object(r["createElementVNode"])("h3",null,"Pushed data by this event",-1),Wm={class:"entityTable"},Xm={style:{"word-break":"break-all"}},Km=Object(r["createElementVNode"])("br",null,null,-1),Jm=Object(r["createElementVNode"])("h3",null,"Content after this event",-1),Ym={class:"entityTable"},Zm={style:{"word-break":"break-all"}},Qm={class:"entityTable"},ep=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Value")])],-1),tp={key:0},np=Object(r["createElementVNode"])("td",{colspan:"3"},"No variables",-1),ap=[np],ip={style:{"word-break":"break-all"}},rp={class:"entityTable"},op=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Time"),Object(r["createElementVNode"])("th",null,"Message")])],-1),lp={style:{"word-break":"break-all"}},cp=Object(r["createElementVNode"])("br",null,null,-1);function sp(e,t,n,a,i,o){var l,c,s,d,u,g,b,m,p,h;return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("nav",null,[Object(r["createElementVNode"])("div",im,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,[Object(r["renderSlot"])(e.$slots,"logo")]),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"tags"===e.contentTab||!e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(t){return e.contentTab="tags"})},"Tags")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"triggers"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[1]||(t[1]=function(t){return e.contentTab="triggers"})},"Triggers")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"variables"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[2]||(t[2]=function(t){return e.contentTab="variables"})},"Variables")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"dataLayer"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[3]||(t[3]=function(t){return e.contentTab="dataLayer"})},"Data Layer")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"logs"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.contentTab="logs"})},"Logs")],2),Object(r["createElementVNode"])("li",rm,[Object(r["createElementVNode"])("a",{id:"mtmCloseDebug",onClick:t[5]||(t[5]=function(t){return e.mtmCloseDebugWindow()})},lm)]),Object(r["createElementVNode"])("li",cm,[Object(r["createElementVNode"])("a",{id:"mtmUpdateDebugPosition",onClick:t[6]||(t[6]=function(t){return e.mtmUpdateDebugPosition()})},Object(r["toDisplayString"])(e.positionText),1)])])])]),sm,dm,Object(r["createElementVNode"])("div",um,["logs"!==e.contentTab?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gm,[Object(r["createElementVNode"])("ul",bm,[Object(r["createElementVNode"])("li",mm,[Object(r["createElementVNode"])("span",pm,[hm,e.mtmEvents.length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",fm,[vm,jm,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{type:"checkbox",class:"onlyFiredTags-chk",name:"onlyfiredTags",id:"onlyfiredTags",value:"1","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.onlyfiredTags=t}),style:{"margin-right":"3.5px"}},null,512),[[r["vModelCheckbox"],e.onlyfiredTags]]),Om])):Object(r["createCommentVNode"])("",!0)])]),0===e.mtmEvents.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Tm,"No event executed")):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmEventsReversed,(function(t,n){var a,i;return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["menuTab",{active:n===e.selectedEventIndex}]),role:"menuitem",key:n},[(t.tags||[]).length||!e.onlyfiredTags?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,class:"item",onClick:function(n){return e.selectEvent(t.index0)},title:"Time: ".concat(t.time,". Trigger: ").concat(null===(a=t.metTrigger)||void 0===a?void 0:a.name)},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.index)+": "+Object(r["toDisplayString"])(t.name)+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Vm,Nm,512),[[r["vShow"],null===(i=t.tags)||void 0===i?void 0:i.length]])],8,ym)):Object(r["createCommentVNode"])("",!0)],2)})),128))])])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",Em,[Object(r["createElementVNode"])("div",Sm,[Object(r["withDirectives"])(Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.homeTabTitle),513),[[r["vShow"],"logs"!==e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[wm,Object(r["createElementVNode"])("table",km,[Mm,Object(r["createElementVNode"])("tbody",null,[null!==(l=e.selectedEvent)&&void 0!==l&&null!==(c=l.tags)&&void 0!==c&&c.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",_m,Am)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(s=e.selectedEvent)||void 0===s?void 0:s.tags)||[],(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.action),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.numExecuted),1)])})),128))])]),xm,Object(r["createElementVNode"])("table",Bm,[Lm,Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,Pm,512),[[r["vShow"],0===e.notFiredTags.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.notFiredTags,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1)])})),128))])])],512),[[r["vShow"],"tags"===e.contentTab||!e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Im,Object(r["createElementVNode"])("table",Fm,[Hm,Object(r["createElementVNode"])("tbody",null,[null!==(d=e.selectedEvent)&&void 0!==d&&d.metTrigger?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Gm,Rm)),null!==(u=e.selectedEvent)&&void 0!==u&&u.metTrigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",qm,[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.type),1)])):Object(r["createCommentVNode"])("",!0)])])],512),[[r["vShow"],"triggers"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[zm,Object(r["createElementVNode"])("table",Wm,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Xm,Object(r["toDisplayString"])(e.selectedEventData),1)])])]),Km,Jm,Object(r["createElementVNode"])("table",Ym,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Zm,Object(r["toDisplayString"])(e.selectedEventContainerDataLayer),1)])])])],512),[[r["vShow"],"dataLayer"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",Qm,[ep,Object(r["createElementVNode"])("tbody",null,[null!==(g=e.selectedEvent)&&void 0!==g&&null!==(b=g.container)&&void 0!==b&&null!==(m=b.variables)&&void 0!==m&&m.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",tp,ap)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(p=e.selectedEvent)||void 0===p||null===(h=p.container)||void 0===h?void 0:h.variables)||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.type),1),Object(r["createElementVNode"])("td",ip,Object(r["toDisplayString"])(e.stringifySelectedVariable(t)),1)])})),128))])])],512),[[r["vShow"],"variables"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",rp,[op,Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmLogs,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.time),1),Object(r["createElementVNode"])("td",lp,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.messages,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:t},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e),1),cp])})),128))])])})),128))])])],512),[[r["vShow"],"logs"===e.contentTab]])])])])])}function dp(e){return mp(e)||bp(e)||gp(e)||up()}function up(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gp(e,t){if(e){if("string"===typeof e)return pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pp(e,t):void 0}}function bp(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function mp(e){if(Array.isArray(e))return pp(e)}function pp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt||n.push.apply(n,dp(e.tags.map((function(e){return e.name}))))}));var a=[];return this.selectedEvent.container.tags.forEach((function(e){-1===n.indexOf(e.name)&&a.push(e)})),a},selectedEvent:function(){return this.mtmEvents[this.selectedEventIndex]},mtmEvents:function(){return window.mtmDbgData.mtmEvents},mtmEventsReversed:function(){var e=dp(this.mtmEvents);return e.reverse(),e},mtmLogs:function(){return window.mtmDbgData.mtmLogs},selectedEventData:function(){var e;return(null===(e=this.selectedEvent)||void 0===e?void 0:e.eventData)&&JSON.stringify(this.selectedEvent.eventData,Op())},selectedEventContainerDataLayer:function(){var e,t;return(null===(e=this.selectedEvent)||void 0===e||null===(t=e.container)||void 0===t?void 0:t.dataLayer)&&JSON.stringify(this.selectedEvent.container.dataLayer,Op())}}});Tp.render=sp;var yp=Tp,Vp={class:"copyMtmObjectDialog"},Cp=["innerHTML"];function Np(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveDirective"])("form");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vp,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.getCopyDialogTitle),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.getCopyDescription),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"site",name:"destinationSite",title:e.translate("TagManager_ChooseWebsite"),modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t})},null,8,["title","modelValue"]),"container"!==e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:0,uicontrol:"select",name:"idDestinationContainer",options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container"),modelValue:e.idDestinationContainer,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.idDestinationContainer=t})},null,8,["options","disabled","title","modelValue"])):Object(r["createCommentVNode"])("",!0),"container"===e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:1,class:"copyNote",innerHTML:e.$sanitize(e.getCopyContainerNote)},null,8,Cp)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("button",{class:"btn",onClick:t[2]||(t[2]=function(){return e.performCopy&&e.performCopy.apply(e,arguments)})},Object(r["toDisplayString"])(e.translate("General_Copy")),1)],512),[[c]])])}var Ep=Object(r["defineComponent"])({props:{defaultSite:{type:Object,required:!0},copyType:{type:String,required:!0},copyNonce:{type:String,required:!1,default:""},idToCopy:{type:[String,Number],required:!0},idSourceContainer:{type:String,required:!1,default:""},idContainerVersion:{type:Number,required:!1,default:0}},directives:{Form:g["Form"]},components:{Field:g["Field"]},data:function(){return{site:this.defaultSite,idDestinationContainer:"",containerOptions:[]}},created:function(){this.onSiteChange(),this.idDestinationContainer=this.idSourceContainer},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;"container"!==this.copyType.toLowerCase()&&(this.containerOptions=[],this.idDestinationContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idDestinationContainer="",void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idDestinationContainer||(t.idDestinationContainer=e.idcontainer),t.containerOptions.push({key:e.idcontainer,value:e.name})}))})))},performCopy:function(){var e,t=this,n={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":n.action="copyContainer",n.idContainer=this.idToCopy;break;case"tag":n.action="copyTag",n.idTag=this.idToCopy;break;case"trigger":n.action="copyTrigger",n.idTrigger=this.idToCopy;break;case"variable":n.action="copyVariable",n.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}this.idDestinationContainer&&(n.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(n.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(n.idContainerVersion=this.idContainerVersion),u["AjaxHelper"].fetch(n).then((function(e){if(!e||!e.isSuccess||!e.urlToNewCopy){var n=Object(u["translate"])("General_ErrorRequest","",""),a=u["NotificationsStore"].show({message:n,id:"CopyDialogResultNotification",context:"error",type:"transient"});return u["NotificationsStore"].scrollToNotification(a),void window.Piwik_Popover.close()}t.reloadEntityStore(),t.displaySuccessNotification(e.urlToNewCopy),window.Piwik_Popover.close()}))},reloadEntityStore:function(){switch(this.copyType.toLowerCase()){case"container":ud.reload();break;case"tag":mo.reload(this.idSourceContainer,this.idContainerVersion);break;case"trigger":ya.reload(this.idSourceContainer,this.idContainerVersion);break;case"variable":ft.reload(this.idSourceContainer,this.idContainerVersion);break;default:throw Error("Unrecognised copy object type.")}},displaySuccessNotification:function(e){var t="TagManager_CopyXSuccess",n="";switch(this.copyType.toLowerCase()){case"container":n="TagManager_ContainerLowercase";break;case"tag":n="TagManager_TagLowercase";break;case"trigger":n="TagManager_TriggerLowercase";break;case"variable":n="TagManager_VariableLowercase";break;default:throw Error("Unrecognised copy object type.")}var a=Object(u["translate"])(t,[''),Object(u["translate"])(n),""]),i=u["NotificationsStore"].show({message:a,id:"CopyDialogResultNotification",context:"success",type:"transient"});u["NotificationsStore"].scrollToNotification(i)}},computed:{getCopyDialogTitle:function(){var e="";switch(this.copyType.toLowerCase()){case"container":e=Object(u["translate"])("TagManager_Container");break;case"tag":e=Object(u["translate"])("TagManager_Tag");break;case"trigger":e=Object(u["translate"])("TagManager_Trigger");break;case"variable":e=Object(u["translate"])("TagManager_Variable");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyX",e)},getCopyDescription:function(){if("container"===this.copyType.toLowerCase())return Object(u["translate"])("TagManager_CopyContainerDescription");var e="";switch(this.copyType.toLowerCase()){case"tag":e=Object(u["translate"])("TagManager_TagLowercase");break;case"trigger":e=Object(u["translate"])("TagManager_TriggerLowercase");break;case"variable":e=Object(u["translate"])("TagManager_VariableLowercase");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyXDescription",e)},getCopyContainerNote:function(){return Object(u["translate"])("TagManager_CopyContainerNote","","")},getCopyUrl:function(){var e,t={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":t.action="copyContainer",t.idContainer=this.idToCopy;break;case"tag":t.action="copyTag",t.idTag=this.idToCopy;break;case"trigger":t.action="copyTrigger",t.idTrigger=this.idToCopy;break;case"variable":t.action="copyVariable",t.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}return this.idDestinationContainer&&(t.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(t.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(t.idContainerVersion=this.idContainerVersion),"?".concat(u["MatomoUrl"].stringify(t))}}});Ep.render=Np;var Sp=Ep; /*! * Matomo - free/libre analytics platform * diff --git a/vue/src/CopyDialog/CopyDialog.less b/vue/src/CopyDialog/CopyDialog.less index 3e0c29327..8d88cf301 100644 --- a/vue/src/CopyDialog/CopyDialog.less +++ b/vue/src/CopyDialog/CopyDialog.less @@ -12,7 +12,7 @@ div.copyMtmObjectDialog { } } -div.mtmCopyContainer, div.mtmCopyTag { +div.mtmCopyContainer, div.mtmCopyTag, div.mtmCopyTrigger, div.mtmCopyVariable { #Piwik_Popover { overflow: visible; } diff --git a/vue/src/CopyDialog/CopyDialog.vue b/vue/src/CopyDialog/CopyDialog.vue index 6bce38916..be33129a8 100644 --- a/vue/src/CopyDialog/CopyDialog.vue +++ b/vue/src/CopyDialog/CopyDialog.vue @@ -247,10 +247,10 @@ export default defineComponent({ TagsStore.reload(this.idSourceContainer, this.idContainerVersion); break; case 'trigger': - TriggersStore.fetchTriggers(this.idSourceContainer, this.idContainerVersion); + TriggersStore.reload(this.idSourceContainer, this.idContainerVersion); break; case 'variable': - VariablesStore.fetchVariables(this.idSourceContainer, this.idContainerVersion); + VariablesStore.reload(this.idSourceContainer, this.idContainerVersion); break; default: throw Error('Unrecognised copy object type.'); diff --git a/vue/src/Trigger/TriggerList.vue b/vue/src/Trigger/TriggerList.vue index 872617971..7dca02ce6 100644 --- a/vue/src/Trigger/TriggerList.vue +++ b/vue/src/Trigger/TriggerList.vue @@ -91,7 +91,7 @@ {{ trigger.updated_date_pretty }} + @@ -255,6 +264,20 @@ export default defineComponent({ truncateText(text: string, length: number) { return tagManagerHelper.truncateText(text, length); }, + hasPublishCapability() { + return Matomo.hasUserCapability('tagmanager_write') && Matomo.hasUserCapability('tagmanager_use_custom_templates'); + }, + openCopyDialog(trigger: Trigger) { + const url = MatomoUrl.stringify({ + module: 'TagManager', + action: 'copyTriggerDialog', + idSite: trigger.idsite, + idContainer: this.idContainer, + idTrigger: trigger.idtrigger, + idContainerVersion: this.idContainerVersion, + }); + window.Piwik_Popover.createPopupAndLoadUrl(url, '', 'mtmCopyTrigger'); + }, }, computed: { isLoading() { @@ -310,6 +333,10 @@ export default defineComponent({ actionTranslatedText(): string { return this.translate('TagManager_TriggersActionDescription'); }, + getActionClasses(): string { + const copyClass = this.hasPublishCapability() ? ' hasCopyAction' : ''; + return `action${copyClass}`; + }, }, }); From 540016ee11c64f986070df074de718b7c1f63050 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 27 Nov 2024 17:01:04 +1300 Subject: [PATCH 02/10] Updating screenshots after trigger change --- .../ContainerTrigger_confirm_delete_trigger_confirmed.png | 4 ++-- .../ContainerTrigger_confirm_delete_trigger_declined.png | 4 ++-- .../ContainerTrigger_create_advanced_verified.png | 4 ++-- .../ContainerTrigger_create_new_long_name.png | 4 ++-- .../ContainerTrigger_create_new_shown_in_list.png | 4 ++-- .../ContainerTrigger_edit_updated_back_to_list.png | 4 ++-- .../ContainerTrigger_trigger_search_custom_event_name.png | 4 ++-- .../ContainerTrigger_trigger_search_description.png | 4 ++-- .../ContainerTrigger_trigger_search_name.png | 4 ++-- .../ContainerTrigger_trigger_search_type.png | 4 ++-- .../ContainerTrigger_trigger_some_exist.png | 4 ++-- 11 files changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/UI/expected-screenshots/ContainerTrigger_confirm_delete_trigger_confirmed.png b/tests/UI/expected-screenshots/ContainerTrigger_confirm_delete_trigger_confirmed.png index 854bfe0f1..26d06bd5f 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_confirm_delete_trigger_confirmed.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_confirm_delete_trigger_confirmed.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1de3d1cba917a9b0b10bfcdd30a57602939001702a4fa490d31d262cfe0d9d22 -size 113903 +oid sha256:ee63d3da6af59c9c109c02decca5e9b983a61cd1d96259217e99b3a4f4608ad9 +size 115063 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_confirm_delete_trigger_declined.png b/tests/UI/expected-screenshots/ContainerTrigger_confirm_delete_trigger_declined.png index 1d0136a2f..dee7484ab 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_confirm_delete_trigger_declined.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_confirm_delete_trigger_declined.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:397624ab64572d3b6a00d72800b77f33b7a3dd810f2e630903497064c350b3c5 -size 119058 +oid sha256:53b0fcd8757b237eb5d54efdfc5c4a29a547cc197339da13d90764d34ff87831 +size 119763 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_create_advanced_verified.png b/tests/UI/expected-screenshots/ContainerTrigger_create_advanced_verified.png index d31812875..14dc9062e 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_create_advanced_verified.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_create_advanced_verified.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6bda6abf6f7b956388fe690a9d1b132d82ea96e8a5663a2a5a1d46b129ef5002 -size 66808 +oid sha256:940b4d67c49f2d80df1f4f49c252f9e01563bea3446d5105d65c4b1f43626459 +size 67553 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_create_new_long_name.png b/tests/UI/expected-screenshots/ContainerTrigger_create_new_long_name.png index e0dd944cd..7f0f2c054 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_create_new_long_name.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_create_new_long_name.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8837cd48c4358019dc2e497fb6fec44e371a1ced36d9421b4c27e7dbc7a29e68 -size 132799 +oid sha256:b50272366cec71f47a2eab46fb1b00f07c89a6f8d1b45c4bd32a7fd20f5f01b0 +size 133993 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_create_new_shown_in_list.png b/tests/UI/expected-screenshots/ContainerTrigger_create_new_shown_in_list.png index cd540fc31..05396c60d 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_create_new_shown_in_list.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_create_new_shown_in_list.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:2f14afe9f431697ed1bcf469f3e63ef31e06b98123170a06f104ae5c71c8b339 -size 129325 +oid sha256:33c707a8530900e74a197431cca82ad238a48079f267b30062f44f037728118f +size 130291 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_edit_updated_back_to_list.png b/tests/UI/expected-screenshots/ContainerTrigger_edit_updated_back_to_list.png index 123be30a3..e496b79a2 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_edit_updated_back_to_list.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_edit_updated_back_to_list.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1d76984f69da16a87b79dc0300b3374eb778b0da50451a7a64a5079ce852455e -size 129884 +oid sha256:afc5963a997f341406893dbb16a651adc93f108ecff1587a3de28a7324b6ec3b +size 130631 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_custom_event_name.png b/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_custom_event_name.png index 40cc2a4ba..89225491f 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_custom_event_name.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_custom_event_name.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d09795686469939b377e065ef16b27908d7d943cb2981b2aa4b4fcd1a4871918 -size 104813 +oid sha256:3974a39143a30b3077589b25a05bf23a3703f46b27bb3f63f54ba81b83ca9ff1 +size 104758 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_description.png b/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_description.png index 8f0bfbf27..92cd887ad 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_description.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_description.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:41927e6cc688171af1e77c3e6af626af69c62da6d70fef04b1745c495afb109d -size 103617 +oid sha256:e5a661792f5d18f8c5350d222fe24c72eb3d3300b0a4001aaf6f4cf8ef28e90b +size 103370 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_name.png b/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_name.png index b632c17bf..7462474df 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_name.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_name.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:1124c87d121690a2ffe34fb4fa598b3038a077354396fe82cb7b6c204464b92a -size 101318 +oid sha256:3e653f726e0980ffb7ef2d31a031fc049dc8e4d88778044d2c0dbc3092622fc0 +size 101099 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_type.png b/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_type.png index 9494eca8e..2824dc32b 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_type.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_trigger_search_type.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c7e9054d89120829ed740d432f286066b42f94e0f98dcb178b192248efcdcecf -size 105942 +oid sha256:7f8065b4643cd8b023209899f8ebc1b53076d05b8eb5c7b99ec4cabfd7c689f5 +size 105892 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_trigger_some_exist.png b/tests/UI/expected-screenshots/ContainerTrigger_trigger_some_exist.png index 59b1d2840..298395d42 100644 --- a/tests/UI/expected-screenshots/ContainerTrigger_trigger_some_exist.png +++ b/tests/UI/expected-screenshots/ContainerTrigger_trigger_some_exist.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b4592122a98a7b109feaf7c028deb0f6813e88653ec5ace7c29ea1b8297f67b -size 113739 +oid sha256:733770f226b178a474426d66796eb8fe42126544d1d2f3ae5c371938b8e8e476 +size 115355 From 82b4f7b23f830d8353737648f9e9cf75a0cc404d Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 27 Nov 2024 17:28:10 +1300 Subject: [PATCH 03/10] Adding UI test cases around new feature --- tests/UI/ContainerTrigger_spec.js | 45 +++++++++++++++++++ ...rTrigger_copy_trigger_container_select.png | 3 ++ ...rigger_copy_trigger_container_selected.png | 3 ++ .../ContainerTrigger_copy_trigger_dialog.png | 3 ++ ...tainerTrigger_copy_trigger_site_select.png | 3 ++ ...inerTrigger_copy_trigger_site_selected.png | 3 ++ .../ContainerTrigger_copy_trigger_success.png | 3 ++ 7 files changed, 63 insertions(+) create mode 100644 tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_container_select.png create mode 100644 tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_container_selected.png create mode 100644 tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_dialog.png create mode 100644 tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_site_select.png create mode 100644 tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_site_selected.png create mode 100644 tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_success.png diff --git a/tests/UI/ContainerTrigger_spec.js b/tests/UI/ContainerTrigger_spec.js index a38972425..2e8835306 100644 --- a/tests/UI/ContainerTrigger_spec.js +++ b/tests/UI/ContainerTrigger_spec.js @@ -257,4 +257,49 @@ describe("ContainerTrigger", function () { await page.waitForTimeout(250); await capture.page(page, 'create_new_long_name'); }); + + it('should show dialog to copy trigger', async function () { + await page.goto(container1Base); + await clickFirstRowTableAction('icon-content-copy', 3); + await page.waitForNetworkIdle(); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyTrigger'); + expect(await pageWrap.screenshot()).to.matchImage('copy_trigger_dialog'); + }); + + it('should show list of containers to copy trigger to', async function () { + await page.evaluate(() => $('div.matomo-field-select div.select-wrapper input.dropdown-trigger')[0].click()); + await page.waitForTimeout(250); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyTrigger'); + expect(await pageWrap.screenshot()).to.matchImage('copy_trigger_container_select'); + }); + + it('should select container to copy trigger to', async function () { + await page.evaluate(() => $('div.matomo-field-select ul li:first').click()); + await page.waitForTimeout(250); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyTrigger'); + expect(await pageWrap.screenshot()).to.matchImage('copy_trigger_container_selected'); + }); + + it('should show list of sites to copy trigger to', async function () { + await page.click('#destinationSite'); + await page.waitForTimeout(250); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyTrigger'); + expect(await pageWrap.screenshot()).to.matchImage('copy_trigger_site_select'); + }); + + it('should select site to copy trigger to', async function () { + await page.evaluate(() => $('#destinationSite ul li:first').click()); + await page.waitForTimeout(250); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyTrigger'); + expect(await pageWrap.screenshot()).to.matchImage('copy_trigger_site_selected'); + }); + + it('should be able to copy trigger', async function () { + await page.goto(container1Base); + await clickFirstRowTableAction('icon-content-copy', 3); + await page.waitForNetworkIdle(); + await page.evaluate(() => $('div.copyMtmObjectDialog button.btn').click()); + await page.waitForNetworkIdle(); + await capture.page(page, 'copy_trigger_success'); + }); }); diff --git a/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_container_select.png b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_container_select.png new file mode 100644 index 000000000..e89cbf9cf --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_container_select.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f54922010f1bc00ff5441ab0ba8581d04f5e738757ccd84bea4dfb71aba2acf3 +size 20974 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_container_selected.png b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_container_selected.png new file mode 100644 index 000000000..1df32b068 --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_container_selected.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c55c61508ca3a758c9a17347cf804ea9ce5e278301727f850322d4e0a969978f +size 29335 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_dialog.png b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_dialog.png new file mode 100644 index 000000000..679156757 --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_dialog.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12e6ab3f40c190e449c44f2a92c5cd76b3fd5030f79a6e8967c98a55f6d5250b +size 27610 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_site_select.png b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_site_select.png new file mode 100644 index 000000000..c71283108 --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_site_select.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6266c463650fbe0d05bca53f03bc1712a86903db1c9f54c843966ab82e03d7e7 +size 31439 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_site_selected.png b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_site_selected.png new file mode 100644 index 000000000..7af292dff --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_site_selected.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e9bffdccc48da83f80cc6861a05527895ad1872c0cbd8222ce223052a67339f0 +size 28121 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_success.png b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_success.png new file mode 100644 index 000000000..a49727c2c --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_success.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:17a3977445e9c9edaa8981a070a14d0872ad59bde50b55b3489e1a8d52e9ecc1 +size 141047 From 476ca4827cebc6e77422a5cc103b6a4b699d8b52 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 27 Nov 2024 21:38:38 +1300 Subject: [PATCH 04/10] Implemented the ability to copy variables --- Controller.php | 52 ++++++++ Model/Trigger.php | 4 +- Model/Variable.php | 36 +++++ tests/Integration/Model/VariableTest.php | 99 ++++++++++++++ tests/UI/ContainerVariable_spec.js | 45 +++++++ ...ariable_copy_variable_container_select.png | 3 + ...iable_copy_variable_container_selected.png | 3 + ...ContainerVariable_copy_variable_dialog.png | 3 + ...inerVariable_copy_variable_site_select.png | 3 + ...erVariable_copy_variable_site_selected.png | 3 + ...ontainerVariable_copy_variable_success.png | 3 + vue/dist/TagManager.umd.js | 126 +++++++++++------- vue/dist/TagManager.umd.min.js | 2 +- vue/src/Variable/VariableList.vue | 29 +++- 14 files changed, 356 insertions(+), 55 deletions(-) create mode 100644 tests/UI/expected-screenshots/ContainerVariable_copy_variable_container_select.png create mode 100644 tests/UI/expected-screenshots/ContainerVariable_copy_variable_container_selected.png create mode 100644 tests/UI/expected-screenshots/ContainerVariable_copy_variable_dialog.png create mode 100644 tests/UI/expected-screenshots/ContainerVariable_copy_variable_site_select.png create mode 100644 tests/UI/expected-screenshots/ContainerVariable_copy_variable_site_selected.png create mode 100644 tests/UI/expected-screenshots/ContainerVariable_copy_variable_success.png diff --git a/Controller.php b/Controller.php index e4c54e22a..562252386 100644 --- a/Controller.php +++ b/Controller.php @@ -24,6 +24,7 @@ use Piwik\Plugins\TagManager\Model\Environment; use Piwik\Plugins\TagManager\Model\Tag; use Piwik\Plugins\TagManager\Model\Trigger; +use Piwik\Plugins\TagManager\Model\Variable; use Piwik\Site; use Piwik\Url; use Piwik\View; @@ -34,6 +35,7 @@ class Controller extends \Piwik\Plugin\Controller public const COPY_CONTAINER_NONCE = 'TagManager.copyContainer'; public const COPY_TAG_NONCE = 'TagManager.copyTag'; public const COPY_TRIGGER_NONCE = 'TagManager.copyTrigger'; + public const COPY_VARIABLE_NONCE = 'TagManager.copyVariable'; /** * @var AccessValidator @@ -494,6 +496,56 @@ public function copyTrigger() return json_encode(['isSuccess' => true, 'urlToNewCopy' => $url]); } + public function copyVariableDialog() + { + $this->accessValidator->checkWriteCapability($this->idSite); + $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); + + $request = \Piwik\Request::fromRequest(); + $idVariable = $request->getIntegerParameter('idVariable'); + $idSourceContainer = $request->getStringParameter('idContainer'); + $idContainerVersion = $request->getIntegerParameter('idContainerVersion'); + + $view = new View("@TagManager/copyDialog"); + $view->defaultSiteDecoded = [ + 'id' => $this->idSite, + 'name' => Common::unsanitizeInputValue(Site::getNameFor($this->idSite)), + ]; + $view->idToCopy = $idVariable; + $view->copyType = 'variable'; + $view->idSourceContainer = $idSourceContainer; + $view->idContainerVersion = $idContainerVersion; + $view->copyNonce = Nonce::getNonce(self::COPY_VARIABLE_NONCE); + return $view->render(); + } + + public function copyVariable() + { + $this->accessValidator->checkWriteCapability($this->idSite); + $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); + Nonce::checkNonce(self::COPY_VARIABLE_NONCE); + + $request = \Piwik\Request::fromRequest(); + $idDestinationSite = $request->getIntegerParameter('idDestinationSite'); + $idDestinationContainer = $request->getStringParameter('idDestinationContainer'); + // Confirm tha the user has permission to copy to the selected site + $this->accessValidator->checkWriteCapability($idDestinationSite); + $idVariable = $request->getIntegerParameter('idVariable'); + $idContainerVersion = $request->getIntegerParameter('idContainerVersion'); + + $idVariableNew = StaticContainer::get(Variable::class)->copyVariable($this->idSite, $idContainerVersion, $idVariable, $idDestinationSite, $idDestinationContainer); + + $url = 'index.php?module=TagManager&action=manageVariables&' + . Url::getQueryStringFromParameters([ + 'idSite' => $idDestinationSite, + 'idContainer' => $idDestinationContainer + ]) . '#?' . Url::getQueryStringFromParameters([ + 'idVariable' => $idVariableNew, + ]); + + return json_encode(['isSuccess' => true, 'urlToNewCopy' => $url]); + } + protected function renderTemplate($template, array $variables = array()) { if (false === strpos($template, '@') || false === strpos($template, '/')) { diff --git a/Model/Trigger.php b/Model/Trigger.php index 9c7cabb04..8d99b19bc 100644 --- a/Model/Trigger.php +++ b/Model/Trigger.php @@ -200,8 +200,8 @@ public function copyTriggerIfNoEquivalent(int $idSite, int $idContainerVersion, * @param int $idContainerVersion * @param int $idTrigger * @param null|int $idDestinationSite Optional ID of the site to which to copy the trigger. If empty, isSite is used - * @param string|null $idDestinationContainer Optional ID of the container to copy the tag to. If not provided the - * copy goes to the source site and container + * @param string|null $idDestinationContainer Optional ID of the container to copy the trigger to. If not provided + * the copy goes to the source site and container * @return int ID of the newly created trigger */ public function copyTrigger(int $idSite, int $idContainerVersion, int $idTrigger, ?int $idDestinationSite = 0, ?string $idDestinationContainer = null): int diff --git a/Model/Variable.php b/Model/Variable.php index 8837f3b5e..524714cf8 100644 --- a/Model/Variable.php +++ b/Model/Variable.php @@ -436,6 +436,42 @@ public function copyReferencedVariables(array &$entity, int $idSite, int $idCont } } + /** + * Make a copy of the variable and return the ID. + * + * @param int $idSite + * @param int $idContainerVersion + * @param int $idVariable + * @param null|int $idDestinationSite Optional ID of the site to which to copy the variable. If empty, isSite is used + * @param string|null $idDestinationContainer Optional ID of the container to copy the variable to. If not provided + * the copy goes to the source site and container + * @return int ID of the newly created variable + */ + public function copyVariable(int $idSite, int $idContainerVersion, int $idVariable, ?int $idDestinationSite = 0, ?string $idDestinationContainer = null): int + { + $idDestinationSite = $idDestinationSite ?: $idSite; + $idDestinationVersion = $idContainerVersion; + if ($idDestinationSite !== null && !empty($idDestinationContainer)) { + $idDestinationVersion = $this->getDraftContainerVersion($idDestinationSite, $idDestinationContainer); + } + + $variable = $this->getContainerVariable($idSite, $idContainerVersion, $idVariable); + $newVarName = $this->dao->makeCopyNameUnique($idDestinationSite, $variable['name'], $idDestinationVersion); + + $this->copyReferencedVariables($variable, $idSite, $idContainerVersion, $idDestinationSite, $idDestinationVersion); + + return $this->addContainerVariable( + $idDestinationSite, + $idDestinationVersion, + $variable['type'], + $newVarName, + $variable['parameters'], + $variable['default_value'], + $variable['lookup_table'], + $variable['description'] + ); + } + private function copyVariableByNameIfNoEquivalent(string $variableName, int $idSite, int $idContainerVersion, int $idDestinationSite, int $idDestinationContainerVersion): string { $variable = $this->findVariableByName($idSite, $idContainerVersion, $variableName); diff --git a/tests/Integration/Model/VariableTest.php b/tests/Integration/Model/VariableTest.php index a221907c0..503e0d1c2 100644 --- a/tests/Integration/Model/VariableTest.php +++ b/tests/Integration/Model/VariableTest.php @@ -10,9 +10,11 @@ namespace Piwik\Plugins\TagManager\tests\Integration\Model; use Piwik\Container\StaticContainer; +use Piwik\Plugins\TagManager\Context\WebContext; use Piwik\Plugins\TagManager\Dao\VariablesDao; use Piwik\Plugins\TagManager\Input\Name; use Piwik\Plugins\TagManager\Model\Comparison; +use Piwik\Plugins\TagManager\Model\Container; use Piwik\Plugins\TagManager\Model\Tag; use Piwik\Plugins\TagManager\Model\Trigger; use Piwik\Plugins\TagManager\Model\Variable; @@ -677,6 +679,103 @@ public function testCopyReferencedVariablesToDifferentContainer() $this->assertCount(1, $this->model->getContainerVariables($this->idSite, $this->containerVersion2), 'There should be one variable.'); } + public function testCopyVariable() + { + $this->assertCount(1, $this->model->getContainerVariables($this->idSite, $this->containerVersion1), 'There should be one variable before copy'); + $idNewVariable = $this->model->copyVariable($this->idSite, $this->containerVersion1, $this->idVariable1); + $this->assertGreaterThan(0, $idNewVariable); + $this->assertNotSame($this->idVariable1, $idNewVariable); + + $this->assertCount(2, $this->model->getContainerVariables($this->idSite, $this->containerVersion1), 'There should be two variable after copy'); + + $variable1 = $this->model->getContainerVariable($this->idSite, $this->containerVersion1, $this->idVariable1); + $variable2 = $this->model->getContainerVariable($this->idSite, $this->containerVersion1, $idNewVariable); + + $this->assertSame($variable1['name'] . ' (1)', $variable2['name'], 'The name should have been updated'); + unset($variable1['idvariable']); + unset($variable2['idvariable']); + unset($variable1['name']); + unset($variable2['name']); + + $this->assertEquals($variable1, $variable2, 'The variable should match'); + } + + public function testCopyVariableDifferentContainer() + { + $containerModel = StaticContainer::get(Container::class); + $context = WebContext::ID; + $description = 'My description'; + + $idContainer = $containerModel->addContainer($this->idSite, $context, 'FooContainer', $description, 0, 0, 0); + $container = $containerModel->getContainer($this->idSite, $idContainer); + $idContainerVersion = $container['draft']['idcontainerversion']; + + $this->assertCount(0, $this->model->getContainerVariables($this->idSite, $idContainerVersion), 'There should be no variables before copy'); + $idNewVariable = $this->model->copyVariable($this->idSite, $this->containerVersion1, $this->idVariable1, $this->idSite, $container['idcontainer']); + $this->assertGreaterThan(0, $idNewVariable); + $this->assertNotSame($this->idVariable1, $idNewVariable); + + $this->assertCount(1, $this->model->getContainerVariables($this->idSite, $idContainerVersion), 'There should be one variable after copy'); + + $variable1 = $this->model->getContainerVariable($this->idSite, $this->containerVersion1, $this->idVariable1); + $variable2 = $this->model->getContainerVariable($this->idSite, $idContainerVersion, $idNewVariable); + + $this->assertNotSame($variable1['idcontainerversion'], $variable2['idcontainerversion'], 'The version should be different'); + unset($variable1['idvariable']); + unset($variable2['idvariable']); + unset($variable1['idcontainerversion']); + unset($variable2['idcontainerversion']); + + $this->assertEquals($variable1, $variable2, 'The variable should match'); + } + + public function testCopyVariableReferencingVariable() + { + $variableParams = ['jsFunction' => 'function () { return 12345; }']; + $idVariable = $this->addContainerVariable($this->idSite, $this->containerVersion1, CustomJsFunctionVariable::ID, 'TestVariable', $variableParams); + $this->assertSame(2, $idVariable); + + $idReferencingVariable = $this->addContainerVariable($this->idSite, $this->containerVersion1, CustomJsFunctionVariable::ID, 'ReferencingTestVariable', $parameters = ['jsFunction' => 'function () { return {{TestVariable}}; }']); + $this->assertSame(3, $idReferencingVariable); + + $containerModel = StaticContainer::get(Container::class); + $context = WebContext::ID; + $description = 'My description'; + + $idContainer = $containerModel->addContainer($this->idSite, $context, 'FooContainer', $description, 0, 0, 0); + $container = $containerModel->getContainer($this->idSite, $idContainer); + $idContainerVersion = $container['draft']['idcontainerversion']; + + $this->assertCount(0, $this->model->getContainerVariables($this->idSite, $idContainerVersion), 'There should be no variables before copy'); + $idNewVariable = $this->model->copyVariable($this->idSite, $this->containerVersion1, $idReferencingVariable, $this->idSite, $container['idcontainer']); + $this->assertGreaterThan(0, $idNewVariable); + $this->assertNotSame($idReferencingVariable, $idNewVariable); + + $this->assertCount(2, $this->model->getContainerVariables($this->idSite, $idContainerVersion), 'There should be two variables after copy'); + + $variable1 = $this->model->getContainerVariable($this->idSite, $this->containerVersion1, $idReferencingVariable); + $variable2 = $this->model->getContainerVariable($this->idSite, $idContainerVersion, $idNewVariable); + + $this->assertNotSame($variable1['idcontainerversion'], $variable2['idcontainerversion'], 'The version should be different'); + unset($variable1['idvariable']); + unset($variable2['idvariable']); + unset($variable1['idcontainerversion']); + unset($variable2['idcontainerversion']); + + $this->assertEquals($variable1, $variable2, 'The variable should match'); + + $variable1 = $this->model->getContainerVariable($this->idSite, $this->containerVersion1, $idVariable); + $variable2 = $this->model->findVariableByName($this->idSite, $idContainerVersion, $variable1['name']); + + $this->assertNotSame($variable1['idcontainerversion'], $variable2['idcontainerversion'], 'The version should be different'); + unset($variable1['idvariable']); + unset($variable2['idvariable']); + unset($variable1['idcontainerversion']); + unset($variable2['idcontainerversion']); + + $this->assertEquals($variable1, $variable2, 'The copied referenced variable should match'); + } + private function addContainerVariable($idSite, $idContainerVersion = 5, $type = null, $name = 'MyName', $parameters = [], $defaultValue = '', $lookupTable = [], $description = '') { if (!isset($type)) { diff --git a/tests/UI/ContainerVariable_spec.js b/tests/UI/ContainerVariable_spec.js index b26a1bbc3..c40dbc19c 100644 --- a/tests/UI/ContainerVariable_spec.js +++ b/tests/UI/ContainerVariable_spec.js @@ -264,4 +264,49 @@ describe("ContainerVariable", function () { await createOrUpdateVariable(); await captureCustomVariablesList('create_new_long_name'); }); + + it('should show dialog to copy variable', async function () { + await page.goto(container1Base); + await clickFirstRowTableAction('icon-content-copy', 3); + await page.waitForNetworkIdle(); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyVariable'); + expect(await pageWrap.screenshot()).to.matchImage('copy_variable_dialog'); + }); + + it('should show list of containers to copy variable to', async function () { + await page.evaluate(() => $('div.matomo-field-select div.select-wrapper input.dropdown-trigger')[0].click()); + await page.waitForTimeout(250); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyVariable'); + expect(await pageWrap.screenshot()).to.matchImage('copy_variable_container_select'); + }); + + it('should select container to copy variable to', async function () { + await page.evaluate(() => $('div.matomo-field-select ul li:first').click()); + await page.waitForTimeout(250); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyVariable'); + expect(await pageWrap.screenshot()).to.matchImage('copy_variable_container_selected'); + }); + + it('should show list of sites to copy variable to', async function () { + await page.click('#destinationSite'); + await page.waitForTimeout(250); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyVariable'); + expect(await pageWrap.screenshot()).to.matchImage('copy_variable_site_select'); + }); + + it('should select site to copy variable to', async function () { + await page.evaluate(() => $('#destinationSite ul li:first').click()); + await page.waitForTimeout(250); + pageWrap = await page.waitForSelector('div.ui-dialog.mtmCopyVariable'); + expect(await pageWrap.screenshot()).to.matchImage('copy_variable_site_selected'); + }); + + it('should be able to copy variable', async function () { + await page.goto(container1Base); + await clickFirstRowTableAction('icon-content-copy', 3); + await page.waitForNetworkIdle(); + await page.evaluate(() => $('div.copyMtmObjectDialog button.btn').click()); + await page.waitForNetworkIdle(); + await capture.page(page, 'copy_variable_success'); + }); }); diff --git a/tests/UI/expected-screenshots/ContainerVariable_copy_variable_container_select.png b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_container_select.png new file mode 100644 index 000000000..405fa8872 --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_container_select.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6c27f1cfd13f8e12388eee8fabd92855352a23ee974bba01afbe682cf1864ea9 +size 22062 diff --git a/tests/UI/expected-screenshots/ContainerVariable_copy_variable_container_selected.png b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_container_selected.png new file mode 100644 index 000000000..742c7e795 --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_container_selected.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:90290e36a5d46af42f61262173edde7636c9eeaf66aaedeb2d86c958df6838a1 +size 30091 diff --git a/tests/UI/expected-screenshots/ContainerVariable_copy_variable_dialog.png b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_dialog.png new file mode 100644 index 000000000..54eed18f8 --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_dialog.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ec5226e4fe03b5b82744aa4dba32cb8d7bdd161d8ab7f75d66f57a79699fa7e6 +size 28365 diff --git a/tests/UI/expected-screenshots/ContainerVariable_copy_variable_site_select.png b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_site_select.png new file mode 100644 index 000000000..8e9f7baf5 --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_site_select.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c99adddbf562bef44d51e213b5faa53f7a983cb93d14a83500c2d858f99730a +size 32215 diff --git a/tests/UI/expected-screenshots/ContainerVariable_copy_variable_site_selected.png b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_site_selected.png new file mode 100644 index 000000000..daf63a51a --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_site_selected.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:58cc0a296b101de838f048950f7410f97988369f6255856bf4ed8eb674f95c10 +size 28879 diff --git a/tests/UI/expected-screenshots/ContainerVariable_copy_variable_success.png b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_success.png new file mode 100644 index 000000000..1bdc9cbea --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_success.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2bb770d3c5db12343ceb5162c573f406972742dc317bbab449bd7c19ebad2755 +size 455769 diff --git a/vue/dist/TagManager.umd.js b/vue/dist/TagManager.umd.js index 718002ffb..d3284f93b 100644 --- a/vue/dist/TagManager.umd.js +++ b/vue/dist/TagManager.umd.js @@ -2003,65 +2003,63 @@ var notificationId = 'tagvariablemanagement'; VariableEditvue_type_script_lang_ts.render = VariableEditvue_type_template_id_6ce63297_render /* harmony default export */ var VariableEdit = (VariableEditvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=template&id=b344dc8c +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=template&id=d9faefa4 -var VariableListvue_type_template_id_b344dc8c_hoisted_1 = { +var VariableListvue_type_template_id_d9faefa4_hoisted_1 = { class: "tagManagerManageList tagManagerVariableList" }; -var VariableListvue_type_template_id_b344dc8c_hoisted_2 = { +var VariableListvue_type_template_id_d9faefa4_hoisted_2 = { class: "variableSearchFilter" }; -var VariableListvue_type_template_id_b344dc8c_hoisted_3 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_4 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_5 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_6 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_7 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_8 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_9 = { +var VariableListvue_type_template_id_d9faefa4_hoisted_3 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_4 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_5 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_6 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_7 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_8 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_9 = { colspan: "7" }; -var VariableListvue_type_template_id_b344dc8c_hoisted_10 = { +var VariableListvue_type_template_id_d9faefa4_hoisted_10 = { class: "loadingPiwik" }; -var VariableListvue_type_template_id_b344dc8c_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var VariableListvue_type_template_id_d9faefa4_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1); -var VariableListvue_type_template_id_b344dc8c_hoisted_12 = { +var VariableListvue_type_template_id_d9faefa4_hoisted_12 = { colspan: "7" }; -var VariableListvue_type_template_id_b344dc8c_hoisted_13 = ["id"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_14 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_15 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_16 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_17 = { +var VariableListvue_type_template_id_d9faefa4_hoisted_13 = ["id"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_14 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_15 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_16 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_17 = { class: "lookupTable" }; -var VariableListvue_type_template_id_b344dc8c_hoisted_18 = { +var VariableListvue_type_template_id_d9faefa4_hoisted_18 = { class: "icon-ok" }; -var VariableListvue_type_template_id_b344dc8c_hoisted_19 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_20 = { - class: "action" -}; -var VariableListvue_type_template_id_b344dc8c_hoisted_21 = ["onClick", "title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_22 = ["onClick", "title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_23 = { +var VariableListvue_type_template_id_d9faefa4_hoisted_19 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_20 = ["onClick", "title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_21 = ["onClick", "title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_22 = ["onClick", "title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_23 = { class: "tableActionBar" }; -var VariableListvue_type_template_id_b344dc8c_hoisted_24 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var VariableListvue_type_template_id_d9faefa4_hoisted_24 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, " ", -1); -var VariableListvue_type_template_id_b344dc8c_hoisted_25 = ["title"]; +var VariableListvue_type_template_id_d9faefa4_hoisted_25 = ["title"]; -var VariableListvue_type_template_id_b344dc8c_hoisted_26 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var VariableListvue_type_template_id_d9faefa4_hoisted_26 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-help preconfiguredVariablesHelp" }, null, -1); -var VariableListvue_type_template_id_b344dc8c_hoisted_27 = { +var VariableListvue_type_template_id_d9faefa4_hoisted_27 = { class: "collection-header" }; var _hoisted_28 = { @@ -2088,21 +2086,21 @@ var _hoisted_36 = { class: "collection" }; var _hoisted_37 = ["value"]; -function VariableListvue_type_template_id_b344dc8c_render(_ctx, _cache, $props, $setup, $data, $options) { +function VariableListvue_type_template_id_d9faefa4_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", VariableListvue_type_template_id_b344dc8c_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", VariableListvue_type_template_id_d9faefa4_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { feature: "Tag Manager", class: "tagManagerCustomVariablesList", "content-title": _ctx.translate('TagManager_ManageX', _ctx.translate('TagManager_Variables')), "help-text": _ctx.variablesHelpText }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_VariableUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", VariableListvue_type_template_id_b344dc8c_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_VariableUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", VariableListvue_type_template_id_d9faefa4_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "variableSearch", title: _ctx.translate('General_Search'), @@ -2113,22 +2111,22 @@ function VariableListvue_type_template_id_b344dc8c_render(_ctx, _cache, $props, }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.variables.length > 0]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "name", title: _ctx.nameTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, VariableListvue_type_template_id_b344dc8c_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "description", title: _ctx.descriptionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, VariableListvue_type_template_id_b344dc8c_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "type", title: _ctx.typeTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, VariableListvue_type_template_id_b344dc8c_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "lookupTable", title: _ctx.lookupTableTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LookupTable')), 9, VariableListvue_type_template_id_b344dc8c_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LookupTable')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "lastUpdated", title: _ctx.lastUpdatedTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, VariableListvue_type_template_id_b344dc8c_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "action", title: _ctx.actionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, VariableListvue_type_template_id_b344dc8c_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_b344dc8c_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", VariableListvue_type_template_id_b344dc8c_hoisted_10, [VariableListvue_type_template_id_b344dc8c_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_b344dc8c_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoVariablesFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_d9faefa4_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", VariableListvue_type_template_id_d9faefa4_hoisted_10, [VariableListvue_type_template_id_d9faefa4_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_d9faefa4_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoVariablesFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createContainerVariableNow", onClick: _cache[1] || (_cache[1] = function ($event) { return _ctx.createVariable(); @@ -2141,44 +2139,52 @@ function VariableListvue_type_template_id_b344dc8c_render(_ctx, _cache, $props, }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "name", title: variable.name - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(variable.name, 50)), 9, VariableListvue_type_template_id_b344dc8c_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(variable.name, 50)), 9, VariableListvue_type_template_id_d9faefa4_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "description", title: variable.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(variable.description, 75)), 9, VariableListvue_type_template_id_b344dc8c_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(variable.description, 75)), 9, VariableListvue_type_template_id_d9faefa4_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "type", title: variable.typeMetadata.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variable.typeMetadata.name), 9, VariableListvue_type_template_id_b344dc8c_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_b344dc8c_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", VariableListvue_type_template_id_b344dc8c_hoisted_18, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], variable.lookup_table.length]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variable.typeMetadata.name), 9, VariableListvue_type_template_id_d9faefa4_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_d9faefa4_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", VariableListvue_type_template_id_d9faefa4_hoisted_18, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], variable.lookup_table.length]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "lastUpdated", title: _ctx.translate('TagManager_CreatedOnX', variable.created_date_pretty) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variable.updated_date_pretty), 1)], 8, VariableListvue_type_template_id_b344dc8c_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_b344dc8c_hoisted_20, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variable.updated_date_pretty), 1)], 8, VariableListvue_type_template_id_d9faefa4_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.getActionClasses) + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-edit", onClick: function onClick($event) { return _ctx.editVariable(variable.idvariable, variable.type); }, title: _ctx.translate('TagManager_EditVariable') - }, null, 8, VariableListvue_type_template_id_b344dc8c_hoisted_21), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, VariableListvue_type_template_id_d9faefa4_hoisted_20), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-delete", onClick: function onClick($event) { return _ctx.deleteVariable(variable); }, title: _ctx.translate('TagManager_DeleteX', _ctx.translate('TagManager_Variable')) - }, null, 8, VariableListvue_type_template_id_b344dc8c_hoisted_22)], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, VariableListvue_type_template_id_b344dc8c_hoisted_13); - }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", VariableListvue_type_template_id_b344dc8c_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, VariableListvue_type_template_id_d9faefa4_hoisted_21), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + class: "table-action icon-content-copy", + onClick: function onClick($event) { + return _ctx.openCopyDialog(variable); + }, + title: _ctx.translate('TagManager_CopyX', _ctx.translate('TagManager_Variable')) + }, null, 8, VariableListvue_type_template_id_d9faefa4_hoisted_22), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasPublishCapability()]])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, VariableListvue_type_template_id_d9faefa4_hoisted_13); + }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", VariableListvue_type_template_id_d9faefa4_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createNewVariable", value: "", onClick: _cache[2] || (_cache[2] = function ($event) { return _ctx.createVariable(); }) - }, [VariableListvue_type_template_id_b344dc8c_hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewVariable')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; + }, [VariableListvue_type_template_id_d9faefa4_hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewVariable')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; }), _: 1 }, 8, ["content-title", "help-text"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", { title: _ctx.translate('TagManager_PreConfiguredInfoTitle') - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_PreconfiguredVariables')) + " ", 1), VariableListvue_type_template_id_b344dc8c_hoisted_26], 8, VariableListvue_type_template_id_b344dc8c_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.containerVariables, function (variableCategory, index) { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_PreconfiguredVariables')) + " ", 1), VariableListvue_type_template_id_d9faefa4_hoisted_26], 8, VariableListvue_type_template_id_d9faefa4_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.containerVariables, function (variableCategory, index) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", { class: "collection with-header", key: index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", VariableListvue_type_template_id_b344dc8c_hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h4", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variableCategory.name), 1)]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(variableCategory.types, function (variableTemplate) { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", VariableListvue_type_template_id_d9faefa4_hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h4", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variableCategory.name), 1)]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(variableCategory.types, function (variableTemplate) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: "collection-item", key: variableTemplate.id @@ -2209,7 +2215,7 @@ function VariableListvue_type_template_id_b344dc8c_render(_ctx, _cache, $props, value: _ctx.translate('General_Cancel') }, null, 8, _hoisted_37)], 512)]); } -// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=template&id=b344dc8c +// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=template&id=d9faefa4 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=script&lang=ts function VariableListvue_type_script_lang_ts_toConsumableArray(arr) { return VariableListvue_type_script_lang_ts_arrayWithoutHoles(arr) || VariableListvue_type_script_lang_ts_iterableToArray(arr) || VariableListvue_type_script_lang_ts_unsupportedIterableToArray(arr) || VariableListvue_type_script_lang_ts_nonIterableSpread(); } @@ -2305,6 +2311,20 @@ var VariableListvue_type_script_lang_ts_window = window, }, truncateText: function truncateText(text, length) { return VariableListvue_type_script_lang_ts_tagManagerHelper.truncateText(text, length); + }, + hasPublishCapability: function hasPublishCapability() { + return external_CoreHome_["Matomo"].hasUserCapability('tagmanager_write') && external_CoreHome_["Matomo"].hasUserCapability('tagmanager_use_custom_templates'); + }, + openCopyDialog: function openCopyDialog(variable) { + var url = external_CoreHome_["MatomoUrl"].stringify({ + module: 'TagManager', + action: 'copyVariableDialog', + idSite: variable.idsite, + idContainer: this.idContainer, + idVariable: variable.idvariable, + idContainerVersion: this.idContainerVersion + }); + window.Piwik_Popover.createPopupAndLoadUrl(url, '', 'mtmCopyVariable'); } }, computed: { @@ -2366,6 +2386,10 @@ var VariableListvue_type_script_lang_ts_window = window, }, actionTranslatedText: function actionTranslatedText() { return this.translate('TagManager_VariablesActionDescription'); + }, + getActionClasses: function getActionClasses() { + var copyClass = this.hasPublishCapability() ? ' hasCopyAction' : ''; + return "action".concat(copyClass); } } })); @@ -2375,7 +2399,7 @@ var VariableListvue_type_script_lang_ts_window = window, -VariableListvue_type_script_lang_ts.render = VariableListvue_type_template_id_b344dc8c_render +VariableListvue_type_script_lang_ts.render = VariableListvue_type_template_id_d9faefa4_render /* harmony default export */ var VariableList = (VariableListvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Variable/VariableManage.vue?vue&type=template&id=f95f6f7c diff --git a/vue/dist/TagManager.umd.min.js b/vue/dist/TagManager.umd.min.js index ed21ba90d..4e835f895 100644 --- a/vue/dist/TagManager.umd.min.js +++ b/vue/dist/TagManager.umd.min.js @@ -10,7 +10,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var yt=function(){function e(){var t=this;vt(this,e),Tt(this,"privateState",Object(r["reactive"])({comparisons:[],isLoading:!1})),Tt(this,"state",Object(r["computed"])((function(){return Object(r["readonly"])(t.privateState)}))),Tt(this,"isLoading",Object(r["computed"])((function(){return t.state.value.isLoading}))),Tt(this,"comparisons",Object(r["computed"])((function(){return t.state.value.comparisons}))),Tt(this,"comparisonOptions",Object(r["computed"])((function(){return t.comparisons.value.map((function(e){var t=e.id,n=e.name;return{key:t,value:n}}))}))),Tt(this,"initializePromise",null)}return Ot(e,[{key:"init",value:function(){return this.initializePromise||(this.initializePromise=this.fetchAvailableComparisons()),this.initializePromise}},{key:"fetchAvailableComparisons",value:function(){var e=this;return this.privateState.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getAvailableComparisons",filter_limit:"-1"}).then((function(t){e.privateState.comparisons=t})).finally((function(){e.privateState.isLoading=!1}))}}]),e}(),Vt=new yt,Ct="tagvariablemanagement",Nt=Object(r["defineComponent"])({props:{idVariable:Number,idContainer:{type:String,required:!0},idContainerVersion:{type:Number,required:!0},variableType:String,isEmbedded:{type:Boolean,default:!1}},components:{GroupedSettings:g["GroupedSettings"],ContentBlock:u["ContentBlock"],Field:g["Field"],SaveButton:g["SaveButton"]},data:function(){return{isDirty:!1,showAdvanced:!1,chooseVariableType:!1,canUseCustomTemplates:u["Matomo"].hasUserCapability("tagmanager_use_custom_templates"),availableVariables:[],editTitle:"",variable:{},parameterValues:{},isUpdatingVar:!1}},emits:["changeVariable"],created:function(){Vt.init(),ft.fetchVariablesIfNotLoaded(this.idContainer,this.idContainerVersion),this.initIdVariable()},watch:{idVariable:function(e){null!==e&&this.initIdVariable()},variableParameterValues:{handler:function(e,t){e&&t&&(this.isDirty=!0)},deep:!0},variableLookupTable:{handler:function(){var e=(this.variable.lookup_table||[]).every((function(e){return!(null===e||void 0===e||!e.out_value)}));e&&this.addLookUpEntry()},deep:!0}},methods:{removeAnyVariableNotification:function(){u["NotificationsStore"].remove(Ct),u["NotificationsStore"].remove("ajaxHelper")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:Ct,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},showErrorFieldNotProvidedNotification:function(e){var t=Object(u["translate"])("TagManager_ErrorXNotProvided",[e]);this.showNotification(t,"error")},initIdVariable:function(){var e=this;u["Matomo"].helper.lazyScrollToContent(),this.availableVariables=[],u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer,filter_limit:"-1"}).then((function(e){return ft.fetchAvailableVariables(e.context)})).then((function(t){e.availableVariables=t})).then((function(){if(e.edit&&e.idVariable)return e.editTitle=Object(u["translate"])("TagManager_EditVariable"),void ft.findVariable(e.idContainer,e.idContainerVersion,e.idVariable,e.isEmbedded).then((function(t){var n;t&&(e.variable=Object(u["clone"])(t),e.parameterValues=Object.fromEntries(t.typeMetadata.parameters.map((function(e){return[e.name,e.value]}))),(e.variable.lookup_table&&e.variable.lookup_table.length||e.variable.default_value)&&(e.showAdvanced=!0),e.addLookUpEntryIfNoneExists(),e.isDirty=!1,null!==(n=e.variable.typeMetadata)&&void 0!==n&&n.name&&(e.editTitle+=": ".concat(e.variable.typeMetadata.name)))}));if(e.create){var t=!1;e.variableType&&e.availableVariables.forEach((function(n){if(!t){var a=n.types.find((function(t){return(null===t||void 0===t?void 0:t.id)===e.variableType}));a&&(t=!0,e.createVariableType(a))}})),t||(e.editTitle=Object(u["translate"])("TagManager_ChooseVariableToContinue"),e.chooseVariableType=!0)}}))},addLookUpEntryIfNoneExists:function(){this.variable.lookup_table&&Array.isArray(this.variable.lookup_table)||(this.variable.lookup_table=[]),this.variable.lookup_table.length||this.variable.lookup_table.push({comparison:"equals",match_value:"",out_value:""})},addLookUpEntry:function(){this.variable.lookup_table.push({comparison:"equals",match_value:"",out_value:""}),this.isDirty=!0},removeLookUpEntry:function(e){e>-1&&(this.variable.lookup_table.splice(e,1),this.isDirty=!0)},createVariableType:function(e){var t,n=this;e&&this.isVariableTemplateDisabled[e.id]||(this.chooseVariableType=!1,this.editTitle=Object(u["translate"])("TagManager_CreateNewVariable"),this.variable={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:ft.suggestNameForType(e.name)||"",description:"",type:e.id,idcontainer:this.idContainer,idcontainerversion:this.idContainerVersion,default_value:"",lookup_table:[],typeMetadata:e},null!==(t=this.variable.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.variable.typeMetadata.name)),this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.addLookUpEntry(),this.isDirty=!0,Object(r["nextTick"])((function(){if(n.$refs.root){var e=n.$refs.root;e.scrollIntoView();var t=e.querySelector("#name");t&&t.focus()}})))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idVariable,u["MatomoUrl"].updateHash(e)},createVariable:function(){var e=this;this.removeAnyVariableNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVar=!0,ft.createOrUpdateVariable(Object.assign(Object.assign({},this.variable),{},{name:encodeURIComponent(this.variable.name)}),"TagManager.addContainerVariable",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t){e.isDirty=!1;var n=t.value;ft.reload(e.idContainer,e.idContainerVersion).then((function(){if(e.isEmbedded)return e.variable.idvariable=n,void e.$emit("changeVariable",{variable:e.variable});e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Variable")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)}))}})).finally((function(){e.isUpdatingVar=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateVariable:function(){var e=this;this.removeAnyVariableNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVar=!0,ft.createOrUpdateVariable(Object.assign(Object.assign({},this.variable),{},{name:encodeURIComponent(this.variable.name)}),"TagManager.updateContainerVariable",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t)if(e.isEmbedded)e.$emit("changeVariable",{variable:e.variable});else{e.isDirty=!1,ft.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdVariable()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Variable")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingVar=!1})))},checkRequiredFieldsAreSet:function(){return!!this.variable.name||(this.showErrorFieldNotProvidedNotification(Object(u["translate"])("General_Name")),!1)},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{typeInlineHelp:function(){var e,t,n=(null===(e=this.variable.typeMetadata)||void 0===e?void 0:e.description)||"",a=(null===(t=this.variable.typeMetadata)||void 0===t?void 0:t.help)||"";return"".concat(n," ").concat(a)},create:function(){return 0===this.idVariable},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVar},availableLookUpComparisons:function(){return Vt.comparisonOptions.value},isVariableTemplateDisabled:function(){var e=this,t={};return this.availableVariables.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},isVariableDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.variable.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},variableParameterValues:function(){var e;return null!==(e=this.variable.typeMetadata)&&void 0!==e&&e.parameters?this.parameterValues:null},variableLookupTable:function(){return this.variable.lookup_table}}});Nt.render=et;var Et=Nt,St={class:"tagManagerManageList tagManagerVariableList"},wt={class:"variableSearchFilter"},kt=["title"],Mt=["title"],_t=["title"],Dt=["title"],At=["title"],xt=["title"],Bt={colspan:"7"},Lt={class:"loadingPiwik"},Ut=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Pt={colspan:"7"},It=["id"],Ft=["title"],Ht=["title"],Gt=["title"],$t={class:"lookupTable"},Rt={class:"icon-ok"},qt=["title"],zt={class:"action"},Wt=["onClick","title"],Xt=["onClick","title"],Kt={class:"tableActionBar"},Jt=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Yt=["title"],Zt=Object(r["createElementVNode"])("span",{class:"icon-help preconfiguredVariablesHelp"},null,-1),Qt={class:"collection-header"},en={class:"title"},tn=["textContent"],nn={class:"secondary-content"},an=["title"],rn={class:"ui-confirm",id:"confirmDeleteVariable",ref:"confirmDeleteVariable"},on=["value"],ln=["value"],cn={class:"ui-confirm",id:"confirmDeleteVariableNotPossible",ref:"confirmDeleteVariableNotPossible"},sn={class:"collection"},dn=["value"];function un(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",St,[Object(r["createVNode"])(c,{feature:"Tag Manager",class:"tagManagerCustomVariablesList","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableUsageBenefits")),1),Object(r["createElementVNode"])("div",wt,[Object(r["withDirectives"])(Object(r["createVNode"])(l,{uicontrol:"text",name:"variableSearch",title:e.translate("General_Search"),modelValue:e.variableSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.variableSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.variables.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,kt),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,Mt),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,_t),Object(r["createElementVNode"])("th",{class:"lookupTable",title:e.lookupTableTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LookupTable")),9,Dt),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,At),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,xt),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Bt,[Object(r["createElementVNode"])("span",Lt,[Ut,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Pt,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoVariablesFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerVariableNow",onClick:t[1]||(t[1]=function(t){return e.createVariable()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariableNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&!e.variables.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"variable".concat(t.idvariable),class:"variables",key:t.idvariable},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Ft),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Ht),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,Gt),Object(r["createElementVNode"])("td",$t,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Rt,null,512),[[r["vShow"],t.lookup_table.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,qt),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",zt,[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editVariable(t.idvariable,t.type)},title:e.translate("TagManager_EditVariable")},null,8,Wt),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteVariable(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Variable"))},null,8,Xt)],512),[[r["vShow"],e.hasWriteAccess]])],8,It)})),128))])],512),[[s]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Kt,[Object(r["createElementVNode"])("a",{class:"createNewVariable",value:"",onClick:t[2]||(t[2]=function(t){return e.createVariable()})},[Jt,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("h2",{title:e.translate("TagManager_PreConfiguredInfoTitle")},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_PreconfiguredVariables"))+" ",1),Zt],8,Yt),Object(r["createElementVNode"])("div",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containerVariables,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:t},[Object(r["createElementVNode"])("li",Qt,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(e.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.types,(function(e){return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:e.id},[Object(r["createElementVNode"])("span",en,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.name)+" ",1),Object(r["createElementVNode"])("span",{class:"variableId",textContent:Object(r["toDisplayString"])("{{".concat(e.id,"}}"))},null,8,tn)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",nn,[Object(r["createElementVNode"])("i",{class:"icon-help",title:e.description},null,8,an)],512),[[r["vShow"],!!e.description]])],512)),[[r["vShow"],e.is_pre_configured]])})),128))])})),128))]),Object(r["createElementVNode"])("div",rn,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteVariableConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,on),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ln)],512),Object(r["createElementVNode"])("div",cn,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableCannotBeDeleted")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableBeingUsedBy")),1),Object(r["createElementVNode"])("ul",sn,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.variableReferences,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:"".concat(e.referenceType,".").concat(e.referenceId)},Object(r["toDisplayString"])(e.referenceTypeName)+": "+Object(r["toDisplayString"])(e.referenceName),1)})),128))]),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableBeingUsedNeedsRemove")),1),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,dn)],512)])}function gn(e){return hn(e)||pn(e)||mn(e)||bn()}function bn(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mn(e,t){if(e){if("string"===typeof e)return fn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fn(e,t):void 0}}function pn(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function hn(e){if(Array.isArray(e))return fn(e)}function fn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.name?1:0})),t},nameTranslatedText:function(){return this.translate("TagManager_VariablesNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_VariablesDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_VariablesTypeDescription")},lookupTableTranslatedText:function(){return this.translate("TagManager_VariablesLookupTableDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_VariablesLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_VariablesActionDescription")}}});On.render=un;var Tn=On,yn={class:"manageVariable"},Vn={key:0},Cn={key:1};function Nn(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("VariableList"),c=Object(r["resolveComponent"])("VariableEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",yn,[e.editMode?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vn,[Object(r["createVNode"])(l,{"id-container-version":e.idContainerVersion,"id-container":e.idContainer,"variables-help-text":e.variablesHelpText},null,8,["id-container-version","id-container","variables-help-text"])])),e.editMode?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Cn,[Object(r["createVNode"])(c,{"id-container-version":e.idContainerVersion,"id-container":e.idContainer,"id-variable":e.idVariable},null,8,["id-container-version","id-container","id-variable"])])):Object(r["createCommentVNode"])("",!0)])}var En=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,variablesHelpText:String},components:{VariableList:Tn,VariableEdit:Et},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idVariable}),(function(t){e.onIdVariableParamChange(t)})),u["NotificationsStore"].remove("variablevariablemanagement"),this.onIdVariableParamChange(u["MatomoUrl"].hashParsed.value.idVariable)},methods:{onIdVariableParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVariable",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idVariable:function(){var e=u["MatomoUrl"].hashParsed.value.idVariable;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idVariable}}});En.render=Nn;var Sn=En;function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kn={class:"editTrigger tagManagerManageEdit",ref:"root"},Mn={class:"loadingPiwik"},_n=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Dn={class:"loadingPiwik"},An=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),xn={class:"form-group row"},Bn={class:"col s12"},Ln={key:0},Un={class:"form-group row"},Pn={class:"col s12"},In={class:"form-group row multiple"},Fn={class:"col s12 input-field m6"},Hn={class:"col s12 input-field m6"},Gn={class:"form-help"},$n=["innerHTML"],Rn={class:"col s12 m12"},qn={class:"innerFormField"},zn={class:"innerFormField comparisonField"},Wn={class:"innerFormField"},Xn=["onClick","title"],Kn={class:"triggerConditionNode"},Jn={class:"entityCancel"},Yn={id:"confirmSelectTriggerType"},Zn={class:"collection-header"},Qn=["onClick","title"],ea=["src"],ta={class:"title"},na={class:"secondary-content"},aa=["title"],ia={class:"entityCancel"};function ra(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("GroupedSettings"),s=Object(r["resolveComponent"])("SaveButton"),d=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",kn,[Object(r["createVNode"])(d,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n,a,i,o,d;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Mn,[_n,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Dn,[An,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("form",{onSubmit:t[5]||(t[5]=function(t){return e.edit?e.updateTrigger():e.createTrigger()})},[Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTriggerDisabled]]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","model-value":e.trigger.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.trigger.name=t,e.setValueHasChanged()}),maxlength:255,title:e.translate("General_Name"),"inline-help":e.translate("TagManager_TriggerNameHelp"),placeholder:e.translate("TagManager_TriggerNamePlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.trigger.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.trigger.description=t,e.setValueHasChanged()}),maxlength:1e3,title:e.translate("TagManager_Description"),"inline-help":e.translate("TagManager_TriggerDescriptionHelp"),placeholder:e.translate("TagManager_TriggerDescriptionPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",xn,[Object(r["createElementVNode"])("div",Bn,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureThisTrigger")),1)])],512),[[r["vShow"],null===(n=e.trigger.typeMetadata)||void 0===n||null===(a=n.parameters)||void 0===a?void 0:a.length]]),e.trigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ln,[Object(r["createVNode"])(c,{settings:(null===(i=e.trigger.typeMetadata)||void 0===i?void 0:i.parameters)||[],"all-setting-values":e.parameterValues,onChange:t[2]||(t[2]=function(t){return e.parameterValues[t.name]=t.value})},null,8,["settings","all-setting-values"])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Un,[Object(r["createElementVNode"])("div",Pn,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_OnlyTriggerWhen"))+" "+Object(r["toDisplayString"])(e.translate("Goals_Optional")),1)])],512),[[r["vShow"],null===(o=e.trigger.typeMetadata)||void 0===o?void 0:o.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",In,[Object(r["createElementVNode"])("div",Fn,[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerConditionsHelp")),1)]),Object(r["createElementVNode"])("div",Hn,[Object(r["createElementVNode"])("div",Gn,[Object(r["createElementVNode"])("span",{class:"inline-help",innerHTML:e.$sanitize(e.triggerInlineHelpText)},null,8,$n)])]),Object(r["createElementVNode"])("div",Rn,[Object(r["createElementVNode"])("div",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.trigger.conditions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n,class:Object(r["normalizeClass"])(["condition multiple valign-wrapper","condition".concat(n)])},[Object(r["createElementVNode"])("div",qn,[Object(r["createVNode"])(l,{uicontrol:"expandable-select",name:"condition_actual","model-value":t.actual,"onUpdate:modelValue":function(n){t.actual=n,e.setValueHasChanged()},"full-width":!0,options:e.availableVariables,title:e.variableIdToName[t.actual]||t.actual},null,8,["model-value","onUpdate:modelValue","options","title"])]),Object(r["createElementVNode"])("div",zn,[Object(r["createVNode"])(l,{uicontrol:"select",name:"condition_comparison","model-value":t.comparison,"onUpdate:modelValue":function(n){t.comparison=n,e.setValueHasChanged()},"full-width":!0,options:e.availableComparisons},null,8,["model-value","onUpdate:modelValue","options"])]),Object(r["createElementVNode"])("div",Wn,[Object(r["createVNode"])(l,{uicontrol:"text",name:"condition_expected","model-value":t.expected,"onUpdate:modelValue":function(n){t.expected=n,e.setValueHasChanged(),e.onConditionChange()},"full-width":!0},null,8,["model-value","onUpdate:modelValue"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeConditionEntry(n)},title:e.translate("General_Remove")},null,8,Xn),[[r["vShow"],!(n+1===e.trigger.conditions.length)]])],2)})),128))]),Object(r["createElementVNode"])("p",Kn,Object(r["toDisplayString"])(e.translate("TagManager_TriggerConditionNode")),1)])])],512),[[r["vShow"],null===(d=e.trigger.typeMetadata)||void 0===d?void 0:d.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTriggerDisabled]]),Object(r["withDirectives"])(Object(r["createVNode"])(s,{class:"createButton",onConfirm:t[3]||(t[3]=function(t){return e.edit?e.updateTrigger():e.createTrigger()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.saveButtonText},null,8,["disabled","saving","value"]),[[r["vShow"],!e.isTriggerDisabled]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Jn,[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])])],544),[[r["vShow"],!e.chooseTriggerType&&e.editTitle]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Yn,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.availableTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:n},[Object(r["createElementVNode"])("li",Zn,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(t.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.types,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["collection-item avatar",wn({disabledTemplate:e.isTriggerTemplateDisabled[t.id]},"templateType".concat(t.id),!0)]),onClick:function(n){return e.createTriggerType(t)},key:n,title:e.isTriggerTemplateDisabled[t.id]?e.collectionItemAvatarText:""},[t.icon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",{key:0,alt:"",class:"circle",src:t.icon},null,8,ea)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("span",ta,Object(r["toDisplayString"])(t.name),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(t.description),513),[[r["vShow"],t.description]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",na,[Object(r["createElementVNode"])("i",{class:"icon-help",title:t.help},null,8,aa)],512),[[r["vShow"],!!t.help]])],10,Qn)})),128))])})),128)),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ia,[Object(r["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])],512),[[r["vShow"],e.chooseTriggerType]])]})),_:1},8,["content-title"])],512)}function oa(e,t){return sa(e)||ca(e,t)||ba(e,t)||la()}function la(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ca(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done);o=!0)if(r.push(a.value),t&&r.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return r}}function sa(e){if(Array.isArray(e))return e}function da(e){return da="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},da(e)}function ua(e){return pa(e)||ma(e)||ba(e)||ga()}function ga(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ba(e,t){if(e){if("string"===typeof e)return ha(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ha(e,t):void 0}}function ma(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function pa(e){if(Array.isArray(e))return ha(e)}function ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n-1&&(this.variable.lookup_table.splice(e,1),this.isDirty=!0)},createVariableType:function(e){var t,n=this;e&&this.isVariableTemplateDisabled[e.id]||(this.chooseVariableType=!1,this.editTitle=Object(u["translate"])("TagManager_CreateNewVariable"),this.variable={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:ft.suggestNameForType(e.name)||"",description:"",type:e.id,idcontainer:this.idContainer,idcontainerversion:this.idContainerVersion,default_value:"",lookup_table:[],typeMetadata:e},null!==(t=this.variable.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.variable.typeMetadata.name)),this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.addLookUpEntry(),this.isDirty=!0,Object(r["nextTick"])((function(){if(n.$refs.root){var e=n.$refs.root;e.scrollIntoView();var t=e.querySelector("#name");t&&t.focus()}})))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idVariable,u["MatomoUrl"].updateHash(e)},createVariable:function(){var e=this;this.removeAnyVariableNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVar=!0,ft.createOrUpdateVariable(Object.assign(Object.assign({},this.variable),{},{name:encodeURIComponent(this.variable.name)}),"TagManager.addContainerVariable",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t){e.isDirty=!1;var n=t.value;ft.reload(e.idContainer,e.idContainerVersion).then((function(){if(e.isEmbedded)return e.variable.idvariable=n,void e.$emit("changeVariable",{variable:e.variable});e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Variable")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)}))}})).finally((function(){e.isUpdatingVar=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateVariable:function(){var e=this;this.removeAnyVariableNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVar=!0,ft.createOrUpdateVariable(Object.assign(Object.assign({},this.variable),{},{name:encodeURIComponent(this.variable.name)}),"TagManager.updateContainerVariable",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t)if(e.isEmbedded)e.$emit("changeVariable",{variable:e.variable});else{e.isDirty=!1,ft.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdVariable()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Variable")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingVar=!1})))},checkRequiredFieldsAreSet:function(){return!!this.variable.name||(this.showErrorFieldNotProvidedNotification(Object(u["translate"])("General_Name")),!1)},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{typeInlineHelp:function(){var e,t,n=(null===(e=this.variable.typeMetadata)||void 0===e?void 0:e.description)||"",a=(null===(t=this.variable.typeMetadata)||void 0===t?void 0:t.help)||"";return"".concat(n," ").concat(a)},create:function(){return 0===this.idVariable},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVar},availableLookUpComparisons:function(){return Vt.comparisonOptions.value},isVariableTemplateDisabled:function(){var e=this,t={};return this.availableVariables.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},isVariableDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.variable.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},variableParameterValues:function(){var e;return null!==(e=this.variable.typeMetadata)&&void 0!==e&&e.parameters?this.parameterValues:null},variableLookupTable:function(){return this.variable.lookup_table}}});Nt.render=et;var Et=Nt,St={class:"tagManagerManageList tagManagerVariableList"},wt={class:"variableSearchFilter"},kt=["title"],Mt=["title"],_t=["title"],Dt=["title"],At=["title"],xt=["title"],Bt={colspan:"7"},Lt={class:"loadingPiwik"},Ut=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Pt={colspan:"7"},It=["id"],Ft=["title"],Ht=["title"],Gt=["title"],$t={class:"lookupTable"},Rt={class:"icon-ok"},qt=["title"],zt=["onClick","title"],Wt=["onClick","title"],Xt=["onClick","title"],Kt={class:"tableActionBar"},Jt=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Yt=["title"],Zt=Object(r["createElementVNode"])("span",{class:"icon-help preconfiguredVariablesHelp"},null,-1),Qt={class:"collection-header"},en={class:"title"},tn=["textContent"],nn={class:"secondary-content"},an=["title"],rn={class:"ui-confirm",id:"confirmDeleteVariable",ref:"confirmDeleteVariable"},on=["value"],ln=["value"],cn={class:"ui-confirm",id:"confirmDeleteVariableNotPossible",ref:"confirmDeleteVariableNotPossible"},sn={class:"collection"},dn=["value"];function un(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",St,[Object(r["createVNode"])(c,{feature:"Tag Manager",class:"tagManagerCustomVariablesList","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableUsageBenefits")),1),Object(r["createElementVNode"])("div",wt,[Object(r["withDirectives"])(Object(r["createVNode"])(l,{uicontrol:"text",name:"variableSearch",title:e.translate("General_Search"),modelValue:e.variableSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.variableSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.variables.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,kt),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,Mt),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,_t),Object(r["createElementVNode"])("th",{class:"lookupTable",title:e.lookupTableTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LookupTable")),9,Dt),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,At),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,xt),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Bt,[Object(r["createElementVNode"])("span",Lt,[Ut,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Pt,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoVariablesFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerVariableNow",onClick:t[1]||(t[1]=function(t){return e.createVariable()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariableNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&!e.variables.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"variable".concat(t.idvariable),class:"variables",key:t.idvariable},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Ft),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Ht),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,Gt),Object(r["createElementVNode"])("td",$t,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Rt,null,512),[[r["vShow"],t.lookup_table.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,qt),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editVariable(t.idvariable,t.type)},title:e.translate("TagManager_EditVariable")},null,8,zt),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteVariable(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Variable"))},null,8,Wt),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Variable"))},null,8,Xt),[[r["vShow"],e.hasPublishCapability()]])],2),[[r["vShow"],e.hasWriteAccess]])],8,It)})),128))])],512),[[s]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Kt,[Object(r["createElementVNode"])("a",{class:"createNewVariable",value:"",onClick:t[2]||(t[2]=function(t){return e.createVariable()})},[Jt,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("h2",{title:e.translate("TagManager_PreConfiguredInfoTitle")},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_PreconfiguredVariables"))+" ",1),Zt],8,Yt),Object(r["createElementVNode"])("div",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containerVariables,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:t},[Object(r["createElementVNode"])("li",Qt,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(e.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.types,(function(e){return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:e.id},[Object(r["createElementVNode"])("span",en,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.name)+" ",1),Object(r["createElementVNode"])("span",{class:"variableId",textContent:Object(r["toDisplayString"])("{{".concat(e.id,"}}"))},null,8,tn)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",nn,[Object(r["createElementVNode"])("i",{class:"icon-help",title:e.description},null,8,an)],512),[[r["vShow"],!!e.description]])],512)),[[r["vShow"],e.is_pre_configured]])})),128))])})),128))]),Object(r["createElementVNode"])("div",rn,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteVariableConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,on),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ln)],512),Object(r["createElementVNode"])("div",cn,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableCannotBeDeleted")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableBeingUsedBy")),1),Object(r["createElementVNode"])("ul",sn,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.variableReferences,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:"".concat(e.referenceType,".").concat(e.referenceId)},Object(r["toDisplayString"])(e.referenceTypeName)+": "+Object(r["toDisplayString"])(e.referenceName),1)})),128))]),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableBeingUsedNeedsRemove")),1),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,dn)],512)])}function gn(e){return hn(e)||pn(e)||mn(e)||bn()}function bn(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mn(e,t){if(e){if("string"===typeof e)return fn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fn(e,t):void 0}}function pn(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function hn(e){if(Array.isArray(e))return fn(e)}function fn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.name?1:0})),t},nameTranslatedText:function(){return this.translate("TagManager_VariablesNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_VariablesDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_VariablesTypeDescription")},lookupTableTranslatedText:function(){return this.translate("TagManager_VariablesLookupTableDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_VariablesLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_VariablesActionDescription")},getActionClasses:function(){var e=this.hasPublishCapability()?" hasCopyAction":"";return"action".concat(e)}}});On.render=un;var Tn=On,yn={class:"manageVariable"},Vn={key:0},Cn={key:1};function Nn(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("VariableList"),c=Object(r["resolveComponent"])("VariableEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",yn,[e.editMode?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vn,[Object(r["createVNode"])(l,{"id-container-version":e.idContainerVersion,"id-container":e.idContainer,"variables-help-text":e.variablesHelpText},null,8,["id-container-version","id-container","variables-help-text"])])),e.editMode?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Cn,[Object(r["createVNode"])(c,{"id-container-version":e.idContainerVersion,"id-container":e.idContainer,"id-variable":e.idVariable},null,8,["id-container-version","id-container","id-variable"])])):Object(r["createCommentVNode"])("",!0)])}var En=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,variablesHelpText:String},components:{VariableList:Tn,VariableEdit:Et},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idVariable}),(function(t){e.onIdVariableParamChange(t)})),u["NotificationsStore"].remove("variablevariablemanagement"),this.onIdVariableParamChange(u["MatomoUrl"].hashParsed.value.idVariable)},methods:{onIdVariableParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVariable",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idVariable:function(){var e=u["MatomoUrl"].hashParsed.value.idVariable;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idVariable}}});En.render=Nn;var Sn=En;function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kn={class:"editTrigger tagManagerManageEdit",ref:"root"},Mn={class:"loadingPiwik"},_n=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Dn={class:"loadingPiwik"},An=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),xn={class:"form-group row"},Bn={class:"col s12"},Ln={key:0},Un={class:"form-group row"},Pn={class:"col s12"},In={class:"form-group row multiple"},Fn={class:"col s12 input-field m6"},Hn={class:"col s12 input-field m6"},Gn={class:"form-help"},$n=["innerHTML"],Rn={class:"col s12 m12"},qn={class:"innerFormField"},zn={class:"innerFormField comparisonField"},Wn={class:"innerFormField"},Xn=["onClick","title"],Kn={class:"triggerConditionNode"},Jn={class:"entityCancel"},Yn={id:"confirmSelectTriggerType"},Zn={class:"collection-header"},Qn=["onClick","title"],ea=["src"],ta={class:"title"},na={class:"secondary-content"},aa=["title"],ia={class:"entityCancel"};function ra(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("GroupedSettings"),s=Object(r["resolveComponent"])("SaveButton"),d=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",kn,[Object(r["createVNode"])(d,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n,a,i,o,d;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Mn,[_n,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Dn,[An,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("form",{onSubmit:t[5]||(t[5]=function(t){return e.edit?e.updateTrigger():e.createTrigger()})},[Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTriggerDisabled]]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","model-value":e.trigger.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.trigger.name=t,e.setValueHasChanged()}),maxlength:255,title:e.translate("General_Name"),"inline-help":e.translate("TagManager_TriggerNameHelp"),placeholder:e.translate("TagManager_TriggerNamePlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.trigger.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.trigger.description=t,e.setValueHasChanged()}),maxlength:1e3,title:e.translate("TagManager_Description"),"inline-help":e.translate("TagManager_TriggerDescriptionHelp"),placeholder:e.translate("TagManager_TriggerDescriptionPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",xn,[Object(r["createElementVNode"])("div",Bn,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureThisTrigger")),1)])],512),[[r["vShow"],null===(n=e.trigger.typeMetadata)||void 0===n||null===(a=n.parameters)||void 0===a?void 0:a.length]]),e.trigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ln,[Object(r["createVNode"])(c,{settings:(null===(i=e.trigger.typeMetadata)||void 0===i?void 0:i.parameters)||[],"all-setting-values":e.parameterValues,onChange:t[2]||(t[2]=function(t){return e.parameterValues[t.name]=t.value})},null,8,["settings","all-setting-values"])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Un,[Object(r["createElementVNode"])("div",Pn,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_OnlyTriggerWhen"))+" "+Object(r["toDisplayString"])(e.translate("Goals_Optional")),1)])],512),[[r["vShow"],null===(o=e.trigger.typeMetadata)||void 0===o?void 0:o.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",In,[Object(r["createElementVNode"])("div",Fn,[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerConditionsHelp")),1)]),Object(r["createElementVNode"])("div",Hn,[Object(r["createElementVNode"])("div",Gn,[Object(r["createElementVNode"])("span",{class:"inline-help",innerHTML:e.$sanitize(e.triggerInlineHelpText)},null,8,$n)])]),Object(r["createElementVNode"])("div",Rn,[Object(r["createElementVNode"])("div",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.trigger.conditions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n,class:Object(r["normalizeClass"])(["condition multiple valign-wrapper","condition".concat(n)])},[Object(r["createElementVNode"])("div",qn,[Object(r["createVNode"])(l,{uicontrol:"expandable-select",name:"condition_actual","model-value":t.actual,"onUpdate:modelValue":function(n){t.actual=n,e.setValueHasChanged()},"full-width":!0,options:e.availableVariables,title:e.variableIdToName[t.actual]||t.actual},null,8,["model-value","onUpdate:modelValue","options","title"])]),Object(r["createElementVNode"])("div",zn,[Object(r["createVNode"])(l,{uicontrol:"select",name:"condition_comparison","model-value":t.comparison,"onUpdate:modelValue":function(n){t.comparison=n,e.setValueHasChanged()},"full-width":!0,options:e.availableComparisons},null,8,["model-value","onUpdate:modelValue","options"])]),Object(r["createElementVNode"])("div",Wn,[Object(r["createVNode"])(l,{uicontrol:"text",name:"condition_expected","model-value":t.expected,"onUpdate:modelValue":function(n){t.expected=n,e.setValueHasChanged(),e.onConditionChange()},"full-width":!0},null,8,["model-value","onUpdate:modelValue"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeConditionEntry(n)},title:e.translate("General_Remove")},null,8,Xn),[[r["vShow"],!(n+1===e.trigger.conditions.length)]])],2)})),128))]),Object(r["createElementVNode"])("p",Kn,Object(r["toDisplayString"])(e.translate("TagManager_TriggerConditionNode")),1)])])],512),[[r["vShow"],null===(d=e.trigger.typeMetadata)||void 0===d?void 0:d.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTriggerDisabled]]),Object(r["withDirectives"])(Object(r["createVNode"])(s,{class:"createButton",onConfirm:t[3]||(t[3]=function(t){return e.edit?e.updateTrigger():e.createTrigger()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.saveButtonText},null,8,["disabled","saving","value"]),[[r["vShow"],!e.isTriggerDisabled]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Jn,[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])])],544),[[r["vShow"],!e.chooseTriggerType&&e.editTitle]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Yn,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.availableTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:n},[Object(r["createElementVNode"])("li",Zn,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(t.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.types,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["collection-item avatar",wn({disabledTemplate:e.isTriggerTemplateDisabled[t.id]},"templateType".concat(t.id),!0)]),onClick:function(n){return e.createTriggerType(t)},key:n,title:e.isTriggerTemplateDisabled[t.id]?e.collectionItemAvatarText:""},[t.icon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",{key:0,alt:"",class:"circle",src:t.icon},null,8,ea)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("span",ta,Object(r["toDisplayString"])(t.name),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(t.description),513),[[r["vShow"],t.description]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",na,[Object(r["createElementVNode"])("i",{class:"icon-help",title:t.help},null,8,aa)],512),[[r["vShow"],!!t.help]])],10,Qn)})),128))])})),128)),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ia,[Object(r["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])],512),[[r["vShow"],e.chooseTriggerType]])]})),_:1},8,["content-title"])],512)}function oa(e,t){return sa(e)||ca(e,t)||ba(e,t)||la()}function la(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ca(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done);o=!0)if(r.push(a.value),t&&r.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return r}}function sa(e){if(Array.isArray(e))return e}function da(e){return da="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},da(e)}function ua(e){return pa(e)||ma(e)||ba(e)||ga()}function ga(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ba(e,t){if(e){if("string"===typeof e)return ha(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ha(e,t):void 0}}function ma(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function pa(e){if(Array.isArray(e))return ha(e)}function ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n{{ variable.updated_date_pretty }} + @@ -314,6 +323,20 @@ export default defineComponent({ truncateText(text: string, length: number) { return tagManagerHelper.truncateText(text, length); }, + hasPublishCapability() { + return Matomo.hasUserCapability('tagmanager_write') && Matomo.hasUserCapability('tagmanager_use_custom_templates'); + }, + openCopyDialog(variable: Variable) { + const url = MatomoUrl.stringify({ + module: 'TagManager', + action: 'copyVariableDialog', + idSite: variable.idsite, + idContainer: this.idContainer, + idVariable: variable.idvariable, + idContainerVersion: this.idContainerVersion, + }); + window.Piwik_Popover.createPopupAndLoadUrl(url, '', 'mtmCopyVariable'); + }, }, computed: { isLoading() { @@ -370,6 +393,10 @@ export default defineComponent({ actionTranslatedText(): string { return this.translate('TagManager_VariablesActionDescription'); }, + getActionClasses(): string { + const copyClass = this.hasPublishCapability() ? ' hasCopyAction' : ''; + return `action${copyClass}`; + }, }, }); From fe8bd099f7379b0859f0ba8c99f762c5c92cb047 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 27 Nov 2024 21:58:50 +1300 Subject: [PATCH 05/10] A little cleanup --- Model/Variable.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Model/Variable.php b/Model/Variable.php index 524714cf8..500fd3f1a 100644 --- a/Model/Variable.php +++ b/Model/Variable.php @@ -519,11 +519,10 @@ private function copyVariableByName(array $variable, int $idSite, int $idContain throw new \Exception('Variable name cannot be empty'); } - $variableName = $variable['name']; - + $this->copyReferencedVariables($variable, $idSite, $idContainerVersion, $idDestinationSite, $idDestinationContainerVersion); // Insert the new variable - $newVarName = $this->dao->makeCopyNameUnique($idDestinationSite, $variableName, $idDestinationContainerVersion); + $newVarName = $this->dao->makeCopyNameUnique($idDestinationSite, $variable['name'], $idDestinationContainerVersion); $this->addContainerVariable( $idDestinationSite, $idDestinationContainerVersion, From cafcd2aa3fc42c165a19135f3fe8378f4bef6ae5 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 27 Nov 2024 22:05:01 +1300 Subject: [PATCH 06/10] Updating screenshots after adding copy for variables --- .../ContainerVariable_confirm_delete_variable_confirmed.png | 4 ++-- .../ContainerVariable_confirm_delete_variable_declined.png | 4 ++-- .../ContainerVariable_create_advanced_verified.png | 4 ++-- .../ContainerVariable_create_new_long_name.png | 4 ++-- .../ContainerVariable_create_new_shown_in_list.png | 4 ++-- .../ContainerVariable_edit_updated_back_to_list.png | 4 ++-- .../ContainerVariable_variable_search_description.png | 4 ++-- .../ContainerVariable_variable_search_name.png | 4 ++-- .../ContainerVariable_variable_search_type.png | 4 ++-- .../ContainerVariable_variable_some_exist.png | 4 ++-- 10 files changed, 20 insertions(+), 20 deletions(-) diff --git a/tests/UI/expected-screenshots/ContainerVariable_confirm_delete_variable_confirmed.png b/tests/UI/expected-screenshots/ContainerVariable_confirm_delete_variable_confirmed.png index cf75a531e..d19d2317a 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_confirm_delete_variable_confirmed.png +++ b/tests/UI/expected-screenshots/ContainerVariable_confirm_delete_variable_confirmed.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:055c539a53d0f10bfeb0d61f1d88d4ddec76e397654f00433b73ae8cca3aad9b -size 44913 +oid sha256:d2bec8d1657706caaada756f2f99b1445dc2ddf1fea5e043690dda2f57618cb4 +size 45939 diff --git a/tests/UI/expected-screenshots/ContainerVariable_confirm_delete_variable_declined.png b/tests/UI/expected-screenshots/ContainerVariable_confirm_delete_variable_declined.png index 76bdf7387..64b8276ac 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_confirm_delete_variable_declined.png +++ b/tests/UI/expected-screenshots/ContainerVariable_confirm_delete_variable_declined.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9054e60c2d8e1ba457c1205b018931a27b6af30386b501c126d731ad7d6be11 -size 48270 +oid sha256:320165a378d99bdf97015c6848bea3db3685ebfb89cf66e6fc271fe0c5bade30 +size 49434 diff --git a/tests/UI/expected-screenshots/ContainerVariable_create_advanced_verified.png b/tests/UI/expected-screenshots/ContainerVariable_create_advanced_verified.png index eed525661..329c91a2d 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_create_advanced_verified.png +++ b/tests/UI/expected-screenshots/ContainerVariable_create_advanced_verified.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:a8e6e419bbb734fc87b280de9ffd9907c85237c0cfa3f7d3cea5ba021db12386 -size 36023 +oid sha256:107a443649876076189d0d99c101af374c3b9b9b5472ca9fb6f30522eeb5a21a +size 36705 diff --git a/tests/UI/expected-screenshots/ContainerVariable_create_new_long_name.png b/tests/UI/expected-screenshots/ContainerVariable_create_new_long_name.png index d5dadcca3..da5592c16 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_create_new_long_name.png +++ b/tests/UI/expected-screenshots/ContainerVariable_create_new_long_name.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:677cdb9853dec4338f640ac63dfae16801a384bc4cf6ae17d0631dbb96c9f569 -size 51168 +oid sha256:66ce7eaa80b4acf16a4952ed4913d47e563c5f1389c36b14aca9c9602bb86eb8 +size 52853 diff --git a/tests/UI/expected-screenshots/ContainerVariable_create_new_shown_in_list.png b/tests/UI/expected-screenshots/ContainerVariable_create_new_shown_in_list.png index 33187a49f..5b49a2188 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_create_new_shown_in_list.png +++ b/tests/UI/expected-screenshots/ContainerVariable_create_new_shown_in_list.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ef8573603ab7ccf770dab48aaad32516f29ce99f6267bce8a0be891245b8d7e3 -size 47757 +oid sha256:24c419294d2485e35caadf058a4a3f440adb59c01ec3875145071efecb9ffde3 +size 49245 diff --git a/tests/UI/expected-screenshots/ContainerVariable_edit_updated_back_to_list.png b/tests/UI/expected-screenshots/ContainerVariable_edit_updated_back_to_list.png index 76bdf7387..64b8276ac 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_edit_updated_back_to_list.png +++ b/tests/UI/expected-screenshots/ContainerVariable_edit_updated_back_to_list.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c9054e60c2d8e1ba457c1205b018931a27b6af30386b501c126d731ad7d6be11 -size 48270 +oid sha256:320165a378d99bdf97015c6848bea3db3685ebfb89cf66e6fc271fe0c5bade30 +size 49434 diff --git a/tests/UI/expected-screenshots/ContainerVariable_variable_search_description.png b/tests/UI/expected-screenshots/ContainerVariable_variable_search_description.png index 5832bd590..91095b76e 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_variable_search_description.png +++ b/tests/UI/expected-screenshots/ContainerVariable_variable_search_description.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b8abcb28fdd634f12847d51384b936712195011d17417d976bf851aa2dbc93b -size 430447 +oid sha256:dad897c947be122f47078f3d22dda29fe165c81a43c04cf22f0de6be822072e7 +size 430925 diff --git a/tests/UI/expected-screenshots/ContainerVariable_variable_search_name.png b/tests/UI/expected-screenshots/ContainerVariable_variable_search_name.png index e4e3a4dd2..d9d11dc36 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_variable_search_name.png +++ b/tests/UI/expected-screenshots/ContainerVariable_variable_search_name.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:4a2ce4a42ba1bcb1bbea9d453a9984ccd323dda15f82ac0c3f1b2fe012f686aa -size 426748 +oid sha256:348d61ff6a14c933e3e4e6b034166b15de94efff27dafc0ce534ef0809770c3b +size 426357 diff --git a/tests/UI/expected-screenshots/ContainerVariable_variable_search_type.png b/tests/UI/expected-screenshots/ContainerVariable_variable_search_type.png index 876157c7c..9f0000e04 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_variable_search_type.png +++ b/tests/UI/expected-screenshots/ContainerVariable_variable_search_type.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e9a6ccf4c728c7b209c779ad670cf53b9aa8ea05fa71ce2c267a580a3be034ee -size 436495 +oid sha256:f1050d91fcf766b821b551f6f7b6b48a3ddf51d3bb495ccff0ffccec9f1e4a8e +size 437152 diff --git a/tests/UI/expected-screenshots/ContainerVariable_variable_some_exist.png b/tests/UI/expected-screenshots/ContainerVariable_variable_some_exist.png index fa82939e9..66d4e4e1b 100644 --- a/tests/UI/expected-screenshots/ContainerVariable_variable_some_exist.png +++ b/tests/UI/expected-screenshots/ContainerVariable_variable_some_exist.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:e69091614bb609b56edfa70ee78e94d47ad5c999a30dc416c4b6abed7f34e6cc -size 435111 +oid sha256:14f0f678765146a31e6827aeedf6194303fd68ed22d6af5c6d57e5431203c3cb +size 435969 From 99e80f91c3e608e4958787e8e796d79cad9dbe85 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Wed, 27 Nov 2024 22:37:26 +1300 Subject: [PATCH 07/10] Adding check to make sure that user has view access for site on top of MTM capabilities --- Controller.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Controller.php b/Controller.php index 562252386..fef773140 100644 --- a/Controller.php +++ b/Controller.php @@ -398,6 +398,7 @@ public function copyContainer() public function copyTagDialog() { + $this->checkSitePermission(); $this->accessValidator->checkWriteCapability($this->idSite); $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); @@ -421,6 +422,7 @@ public function copyTagDialog() public function copyTag() { + $this->checkSitePermission(); $this->accessValidator->checkWriteCapability($this->idSite); $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); Nonce::checkNonce(self::COPY_TAG_NONCE); @@ -448,6 +450,7 @@ public function copyTag() public function copyTriggerDialog() { + $this->checkSitePermission(); $this->accessValidator->checkWriteCapability($this->idSite); $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); @@ -471,6 +474,7 @@ public function copyTriggerDialog() public function copyTrigger() { + $this->checkSitePermission(); $this->accessValidator->checkWriteCapability($this->idSite); $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); Nonce::checkNonce(self::COPY_TRIGGER_NONCE); @@ -498,6 +502,7 @@ public function copyTrigger() public function copyVariableDialog() { + $this->checkSitePermission(); $this->accessValidator->checkWriteCapability($this->idSite); $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); @@ -521,6 +526,7 @@ public function copyVariableDialog() public function copyVariable() { + $this->checkSitePermission(); $this->accessValidator->checkWriteCapability($this->idSite); $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); Nonce::checkNonce(self::COPY_VARIABLE_NONCE); From aa2feb567b474d4fbf01a141fecb7c756e3eda92 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Thu, 28 Nov 2024 09:37:11 +1300 Subject: [PATCH 08/10] Hide success notification upon delete action --- vue/dist/TagManager.umd.js | 448 ++++++++++++++-------------- vue/dist/TagManager.umd.min.js | 8 +- vue/src/Container/ContainerList.vue | 2 + vue/src/Tag/TagList.vue | 1 + vue/src/Trigger/TriggerList.vue | 5 +- vue/src/Variable/VariableList.vue | 2 + 6 files changed, 239 insertions(+), 227 deletions(-) diff --git a/vue/dist/TagManager.umd.js b/vue/dist/TagManager.umd.js index d449b8981..d09beca55 100644 --- a/vue/dist/TagManager.umd.js +++ b/vue/dist/TagManager.umd.js @@ -2003,63 +2003,63 @@ var notificationId = 'tagvariablemanagement'; VariableEditvue_type_script_lang_ts.render = VariableEditvue_type_template_id_6ce63297_render /* harmony default export */ var VariableEdit = (VariableEditvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=template&id=d9faefa4 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=template&id=01892e51 -var VariableListvue_type_template_id_d9faefa4_hoisted_1 = { +var VariableListvue_type_template_id_01892e51_hoisted_1 = { class: "tagManagerManageList tagManagerVariableList" }; -var VariableListvue_type_template_id_d9faefa4_hoisted_2 = { +var VariableListvue_type_template_id_01892e51_hoisted_2 = { class: "variableSearchFilter" }; -var VariableListvue_type_template_id_d9faefa4_hoisted_3 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_4 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_5 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_6 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_7 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_8 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_9 = { +var VariableListvue_type_template_id_01892e51_hoisted_3 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_4 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_5 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_6 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_7 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_8 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_9 = { colspan: "7" }; -var VariableListvue_type_template_id_d9faefa4_hoisted_10 = { +var VariableListvue_type_template_id_01892e51_hoisted_10 = { class: "loadingPiwik" }; -var VariableListvue_type_template_id_d9faefa4_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var VariableListvue_type_template_id_01892e51_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1); -var VariableListvue_type_template_id_d9faefa4_hoisted_12 = { +var VariableListvue_type_template_id_01892e51_hoisted_12 = { colspan: "7" }; -var VariableListvue_type_template_id_d9faefa4_hoisted_13 = ["id"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_14 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_15 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_16 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_17 = { +var VariableListvue_type_template_id_01892e51_hoisted_13 = ["id"]; +var VariableListvue_type_template_id_01892e51_hoisted_14 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_15 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_16 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_17 = { class: "lookupTable" }; -var VariableListvue_type_template_id_d9faefa4_hoisted_18 = { +var VariableListvue_type_template_id_01892e51_hoisted_18 = { class: "icon-ok" }; -var VariableListvue_type_template_id_d9faefa4_hoisted_19 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_20 = ["onClick", "title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_21 = ["onClick", "title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_22 = ["onClick", "title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_23 = { +var VariableListvue_type_template_id_01892e51_hoisted_19 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_20 = ["onClick", "title"]; +var VariableListvue_type_template_id_01892e51_hoisted_21 = ["onClick", "title"]; +var VariableListvue_type_template_id_01892e51_hoisted_22 = ["onClick", "title"]; +var VariableListvue_type_template_id_01892e51_hoisted_23 = { class: "tableActionBar" }; -var VariableListvue_type_template_id_d9faefa4_hoisted_24 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var VariableListvue_type_template_id_01892e51_hoisted_24 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, " ", -1); -var VariableListvue_type_template_id_d9faefa4_hoisted_25 = ["title"]; +var VariableListvue_type_template_id_01892e51_hoisted_25 = ["title"]; -var VariableListvue_type_template_id_d9faefa4_hoisted_26 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var VariableListvue_type_template_id_01892e51_hoisted_26 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-help preconfiguredVariablesHelp" }, null, -1); -var VariableListvue_type_template_id_d9faefa4_hoisted_27 = { +var VariableListvue_type_template_id_01892e51_hoisted_27 = { class: "collection-header" }; var _hoisted_28 = { @@ -2086,21 +2086,21 @@ var _hoisted_36 = { class: "collection" }; var _hoisted_37 = ["value"]; -function VariableListvue_type_template_id_d9faefa4_render(_ctx, _cache, $props, $setup, $data, $options) { +function VariableListvue_type_template_id_01892e51_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", VariableListvue_type_template_id_d9faefa4_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", VariableListvue_type_template_id_01892e51_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { feature: "Tag Manager", class: "tagManagerCustomVariablesList", "content-title": _ctx.translate('TagManager_ManageX', _ctx.translate('TagManager_Variables')), "help-text": _ctx.variablesHelpText }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_VariableUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", VariableListvue_type_template_id_d9faefa4_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_VariableUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", VariableListvue_type_template_id_01892e51_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "variableSearch", title: _ctx.translate('General_Search'), @@ -2111,22 +2111,22 @@ function VariableListvue_type_template_id_d9faefa4_render(_ctx, _cache, $props, }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.variables.length > 0]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "name", title: _ctx.nameTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, VariableListvue_type_template_id_01892e51_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "description", title: _ctx.descriptionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, VariableListvue_type_template_id_01892e51_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "type", title: _ctx.typeTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, VariableListvue_type_template_id_01892e51_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "lookupTable", title: _ctx.lookupTableTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LookupTable')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LookupTable')), 9, VariableListvue_type_template_id_01892e51_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "lastUpdated", title: _ctx.lastUpdatedTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, VariableListvue_type_template_id_01892e51_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "action", title: _ctx.actionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, VariableListvue_type_template_id_d9faefa4_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_d9faefa4_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", VariableListvue_type_template_id_d9faefa4_hoisted_10, [VariableListvue_type_template_id_d9faefa4_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_d9faefa4_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoVariablesFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, VariableListvue_type_template_id_01892e51_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_01892e51_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", VariableListvue_type_template_id_01892e51_hoisted_10, [VariableListvue_type_template_id_01892e51_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_01892e51_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoVariablesFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createContainerVariableNow", onClick: _cache[1] || (_cache[1] = function ($event) { return _ctx.createVariable(); @@ -2139,16 +2139,16 @@ function VariableListvue_type_template_id_d9faefa4_render(_ctx, _cache, $props, }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "name", title: variable.name - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(variable.name, 50)), 9, VariableListvue_type_template_id_d9faefa4_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(variable.name, 50)), 9, VariableListvue_type_template_id_01892e51_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "description", title: variable.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(variable.description, 75)), 9, VariableListvue_type_template_id_d9faefa4_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(variable.description, 75)), 9, VariableListvue_type_template_id_01892e51_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "type", title: variable.typeMetadata.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variable.typeMetadata.name), 9, VariableListvue_type_template_id_d9faefa4_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_d9faefa4_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", VariableListvue_type_template_id_d9faefa4_hoisted_18, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], variable.lookup_table.length]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variable.typeMetadata.name), 9, VariableListvue_type_template_id_01892e51_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", VariableListvue_type_template_id_01892e51_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", VariableListvue_type_template_id_01892e51_hoisted_18, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], variable.lookup_table.length]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "lastUpdated", title: _ctx.translate('TagManager_CreatedOnX', variable.created_date_pretty) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variable.updated_date_pretty), 1)], 8, VariableListvue_type_template_id_d9faefa4_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variable.updated_date_pretty), 1)], 8, VariableListvue_type_template_id_01892e51_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.getActionClasses) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-edit", @@ -2156,35 +2156,35 @@ function VariableListvue_type_template_id_d9faefa4_render(_ctx, _cache, $props, return _ctx.editVariable(variable.idvariable, variable.type); }, title: _ctx.translate('TagManager_EditVariable') - }, null, 8, VariableListvue_type_template_id_d9faefa4_hoisted_20), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, VariableListvue_type_template_id_01892e51_hoisted_20), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-delete", onClick: function onClick($event) { return _ctx.deleteVariable(variable); }, title: _ctx.translate('TagManager_DeleteX', _ctx.translate('TagManager_Variable')) - }, null, 8, VariableListvue_type_template_id_d9faefa4_hoisted_21), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, VariableListvue_type_template_id_01892e51_hoisted_21), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-content-copy", onClick: function onClick($event) { return _ctx.openCopyDialog(variable); }, title: _ctx.translate('TagManager_CopyX', _ctx.translate('TagManager_Variable')) - }, null, 8, VariableListvue_type_template_id_d9faefa4_hoisted_22), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasPublishCapability()]])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, VariableListvue_type_template_id_d9faefa4_hoisted_13); - }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", VariableListvue_type_template_id_d9faefa4_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, VariableListvue_type_template_id_01892e51_hoisted_22), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasPublishCapability()]])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, VariableListvue_type_template_id_01892e51_hoisted_13); + }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", VariableListvue_type_template_id_01892e51_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createNewVariable", value: "", onClick: _cache[2] || (_cache[2] = function ($event) { return _ctx.createVariable(); }) - }, [VariableListvue_type_template_id_d9faefa4_hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewVariable')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; + }, [VariableListvue_type_template_id_01892e51_hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewVariable')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; }), _: 1 }, 8, ["content-title", "help-text"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", { title: _ctx.translate('TagManager_PreConfiguredInfoTitle') - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_PreconfiguredVariables')) + " ", 1), VariableListvue_type_template_id_d9faefa4_hoisted_26], 8, VariableListvue_type_template_id_d9faefa4_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.containerVariables, function (variableCategory, index) { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_PreconfiguredVariables')) + " ", 1), VariableListvue_type_template_id_01892e51_hoisted_26], 8, VariableListvue_type_template_id_01892e51_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.containerVariables, function (variableCategory, index) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("ul", { class: "collection with-header", key: index - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", VariableListvue_type_template_id_d9faefa4_hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h4", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variableCategory.name), 1)]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(variableCategory.types, function (variableTemplate) { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", VariableListvue_type_template_id_01892e51_hoisted_27, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h4", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(variableCategory.name), 1)]), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(variableCategory.types, function (variableTemplate) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: "collection-item", key: variableTemplate.id @@ -2215,7 +2215,7 @@ function VariableListvue_type_template_id_d9faefa4_render(_ctx, _cache, $props, value: _ctx.translate('General_Cancel') }, null, 8, _hoisted_37)], 512)]); } -// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=template&id=d9faefa4 +// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=template&id=01892e51 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Variable/VariableList.vue?vue&type=script&lang=ts function VariableListvue_type_script_lang_ts_toConsumableArray(arr) { return VariableListvue_type_script_lang_ts_arrayWithoutHoles(arr) || VariableListvue_type_script_lang_ts_iterableToArray(arr) || VariableListvue_type_script_lang_ts_unsupportedIterableToArray(arr) || VariableListvue_type_script_lang_ts_nonIterableSpread(); } @@ -2300,6 +2300,7 @@ var VariableListvue_type_script_lang_ts_window = window, yes: function yes() { Variables_store.deleteVariable(_this2.idContainer, _this2.idContainerVersion, variable.idvariable).then(function () { Variables_store.reload(_this2.idContainer, _this2.idContainerVersion); + external_CoreHome_["NotificationsStore"].remove('CopyDialogResultNotification'); }); } }); @@ -2399,7 +2400,7 @@ var VariableListvue_type_script_lang_ts_window = window, -VariableListvue_type_script_lang_ts.render = VariableListvue_type_template_id_d9faefa4_render +VariableListvue_type_script_lang_ts.render = VariableListvue_type_template_id_01892e51_render /* harmony default export */ var VariableList = (VariableListvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Variable/VariableManage.vue?vue&type=template&id=f95f6f7c @@ -3427,86 +3428,86 @@ var TRIGGER_TYPE_TO_CONDITION_ACTUAL = { TriggerEditvue_type_script_lang_ts.render = TriggerEditvue_type_template_id_eb702f58_render /* harmony default export */ var TriggerEdit = (TriggerEditvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=template&id=405ff103 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=template&id=137135ca -var TriggerListvue_type_template_id_405ff103_hoisted_1 = { +var TriggerListvue_type_template_id_137135ca_hoisted_1 = { class: "tagManagerManageList tagManagerTriggerList" }; -var TriggerListvue_type_template_id_405ff103_hoisted_2 = { +var TriggerListvue_type_template_id_137135ca_hoisted_2 = { class: "triggerSearchFilter" }; -var TriggerListvue_type_template_id_405ff103_hoisted_3 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_4 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_5 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_6 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_7 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_8 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_9 = { +var TriggerListvue_type_template_id_137135ca_hoisted_3 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_4 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_5 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_6 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_7 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_8 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_9 = { colspan: "7" }; -var TriggerListvue_type_template_id_405ff103_hoisted_10 = { +var TriggerListvue_type_template_id_137135ca_hoisted_10 = { class: "loadingPiwik" }; -var TriggerListvue_type_template_id_405ff103_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var TriggerListvue_type_template_id_137135ca_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1); -var TriggerListvue_type_template_id_405ff103_hoisted_12 = { +var TriggerListvue_type_template_id_137135ca_hoisted_12 = { colspan: "7" }; -var TriggerListvue_type_template_id_405ff103_hoisted_13 = ["id"]; -var TriggerListvue_type_template_id_405ff103_hoisted_14 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_15 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_16 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_17 = { +var TriggerListvue_type_template_id_137135ca_hoisted_13 = ["id"]; +var TriggerListvue_type_template_id_137135ca_hoisted_14 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_15 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_16 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_17 = { class: "conditions" }; -var TriggerListvue_type_template_id_405ff103_hoisted_18 = { +var TriggerListvue_type_template_id_137135ca_hoisted_18 = { class: "icon-ok" }; -var TriggerListvue_type_template_id_405ff103_hoisted_19 = ["title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_20 = ["onClick", "title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_21 = ["onClick", "title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_22 = ["onClick", "title"]; -var TriggerListvue_type_template_id_405ff103_hoisted_23 = { +var TriggerListvue_type_template_id_137135ca_hoisted_19 = ["title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_20 = ["onClick", "title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_21 = ["onClick", "title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_22 = ["onClick", "title"]; +var TriggerListvue_type_template_id_137135ca_hoisted_23 = { class: "tableActionBar" }; -var TriggerListvue_type_template_id_405ff103_hoisted_24 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var TriggerListvue_type_template_id_137135ca_hoisted_24 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, " ", -1); -var TriggerListvue_type_template_id_405ff103_hoisted_25 = { +var TriggerListvue_type_template_id_137135ca_hoisted_25 = { class: "ui-confirm", id: "confirmDeleteTrigger", ref: "confirmDeleteTrigger" }; -var TriggerListvue_type_template_id_405ff103_hoisted_26 = ["value"]; -var TriggerListvue_type_template_id_405ff103_hoisted_27 = ["value"]; -var TriggerListvue_type_template_id_405ff103_hoisted_28 = { +var TriggerListvue_type_template_id_137135ca_hoisted_26 = ["value"]; +var TriggerListvue_type_template_id_137135ca_hoisted_27 = ["value"]; +var TriggerListvue_type_template_id_137135ca_hoisted_28 = { class: "ui-confirm", id: "confirmDeleteTriggerNotPossible", ref: "confirmDeleteTriggerNotPossible" }; -var TriggerListvue_type_template_id_405ff103_hoisted_29 = { +var TriggerListvue_type_template_id_137135ca_hoisted_29 = { class: "collection" }; -var TriggerListvue_type_template_id_405ff103_hoisted_30 = ["value"]; -function TriggerListvue_type_template_id_405ff103_render(_ctx, _cache, $props, $setup, $data, $options) { +var TriggerListvue_type_template_id_137135ca_hoisted_30 = ["value"]; +function TriggerListvue_type_template_id_137135ca_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", TriggerListvue_type_template_id_405ff103_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", TriggerListvue_type_template_id_137135ca_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { feature: "Tag Manager", "content-title": _ctx.translate('TagManager_ManageX', _ctx.translate('TagManager_Triggers')), "help-text": _ctx.triggersHelpText }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_405ff103_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_137135ca_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "triggerSearch", title: _ctx.translate('General_Search'), @@ -3517,22 +3518,22 @@ function TriggerListvue_type_template_id_405ff103_render(_ctx, _cache, $props, $ }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.triggers.length > 0]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "name", title: _ctx.nameTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, TriggerListvue_type_template_id_405ff103_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, TriggerListvue_type_template_id_137135ca_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "description", title: _ctx.descriptionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, TriggerListvue_type_template_id_405ff103_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, TriggerListvue_type_template_id_137135ca_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "type", title: _ctx.typeTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, TriggerListvue_type_template_id_405ff103_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, TriggerListvue_type_template_id_137135ca_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "conditions", title: _ctx.filterTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Filter')), 9, TriggerListvue_type_template_id_405ff103_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Filter')), 9, TriggerListvue_type_template_id_137135ca_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "lastUpdated", title: _ctx.lastUpdatedTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, TriggerListvue_type_template_id_405ff103_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, TriggerListvue_type_template_id_137135ca_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "action", title: _ctx.actionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, TriggerListvue_type_template_id_405ff103_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_405ff103_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TriggerListvue_type_template_id_405ff103_hoisted_10, [TriggerListvue_type_template_id_405ff103_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_405ff103_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoTriggersFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, TriggerListvue_type_template_id_137135ca_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_137135ca_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TriggerListvue_type_template_id_137135ca_hoisted_10, [TriggerListvue_type_template_id_137135ca_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_137135ca_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoTriggersFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createContainerTriggerNow", onClick: _cache[1] || (_cache[1] = function ($event) { return _ctx.createTrigger(); @@ -3547,16 +3548,16 @@ function TriggerListvue_type_template_id_405ff103_render(_ctx, _cache, $props, $ }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "name", title: trigger.name - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(trigger.name, 50)), 9, TriggerListvue_type_template_id_405ff103_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(trigger.name, 50)), 9, TriggerListvue_type_template_id_137135ca_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "description", title: trigger.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(trigger.description, 75)), 9, TriggerListvue_type_template_id_405ff103_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(trigger.description, 75)), 9, TriggerListvue_type_template_id_137135ca_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "type", title: trigger.typeMetadata.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(trigger.typeMetadata.name), 9, TriggerListvue_type_template_id_405ff103_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_405ff103_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TriggerListvue_type_template_id_405ff103_hoisted_18, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], (_trigger$conditions = trigger.conditions) === null || _trigger$conditions === void 0 ? void 0 : _trigger$conditions.length]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(trigger.typeMetadata.name), 9, TriggerListvue_type_template_id_137135ca_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TriggerListvue_type_template_id_137135ca_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TriggerListvue_type_template_id_137135ca_hoisted_18, null, 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], (_trigger$conditions = trigger.conditions) === null || _trigger$conditions === void 0 ? void 0 : _trigger$conditions.length]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "lastUpdated", title: _ctx.translate('TagManager_CreatedOnX', trigger.created_date_pretty) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(trigger.updated_date_pretty), 1)], 8, TriggerListvue_type_template_id_405ff103_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(trigger.updated_date_pretty), 1)], 8, TriggerListvue_type_template_id_137135ca_hoisted_19), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.getActionClasses) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-edit", @@ -3564,37 +3565,37 @@ function TriggerListvue_type_template_id_405ff103_render(_ctx, _cache, $props, $ return _ctx.editTrigger(trigger.idtrigger, trigger.type); }, title: _ctx.translate('TagManager_EditTrigger') - }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_20), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TriggerListvue_type_template_id_137135ca_hoisted_20), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-delete", onClick: function onClick($event) { return _ctx.deleteTrigger(trigger); }, title: _ctx.translate('TagManager_DeleteX', _ctx.translate('TagManager_Trigger')) - }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_21), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TriggerListvue_type_template_id_137135ca_hoisted_21), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-content-copy", onClick: function onClick($event) { return _ctx.openCopyDialog(trigger); }, title: _ctx.translate('TagManager_CopyX', _ctx.translate('TagManager_Trigger')) - }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_22), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasPublishCapability()]])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, TriggerListvue_type_template_id_405ff103_hoisted_13); - }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_405ff103_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TriggerListvue_type_template_id_137135ca_hoisted_22), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasPublishCapability()]])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, TriggerListvue_type_template_id_137135ca_hoisted_13); + }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_137135ca_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createNewTrigger", value: "", onClick: _cache[2] || (_cache[2] = function ($event) { return _ctx.createTrigger(); }) - }, [TriggerListvue_type_template_id_405ff103_hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewTrigger')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; + }, [TriggerListvue_type_template_id_137135ca_hoisted_24, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewTrigger')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; }), _: 1 - }, 8, ["content-title", "help-text"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_405ff103_hoisted_25, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteTriggerConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, 8, ["content-title", "help-text"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_137135ca_hoisted_25, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteTriggerConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') - }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_26), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, TriggerListvue_type_template_id_137135ca_hoisted_26), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "no", type: "button", value: _ctx.translate('General_No') - }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_27)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_405ff103_hoisted_28, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerCannotBeDeleted')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerBeingUsedBy')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", TriggerListvue_type_template_id_405ff103_hoisted_29, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.triggerReferences, function (reference) { + }, null, 8, TriggerListvue_type_template_id_137135ca_hoisted_27)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TriggerListvue_type_template_id_137135ca_hoisted_28, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerCannotBeDeleted')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TriggerBeingUsedBy')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", TriggerListvue_type_template_id_137135ca_hoisted_29, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(_ctx.triggerReferences, function (reference) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { class: "collection-item", key: reference.referenceId @@ -3603,9 +3604,9 @@ function TriggerListvue_type_template_id_405ff103_render(_ctx, _cache, $props, $ role: "no", type: "button", value: _ctx.translate('General_Cancel') - }, null, 8, TriggerListvue_type_template_id_405ff103_hoisted_30)], 512)]); + }, null, 8, TriggerListvue_type_template_id_137135ca_hoisted_30)], 512)]); } -// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=template&id=405ff103 +// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=template&id=137135ca // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Trigger/TriggerList.vue?vue&type=script&lang=ts function TriggerListvue_type_script_lang_ts_toConsumableArray(arr) { return TriggerListvue_type_script_lang_ts_arrayWithoutHoles(arr) || TriggerListvue_type_script_lang_ts_iterableToArray(arr) || TriggerListvue_type_script_lang_ts_unsupportedIterableToArray(arr) || TriggerListvue_type_script_lang_ts_nonIterableSpread(); } @@ -3679,6 +3680,7 @@ var TriggerListvue_type_script_lang_ts_window = window, var doDelete = function doDelete() { Triggers_store.deleteTrigger(_this.idContainer, _this.idContainerVersion, trigger.idtrigger).then(function () { Triggers_store.reload(_this.idContainer, _this.idContainerVersion); + external_CoreHome_["NotificationsStore"].remove('CopyDialogResultNotification'); }); }; @@ -3781,7 +3783,7 @@ var TriggerListvue_type_script_lang_ts_window = window, -TriggerListvue_type_script_lang_ts.render = TriggerListvue_type_template_id_405ff103_render +TriggerListvue_type_script_lang_ts.render = TriggerListvue_type_template_id_137135ca_render /* harmony default export */ var TriggerList = (TriggerListvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Trigger/TriggerManage.vue?vue&type=template&id=50893454 @@ -5476,81 +5478,81 @@ var TagEditvue_type_script_lang_ts_notificationId = 'tagtagmanagement'; TagEditvue_type_script_lang_ts.render = TagEditvue_type_template_id_527741a0_render /* harmony default export */ var TagEdit = (TagEditvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Tag/TagList.vue?vue&type=template&id=63d6d123 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Tag/TagList.vue?vue&type=template&id=7a1680f7 -var TagListvue_type_template_id_63d6d123_hoisted_1 = { +var TagListvue_type_template_id_7a1680f7_hoisted_1 = { class: "tagManagerManageList tagManagerTagList" }; -var TagListvue_type_template_id_63d6d123_hoisted_2 = { +var TagListvue_type_template_id_7a1680f7_hoisted_2 = { class: "tagSearchFilter" }; -var TagListvue_type_template_id_63d6d123_hoisted_3 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_4 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_5 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_6 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_7 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_8 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_9 = { +var TagListvue_type_template_id_7a1680f7_hoisted_3 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_4 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_5 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_6 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_7 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_8 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_9 = { colspan: "6" }; -var TagListvue_type_template_id_63d6d123_hoisted_10 = { +var TagListvue_type_template_id_7a1680f7_hoisted_10 = { class: "loadingPiwik" }; -var TagListvue_type_template_id_63d6d123_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var TagListvue_type_template_id_7a1680f7_hoisted_11 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1); -var TagListvue_type_template_id_63d6d123_hoisted_12 = { +var TagListvue_type_template_id_7a1680f7_hoisted_12 = { colspan: "6" }; -var TagListvue_type_template_id_63d6d123_hoisted_13 = ["id"]; -var TagListvue_type_template_id_63d6d123_hoisted_14 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_15 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_16 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_17 = { +var TagListvue_type_template_id_7a1680f7_hoisted_13 = ["id"]; +var TagListvue_type_template_id_7a1680f7_hoisted_14 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_15 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_16 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_17 = { class: "triggers" }; -var TagListvue_type_template_id_63d6d123_hoisted_18 = ["onClick", "title"]; -var TagListvue_type_template_id_63d6d123_hoisted_19 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_20 = ["onClick", "title"]; -var TagListvue_type_template_id_63d6d123_hoisted_21 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_22 = ["title"]; -var TagListvue_type_template_id_63d6d123_hoisted_23 = ["onClick", "title"]; -var TagListvue_type_template_id_63d6d123_hoisted_24 = ["onClick", "title"]; -var TagListvue_type_template_id_63d6d123_hoisted_25 = ["onClick", "title"]; -var TagListvue_type_template_id_63d6d123_hoisted_26 = ["onClick", "title"]; -var TagListvue_type_template_id_63d6d123_hoisted_27 = ["onClick", "title"]; -var TagListvue_type_template_id_63d6d123_hoisted_28 = { +var TagListvue_type_template_id_7a1680f7_hoisted_18 = ["onClick", "title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_19 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_20 = ["onClick", "title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_21 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_22 = ["title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_23 = ["onClick", "title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_24 = ["onClick", "title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_25 = ["onClick", "title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_26 = ["onClick", "title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_27 = ["onClick", "title"]; +var TagListvue_type_template_id_7a1680f7_hoisted_28 = { class: "tableActionBar" }; -var TagListvue_type_template_id_63d6d123_hoisted_29 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var TagListvue_type_template_id_7a1680f7_hoisted_29 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, " ", -1); -var TagListvue_type_template_id_63d6d123_hoisted_30 = { +var TagListvue_type_template_id_7a1680f7_hoisted_30 = { class: "ui-confirm", id: "confirmDeleteTag", ref: "confirmDeleteTag" }; -var TagListvue_type_template_id_63d6d123_hoisted_31 = ["value"]; -var TagListvue_type_template_id_63d6d123_hoisted_32 = ["value"]; -var TagListvue_type_template_id_63d6d123_hoisted_33 = { +var TagListvue_type_template_id_7a1680f7_hoisted_31 = ["value"]; +var TagListvue_type_template_id_7a1680f7_hoisted_32 = ["value"]; +var TagListvue_type_template_id_7a1680f7_hoisted_33 = { class: "ui-confirm", id: "confirmPauseTag", ref: "confirmPauseTag" }; -var TagListvue_type_template_id_63d6d123_hoisted_34 = ["value"]; -var TagListvue_type_template_id_63d6d123_hoisted_35 = ["value"]; -var TagListvue_type_template_id_63d6d123_hoisted_36 = { +var TagListvue_type_template_id_7a1680f7_hoisted_34 = ["value"]; +var TagListvue_type_template_id_7a1680f7_hoisted_35 = ["value"]; +var TagListvue_type_template_id_7a1680f7_hoisted_36 = { class: "ui-confirm", id: "confirmResumeTag", ref: "confirmResumeTag" }; -var TagListvue_type_template_id_63d6d123_hoisted_37 = ["value"]; -var TagListvue_type_template_id_63d6d123_hoisted_38 = ["value"]; -function TagListvue_type_template_id_63d6d123_render(_ctx, _cache, $props, $setup, $data, $options) { +var TagListvue_type_template_id_7a1680f7_hoisted_37 = ["value"]; +var TagListvue_type_template_id_7a1680f7_hoisted_38 = ["value"]; +function TagListvue_type_template_id_7a1680f7_render(_ctx, _cache, $props, $setup, $data, $options) { var _this = this; var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); @@ -5559,13 +5561,13 @@ function TagListvue_type_template_id_63d6d123_render(_ctx, _cache, $props, $setu var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", TagListvue_type_template_id_63d6d123_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", TagListvue_type_template_id_7a1680f7_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { feature: "Tag Manager", "content-title": _ctx.translate('TagManager_ManageX', _ctx.translate('TagManager_Tags')), "help-text": _ctx.tagsHelpText }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TagUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_63d6d123_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_TagUsageBenefits')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_7a1680f7_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { uicontrol: "text", name: "tagSearch", title: _ctx.translate('General_Search'), @@ -5576,22 +5578,22 @@ function TagListvue_type_template_id_63d6d123_render(_ctx, _cache, $props, $setu }, null, 8, ["title", "modelValue"]), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.tags.length > 0]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "name", title: _ctx.nameTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, TagListvue_type_template_id_63d6d123_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 9, TagListvue_type_template_id_7a1680f7_hoisted_3), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "description", title: _ctx.descriptionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, TagListvue_type_template_id_63d6d123_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 9, TagListvue_type_template_id_7a1680f7_hoisted_4), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "type", title: _ctx.typeTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, TagListvue_type_template_id_63d6d123_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Type')), 9, TagListvue_type_template_id_7a1680f7_hoisted_5), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "triggers", title: _ctx.triggersTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Triggers')), 9, TagListvue_type_template_id_63d6d123_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Triggers')), 9, TagListvue_type_template_id_7a1680f7_hoisted_6), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "lastUpdated", title: _ctx.lastUpdatedTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, TagListvue_type_template_id_63d6d123_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_LastUpdated')), 9, TagListvue_type_template_id_7a1680f7_hoisted_7), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", { class: "action", title: _ctx.actionTranslatedText - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, TagListvue_type_template_id_63d6d123_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TagListvue_type_template_id_63d6d123_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TagListvue_type_template_id_63d6d123_hoisted_10, [TagListvue_type_template_id_63d6d123_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TagListvue_type_template_id_63d6d123_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoTagsFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 9, TagListvue_type_template_id_7a1680f7_hoisted_8), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TagListvue_type_template_id_7a1680f7_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", TagListvue_type_template_id_7a1680f7_hoisted_10, [TagListvue_type_template_id_7a1680f7_hoisted_11, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TagListvue_type_template_id_7a1680f7_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoTagsFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createContainerTagNow", onClick: _cache[1] || (_cache[1] = function ($event) { return _ctx.createTag(); @@ -5604,13 +5606,13 @@ function TagListvue_type_template_id_63d6d123_render(_ctx, _cache, $props, $setu }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "name", title: tag.name - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(tag.name, 50)), 9, TagListvue_type_template_id_63d6d123_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(tag.name, 50)), 9, TagListvue_type_template_id_7a1680f7_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "description", title: tag.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(tag.description, 75)), 9, TagListvue_type_template_id_63d6d123_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(tag.description, 75)), 9, TagListvue_type_template_id_7a1680f7_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "type", title: tag.typeMetadata.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(tag.typeMetadata.name), 9, TagListvue_type_template_id_63d6d123_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TagListvue_type_template_id_63d6d123_hoisted_17, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(tag.fire_trigger_ids, function (fireTriggerId, fireTriggerIndex) { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(tag.typeMetadata.name), 9, TagListvue_type_template_id_7a1680f7_hoisted_16), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", TagListvue_type_template_id_7a1680f7_hoisted_17, [(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(tag.fire_trigger_ids, function (fireTriggerId, fireTriggerIndex) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { key: fireTriggerIndex, style: { @@ -5628,11 +5630,11 @@ function TagListvue_type_template_id_63d6d123_render(_ctx, _cache, $props, $setu return _ctx.editTrigger(fireTriggerId); }, ["prevent"]), title: _this.triggers[fireTriggerId] - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(_this.triggers[fireTriggerId], _ctx.triggerTruncateLength)), 9, TagListvue_type_template_id_63d6d123_hoisted_18)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.hasWriteAccess ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(_this.triggers[fireTriggerId], _ctx.triggerTruncateLength)), 9, TagListvue_type_template_id_7a1680f7_hoisted_18)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.hasWriteAccess ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { key: 1, class: "chip", title: _this.triggers[fireTriggerId] - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(_this.triggers[fireTriggerId], _ctx.triggerTruncateLength)), 9, TagListvue_type_template_id_63d6d123_hoisted_19)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(_this.triggers[fireTriggerId], _ctx.triggerTruncateLength)), 9, TagListvue_type_template_id_7a1680f7_hoisted_19)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]); }), 128)), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_Except')) + ": ", 1), (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])(external_commonjs_vue_commonjs2_vue_root_Vue_["Fragment"], null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["renderList"])(tag.block_trigger_ids, function (blockTriggerId, index) { return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", { key: index, @@ -5646,14 +5648,14 @@ function TagListvue_type_template_id_63d6d123_render(_ctx, _cache, $props, $setu return _ctx.editTrigger(blockTriggerId); }, ["prevent"]), title: _this.triggers[blockTriggerId] - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(_this.triggers[blockTriggerId], _ctx.triggerTruncateLength)), 9, TagListvue_type_template_id_63d6d123_hoisted_20), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(_this.triggers[blockTriggerId], _ctx.triggerTruncateLength)), 9, TagListvue_type_template_id_7a1680f7_hoisted_20), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "chip", title: _this.triggers[blockTriggerId] - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(_this.triggers[blockTriggerId], _ctx.triggerTruncateLength)), 9, TagListvue_type_template_id_63d6d123_hoisted_21), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.hasWriteAccess]])]); + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(_this.triggers[blockTriggerId], _ctx.triggerTruncateLength)), 9, TagListvue_type_template_id_7a1680f7_hoisted_21), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.hasWriteAccess]])]); }), 128))], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], tag.block_trigger_ids.length]])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "lastUpdated", title: _ctx.translate('TagManager_CreatedOnX', tag.created_date_pretty) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(tag.updated_date_pretty), 1)], 8, TagListvue_type_template_id_63d6d123_hoisted_22), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(tag.updated_date_pretty), 1)], 8, TagListvue_type_template_id_7a1680f7_hoisted_22), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.getActionClasses) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-pause", @@ -5661,67 +5663,67 @@ function TagListvue_type_template_id_63d6d123_render(_ctx, _cache, $props, $setu return _ctx.pauseTag(tag); }, title: _ctx.translate('TagManager_PauseX', _ctx.translate('TagManager_Tag')) - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_23), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], tag.status === 'active']]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_23), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], tag.status === 'active']]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-play", onClick: function onClick($event) { return _ctx.resumeTag(tag); }, title: _ctx.translate('TagManager_ResumeX', _ctx.translate('TagManager_Tag')) - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_24), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], tag.status === 'paused']]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_24), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], tag.status === 'paused']]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-edit", onClick: function onClick($event) { return _ctx.editTag(tag.idtag, tag.type); }, title: _ctx.translate('TagManager_EditTag') - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-delete", onClick: function onClick($event) { return _ctx.deleteTag(tag); }, title: _ctx.translate('TagManager_DeleteX', _ctx.translate('TagManager_Tag')) - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_26), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_26), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-content-copy", onClick: function onClick($event) { return _ctx.openCopyDialog(tag); }, title: _ctx.translate('TagManager_CopyX', _ctx.translate('TagManager_Tag')) - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_27), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasPublishCapability()]])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, TagListvue_type_template_id_63d6d123_hoisted_13); - }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_63d6d123_hoisted_28, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_27), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasPublishCapability()]])], 2), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])], 8, TagListvue_type_template_id_7a1680f7_hoisted_13); + }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_7a1680f7_hoisted_28, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createNewTag", value: "", onClick: _cache[2] || (_cache[2] = function ($event) { return _ctx.createTag(); }) - }, [TagListvue_type_template_id_63d6d123_hoisted_29, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewTag')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; + }, [TagListvue_type_template_id_7a1680f7_hoisted_29, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewTag')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; }), _: 1 - }, 8, ["content-title", "help-text"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_63d6d123_hoisted_30, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteTagConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, 8, ["content-title", "help-text"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_7a1680f7_hoisted_30, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteTagConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_31), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_31), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "no", type: "button", value: _ctx.translate('General_No') - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_32)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_63d6d123_hoisted_33, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_PauseTagConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_32)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_7a1680f7_hoisted_33, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_PauseTagConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_34), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_34), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "no", type: "button", value: _ctx.translate('General_No') - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_35)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_63d6d123_hoisted_36, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_ResumeTagConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_35)], 512), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", TagListvue_type_template_id_7a1680f7_hoisted_36, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_ResumeTagConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_37), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_37), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "no", type: "button", value: _ctx.translate('General_No') - }, null, 8, TagListvue_type_template_id_63d6d123_hoisted_38)], 512)]); + }, null, 8, TagListvue_type_template_id_7a1680f7_hoisted_38)], 512)]); } -// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Tag/TagList.vue?vue&type=template&id=63d6d123 +// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Tag/TagList.vue?vue&type=template&id=7a1680f7 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Tag/TagList.vue?vue&type=script&lang=ts function TagListvue_type_script_lang_ts_toConsumableArray(arr) { return TagListvue_type_script_lang_ts_arrayWithoutHoles(arr) || TagListvue_type_script_lang_ts_iterableToArray(arr) || TagListvue_type_script_lang_ts_unsupportedIterableToArray(arr) || TagListvue_type_script_lang_ts_nonIterableSpread(); } @@ -5840,6 +5842,7 @@ var TagListvue_type_script_lang_ts_notificationId = 'tagtagmanagementlist'; var doDelete = function doDelete() { Tags_store.deleteTag(_this5.idContainer, _this5.idContainerVersion, tag.idtag).then(function () { Tags_store.reload(_this5.idContainer, _this5.idContainerVersion); + external_CoreHome_["NotificationsStore"].remove('CopyDialogResultNotification'); }); }; @@ -5976,7 +5979,7 @@ var TagListvue_type_script_lang_ts_notificationId = 'tagtagmanagementlist'; -TagListvue_type_script_lang_ts.render = TagListvue_type_template_id_63d6d123_render +TagListvue_type_script_lang_ts.render = TagListvue_type_template_id_7a1680f7_render /* harmony default export */ var TagList = (TagListvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Tag/TagManage.vue?vue&type=template&id=02e1fe94 @@ -8258,81 +8261,81 @@ var ContainerEditvue_type_script_lang_ts_notificationId = 'containertagmanagemen ContainerEditvue_type_script_lang_ts.render = ContainerEditvue_type_template_id_c6ab6d32_render /* harmony default export */ var ContainerEdit = (ContainerEditvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=template&id=76f2c9d1 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=template&id=5b5a37b0 -var ContainerListvue_type_template_id_76f2c9d1_hoisted_1 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_1 = { class: "tagManagerManageList tagManagerContainerList" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_2 = ["innerHTML"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_3 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_2 = ["innerHTML"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_3 = { class: "index" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_4 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_4 = { class: "name" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_5 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_5 = { class: "description" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_6 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_6 = { class: "created" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_7 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_7 = { class: "action" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_8 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_8 = { colspan: "5" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_9 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_9 = { class: "loadingPiwik" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1); -var ContainerListvue_type_template_id_76f2c9d1_hoisted_11 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_11 = { colspan: "5" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_12 = ["id"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_13 = ["title"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_14 = ["title"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_15 = ["title"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_16 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_12 = ["id"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_13 = ["title"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_14 = ["title"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_15 = ["title"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_16 = { class: "created" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_17 = ["href", "title"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_18 = ["onClick", "title"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_19 = ["onClick", "title"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_20 = ["onClick", "title"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_21 = ["onClick", "title"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_22 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_17 = ["href", "title"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_18 = ["onClick", "title"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_19 = ["onClick", "title"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_20 = ["onClick", "title"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_21 = ["onClick", "title"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_22 = { class: "tableActionBar" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_23 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_23 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, " ", -1); -var ContainerListvue_type_template_id_76f2c9d1_hoisted_24 = { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_24 = { class: "ui-confirm", id: "confirmDeleteContainer", ref: "confirmDeleteContainer" }; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_25 = ["value"]; -var ContainerListvue_type_template_id_76f2c9d1_hoisted_26 = ["value"]; -function ContainerListvue_type_template_id_76f2c9d1_render(_ctx, _cache, $props, $setup, $data, $options) { +var ContainerListvue_type_template_id_5b5a37b0_hoisted_25 = ["value"]; +var ContainerListvue_type_template_id_5b5a37b0_hoisted_26 = ["value"]; +function ContainerListvue_type_template_id_5b5a37b0_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ContainerListvue_type_template_id_76f2c9d1_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ContainerListvue_type_template_id_5b5a37b0_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { feature: "Tag Manager", "content-title": _ctx.translate('TagManager_ManageX', _ctx.translate('TagManager_Containers')) }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { innerHTML: _ctx.$sanitize(_ctx.getManageContainersIntro) - }, null, 8, ContainerListvue_type_template_id_76f2c9d1_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_76f2c9d1_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_76f2c9d1_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_76f2c9d1_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_76f2c9d1_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreatedDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_76f2c9d1_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_76f2c9d1_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", ContainerListvue_type_template_id_76f2c9d1_hoisted_9, [ContainerListvue_type_template_id_76f2c9d1_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_76f2c9d1_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoContainersFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreatedDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_5b5a37b0_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", ContainerListvue_type_template_id_5b5a37b0_hoisted_9, [ContainerListvue_type_template_id_5b5a37b0_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_5b5a37b0_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoContainersFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createContainerNow", onClick: _cache[0] || (_cache[0] = function ($event) { return _ctx.createContainer(); @@ -8345,63 +8348,63 @@ function ContainerListvue_type_template_id_76f2c9d1_render(_ctx, _cache, $props, }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "index", title: "".concat(_ctx.translate('TagManager_Context'), ": ") + _ctx.contexts[container.context] - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(container.idcontainer), 9, ContainerListvue_type_template_id_76f2c9d1_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(container.idcontainer), 9, ContainerListvue_type_template_id_5b5a37b0_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "name", title: container.name - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(container.name, 50)), 9, ContainerListvue_type_template_id_76f2c9d1_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(container.name, 50)), 9, ContainerListvue_type_template_id_5b5a37b0_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "description", title: container.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(container.description, 75)), 9, ContainerListvue_type_template_id_76f2c9d1_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_76f2c9d1_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(container.created_date_pretty), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(container.description, 75)), 9, ContainerListvue_type_template_id_5b5a37b0_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_5b5a37b0_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(container.created_date_pretty), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.getActionClasses) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-configure", href: '?module=TagManager&action=' + _ctx.containerDefaultAction + '&idContainer=' + container.idcontainer + '&idSite=' + container.idsite + '&period=day&date=yesterday', title: _ctx.translate('TagManager_ConfigureX', _ctx.translate('TagManager_Container')) - }, null, 8, ContainerListvue_type_template_id_76f2c9d1_hoisted_17), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_17), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action installCode icon-embed", onClick: function onClick($event) { return _ctx.installCode(container.idcontainer); }, title: _ctx.translate('TagManager_InstallCode') - }, null, 8, ContainerListvue_type_template_id_76f2c9d1_hoisted_18), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_18), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-edit", onClick: function onClick($event) { return _ctx.editContainer(container.idcontainer); }, title: _ctx.translate('TagManager_EditX', _ctx.translate('TagManager_Container')) - }, null, 8, ContainerListvue_type_template_id_76f2c9d1_hoisted_19), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_19), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-delete", onClick: function onClick($event) { return _ctx.deleteContainer(container); }, title: _ctx.translate('TagManager_DeleteX', _ctx.translate('TagManager_Container')) - }, null, 8, ContainerListvue_type_template_id_76f2c9d1_hoisted_20), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_20), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-content-copy", onClick: function onClick($event) { return _ctx.openCopyDialog(container); }, title: _ctx.translate('TagManager_CopyX', _ctx.translate('TagManager_Container')) - }, null, 8, ContainerListvue_type_template_id_76f2c9d1_hoisted_21), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.canCopyContainer]])], 2)], 8, ContainerListvue_type_template_id_76f2c9d1_hoisted_12); - }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContainerListvue_type_template_id_76f2c9d1_hoisted_22, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_21), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.canCopyContainer]])], 2)], 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_12); + }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContainerListvue_type_template_id_5b5a37b0_hoisted_22, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createNewContainer", value: "", onClick: _cache[1] || (_cache[1] = function ($event) { return _ctx.createContainer(); }) - }, [ContainerListvue_type_template_id_76f2c9d1_hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewContainer')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; + }, [ContainerListvue_type_template_id_5b5a37b0_hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewContainer')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; }), _: 1 - }, 8, ["content-title"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContainerListvue_type_template_id_76f2c9d1_hoisted_24, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteContainerConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, 8, ["content-title"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContainerListvue_type_template_id_5b5a37b0_hoisted_24, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteContainerConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') - }, null, 8, ContainerListvue_type_template_id_76f2c9d1_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "no", type: "button", value: _ctx.translate('General_No') - }, null, 8, ContainerListvue_type_template_id_76f2c9d1_hoisted_26)], 512)]); + }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_26)], 512)]); } -// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=template&id=76f2c9d1 +// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=template&id=5b5a37b0 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=script&lang=ts function ContainerListvue_type_script_lang_ts_toConsumableArray(arr) { return ContainerListvue_type_script_lang_ts_arrayWithoutHoles(arr) || ContainerListvue_type_script_lang_ts_iterableToArray(arr) || ContainerListvue_type_script_lang_ts_unsupportedIterableToArray(arr) || ContainerListvue_type_script_lang_ts_nonIterableSpread(); } @@ -8505,6 +8508,7 @@ var ContainerListvue_type_script_lang_ts_window = window, function doDelete() { Containers_store.deleteContainer(container.idcontainer).then(function () { Containers_store.reload(); + external_CoreHome_["NotificationsStore"].remove('CopyDialogResultNotification'); }); } @@ -8536,7 +8540,7 @@ var ContainerListvue_type_script_lang_ts_window = window, -ContainerListvue_type_script_lang_ts.render = ContainerListvue_type_template_id_76f2c9d1_render +ContainerListvue_type_script_lang_ts.render = ContainerListvue_type_template_id_5b5a37b0_render /* harmony default export */ var ContainerList = (ContainerListvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Container/ContainerManage.vue?vue&type=template&id=4b1a4e9a diff --git a/vue/dist/TagManager.umd.min.js b/vue/dist/TagManager.umd.min.js index 888eaacff..cc6d13690 100644 --- a/vue/dist/TagManager.umd.min.js +++ b/vue/dist/TagManager.umd.min.js @@ -10,13 +10,13 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var yt=function(){function e(){var t=this;vt(this,e),Tt(this,"privateState",Object(r["reactive"])({comparisons:[],isLoading:!1})),Tt(this,"state",Object(r["computed"])((function(){return Object(r["readonly"])(t.privateState)}))),Tt(this,"isLoading",Object(r["computed"])((function(){return t.state.value.isLoading}))),Tt(this,"comparisons",Object(r["computed"])((function(){return t.state.value.comparisons}))),Tt(this,"comparisonOptions",Object(r["computed"])((function(){return t.comparisons.value.map((function(e){var t=e.id,n=e.name;return{key:t,value:n}}))}))),Tt(this,"initializePromise",null)}return Ot(e,[{key:"init",value:function(){return this.initializePromise||(this.initializePromise=this.fetchAvailableComparisons()),this.initializePromise}},{key:"fetchAvailableComparisons",value:function(){var e=this;return this.privateState.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getAvailableComparisons",filter_limit:"-1"}).then((function(t){e.privateState.comparisons=t})).finally((function(){e.privateState.isLoading=!1}))}}]),e}(),Vt=new yt,Ct="tagvariablemanagement",Nt=Object(r["defineComponent"])({props:{idVariable:Number,idContainer:{type:String,required:!0},idContainerVersion:{type:Number,required:!0},variableType:String,isEmbedded:{type:Boolean,default:!1}},components:{GroupedSettings:g["GroupedSettings"],ContentBlock:u["ContentBlock"],Field:g["Field"],SaveButton:g["SaveButton"]},data:function(){return{isDirty:!1,showAdvanced:!1,chooseVariableType:!1,canUseCustomTemplates:u["Matomo"].hasUserCapability("tagmanager_use_custom_templates"),availableVariables:[],editTitle:"",variable:{},parameterValues:{},isUpdatingVar:!1}},emits:["changeVariable"],created:function(){Vt.init(),ft.fetchVariablesIfNotLoaded(this.idContainer,this.idContainerVersion),this.initIdVariable()},watch:{idVariable:function(e){null!==e&&this.initIdVariable()},variableParameterValues:{handler:function(e,t){e&&t&&(this.isDirty=!0)},deep:!0},variableLookupTable:{handler:function(){var e=(this.variable.lookup_table||[]).every((function(e){return!(null===e||void 0===e||!e.out_value)}));e&&this.addLookUpEntry()},deep:!0}},methods:{removeAnyVariableNotification:function(){u["NotificationsStore"].remove(Ct),u["NotificationsStore"].remove("ajaxHelper")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:Ct,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},showErrorFieldNotProvidedNotification:function(e){var t=Object(u["translate"])("TagManager_ErrorXNotProvided",[e]);this.showNotification(t,"error")},initIdVariable:function(){var e=this;u["Matomo"].helper.lazyScrollToContent(),this.availableVariables=[],u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer,filter_limit:"-1"}).then((function(e){return ft.fetchAvailableVariables(e.context)})).then((function(t){e.availableVariables=t})).then((function(){if(e.edit&&e.idVariable)return e.editTitle=Object(u["translate"])("TagManager_EditVariable"),void ft.findVariable(e.idContainer,e.idContainerVersion,e.idVariable,e.isEmbedded).then((function(t){var n;t&&(e.variable=Object(u["clone"])(t),e.parameterValues=Object.fromEntries(t.typeMetadata.parameters.map((function(e){return[e.name,e.value]}))),(e.variable.lookup_table&&e.variable.lookup_table.length||e.variable.default_value)&&(e.showAdvanced=!0),e.addLookUpEntryIfNoneExists(),e.isDirty=!1,null!==(n=e.variable.typeMetadata)&&void 0!==n&&n.name&&(e.editTitle+=": ".concat(e.variable.typeMetadata.name)))}));if(e.create){var t=!1;e.variableType&&e.availableVariables.forEach((function(n){if(!t){var a=n.types.find((function(t){return(null===t||void 0===t?void 0:t.id)===e.variableType}));a&&(t=!0,e.createVariableType(a))}})),t||(e.editTitle=Object(u["translate"])("TagManager_ChooseVariableToContinue"),e.chooseVariableType=!0)}}))},addLookUpEntryIfNoneExists:function(){this.variable.lookup_table&&Array.isArray(this.variable.lookup_table)||(this.variable.lookup_table=[]),this.variable.lookup_table.length||this.variable.lookup_table.push({comparison:"equals",match_value:"",out_value:""})},addLookUpEntry:function(){this.variable.lookup_table.push({comparison:"equals",match_value:"",out_value:""}),this.isDirty=!0},removeLookUpEntry:function(e){e>-1&&(this.variable.lookup_table.splice(e,1),this.isDirty=!0)},createVariableType:function(e){var t,n=this;e&&this.isVariableTemplateDisabled[e.id]||(this.chooseVariableType=!1,this.editTitle=Object(u["translate"])("TagManager_CreateNewVariable"),this.variable={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:ft.suggestNameForType(e.name)||"",description:"",type:e.id,idcontainer:this.idContainer,idcontainerversion:this.idContainerVersion,default_value:"",lookup_table:[],typeMetadata:e},null!==(t=this.variable.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.variable.typeMetadata.name)),this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.addLookUpEntry(),this.isDirty=!0,Object(r["nextTick"])((function(){if(n.$refs.root){var e=n.$refs.root;e.scrollIntoView();var t=e.querySelector("#name");t&&t.focus()}})))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idVariable,u["MatomoUrl"].updateHash(e)},createVariable:function(){var e=this;this.removeAnyVariableNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVar=!0,ft.createOrUpdateVariable(Object.assign(Object.assign({},this.variable),{},{name:encodeURIComponent(this.variable.name)}),"TagManager.addContainerVariable",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t){e.isDirty=!1;var n=t.value;ft.reload(e.idContainer,e.idContainerVersion).then((function(){if(e.isEmbedded)return e.variable.idvariable=n,void e.$emit("changeVariable",{variable:e.variable});e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Variable")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)}))}})).finally((function(){e.isUpdatingVar=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateVariable:function(){var e=this;this.removeAnyVariableNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVar=!0,ft.createOrUpdateVariable(Object.assign(Object.assign({},this.variable),{},{name:encodeURIComponent(this.variable.name)}),"TagManager.updateContainerVariable",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t)if(e.isEmbedded)e.$emit("changeVariable",{variable:e.variable});else{e.isDirty=!1,ft.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdVariable()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Variable")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingVar=!1})))},checkRequiredFieldsAreSet:function(){return!!this.variable.name||(this.showErrorFieldNotProvidedNotification(Object(u["translate"])("General_Name")),!1)},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{typeInlineHelp:function(){var e,t,n=(null===(e=this.variable.typeMetadata)||void 0===e?void 0:e.description)||"",a=(null===(t=this.variable.typeMetadata)||void 0===t?void 0:t.help)||"";return"".concat(n," ").concat(a)},create:function(){return 0===this.idVariable},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVar},availableLookUpComparisons:function(){return Vt.comparisonOptions.value},isVariableTemplateDisabled:function(){var e=this,t={};return this.availableVariables.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},isVariableDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.variable.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},variableParameterValues:function(){var e;return null!==(e=this.variable.typeMetadata)&&void 0!==e&&e.parameters?this.parameterValues:null},variableLookupTable:function(){return this.variable.lookup_table}}});Nt.render=et;var Et=Nt,St={class:"tagManagerManageList tagManagerVariableList"},wt={class:"variableSearchFilter"},kt=["title"],Mt=["title"],_t=["title"],Dt=["title"],At=["title"],xt=["title"],Bt={colspan:"7"},Lt={class:"loadingPiwik"},Ut=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Pt={colspan:"7"},It=["id"],Ft=["title"],Ht=["title"],Gt=["title"],$t={class:"lookupTable"},Rt={class:"icon-ok"},qt=["title"],zt=["onClick","title"],Wt=["onClick","title"],Xt=["onClick","title"],Kt={class:"tableActionBar"},Jt=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Yt=["title"],Zt=Object(r["createElementVNode"])("span",{class:"icon-help preconfiguredVariablesHelp"},null,-1),Qt={class:"collection-header"},en={class:"title"},tn=["textContent"],nn={class:"secondary-content"},an=["title"],rn={class:"ui-confirm",id:"confirmDeleteVariable",ref:"confirmDeleteVariable"},on=["value"],ln=["value"],cn={class:"ui-confirm",id:"confirmDeleteVariableNotPossible",ref:"confirmDeleteVariableNotPossible"},sn={class:"collection"},dn=["value"];function un(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",St,[Object(r["createVNode"])(c,{feature:"Tag Manager",class:"tagManagerCustomVariablesList","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableUsageBenefits")),1),Object(r["createElementVNode"])("div",wt,[Object(r["withDirectives"])(Object(r["createVNode"])(l,{uicontrol:"text",name:"variableSearch",title:e.translate("General_Search"),modelValue:e.variableSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.variableSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.variables.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,kt),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,Mt),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,_t),Object(r["createElementVNode"])("th",{class:"lookupTable",title:e.lookupTableTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LookupTable")),9,Dt),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,At),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,xt),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Bt,[Object(r["createElementVNode"])("span",Lt,[Ut,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Pt,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoVariablesFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerVariableNow",onClick:t[1]||(t[1]=function(t){return e.createVariable()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariableNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&!e.variables.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"variable".concat(t.idvariable),class:"variables",key:t.idvariable},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Ft),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Ht),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,Gt),Object(r["createElementVNode"])("td",$t,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Rt,null,512),[[r["vShow"],t.lookup_table.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,qt),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editVariable(t.idvariable,t.type)},title:e.translate("TagManager_EditVariable")},null,8,zt),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteVariable(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Variable"))},null,8,Wt),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Variable"))},null,8,Xt),[[r["vShow"],e.hasPublishCapability()]])],2),[[r["vShow"],e.hasWriteAccess]])],8,It)})),128))])],512),[[s]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Kt,[Object(r["createElementVNode"])("a",{class:"createNewVariable",value:"",onClick:t[2]||(t[2]=function(t){return e.createVariable()})},[Jt,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("h2",{title:e.translate("TagManager_PreConfiguredInfoTitle")},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_PreconfiguredVariables"))+" ",1),Zt],8,Yt),Object(r["createElementVNode"])("div",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containerVariables,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:t},[Object(r["createElementVNode"])("li",Qt,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(e.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.types,(function(e){return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:e.id},[Object(r["createElementVNode"])("span",en,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.name)+" ",1),Object(r["createElementVNode"])("span",{class:"variableId",textContent:Object(r["toDisplayString"])("{{".concat(e.id,"}}"))},null,8,tn)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",nn,[Object(r["createElementVNode"])("i",{class:"icon-help",title:e.description},null,8,an)],512),[[r["vShow"],!!e.description]])],512)),[[r["vShow"],e.is_pre_configured]])})),128))])})),128))]),Object(r["createElementVNode"])("div",rn,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteVariableConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,on),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ln)],512),Object(r["createElementVNode"])("div",cn,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableCannotBeDeleted")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableBeingUsedBy")),1),Object(r["createElementVNode"])("ul",sn,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.variableReferences,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:"".concat(e.referenceType,".").concat(e.referenceId)},Object(r["toDisplayString"])(e.referenceTypeName)+": "+Object(r["toDisplayString"])(e.referenceName),1)})),128))]),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableBeingUsedNeedsRemove")),1),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,dn)],512)])}function gn(e){return hn(e)||pn(e)||mn(e)||bn()}function bn(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mn(e,t){if(e){if("string"===typeof e)return fn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fn(e,t):void 0}}function pn(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function hn(e){if(Array.isArray(e))return fn(e)}function fn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.name?1:0})),t},nameTranslatedText:function(){return this.translate("TagManager_VariablesNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_VariablesDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_VariablesTypeDescription")},lookupTableTranslatedText:function(){return this.translate("TagManager_VariablesLookupTableDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_VariablesLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_VariablesActionDescription")},getActionClasses:function(){var e=this.hasPublishCapability()?" hasCopyAction":"";return"action".concat(e)}}});On.render=un;var Tn=On,yn={class:"manageVariable"},Vn={key:0},Cn={key:1};function Nn(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("VariableList"),c=Object(r["resolveComponent"])("VariableEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",yn,[e.editMode?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vn,[Object(r["createVNode"])(l,{"id-container-version":e.idContainerVersion,"id-container":e.idContainer,"variables-help-text":e.variablesHelpText},null,8,["id-container-version","id-container","variables-help-text"])])),e.editMode?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Cn,[Object(r["createVNode"])(c,{"id-container-version":e.idContainerVersion,"id-container":e.idContainer,"id-variable":e.idVariable},null,8,["id-container-version","id-container","id-variable"])])):Object(r["createCommentVNode"])("",!0)])}var En=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,variablesHelpText:String},components:{VariableList:Tn,VariableEdit:Et},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idVariable}),(function(t){e.onIdVariableParamChange(t)})),u["NotificationsStore"].remove("variablevariablemanagement"),this.onIdVariableParamChange(u["MatomoUrl"].hashParsed.value.idVariable)},methods:{onIdVariableParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVariable",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idVariable:function(){var e=u["MatomoUrl"].hashParsed.value.idVariable;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idVariable}}});En.render=Nn;var Sn=En;function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kn={class:"editTrigger tagManagerManageEdit",ref:"root"},Mn={class:"loadingPiwik"},_n=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Dn={class:"loadingPiwik"},An=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),xn={class:"form-group row"},Bn={class:"col s12"},Ln={key:0},Un={class:"form-group row"},Pn={class:"col s12"},In={class:"form-group row multiple"},Fn={class:"col s12 input-field m6"},Hn={class:"col s12 input-field m6"},Gn={class:"form-help"},$n=["innerHTML"],Rn={class:"col s12 m12"},qn={class:"innerFormField"},zn={class:"innerFormField comparisonField"},Wn={class:"innerFormField"},Xn=["onClick","title"],Kn={class:"triggerConditionNode"},Jn={class:"entityCancel"},Yn={id:"confirmSelectTriggerType"},Zn={class:"collection-header"},Qn=["onClick","title"],ea=["src"],ta={class:"title"},na={class:"secondary-content"},aa=["title"],ia={class:"entityCancel"};function ra(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("GroupedSettings"),s=Object(r["resolveComponent"])("SaveButton"),d=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",kn,[Object(r["createVNode"])(d,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n,a,i,o,d;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Mn,[_n,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Dn,[An,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("form",{onSubmit:t[5]||(t[5]=function(t){return e.edit?e.updateTrigger():e.createTrigger()})},[Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTriggerDisabled]]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","model-value":e.trigger.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.trigger.name=t,e.setValueHasChanged()}),maxlength:255,title:e.translate("General_Name"),"inline-help":e.translate("TagManager_TriggerNameHelp"),placeholder:e.translate("TagManager_TriggerNamePlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.trigger.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.trigger.description=t,e.setValueHasChanged()}),maxlength:1e3,title:e.translate("TagManager_Description"),"inline-help":e.translate("TagManager_TriggerDescriptionHelp"),placeholder:e.translate("TagManager_TriggerDescriptionPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",xn,[Object(r["createElementVNode"])("div",Bn,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureThisTrigger")),1)])],512),[[r["vShow"],null===(n=e.trigger.typeMetadata)||void 0===n||null===(a=n.parameters)||void 0===a?void 0:a.length]]),e.trigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ln,[Object(r["createVNode"])(c,{settings:(null===(i=e.trigger.typeMetadata)||void 0===i?void 0:i.parameters)||[],"all-setting-values":e.parameterValues,onChange:t[2]||(t[2]=function(t){return e.parameterValues[t.name]=t.value})},null,8,["settings","all-setting-values"])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Un,[Object(r["createElementVNode"])("div",Pn,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_OnlyTriggerWhen"))+" "+Object(r["toDisplayString"])(e.translate("Goals_Optional")),1)])],512),[[r["vShow"],null===(o=e.trigger.typeMetadata)||void 0===o?void 0:o.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",In,[Object(r["createElementVNode"])("div",Fn,[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerConditionsHelp")),1)]),Object(r["createElementVNode"])("div",Hn,[Object(r["createElementVNode"])("div",Gn,[Object(r["createElementVNode"])("span",{class:"inline-help",innerHTML:e.$sanitize(e.triggerInlineHelpText)},null,8,$n)])]),Object(r["createElementVNode"])("div",Rn,[Object(r["createElementVNode"])("div",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.trigger.conditions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n,class:Object(r["normalizeClass"])(["condition multiple valign-wrapper","condition".concat(n)])},[Object(r["createElementVNode"])("div",qn,[Object(r["createVNode"])(l,{uicontrol:"expandable-select",name:"condition_actual","model-value":t.actual,"onUpdate:modelValue":function(n){t.actual=n,e.setValueHasChanged()},"full-width":!0,options:e.availableVariables,title:e.variableIdToName[t.actual]||t.actual},null,8,["model-value","onUpdate:modelValue","options","title"])]),Object(r["createElementVNode"])("div",zn,[Object(r["createVNode"])(l,{uicontrol:"select",name:"condition_comparison","model-value":t.comparison,"onUpdate:modelValue":function(n){t.comparison=n,e.setValueHasChanged()},"full-width":!0,options:e.availableComparisons},null,8,["model-value","onUpdate:modelValue","options"])]),Object(r["createElementVNode"])("div",Wn,[Object(r["createVNode"])(l,{uicontrol:"text",name:"condition_expected","model-value":t.expected,"onUpdate:modelValue":function(n){t.expected=n,e.setValueHasChanged(),e.onConditionChange()},"full-width":!0},null,8,["model-value","onUpdate:modelValue"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeConditionEntry(n)},title:e.translate("General_Remove")},null,8,Xn),[[r["vShow"],!(n+1===e.trigger.conditions.length)]])],2)})),128))]),Object(r["createElementVNode"])("p",Kn,Object(r["toDisplayString"])(e.translate("TagManager_TriggerConditionNode")),1)])])],512),[[r["vShow"],null===(d=e.trigger.typeMetadata)||void 0===d?void 0:d.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTriggerDisabled]]),Object(r["withDirectives"])(Object(r["createVNode"])(s,{class:"createButton",onConfirm:t[3]||(t[3]=function(t){return e.edit?e.updateTrigger():e.createTrigger()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.saveButtonText},null,8,["disabled","saving","value"]),[[r["vShow"],!e.isTriggerDisabled]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Jn,[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])])],544),[[r["vShow"],!e.chooseTriggerType&&e.editTitle]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Yn,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.availableTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:n},[Object(r["createElementVNode"])("li",Zn,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(t.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.types,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["collection-item avatar",wn({disabledTemplate:e.isTriggerTemplateDisabled[t.id]},"templateType".concat(t.id),!0)]),onClick:function(n){return e.createTriggerType(t)},key:n,title:e.isTriggerTemplateDisabled[t.id]?e.collectionItemAvatarText:""},[t.icon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",{key:0,alt:"",class:"circle",src:t.icon},null,8,ea)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("span",ta,Object(r["toDisplayString"])(t.name),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(t.description),513),[[r["vShow"],t.description]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",na,[Object(r["createElementVNode"])("i",{class:"icon-help",title:t.help},null,8,aa)],512),[[r["vShow"],!!t.help]])],10,Qn)})),128))])})),128)),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ia,[Object(r["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])],512),[[r["vShow"],e.chooseTriggerType]])]})),_:1},8,["content-title"])],512)}function oa(e,t){return sa(e)||ca(e,t)||ba(e,t)||la()}function la(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ca(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done);o=!0)if(r.push(a.value),t&&r.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return r}}function sa(e){if(Array.isArray(e))return e}function da(e){return da="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},da(e)}function ua(e){return pa(e)||ma(e)||ba(e)||ga()}function ga(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ba(e,t){if(e){if("string"===typeof e)return ha(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ha(e,t):void 0}}function ma(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function pa(e){if(Array.isArray(e))return ha(e)}function ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n-1&&(this.variable.lookup_table.splice(e,1),this.isDirty=!0)},createVariableType:function(e){var t,n=this;e&&this.isVariableTemplateDisabled[e.id]||(this.chooseVariableType=!1,this.editTitle=Object(u["translate"])("TagManager_CreateNewVariable"),this.variable={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:ft.suggestNameForType(e.name)||"",description:"",type:e.id,idcontainer:this.idContainer,idcontainerversion:this.idContainerVersion,default_value:"",lookup_table:[],typeMetadata:e},null!==(t=this.variable.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.variable.typeMetadata.name)),this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.addLookUpEntry(),this.isDirty=!0,Object(r["nextTick"])((function(){if(n.$refs.root){var e=n.$refs.root;e.scrollIntoView();var t=e.querySelector("#name");t&&t.focus()}})))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idVariable,u["MatomoUrl"].updateHash(e)},createVariable:function(){var e=this;this.removeAnyVariableNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVar=!0,ft.createOrUpdateVariable(Object.assign(Object.assign({},this.variable),{},{name:encodeURIComponent(this.variable.name)}),"TagManager.addContainerVariable",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t){e.isDirty=!1;var n=t.value;ft.reload(e.idContainer,e.idContainerVersion).then((function(){if(e.isEmbedded)return e.variable.idvariable=n,void e.$emit("changeVariable",{variable:e.variable});e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Variable")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)}))}})).finally((function(){e.isUpdatingVar=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateVariable:function(){var e=this;this.removeAnyVariableNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVar=!0,ft.createOrUpdateVariable(Object.assign(Object.assign({},this.variable),{},{name:encodeURIComponent(this.variable.name)}),"TagManager.updateContainerVariable",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t)if(e.isEmbedded)e.$emit("changeVariable",{variable:e.variable});else{e.isDirty=!1,ft.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdVariable()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Variable")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingVar=!1})))},checkRequiredFieldsAreSet:function(){return!!this.variable.name||(this.showErrorFieldNotProvidedNotification(Object(u["translate"])("General_Name")),!1)},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{typeInlineHelp:function(){var e,t,n=(null===(e=this.variable.typeMetadata)||void 0===e?void 0:e.description)||"",a=(null===(t=this.variable.typeMetadata)||void 0===t?void 0:t.help)||"";return"".concat(n," ").concat(a)},create:function(){return 0===this.idVariable},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVar},availableLookUpComparisons:function(){return Vt.comparisonOptions.value},isVariableTemplateDisabled:function(){var e=this,t={};return this.availableVariables.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},isVariableDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.variable.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},variableParameterValues:function(){var e;return null!==(e=this.variable.typeMetadata)&&void 0!==e&&e.parameters?this.parameterValues:null},variableLookupTable:function(){return this.variable.lookup_table}}});Nt.render=et;var Et=Nt,St={class:"tagManagerManageList tagManagerVariableList"},wt={class:"variableSearchFilter"},kt=["title"],Mt=["title"],_t=["title"],Dt=["title"],At=["title"],xt=["title"],Bt={colspan:"7"},Lt={class:"loadingPiwik"},Ut=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Pt={colspan:"7"},It=["id"],Ft=["title"],Ht=["title"],Gt=["title"],$t={class:"lookupTable"},Rt={class:"icon-ok"},qt=["title"],zt=["onClick","title"],Wt=["onClick","title"],Xt=["onClick","title"],Kt={class:"tableActionBar"},Jt=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Yt=["title"],Zt=Object(r["createElementVNode"])("span",{class:"icon-help preconfiguredVariablesHelp"},null,-1),Qt={class:"collection-header"},en={class:"title"},tn=["textContent"],nn={class:"secondary-content"},an=["title"],rn={class:"ui-confirm",id:"confirmDeleteVariable",ref:"confirmDeleteVariable"},on=["value"],ln=["value"],cn={class:"ui-confirm",id:"confirmDeleteVariableNotPossible",ref:"confirmDeleteVariableNotPossible"},sn={class:"collection"},dn=["value"];function un(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",St,[Object(r["createVNode"])(c,{feature:"Tag Manager",class:"tagManagerCustomVariablesList","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableUsageBenefits")),1),Object(r["createElementVNode"])("div",wt,[Object(r["withDirectives"])(Object(r["createVNode"])(l,{uicontrol:"text",name:"variableSearch",title:e.translate("General_Search"),modelValue:e.variableSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.variableSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.variables.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,kt),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,Mt),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,_t),Object(r["createElementVNode"])("th",{class:"lookupTable",title:e.lookupTableTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LookupTable")),9,Dt),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,At),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,xt),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Bt,[Object(r["createElementVNode"])("span",Lt,[Ut,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Pt,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoVariablesFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerVariableNow",onClick:t[1]||(t[1]=function(t){return e.createVariable()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariableNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&!e.variables.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"variable".concat(t.idvariable),class:"variables",key:t.idvariable},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Ft),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Ht),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,Gt),Object(r["createElementVNode"])("td",$t,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Rt,null,512),[[r["vShow"],t.lookup_table.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,qt),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editVariable(t.idvariable,t.type)},title:e.translate("TagManager_EditVariable")},null,8,zt),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteVariable(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Variable"))},null,8,Wt),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Variable"))},null,8,Xt),[[r["vShow"],e.hasPublishCapability()]])],2),[[r["vShow"],e.hasWriteAccess]])],8,It)})),128))])],512),[[s]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Kt,[Object(r["createElementVNode"])("a",{class:"createNewVariable",value:"",onClick:t[2]||(t[2]=function(t){return e.createVariable()})},[Jt,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("h2",{title:e.translate("TagManager_PreConfiguredInfoTitle")},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_PreconfiguredVariables"))+" ",1),Zt],8,Yt),Object(r["createElementVNode"])("div",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containerVariables,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:t},[Object(r["createElementVNode"])("li",Qt,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(e.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.types,(function(e){return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:e.id},[Object(r["createElementVNode"])("span",en,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.name)+" ",1),Object(r["createElementVNode"])("span",{class:"variableId",textContent:Object(r["toDisplayString"])("{{".concat(e.id,"}}"))},null,8,tn)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",nn,[Object(r["createElementVNode"])("i",{class:"icon-help",title:e.description},null,8,an)],512),[[r["vShow"],!!e.description]])],512)),[[r["vShow"],e.is_pre_configured]])})),128))])})),128))]),Object(r["createElementVNode"])("div",rn,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteVariableConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,on),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ln)],512),Object(r["createElementVNode"])("div",cn,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableCannotBeDeleted")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableBeingUsedBy")),1),Object(r["createElementVNode"])("ul",sn,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.variableReferences,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:"".concat(e.referenceType,".").concat(e.referenceId)},Object(r["toDisplayString"])(e.referenceTypeName)+": "+Object(r["toDisplayString"])(e.referenceName),1)})),128))]),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_VariableBeingUsedNeedsRemove")),1),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,dn)],512)])}function gn(e){return hn(e)||pn(e)||mn(e)||bn()}function bn(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function mn(e,t){if(e){if("string"===typeof e)return fn(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?fn(e,t):void 0}}function pn(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function hn(e){if(Array.isArray(e))return fn(e)}function fn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.name?1:0})),t},nameTranslatedText:function(){return this.translate("TagManager_VariablesNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_VariablesDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_VariablesTypeDescription")},lookupTableTranslatedText:function(){return this.translate("TagManager_VariablesLookupTableDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_VariablesLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_VariablesActionDescription")},getActionClasses:function(){var e=this.hasPublishCapability()?" hasCopyAction":"";return"action".concat(e)}}});On.render=un;var Tn=On,yn={class:"manageVariable"},Vn={key:0},Cn={key:1};function Nn(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("VariableList"),c=Object(r["resolveComponent"])("VariableEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",yn,[e.editMode?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vn,[Object(r["createVNode"])(l,{"id-container-version":e.idContainerVersion,"id-container":e.idContainer,"variables-help-text":e.variablesHelpText},null,8,["id-container-version","id-container","variables-help-text"])])),e.editMode?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Cn,[Object(r["createVNode"])(c,{"id-container-version":e.idContainerVersion,"id-container":e.idContainer,"id-variable":e.idVariable},null,8,["id-container-version","id-container","id-variable"])])):Object(r["createCommentVNode"])("",!0)])}var En=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,variablesHelpText:String},components:{VariableList:Tn,VariableEdit:Et},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idVariable}),(function(t){e.onIdVariableParamChange(t)})),u["NotificationsStore"].remove("variablevariablemanagement"),this.onIdVariableParamChange(u["MatomoUrl"].hashParsed.value.idVariable)},methods:{onIdVariableParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVariable",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idVariable:function(){var e=u["MatomoUrl"].hashParsed.value.idVariable;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idVariable}}});En.render=Nn;var Sn=En;function wn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var kn={class:"editTrigger tagManagerManageEdit",ref:"root"},Mn={class:"loadingPiwik"},_n=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Dn={class:"loadingPiwik"},An=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),xn={class:"form-group row"},Bn={class:"col s12"},Ln={key:0},Un={class:"form-group row"},Pn={class:"col s12"},In={class:"form-group row multiple"},Fn={class:"col s12 input-field m6"},Hn={class:"col s12 input-field m6"},Gn={class:"form-help"},$n=["innerHTML"],Rn={class:"col s12 m12"},qn={class:"innerFormField"},zn={class:"innerFormField comparisonField"},Wn={class:"innerFormField"},Xn=["onClick","title"],Kn={class:"triggerConditionNode"},Jn={class:"entityCancel"},Yn={id:"confirmSelectTriggerType"},Zn={class:"collection-header"},Qn=["onClick","title"],ea=["src"],ta={class:"title"},na={class:"secondary-content"},aa=["title"],ia={class:"entityCancel"};function ra(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("GroupedSettings"),s=Object(r["resolveComponent"])("SaveButton"),d=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",kn,[Object(r["createVNode"])(d,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n,a,i,o,d;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Mn,[_n,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Dn,[An,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("form",{onSubmit:t[5]||(t[5]=function(t){return e.edit?e.updateTrigger():e.createTrigger()})},[Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTriggerDisabled]]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","model-value":e.trigger.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.trigger.name=t,e.setValueHasChanged()}),maxlength:255,title:e.translate("General_Name"),"inline-help":e.translate("TagManager_TriggerNameHelp"),placeholder:e.translate("TagManager_TriggerNamePlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.trigger.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.trigger.description=t,e.setValueHasChanged()}),maxlength:1e3,title:e.translate("TagManager_Description"),"inline-help":e.translate("TagManager_TriggerDescriptionHelp"),placeholder:e.translate("TagManager_TriggerDescriptionPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",xn,[Object(r["createElementVNode"])("div",Bn,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureThisTrigger")),1)])],512),[[r["vShow"],null===(n=e.trigger.typeMetadata)||void 0===n||null===(a=n.parameters)||void 0===a?void 0:a.length]]),e.trigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ln,[Object(r["createVNode"])(c,{settings:(null===(i=e.trigger.typeMetadata)||void 0===i?void 0:i.parameters)||[],"all-setting-values":e.parameterValues,onChange:t[2]||(t[2]=function(t){return e.parameterValues[t.name]=t.value})},null,8,["settings","all-setting-values"])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Un,[Object(r["createElementVNode"])("div",Pn,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_OnlyTriggerWhen"))+" "+Object(r["toDisplayString"])(e.translate("Goals_Optional")),1)])],512),[[r["vShow"],null===(o=e.trigger.typeMetadata)||void 0===o?void 0:o.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",In,[Object(r["createElementVNode"])("div",Fn,[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerConditionsHelp")),1)]),Object(r["createElementVNode"])("div",Hn,[Object(r["createElementVNode"])("div",Gn,[Object(r["createElementVNode"])("span",{class:"inline-help",innerHTML:e.$sanitize(e.triggerInlineHelpText)},null,8,$n)])]),Object(r["createElementVNode"])("div",Rn,[Object(r["createElementVNode"])("div",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.trigger.conditions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n,class:Object(r["normalizeClass"])(["condition multiple valign-wrapper","condition".concat(n)])},[Object(r["createElementVNode"])("div",qn,[Object(r["createVNode"])(l,{uicontrol:"expandable-select",name:"condition_actual","model-value":t.actual,"onUpdate:modelValue":function(n){t.actual=n,e.setValueHasChanged()},"full-width":!0,options:e.availableVariables,title:e.variableIdToName[t.actual]||t.actual},null,8,["model-value","onUpdate:modelValue","options","title"])]),Object(r["createElementVNode"])("div",zn,[Object(r["createVNode"])(l,{uicontrol:"select",name:"condition_comparison","model-value":t.comparison,"onUpdate:modelValue":function(n){t.comparison=n,e.setValueHasChanged()},"full-width":!0,options:e.availableComparisons},null,8,["model-value","onUpdate:modelValue","options"])]),Object(r["createElementVNode"])("div",Wn,[Object(r["createVNode"])(l,{uicontrol:"text",name:"condition_expected","model-value":t.expected,"onUpdate:modelValue":function(n){t.expected=n,e.setValueHasChanged(),e.onConditionChange()},"full-width":!0},null,8,["model-value","onUpdate:modelValue"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"icon-minus valign",onClick:function(t){return e.removeConditionEntry(n)},title:e.translate("General_Remove")},null,8,Xn),[[r["vShow"],!(n+1===e.trigger.conditions.length)]])],2)})),128))]),Object(r["createElementVNode"])("p",Kn,Object(r["toDisplayString"])(e.translate("TagManager_TriggerConditionNode")),1)])])],512),[[r["vShow"],null===(d=e.trigger.typeMetadata)||void 0===d?void 0:d.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTriggerDisabled]]),Object(r["withDirectives"])(Object(r["createVNode"])(s,{class:"createButton",onConfirm:t[3]||(t[3]=function(t){return e.edit?e.updateTrigger():e.createTrigger()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.saveButtonText},null,8,["disabled","saving","value"]),[[r["vShow"],!e.isTriggerDisabled]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Jn,[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])])],544),[[r["vShow"],!e.chooseTriggerType&&e.editTitle]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Yn,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.availableTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:n},[Object(r["createElementVNode"])("li",Zn,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(t.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.types,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["collection-item avatar",wn({disabledTemplate:e.isTriggerTemplateDisabled[t.id]},"templateType".concat(t.id),!0)]),onClick:function(n){return e.createTriggerType(t)},key:n,title:e.isTriggerTemplateDisabled[t.id]?e.collectionItemAvatarText:""},[t.icon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",{key:0,alt:"",class:"circle",src:t.icon},null,8,ea)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("span",ta,Object(r["toDisplayString"])(t.name),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(t.description),513),[[r["vShow"],t.description]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",na,[Object(r["createElementVNode"])("i",{class:"icon-help",title:t.help},null,8,aa)],512),[[r["vShow"],!!t.help]])],10,Qn)})),128))])})),128)),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ia,[Object(r["createElementVNode"])("a",{onClick:t[6]||(t[6]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])],512),[[r["vShow"],e.chooseTriggerType]])]})),_:1},8,["content-title"])],512)}function oa(e,t){return sa(e)||ca(e,t)||ba(e,t)||la()}function la(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ca(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var a,i,r=[],o=!0,l=!1;try{for(n=n.call(e);!(o=(a=n.next()).done);o=!0)if(r.push(a.value),t&&r.length===t)break}catch(c){l=!0,i=c}finally{try{o||null==n["return"]||n["return"]()}finally{if(l)throw i}}return r}}function sa(e){if(Array.isArray(e))return e}function da(e){return da="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},da(e)}function ua(e){return pa(e)||ma(e)||ba(e)||ga()}function ga(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function ba(e,t){if(e){if("string"===typeof e)return ha(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ha(e,t):void 0}}function ma(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function pa(e){if(Array.isArray(e))return ha(e)}function ha(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n-1){var t=this.trigger.conditions.length-1;t===e?this.trigger.conditions[e]=this.makeDefaultCondition():this.trigger.conditions.splice(e,1),this.isDirty=!0}},createTriggerType:function(e){var t,n=this;e&&this.isTriggerTemplateDisabled[e.id]||(this.chooseTriggerType=!1,this.editTitle=Object(u["translate"])("TagManager_CreateNewTrigger"),this.trigger={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:ya.suggestNameForType(e.name)||"",description:"",type:e.id,idcontainerversion:this.idContainerVersion,conditions:[],typeMetadata:e},null!==(t=this.trigger.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.trigger.typeMetadata.name)),this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.addConditionEntry(),this.isDirty=!0,Object(r["nextTick"])((function(){if(n.$refs.root){var e=n.$refs.root;e.scrollIntoView();var t=e.querySelector("#name");t&&t.focus()}})))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idTrigger,u["MatomoUrl"].updateHash(e)},createTrigger:function(){var e=this;this.removeAnyTriggerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTrigger=!0,ya.createOrUpdateTrigger(this.trigger,"TagManager.addContainerTrigger",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){var n=t.value;e.isDirty=!1,ya.reload(e.idContainer,e.idContainerVersion).then((function(){if(e.isEmbedded)return e.trigger.idtrigger=n,void e.$emit("changeTrigger",{trigger:e.trigger});e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Trigger")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)}))})).finally((function(){e.isUpdatingTrigger=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateTrigger:function(){var e=this;this.removeAnyTriggerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTrigger=!0,ya.createOrUpdateTrigger(this.trigger,"TagManager.updateContainerTrigger",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t){if(e.isEmbedded)return e.$emit("changeTrigger",{trigger:e.trigger}),void ya.reload(e.idContainer,e.idContainerVersion);e.isDirty=!1,ya.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdTrigger()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Trigger")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingTrigger=!1})))},makeDefaultCondition:function(){var e,t="PageUrl";if(null!==(e=this.trigger)&&void 0!==e&&e.typeMetadata){var n=this.trigger.typeMetadata.id;Ca[n]&&(t=Ca[n])}return{comparison:"equals",actual:t,expected:""}},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{isLoading:function(){return ya.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ya.isUpdating.value||this.isUpdatingTrigger},create:function(){return 0===this.idTrigger},edit:function(){return!this.create},canUseCustomTemplates:function(){return u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")},isTriggerDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.trigger.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},saveButtonText:function(){return this.edit?Object(u["translate"])("CoreUpdater_UpdateTitle"):Object(u["translate"])("TagManager_CreateNewTrigger")},collectionItemAvatarText:function(){return Object(u["translate"])("TagManager_UseCustomTemplateCapabilityRequired",Object(u["translate"])("TagManager_CapabilityUseCustomTemplates"))},triggerInlineHelpText:function(){return Object(u["translate"])("TagManager_TriggerConditionsHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/create-a-trigger-to-track-interactions-on-all-nested-elements/"),"")},availableComparisons:function(){return Vt.comparisonOptions.value},isTriggerTemplateDisabled:function(){var e=this,t={};return this.availableTriggers.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},triggerParameterValues:function(){var e;return null!==(e=this.trigger.typeMetadata)&&void 0!==e&&e.parameters?this.parameterValues:null}}});Na.render=ra;var Ea=Na,Sa={class:"tagManagerManageList tagManagerTriggerList"},wa={class:"triggerSearchFilter"},ka=["title"],Ma=["title"],_a=["title"],Da=["title"],Aa=["title"],xa=["title"],Ba={colspan:"7"},La={class:"loadingPiwik"},Ua=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Pa={colspan:"7"},Ia=["id"],Fa=["title"],Ha=["title"],Ga=["title"],$a={class:"conditions"},Ra={class:"icon-ok"},qa=["title"],za=["onClick","title"],Wa=["onClick","title"],Xa=["onClick","title"],Ka={class:"tableActionBar"},Ja=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Ya={class:"ui-confirm",id:"confirmDeleteTrigger",ref:"confirmDeleteTrigger"},Za=["value"],Qa=["value"],ei={class:"ui-confirm",id:"confirmDeleteTriggerNotPossible",ref:"confirmDeleteTriggerNotPossible"},ti={class:"collection"},ni=["value"];function ai(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Sa,[Object(r["createVNode"])(c,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerUsageBenefits")),1),Object(r["createElementVNode"])("div",wa,[Object(r["withDirectives"])(Object(r["createVNode"])(l,{uicontrol:"text",name:"triggerSearch",title:e.translate("General_Search"),modelValue:e.triggerSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.triggerSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.triggers.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,ka),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,Ma),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,_a),Object(r["createElementVNode"])("th",{class:"conditions",title:e.filterTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Filter")),9,Da),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,Aa),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,xa),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Ba,[Object(r["createElementVNode"])("span",La,[Ua,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Pa,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoTriggersFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerTriggerNow",onClick:t[1]||(t[1]=function(t){return e.createTrigger()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTriggerNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.triggers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t){var n;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"trigger".concat(t.idtrigger),class:"triggers",key:t.idtrigger},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Fa),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Ha),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,Ga),Object(r["createElementVNode"])("td",$a,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Ra,null,512),[[r["vShow"],null===(n=t.conditions)||void 0===n?void 0:n.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,qa),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editTrigger(t.idtrigger,t.type)},title:e.translate("TagManager_EditTrigger")},null,8,za),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteTrigger(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Trigger"))},null,8,Wa),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Trigger"))},null,8,Xa),[[r["vShow"],e.hasPublishCapability()]])],2),[[r["vShow"],e.hasWriteAccess]])],8,Ia)})),128))])],512),[[s]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ka,[Object(r["createElementVNode"])("a",{class:"createNewTrigger",value:"",onClick:t[2]||(t[2]=function(t){return e.createTrigger()})},[Ja,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("div",Ya,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteTriggerConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Za),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Qa)],512),Object(r["createElementVNode"])("div",ei,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerCannotBeDeleted")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerBeingUsedBy")),1),Object(r["createElementVNode"])("ul",ti,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.triggerReferences,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:e.referenceId},Object(r["toDisplayString"])(e.referenceTypeName)+": "+Object(r["toDisplayString"])(e.referenceName),1)})),128))]),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerBeingUsedNeedsRemove")),1),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,ni)],512)])}function ii(e){return ci(e)||li(e)||oi(e)||ri()}function ri(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oi(e,t){if(e){if("string"===typeof e)return si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?si(e,t):void 0}}function li(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ci(e){if(Array.isArray(e))return si(e)}function si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.name?1:0})),t},nameTranslatedText:function(){return this.translate("TagManager_TriggersNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_TriggersDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_TriggersTypeDescription")},filterTranslatedText:function(){return this.translate("TagManager_TriggersFilterDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_TriggersLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_TriggersActionDescription")},getActionClasses:function(){var e=this.hasPublishCapability()?" hasCopyAction":"";return"action".concat(e)}}});gi.render=ai;var bi=gi,mi={class:"manageTrigger"};function pi(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TriggerList"),c=Object(r["resolveComponent"])("TriggerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",mi,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"triggers-help-text":e.triggersHelpText},null,8,["id-container","id-container-version","triggers-help-text"])])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"id-trigger":e.idTrigger},null,8,["id-container","id-container-version","id-trigger"])])],512),[[r["vShow"],e.editMode]])])}var hi=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,triggersHelpText:String},components:{TriggerList:bi,TriggerEdit:Ea},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idTrigger}),(function(t){e.onIdTriggerParamChange(t)})),u["NotificationsStore"].remove("triggertriggermanagement"),this.onIdTriggerParamChange(u["MatomoUrl"].hashParsed.value.idTrigger)},methods:{onIdTriggerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddTrigger",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idTrigger:function(){var e=u["MatomoUrl"].hashParsed.value.idTrigger;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idTrigger}}});hi.render=pi;var fi=hi;function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ji={class:"editTag tagManagerManageEdit",ref:"root"},Oi={class:"loadingPiwik"},Ti=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),yi={class:"loadingPiwik"},Vi=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Ci={class:"form-group row"},Ni={class:"col s12"},Ei={key:0},Si={class:"form-group row"},wi={class:"col s12"},ki={class:"form-group row"},Mi={class:"col s12"},_i={class:"form-group row tagStartDate"},Di={class:"col s12 m6"},Ai={class:"row"},xi={class:"col s12"},Bi={for:"start_date_date",class:"active"},Li={class:"tagStartDate"},Ui={class:"col s12 m6 "},Pi={class:"form-help"},Ii={class:"inline-help"},Fi=["innerHTML"],Hi=Object(r["createElementVNode"])("br",null,null,-1),Gi=["innerHTML"],$i={class:"form-group row tagEndDate"},Ri={class:"col s12 m6"},qi={class:"row"},zi={class:"col s12"},Wi={for:"end_date_date",class:"active"},Xi={class:"tagEndDate"},Ki={class:"col s12 m6"},Ji={class:"form-help"},Yi={class:"inline-help"},Zi=["innerHTML"],Qi=Object(r["createElementVNode"])("br",null,null,-1),er=["innerHTML"],tr={class:"entityCancel"},nr={id:"confirmSelectTagType"},ar={class:"collection-header"},ir=["onClick","title"],rr=["src"],or={class:"title"},lr={class:"secondary-content"},cr=["title"],sr={class:"entityCancel"};function dr(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("GroupedSettings"),s=Object(r["resolveComponent"])("TagTriggerArray"),d=Object(r["resolveComponent"])("TagDateInput"),u=Object(r["resolveComponent"])("SaveButton"),g=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ji,[Object(r["createVNode"])(g,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n,a,i,o,g;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Oi,[Ti,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",yi,[Vi,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("form",{onSubmit:t[18]||(t[18]=function(t){return e.edit?e.updateTag():e.createTag()})},[Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTagDisabled]]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","model-value":e.tag.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.tag.name=t,e.setValueHasChanged()}),maxlength:255,title:e.translate("General_Name"),"inline-help":e.translate("TagManager_TagNameHelpV2"),placeholder:e.translate("TagManager_TagNamePlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.tag.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.tag.description=t,e.setValueHasChanged()}),maxlength:1e3,title:e.translate("TagManager_Description"),placeholder:e.translate("TagManager_TagDescriptionPlaceholder")},null,8,["model-value","title","placeholder"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ci,[Object(r["createElementVNode"])("div",Ni,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureWhatTagDoes")),1)])],512),[[r["vShow"],null===(n=e.tag.typeMetadata)||void 0===n?void 0:n.parameters.length]]),e.tag?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ei,[Object(r["createVNode"])(c,{settings:(null===(a=e.tag.typeMetadata)||void 0===a?void 0:a.parameters)||[],"all-setting-values":e.parameterValues,onChange:t[2]||(t[2]=function(t){e.parameterValues[t.name]=t.value,e.setValueHasChanged()})},null,8,["settings","all-setting-values"])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Si,[Object(r["createElementVNode"])("div",wi,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureWhenTagDoes")),1)])],512),[[r["vShow"],null===(i=e.tag.typeMetadata)||void 0===i?void 0:i.parameters.length]]),Object(r["createVNode"])(s,{"container-triggers":e.containerTriggers,type:"fire",title:e.translate("TagManager_FireTriggerTitle"),help:e.translate("TagManager_FireTriggerHelp",e.translate("TagManager_FireLimit")),"model-value":e.fireTriggers,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.fireTriggers=t,e.setValueHasChanged(),e.onFireTriggerChange()}),onCreate:t[4]||(t[4]=function(t){return e.onCreateNewFireTrigger()}),onEdit:t[5]||(t[5]=function(t){return e.editTrigger(t)})},null,8,["container-triggers","title","help","model-value"]),Object(r["createVNode"])(s,{"container-triggers":e.containerTriggers,type:"block",title:e.translate("TagManager_BlockTriggerTitle"),help:e.translate("TagManager_BlockTriggerHelp"),"model-value":e.blockTriggers,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.blockTriggers=t,e.setValueHasChanged(),e.onBlockTriggerChange()}),onCreate:t[7]||(t[7]=function(t){return e.onCreateNewBlockTrigger()}),onEdit:t[8]||(t[8]=function(t){return e.editTrigger(t)})},null,8,["container-triggers","title","help","model-value"]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ki,[Object(r["createElementVNode"])("div",Mi,[Object(r["createElementVNode"])("h3",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{href:"",class:"showAdvancedSettings",onClick:t[9]||(t[9]=Object(r["withModifiers"])((function(t){return e.showAdvanced=!0}),["prevent"]))},Object(r["toDisplayString"])(e.translate("TagManager_ShowAdvancedSettings")),513),[[r["vShow"],!e.showAdvanced]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{href:"",class:"hideAdvancedSettings",onClick:t[10]||(t[10]=Object(r["withModifiers"])((function(t){return e.showAdvanced=!1}),["prevent"]))},Object(r["toDisplayString"])(e.translate("TagManager_HideAdvancedSettings")),513),[[r["vShow"],e.showAdvanced]])])])],512),[[r["vShow"],null===(o=e.tag.typeMetadata)||void 0===o?void 0:o.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"radio",name:"fire_limit","model-value":e.tag.fire_limit,"onUpdate:modelValue":t[11]||(t[11]=function(t){e.tag.fire_limit=t,e.setValueHasChanged()}),options:e.availableFireLimits,title:e.translate("TagManager_FireLimit"),"inline-help":e.fireLimitHelp},null,8,["model-value","options","title","inline-help"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"fire_delay","model-value":e.tag.fire_delay,"onUpdate:modelValue":t[12]||(t[12]=function(t){e.tag.fire_delay=t,e.setValueHasChanged()}),maxlength:8,title:e.translate("TagManager_FireDelay"),"inline-help":e.translate("TagManager_FireDelayHelp"),placeholder:e.translate("TagManager_PlaceholderZero")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"priority","model-value":e.tag.priority,"onUpdate:modelValue":t[13]||(t[13]=function(t){e.tag.priority=t,e.setValueHasChanged()}),maxlength:4,title:e.translate("TagManager_Priority"),"inline-help":e.translate("TagManager_PriorityHelp"),placeholder:e.translate("TagManager_PriorityPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",_i,[Object(r["createElementVNode"])("div",Di,[Object(r["createElementVNode"])("div",Ai,[Object(r["createElementVNode"])("div",xi,[Object(r["createElementVNode"])("label",Bi,Object(r["toDisplayString"])(e.translate("TagManager_StartDate"))+":",1)]),Object(r["createElementVNode"])("div",Li,[Object(r["createVNode"])(d,{name:"start_date","model-value":e.tag.start_date,"onUpdate:modelValue":t[14]||(t[14]=function(t){e.tag.start_date=t,e.setValueHasChanged()}),"default-time":"00:00:00"},null,8,["model-value"])])])]),Object(r["createElementVNode"])("div",Ui,[Object(r["createElementVNode"])("div",Pi,[Object(r["createElementVNode"])("span",Ii,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_TagStartDateHelp","",""))},null,8,Fi),Hi,Object(r["createElementVNode"])("span",{class:"currentLocalTime",innerHTML:e.$sanitize(e.translate("TagManager_CurrentTimeInLocalTimezone","",e.currentTime,""))},null,8,Gi)])])])])]),Object(r["createElementVNode"])("div",$i,[Object(r["createElementVNode"])("div",Ri,[Object(r["createElementVNode"])("div",qi,[Object(r["createElementVNode"])("div",zi,[Object(r["createElementVNode"])("label",Wi,Object(r["toDisplayString"])(e.translate("TagManager_EndDate"))+":",1)]),Object(r["createElementVNode"])("div",Xi,[Object(r["createVNode"])(d,{name:"end_date","model-value":e.tag.end_date,"onUpdate:modelValue":t[15]||(t[15]=function(t){e.tag.end_date=t,e.setValueHasChanged()}),"default-time":"23:59:59"},null,8,["model-value"])])])]),Object(r["createElementVNode"])("div",Ki,[Object(r["createElementVNode"])("div",Ji,[Object(r["createElementVNode"])("span",Yi,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_TagEndDateHelp","",""))},null,8,Zi),Qi,Object(r["createElementVNode"])("span",{class:"currentLocalTime",innerHTML:e.$sanitize(e.translate("TagManager_CurrentTimeInLocalTimezone","",e.currentTime,""))},null,8,er)])])])])])],512),[[r["vShow"],e.showAdvanced&&(null===(g=e.tag.typeMetadata)||void 0===g?void 0:g.hasAdvancedSettings)]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTagDisabled]]),Object(r["withDirectives"])(Object(r["createVNode"])(u,{class:"createButton",onConfirm:t[16]||(t[16]=function(t){return e.edit?e.updateTag():e.createTag()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.edit?e.translate("CoreUpdater_UpdateTitle"):e.translate("TagManager_CreateNewTag")},null,8,["disabled","saving","value"]),[[r["vShow"],!e.isTagDisabled]]),Object(r["createElementVNode"])("div",tr,[Object(r["createElementVNode"])("a",{onClick:t[17]||(t[17]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)])])],544),[[r["vShow"],!e.chooseTagType&&e.editTitle]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",nr,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.availableTags,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:t.name},[Object(r["createElementVNode"])("li",ar,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(t.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.types,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:n,class:Object(r["normalizeClass"])(["collection-item avatar",vi({disabledTemplate:e.isTagTemplateDisabled[t.id]},"templateType".concat(t.id),!0)]),onClick:function(n){return e.createTagType(t)},title:e.isTagTemplateDisabled[t.id]?e.collectionItemAvatarText:""},[t.icon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",{key:0,alt:"",class:"circle",src:t.icon},null,8,rr)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("span",or,Object(r["toDisplayString"])(t.name),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(t.description),513),[[r["vShow"],t.description]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",lr,[Object(r["createElementVNode"])("i",{class:"icon-help",title:t.help},null,8,cr)],512),[[r["vShow"],!!t.help]])],10,ir)})),128))])})),128)),Object(r["createElementVNode"])("div",sr,[Object(r["createElementVNode"])("a",{onClick:t[19]||(t[19]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)])],512),[[r["vShow"],e.chooseTagType]])]})),_:1},8,["content-title"])],512)}function ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gr(e,t){for(var n=0;n-1){var t=this.trigger.conditions.length-1;t===e?this.trigger.conditions[e]=this.makeDefaultCondition():this.trigger.conditions.splice(e,1),this.isDirty=!0}},createTriggerType:function(e){var t,n=this;e&&this.isTriggerTemplateDisabled[e.id]||(this.chooseTriggerType=!1,this.editTitle=Object(u["translate"])("TagManager_CreateNewTrigger"),this.trigger={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:ya.suggestNameForType(e.name)||"",description:"",type:e.id,idcontainerversion:this.idContainerVersion,conditions:[],typeMetadata:e},null!==(t=this.trigger.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.trigger.typeMetadata.name)),this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.addConditionEntry(),this.isDirty=!0,Object(r["nextTick"])((function(){if(n.$refs.root){var e=n.$refs.root;e.scrollIntoView();var t=e.querySelector("#name");t&&t.focus()}})))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idTrigger,u["MatomoUrl"].updateHash(e)},createTrigger:function(){var e=this;this.removeAnyTriggerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTrigger=!0,ya.createOrUpdateTrigger(this.trigger,"TagManager.addContainerTrigger",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){var n=t.value;e.isDirty=!1,ya.reload(e.idContainer,e.idContainerVersion).then((function(){if(e.isEmbedded)return e.trigger.idtrigger=n,void e.$emit("changeTrigger",{trigger:e.trigger});e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Trigger")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)}))})).finally((function(){e.isUpdatingTrigger=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateTrigger:function(){var e=this;this.removeAnyTriggerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTrigger=!0,ya.createOrUpdateTrigger(this.trigger,"TagManager.updateContainerTrigger",this.idContainer,this.idContainerVersion,this.parameterValues).then((function(t){if(t){if(e.isEmbedded)return e.$emit("changeTrigger",{trigger:e.trigger}),void ya.reload(e.idContainer,e.idContainerVersion);e.isDirty=!1,ya.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdTrigger()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Trigger")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingTrigger=!1})))},makeDefaultCondition:function(){var e,t="PageUrl";if(null!==(e=this.trigger)&&void 0!==e&&e.typeMetadata){var n=this.trigger.typeMetadata.id;Ca[n]&&(t=Ca[n])}return{comparison:"equals",actual:t,expected:""}},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{isLoading:function(){return ya.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ya.isUpdating.value||this.isUpdatingTrigger},create:function(){return 0===this.idTrigger},edit:function(){return!this.create},canUseCustomTemplates:function(){return u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")},isTriggerDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.trigger.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},saveButtonText:function(){return this.edit?Object(u["translate"])("CoreUpdater_UpdateTitle"):Object(u["translate"])("TagManager_CreateNewTrigger")},collectionItemAvatarText:function(){return Object(u["translate"])("TagManager_UseCustomTemplateCapabilityRequired",Object(u["translate"])("TagManager_CapabilityUseCustomTemplates"))},triggerInlineHelpText:function(){return Object(u["translate"])("TagManager_TriggerConditionsHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/create-a-trigger-to-track-interactions-on-all-nested-elements/"),"")},availableComparisons:function(){return Vt.comparisonOptions.value},isTriggerTemplateDisabled:function(){var e=this,t={};return this.availableTriggers.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},triggerParameterValues:function(){var e;return null!==(e=this.trigger.typeMetadata)&&void 0!==e&&e.parameters?this.parameterValues:null}}});Na.render=ra;var Ea=Na,Sa={class:"tagManagerManageList tagManagerTriggerList"},wa={class:"triggerSearchFilter"},ka=["title"],Ma=["title"],_a=["title"],Da=["title"],Aa=["title"],xa=["title"],Ba={colspan:"7"},La={class:"loadingPiwik"},Ua=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Pa={colspan:"7"},Ia=["id"],Fa=["title"],Ha=["title"],Ga=["title"],$a={class:"conditions"},Ra={class:"icon-ok"},qa=["title"],za=["onClick","title"],Wa=["onClick","title"],Xa=["onClick","title"],Ka={class:"tableActionBar"},Ja=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Ya={class:"ui-confirm",id:"confirmDeleteTrigger",ref:"confirmDeleteTrigger"},Za=["value"],Qa=["value"],ei={class:"ui-confirm",id:"confirmDeleteTriggerNotPossible",ref:"confirmDeleteTriggerNotPossible"},ti={class:"collection"},ni=["value"];function ai(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ContentBlock"),s=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Sa,[Object(r["createVNode"])(c,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerUsageBenefits")),1),Object(r["createElementVNode"])("div",wa,[Object(r["withDirectives"])(Object(r["createVNode"])(l,{uicontrol:"text",name:"triggerSearch",title:e.translate("General_Search"),modelValue:e.triggerSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.triggerSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.triggers.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,ka),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,Ma),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,_a),Object(r["createElementVNode"])("th",{class:"conditions",title:e.filterTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Filter")),9,Da),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,Aa),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,xa),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Ba,[Object(r["createElementVNode"])("span",La,[Ua,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Pa,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoTriggersFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerTriggerNow",onClick:t[1]||(t[1]=function(t){return e.createTrigger()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTriggerNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.triggers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t){var n;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"trigger".concat(t.idtrigger),class:"triggers",key:t.idtrigger},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Fa),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Ha),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,Ga),Object(r["createElementVNode"])("td",$a,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Ra,null,512),[[r["vShow"],null===(n=t.conditions)||void 0===n?void 0:n.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,qa),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editTrigger(t.idtrigger,t.type)},title:e.translate("TagManager_EditTrigger")},null,8,za),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteTrigger(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Trigger"))},null,8,Wa),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Trigger"))},null,8,Xa),[[r["vShow"],e.hasPublishCapability()]])],2),[[r["vShow"],e.hasWriteAccess]])],8,Ia)})),128))])],512),[[s]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ka,[Object(r["createElementVNode"])("a",{class:"createNewTrigger",value:"",onClick:t[2]||(t[2]=function(t){return e.createTrigger()})},[Ja,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("div",Ya,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteTriggerConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Za),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Qa)],512),Object(r["createElementVNode"])("div",ei,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerCannotBeDeleted")),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerBeingUsedBy")),1),Object(r["createElementVNode"])("ul",ti,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.triggerReferences,(function(e){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:"collection-item",key:e.referenceId},Object(r["toDisplayString"])(e.referenceTypeName)+": "+Object(r["toDisplayString"])(e.referenceName),1)})),128))]),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TriggerBeingUsedNeedsRemove")),1),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_Cancel")},null,8,ni)],512)])}function ii(e){return ci(e)||li(e)||oi(e)||ri()}function ri(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function oi(e,t){if(e){if("string"===typeof e)return si(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?si(e,t):void 0}}function li(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function ci(e){if(Array.isArray(e))return si(e)}function si(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.name?1:0})),t},nameTranslatedText:function(){return this.translate("TagManager_TriggersNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_TriggersDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_TriggersTypeDescription")},filterTranslatedText:function(){return this.translate("TagManager_TriggersFilterDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_TriggersLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_TriggersActionDescription")},getActionClasses:function(){var e=this.hasPublishCapability()?" hasCopyAction":"";return"action".concat(e)}}});gi.render=ai;var bi=gi,mi={class:"manageTrigger"};function pi(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TriggerList"),c=Object(r["resolveComponent"])("TriggerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",mi,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"triggers-help-text":e.triggersHelpText},null,8,["id-container","id-container-version","triggers-help-text"])])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"id-trigger":e.idTrigger},null,8,["id-container","id-container-version","id-trigger"])])],512),[[r["vShow"],e.editMode]])])}var hi=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,triggersHelpText:String},components:{TriggerList:bi,TriggerEdit:Ea},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idTrigger}),(function(t){e.onIdTriggerParamChange(t)})),u["NotificationsStore"].remove("triggertriggermanagement"),this.onIdTriggerParamChange(u["MatomoUrl"].hashParsed.value.idTrigger)},methods:{onIdTriggerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddTrigger",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idTrigger:function(){var e=u["MatomoUrl"].hashParsed.value.idTrigger;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idTrigger}}});hi.render=pi;var fi=hi;function vi(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ji={class:"editTag tagManagerManageEdit",ref:"root"},Oi={class:"loadingPiwik"},Ti=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),yi={class:"loadingPiwik"},Vi=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Ci={class:"form-group row"},Ni={class:"col s12"},Ei={key:0},Si={class:"form-group row"},wi={class:"col s12"},ki={class:"form-group row"},Mi={class:"col s12"},_i={class:"form-group row tagStartDate"},Di={class:"col s12 m6"},Ai={class:"row"},xi={class:"col s12"},Bi={for:"start_date_date",class:"active"},Li={class:"tagStartDate"},Ui={class:"col s12 m6 "},Pi={class:"form-help"},Ii={class:"inline-help"},Fi=["innerHTML"],Hi=Object(r["createElementVNode"])("br",null,null,-1),Gi=["innerHTML"],$i={class:"form-group row tagEndDate"},Ri={class:"col s12 m6"},qi={class:"row"},zi={class:"col s12"},Wi={for:"end_date_date",class:"active"},Xi={class:"tagEndDate"},Ki={class:"col s12 m6"},Ji={class:"form-help"},Yi={class:"inline-help"},Zi=["innerHTML"],Qi=Object(r["createElementVNode"])("br",null,null,-1),er=["innerHTML"],tr={class:"entityCancel"},nr={id:"confirmSelectTagType"},ar={class:"collection-header"},ir=["onClick","title"],rr=["src"],or={class:"title"},lr={class:"secondary-content"},cr=["title"],sr={class:"entityCancel"};function dr(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("GroupedSettings"),s=Object(r["resolveComponent"])("TagTriggerArray"),d=Object(r["resolveComponent"])("TagDateInput"),u=Object(r["resolveComponent"])("SaveButton"),g=Object(r["resolveComponent"])("ContentBlock");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ji,[Object(r["createVNode"])(g,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n,a,i,o,g;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Oi,[Ti,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",yi,[Vi,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("form",{onSubmit:t[18]||(t[18]=function(t){return e.edit?e.updateTag():e.createTag()})},[Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTagDisabled]]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","model-value":e.tag.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.tag.name=t,e.setValueHasChanged()}),maxlength:255,title:e.translate("General_Name"),"inline-help":e.translate("TagManager_TagNameHelpV2"),placeholder:e.translate("TagManager_TagNamePlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.tag.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.tag.description=t,e.setValueHasChanged()}),maxlength:1e3,title:e.translate("TagManager_Description"),placeholder:e.translate("TagManager_TagDescriptionPlaceholder")},null,8,["model-value","title","placeholder"])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ci,[Object(r["createElementVNode"])("div",Ni,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureWhatTagDoes")),1)])],512),[[r["vShow"],null===(n=e.tag.typeMetadata)||void 0===n?void 0:n.parameters.length]]),e.tag?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ei,[Object(r["createVNode"])(c,{settings:(null===(a=e.tag.typeMetadata)||void 0===a?void 0:a.parameters)||[],"all-setting-values":e.parameterValues,onChange:t[2]||(t[2]=function(t){e.parameterValues[t.name]=t.value,e.setValueHasChanged()})},null,8,["settings","all-setting-values"])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Si,[Object(r["createElementVNode"])("div",wi,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ConfigureWhenTagDoes")),1)])],512),[[r["vShow"],null===(i=e.tag.typeMetadata)||void 0===i?void 0:i.parameters.length]]),Object(r["createVNode"])(s,{"container-triggers":e.containerTriggers,type:"fire",title:e.translate("TagManager_FireTriggerTitle"),help:e.translate("TagManager_FireTriggerHelp",e.translate("TagManager_FireLimit")),"model-value":e.fireTriggers,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.fireTriggers=t,e.setValueHasChanged(),e.onFireTriggerChange()}),onCreate:t[4]||(t[4]=function(t){return e.onCreateNewFireTrigger()}),onEdit:t[5]||(t[5]=function(t){return e.editTrigger(t)})},null,8,["container-triggers","title","help","model-value"]),Object(r["createVNode"])(s,{"container-triggers":e.containerTriggers,type:"block",title:e.translate("TagManager_BlockTriggerTitle"),help:e.translate("TagManager_BlockTriggerHelp"),"model-value":e.blockTriggers,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.blockTriggers=t,e.setValueHasChanged(),e.onBlockTriggerChange()}),onCreate:t[7]||(t[7]=function(t){return e.onCreateNewBlockTrigger()}),onEdit:t[8]||(t[8]=function(t){return e.editTrigger(t)})},null,8,["container-triggers","title","help","model-value"]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ki,[Object(r["createElementVNode"])("div",Mi,[Object(r["createElementVNode"])("h3",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{href:"",class:"showAdvancedSettings",onClick:t[9]||(t[9]=Object(r["withModifiers"])((function(t){return e.showAdvanced=!0}),["prevent"]))},Object(r["toDisplayString"])(e.translate("TagManager_ShowAdvancedSettings")),513),[[r["vShow"],!e.showAdvanced]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{href:"",class:"hideAdvancedSettings",onClick:t[10]||(t[10]=Object(r["withModifiers"])((function(t){return e.showAdvanced=!1}),["prevent"]))},Object(r["toDisplayString"])(e.translate("TagManager_HideAdvancedSettings")),513),[[r["vShow"],e.showAdvanced]])])])],512),[[r["vShow"],null===(o=e.tag.typeMetadata)||void 0===o?void 0:o.hasAdvancedSettings]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"radio",name:"fire_limit","model-value":e.tag.fire_limit,"onUpdate:modelValue":t[11]||(t[11]=function(t){e.tag.fire_limit=t,e.setValueHasChanged()}),options:e.availableFireLimits,title:e.translate("TagManager_FireLimit"),"inline-help":e.fireLimitHelp},null,8,["model-value","options","title","inline-help"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"fire_delay","model-value":e.tag.fire_delay,"onUpdate:modelValue":t[12]||(t[12]=function(t){e.tag.fire_delay=t,e.setValueHasChanged()}),maxlength:8,title:e.translate("TagManager_FireDelay"),"inline-help":e.translate("TagManager_FireDelayHelp"),placeholder:e.translate("TagManager_PlaceholderZero")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"priority","model-value":e.tag.priority,"onUpdate:modelValue":t[13]||(t[13]=function(t){e.tag.priority=t,e.setValueHasChanged()}),maxlength:4,title:e.translate("TagManager_Priority"),"inline-help":e.translate("TagManager_PriorityHelp"),placeholder:e.translate("TagManager_PriorityPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createElementVNode"])("div",_i,[Object(r["createElementVNode"])("div",Di,[Object(r["createElementVNode"])("div",Ai,[Object(r["createElementVNode"])("div",xi,[Object(r["createElementVNode"])("label",Bi,Object(r["toDisplayString"])(e.translate("TagManager_StartDate"))+":",1)]),Object(r["createElementVNode"])("div",Li,[Object(r["createVNode"])(d,{name:"start_date","model-value":e.tag.start_date,"onUpdate:modelValue":t[14]||(t[14]=function(t){e.tag.start_date=t,e.setValueHasChanged()}),"default-time":"00:00:00"},null,8,["model-value"])])])]),Object(r["createElementVNode"])("div",Ui,[Object(r["createElementVNode"])("div",Pi,[Object(r["createElementVNode"])("span",Ii,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_TagStartDateHelp","",""))},null,8,Fi),Hi,Object(r["createElementVNode"])("span",{class:"currentLocalTime",innerHTML:e.$sanitize(e.translate("TagManager_CurrentTimeInLocalTimezone","",e.currentTime,""))},null,8,Gi)])])])])]),Object(r["createElementVNode"])("div",$i,[Object(r["createElementVNode"])("div",Ri,[Object(r["createElementVNode"])("div",qi,[Object(r["createElementVNode"])("div",zi,[Object(r["createElementVNode"])("label",Wi,Object(r["toDisplayString"])(e.translate("TagManager_EndDate"))+":",1)]),Object(r["createElementVNode"])("div",Xi,[Object(r["createVNode"])(d,{name:"end_date","model-value":e.tag.end_date,"onUpdate:modelValue":t[15]||(t[15]=function(t){e.tag.end_date=t,e.setValueHasChanged()}),"default-time":"23:59:59"},null,8,["model-value"])])])]),Object(r["createElementVNode"])("div",Ki,[Object(r["createElementVNode"])("div",Ji,[Object(r["createElementVNode"])("span",Yi,[Object(r["createElementVNode"])("span",null,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_TagEndDateHelp","",""))},null,8,Zi),Qi,Object(r["createElementVNode"])("span",{class:"currentLocalTime",innerHTML:e.$sanitize(e.translate("TagManager_CurrentTimeInLocalTimezone","",e.currentTime,""))},null,8,er)])])])])])],512),[[r["vShow"],e.showAdvanced&&(null===(g=e.tag.typeMetadata)||void 0===g?void 0:g.hasAdvancedSettings)]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",{class:"alert alert-warning"},Object(r["toDisplayString"])(e.translate("TagManager_UseCustomTemplateCapabilityRequired",e.translate("TagManager_CapabilityUseCustomTemplates"))),513),[[r["vShow"],e.isTagDisabled]]),Object(r["withDirectives"])(Object(r["createVNode"])(u,{class:"createButton",onConfirm:t[16]||(t[16]=function(t){return e.edit?e.updateTag():e.createTag()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.edit?e.translate("CoreUpdater_UpdateTitle"):e.translate("TagManager_CreateNewTag")},null,8,["disabled","saving","value"]),[[r["vShow"],!e.isTagDisabled]]),Object(r["createElementVNode"])("div",tr,[Object(r["createElementVNode"])("a",{onClick:t[17]||(t[17]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)])])],544),[[r["vShow"],!e.chooseTagType&&e.editTitle]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",nr,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.availableTags,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("ul",{class:"collection with-header",key:t.name},[Object(r["createElementVNode"])("li",ar,[Object(r["createElementVNode"])("h4",null,Object(r["toDisplayString"])(t.name),1)]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.types,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:n,class:Object(r["normalizeClass"])(["collection-item avatar",vi({disabledTemplate:e.isTagTemplateDisabled[t.id]},"templateType".concat(t.id),!0)]),onClick:function(n){return e.createTagType(t)},title:e.isTagTemplateDisabled[t.id]?e.collectionItemAvatarText:""},[t.icon?(Object(r["openBlock"])(),Object(r["createElementBlock"])("img",{key:0,alt:"",class:"circle",src:t.icon},null,8,rr)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("span",or,Object(r["toDisplayString"])(t.name),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(t.description),513),[[r["vShow"],t.description]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",lr,[Object(r["createElementVNode"])("i",{class:"icon-help",title:t.help},null,8,cr)],512),[[r["vShow"],!!t.help]])],10,ir)})),128))])})),128)),Object(r["createElementVNode"])("div",sr,[Object(r["createElementVNode"])("a",{onClick:t[19]||(t[19]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)])],512),[[r["vShow"],e.chooseTagType]])]})),_:1},8,["content-title"])],512)}function ur(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function gr(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,a=new Array(t);n-1){var t=this.blockTriggers.length-1;t===e?this.blockTriggers[e]=null:this.blockTriggers.splice(e,1),this.isDirty=!0}},onFireTriggerChange:function(){var e=this.fireTriggers.every((function(e){return!!e}));e&&this.addFireTrigger()},addFireTrigger:function(){this.fireTriggers.push(null),this.isDirty=!0},removeFireTrigger:function(e){if(e>-1){var t=this.fireTriggers.length-1;t===e?this.fireTriggers[e]=null:this.fireTriggers.splice(e,1),this.isDirty=!0}},createTagType:function(e){var t,n=this;e&&this.isTagTemplateDisabled[e.id]||(this.chooseTagType=!1,this.tag={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:mo.suggestNameForType(e.name)||"",type:e.id,fire_limit:"unlimited",priority:"GoogleTag"===e.id||"GoogleAnalytics4"===e.id?1:999,fire_delay:0,typeMetadata:e},this.editTitle=Object(u["translate"])("TagManager_CreateNewTag"),null!==(t=this.tag.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.tag.typeMetadata.name)),this.blockTriggers=[null],this.fireTriggers=[null],this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.isDirty=!1,setTimeout((function(){var e=Vo(n.$refs.root);e.length&&e[0]&&e[0].scrollIntoView(),e.find("#name").focus()}),1))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idTag,u["MatomoUrl"].updateHash(e)},createTag:function(){var e=this;this.removeAnyTagNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTag=!0,mo.createOrUpdateTag(this.tag,"TagManager.addContainerTag",this.idContainer,this.idContainerVersion,this.parameterValues,this.fireTriggers.filter((function(e){return!!e})),this.blockTriggers.filter((function(e){return!!e}))).then((function(t){t&&(e.isDirty=!1,mo.reload(e.idContainer,e.idContainerVersion).then((function(){e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Tag")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)})))})).finally((function(){e.isUpdatingTag=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateTag:function(){var e=this;this.removeAnyTagNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTag=!0,mo.createOrUpdateTag(this.tag,"TagManager.updateContainerTag",this.idContainer,this.idContainerVersion,this.parameterValues,this.fireTriggers.filter((function(e){return!!e})),this.blockTriggers.filter((function(e){return!!e}))).then((function(t){if(t){e.isDirty=!1,mo.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdTag()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Tag")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingTag=!1})))},checkRequiredFieldsAreSet:function(){if(!this.tag.name){var e=Object(u["translate"])("General_Name");return this.showErrorFieldNotProvidedNotification(e),!1}return!(!this.fireTriggers||!this.fireTriggers.length)||(this.showNotification(Object(u["translate"])("TagManager_TagFireTriggerRequirement"),"error"),!1)},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{availableFireLimits:function(){return hr.fireLimitsOptions.value},isLoading:function(){return ya.isLoading.value||hr.isLoading.value},isUpdating:function(){return ya.isUpdating.value||this.isUpdatingTag},create:function(){return 0===this.idTag},edit:function(){return!this.create},canUseCustomTemplates:function(){return u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")},isTagDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.tag.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},isTagTemplateDisabled:function(){var e=this,t={};return this.availableTags.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},collectionItemAvatarText:function(){return Object(u["translate"])("TagManager_UseCustomTemplateCapabilityRequired",Object(u["translate"])("TagManager_CapabilityUseCustomTemplates"))},fireLimitHelp:function(){return Object(u["translate"])("TagManager_FireLimitHelp",Object(u["translate"])("TagManager_Unlimited"),Object(u["translate"])("TagManager_OncePage"),Object(u["translate"])("TagManager_Once24Hours"),Object(u["translate"])("TagManager_OnceLifetime"))}}});Eo.render=dr;var So=Eo,wo={class:"tagManagerManageList tagManagerTagList"},ko={class:"tagSearchFilter"},Mo=["title"],_o=["title"],Do=["title"],Ao=["title"],xo=["title"],Bo=["title"],Lo={colspan:"6"},Uo={class:"loadingPiwik"},Po=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Io={colspan:"6"},Fo=["id"],Ho=["title"],Go=["title"],$o=["title"],Ro={class:"triggers"},qo=["onClick","title"],zo=["title"],Wo=["onClick","title"],Xo=["title"],Ko=["title"],Jo=["onClick","title"],Yo=["onClick","title"],Zo=["onClick","title"],Qo=["onClick","title"],el=["onClick","title"],tl={class:"tableActionBar"},nl=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),al={class:"ui-confirm",id:"confirmDeleteTag",ref:"confirmDeleteTag"},il=["value"],rl=["value"],ol={class:"ui-confirm",id:"confirmPauseTag",ref:"confirmPauseTag"},ll=["value"],cl=["value"],sl={class:"ui-confirm",id:"confirmResumeTag",ref:"confirmResumeTag"},dl=["value"],ul=["value"];function gl(e,t,n,a,i,o){var l=this,c=Object(r["resolveComponent"])("Field"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",wo,[Object(r["createVNode"])(s,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TagUsageBenefits")),1),Object(r["createElementVNode"])("div",ko,[Object(r["withDirectives"])(Object(r["createVNode"])(c,{uicontrol:"text",name:"tagSearch",title:e.translate("General_Search"),modelValue:e.tagSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.tagSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.tags.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,Mo),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,_o),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,Do),Object(r["createElementVNode"])("th",{class:"triggers",title:e.triggersTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Triggers")),9,Ao),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,xo),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,Bo),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Lo,[Object(r["createElementVNode"])("span",Uo,[Po,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Io,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoTagsFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerTagNow",onClick:t[1]||(t[1]=function(t){return e.createTag()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTagNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.tags.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTags,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{class:"tags",key:t.idtag,id:"tag".concat(t.idtag)},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Ho),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Go),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,$o),Object(r["createElementVNode"])("td",Ro,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.fire_trigger_ids,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n,style:{"margin-right":"3.5px"}},[e.hasWriteAccess?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,style:{display:"inline-block","vertical-align":"top !important"},class:"chip",href:"",onClick:Object(r["withModifiers"])((function(n){return e.editTrigger(t)}),["prevent"]),title:l.triggers[t]},Object(r["toDisplayString"])(e.truncateText(l.triggers[t],e.triggerTruncateLength)),9,qo)):Object(r["createCommentVNode"])("",!0),e.hasWriteAccess?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:1,class:"chip",title:l.triggers[t]},Object(r["toDisplayString"])(e.truncateText(l.triggers[t],e.triggerTruncateLength)),9,zo))])})),128)),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Except"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.block_trigger_ids,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n,style:{"margin-right":"3.5px"}},[Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"chip",href:"",onClick:Object(r["withModifiers"])((function(n){return e.editTrigger(t)}),["prevent"]),title:l.triggers[t]},Object(r["toDisplayString"])(e.truncateText(l.triggers[t],e.triggerTruncateLength)),9,Wo),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"chip",title:l.triggers[t]},Object(r["toDisplayString"])(e.truncateText(l.triggers[t],e.triggerTruncateLength)),9,Xo),[[r["vShow"],!e.hasWriteAccess]])])})),128))],512),[[r["vShow"],t.block_trigger_ids.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,Ko),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-pause",onClick:function(n){return e.pauseTag(t)},title:e.translate("TagManager_PauseX",e.translate("TagManager_Tag"))},null,8,Jo),[[r["vShow"],"active"===t.status]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-play",onClick:function(n){return e.resumeTag(t)},title:e.translate("TagManager_ResumeX",e.translate("TagManager_Tag"))},null,8,Yo),[[r["vShow"],"paused"===t.status]]),Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editTag(t.idtag,t.type)},title:e.translate("TagManager_EditTag")},null,8,Zo),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteTag(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Tag"))},null,8,Qo),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Tag"))},null,8,el),[[r["vShow"],e.hasPublishCapability()]])],2),[[r["vShow"],e.hasWriteAccess]])],8,Fo)})),128))])],512),[[d]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",tl,[Object(r["createElementVNode"])("a",{class:"createNewTag",value:"",onClick:t[2]||(t[2]=function(t){return e.createTag()})},[nl,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("div",al,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteTagConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,il),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,rl)],512),Object(r["createElementVNode"])("div",ol,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_PauseTagConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,ll),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,cl)],512),Object(r["createElementVNode"])("div",sl,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_ResumeTagConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,dl),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ul)],512)])}function bl(e){return fl(e)||hl(e)||pl(e)||ml()}function ml(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pl(e,t){if(e){if("string"===typeof e)return vl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vl(e,t):void 0}}function hl(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function fl(e){if(Array.isArray(e))return vl(e)}function vl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n',"")),this.showNotification("".concat(n," ").concat(a),"success")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:Tl,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},openCopyDialog:function(e){var t=u["MatomoUrl"].stringify({module:"TagManager",action:"copyTagDialog",idSite:e.idsite,idContainer:this.idContainer,idTag:e.idtag,idContainerVersion:this.idContainerVersion});window.Piwik_Popover.createPopupAndLoadUrl(t,"","mtmCopyTag")}},computed:{triggers:function(){var e={};return ya.triggers.value.forEach((function(t){e["".concat(t.idtrigger)]=t.name})),e},isLoading:function(){return mo.isLoading.value},isUpdating:function(){return mo.isUpdating.value},tags:function(){return mo.tags.value},sortedTags:function(){var e=this,t=this.tagSearch.toLowerCase(),n=bl(this.tags).filter((function(n){return Object.keys(n).some((function(a){var i=n,r="";if("string"===typeof i[a])r=i[a];else if("typeMetadata"===a){var o=i.typeMetadata;r=o.name}else if("fire_trigger_ids"===a)e.triggers&&i.fire_trigger_ids&&Object.values(i.fire_trigger_ids).forEach((function(t){e.triggers[t]&&(r+="".concat(e.triggers[t]," "))}));else if("parameters"===a&&"CustomHtml"===i.type){var l=i.parameters;r=l.customHtml}return-1!==r.toLowerCase().indexOf(t)}))}));return n.sort((function(e,t){return e.namet.name?1:0})),n},nameTranslatedText:function(){return this.translate("TagManager_TagsNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_TagsDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_TagsTypeDescription")},triggersTranslatedText:function(){return this.translate("TagManager_TagsTriggersDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_TagsLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_TagsActionDescription")},getActionClasses:function(){var e=this.hasPublishCapability()?" hasCopyAction":"";return"action".concat(e)}}});yl.render=gl;var Vl=yl,Cl={class:"manageTag"},Nl={key:0},El={key:1};function Sl(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TagList"),c=Object(r["resolveComponent"])("TagEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Cl,[e.editMode?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Nl,[Object(r["createVNode"])(l,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"tags-help-text":e.tagsHelpText},null,8,["id-container","id-container-version","tags-help-text"])])),e.editMode?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",El,[Object(r["createVNode"])(c,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"id-tag":e.idTag},null,8,["id-container","id-container-version","id-tag"])])):Object(r["createCommentVNode"])("",!0)])}var wl=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,tagsHelpText:String},components:{TagList:Vl,TagEdit:So},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idTag}),(function(t){e.onIdTagParamChange(t)})),u["NotificationsStore"].remove("tagtagmanagement"),this.onIdTagParamChange(u["MatomoUrl"].hashParsed.value.idTag)},methods:{onIdTagParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddTag",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idTag:function(){var e=u["MatomoUrl"].hashParsed.value.idTag;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idTag}}});wl.render=Sl;var kl=wl,Ml={class:"editVersion tagManagerManageEdit"},_l={class:"loadingPiwik"},Dl=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Al={class:"loadingPiwik"},xl=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Bl={key:0},Ll={key:0},Ul={key:1},Pl=["innerHTML"],Il={key:2,class:"versionChanges"},Fl={key:0},Hl={colspan:"4"},Gl={key:1},$l={colspan:"4"},Rl={class:"lastUpdated"},ql={class:"entityCancel"};function zl(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("SaveButton"),s=Object(r["resolveComponent"])("ActivityIndicator"),d=Object(r["resolveComponent"])("ContentBlock"),u=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ml,[Object(r["createVNode"])(d,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",_l,[Dl,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Al,[xl,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["createElementVNode"])("form",{onSubmit:t[6]||(t[6]=function(t){return e.edit?e.updateVersion():e.createVersion()})},[Object(r["createElementVNode"])("div",null,[e.hasPublishCapability()||e.hasWriteCapability()&&e.hasPublishToLiveCapability()?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Bl,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","inline-help":e.versionNameHelpText,"inline-help-bind":{lastVersion:e.lastVersion},"model-value":e.version.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.version.name=t,e.setValueHasChanged()}),maxlength:30,title:e.translate("TagManager_VersionName"),placeholder:e.translate("TagManager_VersionNamePlaceholder")},null,8,["inline-help","inline-help-bind","model-value","title","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.version.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.version.description=t,e.setValueHasChanged()}),title:e.translate("TagManager_VersionDescriptionOptional"),"inline-help":e.translate("TagManager_VersionDescriptionHelp"),placeholder:e.translate("TagManager_VersionDescriptionPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createVNode"])(c,{class:"createButton no-publish",onConfirm:t[2]||(t[2]=function(t){return e.edit?e.updateVersion():e.createVersion()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.edit?e.translate("CoreUpdater_UpdateTitle"):e.translate("TagManager_CreateVersionWithoutPublishing")},null,8,["disabled","saving","value"]),e.create&&e.environments.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ll,[Object(r["createVNode"])(l,{uicontrol:"select",name:"environment","inline-help":e.selectTagManagerEnvironmentHelp,"inline-help-bind":{canPublishToLive:e.canPublishToLive},"model-value":null===(n=e.version.environments)||void 0===n?void 0:n[0],"onUpdate:modelValue":t[3]||(t[3]=function(t){e.version.environments[0]=t,e.setValueHasChanged()}),options:e.environments,introduction:e.translate("TagManager_OrCreateAndPublishVersion"),title:e.translate("TagManager_Environment")},null,8,["inline-help","inline-help-bind","model-value","options","introduction","title"])])):Object(r["createCommentVNode"])("",!0),e.create&&e.environments.length?(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:1,class:"publishButton",onConfirm:t[4]||(t[4]=function(t){return e.createVersionAndPublish()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.translate("TagManager_CreateVersionAndPublishRelease")},null,8,["disabled","saving","value"])):Object(r["createCommentVNode"])("",!0)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ul,[Object(r["createElementVNode"])("div",{class:"alert alert-warning",innerHTML:e.$sanitize(e.showNoAccessErrorMessage)},null,8,Pl)])),e.lastVersion?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Il,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ChangesSinceLastVersion"))+":",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("SitesManager_Type")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("TagManager_Change")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),1)])]),Object(r["createElementVNode"])("tbody",null,[e.isLoadingVersionChanges?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Fl,[Object(r["createElementVNode"])("td",Hl,[Object(r["createVNode"])(s,{"loading-message":e.translate("TagManager_DetectingChanges"),loading:!0},null,8,["loading-message"])])])):Object(r["createCommentVNode"])("",!0),e.versionChanges.length||e.isLoadingVersionChanges?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Gl,[Object(r["createElementVNode"])("td",$l,Object(r["toDisplayString"])(e.translate("UserCountryMap_None")),1)])),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.versionChanges,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.translate(t.entityType)),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.translate(t.type)),1),Object(r["createElementVNode"])("td",Rl,[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.lastChanged),1)])])})),128))])],512),[[u]])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ql,[Object(r["createElementVNode"])("a",{onClick:t[5]||(t[5]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])])],32)]})),_:1},8,["content-title"])])}function Wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xl(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,a=new Array(t);n-1){var t=this.blockTriggers.length-1;t===e?this.blockTriggers[e]=null:this.blockTriggers.splice(e,1),this.isDirty=!0}},onFireTriggerChange:function(){var e=this.fireTriggers.every((function(e){return!!e}));e&&this.addFireTrigger()},addFireTrigger:function(){this.fireTriggers.push(null),this.isDirty=!0},removeFireTrigger:function(e){if(e>-1){var t=this.fireTriggers.length-1;t===e?this.fireTriggers[e]=null:this.fireTriggers.splice(e,1),this.isDirty=!0}},createTagType:function(e){var t,n=this;e&&this.isTagTemplateDisabled[e.id]||(this.chooseTagType=!1,this.tag={idsite:parseInt("".concat(u["Matomo"].idSite),10),name:mo.suggestNameForType(e.name)||"",type:e.id,fire_limit:"unlimited",priority:"GoogleTag"===e.id||"GoogleAnalytics4"===e.id?1:999,fire_delay:0,typeMetadata:e},this.editTitle=Object(u["translate"])("TagManager_CreateNewTag"),null!==(t=this.tag.typeMetadata)&&void 0!==t&&t.name&&(this.editTitle+=": ".concat(this.tag.typeMetadata.name)),this.blockTriggers=[null],this.fireTriggers=[null],this.parameterValues=Object.fromEntries(e.parameters.map((function(e){return[e.name,e.value]}))),this.isDirty=!1,setTimeout((function(){var e=Vo(n.$refs.root);e.length&&e[0]&&e[0].scrollIntoView(),e.find("#name").focus()}),1))},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idTag,u["MatomoUrl"].updateHash(e)},createTag:function(){var e=this;this.removeAnyTagNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTag=!0,mo.createOrUpdateTag(this.tag,"TagManager.addContainerTag",this.idContainer,this.idContainerVersion,this.parameterValues,this.fireTriggers.filter((function(e){return!!e})),this.blockTriggers.filter((function(e){return!!e}))).then((function(t){t&&(e.isDirty=!1,mo.reload(e.idContainer,e.idContainerVersion).then((function(){e.cancel(),setTimeout((function(){var t=Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Tag")),n="";e.hasPublishCapability()&&(n=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(t," ").concat(n),"success")}),200)})))})).finally((function(){e.isUpdatingTag=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateTag:function(){var e=this;this.removeAnyTagNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingTag=!0,mo.createOrUpdateTag(this.tag,"TagManager.updateContainerTag",this.idContainer,this.idContainerVersion,this.parameterValues,this.fireTriggers.filter((function(e){return!!e})),this.blockTriggers.filter((function(e){return!!e}))).then((function(t){if(t){e.isDirty=!1,mo.reload(e.idContainer,e.idContainerVersion).then((function(){e.initIdTag()})),e.cancel();var n=Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Tag")),a="";e.hasPublishCapability()&&(a=Object(u["translate"])("TagManager_WantToDeployThisChangeCreateVersion",'',"")),e.showNotification("".concat(n," ").concat(a),"success")}})).finally((function(){e.isUpdatingTag=!1})))},checkRequiredFieldsAreSet:function(){if(!this.tag.name){var e=Object(u["translate"])("General_Name");return this.showErrorFieldNotProvidedNotification(e),!1}return!(!this.fireTriggers||!this.fireTriggers.length)||(this.showNotification(Object(u["translate"])("TagManager_TagFireTriggerRequirement"),"error"),!1)},hasPublishCapability:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")}},computed:{availableFireLimits:function(){return hr.fireLimitsOptions.value},isLoading:function(){return ya.isLoading.value||hr.isLoading.value},isUpdating:function(){return ya.isUpdating.value||this.isUpdatingTag},create:function(){return 0===this.idTag},edit:function(){return!this.create},canUseCustomTemplates:function(){return u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")},isTagDisabled:function(){var e;return!this.canUseCustomTemplates&&(null===(e=this.tag.typeMetadata)||void 0===e?void 0:e.isCustomTemplate)},isTagTemplateDisabled:function(){var e=this,t={};return this.availableTags.forEach((function(n){n.types.forEach((function(n){t[n.id]=!e.canUseCustomTemplates&&n.isCustomTemplate}))})),t},collectionItemAvatarText:function(){return Object(u["translate"])("TagManager_UseCustomTemplateCapabilityRequired",Object(u["translate"])("TagManager_CapabilityUseCustomTemplates"))},fireLimitHelp:function(){return Object(u["translate"])("TagManager_FireLimitHelp",Object(u["translate"])("TagManager_Unlimited"),Object(u["translate"])("TagManager_OncePage"),Object(u["translate"])("TagManager_Once24Hours"),Object(u["translate"])("TagManager_OnceLifetime"))}}});Eo.render=dr;var So=Eo,wo={class:"tagManagerManageList tagManagerTagList"},ko={class:"tagSearchFilter"},Mo=["title"],_o=["title"],Do=["title"],Ao=["title"],xo=["title"],Bo=["title"],Lo={colspan:"6"},Uo={class:"loadingPiwik"},Po=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Io={colspan:"6"},Fo=["id"],Ho=["title"],Go=["title"],$o=["title"],Ro={class:"triggers"},qo=["onClick","title"],zo=["title"],Wo=["onClick","title"],Xo=["title"],Ko=["title"],Jo=["onClick","title"],Yo=["onClick","title"],Zo=["onClick","title"],Qo=["onClick","title"],el=["onClick","title"],tl={class:"tableActionBar"},nl=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),al={class:"ui-confirm",id:"confirmDeleteTag",ref:"confirmDeleteTag"},il=["value"],rl=["value"],ol={class:"ui-confirm",id:"confirmPauseTag",ref:"confirmPauseTag"},ll=["value"],cl=["value"],sl={class:"ui-confirm",id:"confirmResumeTag",ref:"confirmResumeTag"},dl=["value"],ul=["value"];function gl(e,t,n,a,i,o){var l=this,c=Object(r["resolveComponent"])("Field"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",wo,[Object(r["createVNode"])(s,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_TagUsageBenefits")),1),Object(r["createElementVNode"])("div",ko,[Object(r["withDirectives"])(Object(r["createVNode"])(c,{uicontrol:"text",name:"tagSearch",title:e.translate("General_Search"),modelValue:e.tagSearch,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.tagSearch=t})},null,8,["title","modelValue"]),[[r["vShow"],e.tags.length>0]])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",{class:"name",title:e.nameTranslatedText},Object(r["toDisplayString"])(e.translate("General_Name")),9,Mo),Object(r["createElementVNode"])("th",{class:"description",title:e.descriptionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Description")),9,_o),Object(r["createElementVNode"])("th",{class:"type",title:e.typeTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Type")),9,Do),Object(r["createElementVNode"])("th",{class:"triggers",title:e.triggersTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_Triggers")),9,Ao),Object(r["createElementVNode"])("th",{class:"lastUpdated",title:e.lastUpdatedTranslatedText},Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),9,xo),Object(r["withDirectives"])(Object(r["createElementVNode"])("th",{class:"action",title:e.actionTranslatedText},Object(r["toDisplayString"])(e.translate("General_Actions")),9,Bo),[[r["vShow"],e.hasWriteAccess]])])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Lo,[Object(r["createElementVNode"])("span",Uo,[Po,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Io,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoTagsFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerTagNow",onClick:t[1]||(t[1]=function(t){return e.createTag()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTagNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.tags.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTags,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{class:"tags",key:t.idtag,id:"tag".concat(t.idtag)},[Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,Ho),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,Go),Object(r["createElementVNode"])("td",{class:"type",title:t.typeMetadata.description},Object(r["toDisplayString"])(t.typeMetadata.name),9,$o),Object(r["createElementVNode"])("td",Ro,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.fire_trigger_ids,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n,style:{"margin-right":"3.5px"}},[e.hasWriteAccess?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,style:{display:"inline-block","vertical-align":"top !important"},class:"chip",href:"",onClick:Object(r["withModifiers"])((function(n){return e.editTrigger(t)}),["prevent"]),title:l.triggers[t]},Object(r["toDisplayString"])(e.truncateText(l.triggers[t],e.triggerTruncateLength)),9,qo)):Object(r["createCommentVNode"])("",!0),e.hasWriteAccess?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:1,class:"chip",title:l.triggers[t]},Object(r["toDisplayString"])(e.truncateText(l.triggers[t],e.triggerTruncateLength)),9,zo))])})),128)),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Except"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(t.block_trigger_ids,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n,style:{"margin-right":"3.5px"}},[Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"chip",href:"",onClick:Object(r["withModifiers"])((function(n){return e.editTrigger(t)}),["prevent"]),title:l.triggers[t]},Object(r["toDisplayString"])(e.truncateText(l.triggers[t],e.triggerTruncateLength)),9,Wo),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",{class:"chip",title:l.triggers[t]},Object(r["toDisplayString"])(e.truncateText(l.triggers[t],e.triggerTruncateLength)),9,Xo),[[r["vShow"],!e.hasWriteAccess]])])})),128))],512),[[r["vShow"],t.block_trigger_ids.length]])]),Object(r["createElementVNode"])("td",{class:"lastUpdated",title:e.translate("TagManager_CreatedOnX",t.created_date_pretty)},[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.updated_date_pretty),1)],8,Ko),Object(r["withDirectives"])(Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-pause",onClick:function(n){return e.pauseTag(t)},title:e.translate("TagManager_PauseX",e.translate("TagManager_Tag"))},null,8,Jo),[[r["vShow"],"active"===t.status]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-play",onClick:function(n){return e.resumeTag(t)},title:e.translate("TagManager_ResumeX",e.translate("TagManager_Tag"))},null,8,Yo),[[r["vShow"],"paused"===t.status]]),Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editTag(t.idtag,t.type)},title:e.translate("TagManager_EditTag")},null,8,Zo),Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteTag(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Tag"))},null,8,Qo),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Tag"))},null,8,el),[[r["vShow"],e.hasPublishCapability()]])],2),[[r["vShow"],e.hasWriteAccess]])],8,Fo)})),128))])],512),[[d]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",tl,[Object(r["createElementVNode"])("a",{class:"createNewTag",value:"",onClick:t[2]||(t[2]=function(t){return e.createTag()})},[nl,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title","help-text"]),Object(r["createElementVNode"])("div",al,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteTagConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,il),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,rl)],512),Object(r["createElementVNode"])("div",ol,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_PauseTagConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,ll),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,cl)],512),Object(r["createElementVNode"])("div",sl,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_ResumeTagConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,dl),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,ul)],512)])}function bl(e){return fl(e)||hl(e)||pl(e)||ml()}function ml(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function pl(e,t){if(e){if("string"===typeof e)return vl(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?vl(e,t):void 0}}function hl(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function fl(e){if(Array.isArray(e))return vl(e)}function vl(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n',"")),this.showNotification("".concat(n," ").concat(a),"success")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:Tl,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},openCopyDialog:function(e){var t=u["MatomoUrl"].stringify({module:"TagManager",action:"copyTagDialog",idSite:e.idsite,idContainer:this.idContainer,idTag:e.idtag,idContainerVersion:this.idContainerVersion});window.Piwik_Popover.createPopupAndLoadUrl(t,"","mtmCopyTag")}},computed:{triggers:function(){var e={};return ya.triggers.value.forEach((function(t){e["".concat(t.idtrigger)]=t.name})),e},isLoading:function(){return mo.isLoading.value},isUpdating:function(){return mo.isUpdating.value},tags:function(){return mo.tags.value},sortedTags:function(){var e=this,t=this.tagSearch.toLowerCase(),n=bl(this.tags).filter((function(n){return Object.keys(n).some((function(a){var i=n,r="";if("string"===typeof i[a])r=i[a];else if("typeMetadata"===a){var o=i.typeMetadata;r=o.name}else if("fire_trigger_ids"===a)e.triggers&&i.fire_trigger_ids&&Object.values(i.fire_trigger_ids).forEach((function(t){e.triggers[t]&&(r+="".concat(e.triggers[t]," "))}));else if("parameters"===a&&"CustomHtml"===i.type){var l=i.parameters;r=l.customHtml}return-1!==r.toLowerCase().indexOf(t)}))}));return n.sort((function(e,t){return e.namet.name?1:0})),n},nameTranslatedText:function(){return this.translate("TagManager_TagsNameDescription")},descriptionTranslatedText:function(){return this.translate("TagManager_TagsDescriptionDescription")},typeTranslatedText:function(){return this.translate("TagManager_TagsTypeDescription")},triggersTranslatedText:function(){return this.translate("TagManager_TagsTriggersDescription")},lastUpdatedTranslatedText:function(){return this.translate("TagManager_TagsLastUpdatedDescription")},actionTranslatedText:function(){return this.translate("TagManager_TagsActionDescription")},getActionClasses:function(){var e=this.hasPublishCapability()?" hasCopyAction":"";return"action".concat(e)}}});yl.render=gl;var Vl=yl,Cl={class:"manageTag"},Nl={key:0},El={key:1};function Sl(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TagList"),c=Object(r["resolveComponent"])("TagEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Cl,[e.editMode?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Nl,[Object(r["createVNode"])(l,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"tags-help-text":e.tagsHelpText},null,8,["id-container","id-container-version","tags-help-text"])])),e.editMode?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",El,[Object(r["createVNode"])(c,{"id-container":e.idContainer,"id-container-version":e.idContainerVersion,"id-tag":e.idTag},null,8,["id-container","id-container-version","id-tag"])])):Object(r["createCommentVNode"])("",!0)])}var wl=Object(r["defineComponent"])({props:{idContainerVersion:Number,idContainer:String,tagsHelpText:String},components:{TagList:Vl,TagEdit:So},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idTag}),(function(t){e.onIdTagParamChange(t)})),u["NotificationsStore"].remove("tagtagmanagement"),this.onIdTagParamChange(u["MatomoUrl"].hashParsed.value.idTag)},methods:{onIdTagParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddTag",t),this.isAddAllowed=!!t.isAllowed}}},computed:{idTag:function(){var e=u["MatomoUrl"].hashParsed.value.idTag;return this.isAddAllowed||"0"!==e?e?parseInt(e,10):e:null},editMode:function(){return"number"===typeof this.idTag}}});wl.render=Sl;var kl=wl,Ml={class:"editVersion tagManagerManageEdit"},_l={class:"loadingPiwik"},Dl=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Al={class:"loadingPiwik"},xl=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Bl={key:0},Ll={key:0},Ul={key:1},Pl=["innerHTML"],Il={key:2,class:"versionChanges"},Fl={key:0},Hl={colspan:"4"},Gl={key:1},$l={colspan:"4"},Rl={class:"lastUpdated"},ql={class:"entityCancel"};function zl(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("SaveButton"),s=Object(r["resolveComponent"])("ActivityIndicator"),d=Object(r["resolveComponent"])("ContentBlock"),u=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ml,[Object(r["createVNode"])(d,{feature:"Tag Manager","content-title":e.editTitle},{default:Object(r["withCtx"])((function(){var n;return[Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",_l,[Dl,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])],512),[[r["vShow"],e.isLoading]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("p",null,[Object(r["createElementVNode"])("span",Al,[xl,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_UpdatingData")),1)])],512),[[r["vShow"],e.isUpdating]]),Object(r["createElementVNode"])("form",{onSubmit:t[6]||(t[6]=function(t){return e.edit?e.updateVersion():e.createVersion()})},[Object(r["createElementVNode"])("div",null,[e.hasPublishCapability()||e.hasWriteCapability()&&e.hasPublishToLiveCapability()?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Bl,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"text",name:"name","inline-help":e.versionNameHelpText,"inline-help-bind":{lastVersion:e.lastVersion},"model-value":e.version.name,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.version.name=t,e.setValueHasChanged()}),maxlength:30,title:e.translate("TagManager_VersionName"),placeholder:e.translate("TagManager_VersionNamePlaceholder")},null,8,["inline-help","inline-help-bind","model-value","title","placeholder"])]),Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"textarea",name:"description","model-value":e.version.description,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.version.description=t,e.setValueHasChanged()}),title:e.translate("TagManager_VersionDescriptionOptional"),"inline-help":e.translate("TagManager_VersionDescriptionHelp"),placeholder:e.translate("TagManager_VersionDescriptionPlaceholder")},null,8,["model-value","title","inline-help","placeholder"])]),Object(r["createVNode"])(c,{class:"createButton no-publish",onConfirm:t[2]||(t[2]=function(t){return e.edit?e.updateVersion():e.createVersion()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.edit?e.translate("CoreUpdater_UpdateTitle"):e.translate("TagManager_CreateVersionWithoutPublishing")},null,8,["disabled","saving","value"]),e.create&&e.environments.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ll,[Object(r["createVNode"])(l,{uicontrol:"select",name:"environment","inline-help":e.selectTagManagerEnvironmentHelp,"inline-help-bind":{canPublishToLive:e.canPublishToLive},"model-value":null===(n=e.version.environments)||void 0===n?void 0:n[0],"onUpdate:modelValue":t[3]||(t[3]=function(t){e.version.environments[0]=t,e.setValueHasChanged()}),options:e.environments,introduction:e.translate("TagManager_OrCreateAndPublishVersion"),title:e.translate("TagManager_Environment")},null,8,["inline-help","inline-help-bind","model-value","options","introduction","title"])])):Object(r["createCommentVNode"])("",!0),e.create&&e.environments.length?(Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:1,class:"publishButton",onConfirm:t[4]||(t[4]=function(t){return e.createVersionAndPublish()}),disabled:e.isUpdating||!e.isDirty,saving:e.isUpdating,value:e.translate("TagManager_CreateVersionAndPublishRelease")},null,8,["disabled","saving","value"])):Object(r["createCommentVNode"])("",!0)])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Ul,[Object(r["createElementVNode"])("div",{class:"alert alert-warning",innerHTML:e.$sanitize(e.showNoAccessErrorMessage)},null,8,Pl)])),e.lastVersion?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Il,[Object(r["createElementVNode"])("h3",null,Object(r["toDisplayString"])(e.translate("TagManager_ChangesSinceLastVersion"))+":",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("SitesManager_Type")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("TagManager_Change")),1),Object(r["createElementVNode"])("th",null,Object(r["toDisplayString"])(e.translate("TagManager_LastUpdated")),1)])]),Object(r["createElementVNode"])("tbody",null,[e.isLoadingVersionChanges?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Fl,[Object(r["createElementVNode"])("td",Hl,[Object(r["createVNode"])(s,{"loading-message":e.translate("TagManager_DetectingChanges"),loading:!0},null,8,["loading-message"])])])):Object(r["createCommentVNode"])("",!0),e.versionChanges.length||e.isLoadingVersionChanges?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Gl,[Object(r["createElementVNode"])("td",$l,Object(r["toDisplayString"])(e.translate("UserCountryMap_None")),1)])),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.versionChanges,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.translate(t.entityType)),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.translate(t.type)),1),Object(r["createElementVNode"])("td",Rl,[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.lastChanged),1)])])})),128))])],512),[[u]])])):Object(r["createCommentVNode"])("",!0),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",ql,[Object(r["createElementVNode"])("a",{onClick:t[5]||(t[5]=function(t){return e.cancel()})},Object(r["toDisplayString"])(e.translate("General_Cancel")),1)],512),[[r["vShow"],!e.isEmbedded]])])],32)]})),_:1},8,["content-title"])])}function Wl(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Xl(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.created_date?-1:0})),e},getManageContainersIntro:function(){var e=Object(u["externalLink"])("https://matomo.org/guide/tag-manager/getting-started-with-tag-manager/");return Object(u["translate"])("TagManager_ManageContainersIntro",e,"")},canCopyContainer:function(){return this.isSuperUser},getActionClasses:function(){var e=this.canCopyContainer?" hasCopyAction":"";return"action".concat(e)}},methods:{createContainer:function(){this.editContainer("0")},editContainer:function(e){u["MatomoUrl"].updateHash(Object.assign(Object.assign({},u["MatomoUrl"].hashParsed.value),{},{idContainer:e}))},installCode:function(e){Kd.showInstallCode(e)},deleteContainer:function(e){function t(){ud.deleteContainer(e.idcontainer).then((function(){ud.reload()}))}u["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteContainer,{yes:t})},truncateText:function(e,t){return e.length>t?"".concat(e.substr(0,t-3),"..."):e},openCopyDialog:function(e){var t=u["MatomoUrl"].stringify({module:"TagManager",action:"copyContainerDialog",idSite:e.idsite,idContainer:e.idcontainer});window.Piwik_Popover.createPopupAndLoadUrl(t,"","mtmCopyContainer")}}});Jd.render=Hd;var Yd=Jd,Zd={class:"manageContainer"};function Qd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContainerList"),c=Object(r["resolveComponent"])("ContainerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Zd,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"is-super-user":e.isSuperUser},null,8,["is-super-user"])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer},null,8,["id-container"])],512),[[r["vShow"],e.editMode]])])}var eu=Object(r["defineComponent"])({props:{isSuperUser:{type:Boolean,required:!0}},components:{ContainerList:Yd,ContainerEdit:md},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idContainer}),(function(t){e.onIdContainerParamChange(t)})),u["NotificationsStore"].remove("containertagmanagement"),this.onIdContainerParamChange(u["MatomoUrl"].hashParsed.value.idContainer)},computed:{idContainer:function(){var e=u["MatomoUrl"].hashParsed.value.idContainer;return this.isAddAllowed||""!==e?e:null},editMode:function(){return!!this.idContainer}},methods:{onIdContainerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVersion",t),this.isAddAllowed=!!t.isAllowed}}}});eu.render=Qd;var tu=eu,nu={class:"containerDashboard"},au={key:0},iu={class:"dashboardCreationDate"},ru={key:0},ou=Object(r["createElementVNode"])("br",null,null,-1),lu=["innerHTML"],cu={class:"row",style:{"margin-left":"-0.75rem"}},su={class:"col m6 s12"},du={key:0},uu=["href","title"],gu={key:0},bu=Object(r["createElementVNode"])("hr",null,null,-1),mu=["href"],pu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),hu=["href"],fu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),vu={class:"col m6 s12"},ju={key:0},Ou=["href","title"],Tu=Object(r["createElementVNode"])("hr",null,null,-1),yu=["href"],Vu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Cu=["href"],Nu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Eu={class:"row",style:{"margin-left":"-0.75rem"}},Su={class:"col m6 s12"},wu=["href","title"],ku={key:0},Mu=Object(r["createElementVNode"])("hr",null,null,-1),_u=["href"],Du=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Au=["href"],xu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Bu={class:"col m6 s12"},Lu=["title","href"],Uu={key:0},Pu=Object(r["createElementVNode"])("br",null,null,-1),Iu=["title"],Fu={key:0},Hu=Object(r["createElementVNode"])("hr",null,null,-1),Gu=["href"],$u=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Ru=["href"],qu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1);function zu(e,t,n,a,i,o){var l,c,s=Object(r["resolveComponent"])("ActivityIndicator"),d=Object(r["resolveComponent"])("EnrichedHeadline"),u=Object(r["resolveComponent"])("ContentBlock"),g=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",nu,[Object(r["createVNode"])(s,{loading:e.isLoading},null,8,["loading"]),e.isLoading?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",au,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(d,{"feature-name":"Tag Manager","inline-help":e.dashboardHelpText},{default:Object(r["withCtx"])((function(){var t;return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_ContainerX",null===(t=e.container)||void 0===t?void 0:t.name)),1)]})),_:1},8,["inline-help"])]),Object(r["createElementVNode"])("p",iu,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.containerMetaInformation)+" ",1),null!==(l=e.containerVersion)&&void 0!==l&&l.description?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ru,[ou,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_Description"))+": "+Object(r["toDisplayString"])(null===(c=e.containerVersion)||void 0===c?void 0:c.description),1)])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.containerDashboardDescription)},null,8,lu)],512),[[g]]),Object(r["createElementVNode"])("div",cu,[Object(r["createElementVNode"])("div",su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.tagCount," ").concat(e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.tagCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",du,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainerVersionTags,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTags",{idTag:t.idtag}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,uu),n!==e.sortedContainerVersionTags.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",gu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))])):Object(r["createCommentVNode"])("",!0)]),bu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags")},[pu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTags")),1)],8,mu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags",{idTag:0})},[fu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)],8,hu)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",vu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.triggerCount," ").concat(e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.triggerCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ju,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTriggers",{idTrigger:t.idtrigger}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,Ou),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,", ",512),[[r["vShow"],n!==e.sortedTriggers.length-1]])])})),128))])):Object(r["createCommentVNode"])("",!0)]),Tu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers")},[Vu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTriggers")),1)],8,yu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers",{idTrigger:0})},[Nu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)],8,Cu)]})),_:1},8,["content-title","help-text"])])]),Object(r["createElementVNode"])("div",Eu,[Object(r["createElementVNode"])("div",Su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.variableCount," ").concat(e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageVariables",{idVariable:t.idvariable}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,wu),n!==e.sortedVariables.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ku,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.variableCount]])]),Mu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables")},[Du,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVariables")),1)],8,_u),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables",{idVariable:0})},[xu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)],8,Au)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",Bu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.versionCount," ").concat(e.translate("TagManager_Versions")),"help-text":e.versionsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_LastVersions"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.lastVersions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{title:e.lastVersionLinkTitle(t),href:e.linkTo("manageVersions",{idContainerVersion:t.idcontainerversion})},Object(r["toDisplayString"])(t.name),9,Lu),n!==e.lastVersions.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Uu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.lastVersions.length]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Pu,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_Environments"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.container.releases,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("span",{title:e.releaseTooltip(t)},Object(r["toDisplayString"])(e.ucfirst(t.environment)),9,Iu),n!==e.container.releases.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Fu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.container.releases.length]])]),Hu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions")},[$u,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVersions")),1)],8,Gu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions",{idContainerVersion:0})},[qu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVersion")),1)],8,Ru)]})),_:1},8,["content-title","help-text"])])])]))])}function Wu(e){e.sort((function(e,t){return e.namet.name?1:0}))}var Xu=Object(r["defineComponent"])({props:{idContainer:String,dashboardHelpText:String,tagsHelpText:String,triggersHelpText:String,variablesHelpText:String,versionsHelpText:String},components:{ActivityIndicator:u["ActivityIndicator"],EnrichedHeadline:u["EnrichedHeadline"],ContentBlock:u["ContentBlock"]},directives:{ContentIntro:u["ContentIntro"]},data:function(){return{container:null,containerVersion:null,isLoading:!1}},created:function(){var e=this;Qs.init(),this.isLoading=!0;var t=u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer}).then((function(t){e.container=t})),n=u["AjaxHelper"].fetch({method:"TagManager.exportContainerVersion",idContainer:this.idContainer}).then((function(t){e.containerVersion=t}));Promise.all([t,n]).finally((function(){e.isLoading=!1}))},methods:{linkTo:function(e,t){var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e}));return t&&(n+="#?".concat(u["MatomoUrl"].stringify(t))),"?".concat(n)},lastVersionLinkTitle:function(e){return"Created on ".concat(e.created_date_pretty)+", description: '".concat(e.description,"'")},releaseTooltip:function(e){var t=Object(u["translate"])("TagManager_ReleaseInfo",e.release_login,e.release_date_pretty),n=Object(u["translate"])("TagManager_ReleaseVersionInfo",e.version_name);return"".concat(t," ").concat(n)},ucfirst:function(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}},computed:{lastVersions:function(){var e,t;return null!==(e=this.container)&&void 0!==e&&null!==(t=e.versions)&&void 0!==t&&t.length?this.container.versions.slice(0,5):[]},contexts:function(){var e={};return Qs.contexts.value.forEach((function(t){var n=t.id,a=t.name;e[n]=a})),e},containerMetaInformation:function(){var e;return Object(u["translate"])("TagManager_ContainerIdInformation",(null===(e=this.containerVersion)||void 0===e?void 0:e.idcontainer)||"")},containerDashboardDescription:function(){return Object(u["translate"])("TagManager_ContainerDashboardDescription",'',"")},sortedContainerVersionTags:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.tags)||[];return Wu(t),t},sortedTriggers:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.triggers)||[];return Wu(t),t},sortedVariables:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.variables)||[];return Wu(t),t},tagCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.tags.length},triggerCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.triggers.length},versionCount:function(){var e;return null===(e=this.container)||void 0===e?void 0:e.versions.length},variableCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.variables.length}}});Xu.render=zu;var Ku=Xu,Ju=["title"],Yu={class:"title"},Zu=Object(r["createElementVNode"])("span",{class:"icon icon-chevron-down"}," ",-1),Qu={class:"dropdown positionInViewport"},eg={class:"custom_select_container"},tg={class:"custom_select_ul_list"},ng=["title"],ag=["href"];function ig(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ActivityIndicator"),c=Object(r["resolveDirective"])("focus-anywhere-but-here");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])(["tagContainerSelector piwikSelector borderedControl",{expanded:e.showContainerList}]),onClick:t[1]||(t[1]=function(t){e.fetchContainers(),e.showContainerList=!e.showContainerList}),title:e.translate("TagManager_ChooseContainer")},[Object(r["createElementVNode"])("a",Yu,[Zu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.truncateText(e.actualContainerName,50)),1)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Qu,[Object(r["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(r["createElementVNode"])("div",eg,[Object(r["createElementVNode"])("ul",tg,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("a",{tabindex:"-1",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(){}),["prevent","stop"]))},Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound")),1)],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{title:"".concat(t.name," (").concat(t.idcontainer,")"),key:t.idcontainer},[Object(r["createElementVNode"])("a",{href:e.linkTo(t.idcontainer)},Object(r["toDisplayString"])(t.name)+" ("+Object(r["toDisplayString"])(t.idcontainer)+") ",9,ag)],8,ng)})),128))])])],512),[[r["vShow"],e.showContainerList]])],10,Ju)),[[c,{blur:e.onBlur}]])}var rg=window,og=rg.tagManagerHelper,lg=Object(r["defineComponent"])({props:{containerName:String},components:{ActivityIndicator:u["ActivityIndicator"]},directives:{FocusAnywhereButHere:u["FocusAnywhereButHere"]},data:function(){return{containers:[],isLoading:!1,showContainerList:!1}},created:function(){setTimeout((function(){window.initTopControls()}))},methods:{fetchContainers:function(){var e=this;this.isLoading=!0,this.containers=[],u["AjaxHelper"].fetch({method:"TagManager.getContainers"}).then((function(t){e.containers=t})).finally((function(){e.isLoading=!1}))},linkTo:function(e){var t=u["MatomoUrl"].urlParsed.value.action;t&&"manageContainers"!==t||(t=this.hasWriteAccess?"dashboard":"manageTags");var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{idContainer:e,action:t}));return"".concat(window.location.pathname,"?").concat(n)},onBlur:function(){this.showContainerList=!1},truncateText:function(e,t){return og.truncateText(e,t)}},computed:{actualContainerName:function(){return this.containerName?Object(u["translate"])("TagManager_ContainerX",this.containerName):Object(u["translate"])("TagManager_ChooseContainer")},hasWriteAccess:function(){return u["Matomo"].hasUserCapability("tagmanager_write")}}});lg.render=ig;var cg=lg,sg={style:{"margin-left":"-0.75rem"}},dg=Object(r["createElementVNode"])("br",null,null,-1),ug=["href"],gg=["textContent"],bg={style:{"margin-top":"1rem"}},mg=["innerHTML"],pg=Object(r["createElementVNode"])("br",null,null,-1),hg=["href"],fg={class:"environment"},vg={class:"name"},jg={class:"name"},Og={class:"released_by"},Tg={class:"released_on"},yg={key:0},Vg={colspan:"7"},Cg={class:"loadingPiwik"},Ng=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Eg={key:1},Sg={colspan:"7"},wg={class:"environment"},kg={class:"name"},Mg={class:"revision"},_g={class:"released_by"},Dg={class:"released_on"},Ag={class:"date"};function xg(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveDirective"])("copy-to-clipboard"),u=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createBlock"])(s,{class:"manageInstallTagCode",feature:"Tag Manager","content-title":"Install Code"},{default:Object(r["withCtx"])((function(){var n,a;return[Object(r["createElementVNode"])("div",sg,[Object(r["createVNode"])(l,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.environment=t,e.fetchInstallInstructions(e.environment)}),options:e.environments,title:e.translate("TagManager_Environment")},null,8,["model-value","options","title"])]),Object(r["createVNode"])(c,{loading:e.isLoading},null,8,["loading"]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n},[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),dg,t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,ug)):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",null,[t.embedCode?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("pre",{key:0,textContent:Object(r["toDisplayString"])(t.embedCode)},null,8,gg)),[[d,{}]]):Object(r["createCommentVNode"])("",!0)])])})),128)),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_InstallCodePublishEnvironmentNote","preview"))+" "+Object(r["toDisplayString"])(e.translate("TagManager_ConfigureEnvironmentsSuperUser")),1),Object(r["createElementVNode"])("p",bg,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_InstallCodeDataLayerNote","",""))},null,8,mg),pg,Object(r["createElementVNode"])("a",{target:"_blank",href:e.externalRawLink("https://matomo.org/faq/tag-manager/data-layer-in-matomo-tag-manager/")},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,hg)]),Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_ReleasesOverview")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fg,Object(r["toDisplayString"])(e.translate("TagManager_Environment")),1),Object(r["createElementVNode"])("th",vg,Object(r["toDisplayString"])(e.translate("TagManager_VersionName")),1),Object(r["createElementVNode"])("th",jg,Object(r["toDisplayString"])(e.translate("TagManager_VersionRevision")),1),Object(r["createElementVNode"])("th",Og,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedBy")),1),Object(r["createElementVNode"])("th",Tg,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedOn")),1)])]),Object(r["createElementVNode"])("tbody",null,[e.isLoading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",yg,[Object(r["createElementVNode"])("td",Vg,[Object(r["createElementVNode"])("span",Cg,[Ng,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])])):Object(r["createCommentVNode"])("",!0),e.isLoading||0!==(null===(n=e.container)||void 0===n||null===(a=n.releases)||void 0===a?void 0:a.length)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Eg,[Object(r["createElementVNode"])("td",Sg,Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFound")),1)])),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedReleases,(function(t){var n,a;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t.idcontainerrelease},[Object(r["createElementVNode"])("td",wg,Object(r["toDisplayString"])(e.ucfirst(t.environment)),1),Object(r["createElementVNode"])("td",kg,Object(r["toDisplayString"])(null===(n=e.releaseVersions[t.idcontainerrelease])||void 0===n?void 0:n.name),1),Object(r["createElementVNode"])("td",Mg,Object(r["toDisplayString"])(null===(a=e.releaseVersions[t.idcontainerrelease])||void 0===a?void 0:a.revision),1),Object(r["createElementVNode"])("td",_g,Object(r["toDisplayString"])(t.release_login),1),Object(r["createElementVNode"])("td",Dg,[Object(r["createElementVNode"])("span",Ag,Object(r["toDisplayString"])(t.release_date_pretty),1)])])})),128))])],512),[[u]])]})),_:1})}function Bg(e){return Pg(e)||Ug(e)||Hg(e)||Lg()}function Lg(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ug(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Pg(e){if(Array.isArray(e))return Gg(e)}function Ig(e,t){return Rg(e)||$g(e,t)||Hg(e,t)||Fg()}function Fg(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hg(e,t){if(e){if("string"===typeof e)return Gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gg(e,t):void 0}}function Gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.release_date?-1:t.index-e.index})),t}}});Wg.render=xg;var Xg=Wg,Kg={class:"tagManagerTrackingCode"},Jg={key:0},Yg={class:"trackingCodeAdvancedOptions"},Zg={class:"advance-option"},Qg=Object(r["createElementVNode"])("span",{class:"icon-chevron-down"},null,-1),eb=Object(r["createElementVNode"])("span",{class:"icon-chevron-up"},null,-1),tb={id:"mtm-advanced-options"},nb=["innerHTML"],ab={key:1,class:"row"},ib={class:"col s12 m4 "},rb={class:"form-group row"},ob={class:"col s12 input-field"},lb={for:"tagManagerTrackingCodeSite",class:"siteSelectorLabel"},cb={class:"sites_autocomplete"},sb={class:"col s12 m4"},db={class:"col s12 m4"},ub=["innerHTML"],gb={key:1,class:"alert alert-info"},bb={href:""},mb={key:0},pb=["href"],hb=Object(r["createTextVNode"])(". "),fb=["innerHTML"],vb=["textContent"],jb=["innerHTML"],Ob={key:1};function Tb(e,t,n,a,i,o){var l=this,c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("SiteSelector"),d=Object(r["resolveComponent"])("Field"),u=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Kg,[e.showContainerRow?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Jg,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_OptionallyCustomiseContainer"))+" ",1),Object(r["createElementVNode"])("div",Yg,[Object(r["createElementVNode"])("div",Zg,[Object(r["createElementVNode"])("span",null,[e.isAdvancedDisplayed?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,href:"javascript:;",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!0}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_ShowAdvancedOptions"))+" ",1),Qg])),e.isAdvancedDisplayed?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:1,href:"javascript:;",onClick:t[1]||(t[1]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!1}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_HideAdvancedOptions"))+" ",1),eb])):Object(r["createCommentVNode"])("",!0)])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",tb,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.getAdvancedStepText)},null,8,nb),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,loading:!0},null,512)),[[r["vShow"],e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ab,[Object(r["createElementVNode"])("div",ib,[Object(r["createElementVNode"])("div",rb,[Object(r["createElementVNode"])("div",ob,[Object(r["createElementVNode"])("label",lb,Object(r["toDisplayString"])(e.translate("General_Website")),1),Object(r["createElementVNode"])("div",cb,[Object(r["createVNode"])(s,{id:"tagManagerTrackingCodeSite",modelValue:e.site,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.site=t}),"show-all-sites-item":!1,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(r["createElementVNode"])("div",sb,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"containers","model-value":e.idContainer,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.idContainer=t,e.onContainerChange()}),options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container")},null,8,["model-value","options","disabled","title"])])]),Object(r["createElementVNode"])("div",db,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.environment=t,l.$emit("fetchInstallInstructions")}),options:e.environments,disabled:e.environments.length<=1,"full-width":!0,title:e.translate("TagManager_Environment")},null,8,["model-value","options","disabled","title"])])])],512)),[[r["vShow"],!e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.getAdvancedStepInfo)},null,8,ub)):Object(r["createCommentVNode"])("",!0)])],512),[[r["vShow"],e.isAdvancedDisplayed]])])])):Object(r["createCommentVNode"])("",!0),e.idContainer&&e.noReleaseFound?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFoundForContainer"))+" ",1),Object(r["createElementVNode"])("a",bb,Object(r["toDisplayString"])(e.translate("TagManager_PublishVersionToEnvironmentToViewEmbedCode")),1)])):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:n},[e.showDescription?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",mb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,pb)):Object(r["createCommentVNode"])("",!0),hb])):Object(r["createCommentVNode"])("",!0),e.showPlainMtmSteps?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.getMtmStep3)},null,8,fb)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,vb),[[u,{}]])])],64)})),128)),e.showBottom&&!e.noReleaseFound&&e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:2},[e.showTestSection?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Ob,[(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e.testComponent),{site:e.site},null,8,["site"]))])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.getCongratulationsText)},null,8,jb))],64)):Object(r["createCommentVNode"])("",!0)])}function yb(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}var Vb=Object(r["defineComponent"])({props:{showContainerRow:Boolean,showBottom:Boolean,showDescription:Boolean,showPlainMtmSteps:Boolean,showTestSection:Boolean,showAdvancedOptions:{required:!1,type:Boolean,default:!1}},components:{ActivityIndicator:u["ActivityIndicator"],SiteSelector:u["SiteSelector"],Field:g["Field"]},emits:["fetchInstallInstructions"],directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{containerVariables:[],isLoading:!1,idContainer:"",environment:"",environments:[],environmentNameMap:{},containerMap:{},containerOptions:[],site:{id:u["Matomo"].idSite,name:u["Matomo"].helper.htmlDecode(u["Matomo"].siteName)},matomoConfigs:[],releases:[],installInstructions:[],noReleaseFound:!1,isAdvancedDisplayed:!1}},created:function(){var e=this;u["AjaxHelper"].fetch({method:"TagManager.getAvailableEnvironments",filter_limit:"-1"}).then((function(t){var n;n=Array.isArray(t)?t:Object.values(t),e.environmentNameMap=Object.fromEntries(n.map((function(e){var t=e.id,n=e.name;return[t,n]})))})),this.onSiteChange(),this.isAdvancedDisplayed=this.showAdvancedOptions},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;this.installInstructions=[],this.containerOptions=[],this.containerMap={},this.environments=[],this.matomoConfigs=[],this.idContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&(this.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idContainer="",t.isAdvancedDisplayed=!0,void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idContainer||(t.idContainer=e.idcontainer),t.containerMap[e.idcontainer]=e,t.containerOptions.push({key:e.idcontainer,value:e.name})})),t.onContainerChange()})).finally((function(){t.isLoading=!1})))},onContainerChange:function(){var e=this;if(this.noReleaseFound=!1,this.idContainer){this.installInstructions=[];var t=this.containerMap[this.idContainer],n=t.draft.idcontainerversion;this.environment="",this.environments=[];var a=t.releases||[];a.find((function(e){return"live"===e.environment}))&&(this.environment="live"),a.forEach((function(t){if("preview"!==t.environment){e.environment||(e.environment=t.environment);var n=yb(t.environment);t.environment in e.environmentNameMap&&(n=e.environmentNameMap[t.environment]),e.environments.push({key:t.environment,value:n})}})),this.environments.length||(this.noReleaseFound=!0,this.environments.push({key:"",value:this.translate("TagManager_NoReleasesFound")})),this.$emit("fetchInstallInstructions"),this.fetchVariables(n)}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n})),r="".concat(window.location.pathname,"?").concat(i);return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),r},fetchVariables:function(e){var t,n=this;this.matomoConfigs=[],this.idContainer&&null!==(t=this.site)&&void 0!==t&&t.id&&e&&u["AjaxHelper"].fetch({method:"TagManager.getContainerVariables",filter_limit:"-1",idContainer:this.idContainer,idContainerVersion:e,idSite:this.site.id}).then((function(e){n.matomoConfigs=e.filter((function(e){return"MatomoConfiguration"===e.type}))})).finally((function(){n.isLoading=!1}))}},computed:{getLearnMoreLink:function(){return Object(u["translate"])("TagManager_CustomHtmlTagHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")},getMtmStep3:function(){return Object(u["translate"])("TagManager_CopyCodePasteInHeader","</head>")},getCongratulationsText:function(){return Object(u["translate"])("TagManager_SiteWithoutDataReactFollowStepCompleted","","")},testComponent:function(){return this.showTestSection?Object(u["useExternalPluginComponent"])("JsTrackerInstallCheck","JsTrackerInstallCheck"):""},getAdvancedStepText:function(){var e,t=Object(u["translate"])("TagManager_SelectContainerForWebsite","","");if(this.idContainer)return t;var n=this.linkTo("manageContainers",String(null===(e=this.site)||void 0===e?void 0:e.id),""),a=Object(u["translate"])("TagManager_ManageContainersLink",''),"");return"".concat(t," ").concat(a)},getAdvancedStepInfo:function(){var e=this.site&&this.site.id?this.site.id:"",t=this.linkTo("dashboard",e,this.idContainer,[]);return Object(u["translate"])("TagManager_CustomiseContainer",''),"",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")}}});Vb.render=Tb;var Cb=Vb,Nb=Object(r["createElementVNode"])("br",null,null,-1),Eb={class:"followStepsHeading"},Sb={style:{"list-style":"inside decimal"}};function wb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon");return Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])("getTrackingMethodsForSite"===e.currentAction?"div":"ContentBlock"),{anchor:"tagmanager","content-title":e.translate("TagManager_MatomoTagManager")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_MtmTrackingCodeIntro")),1),Nb,Object(r["createElementVNode"])("p",Eb,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(r["createElementVNode"])("ol",Sb,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!0,showDescription:!1,showPlainMtmSteps:!0,showAdvancedOptions:"trackingCodeGenerator"===e.currentAction,showTestSection:"getTrackingMethodsForSite"===e.currentAction&&e.isJsTrackerInstallCheckAvailable,onFetchInstallInstructions:e.fetchInstallInstructions,ref:"trackingCodeCommon"},null,8,["show-container-row","showAdvancedOptions","showTestSection","onFetchInstallInstructions"])])]})),_:1},8,["content-title"])}var kb=Object(r["defineComponent"])({props:{currentAction:String,showContainerRow:Boolean,isJsTrackerInstallCheckAvailable:Boolean},components:{ContentBlock:u["ContentBlock"],TrackingCodeCommon:Cb},methods:{fetchInstallInstructions:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;a.installInstructions=[],null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id&&null!==a&&void 0!==a&&a.environment&&(a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id}).then((function(e){a.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1})))}}});kb.render=wb;var Mb=kb,_b={class:"list-style-decimal"},Db={ref:"step1"},Ab=["innerHTML"],xb=["innerHTML"],Bb=["textContent"],Lb=["innerHTML"],Ub=["textContent"],Pb=["innerHTML"],Ib=["innerHTML"],Fb=["innerHTML"],Hb=["textContent"],Gb={style:{"list-style":"lower-alpha","list-style-position":"inside"}},$b=["innerHTML"],Rb=["innerHTML"],qb=["innerHTML"],zb=["textContent"],Wb=["textContent"],Xb=["innerHTML"],Kb=["textContent"],Jb=["innerHTML"],Yb=["innerHTML"],Zb=["textContent"];function Qb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon"),c=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("ol",_b,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",Db,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!1,showDescription:!1,onFetchInstallInstructions:e.fetchInstallInstructionsSPA,ref:"trackingCodeCommon"},null,8,["show-container-row","onFetchInstallInstructions"])],512),[[r["vShow"],e.step1HasContent]]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep2)},null,8,Ab),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep3)},null,8,xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Bb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep5)},null,8,Lb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Ub),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep7)},null,8,Pb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep8)},null,8,Ib),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep9)},null,8,Fb),Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("span",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep10)},null,8,Hb),Object(r["createElementVNode"])("ol",Gb,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10a)},null,8,$b),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10b)},null,8,Rb)])]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep11)},null,8,qb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("General_Update"))},null,8,zb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep13)},null,8,Wb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep14)},null,8,Xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep15)},null,8,Kb),Object(r["createElementVNode"])("li",null,["react"===e.jsFramework?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.fetchFollowStep16React)},null,8,Jb)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:1,innerHTML:e.$sanitize(e.fetchFollowStep16SPA)},null,8,Yb)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:t},[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(e.embedCode),ref:"codeblock"},null,8,Zb),[[c,{}]])])})),128))])])}var em=Object(r["defineComponent"])({props:{showContainerRow:Boolean,jsFramework:String},components:{TrackingCodeCommon:Cb},directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{setupStep1:"",setupStep2:"",setupStep7:"",installInstructions:[]}},methods:{fetchInstallInstructionsSPA:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;if(this.installInstructions=[],null!==a&&void 0!==a&&a.idContainer&&null!==a&&void 0!==a&&a.environment&&null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id){var i=this.linkTo("manageContainers",a.site.id,a.idContainer);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"");var o=this.linkTo("manageTriggers",a.site.id,a.idContainer);this.setupStep2=Object(u["translate"])("TagManager_SPAFollowStep2",''),"");var l=this.linkTo("manageTags",a.site.id,a.idContainer);this.setupStep7=Object(u["translate"])("TagManager_SPAFollowStep7",''),""),a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id,jsFramework:this.jsFramework}).then((function(e){n.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1}))}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(i+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(i)},fetchClickX:function(e){return Object(u["translate"])("General_ClickX",Object(u["translate"])(e))}},computed:{step1HasContent:function(){var e=this.$refs.step1;return e&&""!==e.textContent},fetchFollowStep3:function(){return Object(u["translate"])("TagManager_SPAFollowStep3","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-trigger"),"")},fetchFollowStep5:function(){return Object(u["translate"])("TagManager_SPAFollowStep5","".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),Object(u["translate"])("TagManager_CategoryUserEngagement"))},fetchFollowStep8:function(){return Object(u["translate"])("TagManager_SPAFollowStep8","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),"".concat(Object(u["translate"])("TagManager_MatomoTagName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-tag"),"")},fetchFollowStep9:function(){return Object(u["translate"])("TagManager_SPAFollowStep9",Object(u["translate"])("TagManager_ConfigureWhatTagDoes"),Object(u["translate"])("TagManager_CustomTitle"),"","")},fetchFollowStep10:function(){return Object(u["translate"])("TagManager_SPAFollowStep10",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10a:function(){return Object(u["translate"])("TagManager_SPAFollowStep10a","","",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10b:function(){return Object(u["translate"])("TagManager_SPAFollowStep10b",Object(u["translate"])("TagManager_CustomUrl"),"","")},fetchFollowStep11:function(){return Object(u["translate"])("TagManager_SPAFollowStep11",Object(u["translate"])("TagManager_ConfigureWhenTagDoes"),Object(u["translate"])("TagManager_FireTriggerTitle"),"".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),"".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""))},fetchFollowStep13:function(){return Object(u["translate"])("TagManager_SPAFollowStep13",Object(u["translate"])("TagManager_Publish"))},fetchFollowStep14:function(){return Object(u["translate"])("TagManager_SPAFollowStep14",Object(u["translate"])("TagManager_VersionName"),"","")},fetchFollowStep15:function(){return Object(u["translate"])("TagManager_SPAFollowStep15",Object(u["translate"])("TagManager_CreateVersionAndPublishRelease"))},fetchFollowStep16SPA:function(){return Object(u["translate"])("TagManager_SPAFollowStep16","</head>",Object(u["externalLink"])("https://developer.matomo.org/guides/tagmanager/embedding"),"")},fetchFollowStep16React:function(){return Object(u["translate"])("TagManager_ReactFollowStep16","","","App.js","React.useEffect","Hello World","React.js")}}});em.render=Qb;var tm,nm,am=em,im={class:"nav-wrapper"},rm={class:"pull-right"},om=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-close"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-close"})],-1),lm=[om],cm={class:"pull-right"},sm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("defs",null,[Object(r["createElementVNode"])("symbol",{id:"tm-icon-checkmark",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M27 4l-15 15-7-7-5 5 12 12 20-20z"})])])],-1),dm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("symbol",{id:"tm-icon-close",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M31.33 0.67c0.893 0.893 0.893 2.34 0 3.232l-27.427 27.427c-0.893 0.893-2.34\n 0.893-3.232 0s-0.893-2.34 0-3.232l27.427-27.427c0.892-0.893 2.34-0.893 3.232 0z"}),Object(r["createElementVNode"])("path",{d:"M0.67 0.67c0.893-0.893 2.34-0.893 3.232 0l27.427 27.427c0.893 0.892 0.893\n 2.34 0 3.232s-2.34 0.892-3.232 0l-27.427-27.427c-0.893-0.893-0.893-2.34 0-3.232z"})])],-1),um={class:"page",style:{clear:"both"}},gm={key:0,id:"secondNavBar",class:"Menu--dashboard z-depth-1"},bm={class:"navbar",role:"menu",style:{padding:"0"}},mm={class:"menuTab",role:"menuitem"},pm={class:"item",style:{"font-weight":"normal"}},hm=Object(r["createTextVNode"])(" Events "),fm={key:0},vm=Object(r["createElementVNode"])("br",null,null,-1),jm=Object(r["createElementVNode"])("br",null,null,-1),Om=Object(r["createElementVNode"])("label",{for:"onlyfiredTags",class:"lbl-onlyfiredTags"},"Only fired tags",-1),Tm={key:0,style:{padding:"0 0 1rem 1.2rem"}},ym=["onClick","title"],Vm={title:"This tag was fired"},Cm=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-checkmark"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-checkmark"})],-1),Nm=[Cm],Em={class:"pageWrap"},Sm={class:"home",id:"content"},wm=Object(r["createElementVNode"])("h3",null,"Fired Tags",-1),km={class:"entityTable"},Mm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Action"),Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Fired count")])],-1),_m={key:0},Dm=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Am=[Dm],xm=Object(r["createElementVNode"])("h3",{style:{"margin-top":"30px"}},"Not Yet Fired Tags",-1),Bm={class:"entityTable"},Lm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Um=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Pm=[Um],Im=Object(r["createElementVNode"])("h3",null,"Triggers",-1),Fm={class:"entityTable"},Hm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Gm={key:0},$m=Object(r["createElementVNode"])("td",{colspan:"4"},"No trigger",-1),Rm=[$m],qm={key:1},zm=Object(r["createElementVNode"])("h3",null,"Pushed data by this event",-1),Wm={class:"entityTable"},Xm={style:{"word-break":"break-all"}},Km=Object(r["createElementVNode"])("br",null,null,-1),Jm=Object(r["createElementVNode"])("h3",null,"Content after this event",-1),Ym={class:"entityTable"},Zm={style:{"word-break":"break-all"}},Qm={class:"entityTable"},ep=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Value")])],-1),tp={key:0},np=Object(r["createElementVNode"])("td",{colspan:"3"},"No variables",-1),ap=[np],ip={style:{"word-break":"break-all"}},rp={class:"entityTable"},op=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Time"),Object(r["createElementVNode"])("th",null,"Message")])],-1),lp={style:{"word-break":"break-all"}},cp=Object(r["createElementVNode"])("br",null,null,-1);function sp(e,t,n,a,i,o){var l,c,s,d,u,g,b,m,p,h;return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("nav",null,[Object(r["createElementVNode"])("div",im,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,[Object(r["renderSlot"])(e.$slots,"logo")]),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"tags"===e.contentTab||!e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(t){return e.contentTab="tags"})},"Tags")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"triggers"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[1]||(t[1]=function(t){return e.contentTab="triggers"})},"Triggers")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"variables"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[2]||(t[2]=function(t){return e.contentTab="variables"})},"Variables")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"dataLayer"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[3]||(t[3]=function(t){return e.contentTab="dataLayer"})},"Data Layer")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"logs"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.contentTab="logs"})},"Logs")],2),Object(r["createElementVNode"])("li",rm,[Object(r["createElementVNode"])("a",{id:"mtmCloseDebug",onClick:t[5]||(t[5]=function(t){return e.mtmCloseDebugWindow()})},lm)]),Object(r["createElementVNode"])("li",cm,[Object(r["createElementVNode"])("a",{id:"mtmUpdateDebugPosition",onClick:t[6]||(t[6]=function(t){return e.mtmUpdateDebugPosition()})},Object(r["toDisplayString"])(e.positionText),1)])])])]),sm,dm,Object(r["createElementVNode"])("div",um,["logs"!==e.contentTab?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gm,[Object(r["createElementVNode"])("ul",bm,[Object(r["createElementVNode"])("li",mm,[Object(r["createElementVNode"])("span",pm,[hm,e.mtmEvents.length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",fm,[vm,jm,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{type:"checkbox",class:"onlyFiredTags-chk",name:"onlyfiredTags",id:"onlyfiredTags",value:"1","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.onlyfiredTags=t}),style:{"margin-right":"3.5px"}},null,512),[[r["vModelCheckbox"],e.onlyfiredTags]]),Om])):Object(r["createCommentVNode"])("",!0)])]),0===e.mtmEvents.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Tm,"No event executed")):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmEventsReversed,(function(t,n){var a,i;return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["menuTab",{active:n===e.selectedEventIndex}]),role:"menuitem",key:n},[(t.tags||[]).length||!e.onlyfiredTags?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,class:"item",onClick:function(n){return e.selectEvent(t.index0)},title:"Time: ".concat(t.time,". Trigger: ").concat(null===(a=t.metTrigger)||void 0===a?void 0:a.name)},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.index)+": "+Object(r["toDisplayString"])(t.name)+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Vm,Nm,512),[[r["vShow"],null===(i=t.tags)||void 0===i?void 0:i.length]])],8,ym)):Object(r["createCommentVNode"])("",!0)],2)})),128))])])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",Em,[Object(r["createElementVNode"])("div",Sm,[Object(r["withDirectives"])(Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.homeTabTitle),513),[[r["vShow"],"logs"!==e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[wm,Object(r["createElementVNode"])("table",km,[Mm,Object(r["createElementVNode"])("tbody",null,[null!==(l=e.selectedEvent)&&void 0!==l&&null!==(c=l.tags)&&void 0!==c&&c.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",_m,Am)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(s=e.selectedEvent)||void 0===s?void 0:s.tags)||[],(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.action),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.numExecuted),1)])})),128))])]),xm,Object(r["createElementVNode"])("table",Bm,[Lm,Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,Pm,512),[[r["vShow"],0===e.notFiredTags.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.notFiredTags,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1)])})),128))])])],512),[[r["vShow"],"tags"===e.contentTab||!e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Im,Object(r["createElementVNode"])("table",Fm,[Hm,Object(r["createElementVNode"])("tbody",null,[null!==(d=e.selectedEvent)&&void 0!==d&&d.metTrigger?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Gm,Rm)),null!==(u=e.selectedEvent)&&void 0!==u&&u.metTrigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",qm,[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.type),1)])):Object(r["createCommentVNode"])("",!0)])])],512),[[r["vShow"],"triggers"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[zm,Object(r["createElementVNode"])("table",Wm,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Xm,Object(r["toDisplayString"])(e.selectedEventData),1)])])]),Km,Jm,Object(r["createElementVNode"])("table",Ym,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Zm,Object(r["toDisplayString"])(e.selectedEventContainerDataLayer),1)])])])],512),[[r["vShow"],"dataLayer"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",Qm,[ep,Object(r["createElementVNode"])("tbody",null,[null!==(g=e.selectedEvent)&&void 0!==g&&null!==(b=g.container)&&void 0!==b&&null!==(m=b.variables)&&void 0!==m&&m.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",tp,ap)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(p=e.selectedEvent)||void 0===p||null===(h=p.container)||void 0===h?void 0:h.variables)||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.type),1),Object(r["createElementVNode"])("td",ip,Object(r["toDisplayString"])(e.stringifySelectedVariable(t)),1)])})),128))])])],512),[[r["vShow"],"variables"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",rp,[op,Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmLogs,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.time),1),Object(r["createElementVNode"])("td",lp,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.messages,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:t},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e),1),cp])})),128))])])})),128))])])],512),[[r["vShow"],"logs"===e.contentTab]])])])])])}function dp(e){return mp(e)||bp(e)||gp(e)||up()}function up(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gp(e,t){if(e){if("string"===typeof e)return pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pp(e,t):void 0}}function bp(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function mp(e){if(Array.isArray(e))return pp(e)}function pp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt||n.push.apply(n,dp(e.tags.map((function(e){return e.name}))))}));var a=[];return this.selectedEvent.container.tags.forEach((function(e){-1===n.indexOf(e.name)&&a.push(e)})),a},selectedEvent:function(){return this.mtmEvents[this.selectedEventIndex]},mtmEvents:function(){return window.mtmDbgData.mtmEvents},mtmEventsReversed:function(){var e=dp(this.mtmEvents);return e.reverse(),e},mtmLogs:function(){return window.mtmDbgData.mtmLogs},selectedEventData:function(){var e;return(null===(e=this.selectedEvent)||void 0===e?void 0:e.eventData)&&JSON.stringify(this.selectedEvent.eventData,Op())},selectedEventContainerDataLayer:function(){var e,t;return(null===(e=this.selectedEvent)||void 0===e||null===(t=e.container)||void 0===t?void 0:t.dataLayer)&&JSON.stringify(this.selectedEvent.container.dataLayer,Op())}}});Tp.render=sp;var yp=Tp,Vp={class:"copyMtmObjectDialog"},Cp=["innerHTML"];function Np(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveDirective"])("form");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vp,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.getCopyDialogTitle),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.getCopyDescription),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"site",name:"destinationSite",title:e.translate("TagManager_ChooseWebsite"),modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t})},null,8,["title","modelValue"]),"container"!==e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:0,uicontrol:"select",name:"idDestinationContainer",options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container"),modelValue:e.idDestinationContainer,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.idDestinationContainer=t})},null,8,["options","disabled","title","modelValue"])):Object(r["createCommentVNode"])("",!0),"container"===e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:1,class:"copyNote",innerHTML:e.$sanitize(e.getCopyContainerNote)},null,8,Cp)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("button",{class:"btn",onClick:t[2]||(t[2]=function(){return e.performCopy&&e.performCopy.apply(e,arguments)})},Object(r["toDisplayString"])(e.translate("General_Copy")),1)],512),[[c]])])}var Ep=Object(r["defineComponent"])({props:{defaultSite:{type:Object,required:!0},copyType:{type:String,required:!0},copyNonce:{type:String,required:!1,default:""},idToCopy:{type:[String,Number],required:!0},idSourceContainer:{type:String,required:!1,default:""},idContainerVersion:{type:Number,required:!1,default:0}},directives:{Form:g["Form"]},components:{Field:g["Field"]},data:function(){return{site:this.defaultSite,idDestinationContainer:"",containerOptions:[]}},created:function(){this.onSiteChange(),this.idDestinationContainer=this.idSourceContainer},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;"container"!==this.copyType.toLowerCase()&&(this.containerOptions=[],this.idDestinationContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idDestinationContainer="",void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idDestinationContainer||(t.idDestinationContainer=e.idcontainer),t.containerOptions.push({key:e.idcontainer,value:e.name})}))})))},performCopy:function(){var e,t=this,n={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":n.action="copyContainer",n.idContainer=this.idToCopy;break;case"tag":n.action="copyTag",n.idTag=this.idToCopy;break;case"trigger":n.action="copyTrigger",n.idTrigger=this.idToCopy;break;case"variable":n.action="copyVariable",n.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}this.idDestinationContainer&&(n.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(n.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(n.idContainerVersion=this.idContainerVersion),u["AjaxHelper"].fetch(n).then((function(e){if(!e||!e.isSuccess||!e.urlToNewCopy){var n=Object(u["translate"])("General_ErrorRequest","",""),a=u["NotificationsStore"].show({message:n,id:"CopyDialogResultNotification",context:"error",type:"transient"});return u["NotificationsStore"].scrollToNotification(a),void window.Piwik_Popover.close()}t.reloadEntityStore(),t.displaySuccessNotification(e.urlToNewCopy),window.Piwik_Popover.close()}))},reloadEntityStore:function(){switch(this.copyType.toLowerCase()){case"container":ud.reload();break;case"tag":mo.reload(this.idSourceContainer,this.idContainerVersion);break;case"trigger":ya.reload(this.idSourceContainer,this.idContainerVersion);break;case"variable":ft.reload(this.idSourceContainer,this.idContainerVersion);break;default:throw Error("Unrecognised copy object type.")}},displaySuccessNotification:function(e){var t="TagManager_CopyXSuccess",n="";switch(this.copyType.toLowerCase()){case"container":n="TagManager_ContainerLowercase";break;case"tag":n="TagManager_TagLowercase";break;case"trigger":n="TagManager_TriggerLowercase";break;case"variable":n="TagManager_VariableLowercase";break;default:throw Error("Unrecognised copy object type.")}var a=Object(u["translate"])(t,[''),Object(u["translate"])(n),""]),i=u["NotificationsStore"].show({message:a,id:"CopyDialogResultNotification",context:"success",type:"transient"});u["NotificationsStore"].scrollToNotification(i)}},computed:{getCopyDialogTitle:function(){var e="";switch(this.copyType.toLowerCase()){case"container":e=Object(u["translate"])("TagManager_Container");break;case"tag":e=Object(u["translate"])("TagManager_Tag");break;case"trigger":e=Object(u["translate"])("TagManager_Trigger");break;case"variable":e=Object(u["translate"])("TagManager_Variable");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyX",e)},getCopyDescription:function(){if("container"===this.copyType.toLowerCase())return Object(u["translate"])("TagManager_CopyContainerDescription");var e="";switch(this.copyType.toLowerCase()){case"tag":e=Object(u["translate"])("TagManager_TagLowercase");break;case"trigger":e=Object(u["translate"])("TagManager_TriggerLowercase");break;case"variable":e=Object(u["translate"])("TagManager_VariableLowercase");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyXDescription",e)},getCopyContainerNote:function(){return Object(u["translate"])("TagManager_CopyContainerNote","","")},getCopyUrl:function(){var e,t={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":t.action="copyContainer",t.idContainer=this.idToCopy;break;case"tag":t.action="copyTag",t.idTag=this.idToCopy;break;case"trigger":t.action="copyTrigger",t.idTrigger=this.idToCopy;break;case"variable":t.action="copyVariable",t.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}return this.idDestinationContainer&&(t.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(t.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(t.idContainerVersion=this.idContainerVersion),"?".concat(u["MatomoUrl"].stringify(t))}}});Ep.render=Np;var Sp=Ep; + */var dd=function(){function e(){var t=this;od(this,e),sd(this,"privateState",Object(r["reactive"])({containers:[],isLoadingContainers:!1,isLoadingSingle:!1,isUpdating:!1})),sd(this,"state",Object(r["computed"])((function(){return Object(r["readonly"])(t.privateState)}))),sd(this,"isLoading",Object(r["computed"])((function(){var e=t.state.value;return e.isLoadingContainers||e.isLoadingSingle}))),sd(this,"isUpdating",Object(r["computed"])((function(){return t.state.value.isUpdating}))),sd(this,"containers",Object(r["computed"])((function(){return t.state.value.containers}))),sd(this,"fetchPromise",null)}return cd(e,[{key:"reload",value:function(){return this.privateState.containers=[],this.fetchPromise=null,this.fetchContainers()}},{key:"fetchContainers",value:function(){var e=this;return this.privateState.isLoadingContainers=!0,this.privateState.containers=[],this.fetchPromise||(this.fetchPromise=u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1"})),Promise.resolve(this.fetchPromise).then((function(t){return e.privateState.containers=t,e.privateState.isLoadingContainers=!1,e.containers.value})).finally((function(){e.privateState.isLoadingContainers=!1}))}},{key:"findContainer",value:function(e){var t=this,n=this.containers.value.find((function(t){return t.idcontainer===e}));return n?Promise.resolve(n):(this.privateState.isLoadingSingle=!0,u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.getContainer",filter_limit:"-1"}).then((function(e){return t.privateState.containers=[].concat(ed(t.privateState.containers),[e]),Object(r["readonly"])(e)})).finally((function(){t.privateState.isLoadingSingle=!1})))}},{key:"deleteContainer",value:function(e){var t=this;return this.privateState.isUpdating=!0,this.privateState.containers=[],u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.deleteContainer"},{withTokenInUrl:!0}).finally((function(){t.privateState.isUpdating=!1}))}},{key:"createOrUpdateContainer",value:function(e,t){var n=this;return this.privateState.isUpdating=!0,u["AjaxHelper"].post({method:t,idContainer:e.idcontainer},{name:e.name,description:e.description,ignoreGtmDataLayer:e.ignoreGtmDataLayer,activelySyncGtmDataLayer:e.activelySyncGtmDataLayer,isTagFireLimitAllowedInPreviewMode:e.isTagFireLimitAllowedInPreviewMode,context:e.context},{withTokenInUrl:!0}).finally((function(){n.privateState.isUpdating=!1}))}}]),e}(),ud=new dd,gd="containertagmanagement",bd=Object(r["defineComponent"])({props:{idContainer:String},components:{ContentBlock:u["ContentBlock"],Field:g["Field"],SaveButton:g["SaveButton"]},data:function(){return{isDirty:!1,editTitle:"",isUpdatingVersion:!1,container:{}}},created:function(){Qs.init(),Vt.init(),this.initIdContainer()},watch:{idContainer:function(e){null!==e&&this.initIdContainer()}},methods:{removeAnyContainerNotification:function(){u["NotificationsStore"].remove(gd),u["NotificationsStore"].remove("ajaxHelper")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:gd,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},showErrorFieldNotProvidedNotification:function(e){var t=Object(u["translate"])("TagManager_ErrorXNotProvided",[e]);this.showNotification(t,"error")},initIdContainer:function(){var e=this;this.container={},u["Matomo"].helper.lazyScrollToContent(),this.edit&&this.idContainer?(this.editTitle=Object(u["translate"])("TagManager_EditContainer"),ud.findContainer(this.idContainer).then((function(t){t&&(e.container=Object(u["clone"])(t),e.isDirty=!1)}))):this.create&&(this.editTitle=Object(u["translate"])("TagManager_CreateNewContainer"),this.container={idSite:u["Matomo"].idSite,name:"",context:"web",description:"",activelySyncGtmDataLayer:!0},this.isDirty=!1)},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idContainer,u["MatomoUrl"].updateHash(e)},createContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVersion=!0,ud.createOrUpdateContainer(this.container,"TagManager.addContainer").then((function(t){if(e.isUpdatingVersion=!1,t){e.isDirty=!1;var n=t.value;e.showNotification(Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Container")),"success"),u["MatomoUrl"].updateUrl(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"dashboard",idContainer:n}))}})).finally((function(){e.isUpdatingVersion=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdating=!0,ud.createOrUpdateContainer(this.container,"TagManager.updateContainer").then((function(t){t&&(e.isDirty=!1,e.container={},ud.reload().then((function(){e.initIdContainer()})),e.showNotification(Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Container")),"success"))})))},checkRequiredFieldsAreSet:function(){if(!this.container.name){var e=Object(u["translate"])("General_Name");return this.showErrorFieldNotProvidedNotification(e),!1}return!0}},computed:{contexts:function(){return Qs.contextsOptions.value},create:function(){return"0"===this.idContainer},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVersion}}});bd.render=Ws;var md=bd,pd={class:"tagManagerManageList tagManagerContainerList"},hd=["innerHTML"],fd={class:"index"},vd={class:"name"},jd={class:"description"},Od={class:"created"},Td={class:"action"},yd={colspan:"5"},Vd={class:"loadingPiwik"},Cd=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Nd={colspan:"5"},Ed=["id"],Sd=["title"],wd=["title"],kd=["title"],Md={class:"created"},_d=["href","title"],Dd=["onClick","title"],Ad=["onClick","title"],xd=["onClick","title"],Bd=["onClick","title"],Ld={class:"tableActionBar"},Ud=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Pd={class:"ui-confirm",id:"confirmDeleteContainer",ref:"confirmDeleteContainer"},Id=["value"],Fd=["value"];function Hd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContentBlock"),c=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",pd,[Object(r["createVNode"])(l,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Containers"))},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.getManageContainersIntro)},null,8,hd),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fd,Object(r["toDisplayString"])(e.translate("General_Id")),1),Object(r["createElementVNode"])("th",vd,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",jd,Object(r["toDisplayString"])(e.translate("General_Description")),1),Object(r["createElementVNode"])("th",Od,Object(r["toDisplayString"])(e.translate("TagManager_CreatedDate")),1),Object(r["createElementVNode"])("th",Td,Object(r["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",yd,[Object(r["createElementVNode"])("span",Vd,[Cd,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Nd,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerNow",onClick:t[0]||(t[0]=function(t){return e.createContainer()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewContainerNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"container".concat(t.idcontainer),class:"containers",key:t.idcontainer},[Object(r["createElementVNode"])("td",{class:"index",title:"".concat(e.translate("TagManager_Context"),": ")+e.contexts[t.context]},Object(r["toDisplayString"])(t.idcontainer),9,Sd),Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,wd),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,kd),Object(r["createElementVNode"])("td",Md,[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.created_date_pretty),1)]),Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-configure",href:"?module=TagManager&action="+e.containerDefaultAction+"&idContainer="+t.idcontainer+"&idSite="+t.idsite+"&period=day&date=yesterday",title:e.translate("TagManager_ConfigureX",e.translate("TagManager_Container"))},null,8,_d),Object(r["createElementVNode"])("a",{class:"table-action installCode icon-embed",onClick:function(n){return e.installCode(t.idcontainer)},title:e.translate("TagManager_InstallCode")},null,8,Dd),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editContainer(t.idcontainer)},title:e.translate("TagManager_EditX",e.translate("TagManager_Container"))},null,8,Ad),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteContainer(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Container"))},null,8,xd),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Container"))},null,8,Bd),[[r["vShow"],e.canCopyContainer]])],2)],8,Ed)})),128))])],512),[[c]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ld,[Object(r["createElementVNode"])("a",{class:"createNewContainer",value:"",onClick:t[1]||(t[1]=function(t){return e.createContainer()})},[Ud,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewContainer")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title"]),Object(r["createElementVNode"])("div",Pd,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteContainerConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Id),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Fd)],512)])}function Gd(e){return zd(e)||qd(e)||Rd(e)||$d()}function $d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Rd(e,t){if(e){if("string"===typeof e)return Wd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wd(e,t):void 0}}function qd(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function zd(e){if(Array.isArray(e))return Wd(e)}function Wd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.created_date?-1:0})),e},getManageContainersIntro:function(){var e=Object(u["externalLink"])("https://matomo.org/guide/tag-manager/getting-started-with-tag-manager/");return Object(u["translate"])("TagManager_ManageContainersIntro",e,"")},canCopyContainer:function(){return this.isSuperUser},getActionClasses:function(){var e=this.canCopyContainer?" hasCopyAction":"";return"action".concat(e)}},methods:{createContainer:function(){this.editContainer("0")},editContainer:function(e){u["MatomoUrl"].updateHash(Object.assign(Object.assign({},u["MatomoUrl"].hashParsed.value),{},{idContainer:e}))},installCode:function(e){Kd.showInstallCode(e)},deleteContainer:function(e){function t(){ud.deleteContainer(e.idcontainer).then((function(){ud.reload(),u["NotificationsStore"].remove("CopyDialogResultNotification")}))}u["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteContainer,{yes:t})},truncateText:function(e,t){return e.length>t?"".concat(e.substr(0,t-3),"..."):e},openCopyDialog:function(e){var t=u["MatomoUrl"].stringify({module:"TagManager",action:"copyContainerDialog",idSite:e.idsite,idContainer:e.idcontainer});window.Piwik_Popover.createPopupAndLoadUrl(t,"","mtmCopyContainer")}}});Jd.render=Hd;var Yd=Jd,Zd={class:"manageContainer"};function Qd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContainerList"),c=Object(r["resolveComponent"])("ContainerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Zd,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"is-super-user":e.isSuperUser},null,8,["is-super-user"])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer},null,8,["id-container"])],512),[[r["vShow"],e.editMode]])])}var eu=Object(r["defineComponent"])({props:{isSuperUser:{type:Boolean,required:!0}},components:{ContainerList:Yd,ContainerEdit:md},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idContainer}),(function(t){e.onIdContainerParamChange(t)})),u["NotificationsStore"].remove("containertagmanagement"),this.onIdContainerParamChange(u["MatomoUrl"].hashParsed.value.idContainer)},computed:{idContainer:function(){var e=u["MatomoUrl"].hashParsed.value.idContainer;return this.isAddAllowed||""!==e?e:null},editMode:function(){return!!this.idContainer}},methods:{onIdContainerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVersion",t),this.isAddAllowed=!!t.isAllowed}}}});eu.render=Qd;var tu=eu,nu={class:"containerDashboard"},au={key:0},iu={class:"dashboardCreationDate"},ru={key:0},ou=Object(r["createElementVNode"])("br",null,null,-1),lu=["innerHTML"],cu={class:"row",style:{"margin-left":"-0.75rem"}},su={class:"col m6 s12"},du={key:0},uu=["href","title"],gu={key:0},bu=Object(r["createElementVNode"])("hr",null,null,-1),mu=["href"],pu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),hu=["href"],fu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),vu={class:"col m6 s12"},ju={key:0},Ou=["href","title"],Tu=Object(r["createElementVNode"])("hr",null,null,-1),yu=["href"],Vu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Cu=["href"],Nu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Eu={class:"row",style:{"margin-left":"-0.75rem"}},Su={class:"col m6 s12"},wu=["href","title"],ku={key:0},Mu=Object(r["createElementVNode"])("hr",null,null,-1),_u=["href"],Du=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Au=["href"],xu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Bu={class:"col m6 s12"},Lu=["title","href"],Uu={key:0},Pu=Object(r["createElementVNode"])("br",null,null,-1),Iu=["title"],Fu={key:0},Hu=Object(r["createElementVNode"])("hr",null,null,-1),Gu=["href"],$u=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Ru=["href"],qu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1);function zu(e,t,n,a,i,o){var l,c,s=Object(r["resolveComponent"])("ActivityIndicator"),d=Object(r["resolveComponent"])("EnrichedHeadline"),u=Object(r["resolveComponent"])("ContentBlock"),g=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",nu,[Object(r["createVNode"])(s,{loading:e.isLoading},null,8,["loading"]),e.isLoading?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",au,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(d,{"feature-name":"Tag Manager","inline-help":e.dashboardHelpText},{default:Object(r["withCtx"])((function(){var t;return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_ContainerX",null===(t=e.container)||void 0===t?void 0:t.name)),1)]})),_:1},8,["inline-help"])]),Object(r["createElementVNode"])("p",iu,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.containerMetaInformation)+" ",1),null!==(l=e.containerVersion)&&void 0!==l&&l.description?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ru,[ou,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_Description"))+": "+Object(r["toDisplayString"])(null===(c=e.containerVersion)||void 0===c?void 0:c.description),1)])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.containerDashboardDescription)},null,8,lu)],512),[[g]]),Object(r["createElementVNode"])("div",cu,[Object(r["createElementVNode"])("div",su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.tagCount," ").concat(e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.tagCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",du,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainerVersionTags,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTags",{idTag:t.idtag}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,uu),n!==e.sortedContainerVersionTags.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",gu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))])):Object(r["createCommentVNode"])("",!0)]),bu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags")},[pu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTags")),1)],8,mu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags",{idTag:0})},[fu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)],8,hu)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",vu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.triggerCount," ").concat(e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.triggerCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ju,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTriggers",{idTrigger:t.idtrigger}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,Ou),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,", ",512),[[r["vShow"],n!==e.sortedTriggers.length-1]])])})),128))])):Object(r["createCommentVNode"])("",!0)]),Tu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers")},[Vu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTriggers")),1)],8,yu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers",{idTrigger:0})},[Nu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)],8,Cu)]})),_:1},8,["content-title","help-text"])])]),Object(r["createElementVNode"])("div",Eu,[Object(r["createElementVNode"])("div",Su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.variableCount," ").concat(e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageVariables",{idVariable:t.idvariable}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,wu),n!==e.sortedVariables.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ku,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.variableCount]])]),Mu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables")},[Du,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVariables")),1)],8,_u),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables",{idVariable:0})},[xu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)],8,Au)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",Bu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.versionCount," ").concat(e.translate("TagManager_Versions")),"help-text":e.versionsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_LastVersions"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.lastVersions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{title:e.lastVersionLinkTitle(t),href:e.linkTo("manageVersions",{idContainerVersion:t.idcontainerversion})},Object(r["toDisplayString"])(t.name),9,Lu),n!==e.lastVersions.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Uu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.lastVersions.length]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Pu,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_Environments"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.container.releases,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("span",{title:e.releaseTooltip(t)},Object(r["toDisplayString"])(e.ucfirst(t.environment)),9,Iu),n!==e.container.releases.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Fu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.container.releases.length]])]),Hu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions")},[$u,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVersions")),1)],8,Gu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions",{idContainerVersion:0})},[qu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVersion")),1)],8,Ru)]})),_:1},8,["content-title","help-text"])])])]))])}function Wu(e){e.sort((function(e,t){return e.namet.name?1:0}))}var Xu=Object(r["defineComponent"])({props:{idContainer:String,dashboardHelpText:String,tagsHelpText:String,triggersHelpText:String,variablesHelpText:String,versionsHelpText:String},components:{ActivityIndicator:u["ActivityIndicator"],EnrichedHeadline:u["EnrichedHeadline"],ContentBlock:u["ContentBlock"]},directives:{ContentIntro:u["ContentIntro"]},data:function(){return{container:null,containerVersion:null,isLoading:!1}},created:function(){var e=this;Qs.init(),this.isLoading=!0;var t=u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer}).then((function(t){e.container=t})),n=u["AjaxHelper"].fetch({method:"TagManager.exportContainerVersion",idContainer:this.idContainer}).then((function(t){e.containerVersion=t}));Promise.all([t,n]).finally((function(){e.isLoading=!1}))},methods:{linkTo:function(e,t){var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e}));return t&&(n+="#?".concat(u["MatomoUrl"].stringify(t))),"?".concat(n)},lastVersionLinkTitle:function(e){return"Created on ".concat(e.created_date_pretty)+", description: '".concat(e.description,"'")},releaseTooltip:function(e){var t=Object(u["translate"])("TagManager_ReleaseInfo",e.release_login,e.release_date_pretty),n=Object(u["translate"])("TagManager_ReleaseVersionInfo",e.version_name);return"".concat(t," ").concat(n)},ucfirst:function(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}},computed:{lastVersions:function(){var e,t;return null!==(e=this.container)&&void 0!==e&&null!==(t=e.versions)&&void 0!==t&&t.length?this.container.versions.slice(0,5):[]},contexts:function(){var e={};return Qs.contexts.value.forEach((function(t){var n=t.id,a=t.name;e[n]=a})),e},containerMetaInformation:function(){var e;return Object(u["translate"])("TagManager_ContainerIdInformation",(null===(e=this.containerVersion)||void 0===e?void 0:e.idcontainer)||"")},containerDashboardDescription:function(){return Object(u["translate"])("TagManager_ContainerDashboardDescription",'',"")},sortedContainerVersionTags:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.tags)||[];return Wu(t),t},sortedTriggers:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.triggers)||[];return Wu(t),t},sortedVariables:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.variables)||[];return Wu(t),t},tagCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.tags.length},triggerCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.triggers.length},versionCount:function(){var e;return null===(e=this.container)||void 0===e?void 0:e.versions.length},variableCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.variables.length}}});Xu.render=zu;var Ku=Xu,Ju=["title"],Yu={class:"title"},Zu=Object(r["createElementVNode"])("span",{class:"icon icon-chevron-down"}," ",-1),Qu={class:"dropdown positionInViewport"},eg={class:"custom_select_container"},tg={class:"custom_select_ul_list"},ng=["title"],ag=["href"];function ig(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ActivityIndicator"),c=Object(r["resolveDirective"])("focus-anywhere-but-here");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])(["tagContainerSelector piwikSelector borderedControl",{expanded:e.showContainerList}]),onClick:t[1]||(t[1]=function(t){e.fetchContainers(),e.showContainerList=!e.showContainerList}),title:e.translate("TagManager_ChooseContainer")},[Object(r["createElementVNode"])("a",Yu,[Zu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.truncateText(e.actualContainerName,50)),1)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Qu,[Object(r["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(r["createElementVNode"])("div",eg,[Object(r["createElementVNode"])("ul",tg,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("a",{tabindex:"-1",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(){}),["prevent","stop"]))},Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound")),1)],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{title:"".concat(t.name," (").concat(t.idcontainer,")"),key:t.idcontainer},[Object(r["createElementVNode"])("a",{href:e.linkTo(t.idcontainer)},Object(r["toDisplayString"])(t.name)+" ("+Object(r["toDisplayString"])(t.idcontainer)+") ",9,ag)],8,ng)})),128))])])],512),[[r["vShow"],e.showContainerList]])],10,Ju)),[[c,{blur:e.onBlur}]])}var rg=window,og=rg.tagManagerHelper,lg=Object(r["defineComponent"])({props:{containerName:String},components:{ActivityIndicator:u["ActivityIndicator"]},directives:{FocusAnywhereButHere:u["FocusAnywhereButHere"]},data:function(){return{containers:[],isLoading:!1,showContainerList:!1}},created:function(){setTimeout((function(){window.initTopControls()}))},methods:{fetchContainers:function(){var e=this;this.isLoading=!0,this.containers=[],u["AjaxHelper"].fetch({method:"TagManager.getContainers"}).then((function(t){e.containers=t})).finally((function(){e.isLoading=!1}))},linkTo:function(e){var t=u["MatomoUrl"].urlParsed.value.action;t&&"manageContainers"!==t||(t=this.hasWriteAccess?"dashboard":"manageTags");var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{idContainer:e,action:t}));return"".concat(window.location.pathname,"?").concat(n)},onBlur:function(){this.showContainerList=!1},truncateText:function(e,t){return og.truncateText(e,t)}},computed:{actualContainerName:function(){return this.containerName?Object(u["translate"])("TagManager_ContainerX",this.containerName):Object(u["translate"])("TagManager_ChooseContainer")},hasWriteAccess:function(){return u["Matomo"].hasUserCapability("tagmanager_write")}}});lg.render=ig;var cg=lg,sg={style:{"margin-left":"-0.75rem"}},dg=Object(r["createElementVNode"])("br",null,null,-1),ug=["href"],gg=["textContent"],bg={style:{"margin-top":"1rem"}},mg=["innerHTML"],pg=Object(r["createElementVNode"])("br",null,null,-1),hg=["href"],fg={class:"environment"},vg={class:"name"},jg={class:"name"},Og={class:"released_by"},Tg={class:"released_on"},yg={key:0},Vg={colspan:"7"},Cg={class:"loadingPiwik"},Ng=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Eg={key:1},Sg={colspan:"7"},wg={class:"environment"},kg={class:"name"},Mg={class:"revision"},_g={class:"released_by"},Dg={class:"released_on"},Ag={class:"date"};function xg(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveDirective"])("copy-to-clipboard"),u=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createBlock"])(s,{class:"manageInstallTagCode",feature:"Tag Manager","content-title":"Install Code"},{default:Object(r["withCtx"])((function(){var n,a;return[Object(r["createElementVNode"])("div",sg,[Object(r["createVNode"])(l,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.environment=t,e.fetchInstallInstructions(e.environment)}),options:e.environments,title:e.translate("TagManager_Environment")},null,8,["model-value","options","title"])]),Object(r["createVNode"])(c,{loading:e.isLoading},null,8,["loading"]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n},[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),dg,t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,ug)):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",null,[t.embedCode?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("pre",{key:0,textContent:Object(r["toDisplayString"])(t.embedCode)},null,8,gg)),[[d,{}]]):Object(r["createCommentVNode"])("",!0)])])})),128)),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_InstallCodePublishEnvironmentNote","preview"))+" "+Object(r["toDisplayString"])(e.translate("TagManager_ConfigureEnvironmentsSuperUser")),1),Object(r["createElementVNode"])("p",bg,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_InstallCodeDataLayerNote","",""))},null,8,mg),pg,Object(r["createElementVNode"])("a",{target:"_blank",href:e.externalRawLink("https://matomo.org/faq/tag-manager/data-layer-in-matomo-tag-manager/")},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,hg)]),Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_ReleasesOverview")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fg,Object(r["toDisplayString"])(e.translate("TagManager_Environment")),1),Object(r["createElementVNode"])("th",vg,Object(r["toDisplayString"])(e.translate("TagManager_VersionName")),1),Object(r["createElementVNode"])("th",jg,Object(r["toDisplayString"])(e.translate("TagManager_VersionRevision")),1),Object(r["createElementVNode"])("th",Og,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedBy")),1),Object(r["createElementVNode"])("th",Tg,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedOn")),1)])]),Object(r["createElementVNode"])("tbody",null,[e.isLoading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",yg,[Object(r["createElementVNode"])("td",Vg,[Object(r["createElementVNode"])("span",Cg,[Ng,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])])):Object(r["createCommentVNode"])("",!0),e.isLoading||0!==(null===(n=e.container)||void 0===n||null===(a=n.releases)||void 0===a?void 0:a.length)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Eg,[Object(r["createElementVNode"])("td",Sg,Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFound")),1)])),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedReleases,(function(t){var n,a;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t.idcontainerrelease},[Object(r["createElementVNode"])("td",wg,Object(r["toDisplayString"])(e.ucfirst(t.environment)),1),Object(r["createElementVNode"])("td",kg,Object(r["toDisplayString"])(null===(n=e.releaseVersions[t.idcontainerrelease])||void 0===n?void 0:n.name),1),Object(r["createElementVNode"])("td",Mg,Object(r["toDisplayString"])(null===(a=e.releaseVersions[t.idcontainerrelease])||void 0===a?void 0:a.revision),1),Object(r["createElementVNode"])("td",_g,Object(r["toDisplayString"])(t.release_login),1),Object(r["createElementVNode"])("td",Dg,[Object(r["createElementVNode"])("span",Ag,Object(r["toDisplayString"])(t.release_date_pretty),1)])])})),128))])],512),[[u]])]})),_:1})}function Bg(e){return Pg(e)||Ug(e)||Hg(e)||Lg()}function Lg(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ug(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Pg(e){if(Array.isArray(e))return Gg(e)}function Ig(e,t){return Rg(e)||$g(e,t)||Hg(e,t)||Fg()}function Fg(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hg(e,t){if(e){if("string"===typeof e)return Gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gg(e,t):void 0}}function Gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.release_date?-1:t.index-e.index})),t}}});Wg.render=xg;var Xg=Wg,Kg={class:"tagManagerTrackingCode"},Jg={key:0},Yg={class:"trackingCodeAdvancedOptions"},Zg={class:"advance-option"},Qg=Object(r["createElementVNode"])("span",{class:"icon-chevron-down"},null,-1),eb=Object(r["createElementVNode"])("span",{class:"icon-chevron-up"},null,-1),tb={id:"mtm-advanced-options"},nb=["innerHTML"],ab={key:1,class:"row"},ib={class:"col s12 m4 "},rb={class:"form-group row"},ob={class:"col s12 input-field"},lb={for:"tagManagerTrackingCodeSite",class:"siteSelectorLabel"},cb={class:"sites_autocomplete"},sb={class:"col s12 m4"},db={class:"col s12 m4"},ub=["innerHTML"],gb={key:1,class:"alert alert-info"},bb={href:""},mb={key:0},pb=["href"],hb=Object(r["createTextVNode"])(". "),fb=["innerHTML"],vb=["textContent"],jb=["innerHTML"],Ob={key:1};function Tb(e,t,n,a,i,o){var l=this,c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("SiteSelector"),d=Object(r["resolveComponent"])("Field"),u=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Kg,[e.showContainerRow?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Jg,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_OptionallyCustomiseContainer"))+" ",1),Object(r["createElementVNode"])("div",Yg,[Object(r["createElementVNode"])("div",Zg,[Object(r["createElementVNode"])("span",null,[e.isAdvancedDisplayed?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,href:"javascript:;",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!0}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_ShowAdvancedOptions"))+" ",1),Qg])),e.isAdvancedDisplayed?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:1,href:"javascript:;",onClick:t[1]||(t[1]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!1}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_HideAdvancedOptions"))+" ",1),eb])):Object(r["createCommentVNode"])("",!0)])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",tb,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.getAdvancedStepText)},null,8,nb),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,loading:!0},null,512)),[[r["vShow"],e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ab,[Object(r["createElementVNode"])("div",ib,[Object(r["createElementVNode"])("div",rb,[Object(r["createElementVNode"])("div",ob,[Object(r["createElementVNode"])("label",lb,Object(r["toDisplayString"])(e.translate("General_Website")),1),Object(r["createElementVNode"])("div",cb,[Object(r["createVNode"])(s,{id:"tagManagerTrackingCodeSite",modelValue:e.site,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.site=t}),"show-all-sites-item":!1,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(r["createElementVNode"])("div",sb,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"containers","model-value":e.idContainer,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.idContainer=t,e.onContainerChange()}),options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container")},null,8,["model-value","options","disabled","title"])])]),Object(r["createElementVNode"])("div",db,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.environment=t,l.$emit("fetchInstallInstructions")}),options:e.environments,disabled:e.environments.length<=1,"full-width":!0,title:e.translate("TagManager_Environment")},null,8,["model-value","options","disabled","title"])])])],512)),[[r["vShow"],!e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.getAdvancedStepInfo)},null,8,ub)):Object(r["createCommentVNode"])("",!0)])],512),[[r["vShow"],e.isAdvancedDisplayed]])])])):Object(r["createCommentVNode"])("",!0),e.idContainer&&e.noReleaseFound?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFoundForContainer"))+" ",1),Object(r["createElementVNode"])("a",bb,Object(r["toDisplayString"])(e.translate("TagManager_PublishVersionToEnvironmentToViewEmbedCode")),1)])):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:n},[e.showDescription?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",mb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,pb)):Object(r["createCommentVNode"])("",!0),hb])):Object(r["createCommentVNode"])("",!0),e.showPlainMtmSteps?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.getMtmStep3)},null,8,fb)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,vb),[[u,{}]])])],64)})),128)),e.showBottom&&!e.noReleaseFound&&e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:2},[e.showTestSection?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Ob,[(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e.testComponent),{site:e.site},null,8,["site"]))])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.getCongratulationsText)},null,8,jb))],64)):Object(r["createCommentVNode"])("",!0)])}function yb(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}var Vb=Object(r["defineComponent"])({props:{showContainerRow:Boolean,showBottom:Boolean,showDescription:Boolean,showPlainMtmSteps:Boolean,showTestSection:Boolean,showAdvancedOptions:{required:!1,type:Boolean,default:!1}},components:{ActivityIndicator:u["ActivityIndicator"],SiteSelector:u["SiteSelector"],Field:g["Field"]},emits:["fetchInstallInstructions"],directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{containerVariables:[],isLoading:!1,idContainer:"",environment:"",environments:[],environmentNameMap:{},containerMap:{},containerOptions:[],site:{id:u["Matomo"].idSite,name:u["Matomo"].helper.htmlDecode(u["Matomo"].siteName)},matomoConfigs:[],releases:[],installInstructions:[],noReleaseFound:!1,isAdvancedDisplayed:!1}},created:function(){var e=this;u["AjaxHelper"].fetch({method:"TagManager.getAvailableEnvironments",filter_limit:"-1"}).then((function(t){var n;n=Array.isArray(t)?t:Object.values(t),e.environmentNameMap=Object.fromEntries(n.map((function(e){var t=e.id,n=e.name;return[t,n]})))})),this.onSiteChange(),this.isAdvancedDisplayed=this.showAdvancedOptions},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;this.installInstructions=[],this.containerOptions=[],this.containerMap={},this.environments=[],this.matomoConfigs=[],this.idContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&(this.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idContainer="",t.isAdvancedDisplayed=!0,void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idContainer||(t.idContainer=e.idcontainer),t.containerMap[e.idcontainer]=e,t.containerOptions.push({key:e.idcontainer,value:e.name})})),t.onContainerChange()})).finally((function(){t.isLoading=!1})))},onContainerChange:function(){var e=this;if(this.noReleaseFound=!1,this.idContainer){this.installInstructions=[];var t=this.containerMap[this.idContainer],n=t.draft.idcontainerversion;this.environment="",this.environments=[];var a=t.releases||[];a.find((function(e){return"live"===e.environment}))&&(this.environment="live"),a.forEach((function(t){if("preview"!==t.environment){e.environment||(e.environment=t.environment);var n=yb(t.environment);t.environment in e.environmentNameMap&&(n=e.environmentNameMap[t.environment]),e.environments.push({key:t.environment,value:n})}})),this.environments.length||(this.noReleaseFound=!0,this.environments.push({key:"",value:this.translate("TagManager_NoReleasesFound")})),this.$emit("fetchInstallInstructions"),this.fetchVariables(n)}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n})),r="".concat(window.location.pathname,"?").concat(i);return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),r},fetchVariables:function(e){var t,n=this;this.matomoConfigs=[],this.idContainer&&null!==(t=this.site)&&void 0!==t&&t.id&&e&&u["AjaxHelper"].fetch({method:"TagManager.getContainerVariables",filter_limit:"-1",idContainer:this.idContainer,idContainerVersion:e,idSite:this.site.id}).then((function(e){n.matomoConfigs=e.filter((function(e){return"MatomoConfiguration"===e.type}))})).finally((function(){n.isLoading=!1}))}},computed:{getLearnMoreLink:function(){return Object(u["translate"])("TagManager_CustomHtmlTagHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")},getMtmStep3:function(){return Object(u["translate"])("TagManager_CopyCodePasteInHeader","</head>")},getCongratulationsText:function(){return Object(u["translate"])("TagManager_SiteWithoutDataReactFollowStepCompleted","","")},testComponent:function(){return this.showTestSection?Object(u["useExternalPluginComponent"])("JsTrackerInstallCheck","JsTrackerInstallCheck"):""},getAdvancedStepText:function(){var e,t=Object(u["translate"])("TagManager_SelectContainerForWebsite","","");if(this.idContainer)return t;var n=this.linkTo("manageContainers",String(null===(e=this.site)||void 0===e?void 0:e.id),""),a=Object(u["translate"])("TagManager_ManageContainersLink",''),"");return"".concat(t," ").concat(a)},getAdvancedStepInfo:function(){var e=this.site&&this.site.id?this.site.id:"",t=this.linkTo("dashboard",e,this.idContainer,[]);return Object(u["translate"])("TagManager_CustomiseContainer",''),"",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")}}});Vb.render=Tb;var Cb=Vb,Nb=Object(r["createElementVNode"])("br",null,null,-1),Eb={class:"followStepsHeading"},Sb={style:{"list-style":"inside decimal"}};function wb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon");return Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])("getTrackingMethodsForSite"===e.currentAction?"div":"ContentBlock"),{anchor:"tagmanager","content-title":e.translate("TagManager_MatomoTagManager")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_MtmTrackingCodeIntro")),1),Nb,Object(r["createElementVNode"])("p",Eb,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(r["createElementVNode"])("ol",Sb,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!0,showDescription:!1,showPlainMtmSteps:!0,showAdvancedOptions:"trackingCodeGenerator"===e.currentAction,showTestSection:"getTrackingMethodsForSite"===e.currentAction&&e.isJsTrackerInstallCheckAvailable,onFetchInstallInstructions:e.fetchInstallInstructions,ref:"trackingCodeCommon"},null,8,["show-container-row","showAdvancedOptions","showTestSection","onFetchInstallInstructions"])])]})),_:1},8,["content-title"])}var kb=Object(r["defineComponent"])({props:{currentAction:String,showContainerRow:Boolean,isJsTrackerInstallCheckAvailable:Boolean},components:{ContentBlock:u["ContentBlock"],TrackingCodeCommon:Cb},methods:{fetchInstallInstructions:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;a.installInstructions=[],null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id&&null!==a&&void 0!==a&&a.environment&&(a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id}).then((function(e){a.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1})))}}});kb.render=wb;var Mb=kb,_b={class:"list-style-decimal"},Db={ref:"step1"},Ab=["innerHTML"],xb=["innerHTML"],Bb=["textContent"],Lb=["innerHTML"],Ub=["textContent"],Pb=["innerHTML"],Ib=["innerHTML"],Fb=["innerHTML"],Hb=["textContent"],Gb={style:{"list-style":"lower-alpha","list-style-position":"inside"}},$b=["innerHTML"],Rb=["innerHTML"],qb=["innerHTML"],zb=["textContent"],Wb=["textContent"],Xb=["innerHTML"],Kb=["textContent"],Jb=["innerHTML"],Yb=["innerHTML"],Zb=["textContent"];function Qb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon"),c=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("ol",_b,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",Db,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!1,showDescription:!1,onFetchInstallInstructions:e.fetchInstallInstructionsSPA,ref:"trackingCodeCommon"},null,8,["show-container-row","onFetchInstallInstructions"])],512),[[r["vShow"],e.step1HasContent]]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep2)},null,8,Ab),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep3)},null,8,xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Bb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep5)},null,8,Lb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Ub),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep7)},null,8,Pb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep8)},null,8,Ib),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep9)},null,8,Fb),Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("span",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep10)},null,8,Hb),Object(r["createElementVNode"])("ol",Gb,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10a)},null,8,$b),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10b)},null,8,Rb)])]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep11)},null,8,qb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("General_Update"))},null,8,zb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep13)},null,8,Wb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep14)},null,8,Xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep15)},null,8,Kb),Object(r["createElementVNode"])("li",null,["react"===e.jsFramework?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.fetchFollowStep16React)},null,8,Jb)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:1,innerHTML:e.$sanitize(e.fetchFollowStep16SPA)},null,8,Yb)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:t},[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(e.embedCode),ref:"codeblock"},null,8,Zb),[[c,{}]])])})),128))])])}var em=Object(r["defineComponent"])({props:{showContainerRow:Boolean,jsFramework:String},components:{TrackingCodeCommon:Cb},directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{setupStep1:"",setupStep2:"",setupStep7:"",installInstructions:[]}},methods:{fetchInstallInstructionsSPA:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;if(this.installInstructions=[],null!==a&&void 0!==a&&a.idContainer&&null!==a&&void 0!==a&&a.environment&&null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id){var i=this.linkTo("manageContainers",a.site.id,a.idContainer);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"");var o=this.linkTo("manageTriggers",a.site.id,a.idContainer);this.setupStep2=Object(u["translate"])("TagManager_SPAFollowStep2",''),"");var l=this.linkTo("manageTags",a.site.id,a.idContainer);this.setupStep7=Object(u["translate"])("TagManager_SPAFollowStep7",''),""),a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id,jsFramework:this.jsFramework}).then((function(e){n.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1}))}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(i+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(i)},fetchClickX:function(e){return Object(u["translate"])("General_ClickX",Object(u["translate"])(e))}},computed:{step1HasContent:function(){var e=this.$refs.step1;return e&&""!==e.textContent},fetchFollowStep3:function(){return Object(u["translate"])("TagManager_SPAFollowStep3","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-trigger"),"")},fetchFollowStep5:function(){return Object(u["translate"])("TagManager_SPAFollowStep5","".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),Object(u["translate"])("TagManager_CategoryUserEngagement"))},fetchFollowStep8:function(){return Object(u["translate"])("TagManager_SPAFollowStep8","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),"".concat(Object(u["translate"])("TagManager_MatomoTagName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-tag"),"")},fetchFollowStep9:function(){return Object(u["translate"])("TagManager_SPAFollowStep9",Object(u["translate"])("TagManager_ConfigureWhatTagDoes"),Object(u["translate"])("TagManager_CustomTitle"),"","")},fetchFollowStep10:function(){return Object(u["translate"])("TagManager_SPAFollowStep10",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10a:function(){return Object(u["translate"])("TagManager_SPAFollowStep10a","","",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10b:function(){return Object(u["translate"])("TagManager_SPAFollowStep10b",Object(u["translate"])("TagManager_CustomUrl"),"","")},fetchFollowStep11:function(){return Object(u["translate"])("TagManager_SPAFollowStep11",Object(u["translate"])("TagManager_ConfigureWhenTagDoes"),Object(u["translate"])("TagManager_FireTriggerTitle"),"".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),"".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""))},fetchFollowStep13:function(){return Object(u["translate"])("TagManager_SPAFollowStep13",Object(u["translate"])("TagManager_Publish"))},fetchFollowStep14:function(){return Object(u["translate"])("TagManager_SPAFollowStep14",Object(u["translate"])("TagManager_VersionName"),"","")},fetchFollowStep15:function(){return Object(u["translate"])("TagManager_SPAFollowStep15",Object(u["translate"])("TagManager_CreateVersionAndPublishRelease"))},fetchFollowStep16SPA:function(){return Object(u["translate"])("TagManager_SPAFollowStep16","</head>",Object(u["externalLink"])("https://developer.matomo.org/guides/tagmanager/embedding"),"")},fetchFollowStep16React:function(){return Object(u["translate"])("TagManager_ReactFollowStep16","","","App.js","React.useEffect","Hello World","React.js")}}});em.render=Qb;var tm,nm,am=em,im={class:"nav-wrapper"},rm={class:"pull-right"},om=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-close"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-close"})],-1),lm=[om],cm={class:"pull-right"},sm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("defs",null,[Object(r["createElementVNode"])("symbol",{id:"tm-icon-checkmark",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M27 4l-15 15-7-7-5 5 12 12 20-20z"})])])],-1),dm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("symbol",{id:"tm-icon-close",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M31.33 0.67c0.893 0.893 0.893 2.34 0 3.232l-27.427 27.427c-0.893 0.893-2.34\n 0.893-3.232 0s-0.893-2.34 0-3.232l27.427-27.427c0.892-0.893 2.34-0.893 3.232 0z"}),Object(r["createElementVNode"])("path",{d:"M0.67 0.67c0.893-0.893 2.34-0.893 3.232 0l27.427 27.427c0.893 0.892 0.893\n 2.34 0 3.232s-2.34 0.892-3.232 0l-27.427-27.427c-0.893-0.893-0.893-2.34 0-3.232z"})])],-1),um={class:"page",style:{clear:"both"}},gm={key:0,id:"secondNavBar",class:"Menu--dashboard z-depth-1"},bm={class:"navbar",role:"menu",style:{padding:"0"}},mm={class:"menuTab",role:"menuitem"},pm={class:"item",style:{"font-weight":"normal"}},hm=Object(r["createTextVNode"])(" Events "),fm={key:0},vm=Object(r["createElementVNode"])("br",null,null,-1),jm=Object(r["createElementVNode"])("br",null,null,-1),Om=Object(r["createElementVNode"])("label",{for:"onlyfiredTags",class:"lbl-onlyfiredTags"},"Only fired tags",-1),Tm={key:0,style:{padding:"0 0 1rem 1.2rem"}},ym=["onClick","title"],Vm={title:"This tag was fired"},Cm=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-checkmark"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-checkmark"})],-1),Nm=[Cm],Em={class:"pageWrap"},Sm={class:"home",id:"content"},wm=Object(r["createElementVNode"])("h3",null,"Fired Tags",-1),km={class:"entityTable"},Mm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Action"),Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Fired count")])],-1),_m={key:0},Dm=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Am=[Dm],xm=Object(r["createElementVNode"])("h3",{style:{"margin-top":"30px"}},"Not Yet Fired Tags",-1),Bm={class:"entityTable"},Lm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Um=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Pm=[Um],Im=Object(r["createElementVNode"])("h3",null,"Triggers",-1),Fm={class:"entityTable"},Hm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Gm={key:0},$m=Object(r["createElementVNode"])("td",{colspan:"4"},"No trigger",-1),Rm=[$m],qm={key:1},zm=Object(r["createElementVNode"])("h3",null,"Pushed data by this event",-1),Wm={class:"entityTable"},Xm={style:{"word-break":"break-all"}},Km=Object(r["createElementVNode"])("br",null,null,-1),Jm=Object(r["createElementVNode"])("h3",null,"Content after this event",-1),Ym={class:"entityTable"},Zm={style:{"word-break":"break-all"}},Qm={class:"entityTable"},ep=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Value")])],-1),tp={key:0},np=Object(r["createElementVNode"])("td",{colspan:"3"},"No variables",-1),ap=[np],ip={style:{"word-break":"break-all"}},rp={class:"entityTable"},op=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Time"),Object(r["createElementVNode"])("th",null,"Message")])],-1),lp={style:{"word-break":"break-all"}},cp=Object(r["createElementVNode"])("br",null,null,-1);function sp(e,t,n,a,i,o){var l,c,s,d,u,g,b,m,p,h;return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("nav",null,[Object(r["createElementVNode"])("div",im,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,[Object(r["renderSlot"])(e.$slots,"logo")]),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"tags"===e.contentTab||!e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(t){return e.contentTab="tags"})},"Tags")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"triggers"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[1]||(t[1]=function(t){return e.contentTab="triggers"})},"Triggers")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"variables"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[2]||(t[2]=function(t){return e.contentTab="variables"})},"Variables")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"dataLayer"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[3]||(t[3]=function(t){return e.contentTab="dataLayer"})},"Data Layer")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"logs"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.contentTab="logs"})},"Logs")],2),Object(r["createElementVNode"])("li",rm,[Object(r["createElementVNode"])("a",{id:"mtmCloseDebug",onClick:t[5]||(t[5]=function(t){return e.mtmCloseDebugWindow()})},lm)]),Object(r["createElementVNode"])("li",cm,[Object(r["createElementVNode"])("a",{id:"mtmUpdateDebugPosition",onClick:t[6]||(t[6]=function(t){return e.mtmUpdateDebugPosition()})},Object(r["toDisplayString"])(e.positionText),1)])])])]),sm,dm,Object(r["createElementVNode"])("div",um,["logs"!==e.contentTab?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gm,[Object(r["createElementVNode"])("ul",bm,[Object(r["createElementVNode"])("li",mm,[Object(r["createElementVNode"])("span",pm,[hm,e.mtmEvents.length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",fm,[vm,jm,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{type:"checkbox",class:"onlyFiredTags-chk",name:"onlyfiredTags",id:"onlyfiredTags",value:"1","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.onlyfiredTags=t}),style:{"margin-right":"3.5px"}},null,512),[[r["vModelCheckbox"],e.onlyfiredTags]]),Om])):Object(r["createCommentVNode"])("",!0)])]),0===e.mtmEvents.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Tm,"No event executed")):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmEventsReversed,(function(t,n){var a,i;return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["menuTab",{active:n===e.selectedEventIndex}]),role:"menuitem",key:n},[(t.tags||[]).length||!e.onlyfiredTags?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,class:"item",onClick:function(n){return e.selectEvent(t.index0)},title:"Time: ".concat(t.time,". Trigger: ").concat(null===(a=t.metTrigger)||void 0===a?void 0:a.name)},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.index)+": "+Object(r["toDisplayString"])(t.name)+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Vm,Nm,512),[[r["vShow"],null===(i=t.tags)||void 0===i?void 0:i.length]])],8,ym)):Object(r["createCommentVNode"])("",!0)],2)})),128))])])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",Em,[Object(r["createElementVNode"])("div",Sm,[Object(r["withDirectives"])(Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.homeTabTitle),513),[[r["vShow"],"logs"!==e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[wm,Object(r["createElementVNode"])("table",km,[Mm,Object(r["createElementVNode"])("tbody",null,[null!==(l=e.selectedEvent)&&void 0!==l&&null!==(c=l.tags)&&void 0!==c&&c.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",_m,Am)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(s=e.selectedEvent)||void 0===s?void 0:s.tags)||[],(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.action),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.numExecuted),1)])})),128))])]),xm,Object(r["createElementVNode"])("table",Bm,[Lm,Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,Pm,512),[[r["vShow"],0===e.notFiredTags.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.notFiredTags,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1)])})),128))])])],512),[[r["vShow"],"tags"===e.contentTab||!e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Im,Object(r["createElementVNode"])("table",Fm,[Hm,Object(r["createElementVNode"])("tbody",null,[null!==(d=e.selectedEvent)&&void 0!==d&&d.metTrigger?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Gm,Rm)),null!==(u=e.selectedEvent)&&void 0!==u&&u.metTrigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",qm,[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.type),1)])):Object(r["createCommentVNode"])("",!0)])])],512),[[r["vShow"],"triggers"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[zm,Object(r["createElementVNode"])("table",Wm,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Xm,Object(r["toDisplayString"])(e.selectedEventData),1)])])]),Km,Jm,Object(r["createElementVNode"])("table",Ym,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Zm,Object(r["toDisplayString"])(e.selectedEventContainerDataLayer),1)])])])],512),[[r["vShow"],"dataLayer"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",Qm,[ep,Object(r["createElementVNode"])("tbody",null,[null!==(g=e.selectedEvent)&&void 0!==g&&null!==(b=g.container)&&void 0!==b&&null!==(m=b.variables)&&void 0!==m&&m.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",tp,ap)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(p=e.selectedEvent)||void 0===p||null===(h=p.container)||void 0===h?void 0:h.variables)||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.type),1),Object(r["createElementVNode"])("td",ip,Object(r["toDisplayString"])(e.stringifySelectedVariable(t)),1)])})),128))])])],512),[[r["vShow"],"variables"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",rp,[op,Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmLogs,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.time),1),Object(r["createElementVNode"])("td",lp,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.messages,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:t},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e),1),cp])})),128))])])})),128))])])],512),[[r["vShow"],"logs"===e.contentTab]])])])])])}function dp(e){return mp(e)||bp(e)||gp(e)||up()}function up(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gp(e,t){if(e){if("string"===typeof e)return pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pp(e,t):void 0}}function bp(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function mp(e){if(Array.isArray(e))return pp(e)}function pp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt||n.push.apply(n,dp(e.tags.map((function(e){return e.name}))))}));var a=[];return this.selectedEvent.container.tags.forEach((function(e){-1===n.indexOf(e.name)&&a.push(e)})),a},selectedEvent:function(){return this.mtmEvents[this.selectedEventIndex]},mtmEvents:function(){return window.mtmDbgData.mtmEvents},mtmEventsReversed:function(){var e=dp(this.mtmEvents);return e.reverse(),e},mtmLogs:function(){return window.mtmDbgData.mtmLogs},selectedEventData:function(){var e;return(null===(e=this.selectedEvent)||void 0===e?void 0:e.eventData)&&JSON.stringify(this.selectedEvent.eventData,Op())},selectedEventContainerDataLayer:function(){var e,t;return(null===(e=this.selectedEvent)||void 0===e||null===(t=e.container)||void 0===t?void 0:t.dataLayer)&&JSON.stringify(this.selectedEvent.container.dataLayer,Op())}}});Tp.render=sp;var yp=Tp,Vp={class:"copyMtmObjectDialog"},Cp=["innerHTML"];function Np(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveDirective"])("form");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vp,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.getCopyDialogTitle),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.getCopyDescription),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"site",name:"destinationSite",title:e.translate("TagManager_ChooseWebsite"),modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t})},null,8,["title","modelValue"]),"container"!==e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:0,uicontrol:"select",name:"idDestinationContainer",options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container"),modelValue:e.idDestinationContainer,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.idDestinationContainer=t})},null,8,["options","disabled","title","modelValue"])):Object(r["createCommentVNode"])("",!0),"container"===e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:1,class:"copyNote",innerHTML:e.$sanitize(e.getCopyContainerNote)},null,8,Cp)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("button",{class:"btn",onClick:t[2]||(t[2]=function(){return e.performCopy&&e.performCopy.apply(e,arguments)})},Object(r["toDisplayString"])(e.translate("General_Copy")),1)],512),[[c]])])}var Ep=Object(r["defineComponent"])({props:{defaultSite:{type:Object,required:!0},copyType:{type:String,required:!0},copyNonce:{type:String,required:!1,default:""},idToCopy:{type:[String,Number],required:!0},idSourceContainer:{type:String,required:!1,default:""},idContainerVersion:{type:Number,required:!1,default:0}},directives:{Form:g["Form"]},components:{Field:g["Field"]},data:function(){return{site:this.defaultSite,idDestinationContainer:"",containerOptions:[]}},created:function(){this.onSiteChange(),this.idDestinationContainer=this.idSourceContainer},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;"container"!==this.copyType.toLowerCase()&&(this.containerOptions=[],this.idDestinationContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idDestinationContainer="",void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idDestinationContainer||(t.idDestinationContainer=e.idcontainer),t.containerOptions.push({key:e.idcontainer,value:e.name})}))})))},performCopy:function(){var e,t=this,n={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":n.action="copyContainer",n.idContainer=this.idToCopy;break;case"tag":n.action="copyTag",n.idTag=this.idToCopy;break;case"trigger":n.action="copyTrigger",n.idTrigger=this.idToCopy;break;case"variable":n.action="copyVariable",n.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}this.idDestinationContainer&&(n.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(n.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(n.idContainerVersion=this.idContainerVersion),u["AjaxHelper"].fetch(n).then((function(e){if(!e||!e.isSuccess||!e.urlToNewCopy){var n=Object(u["translate"])("General_ErrorRequest","",""),a=u["NotificationsStore"].show({message:n,id:"CopyDialogResultNotification",context:"error",type:"transient"});return u["NotificationsStore"].scrollToNotification(a),void window.Piwik_Popover.close()}t.reloadEntityStore(),t.displaySuccessNotification(e.urlToNewCopy),window.Piwik_Popover.close()}))},reloadEntityStore:function(){switch(this.copyType.toLowerCase()){case"container":ud.reload();break;case"tag":mo.reload(this.idSourceContainer,this.idContainerVersion);break;case"trigger":ya.reload(this.idSourceContainer,this.idContainerVersion);break;case"variable":ft.reload(this.idSourceContainer,this.idContainerVersion);break;default:throw Error("Unrecognised copy object type.")}},displaySuccessNotification:function(e){var t="TagManager_CopyXSuccess",n="";switch(this.copyType.toLowerCase()){case"container":n="TagManager_ContainerLowercase";break;case"tag":n="TagManager_TagLowercase";break;case"trigger":n="TagManager_TriggerLowercase";break;case"variable":n="TagManager_VariableLowercase";break;default:throw Error("Unrecognised copy object type.")}var a=Object(u["translate"])(t,[''),Object(u["translate"])(n),""]),i=u["NotificationsStore"].show({message:a,id:"CopyDialogResultNotification",context:"success",type:"transient"});u["NotificationsStore"].scrollToNotification(i)}},computed:{getCopyDialogTitle:function(){var e="";switch(this.copyType.toLowerCase()){case"container":e=Object(u["translate"])("TagManager_Container");break;case"tag":e=Object(u["translate"])("TagManager_Tag");break;case"trigger":e=Object(u["translate"])("TagManager_Trigger");break;case"variable":e=Object(u["translate"])("TagManager_Variable");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyX",e)},getCopyDescription:function(){if("container"===this.copyType.toLowerCase())return Object(u["translate"])("TagManager_CopyContainerDescription");var e="";switch(this.copyType.toLowerCase()){case"tag":e=Object(u["translate"])("TagManager_TagLowercase");break;case"trigger":e=Object(u["translate"])("TagManager_TriggerLowercase");break;case"variable":e=Object(u["translate"])("TagManager_VariableLowercase");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyXDescription",e)},getCopyContainerNote:function(){return Object(u["translate"])("TagManager_CopyContainerNote","","")},getCopyUrl:function(){var e,t={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":t.action="copyContainer",t.idContainer=this.idToCopy;break;case"tag":t.action="copyTag",t.idTag=this.idToCopy;break;case"trigger":t.action="copyTrigger",t.idTrigger=this.idToCopy;break;case"variable":t.action="copyVariable",t.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}return this.idDestinationContainer&&(t.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(t.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(t.idContainerVersion=this.idContainerVersion),"?".concat(u["MatomoUrl"].stringify(t))}}});Ep.render=Np;var Sp=Ep; /*! * Matomo - free/libre analytics platform * diff --git a/vue/src/Container/ContainerList.vue b/vue/src/Container/ContainerList.vue index 633c06406..7329760db 100644 --- a/vue/src/Container/ContainerList.vue +++ b/vue/src/Container/ContainerList.vue @@ -150,6 +150,7 @@ import { MatomoUrl, translate, externalLink, + NotificationsStore, } from 'CoreHome'; import AvailableContextsStore from '../AvailableContexts.store'; import ContainersStore from './Containers.store'; @@ -237,6 +238,7 @@ export default defineComponent({ function doDelete() { ContainersStore.deleteContainer(container.idcontainer).then(() => { ContainersStore.reload(); + NotificationsStore.remove('CopyDialogResultNotification'); }); } diff --git a/vue/src/Tag/TagList.vue b/vue/src/Tag/TagList.vue index d9bea5bc4..94c5690e9 100644 --- a/vue/src/Tag/TagList.vue +++ b/vue/src/Tag/TagList.vue @@ -355,6 +355,7 @@ export default defineComponent({ const doDelete = () => { TagsStore.deleteTag(this.idContainer, this.idContainerVersion, tag.idtag).then(() => { TagsStore.reload(this.idContainer, this.idContainerVersion); + NotificationsStore.remove('CopyDialogResultNotification'); }); }; diff --git a/vue/src/Trigger/TriggerList.vue b/vue/src/Trigger/TriggerList.vue index 7dca02ce6..08f542a2c 100644 --- a/vue/src/Trigger/TriggerList.vue +++ b/vue/src/Trigger/TriggerList.vue @@ -179,7 +179,9 @@ import { AjaxHelper, Matomo, ContentBlock, - ContentTable, MatomoUrl, + ContentTable, + MatomoUrl, + NotificationsStore, } from 'CoreHome'; import { Field } from 'CorePluginsAdmin'; import TriggersStore from './Triggers.store'; @@ -249,6 +251,7 @@ export default defineComponent({ trigger.idtrigger!, ).then(() => { TriggersStore.reload(this.idContainer, this.idContainerVersion); + NotificationsStore.remove('CopyDialogResultNotification'); }); }; diff --git a/vue/src/Variable/VariableList.vue b/vue/src/Variable/VariableList.vue index b6d77d8e2..a7c25c7bd 100644 --- a/vue/src/Variable/VariableList.vue +++ b/vue/src/Variable/VariableList.vue @@ -223,6 +223,7 @@ import { ContentTable, Matomo, MatomoUrl, + NotificationsStore, } from 'CoreHome'; import { Field } from 'CorePluginsAdmin'; import VariablesStore from './Variables.store'; @@ -308,6 +309,7 @@ export default defineComponent({ variable.idvariable!, ).then(() => { VariablesStore.reload(this.idContainer, this.idContainerVersion); + NotificationsStore.remove('CopyDialogResultNotification'); }); }, }); From db135103b6fe5adfdc7616528b1a421a9a03f8a1 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Thu, 28 Nov 2024 11:34:24 +1300 Subject: [PATCH 09/10] Added some test cases for hiding the copy notification --- tests/UI/ContainerTag_spec.js | 8 ++++++++ tests/UI/ContainerTrigger_spec.js | 8 ++++++++ tests/UI/ContainerVariable_spec.js | 8 ++++++++ .../ContainerTag_copy_tag_success_hidden.png | 3 +++ .../ContainerTrigger_copy_trigger_success_hidden.png | 3 +++ .../ContainerVariable_copy_variable_success_hidden.png | 3 +++ 6 files changed, 33 insertions(+) create mode 100644 tests/UI/expected-screenshots/ContainerTag_copy_tag_success_hidden.png create mode 100644 tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_success_hidden.png create mode 100644 tests/UI/expected-screenshots/ContainerVariable_copy_variable_success_hidden.png diff --git a/tests/UI/ContainerTag_spec.js b/tests/UI/ContainerTag_spec.js index cd4293d9a..3927467bb 100644 --- a/tests/UI/ContainerTag_spec.js +++ b/tests/UI/ContainerTag_spec.js @@ -579,4 +579,12 @@ describe("ContainerTag", function () { await page.waitForNetworkIdle(); await capture.page(page, 'copy_tag_success'); }); + + it('should hide copy success notification after deleting tag', async function () { + await clickFirstRowTableAction('icon-delete', 4); + await page.waitForNetworkIdle(); + await modal.clickButton(page, 'Yes'); + await page.waitForNetworkIdle(); + await capture.page(page, 'copy_tag_success_hidden'); + }); }); diff --git a/tests/UI/ContainerTrigger_spec.js b/tests/UI/ContainerTrigger_spec.js index 2e8835306..9d8d8305a 100644 --- a/tests/UI/ContainerTrigger_spec.js +++ b/tests/UI/ContainerTrigger_spec.js @@ -302,4 +302,12 @@ describe("ContainerTrigger", function () { await page.waitForNetworkIdle(); await capture.page(page, 'copy_trigger_success'); }); + + it('should hide copy success notification after deleting trigger', async function () { + await clickFirstRowTableAction('icon-delete', 4); + await page.waitForNetworkIdle(); + await modal.clickButton(page, 'Yes'); + await page.waitForNetworkIdle(); + await capture.page(page, 'copy_trigger_success_hidden'); + }); }); diff --git a/tests/UI/ContainerVariable_spec.js b/tests/UI/ContainerVariable_spec.js index c40dbc19c..81e155fad 100644 --- a/tests/UI/ContainerVariable_spec.js +++ b/tests/UI/ContainerVariable_spec.js @@ -309,4 +309,12 @@ describe("ContainerVariable", function () { await page.waitForNetworkIdle(); await capture.page(page, 'copy_variable_success'); }); + + it('should hide copy success notification after deleting variable', async function () { + await clickFirstRowTableAction('icon-delete', 4); + await page.waitForNetworkIdle(); + await modal.clickButton(page, 'Yes'); + await page.waitForNetworkIdle(); + await capture.page(page, 'copy_variable_success_hidden'); + }); }); diff --git a/tests/UI/expected-screenshots/ContainerTag_copy_tag_success_hidden.png b/tests/UI/expected-screenshots/ContainerTag_copy_tag_success_hidden.png new file mode 100644 index 000000000..e56a7b3e5 --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerTag_copy_tag_success_hidden.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fb8c92187c8404fe218d9bd8ff69be05e565002a01a921e161684ddc1b4e5b17 +size 140957 diff --git a/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_success_hidden.png b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_success_hidden.png new file mode 100644 index 000000000..737556fde --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerTrigger_copy_trigger_success_hidden.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f47179155057d9174f90dd422cd3c87aa9e0020991d157612edf767aeceb80d +size 123216 diff --git a/tests/UI/expected-screenshots/ContainerVariable_copy_variable_success_hidden.png b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_success_hidden.png new file mode 100644 index 000000000..2ca7c4722 --- /dev/null +++ b/tests/UI/expected-screenshots/ContainerVariable_copy_variable_success_hidden.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0bb2f727d464cd9417a62f8990b879d255547c5ca2ee8fd4cccb8395a4f73220 +size 442959 From b50b812fb6bb696705478f106cacb6c297350c57 Mon Sep 17 00:00:00 2001 From: Jacob Ransom Date: Thu, 28 Nov 2024 17:30:27 +1300 Subject: [PATCH 10/10] Switch copy container to allow users with the right capabilities --- Controller.php | 8 ++- vue/dist/TagManager.umd.js | 92 ++++++++++++++--------------- vue/dist/TagManager.umd.min.js | 2 +- vue/src/Container/ContainerList.vue | 2 +- 4 files changed, 54 insertions(+), 50 deletions(-) diff --git a/Controller.php b/Controller.php index fef773140..ff0fa15df 100644 --- a/Controller.php +++ b/Controller.php @@ -359,7 +359,9 @@ public function exportContainerVersion() public function copyContainerDialog() { - Piwik::checkUserHasSuperUserAccess(); + $this->checkSitePermission(); + $this->accessValidator->checkWriteCapability($this->idSite); + $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); $idContainer = \Piwik\Request::fromRequest()->getStringParameter('idContainer'); @@ -376,7 +378,9 @@ public function copyContainerDialog() public function copyContainer() { - Piwik::checkUserHasSuperUserAccess(); + $this->checkSitePermission(); + $this->accessValidator->checkWriteCapability($this->idSite); + $this->accessValidator->checkUseCustomTemplatesCapability($this->idSite); Nonce::checkNonce(self::COPY_CONTAINER_NONCE); $request = \Piwik\Request::fromRequest(); diff --git a/vue/dist/TagManager.umd.js b/vue/dist/TagManager.umd.js index d09beca55..12790c64a 100644 --- a/vue/dist/TagManager.umd.js +++ b/vue/dist/TagManager.umd.js @@ -8261,81 +8261,81 @@ var ContainerEditvue_type_script_lang_ts_notificationId = 'containertagmanagemen ContainerEditvue_type_script_lang_ts.render = ContainerEditvue_type_template_id_c6ab6d32_render /* harmony default export */ var ContainerEdit = (ContainerEditvue_type_script_lang_ts); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=template&id=5b5a37b0 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=template&id=628ffa08 -var ContainerListvue_type_template_id_5b5a37b0_hoisted_1 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_1 = { class: "tagManagerManageList tagManagerContainerList" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_2 = ["innerHTML"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_3 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_2 = ["innerHTML"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_3 = { class: "index" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_4 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_4 = { class: "name" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_5 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_5 = { class: "description" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_6 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_6 = { class: "created" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_7 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_7 = { class: "action" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_8 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_8 = { colspan: "5" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_9 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_9 = { class: "loadingPiwik" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { +var ContainerListvue_type_template_id_628ffa08_hoisted_10 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("img", { src: "plugins/Morpheus/images/loading-blue.gif" }, null, -1); -var ContainerListvue_type_template_id_5b5a37b0_hoisted_11 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_11 = { colspan: "5" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_12 = ["id"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_13 = ["title"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_14 = ["title"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_15 = ["title"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_16 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_12 = ["id"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_13 = ["title"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_14 = ["title"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_15 = ["title"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_16 = { class: "created" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_17 = ["href", "title"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_18 = ["onClick", "title"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_19 = ["onClick", "title"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_20 = ["onClick", "title"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_21 = ["onClick", "title"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_22 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_17 = ["href", "title"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_18 = ["onClick", "title"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_19 = ["onClick", "title"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_20 = ["onClick", "title"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_21 = ["onClick", "title"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_22 = { class: "tableActionBar" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_23 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { +var ContainerListvue_type_template_id_628ffa08_hoisted_23 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "icon-add" }, " ", -1); -var ContainerListvue_type_template_id_5b5a37b0_hoisted_24 = { +var ContainerListvue_type_template_id_628ffa08_hoisted_24 = { class: "ui-confirm", id: "confirmDeleteContainer", ref: "confirmDeleteContainer" }; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_25 = ["value"]; -var ContainerListvue_type_template_id_5b5a37b0_hoisted_26 = ["value"]; -function ContainerListvue_type_template_id_5b5a37b0_render(_ctx, _cache, $props, $setup, $data, $options) { +var ContainerListvue_type_template_id_628ffa08_hoisted_25 = ["value"]; +var ContainerListvue_type_template_id_628ffa08_hoisted_26 = ["value"]; +function ContainerListvue_type_template_id_628ffa08_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_ContentBlock = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("ContentBlock"); var _directive_content_table = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("content-table"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ContainerListvue_type_template_id_5b5a37b0_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", ContainerListvue_type_template_id_628ffa08_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_ContentBlock, { feature: "Tag Manager", "content-title": _ctx.translate('TagManager_ManageX', _ctx.translate('TagManager_Containers')) }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", { innerHTML: _ctx.$sanitize(_ctx.getManageContainersIntro) - }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreatedDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_5b5a37b0_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_5b5a37b0_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", ContainerListvue_type_template_id_5b5a37b0_hoisted_9, [ContainerListvue_type_template_id_5b5a37b0_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_5b5a37b0_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoContainersFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_628ffa08_hoisted_2), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("table", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("thead", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_628ffa08_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Id')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_628ffa08_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Name')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_628ffa08_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Description')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_628ffa08_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreatedDate')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("th", ContainerListvue_type_template_id_628ffa08_hoisted_7, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Actions')), 1)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tbody", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_628ffa08_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", ContainerListvue_type_template_id_628ffa08_hoisted_9, [ContainerListvue_type_template_id_628ffa08_hoisted_10, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(" " + Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_LoadingData')), 1)])])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.isLoading || _ctx.isUpdating]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("tr", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_628ffa08_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_NoContainersFound')) + " ", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createContainerNow", onClick: _cache[0] || (_cache[0] = function ($event) { return _ctx.createContainer(); @@ -8348,63 +8348,63 @@ function ContainerListvue_type_template_id_5b5a37b0_render(_ctx, _cache, $props, }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "index", title: "".concat(_ctx.translate('TagManager_Context'), ": ") + _ctx.contexts[container.context] - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(container.idcontainer), 9, ContainerListvue_type_template_id_5b5a37b0_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(container.idcontainer), 9, ContainerListvue_type_template_id_628ffa08_hoisted_13), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "name", title: container.name - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(container.name, 50)), 9, ContainerListvue_type_template_id_5b5a37b0_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(container.name, 50)), 9, ContainerListvue_type_template_id_628ffa08_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: "description", title: container.description - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(container.description, 75)), 9, ContainerListvue_type_template_id_5b5a37b0_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_5b5a37b0_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(container.created_date_pretty), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.truncateText(container.description, 75)), 9, ContainerListvue_type_template_id_628ffa08_hoisted_15), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", ContainerListvue_type_template_id_628ffa08_hoisted_16, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(container.created_date_pretty), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("td", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])(_ctx.getActionClasses) }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-configure", href: '?module=TagManager&action=' + _ctx.containerDefaultAction + '&idContainer=' + container.idcontainer + '&idSite=' + container.idsite + '&period=day&date=yesterday', title: _ctx.translate('TagManager_ConfigureX', _ctx.translate('TagManager_Container')) - }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_17), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_628ffa08_hoisted_17), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action installCode icon-embed", onClick: function onClick($event) { return _ctx.installCode(container.idcontainer); }, title: _ctx.translate('TagManager_InstallCode') - }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_18), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_628ffa08_hoisted_18), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-edit", onClick: function onClick($event) { return _ctx.editContainer(container.idcontainer); }, title: _ctx.translate('TagManager_EditX', _ctx.translate('TagManager_Container')) - }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_19), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_628ffa08_hoisted_19), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-delete", onClick: function onClick($event) { return _ctx.deleteContainer(container); }, title: _ctx.translate('TagManager_DeleteX', _ctx.translate('TagManager_Container')) - }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_20), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_628ffa08_hoisted_20), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "table-action icon-content-copy", onClick: function onClick($event) { return _ctx.openCopyDialog(container); }, title: _ctx.translate('TagManager_CopyX', _ctx.translate('TagManager_Container')) - }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_21), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.canCopyContainer]])], 2)], 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_12); - }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContainerListvue_type_template_id_5b5a37b0_hoisted_22, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ContainerListvue_type_template_id_628ffa08_hoisted_21), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.canCopyContainer]])], 2)], 8, ContainerListvue_type_template_id_628ffa08_hoisted_12); + }), 128))])], 512), [[_directive_content_table]]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContainerListvue_type_template_id_628ffa08_hoisted_22, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "createNewContainer", value: "", onClick: _cache[1] || (_cache[1] = function ($event) { return _ctx.createContainer(); }) - }, [ContainerListvue_type_template_id_5b5a37b0_hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewContainer')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; + }, [ContainerListvue_type_template_id_628ffa08_hoisted_23, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_CreateNewContainer')), 1)])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.hasWriteAccess]])]; }), _: 1 - }, 8, ["content-title"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContainerListvue_type_template_id_5b5a37b0_hoisted_24, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteContainerConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, 8, ["content-title"]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", ContainerListvue_type_template_id_628ffa08_hoisted_24, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('TagManager_DeleteContainerConfirm')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "yes", type: "button", value: _ctx.translate('General_Yes') - }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { + }, null, 8, ContainerListvue_type_template_id_628ffa08_hoisted_25), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("input", { role: "no", type: "button", value: _ctx.translate('General_No') - }, null, 8, ContainerListvue_type_template_id_5b5a37b0_hoisted_26)], 512)]); + }, null, 8, ContainerListvue_type_template_id_628ffa08_hoisted_26)], 512)]); } -// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=template&id=5b5a37b0 +// CONCATENATED MODULE: ./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=template&id=628ffa08 // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Container/ContainerList.vue?vue&type=script&lang=ts function ContainerListvue_type_script_lang_ts_toConsumableArray(arr) { return ContainerListvue_type_script_lang_ts_arrayWithoutHoles(arr) || ContainerListvue_type_script_lang_ts_iterableToArray(arr) || ContainerListvue_type_script_lang_ts_unsupportedIterableToArray(arr) || ContainerListvue_type_script_lang_ts_nonIterableSpread(); } @@ -8485,7 +8485,7 @@ var ContainerListvue_type_script_lang_ts_window = window, return Object(external_CoreHome_["translate"])('TagManager_ManageContainersIntro', linkString, ''); }, canCopyContainer: function canCopyContainer() { - return this.isSuperUser; + return external_CoreHome_["Matomo"].hasUserCapability('tagmanager_write') && external_CoreHome_["Matomo"].hasUserCapability('tagmanager_use_custom_templates'); }, getActionClasses: function getActionClasses() { var copyClass = this.canCopyContainer ? ' hasCopyAction' : ''; @@ -8540,7 +8540,7 @@ var ContainerListvue_type_script_lang_ts_window = window, -ContainerListvue_type_script_lang_ts.render = ContainerListvue_type_template_id_5b5a37b0_render +ContainerListvue_type_script_lang_ts.render = ContainerListvue_type_template_id_628ffa08_render /* harmony default export */ var ContainerList = (ContainerListvue_type_script_lang_ts); // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/TagManager/vue/src/Container/ContainerManage.vue?vue&type=template&id=4b1a4e9a diff --git a/vue/dist/TagManager.umd.min.js b/vue/dist/TagManager.umd.min.js index cc6d13690..fa0c58808 100644 --- a/vue/dist/TagManager.umd.min.js +++ b/vue/dist/TagManager.umd.min.js @@ -58,7 +58,7 @@ * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var dd=function(){function e(){var t=this;od(this,e),sd(this,"privateState",Object(r["reactive"])({containers:[],isLoadingContainers:!1,isLoadingSingle:!1,isUpdating:!1})),sd(this,"state",Object(r["computed"])((function(){return Object(r["readonly"])(t.privateState)}))),sd(this,"isLoading",Object(r["computed"])((function(){var e=t.state.value;return e.isLoadingContainers||e.isLoadingSingle}))),sd(this,"isUpdating",Object(r["computed"])((function(){return t.state.value.isUpdating}))),sd(this,"containers",Object(r["computed"])((function(){return t.state.value.containers}))),sd(this,"fetchPromise",null)}return cd(e,[{key:"reload",value:function(){return this.privateState.containers=[],this.fetchPromise=null,this.fetchContainers()}},{key:"fetchContainers",value:function(){var e=this;return this.privateState.isLoadingContainers=!0,this.privateState.containers=[],this.fetchPromise||(this.fetchPromise=u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1"})),Promise.resolve(this.fetchPromise).then((function(t){return e.privateState.containers=t,e.privateState.isLoadingContainers=!1,e.containers.value})).finally((function(){e.privateState.isLoadingContainers=!1}))}},{key:"findContainer",value:function(e){var t=this,n=this.containers.value.find((function(t){return t.idcontainer===e}));return n?Promise.resolve(n):(this.privateState.isLoadingSingle=!0,u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.getContainer",filter_limit:"-1"}).then((function(e){return t.privateState.containers=[].concat(ed(t.privateState.containers),[e]),Object(r["readonly"])(e)})).finally((function(){t.privateState.isLoadingSingle=!1})))}},{key:"deleteContainer",value:function(e){var t=this;return this.privateState.isUpdating=!0,this.privateState.containers=[],u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.deleteContainer"},{withTokenInUrl:!0}).finally((function(){t.privateState.isUpdating=!1}))}},{key:"createOrUpdateContainer",value:function(e,t){var n=this;return this.privateState.isUpdating=!0,u["AjaxHelper"].post({method:t,idContainer:e.idcontainer},{name:e.name,description:e.description,ignoreGtmDataLayer:e.ignoreGtmDataLayer,activelySyncGtmDataLayer:e.activelySyncGtmDataLayer,isTagFireLimitAllowedInPreviewMode:e.isTagFireLimitAllowedInPreviewMode,context:e.context},{withTokenInUrl:!0}).finally((function(){n.privateState.isUpdating=!1}))}}]),e}(),ud=new dd,gd="containertagmanagement",bd=Object(r["defineComponent"])({props:{idContainer:String},components:{ContentBlock:u["ContentBlock"],Field:g["Field"],SaveButton:g["SaveButton"]},data:function(){return{isDirty:!1,editTitle:"",isUpdatingVersion:!1,container:{}}},created:function(){Qs.init(),Vt.init(),this.initIdContainer()},watch:{idContainer:function(e){null!==e&&this.initIdContainer()}},methods:{removeAnyContainerNotification:function(){u["NotificationsStore"].remove(gd),u["NotificationsStore"].remove("ajaxHelper")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:gd,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},showErrorFieldNotProvidedNotification:function(e){var t=Object(u["translate"])("TagManager_ErrorXNotProvided",[e]);this.showNotification(t,"error")},initIdContainer:function(){var e=this;this.container={},u["Matomo"].helper.lazyScrollToContent(),this.edit&&this.idContainer?(this.editTitle=Object(u["translate"])("TagManager_EditContainer"),ud.findContainer(this.idContainer).then((function(t){t&&(e.container=Object(u["clone"])(t),e.isDirty=!1)}))):this.create&&(this.editTitle=Object(u["translate"])("TagManager_CreateNewContainer"),this.container={idSite:u["Matomo"].idSite,name:"",context:"web",description:"",activelySyncGtmDataLayer:!0},this.isDirty=!1)},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idContainer,u["MatomoUrl"].updateHash(e)},createContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVersion=!0,ud.createOrUpdateContainer(this.container,"TagManager.addContainer").then((function(t){if(e.isUpdatingVersion=!1,t){e.isDirty=!1;var n=t.value;e.showNotification(Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Container")),"success"),u["MatomoUrl"].updateUrl(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"dashboard",idContainer:n}))}})).finally((function(){e.isUpdatingVersion=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdating=!0,ud.createOrUpdateContainer(this.container,"TagManager.updateContainer").then((function(t){t&&(e.isDirty=!1,e.container={},ud.reload().then((function(){e.initIdContainer()})),e.showNotification(Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Container")),"success"))})))},checkRequiredFieldsAreSet:function(){if(!this.container.name){var e=Object(u["translate"])("General_Name");return this.showErrorFieldNotProvidedNotification(e),!1}return!0}},computed:{contexts:function(){return Qs.contextsOptions.value},create:function(){return"0"===this.idContainer},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVersion}}});bd.render=Ws;var md=bd,pd={class:"tagManagerManageList tagManagerContainerList"},hd=["innerHTML"],fd={class:"index"},vd={class:"name"},jd={class:"description"},Od={class:"created"},Td={class:"action"},yd={colspan:"5"},Vd={class:"loadingPiwik"},Cd=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Nd={colspan:"5"},Ed=["id"],Sd=["title"],wd=["title"],kd=["title"],Md={class:"created"},_d=["href","title"],Dd=["onClick","title"],Ad=["onClick","title"],xd=["onClick","title"],Bd=["onClick","title"],Ld={class:"tableActionBar"},Ud=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Pd={class:"ui-confirm",id:"confirmDeleteContainer",ref:"confirmDeleteContainer"},Id=["value"],Fd=["value"];function Hd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContentBlock"),c=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",pd,[Object(r["createVNode"])(l,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Containers"))},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.getManageContainersIntro)},null,8,hd),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fd,Object(r["toDisplayString"])(e.translate("General_Id")),1),Object(r["createElementVNode"])("th",vd,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",jd,Object(r["toDisplayString"])(e.translate("General_Description")),1),Object(r["createElementVNode"])("th",Od,Object(r["toDisplayString"])(e.translate("TagManager_CreatedDate")),1),Object(r["createElementVNode"])("th",Td,Object(r["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",yd,[Object(r["createElementVNode"])("span",Vd,[Cd,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Nd,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerNow",onClick:t[0]||(t[0]=function(t){return e.createContainer()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewContainerNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"container".concat(t.idcontainer),class:"containers",key:t.idcontainer},[Object(r["createElementVNode"])("td",{class:"index",title:"".concat(e.translate("TagManager_Context"),": ")+e.contexts[t.context]},Object(r["toDisplayString"])(t.idcontainer),9,Sd),Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,wd),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,kd),Object(r["createElementVNode"])("td",Md,[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.created_date_pretty),1)]),Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-configure",href:"?module=TagManager&action="+e.containerDefaultAction+"&idContainer="+t.idcontainer+"&idSite="+t.idsite+"&period=day&date=yesterday",title:e.translate("TagManager_ConfigureX",e.translate("TagManager_Container"))},null,8,_d),Object(r["createElementVNode"])("a",{class:"table-action installCode icon-embed",onClick:function(n){return e.installCode(t.idcontainer)},title:e.translate("TagManager_InstallCode")},null,8,Dd),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editContainer(t.idcontainer)},title:e.translate("TagManager_EditX",e.translate("TagManager_Container"))},null,8,Ad),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteContainer(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Container"))},null,8,xd),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Container"))},null,8,Bd),[[r["vShow"],e.canCopyContainer]])],2)],8,Ed)})),128))])],512),[[c]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ld,[Object(r["createElementVNode"])("a",{class:"createNewContainer",value:"",onClick:t[1]||(t[1]=function(t){return e.createContainer()})},[Ud,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewContainer")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title"]),Object(r["createElementVNode"])("div",Pd,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteContainerConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Id),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Fd)],512)])}function Gd(e){return zd(e)||qd(e)||Rd(e)||$d()}function $d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Rd(e,t){if(e){if("string"===typeof e)return Wd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wd(e,t):void 0}}function qd(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function zd(e){if(Array.isArray(e))return Wd(e)}function Wd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.created_date?-1:0})),e},getManageContainersIntro:function(){var e=Object(u["externalLink"])("https://matomo.org/guide/tag-manager/getting-started-with-tag-manager/");return Object(u["translate"])("TagManager_ManageContainersIntro",e,"")},canCopyContainer:function(){return this.isSuperUser},getActionClasses:function(){var e=this.canCopyContainer?" hasCopyAction":"";return"action".concat(e)}},methods:{createContainer:function(){this.editContainer("0")},editContainer:function(e){u["MatomoUrl"].updateHash(Object.assign(Object.assign({},u["MatomoUrl"].hashParsed.value),{},{idContainer:e}))},installCode:function(e){Kd.showInstallCode(e)},deleteContainer:function(e){function t(){ud.deleteContainer(e.idcontainer).then((function(){ud.reload(),u["NotificationsStore"].remove("CopyDialogResultNotification")}))}u["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteContainer,{yes:t})},truncateText:function(e,t){return e.length>t?"".concat(e.substr(0,t-3),"..."):e},openCopyDialog:function(e){var t=u["MatomoUrl"].stringify({module:"TagManager",action:"copyContainerDialog",idSite:e.idsite,idContainer:e.idcontainer});window.Piwik_Popover.createPopupAndLoadUrl(t,"","mtmCopyContainer")}}});Jd.render=Hd;var Yd=Jd,Zd={class:"manageContainer"};function Qd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContainerList"),c=Object(r["resolveComponent"])("ContainerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Zd,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"is-super-user":e.isSuperUser},null,8,["is-super-user"])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer},null,8,["id-container"])],512),[[r["vShow"],e.editMode]])])}var eu=Object(r["defineComponent"])({props:{isSuperUser:{type:Boolean,required:!0}},components:{ContainerList:Yd,ContainerEdit:md},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idContainer}),(function(t){e.onIdContainerParamChange(t)})),u["NotificationsStore"].remove("containertagmanagement"),this.onIdContainerParamChange(u["MatomoUrl"].hashParsed.value.idContainer)},computed:{idContainer:function(){var e=u["MatomoUrl"].hashParsed.value.idContainer;return this.isAddAllowed||""!==e?e:null},editMode:function(){return!!this.idContainer}},methods:{onIdContainerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVersion",t),this.isAddAllowed=!!t.isAllowed}}}});eu.render=Qd;var tu=eu,nu={class:"containerDashboard"},au={key:0},iu={class:"dashboardCreationDate"},ru={key:0},ou=Object(r["createElementVNode"])("br",null,null,-1),lu=["innerHTML"],cu={class:"row",style:{"margin-left":"-0.75rem"}},su={class:"col m6 s12"},du={key:0},uu=["href","title"],gu={key:0},bu=Object(r["createElementVNode"])("hr",null,null,-1),mu=["href"],pu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),hu=["href"],fu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),vu={class:"col m6 s12"},ju={key:0},Ou=["href","title"],Tu=Object(r["createElementVNode"])("hr",null,null,-1),yu=["href"],Vu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Cu=["href"],Nu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Eu={class:"row",style:{"margin-left":"-0.75rem"}},Su={class:"col m6 s12"},wu=["href","title"],ku={key:0},Mu=Object(r["createElementVNode"])("hr",null,null,-1),_u=["href"],Du=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Au=["href"],xu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Bu={class:"col m6 s12"},Lu=["title","href"],Uu={key:0},Pu=Object(r["createElementVNode"])("br",null,null,-1),Iu=["title"],Fu={key:0},Hu=Object(r["createElementVNode"])("hr",null,null,-1),Gu=["href"],$u=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Ru=["href"],qu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1);function zu(e,t,n,a,i,o){var l,c,s=Object(r["resolveComponent"])("ActivityIndicator"),d=Object(r["resolveComponent"])("EnrichedHeadline"),u=Object(r["resolveComponent"])("ContentBlock"),g=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",nu,[Object(r["createVNode"])(s,{loading:e.isLoading},null,8,["loading"]),e.isLoading?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",au,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(d,{"feature-name":"Tag Manager","inline-help":e.dashboardHelpText},{default:Object(r["withCtx"])((function(){var t;return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_ContainerX",null===(t=e.container)||void 0===t?void 0:t.name)),1)]})),_:1},8,["inline-help"])]),Object(r["createElementVNode"])("p",iu,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.containerMetaInformation)+" ",1),null!==(l=e.containerVersion)&&void 0!==l&&l.description?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ru,[ou,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_Description"))+": "+Object(r["toDisplayString"])(null===(c=e.containerVersion)||void 0===c?void 0:c.description),1)])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.containerDashboardDescription)},null,8,lu)],512),[[g]]),Object(r["createElementVNode"])("div",cu,[Object(r["createElementVNode"])("div",su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.tagCount," ").concat(e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.tagCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",du,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainerVersionTags,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTags",{idTag:t.idtag}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,uu),n!==e.sortedContainerVersionTags.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",gu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))])):Object(r["createCommentVNode"])("",!0)]),bu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags")},[pu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTags")),1)],8,mu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags",{idTag:0})},[fu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)],8,hu)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",vu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.triggerCount," ").concat(e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.triggerCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ju,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTriggers",{idTrigger:t.idtrigger}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,Ou),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,", ",512),[[r["vShow"],n!==e.sortedTriggers.length-1]])])})),128))])):Object(r["createCommentVNode"])("",!0)]),Tu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers")},[Vu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTriggers")),1)],8,yu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers",{idTrigger:0})},[Nu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)],8,Cu)]})),_:1},8,["content-title","help-text"])])]),Object(r["createElementVNode"])("div",Eu,[Object(r["createElementVNode"])("div",Su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.variableCount," ").concat(e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageVariables",{idVariable:t.idvariable}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,wu),n!==e.sortedVariables.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ku,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.variableCount]])]),Mu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables")},[Du,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVariables")),1)],8,_u),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables",{idVariable:0})},[xu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)],8,Au)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",Bu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.versionCount," ").concat(e.translate("TagManager_Versions")),"help-text":e.versionsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_LastVersions"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.lastVersions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{title:e.lastVersionLinkTitle(t),href:e.linkTo("manageVersions",{idContainerVersion:t.idcontainerversion})},Object(r["toDisplayString"])(t.name),9,Lu),n!==e.lastVersions.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Uu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.lastVersions.length]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Pu,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_Environments"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.container.releases,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("span",{title:e.releaseTooltip(t)},Object(r["toDisplayString"])(e.ucfirst(t.environment)),9,Iu),n!==e.container.releases.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Fu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.container.releases.length]])]),Hu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions")},[$u,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVersions")),1)],8,Gu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions",{idContainerVersion:0})},[qu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVersion")),1)],8,Ru)]})),_:1},8,["content-title","help-text"])])])]))])}function Wu(e){e.sort((function(e,t){return e.namet.name?1:0}))}var Xu=Object(r["defineComponent"])({props:{idContainer:String,dashboardHelpText:String,tagsHelpText:String,triggersHelpText:String,variablesHelpText:String,versionsHelpText:String},components:{ActivityIndicator:u["ActivityIndicator"],EnrichedHeadline:u["EnrichedHeadline"],ContentBlock:u["ContentBlock"]},directives:{ContentIntro:u["ContentIntro"]},data:function(){return{container:null,containerVersion:null,isLoading:!1}},created:function(){var e=this;Qs.init(),this.isLoading=!0;var t=u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer}).then((function(t){e.container=t})),n=u["AjaxHelper"].fetch({method:"TagManager.exportContainerVersion",idContainer:this.idContainer}).then((function(t){e.containerVersion=t}));Promise.all([t,n]).finally((function(){e.isLoading=!1}))},methods:{linkTo:function(e,t){var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e}));return t&&(n+="#?".concat(u["MatomoUrl"].stringify(t))),"?".concat(n)},lastVersionLinkTitle:function(e){return"Created on ".concat(e.created_date_pretty)+", description: '".concat(e.description,"'")},releaseTooltip:function(e){var t=Object(u["translate"])("TagManager_ReleaseInfo",e.release_login,e.release_date_pretty),n=Object(u["translate"])("TagManager_ReleaseVersionInfo",e.version_name);return"".concat(t," ").concat(n)},ucfirst:function(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}},computed:{lastVersions:function(){var e,t;return null!==(e=this.container)&&void 0!==e&&null!==(t=e.versions)&&void 0!==t&&t.length?this.container.versions.slice(0,5):[]},contexts:function(){var e={};return Qs.contexts.value.forEach((function(t){var n=t.id,a=t.name;e[n]=a})),e},containerMetaInformation:function(){var e;return Object(u["translate"])("TagManager_ContainerIdInformation",(null===(e=this.containerVersion)||void 0===e?void 0:e.idcontainer)||"")},containerDashboardDescription:function(){return Object(u["translate"])("TagManager_ContainerDashboardDescription",'',"")},sortedContainerVersionTags:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.tags)||[];return Wu(t),t},sortedTriggers:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.triggers)||[];return Wu(t),t},sortedVariables:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.variables)||[];return Wu(t),t},tagCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.tags.length},triggerCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.triggers.length},versionCount:function(){var e;return null===(e=this.container)||void 0===e?void 0:e.versions.length},variableCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.variables.length}}});Xu.render=zu;var Ku=Xu,Ju=["title"],Yu={class:"title"},Zu=Object(r["createElementVNode"])("span",{class:"icon icon-chevron-down"}," ",-1),Qu={class:"dropdown positionInViewport"},eg={class:"custom_select_container"},tg={class:"custom_select_ul_list"},ng=["title"],ag=["href"];function ig(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ActivityIndicator"),c=Object(r["resolveDirective"])("focus-anywhere-but-here");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])(["tagContainerSelector piwikSelector borderedControl",{expanded:e.showContainerList}]),onClick:t[1]||(t[1]=function(t){e.fetchContainers(),e.showContainerList=!e.showContainerList}),title:e.translate("TagManager_ChooseContainer")},[Object(r["createElementVNode"])("a",Yu,[Zu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.truncateText(e.actualContainerName,50)),1)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Qu,[Object(r["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(r["createElementVNode"])("div",eg,[Object(r["createElementVNode"])("ul",tg,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("a",{tabindex:"-1",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(){}),["prevent","stop"]))},Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound")),1)],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{title:"".concat(t.name," (").concat(t.idcontainer,")"),key:t.idcontainer},[Object(r["createElementVNode"])("a",{href:e.linkTo(t.idcontainer)},Object(r["toDisplayString"])(t.name)+" ("+Object(r["toDisplayString"])(t.idcontainer)+") ",9,ag)],8,ng)})),128))])])],512),[[r["vShow"],e.showContainerList]])],10,Ju)),[[c,{blur:e.onBlur}]])}var rg=window,og=rg.tagManagerHelper,lg=Object(r["defineComponent"])({props:{containerName:String},components:{ActivityIndicator:u["ActivityIndicator"]},directives:{FocusAnywhereButHere:u["FocusAnywhereButHere"]},data:function(){return{containers:[],isLoading:!1,showContainerList:!1}},created:function(){setTimeout((function(){window.initTopControls()}))},methods:{fetchContainers:function(){var e=this;this.isLoading=!0,this.containers=[],u["AjaxHelper"].fetch({method:"TagManager.getContainers"}).then((function(t){e.containers=t})).finally((function(){e.isLoading=!1}))},linkTo:function(e){var t=u["MatomoUrl"].urlParsed.value.action;t&&"manageContainers"!==t||(t=this.hasWriteAccess?"dashboard":"manageTags");var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{idContainer:e,action:t}));return"".concat(window.location.pathname,"?").concat(n)},onBlur:function(){this.showContainerList=!1},truncateText:function(e,t){return og.truncateText(e,t)}},computed:{actualContainerName:function(){return this.containerName?Object(u["translate"])("TagManager_ContainerX",this.containerName):Object(u["translate"])("TagManager_ChooseContainer")},hasWriteAccess:function(){return u["Matomo"].hasUserCapability("tagmanager_write")}}});lg.render=ig;var cg=lg,sg={style:{"margin-left":"-0.75rem"}},dg=Object(r["createElementVNode"])("br",null,null,-1),ug=["href"],gg=["textContent"],bg={style:{"margin-top":"1rem"}},mg=["innerHTML"],pg=Object(r["createElementVNode"])("br",null,null,-1),hg=["href"],fg={class:"environment"},vg={class:"name"},jg={class:"name"},Og={class:"released_by"},Tg={class:"released_on"},yg={key:0},Vg={colspan:"7"},Cg={class:"loadingPiwik"},Ng=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Eg={key:1},Sg={colspan:"7"},wg={class:"environment"},kg={class:"name"},Mg={class:"revision"},_g={class:"released_by"},Dg={class:"released_on"},Ag={class:"date"};function xg(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveDirective"])("copy-to-clipboard"),u=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createBlock"])(s,{class:"manageInstallTagCode",feature:"Tag Manager","content-title":"Install Code"},{default:Object(r["withCtx"])((function(){var n,a;return[Object(r["createElementVNode"])("div",sg,[Object(r["createVNode"])(l,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.environment=t,e.fetchInstallInstructions(e.environment)}),options:e.environments,title:e.translate("TagManager_Environment")},null,8,["model-value","options","title"])]),Object(r["createVNode"])(c,{loading:e.isLoading},null,8,["loading"]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n},[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),dg,t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,ug)):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",null,[t.embedCode?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("pre",{key:0,textContent:Object(r["toDisplayString"])(t.embedCode)},null,8,gg)),[[d,{}]]):Object(r["createCommentVNode"])("",!0)])])})),128)),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_InstallCodePublishEnvironmentNote","preview"))+" "+Object(r["toDisplayString"])(e.translate("TagManager_ConfigureEnvironmentsSuperUser")),1),Object(r["createElementVNode"])("p",bg,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_InstallCodeDataLayerNote","",""))},null,8,mg),pg,Object(r["createElementVNode"])("a",{target:"_blank",href:e.externalRawLink("https://matomo.org/faq/tag-manager/data-layer-in-matomo-tag-manager/")},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,hg)]),Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_ReleasesOverview")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fg,Object(r["toDisplayString"])(e.translate("TagManager_Environment")),1),Object(r["createElementVNode"])("th",vg,Object(r["toDisplayString"])(e.translate("TagManager_VersionName")),1),Object(r["createElementVNode"])("th",jg,Object(r["toDisplayString"])(e.translate("TagManager_VersionRevision")),1),Object(r["createElementVNode"])("th",Og,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedBy")),1),Object(r["createElementVNode"])("th",Tg,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedOn")),1)])]),Object(r["createElementVNode"])("tbody",null,[e.isLoading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",yg,[Object(r["createElementVNode"])("td",Vg,[Object(r["createElementVNode"])("span",Cg,[Ng,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])])):Object(r["createCommentVNode"])("",!0),e.isLoading||0!==(null===(n=e.container)||void 0===n||null===(a=n.releases)||void 0===a?void 0:a.length)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Eg,[Object(r["createElementVNode"])("td",Sg,Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFound")),1)])),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedReleases,(function(t){var n,a;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t.idcontainerrelease},[Object(r["createElementVNode"])("td",wg,Object(r["toDisplayString"])(e.ucfirst(t.environment)),1),Object(r["createElementVNode"])("td",kg,Object(r["toDisplayString"])(null===(n=e.releaseVersions[t.idcontainerrelease])||void 0===n?void 0:n.name),1),Object(r["createElementVNode"])("td",Mg,Object(r["toDisplayString"])(null===(a=e.releaseVersions[t.idcontainerrelease])||void 0===a?void 0:a.revision),1),Object(r["createElementVNode"])("td",_g,Object(r["toDisplayString"])(t.release_login),1),Object(r["createElementVNode"])("td",Dg,[Object(r["createElementVNode"])("span",Ag,Object(r["toDisplayString"])(t.release_date_pretty),1)])])})),128))])],512),[[u]])]})),_:1})}function Bg(e){return Pg(e)||Ug(e)||Hg(e)||Lg()}function Lg(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ug(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Pg(e){if(Array.isArray(e))return Gg(e)}function Ig(e,t){return Rg(e)||$g(e,t)||Hg(e,t)||Fg()}function Fg(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hg(e,t){if(e){if("string"===typeof e)return Gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gg(e,t):void 0}}function Gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.release_date?-1:t.index-e.index})),t}}});Wg.render=xg;var Xg=Wg,Kg={class:"tagManagerTrackingCode"},Jg={key:0},Yg={class:"trackingCodeAdvancedOptions"},Zg={class:"advance-option"},Qg=Object(r["createElementVNode"])("span",{class:"icon-chevron-down"},null,-1),eb=Object(r["createElementVNode"])("span",{class:"icon-chevron-up"},null,-1),tb={id:"mtm-advanced-options"},nb=["innerHTML"],ab={key:1,class:"row"},ib={class:"col s12 m4 "},rb={class:"form-group row"},ob={class:"col s12 input-field"},lb={for:"tagManagerTrackingCodeSite",class:"siteSelectorLabel"},cb={class:"sites_autocomplete"},sb={class:"col s12 m4"},db={class:"col s12 m4"},ub=["innerHTML"],gb={key:1,class:"alert alert-info"},bb={href:""},mb={key:0},pb=["href"],hb=Object(r["createTextVNode"])(". "),fb=["innerHTML"],vb=["textContent"],jb=["innerHTML"],Ob={key:1};function Tb(e,t,n,a,i,o){var l=this,c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("SiteSelector"),d=Object(r["resolveComponent"])("Field"),u=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Kg,[e.showContainerRow?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Jg,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_OptionallyCustomiseContainer"))+" ",1),Object(r["createElementVNode"])("div",Yg,[Object(r["createElementVNode"])("div",Zg,[Object(r["createElementVNode"])("span",null,[e.isAdvancedDisplayed?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,href:"javascript:;",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!0}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_ShowAdvancedOptions"))+" ",1),Qg])),e.isAdvancedDisplayed?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:1,href:"javascript:;",onClick:t[1]||(t[1]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!1}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_HideAdvancedOptions"))+" ",1),eb])):Object(r["createCommentVNode"])("",!0)])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",tb,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.getAdvancedStepText)},null,8,nb),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,loading:!0},null,512)),[[r["vShow"],e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ab,[Object(r["createElementVNode"])("div",ib,[Object(r["createElementVNode"])("div",rb,[Object(r["createElementVNode"])("div",ob,[Object(r["createElementVNode"])("label",lb,Object(r["toDisplayString"])(e.translate("General_Website")),1),Object(r["createElementVNode"])("div",cb,[Object(r["createVNode"])(s,{id:"tagManagerTrackingCodeSite",modelValue:e.site,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.site=t}),"show-all-sites-item":!1,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(r["createElementVNode"])("div",sb,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"containers","model-value":e.idContainer,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.idContainer=t,e.onContainerChange()}),options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container")},null,8,["model-value","options","disabled","title"])])]),Object(r["createElementVNode"])("div",db,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.environment=t,l.$emit("fetchInstallInstructions")}),options:e.environments,disabled:e.environments.length<=1,"full-width":!0,title:e.translate("TagManager_Environment")},null,8,["model-value","options","disabled","title"])])])],512)),[[r["vShow"],!e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.getAdvancedStepInfo)},null,8,ub)):Object(r["createCommentVNode"])("",!0)])],512),[[r["vShow"],e.isAdvancedDisplayed]])])])):Object(r["createCommentVNode"])("",!0),e.idContainer&&e.noReleaseFound?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFoundForContainer"))+" ",1),Object(r["createElementVNode"])("a",bb,Object(r["toDisplayString"])(e.translate("TagManager_PublishVersionToEnvironmentToViewEmbedCode")),1)])):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:n},[e.showDescription?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",mb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,pb)):Object(r["createCommentVNode"])("",!0),hb])):Object(r["createCommentVNode"])("",!0),e.showPlainMtmSteps?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.getMtmStep3)},null,8,fb)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,vb),[[u,{}]])])],64)})),128)),e.showBottom&&!e.noReleaseFound&&e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:2},[e.showTestSection?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Ob,[(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e.testComponent),{site:e.site},null,8,["site"]))])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.getCongratulationsText)},null,8,jb))],64)):Object(r["createCommentVNode"])("",!0)])}function yb(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}var Vb=Object(r["defineComponent"])({props:{showContainerRow:Boolean,showBottom:Boolean,showDescription:Boolean,showPlainMtmSteps:Boolean,showTestSection:Boolean,showAdvancedOptions:{required:!1,type:Boolean,default:!1}},components:{ActivityIndicator:u["ActivityIndicator"],SiteSelector:u["SiteSelector"],Field:g["Field"]},emits:["fetchInstallInstructions"],directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{containerVariables:[],isLoading:!1,idContainer:"",environment:"",environments:[],environmentNameMap:{},containerMap:{},containerOptions:[],site:{id:u["Matomo"].idSite,name:u["Matomo"].helper.htmlDecode(u["Matomo"].siteName)},matomoConfigs:[],releases:[],installInstructions:[],noReleaseFound:!1,isAdvancedDisplayed:!1}},created:function(){var e=this;u["AjaxHelper"].fetch({method:"TagManager.getAvailableEnvironments",filter_limit:"-1"}).then((function(t){var n;n=Array.isArray(t)?t:Object.values(t),e.environmentNameMap=Object.fromEntries(n.map((function(e){var t=e.id,n=e.name;return[t,n]})))})),this.onSiteChange(),this.isAdvancedDisplayed=this.showAdvancedOptions},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;this.installInstructions=[],this.containerOptions=[],this.containerMap={},this.environments=[],this.matomoConfigs=[],this.idContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&(this.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idContainer="",t.isAdvancedDisplayed=!0,void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idContainer||(t.idContainer=e.idcontainer),t.containerMap[e.idcontainer]=e,t.containerOptions.push({key:e.idcontainer,value:e.name})})),t.onContainerChange()})).finally((function(){t.isLoading=!1})))},onContainerChange:function(){var e=this;if(this.noReleaseFound=!1,this.idContainer){this.installInstructions=[];var t=this.containerMap[this.idContainer],n=t.draft.idcontainerversion;this.environment="",this.environments=[];var a=t.releases||[];a.find((function(e){return"live"===e.environment}))&&(this.environment="live"),a.forEach((function(t){if("preview"!==t.environment){e.environment||(e.environment=t.environment);var n=yb(t.environment);t.environment in e.environmentNameMap&&(n=e.environmentNameMap[t.environment]),e.environments.push({key:t.environment,value:n})}})),this.environments.length||(this.noReleaseFound=!0,this.environments.push({key:"",value:this.translate("TagManager_NoReleasesFound")})),this.$emit("fetchInstallInstructions"),this.fetchVariables(n)}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n})),r="".concat(window.location.pathname,"?").concat(i);return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),r},fetchVariables:function(e){var t,n=this;this.matomoConfigs=[],this.idContainer&&null!==(t=this.site)&&void 0!==t&&t.id&&e&&u["AjaxHelper"].fetch({method:"TagManager.getContainerVariables",filter_limit:"-1",idContainer:this.idContainer,idContainerVersion:e,idSite:this.site.id}).then((function(e){n.matomoConfigs=e.filter((function(e){return"MatomoConfiguration"===e.type}))})).finally((function(){n.isLoading=!1}))}},computed:{getLearnMoreLink:function(){return Object(u["translate"])("TagManager_CustomHtmlTagHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")},getMtmStep3:function(){return Object(u["translate"])("TagManager_CopyCodePasteInHeader","</head>")},getCongratulationsText:function(){return Object(u["translate"])("TagManager_SiteWithoutDataReactFollowStepCompleted","","")},testComponent:function(){return this.showTestSection?Object(u["useExternalPluginComponent"])("JsTrackerInstallCheck","JsTrackerInstallCheck"):""},getAdvancedStepText:function(){var e,t=Object(u["translate"])("TagManager_SelectContainerForWebsite","","");if(this.idContainer)return t;var n=this.linkTo("manageContainers",String(null===(e=this.site)||void 0===e?void 0:e.id),""),a=Object(u["translate"])("TagManager_ManageContainersLink",''),"");return"".concat(t," ").concat(a)},getAdvancedStepInfo:function(){var e=this.site&&this.site.id?this.site.id:"",t=this.linkTo("dashboard",e,this.idContainer,[]);return Object(u["translate"])("TagManager_CustomiseContainer",''),"",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")}}});Vb.render=Tb;var Cb=Vb,Nb=Object(r["createElementVNode"])("br",null,null,-1),Eb={class:"followStepsHeading"},Sb={style:{"list-style":"inside decimal"}};function wb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon");return Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])("getTrackingMethodsForSite"===e.currentAction?"div":"ContentBlock"),{anchor:"tagmanager","content-title":e.translate("TagManager_MatomoTagManager")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_MtmTrackingCodeIntro")),1),Nb,Object(r["createElementVNode"])("p",Eb,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(r["createElementVNode"])("ol",Sb,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!0,showDescription:!1,showPlainMtmSteps:!0,showAdvancedOptions:"trackingCodeGenerator"===e.currentAction,showTestSection:"getTrackingMethodsForSite"===e.currentAction&&e.isJsTrackerInstallCheckAvailable,onFetchInstallInstructions:e.fetchInstallInstructions,ref:"trackingCodeCommon"},null,8,["show-container-row","showAdvancedOptions","showTestSection","onFetchInstallInstructions"])])]})),_:1},8,["content-title"])}var kb=Object(r["defineComponent"])({props:{currentAction:String,showContainerRow:Boolean,isJsTrackerInstallCheckAvailable:Boolean},components:{ContentBlock:u["ContentBlock"],TrackingCodeCommon:Cb},methods:{fetchInstallInstructions:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;a.installInstructions=[],null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id&&null!==a&&void 0!==a&&a.environment&&(a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id}).then((function(e){a.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1})))}}});kb.render=wb;var Mb=kb,_b={class:"list-style-decimal"},Db={ref:"step1"},Ab=["innerHTML"],xb=["innerHTML"],Bb=["textContent"],Lb=["innerHTML"],Ub=["textContent"],Pb=["innerHTML"],Ib=["innerHTML"],Fb=["innerHTML"],Hb=["textContent"],Gb={style:{"list-style":"lower-alpha","list-style-position":"inside"}},$b=["innerHTML"],Rb=["innerHTML"],qb=["innerHTML"],zb=["textContent"],Wb=["textContent"],Xb=["innerHTML"],Kb=["textContent"],Jb=["innerHTML"],Yb=["innerHTML"],Zb=["textContent"];function Qb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon"),c=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("ol",_b,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",Db,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!1,showDescription:!1,onFetchInstallInstructions:e.fetchInstallInstructionsSPA,ref:"trackingCodeCommon"},null,8,["show-container-row","onFetchInstallInstructions"])],512),[[r["vShow"],e.step1HasContent]]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep2)},null,8,Ab),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep3)},null,8,xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Bb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep5)},null,8,Lb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Ub),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep7)},null,8,Pb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep8)},null,8,Ib),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep9)},null,8,Fb),Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("span",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep10)},null,8,Hb),Object(r["createElementVNode"])("ol",Gb,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10a)},null,8,$b),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10b)},null,8,Rb)])]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep11)},null,8,qb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("General_Update"))},null,8,zb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep13)},null,8,Wb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep14)},null,8,Xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep15)},null,8,Kb),Object(r["createElementVNode"])("li",null,["react"===e.jsFramework?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.fetchFollowStep16React)},null,8,Jb)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:1,innerHTML:e.$sanitize(e.fetchFollowStep16SPA)},null,8,Yb)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:t},[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(e.embedCode),ref:"codeblock"},null,8,Zb),[[c,{}]])])})),128))])])}var em=Object(r["defineComponent"])({props:{showContainerRow:Boolean,jsFramework:String},components:{TrackingCodeCommon:Cb},directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{setupStep1:"",setupStep2:"",setupStep7:"",installInstructions:[]}},methods:{fetchInstallInstructionsSPA:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;if(this.installInstructions=[],null!==a&&void 0!==a&&a.idContainer&&null!==a&&void 0!==a&&a.environment&&null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id){var i=this.linkTo("manageContainers",a.site.id,a.idContainer);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"");var o=this.linkTo("manageTriggers",a.site.id,a.idContainer);this.setupStep2=Object(u["translate"])("TagManager_SPAFollowStep2",''),"");var l=this.linkTo("manageTags",a.site.id,a.idContainer);this.setupStep7=Object(u["translate"])("TagManager_SPAFollowStep7",''),""),a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id,jsFramework:this.jsFramework}).then((function(e){n.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1}))}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(i+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(i)},fetchClickX:function(e){return Object(u["translate"])("General_ClickX",Object(u["translate"])(e))}},computed:{step1HasContent:function(){var e=this.$refs.step1;return e&&""!==e.textContent},fetchFollowStep3:function(){return Object(u["translate"])("TagManager_SPAFollowStep3","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-trigger"),"")},fetchFollowStep5:function(){return Object(u["translate"])("TagManager_SPAFollowStep5","".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),Object(u["translate"])("TagManager_CategoryUserEngagement"))},fetchFollowStep8:function(){return Object(u["translate"])("TagManager_SPAFollowStep8","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),"".concat(Object(u["translate"])("TagManager_MatomoTagName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-tag"),"")},fetchFollowStep9:function(){return Object(u["translate"])("TagManager_SPAFollowStep9",Object(u["translate"])("TagManager_ConfigureWhatTagDoes"),Object(u["translate"])("TagManager_CustomTitle"),"","")},fetchFollowStep10:function(){return Object(u["translate"])("TagManager_SPAFollowStep10",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10a:function(){return Object(u["translate"])("TagManager_SPAFollowStep10a","","",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10b:function(){return Object(u["translate"])("TagManager_SPAFollowStep10b",Object(u["translate"])("TagManager_CustomUrl"),"","")},fetchFollowStep11:function(){return Object(u["translate"])("TagManager_SPAFollowStep11",Object(u["translate"])("TagManager_ConfigureWhenTagDoes"),Object(u["translate"])("TagManager_FireTriggerTitle"),"".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),"".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""))},fetchFollowStep13:function(){return Object(u["translate"])("TagManager_SPAFollowStep13",Object(u["translate"])("TagManager_Publish"))},fetchFollowStep14:function(){return Object(u["translate"])("TagManager_SPAFollowStep14",Object(u["translate"])("TagManager_VersionName"),"","")},fetchFollowStep15:function(){return Object(u["translate"])("TagManager_SPAFollowStep15",Object(u["translate"])("TagManager_CreateVersionAndPublishRelease"))},fetchFollowStep16SPA:function(){return Object(u["translate"])("TagManager_SPAFollowStep16","</head>",Object(u["externalLink"])("https://developer.matomo.org/guides/tagmanager/embedding"),"")},fetchFollowStep16React:function(){return Object(u["translate"])("TagManager_ReactFollowStep16","","","App.js","React.useEffect","Hello World","React.js")}}});em.render=Qb;var tm,nm,am=em,im={class:"nav-wrapper"},rm={class:"pull-right"},om=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-close"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-close"})],-1),lm=[om],cm={class:"pull-right"},sm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("defs",null,[Object(r["createElementVNode"])("symbol",{id:"tm-icon-checkmark",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M27 4l-15 15-7-7-5 5 12 12 20-20z"})])])],-1),dm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("symbol",{id:"tm-icon-close",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M31.33 0.67c0.893 0.893 0.893 2.34 0 3.232l-27.427 27.427c-0.893 0.893-2.34\n 0.893-3.232 0s-0.893-2.34 0-3.232l27.427-27.427c0.892-0.893 2.34-0.893 3.232 0z"}),Object(r["createElementVNode"])("path",{d:"M0.67 0.67c0.893-0.893 2.34-0.893 3.232 0l27.427 27.427c0.893 0.892 0.893\n 2.34 0 3.232s-2.34 0.892-3.232 0l-27.427-27.427c-0.893-0.893-0.893-2.34 0-3.232z"})])],-1),um={class:"page",style:{clear:"both"}},gm={key:0,id:"secondNavBar",class:"Menu--dashboard z-depth-1"},bm={class:"navbar",role:"menu",style:{padding:"0"}},mm={class:"menuTab",role:"menuitem"},pm={class:"item",style:{"font-weight":"normal"}},hm=Object(r["createTextVNode"])(" Events "),fm={key:0},vm=Object(r["createElementVNode"])("br",null,null,-1),jm=Object(r["createElementVNode"])("br",null,null,-1),Om=Object(r["createElementVNode"])("label",{for:"onlyfiredTags",class:"lbl-onlyfiredTags"},"Only fired tags",-1),Tm={key:0,style:{padding:"0 0 1rem 1.2rem"}},ym=["onClick","title"],Vm={title:"This tag was fired"},Cm=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-checkmark"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-checkmark"})],-1),Nm=[Cm],Em={class:"pageWrap"},Sm={class:"home",id:"content"},wm=Object(r["createElementVNode"])("h3",null,"Fired Tags",-1),km={class:"entityTable"},Mm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Action"),Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Fired count")])],-1),_m={key:0},Dm=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Am=[Dm],xm=Object(r["createElementVNode"])("h3",{style:{"margin-top":"30px"}},"Not Yet Fired Tags",-1),Bm={class:"entityTable"},Lm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Um=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Pm=[Um],Im=Object(r["createElementVNode"])("h3",null,"Triggers",-1),Fm={class:"entityTable"},Hm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Gm={key:0},$m=Object(r["createElementVNode"])("td",{colspan:"4"},"No trigger",-1),Rm=[$m],qm={key:1},zm=Object(r["createElementVNode"])("h3",null,"Pushed data by this event",-1),Wm={class:"entityTable"},Xm={style:{"word-break":"break-all"}},Km=Object(r["createElementVNode"])("br",null,null,-1),Jm=Object(r["createElementVNode"])("h3",null,"Content after this event",-1),Ym={class:"entityTable"},Zm={style:{"word-break":"break-all"}},Qm={class:"entityTable"},ep=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Value")])],-1),tp={key:0},np=Object(r["createElementVNode"])("td",{colspan:"3"},"No variables",-1),ap=[np],ip={style:{"word-break":"break-all"}},rp={class:"entityTable"},op=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Time"),Object(r["createElementVNode"])("th",null,"Message")])],-1),lp={style:{"word-break":"break-all"}},cp=Object(r["createElementVNode"])("br",null,null,-1);function sp(e,t,n,a,i,o){var l,c,s,d,u,g,b,m,p,h;return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("nav",null,[Object(r["createElementVNode"])("div",im,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,[Object(r["renderSlot"])(e.$slots,"logo")]),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"tags"===e.contentTab||!e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(t){return e.contentTab="tags"})},"Tags")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"triggers"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[1]||(t[1]=function(t){return e.contentTab="triggers"})},"Triggers")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"variables"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[2]||(t[2]=function(t){return e.contentTab="variables"})},"Variables")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"dataLayer"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[3]||(t[3]=function(t){return e.contentTab="dataLayer"})},"Data Layer")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"logs"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.contentTab="logs"})},"Logs")],2),Object(r["createElementVNode"])("li",rm,[Object(r["createElementVNode"])("a",{id:"mtmCloseDebug",onClick:t[5]||(t[5]=function(t){return e.mtmCloseDebugWindow()})},lm)]),Object(r["createElementVNode"])("li",cm,[Object(r["createElementVNode"])("a",{id:"mtmUpdateDebugPosition",onClick:t[6]||(t[6]=function(t){return e.mtmUpdateDebugPosition()})},Object(r["toDisplayString"])(e.positionText),1)])])])]),sm,dm,Object(r["createElementVNode"])("div",um,["logs"!==e.contentTab?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gm,[Object(r["createElementVNode"])("ul",bm,[Object(r["createElementVNode"])("li",mm,[Object(r["createElementVNode"])("span",pm,[hm,e.mtmEvents.length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",fm,[vm,jm,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{type:"checkbox",class:"onlyFiredTags-chk",name:"onlyfiredTags",id:"onlyfiredTags",value:"1","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.onlyfiredTags=t}),style:{"margin-right":"3.5px"}},null,512),[[r["vModelCheckbox"],e.onlyfiredTags]]),Om])):Object(r["createCommentVNode"])("",!0)])]),0===e.mtmEvents.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Tm,"No event executed")):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmEventsReversed,(function(t,n){var a,i;return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["menuTab",{active:n===e.selectedEventIndex}]),role:"menuitem",key:n},[(t.tags||[]).length||!e.onlyfiredTags?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,class:"item",onClick:function(n){return e.selectEvent(t.index0)},title:"Time: ".concat(t.time,". Trigger: ").concat(null===(a=t.metTrigger)||void 0===a?void 0:a.name)},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.index)+": "+Object(r["toDisplayString"])(t.name)+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Vm,Nm,512),[[r["vShow"],null===(i=t.tags)||void 0===i?void 0:i.length]])],8,ym)):Object(r["createCommentVNode"])("",!0)],2)})),128))])])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",Em,[Object(r["createElementVNode"])("div",Sm,[Object(r["withDirectives"])(Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.homeTabTitle),513),[[r["vShow"],"logs"!==e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[wm,Object(r["createElementVNode"])("table",km,[Mm,Object(r["createElementVNode"])("tbody",null,[null!==(l=e.selectedEvent)&&void 0!==l&&null!==(c=l.tags)&&void 0!==c&&c.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",_m,Am)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(s=e.selectedEvent)||void 0===s?void 0:s.tags)||[],(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.action),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.numExecuted),1)])})),128))])]),xm,Object(r["createElementVNode"])("table",Bm,[Lm,Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,Pm,512),[[r["vShow"],0===e.notFiredTags.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.notFiredTags,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1)])})),128))])])],512),[[r["vShow"],"tags"===e.contentTab||!e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Im,Object(r["createElementVNode"])("table",Fm,[Hm,Object(r["createElementVNode"])("tbody",null,[null!==(d=e.selectedEvent)&&void 0!==d&&d.metTrigger?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Gm,Rm)),null!==(u=e.selectedEvent)&&void 0!==u&&u.metTrigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",qm,[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.type),1)])):Object(r["createCommentVNode"])("",!0)])])],512),[[r["vShow"],"triggers"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[zm,Object(r["createElementVNode"])("table",Wm,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Xm,Object(r["toDisplayString"])(e.selectedEventData),1)])])]),Km,Jm,Object(r["createElementVNode"])("table",Ym,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Zm,Object(r["toDisplayString"])(e.selectedEventContainerDataLayer),1)])])])],512),[[r["vShow"],"dataLayer"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",Qm,[ep,Object(r["createElementVNode"])("tbody",null,[null!==(g=e.selectedEvent)&&void 0!==g&&null!==(b=g.container)&&void 0!==b&&null!==(m=b.variables)&&void 0!==m&&m.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",tp,ap)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(p=e.selectedEvent)||void 0===p||null===(h=p.container)||void 0===h?void 0:h.variables)||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.type),1),Object(r["createElementVNode"])("td",ip,Object(r["toDisplayString"])(e.stringifySelectedVariable(t)),1)])})),128))])])],512),[[r["vShow"],"variables"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",rp,[op,Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmLogs,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.time),1),Object(r["createElementVNode"])("td",lp,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.messages,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:t},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e),1),cp])})),128))])])})),128))])])],512),[[r["vShow"],"logs"===e.contentTab]])])])])])}function dp(e){return mp(e)||bp(e)||gp(e)||up()}function up(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gp(e,t){if(e){if("string"===typeof e)return pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pp(e,t):void 0}}function bp(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function mp(e){if(Array.isArray(e))return pp(e)}function pp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt||n.push.apply(n,dp(e.tags.map((function(e){return e.name}))))}));var a=[];return this.selectedEvent.container.tags.forEach((function(e){-1===n.indexOf(e.name)&&a.push(e)})),a},selectedEvent:function(){return this.mtmEvents[this.selectedEventIndex]},mtmEvents:function(){return window.mtmDbgData.mtmEvents},mtmEventsReversed:function(){var e=dp(this.mtmEvents);return e.reverse(),e},mtmLogs:function(){return window.mtmDbgData.mtmLogs},selectedEventData:function(){var e;return(null===(e=this.selectedEvent)||void 0===e?void 0:e.eventData)&&JSON.stringify(this.selectedEvent.eventData,Op())},selectedEventContainerDataLayer:function(){var e,t;return(null===(e=this.selectedEvent)||void 0===e||null===(t=e.container)||void 0===t?void 0:t.dataLayer)&&JSON.stringify(this.selectedEvent.container.dataLayer,Op())}}});Tp.render=sp;var yp=Tp,Vp={class:"copyMtmObjectDialog"},Cp=["innerHTML"];function Np(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveDirective"])("form");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vp,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.getCopyDialogTitle),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.getCopyDescription),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"site",name:"destinationSite",title:e.translate("TagManager_ChooseWebsite"),modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t})},null,8,["title","modelValue"]),"container"!==e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:0,uicontrol:"select",name:"idDestinationContainer",options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container"),modelValue:e.idDestinationContainer,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.idDestinationContainer=t})},null,8,["options","disabled","title","modelValue"])):Object(r["createCommentVNode"])("",!0),"container"===e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:1,class:"copyNote",innerHTML:e.$sanitize(e.getCopyContainerNote)},null,8,Cp)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("button",{class:"btn",onClick:t[2]||(t[2]=function(){return e.performCopy&&e.performCopy.apply(e,arguments)})},Object(r["toDisplayString"])(e.translate("General_Copy")),1)],512),[[c]])])}var Ep=Object(r["defineComponent"])({props:{defaultSite:{type:Object,required:!0},copyType:{type:String,required:!0},copyNonce:{type:String,required:!1,default:""},idToCopy:{type:[String,Number],required:!0},idSourceContainer:{type:String,required:!1,default:""},idContainerVersion:{type:Number,required:!1,default:0}},directives:{Form:g["Form"]},components:{Field:g["Field"]},data:function(){return{site:this.defaultSite,idDestinationContainer:"",containerOptions:[]}},created:function(){this.onSiteChange(),this.idDestinationContainer=this.idSourceContainer},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;"container"!==this.copyType.toLowerCase()&&(this.containerOptions=[],this.idDestinationContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idDestinationContainer="",void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idDestinationContainer||(t.idDestinationContainer=e.idcontainer),t.containerOptions.push({key:e.idcontainer,value:e.name})}))})))},performCopy:function(){var e,t=this,n={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":n.action="copyContainer",n.idContainer=this.idToCopy;break;case"tag":n.action="copyTag",n.idTag=this.idToCopy;break;case"trigger":n.action="copyTrigger",n.idTrigger=this.idToCopy;break;case"variable":n.action="copyVariable",n.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}this.idDestinationContainer&&(n.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(n.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(n.idContainerVersion=this.idContainerVersion),u["AjaxHelper"].fetch(n).then((function(e){if(!e||!e.isSuccess||!e.urlToNewCopy){var n=Object(u["translate"])("General_ErrorRequest","",""),a=u["NotificationsStore"].show({message:n,id:"CopyDialogResultNotification",context:"error",type:"transient"});return u["NotificationsStore"].scrollToNotification(a),void window.Piwik_Popover.close()}t.reloadEntityStore(),t.displaySuccessNotification(e.urlToNewCopy),window.Piwik_Popover.close()}))},reloadEntityStore:function(){switch(this.copyType.toLowerCase()){case"container":ud.reload();break;case"tag":mo.reload(this.idSourceContainer,this.idContainerVersion);break;case"trigger":ya.reload(this.idSourceContainer,this.idContainerVersion);break;case"variable":ft.reload(this.idSourceContainer,this.idContainerVersion);break;default:throw Error("Unrecognised copy object type.")}},displaySuccessNotification:function(e){var t="TagManager_CopyXSuccess",n="";switch(this.copyType.toLowerCase()){case"container":n="TagManager_ContainerLowercase";break;case"tag":n="TagManager_TagLowercase";break;case"trigger":n="TagManager_TriggerLowercase";break;case"variable":n="TagManager_VariableLowercase";break;default:throw Error("Unrecognised copy object type.")}var a=Object(u["translate"])(t,[''),Object(u["translate"])(n),""]),i=u["NotificationsStore"].show({message:a,id:"CopyDialogResultNotification",context:"success",type:"transient"});u["NotificationsStore"].scrollToNotification(i)}},computed:{getCopyDialogTitle:function(){var e="";switch(this.copyType.toLowerCase()){case"container":e=Object(u["translate"])("TagManager_Container");break;case"tag":e=Object(u["translate"])("TagManager_Tag");break;case"trigger":e=Object(u["translate"])("TagManager_Trigger");break;case"variable":e=Object(u["translate"])("TagManager_Variable");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyX",e)},getCopyDescription:function(){if("container"===this.copyType.toLowerCase())return Object(u["translate"])("TagManager_CopyContainerDescription");var e="";switch(this.copyType.toLowerCase()){case"tag":e=Object(u["translate"])("TagManager_TagLowercase");break;case"trigger":e=Object(u["translate"])("TagManager_TriggerLowercase");break;case"variable":e=Object(u["translate"])("TagManager_VariableLowercase");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyXDescription",e)},getCopyContainerNote:function(){return Object(u["translate"])("TagManager_CopyContainerNote","","")},getCopyUrl:function(){var e,t={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":t.action="copyContainer",t.idContainer=this.idToCopy;break;case"tag":t.action="copyTag",t.idTag=this.idToCopy;break;case"trigger":t.action="copyTrigger",t.idTrigger=this.idToCopy;break;case"variable":t.action="copyVariable",t.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}return this.idDestinationContainer&&(t.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(t.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(t.idContainerVersion=this.idContainerVersion),"?".concat(u["MatomoUrl"].stringify(t))}}});Ep.render=Np;var Sp=Ep; + */var dd=function(){function e(){var t=this;od(this,e),sd(this,"privateState",Object(r["reactive"])({containers:[],isLoadingContainers:!1,isLoadingSingle:!1,isUpdating:!1})),sd(this,"state",Object(r["computed"])((function(){return Object(r["readonly"])(t.privateState)}))),sd(this,"isLoading",Object(r["computed"])((function(){var e=t.state.value;return e.isLoadingContainers||e.isLoadingSingle}))),sd(this,"isUpdating",Object(r["computed"])((function(){return t.state.value.isUpdating}))),sd(this,"containers",Object(r["computed"])((function(){return t.state.value.containers}))),sd(this,"fetchPromise",null)}return cd(e,[{key:"reload",value:function(){return this.privateState.containers=[],this.fetchPromise=null,this.fetchContainers()}},{key:"fetchContainers",value:function(){var e=this;return this.privateState.isLoadingContainers=!0,this.privateState.containers=[],this.fetchPromise||(this.fetchPromise=u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1"})),Promise.resolve(this.fetchPromise).then((function(t){return e.privateState.containers=t,e.privateState.isLoadingContainers=!1,e.containers.value})).finally((function(){e.privateState.isLoadingContainers=!1}))}},{key:"findContainer",value:function(e){var t=this,n=this.containers.value.find((function(t){return t.idcontainer===e}));return n?Promise.resolve(n):(this.privateState.isLoadingSingle=!0,u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.getContainer",filter_limit:"-1"}).then((function(e){return t.privateState.containers=[].concat(ed(t.privateState.containers),[e]),Object(r["readonly"])(e)})).finally((function(){t.privateState.isLoadingSingle=!1})))}},{key:"deleteContainer",value:function(e){var t=this;return this.privateState.isUpdating=!0,this.privateState.containers=[],u["AjaxHelper"].fetch({idContainer:e,method:"TagManager.deleteContainer"},{withTokenInUrl:!0}).finally((function(){t.privateState.isUpdating=!1}))}},{key:"createOrUpdateContainer",value:function(e,t){var n=this;return this.privateState.isUpdating=!0,u["AjaxHelper"].post({method:t,idContainer:e.idcontainer},{name:e.name,description:e.description,ignoreGtmDataLayer:e.ignoreGtmDataLayer,activelySyncGtmDataLayer:e.activelySyncGtmDataLayer,isTagFireLimitAllowedInPreviewMode:e.isTagFireLimitAllowedInPreviewMode,context:e.context},{withTokenInUrl:!0}).finally((function(){n.privateState.isUpdating=!1}))}}]),e}(),ud=new dd,gd="containertagmanagement",bd=Object(r["defineComponent"])({props:{idContainer:String},components:{ContentBlock:u["ContentBlock"],Field:g["Field"],SaveButton:g["SaveButton"]},data:function(){return{isDirty:!1,editTitle:"",isUpdatingVersion:!1,container:{}}},created:function(){Qs.init(),Vt.init(),this.initIdContainer()},watch:{idContainer:function(e){null!==e&&this.initIdContainer()}},methods:{removeAnyContainerNotification:function(){u["NotificationsStore"].remove(gd),u["NotificationsStore"].remove("ajaxHelper")},showNotification:function(e,t){var n=u["NotificationsStore"].show({message:e,context:t,id:gd,type:"transient"});setTimeout((function(){u["NotificationsStore"].scrollToNotification(n)}),200)},showErrorFieldNotProvidedNotification:function(e){var t=Object(u["translate"])("TagManager_ErrorXNotProvided",[e]);this.showNotification(t,"error")},initIdContainer:function(){var e=this;this.container={},u["Matomo"].helper.lazyScrollToContent(),this.edit&&this.idContainer?(this.editTitle=Object(u["translate"])("TagManager_EditContainer"),ud.findContainer(this.idContainer).then((function(t){t&&(e.container=Object(u["clone"])(t),e.isDirty=!1)}))):this.create&&(this.editTitle=Object(u["translate"])("TagManager_CreateNewContainer"),this.container={idSite:u["Matomo"].idSite,name:"",context:"web",description:"",activelySyncGtmDataLayer:!0},this.isDirty=!1)},cancel:function(){var e=Object.assign({},u["MatomoUrl"].hashParsed.value);delete e.idContainer,u["MatomoUrl"].updateHash(e)},createContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdatingVersion=!0,ud.createOrUpdateContainer(this.container,"TagManager.addContainer").then((function(t){if(e.isUpdatingVersion=!1,t){e.isDirty=!1;var n=t.value;e.showNotification(Object(u["translate"])("TagManager_CreatedX",Object(u["translate"])("TagManager_Container")),"success"),u["MatomoUrl"].updateUrl(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:"dashboard",idContainer:n}))}})).finally((function(){e.isUpdatingVersion=!1})))},setValueHasChanged:function(){this.isDirty=!0},updateContainer:function(){var e=this;this.removeAnyContainerNotification(),this.checkRequiredFieldsAreSet()&&(this.isUpdating=!0,ud.createOrUpdateContainer(this.container,"TagManager.updateContainer").then((function(t){t&&(e.isDirty=!1,e.container={},ud.reload().then((function(){e.initIdContainer()})),e.showNotification(Object(u["translate"])("TagManager_UpdatedX",Object(u["translate"])("TagManager_Container")),"success"))})))},checkRequiredFieldsAreSet:function(){if(!this.container.name){var e=Object(u["translate"])("General_Name");return this.showErrorFieldNotProvidedNotification(e),!1}return!0}},computed:{contexts:function(){return Qs.contextsOptions.value},create:function(){return"0"===this.idContainer},edit:function(){return!this.create},isLoading:function(){return ft.isLoading.value||Vt.isLoading.value},isUpdating:function(){return ft.isUpdating.value||this.isUpdatingVersion}}});bd.render=Ws;var md=bd,pd={class:"tagManagerManageList tagManagerContainerList"},hd=["innerHTML"],fd={class:"index"},vd={class:"name"},jd={class:"description"},Od={class:"created"},Td={class:"action"},yd={colspan:"5"},Vd={class:"loadingPiwik"},Cd=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Nd={colspan:"5"},Ed=["id"],Sd=["title"],wd=["title"],kd=["title"],Md={class:"created"},_d=["href","title"],Dd=["onClick","title"],Ad=["onClick","title"],xd=["onClick","title"],Bd=["onClick","title"],Ld={class:"tableActionBar"},Ud=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Pd={class:"ui-confirm",id:"confirmDeleteContainer",ref:"confirmDeleteContainer"},Id=["value"],Fd=["value"];function Hd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContentBlock"),c=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",pd,[Object(r["createVNode"])(l,{feature:"Tag Manager","content-title":e.translate("TagManager_ManageX",e.translate("TagManager_Containers"))},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.getManageContainersIntro)},null,8,hd),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fd,Object(r["toDisplayString"])(e.translate("General_Id")),1),Object(r["createElementVNode"])("th",vd,Object(r["toDisplayString"])(e.translate("General_Name")),1),Object(r["createElementVNode"])("th",jd,Object(r["toDisplayString"])(e.translate("General_Description")),1),Object(r["createElementVNode"])("th",Od,Object(r["toDisplayString"])(e.translate("TagManager_CreatedDate")),1),Object(r["createElementVNode"])("th",Td,Object(r["toDisplayString"])(e.translate("General_Actions")),1)])]),Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",yd,[Object(r["createElementVNode"])("span",Vd,[Cd,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])],512),[[r["vShow"],e.isLoading||e.isUpdating]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Nd,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound"))+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"createContainerNow",onClick:t[0]||(t[0]=function(t){return e.createContainer()})},Object(r["toDisplayString"])(e.translate("TagManager_CreateNewContainerNow")),513),[[r["vShow"],e.hasWriteAccess]])])],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{id:"container".concat(t.idcontainer),class:"containers",key:t.idcontainer},[Object(r["createElementVNode"])("td",{class:"index",title:"".concat(e.translate("TagManager_Context"),": ")+e.contexts[t.context]},Object(r["toDisplayString"])(t.idcontainer),9,Sd),Object(r["createElementVNode"])("td",{class:"name",title:t.name},Object(r["toDisplayString"])(e.truncateText(t.name,50)),9,wd),Object(r["createElementVNode"])("td",{class:"description",title:t.description},Object(r["toDisplayString"])(e.truncateText(t.description,75)),9,kd),Object(r["createElementVNode"])("td",Md,[Object(r["createElementVNode"])("span",null,Object(r["toDisplayString"])(t.created_date_pretty),1)]),Object(r["createElementVNode"])("td",{class:Object(r["normalizeClass"])(e.getActionClasses)},[Object(r["createElementVNode"])("a",{class:"table-action icon-configure",href:"?module=TagManager&action="+e.containerDefaultAction+"&idContainer="+t.idcontainer+"&idSite="+t.idsite+"&period=day&date=yesterday",title:e.translate("TagManager_ConfigureX",e.translate("TagManager_Container"))},null,8,_d),Object(r["createElementVNode"])("a",{class:"table-action installCode icon-embed",onClick:function(n){return e.installCode(t.idcontainer)},title:e.translate("TagManager_InstallCode")},null,8,Dd),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-edit",onClick:function(n){return e.editContainer(t.idcontainer)},title:e.translate("TagManager_EditX",e.translate("TagManager_Container"))},null,8,Ad),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-delete",onClick:function(n){return e.deleteContainer(t)},title:e.translate("TagManager_DeleteX",e.translate("TagManager_Container"))},null,8,xd),[[r["vShow"],e.hasWriteAccess]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("a",{class:"table-action icon-content-copy",onClick:function(n){return e.openCopyDialog(t)},title:e.translate("TagManager_CopyX",e.translate("TagManager_Container"))},null,8,Bd),[[r["vShow"],e.canCopyContainer]])],2)],8,Ed)})),128))])],512),[[c]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Ld,[Object(r["createElementVNode"])("a",{class:"createNewContainer",value:"",onClick:t[1]||(t[1]=function(t){return e.createContainer()})},[Ud,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewContainer")),1)])],512),[[r["vShow"],e.hasWriteAccess]])]})),_:1},8,["content-title"]),Object(r["createElementVNode"])("div",Pd,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_DeleteContainerConfirm")),1),Object(r["createElementVNode"])("input",{role:"yes",type:"button",value:e.translate("General_Yes")},null,8,Id),Object(r["createElementVNode"])("input",{role:"no",type:"button",value:e.translate("General_No")},null,8,Fd)],512)])}function Gd(e){return zd(e)||qd(e)||Rd(e)||$d()}function $d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Rd(e,t){if(e){if("string"===typeof e)return Wd(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wd(e,t):void 0}}function qd(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function zd(e){if(Array.isArray(e))return Wd(e)}function Wd(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.created_date?-1:0})),e},getManageContainersIntro:function(){var e=Object(u["externalLink"])("https://matomo.org/guide/tag-manager/getting-started-with-tag-manager/");return Object(u["translate"])("TagManager_ManageContainersIntro",e,"")},canCopyContainer:function(){return u["Matomo"].hasUserCapability("tagmanager_write")&&u["Matomo"].hasUserCapability("tagmanager_use_custom_templates")},getActionClasses:function(){var e=this.canCopyContainer?" hasCopyAction":"";return"action".concat(e)}},methods:{createContainer:function(){this.editContainer("0")},editContainer:function(e){u["MatomoUrl"].updateHash(Object.assign(Object.assign({},u["MatomoUrl"].hashParsed.value),{},{idContainer:e}))},installCode:function(e){Kd.showInstallCode(e)},deleteContainer:function(e){function t(){ud.deleteContainer(e.idcontainer).then((function(){ud.reload(),u["NotificationsStore"].remove("CopyDialogResultNotification")}))}u["Matomo"].helper.modalConfirm(this.$refs.confirmDeleteContainer,{yes:t})},truncateText:function(e,t){return e.length>t?"".concat(e.substr(0,t-3),"..."):e},openCopyDialog:function(e){var t=u["MatomoUrl"].stringify({module:"TagManager",action:"copyContainerDialog",idSite:e.idsite,idContainer:e.idcontainer});window.Piwik_Popover.createPopupAndLoadUrl(t,"","mtmCopyContainer")}}});Jd.render=Hd;var Yd=Jd,Zd={class:"manageContainer"};function Qd(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ContainerList"),c=Object(r["resolveComponent"])("ContainerEdit");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Zd,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{"is-super-user":e.isSuperUser},null,8,["is-super-user"])],512),[[r["vShow"],!e.editMode]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(c,{"id-container":e.idContainer},null,8,["id-container"])],512),[[r["vShow"],e.editMode]])])}var eu=Object(r["defineComponent"])({props:{isSuperUser:{type:Boolean,required:!0}},components:{ContainerList:Yd,ContainerEdit:md},data:function(){return{isAddAllowed:!1}},created:function(){var e=this;Object(r["watch"])((function(){return u["MatomoUrl"].hashParsed.value.idContainer}),(function(t){e.onIdContainerParamChange(t)})),u["NotificationsStore"].remove("containertagmanagement"),this.onIdContainerParamChange(u["MatomoUrl"].hashParsed.value.idContainer)},computed:{idContainer:function(){var e=u["MatomoUrl"].hashParsed.value.idContainer;return this.isAddAllowed||""!==e?e:null},editMode:function(){return!!this.idContainer}},methods:{onIdContainerParamChange:function(e){if("0"===e){var t={isAllowed:!0};u["Matomo"].postEvent("TagManager.initAddVersion",t),this.isAddAllowed=!!t.isAllowed}}}});eu.render=Qd;var tu=eu,nu={class:"containerDashboard"},au={key:0},iu={class:"dashboardCreationDate"},ru={key:0},ou=Object(r["createElementVNode"])("br",null,null,-1),lu=["innerHTML"],cu={class:"row",style:{"margin-left":"-0.75rem"}},su={class:"col m6 s12"},du={key:0},uu=["href","title"],gu={key:0},bu=Object(r["createElementVNode"])("hr",null,null,-1),mu=["href"],pu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),hu=["href"],fu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),vu={class:"col m6 s12"},ju={key:0},Ou=["href","title"],Tu=Object(r["createElementVNode"])("hr",null,null,-1),yu=["href"],Vu=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Cu=["href"],Nu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Eu={class:"row",style:{"margin-left":"-0.75rem"}},Su={class:"col m6 s12"},wu=["href","title"],ku={key:0},Mu=Object(r["createElementVNode"])("hr",null,null,-1),_u=["href"],Du=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Au=["href"],xu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1),Bu={class:"col m6 s12"},Lu=["title","href"],Uu={key:0},Pu=Object(r["createElementVNode"])("br",null,null,-1),Iu=["title"],Fu={key:0},Hu=Object(r["createElementVNode"])("hr",null,null,-1),Gu=["href"],$u=Object(r["createElementVNode"])("span",{class:"icon-edit"}," ",-1),Ru=["href"],qu=Object(r["createElementVNode"])("span",{class:"icon-add"}," ",-1);function zu(e,t,n,a,i,o){var l,c,s=Object(r["resolveComponent"])("ActivityIndicator"),d=Object(r["resolveComponent"])("EnrichedHeadline"),u=Object(r["resolveComponent"])("ContentBlock"),g=Object(r["resolveDirective"])("content-intro");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",nu,[Object(r["createVNode"])(s,{loading:e.isLoading},null,8,["loading"]),e.isLoading?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",au,[Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("h2",null,[Object(r["createVNode"])(d,{"feature-name":"Tag Manager","inline-help":e.dashboardHelpText},{default:Object(r["withCtx"])((function(){var t;return[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_ContainerX",null===(t=e.container)||void 0===t?void 0:t.name)),1)]})),_:1},8,["inline-help"])]),Object(r["createElementVNode"])("p",iu,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.containerMetaInformation)+" ",1),null!==(l=e.containerVersion)&&void 0!==l&&l.description?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ru,[ou,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_Description"))+": "+Object(r["toDisplayString"])(null===(c=e.containerVersion)||void 0===c?void 0:c.description),1)])):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("p",{innerHTML:e.$sanitize(e.containerDashboardDescription)},null,8,lu)],512),[[g]]),Object(r["createElementVNode"])("div",cu,[Object(r["createElementVNode"])("div",su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.tagCount," ").concat(e.translate("TagManager_Tags")),"help-text":e.tagsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.tagCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",du,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedContainerVersionTags,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTags",{idTag:t.idtag}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,uu),n!==e.sortedContainerVersionTags.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",gu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))])):Object(r["createCommentVNode"])("",!0)]),bu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags")},[pu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTags")),1)],8,mu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTags",{idTag:0})},[fu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTag")),1)],8,hu)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",vu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.triggerCount," ").concat(e.translate("TagManager_Triggers")),"help-text":e.triggersHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[e.triggerCount?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ju,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedTriggers,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageTriggers",{idTrigger:t.idtrigger}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,Ou),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,", ",512),[[r["vShow"],n!==e.sortedTriggers.length-1]])])})),128))])):Object(r["createCommentVNode"])("",!0)]),Tu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers")},[Vu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditTriggers")),1)],8,yu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageTriggers",{idTrigger:0})},[Nu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewTrigger")),1)],8,Cu)]})),_:1},8,["content-title","help-text"])])]),Object(r["createElementVNode"])("div",Eu,[Object(r["createElementVNode"])("div",Su,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.variableCount," ").concat(e.translate("TagManager_Variables")),"help-text":e.variablesHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_Names"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedVariables,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{href:e.linkTo("manageVariables",{idVariable:t.idvariable}),title:e.translate("TagManager_EntityDateTypeMetaInformation",t.created_date_pretty,t.updated_date_pretty,t.type)},Object(r["toDisplayString"])(t.name),9,wu),n!==e.sortedVariables.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",ku,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.variableCount]])]),Mu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables")},[Du,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVariables")),1)],8,_u),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVariables",{idVariable:0})},[xu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVariable")),1)],8,Au)]})),_:1},8,["content-title","help-text"])]),Object(r["createElementVNode"])("div",Bu,[Object(r["createVNode"])(u,{feature:"Tag Manager","content-title":"".concat(e.versionCount," ").concat(e.translate("TagManager_Versions")),"help-text":e.versionsHelpText},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_LastVersions"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.lastVersions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("a",{title:e.lastVersionLinkTitle(t),href:e.linkTo("manageVersions",{idContainerVersion:t.idcontainerversion})},Object(r["toDisplayString"])(t.name),9,Lu),n!==e.lastVersions.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Uu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.lastVersions.length]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",null,[Pu,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("TagManager_Environments"))+": ",1),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.container.releases,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:n},[Object(r["createElementVNode"])("span",{title:e.releaseTooltip(t)},Object(r["toDisplayString"])(e.ucfirst(t.environment)),9,Iu),n!==e.container.releases.length-1?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",Fu,", ")):Object(r["createCommentVNode"])("",!0)])})),128))],512),[[r["vShow"],e.container.releases.length]])]),Hu,Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions")},[$u,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_EditVersions")),1)],8,Gu),Object(r["createElementVNode"])("a",{class:"btn-flat",href:e.linkTo("manageVersions",{idContainerVersion:0})},[qu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_CreateNewVersion")),1)],8,Ru)]})),_:1},8,["content-title","help-text"])])])]))])}function Wu(e){e.sort((function(e,t){return e.namet.name?1:0}))}var Xu=Object(r["defineComponent"])({props:{idContainer:String,dashboardHelpText:String,tagsHelpText:String,triggersHelpText:String,variablesHelpText:String,versionsHelpText:String},components:{ActivityIndicator:u["ActivityIndicator"],EnrichedHeadline:u["EnrichedHeadline"],ContentBlock:u["ContentBlock"]},directives:{ContentIntro:u["ContentIntro"]},data:function(){return{container:null,containerVersion:null,isLoading:!1}},created:function(){var e=this;Qs.init(),this.isLoading=!0;var t=u["AjaxHelper"].fetch({method:"TagManager.getContainer",idContainer:this.idContainer}).then((function(t){e.container=t})),n=u["AjaxHelper"].fetch({method:"TagManager.exportContainerVersion",idContainer:this.idContainer}).then((function(t){e.containerVersion=t}));Promise.all([t,n]).finally((function(){e.isLoading=!1}))},methods:{linkTo:function(e,t){var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e}));return t&&(n+="#?".concat(u["MatomoUrl"].stringify(t))),"?".concat(n)},lastVersionLinkTitle:function(e){return"Created on ".concat(e.created_date_pretty)+", description: '".concat(e.description,"'")},releaseTooltip:function(e){var t=Object(u["translate"])("TagManager_ReleaseInfo",e.release_login,e.release_date_pretty),n=Object(u["translate"])("TagManager_ReleaseVersionInfo",e.version_name);return"".concat(t," ").concat(n)},ucfirst:function(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}},computed:{lastVersions:function(){var e,t;return null!==(e=this.container)&&void 0!==e&&null!==(t=e.versions)&&void 0!==t&&t.length?this.container.versions.slice(0,5):[]},contexts:function(){var e={};return Qs.contexts.value.forEach((function(t){var n=t.id,a=t.name;e[n]=a})),e},containerMetaInformation:function(){var e;return Object(u["translate"])("TagManager_ContainerIdInformation",(null===(e=this.containerVersion)||void 0===e?void 0:e.idcontainer)||"")},containerDashboardDescription:function(){return Object(u["translate"])("TagManager_ContainerDashboardDescription",'',"")},sortedContainerVersionTags:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.tags)||[];return Wu(t),t},sortedTriggers:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.triggers)||[];return Wu(t),t},sortedVariables:function(){var e,t=(null===(e=this.containerVersion)||void 0===e?void 0:e.variables)||[];return Wu(t),t},tagCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.tags.length},triggerCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.triggers.length},versionCount:function(){var e;return null===(e=this.container)||void 0===e?void 0:e.versions.length},variableCount:function(){var e;return null===(e=this.containerVersion)||void 0===e?void 0:e.variables.length}}});Xu.render=zu;var Ku=Xu,Ju=["title"],Yu={class:"title"},Zu=Object(r["createElementVNode"])("span",{class:"icon icon-chevron-down"}," ",-1),Qu={class:"dropdown positionInViewport"},eg={class:"custom_select_container"},tg={class:"custom_select_ul_list"},ng=["title"],ag=["href"];function ig(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("ActivityIndicator"),c=Object(r["resolveDirective"])("focus-anywhere-but-here");return Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{class:Object(r["normalizeClass"])(["tagContainerSelector piwikSelector borderedControl",{expanded:e.showContainerList}]),onClick:t[1]||(t[1]=function(t){e.fetchContainers(),e.showContainerList=!e.showContainerList}),title:e.translate("TagManager_ChooseContainer")},[Object(r["createElementVNode"])("a",Yu,[Zu,Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.truncateText(e.actualContainerName,50)),1)]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",Qu,[Object(r["createVNode"])(l,{loading:e.isLoading},null,8,["loading"]),Object(r["createElementVNode"])("div",eg,[Object(r["createElementVNode"])("ul",tg,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("a",{tabindex:"-1",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(){}),["prevent","stop"]))},Object(r["toDisplayString"])(e.translate("TagManager_NoContainersFound")),1)],512),[[r["vShow"],!e.isLoading&&0===e.containers.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.containers,(function(t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{title:"".concat(t.name," (").concat(t.idcontainer,")"),key:t.idcontainer},[Object(r["createElementVNode"])("a",{href:e.linkTo(t.idcontainer)},Object(r["toDisplayString"])(t.name)+" ("+Object(r["toDisplayString"])(t.idcontainer)+") ",9,ag)],8,ng)})),128))])])],512),[[r["vShow"],e.showContainerList]])],10,Ju)),[[c,{blur:e.onBlur}]])}var rg=window,og=rg.tagManagerHelper,lg=Object(r["defineComponent"])({props:{containerName:String},components:{ActivityIndicator:u["ActivityIndicator"]},directives:{FocusAnywhereButHere:u["FocusAnywhereButHere"]},data:function(){return{containers:[],isLoading:!1,showContainerList:!1}},created:function(){setTimeout((function(){window.initTopControls()}))},methods:{fetchContainers:function(){var e=this;this.isLoading=!0,this.containers=[],u["AjaxHelper"].fetch({method:"TagManager.getContainers"}).then((function(t){e.containers=t})).finally((function(){e.isLoading=!1}))},linkTo:function(e){var t=u["MatomoUrl"].urlParsed.value.action;t&&"manageContainers"!==t||(t=this.hasWriteAccess?"dashboard":"manageTags");var n=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{idContainer:e,action:t}));return"".concat(window.location.pathname,"?").concat(n)},onBlur:function(){this.showContainerList=!1},truncateText:function(e,t){return og.truncateText(e,t)}},computed:{actualContainerName:function(){return this.containerName?Object(u["translate"])("TagManager_ContainerX",this.containerName):Object(u["translate"])("TagManager_ChooseContainer")},hasWriteAccess:function(){return u["Matomo"].hasUserCapability("tagmanager_write")}}});lg.render=ig;var cg=lg,sg={style:{"margin-left":"-0.75rem"}},dg=Object(r["createElementVNode"])("br",null,null,-1),ug=["href"],gg=["textContent"],bg={style:{"margin-top":"1rem"}},mg=["innerHTML"],pg=Object(r["createElementVNode"])("br",null,null,-1),hg=["href"],fg={class:"environment"},vg={class:"name"},jg={class:"name"},Og={class:"released_by"},Tg={class:"released_on"},yg={key:0},Vg={colspan:"7"},Cg={class:"loadingPiwik"},Ng=Object(r["createElementVNode"])("img",{src:"plugins/Morpheus/images/loading-blue.gif"},null,-1),Eg={key:1},Sg={colspan:"7"},wg={class:"environment"},kg={class:"name"},Mg={class:"revision"},_g={class:"released_by"},Dg={class:"released_on"},Ag={class:"date"};function xg(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("ContentBlock"),d=Object(r["resolveDirective"])("copy-to-clipboard"),u=Object(r["resolveDirective"])("content-table");return Object(r["openBlock"])(),Object(r["createBlock"])(s,{class:"manageInstallTagCode",feature:"Tag Manager","content-title":"Install Code"},{default:Object(r["withCtx"])((function(){var n,a;return[Object(r["createElementVNode"])("div",sg,[Object(r["createVNode"])(l,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.environment=t,e.fetchInstallInstructions(e.environment)}),options:e.environments,title:e.translate("TagManager_Environment")},null,8,["model-value","options","title"])]),Object(r["createVNode"])(c,{loading:e.isLoading},null,8,["loading"]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:n},[Object(r["createElementVNode"])("p",null,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),dg,t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,ug)):Object(r["createCommentVNode"])("",!0)]),Object(r["createElementVNode"])("div",null,[t.embedCode?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("pre",{key:0,textContent:Object(r["toDisplayString"])(t.embedCode)},null,8,gg)),[[d,{}]]):Object(r["createCommentVNode"])("",!0)])])})),128)),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_InstallCodePublishEnvironmentNote","preview"))+" "+Object(r["toDisplayString"])(e.translate("TagManager_ConfigureEnvironmentsSuperUser")),1),Object(r["createElementVNode"])("p",bg,[Object(r["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("TagManager_InstallCodeDataLayerNote","",""))},null,8,mg),pg,Object(r["createElementVNode"])("a",{target:"_blank",href:e.externalRawLink("https://matomo.org/faq/tag-manager/data-layer-in-matomo-tag-manager/")},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,hg)]),Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.translate("TagManager_ReleasesOverview")),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("table",null,[Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",fg,Object(r["toDisplayString"])(e.translate("TagManager_Environment")),1),Object(r["createElementVNode"])("th",vg,Object(r["toDisplayString"])(e.translate("TagManager_VersionName")),1),Object(r["createElementVNode"])("th",jg,Object(r["toDisplayString"])(e.translate("TagManager_VersionRevision")),1),Object(r["createElementVNode"])("th",Og,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedBy")),1),Object(r["createElementVNode"])("th",Tg,Object(r["toDisplayString"])(e.translate("TagManager_ReleasedOn")),1)])]),Object(r["createElementVNode"])("tbody",null,[e.isLoading?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",yg,[Object(r["createElementVNode"])("td",Vg,[Object(r["createElementVNode"])("span",Cg,[Ng,Object(r["createTextVNode"])(" "+Object(r["toDisplayString"])(e.translate("General_LoadingData")),1)])])])):Object(r["createCommentVNode"])("",!0),e.isLoading||0!==(null===(n=e.container)||void 0===n||null===(a=n.releases)||void 0===a?void 0:a.length)?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Eg,[Object(r["createElementVNode"])("td",Sg,Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFound")),1)])),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.sortedReleases,(function(t){var n,a;return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t.idcontainerrelease},[Object(r["createElementVNode"])("td",wg,Object(r["toDisplayString"])(e.ucfirst(t.environment)),1),Object(r["createElementVNode"])("td",kg,Object(r["toDisplayString"])(null===(n=e.releaseVersions[t.idcontainerrelease])||void 0===n?void 0:n.name),1),Object(r["createElementVNode"])("td",Mg,Object(r["toDisplayString"])(null===(a=e.releaseVersions[t.idcontainerrelease])||void 0===a?void 0:a.revision),1),Object(r["createElementVNode"])("td",_g,Object(r["toDisplayString"])(t.release_login),1),Object(r["createElementVNode"])("td",Dg,[Object(r["createElementVNode"])("span",Ag,Object(r["toDisplayString"])(t.release_date_pretty),1)])])})),128))])],512),[[u]])]})),_:1})}function Bg(e){return Pg(e)||Ug(e)||Hg(e)||Lg()}function Lg(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Ug(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function Pg(e){if(Array.isArray(e))return Gg(e)}function Ig(e,t){return Rg(e)||$g(e,t)||Hg(e,t)||Fg()}function Fg(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function Hg(e,t){if(e){if("string"===typeof e)return Gg(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Gg(e,t):void 0}}function Gg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt.release_date?-1:t.index-e.index})),t}}});Wg.render=xg;var Xg=Wg,Kg={class:"tagManagerTrackingCode"},Jg={key:0},Yg={class:"trackingCodeAdvancedOptions"},Zg={class:"advance-option"},Qg=Object(r["createElementVNode"])("span",{class:"icon-chevron-down"},null,-1),eb=Object(r["createElementVNode"])("span",{class:"icon-chevron-up"},null,-1),tb={id:"mtm-advanced-options"},nb=["innerHTML"],ab={key:1,class:"row"},ib={class:"col s12 m4 "},rb={class:"form-group row"},ob={class:"col s12 input-field"},lb={for:"tagManagerTrackingCodeSite",class:"siteSelectorLabel"},cb={class:"sites_autocomplete"},sb={class:"col s12 m4"},db={class:"col s12 m4"},ub=["innerHTML"],gb={key:1,class:"alert alert-info"},bb={href:""},mb={key:0},pb=["href"],hb=Object(r["createTextVNode"])(". "),fb=["innerHTML"],vb=["textContent"],jb=["innerHTML"],Ob={key:1};function Tb(e,t,n,a,i,o){var l=this,c=Object(r["resolveComponent"])("ActivityIndicator"),s=Object(r["resolveComponent"])("SiteSelector"),d=Object(r["resolveComponent"])("Field"),u=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Kg,[e.showContainerRow?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Jg,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_OptionallyCustomiseContainer"))+" ",1),Object(r["createElementVNode"])("div",Yg,[Object(r["createElementVNode"])("div",Zg,[Object(r["createElementVNode"])("span",null,[e.isAdvancedDisplayed?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,href:"javascript:;",onClick:t[0]||(t[0]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!0}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_ShowAdvancedOptions"))+" ",1),Qg])),e.isAdvancedDisplayed?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:1,href:"javascript:;",onClick:t[1]||(t[1]=Object(r["withModifiers"])((function(t){return e.isAdvancedDisplayed=!1}),["prevent"]))},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("CoreAdminHome_HideAdvancedOptions"))+" ",1),eb])):Object(r["createCommentVNode"])("",!0)])]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",tb,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.getAdvancedStepText)},null,8,nb),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createBlock"])(c,{key:0,loading:!0},null,512)),[[r["vShow"],e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.showContainerRow||e.environments.length>1?Object(r["withDirectives"])((Object(r["openBlock"])(),Object(r["createElementBlock"])("div",ab,[Object(r["createElementVNode"])("div",ib,[Object(r["createElementVNode"])("div",rb,[Object(r["createElementVNode"])("div",ob,[Object(r["createElementVNode"])("label",lb,Object(r["toDisplayString"])(e.translate("General_Website")),1),Object(r["createElementVNode"])("div",cb,[Object(r["createVNode"])(s,{id:"tagManagerTrackingCodeSite",modelValue:e.site,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.site=t}),"show-all-sites-item":!1,"switch-site-on-select":!1,"show-selected-site":!0},null,8,["modelValue"])])])])]),Object(r["createElementVNode"])("div",sb,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"containers","model-value":e.idContainer,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.idContainer=t,e.onContainerChange()}),options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container")},null,8,["model-value","options","disabled","title"])])]),Object(r["createElementVNode"])("div",db,[Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(d,{uicontrol:"select",name:"environment","model-value":e.environment,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.environment=t,l.$emit("fetchInstallInstructions")}),options:e.environments,disabled:e.environments.length<=1,"full-width":!0,title:e.translate("TagManager_Environment")},null,8,["model-value","options","disabled","title"])])])],512)),[[r["vShow"],!e.isLoading]]):Object(r["createCommentVNode"])("",!0),e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:2,innerHTML:e.$sanitize(e.getAdvancedStepInfo)},null,8,ub)):Object(r["createCommentVNode"])("",!0)])],512),[[r["vShow"],e.isAdvancedDisplayed]])])])):Object(r["createCommentVNode"])("",!0),e.idContainer&&e.noReleaseFound?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e.translate("TagManager_NoReleasesFoundForContainer"))+" ",1),Object(r["createElementVNode"])("a",bb,Object(r["toDisplayString"])(e.translate("TagManager_PublishVersionToEnvironmentToViewEmbedCode")),1)])):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:n},[e.showDescription?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",mb,[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.description)+" ",1),t.helpUrl?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,target:"_blank",href:t.helpUrl},Object(r["toDisplayString"])(e.translate("TagManager_LearnMore")),9,pb)):Object(r["createCommentVNode"])("",!0),hb])):Object(r["createCommentVNode"])("",!0),e.showPlainMtmSteps?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{key:1,innerHTML:e.$sanitize(e.getMtmStep3)},null,8,fb)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(t.embedCode),ref:"codeblock"},null,8,vb),[[u,{}]])])],64)})),128)),e.showBottom&&!e.noReleaseFound&&e.idContainer?(Object(r["openBlock"])(),Object(r["createElementBlock"])(r["Fragment"],{key:2},[e.showTestSection?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Ob,[(Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])(e.testComponent),{site:e.site},null,8,["site"]))])):(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:0,innerHTML:e.$sanitize(e.getCongratulationsText)},null,8,jb))],64)):Object(r["createCommentVNode"])("",!0)])}function yb(e){return"".concat(e.substr(0,1).toUpperCase()).concat(e.substr(1))}var Vb=Object(r["defineComponent"])({props:{showContainerRow:Boolean,showBottom:Boolean,showDescription:Boolean,showPlainMtmSteps:Boolean,showTestSection:Boolean,showAdvancedOptions:{required:!1,type:Boolean,default:!1}},components:{ActivityIndicator:u["ActivityIndicator"],SiteSelector:u["SiteSelector"],Field:g["Field"]},emits:["fetchInstallInstructions"],directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{containerVariables:[],isLoading:!1,idContainer:"",environment:"",environments:[],environmentNameMap:{},containerMap:{},containerOptions:[],site:{id:u["Matomo"].idSite,name:u["Matomo"].helper.htmlDecode(u["Matomo"].siteName)},matomoConfigs:[],releases:[],installInstructions:[],noReleaseFound:!1,isAdvancedDisplayed:!1}},created:function(){var e=this;u["AjaxHelper"].fetch({method:"TagManager.getAvailableEnvironments",filter_limit:"-1"}).then((function(t){var n;n=Array.isArray(t)?t:Object.values(t),e.environmentNameMap=Object.fromEntries(n.map((function(e){var t=e.id,n=e.name;return[t,n]})))})),this.onSiteChange(),this.isAdvancedDisplayed=this.showAdvancedOptions},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;this.installInstructions=[],this.containerOptions=[],this.containerMap={},this.environments=[],this.matomoConfigs=[],this.idContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&(this.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idContainer="",t.isAdvancedDisplayed=!0,void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idContainer||(t.idContainer=e.idcontainer),t.containerMap[e.idcontainer]=e,t.containerOptions.push({key:e.idcontainer,value:e.name})})),t.onContainerChange()})).finally((function(){t.isLoading=!1})))},onContainerChange:function(){var e=this;if(this.noReleaseFound=!1,this.idContainer){this.installInstructions=[];var t=this.containerMap[this.idContainer],n=t.draft.idcontainerversion;this.environment="",this.environments=[];var a=t.releases||[];a.find((function(e){return"live"===e.environment}))&&(this.environment="live"),a.forEach((function(t){if("preview"!==t.environment){e.environment||(e.environment=t.environment);var n=yb(t.environment);t.environment in e.environmentNameMap&&(n=e.environmentNameMap[t.environment]),e.environments.push({key:t.environment,value:n})}})),this.environments.length||(this.noReleaseFound=!0,this.environments.push({key:"",value:this.translate("TagManager_NoReleasesFound")})),this.$emit("fetchInstallInstructions"),this.fetchVariables(n)}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n})),r="".concat(window.location.pathname,"?").concat(i);return a&&(r+="#?".concat(u["MatomoUrl"].stringify(a))),r},fetchVariables:function(e){var t,n=this;this.matomoConfigs=[],this.idContainer&&null!==(t=this.site)&&void 0!==t&&t.id&&e&&u["AjaxHelper"].fetch({method:"TagManager.getContainerVariables",filter_limit:"-1",idContainer:this.idContainer,idContainerVersion:e,idSite:this.site.id}).then((function(e){n.matomoConfigs=e.filter((function(e){return"MatomoConfiguration"===e.type}))})).finally((function(){n.isLoading=!1}))}},computed:{getLearnMoreLink:function(){return Object(u["translate"])("TagManager_CustomHtmlTagHelpText",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")},getMtmStep3:function(){return Object(u["translate"])("TagManager_CopyCodePasteInHeader","</head>")},getCongratulationsText:function(){return Object(u["translate"])("TagManager_SiteWithoutDataReactFollowStepCompleted","","")},testComponent:function(){return this.showTestSection?Object(u["useExternalPluginComponent"])("JsTrackerInstallCheck","JsTrackerInstallCheck"):""},getAdvancedStepText:function(){var e,t=Object(u["translate"])("TagManager_SelectContainerForWebsite","","");if(this.idContainer)return t;var n=this.linkTo("manageContainers",String(null===(e=this.site)||void 0===e?void 0:e.id),""),a=Object(u["translate"])("TagManager_ManageContainersLink",''),"");return"".concat(t," ").concat(a)},getAdvancedStepInfo:function(){var e=this.site&&this.site.id?this.site.id:"",t=this.linkTo("dashboard",e,this.idContainer,[]);return Object(u["translate"])("TagManager_CustomiseContainer",''),"",Object(u["externalLink"])("https://matomo.org/faq/tag-manager/container-dashboard-in-matomo-tag-manager/"),"")}}});Vb.render=Tb;var Cb=Vb,Nb=Object(r["createElementVNode"])("br",null,null,-1),Eb={class:"followStepsHeading"},Sb={style:{"list-style":"inside decimal"}};function wb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon");return Object(r["openBlock"])(),Object(r["createBlock"])(Object(r["resolveDynamicComponent"])("getTrackingMethodsForSite"===e.currentAction?"div":"ContentBlock"),{anchor:"tagmanager","content-title":e.translate("TagManager_MatomoTagManager")},{default:Object(r["withCtx"])((function(){return[Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.translate("TagManager_MtmTrackingCodeIntro")),1),Nb,Object(r["createElementVNode"])("p",Eb,[Object(r["createElementVNode"])("strong",null,Object(r["toDisplayString"])(e.translate("SitesManager_SiteWithoutDataCloudflareFollowStepsIntro")),1)]),Object(r["createElementVNode"])("ol",Sb,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!0,showDescription:!1,showPlainMtmSteps:!0,showAdvancedOptions:"trackingCodeGenerator"===e.currentAction,showTestSection:"getTrackingMethodsForSite"===e.currentAction&&e.isJsTrackerInstallCheckAvailable,onFetchInstallInstructions:e.fetchInstallInstructions,ref:"trackingCodeCommon"},null,8,["show-container-row","showAdvancedOptions","showTestSection","onFetchInstallInstructions"])])]})),_:1},8,["content-title"])}var kb=Object(r["defineComponent"])({props:{currentAction:String,showContainerRow:Boolean,isJsTrackerInstallCheckAvailable:Boolean},components:{ContentBlock:u["ContentBlock"],TrackingCodeCommon:Cb},methods:{fetchInstallInstructions:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;a.installInstructions=[],null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id&&null!==a&&void 0!==a&&a.environment&&(a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id}).then((function(e){a.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1})))}}});kb.render=wb;var Mb=kb,_b={class:"list-style-decimal"},Db={ref:"step1"},Ab=["innerHTML"],xb=["innerHTML"],Bb=["textContent"],Lb=["innerHTML"],Ub=["textContent"],Pb=["innerHTML"],Ib=["innerHTML"],Fb=["innerHTML"],Hb=["textContent"],Gb={style:{"list-style":"lower-alpha","list-style-position":"inside"}},$b=["innerHTML"],Rb=["innerHTML"],qb=["innerHTML"],zb=["textContent"],Wb=["textContent"],Xb=["innerHTML"],Kb=["textContent"],Jb=["innerHTML"],Yb=["innerHTML"],Zb=["textContent"];function Qb(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("TrackingCodeCommon"),c=Object(r["resolveDirective"])("copy-to-clipboard");return Object(r["openBlock"])(),Object(r["createElementBlock"])("ol",_b,[Object(r["withDirectives"])(Object(r["createElementVNode"])("li",Db,[Object(r["createVNode"])(l,{"show-container-row":e.showContainerRow,showBottom:!1,showDescription:!1,onFetchInstallInstructions:e.fetchInstallInstructionsSPA,ref:"trackingCodeCommon"},null,8,["show-container-row","onFetchInstallInstructions"])],512),[[r["vShow"],e.step1HasContent]]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep2)},null,8,Ab),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep3)},null,8,xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Bb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep5)},null,8,Lb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("TagManager_CreateNewTrigger"))},null,8,Ub),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.setupStep7)},null,8,Pb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep8)},null,8,Ib),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep9)},null,8,Fb),Object(r["createElementVNode"])("li",null,[Object(r["createElementVNode"])("span",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep10)},null,8,Hb),Object(r["createElementVNode"])("ol",Gb,[Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10a)},null,8,$b),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep10b)},null,8,Rb)])]),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep11)},null,8,qb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchClickX("General_Update"))},null,8,zb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep13)},null,8,Wb),Object(r["createElementVNode"])("li",{innerHTML:e.$sanitize(e.fetchFollowStep14)},null,8,Xb),Object(r["createElementVNode"])("li",{textContent:Object(r["toDisplayString"])(e.fetchFollowStep15)},null,8,Kb),Object(r["createElementVNode"])("li",null,["react"===e.jsFramework?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:0,innerHTML:e.$sanitize(e.fetchFollowStep16React)},null,8,Jb)):(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:1,innerHTML:e.$sanitize(e.fetchFollowStep16SPA)},null,8,Yb)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.installInstructions,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",{key:t},[Object(r["withDirectives"])(Object(r["createElementVNode"])("pre",{class:"codeblock",textContent:Object(r["toDisplayString"])(e.embedCode),ref:"codeblock"},null,8,Zb),[[c,{}]])])})),128))])])}var em=Object(r["defineComponent"])({props:{showContainerRow:Boolean,jsFramework:String},components:{TrackingCodeCommon:Cb},directives:{CopyToClipboard:u["CopyToClipboard"]},data:function(){return{setupStep1:"",setupStep2:"",setupStep7:"",installInstructions:[]}},methods:{fetchInstallInstructionsSPA:function(){var e,t,n=this,a=this.$refs.trackingCodeCommon;if(this.installInstructions=[],null!==a&&void 0!==a&&a.idContainer&&null!==a&&void 0!==a&&a.environment&&null!==a&&void 0!==a&&null!==(e=a.site)&&void 0!==e&&e.id){var i=this.linkTo("manageContainers",a.site.id,a.idContainer);this.setupStep1=Object(u["translate"])("TagManager_SPAFollowStep1","
","",''),"");var o=this.linkTo("manageTriggers",a.site.id,a.idContainer);this.setupStep2=Object(u["translate"])("TagManager_SPAFollowStep2",''),"");var l=this.linkTo("manageTags",a.site.id,a.idContainer);this.setupStep7=Object(u["translate"])("TagManager_SPAFollowStep7",''),""),a.isLoading=!0,u["AjaxHelper"].fetch({method:"TagManager.getContainerInstallInstructions",filter_limit:"-1",idContainer:null===a||void 0===a?void 0:a.idContainer,environment:null===a||void 0===a?void 0:a.environment,idSite:null===a||void 0===a||null===(t=a.site)||void 0===t?void 0:t.id,jsFramework:this.jsFramework}).then((function(e){n.installInstructions=e,Object(r["nextTick"])((function(){var e=Array.isArray(n.$refs.codeblock)?n.$refs.codeblock:[n.$refs.codeblock];e.forEach((function(e){$(e).effect("highlight",{},1500)}))}))})).finally((function(){a.isLoading=!1}))}},linkTo:function(e,t,n,a){var i=u["MatomoUrl"].stringify(Object.assign(Object.assign({},u["MatomoUrl"].urlParsed.value),{},{module:"TagManager",action:e,idSite:t,idContainer:n}));return a&&(i+="#?".concat(u["MatomoUrl"].stringify(a))),"?".concat(i)},fetchClickX:function(e){return Object(u["translate"])("General_ClickX",Object(u["translate"])(e))}},computed:{step1HasContent:function(){var e=this.$refs.step1;return e&&""!==e.textContent},fetchFollowStep3:function(){return Object(u["translate"])("TagManager_SPAFollowStep3","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-trigger"),"")},fetchFollowStep5:function(){return Object(u["translate"])("TagManager_SPAFollowStep5","".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),Object(u["translate"])("TagManager_CategoryUserEngagement"))},fetchFollowStep8:function(){return Object(u["translate"])("TagManager_SPAFollowStep8","".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""),"".concat(Object(u["translate"])("TagManager_MatomoTagName"),""),Object(u["translate"])("TagManager_PageViewTriggerName"),Object(u["externalLink"])("https://matomo.org/faq/tag-manager/how-do-i-track-pageviews-of-my-website-using-matomo-tag-manager/#create-pageview-tag"),"")},fetchFollowStep9:function(){return Object(u["translate"])("TagManager_SPAFollowStep9",Object(u["translate"])("TagManager_ConfigureWhatTagDoes"),Object(u["translate"])("TagManager_CustomTitle"),"","")},fetchFollowStep10:function(){return Object(u["translate"])("TagManager_SPAFollowStep10",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10a:function(){return Object(u["translate"])("TagManager_SPAFollowStep10a","","",Object(u["translate"])("TagManager_CustomUrl"))},fetchFollowStep10b:function(){return Object(u["translate"])("TagManager_SPAFollowStep10b",Object(u["translate"])("TagManager_CustomUrl"),"","")},fetchFollowStep11:function(){return Object(u["translate"])("TagManager_SPAFollowStep11",Object(u["translate"])("TagManager_ConfigureWhenTagDoes"),Object(u["translate"])("TagManager_FireTriggerTitle"),"".concat(Object(u["translate"])("TagManager_HistoryChangeTriggerName"),""),"".concat(Object(u["translate"])("TagManager_PageViewTriggerName"),""))},fetchFollowStep13:function(){return Object(u["translate"])("TagManager_SPAFollowStep13",Object(u["translate"])("TagManager_Publish"))},fetchFollowStep14:function(){return Object(u["translate"])("TagManager_SPAFollowStep14",Object(u["translate"])("TagManager_VersionName"),"","")},fetchFollowStep15:function(){return Object(u["translate"])("TagManager_SPAFollowStep15",Object(u["translate"])("TagManager_CreateVersionAndPublishRelease"))},fetchFollowStep16SPA:function(){return Object(u["translate"])("TagManager_SPAFollowStep16","</head>",Object(u["externalLink"])("https://developer.matomo.org/guides/tagmanager/embedding"),"")},fetchFollowStep16React:function(){return Object(u["translate"])("TagManager_ReactFollowStep16","","","App.js","React.useEffect","Hello World","React.js")}}});em.render=Qb;var tm,nm,am=em,im={class:"nav-wrapper"},rm={class:"pull-right"},om=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-close"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-close"})],-1),lm=[om],cm={class:"pull-right"},sm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("defs",null,[Object(r["createElementVNode"])("symbol",{id:"tm-icon-checkmark",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M27 4l-15 15-7-7-5 5 12 12 20-20z"})])])],-1),dm=Object(r["createElementVNode"])("svg",{"aria-hidden":"true",style:{position:"absolute",width:"0",height:"0",overflow:"hidden"},version:"1.1",xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink"},[Object(r["createElementVNode"])("symbol",{id:"tm-icon-close",viewBox:"0 0 32 32"},[Object(r["createElementVNode"])("path",{d:"M31.33 0.67c0.893 0.893 0.893 2.34 0 3.232l-27.427 27.427c-0.893 0.893-2.34\n 0.893-3.232 0s-0.893-2.34 0-3.232l27.427-27.427c0.892-0.893 2.34-0.893 3.232 0z"}),Object(r["createElementVNode"])("path",{d:"M0.67 0.67c0.893-0.893 2.34-0.893 3.232 0l27.427 27.427c0.893 0.892 0.893\n 2.34 0 3.232s-2.34 0.892-3.232 0l-27.427-27.427c-0.893-0.893-0.893-2.34 0-3.232z"})])],-1),um={class:"page",style:{clear:"both"}},gm={key:0,id:"secondNavBar",class:"Menu--dashboard z-depth-1"},bm={class:"navbar",role:"menu",style:{padding:"0"}},mm={class:"menuTab",role:"menuitem"},pm={class:"item",style:{"font-weight":"normal"}},hm=Object(r["createTextVNode"])(" Events "),fm={key:0},vm=Object(r["createElementVNode"])("br",null,null,-1),jm=Object(r["createElementVNode"])("br",null,null,-1),Om=Object(r["createElementVNode"])("label",{for:"onlyfiredTags",class:"lbl-onlyfiredTags"},"Only fired tags",-1),Tm={key:0,style:{padding:"0 0 1rem 1.2rem"}},ym=["onClick","title"],Vm={title:"This tag was fired"},Cm=Object(r["createElementVNode"])("svg",{class:"tm-icon tm-icon-checkmark"},[Object(r["createElementVNode"])("use",{"xlink:href":"#tm-icon-checkmark"})],-1),Nm=[Cm],Em={class:"pageWrap"},Sm={class:"home",id:"content"},wm=Object(r["createElementVNode"])("h3",null,"Fired Tags",-1),km={class:"entityTable"},Mm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Action"),Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Fired count")])],-1),_m={key:0},Dm=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Am=[Dm],xm=Object(r["createElementVNode"])("h3",{style:{"margin-top":"30px"}},"Not Yet Fired Tags",-1),Bm={class:"entityTable"},Lm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Um=Object(r["createElementVNode"])("td",{colspan:"4"},"No tags",-1),Pm=[Um],Im=Object(r["createElementVNode"])("h3",null,"Triggers",-1),Fm={class:"entityTable"},Hm=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type")])],-1),Gm={key:0},$m=Object(r["createElementVNode"])("td",{colspan:"4"},"No trigger",-1),Rm=[$m],qm={key:1},zm=Object(r["createElementVNode"])("h3",null,"Pushed data by this event",-1),Wm={class:"entityTable"},Xm={style:{"word-break":"break-all"}},Km=Object(r["createElementVNode"])("br",null,null,-1),Jm=Object(r["createElementVNode"])("h3",null,"Content after this event",-1),Ym={class:"entityTable"},Zm={style:{"word-break":"break-all"}},Qm={class:"entityTable"},ep=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Name"),Object(r["createElementVNode"])("th",null,"Type"),Object(r["createElementVNode"])("th",null,"Value")])],-1),tp={key:0},np=Object(r["createElementVNode"])("td",{colspan:"3"},"No variables",-1),ap=[np],ip={style:{"word-break":"break-all"}},rp={class:"entityTable"},op=Object(r["createElementVNode"])("thead",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("th",null,"Time"),Object(r["createElementVNode"])("th",null,"Message")])],-1),lp={style:{"word-break":"break-all"}},cp=Object(r["createElementVNode"])("br",null,null,-1);function sp(e,t,n,a,i,o){var l,c,s,d,u,g,b,m,p,h;return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",null,[Object(r["createElementVNode"])("nav",null,[Object(r["createElementVNode"])("div",im,[Object(r["createElementVNode"])("ul",null,[Object(r["createElementVNode"])("li",null,[Object(r["renderSlot"])(e.$slots,"logo")]),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"tags"===e.contentTab||!e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[0]||(t[0]=function(t){return e.contentTab="tags"})},"Tags")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"triggers"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[1]||(t[1]=function(t){return e.contentTab="triggers"})},"Triggers")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"variables"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[2]||(t[2]=function(t){return e.contentTab="variables"})},"Variables")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"dataLayer"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[3]||(t[3]=function(t){return e.contentTab="dataLayer"})},"Data Layer")],2),Object(r["createElementVNode"])("li",{class:Object(r["normalizeClass"])({active:"logs"===e.contentTab})},[Object(r["createElementVNode"])("a",{onClick:t[4]||(t[4]=function(t){return e.contentTab="logs"})},"Logs")],2),Object(r["createElementVNode"])("li",rm,[Object(r["createElementVNode"])("a",{id:"mtmCloseDebug",onClick:t[5]||(t[5]=function(t){return e.mtmCloseDebugWindow()})},lm)]),Object(r["createElementVNode"])("li",cm,[Object(r["createElementVNode"])("a",{id:"mtmUpdateDebugPosition",onClick:t[6]||(t[6]=function(t){return e.mtmUpdateDebugPosition()})},Object(r["toDisplayString"])(e.positionText),1)])])])]),sm,dm,Object(r["createElementVNode"])("div",um,["logs"!==e.contentTab?(Object(r["openBlock"])(),Object(r["createElementBlock"])("div",gm,[Object(r["createElementVNode"])("ul",bm,[Object(r["createElementVNode"])("li",mm,[Object(r["createElementVNode"])("span",pm,[hm,e.mtmEvents.length>0?(Object(r["openBlock"])(),Object(r["createElementBlock"])("span",fm,[vm,jm,Object(r["withDirectives"])(Object(r["createElementVNode"])("input",{type:"checkbox",class:"onlyFiredTags-chk",name:"onlyfiredTags",id:"onlyfiredTags",value:"1","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.onlyfiredTags=t}),style:{"margin-right":"3.5px"}},null,512),[[r["vModelCheckbox"],e.onlyfiredTags]]),Om])):Object(r["createCommentVNode"])("",!0)])]),0===e.mtmEvents.length?(Object(r["openBlock"])(),Object(r["createElementBlock"])("li",Tm,"No event executed")):Object(r["createCommentVNode"])("",!0),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmEventsReversed,(function(t,n){var a,i;return Object(r["openBlock"])(),Object(r["createElementBlock"])("li",{class:Object(r["normalizeClass"])(["menuTab",{active:n===e.selectedEventIndex}]),role:"menuitem",key:n},[(t.tags||[]).length||!e.onlyfiredTags?(Object(r["openBlock"])(),Object(r["createElementBlock"])("a",{key:0,class:"item",onClick:function(n){return e.selectEvent(t.index0)},title:"Time: ".concat(t.time,". Trigger: ").concat(null===(a=t.metTrigger)||void 0===a?void 0:a.name)},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(t.index)+": "+Object(r["toDisplayString"])(t.name)+" ",1),Object(r["withDirectives"])(Object(r["createElementVNode"])("span",Vm,Nm,512),[[r["vShow"],null===(i=t.tags)||void 0===i?void 0:i.length]])],8,ym)):Object(r["createCommentVNode"])("",!0)],2)})),128))])])):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("div",Em,[Object(r["createElementVNode"])("div",Sm,[Object(r["withDirectives"])(Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.homeTabTitle),513),[[r["vShow"],"logs"!==e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[wm,Object(r["createElementVNode"])("table",km,[Mm,Object(r["createElementVNode"])("tbody",null,[null!==(l=e.selectedEvent)&&void 0!==l&&null!==(c=l.tags)&&void 0!==c&&c.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",_m,Am)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(s=e.selectedEvent)||void 0===s?void 0:s.tags)||[],(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.action),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.numExecuted),1)])})),128))])]),xm,Object(r["createElementVNode"])("table",Bm,[Lm,Object(r["createElementVNode"])("tbody",null,[Object(r["withDirectives"])(Object(r["createElementVNode"])("tr",null,Pm,512),[[r["vShow"],0===e.notFiredTags.length]]),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.notFiredTags,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.type),1)])})),128))])])],512),[[r["vShow"],"tags"===e.contentTab||!e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Im,Object(r["createElementVNode"])("table",Fm,[Hm,Object(r["createElementVNode"])("tbody",null,[null!==(d=e.selectedEvent)&&void 0!==d&&d.metTrigger?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",Gm,Rm)),null!==(u=e.selectedEvent)&&void 0!==u&&u.metTrigger?(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",qm,[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.selectedEvent.metTrigger.type),1)])):Object(r["createCommentVNode"])("",!0)])])],512),[[r["vShow"],"triggers"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[zm,Object(r["createElementVNode"])("table",Wm,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Xm,Object(r["toDisplayString"])(e.selectedEventData),1)])])]),Km,Jm,Object(r["createElementVNode"])("table",Ym,[Object(r["createElementVNode"])("tbody",null,[Object(r["createElementVNode"])("tr",null,[Object(r["createElementVNode"])("td",Zm,Object(r["toDisplayString"])(e.selectedEventContainerDataLayer),1)])])])],512),[[r["vShow"],"dataLayer"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",Qm,[ep,Object(r["createElementVNode"])("tbody",null,[null!==(g=e.selectedEvent)&&void 0!==g&&null!==(b=g.container)&&void 0!==b&&null!==(m=b.variables)&&void 0!==m&&m.length?Object(r["createCommentVNode"])("",!0):(Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",tp,ap)),(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])((null===(p=e.selectedEvent)||void 0===p||null===(h=p.container)||void 0===h?void 0:h.variables)||[],(function(t,n){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:n},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.name),1),Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(t.type),1),Object(r["createElementVNode"])("td",ip,Object(r["toDisplayString"])(e.stringifySelectedVariable(t)),1)])})),128))])])],512),[[r["vShow"],"variables"===e.contentTab]]),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createElementVNode"])("table",rp,[op,Object(r["createElementVNode"])("tbody",null,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.mtmLogs,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("tr",{key:t},[Object(r["createElementVNode"])("td",null,Object(r["toDisplayString"])(e.time),1),Object(r["createElementVNode"])("td",lp,[(Object(r["openBlock"])(!0),Object(r["createElementBlock"])(r["Fragment"],null,Object(r["renderList"])(e.messages,(function(e,t){return Object(r["openBlock"])(),Object(r["createElementBlock"])("span",{key:t},[Object(r["createTextVNode"])(Object(r["toDisplayString"])(e),1),cp])})),128))])])})),128))])])],512),[[r["vShow"],"logs"===e.contentTab]])])])])])}function dp(e){return mp(e)||bp(e)||gp(e)||up()}function up(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function gp(e,t){if(e){if("string"===typeof e)return pp(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?pp(e,t):void 0}}function bp(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function mp(e){if(Array.isArray(e))return pp(e)}function pp(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);nt||n.push.apply(n,dp(e.tags.map((function(e){return e.name}))))}));var a=[];return this.selectedEvent.container.tags.forEach((function(e){-1===n.indexOf(e.name)&&a.push(e)})),a},selectedEvent:function(){return this.mtmEvents[this.selectedEventIndex]},mtmEvents:function(){return window.mtmDbgData.mtmEvents},mtmEventsReversed:function(){var e=dp(this.mtmEvents);return e.reverse(),e},mtmLogs:function(){return window.mtmDbgData.mtmLogs},selectedEventData:function(){var e;return(null===(e=this.selectedEvent)||void 0===e?void 0:e.eventData)&&JSON.stringify(this.selectedEvent.eventData,Op())},selectedEventContainerDataLayer:function(){var e,t;return(null===(e=this.selectedEvent)||void 0===e||null===(t=e.container)||void 0===t?void 0:t.dataLayer)&&JSON.stringify(this.selectedEvent.container.dataLayer,Op())}}});Tp.render=sp;var yp=Tp,Vp={class:"copyMtmObjectDialog"},Cp=["innerHTML"];function Np(e,t,n,a,i,o){var l=Object(r["resolveComponent"])("Field"),c=Object(r["resolveDirective"])("form");return Object(r["openBlock"])(),Object(r["createElementBlock"])("div",Vp,[Object(r["createElementVNode"])("h2",null,Object(r["toDisplayString"])(e.getCopyDialogTitle),1),Object(r["createElementVNode"])("p",null,Object(r["toDisplayString"])(e.getCopyDescription),1),Object(r["withDirectives"])(Object(r["createElementVNode"])("div",null,[Object(r["createVNode"])(l,{uicontrol:"site",name:"destinationSite",title:e.translate("TagManager_ChooseWebsite"),modelValue:e.site,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.site=t})},null,8,["title","modelValue"]),"container"!==e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createBlock"])(l,{key:0,uicontrol:"select",name:"idDestinationContainer",options:e.containerOptions,disabled:e.containerOptions.length<=1,"full-width":!0,title:e.translate("TagManager_Container"),modelValue:e.idDestinationContainer,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.idDestinationContainer=t})},null,8,["options","disabled","title","modelValue"])):Object(r["createCommentVNode"])("",!0),"container"===e.copyType.toLowerCase()?(Object(r["openBlock"])(),Object(r["createElementBlock"])("p",{key:1,class:"copyNote",innerHTML:e.$sanitize(e.getCopyContainerNote)},null,8,Cp)):Object(r["createCommentVNode"])("",!0),Object(r["createElementVNode"])("button",{class:"btn",onClick:t[2]||(t[2]=function(){return e.performCopy&&e.performCopy.apply(e,arguments)})},Object(r["toDisplayString"])(e.translate("General_Copy")),1)],512),[[c]])])}var Ep=Object(r["defineComponent"])({props:{defaultSite:{type:Object,required:!0},copyType:{type:String,required:!0},copyNonce:{type:String,required:!1,default:""},idToCopy:{type:[String,Number],required:!0},idSourceContainer:{type:String,required:!1,default:""},idContainerVersion:{type:Number,required:!1,default:0}},directives:{Form:g["Form"]},components:{Field:g["Field"]},data:function(){return{site:this.defaultSite,idDestinationContainer:"",containerOptions:[]}},created:function(){this.onSiteChange(),this.idDestinationContainer=this.idSourceContainer},watch:{site:function(){this.onSiteChange()}},methods:{onSiteChange:function(){var e,t=this;"container"!==this.copyType.toLowerCase()&&(this.containerOptions=[],this.idDestinationContainer="",null!==(e=this.site)&&void 0!==e&&e.id&&u["AjaxHelper"].fetch({method:"TagManager.getContainers",filter_limit:"-1",idSite:this.site.id}).then((function(e){if(t.containerOptions=[],null===e||void 0===e||!e.length)return t.idDestinationContainer="",void t.containerOptions.push({key:"",value:t.translate("TagManager_NoContainersFound")});e.forEach((function(e){t.idDestinationContainer||(t.idDestinationContainer=e.idcontainer),t.containerOptions.push({key:e.idcontainer,value:e.name})}))})))},performCopy:function(){var e,t=this,n={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":n.action="copyContainer",n.idContainer=this.idToCopy;break;case"tag":n.action="copyTag",n.idTag=this.idToCopy;break;case"trigger":n.action="copyTrigger",n.idTrigger=this.idToCopy;break;case"variable":n.action="copyVariable",n.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}this.idDestinationContainer&&(n.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(n.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(n.idContainerVersion=this.idContainerVersion),u["AjaxHelper"].fetch(n).then((function(e){if(!e||!e.isSuccess||!e.urlToNewCopy){var n=Object(u["translate"])("General_ErrorRequest","",""),a=u["NotificationsStore"].show({message:n,id:"CopyDialogResultNotification",context:"error",type:"transient"});return u["NotificationsStore"].scrollToNotification(a),void window.Piwik_Popover.close()}t.reloadEntityStore(),t.displaySuccessNotification(e.urlToNewCopy),window.Piwik_Popover.close()}))},reloadEntityStore:function(){switch(this.copyType.toLowerCase()){case"container":ud.reload();break;case"tag":mo.reload(this.idSourceContainer,this.idContainerVersion);break;case"trigger":ya.reload(this.idSourceContainer,this.idContainerVersion);break;case"variable":ft.reload(this.idSourceContainer,this.idContainerVersion);break;default:throw Error("Unrecognised copy object type.")}},displaySuccessNotification:function(e){var t="TagManager_CopyXSuccess",n="";switch(this.copyType.toLowerCase()){case"container":n="TagManager_ContainerLowercase";break;case"tag":n="TagManager_TagLowercase";break;case"trigger":n="TagManager_TriggerLowercase";break;case"variable":n="TagManager_VariableLowercase";break;default:throw Error("Unrecognised copy object type.")}var a=Object(u["translate"])(t,[''),Object(u["translate"])(n),""]),i=u["NotificationsStore"].show({message:a,id:"CopyDialogResultNotification",context:"success",type:"transient"});u["NotificationsStore"].scrollToNotification(i)}},computed:{getCopyDialogTitle:function(){var e="";switch(this.copyType.toLowerCase()){case"container":e=Object(u["translate"])("TagManager_Container");break;case"tag":e=Object(u["translate"])("TagManager_Tag");break;case"trigger":e=Object(u["translate"])("TagManager_Trigger");break;case"variable":e=Object(u["translate"])("TagManager_Variable");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyX",e)},getCopyDescription:function(){if("container"===this.copyType.toLowerCase())return Object(u["translate"])("TagManager_CopyContainerDescription");var e="";switch(this.copyType.toLowerCase()){case"tag":e=Object(u["translate"])("TagManager_TagLowercase");break;case"trigger":e=Object(u["translate"])("TagManager_TriggerLowercase");break;case"variable":e=Object(u["translate"])("TagManager_VariableLowercase");break;default:throw Error("Unrecognised copy object type.")}return Object(u["translate"])("TagManager_CopyXDescription",e)},getCopyContainerNote:function(){return Object(u["translate"])("TagManager_CopyContainerNote","","")},getCopyUrl:function(){var e,t={module:"TagManager",action:"",idSite:this.defaultSite.id,idDestinationSite:null!==(e=this.site)&&void 0!==e&&e.id?this.site.id:0,nonce:this.copyNonce,idDestinationContainer:"",idSourceContainer:"",idContainerVersion:0,idContainer:0,idTag:0,idTrigger:0,idVariable:0};switch(this.copyType.toLowerCase()){case"container":t.action="copyContainer",t.idContainer=this.idToCopy;break;case"tag":t.action="copyTag",t.idTag=this.idToCopy;break;case"trigger":t.action="copyTrigger",t.idTrigger=this.idToCopy;break;case"variable":t.action="copyVariable",t.idVariable=this.idToCopy;break;default:throw Error("Unrecognised copy object type.")}return this.idDestinationContainer&&(t.idDestinationContainer=this.idDestinationContainer),this.idSourceContainer&&(t.idSourceContainer=this.idSourceContainer),this.idContainerVersion>0&&(t.idContainerVersion=this.idContainerVersion),"?".concat(u["MatomoUrl"].stringify(t))}}});Ep.render=Np;var Sp=Ep; /*! * Matomo - free/libre analytics platform * diff --git a/vue/src/Container/ContainerList.vue b/vue/src/Container/ContainerList.vue index 7329760db..3b7b7af7e 100644 --- a/vue/src/Container/ContainerList.vue +++ b/vue/src/Container/ContainerList.vue @@ -214,7 +214,7 @@ export default defineComponent({ return translate('TagManager_ManageContainersIntro', linkString, ''); }, canCopyContainer(): boolean { - return this.isSuperUser; + return Matomo.hasUserCapability('tagmanager_write') && Matomo.hasUserCapability('tagmanager_use_custom_templates'); }, getActionClasses(): string { const copyClass = this.canCopyContainer ? ' hasCopyAction' : '';