31c77fbf918e8a5acd9d8d0dc3ab6b12e091867b9733bd48f987ecc148e4e1cc

Source Code:

!function(e){function t(r){if(i[r])return i[r].exports;var o=i[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){"use strict";t.__esModule=!0;var r=i(1),o=i(3);!function(){var e=window,t="usergram",i="https://tr.usergram.info/_usergram.png";if(!e[t][o.windowProperty.initialized]){e[t][o.windowProperty.initialized]=!0;var n=new r.Controller(e[t]||[],e,i),a=function(){function e(){}return e.prototype.push=function(e){n.push(e)},e.prototype.link=function(e){return n.link(e)},e.prototype.appLink=function(e){return n.appLink(e)},e}(),s=new a;s[o.windowProperty.initialized]=e[t][o.windowProperty.initialized],s[o.windowProperty.scriptLoadStartTime]=e[t][o.windowProperty.scriptLoadStartTime],s[o.windowProperty.loaded]=e[t][o.windowProperty.loaded],e[t]=s}}()},function(e,t,i){"use strict";t.__esModule=!0;var r=i(2),o=i(3),n=i(4),a=i(5),s=i(6),d=function(){function e(e,t,i){this.window=t,this.usage=new r.Usage,this.pidManager=new a.PidManager(t,this.usage),this.sender=this.constructSender(i),this.queue=e,this.processQueue()}return e.prototype.constructSender=function(e){if(this.window.AnalyticsWebInterface)return new s.SenderViaFBAndroid(this.window);if(this.window.webkit&&this.window.webkit.messageHandlers&&this.window.webkit.messageHandlers.firebase)return new s.SenderViaFBIOS(this.window);var t=this.window.document.location.protocol;return"http:"!=t&&"https:"!=t?null:new s.SenderViaImage(e)},e.prototype.processQueue=function(){for(var e=[],t=this.queue,i=0,r=t;i<r.length;i++){var n=r[i];o.isArray(n)&&"send"===n[0]&&e.push(this.send(n.slice(1)))}return this.queue=[],e},e.prototype.send=function(e){var t={method:"send",info:{}};if(null==this.sender)return t;if(!(o.isString(e[0])&&/^(WA|Ug)[0-9A-Za-z]{4}-1$/.test(e[0])&&o.isString(e[1])))return t;var i,r,a=e[0],s=e[1];try{if(s==o.hitTypeMap.pageView)i=e[2]?e[2]:void 0,r=new n.PageView(this.window,this.usage),r.collect(a,this.pidManager,i);else if(s==o.hitTypeMap.conversion){if(!o.isString(e[2]))return{};var d=e[2];i=e[3]?e[3]:void 0,r=new n.Conversion(this.window,this.usage),r.collect(a,this.pidManager,d,i)}else{if(s!=o.hitTypeMap.event)return t;if(!o.isString(e[2]))return{};var c=e[2];i=e[3]?e[3]:void 0,r=new n.Event(this.window,this.usage),r.collect(a,this.pidManager,c,i)}this.sender.send(r)}catch(e){r=new n.ErrorHit(this.window,this.usage),r.collect(a);try{this.sender.send(r)}catch(e){return t}}return t.info={hit:r.name,sender:this.sender.name},t},e.prototype.push=function(e){return this.queue.push(e),this.processQueue()},e.prototype.link=function(e){if(!this.pidManager.available()||!o.isString(e))return e;var t=o.parseUrl(e);return t.queryPairs.push(["ugx",this.pidManager.updatePid()+"."+o.encodeRadixTime((new Date).getTime())]),o.unparseUrl(t)},e.prototype.appLink=function(e){if(!this.pidManager.available()&&o.isString(e))return e;var t=o.parseUrl(e);return t.queryPairs.push(["ugr","1:2:"+this.pidManager.updatePid()+"."+o.encodeRadixTime((new Date).getTime())]),o.unparseUrl(t)},e}();t.Controller=d},function(e,t){"use strict";t.__esModule=!0;var i;!function(e){e[e.USE_PLATFORM_ID=1]="USE_PLATFORM_ID",e[e.NO_PLATFORM_ID=2]="NO_PLATFORM_ID",e[e.HAS_PLATFORM_ID=3]="HAS_PLATFORM_ID",e[e.HAS_MULTIPLE_PLATFORM_IDS=4]="HAS_MULTIPLE_PLATFORM_IDS",e[e.HAS_WRONG_COOKIES=5]="HAS_WRONG_COOKIES",e[e.CANT_SET_PLATFORM_ID=6]="CANT_SET_PLATFORM_ID",e[e.HAS_ADVERTISE_ID=7]="HAS_ADVERTISE_ID",e[e.HAS_REFERRED=8]="HAS_REFERRED",e[e.CROSS_TIMESTAMP_FORMAT_WRONG=9]="CROSS_TIMESTAMP_FORMAT_WRONG",e[e.CROSS_TIMESTAMP_OUT_RANGE=10]="CROSS_TIMESTAMP_OUT_RANGE",e[e.CROSS_TIMESTAMP_IN_RANGE=11]="CROSS_TIMESTAMP_IN_RANGE",e[e.URL_TOO_LONG=12]="URL_TOO_LONG",e[e.NO_PERFORMANCE_TIMING=13]="NO_PERFORMANCE_TIMING",e[e.IS_GOOGLE_CONTENT_EXPERIMENT=14]="IS_GOOGLE_CONTENT_EXPERIMENT",e[e.RESERVED=30]="RESERVED"}(i||(i={})),t.UsageCode=i;var r=function(){function e(){this.reset()}return e.prototype.add=function(e){this.codes[e-1]=!0},e.prototype.encode=function(){for(var t=0,r=0;r<i.RESERVED;r++)this.codes[r]&&(t+=1<<r);return t.toString(e.radix)},e.prototype.reset=function(){this.codes=[],this.codes[i.RESERVED-1]=!0},e.radix=36,e}();t.Usage=r},function(e,t){"use strict";function i(e,t){for(var i=e.cookie.split("; "),r=[],o=0;o<i.length;o++){var n=i[o].split("=");n[0]==t&&r.push(n[1])}return r}function r(e,t,i,r,o,n){var a="";o&&(a=new Date((new Date).getTime()+o).toUTCString()),e.cookie=t+"="+i+(r?"; path="+r:"")+(a?"; expires="+a:"")+(n?"; domain="+n:"")}function o(e){try{return localStorage.getItem(e)}catch(e){}return null}function n(e,t){try{localStorage.setItem(e,t)}catch(e){}}function a(e){var t="",i="",r=null,o=[],n=e.indexOf("#");if(n!=-1&&(t=e.substring(n+1),e=e.substring(0,n)),n=e.indexOf("?"),n!=-1&&(i=e.substring(n+1),e=e.substring(0,n)),""!=i)for(var a=i.split("&"),s=0,d=a;s<d.length;s++){var c=d[s],u=c.split("=");u.length>1&&o.push([u[0],u[1]])}return n=e.indexOf(":"),n!=-1&&(r=e.substring(n+3),n=r.indexOf("/"),n===-1&&(n=r.length),r=r.substring(0,n)||null),{url:e,hostname:r,queryPairs:o,fragment:t}}function s(e){for(var t,i=[],r=0,o=e.queryPairs;r<o.length;r++){var n=o[r];i.push(n.join("="))}return t=i.join("&"),e.url+(t?"?"+t:"")+(e.fragment?"#"+e.fragment:"")}function d(e,t){return void 0===t&&(t=36),e.toString(t)}function c(e,t){return void 0===t&&(t=36),parseInt(e,t)}function u(e){return"[object Object]"===Object.prototype.toString.call(e)}function l(e){var t;for(t in e)return!1;return!0}function p(e){return"[object Function]"===Object.prototype.toString.call(e)}function h(e){return"[object Array]"===Object.prototype.toString.call(e)}function m(e){return"[object String]"===Object.prototype.toString.call(e)}function f(e){return p(encodeURIComponent)?encodeURIComponent(e):e}function g(e){return p(decodeURIComponent)?decodeURIComponent(e):e}function v(e){return"undefined"==typeof e||null==e}t.__esModule=!0,t.getCookie=i,t.setCookie=r,t.getLocalStorage=o,t.setLocalStorage=n,t.parseUrl=a,t.unparseUrl=s,t.encodeRadixTime=d,t.decodeRadixTime=c,t.isObject=u,t.isEmptyObject=l,t.isArray=h,t.isString=m,t.encodeURL=f,t.decodeURL=g,t.empty=v;var y={initialized:"i",scriptLoadStartTime:"s",loaded:"l"};t.windowProperty=y;var _={pageView:"pv",conversion:"cv",event:"event"};t.hitTypeMap=_},function(e,t,i){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();t.__esModule=!0;var o=i(2),n=i(3),a={clientId:"cid",serviceId:"sid",platformId:"pid",crossPlatformId:"xid",hitType:"t",documentReferrer:"dr",documentLocation:"dl",documentTitle:"dt",advertiseId:"aid",conversionParameter:"cv",conversionAttributes:"cva",screenResolution:"sr",navigationType:"nt",currentTime:"ct",timezone:"tz",waitingTime:"wt",interfaceTypeAndVersion:"v",usage:"_u"},s=["waad","waxc","wapr"],d=function(){function e(e,t){this.name="Hit",this.model={},this.orderedParameter=[],this.window=e,this.usage=t,this.model.interfaceTypeAndVersion="js-3";var i=new Date;this.model.currentTime=i.getTime(),this.model.timezone=i.getTimezoneOffset()}return e.prototype.getQuery=function(){for(var e=[],t=0,i=this.orderedParameter;t<i.length;t++){var r=i[t];n.empty(this.model[r])||e.push(a[r]+"="+n.encodeURL(this.model[r]))}if(e.join("&").length>8192)throw this.usage.add(o.UsageCode.URL_TOO_LONG),"URL is too long";return e.join("&")},e.prototype.getParametersForFirebase=function(){for(var e={},t=0,i=this.orderedParameter;t<i.length;t++){var r=i[t];"crossPlatformId"!=r&&(n.empty(this.model[r])||(e[r]=this.model[r].toString().substring(0,100)))}return e},e.prototype.extractPid=function(e){var t,i=e.split(".")[0],r=e.split(".")[1];t=n.decodeRadixTime(r.substring(0,8)),t?(t=(new Date).getTime()-t,0<t&&t<12e4?(this.usage.add(o.UsageCode.CROSS_TIMESTAMP_IN_RANGE),this.model.crossPlatformId=i+"."+r):this.usage.add(o.UsageCode.CROSS_TIMESTAMP_OUT_RANGE)):this.usage.add(o.UsageCode.CROSS_TIMESTAMP_FORMAT_WRONG)},e.prototype.collectWaitimgTime=function(){var e=this.window.performance;return n.empty(e)||n.empty(e.timing)||n.empty(e.timing.navigationStart)?void this.usage.add(o.UsageCode.NO_PERFORMANCE_TIMING):void(n.empty(this.window.usergram)||n.empty(this.window.usergram[n.windowProperty.scriptLoadStartTime])||(this.model.waitingTime=this.window.usergram[n.windowProperty.scriptLoadStartTime]-e.timing.navigationStart))},e.prototype.processUrl=function(e,t){for(var i=n.parseUrl(e),r=[],a=0,d=i.queryPairs;a<d.length;a++){var c=d[a],u=c[0],l=c[1];s.indexOf(u)>=0||(t&&"ugad"==u?(this.usage.add(o.UsageCode.HAS_ADVERTISE_ID),this.model.advertiseId=l):"ugx"==u||"ugr"==u?(this.usage.add(o.UsageCode.HAS_REFERRED),this.extractPid(l)):r.push(c))}return i.queryPairs=r,n.unparseUrl(i)},e}();t.Hit=d;var c=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.name="PageView",r.orderedParameter=["clientId","serviceId","platformId","crossPlatformId","hitType","documentReferrer","documentLocation","documentTitle","advertiseId","screenResolution","navigationType","currentTime","timezone","waitingTime","interfaceTypeAndVersion","usage"],r.model.hitType=n.hitTypeMap.pageView,r}return r(t,e),t.prototype.collect=function(e,t,i){i&&this.processAttributes(i),this.model.clientId=e,t.available()&&(this.model.platformId=t.updatePid());var r=this.window.document;this.model.documentReferrer||n.empty(r.referrer)||(this.model.documentReferrer=r.referrer),this.model.documentTitle||n.empty(r.title)||(this.model.documentTitle=r.title),this.model.documentLocation||n.empty(r.location.href)||(this.model.documentLocation=r.location.href),this.model.documentLocation=this.processUrl(this.model.documentLocation,!0),this.processReferrerForGoogleContentExperiment();var o=this.window.screen;o&&(this.model.screenResolution=o.width.toString()+"x"+o.height.toString());var a=this.window.performance;n.empty(a)||n.empty(a.navigation.type)||(this.model.navigationType=a.navigation.type),this.collectWaitimgTime(),this.model.usage=this.usage.encode()},t.prototype.processAttributes=function(e){if(n.isObject(e)&&!n.isEmptyObject(e))for(var t in e)"serviceId"!=t&&"documentLocation"!=t&&"documentTitle"!=t&&"documentReferrer"!=t||(this.model[t]=e[t])},t.prototype.processReferrerForGoogleContentExperiment=function(){var e=this.model.documentLocation,t=this.model.documentReferrer;if(!n.empty(e)&&""!=e&&!n.empty(t)&&""!=t){for(var i=n.parseUrl(e),r=n.parseUrl(t),a=null,s=!1,d=0,c=i.queryPairs;d<c.length;d++){var u=c[d],l=u[0],p=u[1];"utm_expid"==l&&(s=!0),"utm_referrer"==l&&(a=n.decodeURL(p))}s&&i.hostname==r.hostname&&(n.empty(a)&&(a=""),this.model.documentReferrer=a,this.usage.add(o.UsageCode.IS_GOOGLE_CONTENT_EXPERIMENT))}},t}(d);t.PageView=c;var u=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.name="Conversion",r.orderedParameter=["clientId","serviceId","platformId","crossPlatformId","hitType","conversionParameter","conversionAttributes","documentLocation","currentTime","timezone","waitingTime","interfaceTypeAndVersion","usage"],r.model.hitType=n.hitTypeMap.conversion,r}return r(t,e),t.prototype.collect=function(e,t,i,r){r&&this.processAttributes(r),this.model.clientId=e,t.available()&&(this.model.platformId=t.updatePid());var o=this.window.document;n.empty(o.location.href)||(this.model.documentLocation=this.processUrl(o.location.href,!1)),this.model.conversionParameter=i,this.collectWaitimgTime(),this.model.usage=this.usage.encode()},t.prototype.processAttributes=function(e){if(n.isObject(e)&&!n.isEmptyObject(e)){var t={};for(var i in e)"serviceId"==i?this.model[i]=e[i]:"documentLocation"==i||"documentTitle"==i||"documentReferrer"==i||(t[i]=e[i]);n.isEmptyObject(t)||(this.model.conversionAttributes=JSON.stringify(t))}},t}(d);t.Conversion=u;var l=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.name="Event",r.orderedParameter=["clientId","serviceId","platformId","crossPlatformId","hitType","conversionParameter","documentLocation","currentTime","timezone","waitingTime","interfaceTypeAndVersion","usage"],r.model.hitType=n.hitTypeMap.event,r}return r(t,e),t.prototype.collect=function(e,t,i,r){r&&this.processAttributes(r),this.model.clientId=e,t.available()&&(this.model.platformId=t.updatePid());var o=this.window.document;n.empty(o.location.href)||(this.model.documentLocation=this.processUrl(o.location.href,!1)),this.model.conversionParameter=i,this.collectWaitimgTime(),this.model.usage=this.usage.encode()},t.prototype.processAttributes=function(e){if(n.isObject(e)&&!n.isEmptyObject(e))for(var t in e)"serviceId"==t&&(this.model[t]=e[t])},t}(d);t.Event=l;var p=function(e){function t(t,i){var r=e.call(this,t,i)||this;return r.name="ErrorHit",r.orderedParameter=["clientId","hitType","documentLocation","currentTime","timezone","waitingTime","interfaceTypeAndVersion","usage"],r.model.hitType="err",r}return r(t,e),t.prototype.collect=function(e){this.model.clientId=e;var t=this.window.document;n.empty(t.location.href)||(this.model.documentLocation=t.location.href),this.collectWaitimgTime(),this.model.usage=this.usage.encode()},t}(d);t.ErrorHit=p},function(e,t,i){"use strict";t.__esModule=!0;var r=i(2),o=i(3),n=function(){function e(e,t){this.window=e,this.usage=t,this.checkAvailability()}return e.prototype.available=function(){return this._available},e.prototype.checkAvailability=function(){var e=this.window.navigator.userAgent?this.window.navigator.userAgent:"";return e.indexOf("Mac")!==-1&&e.indexOf("AppleWebKit")!==-1&&e.indexOf("Chrome")==-1?(this.usage.add(r.UsageCode.USE_PLATFORM_ID),void(this._available=!0)):void(this._available=!1)},e.prototype.updatePid=function(){var t,i=o.getCookie(this.window.document,e.cookieKey),n=this.getDomains(),a=o.getLocalStorage(e.cookieKey);if(a&&".1"!=a.substring(a.length-2)&&i.push(a),0==i.length){this.usage.add(r.UsageCode.NO_PLATFORM_ID);var s=e.createPid();a&&16==a.split(e.cookieDelim)[0].length&&(s=a.split(e.cookieDelim)[0]);for(var d=0;d<n.length+1;d++)if(t=s+e.cookieDelim+(d==n.length?0:d+1),o.setCookie(this.window.document,e.cookieKey,t,"/",63072e6,n[d]),i=o.getCookie(this.window.document,e.cookieKey),0!=i.length)return o.setLocalStorage(e.cookieKey,t),t=i[0],t.split(e.cookieDelim)[0];throw this.usage.add(r.UsageCode.CANT_SET_PLATFORM_ID),this._available=!1,r.UsageCode.CANT_SET_PLATFORM_ID}t=this.selectCookie(i);var c=parseInt(t.split(e.cookieDelim)[1]),u=0==c?void 0:n[c-1];return o.setCookie(this.window.document,e.cookieKey,t,"/",63072e6,u),o.setLocalStorage(e.cookieKey,t),t.split(e.cookieDelim)[0]},e.createPid=function(){for(var t="",i=(new Date).getTime(),r=0;r<7;r++)t=e.radixStr.charAt(i%e.radixNum)+t,i=Math.floor(i/e.radixNum);for(var r=0;r<9;r++)t+=e.radixStr.charAt(Math.floor(Math.random()*e.radixNum));return t},e.prototype.selectCookie=function(t){var i,o=!1,n=0,a=1/0;t.length>1&&this.usage.add(r.UsageCode.HAS_MULTIPLE_PLATFORM_IDS);for(var s=0;s<t.length;s++){var d=t[s].split(e.cookieDelim);d.length>=2&&16==d[0].length&&1==d[1].length&&(o=!0,i=parseInt(d[1]),i=i>0?i:1/0,a>i&&(n=s,a=i))}if(!o)throw this.usage.add(r.UsageCode.HAS_WRONG_COOKIES),this._available=!1,r.UsageCode.HAS_WRONG_COOKIES;return this.usage.add(r.UsageCode.HAS_PLATFORM_ID),t[n]},e.prototype.getDomains=function(){for(var e=[],t=this.window.document.domain,i=1/0;i!=-1;)i=t.lastIndexOf(".",i-1),e.push(t.substring(i+1));return e},e.radixNum=62,e.radixStr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",e.cookieKey="_ugpid",e.cookieDelim=".",e}();t.PidManager=n},function(e,t,i){"use strict";var r=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])};return function(t,i){function r(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(r.prototype=i.prototype,new r)}}();t.__esModule=!0;var o=i(2),n=function(){function e(){this.name="Sender"}return e}();t.Sender=n;var a;!function(e){e[e.QUEUED=0]="QUEUED",e[e.SENDING=1]="SENDING",e[e.COMPLETE=2]="COMPLETE"}(a||(a={}));var s=function(e){function t(t){var i=e.call(this)||this;return i.name="SenderViaImage",i.imageElements=[],i.onFunc=function(){for(var e=0,t=i.imageElements;e<t.length;e++){var r=t[e];if(r.status==a.SENDING)return r.status=a.COMPLETE,void i.process()}},i.src=t,i}return r(t,e),t.prototype.getPayload=function(e){return e.getQuery()},t.prototype.validate=function(e){var t=e.getQuery();if(t.length>8192)throw o.UsageCode.URL_TOO_LONG},t.prototype.send=function(e){this.imageElements.push({query:this.getPayload(e),status:a.QUEUED}),this.process()},t.prototype.process=function(){for(var e=0,t=this.imageElements;e<t.length;e++){var i=t[e];if(i.status==a.SENDING)return;if(i.status==a.QUEUED)return i.status=a.SENDING,void this.loadImage(i.query,this.onFunc)}},t.prototype.loadImage=function(e,t){var i=new Image(1,1);i.src=this.src+"?"+e,i.onload=i.onerror=function(){t(),i.onload=null,i.onerror=null}},t}(n);t.SenderViaImage=s;var d="ug_webview",c=function(e){function t(t){var i=e.call(this)||this;return i.name="SenderViaFBIOS",i.window=t,i}return r(t,e),t.prototype.validate=function(e){},t.prototype.getPayload=function(e){return e.getParametersForFirebase()},t.prototype.send=function(e){this.window.webkit.messageHandlers.firebase.postMessage({command:"logEvent",name:d,parameters:this.getPayload(e)})},t}(n);t.SenderViaFBIOS=c;var u=function(e){function t(t){var i=e.call(this)||this;return i.name="SenderViaFBAndroid",i.window=t,i}return r(t,e),t.prototype.validate=function(e){},t.prototype.getPayload=function(e){return e.getParametersForFirebase()},t.prototype.send=function(e){this.window.AnalyticsWebInterface.logEvent(d,JSON.stringify(this.getPayload(e)))},t}(n);t.SenderViaFBAndroid=u}]);