1!(function(t, e) { 2 if ('object' == typeof exports && 'object' == typeof module) 3 module.exports = e(); 4 else if ('function' == typeof define && define.amd) define([], e); 5 else { 6 var o = e(); 7 for (var n in o) ('object' == typeof exports ? exports : t)[n] = o[n]; 8 } 9})(self, () => 10 (() => { 11 var t = { 12 239: t => { 13 var e = Object.prototype.toString; 14 t.exports = function(t) { 15 return e.call(t); 16 }; 17 }, 18 924: (t, e, o) => { 19 var n = o(569)(Object.getPrototypeOf, Object); 20 t.exports = n; 21 }, 22 569: t => { 23 t.exports = function(t, e) { 24 return function(o) { 25 return t(e(o)); 26 }; 27 }; 28 }, 29 721: t => { 30 var e = Object.prototype.hasOwnProperty; 31 t.exports = function(t, o) { 32 return null != t && e.call(t, o); 33 }; 34 }, 35 469: t => { 36 var e = Array.isArray; 37 t.exports = e; 38 }, 39 5: t => { 40 t.exports = function(t) { 41 return null != t && 'object' == typeof t; 42 }; 43 }, 44 630: (t, e, o) => { 45 var n = o(239), 46 i = o(924), 47 r = o(5), 48 s = Function.prototype, 49 d = Object.prototype, 50 a = s.toString, 51 p = d.hasOwnProperty, 52 l = a.call(Object); 53 t.exports = function(t) { 54 if (!r(t) || '[object Object]' != n(t)) return !1; 55 var e = i(t); 56 if (null === e) return !0; 57 var o = p.call(e, 'constructor') && e.constructor; 58 return ( 59 'function' == typeof o && 60 o instanceof o && 61 a.call(o) == l 62 ); 63 }; 64 }, 65 37: (t, e, o) => { 66 var n = o(239), 67 i = o(469), 68 r = o(5); 69 t.exports = function(t) { 70 return ( 71 'string' == typeof t || 72 (!i(t) && r(t) && '[object String]' == n(t)) 73 ); 74 }; 75 }, 76 }, 77 e = {}; 78 function o(n) { 79 var i = e[n]; 80 if (void 0 !== i) return i.exports; 81 var r = (e[n] = { exports: {} }); 82 return t[n](r, r.exports, o), r.exports; 83 } 84 (o.n = t => { 85 var e = t && t.__esModule ? () => t.default : () => t; 86 return o.d(e, { a: e }), e; 87 }), 88 (o.d = (t, e) => { 89 for (var n in e) 90 o.o(e, n) && 91 !o.o(t, n) && 92 Object.defineProperty(t, n, { 93 enumerable: !0, 94 get: e[n], 95 }); 96 }), 97 (o.o = (t, e) => Object.prototype.hasOwnProperty.call(t, e)), 98 (o.r = t => { 99 'undefined' != typeof Symbol && 100 Symbol.toStringTag && 101 Object.defineProperty(t, Symbol.toStringTag, { 102 value: 'Module', 103 }), 104 Object.defineProperty(t, '__esModule', { value: !0 }); 105 }); 106 var n = {}; 107 return ( 108 (() => { 109 'use strict'; 110 o.r(n), o.d(n, { initAds: () => f }); 111 var t = o(721), 112 e = o.n(t),
113 i = o(630), 114 r = o.n(i), 115 s = o(37), 116 d = o.n(s); 117 function a(t, e) { 118 var o = Object.keys(t); 119 if (Object.getOwnPropertySymbols) { 120 var n = Object.getOwnPropertySymbols(t); 121 e && 122 (n = n.filter(function(e) { 123 return Object.getOwnPropertyDescriptor( 124 t, 125 e 126 ).enumerable; 127 })), 128 o.push.apply(o, n); 129 } 130 return o; 131 } 132 function p(t) { 133 for (var e = 1; e < arguments.length; e++) { 134 var o = null != arguments[e] ? arguments[e] : {}; 135 e % 2 136 ? a(Object(o), !0).forEach(function(e) { 137 l(t, e, o[e]); 138 }) 139 : Object.getOwnPropertyDescriptors 140 ? Object.defineProperties( 141 t, 142 Object.getOwnPropertyDescriptors(o) 143 ) 144 : a(Object(o)).forEach(function(e) { 145 Object.defineProperty( 146 t, 147 e, 148 Object.getOwnPropertyDescriptor(o, e) 149 ); 150 }); 151 } 152 return t; 153 } 154 function l(t, e, o) { 155 return ( 156 (e = u(e)) in t 157 ? Object.defineProperty(t, e, { 158 value: o, 159 enumerable: !0, 160 configurable: !0, 161 writable: !0, 162 }) 163 : (t[e] = o), 164 t 165 ); 166 } 167 function c(t, e) { 168 for (var o = 0; o < e.length; o++) { 169 var n = e[o]; 170 (n.enumerable = n.enumerable || !1), 171 (n.configurable = !0), 172 'value' in n && (n.writable = !0), 173 Object.defineProperty(t, u(n.key), n); 174 } 175 } 176 function u(t) { 177 var e = (function(t, e) { 178 if ('object' != typeof t || null === t) return t; 179 var o = t[Symbol.toPrimitive]; 180 if (void 0 !== o) { 181 var n = o.call(t, e || 'default'); 182 if ('object' != typeof n) return n; 183 throw new TypeError( 184 '@@toPrimitive must return a primitive value.' 185 ); 186 } 187 return ('string' === e ? String : Number)(t); 188 })(t, 'string'); 189 return 'symbol' == typeof e ? e : String(e); 190 } 191 var f = (function() { 192 function t(e) { 193 !(function(t, e) { 194 if (!(t instanceof e)) 195 throw new TypeError( 196 'Cannot call a class as a function' 197 ); 198 })(this, t), 199 (this.options = e || {}), 200 this.Init(); 201 } 202 var o, n, i; 203 return ( 204 (o = t), 205 (n = [ 206 { 207 key: 'Init', 208 value: function() { 209 return e()(this.options, 'wrapper') 210 ? e()(this.options, 'wrapper') && 211 !d()(this.options.wrapper) 212 ? console.error( 213 'wrapper must be string' 214 ) 215 : e()(this.options, 'env') 216 ? [1, 2].indexOf(this.options.env) < 217 0 218 ? console.error( 219 'env should be number 1 or number 2' 220 ) 221 : e()(this.options, 'pid') 222 ? e()(this.options, 'pid') && 223 !d()(this.options.pid) 224 ? console.error( 225 'pid must be string' 226 ) 227 : e()(this.options, 'is_mock') 228 ? [0, 1].indexOf( 229 this.options.is_mock 230 ) < 0 231 ? console.error( 232 'is_mock should be number 0 or number 1' 233 ) 234 : e()( 235 this.options, 236 'lang' 237 ) && 238 !d()(this.options.lang) 239 ? console.error( 240 'lang must be string' 241 ) 242 : e()( 243 this.options, 244 'loadSuccessCallback' 245 ) && 246 'function' != 247 typeof this 248 .options 249 .loadSuccessCallback 250 ? console.error( 251 'loadSuccessCallback must be function' 252 ) 253 : e()( 254 this.options, 255 'loadFailCallback' 256 ) && 257 'function' != 258 typeof this 259 .options 260 .loadFailCallback 261 ? console.error( 262 'loadFailCallback must be function' 263 ) 264 : e()( 265 this.options, 266 'clickEventCallback' 267 ) && 268 'function' != 269 typeof this 270 .options 271 .clickEventCallback 272 ? console.error( 273 'clickEventCallback must be function' 274 ) 275 : e()( 276 this 277 .options, 278 'expand' 279 ) && 280 !r()( 281 this.options 282 .expand 283 ) 284 ? console.error( 285 'expand must be object' 286 ) 287 : e()( 288 this 289 .options, 290 'expand' 291 ) && 292 e()( 293 this 294 .options 295 .expand, 296 'uuid' 297 ) && 298 !d()( 299 this 300 .options 301 .expand 302 .uuid 303 ) 304 ? console.error( 305 'uuid must be string' 306 ) 307 : e()( 308 this 309 .options, 310 'expand' 311 ) && 312 e()( 313 this 314 .options 315 .expand, 316 'waddr' 317 ) && 318 !d()( 319 this 320 .options 321 .expand 322 .waddr 323 ) 324 ? console.error( 325 'waddr must be string' 326 ) 327 : e()( 328 this 329 .options, 330 'expand' 331 ) && 332 e()( 333 this 334 .options 335 .expand, 336 'tokenlist' 337 ) && 338 !d()( 339 this 340 .options 341 .expand 342 .tokenlist 343 ) 344 ? console.error( 345 'tokenlist must be string' 346 ) 347 : e()( 348 this 349 .options, 350 'expand' 351 ) && 352 e()( 353 this 354 .options 355 .expand, 356 'txid' 357 ) && 358 !d()( 359 this 360 .options 361 .expand 362 .txid 363 ) 364 ? console.error( 365 'txid must be string' 366
366 ) 367 : void this.LoadAds() 368 : console.error( 369 'is_mock is require' 370 ) 371 : console.error( 372 'pid is require' 373 ) 374 : console.error('env is require') 375 : console.log('wrapper is require'); 376 }, 377 }, 378 { 379 key: 'LoadAds', 380 value: function() { 381 var t = this, 382 o = document.getElementById( 383 this.options.wrapper 384 ); 385 if (!o) 386 return console.error( 387 'wrapper is not found' 388 ); 389 var n, 390 i, 391 r, 392 s, 393 d, 394 a = 395 1 === this.options.env 396 ? 'https://test-engine.tronads.io/dist/html' 397 : 'https://engine.tronads.io/html', 398 l = document.getElementById( 399 this.options.wrapper 400 ), 401 c = document.createElement('iframe'), 402 u = ''; 403 e()(this.options, 'expand') && 404 (u = `uuid=${ 405 null !== 406 (i = this.options.expand) && 407 void 0 !== i && 408 i.uuid 409 ? this.options.expand.uuid 410 : '' 411 }&waddr=${ 412 null !== 413 (r = this.options.expand) && 414 void 0 !== r && 415 r.waddr 416 ? this.options.expand.waddr 417 : '' 418 }&tokenlist=${ 419 null !== 420 (s = this.options.expand) && 421 void 0 !== s && 422 s.tokenlist 423 ? this.options.expand.tokenlist 424 : '' 425 }&txid=${ 426 null !== 427 (d = this.options.expand) && 428 void 0 !== d && 429 d.txid 430 ? this.options.expand.txid 431 : '' 432 }`); 433 var f = encodeURIComponent( 434 `env=${this.options.env}&pid=${ 435 this.options.pid 436 }&is_mock=${ 437 this.options.is_mock 438 }&lang=${(null === (n = this.options) || 439 void 0 === n 440 ? void 0 441 : n.lang) || ''}&${u}` 442 ); 443 (c.id = `pid-${this.options.pid}`), 444 (c.name = `pid-${this.options.pid}`), 445 (c.border = 0), 446 (c.width = '100%'), 447 (c.height = '100%'), 448 (c.marginWidth = 0), 449 (c.marginHeight = 0), 450 (c.scrolling = !1), 451 (c.frameBorder = 0), 452 (c.src = `${a}/pid-${ 453 this.options.pid 454 }.html?${f}`); 455 var v = document.getElementById( 456 `pid-${this.options.pid}` 457 ); 458 v && o.removeChild(v), 459 window.tronAdSdkFeInterface || 460 (window.tronAdSdkFeInterface = {}), 461 window.tronAdSdkFeInterface 462 .adWindowEventTagArray || 463 (window.tronAdSdkFeInterface.adWindowEventTagArray = []), 464 window.tronAdSdkFeInterface.adWindowEventTagArray.indexOf( 465 `ad-event-pid-${this.options.pid}` 466 ) < 0 && 467 window.tronAdSdkFeInterface.adWindowEventTagArray.push( 468 `ad-event-pid-${ 469 this.options.pid 470 }` 471 ); 472 var h = function(e) { 473 var o, n, i; 474 if ( 475 !( 476 [ 477 'https://test-engine.tronads.io', 478 'https://engine.tronads.io', 479 ].indexOf(e.origin) < 0 || 480 ((null == e || 481 null === (o = e.data) || 482 void 0 === o 483 ? void 0 484 : o.pid) !== 485 t.options.pid && 486 'defaultIndexPid' !== 487 (null == e || 488 null === (n = e.data) || 489 void 0 === n 490 ? void 0 491 : n.pid)) 492 ) 493 ) 494 if ('initSuccess' === e.data.type) 495 (null === (i = t.options) || 496 void 0 === i 497 ? void 0 498 : i.loadSuccessCallback) && 499 t.options.loadSuccessCallback( 500 p({}, e.data) 501 ); 502 else if ( 503 'initError' === e.data.type 504 ) { 505 var r; 506 (null === (r = t.options) || 507 void 0 === r 508 ? void 0 509 : r.loadFailCallback) && 510 t.options.loadFailCallback( 511 p({}, e.data) 512 ); 513 } else if ( 514 'clickUrl' === e.data.type 515 ) { 516 var s, d, a; 517 null != e && 518 null !== (s = e.data) && 519 void 0 !== s && 520 s.value && 521 window.open( 522 null == e || 523 null === (a = e.data) || 524 void 0 === a 525 ? void 0 526 : a.value 527 ), 528 (null === (d = t.options) || 529 void 0 === d 530 ? void 0 531 : d.clickEventCallback) && 532 t.options.clickEventCallback( 533 p({}, e.data) 534 ); 535 } 536 }; 537 window.tronAdSdkFeInterface 538 .adWindowEventObj || 539 (window.tronAdSdkFeInterface.adWindowEventObj = {}), 540 Object.hasOwnProperty.call( 541 window.tronAdSdkFeInterface 542 .adWindowEventObj, 543 `ad-event-pid-${this.options.pid}` 544 ) && 545 window.removeEventListener( 546 'message', 547 window.tronAdSdkFeInterface 548 .adWindowEventObj[ 549 `ad-event-pid-${ 550 this.options.pid 551 }` 552 ] 553 ), 554 (window.tronAdSdkFeInterface.adWindowEventObj = p( 555 p( 556 {}, 557 window.tronAdSdkFeInterface 558 .adWindowEventObj 559 ), 560 {}, 561 { 562 [`ad-event-pid-${ 563 this.options.pid 564 }`]: h, 565 } 566 )), 567 window.addEventListener('message', h), 568 l.appendChild(c); 569 }, 570 }, 571 { 572 key: 'unbindMessage', 573 value: function() { 574 var t = 575 arguments.length > 0 && 576 void 0 !== arguments[0] 577 ? arguments[0] 578 : ''; 579 try { 580 if ( 581 Object.hasOwnProperty.call( 582 window.tronAdSdkFeInterface 583 .adWindowEventObj, 584 `ad-event-pid-${t || 585 this.options.pid}` 586 ) 587 ) 588 return ( 589 window.removeEventListener( 590 'message', 591 window.tronAdSdkFeInterface 592 .adWindowEventObj[ 593 `ad-event-pid-${t || 594 this.options.pid}` 595 ] 596 ), 597 { 598 pid: `${t || 599 this.options.pid}`, 600 status: 'success', 601 } 602 ); 603 } catch (e) { 604 return { 605 pid: `${t || this.options.pid}`, 606 status: 'fail', 607 }; 608 } 609 }, 610 }, 611 ]), 612 n && c(o.prototype, n), 613 i && c(o, i), 614 Object.defineProperty(o, 'prototype', { writable: !1 }), 615 t 616 ); 617 })(); 618 })(), 619 n 620 ); 621 })() 622);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.