HEX
Server: Microsoft-IIS/10.0
System: Windows NT ITPWINWEBSVR22 10.0 build 20348 (Windows Server 2022) AMD64
User: www.conferencesearch.co.uk (0)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: D:/web/matomo.vdk/plugins/JsTrackerInstallCheck/vue/dist/JsTrackerInstallCheck.umd.min.js
(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["JsTrackerInstallCheck"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["JsTrackerInstallCheck"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,s){return function(e){var t={};function s(n){if(t[n])return t[n].exports;var r=t[n]={i:n,l:!1,exports:{}};return e[n].call(r.exports,r,r.exports,s),r.l=!0,r.exports}return s.m=e,s.c=t,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)s.d(n,r,function(t){return e[t]}.bind(null,r));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="plugins/JsTrackerInstallCheck/vue/dist/",s(s.s="fae3")}({"19dc":function(t,s){t.exports=e},"8bbf":function(e,s){e.exports=t},a5a2:function(e,t){e.exports=s},fae3:function(e,t,s){"use strict";if(s.r(t),s.d(t,"JsTrackerInstallCheck",(function(){return O})),"undefined"!==typeof window){var n=window.document.currentScript,r=n&&n.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);r&&(s.p=r[1])}var i=s("8bbf");const c={class:"jsTrackerInstallCheck"},o={class:"row testInstallFields"},a={class:"col s2"},l={class:"col s10"},u=["disabled","value"],d={class:"system-success success-message"},h=Object(i["createElementVNode"])("span",{class:"icon-ok"},null,-1),p={class:"system-errors test-error"},m=Object(i["createElementVNode"])("span",{class:"icon-warning"},null,-1),T=["innerHTML"];function b(e,t,s,n,r,b){const f=Object(i["resolveComponent"])("Field"),k=Object(i["resolveComponent"])("ActivityIndicator");return Object(i["openBlock"])(),Object(i["createElementBlock"])(i["Fragment"],null,[Object(i["createElementVNode"])("span",null,Object(i["toDisplayString"])(e.translate("JsTrackerInstallCheck_OptionalTestInstallationDescription")),1),Object(i["createElementVNode"])("div",c,[Object(i["createElementVNode"])("div",o,[Object(i["createElementVNode"])("div",a,[Object(i["createVNode"])(f,{uicontrol:"url",name:"baseUrl",placeholder:"https://example.com",modelValue:e.baseUrl,"onUpdate:modelValue":t[0]||(t[0]=t=>e.baseUrl=t),"full-width":!0,disabled:e.isTesting},null,8,["modelValue","disabled"])]),Object(i["createElementVNode"])("div",l,[Object(i["createElementVNode"])("input",{type:"button",class:"btn testInstallBtn",onClick:t[1]||(t[1]=(...t)=>e.initiateTrackerTest&&e.initiateTrackerTest(...t)),disabled:!e.baseUrl||e.isTesting,value:e.translate("JsTrackerInstallCheck_TestInstallationBtnText")},null,8,u)])]),Object(i["createVNode"])(k,{loading:e.isTesting,loadingMessage:e.translate("General_Testing")},null,8,["loading","loadingMessage"]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",d,[h,Object(i["createTextVNode"])(" "+Object(i["toDisplayString"])(e.translate("JsTrackerInstallCheck_JsTrackingCodeInstallCheckSuccessMessage")),1)],512),[[i["vShow"],e.isTestSuccess]]),Object(i["withDirectives"])(Object(i["createElementVNode"])("div",p,[m,Object(i["createTextVNode"])("  "),Object(i["createElementVNode"])("span",{innerHTML:e.$sanitize(e.getTestFailureMessage)},null,8,T)],512),[[i["vShow"],e.isTestComplete&&!e.isTestSuccess]])])],64)}var f=s("19dc"),k=s("a5a2");const g=10,C=1e3;var j=Object(i["defineComponent"])({components:{Field:k["Field"],ActivityIndicator:f["ActivityIndicator"]},data(){return{checkNonce:"",isTesting:!1,isTestComplete:!1,isTestSuccess:!1,testTimeoutCount:0,baseUrl:""}},props:{site:{type:Object,required:!0},isWordpress:{type:Boolean,required:!1,default:!1}},created(){this.checkWhetherSuccessWasRecorded()},watch:{site(){this.onSiteChange()}},methods:{onSiteChange(){this.checkNonce="",this.isTesting=!1,this.isTestComplete=!1,this.isTestSuccess=!1,this.testTimeoutCount=0,this.checkWhetherSuccessWasRecorded()},initiateTrackerTest(){this.isTesting=!0,this.isTestComplete=!1,this.isTestSuccess=!1,this.testTimeoutCount=0;const e=this.site,t={idSite:e.id,url:""};this.baseUrl&&(t.url=this.baseUrl),f["AjaxHelper"].post({module:"API",method:"JsTrackerInstallCheck.initiateJsTrackerInstallTest"},t).then(e=>{const t=e&&e.url&&e.nonce;if(t){this.checkNonce=e.nonce;const t=window.open(e.url);this.setCheckInTime(),setTimeout(()=>{t&&!t.closed&&(t.close(),this.testTimeoutCount=g)},g*C)}}).catch(()=>{this.isTesting=!1})},setCheckInTime(){setTimeout(this.checkWhetherSuccessWasRecorded,C)},checkWhetherSuccessWasRecorded(){const e=this.site,t={idSite:e.id,nonce:""};this.checkNonce&&(t.nonce=this.checkNonce),f["AjaxHelper"].post({module:"API",method:"JsTrackerInstallCheck.wasJsTrackerInstallTestSuccessful"},t).then(e=>{if(e&&e.mainUrl&&!this.baseUrl&&(this.baseUrl=e.mainUrl),this.isTestSuccess=e&&e.isSuccess,this.checkNonce&&!this.isTestSuccess&&this.testTimeoutCount<g)return this.testTimeoutCount+=1,void this.setCheckInTime();this.isTestComplete=!!this.checkNonce,this.isTesting=!1}).catch(()=>{this.isTesting=!1})}},computed:{getTestFailureMessage(){const e=Object(f["externalLink"])("https://matomo.org/faq/troubleshooting/faq_58/"),t="</a>";return this.isWordpress?Object(f["translate"])("JsTrackerInstallCheck_JsTrackingCodeInstallCheckFailureMessageWordpress",'<a target="_blank" rel="noreferrer noopener" href="https://wordpress.org/plugins/wp-piwik/">WP-Matomo Integration (WP-Piwik)</a>',e,t):Object(f["translate"])("JsTrackerInstallCheck_JsTrackingCodeInstallCheckFailureMessage",e,t)}}});j.render=b;var O=j;
/*!
 * Matomo - free/libre analytics platform
 *
 * @link    https://matomo.org
 * @license https://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later
 */}})}));
//# sourceMappingURL=JsTrackerInstallCheck.umd.min.js.map