Socket
Socket
Sign inDemoInstall

@dcard/web-ad-tracking-sdk

Package Overview
Dependencies
19
Maintainers
7
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.2 to 1.3.3

2

build/dadk.iife.js

@@ -16,2 +16,2 @@ !function(){"use strict";

***************************************************************************** */function t(t,n,r,e){return new(r||(r=Promise))((function(o,i){function u(t){try{a(e.next(t))}catch(t){i(t)}}function c(t){try{a(e.throw(t))}catch(t){i(t)}}function a(t){var n;t.done?o(t.value):(n=t.value,n instanceof r?n:new r((function(t){t(n)}))).then(u,c)}a((e=e.apply(t,n||[])).next())}))}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},r=function(t){return t&&t.Math==Math&&t},e=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof n&&n)||function(){return this}()||Function("return this")(),o=Function.prototype,i=o.bind,u=o.call,c=i&&i.bind(u),a=i?function(t){return t&&c(u,t)}:function(t){return t&&function(){return u.apply(t,arguments)}},f=function(t){try{return!!t()}catch(t){return!0}},s=function(t){return"function"==typeof t},p=e.String,l=function(t){try{return p(t)}catch(t){return"Object"}},y=s,d=l,v=e.TypeError,b=function(t){if(y(t))return t;throw v(d(t)+" is not a function")},h=a([].slice),g=Math.floor,w=function(t,n){var r=t.length,e=g(r/2);return r<8?m(t,n):j(t,w(h(t,0,e),n),w(h(t,e),n),n)},m=function(t,n){for(var r,e,o=t.length,i=1;i<o;){for(e=i,r=t[i];e&&n(t[e-1],r)>0;)t[e]=t[--e];e!==i++&&(t[e]=r)}return t},j=function(t,n,r,e){for(var o=n.length,i=r.length,u=0,c=0;u<o||c<i;)t[u+c]=u<o&&c<i?e(n[u],r[c])<=0?n[u++]:r[c++]:u<o?n[u++]:r[c++];return t},O=w,S="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView,A=!f((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),T=s,C=function(t){return"object"==typeof t?null!==t:T(t)},x=e.TypeError,I=function(t){if(null==t)throw x("Can't call method on "+t);return t},P=e.Object,E=function(t){return P(I(t))},R=E,U=a({}.hasOwnProperty),F=Object.hasOwn||function(t,n){return U(R(t),n)},_={exports:{}},D=e,k=Object.defineProperty,M=function(t,n){try{k(D,t,{value:n,configurable:!0,writable:!0})}catch(r){D[t]=n}return n},B=M,L="__core-js_shared__",N=e[L]||B(L,{}),V=N;(_.exports=function(t,n){return V[t]||(V[t]=void 0!==n?n:{})})("versions",[]).push({version:"3.19.1",mode:"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"});var q,$,Y=a,z=0,G=Math.random(),W=Y(1..toString),K=function(t){return"Symbol("+(void 0===t?"":t)+")_"+W(++z+G,36)},X=e,H=s,J=function(t){return H(t)?t:void 0},Q=function(t,n){return arguments.length<2?J(X[t]):X[t]&&X[t][n]},Z=Q("navigator","userAgent")||"",tt=e,nt=Z,rt=tt.process,et=tt.Deno,ot=rt&&rt.versions||et&&et.version,it=ot&&ot.v8;it&&($=(q=it.split("."))[0]>0&&q[0]<4?1:+(q[0]+q[1])),!$&&nt&&(!(q=nt.match(/Edge\/(\d+)/))||q[1]>=74)&&(q=nt.match(/Chrome\/(\d+)/))&&($=+q[1]);var ut=$,ct=ut,at=f,ft=!!Object.getOwnPropertySymbols&&!at((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&ct&&ct<41})),st=ft&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,pt=e,lt=_.exports,yt=F,dt=K,vt=ft,bt=st,ht=lt("wks"),gt=pt.Symbol,wt=gt&&gt.for,mt=bt?gt:gt&&gt.withoutSetter||dt,jt=function(t){if(!yt(ht,t)||!vt&&"string"!=typeof ht[t]){var n="Symbol."+t;vt&&yt(gt,t)?ht[t]=gt[t]:ht[t]=bt&&wt?wt(n):mt(n)}return ht[t]},Ot={};Ot[jt("toStringTag")]="z";var St="[object z]"===String(Ot),At=a,Tt=At({}.toString),Ct=At("".slice),xt=e,It=St,Pt=s,Et=function(t){return Ct(Tt(t),8,-1)},Rt=jt("toStringTag"),Ut=xt.Object,Ft="Arguments"==Et(function(){return arguments}()),_t=It?Et:function(t){var n,r,e;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(r=function(t,n){try{return t[n]}catch(t){}}(n=Ut(t),Rt))?r:Ft?Et(n):"Object"==(e=Et(n))&&Pt(n.callee)?"Arguments":e},Dt={},kt=C,Mt=e.document,Bt=kt(Mt)&&kt(Mt.createElement),Lt=function(t){return Bt?Mt.createElement(t):{}},Nt=!A&&!f((function(){return 7!=Object.defineProperty(Lt("div"),"a",{get:function(){return 7}}).a})),Vt=e,qt=C,$t=Vt.String,Yt=Vt.TypeError,zt=function(t){if(qt(t))return t;throw Yt($t(t)+" is not an object")},Gt=Function.prototype.call,Wt=Gt.bind?Gt.bind(Gt):function(){return Gt.apply(Gt,arguments)},Kt=a({}.isPrototypeOf),Xt=Q,Ht=s,Jt=Kt,Qt=st,Zt=e.Object,tn=Qt?function(t){return"symbol"==typeof t}:function(t){var n=Xt("Symbol");return Ht(n)&&Jt(n.prototype,Zt(t))},nn=b,rn=Wt,en=s,on=C,un=e.TypeError,cn=Wt,an=C,fn=tn,sn=function(t,n){var r=t[n];return null==r?void 0:nn(r)},pn=function(t,n){var r,e;if("string"===n&&en(r=t.toString)&&!on(e=rn(r,t)))return e;if(en(r=t.valueOf)&&!on(e=rn(r,t)))return e;if("string"!==n&&en(r=t.toString)&&!on(e=rn(r,t)))return e;throw un("Can't convert object to primitive value")},ln=jt,yn=e.TypeError,dn=ln("toPrimitive"),vn=function(t,n){if(!an(t)||fn(t))return t;var r,e=sn(t,dn);if(e){if(void 0===n&&(n="default"),r=cn(e,t,n),!an(r)||fn(r))return r;throw yn("Can't convert object to primitive value")}return void 0===n&&(n="number"),pn(t,n)},bn=tn,hn=A,gn=Nt,wn=zt,mn=function(t){var n=vn(t,"string");return bn(n)?n:n+""},jn=e.TypeError,On=Object.defineProperty;Dt.f=hn?On:function(t,n,r){if(wn(t),n=mn(n),wn(r),gn)try{return On(t,n,r)}catch(t){}if("get"in r||"set"in r)throw jn("Accessors not supported");return"value"in r&&(t[n]=r.value),t};var Sn=Dt,An=function(t,n){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:n}},Tn=A?function(t,n,r){return Sn.f(t,n,An(1,r))}:function(t,n,r){return t[n]=r,t},Cn={exports:{}},xn=s,In=N,Pn=a(Function.toString);xn(In.inspectSource)||(In.inspectSource=function(t){return Pn(t)});var En,Rn,Un,Fn=In.inspectSource,_n=s,Dn=Fn,kn=e.WeakMap,Mn=_n(kn)&&/native code/.test(Dn(kn)),Bn=_.exports,Ln=K,Nn=Bn("keys"),Vn=function(t){return Nn[t]||(Nn[t]=Ln(t))},qn=Mn,$n=e,Yn=a,zn=C,Gn=Tn,Wn=F,Kn=N,Xn=Vn,Hn={},Jn="Object already initialized",Qn=$n.TypeError,Zn=$n.WeakMap;if(qn||Kn.state){var tr=Kn.state||(Kn.state=new Zn),nr=Yn(tr.get),rr=Yn(tr.has),er=Yn(tr.set);En=function(t,n){if(rr(tr,t))throw new Qn(Jn);return n.facade=t,er(tr,t,n),n},Rn=function(t){return nr(tr,t)||{}},Un=function(t){return rr(tr,t)}}else{var or=Xn("state");Hn[or]=!0,En=function(t,n){if(Wn(t,or))throw new Qn(Jn);return n.facade=t,Gn(t,or,n),n},Rn=function(t){return Wn(t,or)?t[or]:{}},Un=function(t){return Wn(t,or)}}var ir={set:En,get:Rn,has:Un,enforce:function(t){return Un(t)?Rn(t):En(t,{})},getterFor:function(t){return function(n){var r;if(!zn(n)||(r=Rn(n)).type!==t)throw Qn("Incompatible receiver, "+t+" required");return r}}},ur=A,cr=F,ar=Function.prototype,fr=ur&&Object.getOwnPropertyDescriptor,sr=cr(ar,"name"),pr=sr&&"something"===function(){}.name,lr=sr&&(!ur||ur&&fr(ar,"name").configurable),yr=e,dr=s,vr=F,br=Tn,hr=M,gr=Fn,wr={EXISTS:sr,PROPER:pr,CONFIGURABLE:lr}.CONFIGURABLE,mr=ir.get,jr=ir.enforce,Or=String(String).split("String");(Cn.exports=function(t,n,r,e){var o,i=!!e&&!!e.unsafe,u=!!e&&!!e.enumerable,c=!!e&&!!e.noTargetGet,a=e&&void 0!==e.name?e.name:n;dr(r)&&("Symbol("===String(a).slice(0,7)&&(a="["+String(a).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),(!vr(r,"name")||wr&&r.name!==a)&&br(r,"name",a),(o=jr(r)).source||(o.source=Or.join("string"==typeof a?a:""))),t!==yr?(i?!c&&t[n]&&(u=!0):delete t[n],u?t[n]=r:br(t,n,r)):u?t[n]=r:hr(n,r)})(Function.prototype,"toString",(function(){return dr(this)&&mr(this).source||gr(this)}));var Sr,Ar,Tr,Cr=!f((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})),xr=e,Ir=F,Pr=s,Er=E,Rr=Cr,Ur=Vn("IE_PROTO"),Fr=xr.Object,_r=Fr.prototype,Dr=Rr?Fr.getPrototypeOf:function(t){var n=Er(t);if(Ir(n,Ur))return n[Ur];var r=n.constructor;return Pr(r)&&n instanceof r?r.prototype:n instanceof Fr?_r:null},kr=e,Mr=s,Br=kr.String,Lr=kr.TypeError,Nr=a,Vr=zt,qr=function(t){if("object"==typeof t||Mr(t))return t;throw Lr("Can't set "+Br(t)+" as a prototype")},$r=Object.setPrototypeOf||("__proto__"in{}?function(){var t,n=!1,r={};try{(t=Nr(Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set))(r,[]),n=r instanceof Array}catch(t){}return function(r,e){return Vr(r),qr(e),n?t(r,e):r.__proto__=e,r}}():void 0),Yr=S,zr=A,Gr=e,Wr=s,Kr=C,Xr=F,Hr=_t,Jr=l,Qr=Tn,Zr=Cn.exports,te=Dt.f,ne=Kt,re=Dr,ee=$r,oe=jt,ie=K,ue=Gr.Int8Array,ce=ue&&ue.prototype,ae=Gr.Uint8ClampedArray,fe=ae&&ae.prototype,se=ue&&re(ue),pe=ce&&re(ce),le=Object.prototype,ye=Gr.TypeError,de=oe("toStringTag"),ve=ie("TYPED_ARRAY_TAG"),be=ie("TYPED_ARRAY_CONSTRUCTOR"),he=Yr&&!!ee&&"Opera"!==Hr(Gr.opera),ge=!1,we={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},me={BigInt64Array:8,BigUint64Array:8},je=function(t){if(!Kr(t))return!1;var n=Hr(t);return Xr(we,n)||Xr(me,n)};for(Sr in we)(Tr=(Ar=Gr[Sr])&&Ar.prototype)?Qr(Tr,be,Ar):he=!1;for(Sr in me)(Tr=(Ar=Gr[Sr])&&Ar.prototype)&&Qr(Tr,be,Ar);if((!he||!Wr(se)||se===Function.prototype)&&(se=function(){throw ye("Incorrect invocation")},he))for(Sr in we)Gr[Sr]&&ee(Gr[Sr],se);if((!he||!pe||pe===le)&&(pe=se.prototype,he))for(Sr in we)Gr[Sr]&&ee(Gr[Sr].prototype,pe);if(he&&re(fe)!==pe&&ee(fe,pe),zr&&!Xr(pe,de))for(Sr in ge=!0,te(pe,de,{get:function(){return Kr(this)?this[ve]:void 0}}),we)Gr[Sr]&&Qr(Gr[Sr],ve,Sr);var Oe,Se={NATIVE_ARRAY_BUFFER_VIEWS:he,TYPED_ARRAY_CONSTRUCTOR:be,TYPED_ARRAY_TAG:ge&&ve,aTypedArray:function(t){if(je(t))return t;throw ye("Target is not a typed array")},aTypedArrayConstructor:function(t){if(Wr(t)&&(!ee||ne(se,t)))return t;throw ye(Jr(t)+" is not a typed array constructor")},exportTypedArrayMethod:function(t,n,r){if(zr){if(r)for(var e in we){var o=Gr[e];if(o&&Xr(o.prototype,t))try{delete o.prototype[t]}catch(t){}}pe[t]&&!r||Zr(pe,t,r?n:he&&ce[t]||n)}},exportTypedArrayStaticMethod:function(t,n,r){var e,o;if(zr){if(ee){if(r)for(e in we)if((o=Gr[e])&&Xr(o,t))try{delete o[t]}catch(t){}if(se[t]&&!r)return;try{return Zr(se,t,r?n:he&&se[t]||n)}catch(t){}}for(e in we)!(o=Gr[e])||o[t]&&!r||Zr(o,t,n)}},isView:function(t){if(!Kr(t))return!1;var n=Hr(t);return"DataView"===n||Xr(we,n)||Xr(me,n)},isTypedArray:je,TypedArray:se,TypedArrayPrototype:pe},Ae=Z.match(/firefox\/(\d+)/i),Te=!!Ae&&+Ae[1],Ce=/MSIE|Trident/.test(Z),xe=Z.match(/AppleWebKit\/(\d+)\./),Ie=!!xe&&+xe[1],Pe=e,Ee=a,Re=f,Ue=b,Fe=O,_e=Se,De=Te,ke=Ce,Me=ut,Be=Ie,Le=Pe.Array,Ne=_e.aTypedArray,Ve=_e.exportTypedArrayMethod,qe=Pe.Uint16Array,$e=qe&&Ee(qe.prototype.sort),Ye=!(!$e||Re((function(){$e(new qe(2),null)}))&&Re((function(){$e(new qe(2),{})}))),ze=!!$e&&!Re((function(){if(Me)return Me<74;if(De)return De<67;if(ke)return!0;if(Be)return Be<602;var t,n,r=new qe(516),e=Le(516);for(t=0;t<516;t++)n=t%4,r[t]=515-t,e[t]=t-2*n+3;for($e(r,(function(t,n){return(t/4|0)-(n/4|0)})),t=0;t<516;t++)if(r[t]!==e[t])return!0}));Ve("sort",(function(t){return void 0!==t&&Ue(t),ze?$e(this,t):Fe(Ne(this),function(t){return function(n,r){return void 0!==t?+t(n,r)||0:r!=r?-1:n!=n?1:0===n&&0===r?1/n>0&&1/r<0?1:-1:n>r}}(t))}),!ze||Ye);var Ge=new Uint8Array(16);function We(){if(!Oe&&!(Oe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Oe(Ge)}var Ke=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function Xe(t){return"string"==typeof t&&Ke.test(t)}for(var He=[],Je=0;Je<256;++Je)He.push((Je+256).toString(16).substr(1));function Qe(t,n,r){var e=(t=t||{}).random||(t.rng||We)();if(e[6]=15&e[6]|64,e[8]=63&e[8]|128,n){r=r||0;for(var o=0;o<16;++o)n[r+o]=e[o];return n}return function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(He[t[n+0]]+He[t[n+1]]+He[t[n+2]]+He[t[n+3]]+"-"+He[t[n+4]]+He[t[n+5]]+"-"+He[t[n+6]]+He[t[n+7]]+"-"+He[t[n+8]]+He[t[n+9]]+"-"+He[t[n+10]]+He[t[n+11]]+He[t[n+12]]+He[t[n+13]]+He[t[n+14]]+He[t[n+15]]).toLowerCase();if(!Xe(r))throw TypeError("Stringified UUID is invalid");return r}(e)}var Ze=function(t,n){for(var r=-1,e=null==t?0:t.length;++r<e&&!1!==n(t[r],r,t););return t};var to=function(t){return function(n,r,e){for(var o=-1,i=Object(n),u=e(n),c=u.length;c--;){var a=u[t?c:++o];if(!1===r(i[a],a,i))break}return n}}();var no=function(t,n){for(var r=-1,e=Array(t);++r<t;)e[r]=n(r);return e},ro="object"==typeof n&&n&&n.Object===Object&&n,eo=ro,oo="object"==typeof self&&self&&self.Object===Object&&self,io=eo||oo||Function("return this")(),uo=io.Symbol,co=uo,ao=Object.prototype,fo=ao.hasOwnProperty,so=ao.toString,po=co?co.toStringTag:void 0;var lo=function(t){var n=fo.call(t,po),r=t[po];try{t[po]=void 0;var e=!0}catch(t){}var o=so.call(t);return e&&(n?t[po]=r:delete t[po]),o},yo=Object.prototype.toString;var vo=lo,bo=function(t){return yo.call(t)},ho=uo?uo.toStringTag:void 0;var go=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":ho&&ho in Object(t)?vo(t):bo(t)};var wo=function(t){return null!=t&&"object"==typeof t},mo=go,jo=wo;var Oo=function(t){return jo(t)&&"[object Arguments]"==mo(t)},So=wo,Ao=Object.prototype,To=Ao.hasOwnProperty,Co=Ao.propertyIsEnumerable,xo=Oo(function(){return arguments}())?Oo:function(t){return So(t)&&To.call(t,"callee")&&!Co.call(t,"callee")},Io=xo,Po=Array.isArray,Eo={exports:{}};var Ro=function(){return!1};!function(t,n){var r=io,e=Ro,o=n&&!n.nodeType&&n,i=o&&t&&!t.nodeType&&t,u=i&&i.exports===o?r.Buffer:void 0,c=(u?u.isBuffer:void 0)||e;t.exports=c}(Eo,Eo.exports);var Uo=/^(?:0|[1-9]\d*)$/;var Fo=function(t,n){var r=typeof t;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&Uo.test(t))&&t>-1&&t%1==0&&t<n};var _o=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},Do=go,ko=_o,Mo=wo,Bo={};Bo["[object Float32Array]"]=Bo["[object Float64Array]"]=Bo["[object Int8Array]"]=Bo["[object Int16Array]"]=Bo["[object Int32Array]"]=Bo["[object Uint8Array]"]=Bo["[object Uint8ClampedArray]"]=Bo["[object Uint16Array]"]=Bo["[object Uint32Array]"]=!0,Bo["[object Arguments]"]=Bo["[object Array]"]=Bo["[object ArrayBuffer]"]=Bo["[object Boolean]"]=Bo["[object DataView]"]=Bo["[object Date]"]=Bo["[object Error]"]=Bo["[object Function]"]=Bo["[object Map]"]=Bo["[object Number]"]=Bo["[object Object]"]=Bo["[object RegExp]"]=Bo["[object Set]"]=Bo["[object String]"]=Bo["[object WeakMap]"]=!1;var Lo=function(t){return Mo(t)&&ko(t.length)&&!!Bo[Do(t)]};var No=function(t){return function(n){return t(n)}},Vo={exports:{}};!function(t,n){var r=ro,e=n&&!n.nodeType&&n,o=e&&t&&!t.nodeType&&t,i=o&&o.exports===e&&r.process,u=function(){try{var t=o&&o.require&&o.require("util").types;return t||i&&i.binding&&i.binding("util")}catch(t){}}();t.exports=u}(Vo,Vo.exports);var qo=Lo,$o=No,Yo=Vo.exports,zo=Yo&&Yo.isTypedArray,Go=zo?$o(zo):qo,Wo=no,Ko=Io,Xo=Po,Ho=Eo.exports,Jo=Fo,Qo=Go,Zo=Object.prototype.hasOwnProperty;var ti=function(t,n){var r=Xo(t),e=!r&&Ko(t),o=!r&&!e&&Ho(t),i=!r&&!e&&!o&&Qo(t),u=r||e||o||i,c=u?Wo(t.length,String):[],a=c.length;for(var f in t)!n&&!Zo.call(t,f)||u&&("length"==f||o&&("offset"==f||"parent"==f)||i&&("buffer"==f||"byteLength"==f||"byteOffset"==f)||Jo(f,a))||c.push(f);return c},ni=Object.prototype;var ri=function(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||ni)};var ei=function(t,n){return function(r){return t(n(r))}},oi=ei(Object.keys,Object),ii=ri,ui=oi,ci=Object.prototype.hasOwnProperty;var ai=go,fi=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)};var si=function(t){if(!fi(t))return!1;var n=ai(t);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n},pi=si,li=_o;var yi=function(t){return null!=t&&li(t.length)&&!pi(t)},di=ti,vi=function(t){if(!ii(t))return ui(t);var n=[];for(var r in Object(t))ci.call(t,r)&&"constructor"!=r&&n.push(r);return n},bi=yi;var hi=to,gi=function(t){return bi(t)?di(t):vi(t)};var wi=yi;var mi=function(t,n){return function(r,e){if(null==r)return r;if(!wi(r))return t(r,e);for(var o=r.length,i=n?o:-1,u=Object(r);(n?i--:++i<o)&&!1!==e(u[i],i,u););return r}}((function(t,n){return t&&hi(t,n,gi)}));var ji=function(t){return t};var Oi=Ze,Si=mi,Ai=function(t){return"function"==typeof t?t:ji},Ti=Po;var Ci=function(t,n){return(Ti(t)?Oi:Si)(t,Ai(n))},xi=go,Ii=Po,Pi=wo;var Ei=function(t){return"string"==typeof t||!Ii(t)&&Pi(t)&&"[object String]"==xi(t)},Ri=io.isFinite;var Ui=function(t){return"number"==typeof t&&Ri(t)},Fi=ei(Object.getPrototypeOf,Object),_i=go,Di=Fi,ki=wo,Mi=Function.prototype,Bi=Object.prototype,Li=Mi.toString,Ni=Bi.hasOwnProperty,Vi=Li.call(Object);const qi=function(t){if(!ki(t)||"[object Object]"!=_i(t))return!1;var n=Di(t);if(null===n)return!0;var r=Ni.call(n,"constructor")&&n.constructor;return"function"==typeof r&&r instanceof r&&Li.call(r)==Vi};function $i(t,n){if(!Po(t))return!1;for(let r=0;r<t.length;++r)if(!n(t[r],r,t))return!1;return!0}function Yi(t){return Ui(t)}const zi={};function Gi(n){return t(this,void 0,void 0,(function*(){return new Promise((t=>{setTimeout((()=>{t()}),n)}))}))}function Wi(n,{maxDelay:r=500,numOfAttempts:e=3}){return t(this,void 0,void 0,(function*(){try{return void(yield n())}catch(t){}const t=`${r}-${e}`;zi[t]||(zi[t]=function(t,n){const r=[t];let e=t,o=n;for(;o>0&&(e=Math.floor(e/(2+1/n)),!(e<20));)r.unshift(e),o--;return r}(r,e));const o=zi[t];for(let t=0;t<e;++t)try{const r=Math.min(t,o.length-2),e=o[r],i=o[r+1]-e+1;return yield Gi(Math.floor(e+Math.random()*i)),void(yield n())}catch(t){}}))}
/*! js-cookie v3.0.1 | MIT */function Ki(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)t[e]=r[e]}return t}var Xi=function t(n,r){function e(t,e,o){if("undefined"!=typeof document){"number"==typeof(o=Ki({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var u in o)o[u]&&(i+="; "+u,!0!==o[u]&&(i+="="+o[u].split(";")[0]));return document.cookie=t+"="+n.write(e,t)+i}}return Object.create({set:e,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var r=document.cookie?document.cookie.split("; "):[],e={},o=0;o<r.length;o++){var i=r[o].split("="),u=i.slice(1).join("=");try{var c=decodeURIComponent(i[0]);if(e[c]=n.read(u,c),t===c)break}catch(t){}}return t?e[t]:e}},remove:function(t,n){e(t,"",Ki({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,Ki({},this.attributes,n))},withConverter:function(n){return t(Ki({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const Hi="dcard-adkt-device";function Ji(){return Xi.get(Hi)||!1}function Qi(t){try{if("localStorage"in window&&si(window.localStorage.setItem))return void window.localStorage.setItem(Hi,t)}finally{!function(t){try{Xi.set(Hi,t,{expires:365,secure:!0,sameSite:"Strict"})}catch(t){}}(t)}}var Zi=function(t){return void 0===t},tu=go,nu=wo;var ru=function(t){return!0===t||!1===t||nu(t)&&"[object Boolean]"==tu(t)},eu=go,ou=wo;var iu=function(t){return"number"==typeof t||ou(t)&&"[object Number]"==eu(t)};var uu=function(t){return null==t};function cu(t,n){const r={};return Ci(t,((e,o)=>{const i=e;if(!function(t,n){return!!qi(t)&&Object.prototype.hasOwnProperty.call(t,n)}(n,o))return;const[u,c]=n[o];try{if(Zi(i))return;u(i)?r[o]=i:(r[o]=c(i),function(t,n){console.warn(`[DADK] the value of the ${n} key is not expected, converting to the required type`,t[n])}(t,o))}catch(n){!function(t,n){console.error(`[DADK] Failed to convert the value of the ${n} to the required type`,t[n])}(t,o)}})),r}function au(t){if(!(iu(t)||ru(t)||uu(t)||Ei(t)))throw new Error("Only primitive types are accepted");return String(t)}function fu(t){if(!(Ei(t)||ru(t)||uu(t)||iu(t)))throw new Error("Only primitive types are accepted");const n=Number(t);return n!=n?0:n}function su(t){return!!t}const pu={contentIds:[function(t){return Po(t)&&$i(t,(t=>Ei(t)))},t=>{const n=Po(t)?t:[t],r=[];return Ci(n,(t=>{r.push(au(t))})),r}],contents:[function(t){return Po(t)&&$i(t,(t=>qi(t)&&$i(function(t){if(!qi(t))return[];const n=[];return Ci(t,((t,r)=>{n.push([r,t])})),n}(t),(([,t])=>Ei(t)||Yi(t)))))},t=>{if(Zi(t))return[];const n=Po(t)?t:[t],r=[];return Ci(n,(t=>{if(!qi(t))return;const n={};Ci(t,((t,r)=>{n[r]=Ei(t)||Yi(t)?t:au(t)})),r.push(n)})),r}]},lu=[Ei,au],yu=[Yi,fu],du=[Yi,function(t){return Math.floor(fu(t))}];function vu(){return{}}function bu(t){return n=>qi(n)?t(n):{}}const hu={AddToCart:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,currency:lu,value:yu}))})),AddToWishList:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,currency:lu,value:lu}))})),CompleteRegistration:bu((function(t){return cu(t,{contentName:lu,currency:lu,status:[ru,su],value:yu})})),Contact:bu(vu),CustomizeProduct:bu(vu),Donate:bu(vu),FindLocation:bu(vu),InitiateCheckout:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,currency:lu,numItems:du,value:yu}))})),Load:bu(vu),PageView:function(t){const n=qi(t);if(n&&Ei(t.url))return t;const r=n?t:{};return Object.assign(Object.assign({},r),{url:window.location.href})},Purchase:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentName:lu,contentType:lu,currency:lu,numItems:du,value:yu}))})),Schedule:bu(vu),Search:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,currency:lu,searchString:lu,value:yu}))})),StartTrial:bu((function(t){return cu(t,{currency:lu,predictedLtv:yu,value:yu})})),SubmitApplication:bu(vu),Subscribe:bu((function(t){return cu(t,{currency:lu,predictedLtv:yu,value:yu})})),ViewContent:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,contentName:lu,contentType:lu,currency:lu,value:yu}))}))},gu="https://www.dcard.tw";let wu="";"undefined"!=typeof window&&(wu=function(){let t=function(){try{return"localStorage"in window&&si(window.localStorage.getItem)?window.localStorage.getItem(Hi)||"":Ji()}catch(t){return Ji()}}();return t||(t=Qe(),Qi(t)),t}());let mu="";function ju(){return(new Date).toISOString()}function Ou(t){if(Po(n=t)&&"init"===n[0])return[,mu]=t,{createdAt:ju(),businessClientId:mu};var n;if(function(t){return Po(t)&&"track"===t[0]}(t))return{createdAt:ju(),id:Qe(),type:t[1],payload:hu[t[1]](t[2])};throw new Error(`${t[0]} is not an valid command`)}function Su(n,r){return t(this,void 0,void 0,(function*(){si(window.navigator.sendBeacon)&&window.navigator.sendBeacon(n,r)||(yield function(t,n){const r=new XMLHttpRequest;r.open("POST",t),r.send(n);let e=null,o=null;const i=new Promise(((t,n)=>{e=t,o=n}));return r.addEventListener("load",(()=>{null==e||e()})),r.addEventListener("error",(()=>{null==o||o()})),i}(n,r))}))}function Au(t,n){Wi((()=>Su(t,n)),{maxDelay:1e3,numOfAttempts:2})}function Tu(t){const{createdAt:n}=t,r=new FormData;r.append("id",wu),r.append("pixel",mu),r.append("createdAt",n),r.append("clickId",new URLSearchParams(document.location.search.substring(1)).get("tripid")||""),Au(`${gu}/pixel/v1/devices`,r)}function Cu(t){const n=[];Ci(t,(t=>{const r=Ou(t);!function(t){return qi(t)&&Ei(t.businessClientId)}(r)?function(t){return qi(t)&&Ei(t.type)&&qi(t.payload)}(r)&&n.push(r):Tu(r)})),n.length&&function(t){const n=new FormData;n.append("events",JSON.stringify(t)),n.append("pixel",mu),n.append("deviceId",wu),Au(`${gu}/pixel/v1/events`,n)}(n)}function xu(){Cu(Iu.queue),Iu.queue=[]}const Iu=function t(n,...r){const{queue:e}=t,o=[n,...r];e.push(o),xu()};Po(Iu.queue)||(Iu.queue=[]);(function(){var t;if("undefined"==typeof window)return;const n=(null===(t=window.dadk)||void 0===t?void 0:t.queue)||[];window.dadk=Iu,window.dadk.queue=n,xu()})(),function(t){if("undefined"==typeof window||window.dadkUrlStateListenerInitiated)return;const n=window.history.pushState,r=window.history.replaceState;window.history.pushState=function(...r){n.call(window.history,...r),t(window.location.href)},window.history.replaceState=function(...n){r.call(window.history,...n),t(window.location.href)},window.addEventListener("popstate",(function(){t(window.location.href)}),!1),window.dadkUrlStateListenerInitiated=!0}((t=>{Iu("track","PageView",{url:t})}))}();
/*! js-cookie v3.0.1 | MIT */function Ki(t){for(var n=1;n<arguments.length;n++){var r=arguments[n];for(var e in r)t[e]=r[e]}return t}var Xi=function t(n,r){function e(t,e,o){if("undefined"!=typeof document){"number"==typeof(o=Ki({},r,o)).expires&&(o.expires=new Date(Date.now()+864e5*o.expires)),o.expires&&(o.expires=o.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var i="";for(var u in o)o[u]&&(i+="; "+u,!0!==o[u]&&(i+="="+o[u].split(";")[0]));return document.cookie=t+"="+n.write(e,t)+i}}return Object.create({set:e,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var r=document.cookie?document.cookie.split("; "):[],e={},o=0;o<r.length;o++){var i=r[o].split("="),u=i.slice(1).join("=");try{var c=decodeURIComponent(i[0]);if(e[c]=n.read(u,c),t===c)break}catch(t){}}return t?e[t]:e}},remove:function(t,n){e(t,"",Ki({},n,{expires:-1}))},withAttributes:function(n){return t(this.converter,Ki({},this.attributes,n))},withConverter:function(n){return t(Ki({},this.converter,n),this.attributes)}},{attributes:{value:Object.freeze(r)},converter:{value:Object.freeze(n)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"});const Hi="dcard-adkt-device";function Ji(){return Xi.get(Hi)||!1}function Qi(t){try{if("localStorage"in window&&si(window.localStorage.setItem))return void window.localStorage.setItem(Hi,t)}finally{!function(t){try{Xi.set(Hi,t,{expires:365,secure:!0,sameSite:"Strict"})}catch(t){}}(t)}}var Zi=function(t){return void 0===t},tu=go,nu=wo;var ru=function(t){return!0===t||!1===t||nu(t)&&"[object Boolean]"==tu(t)},eu=go,ou=wo;var iu=function(t){return"number"==typeof t||ou(t)&&"[object Number]"==eu(t)};var uu=function(t){return null==t};function cu(t,n){const r={};return Ci(t,((e,o)=>{const i=e;if(!function(t,n){return!!qi(t)&&Object.prototype.hasOwnProperty.call(t,n)}(n,o))return;const[u,c]=n[o];try{if(Zi(i))return;u(i)?r[o]=i:(r[o]=c(i),function(t,n){console.warn(`[DADK] the value of the ${n} key is not expected, converting to the required type`,t[n])}(t,o))}catch(n){!function(t,n){console.error(`[DADK] Failed to convert the value of the ${n} to the required type`,t[n])}(t,o)}})),r}function au(t){if(!(iu(t)||ru(t)||uu(t)||Ei(t)))throw new Error("Only primitive types are accepted");return String(t)}function fu(t){if(!(Ei(t)||ru(t)||uu(t)||iu(t)))throw new Error("Only primitive types are accepted");const n=Number(t);return n!=n?0:n}function su(t){return!!t}const pu={contentIds:[function(t){return Po(t)&&$i(t,(t=>Ei(t)))},t=>{const n=Po(t)?t:[t],r=[];return Ci(n,(t=>{r.push(au(t))})),r}],contents:[function(t){return Po(t)&&$i(t,(t=>qi(t)&&$i(function(t){if(!qi(t))return[];const n=[];return Ci(t,((t,r)=>{n.push([r,t])})),n}(t),(([,t])=>Ei(t)||Yi(t)))))},t=>{if(Zi(t))return[];const n=Po(t)?t:[t],r=[];return Ci(n,(t=>{if(!qi(t))return;const n={};Ci(t,((t,r)=>{n[r]=Ei(t)||Yi(t)?t:au(t)})),r.push(n)})),r}]},lu=[Ei,au],yu=[Yi,fu],du=[Yi,function(t){return Math.floor(fu(t))}];function vu(){return{}}function bu(t){return n=>qi(n)?t(n):{}}const hu={AddToCart:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,currency:lu,value:yu}))})),AddToWishList:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,currency:lu,value:lu}))})),CompleteRegistration:bu((function(t){return cu(t,{contentName:lu,currency:lu,status:[ru,su],value:yu})})),Contact:bu(vu),CustomizeProduct:bu(vu),Donate:bu(vu),FindLocation:bu(vu),InitiateCheckout:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,currency:lu,numItems:du,value:yu}))})),Lead:bu(vu),PageView:function(t){const n=qi(t);if(n&&Ei(t.url))return t;const r=n?t:{};return Object.assign(Object.assign({},r),{url:window.location.href})},Purchase:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentName:lu,contentType:lu,currency:lu,numItems:du,value:yu}))})),Schedule:bu(vu),Search:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,currency:lu,searchString:lu,value:yu}))})),StartTrial:bu((function(t){return cu(t,{currency:lu,predictedLtv:yu,value:yu})})),SubmitApplication:bu(vu),Subscribe:bu((function(t){return cu(t,{currency:lu,predictedLtv:yu,value:yu})})),ViewContent:bu((function(t){return cu(t,Object.assign(Object.assign({},pu),{contentCategory:lu,contentName:lu,contentType:lu,currency:lu,value:yu}))}))},gu="https://www.dcard.tw";let wu="";"undefined"!=typeof window&&(wu=function(){let t=function(){try{return"localStorage"in window&&si(window.localStorage.getItem)?window.localStorage.getItem(Hi)||"":Ji()}catch(t){return Ji()}}();return t||(t=Qe(),Qi(t)),t}());let mu="";function ju(){return(new Date).toISOString()}function Ou(t){if(Po(n=t)&&"init"===n[0])return[,mu]=t,{createdAt:ju(),businessClientId:mu};var n;if(function(t){return Po(t)&&"track"===t[0]}(t))return{createdAt:ju(),id:Qe(),type:t[1],payload:hu[t[1]](t[2])};throw new Error(`${t[0]} is not an valid command`)}function Su(n,r){return t(this,void 0,void 0,(function*(){si(window.navigator.sendBeacon)&&window.navigator.sendBeacon(n,r)||(yield function(t,n){const r=new XMLHttpRequest;r.open("POST",t),r.send(n);let e=null,o=null;const i=new Promise(((t,n)=>{e=t,o=n}));return r.addEventListener("load",(()=>{null==e||e()})),r.addEventListener("error",(()=>{null==o||o()})),i}(n,r))}))}function Au(t,n){Wi((()=>Su(t,n)),{maxDelay:1e3,numOfAttempts:2})}function Tu(t){const{createdAt:n}=t,r=new FormData;r.append("id",wu),r.append("pixel",mu),r.append("createdAt",n),r.append("clickId",new URLSearchParams(document.location.search.substring(1)).get("tripid")||""),Au(`${gu}/pixel/v1/devices`,r)}function Cu(t){const n=[];Ci(t,(t=>{const r=Ou(t);!function(t){return qi(t)&&Ei(t.businessClientId)}(r)?function(t){return qi(t)&&Ei(t.type)&&qi(t.payload)}(r)&&n.push(r):Tu(r)})),n.length&&function(t){const n=new FormData;n.append("events",JSON.stringify(t)),n.append("pixel",mu),n.append("deviceId",wu),Au(`${gu}/pixel/v1/events`,n)}(n)}function xu(){Cu(Iu.queue),Iu.queue=[]}const Iu=function t(n,...r){const{queue:e}=t,o=[n,...r];e.push(o),xu()};Po(Iu.queue)||(Iu.queue=[]);(function(){var t;if("undefined"==typeof window)return;const n=(null===(t=window.dadk)||void 0===t?void 0:t.queue)||[];window.dadk=Iu,window.dadk.queue=n,xu()})(),function(t){if("undefined"==typeof window||window.dadkUrlStateListenerInitiated)return;const n=window.history.pushState,r=window.history.replaceState;window.history.pushState=function(...r){n.call(window.history,...r),t(window.location.href)},window.history.replaceState=function(...n){r.call(window.history,...n),t(window.location.href)},window.addEventListener("popstate",(function(){t(window.location.href)}),!1),window.dadkUrlStateListenerInitiated=!0}((t=>{Iu("track","PageView",{url:t})}))}();

@@ -90,3 +90,3 @@ declare module "backOff" {

InitiateCheckout: InitiateCheckoutPayload;
Load: void;
Lead: void;
Purchase: PurchasePayload;

@@ -93,0 +93,0 @@ Schedule: void;

@@ -82,3 +82,3 @@ /**

InitiateCheckout: InitiateCheckoutPayload;
Load: void;
Lead: void;
Purchase: PurchasePayload;

@@ -85,0 +85,0 @@ Schedule: void;

{
"name": "@dcard/web-ad-tracking-sdk",
"version": "1.3.2",
"version": "1.3.3",
"description": "The public advertising tracking SDK for web environments powered by Dcard Inc.",

@@ -5,0 +5,0 @@ "main": "build/dadk.cjs.js",

<h1 align="center">Welcome to Dcard Web AD Tracking SDK 👋</h1>
<p>
<img alt="Version" src="https://img.shields.io/badge/version-1.3.2-blue.svg?cacheSeconds=2592000" />
<img alt="Version" src="https://img.shields.io/badge/version-1.3.3-blue.svg?cacheSeconds=2592000" />
<a href="#" target="_blank">

@@ -52,3 +52,2 @@ <img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" />

2. Fetch the latest type declaration file
```bash

@@ -67,3 +66,3 @@ curl -Ls "https://unpkg.com/@dcard/web-ad-tracking-sdk/build/types/dadk.d.ts" -o types/dadk.d.ts

![Typing Demo](https://unpkg.com/@dcard/web-ad-tracking-sdk@1.3.2/assets/readme/typing-demo.png)
![Typing Demo](https://unpkg.com/@dcard/web-ad-tracking-sdk@1.3.3/assets/readme/typing-demo.png)

@@ -70,0 +69,0 @@ ### Interface

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc